From svnnotify △ sourceforge.jp Tue Jul 3 11:24:34 2007 From: svnnotify △ sourceforge.jp (svnnotify △ sourceforge.jp) Date: Tue, 3 Jul 2007 11:24:34 +0900 Subject: [pal-cvs 2474] [206] sync up with j2 Message-ID: <20070703022434.9486B2AC015@users.sourceforge.jp> Revision: 206 http://svn.sourceforge.jp/cgi-bin/viewcvs.cgi?root=pal&view=rev&rev=206 Author: shinsuke Date: 2007-07-03 11:24:34 +0900 (Tue, 03 Jul 2007) Log Message: ----------- sync up with j2 Modified Paths: -------------- pal-portal/trunk/build.properties pal-portal/trunk/portal/patches/applications/j2-admin/src/java/org/apache/jetspeed/portlets/registration/UserRegistrationPortlet.java pal-portal/trunk/portal/patches/applications/j2-admin/src/webapp/WEB-INF/portlet.xml pal-portal/trunk/portal/patches/applications/j2-admin/src/webapp/WEB-INF/view/site/site-view.vm pal-portal/trunk/portal/patches/components/page-manager/src/java/org/apache/jetspeed/page/document/psml/CastorFileSystemDocumentHandler.java pal-portal/trunk/portal/patches/src/webapp/WEB-INF/assembly/jetspeed-services.xml pal-portal/trunk/portal/patches/src/webapp/WEB-INF/assembly/pipelines.xml -------------- next part -------------- Modified: pal-portal/trunk/build.properties =================================================================== --- pal-portal/trunk/build.properties 2007-06-28 05:43:34 UTC (rev 205) +++ pal-portal/trunk/build.properties 2007-07-03 02:24:34 UTC (rev 206) @@ -64,7 +64,7 @@ org.apache.jetspeed.portal.currentVersion=${portal.version} # Jetspeed SVN revision -jetspeed2.revision=550655 +jetspeed2.revision=552638 # Dependencies for Jetspeed jetspeed.version=2.2-dev_pal-${portal.version} Modified: pal-portal/trunk/portal/patches/applications/j2-admin/src/java/org/apache/jetspeed/portlets/registration/UserRegistrationPortlet.java =================================================================== --- pal-portal/trunk/portal/patches/applications/j2-admin/src/java/org/apache/jetspeed/portlets/registration/UserRegistrationPortlet.java 2007-06-28 05:43:34 UTC (rev 205) +++ pal-portal/trunk/portal/patches/applications/j2-admin/src/java/org/apache/jetspeed/portlets/registration/UserRegistrationPortlet.java 2007-07-03 02:24:34 UTC (rev 206) @@ -1,8 +1,8 @@ Index: applications/j2-admin/src/java/org/apache/jetspeed/portlets/registration/UserRegistrationPortlet.java =================================================================== ---- applications/j2-admin/src/java/org/apache/jetspeed/portlets/registration/UserRegistrationPortlet.java (リビジョン 514361) +--- applications/j2-admin/src/java/org/apache/jetspeed/portlets/registration/UserRegistrationPortlet.java (リビジョン 552638) +++ applications/j2-admin/src/java/org/apache/jetspeed/portlets/registration/UserRegistrationPortlet.java (侯度コピ〖) -@@ -349,8 +349,8 @@ +@@ -358,8 +358,8 @@ // These last two are special cases you must have them // comment them out here if you use the generated password option @@ -13,7 +13,7 @@ // the following can be placed in any order, and will appear in that order on the page -@@ -362,13 +362,13 @@ +@@ -371,13 +371,13 @@ {"user.employer", optional , new Integer(80), IS_STRING}, */ @@ -29,7 +29,7 @@ /* {"user.name.middle", optional , new Integer(30), IS_STRING}, {"user.name.suffix", optional , new Integer(10), IS_STRING}, -@@ -403,13 +403,13 @@ +@@ -412,13 +412,13 @@ {"user.home-info.online.email", optional , new Integer(80), IS_EMAIL}, {"user.home-info.online.uri", optional , new Integer(80), IS_URL}, */ Modified: pal-portal/trunk/portal/patches/applications/j2-admin/src/webapp/WEB-INF/portlet.xml =================================================================== --- pal-portal/trunk/portal/patches/applications/j2-admin/src/webapp/WEB-INF/portlet.xml 2007-06-28 05:43:34 UTC (rev 205) +++ pal-portal/trunk/portal/patches/applications/j2-admin/src/webapp/WEB-INF/portlet.xml 2007-07-03 02:24:34 UTC (rev 206) @@ -1,8 +1,8 @@ Index: applications/j2-admin/src/webapp/WEB-INF/portlet.xml =================================================================== ---- applications/j2-admin/src/webapp/WEB-INF/portlet.xml (リビジョン 539124) +--- applications/j2-admin/src/webapp/WEB-INF/portlet.xml (リビジョン 552638) +++ applications/j2-admin/src/webapp/WEB-INF/portlet.xml (侯度コピ〖) -@@ -1100,7 +1100,7 @@ +@@ -1116,7 +1116,7 @@ This option will generate a new password for each user registration Option_Generate_Passwords @@ -11,12 +11,12 @@ This option will force email address to be system wide unique -@@ -1165,7 +1165,7 @@ +@@ -1182,7 +1182,7 @@ SendEmail - false + true - - + + newUserTemplateDirectory Modified: pal-portal/trunk/portal/patches/applications/j2-admin/src/webapp/WEB-INF/view/site/site-view.vm =================================================================== --- pal-portal/trunk/portal/patches/applications/j2-admin/src/webapp/WEB-INF/view/site/site-view.vm 2007-06-28 05:43:34 UTC (rev 205) +++ pal-portal/trunk/portal/patches/applications/j2-admin/src/webapp/WEB-INF/view/site/site-view.vm 2007-07-03 02:24:34 UTC (rev 206) @@ -1,8 +1,8 @@ Index: applications/j2-admin/src/webapp/WEB-INF/view/site/site-view.vm =================================================================== ---- applications/j2-admin/src/webapp/WEB-INF/view/site/site-view.vm (リビジョン 545568) +--- applications/j2-admin/src/webapp/WEB-INF/view/site/site-view.vm (リビジョン 552638) +++ applications/j2-admin/src/webapp/WEB-INF/view/site/site-view.vm (侯度コピ〖) -@@ -1164,7 +1164,7 @@ +@@ -1193,7 +1193,7 @@ else servletPath = "desktop"; } Modified: pal-portal/trunk/portal/patches/components/page-manager/src/java/org/apache/jetspeed/page/document/psml/CastorFileSystemDocumentHandler.java =================================================================== --- pal-portal/trunk/portal/patches/components/page-manager/src/java/org/apache/jetspeed/page/document/psml/CastorFileSystemDocumentHandler.java 2007-06-28 05:43:34 UTC (rev 205) +++ pal-portal/trunk/portal/patches/components/page-manager/src/java/org/apache/jetspeed/page/document/psml/CastorFileSystemDocumentHandler.java 2007-07-03 02:24:34 UTC (rev 206) @@ -1,8 +1,8 @@ Index: components/page-manager/src/java/org/apache/jetspeed/page/document/psml/CastorFileSystemDocumentHandler.java =================================================================== ---- components/page-manager/src/java/org/apache/jetspeed/page/document/psml/CastorFileSystemDocumentHandler.java (リビジョン 545568) +--- components/page-manager/src/java/org/apache/jetspeed/page/document/psml/CastorFileSystemDocumentHandler.java (リビジョン 552638) +++ components/page-manager/src/java/org/apache/jetspeed/page/document/psml/CastorFileSystemDocumentHandler.java (侯度コピ〖) -@@ -186,6 +186,11 @@ +@@ -211,6 +211,11 @@ { fileName = path + this.documentType; } Modified: pal-portal/trunk/portal/patches/src/webapp/WEB-INF/assembly/jetspeed-services.xml =================================================================== --- pal-portal/trunk/portal/patches/src/webapp/WEB-INF/assembly/jetspeed-services.xml 2007-06-28 05:43:34 UTC (rev 205) +++ pal-portal/trunk/portal/patches/src/webapp/WEB-INF/assembly/jetspeed-services.xml 2007-07-03 02:24:34 UTC (rev 206) @@ -1,11 +1,11 @@ Index: src/webapp/WEB-INF/assembly/jetspeed-services.xml =================================================================== ---- src/webapp/WEB-INF/assembly/jetspeed-services.xml (リビジョン 545568) +--- src/webapp/WEB-INF/assembly/jetspeed-services.xml (リビジョン 552638) +++ src/webapp/WEB-INF/assembly/jetspeed-services.xml (侯度コピ〖) -@@ -114,6 +114,11 @@ - - - +@@ -117,6 +117,11 @@ + + + + + + Modified: pal-portal/trunk/portal/patches/src/webapp/WEB-INF/assembly/pipelines.xml =================================================================== --- pal-portal/trunk/portal/patches/src/webapp/WEB-INF/assembly/pipelines.xml 2007-06-28 05:43:34 UTC (rev 205) +++ pal-portal/trunk/portal/patches/src/webapp/WEB-INF/assembly/pipelines.xml 2007-07-03 02:24:34 UTC (rev 206) @@ -1,8 +1,8 @@ Index: src/webapp/WEB-INF/assembly/pipelines.xml =================================================================== ---- src/webapp/WEB-INF/assembly/pipelines.xml (リビジョン 550655) +--- src/webapp/WEB-INF/assembly/pipelines.xml (リビジョン 552638) +++ src/webapp/WEB-INF/assembly/pipelines.xml (侯度コピ〖) -@@ -330,6 +330,7 @@ +@@ -332,6 +332,7 @@ From svnnotify △ sourceforge.jp Tue Jul 3 16:28:13 2007 From: svnnotify △ sourceforge.jp (svnnotify △ sourceforge.jp) Date: Tue, 3 Jul 2007 16:28:13 +0900 Subject: [pal-cvs 2475] [207] added user inforupdater. Message-ID: <20070703072813.3BDE92AC00F@users.sourceforge.jp> Revision: 207 http://svn.sourceforge.jp/cgi-bin/viewcvs.cgi?root=pal&view=rev&rev=207 Author: shinsuke Date: 2007-07-03 16:28:12 +0900 (Tue, 03 Jul 2007) Log Message: ----------- added user inforupdater. Modified Paths: -------------- pal-admin/trunk/src/main/java/jp/sf/pal/admin/PALAdminConstants.java pal-admin/trunk/src/main/java/jp/sf/pal/admin/filter/ForgottenPasswordFilter.java pal-admin/trunk/src/main/java/jp/sf/pal/admin/filter/UserRegistrationFilter.java pal-admin/trunk/src/main/java/jp/sf/pal/admin/logic/SecurityProviderLogic.java pal-admin/trunk/src/main/java/jp/sf/pal/admin/service/UserRegistrationService.java pal-admin/trunk/src/main/java/jp/sf/pal/admin/web/registration/PublicPortalRegistrationPage.java pal-admin/trunk/src/main/java/jp/sf/pal/admin/web/registration/UserRegistrationPage.java pal-admin/trunk/src/main/resources/appMessages.properties pal-admin/trunk/src/main/resources/appMessages_ja.properties pal-admin/trunk/src/main/resources/jp/sf/pal/admin/web/registration/UserRegistration_ja.properties pal-admin/trunk/src/main/resources/jp/sf/pal/admin/web/registration/label.properties pal-admin/trunk/src/main/webapp/WEB-INF/jetspeed-portlet.xml pal-admin/trunk/src/main/webapp/WEB-INF/portlet.xml Added Paths: ----------- pal-admin/trunk/src/main/java/jp/sf/pal/admin/filter/DefaultUserRegistrationFilter.java pal-admin/trunk/src/main/java/jp/sf/pal/admin/web/registration/PublicPortalRegistrationUpdatePage.java pal-admin/trunk/src/main/resources/jp/sf/pal/admin/web/registration/UserRegistrationUpdate.properties pal-admin/trunk/src/main/resources/jp/sf/pal/admin/web/registration/UserRegistrationUpdate_ja.properties pal-admin/trunk/src/main/webapp/view/registration/publicPortalRegistrationUpdate.html Removed Paths: ------------- pal-admin/trunk/src/main/java/jp/sf/pal/admin/filter/AbstractUserRegistrationFilter.java -------------- next part -------------- Modified: pal-admin/trunk/src/main/java/jp/sf/pal/admin/PALAdminConstants.java =================================================================== --- pal-admin/trunk/src/main/java/jp/sf/pal/admin/PALAdminConstants.java 2007-07-03 02:24:34 UTC (rev 206) +++ pal-admin/trunk/src/main/java/jp/sf/pal/admin/PALAdminConstants.java 2007-07-03 07:28:12 UTC (rev 207) @@ -134,7 +134,7 @@ public static final String USER_REGISTRATION_PARAMS = PREFIX + "UserRegistrationParams"; - public static final String DEFAULT_TEMPLATE_LOCATION = "/WEB-INF/view/userreg/"; + public static final String DEFAULT_TEMPLATE_LOCATION = "/WEB-INF/template/userreg/"; public static final String DEFAULT_TEMPLATE_NAME = "userRegistrationEmail.vm"; Deleted: pal-admin/trunk/src/main/java/jp/sf/pal/admin/filter/AbstractUserRegistrationFilter.java =================================================================== --- pal-admin/trunk/src/main/java/jp/sf/pal/admin/filter/AbstractUserRegistrationFilter.java 2007-07-03 02:24:34 UTC (rev 206) +++ pal-admin/trunk/src/main/java/jp/sf/pal/admin/filter/AbstractUserRegistrationFilter.java 2007-07-03 07:28:12 UTC (rev 207) @@ -1,202 +0,0 @@ -package jp.sf.pal.admin.filter; - -import java.io.FileNotFoundException; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import javax.portlet.ActionRequest; -import javax.portlet.ActionResponse; -import javax.portlet.PortletConfig; -import javax.portlet.PortletContext; -import javax.portlet.PortletException; -import javax.portlet.RenderRequest; -import javax.portlet.RenderResponse; - -import jp.sf.pal.admin.PALAdminConstants; - -import org.apache.jetspeed.CommonPortletServices; -import org.apache.jetspeed.administration.PortalAdministration; -import org.apache.jetspeed.locator.JetspeedTemplateLocator; -import org.apache.jetspeed.security.UserManager; -import org.apache.portals.bridges.portletfilter.PortletFilter; -import org.apache.portals.bridges.portletfilter.PortletFilterChain; -import org.apache.portals.bridges.portletfilter.PortletFilterConfig; - -public abstract class AbstractUserRegistrationFilter implements PortletFilter -{ - - private PortalAdministration portalAdministration; - - private UserManager userManager; - - private Map userRegistrationParams; - - public void destroy() - { - portalAdministration = null; - userManager = null; - userRegistrationParams = null; - } - - public void init(PortletFilterConfig filterConfig) throws PortletException - { - PortletConfig portletConfig = filterConfig.getPortletConfig(); - PortletContext portletContext = portletConfig.getPortletContext(); - - // portalAdministration - portalAdministration = (PortalAdministration) portletContext - .getAttribute(CommonPortletServices.CPS_PORTAL_ADMINISTRATION); - if (portalAdministration == null) - { - throw new PortletException( - "Failed to find the `prtaon portlet initialization"); - } - - // userManager - userManager = (UserManager) portletContext - .getAttribute(CommonPortletServices.CPS_USER_MANAGER_COMPONENT); - if (userManager == null) - { - throw new PortletException( - "Failed to find the User Manager on portlet initialization"); - } - - userRegistrationParams = new HashMap(); - - String templateLocation = portletConfig - .getInitParameter(PALAdminConstants.EMAIL_TEMPLATE_LOCATION); - if (templateLocation == null) - { - templateLocation = PALAdminConstants.DEFAULT_TEMPLATE_LOCATION; - } - templateLocation = portletContext.getRealPath(templateLocation); - userRegistrationParams.put(PALAdminConstants.EMAIL_TEMPLATE_LOCATION, - templateLocation); - - String templateName = portletConfig - .getInitParameter(PALAdminConstants.EMAIL_TEMPLATE_NAME); - if (templateName == null) - { - templateName = PALAdminConstants.DEFAULT_TEMPLATE_NAME; - } - userRegistrationParams.put(PALAdminConstants.EMAIL_TEMPLATE_NAME, - templateName); - - ArrayList roots = new ArrayList(1); - roots.add(templateLocation); - - try - { - JetspeedTemplateLocator templateLocator = new JetspeedTemplateLocator( - roots, "email", portletContext.getRealPath("/")); - templateLocator.start(); - userRegistrationParams.put(PALAdminConstants.TEMPLATE_LOCATOR, - templateLocator); - } - catch (FileNotFoundException e) - { - throw new PortletException("Could not start the template locator.", - e); - } - } - - public void processActionFilter(ActionRequest request, - ActionResponse response, PortletFilterChain chain) - throws PortletException, IOException - { - request.setAttribute(PALAdminConstants.PORTAL_ADMINISTRATION_COMPONENT, - portalAdministration); - request.setAttribute(PALAdminConstants.USER_MANAGER_COMPONENT, - userManager); - request.setAttribute(PALAdminConstants.USER_REGISTRATION_PARAMS, - userRegistrationParams); - - chain.processActionFilter(request, response); - } - - public void renderFilter(RenderRequest request, RenderResponse response, - PortletFilterChain chain) throws PortletException, IOException - { - request.setAttribute(PALAdminConstants.PORTAL_ADMINISTRATION_COMPONENT, - portalAdministration); - request.setAttribute(PALAdminConstants.USER_MANAGER_COMPONENT, - userManager); - request.setAttribute(PALAdminConstants.USER_REGISTRATION_PARAMS, - userRegistrationParams); - - chain.renderFilter(request, response); - } - - protected List getInitParameterList(PortletConfig portletConfig, - String ipName) - { - String temp = portletConfig.getInitParameter(ipName); - if (temp == null) - { - return new ArrayList(); - } - - String[] temps = temp.split("\\,"); - for (int ix = 0; ix < temps.length; ix++) - { - temps[ix] = temps[ix].trim(); - } - - return Arrays.asList(temps); - } - - /** - * @return the portalAdministration - */ - public PortalAdministration getPortalAdministration() - { - return portalAdministration; - } - - /** - * @param portalAdministration the portalAdministration to set - */ - public void setPortalAdministration( - PortalAdministration portalAdministration) - { - this.portalAdministration = portalAdministration; - } - - /** - * @return the userManager - */ - public UserManager getUserManager() - { - return userManager; - } - - /** - * @param userManager the userManager to set - */ - public void setUserManager(UserManager userManager) - { - this.userManager = userManager; - } - - /** - * @return the userRegistrationParams - */ - public Map getUserRegistrationParams() - { - return userRegistrationParams; - } - - /** - * @param userRegistrationParams the userRegistrationParams to set - */ - public void setUserRegistrationParams( - Map userRegistrationParams) - { - this.userRegistrationParams = userRegistrationParams; - } - -} \ No newline at end of file Copied: pal-admin/trunk/src/main/java/jp/sf/pal/admin/filter/DefaultUserRegistrationFilter.java (from rev 206, pal-admin/trunk/src/main/java/jp/sf/pal/admin/filter/AbstractUserRegistrationFilter.java) =================================================================== --- pal-admin/trunk/src/main/java/jp/sf/pal/admin/filter/AbstractUserRegistrationFilter.java 2007-07-03 02:24:34 UTC (rev 206) +++ pal-admin/trunk/src/main/java/jp/sf/pal/admin/filter/DefaultUserRegistrationFilter.java 2007-07-03 07:28:12 UTC (rev 207) @@ -0,0 +1,202 @@ +package jp.sf.pal.admin.filter; + +import java.io.FileNotFoundException; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import javax.portlet.ActionRequest; +import javax.portlet.ActionResponse; +import javax.portlet.PortletConfig; +import javax.portlet.PortletContext; +import javax.portlet.PortletException; +import javax.portlet.RenderRequest; +import javax.portlet.RenderResponse; + +import jp.sf.pal.admin.PALAdminConstants; + +import org.apache.jetspeed.CommonPortletServices; +import org.apache.jetspeed.administration.PortalAdministration; +import org.apache.jetspeed.locator.JetspeedTemplateLocator; +import org.apache.jetspeed.security.UserManager; +import org.apache.portals.bridges.portletfilter.PortletFilter; +import org.apache.portals.bridges.portletfilter.PortletFilterChain; +import org.apache.portals.bridges.portletfilter.PortletFilterConfig; + +public class DefaultUserRegistrationFilter implements PortletFilter +{ + + private PortalAdministration portalAdministration; + + private UserManager userManager; + + private Map userRegistrationParams; + + public void destroy() + { + portalAdministration = null; + userManager = null; + userRegistrationParams = null; + } + + public void init(PortletFilterConfig filterConfig) throws PortletException + { + PortletConfig portletConfig = filterConfig.getPortletConfig(); + PortletContext portletContext = portletConfig.getPortletContext(); + + // portalAdministration + portalAdministration = (PortalAdministration) portletContext + .getAttribute(CommonPortletServices.CPS_PORTAL_ADMINISTRATION); + if (portalAdministration == null) + { + throw new PortletException( + "Failed to find the `prtaon portlet initialization"); + } + + // userManager + userManager = (UserManager) portletContext + .getAttribute(CommonPortletServices.CPS_USER_MANAGER_COMPONENT); + if (userManager == null) + { + throw new PortletException( + "Failed to find the User Manager on portlet initialization"); + } + + userRegistrationParams = new HashMap(); + + String templateLocation = portletConfig + .getInitParameter(PALAdminConstants.EMAIL_TEMPLATE_LOCATION); + if (templateLocation == null) + { + templateLocation = PALAdminConstants.DEFAULT_TEMPLATE_LOCATION; + } + templateLocation = portletContext.getRealPath(templateLocation); + userRegistrationParams.put(PALAdminConstants.EMAIL_TEMPLATE_LOCATION, + templateLocation); + + String templateName = portletConfig + .getInitParameter(PALAdminConstants.EMAIL_TEMPLATE_NAME); + if (templateName == null) + { + templateName = PALAdminConstants.DEFAULT_TEMPLATE_NAME; + } + userRegistrationParams.put(PALAdminConstants.EMAIL_TEMPLATE_NAME, + templateName); + + ArrayList roots = new ArrayList(1); + roots.add(templateLocation); + + try + { + JetspeedTemplateLocator templateLocator = new JetspeedTemplateLocator( + roots, "email", portletContext.getRealPath("/")); + templateLocator.start(); + userRegistrationParams.put(PALAdminConstants.TEMPLATE_LOCATOR, + templateLocator); + } + catch (FileNotFoundException e) + { + throw new PortletException("Could not start the template locator.", + e); + } + } + + public void processActionFilter(ActionRequest request, + ActionResponse response, PortletFilterChain chain) + throws PortletException, IOException + { + request.setAttribute(PALAdminConstants.PORTAL_ADMINISTRATION_COMPONENT, + portalAdministration); + request.setAttribute(PALAdminConstants.USER_MANAGER_COMPONENT, + userManager); + request.setAttribute(PALAdminConstants.USER_REGISTRATION_PARAMS, + userRegistrationParams); + + chain.processActionFilter(request, response); + } + + public void renderFilter(RenderRequest request, RenderResponse response, + PortletFilterChain chain) throws PortletException, IOException + { + request.setAttribute(PALAdminConstants.PORTAL_ADMINISTRATION_COMPONENT, + portalAdministration); + request.setAttribute(PALAdminConstants.USER_MANAGER_COMPONENT, + userManager); + request.setAttribute(PALAdminConstants.USER_REGISTRATION_PARAMS, + userRegistrationParams); + + chain.renderFilter(request, response); + } + + protected List getInitParameterList(PortletConfig portletConfig, + String ipName) + { + String temp = portletConfig.getInitParameter(ipName); + if (temp == null) + { + return new ArrayList(); + } + + String[] temps = temp.split("\\,"); + for (int ix = 0; ix < temps.length; ix++) + { + temps[ix] = temps[ix].trim(); + } + + return Arrays.asList(temps); + } + + /** + * @return the portalAdministration + */ + public PortalAdministration getPortalAdministration() + { + return portalAdministration; + } + + /** + * @param portalAdministration the portalAdministration to set + */ + public void setPortalAdministration( + PortalAdministration portalAdministration) + { + this.portalAdministration = portalAdministration; + } + + /** + * @return the userManager + */ + public UserManager getUserManager() + { + return userManager; + } + + /** + * @param userManager the userManager to set + */ + public void setUserManager(UserManager userManager) + { + this.userManager = userManager; + } + + /** + * @return the userRegistrationParams + */ + public Map getUserRegistrationParams() + { + return userRegistrationParams; + } + + /** + * @param userRegistrationParams the userRegistrationParams to set + */ + public void setUserRegistrationParams( + Map userRegistrationParams) + { + this.userRegistrationParams = userRegistrationParams; + } + +} \ No newline at end of file Modified: pal-admin/trunk/src/main/java/jp/sf/pal/admin/filter/ForgottenPasswordFilter.java =================================================================== --- pal-admin/trunk/src/main/java/jp/sf/pal/admin/filter/ForgottenPasswordFilter.java 2007-07-03 02:24:34 UTC (rev 206) +++ pal-admin/trunk/src/main/java/jp/sf/pal/admin/filter/ForgottenPasswordFilter.java 2007-07-03 07:28:12 UTC (rev 207) @@ -7,7 +7,7 @@ import org.apache.portals.bridges.portletfilter.PortletFilterConfig; -public class ForgottenPasswordFilter extends AbstractUserRegistrationFilter +public class ForgottenPasswordFilter extends DefaultUserRegistrationFilter { public ForgottenPasswordFilter() { Modified: pal-admin/trunk/src/main/java/jp/sf/pal/admin/filter/UserRegistrationFilter.java =================================================================== --- pal-admin/trunk/src/main/java/jp/sf/pal/admin/filter/UserRegistrationFilter.java 2007-07-03 02:24:34 UTC (rev 206) +++ pal-admin/trunk/src/main/java/jp/sf/pal/admin/filter/UserRegistrationFilter.java 2007-07-03 07:28:12 UTC (rev 207) @@ -28,7 +28,7 @@ import org.apache.portals.bridges.portletfilter.PortletFilter; import org.apache.portals.bridges.portletfilter.PortletFilterConfig; -public class UserRegistrationFilter extends AbstractUserRegistrationFilter +public class UserRegistrationFilter extends DefaultUserRegistrationFilter implements PortletFilter { public UserRegistrationFilter() Modified: pal-admin/trunk/src/main/java/jp/sf/pal/admin/logic/SecurityProviderLogic.java =================================================================== --- pal-admin/trunk/src/main/java/jp/sf/pal/admin/logic/SecurityProviderLogic.java 2007-07-03 02:24:34 UTC (rev 206) +++ pal-admin/trunk/src/main/java/jp/sf/pal/admin/logic/SecurityProviderLogic.java 2007-07-03 07:28:12 UTC (rev 207) @@ -471,18 +471,22 @@ user = new User(); user.setName(username); user.setPassword(null);//TODO null? - user.setUpdateRequired(credential.isUpdateRequired()); - user.setLastLogon(credential.getLastAuthenticationDate()); - user.setUserEnabled(credential.isEnabled()); - user.setExpirationDate(credential.getExpirationDate()); - if (credential.isExpired()) + // not guest + if (credential != null) { - user.setExpires(PALAdminConstants.USER_CREDENTIAL_EXPIRED); + user.setUpdateRequired(credential.isUpdateRequired()); + user.setLastLogon(credential.getLastAuthenticationDate()); + user.setUserEnabled(credential.isEnabled()); + user.setExpirationDate(credential.getExpirationDate()); + if (credential.isExpired()) + { + user.setExpires(PALAdminConstants.USER_CREDENTIAL_EXPIRED); + } + else + { + user.setExpires(PALAdminConstants.USER_CREDENTIAL_ACTIVE); + } } - else - { - user.setExpires(PALAdminConstants.USER_CREDENTIAL_ACTIVE); - } //TODO groups //TODO roles Modified: pal-admin/trunk/src/main/java/jp/sf/pal/admin/service/UserRegistrationService.java =================================================================== --- pal-admin/trunk/src/main/java/jp/sf/pal/admin/service/UserRegistrationService.java 2007-07-03 02:24:34 UTC (rev 206) +++ pal-admin/trunk/src/main/java/jp/sf/pal/admin/service/UserRegistrationService.java 2007-07-03 07:28:12 UTC (rev 207) @@ -20,6 +20,7 @@ import jp.sf.pal.admin.util.UserRegistrationUtil; import jp.sf.pal.admin.web.registration.ForgottenPasswordPage; import jp.sf.pal.admin.web.registration.PublicPortalRegistrationPage; +import jp.sf.pal.admin.web.registration.PublicPortalRegistrationUpdatePage; import jp.sf.pal.admin.web.registration.PublicPortalSecretAnswerPage; import jp.sf.pal.admin.web.registration.ResetPasswordPage; import jp.sf.pal.admin.web.registration.UserRegistrationPage; @@ -128,7 +129,7 @@ } } - // Ok, we think we're good to go, let's create the user! + // we think we're good to go, let's create the user! Map userInfo = createUserInfoMap(page); try @@ -276,7 +277,7 @@ throw new CommonException("failed_to_send", "Could not send a mail.", e); } - //TODO this is currently hacked with a hashmap... needs to move to either a DB table + //TODO this is currently hacked with a hash map... needs to move to either a DB table // or to some sort of credential Map map = new HashMap(); map.put("user.name", userName); @@ -394,6 +395,404 @@ return url; } + public void loadPage(PublicPortalRegistrationUpdatePage page) throws CommonException + { + Principal userPrincipal = FacesContext.getCurrentInstance().getExternalContext().getUserPrincipal(); + if (userPrincipal == null) + { + throw new CommonException("could.not.find.your.credential", "User principal is null."); + } + + User user; + try + { + user = PortalComponentUtil.getUserManager().getUser(userPrincipal.getName()); + if (user == null) + { + throw new CommonException("could.not.find.your.account", "User is null."); + } + } + catch (SecurityException e) + { + throw new CommonException("could.not.find.your.account", "User is null.", e); + } + + Preferences userAttributes = user.getUserAttributes(); + updateUserInfo(page, userAttributes); + } + + public void update(PublicPortalRegistrationUpdatePage page) throws CommonException + { + Principal userPrincipal = page.getFacesContext().getExternalContext().getUserPrincipal(); + if (userPrincipal == null) + { + throw new CommonException("could.not.find.your.credential", "User principal is null."); + } + + if (page.getPassword() != null && !page.getPassword().equals("")) + { + if (page.getPassword().equals(page.getVerifyPassword())) + { + try + { + PortalComponentUtil.getUserManager().setPassword(userPrincipal.getName(), null, page.getPassword()); + } + catch (SecurityException e) + { + throw new CommonException("could.not.update.password", "Could not update a password.", e); + } + } + else + { + throw new CommonException("could.not.match.passwords", "Could not match passwords."); + } + } + + User user; + try + { + user = PortalComponentUtil.getUserManager().getUser(userPrincipal.getName()); + if (user == null) + { + throw new CommonException("could.not.find.your.account", "User is null."); + } + } + catch (SecurityException e) + { + throw new CommonException("could.not.find.your.account", "User is null.", e); + } + + Preferences userAttributes = user.getUserAttributes(); + Map userInfo = createUserInfoMap(page); + for (Iterator> ite = userInfo.entrySet().iterator(); ite.hasNext();) + { + Map.Entry entry = ite.next(); + userAttributes.put(entry.getKey(), entry.getValue()); + } + + } + + protected void updateUserInfo(UserRegistrationPage page, Preferences userAttributes) + { + if (userAttributes.get("user.business-info.online.email", null) != null) + { + page.setUserBusinessInfoOnlineEmail(userAttributes.get("user.business-info.online.email", "")); + } + if (userAttributes.get("user.name", null) != null) + { + page.setUserName(userAttributes.get("user.name", "")); + } + if (userAttributes.get("user.bdate", null) != null) + { + page.setUserBdate(userAttributes.get("user.bdate", "")); + } + if (userAttributes.get("user.gender", null) != null) + { + page.setUserGender(userAttributes.get("user.gender", "")); + } + if (userAttributes.get("user.employer", null) != null) + { + page.setUserEmployer(userAttributes.get("user.employer", "")); + } + if (userAttributes.get("user.department", null) != null) + { + page.setUserDepartment(userAttributes.get("user.department", "")); + } + if (userAttributes.get("user.jobtitle", null) != null) + { + page.setUserJobtitle(userAttributes.get("user.jobtitle", "")); + } + if (userAttributes.get("user.name.prefix", null) != null) + { + page.setUserNamePrefix(userAttributes.get("user.name.prefix", "")); + } + if (userAttributes.get("user.name.given", null) != null) + { + page.setUserNameGiven(userAttributes.get("user.name.given", "")); + } + if (userAttributes.get("user.name.family", null) != null) + { + page.setUserNameFamily(userAttributes.get("user.name.family", "")); + } + if (userAttributes.get("user.name.middle", null) != null) + { + page.setUserNameMiddle(userAttributes.get("user.name.middle", "")); + } + if (userAttributes.get("user.name.suffix", null) != null) + { + page.setUserNameSuffix(userAttributes.get("user.name.suffix", "")); + } + if (userAttributes.get("user.name.nickName", null) != null) + { + page.setUserNameNickName(userAttributes.get("user.name.nickName", "")); + } + if (userAttributes.get("user.home-info.postal.name", null) != null) + { + page.setUserHomeInfoPostalName(userAttributes.get("user.home-info.postal.name", "")); + } + if (userAttributes.get("user.home-info.postal.street", null) != null) + { + page.setUserHomeInfoPostalStreet(userAttributes.get("user.home-info.postal.street", "")); + } + if (userAttributes.get("user.home-info.postal.city", null) != null) + { + page.setUserHomeInfoPostalCity(userAttributes.get("user.home-info.postal.city", "")); + } + if (userAttributes.get("user.home-info.postal.stateprov", null) != null) + { + page.setUserHomeInfoPostalStateprov(userAttributes.get("user.home-info.postal.stateprov", "")); + } + if (userAttributes.get("user.home-info.postal.postalcode", null) != null) + { + page.setUserHomeInfoPostalPostalcode(userAttributes.get("user.home-info.postal.postalcode", "")); + } + if (userAttributes.get("user.home-info.postal.country", null) != null) + { + page.setUserHomeInfoPostalCountry(userAttributes.get("user.home-info.postal.country", "")); + } + if (userAttributes.get("user.home-info.postal.organization", null) != null) + { + page.setUserHomeInfoPostalOrganization(userAttributes.get("user.home-info.postal.organization", "")); + } + if (userAttributes.get("user.home-info.telecom.telephone.intcode", null) != null) + { + page.setUserHomeInfoTelecomTelephoneIntcode(userAttributes.get("user.home-info.telecom.telephone.intcode", "")); + } + if (userAttributes.get("user.home-info.telecom.telephone.loccode", null) != null) + { + page.setUserHomeInfoTelecomTelephoneLoccode(userAttributes.get("user.home-info.telecom.telephone.loccode", "")); + } + if (userAttributes.get("user.home-info.telecom.telephone.number", null) != null) + { + page.setUserHomeInfoTelecomTelephoneNumber(userAttributes.get("user.home-info.telecom.telephone.number", "")); + } + if (userAttributes.get("user.home-info.telecom.telephone.ext", null) != null) + { + page.setUserHomeInfoTelecomTelephoneExt(userAttributes.get("user.home-info.telecom.telephone.ext", "")); + } + if (userAttributes.get("user.home-info.telecom.telephone.comment", null) != null) + { + page.setUserHomeInfoTelecomTelephoneComment(userAttributes.get("user.home-info.telecom.telephone.comment", "")); + } + if (userAttributes.get("user.home-info.telecom.fax.intcode", null) != null) + { + page.setUserHomeInfoTelecomFaxIntcode(userAttributes.get("user.home-info.telecom.fax.intcode", "")); + } + if (userAttributes.get("user.home-info.telecom.fax.loccode", null) != null) + { + page.setUserHomeInfoTelecomFaxLoccode(userAttributes.get("user.home-info.telecom.fax.loccode", "")); + } + if (userAttributes.get("user.home-info.telecom.fax.number", null) != null) + { + page.setUserHomeInfoTelecomFaxNumber(userAttributes.get("user.home-info.telecom.fax.number", "")); + } + if (userAttributes.get("user.home-info.telecom.fax.ext", null) != null) + { + page.setUserHomeInfoTelecomFaxExt(userAttributes.get("user.home-info.telecom.fax.ext", "")); + } + if (userAttributes.get("user.home-info.telecom.fax.comment", null) != null) + { + page.setUserHomeInfoTelecomFaxComment(userAttributes.get("user.home-info.telecom.fax.comment", "")); + } + if (userAttributes.get("user.home-info.telecom.mobile.intcode", null) != null) + { + page.setUserHomeInfoTelecomMobileIntcode(userAttributes.get("user.home-info.telecom.mobile.intcode", "")); + } + if (userAttributes.get("user.home-info.telecom.mobile.loccode", null) != null) + { + page.setUserHomeInfoTelecomMobileLoccode(userAttributes.get("user.home-info.telecom.mobile.loccode", "")); + } + if (userAttributes.get("user.home-info.telecom.mobile.number", null) != null) + { + page.setUserHomeInfoTelecomMobileNumber(userAttributes.get("user.home-info.telecom.mobile.number", "")); + } + if (userAttributes.get("user.home-info.telecom.mobile.ext", null) != null) + { + page.setUserHomeInfoTelecomMobileExt(userAttributes.get("user.home-info.telecom.mobile.ext", "")); + } + if (userAttributes.get("user.home-info.telecom.mobile.comment", null) != null) + { + page.setUserHomeInfoTelecomMobileComment(userAttributes.get("user.home-info.telecom.mobile.comment", "")); + } + if (userAttributes.get("user.home-info.telecom.pager.intcode", null) != null) + { + page.setUserHomeInfoTelecomPagerIntcode(userAttributes.get("user.home-info.telecom.pager.intcode", "")); + } + if (userAttributes.get("user.home-info.telecom.pager.loccode", null) != null) + { + page.setUserHomeInfoTelecomPagerLoccode(userAttributes.get("user.home-info.telecom.pager.loccode", "")); + } + if (userAttributes.get("user.home-info.telecom.pager.number", null) != null) + { + page.setUserHomeInfoTelecomPagerNumber(userAttributes.get("user.home-info.telecom.pager.number", "")); + } + if (userAttributes.get("user.home-info.telecom.pager.ext", null) != null) + { + page.setUserHomeInfoTelecomPagerExt(userAttributes.get("user.home-info.telecom.pager.ext", "")); + } + if (userAttributes.get("user.home-info.telecom.pager.comment", null) != null) + { + page.setUserHomeInfoTelecomPagerComment(userAttributes.get("user.home-info.telecom.pager.comment", "")); + } + if (userAttributes.get("user.home-info.online.email", null) != null) + { + page.setUserHomeInfoOnlineEmail(userAttributes.get("user.home-info.online.email", "")); + } + if (userAttributes.get("user.home-info.online.uri", null) != null) + { + page.setUserHomeInfoOnlineUri(userAttributes.get("user.home-info.online.uri", "")); + } + if (userAttributes.get("user.business-info.postal.name", null) != null) + { + page.setUserBusinessInfoPostalName(userAttributes.get("user.business-info.postal.name", "")); + } + if (userAttributes.get("user.business-info.postal.street", null) != null) + { + page.setUserBusinessInfoPostalStreet(userAttributes.get("user.business-info.postal.street", "")); + } + if (userAttributes.get("user.business-info.postal.city", null) != null) + { + page.setUserBusinessInfoPostalCity(userAttributes.get("user.business-info.postal.city", "")); + } + if (userAttributes.get("user.business-info.postal.stateprov", null) != null) + { + page.setUserBusinessInfoPostalStateprov(userAttributes.get("user.business-info.postal.stateprov", "")); + } + if (userAttributes.get("user.business-info.postal.postalcode", null) != null) + { + page.setUserBusinessInfoPostalPostalcode(userAttributes.get("user.business-info.postal.postalcode", "")); + } + if (userAttributes.get("user.business-info.postal.country", null) != null) + { + page.setUserBusinessInfoPostalCountry(userAttributes.get("user.business-info.postal.country", "")); + } + if (userAttributes.get("user.business-info.postal.organization", null) != null) + { + page.setUserBusinessInfoPostalOrganization(userAttributes.get("user.business-info.postal.organization", "")); + } + if (userAttributes.get("user.business-info.telecom.telephone.intcode", null) != null) + { + page.setUserBusinessInfoTelecomTelephoneIntcode(userAttributes.get("user.business-info.telecom.telephone.intcode", "")); + } + if (userAttributes.get("user.business-info.telecom.telephone.loccode", null) != null) + { + page.setUserBusinessInfoTelecomTelephoneLoccode(userAttributes.get("user.business-info.telecom.telephone.loccode", "")); + } + if (userAttributes.get("user.business-info.telecom.telephone.number", null) != null) + { + page.setUserBusinessInfoTelecomTelephoneNumber(userAttributes.get("user.business-info.telecom.telephone.number", "")); + } + if (userAttributes.get("user.business-info.telecom.telephone.ext", null) != null) + { + page.setUserBusinessInfoTelecomTelephoneExt(userAttributes.get("user.business-info.telecom.telephone.ext", "")); + } + if (userAttributes.get("user.business-info.telecom.telephone.comment", null) != null) + { + page.setUserBusinessInfoTelecomTelephoneComment(userAttributes.get("user.business-info.telecom.telephone.comment", "")); + } + if (userAttributes.get("user.business-info.telecom.fax.intcode", null) != null) + { + page.setUserBusinessInfoTelecomFaxIntcode(userAttributes.get("user.business-info.telecom.fax.intcode", "")); + } + if (userAttributes.get("user.business-info.telecom.fax.loccode", null) != null) + { + page.setUserBusinessInfoTelecomFaxLoccode(userAttributes.get("user.business-info.telecom.fax.loccode", "")); + } + if (userAttributes.get("user.business-info.telecom.fax.number", null) != null) + { + page.setUserBusinessInfoTelecomFaxNumber(userAttributes.get("user.business-info.telecom.fax.number", "")); + } + if (userAttributes.get("user.business-info.telecom.fax.ext", null) != null) + { + page.setUserBusinessInfoTelecomFaxExt(userAttributes.get("user.business-info.telecom.fax.ext", "")); + } + if (userAttributes.get("user.business-info.telecom.fax.comment", null) != null) + { + page.setUserBusinessInfoTelecomFaxComment(userAttributes.get("user.business-info.telecom.fax.comment", "")); + } + if (userAttributes.get("user.business-info.telecom.mobile.intcode", null) != null) + { + page.setUserBusinessInfoTelecomMobileIntcode(userAttributes.get("user.business-info.telecom.mobile.intcode", "")); + } + if (userAttributes.get("user.business-info.telecom.mobile.loccode", null) != null) + { + page.setUserBusinessInfoTelecomMobileLoccode(userAttributes.get("user.business-info.telecom.mobile.loccode", "")); + } + if (userAttributes.get("user.business-info.telecom.mobile.number", null) != null) + { + page.setUserBusinessInfoTelecomMobileNumber(userAttributes.get("user.business-info.telecom.mobile.number", "")); + } + if (userAttributes.get("user.business-info.telecom.mobile.ext", null) != null) + { + page.setUserBusinessInfoTelecomMobileExt(userAttributes.get("user.business-info.telecom.mobile.ext", "")); + } + if (userAttributes.get("user.business-info.telecom.mobile.comment", null) != null) + { + page.setUserBusinessInfoTelecomMobileComment(userAttributes.get("user.business-info.telecom.mobile.comment", "")); + } + if (userAttributes.get("user.business-info.telecom.pager.intcode", null) != null) + { + page.setUserBusinessInfoTelecomPagerIntcode(userAttributes.get("user.business-info.telecom.pager.intcode", "")); + } + if (userAttributes.get("user.business-info.telecom.pager.loccode", null) != null) + { + page.setUserBusinessInfoTelecomPagerLoccode(userAttributes.get("user.business-info.telecom.pager.loccode", "")); + } + if (userAttributes.get("user.business-info.telecom.pager.number", null) != null) + { + page.setUserBusinessInfoTelecomPagerNumber(userAttributes.get("user.business-info.telecom.pager.number", "")); + } + if (userAttributes.get("user.business-info.telecom.pager.ext", null) != null) + { + page.setUserBusinessInfoTelecomPagerExt(userAttributes.get("user.business-info.telecom.pager.ext", "")); + } + if (userAttributes.get("user.business-info.telecom.pager.comment", null) != null) + { + page.setUserBusinessInfoTelecomPagerComment(userAttributes.get("user.business-info.telecom.pager.comment", "")); + } + if (userAttributes.get("user.business-info.online.uri", null) != null) + { + page.setUserBusinessInfoOnlineUri(userAttributes.get("user.business-info.online.uri", "")); + } + + if (page instanceof PublicPortalRegistrationUpdatePage) + { + PublicPortalRegistrationUpdatePage p = (PublicPortalRegistrationUpdatePage) page; + if (userAttributes.get("user.bdate.year", null) != null) + { + p.setUserBdateYear(userAttributes.getInt("user.bdate.year", 0)); + } + if (userAttributes.get("user.bdate.month", null) != null) + { + p.setUserBdateMonth(userAttributes.getInt("user.bdate.month", 0)); + } + if (userAttributes.get("user.bdate.date", null) != null) + { + p.setUserBdateDate(userAttributes.getInt("user.bdate.date", 0)); + } + if (userAttributes.get("user.industry", null) != null) + { + p.setUserIndustry(userAttributes.get("user.industry", "")); + } + if (userAttributes.get("user.secret.question", null) != null) + { + p.setUserSecretQuestion(userAttributes.get("user.secret.question", "")); + } + if (userAttributes.get("user.secret.answer", null) != null) + { + p.setUserSecretAnswer(userAttributes.get("user.secret.answer", "")); + } + if (userAttributes.get("user.name.given.yomi", null) != null) + { + p.setUserNameGivenYomi(userAttributes.get("user.name.given.yomi", "")); + } + if (userAttributes.get("user.name.family.yomi", null) != null) + { + p.setUserNameFamilyYomi(userAttributes.get("user.name.family.yomi", "")); + } + } + } + protected Map createUserInfoMap(UserRegistrationPage page) { Map userInfo = new HashMap(); Modified: pal-admin/trunk/src/main/java/jp/sf/pal/admin/web/registration/PublicPortalRegistrationPage.java =================================================================== --- pal-admin/trunk/src/main/java/jp/sf/pal/admin/web/registration/PublicPortalRegistrationPage.java 2007-07-03 02:24:34 UTC (rev 206) +++ pal-admin/trunk/src/main/java/jp/sf/pal/admin/web/registration/PublicPortalRegistrationPage.java 2007-07-03 07:28:12 UTC (rev 207) @@ -202,7 +202,7 @@ return null; } - public String initialize() + public Class initialize() { String filename = getLabelHelper().getLabelValue("termOfServiceFile"); if (filename == null) @@ -259,7 +259,7 @@ return null; } - public String prerender() + public Class prerender() { return null; } Added: pal-admin/trunk/src/main/java/jp/sf/pal/admin/web/registration/PublicPortalRegistrationUpdatePage.java =================================================================== --- pal-admin/trunk/src/main/java/jp/sf/pal/admin/web/registration/PublicPortalRegistrationUpdatePage.java 2007-07-03 02:24:34 UTC (rev 206) +++ pal-admin/trunk/src/main/java/jp/sf/pal/admin/web/registration/PublicPortalRegistrationUpdatePage.java 2007-07-03 07:28:12 UTC (rev 207) @@ -0,0 +1,112 @@ +package jp.sf.pal.admin.web.registration; + +import java.io.Serializable; + +import javax.faces.internal.FacesMessageUtil; + +import org.seasar.framework.log.Logger; + +import jp.sf.pal.common.CommonException; + +public class PublicPortalRegistrationUpdatePage extends PublicPortalRegistrationPage implements Serializable +{ + + /** + * + */ + private static final long serialVersionUID = -2415175365437526156L; + + /** + * Logger for this class + */ + private static final Logger logger = Logger.getLogger(PublicPortalRegistrationPage.class); + + public static final String userName_TRequiredValidator = null; + + public static final String userName_lengthValidator = "minimum=6, maximum=32"; + + public static final String userNameFamily_TRequiredValidator = null; + + public static final String userNameFamily_lengthValidator = " maximum=30"; + + public static final String userNameGiven_TRequiredValidator = null; + + public static final String userNameGiven_lengthValidator = "maximum=30"; + + public static final String userNameFamilyYomi_TRequiredValidator = null; + + public static final String userNameFamilyYomi_lengthValidator = " maximum=30"; + + public static final String userNameGivenYomi_TRequiredValidator = null; + + public static final String userNameGivenYomi_lengthValidator = "maximum=30"; + + public static final String userHomeInfoPostalPostalcode_TRequiredValidator = null; + + public static final String userHomeInfoPostalPostalcode_lengthValidator = "maximum=8"; + + public static final String userGender_TRequiredValidator = null; + + public static final String userBdateYear_TRequiredValidator = null; + + public static final String userBdateYear_TNumberLengthValidator = "integralMax=4"; + + public static final String userBdateMonth_TRequiredValidator = null; + + public static final String userBdateMonth_TNumberLengthValidator = "integralMax=2"; + + public static final String userBdateDate_TRequiredValidator = null; + + public static final String userBdateDate_TNumberLengthValidator = "integralMax=2"; + + public static final String userBusinessInfoOnlineEmail_TRequiredValidator = null; + + public static final String userBusinessInfoOnlineEmail_lengthValidator = "minimum=5, maximum=80"; + + public static final String userIndustry_TRequiredValidator = null; + + public static final String userJobtitle_TRequiredValidator = null; + + public static final String userSecretQuestion_TRequiredValidator = null; + + public static final String userSecretQuestion_lengthValidator = "maximum=100"; + + public static final String userSecretAnswer_TRequiredValidator = null; + + public static final String userSecretAnswer_lengthValidator = "maximum=100"; + + public Class doFinish() + { + try + { + getUserRegistrationService().update(this); + FacesMessageUtil.addInfoMessage("updated.user.info"); + } + catch (CommonException e) + { + FacesMessageUtil.addErrorMessage(e.getMessageId()); + logger.log("EPA0001", new Object[] { this.toString() }, e); + } + return null; + } + + public Class initialize() + { + return null; + } + + public Class prerender() + { + try + { + getUserRegistrationService().loadPage(this); + } + catch (CommonException e) + { + FacesMessageUtil.addErrorMessage(e.getMessageId()); + logger.log("EPA0001", new Object[] { this.toString() }, e); + } + return null; + } + +} Property changes on: pal-admin/trunk/src/main/java/jp/sf/pal/admin/web/registration/PublicPortalRegistrationUpdatePage.java ___________________________________________________________________ Name: svn:eol-style + native Modified: pal-admin/trunk/src/main/java/jp/sf/pal/admin/web/registration/UserRegistrationPage.java =================================================================== --- pal-admin/trunk/src/main/java/jp/sf/pal/admin/web/registration/UserRegistrationPage.java 2007-07-03 02:24:34 UTC (rev 206) +++ pal-admin/trunk/src/main/java/jp/sf/pal/admin/web/registration/UserRegistrationPage.java 2007-07-03 07:28:12 UTC (rev 207) @@ -1020,12 +1020,12 @@ this.verifyPassword = verifyPassword; } - public String initialize() + public Class initialize() { return null; } - public String prerender() + public Class prerender() { return null; } Modified: pal-admin/trunk/src/main/resources/appMessages.properties =================================================================== --- pal-admin/trunk/src/main/resources/appMessages.properties 2007-07-03 02:24:34 UTC (rev 206) +++ pal-admin/trunk/src/main/resources/appMessages.properties 2007-07-03 07:28:12 UTC (rev 207) @@ -88,3 +88,8 @@ could.not.read.term.of.service=Could not read a term of service. incorrect.scret.answer=Incorrect secret password. +could.not.find.your.credential=Could not find your credntial. Please login and try again. +could.not.find.your.account=Could not find your account. Please login and try again. +could.not.match.passwords=Could not match password and verify passoword. +could.not.update.password=Could not update a password. Please contact a site administrator. +updated.user.info=Updated user information Modified: pal-admin/trunk/src/main/resources/appMessages_ja.properties =================================================================== --- pal-admin/trunk/src/main/resources/appMessages_ja.properties 2007-07-03 02:24:34 UTC (rev 206) +++ pal-admin/trunk/src/main/resources/appMessages_ja.properties 2007-07-03 07:28:12 UTC (rev 207) @@ -16,3 +16,8 @@ could.not.read.term.of.service=\u5229\u7528\u898f\u7d04\u3092\u8aad\u307f\u8fbc\u3080\u3053\u3068\u304c\u3067\u304d\u307e\u305b\u3093\u3067\u3057\u305f\u3002 incorrect.scret.answer=\u300c\u79d8\u5bc6\u306e\u7b54\u3048\u300d\u304c\u6b63\u3057\u304f\u3042\u308a\u307e\u305b\u3093\u3002 +could.not.find.your.credential=\u30e6\u30fc\u30b6\u30fc\u60c5\u5831\u3092\u898b\u3064\u3051\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u305b\u3093\u3067\u3057\u305f\u3002\u30ed\u30b0\u30a4\u30f3\u3057\u3066\u3001\u518d\u5ea6\u8a66\u3057\u3066\u307f\u3066\u304f\u3060\u3055\u3044\u3002 +could.not.find.your.account=\u30a2\u30ab\u30a6\u30f3\u30c8\u60c5\u5831\u3092\u898b\u3064\u3051\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u305b\u3093\u3067\u3057\u305f\u3002\u30ed\u30b0\u30a4\u30f3\u3057\u3066\u3001\u518d\u5ea6\u8a66\u3057\u3066\u307f\u3066\u304f\u3060\u3055\u3044\u3002 +could.not.match.passwords=\u78ba\u8a8d\u7528\u306e\u30d1\u30b9\u30ef\u30fc\u30c9\u5165\u529b\u3068\u4e00\u81f4\u3057\u307e\u305b\u3093\u3002\u518d\u5ea6\u3001\u5165\u529b\u5185\u5bb9\u3092\u78ba\u8a8d\u3057\u3066\u304f\u3060\u3055\u3044\u3002 +could.not.update.password=\u30d1\u30b9\u30ef\u30fc\u30c9\u3092\u66f4\u65b0\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u305b\u3093\u3067\u3057\u305f\u3002\u7ba1\u7406\u8005\u306b\u304a\u554f\u3044\u5408\u308f\u305b\u304f\u3060\u3055\u3044\u3002 +updated.user.info=\u30e6\u30fc\u30b6\u30fc\u60c5\u5831\u3092\u66f4\u65b0\u3057\u307e\u3057\u305f\u3002 Added: pal-admin/trunk/src/main/resources/jp/sf/pal/admin/web/registration/UserRegistrationUpdate.properties =================================================================== Property changes on: pal-admin/trunk/src/main/resources/jp/sf/pal/admin/web/registration/UserRegistrationUpdate.properties ___________________________________________________________________ Name: svn:eol-style + native Added: pal-admin/trunk/src/main/resources/jp/sf/pal/admin/web/registration/UserRegistrationUpdate_ja.properties =================================================================== --- pal-admin/trunk/src/main/resources/jp/sf/pal/admin/web/registration/UserRegistrationUpdate_ja.properties 2007-07-03 02:24:34 UTC (rev 206) +++ pal-admin/trunk/src/main/resources/jp/sf/pal/admin/web/registration/UserRegistrationUpdate_ja.properties 2007-07-03 07:28:12 UTC (rev 207) @@ -0,0 +1,5 @@ +# portlet info +javax.portlet.title=\u30e6\u30fc\u30b6\u30fc\u60c5\u5831\u66f4\u65b0 +javax.portlet.short-title=\u30e6\u30fc\u30b6\u30fc\u60c5\u5831\u66f4\u65b0 +javax.portlet.keywords=\u30d1\u30b9\u30ef\u30fc\u30c9,\u66f4\u65b0,\u30e6\u30fc\u30b6\u30fc\u60c5\u5831 + Property changes on: pal-admin/trunk/src/main/resources/jp/sf/pal/admin/web/registration/UserRegistrationUpdate_ja.properties ___________________________________________________________________ Name: svn:eol-style + native Modified: pal-admin/trunk/src/main/resources/jp/sf/pal/admin/web/registration/UserRegistration_ja.properties =================================================================== --- pal-admin/trunk/src/main/resources/jp/sf/pal/admin/web/registration/UserRegistration_ja.properties 2007-07-03 02:24:34 UTC (rev 206) +++ pal-admin/trunk/src/main/resources/jp/sf/pal/admin/web/registration/UserRegistration_ja.properties 2007-07-03 07:28:12 UTC (rev 207) @@ -1,5 +1,5 @@ # portlet info -javax.portlet.title=\u30e6\u30fc\u30b6\u30fc\u767b\u9332 -javax.portlet.short-title=\u30e6\u30fc\u30b6\u30fc\u767b\u9332 -javax.portlet.keywords=\u30d1\u30b9\u30ef\u30fc\u30c9,\u767b\u9332,\u30b5\u30a4\u30f3\u30a2\u30c3\u30d7,\u65b0\u898f\u30e6\u30fc\u30b6\u30fc +javax.portlet.title=\u30e6\u30fc\u30b6\u30fc\u60c5\u5831\u66f4\u65b0 +javax.portlet.short-title=\u30e6\u30fc\u30b6\u30fc\u60c5\u5831\u66f4\u65b0 +javax.portlet.keywords=\u30d1\u30b9\u30ef\u30fc\u30c9,\u66f4\u65b0,\u30e6\u30fc\u30b6\u30fc\u60c5\u5831 Modified: pal-admin/trunk/src/main/resources/jp/sf/pal/admin/web/registration/label.properties =================================================================== --- pal-admin/trunk/src/main/resources/jp/sf/pal/admin/web/registration/label.properties 2007-07-03 02:24:34 UTC (rev 206) +++ pal-admin/trunk/src/main/resources/jp/sf/pal/admin/web/registration/label.properties 2007-07-03 07:28:12 UTC (rev 207) @@ -169,3 +169,86 @@ publicPortalForgottenPasswordCompleted.forgottenPasswordAgain=\u518d\u5ea6\u3001\u30d1\u30b9\u30ef\u30fc\u30c9\u306e\u518d\u767a\u884c\u3092\u884c\u3046\u5834\u5408\u306f\u3001\u4ee5\u4e0b\u306e\u30ea\u30f3\u30af\u3092\u30af\u30ea\u30c3\u30af\u3057\u3066\u304f\u3060\u3055\u3044\u3002 publicPortalForgottenPasswordCompleted.forgottenPasswordLink=\u30d1\u30b9\u30ef\u30fc\u30c9\u306e\u518d\u767a\u884c +# Public Portal Registration Update +publicPortalRegistrationUpdate.requiredDescription=\u304c\u3064\u3044\u3066\u3044\u308b\u9805\u76ee\u306f\u304b\u306a\u3089\u305a\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044\u3002 +publicPortalRegistrationUpdate.userIdTitle=\u30e6\u30fc\u30b6\u30fc ID \u306e\u5165\u529b +publicPortalRegistrationUpdate.typeUserId=\u3054\u5e0c\u671b\u306e\u30e6\u30fc\u30b6\u30fc ID \u3092\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044\u3002 +publicPortalRegistrationUpdate.userId=\u30e6\u30fc\u30b6\u30fc ID +publicPortalRegistrationUpdate.userIdCondition= (6\u301c32\u5b57\u306e\u534a\u89d2\u82f1\u6570\u5b57) +publicPortalRegistrationUpdate.userIdExample= (\u4f8b\uff1ahoge2000\u3001foo777\u306a\u3069) +publicPortalRegistrationUpdate.userIdHint=\u30e6\u30fc\u30b6\u30fc ID \u306b\u95a2\u3059\u308b\u30d2\u30f3\u30c8 +publicPortalRegistrationUpdate.userIdBeginWithAlphabet=\u6700\u521d\u306e\u6587\u5b57\u306f\u30a2\u30eb\u30d5\u30a1\u30d9\u30c3\u30c8 +publicPortalRegistrationUpdate.underscoreAvailable=\u8a18\u53f7\u306f\u3001\u30a2\u30f3\u30c0\u30fc\u30d0\u30fc ( _ ) \u306e\u307f\u4f7f\u7528\u53ef\u80fd\u3067\u3059 +publicPortalRegistrationUpdate.userInfoTitle=\u304a\u5ba2\u69d8\u60c5\u5831\u306e\u5165\u529b +publicPortalRegistrationUpdate.typeUserInfo=\u30e6\u30fc\u30b6\u30fc ID \u3084\u30d1\u30b9\u30ef\u30fc\u30c9\u3092\u304a\u5fd8\u308c\u306e\u5834\u5408\u306b\u3001\u4ee5\u4e0b\u306e\u60c5\u5831\u3092\u5143\u306b\u672c\u4eba\u78ba\u8a8d\u3092\u884c\u3044\u307e\u3059\u3002\u6b63\u78ba\u306b\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044\u3002 +publicPortalRegistrationUpdate.userHomeInfoPostalPostalcode=\u90f5\u4fbf\u756a\u53f7 +publicPortalRegistrationUpdate.userHomeInfoPostalPostalcodeCondition= (\u534a\u89d2\u6570\u5b57\uff17\u6841) +publicPortalRegistrationUpdate.userHomeInfoPostalPostalcodeExample= (\u4f8b\uff1a123-0001\u30011230001) +publicPortalRegistrationUpdate.userGender=\u6027\u5225 +publicPortalRegistrationUpdate.male=\u7537\u6027 +publicPortalRegistrationUpdate.female=\u5973\u6027 +publicPortalRegistrationUpdate.userBdate=\u751f\u5e74\u6708\u65e5 +publicPortalRegistrationUpdate.userBdateYear=\u5e74 +publicPortalRegistrationUpdate.userBdateMonth=\u6708 +publicPortalRegistrationUpdate.userBdateDate=\u65e5 +publicPortalRegistrationUpdate.userBusinessInfoOnlineEmail=\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9 +publicPortalRegistrationUpdate.userBusinessInfoOnlineEmailCondition= (\u534a\u89d2) +publicPortalRegistrationUpdate.userIndustry=\u696d\u7a2e +publicPortalRegistrationUpdate.ComputerInternet=\u30b3\u30f3\u30d4\u30e5\u30fc\u30bf\u95a2\u4fc2 (\u7ba1\u7406/\u30a4\u30f3\u30bf\u30fc\u30cd\u30c3\u30c8) +publicPortalRegistrationUpdate.ComputerHardware=\u30b3\u30f3\u30d4\u30e5\u30fc\u30bf\u95a2\u4fc2 (\u30cf\u30fc\u30c9\u30a6\u30a8\u30a2) +publicPortalRegistrationUpdate.ComputerSoftware=\u30b3\u30f3\u30d4\u30e5\u30fc\u30bf\u95a2\u4fc2 (\u30bd\u30d5\u30c8\u30a6\u30a8\u30a2) +publicPortalRegistrationUpdate.Research=\u6559\u80b2/\u7814\u7a76 +publicPortalRegistrationUpdate.Engineering=\u30a8\u30f3\u30b8\u30cb\u30a2/\u5efa\u7bc9 +publicPortalRegistrationUpdate.Finance=\u9280\u884c/\u91d1\u878d/\u4e0d\u52d5\u7523 +publicPortalRegistrationUpdate.Manufacturing=\u88fd\u9020/\u6d41\u901a +publicPortalRegistrationUpdate.Service=\u30b5\u30fc\u30d3\u30b9 +publicPortalRegistrationUpdate.Healthcare=\u533b\u85ac/\u5065\u5eb7 +publicPortalRegistrationUpdate.Publication=\u5a2f\u697d/\u30e1\u30c7\u30a3\u30a2/\u51fa\u7248 +publicPortalRegistrationUpdate.Travel=\u65c5\u884c/\u63a5\u5ba2\u696d +publicPortalRegistrationUpdate.Retail=\u5c0f\u58f2/\u5378\u58f2 +publicPortalRegistrationUpdate.Nonprofit=\u975e\u55b6\u5229\u56e3\u4f53 +publicPortalRegistrationUpdate.Government=\u653f\u5e9c/\u81ea\u6cbb\u4f53 +publicPortalRegistrationUpdate.Law=\u6cd5\u5f8b +publicPortalRegistrationUpdate.unemployed=\u7121\u8077 +publicPortalRegistrationUpdate.other=\u305d\u306e\u4ed6 +publicPortalRegistrationUpdate.userJobtitle=\u8077\u7a2e +publicPortalRegistrationUpdate.Officer=\u5f79\u54e1/\u7ba1\u7406\u8077 +publicPortalRegistrationUpdate.Specialist=\u5c02\u9580\u8077 (\u533b\u5e2b\u3001\u5f01\u8b77\u58eb\u7b49) +publicPortalRegistrationUpdate.Teacher=\u6559\u54e1 +publicPortalRegistrationUpdate.ComputerEngineer=\u30b3\u30f3\u30d4\u30e5\u30fc\u30bf\u95a2\u9023\u6280\u8853\u8005 +publicPortalRegistrationUpdate.Engineer=\u305d\u306e\u4ed6\u6280\u8853\u8005 +publicPortalRegistrationUpdate.Support=\u30b5\u30fc\u30d3\u30b9/\u30ab\u30b9\u30bf\u30de\u30fc\u30b5\u30dd\u30fc\u30c8 +publicPortalRegistrationUpdate.Administrative=\u4e8b\u52d9\u8077 +publicPortalRegistrationUpdate.Sales=\u55b6\u696d/\u30de\u30fc\u30b1\u30c6\u30a3\u30f3\u30b0 +publicPortalRegistrationUpdate.Salesclerk=\u8ca9\u58f2\u54e1 +publicPortalRegistrationUpdate.Student=\u5927\u5b66\u751f/\u5927\u5b66\u9662\u751f +publicPortalRegistrationUpdate.Kid=\u5c0f/\u4e2d/\u9ad8\u6821\u751f +publicPortalRegistrationUpdate.Homemaker=\u4e3b\u5a66 +publicPortalRegistrationUpdate.SelfEmployed=\u81ea\u55b6\u696d +publicPortalRegistrationUpdate.retirement=\u5b9a\u5e74\u9000\u8077\u8005 +publicPortalRegistrationUpdate.userInfoHint=\u304a\u5ba2\u69d8\u60c5\u5831\u306b\u9593\u3059\u308b\u30d2\u30f3\u30c8 +publicPortalRegistrationUpdate.liveInOversea=\u6d77\u5916\u5728\u4f4f\u306e\u65b9\u306f\u3001000-0000\u3068\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044 +publicPortalRegistrationUpdate.bdataYearDescription=\u751f\u5e74\u6708\u65e5\u306e\u5e74\u306f\u897f\u66a6\u3067\u304a\u9858\u3044\u3057\u307e\u3059 +publicPortalRegistrationUpdate.aboutEmail=\u767b\u9332\u3059\u308b\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9\u306f\u3001\u30b5\u30fc\u30d3\u30b9\u3092\u5229\u7528\u3057\u3066\u3044\u305f\u3060\u304f\u4e0a\u3067\u3001\u91cd\u8981\u306a\u304a\u77e5\u3089\u305b\u306a\u3069\u3092\u304a\u9001\u308a\u3059\u308b\u305f\u3081\u306e\u300c\u767b\u9332\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9\u300d \u306b\u306a\u308a\u307e\u3059\u3002\u9023\u7d61\u53ef\u80fd\u306a\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9\u3092\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044 +publicPortalRegistrationUpdate.userSecretQATitle=\u79d8\u5bc6\u306e\u8cea\u554f\u3068\u7b54\u3048 +publicPortalRegistrationUpdate.userSecretQADescription=\u30d1\u30b9\u30ef\u30fc\u30c9\u518d\u767a\u884c\u306b\u5fc5\u8981\u306a\u60c5\u5831\u3067\u3059\u3002\u3042\u306a\u305f\u3057\u304b\u77e5\u3089\u306a\u3044\u8cea\u554f\u3068\u7b54\u3048\u3092\u8a2d\u5b9a\u3057\u3066\u304f\u3060\u3055\u3044\u3002 +publicPortalRegistrationUpdate.userSecretQuestion=\u79d8\u5bc6\u306e\u8cea\u554f +publicPortalRegistrationUpdate.userSecretAnswer=\u79d8\u5bc6\u306e\u7b54\u3048 +publicPortalRegistrationUpdate.userSecretQAHint=\u79d8\u5bc6\u306e\u8cea\u554f\u3068\u7b54\u3048\u306b\u95a2\u3059\u308b\u30d2\u30f3\u30c8 +publicPortalRegistrationUpdate.aboutCharacters=\u79d8\u5bc6\u306e\u7b54\u3048\u306f\u3001\u3072\u3089\u304c\u306a\u3001\u30ab\u30bf\u30ab\u30ca\u3001\u5927\u6587\u5b57\u3001\u5c0f\u6587\u5b57\u3001\u534a\u89d2\u3001\u5168\u89d2\u3067\u533a\u5225\u3055\u308c\u307e\u3059 +publicPortalRegistrationUpdate.SignUp=\u66f4\u65b0 +publicPortalRegistrationUpdate.termOfService=\u5229\u7528\u898f\u7d04 +publicPortalRegistrationUpdate.name=\u6c0f\u540d +publicPortalRegistrationUpdate.userNameFamily= (\u59d3) +publicPortalRegistrationUpdate.userNameGiven= (\u540d) +publicPortalRegistrationUpdate.nameYomi=\u6c0f\u540d(\u3075\u308a\u304c\u306a) +publicPortalRegistrationUpdate.userNameFamilyYomi= (\u59d3) +publicPortalRegistrationUpdate.userNameGivenYomi= (\u540d) +publicPortalRegistrationUpdate.userPasswordTitle=\u30d1\u30b9\u30ef\u30fc\u30c9\u306e\u66f4\u65b0 +publicPortalRegistrationUpdate.typeUserPassword=\u66f4\u65b0\u3059\u308b\u5834\u5408\u306f\u30d1\u30b9\u30ef\u30fc\u30c9\u3092\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044\u3002 +publicPortalRegistrationUpdate.passowrd=\u30d1\u30b9\u30ef\u30fc\u30c9 +publicPortalRegistrationUpdate.verifyPassword=\u30d1\u30b9\u30ef\u30fc\u30c9\u306e\u78ba\u8a8d +publicPortalRegistrationUpdate.passwordCondition=\uff086\u301c80\u5b57\u306e\u6587\u5b57\uff09 +publicPortalRegistrationUpdate.userPasswordHint=\u30d1\u30b9\u30ef\u30fc\u30c9\u306b\u95a2\u3059\u308b\u30d2\u30f3\u30c8 +publicPortalRegistrationUpdate.charAvailable=\u6587\u5b57\u306f\u534a\u89d2\u82f1\u6570\u5b57\u304c\u5229\u7528\u53ef\u80fd\u3067\u3059 + Modified: pal-admin/trunk/src/main/webapp/WEB-INF/jetspeed-portlet.xml =================================================================== --- pal-admin/trunk/src/main/webapp/WEB-INF/jetspeed-portlet.xml 2007-07-03 02:24:34 UTC (rev 206) +++ pal-admin/trunk/src/main/webapp/WEB-INF/jetspeed-portlet.xml 2007-07-03 07:28:12 UTC (rev 207) @@ -44,6 +44,10 @@ true true + + PublicPortalRegistrationUpdatePortlet + public-view + Modified: pal-admin/trunk/src/main/webapp/WEB-INF/portlet.xml =================================================================== --- pal-admin/trunk/src/main/webapp/WEB-INF/portlet.xml 2007-07-03 02:24:34 UTC (rev 206) +++ pal-admin/trunk/src/main/webapp/WEB-INF/portlet.xml 2007-07-03 07:28:12 UTC (rev 207) @@ -213,7 +213,7 @@ Provides users with the ability register as a new user with the public portal. ポ〖タルの糠惮判峡する怠墙を捏丁します。 PublicPortalRegistrationPortlet - Public Portal Registration + Registration For Public Portal 办忍给倡脱ユ〖ザ〖判峡 org.apache.portals.bridges.portletfilter.FilterPortlet @@ -286,7 +286,7 @@ Provides users with the ability to request a new password to be sent to their email address. ユ〖ザ〖に糠惮パスワ〖ドをメ〖ルアドレスに流慨妥滇をする怠墙を捏丁します。 PublicPortalForgottenPasswordPortlet - Public Portal Forgotten Password + Forgotten Password for Public Portal 办忍给倡脱パスワ〖ド浩券乖 org.apache.portals.bridges.portletfilter.FilterPortlet @@ -329,4 +329,37 @@ tools,users,password,forgotten,lost,passwd + + Provides features for changing user information of the current, logged on user. + 附哼ログインしているユ〖ザ〖の攫鼠を恃构するための怠墙を捏丁します。 + PublicPortalRegistrationUpdatePortlet + Update User Information for Public Portal + 办忍给倡脱ユ〖ザ〖构糠 + org.apache.portals.bridges.portletfilter.FilterPortlet + + portlet-class + org.seasar.teeda.core.portlet.FacesPortlet + + + portlet-filters + jp.sf.pal.admin.filter.DefaultUserRegistrationFilter,jp.sf.pal.facesresponse.FacesResponseFilter,jp.sf.pal.pooptimizer.OptimizerFilter,org.seasar.portlet.filter.S2PortletFilter,org.seasar.portlet.filter.HotdeployPortletFilter + + + view-page + /view/registration/publicPortalRegistrationUpdate.html + + 0 + + text/html + VIEW + + en + ja + jp.sf.pal.admin.web.registration.UserRegistrationUpdate + + Update User Information + Information Update + Update + + Added: pal-admin/trunk/src/main/webapp/view/registration/publicPortalRegistrationUpdate.html =================================================================== --- pal-admin/trunk/src/main/webapp/view/registration/publicPortalRegistrationUpdate.html 2007-07-03 02:24:34 UTC (rev 206) +++ pal-admin/trunk/src/main/webapp/view/registration/publicPortalRegistrationUpdate.html 2007-07-03 07:28:12 UTC (rev 207) @@ -0,0 +1,305 @@ + + + + + + + + +
+
+ +
+
+ * + +
+
+ +
+
+ + + + + + + + + + + + +
: + + + +
: + + +
+
+
+
+ +
+
    +
  • + +
  • +
  • + +
  • +
+
+
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
*: + + + + + +
*: + + + + + +
*: + + + +
+ +
*: + + + + + + + +
*: + + + + + + + +
*: + + + +
*: + + + + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+
+
*: + + + + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+
+
+
+
+
+ +
+
    +
  • + +
  • +
  • + +
  • +
  • + +
  • +
+
+
+
+ +
+
+ + + + + + + + + + + + +
*: + + +
*: + + +
+
+
+
+ +
+
    +
  • + +
  • +
+
+
+
+ +
+
+ + Property changes on: pal-admin/trunk/src/main/webapp/view/registration/publicPortalRegistrationUpdate.html ___________________________________________________________________ Name: svn:eol-style + native From svnnotify △ sourceforge.jp Wed Jul 4 15:09:22 2007 From: svnnotify △ sourceforge.jp (svnnotify △ sourceforge.jp) Date: Wed, 4 Jul 2007 15:09:22 +0900 Subject: [pal-cvs 2476] [208] created pompei Message-ID: <20070704060922.BCEE42AC01D@users.sourceforge.jp> Revision: 208 http://svn.sourceforge.jp/cgi-bin/viewcvs.cgi?root=pal&view=rev&rev=208 Author: shinsuke Date: 2007-07-04 15:09:22 +0900 (Wed, 04 Jul 2007) Log Message: ----------- created pompei Added Paths: ----------- pompei/ -------------- next part -------------- From svnnotify △ sourceforge.jp Wed Jul 4 15:10:59 2007 From: svnnotify △ sourceforge.jp (svnnotify △ sourceforge.jp) Date: Wed, 4 Jul 2007 15:10:59 +0900 Subject: [pal-cvs 2477] [209] created trunk Message-ID: <20070704061059.38CD52AC021@users.sourceforge.jp> Revision: 209 http://svn.sourceforge.jp/cgi-bin/viewcvs.cgi?root=pal&view=rev&rev=209 Author: shinsuke Date: 2007-07-04 15:10:59 +0900 (Wed, 04 Jul 2007) Log Message: ----------- created trunk Added Paths: ----------- pompei/trunk/ -------------- next part -------------- From svnnotify △ sourceforge.jp Wed Jul 4 15:12:46 2007 From: svnnotify △ sourceforge.jp (svnnotify △ sourceforge.jp) Date: Wed, 4 Jul 2007 15:12:46 +0900 Subject: [pal-cvs 2478] [210] added template files. Message-ID: <20070704061246.22E8E2AC021@users.sourceforge.jp> Revision: 210 http://svn.sourceforge.jp/cgi-bin/viewcvs.cgi?root=pal&view=rev&rev=210 Author: shinsuke Date: 2007-07-04 15:12:45 +0900 (Wed, 04 Jul 2007) Log Message: ----------- added template files. Added Paths: ----------- pompei/trunk/pom.xml pompei/trunk/src/ pompei/trunk/src/main/ pompei/trunk/src/main/webapp/ pompei/trunk/src/main/webapp/WEB-INF/ pompei/trunk/src/main/webapp/WEB-INF/web.xml -------------- next part -------------- Added: pompei/trunk/pom.xml =================================================================== --- pompei/trunk/pom.xml 2007-07-04 06:10:59 UTC (rev 209) +++ pompei/trunk/pom.xml 2007-07-04 06:12:45 UTC (rev 210) @@ -0,0 +1,190 @@ + + + 4.0.0 + jp.sf.pal.pompei + pompei + war + pompei + 0.0.1-SNAPSHOT + Portalet for constructing EC site + http://pal.sourceforge.jp/ + 2005 + + + shinsuke + Shinsuke Sugaya + shinsuke_at_yahoo.co.jp + http://d.hatena.ne.jp/shinsuke_sugaya/ + + + +9 + + + takeharu + Takeharu Yamaguchi + TBD + TBD + + + +9 + + + + + The Apache Software License, Version 2.0 + http://www.apache.org/licenses/LICENSE-2.0.txt + repo + + + + scm:cvs:pserver:anonymous △ cvs.sourceforge.jp:/cvsroot/pal:pompei + scm:cvs:pserver:anonymous △ cvs.sourceforge.jp:/cvsroot/pal:pompei + http://cvs.sourceforge.jp/cgi-bin/viewcvs.cgi/pal/pompei + + + Portal Application Laboratory + http://pal.sourceforge.jp/ + + + validate + + + maven-compiler-plugin + + 1.5 + 1.5 + + + + maven-source-plugin + + + source-jar + package + + jar + + + + + + + + + maven-eclipse-plugin + + 1.5 + + + + + + + + maven.seasar.org + The Seasar Foundation Maven2 Repository + http://maven.seasar.org/maven2 + + + + + maven.seasar.org + The Seasar Foundation Maven2 Repository + http://maven.seasar.org/maven2 + + + + + junit + junit + 3.8.2 + compile + + + junit-addons + junit-addons + 1.4 + compile + + + log4j + log4j + 1.2.13 + + + org.apache.geronimo.specs + geronimo-jsp_2.0_spec + 1.0 + + + org.apache.geronimo.specs + geronimo-servlet_2.4_spec + 1.0 + + + org.apache.geronimo.specs + geronimo-jta_1.1_spec + 1.0 + + + org.apache.geronimo.specs + geronimo-ejb_2.1_spec + 1.0 + + + commons-collections + commons-collections + 3.1 + + + org.seasar.container + s2-extension + 2.4.13 + + + org.seasar.container + s2-framework + 2.4.13 + + + org.seasar.container + s2-tiger + 2.4.13 + + + org.seasar.teeda + teeda-extension + 1.0.7 + + + org.seasar.teeda + teeda-ajax + 1.0.7 + + + org.seasar.teeda + teeda-tiger + 1.0.7 + + + org.seasar.teeda + teeda-xmlunit + 0.1.0 + + + org.seasar.dao + s2-dao + 1.0.43 + + + org.seasar.dao + s2-dao-tiger + 1.0.43 + + + com.h2database + h2 + 1.0.20070304 + + + Property changes on: pompei/trunk/pom.xml ___________________________________________________________________ Name: svn:eol-style + native Added: pompei/trunk/src/main/webapp/WEB-INF/web.xml =================================================================== --- pompei/trunk/src/main/webapp/WEB-INF/web.xml 2007-07-04 06:10:59 UTC (rev 209) +++ pompei/trunk/src/main/webapp/WEB-INF/web.xml 2007-07-04 06:12:45 UTC (rev 210) @@ -0,0 +1,180 @@ + + + + + + + + + + + + javax.faces.STATE_SAVING_METHOD + server + + State saving method: "client" or "server" (= default) + See JSF Specification 2.5.2 + + + + + javax.faces.DEFAULT_SUFFIX + .html + + + + encodingfilter + org.seasar.extension.filter.EncodingFilter + + encoding + UTF-8 + + + + + s2filter + org.seasar.framework.container.filter.S2ContainerFilter + + + + hotdeployfilter + org.seasar.framework.container.hotdeploy.HotdeployFilter + + + + extensionfilter + org.seasar.teeda.extension.filter.ExtensionFilter + + + + + + encodingfilter + *.html + + + + s2filter + /* + + + + hotdeployfilter + /* + + + + + + + extensionfilter + /teedaExtension/* + + + + + + + teedaServlet + org.seasar.teeda.core.webapp.TeedaServlet + + + configPath + app.dicon + + + debug + true + + 1 + + + + + facesServlet + javax.faces.webapp.FacesServlet + 2 + + + + ajaxServlet + org.seasar.teeda.ajax.AjaxServlet + 3 + + + + facesServlet + *.html + + + + teedaServlet + /teedaServlet + + + + ajaxServlet + *.ajax + + + + + + index.jsp + + + Property changes on: pompei/trunk/src/main/webapp/WEB-INF/web.xml ___________________________________________________________________ Name: svn:eol-style + native From svnnotify △ sourceforge.jp Sun Jul 8 12:05:59 2007 From: svnnotify △ sourceforge.jp (svnnotify △ sourceforge.jp) Date: Sun, 8 Jul 2007 12:05:59 +0900 Subject: [pal-cvs 2479] [211] updated installer script Message-ID: <20070708030559.5D9312AC011@users.sourceforge.jp> Revision: 211 http://svn.sourceforge.jp/cgi-bin/viewcvs.cgi?root=pal&view=rev&rev=211 Author: shinsuke Date: 2007-07-08 12:05:59 +0900 (Sun, 08 Jul 2007) Log Message: ----------- updated installer script Modified Paths: -------------- pal-portal/trunk/installer/etc/tomcat/temp/administration.xml pal-portal/trunk/installer/maven.xml -------------- next part -------------- Modified: pal-portal/trunk/installer/etc/tomcat/temp/administration.xml =================================================================== --- pal-portal/trunk/installer/etc/tomcat/temp/administration.xml 2007-07-04 06:12:45 UTC (rev 210) +++ pal-portal/trunk/installer/etc/tomcat/temp/administration.xml 2007-07-08 03:05:59 UTC (rev 211) @@ -1,12 +1,13 @@ + + false + + + + 0 + + + + /login/logout + + + + + + + + + + + org.apache.jetspeed.login.username + org.apache.jetspeed.login.password + org.apache.jetspeed.login.destination + org.apache.jetspeed.login.retrycount + org.apache.jetspeed.login.errorcode + org.apache.jetspeed.login.check + org.apache.jetspeed.theme.override + + + + Modified: pal-portal/trunk/installer/maven.xml =================================================================== --- pal-portal/trunk/installer/maven.xml 2007-07-04 06:12:45 UTC (rev 210) +++ pal-portal/trunk/installer/maven.xml 2007-07-08 03:05:59 UTC (rev 211) @@ -110,7 +110,11 @@ + + + + @@ -182,7 +186,7 @@ - + From svnnotify △ sourceforge.jp Sun Jul 8 12:07:02 2007 From: svnnotify △ sourceforge.jp (svnnotify △ sourceforge.jp) Date: Sun, 8 Jul 2007 12:07:02 +0900 Subject: [pal-cvs 2480] [212] updated j2 Message-ID: <20070708030702.285152AC013@users.sourceforge.jp> Revision: 212 http://svn.sourceforge.jp/cgi-bin/viewcvs.cgi?root=pal&view=rev&rev=212 Author: shinsuke Date: 2007-07-08 12:07:01 +0900 (Sun, 08 Jul 2007) Log Message: ----------- updated j2 Modified Paths: -------------- pal-portal/trunk/build.properties pal-portal/trunk/portal/patches/components/portal-site/src/java/org/apache/jetspeed/portalsite/impl/PortalSiteSessionContextImpl.java pal-portal/trunk/portal/patches/project.properties pal-portal/trunk/portal/patches/src/webapp/WEB-INF/assembly/pipelines.xml -------------- next part -------------- Modified: pal-portal/trunk/build.properties =================================================================== --- pal-portal/trunk/build.properties 2007-07-08 03:05:59 UTC (rev 211) +++ pal-portal/trunk/build.properties 2007-07-08 03:07:01 UTC (rev 212) @@ -26,6 +26,7 @@ installer.target.dir=${installer.dir}/target installer.portlets.dir=${installer.target.dir}/portlets dist.name.prefix=PALPortal +dist.version=${portal.version} dist.dir=${basedir}/dist dist.build.dir=${dist.dir}/build dist.temp.dir=${dist.dir}/temp @@ -33,7 +34,7 @@ dist.selfextract.dir=${dist.dir}/selfextract dist.portal.dir=${dist.dir}/portalserver dist.installpack.file=${dist.build.dir}/installpack.zip -dist.tomcat.version=5.5.20 +dist.tomcat.version=5.5.23 dist.tomcat.base.file=${dist.build.dir}/apache-tomcat-${dist.tomcat.version}.zip dist.tomcat.compat.file=${dist.build.dir}/apache-tomcat-${dist.tomcat.version}-compat.zip dist.tomcat.base.dir=${dist.build.dir}/apache-tomcat @@ -64,7 +65,7 @@ org.apache.jetspeed.portal.currentVersion=${portal.version} # Jetspeed SVN revision -jetspeed2.revision=552638 +jetspeed2.revision=553254 # Dependencies for Jetspeed jetspeed.version=2.2-dev_pal-${portal.version} @@ -152,6 +153,7 @@ -Dorg.apache.jetspeed.portal.name="${org.apache.jetspeed.portal.name}" \ -Dorg.apache.jetspeed.portal.currentVersion="${org.apache.jetspeed.portal.currentVersion}" \ -Ddist.name.prefix="${dist.name.prefix}" \ +-Ddist.version="${dist.version}" \ -Djetspeed.version="${jetspeed.version}" \ -Dportal.psml.dir="${portal.psml.dir}" \ -Dportal.psml.name="${portal.psml.name}" \ Modified: pal-portal/trunk/portal/patches/components/portal-site/src/java/org/apache/jetspeed/portalsite/impl/PortalSiteSessionContextImpl.java =================================================================== --- pal-portal/trunk/portal/patches/components/portal-site/src/java/org/apache/jetspeed/portalsite/impl/PortalSiteSessionContextImpl.java 2007-07-08 03:05:59 UTC (rev 211) +++ pal-portal/trunk/portal/patches/components/portal-site/src/java/org/apache/jetspeed/portalsite/impl/PortalSiteSessionContextImpl.java 2007-07-08 03:07:01 UTC (rev 212) @@ -1,6 +1,6 @@ Index: components/portal-site/src/java/org/apache/jetspeed/portalsite/impl/PortalSiteSessionContextImpl.java =================================================================== ---- components/portal-site/src/java/org/apache/jetspeed/portalsite/impl/PortalSiteSessionContextImpl.java (リビジョン 545114) +--- components/portal-site/src/java/org/apache/jetspeed/portalsite/impl/PortalSiteSessionContextImpl.java (リビジョン 553019) +++ components/portal-site/src/java/org/apache/jetspeed/portalsite/impl/PortalSiteSessionContextImpl.java (侯度コピ〖) @@ -34,9 +34,13 @@ import org.apache.commons.logging.Log; @@ -24,7 +24,7 @@ import org.apache.jetspeed.security.JSSubject; import org.apache.jetspeed.security.UserPrincipal; -@@ -208,6 +213,13 @@ +@@ -207,6 +212,13 @@ requestPath = locator.getRequestPath(); } @@ -38,10 +38,10 @@ // attempt to select request page or folder using // profile locators and site view; if fallback // enabled, fallback on missing node or access -@@ -1254,4 +1266,65 @@ - log.debug("Session unbound event: clear page manager listener and session context state"); - } - } +@@ -1259,4 +1271,65 @@ + } + return folderPageHistory; + } + + public static final String PAGE_PATH_NAVIGATION = "/_page/"; + Modified: pal-portal/trunk/portal/patches/project.properties =================================================================== --- pal-portal/trunk/portal/patches/project.properties 2007-07-08 03:05:59 UTC (rev 211) +++ pal-portal/trunk/portal/patches/project.properties 2007-07-08 03:07:01 UTC (rev 212) @@ -1,13 +1,13 @@ Index: project.properties =================================================================== ---- project.properties (リビジョン 548891) +--- project.properties (リビジョン 553019) +++ project.properties (侯度コピ〖) @@ -52,7 +52,7 @@ derby.include=true maven.mode.online = true --maven.repo.remote = http://www.bluesunrise.com/maven/, http://www.ibiblio.org/maven/, http://dist.codehaus.org/, http://cvs.apache.org/repository -+maven.repo.remote = http://www.bluesunrise.com/maven/, http://www.ibiblio.org/maven/, http://dist.codehaus.org/, http://cvs.apache.org/repository, http://maven.marevol.com/ +-maven.repo.remote = http://www.bluesunrise.com/maven/, http://mirrors.ibiblio.org/pub/mirrors/maven/, http://dist.codehaus.org/, http://people.apache.org/repository/ ++maven.repo.remote = http://www.bluesunrise.com/maven/, http://mirrors.ibiblio.org/pub/mirrors/maven/, http://dist.codehaus.org/, http://people.apache.org/repository/, http://maven.marevol.com/ # xdocs themes maven.xdoc.theme = j2 Modified: pal-portal/trunk/portal/patches/src/webapp/WEB-INF/assembly/pipelines.xml =================================================================== --- pal-portal/trunk/portal/patches/src/webapp/WEB-INF/assembly/pipelines.xml 2007-07-08 03:05:59 UTC (rev 211) +++ pal-portal/trunk/portal/patches/src/webapp/WEB-INF/assembly/pipelines.xml 2007-07-08 03:07:01 UTC (rev 212) @@ -1,8 +1,8 @@ Index: src/webapp/WEB-INF/assembly/pipelines.xml =================================================================== ---- src/webapp/WEB-INF/assembly/pipelines.xml (リビジョン 552638) +--- src/webapp/WEB-INF/assembly/pipelines.xml (リビジョン 553019) +++ src/webapp/WEB-INF/assembly/pipelines.xml (侯度コピ〖) -@@ -332,6 +332,7 @@ +@@ -334,6 +334,7 @@ From svnnotify △ sourceforge.jp Tue Jul 10 17:51:32 2007 From: svnnotify △ sourceforge.jp (svnnotify △ sourceforge.jp) Date: Tue, 10 Jul 2007 17:51:32 +0900 Subject: [pal-cvs 2481] [213] added test source Message-ID: <20070710085132.555192AC01D@users.sourceforge.jp> Revision: 213 http://svn.sourceforge.jp/cgi-bin/viewcvs.cgi?root=pal&view=rev&rev=213 Author: takeharu Date: 2007-07-10 17:51:31 +0900 (Tue, 10 Jul 2007) Log Message: ----------- added test source Added Paths: ----------- pompei/trunk/src/test/ pompei/trunk/src/test/java/ pompei/trunk/src/test/java/jp/ pompei/trunk/src/test/java/jp/sf/ pompei/trunk/src/test/java/jp/sf/pal/ pompei/trunk/src/test/java/jp/sf/pal/pompei/ pompei/trunk/src/test/java/jp/sf/pal/pompei/dao/ pompei/trunk/src/test/java/jp/sf/pal/pompei/dto/ pompei/trunk/src/test/java/jp/sf/pal/pompei/dxo/ pompei/trunk/src/test/java/jp/sf/pal/pompei/entity/ pompei/trunk/src/test/java/jp/sf/pal/pompei/helper/ pompei/trunk/src/test/java/jp/sf/pal/pompei/interceptor/ pompei/trunk/src/test/java/jp/sf/pal/pompei/logic/ pompei/trunk/src/test/java/jp/sf/pal/pompei/service/ pompei/trunk/src/test/java/jp/sf/pal/pompei/validator/ pompei/trunk/src/test/java/jp/sf/pal/pompei/web/ pompei/trunk/src/test/resources/ -------------- next part -------------- From svnnotify △ sourceforge.jp Tue Jul 10 18:29:13 2007 From: svnnotify △ sourceforge.jp (svnnotify △ sourceforge.jp) Date: Tue, 10 Jul 2007 18:29:13 +0900 Subject: [pal-cvs 2482] [214] added main source Message-ID: <20070710092913.9ED4D2AC01D@users.sourceforge.jp> Revision: 214 http://svn.sourceforge.jp/cgi-bin/viewcvs.cgi?root=pal&view=rev&rev=214 Author: takeharu Date: 2007-07-10 18:09:05 +0900 (Tue, 10 Jul 2007) Log Message: ----------- added main source Added Paths: ----------- pompei/trunk/src/main/java/ pompei/trunk/src/main/java/jp/ pompei/trunk/src/main/java/jp/sf/ pompei/trunk/src/main/java/jp/sf/pal/ pompei/trunk/src/main/java/jp/sf/pal/pompei/ pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/ pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/AccessContext.java pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/CacheDaoSelector.java pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/DaoReadable.java pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/DaoSelector.java pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/DaoWritable.java pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/Entity.java pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/EntityDefinedCommonColumn.java pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/GenMetaData.java pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/annotation/ pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/annotation/OutsideSql.java pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/bhv/ pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/bhv/AbstractBehaviorReadable.java pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/bhv/AbstractBehaviorWritable.java pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/bhv/BehaviorReadable.java pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/bhv/BehaviorWritable.java pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/bhv/batch/ pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/bhv/batch/TokenFileOutputOption.java pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/bhv/batch/TokenFileOutputResult.java pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/bhv/batch/TokenFileReflectionFailure.java pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/bhv/batch/TokenFileReflectionOption.java pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/bhv/batch/TokenFileReflectionResult.java pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/bhv/load/ pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/bhv/load/LoadRefererOption.java pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/bhv/setup/ pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/bhv/setup/ConditionBeanSetupper.java pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/bhv/setup/EntityListSetupper.java pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/bhv/setup/ValueLabelBox.java pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/bhv/setup/ValueLabelSetupper.java pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/ pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/AbstractConditionBean.java pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/AbstractConditionQuery.java pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/ConditionBean.java pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/ConditionBeanContext.java pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/ConditionQuery.java pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/FetchNarrowingBean.java pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/FetchNarrowingBeanContext.java pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/ListResultBean.java pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/OrderByBean.java pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/PagingBean.java pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/PagingResultBean.java pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/SelectResource.java pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/SimpleOrderByBean.java pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/SimplePagingBean.java pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/ckey/ pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/ckey/ConditionKey.java pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/ckey/ConditionKeyEqual.java pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/ckey/ConditionKeyGreaterEqual.java pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/ckey/ConditionKeyGreaterThan.java pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/ckey/ConditionKeyInScope.java pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/ckey/ConditionKeyIsNotNull.java pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/ckey/ConditionKeyIsNull.java pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/ckey/ConditionKeyLessEqual.java pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/ckey/ConditionKeyLessThan.java pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/ckey/ConditionKeyLikeSearch.java pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/ckey/ConditionKeyNotEqual.java pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/ckey/ConditionKeyNotInScope.java pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/ckey/ConditionKeyPrefixSearch.java pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/coption/ pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/coption/ConditionOption.java pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/coption/FromToOption.java pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/coption/InScopeOption.java pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/coption/LikeSearchOption.java pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/coption/SimpleStringOption.java pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/coption/parts/ pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/coption/parts/SplitOptionParts.java pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/coption/parts/ToSingleByteOptionParts.java pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/coption/parts/ToUpperLowerCaseOptionParts.java pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/coption/parts/local/ pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/coption/parts/local/JapaneseOptionPartsAgent.java pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/cvalue/ pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/cvalue/ConditionValue.java pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/grouping/ pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/grouping/GroupingOption.java pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/grouping/GroupingRowEndDeterminer.java pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/grouping/GroupingRowResource.java pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/grouping/GroupingRowSetupper.java pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/mapping/ pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/mapping/EntityDtoMapper.java pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/sqlclause/ pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/sqlclause/AbstractSqlClause.java pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/sqlclause/OrderByClause.java pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/sqlclause/OrderByElement.java pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/sqlclause/SqlClause.java pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/sqlclause/SqlClauseDb2.java pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/sqlclause/SqlClauseDefault.java pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/sqlclause/SqlClauseDerby.java pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/sqlclause/SqlClauseFirebird.java pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/sqlclause/SqlClauseInterbase.java pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/sqlclause/SqlClauseMySql.java pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/sqlclause/SqlClauseOracle.java pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/sqlclause/SqlClausePostgreSql.java pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/sqlclause/SqlClauseSqlServer.java pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/dbmeta/ pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/dbmeta/AbstractDBMeta.java pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/dbmeta/DBMeta.java pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/dbmeta/DBMetaInstanceHandler.java pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/exception/ pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/exception/RecordHasAlreadyBeenDeletedException.java pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/exception/RecordHasOverlappedException.java pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/exception/SelectedCountExceedMaxCountException.java pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/helper/ pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/helper/MapListString.java pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/helper/MapListStringImpl.java pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/helper/MapStringBuilder.java pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/helper/MapStringBuilderImpl.java pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/helper/character/ pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/helper/character/GeneralCharacter.java pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/helper/character/JapaneseCharacter.java pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/helper/character/impl/ pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/helper/character/impl/GeneralCharacterImpl.java pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/helper/character/impl/JapaneseCharacterImpl.java pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/helper/token/ pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/helper/token/file/ pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/helper/token/file/FileMakingCallback.java pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/helper/token/file/FileMakingHeaderInfo.java pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/helper/token/file/FileMakingOption.java pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/helper/token/file/FileMakingRowResource.java pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/helper/token/file/FileMakingSimpleFacade.java pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/helper/token/file/FileToken.java pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/helper/token/file/FileTokenizingCallback.java pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/helper/token/file/FileTokenizingHeaderInfo.java pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/helper/token/file/FileTokenizingOption.java pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/helper/token/file/FileTokenizingRowResource.java pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/helper/token/file/impl/ pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/helper/token/file/impl/FileMakingSimpleFacadeImpl.java pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/helper/token/file/impl/FileTokenImpl.java pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/helper/token/line/ pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/helper/token/line/LineMakingOption.java pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/helper/token/line/LineToken.java pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/helper/token/line/LineTokenizingOption.java pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/helper/token/line/impl/ pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/helper/token/line/impl/LineTokenImpl.java pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/interceptor/ pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/interceptor/CommonColumnSetupAbstractInterceptor.java pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/interceptor/CommonColumnSetupBeforeDeleteInterceptor.java pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/interceptor/CommonColumnSetupBeforeInsertInterceptor.java pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/interceptor/CommonColumnSetupBeforeUpdateInterceptor.java pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/jdbc/ pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/jdbc/history/ pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/jdbc/history/PreparedExecutionBean.java pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/jdbc/history/PreparedParameterElement.java pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/jdbc/history/StatementHistory.java pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/jdbc/history/StatementHistoryWitness.java pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/jdbc/history/TraceablePreparedStatement.java pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/s2dao/ pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/s2dao/FetchNarrowingResultSetFactory.java pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/s2dao/FetchNarrowingResultSetWrapper.java pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/s2dao/S2BeanMetaDataFactoryImpl.java pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/s2dao/S2DaoInterceptor.java pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/s2dao/S2DaoMetaDataExtension.java pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/s2dao/S2DaoMetaDataFactoryImpl.java pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/s2dao/S2DaoSelectDynamicCommand.java pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/s2dao/S2DaoStatementFactory.java pompei/trunk/src/main/java/jp/sf/pal/pompei/bsbhv/ pompei/trunk/src/main/java/jp/sf/pal/pompei/bsbhv/BsAddressBookBhv.java pompei/trunk/src/main/java/jp/sf/pal/pompei/bsbhv/BsAddressFormatBhv.java pompei/trunk/src/main/java/jp/sf/pal/pompei/bsbhv/BsBannersBhv.java pompei/trunk/src/main/java/jp/sf/pal/pompei/bsbhv/BsBannersHistoryBhv.java pompei/trunk/src/main/java/jp/sf/pal/pompei/bsbhv/BsCategoriesBhv.java pompei/trunk/src/main/java/jp/sf/pal/pompei/bsbhv/BsCategoriesDescriptionBhv.java pompei/trunk/src/main/java/jp/sf/pal/pompei/bsbhv/BsConfigurationBhv.java pompei/trunk/src/main/java/jp/sf/pal/pompei/bsbhv/BsConfigurationGroupBhv.java pompei/trunk/src/main/java/jp/sf/pal/pompei/bsbhv/BsCounterBhv.java pompei/trunk/src/main/java/jp/sf/pal/pompei/bsbhv/BsCounterHistoryBhv.java pompei/trunk/src/main/java/jp/sf/pal/pompei/bsbhv/BsCountriesBhv.java pompei/trunk/src/main/java/jp/sf/pal/pompei/bsbhv/BsCurrenciesBhv.java pompei/trunk/src/main/java/jp/sf/pal/pompei/bsbhv/BsCustomersBasketAttributesBhv.java pompei/trunk/src/main/java/jp/sf/pal/pompei/bsbhv/BsCustomersBasketBhv.java pompei/trunk/src/main/java/jp/sf/pal/pompei/bsbhv/BsCustomersBhv.java pompei/trunk/src/main/java/jp/sf/pal/pompei/bsbhv/BsCustomersInfoBhv.java pompei/trunk/src/main/java/jp/sf/pal/pompei/bsbhv/BsGeoZonesBhv.java pompei/trunk/src/main/java/jp/sf/pal/pompei/bsbhv/BsLanguagesBhv.java pompei/trunk/src/main/java/jp/sf/pal/pompei/bsbhv/BsManufacturersBhv.java pompei/trunk/src/main/java/jp/sf/pal/pompei/bsbhv/BsManufacturersInfoBhv.java pompei/trunk/src/main/java/jp/sf/pal/pompei/bsbhv/BsNewslettersBhv.java pompei/trunk/src/main/java/jp/sf/pal/pompei/bsbhv/BsOrdersBhv.java pompei/trunk/src/main/java/jp/sf/pal/pompei/bsbhv/BsOrdersProductsAttributesBhv.java pompei/trunk/src/main/java/jp/sf/pal/pompei/bsbhv/BsOrdersProductsBhv.java pompei/trunk/src/main/java/jp/sf/pal/pompei/bsbhv/BsOrdersProductsDownloadBhv.java pompei/trunk/src/main/java/jp/sf/pal/pompei/bsbhv/BsOrdersStatusBhv.java pompei/trunk/src/main/java/jp/sf/pal/pompei/bsbhv/BsOrdersStatusHistoryBhv.java pompei/trunk/src/main/java/jp/sf/pal/pompei/bsbhv/BsOrdersTotalBhv.java pompei/trunk/src/main/java/jp/sf/pal/pompei/bsbhv/BsProductsAttributesBhv.java pompei/trunk/src/main/java/jp/sf/pal/pompei/bsbhv/BsProductsAttributesDownloadBhv.java pompei/trunk/src/main/java/jp/sf/pal/pompei/bsbhv/BsProductsBhv.java pompei/trunk/src/main/java/jp/sf/pal/pompei/bsbhv/BsProductsDescriptionBhv.java pompei/trunk/src/main/java/jp/sf/pal/pompei/bsbhv/BsProductsNotificationsBhv.java pompei/trunk/src/main/java/jp/sf/pal/pompei/bsbhv/BsProductsOptionsBhv.java pompei/trunk/src/main/java/jp/sf/pal/pompei/bsbhv/BsProductsOptionsValuesBhv.java pompei/trunk/src/main/java/jp/sf/pal/pompei/bsbhv/BsProductsOptionsValuesToProductsOptionsBhv.java pompei/trunk/src/main/java/jp/sf/pal/pompei/bsbhv/BsProductsToCategoriesBhv.java pompei/trunk/src/main/java/jp/sf/pal/pompei/bsbhv/BsReviewsBhv.java pompei/trunk/src/main/java/jp/sf/pal/pompei/bsbhv/BsReviewsDescriptionBhv.java pompei/trunk/src/main/java/jp/sf/pal/pompei/bsbhv/BsSessionsBhv.java pompei/trunk/src/main/java/jp/sf/pal/pompei/bsbhv/BsSpecialsBhv.java pompei/trunk/src/main/java/jp/sf/pal/pompei/bsbhv/BsTaxClassBhv.java pompei/trunk/src/main/java/jp/sf/pal/pompei/bsbhv/BsTaxRatesBhv.java pompei/trunk/src/main/java/jp/sf/pal/pompei/bsbhv/BsWhosOnlineBhv.java pompei/trunk/src/main/java/jp/sf/pal/pompei/bsbhv/BsZonesBhv.java pompei/trunk/src/main/java/jp/sf/pal/pompei/bsbhv/BsZonesToGeoZonesBhv.java pompei/trunk/src/main/java/jp/sf/pal/pompei/bsdao/ pompei/trunk/src/main/java/jp/sf/pal/pompei/bsdao/BsAddressBookDao.java pompei/trunk/src/main/java/jp/sf/pal/pompei/bsdao/BsAddressFormatDao.java pompei/trunk/src/main/java/jp/sf/pal/pompei/bsdao/BsBannersDao.java pompei/trunk/src/main/java/jp/sf/pal/pompei/bsdao/BsBannersHistoryDao.java pompei/trunk/src/main/java/jp/sf/pal/pompei/bsdao/BsCategoriesDao.java pompei/trunk/src/main/java/jp/sf/pal/pompei/bsdao/BsCategoriesDescriptionDao.java pompei/trunk/src/main/java/jp/sf/pal/pompei/bsdao/BsConfigurationDao.java pompei/trunk/src/main/java/jp/sf/pal/pompei/bsdao/BsConfigurationGroupDao.java pompei/trunk/src/main/java/jp/sf/pal/pompei/bsdao/BsCounterDao.java pompei/trunk/src/main/java/jp/sf/pal/pompei/bsdao/BsCounterHistoryDao.java pompei/trunk/src/main/java/jp/sf/pal/pompei/bsdao/BsCountriesDao.java pompei/trunk/src/main/java/jp/sf/pal/pompei/bsdao/BsCurrenciesDao.java pompei/trunk/src/main/java/jp/sf/pal/pompei/bsdao/BsCustomersBasketAttributesDao.java pompei/trunk/src/main/java/jp/sf/pal/pompei/bsdao/BsCustomersBasketDao.java pompei/trunk/src/main/java/jp/sf/pal/pompei/bsdao/BsCustomersDao.java pompei/trunk/src/main/java/jp/sf/pal/pompei/bsdao/BsCustomersInfoDao.java pompei/trunk/src/main/java/jp/sf/pal/pompei/bsdao/BsGeoZonesDao.java pompei/trunk/src/main/java/jp/sf/pal/pompei/bsdao/BsLanguagesDao.java pompei/trunk/src/main/java/jp/sf/pal/pompei/bsdao/BsManufacturersDao.java pompei/trunk/src/main/java/jp/sf/pal/pompei/bsdao/BsManufacturersInfoDao.java pompei/trunk/src/main/java/jp/sf/pal/pompei/bsdao/BsNewslettersDao.java pompei/trunk/src/main/java/jp/sf/pal/pompei/bsdao/BsOrdersDao.java pompei/trunk/src/main/java/jp/sf/pal/pompei/bsdao/BsOrdersProductsAttributesDao.java pompei/trunk/src/main/java/jp/sf/pal/pompei/bsdao/BsOrdersProductsDao.java pompei/trunk/src/main/java/jp/sf/pal/pompei/bsdao/BsOrdersProductsDownloadDao.java pompei/trunk/src/main/java/jp/sf/pal/pompei/bsdao/BsOrdersStatusDao.java pompei/trunk/src/main/java/jp/sf/pal/pompei/bsdao/BsOrdersStatusHistoryDao.java pompei/trunk/src/main/java/jp/sf/pal/pompei/bsdao/BsOrdersTotalDao.java pompei/trunk/src/main/java/jp/sf/pal/pompei/bsdao/BsProductsAttributesDao.java pompei/trunk/src/main/java/jp/sf/pal/pompei/bsdao/BsProductsAttributesDownloadDao.java pompei/trunk/src/main/java/jp/sf/pal/pompei/bsdao/BsProductsDao.java pompei/trunk/src/main/java/jp/sf/pal/pompei/bsdao/BsProductsDescriptionDao.java pompei/trunk/src/main/java/jp/sf/pal/pompei/bsdao/BsProductsNotificationsDao.java pompei/trunk/src/main/java/jp/sf/pal/pompei/bsdao/BsProductsOptionsDao.java pompei/trunk/src/main/java/jp/sf/pal/pompei/bsdao/BsProductsOptionsValuesDao.java pompei/trunk/src/main/java/jp/sf/pal/pompei/bsdao/BsProductsOptionsValuesToProductsOptionsDao.java pompei/trunk/src/main/java/jp/sf/pal/pompei/bsdao/BsProductsToCategoriesDao.java pompei/trunk/src/main/java/jp/sf/pal/pompei/bsdao/BsReviewsDao.java pompei/trunk/src/main/java/jp/sf/pal/pompei/bsdao/BsReviewsDescriptionDao.java pompei/trunk/src/main/java/jp/sf/pal/pompei/bsdao/BsSessionsDao.java pompei/trunk/src/main/java/jp/sf/pal/pompei/bsdao/BsSpecialsDao.java pompei/trunk/src/main/java/jp/sf/pal/pompei/bsdao/BsTaxClassDao.java pompei/trunk/src/main/java/jp/sf/pal/pompei/bsdao/BsTaxRatesDao.java pompei/trunk/src/main/java/jp/sf/pal/pompei/bsdao/BsWhosOnlineDao.java pompei/trunk/src/main/java/jp/sf/pal/pompei/bsdao/BsZonesDao.java pompei/trunk/src/main/java/jp/sf/pal/pompei/bsdao/BsZonesToGeoZonesDao.java pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/ pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/BsAddressBook.java pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/BsAddressFormat.java pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/BsBanners.java pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/BsBannersHistory.java pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/BsCategories.java pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/BsCategoriesDescription.java pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/BsConfiguration.java pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/BsConfigurationGroup.java pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/BsCounter.java pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/BsCounterHistory.java pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/BsCountries.java pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/BsCurrencies.java pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/BsCustomers.java pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/BsCustomersBasket.java pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/BsCustomersBasketAttributes.java pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/BsCustomersInfo.java pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/BsGeoZones.java pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/BsLanguages.java pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/BsManufacturers.java pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/BsManufacturersInfo.java pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/BsNewsletters.java pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/BsOrders.java pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/BsOrdersProducts.java pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/BsOrdersProductsAttributes.java pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/BsOrdersProductsDownload.java pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/BsOrdersStatus.java pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/BsOrdersStatusHistory.java pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/BsOrdersTotal.java pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/BsProducts.java pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/BsProductsAttributes.java pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/BsProductsAttributesDownload.java pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/BsProductsDescription.java pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/BsProductsNotifications.java pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/BsProductsOptions.java pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/BsProductsOptionsValues.java pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/BsProductsOptionsValuesToProductsOptions.java pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/BsProductsToCategories.java pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/BsReviews.java pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/BsReviewsDescription.java pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/BsSessions.java pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/BsSpecials.java pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/BsTaxClass.java pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/BsTaxRates.java pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/BsWhosOnline.java pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/BsZones.java pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/BsZonesToGeoZones.java pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/dbmeta/ pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/dbmeta/AddressBookDbm.java pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/dbmeta/AddressFormatDbm.java pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/dbmeta/BannersDbm.java pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/dbmeta/BannersHistoryDbm.java pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/dbmeta/CategoriesDbm.java pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/dbmeta/CategoriesDescriptionDbm.java pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/dbmeta/ConfigurationDbm.java pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/dbmeta/ConfigurationGroupDbm.java pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/dbmeta/CounterDbm.java pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/dbmeta/CounterHistoryDbm.java pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/dbmeta/CountriesDbm.java pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/dbmeta/CurrenciesDbm.java pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/dbmeta/CustomersBasketAttributesDbm.java pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/dbmeta/CustomersBasketDbm.java pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/dbmeta/CustomersDbm.java pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/dbmeta/CustomersInfoDbm.java pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/dbmeta/GeoZonesDbm.java pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/dbmeta/LanguagesDbm.java pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/dbmeta/ManufacturersDbm.java pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/dbmeta/ManufacturersInfoDbm.java pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/dbmeta/NewslettersDbm.java pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/dbmeta/OrdersDbm.java pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/dbmeta/OrdersProductsAttributesDbm.java pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/dbmeta/OrdersProductsDbm.java pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/dbmeta/OrdersProductsDownloadDbm.java pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/dbmeta/OrdersStatusDbm.java pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/dbmeta/OrdersStatusHistoryDbm.java pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/dbmeta/OrdersTotalDbm.java pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/dbmeta/ProductsAttributesDbm.java pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/dbmeta/ProductsAttributesDownloadDbm.java pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/dbmeta/ProductsDbm.java pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/dbmeta/ProductsDescriptionDbm.java pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/dbmeta/ProductsNotificationsDbm.java pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/dbmeta/ProductsOptionsDbm.java pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/dbmeta/ProductsOptionsValuesDbm.java pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/dbmeta/ProductsOptionsValuesToProductsOptionsDbm.java pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/dbmeta/ProductsToCategoriesDbm.java pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/dbmeta/ReviewsDbm.java pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/dbmeta/ReviewsDescriptionDbm.java pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/dbmeta/SessionsDbm.java pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/dbmeta/SpecialsDbm.java pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/dbmeta/TaxClassDbm.java pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/dbmeta/TaxRatesDbm.java pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/dbmeta/WhosOnlineDbm.java pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/dbmeta/ZonesDbm.java pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/dbmeta/ZonesToGeoZonesDbm.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/AddressBookCB.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/AddressFormatCB.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/BannersCB.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/BannersHistoryCB.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/CategoriesCB.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/CategoriesDescriptionCB.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/ConfigurationCB.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/ConfigurationGroupCB.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/CounterCB.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/CounterHistoryCB.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/CountriesCB.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/CurrenciesCB.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/CustomersBasketAttributesCB.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/CustomersBasketCB.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/CustomersCB.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/CustomersInfoCB.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/GeoZonesCB.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/LanguagesCB.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/ManufacturersCB.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/ManufacturersInfoCB.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/NewslettersCB.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/OrdersCB.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/OrdersProductsAttributesCB.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/OrdersProductsCB.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/OrdersProductsDownloadCB.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/OrdersStatusCB.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/OrdersStatusHistoryCB.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/OrdersTotalCB.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/ProductsAttributesCB.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/ProductsAttributesDownloadCB.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/ProductsCB.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/ProductsDescriptionCB.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/ProductsNotificationsCB.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/ProductsOptionsCB.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/ProductsOptionsValuesCB.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/ProductsOptionsValuesToProductsOptionsCB.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/ProductsToCategoriesCB.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/ReviewsCB.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/ReviewsDescriptionCB.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/SessionsCB.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/SpecialsCB.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/TaxClassCB.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/TaxRatesCB.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/WhosOnlineCB.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/ZonesCB.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/ZonesToGeoZonesCB.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/bs/ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/bs/BsAddressBookCB.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/bs/BsAddressFormatCB.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/bs/BsBannersCB.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/bs/BsBannersHistoryCB.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/bs/BsCategoriesCB.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/bs/BsCategoriesDescriptionCB.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/bs/BsConfigurationCB.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/bs/BsConfigurationGroupCB.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/bs/BsCounterCB.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/bs/BsCounterHistoryCB.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/bs/BsCountriesCB.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/bs/BsCurrenciesCB.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/bs/BsCustomersBasketAttributesCB.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/bs/BsCustomersBasketCB.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/bs/BsCustomersCB.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/bs/BsCustomersInfoCB.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/bs/BsGeoZonesCB.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/bs/BsLanguagesCB.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/bs/BsManufacturersCB.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/bs/BsManufacturersInfoCB.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/bs/BsNewslettersCB.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/bs/BsOrdersCB.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/bs/BsOrdersProductsAttributesCB.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/bs/BsOrdersProductsCB.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/bs/BsOrdersProductsDownloadCB.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/bs/BsOrdersStatusCB.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/bs/BsOrdersStatusHistoryCB.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/bs/BsOrdersTotalCB.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/bs/BsProductsAttributesCB.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/bs/BsProductsAttributesDownloadCB.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/bs/BsProductsCB.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/bs/BsProductsDescriptionCB.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/bs/BsProductsNotificationsCB.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/bs/BsProductsOptionsCB.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/bs/BsProductsOptionsValuesCB.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/bs/BsProductsOptionsValuesToProductsOptionsCB.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/bs/BsProductsToCategoriesCB.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/bs/BsReviewsCB.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/bs/BsReviewsDescriptionCB.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/bs/BsSessionsCB.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/bs/BsSpecialsCB.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/bs/BsTaxClassCB.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/bs/BsTaxRatesCB.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/bs/BsWhosOnlineCB.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/bs/BsZonesCB.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/bs/BsZonesToGeoZonesCB.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/AddressBookCQ.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/AddressFormatCQ.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/BannersCQ.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/BannersHistoryCQ.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/CategoriesCQ.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/CategoriesDescriptionCQ.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ConfigurationCQ.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ConfigurationGroupCQ.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/CounterCQ.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/CounterHistoryCQ.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/CountriesCQ.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/CurrenciesCQ.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/CustomersBasketAttributesCQ.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/CustomersBasketCQ.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/CustomersCQ.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/CustomersInfoCQ.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/GeoZonesCQ.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/LanguagesCQ.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ManufacturersCQ.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ManufacturersInfoCQ.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/NewslettersCQ.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/OrdersCQ.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/OrdersProductsAttributesCQ.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/OrdersProductsCQ.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/OrdersProductsDownloadCQ.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/OrdersStatusCQ.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/OrdersStatusHistoryCQ.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/OrdersTotalCQ.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ProductsAttributesCQ.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ProductsAttributesDownloadCQ.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ProductsCQ.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ProductsDescriptionCQ.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ProductsNotificationsCQ.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ProductsOptionsCQ.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ProductsOptionsValuesCQ.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ProductsOptionsValuesToProductsOptionsCQ.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ProductsToCategoriesCQ.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ReviewsCQ.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ReviewsDescriptionCQ.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/SessionsCQ.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/SpecialsCQ.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/TaxClassCQ.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/TaxRatesCQ.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/WhosOnlineCQ.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ZonesCQ.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ZonesToGeoZonesCQ.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/AbstractBsAddressBookCQ.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/AbstractBsAddressFormatCQ.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/AbstractBsBannersCQ.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/AbstractBsBannersHistoryCQ.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/AbstractBsCategoriesCQ.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/AbstractBsCategoriesDescriptionCQ.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/AbstractBsConfigurationCQ.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/AbstractBsConfigurationGroupCQ.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/AbstractBsCounterCQ.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/AbstractBsCounterHistoryCQ.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/AbstractBsCountriesCQ.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/AbstractBsCurrenciesCQ.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/AbstractBsCustomersBasketAttributesCQ.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/AbstractBsCustomersBasketCQ.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/AbstractBsCustomersCQ.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/AbstractBsCustomersInfoCQ.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/AbstractBsGeoZonesCQ.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/AbstractBsLanguagesCQ.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/AbstractBsManufacturersCQ.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/AbstractBsManufacturersInfoCQ.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/AbstractBsNewslettersCQ.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/AbstractBsOrdersCQ.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/AbstractBsOrdersProductsAttributesCQ.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/AbstractBsOrdersProductsCQ.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/AbstractBsOrdersProductsDownloadCQ.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/AbstractBsOrdersStatusCQ.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/AbstractBsOrdersStatusHistoryCQ.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/AbstractBsOrdersTotalCQ.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/AbstractBsProductsAttributesCQ.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/AbstractBsProductsAttributesDownloadCQ.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/AbstractBsProductsCQ.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/AbstractBsProductsDescriptionCQ.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/AbstractBsProductsNotificationsCQ.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/AbstractBsProductsOptionsCQ.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/AbstractBsProductsOptionsValuesCQ.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/AbstractBsProductsOptionsValuesToProductsOptionsCQ.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/AbstractBsProductsToCategoriesCQ.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/AbstractBsReviewsCQ.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/AbstractBsReviewsDescriptionCQ.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/AbstractBsSessionsCQ.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/AbstractBsSpecialsCQ.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/AbstractBsTaxClassCQ.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/AbstractBsTaxRatesCQ.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/AbstractBsWhosOnlineCQ.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/AbstractBsZonesCQ.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/AbstractBsZonesToGeoZonesCQ.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/BsAddressBookCQ.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/BsAddressFormatCQ.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/BsBannersCQ.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/BsBannersHistoryCQ.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/BsCategoriesCQ.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/BsCategoriesDescriptionCQ.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/BsConfigurationCQ.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/BsConfigurationGroupCQ.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/BsCounterCQ.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/BsCounterHistoryCQ.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/BsCountriesCQ.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/BsCurrenciesCQ.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/BsCustomersBasketAttributesCQ.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/BsCustomersBasketCQ.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/BsCustomersCQ.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/BsCustomersInfoCQ.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/BsGeoZonesCQ.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/BsLanguagesCQ.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/BsManufacturersCQ.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/BsManufacturersInfoCQ.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/BsNewslettersCQ.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/BsOrdersCQ.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/BsOrdersProductsAttributesCQ.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/BsOrdersProductsCQ.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/BsOrdersProductsDownloadCQ.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/BsOrdersStatusCQ.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/BsOrdersStatusHistoryCQ.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/BsOrdersTotalCQ.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/BsProductsAttributesCQ.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/BsProductsAttributesDownloadCQ.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/BsProductsCQ.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/BsProductsDescriptionCQ.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/BsProductsNotificationsCQ.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/BsProductsOptionsCQ.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/BsProductsOptionsValuesCQ.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/BsProductsOptionsValuesToProductsOptionsCQ.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/BsProductsToCategoriesCQ.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/BsReviewsCQ.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/BsReviewsDescriptionCQ.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/BsSessionsCQ.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/BsSpecialsCQ.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/BsTaxClassCQ.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/BsTaxRatesCQ.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/BsWhosOnlineCQ.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/BsZonesCQ.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/BsZonesToGeoZonesCQ.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ciq/ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ciq/AddressBookCIQ.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ciq/AddressFormatCIQ.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ciq/BannersCIQ.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ciq/BannersHistoryCIQ.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ciq/CategoriesCIQ.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ciq/CategoriesDescriptionCIQ.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ciq/ConfigurationCIQ.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ciq/ConfigurationGroupCIQ.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ciq/CounterCIQ.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ciq/CounterHistoryCIQ.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ciq/CountriesCIQ.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ciq/CurrenciesCIQ.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ciq/CustomersBasketAttributesCIQ.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ciq/CustomersBasketCIQ.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ciq/CustomersCIQ.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ciq/CustomersInfoCIQ.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ciq/GeoZonesCIQ.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ciq/LanguagesCIQ.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ciq/ManufacturersCIQ.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ciq/ManufacturersInfoCIQ.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ciq/NewslettersCIQ.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ciq/OrdersCIQ.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ciq/OrdersProductsAttributesCIQ.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ciq/OrdersProductsCIQ.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ciq/OrdersProductsDownloadCIQ.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ciq/OrdersStatusCIQ.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ciq/OrdersStatusHistoryCIQ.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ciq/OrdersTotalCIQ.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ciq/ProductsAttributesCIQ.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ciq/ProductsAttributesDownloadCIQ.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ciq/ProductsCIQ.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ciq/ProductsDescriptionCIQ.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ciq/ProductsNotificationsCIQ.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ciq/ProductsOptionsCIQ.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ciq/ProductsOptionsValuesCIQ.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ciq/ProductsOptionsValuesToProductsOptionsCIQ.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ciq/ProductsToCategoriesCIQ.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ciq/ReviewsCIQ.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ciq/ReviewsDescriptionCIQ.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ciq/SessionsCIQ.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ciq/SpecialsCIQ.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ciq/TaxClassCIQ.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ciq/TaxRatesCIQ.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ciq/WhosOnlineCIQ.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ciq/ZonesCIQ.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ciq/ZonesToGeoZonesCIQ.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/nss/ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/nss/AddressBookNss.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/nss/AddressFormatNss.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/nss/BannersHistoryNss.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/nss/BannersNss.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/nss/CategoriesDescriptionNss.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/nss/CategoriesNss.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/nss/ConfigurationGroupNss.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/nss/ConfigurationNss.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/nss/CounterHistoryNss.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/nss/CounterNss.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/nss/CountriesNss.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/nss/CurrenciesNss.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/nss/CustomersBasketAttributesNss.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/nss/CustomersBasketNss.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/nss/CustomersInfoNss.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/nss/CustomersNss.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/nss/GeoZonesNss.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/nss/LanguagesNss.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/nss/ManufacturersInfoNss.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/nss/ManufacturersNss.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/nss/NewslettersNss.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/nss/OrdersNss.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/nss/OrdersProductsAttributesNss.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/nss/OrdersProductsDownloadNss.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/nss/OrdersProductsNss.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/nss/OrdersStatusHistoryNss.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/nss/OrdersStatusNss.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/nss/OrdersTotalNss.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/nss/ProductsAttributesDownloadNss.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/nss/ProductsAttributesNss.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/nss/ProductsDescriptionNss.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/nss/ProductsNotificationsNss.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/nss/ProductsNss.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/nss/ProductsOptionsNss.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/nss/ProductsOptionsValuesNss.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/nss/ProductsOptionsValuesToProductsOptionsNss.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/nss/ProductsToCategoriesNss.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/nss/ReviewsDescriptionNss.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/nss/ReviewsNss.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/nss/SessionsNss.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/nss/SpecialsNss.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/nss/TaxClassNss.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/nss/TaxRatesNss.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/nss/WhosOnlineNss.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/nss/ZonesNss.java pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/nss/ZonesToGeoZonesNss.java pompei/trunk/src/main/java/jp/sf/pal/pompei/converter/ pompei/trunk/src/main/java/jp/sf/pal/pompei/dao/ pompei/trunk/src/main/java/jp/sf/pal/pompei/dto/ pompei/trunk/src/main/java/jp/sf/pal/pompei/dxo/ pompei/trunk/src/main/java/jp/sf/pal/pompei/entity/ pompei/trunk/src/main/java/jp/sf/pal/pompei/exbhv/ pompei/trunk/src/main/java/jp/sf/pal/pompei/exbhv/AddressBookBhv.java pompei/trunk/src/main/java/jp/sf/pal/pompei/exbhv/AddressFormatBhv.java pompei/trunk/src/main/java/jp/sf/pal/pompei/exbhv/BannersBhv.java pompei/trunk/src/main/java/jp/sf/pal/pompei/exbhv/BannersHistoryBhv.java pompei/trunk/src/main/java/jp/sf/pal/pompei/exbhv/CategoriesBhv.java pompei/trunk/src/main/java/jp/sf/pal/pompei/exbhv/CategoriesDescriptionBhv.java pompei/trunk/src/main/java/jp/sf/pal/pompei/exbhv/ConfigurationBhv.java pompei/trunk/src/main/java/jp/sf/pal/pompei/exbhv/ConfigurationGroupBhv.java pompei/trunk/src/main/java/jp/sf/pal/pompei/exbhv/CounterBhv.java pompei/trunk/src/main/java/jp/sf/pal/pompei/exbhv/CounterHistoryBhv.java pompei/trunk/src/main/java/jp/sf/pal/pompei/exbhv/CountriesBhv.java pompei/trunk/src/main/java/jp/sf/pal/pompei/exbhv/CurrenciesBhv.java pompei/trunk/src/main/java/jp/sf/pal/pompei/exbhv/CustomersBasketAttributesBhv.java pompei/trunk/src/main/java/jp/sf/pal/pompei/exbhv/CustomersBasketBhv.java pompei/trunk/src/main/java/jp/sf/pal/pompei/exbhv/CustomersBhv.java pompei/trunk/src/main/java/jp/sf/pal/pompei/exbhv/CustomersInfoBhv.java pompei/trunk/src/main/java/jp/sf/pal/pompei/exbhv/GeoZonesBhv.java pompei/trunk/src/main/java/jp/sf/pal/pompei/exbhv/LanguagesBhv.java pompei/trunk/src/main/java/jp/sf/pal/pompei/exbhv/ManufacturersBhv.java pompei/trunk/src/main/java/jp/sf/pal/pompei/exbhv/ManufacturersInfoBhv.java pompei/trunk/src/main/java/jp/sf/pal/pompei/exbhv/NewslettersBhv.java pompei/trunk/src/main/java/jp/sf/pal/pompei/exbhv/OrdersBhv.java pompei/trunk/src/main/java/jp/sf/pal/pompei/exbhv/OrdersProductsAttributesBhv.java pompei/trunk/src/main/java/jp/sf/pal/pompei/exbhv/OrdersProductsBhv.java pompei/trunk/src/main/java/jp/sf/pal/pompei/exbhv/OrdersProductsDownloadBhv.java pompei/trunk/src/main/java/jp/sf/pal/pompei/exbhv/OrdersStatusBhv.java pompei/trunk/src/main/java/jp/sf/pal/pompei/exbhv/OrdersStatusHistoryBhv.java pompei/trunk/src/main/java/jp/sf/pal/pompei/exbhv/OrdersTotalBhv.java pompei/trunk/src/main/java/jp/sf/pal/pompei/exbhv/ProductsAttributesBhv.java pompei/trunk/src/main/java/jp/sf/pal/pompei/exbhv/ProductsAttributesDownloadBhv.java pompei/trunk/src/main/java/jp/sf/pal/pompei/exbhv/ProductsBhv.java pompei/trunk/src/main/java/jp/sf/pal/pompei/exbhv/ProductsDescriptionBhv.java pompei/trunk/src/main/java/jp/sf/pal/pompei/exbhv/ProductsNotificationsBhv.java pompei/trunk/src/main/java/jp/sf/pal/pompei/exbhv/ProductsOptionsBhv.java pompei/trunk/src/main/java/jp/sf/pal/pompei/exbhv/ProductsOptionsValuesBhv.java pompei/trunk/src/main/java/jp/sf/pal/pompei/exbhv/ProductsOptionsValuesToProductsOptionsBhv.java pompei/trunk/src/main/java/jp/sf/pal/pompei/exbhv/ProductsToCategoriesBhv.java pompei/trunk/src/main/java/jp/sf/pal/pompei/exbhv/ReviewsBhv.java pompei/trunk/src/main/java/jp/sf/pal/pompei/exbhv/ReviewsDescriptionBhv.java pompei/trunk/src/main/java/jp/sf/pal/pompei/exbhv/SessionsBhv.java pompei/trunk/src/main/java/jp/sf/pal/pompei/exbhv/SpecialsBhv.java pompei/trunk/src/main/java/jp/sf/pal/pompei/exbhv/TaxClassBhv.java pompei/trunk/src/main/java/jp/sf/pal/pompei/exbhv/TaxRatesBhv.java pompei/trunk/src/main/java/jp/sf/pal/pompei/exbhv/WhosOnlineBhv.java pompei/trunk/src/main/java/jp/sf/pal/pompei/exbhv/ZonesBhv.java pompei/trunk/src/main/java/jp/sf/pal/pompei/exbhv/ZonesToGeoZonesBhv.java pompei/trunk/src/main/java/jp/sf/pal/pompei/exdao/ pompei/trunk/src/main/java/jp/sf/pal/pompei/exdao/AddressBookDao.java pompei/trunk/src/main/java/jp/sf/pal/pompei/exdao/AddressFormatDao.java pompei/trunk/src/main/java/jp/sf/pal/pompei/exdao/BannersDao.java pompei/trunk/src/main/java/jp/sf/pal/pompei/exdao/BannersHistoryDao.java pompei/trunk/src/main/java/jp/sf/pal/pompei/exdao/CategoriesDao.java pompei/trunk/src/main/java/jp/sf/pal/pompei/exdao/CategoriesDescriptionDao.java pompei/trunk/src/main/java/jp/sf/pal/pompei/exdao/ConfigurationDao.java pompei/trunk/src/main/java/jp/sf/pal/pompei/exdao/ConfigurationGroupDao.java pompei/trunk/src/main/java/jp/sf/pal/pompei/exdao/CounterDao.java pompei/trunk/src/main/java/jp/sf/pal/pompei/exdao/CounterHistoryDao.java pompei/trunk/src/main/java/jp/sf/pal/pompei/exdao/CountriesDao.java pompei/trunk/src/main/java/jp/sf/pal/pompei/exdao/CurrenciesDao.java pompei/trunk/src/main/java/jp/sf/pal/pompei/exdao/CustomersBasketAttributesDao.java pompei/trunk/src/main/java/jp/sf/pal/pompei/exdao/CustomersBasketDao.java pompei/trunk/src/main/java/jp/sf/pal/pompei/exdao/CustomersDao.java pompei/trunk/src/main/java/jp/sf/pal/pompei/exdao/CustomersInfoDao.java pompei/trunk/src/main/java/jp/sf/pal/pompei/exdao/GeoZonesDao.java pompei/trunk/src/main/java/jp/sf/pal/pompei/exdao/LanguagesDao.java pompei/trunk/src/main/java/jp/sf/pal/pompei/exdao/ManufacturersDao.java pompei/trunk/src/main/java/jp/sf/pal/pompei/exdao/ManufacturersInfoDao.java pompei/trunk/src/main/java/jp/sf/pal/pompei/exdao/NewslettersDao.java pompei/trunk/src/main/java/jp/sf/pal/pompei/exdao/OrdersDao.java pompei/trunk/src/main/java/jp/sf/pal/pompei/exdao/OrdersProductsAttributesDao.java pompei/trunk/src/main/java/jp/sf/pal/pompei/exdao/OrdersProductsDao.java pompei/trunk/src/main/java/jp/sf/pal/pompei/exdao/OrdersProductsDownloadDao.java pompei/trunk/src/main/java/jp/sf/pal/pompei/exdao/OrdersStatusDao.java pompei/trunk/src/main/java/jp/sf/pal/pompei/exdao/OrdersStatusHistoryDao.java pompei/trunk/src/main/java/jp/sf/pal/pompei/exdao/OrdersTotalDao.java pompei/trunk/src/main/java/jp/sf/pal/pompei/exdao/ProductsAttributesDao.java pompei/trunk/src/main/java/jp/sf/pal/pompei/exdao/ProductsAttributesDownloadDao.java pompei/trunk/src/main/java/jp/sf/pal/pompei/exdao/ProductsDao.java pompei/trunk/src/main/java/jp/sf/pal/pompei/exdao/ProductsDescriptionDao.java pompei/trunk/src/main/java/jp/sf/pal/pompei/exdao/ProductsNotificationsDao.java pompei/trunk/src/main/java/jp/sf/pal/pompei/exdao/ProductsOptionsDao.java pompei/trunk/src/main/java/jp/sf/pal/pompei/exdao/ProductsOptionsValuesDao.java pompei/trunk/src/main/java/jp/sf/pal/pompei/exdao/ProductsOptionsValuesToProductsOptionsDao.java pompei/trunk/src/main/java/jp/sf/pal/pompei/exdao/ProductsToCategoriesDao.java pompei/trunk/src/main/java/jp/sf/pal/pompei/exdao/ReviewsDao.java pompei/trunk/src/main/java/jp/sf/pal/pompei/exdao/ReviewsDescriptionDao.java pompei/trunk/src/main/java/jp/sf/pal/pompei/exdao/SessionsDao.java pompei/trunk/src/main/java/jp/sf/pal/pompei/exdao/SpecialsDao.java pompei/trunk/src/main/java/jp/sf/pal/pompei/exdao/TaxClassDao.java pompei/trunk/src/main/java/jp/sf/pal/pompei/exdao/TaxRatesDao.java pompei/trunk/src/main/java/jp/sf/pal/pompei/exdao/WhosOnlineDao.java pompei/trunk/src/main/java/jp/sf/pal/pompei/exdao/ZonesDao.java pompei/trunk/src/main/java/jp/sf/pal/pompei/exdao/ZonesToGeoZonesDao.java pompei/trunk/src/main/java/jp/sf/pal/pompei/exentity/ pompei/trunk/src/main/java/jp/sf/pal/pompei/exentity/AddressBook.java pompei/trunk/src/main/java/jp/sf/pal/pompei/exentity/AddressFormat.java pompei/trunk/src/main/java/jp/sf/pal/pompei/exentity/Banners.java pompei/trunk/src/main/java/jp/sf/pal/pompei/exentity/BannersHistory.java pompei/trunk/src/main/java/jp/sf/pal/pompei/exentity/Categories.java pompei/trunk/src/main/java/jp/sf/pal/pompei/exentity/CategoriesDescription.java pompei/trunk/src/main/java/jp/sf/pal/pompei/exentity/Configuration.java pompei/trunk/src/main/java/jp/sf/pal/pompei/exentity/ConfigurationGroup.java pompei/trunk/src/main/java/jp/sf/pal/pompei/exentity/Counter.java pompei/trunk/src/main/java/jp/sf/pal/pompei/exentity/CounterHistory.java pompei/trunk/src/main/java/jp/sf/pal/pompei/exentity/Countries.java pompei/trunk/src/main/java/jp/sf/pal/pompei/exentity/Currencies.java pompei/trunk/src/main/java/jp/sf/pal/pompei/exentity/Customers.java pompei/trunk/src/main/java/jp/sf/pal/pompei/exentity/CustomersBasket.java pompei/trunk/src/main/java/jp/sf/pal/pompei/exentity/CustomersBasketAttributes.java pompei/trunk/src/main/java/jp/sf/pal/pompei/exentity/CustomersInfo.java pompei/trunk/src/main/java/jp/sf/pal/pompei/exentity/GeoZones.java pompei/trunk/src/main/java/jp/sf/pal/pompei/exentity/Languages.java pompei/trunk/src/main/java/jp/sf/pal/pompei/exentity/Manufacturers.java pompei/trunk/src/main/java/jp/sf/pal/pompei/exentity/ManufacturersInfo.java pompei/trunk/src/main/java/jp/sf/pal/pompei/exentity/Newsletters.java pompei/trunk/src/main/java/jp/sf/pal/pompei/exentity/Orders.java pompei/trunk/src/main/java/jp/sf/pal/pompei/exentity/OrdersProducts.java pompei/trunk/src/main/java/jp/sf/pal/pompei/exentity/OrdersProductsAttributes.java pompei/trunk/src/main/java/jp/sf/pal/pompei/exentity/OrdersProductsDownload.java pompei/trunk/src/main/java/jp/sf/pal/pompei/exentity/OrdersStatus.java pompei/trunk/src/main/java/jp/sf/pal/pompei/exentity/OrdersStatusHistory.java pompei/trunk/src/main/java/jp/sf/pal/pompei/exentity/OrdersTotal.java pompei/trunk/src/main/java/jp/sf/pal/pompei/exentity/Products.java pompei/trunk/src/main/java/jp/sf/pal/pompei/exentity/ProductsAttributes.java pompei/trunk/src/main/java/jp/sf/pal/pompei/exentity/ProductsAttributesDownload.java pompei/trunk/src/main/java/jp/sf/pal/pompei/exentity/ProductsDescription.java pompei/trunk/src/main/java/jp/sf/pal/pompei/exentity/ProductsNotifications.java pompei/trunk/src/main/java/jp/sf/pal/pompei/exentity/ProductsOptions.java pompei/trunk/src/main/java/jp/sf/pal/pompei/exentity/ProductsOptionsValues.java pompei/trunk/src/main/java/jp/sf/pal/pompei/exentity/ProductsOptionsValuesToProductsOptions.java pompei/trunk/src/main/java/jp/sf/pal/pompei/exentity/ProductsToCategories.java pompei/trunk/src/main/java/jp/sf/pal/pompei/exentity/Reviews.java pompei/trunk/src/main/java/jp/sf/pal/pompei/exentity/ReviewsDescription.java pompei/trunk/src/main/java/jp/sf/pal/pompei/exentity/Sessions.java pompei/trunk/src/main/java/jp/sf/pal/pompei/exentity/Specials.java pompei/trunk/src/main/java/jp/sf/pal/pompei/exentity/TaxClass.java pompei/trunk/src/main/java/jp/sf/pal/pompei/exentity/TaxRates.java pompei/trunk/src/main/java/jp/sf/pal/pompei/exentity/WhosOnline.java pompei/trunk/src/main/java/jp/sf/pal/pompei/exentity/Zones.java pompei/trunk/src/main/java/jp/sf/pal/pompei/exentity/ZonesToGeoZones.java pompei/trunk/src/main/java/jp/sf/pal/pompei/helper/ pompei/trunk/src/main/java/jp/sf/pal/pompei/interceptor/ pompei/trunk/src/main/java/jp/sf/pal/pompei/logic/ pompei/trunk/src/main/java/jp/sf/pal/pompei/service/ pompei/trunk/src/main/java/jp/sf/pal/pompei/validator/ pompei/trunk/src/main/java/jp/sf/pal/pompei/web/ pompei/trunk/src/main/java/jp/sf/pal/pompei/web/error/ pompei/trunk/src/main/java/jp/sf/pal/pompei/web/error/ErrorPage.java pompei/trunk/src/main/java/jp/sf/pal/pompei/web/sample/ pompei/trunk/src/main/java/jp/sf/pal/pompei/web/sample/SampleAction.java pompei/trunk/src/main/java/jp/sf/pal/pompei/web/sample/SamplePage.java pompei/trunk/src/main/java/jp/sf/pal/pompei/web/sample/SampleService.java pompei/trunk/src/main/java/jp/sf/pal/pompei/web/sample/impl/ pompei/trunk/src/main/java/jp/sf/pal/pompei/web/sample/impl/SampleServiceImpl.java pompei/trunk/src/main/java/jp/sf/pal/pompei/web/test/ pompei/trunk/src/main/java/jp/sf/pal/pompei/web/test/AddResultPage.java pompei/trunk/src/main/java/jp/sf/pal/pompei/web/test/TestAction.java pompei/trunk/src/main/java/jp/sf/pal/pompei/web/test/TestPage.java pompei/trunk/src/main/java/jp/sf/pal/pompei/web/test/TestService.java pompei/trunk/src/main/java/jp/sf/pal/pompei/web/test/impl/ pompei/trunk/src/main/java/jp/sf/pal/pompei/web/test/impl/TestServiceImpl.java pompei/trunk/src/main/resources/ pompei/trunk/src/main/resources/app.dicon pompei/trunk/src/main/resources/appMessages.properties pompei/trunk/src/main/resources/appMessages_ja.properties pompei/trunk/src/main/resources/app_aop.dicon pompei/trunk/src/main/resources/convention.dicon pompei/trunk/src/main/resources/creator.dicon pompei/trunk/src/main/resources/customizer.dicon pompei/trunk/src/main/resources/data/ pompei/trunk/src/main/resources/data/demo.sql pompei/trunk/src/main/resources/dbflute.dicon pompei/trunk/src/main/resources/env.txt pompei/trunk/src/main/resources/env_ut.txt pompei/trunk/src/main/resources/jdbc.dicon pompei/trunk/src/main/resources/log4j.properties pompei/trunk/src/main/resources/s2container.dicon pompei/trunk/src/main/resources/teedaCustomize.dicon pompei/trunk/src/main/resources/teedaErrorPage.dicon -------------- next part -------------- Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/AccessContext.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/AccessContext.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/AccessContext.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,152 @@ +package jp.sf.pal.pompei.allcommon; + +/** + * Access-Context. + *
+ * This access-context on the thread should be initialized at the beginning of access.
+ * The access is various. Web-Access, Batch-Access, JUnit-Access and so on...
+ * 
+ * @author DBFlute(AutoGenerator) + */ +public class AccessContext { + + // =================================================================================== + // Thread Local + // ============ + /** The thread-local for this. */ + private static final ThreadLocal threadLocal = new ThreadLocal(); + + /** + * Get access-context on thread. + * + * @return Access-context. (Nullable) + */ + public static AccessContext getAccessContextOnThread() { + return (AccessContext) threadLocal.get(); + } + + /** + * Set access-context on thread. + * + * @param accessContext Access-context. (NotNull) + */ + public static void setAccessContextOnThread(AccessContext accessContext) { + if (accessContext == null) { + String msg = "The argument[accessContext] must not be null."; + throw new IllegalArgumentException(msg); + } + threadLocal.set(accessContext); + } + + /** + * Is existing access-context on thread? + * + * @return Determination. + */ + public static boolean isExistAccessContextOnThread() { + return (threadLocal.get() != null); + } + + /** + * Clear access-context on thread. + */ + public static void clearAccessContextOnThread() { + threadLocal.set(null); + } + + // =================================================================================== + // Access Information + // ================== + /** + * Get access user on thread. + *
+     * If it can't get access user from access-context, 
+     * returns 'Anonymous' as default value!
+     * 
+ * @return Access user. (NotNull) + */ + public static String getAccessUserOnThread() { + if (isExistAccessContextOnThread()) { + final AccessContext userContextOnThread = getAccessContextOnThread(); + final String accessUser = userContextOnThread.getAccessUser(); + if (accessUser != null) { + return accessUser; + } + } + return "Anonymous";// as Default + } + + /** + * Get access module on thread. + *
+     * If it can't get access module from access-context, 
+     * returns 'Anonymous' as default value!
+     * 
+ * @return Access module. (NotNull) + */ + public static String getAccessModuleOnThread() { + if (isExistAccessContextOnThread()) { + final AccessContext userContextOnThread = getAccessContextOnThread(); + final String accessModule = userContextOnThread.getAccessModule(); + if (accessModule != null) { + return accessModule; + } + } + return "Anonymous";// as Default + } + + /** + * Get access timestamp on thread. + *
+     * If it can't get access timestamp from access-context, 
+     * returns application current time as default value!
+     * 
+ * @return Access timestamp. (NotNull) + */ + public static java.sql.Timestamp getAccessTimestampOnThread() { + if (isExistAccessContextOnThread()) { + final AccessContext userContextOnThread = getAccessContextOnThread(); + final java.sql.Timestamp accessTimestamp = userContextOnThread.getAccessTimestamp(); + if (accessTimestamp != null) { + return accessTimestamp; + } + } + return new java.sql.Timestamp(System.currentTimeMillis());// as Default + } + + // =================================================================================== + // Attribute + // ========= + protected String accessUser; + + protected String accessModule; + + protected java.sql.Timestamp accessTimestamp; + + // =================================================================================== + // Accessor + // ======== + public String getAccessUser() { + return accessUser; + } + + public void setAccessUser(String accessUser) { + this.accessUser = accessUser; + } + + public String getAccessModule() { + return accessModule; + } + + public void setAccessModule(String accessModule) { + this.accessModule = accessModule; + } + + public java.sql.Timestamp getAccessTimestamp() { + return accessTimestamp; + } + + public void setAccessTimestamp(java.sql.Timestamp accessTimestamp) { + this.accessTimestamp = accessTimestamp; + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/CacheDaoSelector.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/CacheDaoSelector.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/CacheDaoSelector.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,287 @@ +package jp.sf.pal.pompei.allcommon; + +import jp.sf.pal.pompei.allcommon.bhv.BehaviorReadable; +import jp.sf.pal.pompei.allcommon.bhv.BehaviorWritable; + +import jp.sf.pal.pompei.allcommon.dbmeta.DBMetaInstanceHandler; +import jp.sf.pal.pompei.allcommon.dbmeta.DBMeta; + +import org.seasar.framework.container.S2Container; + +/** + * The implementation of dao-selector. + *
+ * Long long ago this object have cache of dao and bhv.
+ * But the cache cause wrong performance when this is initialized.
+ * So now this object don't have cache.
+ * 
+ * @author DBFlute(AutoGenerator) + */ +public class CacheDaoSelector implements DaoSelector { + + protected S2Container _container; + + public void setContainer(S2Container container) { + this._container = container; + } + + /** + * Get dao. + * + * @param daoType Dao type. (NotNull) + * @return Dao. (NotNull) + */ + public DAO_TYPE getDao(Class daoType) { + return (DAO_TYPE)_container.getComponent(daoType); + } + + /** + * Get dao-readable. + * + * @param tableMultiName Table multi-name. (NotNull) + * @return Dao-readable. (NotNull) + */ + public DaoReadable byNameAsDaoReadable(String tableMultiName) { + assertStringNotNullAndNotTrimmedEmpty("tableMultiName", tableMultiName); + final DBMeta dbmeta = DBMetaInstanceHandler.getInstanceByTableMultiName(tableMultiName); + return getDao(getDaoType(dbmeta)); + } + + /** + * Get behavior. + * + * @param behaviorType Behavior type. (NotNull) + * @return Behavior. (NotNull) + */ + public BEHAVIOR_TYPE getBehavior(Class behaviorType) { + return (BEHAVIOR_TYPE)_container.getComponent(behaviorType); + } + + /** + * Get behavior-readable. + * + * @param tableMultiName Table multi-name. (NotNull) + * @return Behavior-readable. (NotNull) + */ + public BehaviorReadable byNameAsBehaviorReadable(String tableMultiName) { + assertStringNotNullAndNotTrimmedEmpty("tableMultiName", tableMultiName); + final DBMeta dbmeta = DBMetaInstanceHandler.getInstanceByTableMultiName(tableMultiName); + return getBehavior(getBehaviorType(dbmeta)); + } + + /** + * Get dao-readable by dao type. + * + * @param daoType Dao type. (NotNull) + * @return Dao-readable. (NotNull) + */ + public DaoReadable getRDao(Class daoType) { + assertObjectNotNull("daoType", daoType); + return (DaoReadable)_container.getComponent(daoType); + } + + /** + * Get dao-readable by entity. + * + * @param entity Entity. (NotNull) + * @return Dao-readable. (NotNull) + */ + public DaoReadable getRDao(Entity entity) { + assertObjectNotNull("entity", entity); + return getRDao(getDaoType(entity.getDBMeta())); + } + + /** + * Get dao-readable by table multi-name. + * + * @param tableMultiName Table multi-name. (NotNull) + * @return Dao-readable. (NotNull) + */ + public DaoReadable getRDao(String tableMultiName) { + assertStringNotNullAndNotTrimmedEmpty("tableMultiName", tableMultiName); + final DBMeta dbmeta = DBMetaInstanceHandler.getInstanceByTableMultiName(tableMultiName); + return getRDao(getDaoType(dbmeta)); + } + + /** + * Get dao-writable by dao type. + * + * @param daoType Dao type. (NotNull) + * @return Dao-writable. (NotNull) + */ + public DaoWritable getWDao(Class daoType) { + assertObjectNotNull("daoType", daoType); + return (DaoWritable)getRDao(daoType); + } + + /** + * Get dao-writable by entity. + * + * @param entity Entity. (NotNull) + * @return Dao-writable. (NotNull) + */ + public DaoWritable getWDao(Entity entity) { + assertObjectNotNull("entity", entity); + return (DaoWritable)getRDao(entity); + } + + /** + * Get dao-writable by table multi-name. + * + * @param tableMultiName Table multi-name. (NotNull) + * @return Dao-writable. (NotNull) + */ + public DaoWritable getWDao(String tableMultiName) { + assertStringNotNullAndNotTrimmedEmpty("tableMultiName", tableMultiName); + return (DaoWritable)getRDao(tableMultiName); + } + + /** + * Get bhv-readable by bhv type. + * + * @param bhvType Bhv type. (NotNull) + * @return Bhv-readable. (NotNull) + */ + public BehaviorReadable getRBhv(Class bhvType) { + assertObjectNotNull("bhvType", bhvType); + return (BehaviorReadable)_container.getComponent(bhvType); + } + + /** + * Get bhv-readable by entity. + * + * @param entity Entity. (NotNull) + * @return Bhv-readable. (NotNull) + */ + public BehaviorReadable getRBhv(Entity entity) { + assertObjectNotNull("entity", entity); + return getRBhv(getBehaviorType(entity.getDBMeta())); + } + + /** + * Get bhv-readable by table multi-name. + * + * @param tableMultiName Table multi-name. (NotNull) + * @return Bhv-readable. (NotNull) + */ + public BehaviorReadable getRBhv(String tableMultiName) { + assertStringNotNullAndNotTrimmedEmpty("tableMultiName", tableMultiName); + final DBMeta dbmeta = DBMetaInstanceHandler.getInstanceByTableMultiName(tableMultiName); + return getRBhv(getBehaviorType(dbmeta)); + } + + /** + * Get bhv-writable by bhv type. + * + * @param bhvType Bhv type. (NotNull) + * @return Bhv-writable. (NotNull) + */ + public BehaviorWritable getWBhv(Class bhvType) { + assertObjectNotNull("bhvType", bhvType); + return (BehaviorWritable)getRBhv(bhvType); + } + + /** + * Get bhv-writable by entity. + * + * @param entity Entity. (NotNull) + * @return Bhv-writable. (NotNull) + */ + public BehaviorWritable getWBhv(Entity entity) { + assertObjectNotNull("entity", entity); + return (BehaviorWritable)getRBhv(entity); + } + + /** + * Get bhv-writable by table multi-name. + * + * @param tableMultiName Table multi-name. (NotNull) + * @return Bhv-writable. (NotNull) + */ + public BehaviorWritable getWBhv(String tableMultiName) { + assertStringNotNullAndNotTrimmedEmpty("tableMultiName", tableMultiName); + return (BehaviorWritable)getRBhv(tableMultiName); + } + + /** + * Get behavior-type by dbmeta. + * + * @param dbmeta Dbmeta. (NotNull) + * @return Behavior-type. (NotNull) + */ + protected Class getBehaviorType(DBMeta dbmeta) { + final String behaviorTypeName = dbmeta.getBehaviorTypeName(); + if (behaviorTypeName == null) { + String msg = "The dbmeta.getBehaviorTypeName() should not return null: dbmeta=" + dbmeta; + throw new IllegalStateException(msg); + } + final Class behaviorType; + try { + behaviorType = Class.forName(behaviorTypeName); + } catch (ClassNotFoundException e) { + throw new RuntimeException("The class does not exist: " + behaviorTypeName, e); + } + return behaviorType; + } + + protected Class getDaoType(DBMeta dbmeta) { + final String daoTypeName = dbmeta.getDaoTypeName(); + if (daoTypeName == null) { + String msg = "The dbmeta.getDaoTypeName() should not return null: dbmeta=" + dbmeta; + throw new IllegalStateException(msg); + } + final Class daoType; + try { + daoType = Class.forName(daoTypeName); + } catch (ClassNotFoundException e) { + throw new RuntimeException("The class does not exist: " + daoTypeName, e); + } + return daoType; + } + + // ===================================================================================== + // Destroy + // ======= + public void destroy() { + _container = null; + } + + // ---------------------------------------------------------------- + // Assert Object + // ------------- + /** + * Assert that the object is not null. + * + * @param variableName Variable name. (NotNull) + * @param value Value. (NotNull) + * @exception IllegalArgumentException + */ + protected void assertObjectNotNull(String variableName, Object value) { + if (variableName == null) { + String msg = "The value should not be null: variableName=" + variableName + " value=" + value; + throw new IllegalArgumentException(msg); + } + if (value == null) { + String msg = "The value should not be null: variableName=" + variableName; + throw new IllegalArgumentException(msg); + } + } + + // ---------------------------------------------------------------- + // Assert String + // ------------- + /** + * Assert that the entity is not null and not trimmed empty. + * + * @param variableName Variable name. (NotNull) + * @param value Value. (NotNull) + */ + protected void assertStringNotNullAndNotTrimmedEmpty(String variableName, String value) { + assertObjectNotNull("variableName", variableName); + assertObjectNotNull("value", value); + if (value.trim().length() ==0) { + String msg = "The value should not be empty: variableName=" + variableName + " value=" + value; + throw new IllegalArgumentException(msg); + } + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/DaoReadable.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/DaoReadable.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/DaoReadable.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,12 @@ +package jp.sf.pal.pompei.allcommon; + +/** + * The interface of dao-readable. + * + * @author DBFlute(AutoGenerator) + */ +public interface DaoReadable { + // [Developer's comment] (2006/06/08) + // It cannot be done for the convenience of s2dao though I want to define methods for condition-bean here. + // DTO argument as Interface is not accepted. +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/DaoSelector.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/DaoSelector.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/DaoSelector.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,152 @@ +package jp.sf.pal.pompei.allcommon; + +import jp.sf.pal.pompei.allcommon.bhv.BehaviorReadable; +import jp.sf.pal.pompei.allcommon.bhv.BehaviorWritable; + +/** + * The interface of dao-selector. + * + * @author DBFlute(AutoGenerator) + */ +public interface DaoSelector { + + /** + * Get dao. + * + * @param daoType Dao type. (NotNull) + * @return Dao. (NotNull) + */ + public DAO_TYPE getDao(Class daoType); + + /** + * Get dao-readable. + * + * @param tableMultiName Table multi-name. (NotNull) + * @return Dao-readable. (NotNull) + */ + public DaoReadable byNameAsDaoReadable(String tableMultiName); + + /** + * Get behavior. + * + * @param behaviorType Behavior type. (NotNull) + * @return Behavior. (NotNull) + */ + public BEHAVIOR_TYPE getBehavior(Class behaviorType); + + /** + * Get behavior-readable. + * + * @param tableMultiName Table multi-name. (NotNull) + * @return Behavior-readable. (NotNull) + */ + public BehaviorReadable byNameAsBehaviorReadable(String tableMultiName); + + /** + * Get dao-readable by dao type. + * + * @param daoType Dao type. (NotNull) + * @return Dao-readable. (NotNull) + * @deprecated + */ + public DaoReadable getRDao(Class daoType); + + /** + * Get dao-readable by entity. + * + * @param entity Entity. (NotNull) + * @return Dao-readable. (NotNull) + * @deprecated + */ + public DaoReadable getRDao(Entity entity); + + /** + * Get dao-readable by table multi-name. + * + * @param tableMultiName Table multi-name. (NotNull) + * @return Dao-readable. (NotNull) + * @deprecated + */ + public DaoReadable getRDao(String tableMultiName); + + /** + * Get dao-writable by dao type. + * + * @param daoType Dao type. (NotNull) + * @return Dao-writable. (NotNull) + * @deprecated + */ + public DaoWritable getWDao(Class daoType); + + /** + * Get dao-writable by entity. + * + * @param entity Entity. (NotNull) + * @return Dao-writable. (NotNull) + * @deprecated + */ + public DaoWritable getWDao(Entity entity); + + /** + * Get dao-writable by table multi-name. + * + * @param tableMultiName Table multi-name. (NotNull) + * @return Dao-writable. (NotNull)] + * @deprecated + */ + public DaoWritable getWDao(String tableMultiName); + + /** + * Get bhv-readable by bhv type. + * + * @param bhvType Bhv type. (NotNull) + * @return Bhv-readable. (NotNull) + * @deprecated + */ + public BehaviorReadable getRBhv(Class bhvType); + + /** + * Get bhv-readable by entity. + * + * @param entity Entity. (NotNull) + * @return Bhv-readable. (NotNull) + * @deprecated + */ + public BehaviorReadable getRBhv(Entity entity); + + /** + * Get bhv-readable by table multi-name. + * + * @param tableMultiName Table multi-name. (NotNull) + * @return Bhv-readable. (NotNull) + * @deprecated + */ + public BehaviorReadable getRBhv(String tableMultiName); + + /** + * Get bhv-writable by bhv type. + * + * @param bhvType Bhv type. (NotNull) + * @return Bhv-writable. (NotNull) + * @deprecated + */ + public BehaviorWritable getWBhv(Class bhvType); + + /** + * Get bhv-writable by entity. + * + * @param entity Entity. (NotNull) + * @return Bhv-writable. (NotNull) + * @deprecated + */ + public BehaviorWritable getWBhv(Entity entity); + + /** + * Get bhv-writable by table multi-name. + * + * @param tableMultiName Table multi-name. (NotNull) + * @return Bhv-writable. (NotNull) + * @deprecated + */ + public BehaviorWritable getWBhv(String tableMultiName); +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/DaoWritable.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/DaoWritable.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/DaoWritable.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,67 @@ +package jp.sf.pal.pompei.allcommon; + +import jp.sf.pal.pompei.allcommon.Entity; + +/** + * The interface of dao-writable. + * + * @author DBFlute(AutoGenerator) + */ +public interface DaoWritable extends DaoReadable { + + /** + * Insert one entity that the type is entity-interface. + * + * @param entity Entity that the type is entity-interface. (NotNull) + * @return Inserted count. + */ + public int create(Entity entity); + + /** + * Update one entity that the type is entity-interface. + * + * @param entity Entity that the type is entity-interface. (NotNull) + * @return Updated count. + */ + public int modify(Entity entity); + + /** + * Update one entity that the type is entity-interface. (modified only) + * + * @param entity Entity that the type is entity-interface. (NotNull) + * @return Updated count. + */ + public int modifyModifiedOnly(Entity entity); + + /** + * Delete one entity that the type is entity-interface. + * + * @param entity Entity that the type is entity-interface. (NotNull) + * @return Deleted count. + */ + public int remove(Entity entity); + + /** + * Insert several entities that the type is entity-interface. + * + * @param entityList Entity-list that the type is entity-interface. (NotNull) + * @return Inserted count. + */ + public int createList(java.util.List entityList); + + /** + * Update several entities that the type is entity-interface. + * + * @param entityList Entity-list that the type is entity-interface. (NotNull) + * @return Updated count. + */ + public int modifyList(java.util.List entityList); + + /** + * Delete several entities that the type is entity-interface. + * + * @param entityList Entity-list that the type is entity-interface. (NotNull) + * @return Deleted count. + */ + public int removeList(java.util.List entityList); +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/Entity.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/Entity.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/Entity.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,224 @@ +package jp.sf.pal.pompei.allcommon; + +import jp.sf.pal.pompei.allcommon.dbmeta.DBMeta; +import jp.sf.pal.pompei.allcommon.helper.MapListString; +import jp.sf.pal.pompei.allcommon.helper.MapListStringImpl; + +/** + * The interface of entity. + * + * @author DBFlute(AutoGenerator) + */ +public interface Entity { + + // =================================================================================== + // Definition + // ========== + /** Map-string map-mark. */ + public static final String MAP_STRING_MAP_MARK = "map:"; + + /** Map-string list-mark. */ + public static final String MAP_STRING_LIST_MARK = "list:"; + + /** Map-string start-brace. */ + public static final String MAP_STRING_START_BRACE = "@{"; + + /** Map-string end-brace. */ + public static final String MAP_STRING_END_BRACE = "@}"; + + /** Map-string delimiter. */ + public static final String MAP_STRING_DELIMITER = "@;"; + + /** Map-string equal. */ + public static final String MAP_STRING_EQUAL = "@="; + + // =================================================================================== + // DBMeta + // ====== + /** + * Get dbmeta. + * + * @return DBMeta. (NotNull) + */ + public DBMeta getDBMeta(); + + // =================================================================================== + // Table Name + // ========== + /** + * Get table db-name. + * + * @return Table db-name. (NotNull) + */ + public String getTableDbName(); + + /** + * Get table cap-prop-name. + * + * @return Table cap-prop-name. (NotNull) + */ + public String getTableCapPropName(); + + /** + * Get table uncap-prop-name. + * + * @return Table uncap-prop-name. (NotNull) + */ + public String getTableUncapPropName(); + + // =================================================================================== + // Accept + // ====== + /** + * Accept primary-key map. + * + * @param primaryKeyMap Primary-key map. (NotNull and NotEmpty) + * @deprecated Please use DBMeta#acceptPrimaryKeyMap(entity, primaryKeyMap); + */ + public void acceptPrimaryKeyMap(java.util.Map primaryKeyMap); + + /** + * Accept primary-key map-string. + * + * @param primaryKeyMapString Primary-key map-string. (NotNull) + * @deprecated Please use DBMeta#acceptPrimaryKeyMapString(entity, primaryKeyMap); + */ + public void acceptPrimaryKeyMapString(String primaryKeyMapString); + + /** + * Accept column-value map. + * + * @param columnValueMap Column-value map. (NotNull and NotEmpty) + * @deprecated Please use DBMeta#acceptColumnValueMap(entity, columnValueMap); + */ + public void acceptColumnValueMap(java.util.Map columnValueMap); + + /** + * Accept column-value map-string. + * + * @param columnValueMapString Column-value map-string. (NotNull) + * @deprecated Please use DBMeta#acceptColumnValueMapString(entity, columnValueMapString); + */ + public void acceptColumnValueMapString(String columnValueMapString); + + // =================================================================================== + // Extract + // ======= + /** + * Extract primary-key map-string. Delimiter is at-mark and semicolon. + *

+ *

+     * ex) Uses that this method have.
+     *   final String primaryKeyMapString = entity.extractPrimaryKeyMapString();
+     *   final LdBook entity = dao.selectEntity(new LdBookCB().acceptPrimaryKeyMapString(primaryKeyMapString));
+     *   ... // as primary key for condition.
+     * 
+ * + * @return Primary-key map-string. (NotNull) + * @deprecated Please use DBMeta#extractPrimaryKeyMapString(entity); + */ + public String extractPrimaryKeyMapString(); + + /** + * Extract primary-key map-string. + * + * @param startBrace Start-brace. (NotNull) + * @param endBrace End-brace. (NotNull) + * @param delimiter Delimiter. (NotNull) + * @param equal Equal. (NotNull) + * @return Primary-key map-string. (NotNull) + * @deprecated Please use DBMeta#extractPrimaryKeyMapString(entity, startBrace, endBrace, delimiter, equal); + */ + public String extractPrimaryKeyMapString(String startBrace, String endBrace, String delimiter, String equal); + + /** + * Extract column-value map-string. Delimiter is at-mark and semicolon. + * + * @return Column-value map-string. (NotNull) + * @deprecated Please use DBMeta#extractColumnValueMapString(entity); + */ + public String extractColumnValueMapString(); + + /** + * Extract column-value map-string. + * + * @param startBrace Start-brace. (NotNull) + * @param endBrace End-brace. (NotNull) + * @param delimiter Delimiter. (NotNull) + * @param equal Equal. (NotNull) + * @return Column-value map-string. (NotNull) + * @deprecated Please use DBMeta#extractColumnValueMapString(entity, startBrace, endBrace, delimiter, equal); + */ + public String extractColumnValueMapString(String startBrace, String endBrace, String delimiter, String equal); + + // =================================================================================== + // Determination + // ============= + /** + * Has primary-key value? + * + * @return Determination. + */ + public boolean hasPrimaryKeyValue(); + + // =================================================================================== + // Modified Properties + // =================== + /** + * Get modified property names. (JavaBeansRule) + * + * @return Modified property names. (NotNull) + */ + public java.util.Set getModifiedPropertyNames(); + + /** + * Clear modified property names. + */ + public void clearModifiedPropertyNames(); + + /** + * Entity modified properties. + */ + public static class EntityModifiedProperties implements java.io.Serializable { + + /** Serial version UID. (Default) */ + private static final long serialVersionUID = 1L; + + /** Set of properties. */ + protected java.util.Set _propertiesSet = new java.util.LinkedHashSet(); + + /** + * Add property name. (JavaBeansRule) + * + * @param propertyName Property name. (Nullable) + */ + public void addPropertyName(String propertyName) { + _propertiesSet.add(propertyName); + } + + /** + * Get the set of properties. + * + * @return The set of properties. (NotNull) + */ + public java.util.Set getPropertyNames() { + return _propertiesSet; + } + + /** + * Clear the set of properties. + */ + public void clear() { + _propertiesSet.clear(); + } + + /** + * Remove property name from the set. (JavaBeansRule) + * + * @param propertyName Property name. (Nullable) + */ + public void remove(String propertyName) { + _propertiesSet.remove(propertyName); + } + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/EntityDefinedCommonColumn.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/EntityDefinedCommonColumn.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/EntityDefinedCommonColumn.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,17 @@ +package jp.sf.pal.pompei.allcommon; + +/** + * The interface of entity defined common column. + * + * @author DBFlute(AutoGenerator) + */ +public interface EntityDefinedCommonColumn extends Entity { + + /** + * Extract common-column-value map-string. + * + * @return Common-column-value map-string. (NotNull) + * @deprecated Please use DBMeta#extractCommonColumnValueMapString(entity); + */ + public String extractCommonColumnValueMapString(); +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/GenMetaData.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/GenMetaData.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/GenMetaData.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,409 @@ +package jp.sf.pal.pompei.allcommon; + + +/** + * The sigleton class that has generate-meta-data(GenMetaData). + * + * @author DBFlute(AutoGenerator) + */ +public class GenMetaData { + + /** Singleton instance. */ + private static final GenMetaData _instance = new GenMetaData(); + + /** + * Constructor. + */ + private GenMetaData() { + } + + /** + * Get instance. + * + * @return Singleton instance. + */ + public static GenMetaData getInstance() { + return _instance; + } + + // ========================================================================================= + // Generated method name + // ===================== + /** + * Get the method name of 'getCountAll'. + * + * @return The method name of 'getCountAll'. (NotNull) + */ + public String getMethodNameOfGetCountAll() { + return "getCountAll"; + } + + /** + * Get the method name of 'getListAll'. + * + * @return The method name of 'getListAll'. (NotNull) + */ + public String getMethodNameOfGetListAll() { + return "getListAll"; + } + + /** + * Get the method name of 'getEntity'. + * + * @return The method name of 'getEntity'. (NotNull) + */ + public String getMethodNameOfGetEntity() { + return "getEntity"; + } + + /** + * Get the method name of 'selectCountIgnoreFetchNarrowing'. + * + * @return The method name of 'selectCountIgnoreFetchNarrowing'. (NotNull) + */ + public String getMethodNameOfSelectCountIgnoreFetchScope() { + return "selectCountIgnoreFetchScope"; + } + + /** + * Get the method name of 'selectEntity'. + * + * @return The method name of 'selectEntity'. (NotNull) + */ + public String getMethodNameOfSelectEntity() { + return "selectEntity"; + } + + /** + * Get the method name of 'selectList'. + * + * @return The method name of 'selectList'. (NotNull) + */ + public String getMethodNameOfSelectList() { + return "selectList"; + } + + // ========================================================================================= + // Only when having generated, the effective one + // ============================================= + // ------------------------------------------------------------------------------- + // Basic + // ----- + /** + * Get the property-value of targetLanguage. + * + * @return The property-value. + */ + public String getTargetLanguage() { + return "java"; + } + + /** + * Get the property-value of templateFileExtension. + * + * @return The property-value. + */ + public String getTemplateFileExtension() { + return "vm"; + } + + /** + * Get the property-value of classFileExtension. + * + * @return The property-value. + */ + public String getClassFileExtension() { + return "java"; + } + + /** + * Get the property-value of templateFileEncoding. + * + * @return The property-value. + */ + public String getTemplateEncoding() { + return "UTF-8"; + } + + /** + * Get the property-value of classAuthor. + * + * @return The property-value. + */ + public String getClassAuthor() { + return "DBFlute(AutoGenerator)"; + } + + // ------------------------------------------------------------------------------- + // Available + // --------- + /** + * Is java name of table same as db name? Answer is false! + * + * @return The property-value. + */ + public boolean isJavaNameOfTableSameAsDbName() { + return false; + } + + /** + * Is java name of column same as db name? Answer is false! + * + * @return The property-value. + */ + public boolean isJavaNameOfColumnSameAsDbName() { + return false; + } + + /** + * Is available behavior generation? Answer is true! + * + * @return The property-value. + */ + public boolean isAvailableBehaviorGeneration() { + return true; + } + + /** + * Is available common-column-setup interceptor to behavior? Answer is false! + * + * @return The property-value. + */ + public boolean isAvailableCommonColumnSetupInterceptorToBehavior() { + return false; + } + + /** + * Is available common-column-setup interceptor to dao? Answer is false! + * + * @return The property-value. + */ + public boolean isAvailableCommonColumnSetupInterceptorToDao() { + return false; + } + + /** + * Is available generics? Answer is true! + * + * @return The property-value. + */ + public boolean isAvailableGenerics() { + return true; + } + + // ------------------------------------------------------------------------------- + // Prefix + // ------ + /** + * Get the property-value of projectPrefix. + * + * @return The property-value. + */ + public String getProjectPrefix() { + return ""; + } + + /** + * Get the property-value of basePrefix. + * + * @return The property-value. + */ + public String getBasePrefix() { + return "Bs"; + } + + // ------------------------------------------------------------------------------- + // DaoDicon + // -------- + /** + * Get the property-value of daoDiconNamespace. + * + * @return The property-value. + */ + public String getDaoDiconNamespace() { + return "dbflute"; + } + + /** + * Get the property-value of daoDiconPackageName. + * + * @return The property-value. + */ + public String getDaoDiconPackageName() { + return ""; + } + + /** + * Get the property-value of daoDiconFileName. + * + * @return The property-value. + */ + public String getDaoDiconFileName() { + return "dbflute.dicon"; + } + + /** + * Get the property-value of jdbcDiconResourceName. + * + * @return The property-value. + */ + public String getJdbcDiconResourceName() { + return "j2ee.dicon"; + } + + /** + * Get the property-value of requiredTxComponentName. + * + * @return The property-value. + */ + public String getRequiredTxComponentName() { + return "requiredTx"; + } + + // ------------------------------------------------------------------------------- + // Package + // ------- + /** + * Get the property-value of baseCommonPackage. + * + * @return The property-value. + */ + public String getBaseCommonPackage() { + return "jp.sf.pal.pompei.allcommon"; + } + + /** + * Get the property-value of baseBehaviorPackage. + * + * @return The property-value. + */ + public String getBaseBehaviorPackage() { + return "jp.sf.pal.pompei.bsbhv"; + } + + /** + * Get the property-value of baseDaoPackage. + * + * @return The property-value. + */ + public String getBaseDaoPackage() { + return "jp.sf.pal.pompei.bsdao"; + } + + /** + * Get the property-value of baseEntityPackage. + * + * @return The property-value. + */ + public String getBaseEntityPackage() { + return "jp.sf.pal.pompei.bsentity"; + } + + /** + * Get the property-value of conditionBeanPackage. + * + * @return The property-value. + */ + public String getConditionBeanPackage() { + return "jp.sf.pal.pompei.cbean"; + } + + /** + * Get the property-value of extendedDaoPackage. + * + * @return The property-value. + */ + public String getExtendedDaoPackage() { + return "jp.sf.pal.pompei.exdao"; + } + + /** + * Get the property-value of extendedBehaviorPackage. + * + * @return The property-value. + */ + public String getExtendedBehaviorPackage() { + return "jp.sf.pal.pompei.exbhv"; + } + + /** + * Get the property-value of extendedEntityPackage. + * + * @return The property-value. + */ + public String getExtendedEntityPackage() { + return "jp.sf.pal.pompei.exentity"; + } + + // ------------------------------------------------------------------------------- + // Optimistic Lock + // --------------- + /** + * Get the property-value of updateDateFieldName. + * + * @return The property-value. + */ + public String getUpdateDateFieldName() { + return ""; + } + + /** + * Get the property-value of versionNoFieldName. + * + * @return The property-value. + */ + public String getVersionNoFieldName() { + return ""; + } + + // ------------------------------------------------------------------------------- + // Select Param + // ------------ + /** + * Get the property-value of selectQueryTimeout. + * + * @return The property-value. + */ + public int getSelectQueryTimeout() { + return -1; + } + + // ------------------------------------------------------------------------------- + // Extract + // ------- + /** + * Get the value of 'extractAcceptStartBrace'. + * + * @return The property-value. (NotNull) + */ + public String getExtractAcceptStartBrace() { + return "@{"; + } + + /** + * Get the value of 'extractAcceptEndBrace'. + * + * @return The property-value. (NotNull) + */ + public String getExtractAcceptEndBrace() { + return "@}"; + } + + /** + * Get the value of 'extractAcceptDelimiter'. + * + * @return The property-value. (NotNull) + */ + public String getExtractAcceptDelimiter() { + return "@;"; + } + + /** + * Get the value of 'extractAcceptEqual'. + * + * @return The property-value. (NotNull) + */ + public String getExtractAcceptEqual() { + return "@="; + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/annotation/OutsideSql.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/annotation/OutsideSql.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/annotation/OutsideSql.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,13 @@ +package jp.sf.pal.pompei.allcommon.annotation; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Inherited; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + + △ Inherited + △ Retention(RetentionPolicy.RUNTIME) + △ Target(ElementType.METHOD) +public @interface OutsideSql { +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/bhv/AbstractBehaviorReadable.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/bhv/AbstractBehaviorReadable.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/bhv/AbstractBehaviorReadable.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,516 @@ + +package jp.sf.pal.pompei.allcommon.bhv; + +import jp.sf.pal.pompei.allcommon.DaoSelector; +import jp.sf.pal.pompei.allcommon.Entity; +import jp.sf.pal.pompei.allcommon.bhv.setup.ValueLabelSetupper; +import jp.sf.pal.pompei.allcommon.bhv.setup.ValueLabelBox; +import jp.sf.pal.pompei.allcommon.cbean.ConditionBean; +import jp.sf.pal.pompei.allcommon.cbean.ListResultBean; +import jp.sf.pal.pompei.allcommon.cbean.PagingBean; +import jp.sf.pal.pompei.allcommon.cbean.PagingResultBean; + +import jp.sf.pal.pompei.allcommon.bhv.batch.TokenFileOutputOption; +import jp.sf.pal.pompei.allcommon.bhv.batch.TokenFileOutputResult; + +import jp.sf.pal.pompei.allcommon.helper.token.file.FileMakingOption; +import jp.sf.pal.pompei.allcommon.helper.token.file.FileMakingHeaderInfo; +import jp.sf.pal.pompei.allcommon.helper.token.file.FileMakingSimpleFacade; +import jp.sf.pal.pompei.allcommon.helper.token.file.impl.FileMakingSimpleFacadeImpl; + +/** + * The abstract class of behavior-readable. + * + * @author DBFlute(AutoGenerator) + */ +public abstract class AbstractBehaviorReadable implements BehaviorReadable { + + // =================================================================================== + // Attribute + // ========= + /** Dao-selector instance. */ + protected DaoSelector _daoSelector; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + public AbstractBehaviorReadable() { + } + + // =================================================================================== + // Dao Accessor + // ============ + /** + * This method implements the method that is declared at super. + * + * @return Dao-selector. + */ + public DaoSelector getDaoSelector() { + return _daoSelector; + } + + /** + * This method implements the method that is declared at super. + * + * @param value Dao-selector. + */ + public void setDaoSelector(DaoSelector value) { + _daoSelector = value; + } + + // =================================================================================== + // Delegate Method + // =============== + /** + * This method implements the method that is declared at super. + * + * @return All count. + */ + public int callGetCountAll() { + final java.lang.reflect.Method mtd = getMethod(getDaoReadable().getClass(), "getCountAll", new Class[]{}); + final Object result = invoke(mtd, getDaoReadable(), new Object[]{}); + return ((Integer)result).intValue(); + } + + /** + * This method implements the method that is declared at super. + * + * @return All list. (NotNull) + */ + public java.util.List callGetListAll() { + final java.lang.reflect.Method mtd = getMethod(getDaoReadable().getClass(), "getListAll", new Class[]{}); + final Object result = invoke(mtd, getDaoReadable(), new Object[]{}); + return (java.util.List)result; + } + + /** + * This method implements the method that is declared at super. + * + * @param cb Condition-bean that the type is condition-bean-interface. (NotNull) + * @return Read count. (NotNull) + */ + public int callReadCount(ConditionBean cb) { + assertConditionBeanNotNull(cb); + final Class[] types = new Class[]{cb.getClass()}; + final java.lang.reflect.Method mtd = getMethod(getDaoReadable().getClass(), "selectCount", types); + final Object result = invoke(mtd, getDaoReadable(), new Object[]{cb}); + return ((Integer)result).intValue(); + } + + /** + * This method implements the method that is declared at super. + * + * @param cb Condition-bean that the type is condition-bean-interface. (NotNull) + * @return Read entity. If the select result is zero, it returns null. (Nullable) + */ + public Entity callReadEntity(ConditionBean cb) { + assertConditionBeanNotNull(cb); + final Class[] types = new Class[]{cb.getClass()}; + final java.lang.reflect.Method mtd = getMethod(getDaoReadable().getClass(), "selectEntity", types); + final Object result = invoke(mtd, getDaoReadable(), new Object[]{cb}); + return (Entity)result; + } + + /** + * This method implements the method that is declared at super. + * + * @param cb Condition-bean that the type is condition-bean-interface. (NotNull) + * @return Read list. If the select result is zero, it returns empty list. (NotNull) + */ + public java.util.List callReadList(ConditionBean cb) { + assertConditionBeanNotNull(cb); + final Class[] types = new Class[]{cb.getClass()}; + final java.lang.reflect.Method mtd = getMethod(getDaoReadable().getClass(), "selectList", types); + final Object result = invoke(mtd, getDaoReadable(), new Object[]{cb}); + return (java.util.List)result; + } + + private java.lang.reflect.Method getMethod(Class clazz, String methodName, Class[] argTypes) { + try { + return clazz.getMethod(methodName, argTypes); + } catch (NoSuchMethodException ex) { + String msg = "class=" + clazz + " method=" + methodName + "-" + java.util.Arrays.asList(argTypes); + throw new RuntimeException(msg, ex); + } + } + + private Object invoke(java.lang.reflect.Method method, Object target, Object[] args) { + try { + return method.invoke(target, args); + } catch (java.lang.reflect.InvocationTargetException ex) { + Throwable t = ex.getCause(); + if (t instanceof RuntimeException) { + throw (RuntimeException) t; + } + if (t instanceof Error) { + throw (Error) t; + } + String msg = "target=" + target + " method=" + method + "-" + java.util.Arrays.asList(args); + throw new RuntimeException(msg, ex); + } catch (IllegalAccessException ex) { + String msg = "target=" + target + " method=" + method + "-" + java.util.Arrays.asList(args); + throw new RuntimeException(msg, ex); + } + } + + // ===================================================================================== + // Basic Get All + // ============= + /** + * Get count all. + * + * @return Count all. + */ + public int getCountAll() { + return callGetCountAll(); + } + + // ===================================================================================== + // Basic Read Count + // ================ + /** + * This method implements the method that is declared at super. + * + * @param cb Condition-bean. This condition-bean should not be set up about fetch-scope. (NotNull) + * @return Read count. (NotNull) + */ + public int readCount(ConditionBean cb) { + assertConditionBeanNotNull(cb); + return callReadCount(cb); + } + + // ===================================================================================== + // Basic Read Entity + // ================= + /** + * This method implements the method that is declared at super. + * + * @param cb Condition-bean. (NotNull) + * @return Read entity. (Nullalble) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public Entity readEntity(ConditionBean cb) { + assertConditionBeanNotNull(cb); + final java.util.List ls = readList(cb); + if (ls.isEmpty()) { + return null; + } + assertRecordHasBeenSelectedAsOne(ls, cb); + return (Entity)ls.get(0); + } + + /** + * This method implements the method that is declared at super. + * + * @param cb Condition-bean. (NotNull) + * @return Read entity. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public Entity readEntityWithDeletedCheck(ConditionBean cb) { + assertConditionBeanNotNull(cb); + final java.util.List ls = readList(cb); + assertRecordHasNotBeenDeleted(ls, cb); + assertRecordHasBeenSelectedAsOne(ls, cb); + return (Entity)ls.get(0); + } + + // ===================================================================================== + // Basic Read List + // =============== + /** + * This method implements the method that is declared at super. + * + * @param cb Condition-bean. + * @return List-result-bean. If the select result is zero, it returns empty list. (NotNull) + */ + public ListResultBean readList(ConditionBean cb) { + assertConditionBeanNotNull(cb); + return new ResultBeanBuilder(this).buildListResultBean(cb, callReadList(cb)); + } + + /** + * This method implements the method that is declared at super. + * + * @param cb Condition-bean. (NotNull) + * @return Read page. (NotNull) + */ + public PagingResultBean readPage(final ConditionBean cb) { + assertConditionBeanNotNull(cb); + return readPage(cb, new SelectPageSimpleInvoker(this)); + } + + /** + * This method implements the method that is declared at super. + * + * @param cb Condition-bean. (NotNull) + * @param invoker Select-page-invoker (NotNull) + * @return Read page. (NotNull) + */ + public PagingResultBean readPage(final ConditionBean cb, SelectPageInvoker invoker) { + assertConditionBeanNotNull(cb); + final SelectPageCallback pageCallback = new SelectPageCallback() { + public PagingBean getPagingBean() { return cb; } + public int selectCountIgnoreFetchScope() { + return readCount(cb); + } + public java.util.List selectListWithFetchScope() { + return readList(cb); + } + }; + return invoker.invokeSelectPage(pageCallback); + } + + /** + * Assert that record has not been deleted. + * + * @param entity Selected entity. + * @param searchKey4log Search-key for Logging. + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + */ + protected void assertRecordHasNotBeenDeleted(jp.sf.pal.pompei.allcommon.Entity entity, Object searchKey4log) { + if (entity == null) { + String msg = "The record has already been deleted by other thread: searchKey=" + searchKey4log; + throw new jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException(msg); + } + } + + /** + * Assert that record has not been deleted. + * + * @param ls Selected list. + * @param searchKey4log Search-key for Logging. + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + */ + protected void assertRecordHasNotBeenDeleted(java.util.List ls, Object searchKey4log) { + if (ls == null || ls.isEmpty()) { + String msg = "The record has already been deleted by other thread: searchKey=" + searchKey4log; + throw new jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException(msg); + } + } + + /** + * Assert that record has been selected as one. + * + * @param ls Selected list. + * @param searchKey4log Search-key for Logging. + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + protected void assertRecordHasBeenSelectedAsOne(java.util.List ls, Object searchKey4log) { + if (ls == null || ls.isEmpty()) { + String msg = "The record has already been deleted by other thread: searchKey=" + searchKey4log; + throw new jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException(msg); + } + if (ls.size() != 1) { + String msg = "This selected contents should be only one: searchKey=" + searchKey4log; + msg = msg + " resultCount=" + ls.size(); + throw new jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException(msg); + } + } + + /** + * Assert that selected count has not exceeded max count. + * + * @param selectedCount Selected count. + * @param maxCount Max count. + * @param clauseObject Clause object for exception message. + * @exception jp.sf.pal.pompei.allcommon.exception.SelectedCountExceedMaxCountException + */ + protected void assertSelectedCountHasNotExceededMaxCount(int selectedCount, int maxCount, Object clauseObject) { + if (selectedCount > maxCount) { + String msg = "Selected count[" + selectedCount + "] has exceeded max count[" + maxCount + "]: clauseObject=" + clauseObject; + throw new jp.sf.pal.pompei.allcommon.exception.SelectedCountExceedMaxCountException(msg, selectedCount, maxCount); + } + } + + // =================================================================================== + // Various Select + // ============== + /** + * Select value-label list. + * + * @param cb Condition-bean. (NotNull) + * @param valueLabelSetupper Value-label-setupper. (NotNull) + * @return Value-label list. (NotNull) + */ + protected java.util.List> createValueLabelList(ListResultBean ls, ValueLabelSetupper valueLabelSetupper) { + final java.util.List> valueLabelList = new java.util.ArrayList>(); + final ValueLabelBox box = new ValueLabelBox(); + for (E entity : ls) { + final java.util.Map valueLabel = new java.util.HashMap(); + valueLabelSetupper.setup(box, entity); + valueLabel.put("value", box.getValue()); + valueLabel.put("label", box.getLabel()); + valueLabelList.add(valueLabel); + } + return valueLabelList; + } + + // =================================================================================== + // Token File + // ========== + /** + * Output token-file from this table records. + * + * @param cb Condition-bean. (NotNull) + * @param filename Name of the file. (NotNull and NotEmpty) + * @param tokenFileOutputOption token-file-output-option. (NotNull and Required{delimiter and encoding}) + * @return Token-file-output-result. (NotNull) + * @throws java.io.FileNotFoundException + * @throws java.io.IOException + */ + public TokenFileOutputResult outputTokenFile(ConditionBean cb, String filename, TokenFileOutputOption tokenFileOutputOption) throws java.io.FileNotFoundException, java.io.IOException { + assertConditionBeanNotNull(cb); + assertStringNotNullAndNotTrimmedEmpty("filename", filename); + assertObjectNotNull("tokenFileOutputOption", tokenFileOutputOption); + + final java.util.List ls = readList(cb); + java.util.List> rowList = new java.util.ArrayList>(); + for (java.util.Iterator ite = ls.iterator(); ite.hasNext(); ) { + final Entity entity = (Entity)ite.next(); + final java.util.List valueList = getDBMeta().convertToColumnStringValueList(entity); + rowList.add(valueList); + } + final FileMakingSimpleFacade fileMakingSimpleFacade = new FileMakingSimpleFacadeImpl(); + final FileMakingOption fileMakingOption = tokenFileOutputOption.getFileMakingOption(); + final FileMakingHeaderInfo fileMakingHeaderInfo = new FileMakingHeaderInfo(); + fileMakingHeaderInfo.setColumnNameList(getDBMeta().getColumnDbNameList()); + fileMakingOption.setFileMakingHeaderInfo(fileMakingHeaderInfo); + fileMakingSimpleFacade.makeFromRowList(filename, rowList, fileMakingOption); + final TokenFileOutputResult tokeFileOutputResult = new TokenFileOutputResult(); + tokeFileOutputResult.setSelectedList(ls); + return tokeFileOutputResult; + } + + // =================================================================================== + // Helper + // ====== + /** + * To lower case if the type is String. + * + * @param obj Object. (Nullable) + * @return Lower object. (Nullable) + */ + protected Object toLowerCaseIfString(Object obj) { + if (obj != null && obj instanceof String) { + return ((String)obj).toLowerCase(); + } + return obj; + } + + // ---------------------------------------------------------------- + // Assert Object + // ------------- + /** + * Assert that the object is not null. + * + * @param variableName Variable name. (NotNull) + * @param value Value. (NotNull) + * @exception IllegalArgumentException + */ + protected void assertObjectNotNull(String variableName, Object value) { + if (variableName == null) { + String msg = "The value should not be null: variableName=" + variableName + " value=" + value; + throw new IllegalArgumentException(msg); + } + if (value == null) { + String msg = "The value should not be null: variableName=" + variableName; + throw new IllegalArgumentException(msg); + } + } + + /** + * Assert that the entity is not null. + * + * @param entity Entity. (NotNull) + */ + protected void assertEntityNotNull(Entity entity) { + assertObjectNotNull("entity", entity); + } + + /** + * Assert that the condition-bean is not null. + * + * @param cb Condition-bean. (NotNull) + */ + protected void assertConditionBeanNotNull(jp.sf.pal.pompei.allcommon.cbean.ConditionBean cb) { + assertObjectNotNull("cb", cb); + } + + /** + * Assert that the entity has primary-key value. + * + * @param entity Entity. (NotNull) + */ + protected void assertEntityNotNullAndHasPrimaryKeyValue(Entity entity) { + assertEntityNotNull(entity); + if (!entity.hasPrimaryKeyValue()) { + String msg = "The entity must should primary-key: entity=" + entity; + throw new IllegalArgumentException(msg + entity); + } + } + + // ---------------------------------------------------------------- + // Assert String + // ------------- + /** + * Assert that the entity is not null and not trimmed empty. + * + * @param variableName Variable name. (NotNull) + * @param value Value. (NotNull) + */ + protected void assertStringNotNullAndNotTrimmedEmpty(String variableName, String value) { + assertObjectNotNull("variableName", variableName); + assertObjectNotNull(variableName, value); + if (value.trim().length() ==0) { + String msg = "The value should not be empty: variableName=" + variableName + " value=" + value; + throw new IllegalArgumentException(msg); + } + } + + // ---------------------------------------------------------------- + // Assert List + // ----------- + /** + * Assert that the list is empty. + * + * @param ls List. (NotNull) + */ + protected void assertListNotNullAndEmpty(java.util.List ls) { + assertObjectNotNull("ls", ls); + if (!ls.isEmpty()) { + String msg = "The list should be empty: ls=" + ls.toString(); + throw new IllegalArgumentException(msg); + } + } + + /** + * Assert that the list is not empty. + * + * @param ls List. (NotNull) + */ + protected void assertListNotNullAndNotEmpty(java.util.List ls) { + assertObjectNotNull("ls", ls); + if (ls.isEmpty()) { + String msg = "The list should not be empty: ls=" + ls.toString(); + throw new IllegalArgumentException(msg); + } + } + + /** + * Assert that the list having only one. + * + * @param ls List. (NotNull) + */ + protected void assertListNotNullAndHasOnlyOne(java.util.List ls) { + assertObjectNotNull("ls", ls); + if (ls.size() != 1) { + String msg = "The list should contain only one object: ls=" + ls.toString(); + throw new IllegalArgumentException(msg); + } + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/bhv/AbstractBehaviorWritable.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/bhv/AbstractBehaviorWritable.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/bhv/AbstractBehaviorWritable.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,570 @@ + +package jp.sf.pal.pompei.allcommon.bhv; + +import jp.sf.pal.pompei.allcommon.Entity; +import jp.sf.pal.pompei.allcommon.helper.MapStringBuilder; +import jp.sf.pal.pompei.allcommon.helper.MapStringBuilderImpl; + +import jp.sf.pal.pompei.allcommon.bhv.batch.TokenFileReflectionOption; +import jp.sf.pal.pompei.allcommon.bhv.batch.TokenFileReflectionResult; +import jp.sf.pal.pompei.allcommon.bhv.batch.TokenFileReflectionFailure; + +import jp.sf.pal.pompei.allcommon.helper.token.file.FileToken; +import jp.sf.pal.pompei.allcommon.helper.token.file.FileTokenizingCallback; +import jp.sf.pal.pompei.allcommon.helper.token.file.FileTokenizingRowResource; +import jp.sf.pal.pompei.allcommon.helper.token.file.FileTokenizingHeaderInfo; +import jp.sf.pal.pompei.allcommon.helper.token.file.FileTokenizingOption; +import jp.sf.pal.pompei.allcommon.helper.token.file.impl.FileTokenImpl; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +/** + * The abstract class of behavior-writable. + * + * @author DBFlute(AutoGenerator) + */ +public abstract class AbstractBehaviorWritable extends AbstractBehaviorReadable implements BehaviorWritable { + + /** Log-instance. */ + private static final Log _log = LogFactory.getLog(AbstractBehaviorWritable.class); + + // ===================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + public AbstractBehaviorWritable() { + } + + // ===================================================================================== + // Delegate Method + // =============== + /** + * This method implements the method that is declared at super. + * + * @param entity Entity that the type is entity-interface. (NotNull) + * @return Inserted count. + */ + public int callCreate(Entity entity) { + assertEntityNotNull(entity);// If this table use identity, the entity does not have primary-key. + filterEntityOfInsert(entity); + assertEntityOfInsert(entity); + return getDaoWritable().create(entity); + } + + /** + * This method implements the method that is declared at super. + * {modified only} + * + * @param entity Entity that the type is entity-interface. (NotNull) + * @return Updated count. + */ + public int callModify(Entity entity) { + assertEntityNotNullAndHasPrimaryKeyValue(entity); + filterEntityOfUpdate(entity); + assertEntityOfUpdate(entity); + return getDaoWritable().modifyModifiedOnly(entity); + } + + /** + * This method implements the method that is declared at super. + * + * @param entity Entity that the type is entity-interface. (NotNull) + * @return Deleted count. + */ + public int callRemove(Entity entity) { + assertEntityNotNullAndHasPrimaryKeyValue(entity); + filterEntityOfDelete(entity); + assertEntityOfDelete(entity); + return getDaoWritable().remove(entity); + } + + /** + * Filter the entity of insert. + * + * @param entity Entity that the type is entity-interface. (NotNull) + */ + protected void filterEntityOfInsert(Entity entity) { + } + + /** + * Assert the entity of insert. + * + * @param entity Entity that the type is entity-interface. (NotNull) + */ + protected void assertEntityOfInsert(Entity entity) { + } + + /** + * Filter the entity of update. + * + * @param entity Entity that the type is entity-interface. (NotNull) + */ + protected void filterEntityOfUpdate(Entity entity) { + } + + /** + * Assert the entity of update. + * + * @param entity Entity that the type is entity-interface. (NotNull) + */ + protected void assertEntityOfUpdate(Entity entity) { + } + + + /** + * Filter the entity of delete. + * + * @param entity Entity that the type is entity-interface. (NotNull) + */ + protected void filterEntityOfDelete(Entity entity) { + } + + /** + * Assert the entity of delete + * + * @param entity Entity that the type is entity-interface. (NotNull) + */ + protected void assertEntityOfDelete(Entity entity) { + } + + /** + * This method implements the method that is declared at super. + * + * @param entityList Entity-list that the type is entity-interface. (NotNull) + * @return Inserted count. + */ + public int callCreateList(java.util.List entityList) { + assertListNotNullAndNotEmpty(entityList); + for (final java.util.Iterator ite = entityList.iterator(); ite.hasNext(); ) { + final Entity entity = (Entity)ite.next(); + filterEntityOfInsert(entity); + assertEntityOfInsert(entity); + } + return getDaoWritable().createList(entityList); + } + + /** + * This method implements the method that is declared at super. + * + * @param entityList Entity-list that the type is entity-interface. (NotNull) + * @return Updated count. + */ + public int callModifyList(java.util.List entityList) { + assertListNotNullAndNotEmpty(entityList); + for (final java.util.Iterator ite = entityList.iterator(); ite.hasNext(); ) { + final Entity entity = (Entity)ite.next(); + filterEntityOfUpdate(entity); + assertEntityOfUpdate(entity); + } + return getDaoWritable().modifyList(entityList); + } + + /** + * This method implements the method that is declared at super. + * + * @param entityList Entity-list that the type is entity-interface. (NotNull) + * @return Deleted count. + */ + public int callRemoveList(java.util.List entityList) { + assertListNotNullAndNotEmpty(entityList); + for (final java.util.Iterator ite = entityList.iterator(); ite.hasNext(); ) { + final Entity entity = (Entity)ite.next(); + filterEntityOfDelete(entity); + assertEntityOfDelete(entity); + } + return getDaoWritable().removeList(entityList); + } + + // ===================================================================================== + // Basic Entity Update + // =================== + /** + * Create. + * + * @param entity Entity. (NotNull) + */ + public void create(Entity entity) { + doCreate(entity); + } + + abstract protected void doCreate(Entity entity); + + /** + * Modify. + * + * @param entity Entity. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public void modify(Entity entity) { + doModify(entity); + } + + abstract protected void doModify(Entity entity); + + /** + * This method implements the method that is declared at super. + * + * @param entity Entity having primary-key value. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + */ + public void modifyAfterSelect(Entity entity) { + doModifyAfterSelect(entity); + } + + abstract protected void doModifyAfterSelect(Entity entity); + + /** + * Create or modify after select. + * {modify: modified only} + * + * @param entity Entity. This must contain primary-key value at least(Except use identity). (NotNull) + */ + public void createOrModifyAfterSelect(jp.sf.pal.pompei.allcommon.Entity entity) { + assertEntityNotNull(entity); + doCreateOrModifyAfterSelect(entity); + } + + abstract protected void doCreateOrModifyAfterSelect(Entity entity); + + /** + * Merge entity. + * Copy the column data of sourceEntity that the setter has been invoked to destinationEntity. + * + * @param sourceEntity Source entity. (NotNull) + * @param destinationEntity Destination entity. (NotNull) + */ + abstract protected void mergeEntity(Entity sourceEntity, Entity destinationEntity); + + /** + * Remove. + * + * @param entity Entity. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public void remove(jp.sf.pal.pompei.allcommon.Entity entity) { + assertEntityNotNull(entity); + callRemove(entity); + } + + abstract protected void doRemove(Entity entity); + + /** + * Remove after select. + * + * @param entity Entity. This must contain primary-key value at least. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + */ + public void removeAfterSelect(Entity entity) { + assertEntityNotNullAndHasPrimaryKeyValue(entity); + doRemoveAfterSelect(entity); + } + + abstract protected void doRemoveAfterSelect(Entity entity); + + // ===================================================================================== + // Basic Batch Update + // ================== + /** + * Create list. + * + * @param entityList Entity-list. (NotNull and NotEmpty) + * @return Created count. + */ + public int createList(java.util.List entityList) { + assertListNotNullAndNotEmpty(entityList); + return callCreateList(entityList); + } + + /** + * Modify list. + * + * @param entityList Entity-list. (NotNull and NotEmpty) + * @return Modified count. + */ + public int modifyList(java.util.List entityList) { + assertListNotNullAndNotEmpty(entityList); + return callModifyList(entityList); + } + + /** + * Remove list. + * + * @param entityList Entity-list. (NotNull and NotEmpty) + * @return Removed count. + */ + public int removeList(java.util.List entityList) { + assertListNotNullAndNotEmpty(entityList); + return callRemoveList(entityList); + } + + // ===================================================================================== + // Token File + // ========== + /** + * Reflect(insert or update) token-file to this table. + * + * @param filename Name of the file. (NotNull and NotEmpty) + * @param tokenFileReflectionOption token-file-reflection-option. (NotNull and Required{delimiter and encoding}) + * @return Token-file-reflection-result. (NotNull) + * @throws java.io.FileNotFoundException + * @throws java.io.IOException + */ + public TokenFileReflectionResult reflectTokenFile(String filename, TokenFileReflectionOption tokenFileReflectionOption) throws java.io.FileNotFoundException, java.io.IOException { + assertStringNotNullAndNotTrimmedEmpty("filename", filename); + assertFileTokenReflectionOption(tokenFileReflectionOption); + + final TokenFileReflectionResult result = buildTokenFileReflectionResult(); + final FileTokenizingCallback fileTokenizingCallback = buildFileTokenReflectionFileTokenizingCallback(tokenFileReflectionOption, result); + final FileTokenizingOption fileTokenizingOption = buildFileTokenReflectionFileTokenizingOption(tokenFileReflectionOption); + final FileToken fileToken = new FileTokenImpl(); + fileToken.tokenize(filename, fileTokenizingCallback, fileTokenizingOption); + return result; + } + + /** + * Reflect(insert or update) token-file to this table. + * + * @param inputStream Input stream. (NotNull and NotClosed) + * @param tokenFileReflectionOption token-file-reflection-option. (NotNull and Required{delimiter and encoding}) + * @return Token-file-reflection-result. (NotNull) + * @throws java.io.FileNotFoundException + * @throws java.io.IOException + */ + public TokenFileReflectionResult reflectTokenFile(java.io.InputStream inputStream, TokenFileReflectionOption tokenFileReflectionOption) throws java.io.FileNotFoundException, java.io.IOException { + assertObjectNotNull("inputStream", inputStream); + assertFileTokenReflectionOption(tokenFileReflectionOption); + + final TokenFileReflectionResult result = buildTokenFileReflectionResult(); + final FileTokenizingCallback fileTokenizingCallback = buildFileTokenReflectionFileTokenizingCallback(tokenFileReflectionOption, result); + final FileTokenizingOption fileTokenizingOption = buildFileTokenReflectionFileTokenizingOption(tokenFileReflectionOption); + final FileToken fileToken = new FileTokenImpl(); + fileToken.tokenize(inputStream, fileTokenizingCallback, fileTokenizingOption); + return result; + } + + protected void assertFileTokenReflectionOption(TokenFileReflectionOption tokenFileReflectionOption) { + assertObjectNotNull("tokenFileReflectionOption", tokenFileReflectionOption); + + final String encoding = tokenFileReflectionOption.getEncoding(); + final String delimiter = tokenFileReflectionOption.getDelimiter(); + assertStringNotNullAndNotTrimmedEmpty("encoding", encoding); + assertObjectNotNull("delimiter", delimiter); + } + + protected TokenFileReflectionResult buildTokenFileReflectionResult() { + final TokenFileReflectionResult result = new TokenFileReflectionResult(); + final java.util.List failureList = new java.util.ArrayList(); + result.setFailureList(failureList); + return result; + } + + protected FileTokenizingCallback buildFileTokenReflectionFileTokenizingCallback(TokenFileReflectionOption tokenFileReflectionOption, final TokenFileReflectionResult result) throws java.io.FileNotFoundException, java.io.IOException { + assertObjectNotNull("tokenFileReflectionOption", tokenFileReflectionOption); + + final String encoding = tokenFileReflectionOption.getEncoding(); + final String delimiter = tokenFileReflectionOption.getDelimiter(); + final boolean interruptIfError = tokenFileReflectionOption.isInterruptIfError(); + assertStringNotNullAndNotTrimmedEmpty("encoding", encoding); + assertObjectNotNull("delimiter", delimiter); + final java.util.List failureList = result.getFailureList(); + assertObjectNotNull("failureList", failureList); + + final FileTokenizingCallback fileTokenizingCallback = new FileTokenizingCallback() { + public void handleRowResource(FileTokenizingRowResource fileTokenizingRowResource) { + final FileTokenizingHeaderInfo fileTokenizingHeaderInfo = fileTokenizingRowResource.getFileTokenizingHeaderInfo(); + final java.util.List columnNameList = fileTokenizingHeaderInfo.getColumnNameList(); + final java.util.List valueList = fileTokenizingRowResource.getValueList(); + + // Set up columnNameList of result object. + if (result.getColumnNameList() == null) { + result.setColumnNameList(columnNameList); + } + + Entity entity = null; + try { + // Create entity by the list of value composed of String. + entity = createEntityByStringValueList(columnNameList, valueList); + + // Create or modify as non-strict. + doCreateOrUpdateNonstrict(entity); + + // Increment successCount of result object. + result.incrementSuccessCount(); + } catch (RuntimeException e) { + if (interruptIfError) { + throw e; + } + final TokenFileReflectionFailure failure = new TokenFileReflectionFailure(); + failure.setColumnNameList(columnNameList); + failure.setValueList(valueList); + failure.setRowString(fileTokenizingRowResource.getRowString()); + failure.setRowNumber(fileTokenizingRowResource.getRowNumber()); + failure.setLineNumber(fileTokenizingRowResource.getLineNumber()); + if (entity != null) { + failure.setEntity(entity); + } + failure.setException(e); + failureList.add(failure); + } + } + }; + return fileTokenizingCallback; + } + + protected Entity createEntityByStringValueList(java.util.List columnNameList, java.util.List valueList) { + final MapStringBuilder builder = new MapStringBuilderImpl(); + builder.setMsMapMark(MAP_STRING_MAP_MARK); + builder.setMsStartBrace(MAP_STRING_START_BRACE); + builder.setMsEndBrace(MAP_STRING_END_BRACE); + builder.setMsDelimiter(MAP_STRING_DELIMITER); + builder.setMsEqual(MAP_STRING_EQUAL); + builder.setColumnNameList(columnNameList); + final String mapString = builder.buildFromList(valueList); + + final Entity entity = getDBMeta().newEntity(); + getDBMeta().acceptColumnValueMapString(entity, mapString); + return entity; + } + + protected FileTokenizingOption buildFileTokenReflectionFileTokenizingOption(TokenFileReflectionOption tokenFileReflectionOption) throws java.io.FileNotFoundException, java.io.IOException { + assertObjectNotNull("tokenFileReflectionOption", tokenFileReflectionOption); + + final String encoding = tokenFileReflectionOption.getEncoding(); + final String delimiter = tokenFileReflectionOption.getDelimiter(); + assertStringNotNullAndNotTrimmedEmpty("encoding", encoding); + assertObjectNotNull("delimiter", delimiter); + + final FileTokenizingOption fileTokenizingOption = new FileTokenizingOption(); + fileTokenizingOption.setEncoding(encoding); + fileTokenizingOption.setDelimiter(delimiter); + if (tokenFileReflectionOption.isHandleEmptyAsNull()) { + fileTokenizingOption.handleEmptyAsNull(); + } + return fileTokenizingOption; + } + + abstract protected void doCreateOrUpdateNonstrict(Entity entity); + + /** + * Reflect(insert or update) from separated-file. + * + * @param filename Name of the file. (NotNull and NotEmpty) + * @param encoding Encoding of the file. (NotNull and NotEmpty) + * @param delimiter Delimiter of the file. (NotNull and NotEmpty) + * @param batchCount Batch-count for transaction. If this value is 0, all records are done in one transaction. + * @param isErrorContinue If true, this method continue in spite of throwing the exception. + * @return The list of OneEntityExceptionResult. (NotNull) + * @throws java.io.FileNotFoundException + * @throws java.io.IOException + * @deprecated Please use reflectTokenFile() + */ + public java.util.List reflectFromSeparatedFile( + String filename, String encoding, + String delimiter, int batchCount, boolean isErrorContinue + ) throws java.io.FileNotFoundException, java.io.IOException { + assertStringNotNullAndNotTrimmedEmpty("filename", filename); + assertStringNotNullAndNotTrimmedEmpty("encoding", encoding); + assertObjectNotNull("delimiter", delimiter); + final java.util.List exceptionList = new java.util.ArrayList(); + + java.io.FileInputStream fis = null; + java.io.InputStreamReader ir = null; + java.io.BufferedReader br = null; + try { + fis = new java.io.FileInputStream(filename); + ir = new java.io.InputStreamReader(fis, encoding); + br = new java.io.BufferedReader(ir); + + final MapStringBuilder builder = new MapStringBuilderImpl(); + builder.setMsMapMark(MAP_STRING_MAP_MARK); + builder.setMsStartBrace(MAP_STRING_START_BRACE); + builder.setMsEndBrace(MAP_STRING_END_BRACE); + builder.setMsDelimiter(MAP_STRING_DELIMITER); + builder.setMsEqual(MAP_STRING_EQUAL); + final java.util.List entityList = new java.util.ArrayList(); + int count = 0; + while (true) { + ++count; + + final String lineString = br.readLine(); + if (lineString == null) { + if (entityList.size() > 0) { + final java.util.List tmpList = reflectAfterSelectNewTx(entityList, isErrorContinue); + exceptionList.addAll(tmpList); + entityList.clear(); + } + break; + } + if (count == 1) { + builder.setColumnNames(lineString.split(delimiter)); + continue; + } + + final String mapString = builder.buildByDelimiter(lineString, delimiter); + final Entity entity = getDBMeta().newEntity(); + entity.acceptColumnValueMapString(mapString); + entityList.add(entity); + + if (entityList.size() == batchCount) { + final java.util.List tmpList = reflectAfterSelectNewTx(entityList, isErrorContinue); + exceptionList.addAll(tmpList); + entityList.clear(); + } + } + } catch (java.io.FileNotFoundException e) { + throw e; + } catch (java.io.IOException e) { + throw e; + } finally { + try { + if (fis != null) { + fis.close(); + } + if (ir != null) { + ir.close(); + } + if (br != null) { + br.close(); + } + } catch (java.io.IOException ignored) { + _log.warn("File-close threw the exception: ", ignored); + } + } + return exceptionList; + } + + /** + * Reflect(insert or update) from separated-file. + * + * @param entityList The list of entity that is reflection target. (NotNull) + * @param isErrorContinue If true, this method continue in spite of throwing the exception. + * @return The list of InsertOrUpdateExceptionResult. (NotNull) + * @deprecated Please use reflectTokenFile() + */ + public java.util.List reflectAfterSelectNewTx(java.util.List entityList, + boolean isErrorContinue) { + final java.util.List exceptionList = new java.util.ArrayList(); + for (final java.util.Iterator ite = entityList.iterator(); ite.hasNext(); ) { + final Entity entity = (Entity)ite.next(); + try { + createOrModifyAfterSelect(entity); + } catch (RuntimeException e) { + if (isErrorContinue) { + final OneEntityExceptionResult result = new OneEntityExceptionResult(); + result.setPrimaryKeyMapString(entity.extractPrimaryKeyMapString()); + result.setEntity(entity); + result.setException(e); + exceptionList.add(result); + continue; + } + throw e; + } + } + return exceptionList; + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/bhv/BehaviorReadable.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/bhv/BehaviorReadable.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/bhv/BehaviorReadable.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,374 @@ +package jp.sf.pal.pompei.allcommon.bhv; + +import jp.sf.pal.pompei.allcommon.DaoSelector; +import jp.sf.pal.pompei.allcommon.DaoReadable; +import jp.sf.pal.pompei.allcommon.Entity; +import jp.sf.pal.pompei.allcommon.cbean.ConditionBean; +import jp.sf.pal.pompei.allcommon.cbean.ListResultBean; +import jp.sf.pal.pompei.allcommon.cbean.OrderByBean; +import jp.sf.pal.pompei.allcommon.cbean.PagingBean; +import jp.sf.pal.pompei.allcommon.cbean.PagingResultBean; +import jp.sf.pal.pompei.allcommon.dbmeta.DBMeta; + +import jp.sf.pal.pompei.allcommon.bhv.batch.TokenFileOutputOption; +import jp.sf.pal.pompei.allcommon.bhv.batch.TokenFileOutputResult; + +/** + * The interface of behavior-readable. + * + * @author DBFlute(AutoGenerator) + */ +public interface BehaviorReadable { + + // ===================================================================================== + // Definition + // ========== + /** Map-string map-mark. */ + public static final String MAP_STRING_MAP_MARK = "map:"; + + /** Map-string list-mark. */ + public static final String MAP_STRING_LIST_MARK = "list:"; + + /** Map-string start-brace. */ + public static final String MAP_STRING_START_BRACE = "@{"; + + /** Map-string end-brace. */ + public static final String MAP_STRING_END_BRACE = "@}"; + + /** Map-string delimiter. */ + public static final String MAP_STRING_DELIMITER = "@;"; + + /** Map-string equal. */ + public static final String MAP_STRING_EQUAL = "@="; + + // ===================================================================================== + // Table name + // ========== + /** + * Get table db-name. + * + * @return Table db-name. (NotNull) + */ + public String getTableDbName(); + + // ===================================================================================== + // DBMeta + // ====== + /** + * Get dbmeta. + * + * @return DBMeta. (NotNull) + */ + public DBMeta getDBMeta(); + + // ===================================================================================== + // Dao Accessor + // ============ + /** + * Get dao-readable. + * + * @return Dao-readable. (NotNull) + */ + public DaoReadable getDaoReadable(); + + /** + * Get dao-selector. + * + * @return Dao-selector. + */ + public DaoSelector getDaoSelector(); + + /** + * Set dao-selector. + * + * @param value Dao-selector. + */ + public void setDaoSelector(DaoSelector value); + + // ===================================================================================== + // New Instance + // ============ + /** + * New entity. + * + * @return Entity. (NotNull) + */ + public Entity newEntity(); + + /** + * New condition-bean. + * + * @return Condition-bean. (NotNull) + */ + public ConditionBean newConditionBean(); + + // ===================================================================================== + // Delegate Method + // =============== + /** + * Read count as all. (Delegate-Method) + * + * @return All count. (NotNull) + */ + public int callGetCountAll(); + + /** + * Read list as all. (Delegate-Method) + * + * @return All list. (NotNull) + */ + public java.util.List callGetListAll(); + + /** + * Read count by condition-bean. (Delegate-Method) + * If the condition-bean is invoked fetchFirst() and fetchScope() and fetchPage(), throw exception. + * + * @param cb Condition-bean. (NotNull) + * @return Read count. (NotNull) + */ + public int callReadCount(ConditionBean cb); + + /** + * Read entity by condition-bean. (Delegate-Method) + * + * @param cb Condition-bean. (NotNull) + * @return Read entity. If the select result is zero, it returns null. (Nullable) + */ + public Entity callReadEntity(ConditionBean cb); + + /** + * Read list by condition-bean. (Delegate-Method) + * + * @param cb Condition-bean. (NotNull) + * @return Read list. If the select result is zero, it returns empty list. (NotNull) + */ + public java.util.List callReadList(ConditionBean cb); + + // ===================================================================================== + // Basic Get All + // ============= + /** + * Get count all. + * + * @return Count all. + */ + public int getCountAll(); + + // ===================================================================================== + // Basic Read Count + // ================ + /** + * Read count by condition-bean. + *
+     * If the argument 'condition-bean' is effective about fetch-scope,
+     * this method invoke select count ignoring the fetch-scope.
+     * 
+ * @param cb Condition-bean. This condition-bean should not be set up about fetch-scope. (NotNull) + * @return Read count. (NotNull) + */ + public int readCount(ConditionBean cb); + + // ===================================================================================== + // Basic Read Entity + // ================= + /** + * Read entity by condition-bean. + * + * @param cb Condition-bean. (NotNull) + * @return Read entity. (Nullalble) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public Entity readEntity(ConditionBean cb); + + /** + * Read simple entity by condition-bean with deleted check. + * + * @param cb Condition-bean. (NotNull) + * @return Read entity. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + */ + public Entity readEntityWithDeletedCheck(ConditionBean cb); + + // ===================================================================================== + // Basic Read List + // =============== + /** + * Read list as result-bean. + * + * @param cb Condition-bean. (NotNull) + * @return List-result-bean. If the select result is zero, it returns empty list. (NotNull) + */ + public ListResultBean readList(ConditionBean cb); + + /** + * Read page as result-bean. + * + * @param cb Condition-bean. (NotNull) + * @return Read page. (NotNull) + */ + public PagingResultBean readPage(final ConditionBean cb); + + /** + * Read page as result-bean. + * + * @param cb Condition-bean. (NotNull) + * @param invoker Select-page-invoker (NotNull) + * @return Read page. (NotNull) + */ + public PagingResultBean readPage(final ConditionBean cb, SelectPageInvoker invoker); + + // ===================================================================================== + // Token File + // ========== + /** + * Output token-file from this table records. + * + * @param cb Condition-bean. (NotNull) + * @param filename Name of the file. (NotNull and NotEmpty) + * @param tokenFileOutputOption token-file-output-option. (NotNull and Required{delimiter and encoding}) + * @return Token-file-output-result. (NotNull) + * @throws java.io.FileNotFoundException + * @throws java.io.IOException + */ + public TokenFileOutputResult outputTokenFile(ConditionBean cb, String filename, TokenFileOutputOption tokenFileOutputOption) throws java.io.FileNotFoundException, java.io.IOException; + + /** + * The interface of select-page callback. + * + * @param The generic template for 'selectedList'. + */ + public static interface SelectPageCallback { + public PagingBean getPagingBean(); + public int selectCountIgnoreFetchScope(); + public java.util.List selectListWithFetchScope(); + } + + /** + * The object of result-bean builder. + * + * @param The generic template for 'resultBean'. + */ + public static class ResultBeanBuilder { + protected BehaviorReadable _bhv; + public ResultBeanBuilder(BehaviorReadable bhv) { + _bhv = bhv; + } + /** + * Build list-reuslt-bean. + * + * @param ob Order-by-bean. (NotNull) + * @param selectedList Selected list. (NotNull) + * @return List-result-bean. (NotNull) + */ + public ListResultBean buildListResultBean(OrderByBean ob, java.util.List selectedList) { + ListResultBean rb = new ListResultBean(); + rb.setTableDbName(_bhv.getTableDbName()); + rb.setAllRecordCount(selectedList.size()); + rb.setSelectedList(selectedList); + rb.setOrderByClause(ob.getSqlComponentOfOrderByClause()); + return rb; + } + /** + * Build paging-reuslt-bean. + * + * @param pb Paging-bean. (NotNull) + * @param allRecordCount All-record-count. + * @param selectedList Selected list. (NotNull) + * @return Paging-result-bean. (NotNull) + */ + public PagingResultBean buildPagingResultBean(PagingBean pb, int allRecordCount, java.util.List selectedList) { + PagingResultBean rb = new PagingResultBean(); + rb.setTableDbName(_bhv.getTableDbName()); + rb.setAllRecordCount(allRecordCount); + rb.setSelectedList(selectedList); + rb.setPageSize(pb.getFetchSize()); + rb.setCurrentPageNumber(pb.getFetchPageNumber()); + rb.setOrderByClause(pb.getSqlComponentOfOrderByClause()); + return rb; + } + } + + public static interface SelectPageInvoker { + /** + * Invoke select-page by callback. + * + * @param callback Callback. (NotNull) + * @return Paging-result-bean. (NotNull) + */ + public PagingResultBean invokeSelectPage(SelectPageCallback callback); + } + + /** + * The object of result-bean builder. + * + * @param The generic template for 'resultBean'. + */ + public static class SelectPageSimpleInvoker implements SelectPageInvoker { + protected BehaviorReadable _bhv; + public SelectPageSimpleInvoker(BehaviorReadable bhv) { + _bhv = bhv; + } + + /** + * Invoke select-page by callback. + * + * @param callback Callback. (NotNull) + * @return Paging-result-bean. (NotNull) + */ + public PagingResultBean invokeSelectPage(SelectPageCallback callback) { + assertObjectNotNull("callback", callback); + assertObjectNotNull("callback.getPagingBean()", callback.getPagingBean()); + if (!callback.getPagingBean().isFetchScopeEffective()) { + String msg = "The paging bean is not effective about fetch-scope!"; + msg = msg + " When you select page, you should set up fetch-scope of paging bean(Should invoke fetchFirst() and fetchPage()!)."; + msg = msg + " The paging bean is: " + callback.getPagingBean(); + throw new IllegalStateException(msg); + } + final int allRecordCount = callback.selectCountIgnoreFetchScope(); + final java.util.List selectedList = callback.selectListWithFetchScope(); + final PagingResultBean rb = new ResultBeanBuilder(_bhv).buildPagingResultBean(callback.getPagingBean(), allRecordCount, selectedList); + if (isNecessaryToReadPageAgain(rb)) { + callback.getPagingBean().fetchPage(rb.getAllPageCount()); + final int reAllRecordCount = callback.selectCountIgnoreFetchScope(); + final java.util.List reSelectedList = callback.selectListWithFetchScope(); + return new ResultBeanBuilder(_bhv).buildPagingResultBean(callback.getPagingBean(), reAllRecordCount, reSelectedList); + } else { + return rb; + } + } + + /** + * Is it necessary to read page again? + * + * @param rb Paging-result-bean. (NotNull) + * @return Determination. + */ + protected boolean isNecessaryToReadPageAgain(PagingResultBean rb) { + return rb.getAllRecordCount() > 0 && rb.getSelectedList().isEmpty(); + } + + /** + * Assert that the object is not null. + * + * @param variableName Variable name. (NotNull) + * @param value Value. (NotNull) + * @exception IllegalArgumentException + */ + protected void assertObjectNotNull(String variableName, Object value) { + if (variableName == null) { + String msg = "The value should not be null: variableName=" + variableName + " value=" + value; + throw new IllegalArgumentException(msg); + } + if (value == null) { + String msg = "The value should not be null: variableName=" + variableName; + throw new IllegalArgumentException(msg); + } + } + } + + /** + * The marker interface of simple condition-bean setupper. + */ + public static interface SimpleCBSetupper { + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/bhv/BehaviorWritable.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/bhv/BehaviorWritable.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/bhv/BehaviorWritable.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,208 @@ +package jp.sf.pal.pompei.allcommon.bhv; + +import jp.sf.pal.pompei.allcommon.DaoWritable; +import jp.sf.pal.pompei.allcommon.Entity; +import jp.sf.pal.pompei.allcommon.bhv.batch.TokenFileReflectionOption; +import jp.sf.pal.pompei.allcommon.bhv.batch.TokenFileReflectionResult; + +/** + * The interface of behavior-writable. + * + * @author DBFlute(AutoGenerator) + */ +public interface BehaviorWritable extends BehaviorReadable { + + /** + * Get dao-writable. + * + * @return Dao-writable. (NotNull) + */ + public DaoWritable getDaoWritable(); + + /** + * Create entity. (Delegate-Method) + * + * @param entity Entity that the type is entity-interface. (NotNull) + * @return Inserted count. + */ + public int callCreate(Entity entity); + + /** + * Modify entity. (Delegate-Method) + * {modified only} + * + * @param entity Entity that the type is entity-interface. (NotNull) + * @return Updated count. + */ + public int callModify(Entity entity); + + /** + * Remove entity. (Delegate-Method) + * + * @param entity Entity that the type is entity-interface. (NotNull) + * @return Deleted count. + */ + public int callRemove(Entity entity); + + /** + * Create several entity-list. (Delegate-Method) + * + * @param entityList Entity-list that the type is entity-interface. (NotNull) + * @return Inserted count. + */ + public int callCreateList(java.util.List entityList); + + /** + * Modify several entity-list. (Delegate-Method) + * + * @param entityList Entity-list that the type is entity-interface. (NotNull) + * @return Updated count. + */ + public int callModifyList(java.util.List entityList); + + /** + * Remove several entity-list. (Delegate-Method) + * + * @param entityList Entity-list that the type is entity-interface. (NotNull) + * @return Deleted count. + */ + public int callRemoveList(java.util.List entityList); + + // ===================================================================================== + // Basic Entity Update + // =================== + /** + * Create. + * + * @param entity Entity. (NotNull) + */ + public void create(jp.sf.pal.pompei.allcommon.Entity entity); + + /** + * Modify. + * + * @param entity Entity. (NotNull) + */ + public void modify(jp.sf.pal.pompei.allcommon.Entity entity); + + /** + * Modify after select. + * + * @param entity Entity. + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + */ + public void modifyAfterSelect(jp.sf.pal.pompei.allcommon.Entity entity); + + /** + * Create or modify after select. + * + * @param entity Entity. This must contain primary-key value at least(Except use identity). (NotNull) + */ + public void createOrModifyAfterSelect(jp.sf.pal.pompei.allcommon.Entity entity); + + /** + * Remove. + * + * @param entity Entity. (NotNull) + */ + public void remove(jp.sf.pal.pompei.allcommon.Entity entity); + + // ===================================================================================== + // Basic Batch Update + // ================== + /** + * Create list. + * + * @param entityList Entity-list. (NotNull and NotEmpty) + * @return Created count. + */ + public int createList(java.util.List entityList); + + /** + * Modify list. + * + * @param entityList Entity-list. (NotNull and NotEmpty) + * @return Modified count. + */ + public int modifyList(java.util.List entityList); + + /** + * Remove list. + * + * @param entityList Entity-list. (NotNull and NotEmpty) + * @return Removed count. + */ + public int removeList(java.util.List entityList); + + // ===================================================================================== + // Token File + // ========== + /** + * Reflect(insert or update) token-file to this table. + * + * @param filename Name of the file. (NotNull and NotEmpty) + * @param tokenFileReflectionOption token-file-reflection-option. (NotNull and Required{delimiter and encoding}) + * @return Token-file-reflection-result. (NotNull) + * @throws java.io.FileNotFoundException + * @throws java.io.IOException + */ + public TokenFileReflectionResult reflectTokenFile(String filename, TokenFileReflectionOption tokenFileReflectionOption) throws java.io.FileNotFoundException, java.io.IOException; + + /** + * Reflect(insert or update) token-file to this table. + * + * @param inputStream Input stream. (NotNull and NotClosed) + * @param tokenFileReflectionOption token-file-reflection-option. (NotNull and Required{delimiter and encoding}) + * @return Token-file-reflection-result. (NotNull) + * @throws java.io.FileNotFoundException + * @throws java.io.IOException + */ + public TokenFileReflectionResult reflectTokenFile(java.io.InputStream inputStream, TokenFileReflectionOption tokenFileReflectionOption) throws java.io.FileNotFoundException, java.io.IOException; + + /** + * Reflect(insert or update) from separated-file. + * + * @param filename Name of the file. (NotNull and NotEmpty) + * @param encoding Encoding of the file. (NotNull and NotEmpty) + * @param delimiter Delimiter of the file. (NotNull and NotEmpty) + * @param batchCount Batch-count for transaction. + * @param isErrorContinue If true, this method continue in spite of throwing the exception. + * @return The list of InsertOrUpdateExceptionResult. (NotNull) + * @throws java.io.FileNotFoundException + * @throws java.io.IOException + * @deprecated Please use reflectTokenFile() + */ + public java.util.List reflectFromSeparatedFile( + String filename, String encoding, + String delimiter, int batchCount, boolean isErrorContinue + ) throws java.io.FileNotFoundException, java.io.IOException; + + /** + * Exception result for one entity. + * @deprecated Please use BatchTransactionFailureResult + */ + public static class OneEntityExceptionResult { + protected String _primaryKeyMapString; + protected Entity _entity; + protected Exception _exception; + + public String getPrimaryKeyMapString() { + return _primaryKeyMapString; + } + public void setPrimaryKeyMapString(String value) { + _primaryKeyMapString = value; + } + public Entity getEntity() { + return _entity; + } + public void setEntity(Entity value) { + _entity = value; + } + public Exception getException() { + return _exception; + } + public void setException(Exception value) { + _exception = value; + } + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/bhv/batch/TokenFileOutputOption.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/bhv/batch/TokenFileOutputOption.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/bhv/batch/TokenFileOutputOption.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,87 @@ +package jp.sf.pal.pompei.allcommon.bhv.batch; + +import jp.sf.pal.pompei.allcommon.helper.token.file.FileMakingOption; + +/** + * @author DBFlute(AutoGenerator) + */ +public class TokenFileOutputOption { + + // ===================================================================================== + // Attribute + // ========= + protected FileMakingOption _fileMakingOption = new FileMakingOption(); + + // ===================================================================================== + // Easy-to-Use + // =========== + public TokenFileOutputOption delimitateByComma() { + _fileMakingOption.delimitateByComma(); + return this; + } + + public TokenFileOutputOption delimitateByTab() { + _fileMakingOption.delimitateByTab(); + return this; + } + + public TokenFileOutputOption encodeAsUTF8() { + _fileMakingOption.encodeAsUTF8(); + return this; + } + + public TokenFileOutputOption encodeAsWindows31J() { + _fileMakingOption.encodeAsWindows31J(); + return this; + } + + public TokenFileOutputOption separateCrLf() { + _fileMakingOption.separateCrLf(); + return this; + } + + public TokenFileOutputOption separateLf() { + _fileMakingOption.separateLf(); + return this; + } + + public TokenFileOutputOption goodByeDoubleQuotation() { + _fileMakingOption.goodByeDoubleQuotation(); + return this; + } + + // ===================================================================================== + // Accessor + // ======== + public String getEncoding() { + return _fileMakingOption.getEncoding(); + } + + public void setEncoding(String encoding) { + _fileMakingOption.setDelimiter(encoding); + } + + public String getDelimiter() { + return _fileMakingOption.getDelimiter(); + } + + public void setDelimiter(String delimiter) { + _fileMakingOption.setDelimiter(delimiter); + } + + public String getLineSeparator() { + return _fileMakingOption.getLineSeparator(); + } + + public void setLineSeparator(String lineSeparator) { + _fileMakingOption.setLineSeparator(lineSeparator); + } + + public boolean isGoodByeDoubleQuotation() { + return _fileMakingOption.isGoodByeDoubleQuotation(); + } + + public FileMakingOption getFileMakingOption() { + return _fileMakingOption; + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/bhv/batch/TokenFileOutputResult.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/bhv/batch/TokenFileOutputResult.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/bhv/batch/TokenFileOutputResult.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,25 @@ +package jp.sf.pal.pompei.allcommon.bhv.batch; + +import jp.sf.pal.pompei.allcommon.Entity; + +/** + * @author DBFlute(AutoGenerator) + */ +public class TokenFileOutputResult { + + // ===================================================================================== + // Attribute + // ========= + protected java.util.List _selectedList; + + // ===================================================================================== + // Accessor + // ======== + public java.util.List getSelectedList() { + return _selectedList; + } + + public void setSelectedList(java.util.List selectedList) { + _selectedList = selectedList; + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/bhv/batch/TokenFileReflectionFailure.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/bhv/batch/TokenFileReflectionFailure.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/bhv/batch/TokenFileReflectionFailure.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,85 @@ +package jp.sf.pal.pompei.allcommon.bhv.batch; + +import jp.sf.pal.pompei.allcommon.Entity; + +/** + * @author DBFlute(AutoGenerator) + */ +public class TokenFileReflectionFailure { + + // ===================================================================================== + // Attribute + // ========= + protected java.util.List _columnNameList; + protected java.util.List _valueList; + + protected String rowString; + + /** The row number. */ + protected int _rowNumber; + + /** The line number. */ + protected int _lineNumber; + + protected Entity _entity; + protected Exception _exception; + + // ===================================================================================== + // Accessor + // ======== + public java.util.List getColumnNameList() { + return _columnNameList; + } + + public void setColumnNameList(java.util.List columnNameList) { + this._columnNameList = columnNameList; + } + + public java.util.List getValueList() { + return _valueList; + } + + public void setValueList(java.util.List valueList) { + this._valueList = valueList; + } + + public String getRowString() { + return rowString; + } + + public void setRowString(String rowString) { + this.rowString = rowString; + } + + public int getRowNumber() { + return _rowNumber; + } + + public void setRowNumber(int rowNumber) { + _rowNumber = rowNumber; + } + + public int getLineNumber() { + return _lineNumber; + } + + public void setLineNumber(int lineNumber) { + _lineNumber = lineNumber; + } + + public Entity getEntity() { + return _entity; + } + + public void setEntity(Entity value) { + _entity = value; + } + + public Exception getException() { + return _exception; + } + + public void setException(Exception value) { + _exception = value; + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/bhv/batch/TokenFileReflectionOption.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/bhv/batch/TokenFileReflectionOption.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/bhv/batch/TokenFileReflectionOption.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,76 @@ +package jp.sf.pal.pompei.allcommon.bhv.batch; + +import jp.sf.pal.pompei.allcommon.helper.token.file.FileTokenizingOption; + +/** + * @author DBFlute(AutoGenerator) + */ +public class TokenFileReflectionOption { + + // ===================================================================================== + // Attribute + // ========= + protected boolean _interruptIfError; + + protected FileTokenizingOption _fileTokenizingOption = new FileTokenizingOption(); + + // ===================================================================================== + // Easy-to-Use + // =========== + public TokenFileReflectionOption delimitateByComma() { + _fileTokenizingOption.delimitateByComma(); + return this; + } + + public TokenFileReflectionOption delimitateByTab() { + _fileTokenizingOption.delimitateByTab(); + return this; + } + + public TokenFileReflectionOption encodeAsUTF8() { + _fileTokenizingOption.encodeAsUTF8(); + return this; + } + + public TokenFileReflectionOption encodeAsWindows31J() { + _fileTokenizingOption.encodeAsWindows31J(); + return this; + } + + public TokenFileReflectionOption handleEmptyAsNull() { + _fileTokenizingOption.handleEmptyAsNull(); + return this; + } + + public TokenFileReflectionOption interruptIfError() { + _interruptIfError = true; + return this; + } + + // ===================================================================================== + // Accessor + // ======== + public String getDelimiter() { + return _fileTokenizingOption.getDelimiter(); + } + + public void setDelimiter(String delimiter) { + _fileTokenizingOption.setDelimiter(delimiter); + } + + public String getEncoding() { + return _fileTokenizingOption.getEncoding(); + } + + public void setEncoding(String encoding) { + _fileTokenizingOption.setDelimiter(encoding); + } + + public boolean isHandleEmptyAsNull() { + return _fileTokenizingOption.isHandleEmptyAsNull(); + } + + public boolean isInterruptIfError() { + return _interruptIfError; + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/bhv/batch/TokenFileReflectionResult.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/bhv/batch/TokenFileReflectionResult.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/bhv/batch/TokenFileReflectionResult.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,48 @@ +package jp.sf.pal.pompei.allcommon.bhv.batch; + +/** + * @author DBFlute(AutoGenerator) + */ +public class TokenFileReflectionResult { + + // ===================================================================================== + // Attribute + // ========= + protected java.util.List _columnNameList; + protected int _successCount; + protected java.util.List _failureList; + + // ===================================================================================== + // Easy-to-Use + // =========== + public void incrementSuccessCount() { + ++_successCount; + } + + // ===================================================================================== + // Accessor + // ======== + public java.util.List getColumnNameList() { + return _columnNameList; + } + + public void setColumnNameList(java.util.List columnNameList) { + this._columnNameList = columnNameList; + } + + public int getSuccessCount() { + return _successCount; + } + + public void setSuccessCount(int successCount) { + _successCount = successCount; + } + + public java.util.List getFailureList() { + return _failureList; + } + + public void setFailureList(java.util.List failureList) { + this._failureList = failureList; + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/bhv/load/LoadRefererOption.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/bhv/load/LoadRefererOption.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/bhv/load/LoadRefererOption.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,120 @@ +package jp.sf.pal.pompei.allcommon.bhv.load; + +import jp.sf.pal.pompei.allcommon.Entity; +import jp.sf.pal.pompei.allcommon.bhv.setup.ConditionBeanSetupper; +import jp.sf.pal.pompei.allcommon.bhv.setup.EntityListSetupper; +import jp.sf.pal.pompei.allcommon.cbean.ConditionBean; + +/** + * The class of load referer option. + * + * @author DBFlute(AutoGenerator) + */ +public class LoadRefererOption { + + // =================================================================================== + // Attribute + // ========= + protected ConditionBeanSetupper _conditionBeanSetupper; + + protected EntityListSetupper _entityListSetupper; + + protected REFERER_CONDITION_BEAN _reffererConditionBean; + + protected boolean _toLastKeyCondtion; + + protected boolean _stopOrderByKey; + + // =================================================================================== + // Constructor + // =========== + public LoadRefererOption() { + } + + public LoadRefererOption(ConditionBeanSetupper conditionBeanSetupper) { + this._conditionBeanSetupper = conditionBeanSetupper; + } + + public LoadRefererOption(ConditionBeanSetupper conditionBeanSetupper, EntityListSetupper entityListSetupper) { + this._conditionBeanSetupper = conditionBeanSetupper; + this._entityListSetupper = entityListSetupper; + } + + // =================================================================================== + // Easy-to-Use + // =========== + /** + * Specify that the key condition is added as last condition.
+ * This method is valid only after you use reffererConditionBean and add your original condition to it.
+ * + * @return this. (NotNull) + */ + public LoadRefererOption toLastKeyCondtion() { + _toLastKeyCondtion = true; + return this; + } + + /** + * Specify that it stops adding order-by of the key.
+ * This method is valid only after you use reffererConditionBean and add your original order-by to it.
+ * + * @return this. (NotNull) + */ + public LoadRefererOption stopOrderByKey() { + _stopOrderByKey = true; + return this; + } + + public void delegateKeyConditionExchangingFirstWhereClauseForLastOne(REFERER_CONDITION_BEAN cb) {// Internal + if (!_toLastKeyCondtion) { + cb.getSqlClause().exchangeFirstWhereClauseForLastOne(); + } + } + + public void delegateConditionBeanSettingUp(REFERER_CONDITION_BEAN cb) {// Internal + if (_conditionBeanSetupper != null) { + _conditionBeanSetupper.setup(cb); + } + } + + public void delegateEntitySettingUp(java.util.List entityList) {// Internal + if (_entityListSetupper != null) { + _entityListSetupper.setup(entityList); + } + } + + // =================================================================================== + // Accessor + // ======== + public ConditionBeanSetupper getConditionBeanSetupper() { + return _conditionBeanSetupper; + } + + public void setConditionBeanSetupper(ConditionBeanSetupper conditionBeanSetupper) { + this._conditionBeanSetupper = conditionBeanSetupper; + } + + public EntityListSetupper getEntityListSetupper() { + return _entityListSetupper; + } + + public void setEntityListSetupper(EntityListSetupper entityListSetupper) { + this._entityListSetupper = entityListSetupper; + } + + public REFERER_CONDITION_BEAN getReffererConditionBean() { + return _reffererConditionBean; + } + + public void setReffererConditionBean(REFERER_CONDITION_BEAN reffererConditionBean) { + this._reffererConditionBean = reffererConditionBean; + } + + public boolean isToLastKeyCondtion() { + return _toLastKeyCondtion; + } + + public boolean isStopOrderByKey() { + return _stopOrderByKey; + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/bhv/setup/ConditionBeanSetupper.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/bhv/setup/ConditionBeanSetupper.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/bhv/setup/ConditionBeanSetupper.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,18 @@ +package jp.sf.pal.pompei.allcommon.bhv.setup; + +import jp.sf.pal.pompei.allcommon.cbean.ConditionBean; + +/** + * The interface of condition-bean setupper. + * + * @author DBFlute(AutoGenerator) + */ +public interface ConditionBeanSetupper { + + /** + * Set up condition. + * + * @param cb Condition-bean. (NotNull) + */ + public void setup(CONDITION_BEAN cb); +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/bhv/setup/EntityListSetupper.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/bhv/setup/EntityListSetupper.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/bhv/setup/EntityListSetupper.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,18 @@ +package jp.sf.pal.pompei.allcommon.bhv.setup; + +import jp.sf.pal.pompei.allcommon.Entity; + +/** + * The interface of entity list setupper. + * + * @author DBFlute(AutoGenerator) + */ +public interface EntityListSetupper { + + /** + * Set up entity list. + * + * @param entityList Entity list. (NotNull) + */ + public void setup(java.util.List entityList); +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/bhv/setup/ValueLabelBox.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/bhv/setup/ValueLabelBox.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/bhv/setup/ValueLabelBox.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,26 @@ +package jp.sf.pal.pompei.allcommon.bhv.setup; + +/** + * The class of Value-Label Box. + * + * @author DBFlute(AutoGenerator) + */ +public class ValueLabelBox { + + protected Object _value; + + protected String _label; + + public void setValueLabel(Object value, String label) { + this._value = value; + this._label = label; + } + + public Object getValue() { + return _value; + } + + public String getLabel() { + return _label; + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/bhv/setup/ValueLabelSetupper.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/bhv/setup/ValueLabelSetupper.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/bhv/setup/ValueLabelSetupper.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,17 @@ +package jp.sf.pal.pompei.allcommon.bhv.setup; + +/** + * The interface of Value-Label Setupper. + * + * @author DBFlute(AutoGenerator) + */ +public interface ValueLabelSetupper { + + /** + * Set up value-label. + * + * @param box Value-label box. (NotNull) + * @param entity Entity. (NotNull) + */ + public void setup(ValueLabelBox box, T entity); +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/AbstractConditionBean.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/AbstractConditionBean.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/AbstractConditionBean.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,548 @@ +package jp.sf.pal.pompei.allcommon.cbean; + + +import jp.sf.pal.pompei.allcommon.cbean.ConditionBeanContext; +import jp.sf.pal.pompei.allcommon.dbmeta.DBMeta; +import jp.sf.pal.pompei.allcommon.dbmeta.DBMetaInstanceHandler; +import jp.sf.pal.pompei.allcommon.helper.MapListString; +import jp.sf.pal.pompei.allcommon.helper.MapListStringImpl; +import jp.sf.pal.pompei.allcommon.cbean.sqlclause.OrderByClause; +import jp.sf.pal.pompei.allcommon.cbean.sqlclause.SqlClause; + +/** + * The condition-bean as abstract. + * + * @author DBFlute(AutoGenerator) + */ +public abstract class AbstractConditionBean implements ConditionBean { + + // ===================================================================================== + // Attribute + // ========= + /** SQL clause instance. */ + protected final SqlClause _sqlClause; + { + _sqlClause = ConditionBeanContext.createSqlClause(this); + } + + // ===================================================================================== + // Sql-Clause + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Sql clause. (NotNull) + */ + public SqlClause getSqlClause() { + return _sqlClause; + } + + // ===================================================================================== + // Condition-Query + // =============== + /** + * Get condition query as interface. + * + * @return Instance of query as interface. (NotNull) + */ + abstract public ConditionQuery getConditionQueryAsInterface(); + + // ===================================================================================== + // Accept Primary-Key + // ================== + /** + * This method implements the method that is declared at super. + * + * @param primaryKeyMapString Primary-key map. (NotNull and NotEmpty) + */ + public void acceptPrimaryKeyMapString(String primaryKeyMapString) { + if (primaryKeyMapString == null) { + String msg = "The argument[primaryKeyMapString] must not be null."; + throw new IllegalArgumentException(msg); + } + final String prefix = MAP_STRING_MAP_MARK + MAP_STRING_START_BRACE; + final String suffix = MAP_STRING_END_BRACE; + if (!primaryKeyMapString.trim().startsWith(prefix)) { + primaryKeyMapString = prefix + primaryKeyMapString; + } + if (!primaryKeyMapString.trim().endsWith(suffix)) { + primaryKeyMapString = primaryKeyMapString + suffix; + } + MapListString mapListString = new MapListStringImpl(); + mapListString.setMapMark(MAP_STRING_MAP_MARK); + mapListString.setListMark(MAP_STRING_LIST_MARK); + mapListString.setDelimiter(MAP_STRING_DELIMITER); + mapListString.setStartBrace(MAP_STRING_START_BRACE); + mapListString.setEndBrace(MAP_STRING_END_BRACE); + mapListString.setEqual(MAP_STRING_EQUAL); + acceptPrimaryKeyMap(mapListString.generateMap(primaryKeyMapString)); + } + + protected void checkTypeString(Object value, String propertyName, String typeName) { + if (value == null) { + throw new IllegalArgumentException("The value should not be null: " + propertyName); + } + if (!(value instanceof String)) { + String msg = "The value of " + propertyName + " should be " + typeName + " or String: "; + msg = msg + "valueType=" + value.getClass() + " value=" + value; + throw new IllegalArgumentException(msg); + } + } + + protected long parseDateString(Object value, String propertyName, String typeName) { + checkTypeString(value, propertyName, typeName); + try { + return getDateFormat().parse((String)value).getTime(); + } catch (java.text.ParseException e) { + String msg = "The value of " + propertyName + " should be " + typeName + ". but: " + value; + throw new RuntimeException(msg + " threw the exception: value=[" + value + "]", e); + } catch (RuntimeException e) { + String msg = "The value of " + propertyName + " should be " + typeName + ". but: " + value; + throw new RuntimeException(msg + " threw the exception: value=[" + value + "]", e); + } + } + + protected java.text.DateFormat getDateFormat() { + return new java.text.SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS"); + } + + // ===================================================================================== + // Fetch-Narrowing + // =============== + /** + * This method implements the method that is declared at super. + * + * @return Fetch start index. + */ + public int getFetchNarrowingSkipStartIndex() { + return getSqlClause().getFetchNarrowingSkipStartIndex(); + } + + /** + * This method implements the method that is declared at super. + * + * @return Fetch size. + */ + public int getFetchNarrowingLoopCount() { + return getSqlClause().getFetchNarrowingLoopCount(); + } + + /** + * This method implements the method that is declared at super. + * + * @return Determination. + */ + public boolean isFetchNarrowingSkipStartIndexEffective() { + return !getSqlClause().isFetchStartIndexSupported(); + } + + /** + * This method implements the method that is declared at super. + * + * @return Determination. + */ + public boolean isFetchNarrowingLoopCountEffective() { + return !getSqlClause().isFetchSizeSupported(); + } + + /** + * This method implements the method that is declared at super. + * + * @return Determiantion. + */ + public boolean isFetchNarrowingEffective() { + return getSqlClause().isFetchNarrowingEffective(); + } + + // ===================================================================================== + // Paging + // ====== + /** + * This method implements the method that is declared at super. + * + * @param fetchSize Fetch-size. (NotMinus & NotZero) + * @return this. (NotNUll) + */ + public PagingBean fetchFirst(int fetchSize) { + getSqlClause().fetchFirst(fetchSize); + return this; + } + + /** + * This method implements the method that is declared at super. + * + * @param fetchStartIndex Fetch-start-index. 0 origin. (NotMinus) + * @param fetchSize Fetch-size. (NotMinus & NotZero) + * @return this. (NotNUll) + */ + public PagingBean fetchScope(int fetchStartIndex, int fetchSize) { + getSqlClause().fetchScope(fetchStartIndex, fetchSize); + return this; + } + + /** + * This method implements the method that is declared at super. + * + * @param fetchPageNumber Fetch-page-number. 1 origin. (NotMinus & NotZero) + * @return this. (NotNull) + */ + public PagingBean fetchPage(int fetchPageNumber) { + getSqlClause().fetchPage(fetchPageNumber); + return this; + } + + /** + * This method implements the method that is declared at super. + * + * @return Fetch-start-index. + */ + public int getFetchStartIndex() { + return getSqlClause().getFetchStartIndex(); + } + + /** + * This method implements the method that is declared at super. + * + * @return Fetch-size. + */ + public int getFetchSize() { + return getSqlClause().getFetchSize(); + } + + /** + * This method implements the method that is declared at super. + * + * @return Fetch-page-number. + */ + public int getFetchPageNumber() { + return getSqlClause().getFetchPageNumber(); + } + + /** + * This method implements the method that is declared at super. + * + * @return Page start index. 0 origin. (NotMinus) + */ + public int getPageStartIndex() { + return getSqlClause().getPageStartIndex(); + } + + /** + * This method implements the method that is declared at super. + * + * @return Page end index. 0 origin. (NotMinus) + */ + public int getPageEndIndex() { + return getSqlClause().getPageEndIndex(); + } + + /** + * Is fetch scope effective? + * + * @return Determiantion. + */ + public boolean isFetchScopeEffective() { + return getSqlClause().isFetchScopeEffective(); + } + + // ===================================================================================== + // Order-By + // ======== + /** + * This method implements the method that is declared at super. + * + * @return Sql component of order-by clause. (NotNull) + */ + public OrderByClause getSqlComponentOfOrderByClause() { + return getSqlClause().getSqlComponentOfOrderByClause(); + } + + /** + * This method implements the method that is declared at super. + * + * @return Order-by clause. (NotNull) + */ + public String getOrderByClause() { + return _sqlClause.getOrderByClause(); + } + + /** + * This method implements the method that is declared at super. + * + * @return this. (NotNull) + */ + public OrderByBean clearOrderBy() { + getSqlClause().clearOrderBy(); + return this; + } + + /** + * This method implements the method that is declared at super. + * + * @return this. (NotNull) + */ + public OrderByBean ignoreOrderBy() { + getSqlClause().ignoreOrderBy(); + return this; + } + + /** + * This method implements the method that is declared at super. + * + * @return this. (NotNull) + */ + public OrderByBean makeOrderByEffective() { + getSqlClause().makeOrderByEffective(); + return this; + } + + /** + * Register order-by-asc. + * + * @param orderByProperty Order-by-property. 'aliasName.columnName/aliasName.columnName/...' (NotNull) + * @return this. (NotNull) + */ + public OrderByBean registerOrderByAsc(String orderByProperty) { + getSqlClause().registerOrderBy(filterOrderByProperty(orderByProperty), orderByProperty, true); + return this; + } + + /** + * Register order-by-desc. + * + * @param orderByProperty Order-by-property. 'aliasName.columnName/aliasName.columnName/...' (NotNull) + * @return this. (NotNull) + */ + public OrderByBean registerOrderByDesc(String orderByProperty) { + getSqlClause().registerOrderBy(filterOrderByProperty(orderByProperty), orderByProperty, false); + return this; + } + + /** + * Reverse order-by or Override order-by asc. + * + * @param orderByProperty Order-by-property. 'aliasName.columnName/aliasName.columnName/...' (NotNull) + * @return this. (NotNull) + */ + public OrderByBean reverseOrderBy_Or_OverrideOrderByAsc(String orderByProperty) { + getSqlClause().reverseOrderBy_Or_OverrideOrderBy(filterOrderByProperty(orderByProperty), orderByProperty, true); + return this; + } + + /** + * Reverse order-by or Override order-by desc. + * + * @param orderByProperty Order-by-property. 'aliasName.columnName/aliasName.columnName/...' (NotNull) + * @return this. (NotNull) + */ + public OrderByBean reverseOrderBy_Or_OverrideOrderByDesc(String orderByProperty) { + getSqlClause().reverseOrderBy_Or_OverrideOrderBy(filterOrderByProperty(orderByProperty), orderByProperty, false); + return this; + } + + protected String filterOrderByProperty(String orderByProperty) { + final java.util.List orderBySlashList = new java.util.ArrayList(); + { + final java.util.StringTokenizer st = new java.util.StringTokenizer(orderByProperty, "/"); + while (st.hasMoreElements()) { + orderBySlashList.add(st.nextToken()); + } + } + + final StringBuffer sb = new StringBuffer(); + DBMeta dbmeta = DBMetaInstanceHandler.getInstanceByTableDbName(getTableDbName()); + ConditionQuery query = this.getConditionQueryAsInterface(); + for (final java.util.Iterator ite = orderBySlashList.iterator(); ite.hasNext(); ) { + final String orderBySlashElement = (String)ite.next(); + final java.util.List orderByDotList = new java.util.ArrayList(); + { + final java.util.StringTokenizer st = new java.util.StringTokenizer(orderBySlashElement, "/"); + while (st.hasMoreElements()) { + orderByDotList.add(st.nextToken()); + } + } + + if (orderByDotList.size() == 1) { + if (dbmeta.isExistMultiName(orderBySlashElement)) { + sb.append("/").append(query.getRealColumnName(dbmeta.getDbNameByMultiName(orderBySlashElement))); + } else { + sb.append("/").append(orderBySlashElement); + } + } else { + DBMeta foreignDBMeta = dbmeta; + ConditionQuery foreignQuery = query; + int count = 0; + for (final java.util.Iterator ite2 = orderByDotList.iterator(); ite2.hasNext(); ) { + String orderByDotElement = (String)ite2.next(); + count++; + + if (orderByDotList.size() == count) {// Last Loop! + if (!foreignDBMeta.isExistMultiName(orderByDotElement)) { + String msg = "The name for order-by is not existing: name=" + orderByDotElement; + msg = msg + " orderBySlashElement=" + orderBySlashElement + " orderByProperty=" + orderByProperty; + throw new IllegalStateException(msg); + } + sb.append("/").append(foreignQuery.getRealColumnName(foreignDBMeta.getDbNameByMultiName(orderByDotElement))); + break; + } + + foreignDBMeta = foreignDBMeta.getForeignDBMeta(orderByDotElement); + foreignQuery = foreignQuery.getForeignConditionQuery(orderByDotElement); + } + } + } + sb.delete(0, "/".length()); + return sb.toString(); + } + + // ===================================================================================== + // Limit-Select + // ============ + /** Is limit-select PK only? */ + protected boolean _isLimitSelectPKOnly; + + /** + * Is limit-select PK only? + * + * @return Determination. + */ + public boolean isLimitSelect_PKOnly() { + return _isLimitSelectPKOnly; + } + + /** + * Limit select PK only. + * + * @return this. (NotNull) + */ + public ConditionBean limitSelect_PKOnly() { + _isLimitSelectPKOnly = true; + return this; + } + + /** + * Limit select off. + * + * @return this. (NotNull) + */ + public ConditionBean limitSelect_Off() { + _isLimitSelectPKOnly = false; + return this; + } + + // ===================================================================================== + // Advance + // ======= + /** + * This method implements the method that is declared at super. + * + * @return this. (NotNull) + */ + public ConditionBean lockForUpdate() { + getSqlClause().lockForUpdate(); + return this; + } + + // ===================================================================================== + // For SqlComment + // ============== + /** + * Get select-hint. {select [select-hint] * from table...} + * + * @return select-hint. (NotNull) + */ + public String getSelectHint() { + return getSqlClause().getSelectHint(); + } + + /** + * Get from-base-table-hint. {select * from table [from-base-table-hint] where ...} + * + * @return from-base-table-hint. (NotNull) + */ + public String getFromBaseTableHint() { + return getSqlClause().getFromBaseTableHint(); + } + + /** + * Get from-hint. {select * from table left outer join ... on ... [from-hint] where ...} + * + * @return from-hint. (NotNull) + */ + public String getFromHint() { + return getSqlClause().getFromHint(); + } + + /** + * Get where clause. + * + * @return Where clause. (NotNull) + */ + public String getWhereClause() { + return getSqlClause().getWhereClause(); + } + + /** + * Get sql-suffix. {select * from table where ... order by ... [sql-suffix]} + * + * @return Sql-suffix. (NotNull) + */ + public String getSqlSuffix() { + return getSqlClause().getSqlSuffix(); + } + + // ------------------------------ + // for Internal + // ------------ + /** + * Set up various things for select-count-ignore-fetch-scope. {Internal} + * This method is for INTERNAL. Don't invoke this! + * + * @return this. (NotNull) + */ + public ConditionBean xsetupSelectCountIgnoreFetchScope() { + _isSelectCountIgnoreFetchScope = true; + + // If the query uses union query, it needs included-select-column. + if (!hasUnionQueryOrUnionAllQuery()) { + getSqlClause().ignoreIncludedSelectColumn(); + } + + getSqlClause().ignoreOrderBy(); + getSqlClause().ignoreFetchScope(); + return this; + } + + /** + * Do after-care for select-count-ignore-fetch-scope. {Internal} + * This method is for INTERNAL. Don't invoke this! + * + * @return this. (NotNull) + */ + public ConditionBean xafterCareSelectCountIgnoreFetchScope() { + _isSelectCountIgnoreFetchScope = false; + + // If the query uses union query, it needs included-select-column. + if (!hasUnionQueryOrUnionAllQuery()) { + getSqlClause().makeIncludedSelectColumnEffective(); + } + + getSqlClause().makeOrderByEffective(); + getSqlClause().makeFetchScopeEffective(); + return this; + } + + /** Is set up various things for select-count-ignore-fetch-scope? */ + protected boolean _isSelectCountIgnoreFetchScope; + + /** + * Is set up various things for select-count-ignore-fetch-scope? + * This method is for INTERNAL. Don't invoke this! + * + * @return Determination. + */ + public boolean isSelectCountIgnoreFetchScope() { + return _isSelectCountIgnoreFetchScope; + } + +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/AbstractConditionQuery.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/AbstractConditionQuery.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/AbstractConditionQuery.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,765 @@ +package jp.sf.pal.pompei.allcommon.cbean; + + +import jp.sf.pal.pompei.allcommon.cbean.ckey.ConditionKey; +import jp.sf.pal.pompei.allcommon.cbean.coption.ConditionOption; +import jp.sf.pal.pompei.allcommon.cbean.coption.FromToOption; +import jp.sf.pal.pompei.allcommon.cbean.coption.LikeSearchOption; +import jp.sf.pal.pompei.allcommon.cbean.coption.InScopeOption; +import jp.sf.pal.pompei.allcommon.cbean.cvalue.ConditionValue; +import jp.sf.pal.pompei.allcommon.dbmeta.DBMeta; +import jp.sf.pal.pompei.allcommon.dbmeta.DBMetaInstanceHandler; +import jp.sf.pal.pompei.allcommon.cbean.sqlclause.SqlClause; + +/** + * The abstract class of condition-query. + * + * @author DBFlute(AutoGenerator) + */ +public abstract class AbstractConditionQuery implements ConditionQuery { + + // ===================================================================================== + // Attribute + // ========= + /** Condition value for DUMMY. */ + protected static final ConditionValue DUMMY_CONDITION_VALUE = new ConditionValue(); + + /** Object for DUMMY. */ + protected static final Object DUMMY_OBJECT = new Object(); + + /** SQL clause. */ + protected final SqlClause _sqlClause; + + /** My alias name. */ + protected final String _aliasName; + + /** Nest level. */ + protected final int _nestLevel; + + /** Child query. */ + protected final ConditionQuery _childQuery; + + // ===================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param childQuery Child query. (Nullable: If null, this is base instance.) + * @param sqlClause SQL clause instance. (NotNull) + * @param aliasName My alias name. (NotNull) + * @param nestLevel Nest level. + */ + public AbstractConditionQuery(ConditionQuery childQuery, SqlClause sqlClause, String aliasName, int nestLevel) { + _childQuery = childQuery; + _sqlClause = sqlClause; + _aliasName = aliasName; + _nestLevel = nestLevel; + } + + // ===================================================================================== + // Accessor + // ======== + /** + * Get child query. + * + * @return Child query. (Nullable) + */ + public ConditionQuery getChildQuery() { + return _childQuery; + } + + /** + * Get sql clause. + * + * @return Sql clause. (NotNull) + */ + public SqlClause getSqlClause() { + return _sqlClause; + } + + /** + * Get alias name. + * + * @return Alias name. (NotNull) + */ + public String getAliasName() { + return _aliasName; + } + + /** + * Get nest level. + * + * @return Nest level. + */ + public int getNestLevel() { + return _nestLevel; + } + + /** + * Get next nest level. + * + * @return Next nest level. + */ + public int getNextNestLevel() { + return _nestLevel+1; + } + + /** + * Is base query? + * + * @param query Condition query. (NotNull) + * @return Determination. + */ + public boolean isBaseQuery(ConditionQuery query) { + return (query.getChildQuery() == null); + } + + // ===================================================================================== + // Real Name + // ========= + /** + * Get real alias name(that has nest level mark). + * + * @return Real alias name. + */ + public String getRealAliasName() { + if (getNestLevel() > 1) { + return getAliasName() + "_n" + getNestLevel(); + } else { + return getAliasName(); + } + } + + /** + * Get real column name(with real alias name). + * + * @param columnName Column name without alias name. This should not contain comma. (NotNull) + * @return Real column name. + */ + public String getRealColumnName(String columnName) { + assertColumnName(columnName); + return getRealAliasName() + "." + columnName; + } + + // ===================================================================================== + // Location + // ======== + /** + * Get location. + * + * @param columnPropertyName Column property name. + * @param key Condition key. + * @return Next nest level. + */ + protected String getLocation(String columnPropertyName, ConditionKey key) { + return getLocationBase(columnPropertyName) + "." + key.getConditionKey(); + } + + protected String getLocationBase() { + final StringBuffer sb = new StringBuffer(); + ConditionQuery query = this; + while (true) { + if (query.isBaseQuery(query)) { + sb.insert(0, "conditionQuery."); + break; + } else { + sb.insert(0, "conditionQuery" + query.getAliasName() + "."); + } + query = query.getChildQuery(); + } + return sb.toString(); + } + + protected String getLocationBase(String columnPropertyName) { + return getLocationBase() + columnPropertyName; + } + + // ===================================================================================== + // Union-Query + // =========== + protected java.util.Map _unionQueryMap = new java.util.LinkedHashMap(); + + public java.util.Map getUnionQueryMap() {// for Internal + return _unionQueryMap; + } + + /** + * Set union query. {Internal} + *
+     * Add union query to condition bean.
+     * 
+ * @param unionQuery Union query. (NotNull) + */ + public void xsetUnionQuery(ConditionQuery unionQuery) { + xsetupUnion(unionQuery, false, _unionQueryMap); + } + + protected java.util.Map _unionAllQueryMap = new java.util.LinkedHashMap(); + + public java.util.Map getUnionAllQueryMap() {// for Internal + return _unionAllQueryMap; + } + + /** + * Set union all query. {Internal} + *
+     * Add union all query to condition bean.
+     * 
+ * @param unionAllQuery Union all query. (NotNull) + */ + public void xsetUnionAllQuery(ConditionQuery unionAllQuery) { + xsetupUnion(unionAllQuery, true, _unionAllQueryMap); + } + + protected void xsetupUnion(ConditionQuery unionQuery, boolean unionAll, java.util.Map unionQueryMap) { + if (unionQuery == null) { + String msg = "The argument[unionQuery] should not be null."; + throw new IllegalArgumentException(msg); + } + reflectRelationOnUnionQuery(this, unionQuery);// Reflect Relation! + getSqlClause().copyIncludedSelectColumn(unionQuery.getSqlClause());// Reflect IncludedSelectColumn! + final String key = (unionAll ? "unionAllQuery" : "unionQuery") + unionQueryMap.size(); + unionQueryMap.put(key, unionQuery); + registerUnionQuery(unionQuery, unionAll, (unionAll ? "unionAllQueryMap" : "unionQueryMap") + "." + key); + } + + abstract protected void reflectRelationOnUnionQuery(ConditionQuery baseQueryAsSuper, ConditionQuery unionQueryAsSuper); + + public boolean hasUnionQueryOrUnionAllQuery() { + return !_unionQueryMap.isEmpty() || !_unionAllQueryMap.isEmpty(); + } + + public java.util.List getUnionQueryList() { + return new java.util.ArrayList(_unionQueryMap.values()); + } + + public java.util.List getUnionAllQueryList() { + return new java.util.ArrayList(_unionAllQueryMap.values()); + } + + // ===================================================================================== + // Include-As-Mine + // =============== + /** + * Register included-select-column. + * + * @param aliasName Alias name. This should not contain comma. (NotNull) + * @param realColumnName Real column name. This should not contain comma. (NotNull) + */ + protected void registerIncludedSelectColumn(String aliasName, String realColumnName) { + assertAliasName(aliasName); + assertColumnName(realColumnName); + getSqlClause().registerIncludedSelectColumn(aliasName, realColumnName); + } + + // ===================================================================================== + // Register + // ======== + // ---------------------------------------- + // Normal + // ------ + protected void registerQuery(ConditionKey key, Object value, ConditionValue cvalue + , String colName, String capPropName, String uncapPropName) { + if (key.isValidRegistration(cvalue, value, key.getConditionKey() + " of " + getRealAliasName() + "." + uncapPropName)) { + setupConditionValueAndRegisterWhereClause(key, value, cvalue, colName, capPropName, uncapPropName); + } + } + + protected void registerQuery(ConditionKey key, Object value, ConditionValue cvalue + , String colName, String capPropName, String uncapPropName, ConditionOption option) { + if (key.isValidRegistration(cvalue, value, key.getConditionKey() + " of " + getRealAliasName() + "." + uncapPropName)) { + setupConditionValueAndRegisterWhereClause(key, value, cvalue, colName, capPropName, uncapPropName, option); + } + } + + // ---------------------------------------- + // FromTo + // ------ + protected void registerFromToQuery(java.util.Date fromDate, java.util.Date toDate, ConditionValue cvalue + , String colName, String capPropName, String uncapPropName, FromToOption option) { + { + final java.util.Date filteredFromDate = option.filterFromDate(fromDate); + final ConditionKey fromKey = option.getFromDateConditionKey(); + if (fromKey.isValidRegistration(cvalue, filteredFromDate, fromKey.getConditionKey() + " of " + getRealAliasName() + "." + uncapPropName)) { + setupConditionValueAndRegisterWhereClause(fromKey, filteredFromDate, cvalue, colName, capPropName, uncapPropName); + } + } + { + final java.util.Date filteredToDate = option.filterToDate(toDate); + final ConditionKey toKey = option.getToDateConditionKey(); + if (toKey.isValidRegistration(cvalue, filteredToDate, toKey.getConditionKey() + " of " + getRealAliasName() + "." + uncapPropName)) { + setupConditionValueAndRegisterWhereClause(toKey, filteredToDate, cvalue, colName, capPropName, uncapPropName); + } + } + } + + // ---------------------------------------- + // LikeSearch + // ---------- + protected void registerLikeSearchQuery(ConditionKey key, String value, ConditionValue cvalue + , String colName, String capPropName, String uncapPropName, LikeSearchOption option) { + if (key.isValidRegistration(cvalue, value, key.getConditionKey() + " of " + getRealAliasName() + "." + uncapPropName)) { + if (value != null && option.isSplit()) { + final String[] strArray = option.generateSplitValueArray(value); + for (int i=0; i < strArray.length; i++) { + final String currentValue = strArray[i]; + setupConditionValueAndRegisterWhereClause(key, currentValue, cvalue, colName, capPropName, uncapPropName, option); + + // Callback for LikeAsOr! + final java.util.List callbackList = option.getLikeAsOrCallbackList(); + if (!callbackList.isEmpty()) { + getSqlClause().makeAdditionalConditionAsOrEffective(); + for (java.util.Iterator ite = callbackList.iterator(); ite.hasNext(); ) { + final LikeSearchOption.LikeAsOrCallback likeAsOrCallback = (LikeSearchOption.LikeAsOrCallback)ite.next(); + final String additionalTargetPropertyName = likeAsOrCallback.getAdditionalTargetPropertyName(); + final String filteredValue = likeAsOrCallback.filterValue(currentValue); + final LikeSearchOption optionDeepCopy = (LikeSearchOption)option.createDeepCopy(); + optionDeepCopy.clearLikeAsOrCallback(); + final LikeSearchOption filteredOption = likeAsOrCallback.filterOption(optionDeepCopy); + invokeSetterLikeSearch(additionalTargetPropertyName, filteredValue, filteredOption); + } + getSqlClause().ignoreAdditionalConditionAsOr(); + } + } + } else { + setupConditionValueAndRegisterWhereClause(key, value, cvalue, colName, capPropName, uncapPropName, option); + } + } + } + + // ---------------------------------------- + // InScope + // ------- + protected void registerInScopeQuery(ConditionKey key, String value, ConditionValue cvalue + , String colName, String capPropName, String uncapPropName, InScopeOption option) { + if (key.isValidRegistration(cvalue, value, key.getConditionKey() + " of " + getRealAliasName() + "." + uncapPropName)) { + if (value != null && option.isSplit()) { + final String[] strArray = option.generateSplitValueArray(value); + final java.util.List realValueList = new java.util.ArrayList(); + for (int i=0; i < strArray.length; i++) { + final String currentValue = strArray[i]; + realValueList.add(currentValue); + } + setupConditionValueAndRegisterWhereClause(key, realValueList, cvalue, colName, capPropName, uncapPropName, option); + } else { + setupConditionValueAndRegisterWhereClause(key, value, cvalue, colName, capPropName, uncapPropName, option); + } + } + } + + protected void setupConditionValueAndRegisterWhereClause(ConditionKey key, Object value, ConditionValue cvalue + , String colName, String capPropName, String uncapPropName) { + key.setupConditionValue(cvalue, value, getLocation(uncapPropName, key));// If Java, UncapProp! + getSqlClause().registerWhereClause(getRealColumnName(colName), key, cvalue); + } + + protected void setupConditionValueAndRegisterWhereClause(ConditionKey key, Object value, ConditionValue cvalue + , String colName, String capPropName, String uncapPropName, ConditionOption option) { + key.setupConditionValue(cvalue, value, getLocation(uncapPropName, key), option);// If Java, UncapProp! + getSqlClause().registerWhereClause(getRealColumnName(colName), key, cvalue, option); + } + + // ---------------------------------------- + // Inline + // ------ + protected void registerInlineQuery(ConditionKey key, Object value, ConditionValue cvalue + , String colName, String capPropName, String uncapPropName) { + if (key.isValidRegistration(cvalue, value, key.getConditionKey() + " of " + getRealAliasName() + "." + uncapPropName)) { + key.setupConditionValue(cvalue, value, getLocation(uncapPropName, key));// If Java, UncapProp! + if (isBaseQuery(this)) { + getSqlClause().registerBaseTableInlineWhereClause(colName, key, cvalue); + } else { + getSqlClause().registerOuterJoinInlineWhereClause(getRealAliasName(), colName, key, cvalue); + } + } + } + + protected void registerInlineQuery(ConditionKey key, Object value, ConditionValue cvalue + , String colName, String capPropName, String uncapPropName, ConditionOption option) { + if (key.isValidRegistration(cvalue, value, key.getConditionKey() + " of " + getRealAliasName() + "." + uncapPropName)) { + key.setupConditionValue(cvalue, value, getLocation(uncapPropName, key), option);// If Java, UncapProp! + if (isBaseQuery(this)) { + getSqlClause().registerBaseTableInlineWhereClause(colName, key, cvalue, option); + } else { + getSqlClause().registerOuterJoinInlineWhereClause(getRealAliasName(), colName, key, cvalue, option); + } + } + } + + // ---------------------------------------- + // InScopeSubQuery + // --------------- + protected void registerInScopeSubQuery(ConditionQuery subQuery + , String columnName, String relatedColumnName, String propertyName) { + final String realColumnName = getRealColumnName(columnName); + final String subQueryClause = getInScopeSubQuerySql(subQuery, relatedColumnName, propertyName); + registerWhereClause(realColumnName + " in (" + subQueryClause + ")"); + } + + protected String getInScopeSubQuerySql(ConditionQuery subQuery + , String relatedColumnName, String propertyName) { + final String selectClause = "select " + subQuery.getAliasName() + "." + relatedColumnName; + String clause = subQuery.getSqlClause().getClauseWithoutIncludedOrderBySqlSuffix(); + clause = replaceString(clause, ".conditionQuery.", "." + getLocationBase(propertyName) + ".");// Very Important! + return replaceString(clause, SqlClause.INCLUDE_SELECT_CLAUSE_MARK, selectClause); + } + + // ---------------------------------------- + // ExistsSubQuery + // -------------- + protected void registerExistsSubQuery(ConditionQuery subQuery + , String columnName, String relatedColumnName, String propertyName) { + final String realColumnName = getRealColumnName(columnName); + final String subQueryClause = getExistsSubQuerySql(subQuery, realColumnName, relatedColumnName, propertyName); + registerWhereClause("exists (" + subQueryClause + ")"); + } + + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + // *Unsupport ExistsSubQuery as inline because it's so dangerous. + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + protected String getExistsSubQuerySql(ConditionQuery subQuery + , String realColumnName, String relatedColumnName, String propertyName) { + final String selectClause = "select " + subQuery.getAliasName() + "." + relatedColumnName; + String clause = subQuery.getSqlClause().getClauseWithoutIncludedOrderBySqlSuffix(); + clause = replaceString(clause, ".conditionQuery.", "." + getLocationBase(propertyName) + ".");// Very Important! + final String parentCondition; + if (clause.contains("where")) { + parentCondition = " and " + relatedColumnName + " = " + realColumnName; + } else { + parentCondition = " where " + relatedColumnName + " = " + realColumnName; + } + return replaceString(clause + parentCondition, SqlClause.INCLUDE_SELECT_CLAUSE_MARK, selectClause); + } + + protected void registerWhereClause(String whereClause) { + getSqlClause().registerWhereClause(whereClause); + } + + protected void registerInlineWhereClause(String whereClause) { + if (isBaseQuery(this)) { + getSqlClause().registerBaseTableInlineWhereClause(whereClause); + } else { + getSqlClause().registerOuterJoinInlineWhereClause(getRealAliasName(), whereClause); + } + } + + // ---------------------------------------- + // UnionQuery + // ---------- + public void registerUnionQuery(ConditionQuery unionQuery, boolean unionAll, String unionQueryPropertyName) { + final String unionQueryClause = getUnionQuerySql(unionQuery, unionQueryPropertyName); + getSqlClause().registerUnionQuery(unionQueryClause, unionAll); + } + + protected String getUnionQuerySql(ConditionQuery unionQuery, String unionQueryPropertyName) { + final String selectClause = unionQuery.getSqlClause().getIncludedSelectColumnClause(); + final String queryClause = unionQuery.getSqlClause().getFromClause() + " " + unionQuery.getSqlClause().getWhereClause(); + final String oldStr = ".conditionQuery."; + final String newStr = ".conditionQuery." + unionQueryPropertyName + "."; + final String replacedClause = replaceString(queryClause, oldStr, newStr);// Very Important! + return selectClause + " " + replacedClause; + } + + // ===================================================================================== + // Invoke + // ====== + public ConditionValue invokeGetter(String columnMultiName) { + final DBMeta dbmeta = DBMetaInstanceHandler.getInstanceByTableDbName(getTableDbName()); + final String columnCapPropName = dbmeta.getCapPropNameByMultiName(columnMultiName); + String methodName = "get" + columnCapPropName; + java.lang.reflect.Method method = null; + try { + method = this.getClass().getMethod(methodName, new Class[]{}); + } catch (NoSuchMethodException e) { + String msg = "The columnMultiName is not existing in this table: columnMultiName=" + columnMultiName; + msg = msg + " tableName=" + getTableDbName() + " methodName=" + methodName; + throw new RuntimeException(msg, e); + } + try { + final Object result = method.invoke(this, new Object[]{}); + return (ConditionValue)result; + } catch (IllegalAccessException e) { + throw new RuntimeException(e); + } catch (java.lang.reflect.InvocationTargetException e) { + throw new RuntimeException(e.getCause()); + } + } + + public void invokeSetterEqual(String columnMultiName, Object value) { + invokeSetter(columnMultiName, value, "equal"); + } + + public void invokeSetterNotEqual(String columnMultiName, Object value) { + invokeSetter(columnMultiName, value, "notEqual"); + } + + public void invokeSetterGreaterThan(String columnMultiName, Object value) { + invokeSetter(columnMultiName, value, "greaterThan"); + } + + public void invokeSetterLessThan(String columnMultiName, Object value) { + invokeSetter(columnMultiName, value, "lessThan"); + } + + public void invokeSetterGreaterEqual(String columnMultiName, Object value) { + invokeSetter(columnMultiName, value, "greaterEqual"); + } + + public void invokeSetterLessEqual(String columnMultiName, Object value) { + invokeSetter(columnMultiName, value, "lessEqual"); + } + + protected void invokeSetter(String columnMultiName, Object value, String conditionKeyName) { + if (value == null) { + return; + } + final DBMeta dbmeta = DBMetaInstanceHandler.getInstanceByTableDbName(getTableDbName()); + final String columnCapPropName = dbmeta.getCapPropNameByMultiName(columnMultiName); + String methodName = "set" + columnCapPropName + "_" + conditionKeyName.substring(0, 1).toUpperCase() + conditionKeyName.substring(1); + java.lang.reflect.Method method = null; + try { + method = this.getClass().getMethod(methodName, new Class[]{value.getClass()}); + } catch (NoSuchMethodException e) { + String msg = "The columnMultiName is not existing in this table: columnMultiName=" + columnMultiName; + msg = msg + " tableName=" + getTableDbName() + " methodName=" + methodName; + throw new RuntimeException(msg, e); + } + try { + method.invoke(this, new Object[]{value}); + } catch (IllegalAccessException e) { + throw new RuntimeException(e); + } catch (java.lang.reflect.InvocationTargetException e) { + throw new RuntimeException(e.getCause()); + } + } + + protected void invokeSetterLikeSearch(String columnMultiName, Object value, LikeSearchOption option) { + if (value == null) { + return; + } + final DBMeta dbmeta = DBMetaInstanceHandler.getInstanceByTableDbName(getTableDbName()); + final String columnCapPropName = dbmeta.getCapPropNameByMultiName(columnMultiName); + String methodName = "set" + columnCapPropName + "_" + "likeSearch".substring(0, 1).toUpperCase() + "likeSearch".substring(1); + java.lang.reflect.Method method = null; + try { + method = this.getClass().getMethod(methodName, new Class[]{value.getClass(), LikeSearchOption.class}); + } catch (NoSuchMethodException e) { + String msg = "The columnMultiName is not existing in this table: columnMultiName=" + columnMultiName; + msg = msg + " tableName=" + getTableDbName() + " methodName=" + methodName; + throw new RuntimeException(msg, e); + } + try { + method.invoke(this, new Object[]{value, option}); + } catch (IllegalAccessException e) { + throw new RuntimeException(e); + } catch (java.lang.reflect.InvocationTargetException e) { + throw new RuntimeException(e.getCause()); + } + } + + public void invokeAddOrderByAsc(String columnMultiName) { + invokeOrderBy(columnMultiName, true); + } + + public void invokeAddOrderByDesc(String columnMultiName) { + invokeOrderBy(columnMultiName, false); + } + + protected void invokeOrderBy(String columnMultiName, boolean isAsc) { + String ascDesc = null; + if (isAsc) { + ascDesc = "Asc"; + } else { + ascDesc = "Desc"; + } + final DBMeta dbmeta = DBMetaInstanceHandler.getInstanceByTableDbName(getTableDbName()); + final String methodName = "addOrderBy_" + dbmeta.getCapPropNameByMultiName(columnMultiName) + "_" + ascDesc; + + java.lang.reflect.Method method = null; + try { + method = this.getClass().getMethod(methodName, new Class[]{}); + } catch (NoSuchMethodException e) { + String msg = "The columnMultiName is not existing in this table: columnMultiName=" + columnMultiName; + msg = msg + " tableName=" + getTableDbName() + " methodName=" + methodName; + throw new RuntimeException(msg, e); + } + try { + method.invoke(this, new Object[]{}); + } catch (IllegalAccessException e) { + throw new RuntimeException(e); + } catch (java.lang.reflect.InvocationTargetException e) { + throw new RuntimeException(e.getCause()); + } + } + + // ===================================================================================== + // Foreign Query + // ============= + /// + /// This method implements the method that is declared at super. + /// + /// Foreign-property-name(Both OK - InitCap or not). (NotNull) + /// Foreign condition-query as interface. + public ConditionQuery getForeignConditionQuery(String foreignPropertyName) { + final String methodName = "query" + foreignPropertyName.substring(0, 1) + foreignPropertyName.substring(1); + java.lang.reflect.Method method = null; + try { + method = this.getClass().getMethod(methodName, new Class[]{}); + } catch (NoSuchMethodException e) { + String msg = "The foreignPropertyName is not existing in this table: foreignPropertyName=" + foreignPropertyName; + msg = msg + " tableName=" + getTableDbName() + " methodName=" + methodName; + throw new RuntimeException(msg, e); + } + try { + return (ConditionQuery)method.invoke(this, new Object[]{}); + } catch (IllegalAccessException e) { + throw new RuntimeException(e); + } catch (java.lang.reflect.InvocationTargetException e) { + throw new RuntimeException(e.getCause()); + } + } + + // ===================================================================================== + // Helper + // ====== + + protected final String replaceString(String text, String fromText, String toText) { + if(text == null || fromText == null || toText == null) + return null; + StringBuffer buf = new StringBuffer(100); + int pos = 0; + int pos2 = 0; + do { + pos = text.indexOf(fromText, pos2); + if(pos == 0) { + buf.append(toText); + pos2 = fromText.length(); + } else + if(pos > 0) { + buf.append(text.substring(pos2, pos)); + buf.append(toText); + pos2 = pos + fromText.length(); + } else { + buf.append(text.substring(pos2)); + return buf.toString(); + } + } while(true); + } + + /** + * Filter removing empty-string. + * If the value is null or empty-string, returns null. + * + * @param value Query-value-string. (Nullable) + * @return Filtered value. (Nullable) + */ + protected String filterRemoveEmptyString(String value) { + return ((value != null && !"".equals(value)) ? value : null); + } + + /** + * Filter removing empty-string from the list. + * If the list is null or empty-string, returns null. + * + * @param ls List. (Nullable) + * @return Filtered list. (Nullable) + */ + protected java.util.List filterRemoveEmptyStringFromList(java.util.List ls) { + if (ls == null) { + return null; + } + java.util.List newList = new java.util.ArrayList(); + for (final java.util.Iterator ite = ls.iterator(); ite.hasNext(); ) { + final String str = (String)ite.next(); + if ("".equals(str)) { + continue; + } + newList.add(str); + } + return newList; + } + + // ---------------------------------------------------------------- + // Assert Object + // ------------- + /** + * Assert that the object is not null. + * + * @param variableName Variable name. (NotNull) + * @param value Value. (NotNull) + * @exception IllegalArgumentException + */ + protected void assertObjectNotNull(String variableName, Object value) { + if (variableName == null) { + String msg = "The value should not be null: variableName=" + variableName + " value=" + value; + throw new IllegalArgumentException(msg); + } + if (value == null) { + String msg = "The value should not be null: variableName=" + variableName; + throw new IllegalArgumentException(msg); + } + } + + /** + * Assert that the column-name is not null and is not emtpy and does not contain comma. + * + * @param columnName Column-name. (NotNull) + * @exception IllegalArgumentException + */ + protected void assertColumnName(String columnName) { + if (columnName == null) { + String msg = "The columnName should not be null."; + throw new IllegalArgumentException(msg); + } + if (columnName.trim().length() == 0) { + String msg = "The columnName should not be empty-string."; + throw new IllegalArgumentException(msg); + } + if (columnName.indexOf(",") >= 0) { + String msg = "The columnName should not contain comma ',': " + columnName; + throw new IllegalArgumentException(msg); + } + } + + /** + * Assert that the alias-name is not null and is not emtpy and does not contain comma. + * + * @param aliasName Alias-name. (NotNull) + * @exception IllegalArgumentException + */ + protected void assertAliasName(String aliasName) { + if (aliasName == null) { + String msg = "The aliasName should not be null."; + throw new IllegalArgumentException(msg); + } + if (aliasName.trim().length() == 0) { + String msg = "The aliasName should not be empty-string."; + throw new IllegalArgumentException(msg); + } + if (aliasName.indexOf(",") >= 0) { + String msg = "The aliasName should not contain comma ',': " + aliasName; + throw new IllegalArgumentException(msg); + } + } + + + // ---------------------------------------------------------------- + // Assert String + // ------------- + /** + * Assert that the entity is not null and not trimmed empty. + * + * @param variableName Variable name. (NotNull) + * @param value Value. (NotNull) + */ + protected void assertStringNotNullAndNotTrimmedEmpty(String variableName, String value) { + assertObjectNotNull("variableName", variableName); + assertObjectNotNull("value", value); + if (value.trim().length() ==0) { + String msg = "The value should not be empty: variableName=" + variableName + " value=" + value; + throw new IllegalArgumentException(msg); + } + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/ConditionBean.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/ConditionBean.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/ConditionBean.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,165 @@ +package jp.sf.pal.pompei.allcommon.cbean; + +import jp.sf.pal.pompei.allcommon.cbean.sqlclause.SqlClause; + +/** + * The interface of condition-bean. + * + * @author DBFlute(AutoGenerator) + */ +public interface ConditionBean extends PagingBean { + + // ===================================================================================== + // Definition + // ========== + /** Map-string map-mark. */ + public static final String MAP_STRING_MAP_MARK = "map:"; + + /** Map-string list-mark. */ + public static final String MAP_STRING_LIST_MARK = "list:"; + + /** Map-string start-brace. */ + public static final String MAP_STRING_START_BRACE = "@{"; + + /** Map-string end-brace. */ + public static final String MAP_STRING_END_BRACE = "@}"; + + /** Map-string delimiter. */ + public static final String MAP_STRING_DELIMITER = "@;"; + + /** Map-string equal. */ + public static final String MAP_STRING_EQUAL = "@="; + + // ===================================================================================== + // Table Name + // ========== + /** + * Get table db-name. + * + * @return Table db-name. (NotNull) + */ + public String getTableDbName(); + + // ===================================================================================== + // Sql-Clause + // ========== + /** + * Get sql-clause instance. + * + * @return Sql-clause. (NotNull) + */ + public SqlClause getSqlClause(); + + // ===================================================================================== + // Primary-Key + // =========== + /** + * Accept primary-key map-string. + * + * @param primaryKeyMap Primary-key map. (NotNull and NotEmpty) + */ + public void acceptPrimaryKeyMap(java.util.Map primaryKeyMap); + + /** + * Accept primary-key map-string. Delimiter is at-mark and semicolon. + * + * @param primaryKeyMapString Primary-key map. (NotNull and NotEmpty) + */ + public void acceptPrimaryKeyMapString(String primaryKeyMapString); + + // ===================================================================================== + // Order-By + // ======== + /** + * Add order-by PrimaryKey asc. {order by primaryKey1 asc, primaryKey2 asc...} + * + * @return this. (NotNull) + */ + public ConditionBean addOrderBy_PK_Asc(); + + /** + * Add order-by PrimaryKey desc. {order by primaryKey1 desc, primaryKey2 desc...} + * + * @return this. (NotNull) + */ + public ConditionBean addOrderBy_PK_Desc(); + + // ===================================================================================== + // Query + // ===== + /** + * Get condition-query as interface. + * + * @return Instance of query as interface. (NotNull) + */ + public ConditionQuery getConditionQueryAsInterface(); + + // ===================================================================================== + // Union-Query + // =========== + public boolean hasUnionQueryOrUnionAllQuery(); + + // ===================================================================================== + // Limit-Select + // ============ + /** + * Limit select PK only. + * + * @return this. (NotNull) + */ + public ConditionBean limitSelect_PKOnly(); + + /** + * Limit select off. + * + * @return this. (NotNull) + */ + public ConditionBean limitSelect_Off(); + + /** + * Is limit-select PK only? + * + * @return Determination. + */ + public boolean isLimitSelect_PKOnly(); + + // ===================================================================================== + // Advance + // ======= + /** + * Lock for update. + * + * If you invoke this, your SQL lock target records for update. + * It depends whether this method supports this on the database type. + * + * @return this. (NotNull) + */ + public ConditionBean lockForUpdate(); + + // ------------------------------ + // for Internal + // ------------ + /** + * Set up various things for select-count-ignore-fetch-scope. {Internal} + * This method is for INTERNAL. Don't invoke this! + * + * @return this. (NotNull) + */ + public ConditionBean xsetupSelectCountIgnoreFetchScope(); + + /** + * Do after-care for select-count-ignore-fetch-scope. {Internal} + * This method is for INTERNAL. Don't invoke this! + * + * @return this. (NotNull) + */ + public ConditionBean xafterCareSelectCountIgnoreFetchScope(); + + /** + * Is set up various things for select-count-ignore-fetch-scope? {Internal} + * This method is for INTERNAL. Don't invoke this! + * + * @return Determination. + */ + public boolean isSelectCountIgnoreFetchScope(); +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/ConditionBeanContext.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/ConditionBeanContext.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/ConditionBeanContext.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,195 @@ +package jp.sf.pal.pompei.allcommon.cbean; + +import jp.sf.pal.pompei.allcommon.cbean.sqlclause.*; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +/** + * Condition-Bean context. (referring to s2pager) + * + * @author DBFlute(AutoGenerator) + */ +public class ConditionBeanContext { + + /** Log-instance. */ + private static final Log _log = LogFactory.getLog(ConditionBeanContext.class); + + // ===================================================================================== + // Thread Local + // ============ + /** The thread-local for this. */ + private static final ThreadLocal _threadLocal = new ThreadLocal(); + + /** + * Get condition-bean on thread. + * + * @return Condition-bean context. (Nullable) + */ + public static ConditionBean getConditionBeanOnThread() { + return (ConditionBean)_threadLocal.get(); + } + + /** + * Set condition-bean on thread. + * + * @param cb Condition-bean. (NotNull) + */ + public static void setConditionBeanOnThread(ConditionBean cb) { + if (cb == null) { + String msg = "The argument[cb] must not be null."; + throw new IllegalArgumentException(msg); + } + _threadLocal.set(cb); + } + + /** + * Is existing condition-bean on thread? + * + * @return Determination. + */ + public static boolean isExistConditionBeanOnThread() { + return (_threadLocal.get() != null); + } + + /** + * Clear condition-bean on thread. + */ + public static void clearConditionBeanOnThread() { + _threadLocal.set(null); + } + + // ===================================================================================== + // Initialize against LinkageError + // =============================== + public static void initialize() { + // Stop the LinkageError! + { + final Class clazz = jp.sf.pal.pompei.allcommon.cbean.SimplePagingBean.class; + _log.debug("Loading class of " + clazz.getName() + ": " + clazz.getClassLoader()); + } + { + final Class clazz = jp.sf.pal.pompei.allcommon.cbean.coption.FromToOption.class; + _log.debug("Loading class of " + clazz.getName() + ": " + clazz.getClassLoader()); + } + { + final Class clazz = jp.sf.pal.pompei.allcommon.cbean.coption.LikeSearchOption.class; + _log.debug("Loading class of " + clazz.getName() + ": " + clazz.getClassLoader()); + } + { + final Class clazz = jp.sf.pal.pompei.allcommon.cbean.coption.InScopeOption.class; + _log.debug("Loading class of " + clazz.getName() + ": " + clazz.getClassLoader()); + } + } + + // ===================================================================================== + // Type Judgement + // ============== + /** + * Is the argument condition-bean? + * + * @param dtoInstance Dto instance. + * @return Determination. + */ + public static boolean isTheArgumentConditionBean(final Object dtoInstance) { + if (dtoInstance instanceof ConditionBean) { + return true; + } else { + return false; + } + } + + /** + * Is the type condition-bean? + * + * @param dtoClass DtoClass. + * @return Determination. + */ + public static boolean isTheTypeConditionBean(final Class dtoClass) { + if (ConditionBean.class.isAssignableFrom(dtoClass)) { + return true; + } else { + return false; + } + } + + // ===================================================================================== + // Product Name + // ============ + /** The database product name. */ + private static String _databaseProductName; + + /** + * Get database product name. + * + * @return Database product name. + */ + public static String getDatabaseProductName() { + return _databaseProductName; + } + + /** + * Set database product name. + * + * @param name Database product name. (NotNull) + */ + public static void setDatabaseProductName(String name) { + if (_databaseProductName != null) { + String msg = "Already set up: current=" + _databaseProductName + " your=" + name; + throw new IllegalStateException(msg); + } + _databaseProductName = name; + } + + // ===================================================================================== + // Column Alias + // ============ + public static final java.util.Map> _selectClauseColumnAliasContainerMap = new java.util.HashMap>(); + + public static void addColumnAliasInfo(Class conditionBeanClass, String columnFullName, String columnAliasName) { + if (_selectClauseColumnAliasContainerMap.containsKey(conditionBeanClass)) { + final java.util.Map selectClauseColumnAliasMap = (java.util.Map)_selectClauseColumnAliasContainerMap.get(conditionBeanClass); + selectClauseColumnAliasMap.put(columnFullName, columnAliasName); + } else { + final java.util.Map selectClauseColumnAliasMap = new java.util.HashMap(); + _selectClauseColumnAliasContainerMap.put(conditionBeanClass, selectClauseColumnAliasMap); + selectClauseColumnAliasMap.put(columnFullName, columnAliasName); + } + } + + public static java.util.Map getSelectClauseColumnAliasMap(Class conditionBeanClass) { + return (java.util.Map)_selectClauseColumnAliasContainerMap.get(conditionBeanClass); + } + + // ===================================================================================== + // Creator + // ======= + public static SqlClause createSqlClause(ConditionBean cb) { + final String tableDbName = cb.getTableDbName(); + return createSqlClause(tableDbName); + } + + public static SqlClause createSqlClause(String tableDbName) { + final String databaseProductName = getDatabaseProductName(); + if (databaseProductName == null) { + return new SqlClauseDerby(tableDbName); + } + final String name = databaseProductName.toLowerCase(); + if (name.startsWith("derby")) { + return new SqlClauseDerby(tableDbName); + } else if (name.startsWith("oracle")) { + return new SqlClauseOracle(tableDbName); + } else if (name.startsWith("firebird")) { + return new SqlClauseFirebird(tableDbName); + } else if (name.startsWith("mysql")) { + return new SqlClauseMySql(tableDbName); + } else if (name.startsWith("postgre")) { + return new SqlClausePostgreSql(tableDbName); + } else if (name.startsWith("mssql")) { + return new SqlClauseSqlServer(tableDbName); + } else if (name.startsWith("db2")) { + return new SqlClauseDb2(tableDbName); + } else { + return new SqlClauseDerby(tableDbName); + } + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/ConditionQuery.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/ConditionQuery.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/ConditionQuery.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,105 @@ +package jp.sf.pal.pompei.allcommon.cbean; + +import jp.sf.pal.pompei.allcommon.cbean.cvalue.ConditionValue; +import jp.sf.pal.pompei.allcommon.cbean.sqlclause.SqlClause; + +/** + * The condition-query as interface. + * + * @author DBFlute(AutoGenerator) + */ +public interface ConditionQuery { + + // ===================================================================================== + // Accessor + // ======== + /** + * Get table db-name. + * + * @return Table db-name. (NotNull) + */ + public String getTableDbName(); + + /** + * Get real alias name(that has nest level mark). + * + * @return Real alias name. + */ + public String getRealAliasName(); + + /** + * Get real column name(with real alias name). + * + * @param columnName Column name without alias name. + * @return Real column name. + */ + public String getRealColumnName(String columnName); + + /** + * Get child query. + * + * @return Child query. (Nullable) + */ + public ConditionQuery getChildQuery(); + + /** + * Get sql clause. + * + * @return Sql clause. (NotNull) + */ + public SqlClause getSqlClause(); + + /** + * Get alias name. + * + * @return Alias name. (NotNull) + */ + public String getAliasName(); + + /** + * Get nest level. + * + * @return Nest level. + */ + public int getNestLevel(); + + /** + * Get next nest level. + * + * @return Next nest level. + */ + public int getNextNestLevel(); + + /** + * Is base query? + * + * @param query Condition query. (NotNull) + * @return Determination. + */ + public boolean isBaseQuery(ConditionQuery query); + + // ===================================================================================== + // Invoke + // ====== + public ConditionValue invokeGetter(String columnMultiName); + + public void invokeSetterEqual(String columnMultiName, Object value); + public void invokeSetterNotEqual(String columnMultiName, Object value); + public void invokeSetterGreaterThan(String columnMultiName, Object value); + public void invokeSetterLessThan(String columnMultiName, Object value); + public void invokeSetterGreaterEqual(String columnMultiName, Object value); + public void invokeSetterLessEqual(String columnMultiName, Object value); + + public void invokeAddOrderByAsc(String columnMultiName); + public void invokeAddOrderByDesc(String columnMultiName); + + // ===================================================================================== + // Foregin-Query + // ============= + /// + /// Get foreign condition-query. + /// + /// Foreign-property-name(Both OK - InitCap or not). (NotNull) + /// Foreign condition-query as interface. + public ConditionQuery getForeignConditionQuery(String foreignPropertyName); +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/FetchNarrowingBean.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/FetchNarrowingBean.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/FetchNarrowingBean.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,44 @@ +package jp.sf.pal.pompei.allcommon.cbean; + +/** + * The condition-bean as interface. + * + * @author DBFlute(AutoGenerator) + */ +public interface FetchNarrowingBean { + + /** + * Get fetch start index. + * + * @return Fetch start index. + */ + public int getFetchNarrowingSkipStartIndex(); + + /** + * Get fetch size. + * + * @return Fetch size. + */ + public int getFetchNarrowingLoopCount(); + + /** + * Is fetch start index supported? + * + * @return Determination. + */ + public boolean isFetchNarrowingSkipStartIndexEffective(); + + /** + * Is fetch size supported? + * + * @return Determination. + */ + public boolean isFetchNarrowingLoopCountEffective(); + + /** + * Is fetch-narrowing effective? + * + * @return Determiantion. + */ + public boolean isFetchNarrowingEffective(); +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/FetchNarrowingBeanContext.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/FetchNarrowingBeanContext.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/FetchNarrowingBeanContext.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,78 @@ +package jp.sf.pal.pompei.allcommon.cbean; + +/** + * Fetch-Narrowing-Bean context. (referring to s2pager) + * + * @author DBFlute(AutoGenerator) + */ +public class FetchNarrowingBeanContext { + + /** The thread-local for this. */ + private static ThreadLocal _threadLocal = new ThreadLocal(); + + /** + * Get fetch-narrowing-bean on thread. + * + * @return Condition-bean context. (Nullable) + */ + public static FetchNarrowingBean getFetchNarrowingBeanOnThread() { + return (FetchNarrowingBean)_threadLocal.get(); + } + + /** + * Set fetch-narrowing-bean on thread. + * + * @param cb Condition-bean. (NotNull) + */ + public static void setFetchNarrowingBeanOnThread(FetchNarrowingBean cb) { + if (cb == null) { + String msg = "The argument[cb] must not be null."; + throw new IllegalArgumentException(msg); + } + _threadLocal.set(cb); + } + + /** + * Is existing fetch-narrowing-bean on thread? + * + * @return Determination. + */ + public static boolean isExistFetchNarrowingBeanOnThread() { + return (_threadLocal.get() != null); + } + + /** + * Clear fetch-narrowing-bean on thread. + */ + public static void clearFetchNarrowingBeanOnThread() { + _threadLocal.set(null); + } + + /** + * Is the argument fetch-narrowing-bean? + * + * @param dtoInstance Dto instance. + * @return Determination. + */ + public static boolean isTheArgumentFetchNarrowingBean(final Object dtoInstance) { + if (dtoInstance instanceof FetchNarrowingBean) { + return true; + } else { + return false; + } + } + + /** + * Is the type fetch-narrowing-bean? + * + * @param dtoClass DtoClass. + * @return Determination. + */ + public static boolean isTheTypeFetchNarrowingBean(final Class dtoClass) { + if (FetchNarrowingBean.class.isAssignableFrom(dtoClass)) { + return true; + } else { + return false; + } + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/ListResultBean.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/ListResultBean.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/ListResultBean.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,318 @@ +package jp.sf.pal.pompei.allcommon.cbean; + +import jp.sf.pal.pompei.allcommon.cbean.mapping.EntityDtoMapper; +import jp.sf.pal.pompei.allcommon.cbean.grouping.GroupingOption; +import jp.sf.pal.pompei.allcommon.cbean.grouping.GroupingRowEndDeterminer; +import jp.sf.pal.pompei.allcommon.cbean.grouping.GroupingRowResource; +import jp.sf.pal.pompei.allcommon.cbean.grouping.GroupingRowSetupper; +import jp.sf.pal.pompei.allcommon.cbean.sqlclause.OrderByClause; + +/** + * The list-result-bean for ListResultBean. + * + * @param The generic template for 'selectedList'. + * @author DBFlute(AutoGenerator) + */ +public class ListResultBean implements java.util.List, java.io.Serializable { + + /** Serial version UID. (Default) */ + private static final long serialVersionUID = 1L; + + // ===================================================================================== + // Attribute + // ========= + /** The value of table db-name. */ + protected String _tableDbName; + + /** The value of all record count. */ + protected int _allRecordCount; + + /** Selected list. */ + protected java.util.List _selectedList = new java.util.ArrayList(); + + /** Order-by clause. */ + protected OrderByClause _orderByClause = new OrderByClause(); + + // ===================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + public ListResultBean() { + } + + // ===================================================================================== + // Getter Setter + // ============= + /** + * Get the value of tableDbName. + * + * @return The value of tableDbName. + */ + public String getTableDbName() { + return _tableDbName; + } + + /** + * Set the value of tableDbName. + * + * @param tableDbName The value of tableDbName. + */ + public void setTableDbName(String tableDbName) { + _tableDbName = tableDbName; + } + + /** + * Get the value of allRecordCount. + * + * @return The value of allRecordCount. + */ + public int getAllRecordCount() { + return _allRecordCount; + } + + /** + * Set the value of allRecordCount. + * + * @param allRecordCount The value of allRecordCount. + */ + public void setAllRecordCount(int allRecordCount) { + _allRecordCount = allRecordCount; + } + + /** + * Get the value of selectedList. + * + * @return Selected list. (NotNull) + */ + public java.util.List getSelectedList() { + return _selectedList; + } + + /** + * Set the value of selectedList. + * + * @param selectedList Selected list. (NotNull) + */ + public void setSelectedList(java.util.List selectedList) { + _selectedList = selectedList; + } + + /** + * Get the value of orderByClause. + * + * @return The value of orderByClause. (NotNull) + */ + public OrderByClause getOrderByClause() { + return _orderByClause; + } + + /** + * Set the value of orderByClause. + * + * @param orderByClause The value of orderByClause. (NotNull) + */ + public void setOrderByClause(OrderByClause orderByClause) { + _orderByClause = orderByClause; + } + + // ===================================================================================== + // Grouping + // ======== + public java.util.List groupingList(GroupingRowSetupper groupingRowSetupper, GroupingOption groupingOption) { + final java.util.List groupingList = new java.util.ArrayList(); + GroupingRowEndDeterminer rowEndDeterminer = groupingOption.getGroupingRowEndDeterminer(); + if (rowEndDeterminer == null) { + rowEndDeterminer = new GroupingRowEndDeterminer() { + public boolean determine(int columnIndex, int columnCount, GroupingRowResource rowResource, ENTITY nextEntity) { + return columnIndex == (columnCount-1); + } + };// as Default + } + GroupingRowResource rowResource = new GroupingRowResource(); + int columnCount = groupingOption.getColumnCount(); + int columnIndex = 0; + int rowIndex = 0; + for (ENTITY entity : _selectedList) { + // Set up row resource. + rowResource.addGroupingRowList(entity); + + if (_selectedList.size() == (rowIndex + 1)) {// Last Loop! + // Callback! + final ROW groupingRowObject = groupingRowSetupper.setup(rowResource); + + // Register! + groupingList.add(groupingRowObject); + break; + } + + ENTITY nextElement = null; + if (_selectedList.size() > (rowIndex + 1)) {; + nextElement = _selectedList.get(rowIndex); + } + + // Do at row end. + if (rowEndDeterminer.determine(columnIndex, columnCount, rowResource, nextElement)) { + // Callback! + final ROW groupingRowObject = groupingRowSetupper.setup(rowResource); + + // Register! + groupingList.add(groupingRowObject); + + // Initialize! + rowResource = new GroupingRowResource(); + columnIndex = 0; + ++rowIndex; + continue; + } + ++columnIndex; + ++rowIndex; + } + return groupingList; + } + + // ===================================================================================== + // Mapping + // ======= + public ListResultBean mappingList(EntityDtoMapper entityDtoMapper) { + final ListResultBean mappingList = new ListResultBean(); + for (ENTITY entity : _selectedList) { + mappingList.add(entityDtoMapper.map(entity)); + } + mappingList.setTableDbName(getTableDbName()); + mappingList.setAllRecordCount(getAllRecordCount()); + mappingList.setOrderByClause(getOrderByClause()); + return mappingList; + } + + // ===================================================================================== + // Determination + // ============= + /** + * Has this result selected? + *
+     * If isSetterInvokedSelectedList is true, returns true.
+     * 
+ * + * @return Determination. + */ + public boolean isSelectedResult() { + return _tableDbName != null; + } + + // ===================================================================================== + // Basic Override + // ============== + /** + * This method overrides the method that is declared at super. + * + * @return View-string of all-columns value. + */ + public String toString() { + final StringBuffer sb = new StringBuffer(); + + sb.append(" tableDbName=").append(_tableDbName); + sb.append(" allRecordCount=").append(_tableDbName); + sb.append(" selectedList.size()=").append(_selectedList.size()); + sb.append(" orderByClause=").append(_orderByClause); + + return sb.toString(); + } + + // ===================================================================================== + // List Elements + // ============= + public boolean add(ENTITY o) { + return _selectedList.add(o); + } + + public boolean addAll(java.util.Collection c) { + return _selectedList.addAll(c); + } + + public void clear() { + _selectedList.clear(); + } + + public boolean contains(Object o) { + return _selectedList.contains(o); + } + + public boolean containsAll(java.util.Collection c) { + return _selectedList.containsAll(c); + } + + public boolean isEmpty() { + return _selectedList.isEmpty(); + } + + public java.util.Iterator iterator() { + return _selectedList.iterator(); + } + + public boolean remove(Object o) { + return _selectedList.remove(o); + } + + public boolean removeAll(java.util.Collection c) { + return _selectedList.removeAll(c); + } + + public boolean retainAll(java.util.Collection c) { + return _selectedList.retainAll(c); + } + + public int size() { + return _selectedList.size(); + } + + public Object[] toArray() { + return _selectedList.toArray(); + } + + public TYPE[] toArray(TYPE[] a) { + return _selectedList.toArray(a); + } + + public void add(int index, ENTITY element) { + _selectedList.add(index, element); + } + + public boolean addAll(int index, java.util.Collection c) { + return _selectedList.addAll(index, c); + } + + public ENTITY get(int index) { + return _selectedList.get(index); + } + + public int indexOf(Object o) { + return _selectedList.indexOf(o); + } + + public int lastIndexOf(Object o) { + return _selectedList.lastIndexOf(o); + } + + public java.util.ListIterator listIterator() { + return _selectedList.listIterator(); + } + + public java.util.ListIterator listIterator(int index) { + return _selectedList.listIterator(index); + } + + public ENTITY remove(int index) { + return _selectedList.remove(index); + } + + public ENTITY set(int index, ENTITY element) { + return _selectedList.set(index, element); + } + + public java.util.List subList(int fromIndex, int toIndex) { + return _selectedList.subList(fromIndex, toIndex); + } + +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/OrderByBean.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/OrderByBean.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/OrderByBean.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,78 @@ +package jp.sf.pal.pompei.allcommon.cbean; + +import jp.sf.pal.pompei.allcommon.cbean.sqlclause.OrderByClause; + +/** + * The order-by-bean as interface. + * + * @author DBFlute(AutoGenerator) + */ +public interface OrderByBean extends SelectResource { + + /** + * Get sql component of order-by clause. + * + * @return Sql component of order-by clause. (NotNull) + */ + public OrderByClause getSqlComponentOfOrderByClause(); + + /** + * Get order-by clause. + * + * @return Order-by clause. (NotNull) + */ + public String getOrderByClause(); + + /** + * Clear order-by. + * + * @return this. (NotNull) + */ + public OrderByBean clearOrderBy(); + + /** + * Ignore order-by. + * + * @return this. (NotNull) + */ + public OrderByBean ignoreOrderBy(); + + /** + * Make order-by effective. + * + * @return this. (NotNull) + */ + public OrderByBean makeOrderByEffective(); + + /** + * Register order-by-asc. + * + * @param orderByProperty Order-by-property. 'aliasName.columnName/aliasName.columnName/...' (NotNull) + * @return this. (NotNull) + */ + public OrderByBean registerOrderByAsc(String orderByProperty); + + /** + * Register order-by-desc. + * + * @param orderByProperty Order-by-property. 'aliasName.columnName/aliasName.columnName/...' (NotNull) + * @return this. (NotNull) + */ + public OrderByBean registerOrderByDesc(String orderByProperty); + + /** + * Reverse order-by or Override order-by asc. + * + * @param orderByProperty Order-by-property. 'aliasName.columnName/aliasName.columnName/...' (NotNull) + * @return this. (NotNull) + */ + public OrderByBean reverseOrderBy_Or_OverrideOrderByAsc(String orderByProperty); + + /** + * Reverse order-by or Override order-by desc. + * + * @param orderByProperty Order-by-property. 'aliasName.columnName/aliasName.columnName/...' (NotNull) + * @return this. (NotNull) + */ + public OrderByBean reverseOrderBy_Or_OverrideOrderByDesc(String orderByProperty); +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/PagingBean.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/PagingBean.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/PagingBean.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,108 @@ +package jp.sf.pal.pompei.allcommon.cbean; + +/** + * The interface of paging-bean. + * + * @author DBFlute(AutoGenerator) + */ +public interface PagingBean extends FetchNarrowingBean, OrderByBean { + + /** + * Fetch first. + * + * If you invoke this, your SQL returns [fetch-size] records from first. + * + * @param fetchSize Fetch-size. (NotMinus & NotZero) + * @return this. (NotNUll) + */ + public PagingBean fetchFirst(int fetchSize); + + /** + * Fetch scope. + * + * If you invoke this, your SQL returns [fetch-size] records from [fetch-start-index]. + * + * @param fetchStartIndex Fetch-start-index. 0 origin. (NotMinus) + * @param fetchSize Fetch-size. (NotMinus & NotZero) + * @return this. (NotNUll) + */ + public PagingBean fetchScope(int fetchStartIndex, int fetchSize); + + /** + * Fetch page. + * + * When you invoke this, it is normally necessary to invoke 'fetchFirst()' or 'fetchScope()' ahead of that. + * But you also can use default-fetch-size without invoking 'fetchFirst()' or 'fetchScope()'. + * If you invoke this, your SQL returns [fetch-size] records from [fetch-start-index] calculated by [fetch-page-number]. + * + * @param fetchPageNumber Fetch-page-number. 1 origin. (NotMinus & NotZero) + * @return this. (NotNull) + */ + public PagingBean fetchPage(int fetchPageNumber); + + /** + * Get fetch-start-index. + * + * @return Fetch-start-index. + */ + public int getFetchStartIndex(); + + /** + * Get fetch-size. + * + * @return Fetch-size. + */ + public int getFetchSize(); + + /** + * Get fetch-page-number. + * + * @return Fetch-page-number. + */ + public int getFetchPageNumber(); + + /** + * Get page start index. + * + * @return Page start index. 0 origin. (NotMinus) + */ + public int getPageStartIndex(); + + /** + * Get page end index. + * + * @return Page end index. 0 origin. (NotMinus) + */ + public int getPageEndIndex(); + + /** + * Is fetch scope effective? + * + * @return Determiantion. + */ + public boolean isFetchScopeEffective(); + + // ===================================================================================== + // For SqlComment + // ============== + /** + * Get select-hint. {select [select-hint] * from table...} + * + * @return Select-hint. (NotNull) + */ + public String getSelectHint(); + + /** + * Get from-hint. {select * from table [from-hint] where ...} + * + * @return From-hint. (NotNull) + */ + public String getFromHint(); + + /** + * Get sql-suffix. {select * from table where ... order by ... [sql-suffix]} + * + * @return Sql-suffix. (NotNull) + */ + public String getSqlSuffix(); +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/PagingResultBean.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/PagingResultBean.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/PagingResultBean.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,521 @@ +package jp.sf.pal.pompei.allcommon.cbean; + +import jp.sf.pal.pompei.allcommon.cbean.mapping.EntityDtoMapper; +/** + * The paging-result-bean for PagingResultBean. + * + * @param The generic template for 'selectedList'. + * @author DBFlute(AutoGenerator) + */ +public class PagingResultBean extends ListResultBean { + + /** Serial version UID. (Default) */ + private static final long serialVersionUID = 1L; + + // ===================================================================================== + // Attribute + // ========= + /** The value of current page number. */ + protected int _pageSize; + + /** The value of current page number. */ + protected int _currentPageNumber; + + // ----------------------------------------- + // Page Range + // ---------- + /** The value of page-range option. */ + protected PageRangeOption _pageRangeOption; + + // ----------------------------------------- + // Page Group + // ---------- + /** The value of page-group option. */ + protected PageGroupOption _pageGroupOption; + + // ===================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + public PagingResultBean() { + } + + // ===================================================================================== + // Accessor + // ======== + /** + * Get the value of pageSize. + * + * @return The value of pageSize. + */ + public int getPageSize() { + return _pageSize; + } + + /** + * Set the value of pageSize. + * + * @param pageSize The value of pageSize. + */ + public void setPageSize(int pageSize) { + _pageSize = pageSize; + } + + /** + * Get the value of currentPageNumber. + * + * @return The value of currentPageNumber. + */ + public int getCurrentPageNumber() { + return _currentPageNumber; + } + + /** + * Set the value of currentPageNumber. + * + * @param currentPageNumber The value of currentPageNumber. + */ + public void setCurrentPageNumber(int currentPageNumber) { + _currentPageNumber = currentPageNumber; + } + + /** + * Get the value of allPageCount. + * + * @return The value of allPageCount. + */ + public int getAllPageCount() { + return calculateAllPageCount(_allRecordCount, _pageSize); + } + + /** + * Get the value of currentStartRecordNumber. + * + * @return The value of currentStartRecordNumber. + */ + public int getCurrentStartRecordNumber() { + return calculateCurrentStartRecordNumber(_currentPageNumber, _pageSize); + } + + /** + * Get the value of currentEndRecordNumber. + * + * @return The value of currentEndRecordNumber. + */ + public int getCurrentEndRecordNumber() { + return calculateCurrentEndRecordNumber(_currentPageNumber, _pageSize); + } + + // ----------------------------------------- + // Page Range + // ---------- + /** + * Get the value of pageRangeSize. + * + * @return The value of pageRangeSize. + */ + public int getPageRangeSize() { + return _pageRangeOption != null ? _pageRangeOption.getPageRangeSize() : 0; + } + + /** + * Set the value of pageRangeSize. + * + * @param pageRangeSize The value of pageRangeSize. + */ + public void setPageRangeSize(int pageRangeSize) { + final PageRangeOption option = new PageRangeOption(); + option.setPageRangeSize(pageRangeSize); + setPageRangeOption(option); + } + + /** + * Set the value of pageRangeOption. + * + * @param pageRangeOption The value of pageRangeOption. + */ + public void setPageRangeOption(PageRangeOption pageRangeOption) { + _pageRangeOption = pageRangeOption; + } + + public static class PageRangeOption { + protected int _pageRangeSize; + + protected boolean _fillLimit; + + public int getPageRangeSize() { + return _pageRangeSize; + } + + public void setPageRangeSize(int pageRangeSize) { + _pageRangeSize = pageRangeSize; + } + + public boolean isFillLimit() { + return _fillLimit; + } + + public void setFillLimit(boolean fillLimit) { + _fillLimit = fillLimit; + } + } + + // ----------------------------------------- + // Page Group + // ---------- + /** + * Get the value of pageGroupSize. + * + * @return The value of pageGroupSize. + */ + public int getPageGroupSize() { + return _pageGroupOption != null ? _pageGroupOption.getPageGroupSize() : 0; + } + + /** + * Set the value of pageGroupSize. + * + * @param value The value of pageGroupSize. + */ + public void setPageGroupSize(int pageGroupSize) { + final PageGroupOption option = new PageGroupOption(); + option.setPageGroupSize(pageGroupSize); + setPageGroupOption(option); + } + + /** + * Set the value of pageGroupOption. + * + * @param pageGroupOption The value of pageGroupOption. + */ + public void setPageGroupOption(PageGroupOption pageGroupOption) { + _pageGroupOption = pageGroupOption; + } + + public static class PageGroupOption { + protected int _pageGroupSize; + + public int getPageGroupSize() { + return _pageGroupSize; + } + + public void setPageGroupSize(int pageGroupSize) { + _pageGroupSize = pageGroupSize; + } + } + + // ===================================================================================== + // Mapping + // ======= + public PagingResultBean mappingList(EntityDtoMapper entityDtoMapper) { + final ListResultBean ls = super.mappingList(entityDtoMapper); + final PagingResultBean mappingList = new PagingResultBean(); + mappingList.setSelectedList(ls.getSelectedList()); + mappingList.setTableDbName(getTableDbName()); + mappingList.setAllRecordCount(getAllRecordCount()); + mappingList.setOrderByClause(getOrderByClause()); + mappingList.setPageSize(getPageSize()); + mappingList.setCurrentPageNumber(getCurrentPageNumber()); + mappingList.setPageRangeOption(_pageRangeOption); + mappingList.setPageGroupOption(_pageGroupOption); + return mappingList; + } + + // ===================================================================================== + // Calculate + // ========= + // ------------------------------------------- + // Page + // ---- + /** + * Calculate all page count. + * + * @param allRecordCount All record count. + * @param pageSize Fetch-size. + * @return All page count. + */ + protected int calculateAllPageCount(int allRecordCount, int pageSize) { + if (allRecordCount == 0) { + return 1; + } + int pageCountBase = (allRecordCount / pageSize); + if (allRecordCount % pageSize > 0) { + pageCountBase++; + } + return pageCountBase; + } + + protected int calculateCurrentStartRecordNumber(int currentPageNumber, int pageSize) { + return ((currentPageNumber - 1) * pageSize) + 1; + } + + protected int calculateCurrentEndRecordNumber(int currentPageNumber, int pageSize) { + return calculateCurrentStartRecordNumber(currentPageNumber, pageSize) + _selectedList.size() - 1; + } + + /** + * Is existing previous page? + * Using values are currentPageNumber. + * + * @return Determination. + */ + public boolean isExistPrePage() { + return (_allRecordCount > 0 && _currentPageNumber > 1); + } + + /** + * Is existing next page? + * Using values are currentPageNumber and allPageCount. + * + * @return Determination. + */ + public boolean isExistNextPage() { + return (_allRecordCount > 0 && _currentPageNumber < getAllPageCount()); + } + + // ------------------------------------------- + // Page Range + // ---------- + /** + * Get current page-range page-number-list. + * Using values are pageRangeOption and currentPageNumber and allPageCount. + * + * @return Current page-range page-number-list. (NotNull) + */ + public java.util.List getCurrentPageRangePageNumberList() { + assertPageRangeValid(); + final int pageRangeSize = _pageRangeOption.getPageRangeSize(); + final int allPageCount = this.getAllPageCount(); + final int currentPageNumber = _currentPageNumber; + + final java.util.List resultList = new java.util.ArrayList(); + for (int i = currentPageNumber - pageRangeSize; i < currentPageNumber; i++) { + if (i < 1) { + continue; + } + resultList.add(new Integer(i)); + } + + resultList.add(new Integer(currentPageNumber)); + + final int endPageNumber = (currentPageNumber + pageRangeSize); + for (int i = currentPageNumber + 1 ; i <= endPageNumber && i <= allPageCount; i++) { + resultList.add(new Integer(i)); + } + + final boolean fillLimit = _pageRangeOption.isFillLimit(); + final int limitSize = (pageRangeSize * 2) + 1; + if (fillLimit && !resultList.isEmpty() && resultList.size() < limitSize) { + final Integer firstElements = (Integer)resultList.get(0); + final Integer lastElements = (Integer)resultList.get(resultList.size() - 1); + if (firstElements.intValue() > 1) { + for (int i = firstElements.intValue() - 1 ; resultList.size() < limitSize && i > 0; i--) { + resultList.add(0, new Integer(i)); + } + } + for (int i = lastElements.intValue() + 1 ; resultList.size() < limitSize && i <= allPageCount; i++) { + resultList.add(new Integer(i)); + } + } + return resultList; + } + + /** + * Get current page-range page-number-array. + * Using values are pageRangeOption and currentPageNumber and allPageCount. + * + * @return Current page-range page-number-array. + */ + public int[] getCurrentPageRangePageNumberArray() { + assertPageRangeValid(); + return convertListToIntArray(getCurrentPageRangePageNumberList()); + } + + protected int[] convertListToIntArray(java.util.List ls) { + final int[] resultArray = new int[ls.size()]; + int arrayIndex = 0; + for (final java.util.Iterator ite = ls.iterator(); ite.hasNext(); ) { + final Integer tmpPageNumber = (Integer)ite.next(); + resultArray[arrayIndex] = tmpPageNumber.intValue(); + arrayIndex++; + } + return resultArray; + } + + /** + * Is existing previous page-range? + * Using values are pageRangeOption and currentPageNumber and allPageCount. + * + * @return Determination. + */ + public boolean isExistPrePageRange() { + assertPageRangeValid(); + final int[] array = getCurrentPageRangePageNumberArray(); + if (array.length == 0) { + return false; + } + return array[0] > 1; + } + + /** + * Is existing next page-range? + * Using values are pageRangeOption and currentPageNumber and allPageCount. + * + * @return Determination. + */ + public boolean isExistNextPageRange() { + assertPageRangeValid(); + final int[] array = getCurrentPageRangePageNumberArray(); + if (array.length == 0) { + return false; + } + return array[array.length-1] < getAllPageCount(); + } + + protected void assertPageRangeValid() { + if (_pageRangeOption == null) { + String msg = "The pageRangeOption should not be null. Please invoke setPageRangeOption()."; + throw new IllegalStateException(msg); + } + final int pageRangeSize = _pageRangeOption.getPageRangeSize(); + if (pageRangeSize == 0) { + String msg = "The pageRangeSize should be greater than 1. But the value is zero."; + throw new IllegalStateException(msg); + } + } + + // ------------------------------------------- + // Page Group + // ---------- + /** + * Calculate current page-group start-page-number. + * Using values are currentPageNumber and pageGroupSize. + * + * @return Current page-group start-page-number. + */ + public int calculateCurrentPageGroupStartPageNumber() { + assertPageGroupValid(); + final int pageGroupSize = _pageGroupOption.getPageGroupSize(); + final int currentPageNumber = _currentPageNumber; + + int currentPageGroupNumber = (currentPageNumber / pageGroupSize); + if ((currentPageNumber % pageGroupSize) == 0) + { + currentPageGroupNumber--; + } + final int currentPageGroupStartPageNumber = (pageGroupSize * currentPageGroupNumber) + 1; + if (!(currentPageNumber >= currentPageGroupStartPageNumber)) { + String msg = "currentPageNumber should be greater equal currentPageGroupStartPageNumber. But:"; + msg = msg + " currentPageNumber=" + currentPageNumber; + msg = msg + " currentPageGroupStartPageNumber=" + currentPageGroupStartPageNumber; + throw new IllegalStateException(msg); + } + return currentPageGroupStartPageNumber; + } + + /** + * Get current page-group page-number-list. + * Using values are currentPageNumber and pageGroupSize and allPageCount. + * + * @return Current page-group page-number-list. + */ + public java.util.List getCurrentPageGroupPageNumberList() { + assertPageGroupValid(); + final int pageGroupSize = _pageGroupOption.getPageGroupSize(); + final int allPageCount = getAllPageCount(); + final int currentPageGroupStartPageNumber = calculateCurrentPageGroupStartPageNumber(); + if (!(currentPageGroupStartPageNumber > 0)) { + String msg = "currentPageGroupStartPageNumber should be greater than 0. {> 0} But:"; + msg = msg + " currentPageGroupStartPageNumber=" + currentPageGroupStartPageNumber; + throw new IllegalStateException(msg); + } + final int nextPageGroupStartPageNumber = currentPageGroupStartPageNumber + pageGroupSize; + + final java.util.List resultList = new java.util.ArrayList(); + for (int i=currentPageGroupStartPageNumber; i < nextPageGroupStartPageNumber && i <= allPageCount; i++) { + resultList.add(new Integer(i)); + } + return resultList; + } + + /** + * Get current page-group page-number-array. + * Using values are currentPageNumber and pageGroupSize and allPageCount. + * + * @return Current page-group page-number-array. + */ + public int[] getCurrentPageGroupPageNumberArray() { + assertPageGroupValid(); + return convertListToIntArray(getCurrentPageGroupPageNumberList()); + } + + /** + * Is existing previous page-group? + * Using values are currentPageNumber and pageGroupSize. + * + * @return Determination. + */ + public boolean isExistPrePageGroup() { + assertPageGroupValid(); + return (_currentPageNumber > _pageGroupOption.getPageGroupSize()); + } + + /** + * Is existing next page-group? + * Using values are currentPageNumber and pageGroupSize and allPageCount. + * + * @return Determination. + */ + public boolean isExistNextPageGroup() { + assertPageGroupValid(); + int currentPageGroupStartPageNumber = calculateCurrentPageGroupStartPageNumber(); + if (!(currentPageGroupStartPageNumber > 0)) { + String msg = "currentPageGroupStartPageNumber should be greater than 0. {> 0} But:"; + msg = msg + " currentPageGroupStartPageNumber=" + currentPageGroupStartPageNumber; + throw new IllegalStateException(msg); + } + int nextPageGroupStartPageNumber = currentPageGroupStartPageNumber + _pageGroupOption.getPageGroupSize(); + return (nextPageGroupStartPageNumber <= getAllPageCount()); + } + + protected void assertPageGroupValid() { + if (_pageGroupOption == null) { + String msg = "The pageGroupOption should not be null. Please invoke setPageGroupOption()."; + throw new IllegalStateException(msg); + } + if (_pageGroupOption.getPageGroupSize() == 0) { + String msg = "The pageGroupSize should be greater than 1. But the value is zero."; + msg = msg + " pageGroupSize=" + _pageGroupOption.getPageGroupSize(); + throw new IllegalStateException(msg); + } + if (_pageGroupOption.getPageGroupSize() == 1) { + String msg = "The pageGroupSize should be greater than 1. But the value is one."; + msg = msg + " pageGroupSize=" + _pageGroupOption.getPageGroupSize(); + throw new IllegalStateException(msg); + } + } + + // ===================================================================================== + // Basic-Override Method + // ===================== + /** + * This method overrides the method that is declared at super. + * + * @return View-string of all-columns value. + */ + public String toString() { + final StringBuffer sb = new StringBuffer(); + + sb.append(getCurrentPageNumber()).append("/").append(getAllPageCount()); + sb.append(" of ").append(getAllRecordCount()); + sb.append(" listSize=").append(getSelectedList() != null ? new Integer(getSelectedList().size()) : null); + sb.append(" pageSize=").append(getPageSize()); + sb.append(" page:{").append(isExistPrePage()).append("/").append(isExistNextPage()).append("}"); + sb.append(" groupSize=").append(getPageGroupSize()); + sb.append(" rangeSize=").append(getPageRangeSize()); + + return sb.toString(); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/SelectResource.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/SelectResource.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/SelectResource.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,9 @@ +package jp.sf.pal.pompei.allcommon.cbean; + +/** + * The select-resource as marker-interface. + * + * @author DBFlute(AutoGenerator) + */ +public interface SelectResource { +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/SimpleOrderByBean.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/SimpleOrderByBean.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/SimpleOrderByBean.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,136 @@ +package jp.sf.pal.pompei.allcommon.cbean; + +import jp.sf.pal.pompei.allcommon.cbean.sqlclause.OrderByClause; +import jp.sf.pal.pompei.allcommon.cbean.sqlclause.SqlClause; + +/// +/// The order-by-bean as simple implemetation. +/// Author: DBFlute(AutoGenerator) +/// +public class SimpleOrderByBean implements OrderByBean { + + // ===================================================================================== + // Attribute + // ========= + /** SQL clause instance. */ + protected final SqlClause _sqlClause; + { + _sqlClause = ConditionBeanContext.createSqlClause("Dummy"); + } + + // ===================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + public SimpleOrderByBean() { + } + + // ===================================================================================== + // SqlClause + // ========= + /** + * Get sql-clause. + * + * @return Sql clause. (NotNull) + */ + protected SqlClause getSqlClause() { + return _sqlClause; + } + + // ===================================================================================== + // OrderBy + // ======= + /** + * This method implements the method that is declared at super. + * + * @return Sql component of order-by clause. (NotNull) + */ + public OrderByClause getSqlComponentOfOrderByClause() { + return getSqlClause().getSqlComponentOfOrderByClause(); + } + + /** + * This method implements the method that is declared at super. + * + * @return Order-by clause. (NotNull) + */ + public String getOrderByClause() { + return getSqlClause().getOrderByClause(); + } + + /** + * This method implements the method that is declared at super. + * + * @return this. (NotNull) + */ + public OrderByBean clearOrderBy() { + getSqlClause().clearOrderBy(); + return this; + } + + /** + * This method implements the method that is declared at super. + * + * @return this. (NotNull) + */ + public OrderByBean ignoreOrderBy() { + getSqlClause().ignoreOrderBy(); + return this; + } + + /** + * This method implements the method that is declared at super. + * + * @return this. (NotNull) + */ + public OrderByBean makeOrderByEffective() { + getSqlClause().makeOrderByEffective(); + return this; + } + + /** + * Register order-by-asc. + * + * @param orderByProperty Order-by-property. 'aliasName.columnName/aliasName.columnName/...' (NotNull) + * @return this. (NotNull) + */ + public OrderByBean registerOrderByAsc(String orderByProperty) { + getSqlClause().registerOrderBy(orderByProperty, orderByProperty, true); + return this; + } + + /** + * Register order-by-desc. + * + * @param orderByProperty Order-by-property. 'aliasName.columnName/aliasName.columnName/...' (NotNull) + * @return this. (NotNull) + */ + public OrderByBean registerOrderByDesc(String orderByProperty) { + getSqlClause().registerOrderBy(orderByProperty, orderByProperty, false); + return this; + } + + /** + * Reverse order-by or Override order-by asc. + * + * @param orderByProperty Order-by-property. 'aliasName.columnName/aliasName.columnName/...' (NotNull) + * @return this. (NotNull) + */ + public OrderByBean reverseOrderBy_Or_OverrideOrderByAsc(String orderByProperty) { + getSqlClause().reverseOrderBy_Or_OverrideOrderBy(orderByProperty, orderByProperty, true); + return this; + } + + /** + * Reverse order-by or Override order-by desc. + * + * @param orderByProperty Order-by-property. 'aliasName.columnName/aliasName.columnName/...' (NotNull) + * @return this. (NotNull) + */ + public OrderByBean reverseOrderBy_Or_OverrideOrderByDesc(String orderByProperty) { + getSqlClause().reverseOrderBy_Or_OverrideOrderBy(orderByProperty, orderByProperty, false); + return this; + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/SimplePagingBean.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/SimplePagingBean.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/SimplePagingBean.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,209 @@ +package jp.sf.pal.pompei.allcommon.cbean; + +import jp.sf.pal.pompei.allcommon.cbean.sqlclause.SqlClause; + +/** + * The simple paging-bean. + * + * @author DBFlute(AutoGenerator) + */ +public class SimplePagingBean extends SimpleOrderByBean implements PagingBean { + + // ===================================================================================== + // SqlClause + // ========= + /** + * Get sql-clause. + * + * @return Sql clause. (NotNull) + */ + protected SqlClause getSqlClause() { + return _sqlClause; + } + + // ===================================================================================== + // FetchNarrowing + // ============== + /** + * Get fetch-narrowing start-index. + * + * @return Fetch-narrowing start-index. + */ + public int getFetchNarrowingSkipStartIndex() { + return getSqlClause().getFetchNarrowingSkipStartIndex(); + } + + /** + * Get fetch-narrowing size. + * + * @return Fetch-narrowing size. + */ + public int getFetchNarrowingLoopCount() { + return getSqlClause().getFetchNarrowingLoopCount(); + } + + /** + * Is fetch start index supported? + * + * @return Determination. + */ + public boolean isFetchNarrowingSkipStartIndexEffective() { + return !getSqlClause().isFetchStartIndexSupported(); + } + + /** + * Is fetch size supported? + * + * @return Determination. + */ + public boolean isFetchNarrowingLoopCountEffective() { + return !getSqlClause().isFetchSizeSupported(); + } + + /** + * Is fetch-narrowing effective? + * + * @return Determiantion. + */ + public boolean isFetchNarrowingEffective() { + return getSqlClause().isFetchNarrowingEffective(); + } + + // ===================================================================================== + // Paging + // ====== + /** + * Fetch first. + *
+     * If you invoke this, your SQL returns [fetch-size] records from first.
+     * 
+ * @param fetchSize Fetch-size. (NotMinus & NotZero) + * @return this. (NotNull) + */ + public PagingBean fetchFirst(int fetchSize) { + getSqlClause().fetchFirst(fetchSize); + return this; + } + + /** + * Fetch scope. + *
+     * If you invoke this, your SQL returns [fetch-size] records from [fetch-start-index].
+     * 
+ * @param fetchStartIndex Fetch-start-index. 0 origin. (NotMinus) + * @param fetchSize Fetch-size. (NotMinus & NotZero) + * @return this. (NotNull) + */ + public PagingBean fetchScope(int fetchStartIndex, int fetchSize) { + getSqlClause().fetchScope(fetchStartIndex, fetchSize); + return this; + } + + /** + * Fetch page. + *
+     * When you invoke this, it is normally necessary to invoke 'fetchFirst()' or 'fetchScope()' ahead of that.
+     *  But you also can use default-fetch-size without invoking 'fetchFirst()' or 'fetchScope()'.
+     *  If you invoke this, your SQL returns [fetch-size] records from [fetch-start-index] calculated by [fetch-page-number].
+     * 
+ * @param fetchPageNumber Fetch-page-number. 1 origin. (NotMinus & NotZero) + * @return this. (NotNull) + */ + public PagingBean fetchPage(int fetchPageNumber) { + getSqlClause().fetchPage(fetchPageNumber); + return this; + } + + /** + * This method implements the method that is declared at super. + * + * @return Fetch-start-index. + */ + public int getFetchStartIndex() { + return getSqlClause().getFetchStartIndex(); + } + + /** + * This method implements the method that is declared at super. + * + * @return Fetch-size. + */ + public int getFetchSize() { + return getSqlClause().getFetchSize(); + } + + /** + * This method implements the method that is declared at super. + * + * @return Fetch-page-number. + */ + public int getFetchPageNumber() { + return getSqlClause().getFetchPageNumber(); + } + + /** + * This method implements the method that is declared at super. + * + * @return Page start index. 0 origin. (NotMinus) + */ + public int getPageStartIndex() { + return getSqlClause().getPageStartIndex(); + } + + /** + * This method implements the method that is declared at super. + * + * @return Page end index. 0 origin. (NotMinus) + */ + public int getPageEndIndex() { + return getSqlClause().getPageEndIndex(); + } + + /** + * Is fetch scope effective? + * + * @return Determiantion. + */ + public boolean isFetchScopeEffective() { + return getSqlClause().isFetchScopeEffective(); + } + + // ===================================================================================== + // For SqlComment + // ============== + /** + * Get select-hint. {select [select-hint] * from table...} + * + * @return Select-hint. (NotNull) + */ + public String getSelectHint() { + return getSqlClause().getSelectHint(); + } + + /** + * Get from-base-table-hint. {select * from table [from-base-table-hint] where ...} + * + * @return from-base-table-hint. (NotNull) + */ + public String getFromBaseTableHint() { + return getSqlClause().getFromBaseTableHint(); + } + + /** + * Get from-hint. {select * from table [from-hint] where ...} + * + * @return From-hint. (NotNull) + */ + public String getFromHint() { + return getSqlClause().getFromHint(); + } + + /** + * Get sql-suffix. {select * from table where ... order by ... [sql-suffix]} + * + * @return Sql-suffix. (NotNull) + */ + public String getSqlSuffix() { + return getSqlClause().getSqlSuffix(); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/ckey/ConditionKey.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/ckey/ConditionKey.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/ckey/ConditionKey.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,286 @@ +package jp.sf.pal.pompei.allcommon.cbean.ckey; + + +import jp.sf.pal.pompei.allcommon.cbean.coption.ConditionOption; +import jp.sf.pal.pompei.allcommon.cbean.cvalue.ConditionValue; + +/** + * The abstract class of condition-key. + * + * @author DBFlute(AutoGenerator) + */ +public abstract class ConditionKey { + + /** Mark of replaced value. */ + public static final String MARK_OF_REPLACED_VALUE = "ReplacedValue"; + + /** The condition key of equal. */ + public static final ConditionKey CK_EQUAL = new ConditionKeyEqual(); + + /** The condition key of notEqual. */ + public static final ConditionKey CK_NOT_EQUAL = new ConditionKeyNotEqual(); + + /** The condition key of greaterThan. */ + public static final ConditionKey CK_GREATER_THAN = new ConditionKeyGreaterThan(); + + /** The condition key of lessrThan. */ + public static final ConditionKey CK_LESS_THAN = new ConditionKeyLessThan(); + + /** The condition key of greaterEqual. */ + public static final ConditionKey CK_GREATER_EQUAL = new ConditionKeyGreaterEqual(); + + /** The condition key of lessEqual. */ + public static final ConditionKey CK_LESS_EQUAL = new ConditionKeyLessEqual(); + + /** The condition key of prefixSearch. */ + public static final ConditionKey CK_PREFIX_SEARCH = new ConditionKeyPrefixSearch(); + + /** The condition key of likeSearch. */ + public static final ConditionKey CK_LIKE_SEARCH = new ConditionKeyLikeSearch(); + + /** The condition key of inScope. */ + public static final ConditionKey CK_IN_SCOPE = new ConditionKeyInScope(); + + /** The condition key of notInScope. */ + public static final ConditionKey CK_NOT_IN_SCOPE = new ConditionKeyNotInScope(); + + /** The condition key of isNull. */ + public static final ConditionKey CK_IS_NULL = new ConditionKeyIsNull(); + + /** The condition key of isNotNull. */ + public static final ConditionKey CK_IS_NOT_NULL = new ConditionKeyIsNotNull(); + + /** Dummy-object for IsNull and IsNotNull and so on... */ + protected static final Object DUMMY_OBJECT = new Object(); + + /** Condition-key. */ + protected String _conditionKey; + + /** Operand. */ + protected String _operand; + + /** + * Get condition-key. + * + * @return Condition-key. + */ + public String getConditionKey() { + return _conditionKey; + } + + /** + * Get operand. + * + * @return Operand. + */ + public String getOperand() { + return _operand; + } + + /** + * Is valid registration? + * + * @param conditionValue Condition value. (NotNull) + * @param value Value. (NotNull) + * @param callerName Caller name. (NotNull) + * @return Determination. + */ + abstract public boolean isValidRegistration(ConditionValue conditionValue, Object value, String callerName); + + /** + * Add where clause. + * + * @param conditionList Condition list. (NotNull) + * @param columnName Column name. (NotNull) + * @param value Condition value. (NotNull) + * @return this. + */ + public ConditionKey addWhereClause(java.util.List conditionList, String columnName, ConditionValue value) { + if (value == null) { + String msg = "Argument[value] must not be null:"; + throw new IllegalArgumentException(msg + " value=" + value + " this.toString()=" + toString()); + } + doAddWhereClause(conditionList, columnName, value); + return this; + } + + /** + * Add where clause. + * + * @param conditionList Condition list. (NotNull) + * @param columnName Column name. (NotNull) + * @param value Condition value. (NotNull) + * @param option Condition option. (NotNull) + * @return this. + */ + public ConditionKey addWhereClause(java.util.List conditionList, String columnName, ConditionValue value, ConditionOption option) { + if (value == null) { + String msg = "Argument[value] must not be null:"; + throw new IllegalArgumentException(msg + " value=" + value + " this.toString()=" + toString()); + } + doAddWhereClause(conditionList, columnName, value, option); + return this; + } + + /** + * Do add where clause. + * + * @param conditionList Condition list. (NotNull) + * @param columnName Column name. (NotNull) + * @param value Condition value. (NotNull) + */ + abstract protected void doAddWhereClause(java.util.List conditionList, String columnName, ConditionValue value); + + /** + * Do add where clause. + * + * @param conditionList Condition list. (NotNull) + * @param columnName Column name. (NotNull) + * @param value Condition value. (NotNull) + * @param option Condition option. (NotNull) + */ + abstract protected void doAddWhereClause(java.util.List conditionList, String columnName, ConditionValue value, ConditionOption option); + + /** + * Setup condition value. + * + * @param conditionValue Condition value. (NotNull) + * @param value Value. (Nullable) + * @param location Location. (Nullable) + * @return Condition value. (The same as argument[conditionValue]) (NotNull) + */ + public ConditionValue setupConditionValue(ConditionValue conditionValue, Object value, String location) { + if (conditionValue == null) { + String msg = "Argument[conditionValue] must not be null:"; + throw new IllegalArgumentException(msg + " value=" + value + " this.toString()=" + toString()); + } + doSetupConditionValue(conditionValue, value, location); + return conditionValue; + } + + /** + * Setup condition value. + * + * @param conditionValue Condition value. (NotNull) + * @param value Value. (Nullable) + * @param location Location. (Nullable) + * @param option Condition option. (NotNull) + * @return Condition value. (The same as argument[conditionValue]) (NotNull) + */ + public ConditionValue setupConditionValue(ConditionValue conditionValue, Object value, String location, ConditionOption option) { + if (conditionValue == null) { + String msg = "Argument[conditionValue] must not be null:"; + throw new IllegalArgumentException(msg + " value=" + value + " this.toString()=" + toString()); + } + doSetupConditionValue(conditionValue, value, location, option); + return conditionValue; + } + + /** + * Do setup condition value. + * + * @param conditionValue Condition value. (NotNull) + * @param value Value. (NotNull) + * @param location Location. (NotNull) + */ + abstract protected void doSetupConditionValue(ConditionValue conditionValue, Object value, String location); + + /** + * Do setup condition value. + * + * @param conditionValue Condition value. (NotNull) + * @param value Value. (NotNull) + * @param location Location. (NotNull) + * @param option Condition option. (NotNull) + */ + abstract protected void doSetupConditionValue(ConditionValue conditionValue, Object value, String location, ConditionOption option); + + /** + * Build bind clause. (for s2dao) + * + * @param columnName Column name. (NotNull) + * @param location Location. (NotNull) + * @return Bind clause. (NotNull) + */ + protected String buildBindClause(String columnName, String location) { + return columnName + " " + getOperand() + " " + "/*dto." + location + "*/null"; + } + + /** + * Build bind clause. (for s2dao) + * + * @param columnName Column name. (NotNull) + * @param location Location. (NotNull) + * @param additionalOption Additional option. (NotNull) + * @return Bind clause. (NotNull) + */ + protected String buildBindClauseWithRearOption(String columnName, String location, String rearOption) { + return columnName + " " + getOperand() + " " + "/*dto." + location + "*/null" + rearOption; + } + + /** + * Build bind clause. (for s2dao) + * + * @param columnName Column name. (NotNull) + * @param location Location. (NotNull) + * @param dummyValue Dummy value. (NotNull) + * @return Bind clause. (NotNull) + */ + protected String buildBindClause(String columnName, String location, String dummyValue) { + return columnName + " " + getOperand() + " " + "/*dto." + location + "*/" + dummyValue; + } + + /** + * Build clause without value. + * + * @param columnName Column name. (NotNull) + * @return Clause without value. (NotNull) + */ + protected String buildClauseWithoutValue(String columnName) { + return columnName + " " + getOperand(); + } + + /** + * Get wild-card. + * + * @return Wild-card. + */ + protected String getWildCard() { + return "%"; + } + + /** + * This method overrides the method that is declared at super. + * Returns hash-code of this condition-key string. + * + * @return HashCode. + */ + public int hashCode() { + return getConditionKey().hashCode(); + } + + /** + * This method overrides the method that is declared at super. + * If the condition-key of the other is same as this one, returns true. + * + * @param other Other entity. (Nullable) + * @return Comparing result. If other is null, returns false. + */ + public boolean equals(Object other) { + if (other instanceof ConditionKey) { + if (this.getConditionKey().equals(((ConditionKey)other).getConditionKey())) { + return true; + } + } + return false; + } + + /** + * This method overrides the method that is declared at super. + * + * @return View-string of condition key information. + */ + public String toString() { + return "ConditionKey: " + getConditionKey() + " " + getOperand() + " wild-card=[" + getWildCard() + "]"; + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/ckey/ConditionKeyEqual.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/ckey/ConditionKeyEqual.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/ckey/ConditionKeyEqual.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,100 @@ +package jp.sf.pal.pompei.allcommon.cbean.ckey; + + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +import jp.sf.pal.pompei.allcommon.cbean.coption.ConditionOption; +import jp.sf.pal.pompei.allcommon.cbean.cvalue.ConditionValue; + +/** + * The condition-key of equal. + * + * @author DBFlute(AutoGenerator) + */ +public class ConditionKeyEqual extends ConditionKey { + + /** Log-instance. */ + private static final Log _log = LogFactory.getLog(ConditionKeyEqual.class); + + /** + * Constructor. + */ + protected ConditionKeyEqual() { + _conditionKey = "equal"; + _operand = "="; + } + + /** + * Is valid registration? + * + * @param conditionValue Condition value. (NotNull) + * @param value Value. (NotNull) + * @param callerName Caller name. (NotNull) + * @return Determination. + */ + public boolean isValidRegistration(ConditionValue conditionValue, Object value, String callerName) { + if (value == null) { + return false; + } + if (conditionValue.hasEqual()) { + if (conditionValue.equalEqual(value)) { + _log.warn("The value has already registered at " + callerName + ": value=" + value); + return false; + } else { + conditionValue.overrideEqual(value); + return false; + } + } + return true; + } + + /** + * This method implements super#doAddWhereClause(). + * + * @param conditionList Condition list. (NotNull) + * @param columnName Column name. (NotNull) + * @param value Condition value. (NotNull) + */ + protected void doAddWhereClause(java.util.List conditionList, String columnName, ConditionValue value) { + if (value.getEqual() == null) { + return; + } + conditionList.add(buildBindClause(columnName, value.getEqualLocation())); + } + + /** + * This method implements super#doAddWhereClause(). + * + * @param conditionList Condition list. (NotNull) + * @param columnName Column name. (NotNull) + * @param value Condition value. (NotNull) + * @param option Condition option. (NotNull) + */ + protected void doAddWhereClause(java.util.List conditionList, String columnName, ConditionValue value, ConditionOption option) { + throw new UnsupportedOperationException("doAddWhereClause with condition-option is unsupported!!!"); + } + + /** + * This method implements super#doSetupConditionValue(). + * + * @param conditionValue Condition value. (NotNull) + * @param value Value. (NotNull) + * @param location Location. (NotNull) + */ + protected void doSetupConditionValue(ConditionValue conditionValue, Object value, String location) { + conditionValue.setEqual(value).setEqualLocation(location); + } + + /** + * This method implements super#doSetupConditionValue(). + * + * @param conditionValue Condition value. (NotNull) + * @param value Value. (NotNull) + * @param location Location. (NotNull) + * @param option Condition option. (NotNull) + */ + protected void doSetupConditionValue(ConditionValue conditionValue, Object value, String location, ConditionOption option) { + throw new UnsupportedOperationException("doSetupConditionValue with condition-option is unsupported!!!"); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/ckey/ConditionKeyGreaterEqual.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/ckey/ConditionKeyGreaterEqual.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/ckey/ConditionKeyGreaterEqual.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,100 @@ +package jp.sf.pal.pompei.allcommon.cbean.ckey; + + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +import jp.sf.pal.pompei.allcommon.cbean.coption.ConditionOption; +import jp.sf.pal.pompei.allcommon.cbean.cvalue.ConditionValue; + +/** + * The condition-key of greaterEqual. + * + * @author DBFlute(AutoGenerator) + */ +public class ConditionKeyGreaterEqual extends ConditionKey { + + /** Log-instance. */ + private static final Log _log = LogFactory.getLog(ConditionKeyGreaterEqual.class); + + /** + * Constructor. + */ + protected ConditionKeyGreaterEqual() { + _conditionKey = "greaterEqual"; + _operand = ">="; + } + + /** + * Is valid registration? + * + * @param conditionValue Condition value. (NotNull) + * @param value Value. (NotNull) + * @param callerName Caller name. (NotNull) + * @return Determination. + */ + public boolean isValidRegistration(ConditionValue conditionValue, Object value, String callerName) { + if (value == null) { + return false; + } + if (conditionValue.hasGreaterEqual()) { + if (conditionValue.equalGreaterEqual(value)) { + _log.warn("The value has already registered at " + callerName + ": value=" + value); + return false; + } else { + conditionValue.overrideGreaterEqual(value); + return false; + } + } + return true; + } + + /** + * This method implements super#doAddWhereClause(). + * + * @param conditionList Condition list. (NotNull) + * @param columnName Column name. (NotNull) + * @param value Condition value. (NotNull) + */ + protected void doAddWhereClause(java.util.List conditionList, String columnName, ConditionValue value) { + if (value.getGreaterEqual() == null) { + return; + } + conditionList.add(buildBindClause(columnName, value.getGreaterEqualLocation())); + } + + /** + * This method implements super#doAddWhereClause(). + * + * @param conditionList Condition list. (NotNull) + * @param columnName Column name. (NotNull) + * @param value Condition value. (NotNull) + * @param option Condition option. (NotNull) + */ + protected void doAddWhereClause(java.util.List conditionList, String columnName, ConditionValue value, ConditionOption option) { + throw new UnsupportedOperationException("doAddWhereClause that has ConditionOption is unsupported!!!"); + } + + /** + * This method implements super#doSetupConditionValue(). + * + * @param conditionValue Condition value. (NotNull) + * @param value Value. (NotNull) + * @param location Location. (NotNull) + */ + protected void doSetupConditionValue(ConditionValue conditionValue, Object value, String location) { + conditionValue.setGreaterEqual(value).setGreaterEqualLocation(location); + } + + /** + * This method implements super#doSetupConditionValue(). + * + * @param conditionValue Condition value. (NotNull) + * @param value Value. (NotNull) + * @param location Location. (NotNull) + * @param option Condition option. (NotNull) + */ + protected void doSetupConditionValue(ConditionValue conditionValue, Object value, String location, ConditionOption option) { + throw new UnsupportedOperationException("doSetupConditionValue with condition-option is unsupported!!!"); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/ckey/ConditionKeyGreaterThan.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/ckey/ConditionKeyGreaterThan.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/ckey/ConditionKeyGreaterThan.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,100 @@ +package jp.sf.pal.pompei.allcommon.cbean.ckey; + + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +import jp.sf.pal.pompei.allcommon.cbean.coption.ConditionOption; +import jp.sf.pal.pompei.allcommon.cbean.cvalue.ConditionValue; + +/** + * The condition-key of greaterThan. + * + * @author DBFlute(AutoGenerator) + */ +public class ConditionKeyGreaterThan extends ConditionKey { + + /** Log-instance. */ + private static final Log _log = LogFactory.getLog(ConditionKeyGreaterThan.class); + + /** + * Constructor. + */ + protected ConditionKeyGreaterThan() { + _conditionKey = "greaterThan"; + _operand = ">"; + } + + /** + * Is valid registration? + * + * @param conditionValue Condition value. (NotNull) + * @param value Value. (NotNull) + * @param callerName Caller name. (NotNull) + * @return Determination. + */ + public boolean isValidRegistration(ConditionValue conditionValue, Object value, String callerName) { + if (value == null) { + return false; + } + if (conditionValue.hasGreaterThan()) { + if (conditionValue.equalGreaterThan(value)) { + _log.warn("The value has already registered at " + callerName + ": value=" + value); + return false; + } else { + conditionValue.overrideGreaterThan(value); + return false; + } + } + return true; + } + + /** + * This method implements super#doAddWhereClause(). + * + * @param conditionList Condition list. (NotNull) + * @param columnName Column name. (NotNull) + * @param value Condition value. (NotNull) + */ + protected void doAddWhereClause(java.util.List conditionList, String columnName, ConditionValue value) { + if (value.getGreaterThan() == null) { + return; + } + conditionList.add(buildBindClause(columnName, value.getGreaterThanLocation())); + } + + /** + * This method implements super#doAddWhereClause(). + * + * @param conditionList Condition list. (NotNull) + * @param columnName Column name. (NotNull) + * @param value Condition value. (NotNull) + * @param option Condition option. (NotNull) + */ + protected void doAddWhereClause(java.util.List conditionList, String columnName, ConditionValue value, ConditionOption option) { + throw new UnsupportedOperationException("doAddWhereClause that has ConditionOption is unsupported!!!"); + } + + /** + * This method implements super#doSetupConditionValue(). + * + * @param conditionValue Condition value. (NotNull) + * @param value Value. (NotNull) + * @param location Location. (NotNull) + */ + protected void doSetupConditionValue(ConditionValue conditionValue, Object value, String location) { + conditionValue.setGreaterThan(value).setGreaterThanLocation(location); + } + + /** + * This method implements super#doSetupConditionValue(). + * + * @param conditionValue Condition value. (NotNull) + * @param value Value. (NotNull) + * @param location Location. (NotNull) + * @param option Condition option. (NotNull) + */ + protected void doSetupConditionValue(ConditionValue conditionValue, Object value, String location, ConditionOption option) { + throw new UnsupportedOperationException("doSetupConditionValue with condition-option is unsupported!!!"); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/ckey/ConditionKeyInScope.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/ckey/ConditionKeyInScope.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/ckey/ConditionKeyInScope.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,125 @@ +package jp.sf.pal.pompei.allcommon.cbean.ckey; + + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +import jp.sf.pal.pompei.allcommon.cbean.coption.ConditionOption; +import jp.sf.pal.pompei.allcommon.cbean.coption.InScopeOption; +import jp.sf.pal.pompei.allcommon.cbean.cvalue.ConditionValue; + +/** + * The condition-key of inScope. + * + * @author DBFlute(AutoGenerator) + */ +public class ConditionKeyInScope extends ConditionKey { + + /** Log-instance. */ + private static final Log _log = LogFactory.getLog(ConditionKeyInScope.class); + + /** + * Constructor. + */ + protected ConditionKeyInScope() { + _conditionKey = "inScope"; + _operand = "in"; + } + + /** + * Is valid registration? + * + * @param conditionValue Condition value. (NotNull) + * @param value Value. (NotNull) + * @param callerName Caller name. (NotNull) + * @return Determination. + */ + public boolean isValidRegistration(ConditionValue conditionValue, Object value, String callerName) { + if (value == null) { + return false; + } + if (value instanceof java.util.List && ((java.util.List)value).isEmpty()) { + return false; + } + if (value instanceof java.util.List) { + if (conditionValue.hasInScope()) { + if (conditionValue.equalInScope(((java.util.List)value))) { + _log.warn("The value has already registered at " + callerName + ": value=" + value); + return false; + } else { + conditionValue.overrideInScope(((java.util.List)value)); + return false; + } + } + } + return true; + } + + /** + * This method implements super#doAddWhereClause(). + * + * @param conditionList Condition list. (NotNull) + * @param columnName Column name. (NotNull) + * @param value Condition value. (NotNull) + */ + protected void doAddWhereClause(java.util.List conditionList, String columnName, ConditionValue value) { + if (value.getInScope() == null) { + return; + } + final java.util.List valueList = value.getInScope(); + final java.util.List checkedValueList = new java.util.ArrayList(); + for (final java.util.Iterator ite = valueList.iterator(); ite.hasNext(); ) { + final Object checkTargetValue = ite.next(); + if (checkTargetValue != null) {; + checkedValueList.add(checkTargetValue); + } + } + if (checkedValueList.isEmpty()) { + return; + } + conditionList.add(buildBindClause(columnName, value.getInScopeLocation(), "('a1', 'a2')")); + } + + /** + * This method implements super#doAddWhereClause(). + * + * @param conditionList Condition list. (NotNull) + * @param columnName Column name. (NotNull) + * @param value Condition value. (NotNull) + * @param option Condition option. (NotNull) + */ + protected void doAddWhereClause(java.util.List conditionList, String columnName, ConditionValue value, ConditionOption option) { + if (option == null) { + String msg = "The argument[option] should not be null: columnName=" + columnName + " value=" + value; + throw new IllegalArgumentException(msg); + } + if (!(option instanceof InScopeOption)) { + String msg = "The argument[option] should be InScopeOption: columnName=" + columnName + " value=" + value; + throw new IllegalArgumentException(msg); + } + conditionList.add(buildBindClause(columnName, value.getInScopeLocation(), "('a1', 'a2')")); + } + + /** + * This method implements super#doSetupConditionValue(). + * + * @param conditionValue Condition value. (NotNull) + * @param value Value. (NotNull) + * @param location Location. (NotNull) + */ + protected void doSetupConditionValue(ConditionValue conditionValue, Object value, String location) { + conditionValue.setInScope((java.util.List)value).setInScopeLocation(location); + } + + /** + * This method implements super#doSetupConditionValue(). + * + * @param conditionValue Condition value. (NotNull) + * @param value Value. (NotNull) + * @param location Location. (NotNull) + * @param option Condition option. (NotNull) + */ + protected void doSetupConditionValue(ConditionValue conditionValue, Object value, String location, ConditionOption option) { + conditionValue.setInScope((java.util.List)value, (InScopeOption)option).setInScopeLocation(location); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/ckey/ConditionKeyIsNotNull.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/ckey/ConditionKeyIsNotNull.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/ckey/ConditionKeyIsNotNull.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,92 @@ +package jp.sf.pal.pompei.allcommon.cbean.ckey; + + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +import jp.sf.pal.pompei.allcommon.cbean.coption.ConditionOption; +import jp.sf.pal.pompei.allcommon.cbean.cvalue.ConditionValue; + +/** + * The condition-key of isNotNull. + * + * @author DBFlute(AutoGenerator) + */ +public class ConditionKeyIsNotNull extends ConditionKey { + + /** Log-instance. */ + private static final Log _log = LogFactory.getLog(ConditionKeyIsNotNull.class); + + /** + * Constructor. + */ + protected ConditionKeyIsNotNull() { + _conditionKey = "isNotNull"; + _operand = "is not null"; + } + + /** + * Is valid registration? + * + * @param conditionValue Condition value. (NotNull) + * @param value Value. (NotNull) + * @param callerName Caller name. (NotNull) + * @return Determination. + */ + public boolean isValidRegistration(ConditionValue conditionValue, Object value, String callerName) { + if (conditionValue.hasIsNotNull()) { + _log.warn("The value has already registered at " + callerName); + return false; + } + return true; + } + + /** + * This method implements super#doAddWhereClause(). + * + * @param conditionList Condition list. (NotNull) + * @param columnName Column name. (NotNull) + * @param value Condition value. (NotNull) + */ + protected void doAddWhereClause(java.util.List conditionList, String columnName, ConditionValue value) { + if (value.getIsNotNull() == null) { + return; + } + conditionList.add(buildClauseWithoutValue(columnName)); + } + + /** + * This method implements super#doAddWhereClause(). + * + * @param conditionList Condition list. (NotNull) + * @param columnName Column name. (NotNull) + * @param value Condition value. (NotNull) + * @param option Condition option. (NotNull) + */ + protected void doAddWhereClause(java.util.List conditionList, String columnName, ConditionValue value, ConditionOption option) { + throw new UnsupportedOperationException("doAddWhereClause that has ConditionOption is unsupported!!!"); + } + + /** + * This method implements super#doSetupConditionValue(). + * + * @param conditionValue Condition value. (NotNull) + * @param value Value. (NotNull) + * @param location Location. (NotNull) + */ + protected void doSetupConditionValue(ConditionValue conditionValue, Object value, String location) { + conditionValue.setIsNotNull(DUMMY_OBJECT).setIsNotNullLocation(location); + } + + /** + * This method implements super#doSetupConditionValue(). + * + * @param conditionValue Condition value. (NotNull) + * @param value Value. (NotNull) + * @param location Location. (NotNull) + * @param option Condition option. (NotNull) + */ + protected void doSetupConditionValue(ConditionValue conditionValue, Object value, String location, ConditionOption option) { + throw new UnsupportedOperationException("doSetupConditionValue with condition-option is unsupported!!!"); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/ckey/ConditionKeyIsNull.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/ckey/ConditionKeyIsNull.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/ckey/ConditionKeyIsNull.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,92 @@ +package jp.sf.pal.pompei.allcommon.cbean.ckey; + + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +import jp.sf.pal.pompei.allcommon.cbean.coption.ConditionOption; +import jp.sf.pal.pompei.allcommon.cbean.cvalue.ConditionValue; + +/** + * The condition-key of isNull. + * + * @author DBFlute(AutoGenerator) + */ +public class ConditionKeyIsNull extends ConditionKey { + + /** Log-instance. */ + private static final Log _log = LogFactory.getLog(ConditionKeyIsNull.class); + + /** + * Constructor. + */ + protected ConditionKeyIsNull() { + _conditionKey = "isNull"; + _operand = "is null"; + } + + /** + * Is valid registration? + * + * @param conditionValue Condition value. (NotNull) + * @param value Value. (NotNull) + * @param callerName Caller name. (NotNull) + * @return Determination. + */ + public boolean isValidRegistration(ConditionValue conditionValue, Object value, String callerName) { + if (conditionValue.hasIsNull()) { + _log.warn("The value has already registered at " + callerName); + return false; + } + return true; + } + + /** + * This method implements super#doAddWhereClause(). + * + * @param conditionList Condition list. (NotNull) + * @param columnName Column name. (NotNull) + * @param value Condition value. (NotNull) + */ + protected void doAddWhereClause(java.util.List conditionList, String columnName, ConditionValue value) { + if (value.getIsNull() == null) { + return; + } + conditionList.add(buildClauseWithoutValue(columnName)); + } + + /** + * This method implements super#doAddWhereClause(). + * + * @param conditionList Condition list. (NotNull) + * @param columnName Column name. (NotNull) + * @param value Condition value. (NotNull) + * @param option Condition option. (NotNull) + */ + protected void doAddWhereClause(java.util.List conditionList, String columnName, ConditionValue value, ConditionOption option) { + throw new UnsupportedOperationException("doAddWhereClause that has ConditionOption is unsupported!!!"); + } + + /** + * This method implements super#doSetupConditionValue(). + * + * @param conditionValue Condition value. (NotNull) + * @param value Value. (NotNull) + * @param location Location. (NotNull) + */ + protected void doSetupConditionValue(ConditionValue conditionValue, Object value, String location) { + conditionValue.setIsNull(DUMMY_OBJECT).setIsNullLocation(location); + } + + /** + * This method implements super#doSetupConditionValue(). + * + * @param conditionValue Condition value. (NotNull) + * @param value Value. (NotNull) + * @param location Location. (NotNull) + * @param option Condition option. (NotNull) + */ + protected void doSetupConditionValue(ConditionValue conditionValue, Object value, String location, ConditionOption option) { + throw new UnsupportedOperationException("doSetupConditionValue with condition-option is unsupported!!!"); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/ckey/ConditionKeyLessEqual.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/ckey/ConditionKeyLessEqual.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/ckey/ConditionKeyLessEqual.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,100 @@ +package jp.sf.pal.pompei.allcommon.cbean.ckey; + + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +import jp.sf.pal.pompei.allcommon.cbean.coption.ConditionOption; +import jp.sf.pal.pompei.allcommon.cbean.cvalue.ConditionValue; + +/** + * The condition-key of lessEqual. + * + * @author DBFlute(AutoGenerator) + */ +public class ConditionKeyLessEqual extends ConditionKey { + + /** Log-instance. */ + private static final Log _log = LogFactory.getLog(ConditionKeyLessEqual.class); + + /** + * Constructor. + */ + protected ConditionKeyLessEqual() { + _conditionKey = "lessEqual"; + _operand = "<="; + } + + /** + * Is valid registration? + * + * @param conditionValue Condition value. (NotNull) + * @param value Value. (NotNull) + * @param callerName Caller name. (NotNull) + * @return Determination. + */ + public boolean isValidRegistration(ConditionValue conditionValue, Object value, String callerName) { + if (value == null) { + return false; + } + if (conditionValue.hasLessEqual()) { + if (conditionValue.equalLessEqual(value)) { + _log.warn("The value has already registered at " + callerName + ": value=" + value); + return false; + } else { + conditionValue.overrideLessEqual(value); + return false; + } + } + return true; + } + + /** + * This method implements super#doAddWhereClause(). + * + * @param conditionList Condition list. (NotNull) + * @param columnName Column name. (NotNull) + * @param value Condition value. (NotNull) + */ + protected void doAddWhereClause(java.util.List conditionList, String columnName, ConditionValue value) { + if (value.getLessEqual() == null) { + return; + } + conditionList.add(buildBindClause(columnName, value.getLessEqualLocation())); + } + + /** + * This method implements super#doAddWhereClause(). + * + * @param conditionList Condition list. (NotNull) + * @param columnName Column name. (NotNull) + * @param value Condition value. (NotNull) + * @param option Condition option. (NotNull) + */ + protected void doAddWhereClause(java.util.List conditionList, String columnName, ConditionValue value, ConditionOption option) { + throw new UnsupportedOperationException("doAddWhereClause that has ConditionOption is unsupported!!!"); + } + + /** + * This method implements super#doSetupConditionValue(). + * + * @param conditionValue Condition value. (NotNull) + * @param value Value. (NotNull) + * @param location Location. (NotNull) + */ + protected void doSetupConditionValue(ConditionValue conditionValue, Object value, String location) { + conditionValue.setLessEqual(value).setLessEqualLocation(location); + } + + /** + * This method implements super#doSetupConditionValue(). + * + * @param conditionValue Condition value. (NotNull) + * @param value Value. (NotNull) + * @param location Location. (NotNull) + * @param option Condition option. (NotNull) + */ + protected void doSetupConditionValue(ConditionValue conditionValue, Object value, String location, ConditionOption option) { + throw new UnsupportedOperationException("doSetupConditionValue with condition-option is unsupported!!!"); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/ckey/ConditionKeyLessThan.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/ckey/ConditionKeyLessThan.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/ckey/ConditionKeyLessThan.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,100 @@ +package jp.sf.pal.pompei.allcommon.cbean.ckey; + + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +import jp.sf.pal.pompei.allcommon.cbean.coption.ConditionOption; +import jp.sf.pal.pompei.allcommon.cbean.cvalue.ConditionValue; + +/** + * The condition-key of lessThan. + * + * @author DBFlute(AutoGenerator) + */ +public class ConditionKeyLessThan extends ConditionKey { + + /** Log-instance. */ + private static final Log _log = LogFactory.getLog(ConditionKeyLessThan.class); + + /** + * Constructor. + */ + protected ConditionKeyLessThan() { + _conditionKey = "lessThan"; + _operand = "<"; + } + + /** + * Is valid registration? + * + * @param conditionValue Condition value. (NotNull) + * @param value Value. (NotNull) + * @param callerName Caller name. (NotNull) + * @return Determination. + */ + public boolean isValidRegistration(ConditionValue conditionValue, Object value, String callerName) { + if (value == null) { + return false; + } + if (conditionValue.hasLessThan()) { + if (conditionValue.equalLessThan(value)) { + _log.warn("The value has already registered at " + callerName + ": value=" + value); + return false; + } else { + conditionValue.overrideLessThan(value); + return false; + } + } + return true; + } + + /** + * This method implements super#doAddWhereClause(). + * + * @param conditionList Condition list. (NotNull) + * @param columnName Column name. (NotNull) + * @param value Condition value. (NotNull) + */ + protected void doAddWhereClause(java.util.List conditionList, String columnName, ConditionValue value) { + if (value.getLessThan() == null) { + return; + } + conditionList.add(buildBindClause(columnName, value.getLessThanLocation())); + } + + /** + * This method implements super#doAddWhereClause(). + * + * @param conditionList Condition list. (NotNull) + * @param columnName Column name. (NotNull) + * @param value Condition value. (NotNull) + * @param option Condition option. (NotNull) + */ + protected void doAddWhereClause(java.util.List conditionList, String columnName, ConditionValue value, ConditionOption option) { + throw new UnsupportedOperationException("doAddWhereClause that has ConditionOption is unsupported!!!"); + } + + /** + * This method implements super#doSetupConditionValue(). + * + * @param conditionValue Condition value. (NotNull) + * @param value Value. (NotNull) + * @param location Location. (NotNull) + */ + protected void doSetupConditionValue(ConditionValue conditionValue, Object value, String location) { + conditionValue.setLessThan(value).setLessThanLocation(location); + } + + /** + * This method implements super#doSetupConditionValue(). + * + * @param conditionValue Condition value. (NotNull) + * @param value Value. (NotNull) + * @param location Location. (NotNull) + * @param option Condition option. (NotNull) + */ + protected void doSetupConditionValue(ConditionValue conditionValue, Object value, String location, ConditionOption option) { + throw new UnsupportedOperationException("doSetupConditionValue with condition-option is unsupported!!!"); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/ckey/ConditionKeyLikeSearch.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/ckey/ConditionKeyLikeSearch.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/ckey/ConditionKeyLikeSearch.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,92 @@ +package jp.sf.pal.pompei.allcommon.cbean.ckey; + + +import jp.sf.pal.pompei.allcommon.cbean.coption.ConditionOption; +import jp.sf.pal.pompei.allcommon.cbean.coption.LikeSearchOption; +import jp.sf.pal.pompei.allcommon.cbean.cvalue.ConditionValue; + +/** + * The condition-key of likeSearch. + * + * @author DBFlute(AutoGenerator) + */ +public class ConditionKeyLikeSearch extends ConditionKey { + + /** + * Constructor. + */ + protected ConditionKeyLikeSearch() { + _conditionKey = "likeSearch"; + _operand = "like"; + } + + /** + * Is valid registration? + * + * @param conditionValue Condition value. (NotNull) + * @param value Value. (NotNull) + * @param callerName Caller name. (NotNull) + * @return Determination. + */ + public boolean isValidRegistration(ConditionValue conditionValue, Object value, String callerName) { + if (value == null) { + return false; + } + return true; + } + + /** + * This method implements super#doAddWhereClause(). + * + * @param conditionList Condition list. (NotNull) + * @param columnName Column name. (NotNull) + * @param value Condition value. (NotNull) + */ + protected void doAddWhereClause(java.util.List conditionList, String columnName, ConditionValue value) { + throw new UnsupportedOperationException("doAddWhereClause without condition-option is unsupported!!!"); + } + + /** + * This method implements super#doAddWhereClause(). + * + * @param conditionList Condition list. (NotNull) + * @param columnName Column name. (NotNull) + * @param value Condition value. (NotNull) + * @param option Condition option. (NotNull) + */ + protected void doAddWhereClause(java.util.List conditionList, String columnName, ConditionValue value, ConditionOption option) { + if (option == null) { + String msg = "The argument[option] should not be null: columnName=" + columnName + " value=" + value; + throw new IllegalArgumentException(msg); + } + if (!(option instanceof LikeSearchOption)) { + String msg = "The argument[option] should be LikeSearchOption: columnName=" + columnName + " value=" + value; + throw new IllegalArgumentException(msg); + } + final LikeSearchOption myOption = (LikeSearchOption)option; + conditionList.add(buildBindClauseWithRearOption(columnName, value.getLikeSearchLocation(), myOption.getRearOption())); + } + + /** + * This method implements super#doSetupConditionValue(). + * + * @param conditionValue Condition value. (NotNull) + * @param value Value. (NotNull) + * @param location Location. (NotNull) + */ + protected void doSetupConditionValue(ConditionValue conditionValue, Object value, String location) { + throw new UnsupportedOperationException("doSetupConditionValue without condition-option is unsupported!!!"); + } + + /** + * This method implements super#doSetupConditionValue(). + * + * @param conditionValue Condition value. (NotNull) + * @param value Value. (NotNull) + * @param location Location. (NotNull) + * @param option Condition option. (NotNull) + */ + protected void doSetupConditionValue(ConditionValue conditionValue, Object value, String location, ConditionOption option) { + conditionValue.setLikeSearch((String)value, (LikeSearchOption)option).setLikeSearchLocation(location); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/ckey/ConditionKeyNotEqual.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/ckey/ConditionKeyNotEqual.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/ckey/ConditionKeyNotEqual.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,100 @@ +package jp.sf.pal.pompei.allcommon.cbean.ckey; + + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +import jp.sf.pal.pompei.allcommon.cbean.coption.ConditionOption; +import jp.sf.pal.pompei.allcommon.cbean.cvalue.ConditionValue; + +/** + * The condition-key of notEqual. + * + * @author DBFlute(AutoGenerator) + */ +public class ConditionKeyNotEqual extends ConditionKey { + + /** Log-instance. */ + private static final Log _log = LogFactory.getLog(ConditionKeyNotEqual.class); + + /** + * Constructor. + */ + protected ConditionKeyNotEqual() { + _conditionKey = "notEqual"; + _operand = "!="; + } + + /** + * Is valid registration? + * + * @param conditionValue Condition value. (NotNull) + * @param value Value. (NotNull) + * @param callerName Caller name. (NotNull) + * @return Determination. + */ + public boolean isValidRegistration(ConditionValue conditionValue, Object value, String callerName) { + if (value == null) { + return false; + } + if (conditionValue.hasNotEqual()) { + if (conditionValue.equalNotEqual(value)) { + _log.warn("The value has already registered at " + callerName + ": value=" + value); + return false; + } else { + conditionValue.overrideNotEqual(value); + return false; + } + } + return true; + } + + /** + * This method implements super#doAddWhereClause(). + * + * @param conditionList Condition list. (NotNull) + * @param columnName Column name. (NotNull) + * @param value Condition value. (NotNull) + */ + protected void doAddWhereClause(java.util.List conditionList, String columnName, ConditionValue value) { + if (value.getNotEqual() == null) { + return; + } + conditionList.add(buildBindClause(columnName, value.getNotEqualLocation())); + } + + /** + * This method implements super#doAddWhereClause(). + * + * @param conditionList Condition list. (NotNull) + * @param columnName Column name. (NotNull) + * @param value Condition value. (NotNull) + * @param option Condition option. (NotNull) + */ + protected void doAddWhereClause(java.util.List conditionList, String columnName, ConditionValue value, ConditionOption option) { + throw new UnsupportedOperationException("doAddWhereClause with condition-option is unsupported!!!"); + } + + /** + * This method implements super#doSetupConditionValue(). + * + * @param conditionValue Condition value. (NotNull) + * @param value Value. (NotNull) + * @param location Location. (NotNull) + */ + protected void doSetupConditionValue(ConditionValue conditionValue, Object value, String location) { + conditionValue.setNotEqual(value).setNotEqualLocation(location); + } + + /** + * This method implements super#doSetupConditionValue(). + * + * @param conditionValue Condition value. (NotNull) + * @param value Value. (NotNull) + * @param location Location. (NotNull) + * @param option Condition option. (NotNull) + */ + protected void doSetupConditionValue(ConditionValue conditionValue, Object value, String location, ConditionOption option) { + throw new UnsupportedOperationException("doSetupConditionValue with condition-option is unsupported!!!"); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/ckey/ConditionKeyNotInScope.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/ckey/ConditionKeyNotInScope.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/ckey/ConditionKeyNotInScope.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,116 @@ +package jp.sf.pal.pompei.allcommon.cbean.ckey; + + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +import jp.sf.pal.pompei.allcommon.cbean.coption.ConditionOption; +import jp.sf.pal.pompei.allcommon.cbean.cvalue.ConditionValue; + +/** + * The condition-key of notInScope. + * + * @author DBFlute(AutoGenerator) + */ +public class ConditionKeyNotInScope extends ConditionKey { + + /** Log-instance. */ + private static final Log _log = LogFactory.getLog(ConditionKeyNotInScope.class); + + /** + * Constructor. + */ + protected ConditionKeyNotInScope() { + _conditionKey = "notInScope"; + _operand = "not in"; + } + + /** + * Is valid registration? + * + * @param conditionValue Condition value. (NotNull) + * @param value Value. (NotNull) + * @param callerName Caller name. (NotNull) + * @return Determination. + */ + public boolean isValidRegistration(ConditionValue conditionValue, Object value, String callerName) { + if (value == null) { + return false; + } + if (value instanceof java.util.List && ((java.util.List)value).isEmpty()) { + return false; + } + if (value instanceof java.util.List) { + if (conditionValue.hasNotInScope()) { + if (conditionValue.equalNotInScope(((java.util.List)value))) { + _log.warn("The value has already registered at " + callerName + ": value=" + value); + return false; + } else { + conditionValue.overrideNotInScope(((java.util.List)value)); + return false; + } + } + } + return true; + } + + /** + * This method implements super#doAddWhereClause(). + * + * @param conditionList Condition list. (NotNull) + * @param columnName Column name. (NotNull) + * @param value Condition value. (NotNull) + */ + protected void doAddWhereClause(java.util.List conditionList, String columnName, ConditionValue value) { + if (value.getNotInScope() == null) { + return; + } + final java.util.List valueList = value.getNotInScope(); + final java.util.List checkedValueList = new java.util.ArrayList(); + for (final java.util.Iterator ite = valueList.iterator(); ite.hasNext(); ) { + final Object checkTargetValue = ite.next(); + if (checkTargetValue != null) {; + checkedValueList.add(checkTargetValue); + } + } + if (checkedValueList.isEmpty()) { + return; + } + conditionList.add(buildBindClause(columnName, value.getNotInScopeLocation(), "('a1', 'a2')")); + } + + /** + * This method implements super#doAddWhereClause(). + * + * @param conditionList Condition list. (NotNull) + * @param columnName Column name. (NotNull) + * @param value Condition value. (NotNull) + * @param option Condition option. (NotNull) + */ + protected void doAddWhereClause(java.util.List conditionList, String columnName, ConditionValue value, ConditionOption option) { + throw new UnsupportedOperationException("doAddWhereClause that has ConditionOption is unsupported!!!"); + } + + /** + * This method implements super#doSetupConditionValue(). + * + * @param conditionValue Condition value. (NotNull) + * @param value Value. (NotNull) + * @param location Location. (NotNull) + */ + protected void doSetupConditionValue(ConditionValue conditionValue, Object value, String location) { + conditionValue.setNotInScope((java.util.List)value).setNotInScopeLocation(location); + } + + /** + * This method implements super#doSetupConditionValue(). + * + * @param conditionValue Condition value. (NotNull) + * @param value Value. (NotNull) + * @param location Location. (NotNull) + * @param option Condition option. (NotNull) + */ + protected void doSetupConditionValue(ConditionValue conditionValue, Object value, String location, ConditionOption option) { + throw new UnsupportedOperationException("doSetupConditionValue with condition-option is unsupported!!!"); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/ckey/ConditionKeyPrefixSearch.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/ckey/ConditionKeyPrefixSearch.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/ckey/ConditionKeyPrefixSearch.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,100 @@ +package jp.sf.pal.pompei.allcommon.cbean.ckey; + + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +import jp.sf.pal.pompei.allcommon.cbean.coption.ConditionOption; +import jp.sf.pal.pompei.allcommon.cbean.cvalue.ConditionValue; + +/** + * The condition-key of prefixSearch. + * + * @author DBFlute(AutoGenerator) + */ +public class ConditionKeyPrefixSearch extends ConditionKey { + + /** Log-instance. */ + private static final Log _log = LogFactory.getLog(ConditionKeyPrefixSearch.class); + + /** + * Constructor. + */ + protected ConditionKeyPrefixSearch() { + _conditionKey = "prefixSearch"; + _operand = "like"; + } + + /** + * Is valid registration? + * + * @param conditionValue Condition value. (NotNull) + * @param value Value. (NotNull) + * @param callerName Caller name. (NotNull) + * @return Determination. + */ + public boolean isValidRegistration(ConditionValue conditionValue, Object value, String callerName) { + if (value == null) { + return false; + } + if (conditionValue.hasPrefixSearch()) { + if (conditionValue.equalPrefixSearch(value + getWildCard())) { + _log.warn("The value has already registered at " + callerName + ": value=" + value); + return false; + } else { + conditionValue.overridePrefixSearch(value); + return false; + } + } + return true; + } + + /** + * This method implements super#doAddWhereClause(). + * + * @param conditionList Condition list. (NotNull) + * @param columnName Column name. (NotNull) + * @param value Condition value. (NotNull) + */ + protected void doAddWhereClause(java.util.List conditionList, String columnName, ConditionValue value) { + if (value.getPrefixSearch() == null) { + return; + } + conditionList.add(buildBindClause(columnName, value.getPrefixSearchLocation())); + } + + /** + * This method implements super#doAddWhereClause(). + * + * @param conditionList Condition list. (NotNull) + * @param columnName Column name. (NotNull) + * @param value Condition value. (NotNull) + * @param option Condition option. (NotNull) + */ + protected void doAddWhereClause(java.util.List conditionList, String columnName, ConditionValue value, ConditionOption option) { + throw new UnsupportedOperationException("doAddWhereClause that has ConditionOption is unsupported!!!"); + } + + /** + * This method implements super#doSetupConditionValue(). + * + * @param conditionValue Condition value. (NotNull) + * @param value Value. (NotNull) + * @param location Location. (NotNull) + */ + protected void doSetupConditionValue(ConditionValue conditionValue, Object value, String location) { + conditionValue.setPrefixSearch((value != null ? value + getWildCard() : null)).setPrefixSearchLocation(location); + } + + /** + * This method implements super#doSetupConditionValue(). + * + * @param conditionValue Condition value. (NotNull) + * @param value Value. (NotNull) + * @param location Location. (NotNull) + * @param option Condition option. (NotNull) + */ + protected void doSetupConditionValue(ConditionValue conditionValue, Object value, String location, ConditionOption option) { + throw new UnsupportedOperationException("doSetupConditionValue with condition-option is unsupported!!!"); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/coption/ConditionOption.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/coption/ConditionOption.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/coption/ConditionOption.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,11 @@ +package jp.sf.pal.pompei.allcommon.cbean.coption; + + +/** + * The interface of condition-option. + * + * @author DBFlute(AutoGenerator) + */ +public interface ConditionOption { + public String getRearOption(); +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/coption/FromToOption.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/coption/FromToOption.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/coption/FromToOption.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,144 @@ +package jp.sf.pal.pompei.allcommon.cbean.coption; + + +/** + * The class of from-to-option. + *
+ * ex) fromDate:{2007/04/10 08:24:53} toDate:{2007/04/16 14:36:29}
+ *
+ *   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
+ *   new FromToOption().compareAsDate(); 
+ *     --> column >= '2007/04/10 00:00:00' and column < '2007/04/17 00:00:00'
+ *   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
+ *
+ *   new FromToOption(); 
+ *     --> column >= '2007/04/10 08:24:53' and column <= '2007/04/16 14:36:29'
+ *
+ *   new FromToOption().greaterThan(); 
+ *     --> column > '2007/04/10 08:24:53' and column <= '2007/04/16 14:36:29'
+ *
+ *   new FromToOption().lessThan(); 
+ *     --> column >= '2007/04/10 08:24:53' and column < '2007/04/16 14:36:29'
+ *
+ *   new FromToOption().greaterThan().lessThan(); 
+ *     --> column > '2007/04/10 08:24:53' and column < '2007/04/16 14:36:29'
+ * 
+ * 
+ * @author DBFlute(AutoGenerator) + */ +public class FromToOption implements ConditionOption { + + // ===================================================================================== + // Attribute + // ========= + protected boolean _fromDateGreaterThan; + + protected boolean _toDateLessThan; + + protected boolean _compareAsDate; + + // ===================================================================================== + // Interface Implementation + // ======================== + public String getRearOption() { + String msg = "Thie option does not use getRearOption()!"; + throw new UnsupportedOperationException(msg); + } + + // ===================================================================================== + // Main + // ==== + public FromToOption greaterThan() { + _fromDateGreaterThan = true; return this; + } + + public FromToOption lessThan() { + _toDateLessThan = true; return this; + } + + /** + * Compare as date. + *
+     * ex) fromDate:{2007/04/10 08:24:53} toDate:{2007/04/16 14:36:29}
+     *
+     *   new FromToOption().compareAsDate();
+     *     --> column >= '2007/04/10 00:00:00' and column < '2007/04/17 00:00:00'
+     * 
+     * This method ignore greaterThan() and lessThan().
+     * 
+ * @return this. (NotNull) + */ + public FromToOption compareAsDate() { + _compareAsDate = true; return this; + } + + // ===================================================================================== + // Internal Main + // ============= + public java.util.Date filterFromDate(java.util.Date fromDate) { + if (fromDate == null) { + return null; + } + if (_compareAsDate) { + final java.util.Calendar cal = java.util.Calendar.getInstance(); + cal.setTimeInMillis(fromDate.getTime()); + clearCalendarHourMinuteSecondMilli(cal); + final java.util.Date cloneDate = (java.util.Date) fromDate.clone(); + cloneDate.setTime(cal.getTimeInMillis()); + return cloneDate; + } + return fromDate; + } + + public java.util.Date filterToDate(java.util.Date toDate) { + if (toDate == null) { + return null; + } + if (_compareAsDate) { + final java.util.Calendar cal = java.util.Calendar.getInstance(); + cal.setTimeInMillis(toDate.getTime()); + clearCalendarHourMinuteSecondMilli(cal); + addCalendarNextDay(cal);// Key Point! + final java.util.Date cloneDate = (java.util.Date) toDate.clone(); + cloneDate.setTime(cal.getTimeInMillis()); + return cloneDate; + } + return toDate; + } + + public jp.sf.pal.pompei.allcommon.cbean.ckey.ConditionKey getFromDateConditionKey() { + if (_compareAsDate) { + return jp.sf.pal.pompei.allcommon.cbean.ckey.ConditionKey.CK_GREATER_EQUAL; + } + if (_fromDateGreaterThan) { + return jp.sf.pal.pompei.allcommon.cbean.ckey.ConditionKey.CK_GREATER_THAN;// Default! + } else { + return jp.sf.pal.pompei.allcommon.cbean.ckey.ConditionKey.CK_GREATER_EQUAL;// Default! + } + } + + public jp.sf.pal.pompei.allcommon.cbean.ckey.ConditionKey getToDateConditionKey() { + if (_compareAsDate) { + return jp.sf.pal.pompei.allcommon.cbean.ckey.ConditionKey.CK_LESS_THAN; + } + if (_toDateLessThan) { + return jp.sf.pal.pompei.allcommon.cbean.ckey.ConditionKey.CK_LESS_THAN;// Default! + } else { + return jp.sf.pal.pompei.allcommon.cbean.ckey.ConditionKey.CK_LESS_EQUAL;// Default! + } + } + + // ===================================================================================== + // Calendar Helper + // =============== + protected void addCalendarNextDay(java.util.Calendar cal) { + cal.add(java.util.Calendar.DAY_OF_MONTH, 1); + } + + protected void clearCalendarHourMinuteSecondMilli(java.util.Calendar cal) { + cal.clear(java.util.Calendar.MILLISECOND); + cal.clear(java.util.Calendar.SECOND); + cal.clear(java.util.Calendar.MINUTE); + cal.set(java.util.Calendar.HOUR_OF_DAY, cal.getActualMinimum(java.util.Calendar.HOUR_OF_DAY)); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/coption/InScopeOption.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/coption/InScopeOption.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/coption/InScopeOption.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,88 @@ +package jp.sf.pal.pompei.allcommon.cbean.coption; + + +import jp.sf.pal.pompei.allcommon.cbean.coption.parts.local.JapaneseOptionPartsAgent; + +/** + * The class of in-scope-option. + * + * @author DBFlute(AutoGenerator) + */ +public class InScopeOption extends SimpleStringOption { + + // ===================================================================================== + // Split + // ===== + public InScopeOption splitBySpace() { + return (InScopeOption)doSplitBySpace(); + } + + public InScopeOption splitBySpace(int splitLimitCount) { + return (InScopeOption)doSplitBySpace(splitLimitCount); + } + + public InScopeOption splitBySpaceContainsDoubleByte() { + return (InScopeOption)doSplitBySpaceContainsDoubleByte(); + } + + public InScopeOption splitBySpaceContainsDoubleByte(int splitLimitCount) { + return (InScopeOption)doSplitBySpaceContainsDoubleByte(splitLimitCount); + } + + public InScopeOption splitByPipeLine() { + return (InScopeOption)doSplitByPipeLine(); + } + + public InScopeOption splitByPipeLine(int splitLimitCount) { + return (InScopeOption)doSplitByPipeLine(splitLimitCount); + } + + // ===================================================================================== + // To Upper/Lower Case + // =================== + public InScopeOption toUpperCase() { + return (InScopeOption)doToUpperCase(); + } + + public InScopeOption toLowerCase() { + return (InScopeOption)doToLowerCase(); + } + + // ===================================================================================== + // To Single Byte + // ============== + public InScopeOption toSingleByteSpace() { + return (InScopeOption)doToSingleByteSpace(); + } + + public InScopeOption toSingleByteAlphabetNumber() { + return (InScopeOption)doToSingleByteAlphabetNumber(); + } + + public InScopeOption toSingleByteAlphabetNumberMark() { + return (InScopeOption)doToSingleByteAlphabetNumberMark(); + } + + // ===================================================================================== + // To Double Byte + // ============== + + // ===================================================================================== + // Japanese + // ======== + public JapaneseOptionPartsAgent localJapanese() { + return doLocalJapanese(); + } + + // ===================================================================================== + // Real Value + // ========== + public java.util.List generateRealValueList(java.util.List valueList) { + final java.util.List resultList = new java.util.ArrayList(); + for (final java.util.Iterator ite = valueList.iterator(); ite.hasNext(); ) { + final String value = (String)ite.next(); + resultList.add(generateRealValue(value)); + } + return resultList; + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/coption/LikeSearchOption.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/coption/LikeSearchOption.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/coption/LikeSearchOption.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,209 @@ +package jp.sf.pal.pompei.allcommon.cbean.coption; + + +import jp.sf.pal.pompei.allcommon.cbean.coption.parts.local.JapaneseOptionPartsAgent; + +/** + * The class of like-search-option. + * + * @author DBFlute(AutoGenerator) + */ +public class LikeSearchOption extends SimpleStringOption { + + protected static final String LIKE_PREFIX = "prefix"; + protected static final String LIKE_SUFFIX = "suffix"; + protected static final String LIKE_CONTAIN = "contain"; + + protected String _like; + protected String _escape; + + protected java.util.List _likeAsOrCallbackList = new java.util.ArrayList(); + + // ===================================================================================== + // Rear Option + // =========== + public String getRearOption() { + if (_escape == null || _escape.trim().length() == 0) { + return ""; + } + return " escape '" + _escape + "'"; + } + + // ===================================================================================== + // AsOr + // ==== + public static interface LikeAsOrCallback { + public String getAdditionalTargetPropertyName(); + public String filterValue(String currentValue); + public LikeSearchOption filterOption(LikeSearchOption optionDeepCopyWithoutCallback); + } + + public static abstract class DefaultLikeAsOrCallback implements LikeAsOrCallback { + public String filterValue(String currentValue) { + return currentValue; + } + public LikeSearchOption filterOption(LikeSearchOption optionDeepCopyWithoutCallback) { + return optionDeepCopyWithoutCallback; + } + } + + public java.util.List getLikeAsOrCallbackList() { + return _likeAsOrCallbackList; + } + + public void addLikeAsOrCallback(LikeAsOrCallback likeAsOrCallback) { + _likeAsOrCallbackList.add(likeAsOrCallback); + } + + public void clearLikeAsOrCallback() { + _likeAsOrCallbackList.clear(); + } + + // ===================================================================================== + // Like + // ==== + public LikeSearchOption likePrefix() { + _like = LIKE_PREFIX; + return this; + } + public LikeSearchOption likeSuffix() { + _like = LIKE_SUFFIX; + return this; + } + public LikeSearchOption likeContain() { + _like = LIKE_CONTAIN; + return this; + } + + // ===================================================================================== + // Escape + // ====== + public LikeSearchOption escapeByPipeLine() { + _escape = "|"; + return this; + } + + public LikeSearchOption escapeByAtMark() { + _escape = "@"; + return this; + } + + public LikeSearchOption escapeBySlash() { + _escape = "/"; + return this; + } + + public LikeSearchOption escapeByBackSlash() { + _escape = "\\"; + return this; + } + + // ===================================================================================== + // Split + // ===== + public LikeSearchOption splitBySpace() { + return (LikeSearchOption)doSplitBySpace(); + } + + public LikeSearchOption splitBySpace(int splitLimitCount) { + return (LikeSearchOption)doSplitBySpace(splitLimitCount); + } + + public LikeSearchOption splitBySpaceContainsDoubleByte() { + return (LikeSearchOption)doSplitBySpaceContainsDoubleByte(); + } + + public LikeSearchOption splitBySpaceContainsDoubleByte(int splitLimitCount) { + return (LikeSearchOption)doSplitBySpaceContainsDoubleByte(splitLimitCount); + } + + public LikeSearchOption splitByPipeLine() { + return (LikeSearchOption)doSplitByPipeLine(); + } + + public LikeSearchOption splitByPipeLine(int splitLimitCount) { + return (LikeSearchOption)doSplitByPipeLine(splitLimitCount); + } + + // ===================================================================================== + // To Upper/Lower Case + // =================== + public LikeSearchOption toUpperCase() { + return (LikeSearchOption)doToUpperCase(); + } + + public LikeSearchOption toLowerCase() { + return (LikeSearchOption)doToLowerCase(); + } + + // ===================================================================================== + // To Single Byte + // ============== + public LikeSearchOption toSingleByteSpace() { + return (LikeSearchOption)doToSingleByteSpace(); + } + + public LikeSearchOption toSingleByteAlphabetNumber() { + return (LikeSearchOption)doToSingleByteAlphabetNumber(); + } + + public LikeSearchOption toSingleByteAlphabetNumberMark() { + return (LikeSearchOption)doToSingleByteAlphabetNumberMark(); + } + + // ===================================================================================== + // To Double Byte + // ============== + + // ===================================================================================== + // Japanese + // ======== + public JapaneseOptionPartsAgent localJapanese() { + return doLocalJapanese(); + } + + // ===================================================================================== + // Real Value + // ========== + public String generateRealValue(String value) { + value = super.generateRealValue(value); + + // Escape + if (_escape != null && _escape.trim().length() != 0) { + String tmp = replace(value, _escape, _escape + _escape); + tmp = replace(tmp, "%", _escape + "%"); + tmp = replace(tmp, "_", _escape + "_"); + value = tmp; + } + final String wildCard = "%"; + if (_like == null || _like.trim().length() == 0) { + return value; + } else if (_like.equals(LIKE_PREFIX)) { + return value + wildCard; + } else if (_like.equals(LIKE_SUFFIX)) { + return wildCard + value; + } else if (_like.equals(LIKE_CONTAIN)) { + return wildCard + value + wildCard; + } else { + String msg = "The like was wrong string: " + _like; + throw new IllegalStateException(msg); + } + } + + // ===================================================================================== + // DeepCopy + // ======== + public Object createDeepCopy() { + final LikeSearchOption deepCopy = (LikeSearchOption)super.createDeepCopy(); + deepCopy._like = _like; + deepCopy._escape = _escape; + for (java.util.Iterator ite = _likeAsOrCallbackList.iterator(); ite.hasNext(); ) { + deepCopy.addLikeAsOrCallback((LikeAsOrCallback)ite.next()); + } + return deepCopy; + } + + protected SimpleStringOption newDeepCopyInstance() { + return new LikeSearchOption(); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/coption/SimpleStringOption.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/coption/SimpleStringOption.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/coption/SimpleStringOption.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,192 @@ +package jp.sf.pal.pompei.allcommon.cbean.coption; + + +import jp.sf.pal.pompei.allcommon.cbean.coption.parts.SplitOptionParts; +import jp.sf.pal.pompei.allcommon.cbean.coption.parts.ToUpperLowerCaseOptionParts; +import jp.sf.pal.pompei.allcommon.cbean.coption.parts.ToSingleByteOptionParts; +import jp.sf.pal.pompei.allcommon.cbean.coption.parts.local.JapaneseOptionPartsAgent; + +/** + * The class of simple-string-option. + * + * @author DBFlute(AutoGenerator) + */ +public class SimpleStringOption implements ConditionOption { + + protected SplitOptionParts _splitOptionParts; + protected ToUpperLowerCaseOptionParts _toUpperLowerCaseOptionParts; + protected ToSingleByteOptionParts _toSingleByteCaseOptionParts; + protected JapaneseOptionPartsAgent _japaneseOptionPartsAgent; + + // ===================================================================================== + // Rear Option + // =========== + public String getRearOption() { + return ""; + } + + // ===================================================================================== + // Split + // ===== + protected SimpleStringOption doSplitBySpace() { + getSplitOptionParts().splitBySpace(); + return this; + } + + protected SimpleStringOption doSplitBySpace(int splitLimitCount) { + getSplitOptionParts().splitBySpace(splitLimitCount); + return this; + } + + protected SimpleStringOption doSplitBySpaceContainsDoubleByte() { + getSplitOptionParts().splitBySpaceContainsDoubleByte(); + return this; + } + + protected SimpleStringOption doSplitBySpaceContainsDoubleByte(int splitLimitCount) { + getSplitOptionParts().splitBySpaceContainsDoubleByte(splitLimitCount); + return this; + } + + protected SimpleStringOption doSplitByPipeLine() { + getSplitOptionParts().splitByPipeLine(); + return this; + } + + protected SimpleStringOption doSplitByPipeLine(int splitLimitCount) { + getSplitOptionParts().splitByPipeLine(splitLimitCount); + return this; + } + + protected SplitOptionParts getSplitOptionParts() { + if (_splitOptionParts == null) { + _splitOptionParts = new SplitOptionParts(); + } + return _splitOptionParts; + } + + public boolean isSplit() { + return getSplitOptionParts().isSplit(); + } + + public String[] generateSplitValueArray(String value) { + return getSplitOptionParts().generateSplitValueArray(value); + } + + // ===================================================================================== + // To Upper/Lower Case + // =================== + protected SimpleStringOption doToUpperCase() { + getToUpperLowerCaseOptionParts().toUpperCase(); + return this; + } + + protected SimpleStringOption doToLowerCase() { + getToUpperLowerCaseOptionParts().toLowerCase(); + return this; + } + + protected ToUpperLowerCaseOptionParts getToUpperLowerCaseOptionParts() { + if (_toUpperLowerCaseOptionParts == null) { + _toUpperLowerCaseOptionParts = new ToUpperLowerCaseOptionParts(); + } + return _toUpperLowerCaseOptionParts; + } + + // ===================================================================================== + // To Single Byte + // ============== + protected SimpleStringOption doToSingleByteSpace() { + getToSingleByteOptionParts().toSingleByteSpace(); + return this; + } + + protected SimpleStringOption doToSingleByteAlphabetNumber() { + getToSingleByteOptionParts().toSingleByteAlphabetNumber(); + return this; + } + + protected SimpleStringOption doToSingleByteAlphabetNumberMark() { + getToSingleByteOptionParts().toSingleByteAlphabetNumberMark(); + return this; + } + + protected ToSingleByteOptionParts getToSingleByteOptionParts() { + if (_toSingleByteCaseOptionParts == null) { + _toSingleByteCaseOptionParts = new ToSingleByteOptionParts(); + } + return _toSingleByteCaseOptionParts; + } + + // ===================================================================================== + // To Double Byte + // ============== + + // ===================================================================================== + // Japanese + // ======== + protected JapaneseOptionPartsAgent doLocalJapanese() { + return getJapaneseOptionPartsAgent(); + } + + protected JapaneseOptionPartsAgent getJapaneseOptionPartsAgent() { + if (_japaneseOptionPartsAgent == null) { + _japaneseOptionPartsAgent = new JapaneseOptionPartsAgent(); + } + return _japaneseOptionPartsAgent; + } + + // ===================================================================================== + // Real Value + // ========== + public String generateRealValue(String value) { + value = getToUpperLowerCaseOptionParts().generateRealValue(value); + value = getToSingleByteOptionParts().generateRealValue(value); + value = getJapaneseOptionPartsAgent().generateRealValue(value); + return value; + } + + // ===================================================================================== + // Helper + // ====== + protected final String replace(String text, String fromText, + String toText) { + + if (text == null || fromText == null || toText == null) { + return null; + } + StringBuffer buf = new StringBuffer(100); + int pos = 0; + int pos2 = 0; + while (true) { + pos = text.indexOf(fromText, pos2); + if (pos == 0) { + buf.append(toText); + pos2 = fromText.length(); + } else if (pos > 0) { + buf.append(text.substring(pos2, pos)); + buf.append(toText); + pos2 = pos + fromText.length(); + } else { + buf.append(text.substring(pos2)); + break; + } + } + return buf.toString(); + } + + // ===================================================================================== + // DeepCopy + // ======== + public Object createDeepCopy() { + final SimpleStringOption deepCopy = newDeepCopyInstance(); + deepCopy._splitOptionParts = _splitOptionParts != null ? (SplitOptionParts)_splitOptionParts.createDeepCopy() : null; + deepCopy._toUpperLowerCaseOptionParts = _toUpperLowerCaseOptionParts != null ? (ToUpperLowerCaseOptionParts)_toUpperLowerCaseOptionParts.createDeepCopy() : null; + deepCopy._toSingleByteCaseOptionParts = _toSingleByteCaseOptionParts != null ? (ToSingleByteOptionParts)_toSingleByteCaseOptionParts.createDeepCopy() : null; + deepCopy._japaneseOptionPartsAgent = _japaneseOptionPartsAgent != null ? (JapaneseOptionPartsAgent)_japaneseOptionPartsAgent.createDeepCopy() : null; + return deepCopy; + } + protected SimpleStringOption newDeepCopyInstance() { + return new SimpleStringOption(); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/coption/parts/SplitOptionParts.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/coption/parts/SplitOptionParts.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/coption/parts/SplitOptionParts.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,154 @@ +package jp.sf.pal.pompei.allcommon.cbean.coption.parts; + + +/** + * The interface of condition-option. + * + * @author DBFlute(AutoGenerator) + */ +public class SplitOptionParts { + + // ===================================================================================== + // Attribute + // ========= + protected String _split; + protected String _splitContainedDelimiter; + protected int _splitLimitCount; + + // ===================================================================================== + // Main + // ==== + public boolean isSplit() { + return _split != null; + } + + public void splitBySpace() { + _split = " "; + } + + public void splitBySpace(int splitLimitCount) { + _split = " "; + _splitLimitCount = splitLimitCount; + } + + public void splitBySpaceContainsDoubleByte() { + _split = " "; + _splitContainedDelimiter = "\u3000"; + } + + public void splitBySpaceContainsDoubleByte(int splitLimitCount) { + _split = " "; + _splitContainedDelimiter = "\u3000"; + _splitLimitCount = splitLimitCount; + } + + public void splitByPipeLine() { + _split = "|"; + } + + public void splitByPipeLine(int splitLimitCount) { + _split = "|"; + _splitLimitCount = splitLimitCount; + } + + // ===================================================================================== + // Real Value + // ========== + public String[] generateSplitValueArray(String value) { + if (value == null || value.trim().length() == 0) { + String msg = "The argument[value] should not be null of empty: " + value; + throw new IllegalArgumentException(msg); + } + value = repalceContainedDelimiterToRealDelimiter(value); + final java.util.StringTokenizer st = new java.util.StringTokenizer(value, _split); + final String[] tokenizedValues = new String[st.countTokens()]; + int count = 0; + while (st.hasMoreTokens()) { + tokenizedValues[count] = st.nextToken(); + count++; + } + final String[] values = removeInvalidValue(tokenizedValues); + if (_splitLimitCount > 0 && values.length > _splitLimitCount) { + final String[] realValues = new String[_splitLimitCount]; + for (int i=0; i < values.length; i++) { + if (i == _splitLimitCount) { + break; + } + realValues[i] = values[i]; + } + return realValues; + } else { + return values; + } + + } + + protected String repalceContainedDelimiterToRealDelimiter(String value) { + if (value == null || value.trim().length() == 0) { + return value; + } + if (_splitContainedDelimiter == null) { + return value; + } + if (_split == null) { + return value; + } + return replace(value, _splitContainedDelimiter, _split); + } + + protected String[] removeInvalidValue(String[] values) { + final java.util.List ls = new java.util.ArrayList(); + for (int i = 0; i < values.length; i++) { + final String value = values[i]; + if (value == null || value.equals("")) {// Don't trim!!! + continue; + } + ls.add(value); + } + final String[] resultArray = new String[ls.size()]; + for (int i = 0; i < ls.size(); i++) { + resultArray[i] = (String) ls.get(i); + } + return resultArray; + } + + // ===================================================================================== + // Helper + // ====== + protected final String replace(String text, String fromText, + String toText) { + + if (text == null || fromText == null || toText == null) { + return null; + } + StringBuffer buf = new StringBuffer(100); + int pos = 0; + int pos2 = 0; + while (true) { + pos = text.indexOf(fromText, pos2); + if (pos == 0) { + buf.append(toText); + pos2 = fromText.length(); + } else if (pos > 0) { + buf.append(text.substring(pos2, pos)); + buf.append(toText); + pos2 = pos + fromText.length(); + } else { + buf.append(text.substring(pos2)); + break; + } + } + return buf.toString(); + } + + // ===================================================================================== + // DeepCopy + // ======== + public Object createDeepCopy() { + final SplitOptionParts deepCopy = new SplitOptionParts(); + deepCopy._split = _split; + deepCopy._splitContainedDelimiter = _splitContainedDelimiter; + deepCopy._splitLimitCount = _splitLimitCount; + return deepCopy; + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/coption/parts/ToSingleByteOptionParts.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/coption/parts/ToSingleByteOptionParts.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/coption/parts/ToSingleByteOptionParts.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,82 @@ +package jp.sf.pal.pompei.allcommon.cbean.coption.parts; + + +import jp.sf.pal.pompei.allcommon.helper.character.GeneralCharacter; +import jp.sf.pal.pompei.allcommon.helper.character.impl.GeneralCharacterImpl; + +/** + * The interface of condition-option. + * + * @author DBFlute(AutoGenerator) + */ +public class ToSingleByteOptionParts { + + // ===================================================================================== + // Attribute + // ========= + protected boolean _toSingleByteSpace; + protected boolean _toSingleByteAlphabetNumber; + protected boolean _toSingleByteAlphabetNumberMark; + + private GeneralCharacter _generalCharacter; + + // ===================================================================================== + // Main + // ==== + public boolean isToSingleByteSpace() { + return _toSingleByteSpace; + } + public void toSingleByteSpace() { + _toSingleByteSpace = true; + } + + public void toSingleByteAlphabetNumber() { + _toSingleByteAlphabetNumber = true; + } + + public void toSingleByteAlphabetNumberMark() { + _toSingleByteAlphabetNumberMark = true; + } + + // ===================================================================================== + // Real Value + // ========== + public String generateRealValue(String value) { + if (value == null || value.trim().length() == 0) { + String msg = "The argument[value] should not be null."; + throw new IllegalArgumentException(msg); + } + + // To Single Byte + if (_toSingleByteSpace) { + value = (value != null ? value.replaceAll("\u3000", " ") : value); + } + if (_toSingleByteAlphabetNumberMark) { + value = getGeneralCharacter().toSingleByteAlphabetNumberMark(value); + } else if (_toSingleByteAlphabetNumber) { + value = getGeneralCharacter().toSingleByteAlphabetNumber(value); + } + return value; + } + + // ===================================================================================== + // Helper + // ====== + protected GeneralCharacter getGeneralCharacter() { + if (_generalCharacter == null) { + _generalCharacter = new GeneralCharacterImpl(); + } + return _generalCharacter; + } + + // ===================================================================================== + // DeepCopy + // ======== + public Object createDeepCopy() { + final ToSingleByteOptionParts deepCopy = new ToSingleByteOptionParts(); + deepCopy._toSingleByteSpace = _toSingleByteSpace; + deepCopy._toSingleByteAlphabetNumber = _toSingleByteAlphabetNumber; + deepCopy._toSingleByteAlphabetNumberMark = _toSingleByteAlphabetNumberMark; + return deepCopy; + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/coption/parts/ToUpperLowerCaseOptionParts.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/coption/parts/ToUpperLowerCaseOptionParts.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/coption/parts/ToUpperLowerCaseOptionParts.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,58 @@ +package jp.sf.pal.pompei.allcommon.cbean.coption.parts; + + +/** + * The class of condition-option-parts about toUpperCase/toLowerCase. + * + * @author DBFlute(AutoGenerator) + */ +public class ToUpperLowerCaseOptionParts { + + // ===================================================================================== + // Attribute + // ========= + protected boolean _toUpperCase; + protected boolean _toLowerCase; + + // ===================================================================================== + // Main + // ==== + public void toUpperCase() { + _toUpperCase = true; + _toLowerCase = false; + } + + public void toLowerCase() { + _toUpperCase = false; + _toLowerCase = true; + } + + // ===================================================================================== + // Real Value + // ========== + public String generateRealValue(String value) { + if (value == null || value.trim().length() == 0) { + String msg = "The argument[value] should not be null."; + throw new IllegalArgumentException(msg); + } + + // To Upper/Lower Case + if (_toUpperCase) { + value = (value != null ? value.toUpperCase() : value); + } + if (_toLowerCase) { + value = (value != null ? value.toLowerCase() : value); + } + return value; + } + + // ===================================================================================== + // DeepCopy + // ======== + public Object createDeepCopy() { + final ToUpperLowerCaseOptionParts deepCopy = new ToUpperLowerCaseOptionParts(); + deepCopy._toUpperCase = _toUpperCase; + deepCopy._toLowerCase = _toLowerCase; + return deepCopy; + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/coption/parts/local/JapaneseOptionPartsAgent.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/coption/parts/local/JapaneseOptionPartsAgent.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/coption/parts/local/JapaneseOptionPartsAgent.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,81 @@ +package jp.sf.pal.pompei.allcommon.cbean.coption.parts.local; + + +import jp.sf.pal.pompei.allcommon.helper.character.JapaneseCharacter; +import jp.sf.pal.pompei.allcommon.helper.character.impl.JapaneseCharacterImpl; + +/** + * The class of condition-option-parts-agent. + * + * @author DBFlute(AutoGenerator) + */ +public class JapaneseOptionPartsAgent { + + // ===================================================================================== + // Attribute + // ========= + protected boolean _toDoubleByteKatakana; + protected boolean _removeLastLongVowel; + private JapaneseCharacter _japaneseCharacter; + + // ===================================================================================== + // Main + // ==== + public boolean isToDoubleByteKatakana() { + return _toDoubleByteKatakana; + } + + public void toDoubleByteKatakana() { + _toDoubleByteKatakana = true; + } + + public boolean isRemoveLastLongVowel() { + return _removeLastLongVowel; + } + public void removeLastLongVowel() { + _removeLastLongVowel = true; + } + + // ===================================================================================== + // Real Value + // ========== + public String generateRealValue(String value) { + if (value == null || value.trim().length() == 0) { + String msg = "The argument[value] should not be null."; + throw new IllegalArgumentException(msg); + } + + // To Double Byte + if (_toDoubleByteKatakana) { + value = getJapaneseCharacter().toDoubleByteKatakana(value); + } + + // Remove + if (_removeLastLongVowel) { + if (value != null && value.endsWith("\u30fc")) { + value = value.substring(0, value.length() - "\u30fc".length()); + } + } + return value; + } + + // ===================================================================================== + // Helper + // ====== + protected JapaneseCharacter getJapaneseCharacter() { + if (_japaneseCharacter == null) { + _japaneseCharacter = new JapaneseCharacterImpl(); + } + return _japaneseCharacter; + } + + // ===================================================================================== + // DeepCopy + // ======== + public Object createDeepCopy() { + final JapaneseOptionPartsAgent deepCopy = new JapaneseOptionPartsAgent(); + deepCopy._toDoubleByteKatakana = _toDoubleByteKatakana; + deepCopy._removeLastLongVowel = _removeLastLongVowel; + return deepCopy; + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/cvalue/ConditionValue.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/cvalue/ConditionValue.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/cvalue/ConditionValue.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,1185 @@ +package jp.sf.pal.pompei.allcommon.cbean.cvalue; + + +import java.util.List; + +import jp.sf.pal.pompei.allcommon.cbean.coption.LikeSearchOption; +import jp.sf.pal.pompei.allcommon.cbean.coption.InScopeOption; + +/** + * Condition value. + * + * @author DBFlute(AutoGenerator) + */ +public class ConditionValue { + + // =================================================================================== + // Equal + // ===== + /** Value of equal. */ + protected Object _equalValue; + + /** + * Get the value of equal. + * + * @return The value of equal. (Nullable) + */ + public Object getEqual() { + return filterValue(_equalValue); + } + + /** + * Set the value of equal. + * + * @param value The value of equal. (Nullable) + * @return this. (NotNull) + */ + public ConditionValue setEqual(Object value) { + _equalValue = value; + return this; + } + + /** + * Does it has the value of equal? + * + * @return Determination. (NotNull) + */ + public boolean hasEqual() { + return _equalValue != null; + } + + /** + * Does the value equal the value of equal? + * + * @param value The value of equal. (Nullable) + * @return Determination. (NotNull) + */ + public boolean equalEqual(Object value) { + return hasEqual() ? _equalValue.equals(value) : value == null; + } + + /** + * Override the value of equal. + * + * @param value The value of equal. (Nullable) + * @return this. (NotNull) + */ + public ConditionValue overrideEqual(Object value) { + _equalValue = value; + return this; + } + + /** Location of equal. */ + protected String _equalLocation; + + /** + * Get the location of equal. + * + * @return The location of equal. (Nullable) + */ + public String getEqualLocation() { + return _equalLocation; + } + + /** + * Set the location of equal. + * + * @param location The location of equal. (Nullable) + * @return this. (NotNull) + */ + public ConditionValue setEqualLocation(String location) { + _equalLocation = location; + return this; + } + + // =================================================================================== + // Not Equal + // ========= + /** Value of notEqual. */ + protected Object _notEqualValue; + + /** + * Get the value of notEqual. + * + * @return The value of notEqual. (Nullable) + */ + public Object getNotEqual() { + return filterValue(_notEqualValue); + } + + /** + * Set the value of notEqual. + * + * @param value The value of notEqual. (Nullable) + * @return this. (NotNull) + */ + public ConditionValue setNotEqual(Object value) { + _notEqualValue = value; + return this; + } + + /** + * Does it has the value of notEqual? + * + * @return Determination. (NotNull) + */ + public boolean hasNotEqual() { + return _notEqualValue != null; + } + + /** + * Does the value equal the value of notEqual? + * + * @param value The value of notEqual. (Nullable) + * @return Determination. (NotNull) + */ + public boolean equalNotEqual(Object value) { + return hasNotEqual() ? _notEqualValue.equals(value) : value == null; + } + + /** + * Override the value of notEqual. + * + * @param value The value of notEqual. (Nullable) + * @return this. (NotNull) + */ + public ConditionValue overrideNotEqual(Object value) { + _notEqualValue = value; + return this; + } + + /** Location of notEqual. */ + protected String _notEqualLocation; + + /** + * Get the location of notEqual. + * + * @return The location of notEqual. (Nullable) + */ + public String getNotEqualLocation() { + return _notEqualLocation; + } + + /** + * Set the location of notEqual. + * + * @param location The location of notEqual. (Nullable) + * @return this. (NotNull) + */ + public ConditionValue setNotEqualLocation(String location) { + _notEqualLocation = location; + return this; + } + + // =================================================================================== + // Greater Than + // ============ + /** Value of greaterThan. */ + protected Object _greaterThanValue; + + /** + * Get the value of greaterThan. + * + * @return The value of greaterThan. (Nullable) + */ + public Object getGreaterThan() { + return filterValue(_greaterThanValue); + } + + /** + * Set the value of greaterThan. + * + * @param value The value of greaterThan. (Nullable) + * @return this. (NotNull) + */ + public ConditionValue setGreaterThan(Object value) { + _greaterThanValue = value; + return this; + } + + /** + * Does it has the value of greaterThan? + * + * @return Determination. (NotNull) + */ + public boolean hasGreaterThan() { + return _greaterThanValue != null; + } + + /** + * Does the value equal the value of greaterThan? + * + * @param value The value of greaterThan. (Nullable) + * @return Determination. (NotNull) + */ + public boolean equalGreaterThan(Object value) { + return hasGreaterThan() ? _greaterThanValue.equals(value) : value == null; + } + + /** + * Override the value of greaterThan. + * + * @param value The value of greaterThan. (Nullable) + * @return this. (NotNull) + */ + public ConditionValue overrideGreaterThan(Object value) { + _greaterThanValue = value; + return this; + } + + /** Location of GreaterThan. */ + protected String _greaterThanLocation; + + /** + * Get the location of greaterThan. + * + * @return The location of greaterThan. (Nullable) + */ + public String getGreaterThanLocation() { + return _greaterThanLocation; + } + + /** + * Set the location of greaterThan. + * + * @param location The location of greaterThan. (Nullable) + * @return this. (NotNull) + */ + public ConditionValue setGreaterThanLocation(String location) { + _greaterThanLocation = location; + return this; + } + + // =================================================================================== + // Less Than + // ========= + /** Value of lessThan. */ + protected Object _lessThanValue; + + /** + * Get the value of lessThan. + * + * @return The value of lessThan. (Nullable) + */ + public Object getLessThan() { + return filterValue(_lessThanValue); + } + + /** + * Set the value of lessThan. + * + * @param value The value of lessThan. (Nullable) + * @return this. (NotNull) + */ + public ConditionValue setLessThan(Object value) { + _lessThanValue = value; + return this; + } + + /** + * Does it has the value of lessThan? + * + * @return Determination. (NotNull) + */ + public boolean hasLessThan() { + return _lessThanValue != null; + } + + /** + * Does the value equal the value of lessThan? + * + * @param value The value of lessThan. (Nullable) + * @return Determination. (NotNull) + */ + public boolean equalLessThan(Object value) { + return hasLessThan() ? _lessThanValue.equals(value) : value == null; + } + + /** + * Override the value of lessThan. + * + * @param value The value of lessThan. (Nullable) + * @return this. (NotNull) + */ + public ConditionValue overrideLessThan(Object value) { + _lessThanValue = value; + return this; + } + + /** Location of lessThan. */ + protected String _lessThanLocation; + + /** + * Get the location of lessThan. + * + * @return The location of lessThan. (Nullable) + */ + public String getLessThanLocation() { + return _lessThanLocation; + } + + /** + * Set the location of lessThan. + * + * @param location The location of lessThan. (Nullable) + * @return this. (NotNull) + */ + public ConditionValue setLessThanLocation(String location) { + _lessThanLocation = location; + return this; + } + + // =================================================================================== + // Greater Equal + // ============= + /** Value of greaterEqual. */ + protected Object _greaterEqualValue; + + /** + * Get the value of greaterEqual. + * + * @return The value of greaterEqual. (Nullable) + */ + public Object getGreaterEqual() { + return filterValue(_greaterEqualValue); + } + + /** + * Set the value of greaterEqual. + * + * @param value The value of greaterEqual. (Nullable) + * @return this. (NotNull) + */ + public ConditionValue setGreaterEqual(Object value) { + _greaterEqualValue = value; + return this; + } + + /** + * Does it has the value of greaterEqual? + * + * @return Determination. (NotNull) + */ + public boolean hasGreaterEqual() { + return _greaterEqualValue != null; + } + + /** + * Does the value equal the value of greaterEqual? + * + * @param value The value of greaterEqual. (Nullable) + * @return Determination. (NotNull) + */ + public boolean equalGreaterEqual(Object value) { + return hasGreaterEqual() ? _greaterEqualValue.equals(value) : value == null; + } + + /** + * Override the value of greaterEqual. + * + * @param value The value of greaterEqual. (Nullable) + * @return this. (NotNull) + */ + public ConditionValue overrideGreaterEqual(Object value) { + _greaterEqualValue = value; + return this; + } + + /** Location of greaterEqual. */ + protected String _greaterEqualLocation; + + /** + * Get the location of greaterEqual. + * + * @return The location of greaterEqual. (Nullable) + */ + public String getGreaterEqualLocation() { + return _greaterEqualLocation; + } + + /** + * Set the location of greaterEqual. + * + * @param location The location of greaterEqual. (Nullable) + * @return this. (NotNull) + */ + public ConditionValue setGreaterEqualLocation(String location) { + _greaterEqualLocation = location; + return this; + } + + // =================================================================================== + // Less Equal + // ========== + /** Value of lessEqual. */ + protected Object _lessEqualValue; + + /** + * Get the value of lessEqual. + * + * @return The value of lessEqual. (Nullable) + */ + public Object getLessEqual() { + return filterValue(_lessEqualValue); + } + + /** + * Set the value of lessEqual. + * + * @param value The value of lessEqual. (Nullable) + * @return this. (NotNull) + */ + public ConditionValue setLessEqual(Object value) { + _lessEqualValue = value; + return this; + } + + /** + * Does it has the value of lessEqual? + * + * @return Determination. (NotNull) + */ + public boolean hasLessEqual() { + return _lessEqualValue != null; + } + + /** + * Does the value equal the value of lessEqual? + * + * @param value The value of lessEqual. (Nullable) + * @return Determination. (NotNull) + */ + public boolean equalLessEqual(Object value) { + return hasLessEqual() ? _lessEqualValue.equals(value) : value == null; + } + + /** + * Override the value of lessEqual. + * + * @param value The value of lessEqual. (Nullable) + * @return this. (NotNull) + */ + public ConditionValue overrideLessEqual(Object value) { + _lessEqualValue = value; + return this; + } + + /** Location of lessEqual. */ + protected String _lessEqualLocation; + + /** + * Get the location of lessEqual. + * + * @return The location of lessEqual. (Nullable) + */ + public String getLessEqualLocation() { + return _lessEqualLocation; + } + + /** + * Set the location of lessEqual. + * + * @param location The location of lessEqual. (Nullable) + * @return this. (NotNull) + */ + public ConditionValue setLessEqualLocation(String location) { + _lessEqualLocation = location; + return this; + } + + // =================================================================================== + // Prefix Search + // ============= + /** Value of prefixSearch. */ + protected Object _prefixSearch; + + /** + * Get the value of prefixSearch. + * + * @return The value of prefixSearch. (Nullable) + */ + public Object getPrefixSearch() { + return filterValue(_prefixSearch); + } + + /** + * Set the value of prefixSearch. + * + * @param value The value of prefixSearch. (Nullable) + * @return this. (NotNull) + */ + public ConditionValue setPrefixSearch(Object value) { + _prefixSearch = value; + return this; + } + + /** + * Does it has the value of prefixSearch? + * + * @return Determination. (NotNull) + */ + public boolean hasPrefixSearch() { + return _prefixSearch != null; + } + + /** + * Does the value equal the value of prefixSearch? + * + * @param value The value of prefixSearch. (Nullable) + * @return Determination. (NotNull) + */ + public boolean equalPrefixSearch(Object value) { + return hasPrefixSearch() ? _prefixSearch.equals(value) : value == null; + } + + /** + * Override the value of prefixSearch. + * + * @param value The value of prefixSearch. (Nullable) + * @return this. (NotNull) + */ + public ConditionValue overridePrefixSearch(Object value) { + _prefixSearch = value; + return this; + } + + /** Location of prefixSearch. */ + protected String _prefixSearchLocation; + + /** + * Get the location of prefixSearch. + * + * @return The location of prefixSearch. (Nullable) + */ + public String getPrefixSearchLocation() { + return _prefixSearchLocation; + } + + /** + * Set the location of prefixSearch. + * + * @param location The location of prefixSearch. (Nullable) + * @return this. (NotNull) + */ + public ConditionValue setPrefixSearchLocation(String location) { + _prefixSearchLocation = location; + return this; + } + + // =================================================================================== + // Like Search + // =========== + /** Value of likeSearch. */ + protected java.util.List _likeSearch; + + /** Value of likeSearch for spare. */ + protected java.util.List _likeSearch4Spare; + + /** + * Get the value of likeSearch. + * + * @return The value of likeSearch. (Nullable) + */ + public String getLikeSearch() { + if (_likeSearch == null) { + return null; + } + if (_likeSearch.isEmpty() && !_likeSearch4Spare.isEmpty()) { + for (int index=0; index < _likeSearch4Spare.size(); index++) { + _likeSearch.add(_likeSearch4Spare.get(index)); + } + } + final LikeSearchValue likeSearchValue = (LikeSearchValue)_likeSearch.remove(0); + return (String)filterValue(likeSearchValue.generateRealValue()); + } + + /** + * Set the value of likeSearch. + * + * @param value The value of likeSearch. (Nullable) + * @return this. (NotNull) + */ + public ConditionValue setLikeSearch(String value, LikeSearchOption option) { + if (_likeSearch == null) { + _likeSearch = new java.util.ArrayList(); + _likeSearch4Spare= new java.util.ArrayList(); + } + if (_likeSearch.isEmpty() && !_likeSearch4Spare.isEmpty()) { + for (int index=0; index < _likeSearch4Spare.size(); index++) { + _likeSearch.add(_likeSearch4Spare.get(index)); + } + } + final LikeSearchValue likeSearchValue = new LikeSearchValue(value, option); + _likeSearch.add(likeSearchValue); + _likeSearch4Spare.add(likeSearchValue); + return this; + } + + /** Location of likeSearch. */ + protected String _likeSearchLocation; + + /** + * Get the location of likeSearch. + * + * @return The location of likeSearch. (Nullable) + */ + public String getLikeSearchLocation() { + return _likeSearchLocation; + } + + /** + * Set the location of likeSearch. + * + * @param location The location of likeSearch. (Nullable) + * @return this. (NotNull) + */ + public ConditionValue setLikeSearchLocation(String location) { + _likeSearchLocation = location; + return this; + } + + protected static class LikeSearchValue { + protected String _value; + protected LikeSearchOption _option; + public LikeSearchValue(String value, LikeSearchOption option) { + _value = value; + _option = option; + } + public String getValue() { + return _value; + } + public LikeSearchOption getOption() { + return _option; + } + public String generateRealValue() { + if (_option == null) { + return _value; + } + return _option.generateRealValue(_value); + } + } + + // =================================================================================== + // In Scope + // ======== + /** Value of inScope. */ + protected List _inScope; + + protected InScopeOption _inScopeOption; + + /** + * Get the value of inScope. + * + * @return The value of inScope. (Nullable) + */ + public List getInScope() { + if (_inScopeOption != null) { + return filterValue(_inScopeOption.generateRealValueList(_inScope)); + } + return filterValue(_inScope); + } + + /** + * Set the value of inScope. + * + * @param value The value of inScope. (Nullable) + * @return this. (NotNull) + */ + public ConditionValue setInScope(List value) { + _inScope = value; + return this; + } + + public ConditionValue setInScope(List value, InScopeOption option) { + _inScope = value; + _inScopeOption = option; + return this; + } + + /** + * Does it has the value of inScope? + * + * @return Determination. (NotNull) + */ + public boolean hasInScope() { + return _inScope != null; + } + + /** + * Does the value equal the value of inScope? + * + * @param value The value of inScope. (Nullable) + * @return Determination. (NotNull) + */ + public boolean equalInScope(List value) { + return hasInScope() ? _inScope.equals(value) : value == null; + } + + /** + * Override the value of inScope. + * + * @param value The value of inScope. (Nullable) + * @return this. (NotNull) + */ + public ConditionValue overrideInScope(List value) { + _inScope = value; + return this; + } + + /** Location of InScope. */ + protected String _inScopeLocation; + + /** + * Get the location of inScope. + * + * @return The location of inScope. (Nullable) + */ + public String getInScopeLocation() { + return _inScopeLocation; + } + + /** + * Set the location of inScope. + * + * @param location The location of inScope. (Nullable) + * @return this. (NotNull) + */ + public ConditionValue setInScopeLocation(String location) { + _inScopeLocation = location; + return this; + } + + // =================================================================================== + // Not In Scope + // ============ + /** Value of notInScope. */ + protected List _notInScope; + + /** + * Get the value of notInScope. + * + * @return The value of notInScope. (Nullable) + */ + public List getNotInScope() { + return filterValue(_notInScope); + } + + /** + * Set the value of notInScope. + * + * @param value The value of notInScope. (Nullable) + * @return this. (NotNull) + */ + public ConditionValue setNotInScope(List value) { + _notInScope = value; + return this; + } + + /** + * Does it has the value of inNotScope? + * + * @return Determination. (NotNull) + */ + public boolean hasNotInScope() { + return _notInScope != null; + } + + /** + * Does the value equal the value of inNotScope? + * + * @param value The value of inNotScope. (Nullable) + * @return Determination. (NotNull) + */ + public boolean equalNotInScope(List value) { + return hasNotInScope() ? _notInScope.equals(value) : value == null; + } + + /** + * Override the value of inNotScope. + * + * @param value The value of inNotScope. (Nullable) + * @return this. (NotNull) + */ + public ConditionValue overrideNotInScope(List value) { + _notInScope = value; + return this; + } + + /** Location of notInScope. */ + protected String _notInScopeLocation; + + /** + * Get the location of notInScope. + * + * @return The location of notInScope. (Nullable) + */ + public String getNotInScopeLocation() { + return _notInScopeLocation; + } + + /** + * Set the location of notInScope. + * + * @param location The location of notInScope. (Nullable) + * @return this. (NotNull) + */ + public ConditionValue setNotInScopeLocation(String location) { + _notInScopeLocation = location; + return this; + } + + // =================================================================================== + // Is Null + // ======= + /** Value of isNull. */ + protected Object _isNullValue; + + /** + * Get the value of isNull. + * + * @return The value of isNull. (Nullable) + */ + public Object getIsNull() { + return _isNullValue; + } + + /** + * Set the value of isNull. + * + * @param value The value of isNull. (Nullable) + * @return this. (NotNull) + */ + public ConditionValue setIsNull(Object value) { + _isNullValue = value; + return this; + } + + /** + * Does it has the value of isNull? + * + * @return Determination. (NotNull) + */ + public boolean hasIsNull() { + return _isNullValue != null; + } + + /** Location of isNull. */ + protected String _isNullLocation; + + /** + * Get the location of isNull. + * + * @return The location of isNull. (Nullable) + */ + public String getIsNullLocation() { + return _isNullLocation; + } + + /** + * Set the location of isNull. + * + * @param location The location of isNull. (Nullable) + * @return this. (NotNull) + */ + public ConditionValue setIsNullLocation(String location) { + _isNullLocation = location; + return this; + } + + // =================================================================================== + // Is Not Null + // =========== + /** Value of isNotNull. */ + protected Object _isNotNullValue; + + /** + * Get the value of isNotNull. + * + * @return The value of isNotNull. (Nullable) + */ + public Object getIsNotNull() { + return _isNotNullValue; + } + + /** + * Set the value of isNotNull. + * + * @param value The value of isNotNull. (Nullable) + * @return this. (NotNull) + */ + public ConditionValue setIsNotNull(Object value) { + _isNotNullValue = value; + return this; + } + + /** + * Does it has the value of isNotNull? + * + * @return Determination. (NotNull) + */ + public boolean hasIsNotNull() { + return _isNotNullValue != null; + } + + /** Location of isNotNull. */ + protected String _isNotNullLocation; + + /** + * Get the location of isNotNull. + * + * @return The location of isNotNull. (Nullable) + */ + public String getIsNotNullLocation() { + return _isNotNullLocation; + } + + /** + * Set the location of isNotNull. + * + * @param location The location of isNotNull. (Nullable) + * @return this. (NotNull) + */ + public ConditionValue setIsNotNullLocation(String location) { + _isNotNullLocation = location; + return this; + } + + // ===================================================================================== + // Filter + // ====== + /** + * Filter value. + * If the value is instance of java.util.Date or java.util.Calendar, returns value as java.sql.Date. + * + * @param value Value. (Nullable) + * @return Filtered value. (Nullable) + */ + protected Object filterValue(Object value) { + if (value == null) { + return value; + } + if (value instanceof java.sql.Timestamp) { + return value; + } + if (value instanceof java.util.Date || value instanceof java.util.Calendar) { + return SqlDateConversionUtil.toDate(value); + } else { + return value; + } + } + + /** + * Filter value. + * If the value is instance of java.util.Date or java.util.Calendar, returns value as java.sql.Date. + * + * @param valueList Value-list. (Nullable) + * @return Filtered value-list. (Nullable) + */ + protected java.util.List filterValue(java.util.List valueList) { + if (valueList == null || valueList.isEmpty()) { + return valueList; + } + final List resultList = new java.util.ArrayList(); + for (final java.util.Iterator ite = valueList.iterator(); ite.hasNext(); ) { + Object value = ite.next(); + resultList.add(filterValue(value)); + } + return resultList; + } + + protected static class SqlDateConversionUtil { + + private SqlDateConversionUtil() { + } + + public static java.sql.Date toDate(Object o) { + return toDate(o, null); + } + + public static java.sql.Date toDate(Object o, String pattern) { + if (o instanceof java.sql.Date) { + return (java.sql.Date) o; + } + java.util.Date date = DateConversionUtil.toDate(o, pattern); + if (date != null) { + return new java.sql.Date(date.getTime()); + } + return null; + } + } + + protected static class DateConversionUtil { + + private DateConversionUtil() { + } + + public static java.util.Date toDate(Object o) { + return toDate(o, null); + } + + public static java.util.Date toDate(Object o, String pattern) { + if (o == null) { + return null; + } else if (o instanceof String) { + return toDate((String) o, pattern); + } else if (o instanceof java.util.Date) { + return (java.util.Date) o; + } else if (o instanceof java.util.Calendar) { + return ((java.util.Calendar) o).getTime(); + } else { + return toDate(o.toString(), pattern); + } + } + + public static java.util.Date toDate(String s, String pattern) { + return toDate(s, pattern, java.util.Locale.getDefault()); + } + + public static java.util.Date toDate(String s, String pattern, java.util.Locale locale) { + java.text.SimpleDateFormat sdf = getDateFormat(s, pattern, locale); + try { + return sdf.parse(s); + } catch (java.text.ParseException ex) { + throw new RuntimeException(ex); + } + } + + public static java.text.SimpleDateFormat getDateFormat(String s, String pattern, + java.util.Locale locale) { + if (pattern != null) { + return new java.text.SimpleDateFormat(pattern); + } + return getDateFormat(s, locale); + } + + public static java.text.SimpleDateFormat getDateFormat(String s, java.util.Locale locale) { + String pattern = getPattern(locale); + String shortPattern = removeDelimiter(pattern); + String delimitor = findDelimiter(s); + if (delimitor == null) { + if (s.length() == shortPattern.length()) { + return new java.text.SimpleDateFormat(shortPattern); + } + if (s.length() == shortPattern.length() + 2) { + return new java.text.SimpleDateFormat(InternalStringUtil.replace(shortPattern, + "yy", "yyyy")); + } + } else { + String[] array = InternalStringUtil.split(s, delimitor); + for (int i = 0; i < array.length; ++i) { + if (array[i].length() == 4) { + pattern = InternalStringUtil.replace(pattern, "yy", "yyyy"); + break; + } + } + return new java.text.SimpleDateFormat(pattern); + } + return new java.text.SimpleDateFormat(); + } + + public static java.text.SimpleDateFormat getDateFormat(java.util.Locale locale) { + return new java.text.SimpleDateFormat(getPattern(locale)); + } + + public static java.text.SimpleDateFormat getY4DateFormat(java.util.Locale locale) { + return new java.text.SimpleDateFormat(getY4Pattern(locale)); + } + + public static String getY4Pattern(java.util.Locale locale) { + String pattern = getPattern(locale); + if (pattern.indexOf("yyyy") < 0) { + pattern = InternalStringUtil.replace(pattern, "yy", "yyyy"); + } + return pattern; + } + + public static String getPattern(java.util.Locale locale) { + java.text.SimpleDateFormat df = (java.text.SimpleDateFormat) java.text.DateFormat.getDateInstance( + java.text.DateFormat.SHORT, locale); + String pattern = df.toPattern(); + int index = pattern.indexOf(' '); + if (index > 0) { + pattern = pattern.substring(0, index); + } + if (pattern.indexOf("MM") < 0) { + pattern = InternalStringUtil.replace(pattern, "M", "MM"); + } + if (pattern.indexOf("dd") < 0) { + pattern = InternalStringUtil.replace(pattern, "d", "dd"); + } + return pattern; + } + + public static String findDelimiter(String value) { + for (int i = 0; i < value.length(); ++i) { + char c = value.charAt(i); + if (Character.isDigit(c)) { + continue; + } + return Character.toString(c); + } + return null; + } + + public static String removeDelimiter(String pattern) { + StringBuffer buf = new StringBuffer(); + for (int i = 0; i < pattern.length(); ++i) { + char c = pattern.charAt(i); + if (c == 'y' || c == 'M' || c == 'd') { + buf.append(c); + } + } + return buf.toString(); + } + } + + protected static class InternalStringUtil { + + public static final String[] EMPTY_STRINGS = new String[0]; + + private InternalStringUtil() { + } + + public static final boolean isEmpty(String text) { + return text == null || text.length() == 0; + } + + public static final String replace(String text, String fromText, + String toText) { + + if (text == null || fromText == null || toText == null) { + return null; + } + StringBuffer buf = new StringBuffer(100); + int pos = 0; + int pos2 = 0; + while (true) { + pos = text.indexOf(fromText, pos2); + if (pos == 0) { + buf.append(toText); + pos2 = fromText.length(); + } else if (pos > 0) { + buf.append(text.substring(pos2, pos)); + buf.append(toText); + pos2 = pos + fromText.length(); + } else { + buf.append(text.substring(pos2)); + break; + } + } + return buf.toString(); + } + + public static String[] split(String str, String delim) { + if (str == null) { + return EMPTY_STRINGS; + } + java.util.List list = new java.util.ArrayList(); + java.util.StringTokenizer st = new java.util.StringTokenizer(str, delim); + while (st.hasMoreElements()) { + list.add(st.nextToken()); + } + return (String[]) list.toArray(new String[list.size()]); + } + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/grouping/GroupingOption.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/grouping/GroupingOption.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/grouping/GroupingOption.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,42 @@ +package jp.sf.pal.pompei.allcommon.cbean.grouping; + +/** + * The class of option for grouping making. + * + * @author DBFlute(AutoGenerator) + */ +public class GroupingOption { + + // ===================================================================================== + // Attribute + // ========= + protected int _columnCount; + + protected GroupingRowEndDeterminer _groupingRowEndDeterminer; + + // ===================================================================================== + // Constructor + // =========== + public GroupingOption(int columnCount) { + _columnCount = columnCount; + } + + // ===================================================================================== + // Easy-to-Use + // =========== + + // ===================================================================================== + // Accessor + // ======== + public int getColumnCount() { + return this._columnCount; + } + + public GroupingRowEndDeterminer getGroupingRowEndDeterminer() { + return this._groupingRowEndDeterminer; + } + + public void setGroupingRowEndDeterminer(GroupingRowEndDeterminer groupingRowEndDeterminer) { + this._groupingRowEndDeterminer = groupingRowEndDeterminer; + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/grouping/GroupingRowEndDeterminer.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/grouping/GroupingRowEndDeterminer.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/grouping/GroupingRowEndDeterminer.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,11 @@ +package jp.sf.pal.pompei.allcommon.cbean.grouping; + +/** + * The interface of grouping switch point determiner. + * + * @author DBFlute(AutoGenerator) + */ +public interface GroupingRowEndDeterminer { + + public boolean determine(int columnIndex, int columnCount, GroupingRowResource rowResource, ENTITY nextEntity); +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/grouping/GroupingRowResource.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/grouping/GroupingRowResource.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/grouping/GroupingRowResource.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,29 @@ +package jp.sf.pal.pompei.allcommon.cbean.grouping; + +/** + * The class of row resource for grouping making. + * + * @author DBFlute(AutoGenerator) + */ +public class GroupingRowResource { + + // ===================================================================================== + // Attribute + // ========= + protected java.util.List _groupingRowList = new java.util.ArrayList(); + + // ===================================================================================== + // Easy-to-Use + // =========== + + // ===================================================================================== + // Accessor + // ======== + public java.util.List getGroupingRowList() { + return this._groupingRowList; + } + + public void addGroupingRowList(ENTITY groupingRow) { + this._groupingRowList.add(groupingRow); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/grouping/GroupingRowSetupper.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/grouping/GroupingRowSetupper.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/grouping/GroupingRowSetupper.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,17 @@ +package jp.sf.pal.pompei.allcommon.cbean.grouping; + +/** + * The interface of grouping row setupper. + * + * @author DBFlute(AutoGenerator) + */ +public interface GroupingRowSetupper { + + /** + * Set up grouping row object. + * + * @param groupingRowResource Grouping row resource. (NotNull) + * @return Grouping row object. (NotNull) + */ + public ROW setup(GroupingRowResource groupingRowResource); +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/mapping/EntityDtoMapper.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/mapping/EntityDtoMapper.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/mapping/EntityDtoMapper.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,17 @@ +package jp.sf.pal.pompei.allcommon.cbean.mapping; + +/** + * The interface of entity converter. + * + * @author DBFlute(AutoGenerator) + */ +public interface EntityDtoMapper { + + /** + * Map entity to data transfer object. + * + * @param entity Entity. (NotNull) + * @return Data transfer object. (NotNull) + */ + public DTO map(ENTITY entity); +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/sqlclause/AbstractSqlClause.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/sqlclause/AbstractSqlClause.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/sqlclause/AbstractSqlClause.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,1008 @@ +package jp.sf.pal.pompei.allcommon.cbean.sqlclause; + + +import jp.sf.pal.pompei.allcommon.cbean.ckey.*; +import jp.sf.pal.pompei.allcommon.cbean.coption.ConditionOption; +import jp.sf.pal.pompei.allcommon.cbean.cvalue.ConditionValue; + +/** + * The abstract class of SqlClause. + * + * @author DBFlute(AutoGenerator) + */ +public abstract class AbstractSqlClause implements SqlClause { + + // ===================================================================================== + // Attribute + // ========= + /** Target table name. */ + protected final String _tableName; + + /** Included select column map. */ + protected java.util.Map _includedSelectColumnMap = new java.util.LinkedHashMap(); + + /** Outer join map. */ + protected java.util.Map _outerJoinMap = new java.util.LinkedHashMap(); + + /** Where list. */ + protected java.util.List _whereList = new java.util.ArrayList(); + + /** Inline where list for BaseTable. */ + protected java.util.List _baseTableInlineWhereList = new java.util.ArrayList(); + + /** Order-by clause. */ + protected final OrderByClause _orderByClause = new OrderByClause(); + + /** Order-by clause. */ + protected java.util.Map _selectClauseColumnAliasMap; + + /** Union clause list. */ + protected java.util.List _unionQueryInfoList = new java.util.ArrayList(); + + /** Is incoluded-select-column effective? Default value is false. */ + protected boolean _isIncludedSelectColumnEffective = false; + + /** Is order-by effective? Default value is false. */ + protected boolean _isOrderByEffective = false; + + /** Fetch start index. (for fetchXxx()) */ + protected int _fetchStartIndex = 0; + + /** Fetch size. (for fetchXxx()) */ + protected int _fetchSize = 0; + + /** Fetch page number. (for fetchXxx()) This value should be plus. */ + protected int _fetchPageNumber = 1; + + /** Is fetch-narrowing effective? Default value is false. */ + protected boolean _isFetchScopeEffective = false; + + /** Is additional condition as or effective?*/ + protected boolean _isAdditionalConditionAsOrEffective = false; + + // ===================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param tableName Table name. (NotNull) + **/ + public AbstractSqlClause(String tableName) { + if (tableName == null) { + String msg = "Argument[tableName] must not be null."; + throw new IllegalArgumentException(msg); + } + _tableName = tableName; + } + + // ===================================================================================== + // Select-Clause + // ============= + public void setSelectClauseColumnAliasMap(java.util.Map selectClauseColumnAliasMap) { + _selectClauseColumnAliasMap = selectClauseColumnAliasMap; + } + + // ===================================================================================== + // Clause + // ====== + /** + * This method implements the method that is declared at super. + * + * @return Clause string. (NotNull) + */ + public String getClause() { + final StringBuffer sb = new StringBuffer(128); + sb.append(INCLUDE_SELECT_CLAUSE_MARK); + sb.append(" "); + if (_isIncludedSelectColumnEffective && !_includedSelectColumnMap.isEmpty()) { + sb.append(" ").append(getIncludedSelectColumnClause()); + } + sb.append(" "); + sb.append(getFromClause()); + sb.append(" "); + sb.append(getFromHint()); + sb.append(" "); + sb.append(getWhereClause()); + sb.append(getUnionClause()); + if (_isOrderByEffective && !_orderByClause.isEmpty()) { + sb.append(" "); + sb.append(getOrderByClause()); + } + sb.append(" "); + sb.append(getSqlSuffix()); + return sb.toString(); + } + + /** + * This method implements the method that is declared at super. + * + * @return Clause string. (NotNull) + */ + public String getClauseWithoutIncludedOrderBySqlSuffix() { + final StringBuffer sb = new StringBuffer(128); + sb.append(INCLUDE_SELECT_CLAUSE_MARK); + sb.append(" "); + sb.append(getFromClause()); + sb.append(" "); + sb.append(getFromHint()); + sb.append(" "); + sb.append(getWhereClause()); + sb.append(getUnionClause()); + return sb.toString(); + } + + protected String getUnionClause() { + final StringBuffer sb = new StringBuffer(); + for (final java.util.Iterator ite = _unionQueryInfoList.iterator(); ite.hasNext(); ) { + final UnionQueryInfo unionQueryInfo = (UnionQueryInfo)ite.next(); + final String unionQueryClause = unionQueryInfo.getUnionQueryClause(); + final boolean unionAll = unionQueryInfo.isUnionAll(); + sb.append(unionAll ? " union all " : " union ").append(INCLUDE_SELECT_CLAUSE_MARK).append(unionQueryClause); + } + return sb.toString(); + } + + // ===================================================================================== + // Clause Parts + // ============ + /** + * This method implements the method that is declared at super. + * + * @return select-hint. {select [select-hint] * from table...} (NotNull) + */ + public String getSelectHint() { + return createSelectHint(); + } + + /** + * This method implements the method that is declared at super. + * + * @return Included-select-column clause. {select ... , [included-select-column clause] from table...} (NotNull) + */ + public String getIncludedSelectColumnClause() { + final StringBuffer sb = new StringBuffer(); + int count = 0; + for (final java.util.Iterator ite = _includedSelectColumnMap.keySet().iterator(); ite.hasNext(); count++) { + final String aliasName = (String)ite.next(); + final String realColumnName = (String)_includedSelectColumnMap.get(aliasName); + sb.append(", ").append(realColumnName).append(" as ").append(aliasName); + } + return sb.toString(); + } + + /** + * This method implements the method that is declared at super. + * + * @return From clause. (NotNull) + */ + public String getFromClause() { + final StringBuffer sb = new StringBuffer(); + sb.append("from "); + if (_baseTableInlineWhereList.isEmpty()) { + sb.append(_tableName); + } else { + sb.append(getInlineViewClause(_tableName, _baseTableInlineWhereList)).append(" ").append(_tableName); + } + sb.append(getFromBaseTableHint()); + sb.append(getLeftOuterJoinClause()); + return sb.toString(); + } + + protected String getLeftOuterJoinClause() { + final StringBuffer sb = new StringBuffer(); + for (final java.util.Iterator ite = _outerJoinMap.keySet().iterator(); ite.hasNext(); ) { + final String aliasName = (String)ite.next(); + final LeftOuterJoinInfo joinInfo = (LeftOuterJoinInfo)_outerJoinMap.get(aliasName); + final String joinTableName = joinInfo.getJoinTableName(); + final java.util.List inlineWhereClauseList = joinInfo.getInlineWhereClauseList(); + final java.util.Map joinOnMap = joinInfo.getJoinOnMap(); + assertJoinOnMapNotEmpty(joinOnMap, aliasName); + + sb.append(" left outer join "); + if (inlineWhereClauseList.isEmpty()) { + sb.append(joinTableName); + } else { + sb.append(getInlineViewClause(joinTableName, inlineWhereClauseList)); + } + sb.append(" ").append(aliasName).append(" on "); + int count = 0; + for (final java.util.Iterator joinOnMapIte = joinOnMap.keySet().iterator(); joinOnMapIte.hasNext(); count++) { + final String localColumnName = (String)joinOnMapIte.next(); + final String foreignColumnName = (String)joinOnMap.get(localColumnName); + if (count != 0) { + sb.append(" and "); + } + sb.append(localColumnName).append(" = ").append(foreignColumnName); + } + } + return sb.toString(); + } + + protected String getInlineViewClause(String joinTableName, java.util.List inlineWhereClauseList) { + final StringBuffer sb = new StringBuffer(); + sb.append("(select * from ").append(joinTableName).append(" where "); + int count = 0; + for (final java.util.Iterator ite = inlineWhereClauseList.iterator(); ite.hasNext(); ) { + final String whereClause = (String)ite.next(); + if (count > 0) { + sb.append(" and "); + } + sb.append(whereClause); + ++count; + } + sb.append(")"); + return sb.toString(); + } + + /** + * This method implements the method that is declared at super. + * + * @return from-base-table-hint. {select * from table [from-base-table-hint] where ...} (NotNull) + */ + public String getFromBaseTableHint() { + return createFromBaseTableHint(); + } + + /** + * This method implements the method that is declared at super. + * + * @return from-hint. {select * from table left outer join ... on ... [from-hint] where ...} (NotNull) + */ + public String getFromHint() { + return createFromHint(); + } + + public String getWhereClause() { + final StringBuffer sb = new StringBuffer(); + int count = 0; + for (final java.util.Iterator ite = _whereList.iterator(); ite.hasNext(); count++) { + if (count == 0) { + sb.append("where ").append((String)ite.next()); + } else { + sb.append(" and ").append((String)ite.next()); + } + } + return sb.toString(); + } + + public String getOrderByClause() { + if (!_unionQueryInfoList.isEmpty()) { + if (_selectClauseColumnAliasMap == null || _selectClauseColumnAliasMap.isEmpty()) { + String msg = "The selectClauseColumnAliasMap should not be null or empty when union query exists: " + toString(); + throw new IllegalStateException(msg); + } + return _orderByClause.getOrderByClause(_selectClauseColumnAliasMap); + } else { + return _orderByClause.getOrderByClause(); + } + } + + /** + * This method implements the method that is declared at super. + * + * @return sql-suffix. {select * from table where ... order by ... [sql-suffix]} (NotNull) + */ + public String getSqlSuffix() { + return createSqlSuffix(); + } + + // ===================================================================================== + // Copy Parts + // ========== + /** + * Copy included-select-column. + */ + public void copyIncludedSelectColumn(SqlClause sqlClause) { + final java.util.Set keySet = _includedSelectColumnMap.keySet(); + for (final java.util.Iterator ite = keySet.iterator(); ite.hasNext(); ) { + final String aliasName = (String)ite.next(); + final String realColumnName = (String)_includedSelectColumnMap.get(aliasName); + sqlClause.registerIncludedSelectColumn(aliasName, realColumnName); + } + } + + // ===================================================================================== + // IncludedSelectColumn + // ==================== + /** + * Ignore included-select-column. + */ + public void ignoreIncludedSelectColumn() { + _isIncludedSelectColumnEffective = false; + } + + /** + * Make included-select-column effective. + */ + public void makeIncludedSelectColumnEffective() { + if (!_includedSelectColumnMap.isEmpty()) { + _isIncludedSelectColumnEffective = true; + } + } + + /** + * Register included-select-column. + * + * @param aliasName Alias name. (NotNull) + * @param realColumnName Real column name. (NotNull) + */ + public void registerIncludedSelectColumn(String aliasName, String realColumnName) { + _isIncludedSelectColumnEffective = true; + _includedSelectColumnMap.put(aliasName, realColumnName); + } + + // ===================================================================================== + // OuterJoin + // ========= + /** + * This method implements the method that is declared at super. + * + * @param joinTableName Join table name(outer join [joinTableName]). (NotNull) + * @param aliasName Alias name of join table. (NotNull and Unique per invoking method.) + * @param joinOnMap Map that has conditions of 'on' clause. (NotNull) + */ + public void registerOuterJoin(String joinTableName, String aliasName, java.util.Map joinOnMap) { + assertAlreadyOuterJoin(aliasName); + assertJoinOnMapNotEmpty(joinOnMap, aliasName); + final LeftOuterJoinInfo joinInfo = new LeftOuterJoinInfo(); + joinInfo.setAliasName(aliasName); + joinInfo.setJoinTableName(joinTableName); + joinInfo.setJoinOnMap(joinOnMap); + _outerJoinMap.put(aliasName, joinInfo); + } + + protected static class LeftOuterJoinInfo { + protected String _aliasName; + protected String _joinTableName; + protected java.util.List _inlineWhereClauseList = new java.util.ArrayList(); + protected java.util.Map _joinOnMap; + public String getAliasName() { + return _aliasName; + } + public void setAliasName(String value) { + _aliasName = value; + } + public String getJoinTableName() { + return _joinTableName; + } + public void setJoinTableName(String value) { + _joinTableName = value; + } + public java.util.List getInlineWhereClauseList() { + return _inlineWhereClauseList; + } + public void addInlineWhereClause(String value) { + _inlineWhereClauseList.add(value); + } + public java.util.Map getJoinOnMap() { + return _joinOnMap; + } + public void setJoinOnMap(java.util.Map value) { + _joinOnMap = value; + } + } + + /** + * Assert whether the alias name have already registered in outer join. + * + * @param aliasName Alias name. + */ + protected void assertAlreadyOuterJoin(String aliasName) { + if (_outerJoinMap.containsKey(aliasName)) { + String msg = "The alias name have already registered in outer join: " + aliasName; + throw new IllegalStateException(msg); + } + } + + /** + * Assert whether the joinOnMap should not be empty. + * + * @param joinOnMap Map that has conditions of 'on' clause. (NotNull) + * @param aliasName Alias name. + */ + protected void assertJoinOnMapNotEmpty(java.util.Map joinOnMap, String aliasName) { + if (joinOnMap.isEmpty()) { + String msg = "The joinOnMap should not be empty: aliasName=" + aliasName; + throw new IllegalStateException(msg); + } + } + + // ===================================================================================== + // Where + // ===== + /** + * This method implements the method that is declared at super. + * + * @param columnFullName Column-full-name([table-name].[column-name]). (NotNull) + * @param key Condition key. (NotNull) + * @param value Condition value. (NotNull) + */ + public void registerWhereClause(String columnFullName, ConditionKey key, ConditionValue value) { + assertStringNotNullAndNotTrimmedEmpty("columnFullName", columnFullName); + key.addWhereClause(_whereList, columnFullName, value); + arrangeWhereListAdditionalConditionAsOr(_whereList); + } + + /** + * Register where clause. + * + * @param columnFullName Column-full-name([table-name].[column-name]). (NotNull) + * @param key Condition key. (NotNull) + * @param value Condition value. (NotNull) + * @param option Operand option. (NotNull) + */ + public void registerWhereClause(String columnFullName, ConditionKey key, ConditionValue value, ConditionOption option) { + assertStringNotNullAndNotTrimmedEmpty("columnFullName", columnFullName); + assertObjectNotNull("option of " + columnFullName, option); + key.addWhereClause(_whereList, columnFullName, value, option); + arrangeWhereListAdditionalConditionAsOr(_whereList); + } + + /** + * This method implements the method that is declared at super. + * + * @param clause Where-clause. (NotNull) + */ + public void registerWhereClause(String clause) { + assertStringNotNullAndNotTrimmedEmpty("clause", clause); + _whereList.add(clause); + arrangeWhereListAdditionalConditionAsOr(_whereList); + } + + /** + * Exchange first where clause for last one. + */ + public void exchangeFirstWhereClauseForLastOne() { + if (_whereList.size() > 1) { + final String first = (String)_whereList.get(0); + final String last = (String)_whereList.get(_whereList.size() - 1); + _whereList.set(0, last); + _whereList.set(_whereList.size() - 1, first); + } + } + + // ===================================================================================== + // InlineWhere + // =========== + public void registerBaseTableInlineWhereClause(String columnName, ConditionKey key, ConditionValue value) { + assertStringNotNullAndNotTrimmedEmpty("columnName", columnName); + key.addWhereClause(_baseTableInlineWhereList, columnName, value); + arrangeWhereListAdditionalConditionAsOr(_baseTableInlineWhereList); + } + + public void registerBaseTableInlineWhereClause(String columnName, ConditionKey key, ConditionValue value, ConditionOption option) { + assertStringNotNullAndNotTrimmedEmpty("columnName", columnName); + assertObjectNotNull("option of " + columnName, option); + key.addWhereClause(_baseTableInlineWhereList, columnName, value, option); + arrangeWhereListAdditionalConditionAsOr(_baseTableInlineWhereList); + } + + public void registerBaseTableInlineWhereClause(String value) { + _baseTableInlineWhereList.add(value); + } + + public void registerOuterJoinInlineWhereClause(String aliasName, String columnName, ConditionKey key, ConditionValue value) { + assertNotYetOuterJoin(aliasName); + assertStringNotNullAndNotTrimmedEmpty("columnName", columnName); + final LeftOuterJoinInfo joinInfo = (LeftOuterJoinInfo)_outerJoinMap.get(aliasName); + key.addWhereClause(joinInfo.getInlineWhereClauseList(), columnName, value); + arrangeWhereListAdditionalConditionAsOr(joinInfo.getInlineWhereClauseList()); + } + + public void registerOuterJoinInlineWhereClause(String aliasName, String columnName, ConditionKey key, ConditionValue value, ConditionOption option) { + assertNotYetOuterJoin(aliasName); + assertStringNotNullAndNotTrimmedEmpty("columnName", columnName); + final LeftOuterJoinInfo joinInfo = (LeftOuterJoinInfo)_outerJoinMap.get(aliasName); + key.addWhereClause(joinInfo.getInlineWhereClauseList(), columnName, value, option); + arrangeWhereListAdditionalConditionAsOr(joinInfo.getInlineWhereClauseList()); + } + + public void registerOuterJoinInlineWhereClause(String aliasName, String value) { + assertNotYetOuterJoin(aliasName); + final LeftOuterJoinInfo joinInfo = (LeftOuterJoinInfo)_outerJoinMap.get(aliasName); + joinInfo.addInlineWhereClause(value); + arrangeWhereListAdditionalConditionAsOr(joinInfo.getInlineWhereClauseList()); + } + + /** + * Assert whether the alias name have already registered in outer join. + * + * @param aliasName Alias name. + */ + protected void assertNotYetOuterJoin(String aliasName) { + if (!_outerJoinMap.containsKey(aliasName)) { + String msg = "The alias name have not registered in outer join yet: " + aliasName; + throw new IllegalStateException(msg); + } + } + + // ===================================================================================== + // AdditionalConditionAsOr + // ======================= + public void makeAdditionalConditionAsOrEffective() { + _isAdditionalConditionAsOrEffective = true; + } + + public void ignoreAdditionalConditionAsOr() { + _isAdditionalConditionAsOrEffective = false; + } + + protected void arrangeWhereListAdditionalConditionAsOr(java.util.List whereList) { + if (_isAdditionalConditionAsOrEffective) { + if (whereList.size() < 2) { + String msg = "The whereList should have two more elements when the isAdditionalConditionAsOrEffective is true: " + toString(); + throw new IllegalStateException(msg); + } + final String lastWhereClause = (String)whereList.remove(whereList.size() - 1); + final String preWhereClause = (String)whereList.remove(whereList.size() - 1); + if (preWhereClause.startsWith("(") && preWhereClause.endsWith(")")) { + final String plainClause = preWhereClause.substring("(".length(), preWhereClause.length() - ")".length()); + whereList.add("(" + plainClause + " or " + lastWhereClause + ")"); + } else { + whereList.add("(" + preWhereClause + " or " + lastWhereClause + ")"); + } + } + } + + // ===================================================================================== + // OrderBy + // ======= + /** + * This method implements the method that is declared at super. + * + * @return this. (NotNull) + */ + public OrderByClause getSqlComponentOfOrderByClause() { + return _orderByClause; + } + + /** + * This method implements the method that is declared at super. + * + * @return this. (NotNull) + */ + public SqlClause clearOrderBy() { + _isOrderByEffective = false; + _orderByClause.clear(); + return this; + } + + /** + * This method implements the method that is declared at super. + * + * @return this. (NotNull) + */ + public SqlClause ignoreOrderBy() { + _isOrderByEffective = false; + return this; + } + + /** + * This method implements the method that is declared at super. + * + * @return this. (NotNull) + */ + public SqlClause makeOrderByEffective() { + if (!_orderByClause.isEmpty()) { + _isOrderByEffective = true; + } + return this; + } + + /** + * This method implements the method that is declared at super. + * + * @param orderByProperty Order-by-property. 'aliasName.columnName/aliasName.columnName/...' (NotNull) + * @param registeredOrderByProperty Registered-order-by-property. ([table-name].[column-name]) (Nullable) + * @param isAsc Is asc? + */ + public void reverseOrderBy_Or_OverrideOrderBy(String orderByProperty, String registeredOrderByProperty, boolean isAsc) { + _isOrderByEffective = true; + if (!_orderByClause.isSameOrderByColumn(orderByProperty)) { + clearOrderBy(); + registerOrderBy(orderByProperty, registeredOrderByProperty, isAsc); + } else { + _orderByClause.reverseAll(); + } + } + + /** + * This method implements the method that is declared at super. + * + * @param orderByProperty Order-by-property. 'aliasName.columnName/aliasName.columnName/...' (NotNull) + * @param registeredOrderByProperty Registered-order-by-property. ([table-name].[column-name]) (Nullable) + * @param isAsc Is asc? + */ + public void registerOrderBy(String orderByProperty, String registeredOrderByProperty, boolean isAsc) { + try { + _isOrderByEffective = true; + final java.util.List orderByList = new java.util.ArrayList(); + { + final java.util.StringTokenizer st = new java.util.StringTokenizer(orderByProperty, "/"); + while (st.hasMoreElements()) { + orderByList.add(st.nextToken()); + } + } + + if (registeredOrderByProperty == null || registeredOrderByProperty.trim().length() ==0) { + registeredOrderByProperty = orderByProperty; + } + + final java.util.List registeredOrderByList = new java.util.ArrayList(); + { + final java.util.StringTokenizer st = new java.util.StringTokenizer(registeredOrderByProperty, "/"); + while (st.hasMoreElements()) { + registeredOrderByList.add(st.nextToken()); + } + } + + int count = 0; + for (final java.util.Iterator ite = orderByList.iterator(); ite.hasNext(); ) { + String orderBy = (String)ite.next(); + String registeredOrderBy = (String)registeredOrderByList.get(count); + + _isOrderByEffective = true; + String aliasName = null; + String columnName = null; + String registeredAliasName = null; + String registeredColumnName = null; + + if (orderBy.indexOf(".") < 0) { + columnName = orderBy; + } else { + aliasName = orderBy.substring(0, orderBy.lastIndexOf(".")); + columnName = orderBy.substring(orderBy.lastIndexOf(".") + 1); + } + + if (registeredOrderBy.indexOf(".") < 0) { + registeredColumnName = registeredOrderBy; + } else { + registeredAliasName = registeredOrderBy.substring(0, registeredOrderBy.lastIndexOf(".")); + registeredColumnName = registeredOrderBy.substring(registeredOrderBy.lastIndexOf(".") + 1); + } + + OrderByElement element = new OrderByElement(); + element.setAliasName(aliasName); + element.setColumnName(columnName); + element.setRegisteredAliasName(registeredAliasName); + element.setRegisteredColumnName(registeredColumnName); + if (isAsc) { + element.setupAsc(); + } else { + element.setupDesc(); + } + _orderByClause.addOrderByElement(element); + + count++; + } + } catch (RuntimeException e) { + String msg = "registerOrderBy() threw the exception: orderByProperty=" + orderByProperty; + msg = msg + " registeredColumnFullName=" + registeredOrderByProperty; + msg = msg + " isAsc=" + isAsc; + msg = msg + " sqlClause=" + this.toString(); + throw new RuntimeException(msg, e); + } + } + + // ===================================================================================== + // Clause + // ====== + public void registerUnionQuery(String unionQueryClause, boolean unionAll) { + assertStringNotNullAndNotTrimmedEmpty("unionQueryClause", unionQueryClause); + final UnionQueryInfo unionQueryInfo = new UnionQueryInfo(); + unionQueryInfo.setUnionQueryClause(unionQueryClause); + unionQueryInfo.setUnionAll(unionAll); + _unionQueryInfoList.add(unionQueryInfo); + } + + protected static class UnionQueryInfo { + protected String _unionQueryClause; + protected boolean _unionAll; + public String getUnionQueryClause() { + return _unionQueryClause; + } + public void setUnionQueryClause(String unionQueryClause) { + _unionQueryClause = unionQueryClause; + } + public boolean isUnionAll() { + return _unionAll; + } + public void setUnionAll(boolean unionAll) { + _unionAll = unionAll; + } + } + + // ===================================================================================== + // Advance + // ======= + /** + * This method implements the method that is declared at super. + * + * @param fetchSize Fetch-size. (NotMinus & NotZero) + * @return this. (NotNull) + */ + public SqlClause fetchFirst(int fetchSize) { + _isFetchScopeEffective = true; + if (fetchSize <= 0) { + String msg = "Argument[fetchSize] must be plus: " + fetchSize; + throw new IllegalArgumentException(msg); + } + _fetchStartIndex = 0; + _fetchSize = fetchSize; + _fetchPageNumber = 1; + doClearFetchPageClause(); + doFetchFirst(); + return this; + } + + /** + * This method implements the method that is declared at super. + * + * @param fetchStartIndex Fetch-start-index. 0 origin. (NotMinus) + * @param fetchSize Fetch size. (NotMinus) + * @return this. (NotNull) + */ + public SqlClause fetchScope(int fetchStartIndex, int fetchSize) { + _isFetchScopeEffective = true; + if (fetchStartIndex < 0) { + String msg = "Argument[fetchStartIndex] must be plus or zero: " + fetchStartIndex; + throw new IllegalArgumentException(msg); + } + if (fetchSize <= 0) { + String msg = "Argument[fetchSize] must be plus: " + fetchSize; + throw new IllegalArgumentException(msg); + } + _fetchStartIndex = fetchStartIndex; + _fetchSize = fetchSize; + return fetchPage(1); + } + + /** + * This method implements the method that is declared at super. + * + * @param fetchPageNumber Page-number. 1 origin. (NotMinus & NotZero: If minus or zero, set one.) + * @return this. (NotNull) + */ + public SqlClause fetchPage(int fetchPageNumber) { + _isFetchScopeEffective = true; + if (fetchPageNumber <= 0) { + fetchPageNumber = 1; + } + if (_fetchSize <= 0) { + String msg = "Fetch size should not be minus or zero when you invoke this method. "; + msg = msg + "When you invoke this method, it is necessary to invoke 'fetchFirst()' or 'fetchScope()' ahead of that. "; + msg = msg + ": fetchPageNumber=" + fetchPageNumber + " _fetchSize=" + _fetchSize; + throw new IllegalStateException(msg); + } + _fetchPageNumber = fetchPageNumber; + if (_fetchPageNumber == 1 && _fetchStartIndex == 0) { + return fetchFirst(_fetchSize); + } + doClearFetchPageClause(); + doFetchPage(); + return this; + } + + /** + * Do fetch first. + */ + abstract protected void doFetchFirst(); + + /** + * Do fetch page. + */ + abstract protected void doFetchPage(); + + /** + * Do clear fetch-page clause. + */ + abstract protected void doClearFetchPageClause(); + + /** + * This method implements the method that is declared at super. + * + * @return Fetch start index. + */ + public int getFetchStartIndex() { + return _fetchStartIndex; + } + + /** + * This method implements the method that is declared at super. + * + * @return Fetch size. + */ + public int getFetchSize() { + return _fetchSize; + } + + /** + * This method implements the method that is declared at super. + * + * @return Fetch page number. + */ + public int getFetchPageNumber() { + return _fetchPageNumber; + } + + /** + * Get page start index. + * + * @return Page start index. 0 origin. (NotMinus) + */ + public int getPageStartIndex() { + if (_fetchPageNumber <= 0) { + String msg = "_fetchPageNumber must be plus: " + _fetchPageNumber; + throw new IllegalStateException(msg); + } + return _fetchStartIndex + (_fetchSize * (_fetchPageNumber - 1)); + } + + /** + * Get page end index. + * + * @return Page end index. 0 origin. (NotMinus) + */ + public int getPageEndIndex() { + if (_fetchPageNumber <= 0) { + String msg = "_fetchPageNumber must be plus: " + _fetchPageNumber; + throw new IllegalStateException(msg); + } + return _fetchStartIndex + (_fetchSize * _fetchPageNumber); + } + + /** + * This method implements the method that is declared at super. + * + * @return Determiantion. + */ + public boolean isFetchScopeEffective() { + return _isFetchScopeEffective; + } + + /** + * This method implements the method that is declared at super. + * + * @return this. (NotNull) + */ + public SqlClause ignoreFetchScope() { + _isFetchScopeEffective = false; + doClearFetchPageClause(); + return this; + } + + /** + * This method implements the method that is declared at super. + * + * @return this. (NotNull) + */ + public SqlClause makeFetchScopeEffective() { + if (getFetchSize() > 0 && getFetchPageNumber() > 0) { + fetchPage(getFetchPageNumber()); + } + return this; + } + + /** + * This method implements the method that is declared at super. + * + * @return Determination. + */ + public boolean isFetchStartIndexSupported() { + return true; // Default + } + + /** + * This method implements the method that is declared at super. + * + * @return Determination. + */ + public boolean isFetchSizeSupported() { + return true; // Default + } + + /** + * Create select-hint. + * + * @return Select-hint. {select [select-hint] * from table...} (NotNull) + */ + abstract protected String createSelectHint(); + + /** + * Create from-base-table-hint. + * + * @return From-hint. {select * from table [from-base-table-hint] where ...} (NotNull) + */ + abstract protected String createFromBaseTableHint(); + + /** + * Create from-hint. + * + * @return From-hint. {select * from table left outer join ... on ... [from-hint] where ...} (NotNull) + */ + abstract protected String createFromHint(); + + /** + * Create sql-suffix. + * + * @return Sql-suffix. {select * from table where ... order by ... [sql-suffix]} (NotNull) + */ + abstract protected String createSqlSuffix(); + + // ===================================================================================== + // FetchNarrowing + // ============== + /** + * This method implements the method that is declared at super. + * + * @return Fetch-narrowing start-index. + */ + public int getFetchNarrowingSkipStartIndex() { + if (isFetchStartIndexSupported()) { + return 0; + } else { + return getPageStartIndex(); + } + } + + /** + * This method implements the method that is declared at super. + * + * @return Fetch-narrowing size. + */ + public int getFetchNarrowingLoopCount() { + return getFetchSize(); + } + + /** + * This method implements the method that is declared at super. + * + * @return Determiantion. + */ + public boolean isFetchNarrowingEffective() { + return _isFetchScopeEffective; + } + + // ===================================================================================== + // Helper Method + // ============= + // ---------------------------------------------------------------- + // Assert Object + // ------------- + /** + * Assert that the object is not null. + * + * @param variableName Variable name. (NotNull) + * @param value Value. (NotNull) + * @exception IllegalArgumentException + */ + protected void assertObjectNotNull(String variableName, Object value) { + if (variableName == null) { + String msg = "The value should not be null: variableName=" + variableName + " value=" + value; + throw new IllegalArgumentException(msg); + } + if (value == null) { + String msg = "The value should not be null: variableName=" + variableName; + throw new IllegalArgumentException(msg); + } + } + + // ---------------------------------------------------------------- + // Assert String + // ------------- + /** + * Assert that the entity is not null and not trimmed empty. + * + * @param variableName Variable name. (NotNull) + * @param value Value. (NotNull) + */ + protected void assertStringNotNullAndNotTrimmedEmpty(String variableName, String value) { + assertObjectNotNull("variableName", variableName); + assertObjectNotNull("value", value); + if (value.trim().length() ==0) { + String msg = "The value should not be empty: variableName=" + variableName + " value=" + value; + throw new IllegalArgumentException(msg); + } + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/sqlclause/OrderByClause.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/sqlclause/OrderByClause.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/sqlclause/OrderByClause.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,276 @@ +package jp.sf.pal.pompei.allcommon.cbean.sqlclause; + + +/** + * The paging-result-bean of OrderByClause. + * + * @author DBFlute(AutoGenerator) + */ +public class OrderByClause implements java.io.Serializable { + + /** Serial version UID. (Default) */ + private static final long serialVersionUID = 1L; + + // ===================================================================================== + // Attribute + // ========= + protected java.util.List _orderByList = new java.util.ArrayList(); + + // ===================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + public OrderByClause() { + } + + // ===================================================================================== + // Behavior + // ======== + /** + * Add order-by element. + * + * @param orderByElement Order-by element. (NotNull) + */ + public void addOrderByElement(OrderByElement orderByElement) { + _orderByList.add(orderByElement); + } + + /** + * Insert first order-by element . + * + * @param orderByElement Order-by element. (NotNull) + */ + public void insertFirstOrderByElement(OrderByElement orderByElement) { + _orderByList.add(0, orderByElement); + } + + public void reverseAll() { + for (final java.util.Iterator ite = _orderByList.iterator(); ite.hasNext(); ) { + final OrderByElement element = (OrderByElement)ite.next(); + element.reverse(); + } + } + + public void exchangeFirstOrderByElementForLastOne() { + if (_orderByList.size() > 1) { + final OrderByElement first = (OrderByElement)_orderByList.get(0); + final OrderByElement last = (OrderByElement)_orderByList.get(_orderByList.size() - 1); + _orderByList.set(0, last); + _orderByList.set(_orderByList.size() - 1, first); + } + } + + /** + * Get the value of allRecordCount. + * + * @return The value of allRecordCount. + */ + public java.util.List getOrderByList() { + return _orderByList; + } + + public String getOrderByClause() { + if (_orderByList.isEmpty()) { + return ""; + } + final StringBuffer sb = new StringBuffer(); + final String delimiter = ", "; + for (final java.util.Iterator ite = _orderByList.iterator(); ite.hasNext(); ) { + final OrderByElement element = (OrderByElement)ite.next(); + sb.append(delimiter).append(element.getElementClause()); + } + sb.delete(0, delimiter.length()).insert(0, "order by "); + return sb.toString(); + } + + public String getOrderByClause(java.util.Map selectClauseColumnAliasMap) { + if (_orderByList.isEmpty()) { + return ""; + } + final StringBuffer sb = new StringBuffer(); + final String delimiter = ", "; + for (final java.util.Iterator ite = _orderByList.iterator(); ite.hasNext(); ) { + final OrderByElement element = (OrderByElement)ite.next(); + sb.append(delimiter).append(element.getElementClause(selectClauseColumnAliasMap)); + } + sb.delete(0, delimiter.length()).insert(0, "order by "); + return sb.toString(); + } + + public boolean isSameOrderByColumn(String orderByProperty) { + final java.util.List orderByList = new java.util.ArrayList(); + { + final java.util.StringTokenizer st = new java.util.StringTokenizer(orderByProperty, "/"); + while (st.hasMoreElements()) { + orderByList.add(st.nextToken()); + } + } + if (_orderByList.size() != orderByList.size()) { + return false; + } + int count = 0; + for (final java.util.Iterator ite = orderByList.iterator(); ite.hasNext(); ) { + final String columnFullName = (String)ite.next(); + final OrderByElement element = (OrderByElement)_orderByList.get(count); + if (!element.getColumnFullName().equals(columnFullName)) { + return false; + } + count++; + } + return true; + } + + // ===================================================================================== + // First Element + // ============= + /** + * Is first element asc? + * If order-by list is empty, throws exception. + * + * @return Determination. + */ + public boolean isFirstElementAsc() { + if (isEmpty()) { + String msg = "This order-by clause is empty: " + toString(); + throw new IllegalStateException(msg); + } + final OrderByElement element = (OrderByElement)_orderByList.get(0); + return element.isAsc(); + } + + /** + * Is first element desc? + * If order-by list is empty, throws exception. + * + * @return Determination. + */ + public boolean isFirstElementDesc() { + return !isFirstElementAsc(); + } + + /** + * Is same as first element alias-name? + * If order-by list is empty, throws exception. + * + * @param expectedAliasName Expected alias-name. (Nullable) + * @return Determination. + */ + public boolean isSameAsFirstElementAliasName(String expectedAliasName) { + if (isEmpty()) { + String msg = "This order-by clause is empty: " + toString(); + throw new RuntimeException(msg); + } + OrderByElement element = (OrderByElement)_orderByList.get(0); + String actualAliasName = element.getAliasName(); + if (actualAliasName != null && expectedAliasName != null) { + return actualAliasName.equalsIgnoreCase(expectedAliasName); + } else { + return false; + } + } + + /** + * Is same as first element column-name? + * If order-by list is empty, throws exception. + * + * @param expectedColumnName Expected column-name. (Nullable) + * @return Determination. + */ + public boolean isSameAsFirstElementColumnName(String expectedColumnName) { + if (isEmpty()) { + String msg = "This order-by clause is empty: " + toString(); + throw new RuntimeException(msg); + } + OrderByElement element = (OrderByElement)_orderByList.get(0); + String actualColumnName = element.getColumnName(); + if (actualColumnName != null && expectedColumnName != null) { + return actualColumnName.equalsIgnoreCase(expectedColumnName); + } else { + return false; + } + } + + /** + * Is same as first element registered-alias-name? + * If order-by list is empty, throws exception. + * + * @param expectedAliasName Expected alias-name. (Nullable) + * @return Determination. + */ + public boolean isSameAsFirstElementRegisteredAliasName(String expectedAliasName) { + if (isEmpty()) { + String msg = "This order-by clause is empty: " + toString(); + throw new RuntimeException(msg); + } + OrderByElement element = (OrderByElement)_orderByList.get(0); + String actualAliasName = element.getRegisteredAliasName(); + if (actualAliasName != null && expectedAliasName != null) { + return actualAliasName.equalsIgnoreCase(expectedAliasName); + } else { + return false; + } + } + + /** + * Is same as first element registered-column-name? + * If order-by list is empty, throws exception. + * + * @param expectedColumnName Expected column-name. (Nullable) + * @return Determination. + */ + public boolean isSameAsFirstElementRegisteredColumnName(String expectedColumnName) { + if (isEmpty()) { + String msg = "This order-by clause is empty: " + toString(); + throw new RuntimeException(msg); + } + OrderByElement element = (OrderByElement)_orderByList.get(0); + String actualColumnName = element.getRegisteredColumnName(); + if (actualColumnName != null && expectedColumnName != null) { + return actualColumnName.equalsIgnoreCase(expectedColumnName); + } else { + return false; + } + } + + // ===================================================================================== + // Delegate of List + // ================ + /** + * Is empty? + * + * @return Determination. + */ + public boolean isEmpty() { + return _orderByList.isEmpty(); + } + + /** + * Get iterator of order-by list. + * + * @return Determination. + */ + public java.util.Iterator iterator() { + return _orderByList.iterator(); + } + + /** + * Clear order-by list. + */ + public void clear() { + _orderByList.clear(); + } + + // ===================================================================================== + // Basic-Override Method + // ===================== + /** + * This method overrides the method that is declared at super. + * + * @return View-string of all-columns value. + */ + public String toString() { + return _orderByList.toString(); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/sqlclause/OrderByElement.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/sqlclause/OrderByElement.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/sqlclause/OrderByElement.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,172 @@ +package jp.sf.pal.pompei.allcommon.cbean.sqlclause; + + +/** + * The paging-result-bean of OrderByElement. + * + *
+ *   For example, if you make order-by 'order BOOK.BOOK_ID asc', the way is as follows:
+ *       /-----------------------------------------------------
+ *       OrderByElement orderByElement = new OrderByElement();
+ *       orderByElement.AliasName = "BOOK";
+ *       orderByElement.ColumnName = "BOOK_ID";
+ *       orderByElement.SetupAsc();
+ *       -------------/
+ * 
+ * + * @author DBFlute(AutoGenerator) + */ +public class OrderByElement implements java.io.Serializable { + + /** Serial version UID. (Default) */ + private static final long serialVersionUID = 1L; + + // ===================================================================================== + // Attribute + // ========= + /** The value of alias name. */ + protected String _aliasName; + + /** The value of column name. */ + protected String _columnName; + + /** The value of registered alias name. */ + protected String _registeredAliasName; + + /** The value of registered column name. */ + protected String _registeredColumnName; + + /** The value of ascDesc. */ + protected String _ascDesc = "asc"; + + // ===================================================================================== + // GetterSetter + // ============ + public String getAliasName() { + return _aliasName; + } + public String getColumnName() { + return _columnName; + } + public String getRegisteredAliasName() { + return _registeredAliasName; + } + public String getRegisteredColumnName() { + return _registeredColumnName; + } + public String getAscDesc() { + return _ascDesc; + } + public void setAliasName(String value) { + _aliasName = value; + } + public void setColumnName(String value) { + _columnName = value; + } + public void setRegisteredAliasName(String value) { + _registeredAliasName = value; + } + public void setRegisteredColumnName(String value) { + _registeredColumnName = value; + } + public void setAscDesc(String value) { + _ascDesc = value; + } + + // ===================================================================================== + // Behavior + // ======== + public void setupAsc() { + _ascDesc = "asc"; + } + + public void setupDesc() { + _ascDesc = "desc"; + } + + public void reverse() { + if (_ascDesc == null) { + String msg = "The attribute[ascDesc] should not be null."; + throw new IllegalStateException(msg); + } + if (_ascDesc.equals("asc")) { + _ascDesc = "desc"; + } else if (_ascDesc.equals("desc")) { + _ascDesc = "asc"; + } else { + String msg = "The attribute[ascDesc] should be asc or desc: but ascDesc=" + _ascDesc; + throw new IllegalStateException(msg); + } + } + + public boolean isAsc() { + if (_ascDesc == null) { + String msg = "The attribute[ascDesc] should not be null."; + throw new IllegalStateException(msg); + } + if (_ascDesc.equals("asc")) { + return true; + } else if (_ascDesc.equals("desc")) { + return false; + } else { + String msg = "The attribute[ascDesc] should be asc or desc: but ascDesc=" + _ascDesc; + throw new IllegalStateException(msg); + } + } + + public String getColumnFullName() { + final StringBuffer sb = new StringBuffer(); + if (_aliasName != null) { + sb.append(_aliasName).append("."); + } + if (_columnName == null) { + String msg = "The attribute[columnName] should not be null."; + throw new IllegalStateException(msg); + } + sb.append(_columnName); + return sb.toString(); + } + + public String getElementClause() { + if (_ascDesc == null) { + String msg = "The attribute[ascDesc] should not be null."; + throw new IllegalStateException(msg); + } + final StringBuffer sb = new StringBuffer(); + sb.append(getColumnFullName()).append(" ").append(_ascDesc); + return sb.toString(); + } + + public String getElementClause(java.util.Map selectClauseColumnAliasMap) { + if (_ascDesc == null) { + String msg = "The attribute[ascDesc] should not be null."; + throw new IllegalStateException(msg); + } + final StringBuffer sb = new StringBuffer(); + final String columnAlias = (String)selectClauseColumnAliasMap.get(getColumnFullName()); + if (columnAlias == null || columnAlias.trim().length() == 0) { + String msg = "The selectClauseColumnAliasMap should have the value of the key: " + getColumnFullName(); + throw new IllegalStateException(msg + " But the map is " + selectClauseColumnAliasMap); + } + sb.append(columnAlias).append(" ").append(_ascDesc); + return sb.toString(); + } + + // ===================================================================================== + // Basic Override + // ============== + /** + * This method overrides the method that is declared at super. + * + * @return View-string of all-columns value. + */ + public String toString() { + final StringBuffer sb = new StringBuffer(); + sb.append("[OrderByElement] aliasName=").append(_aliasName); + sb.append(" columnName=").append(_columnName); + sb.append(" registeredAliasName=").append(_registeredAliasName); + sb.append(" registeredColumnName=").append(_registeredColumnName); + sb.append(" ascDesc=").append(_ascDesc); + return sb.toString(); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/sqlclause/SqlClause.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/sqlclause/SqlClause.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/sqlclause/SqlClause.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,372 @@ +package jp.sf.pal.pompei.allcommon.cbean.sqlclause; + + +import java.util.Map; + +import jp.sf.pal.pompei.allcommon.cbean.ckey.ConditionKey; +import jp.sf.pal.pompei.allcommon.cbean.coption.ConditionOption; +import jp.sf.pal.pompei.allcommon.cbean.cvalue.ConditionValue; + +/** + * The interface of SqlClause. + * + * @author DBFlute(AutoGenerator) + */ +public interface SqlClause { + + public static final String INCLUDE_SELECT_CLAUSE_MARK = "/* df:includeSelectClause */"; + + // ===================================================================================== + // Select Clause + // ============= + public void setSelectClauseColumnAliasMap(java.util.Map selectClauseColumnAliasMap); + + // ===================================================================================== + // Clause + // ====== + /** + * Get clause string. + *

+ *

+     * ex)
+     * # from [base-table] left outer join [fk-table] [fk-alias] on [join-condition]
+     * # where [base-table].[column] = [value] and [fk-alias].[column] is null
+     * # order by [base-table].[column] asc, [fk-alias].[column] desc
+     * # for update
+     * 
+ * + * @return Clause string. (NotNull) + */ + public String getClause(); + + /** + * Get clause string without included and orderby and sqlsuffix. + * + * @return Clause string. (NotNull) + */ + public String getClauseWithoutIncludedOrderBySqlSuffix(); + + // ===================================================================================== + // Clause Parts + // ============ + /** + * Get select-hint. This is an internal method. + * + * @return select-hint. {select [select-hint] * from table...} (NotNull) + */ + public String getSelectHint(); + + /** + * Get included-select-column clause. This is an internal method. + * + * @return Included-select-column clause. {select ... , [included-select-column clause] from table...} (NotNull) + */ + public String getIncludedSelectColumnClause(); + + /** + * Get from clause. {from table left outer join foreign-table on ...} + * + * @return From clause. (NotNull) + */ + public String getFromClause(); + + /** + * Get from-base-table-hint. This is an internal method. + * + * @return from-base-table-hint. {select * from table [from-base-table-hint] where ...} (NotNull) + */ + public String getFromBaseTableHint(); + + /** + * Get from-hint. This is an internal method. + * + * @return from-hint. {select * from table left outer join ... on ... [from-hint] where ...} (NotNull) + */ + public String getFromHint(); + + /** + * Get where clause. {where [base-table].[column] = [value] and [fk-alias].[column] is null} + * + * @return Where clause. (NotNull) + */ + public String getWhereClause(); + + /** + * Get order-by clause. {order by [base-table].[column] asc, [fk-alias].[column] desc} + * + * @return Order-by clause. (NotNull) + */ + public String getOrderByClause(); + + /** + * Get sql-suffix. This is an internal method. + * + * @return sql-suffix. {select * from table where ... order by ... [sql-suffix]} (NotNull) + */ + public String getSqlSuffix(); + + // ===================================================================================== + // Copy Parts + // ========== + /** + * Copy included-select-column. + */ + public void copyIncludedSelectColumn(SqlClause sqlClause); + + // ===================================================================================== + // IncludedSelectColumn + // ==================== + /** + * Ignore included-select-column. + */ + public void ignoreIncludedSelectColumn(); + + /** + * Make included-select-column effective. + */ + public void makeIncludedSelectColumnEffective(); + + /** + * Register included-select-column. + * + * @param aliasName Alias name. (NotNull) + * @param realColumnName Real column name. (NotNull) + */ + public void registerIncludedSelectColumn(String aliasName, String realColumnName); + + // ===================================================================================== + // OuterJoin + // ========= + /** + * Register outer join. + * + * @param joinTableName Join table name(outer join [joinTableName]). (NotNull) + * @param aliasName Alias name of join table. (NotNull and Unique per invoking method.) + * @param joinOnMap Map that has conditions of 'on' clause. (NotNull) + */ + public void registerOuterJoin(String joinTableName, String aliasName, Map joinOnMap); + + // ===================================================================================== + // Where + // ===== + /** + * Register where clause. + * + * @param columnFullName Column-full-name([table-name].[column-name]). (NotNull) + * @param key Condition key. (NotNull) + * @param value Condition value. (NotNull) + */ + public void registerWhereClause(String columnFullName, ConditionKey key, ConditionValue value); + + /** + * Register where clause. + * + * @param columnFullName Column-full-name([table-name].[column-name]). (NotNull) + * @param key Condition key. (NotNull) + * @param value Condition value. (NotNull) + * @param option Condition option. (NotNull) + */ + public void registerWhereClause(String columnFullName, ConditionKey key, ConditionValue value, ConditionOption option); + + /** + * Register where clause. + * + * @param clause Where-clause. (NotNull) + */ + public void registerWhereClause(String clause); + + /** + * Exchange first where clause for last one. + */ + public void exchangeFirstWhereClauseForLastOne(); + + // ===================================================================================== + // InlineWhere + // =========== + public void registerBaseTableInlineWhereClause(String columnName, ConditionKey key, ConditionValue value); + public void registerBaseTableInlineWhereClause(String columnName, ConditionKey key, ConditionValue value, ConditionOption option); + public void registerBaseTableInlineWhereClause(String value); + public void registerOuterJoinInlineWhereClause(String aliasName, String columnName, ConditionKey key, ConditionValue value); + public void registerOuterJoinInlineWhereClause(String aliasName, String columnName, ConditionKey key, ConditionValue value, ConditionOption option); + public void registerOuterJoinInlineWhereClause(String aliasName, String value); + + // ===================================================================================== + // AdditionalConditionAsOr + // ======================= + public void makeAdditionalConditionAsOrEffective(); + public void ignoreAdditionalConditionAsOr(); + + // ===================================================================================== + // OrderBy + // ======= + public OrderByClause getSqlComponentOfOrderByClause(); + + /** + * Clear order-by. + * + * @return this. (NotNull) + */ + public SqlClause clearOrderBy(); + + /** + * Ignore order-by. + * + * @return this. (NotNull) + */ + public SqlClause ignoreOrderBy(); + + /** + * Make order-by effective. + * + * @return this. (NotNull) + */ + public SqlClause makeOrderByEffective(); + + public void registerOrderBy(String orderByProperty, String registeredOrderByProperty, boolean isAsc); + + public void reverseOrderBy_Or_OverrideOrderBy(String orderByProperty, String registeredOrderByProperty, boolean isAsc); + + // ===================================================================================== + // Clause + // ====== + public void registerUnionQuery(String unionClause, boolean unionAll); + + // ===================================================================================== + // Advance + // ======= + /** + * Fetch first. + *

+ * If you invoke this, your SQL returns [fetch-size] records from first. + * If you invoke this, instance-variable[_fetchPageNumber] is initialized as one. + * + * @param fetchSize Fetch-size. (NotMinus) + * @return this. (NotNull) + */ + public SqlClause fetchFirst(int fetchSize); + + /** + * Fetch scope. + *

+ * If you invoke this, your SQL returns [fetch-size] records from [fetch-start-index]. + * If you invoke this, instance-variable[_fetchPageNumber] is initialized as one. + * + * @param fetchStartIndex Fetch-start-index. 0 origin. (NotMinus) + * @param fetchSize Fetch-size. (NotMinus) + * @return this. (NotNull) + */ + public SqlClause fetchScope(int fetchStartIndex, int fetchSize); + + /** + * Fetch page. + *

+ * When you invoke this, it is normally necessary to invoke 'fetchFirst()' or 'fetchScope()' ahead of that. + * But you also can use default-fetch-size without invoking 'fetchFirst()' or 'fetchScope()'. + * If you invoke this, your SQL returns [fetch-size] records from [fetch-start-index] calculated by [fetch-page-number]. + * + * @param fetchPageNumber Fetch-page-number. 1 origin. (NotMinus & NotZero) + * @return this. (NotNull) + */ + public SqlClause fetchPage(int fetchPageNumber); + + /** + * Get fetch start index. + * + * @return Fetch start index. + */ + public int getFetchStartIndex(); + + /** + * Get fetch size. + * + * @return Fetch size. + */ + public int getFetchSize(); + + /** + * Get fetch page number. + * + * @return Fetch page number. + */ + public int getFetchPageNumber(); + + /** + * Get page start index. + * + * @return Page start index. 0 origin. (NotMinus) + */ + public int getPageStartIndex(); + + /** + * Get page end index. + * + * @return Page end index. 0 origin. (NotMinus) + */ + public int getPageEndIndex(); + + /** + * Is fetch scope effective? + * + * @return Determiantion. + */ + public boolean isFetchScopeEffective(); + + /** + * Ignore fetch-scope. + * + * @return this. (NotNull) + */ + public SqlClause ignoreFetchScope(); + + /** + * Make fetch-scope effective. + * + * @return this. (NotNull) + */ + public SqlClause makeFetchScopeEffective(); + + /** + * Is fetch start index supported? + * + * @return Determination. + */ + public boolean isFetchStartIndexSupported(); + + /** + * Is fetch size supported? + * + * @return Determination. + */ + public boolean isFetchSizeSupported(); + + /** + * Is fetch-narrowing effective? + * + * @return Determiantion. + */ + public boolean isFetchNarrowingEffective(); + + /** + * Get fetch-narrowing skip-start-index. + * + * @return Skip-start-index. + */ + public int getFetchNarrowingSkipStartIndex(); + + /** + * Get fetch-narrowing loop-count. + * + * @return Loop-count. + */ + public int getFetchNarrowingLoopCount(); + + /** + * Lock for update. + *

+ * If you invoke this, your SQL lock target records for update. + * It depends whether this method supports this on the database type. + * + * @return this. (NotNull) + */ + public SqlClause lockForUpdate(); +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/sqlclause/SqlClauseDb2.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/sqlclause/SqlClauseDb2.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/sqlclause/SqlClauseDb2.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,109 @@ +package jp.sf.pal.pompei.allcommon.cbean.sqlclause; + + +/** + * SqlClause for DB2. + * + * @author DBFlute(AutoGenerator) + */ +public class SqlClauseDb2 extends AbstractSqlClause { + + /** String of fetch-first as sql-suffix. */ + protected String _fetchFirstSqlSuffix = ""; + + /** String of lock as from-hint. */ + protected String _lockSqlSuffix = ""; + + /** + * Constructor. + * + * @param tableName Table name. (NotNull) + **/ + public SqlClauseDb2(String tableName) { + super(tableName); + } + + /** + * This method implements the method that is declared at super. + */ + protected void doFetchFirst() { + if (isFetchSizeSupported()) { + _fetchFirstSqlSuffix = " fetch first " + getFetchSize() + " rows only"; + } + } + + /** + * This method implements the method that is declared at super. {Unsupported!} + */ + protected void doFetchPage() { + if (isFetchSizeSupported()) { + if (isFetchStartIndexSupported()) { + _fetchFirstSqlSuffix = " fetch first " + getFetchSize() + " rows only"; + } else { + _fetchFirstSqlSuffix = " fetch first " + getPageEndIndex() + " rows only"; + } + } + } + + /** + * This method implements the method that is declared at super. {Unsupported!} + */ + protected void doClearFetchPageClause() { + _fetchFirstSqlSuffix = ""; + } + + /** + * This method overrides the method that is declared at super. + * + * @return Determination. + */ + public boolean isFetchStartIndexSupported() { + return false; + } + + /** + * This method implements the method that is declared at super. + * + * @return this. (NotNull) + */ + public SqlClause lockForUpdate() { + _lockSqlSuffix = " for update with RS"; + return this; + } + + /** + * This method implements the method that is declared at super. + * + * @return Select-hint. (NotNull) + */ + protected String createSelectHint() { + return ""; + } + + /** + * This method implements the method that is declared at super. + * + * @return From-base-table-hint. {select * from table [from-base-table-hint] where ...} (NotNull) + */ + protected String createFromBaseTableHint() { + return ""; + } + + /** + * This method implements the method that is declared at super. + * + * @return From-hint. (NotNull) + */ + protected String createFromHint() { + return ""; + } + + /** + * This method implements the method that is declared at super. + * + * @return Sql-suffix. (NotNull) + */ + protected String createSqlSuffix() { + return _fetchFirstSqlSuffix + _lockSqlSuffix; + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/sqlclause/SqlClauseDefault.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/sqlclause/SqlClauseDefault.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/sqlclause/SqlClauseDefault.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,101 @@ +package jp.sf.pal.pompei.allcommon.cbean.sqlclause; + + +/** + * SqlClause for Default. + * + * @author DBFlute(AutoGenerator) + */ +public class SqlClauseDefault extends AbstractSqlClause { + + /** + * Constructor. + *

+ * @param tableName Table name. (NotNull) + **/ + public SqlClauseDefault(String tableName) { + super(tableName); + } + + /** + * This method implements the method that is declared at super. + */ + protected void doFetchFirst() { + } + + /** + * This method implements the method that is declared at super. + */ + protected void doFetchPage() { + } + + /** + * This method implements the method that is declared at super. + */ + protected void doClearFetchPageClause() { + } + + /** + * This method overrides the method that is declared at super. + * + * @return Determination. + */ + public boolean isFetchStartIndexSupported() { + return false; // Default + } + + /** + * This method overrides the method that is declared at super. + * + * @return Determination. + */ + public boolean isFetchSizeSupported() { + return false; // Default + } + + /** + * This method implements the method that is declared at super. + * + * @return this. (NotNull) + */ + public SqlClause lockForUpdate() { + String msg = "LockForUpdate-SQL is unsupported in the database. Sorry...: " + toString(); + throw new UnsupportedOperationException(msg); + } + + /** + * This method implements the method that is declared at super. + * + * @return Select-hint. (NotNull) + */ + protected String createSelectHint() { + return ""; + } + + /** + * This method implements the method that is declared at super. + * + * @return From-base-table-hint. {select * from table [from-base-table-hint] where ...} (NotNull) + */ + protected String createFromBaseTableHint() { + return ""; + } + + /** + * This method implements the method that is declared at super. + * + * @return From-hint. (NotNull) + */ + protected String createFromHint() { + return ""; + } + + /** + * This method implements the method that is declared at super. + * + * @return Sql-suffix. (NotNull) + */ + protected String createSqlSuffix() { + return ""; + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/sqlclause/SqlClauseDerby.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/sqlclause/SqlClauseDerby.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/sqlclause/SqlClauseDerby.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,104 @@ +package jp.sf.pal.pompei.allcommon.cbean.sqlclause; + + +/** + * SqlClause for Default. + * + * @author DBFlute(AutoGenerator) + */ +public class SqlClauseDerby extends AbstractSqlClause { + + /** String of lock as sql-suffix. */ + protected String _lockSqlSuffix = ""; + + /** + * Constructor. + *

+ * @param tableName Table name. (NotNull) + **/ + public SqlClauseDerby(String tableName) { + super(tableName); + } + + /** + * This method implements the method that is declared at super. + */ + protected void doFetchFirst() { + } + + /** + * This method implements the method that is declared at super. + */ + protected void doFetchPage() { + } + + /** + * This method implements the method that is declared at super. + */ + protected void doClearFetchPageClause() { + } + + /** + * This method overrides the method that is declared at super. + * + * @return Determination. + */ + public boolean isFetchStartIndexSupported() { + return false; // Default + } + + /** + * This method overrides the method that is declared at super. + * + * @return Determination. + */ + public boolean isFetchSizeSupported() { + return false; // Default + } + + /** + * This method implements the method that is declared at super. + * + * @return this. (NotNull) + */ + public SqlClause lockForUpdate() { + _lockSqlSuffix = " for update"; + return this; + } + + /** + * This method implements the method that is declared at super. + * + * @return Select-hint. (NotNull) + */ + protected String createSelectHint() { + return ""; + } + + /** + * This method implements the method that is declared at super. + * + * @return From-base-table-hint. {select * from table [from-base-table-hint] where ...} (NotNull) + */ + protected String createFromBaseTableHint() { + return ""; + } + + /** + * This method implements the method that is declared at super. + * + * @return From-hint. (NotNull) + */ + protected String createFromHint() { + return ""; + } + + /** + * This method implements the method that is declared at super. + * + * @return Sql-suffix. (NotNull) + */ + protected String createSqlSuffix() { + return _lockSqlSuffix; + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/sqlclause/SqlClauseFirebird.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/sqlclause/SqlClauseFirebird.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/sqlclause/SqlClauseFirebird.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,102 @@ +package jp.sf.pal.pompei.allcommon.cbean.sqlclause; + + +/** + * SqlClause for Firebird. + * + * @author DBFlute(AutoGenerator) + */ +public class SqlClauseFirebird extends AbstractSqlClause { + + /** String of fetch-scope as select-hint. */ + protected String _fetchScopeSelectHint = ""; + + /** String of lock as sql-suffix. */ + protected String _lockSqlSuffix = ""; + + /** + * Constructor. + * + * @param tableName Table name. (NotNull) + **/ + public SqlClauseFirebird(String tableName) { + super(tableName); + } + + /** + * This method implements the method that is declared at super. + */ + protected void doFetchFirst() { + if (isFetchSizeSupported()) { + _fetchScopeSelectHint = " first " + getFetchSize(); + } + } + + /** + * This method implements the method that is declared at super. + */ + protected void doFetchPage() { + if (isFetchStartIndexSupported() && isFetchSizeSupported()) { + _fetchScopeSelectHint = " first " + getFetchSize() + " skip " + getPageStartIndex(); + } + if (isFetchStartIndexSupported() && !isFetchSizeSupported()) { + _fetchScopeSelectHint = " skip " + getPageStartIndex(); + } + if (!isFetchStartIndexSupported() && isFetchSizeSupported()) { + _fetchScopeSelectHint = " first " + getPageEndIndex(); + } + } + + /** + * This method implements the method that is declared at super. + */ + protected void doClearFetchPageClause() { + _fetchScopeSelectHint = ""; + } + + /** + * This method implements the method that is declared at super. + * + * @return this. (NotNull) + */ + public SqlClause lockForUpdate() { + _lockSqlSuffix = " for update with lock"; + return this; + } + + /** + * This method implements the method that is declared at super. + * + * @return Select-hint. (NotNull) + */ + protected String createSelectHint() { + return _fetchScopeSelectHint; + } + + /** + * This method implements the method that is declared at super. + * + * @return From-base-table-hint. {select * from table [from-base-table-hint] where ...} (NotNull) + */ + protected String createFromBaseTableHint() { + return ""; + } + + /** + * This method implements the method that is declared at super. + * + * @return From-hint. (NotNull) + */ + protected String createFromHint() { + return ""; + } + + /** + * This method implements the method that is declared at super. + * + * @return Sql-suffix. (NotNull) + */ + protected String createSqlSuffix() { + return _lockSqlSuffix; + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/sqlclause/SqlClauseInterbase.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/sqlclause/SqlClauseInterbase.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/sqlclause/SqlClauseInterbase.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,102 @@ +package jp.sf.pal.pompei.allcommon.cbean.sqlclause; + + +/** + * SqlClause for Interbase. + * + * @author DBFlute(AutoGenerator) + */ +public class SqlClauseInterbase extends AbstractSqlClause { + + /** String of fetch-scope as select-hint. */ + protected String _fetchScopeSelectHint = ""; + + /** String of lock as sql-suffix. */ + protected String _lockSqlSuffix = ""; + + /** + * Constructor. + * + * @param tableName Table name. (NotNull) + **/ + public SqlClauseInterbase(String tableName) { + super(tableName); + } + + /** + * This method implements the method that is declared at super. + */ + protected void doFetchFirst() { + if (isFetchSizeSupported()) { + _fetchScopeSelectHint = " first " + getFetchSize(); + } + } + + /** + * This method implements the method that is declared at super. + */ + protected void doFetchPage() { + if (isFetchStartIndexSupported() && isFetchSizeSupported()) { + _fetchScopeSelectHint = " first " + getFetchSize() + " skip " + getPageStartIndex(); + } + if (isFetchStartIndexSupported() && !isFetchSizeSupported()) { + _fetchScopeSelectHint = " skip " + getPageStartIndex(); + } + if (!isFetchStartIndexSupported() && isFetchSizeSupported()) { + _fetchScopeSelectHint = " first " + getPageEndIndex(); + } + } + + /** + * This method implements the method that is declared at super. + */ + protected void doClearFetchPageClause() { + _fetchScopeSelectHint = ""; + } + + /** + * This method implements the method that is declared at super. + * + * @return this. (NotNull) + */ + public SqlClause lockForUpdate() { + _lockSqlSuffix = " for update with lock"; + return this; + } + + /** + * This method implements the method that is declared at super. + * + * @return Select-hint. (NotNull) + */ + protected String createSelectHint() { + return _fetchScopeSelectHint; + } + + /** + * This method implements the method that is declared at super. + * + * @return From-base-table-hint. {select * from table [from-base-table-hint] where ...} (NotNull) + */ + protected String createFromBaseTableHint() { + return ""; + } + + /** + * This method implements the method that is declared at super. + * + * @return From-hint. (NotNull) + */ + protected String createFromHint() { + return ""; + } + + /** + * This method implements the method that is declared at super. + * + * @return Sql-suffix. (NotNull) + */ + protected String createSqlSuffix() { + return _lockSqlSuffix; + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/sqlclause/SqlClauseMySql.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/sqlclause/SqlClauseMySql.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/sqlclause/SqlClauseMySql.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,92 @@ +package jp.sf.pal.pompei.allcommon.cbean.sqlclause; + + +/** + * SqlClause for MySQL. + * + * @author DBFlute(AutoGenerator) + */ +public class SqlClauseMySql extends AbstractSqlClause { + + /** String of fetch-scope as sql-suffix. */ + protected String _fetchScopeSqlSuffix = ""; + + /** String of lock as sql-suffix. */ + protected String _lockSqlSuffix = ""; + + /** + * Constructor. + *

+ * @param tableName Table name. (NotNull) + **/ + public SqlClauseMySql(String tableName) { + super(tableName); + } + + /** + * This method implements the method that is declared at super. + */ + protected void doFetchFirst() { + doFetchPage(); + } + + /** + * This method implements the method that is declared at super. + */ + protected void doFetchPage() { + _fetchScopeSqlSuffix = " limit " + getPageStartIndex() + ", " + getFetchSize(); + } + + /** + * This method implements the method that is declared at super. + */ + protected void doClearFetchPageClause() { + _fetchScopeSqlSuffix = ""; + } + + /** + * This method implements the method that is declared at super. + * + * @return this. (NotNull) + */ + public SqlClause lockForUpdate() { + _lockSqlSuffix = " for update"; + return this; + } + + /** + * This method implements the method that is declared at super. + * + * @return Select-hint. (NotNull) + */ + protected String createSelectHint() { + return ""; + } + + /** + * This method implements the method that is declared at super. + * + * @return From-base-table-hint. {select * from table [from-base-table-hint] where ...} (NotNull) + */ + protected String createFromBaseTableHint() { + return ""; + } + + /** + * This method implements the method that is declared at super. + * + * @return From-hint. (NotNull) + */ + protected String createFromHint() { + return ""; + } + + /** + * This method implements the method that is declared at super. + * + * @return Sql-suffix. (NotNull) + */ + protected String createSqlSuffix() { + return _fetchScopeSqlSuffix + _lockSqlSuffix; + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/sqlclause/SqlClauseOracle.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/sqlclause/SqlClauseOracle.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/sqlclause/SqlClauseOracle.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,113 @@ +package jp.sf.pal.pompei.allcommon.cbean.sqlclause; + + +/** + * SqlClause for Oracle. + * + * @author DBFlute(AutoGenerator) + */ +public class SqlClauseOracle extends AbstractSqlClause { + + /** String of fetch-scope as select-hint. */ + protected String _fetchScopeSelectHint = ""; + + /** String of fetch-scope as sql-suffix. */ + protected String _fetchScopeSqlSuffix = ""; + + /** String of lock as sql-suffix. */ + protected String _lockSqlSuffix = ""; + + /** + * Constructor. + * + * @param tableName Table name. (NotNull) + **/ + public SqlClauseOracle(String tableName) { + super(tableName); + } + + /** + * This method implements the method that is declared at super. + */ + protected void doFetchFirst() { + if (isFetchSizeSupported()) { + _fetchScopeSelectHint = " * from (select"; + _fetchScopeSqlSuffix = ") where rownum <= " + getFetchSize(); + } + } + + /** + * This method implements the method that is declared at super. + */ + protected void doFetchPage() { + if (!isFetchStartIndexSupported() && !isFetchSizeSupported()) { + return; + } + _fetchScopeSelectHint = " * from (select base.*, rownum as rn from (select"; + _fetchScopeSqlSuffix = ""; + if (isFetchStartIndexSupported()) { + _fetchScopeSqlSuffix = ") base ) where rn > " + getPageStartIndex(); + } + if (isFetchSizeSupported()) { + if (isFetchStartIndexSupported()) { + _fetchScopeSqlSuffix = _fetchScopeSqlSuffix + " and rn <= " + getPageEndIndex(); + } else { + _fetchScopeSqlSuffix = ") base ) where rn <= " + getPageEndIndex(); + } + } + } + + /** + * This method implements the method that is declared at super. + */ + protected void doClearFetchPageClause() { + _fetchScopeSelectHint = ""; + _fetchScopeSqlSuffix = ""; + } + + /** + * This method implements the method that is declared at super. + * + * @return this. (NotNull) + */ + public SqlClause lockForUpdate() { + _lockSqlSuffix = " for update"; + return this; + } + + /** + * This method implements the method that is declared at super. + * + * @return Select-hint. (NotNull) + */ + protected String createSelectHint() { + return _fetchScopeSelectHint; + } + + /** + * This method implements the method that is declared at super. + * + * @return From-base-table-hint. {select * from table [from-base-table-hint] where ...} (NotNull) + */ + protected String createFromBaseTableHint() { + return ""; + } + + /** + * This method implements the method that is declared at super. + * + * @return From-hint. (NotNull) + */ + protected String createFromHint() { + return ""; + } + + /** + * This method implements the method that is declared at super. + * + * @return Sql-suffix. (NotNull) + */ + protected String createSqlSuffix() { + return _fetchScopeSqlSuffix + _lockSqlSuffix; + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/sqlclause/SqlClausePostgreSql.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/sqlclause/SqlClausePostgreSql.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/sqlclause/SqlClausePostgreSql.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,92 @@ +package jp.sf.pal.pompei.allcommon.cbean.sqlclause; + + +/** + * SqlClause for PostreSQL. + * + * @author DBFlute(AutoGenerator) + */ +public class SqlClausePostgreSql extends AbstractSqlClause { + + /** String of fetch-scope as sql-suffix. */ + protected String _fetchScopeSqlSuffix = ""; + + /** String of lock as sql-suffix. */ + protected String _lockSqlSuffix = ""; + + /** + * Constructor. + * + * @param tableName Table name. (NotNull) + **/ + public SqlClausePostgreSql(String tableName) { + super(tableName); + } + + /** + * This method implements the method that is declared at super. + */ + protected void doFetchFirst() { + doFetchPage(); + } + + /** + * This method implements the method that is declared at super. + */ + protected void doFetchPage() { + _fetchScopeSqlSuffix = " offset " + getPageStartIndex() + " limit " + getFetchSize(); + } + + /** + * This method implements the method that is declared at super. + */ + protected void doClearFetchPageClause() { + _fetchScopeSqlSuffix = ""; + } + + /** + * This method implements the method that is declared at super. + * + * @return this. (NotNull) + */ + public SqlClause lockForUpdate() { + _lockSqlSuffix = " for update"; + return this; + } + + /** + * This method implements the method that is declared at super. + * + * @return Select-hint. (NotNull) + */ + protected String createSelectHint() { + return ""; + } + + /** + * This method implements the method that is declared at super. + * + * @return From-base-table-hint. {select * from table [from-base-table-hint] where ...} (NotNull) + */ + protected String createFromBaseTableHint() { + return ""; + } + + /** + * This method implements the method that is declared at super. + * + * @return From-hint. (NotNull) + */ + protected String createFromHint() { + return ""; + } + + /** + * This method implements the method that is declared at super. + * + * @return Sql-suffix. (NotNull) + */ + protected String createSqlSuffix() { + return _fetchScopeSqlSuffix + _lockSqlSuffix; + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/sqlclause/SqlClauseSqlServer.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/sqlclause/SqlClauseSqlServer.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/cbean/sqlclause/SqlClauseSqlServer.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,109 @@ +package jp.sf.pal.pompei.allcommon.cbean.sqlclause; + + +/** + * SqlClause for MSSQL. + * + * @author DBFlute(AutoGenerator) + */ +public class SqlClauseSqlServer extends AbstractSqlClause { + + /** String of fetch-first as select-hint. */ + protected String _fetchFirstSelectHint = ""; + + /** String of lock as from-hint. */ + protected String _lockFromHint = ""; + + /** + * Constructor. + * + * @param tableName Table name. (NotNull) + **/ + public SqlClauseSqlServer(String tableName) { + super(tableName); + } + + /** + * This method implements the method that is declared at super. + */ + protected void doFetchFirst() { + if (isFetchSizeSupported()) { + _fetchFirstSelectHint = " top " + getFetchSize(); + } + } + + /** + * This method implements the method that is declared at super. + */ + protected void doFetchPage() { + if (isFetchSizeSupported()) { + if (isFetchStartIndexSupported()) { + _fetchFirstSelectHint = " top " + getFetchSize(); + } else { + _fetchFirstSelectHint = " top " + getPageEndIndex(); + } + } + } + + /** + * This method implements the method that is declared at super. + */ + protected void doClearFetchPageClause() { + _fetchFirstSelectHint = ""; + } + + /** + * This method overrides the method that is declared at super. + * + * @return Determination. + */ + public boolean isFetchStartIndexSupported() { + return false; + } + + /** + * This method implements the method that is declared at super. {Implement} + * + * @return this. (NotNull) + */ + public SqlClause lockForUpdate() { + _lockFromHint = " with (updlock)"; + return this; + } + + /** + * This method implements the method that is declared at super. + * + * @return Select-hint. (NotNull) + */ + protected String createSelectHint() { + return _fetchFirstSelectHint; + } + + /** + * This method implements the method that is declared at super. + * + * @return From-base-table-hint. {select * from table [from-base-table-hint] where ...} (NotNull) + */ + protected String createFromBaseTableHint() { + return _lockFromHint; + } + + /** + * This method implements the method that is declared at super. + * + * @return From-hint. (NotNull) + */ + protected String createFromHint() { + return ""; + } + + /** + * This method implements the method that is declared at super. + * + * @return Sql-suffix. (NotNull) + */ + protected String createSqlSuffix() { + return ""; + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/dbmeta/AbstractDBMeta.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/dbmeta/AbstractDBMeta.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/dbmeta/AbstractDBMeta.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,605 @@ +package jp.sf.pal.pompei.allcommon.dbmeta; + + +import jp.sf.pal.pompei.allcommon.Entity; +import jp.sf.pal.pompei.allcommon.helper.MapListString; +import jp.sf.pal.pompei.allcommon.helper.MapListStringImpl; +import jp.sf.pal.pompei.allcommon.helper.MapStringBuilder; +import jp.sf.pal.pompei.allcommon.helper.MapStringBuilderImpl; + +/** + * The abstract class of dbmeta. + * + * @author DBFlute(AutoGenerator) + */ +public abstract class AbstractDBMeta implements DBMeta { + + // ===================================================================================== + // Name Handling + // ============= + /** + * This method implements the method that is declared at super. + * + * @param dbName Db-name. (NotNull) + * @return Determination. + */ + public boolean isExistDbName(String dbName) { + return getDbNameCapPropNameMap().containsKey(dbName); + } + + /** + * This method implements the method that is declared at super. + * + * @param capPropName Cap-prop-name. (NotNull) + * @return Determination. + */ + public boolean isExistCapPropName(String capPropName) { + return getCapPropNameDbNameMap().containsKey(capPropName); + } + + /** + * This method implements the method that is declared at super. + * + * @param uncapPropName Uncap-prop-name. (NotNull) + * @return Determination. + */ + public boolean isExistUncapPropName(String uncapPropName) { + return getUncapPropNameDbNameMap().containsKey(uncapPropName); + } + + /// + /// This method implements the method that is declared at super. + /// + /// Multi-name. + /// Determination. + public boolean isExistMultiName(String multiName) { + if (isExistDbName(multiName)) { + return true; + } + if (isExistCapPropName(multiName)) { + return true; + } + if (isExistUncapPropName(multiName)) { + return true; + } + return false; + } + + /** + * This method implements the method that is declared at super. + * + * @param capPropName Cap-prop-name. (NotNull) + * @return Db-name. (NotNull) + */ + public String getDbNameByCapPropName(String capPropName) { + assertStringNotNullAndNotTrimmedEmpty("capPropName", capPropName); + final String dbName = (String)getCapPropNameDbNameMap().get(capPropName); + if (dbName == null) { + String msg = "The capPropNameDbNameMap didn't contain the key of '" + capPropName + "': "; + throw new IllegalStateException(msg + getCapPropNameDbNameMap()); + } + return dbName; + } + + /** + * This method implements the method that is declared at super. + * + * @param uncapPropName Uncap-prop-name. (NotNull) + * @return {db-name : java-name} map. (NotNull) + */ + public String getDbNameByUncapPropName(String uncapPropName) { + assertStringNotNullAndNotTrimmedEmpty("uncapPropName", uncapPropName); + final String dbName = (String)getUncapPropNameDbNameMap().get(uncapPropName); + if (dbName == null) { + String msg = "The uncapPropNameDbNameMap didn't contain the key of '" + uncapPropName + "': "; + throw new IllegalStateException(msg + getUncapPropNameDbNameMap()); + } + return dbName; + } + + /** + * This method implements the method that is declared at super. + * + * @param dbName Db-name. (NotNull) + * @return Cap-prop-name. (NotNull) + */ + public String getCapPropNameByDbName(String dbName) { + assertStringNotNullAndNotTrimmedEmpty("dbName", dbName); + final String capPropName = (String)getDbNameCapPropNameMap().get(dbName); + if (capPropName == null) { + String msg = "The dbNameCapPropNameMap didn't contain the key of '" + dbName + "': "; + throw new IllegalStateException(msg + getDbNameCapPropNameMap()); + } + return capPropName; + } + + /** + * This method implements the method that is declared at super. + * + * @param uncapPropName Uncap-prop-name. (NotNull) + * @return Cap-prop-name. (NotNull) + */ + public String getCapPropNameByUncapPropName(String uncapPropName) { + assertStringNotNullAndNotTrimmedEmpty("uncapPropName", uncapPropName); + final String dbName = getDbNameByMultiName(uncapPropName); + final String capPropName = (String)getDbNameCapPropNameMap().get(dbName); + if (capPropName == null) { + String msg = "The dbNameCapPropNameMap didn't contain the key of '" + dbName + "': "; + throw new IllegalStateException(msg + getDbNameCapPropNameMap()); + } + return capPropName; + } + + /** + * This method implements the method that is declared at super. + * + * @param dbName Db-name. (NotNull) + * @return Uncap-prop-name. (NotNull) + */ + public String getUncapPropNameByDbName(String dbName) { + assertStringNotNullAndNotTrimmedEmpty("dbName", dbName); + final String uncapPropName = (String)getDbNameUncapPropNameMap().get(dbName); + if (uncapPropName == null) { + String msg = "The dbNameUncapPropNameMap didn't contain the key of '" + dbName + "': "; + throw new IllegalStateException(msg + getDbNameUncapPropNameMap()); + } + return uncapPropName; + } + + /** + * This method implements the method that is declared at super. + * + * @param capPropName Cap-prop-name. (NotNull) + * @return Uncap-prop-name. (NotNull) + */ + public String getUncapPropNameByCapPropName(String capPropName) { + assertStringNotNullAndNotTrimmedEmpty("capPropName", capPropName); + final String dbName = getDbNameByMultiName(capPropName); + final String uncapPropName = (String)getDbNameUncapPropNameMap().get(dbName); + if (uncapPropName == null) { + String msg = "The dbNameUncapPropNameMap didn't contain the key of '" + capPropName + "': "; + throw new IllegalStateException(msg + getDbNameUncapPropNameMap()); + } + return uncapPropName; + } + + /** + * This method implements the method that is declared at super. + * + * @param multiName Multi-name. (NotNull) + * @return Db-name. (NotNull) + */ + public String getDbNameByMultiName(String multiName) { + assertStringNotNullAndNotTrimmedEmpty("multiName", multiName); + if (isExistDbName(multiName)) { + return multiName; + } + if (isExistCapPropName(multiName)) { + return getDbNameByCapPropName(multiName); + } + if (isExistUncapPropName(multiName)) { + return getDbNameByUncapPropName(multiName); + } + String msg = "The multi-name is invalid: multiName=" + multiName; + throw new IllegalStateException(msg); + } + + /** + * Get java-name by multi-name. + * + * @param multiName Multi-name. + * @return Cap-prop-name. + */ + public String getCapPropNameByMultiName(String multiName) { + assertStringNotNullAndNotTrimmedEmpty("multiName", multiName); + if (isExistDbName(multiName)) { + return getCapPropNameByDbName(multiName); + } + if (isExistCapPropName(multiName)) { + return multiName; + } + if (isExistUncapPropName(multiName)) { + return getCapPropNameByUncapPropName(multiName); + } + String msg = "The multi-name is invalid: multiName=" + multiName; + throw new IllegalStateException(msg); + } + + /** + * Get property-name by multi-name. + * + * @param multiName Multi-name. + * @return Uncap-prop-name. + */ + public String getUncapPropNameByMultiName(String multiName) { + assertStringNotNullAndNotTrimmedEmpty("multiName", multiName); + if (isExistDbName(multiName)) { + return getUncapPropNameByDbName(multiName); + } + if (isExistCapPropName(multiName)) { + return getUncapPropNameByCapPropName(multiName); + } + if (isExistUncapPropName(multiName)) { + return multiName; + } + String msg = "The multi-name is invalid: multiName=" + multiName; + throw new IllegalStateException(msg); + } + + // =================================================================================== + // JDBC Support + // ============ + public int insertEntity(java.sql.Connection conn, Entity entity) { + return insertEntity(conn, entity, ""); + } + + public int insertEntity(java.sql.Connection conn, Entity entity, String tablePrefix) { + checkDowncast(entity); + final String sql = getPreparedInsertClause(tablePrefix); + java.sql.PreparedStatement ps = null; + try { + ps = conn.prepareStatement(sql); + final java.util.List valueList = convertToColumnValueList(entity); + int settingIndex = 1; + for (final java.util.Iterator ite = valueList.iterator(); ite.hasNext(); ) { + Object value = ite.next(); + if (value == null) { + ps.setNull(settingIndex, java.sql.Types.VARCHAR); + } else { + ps.setObject(settingIndex, value); + } + ++settingIndex; + } + return ps.executeUpdate(); + } catch (java.sql.SQLException e) { + String msg = "The sql threw the exception: sql=" + sql; + throw new IllegalStateException(msg, e); + } finally { + if (ps != null) { + try { + ps.close(); + } catch (java.sql.SQLException ignored) { + } + } + } + } + + // =================================================================================== + // Map String + // ========== + public MapListString createMapListString() { + return MapStringUtil.createMapListString(); + } + + public MapStringBuilder createMapStringBuilder() { + return MapStringUtil.createMapStringBuilder(getColumnDbNameList()); + } + + // =================================================================================== + // Util Class + // ========== + /** + * This class is for Internal. Don't use this! + */ + protected static class MapStringUtil { + public static void acceptPrimaryKeyMapString(String primaryKeyMapString, Entity entity) { + if (primaryKeyMapString == null) { + String msg = "The argument[primaryKeyMapString] should not be null."; + throw new IllegalArgumentException(msg); + } + final String prefix = MAP_STRING_MAP_MARK + MAP_STRING_START_BRACE; + final String suffix = MAP_STRING_END_BRACE; + if (!primaryKeyMapString.trim().startsWith(prefix)) { + primaryKeyMapString = prefix + primaryKeyMapString; + } + if (!primaryKeyMapString.trim().endsWith(suffix)) { + primaryKeyMapString = primaryKeyMapString + suffix; + } + MapListString mapListString = createMapListString(); + entity.getDBMeta().acceptPrimaryKeyMap(entity, mapListString.generateMap(primaryKeyMapString)); + } + + public static void acceptColumnValueMapString(String columnValueMapString, Entity entity) { + if (columnValueMapString == null) { + String msg = "The argument[columnValueMapString] should not be null."; + throw new IllegalArgumentException(msg); + } + final String prefix = MAP_STRING_MAP_MARK + MAP_STRING_START_BRACE; + final String suffix = MAP_STRING_END_BRACE; + if (!columnValueMapString.trim().startsWith(prefix)) { + columnValueMapString = prefix + columnValueMapString; + } + if (!columnValueMapString.trim().endsWith(suffix)) { + columnValueMapString = columnValueMapString + suffix; + } + MapListString mapListString = createMapListString(); + entity.getDBMeta().acceptColumnValueMap(entity, mapListString.generateMap(columnValueMapString)); + } + + public static String extractPrimaryKeyMapString(Entity entity) { + final String startBrace = MAP_STRING_START_BRACE; + final String endBrace = MAP_STRING_END_BRACE; + final String delimiter = MAP_STRING_DELIMITER; + final String equal = MAP_STRING_EQUAL; + return entity.getDBMeta().extractPrimaryKeyMapString(entity, startBrace, endBrace, delimiter, equal); + } + + public static String extractColumnValueMapString(Entity entity) { + final String startBrace = MAP_STRING_START_BRACE; + final String endBrace = MAP_STRING_END_BRACE; + final String delimiter = MAP_STRING_DELIMITER; + final String equal = MAP_STRING_EQUAL; + return entity.getDBMeta().extractColumnValueMapString(entity, startBrace, endBrace, delimiter, equal); + } + + public static void checkTypeString(Object value, String propertyName, String typeName) { + if (value == null) { + throw new IllegalArgumentException("The value should not be null: " + propertyName); + } + if (!(value instanceof String)) { + String msg = "The value of " + propertyName + " should be " + typeName + " or String: "; + msg = msg + "valueType=" + value.getClass() + " value=" + value; + throw new IllegalArgumentException(msg); + } + } + + public static long parseDateStringAsMillis(Object value, String propertyName, String typeName) { + checkTypeString(value, propertyName, typeName); + try { + final String valueString = (String)value; + if (valueString.indexOf("-") >= 0 && valueString.indexOf("-") != valueString.lastIndexOf("-")) { + return java.sql.Timestamp.valueOf(valueString).getTime(); + } else { + return getParseDateFormat().parse((String)value).getTime(); + } + } catch (java.text.ParseException e) { + String msg = "The value of " + propertyName + " should be " + typeName + ". but: " + value; + throw new RuntimeException(msg + " threw the exception: value=[" + value + "]", e); + } catch (RuntimeException e) { + String msg = "The value of " + propertyName + " should be " + typeName + ". but: " + value; + throw new RuntimeException(msg + " threw the exception: value=[" + value + "]", e); + } + } + + public static String formatDate(java.util.Date value) { + return getFormatDateFormat().format(value); + } + + public static String formatTimestamp(java.sql.Timestamp value) { + return getFormatDateFormat().format(value); + } + + public static java.text.DateFormat getParseDateFormat() { + return java.text.DateFormat.getDateTimeInstance(); + } + + public static java.text.DateFormat getFormatDateFormat() { + return new java.text.SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS"); + } + + public static MapListString createMapListString() { + final MapListString mapListString = new MapListStringImpl(); + mapListString.setMapMark(MAP_STRING_MAP_MARK); + mapListString.setListMark(MAP_STRING_LIST_MARK); + mapListString.setStartBrace(MAP_STRING_START_BRACE); + mapListString.setEndBrace(MAP_STRING_END_BRACE); + mapListString.setEqual(MAP_STRING_EQUAL); + mapListString.setDelimiter(MAP_STRING_DELIMITER); + return mapListString; + } + + public static MapStringBuilder createMapStringBuilder(java.util.List columnNameList) { + MapStringBuilder mapStringBuilder = new MapStringBuilderImpl(); + mapStringBuilder.setMsMapMark(MAP_STRING_MAP_MARK); + mapStringBuilder.setMsStartBrace(MAP_STRING_START_BRACE); + mapStringBuilder.setMsEndBrace(MAP_STRING_END_BRACE); + mapStringBuilder.setMsEqual(MAP_STRING_EQUAL); + mapStringBuilder.setMsDelimiter(MAP_STRING_DELIMITER); + mapStringBuilder.setColumnNameList(columnNameList); + return mapStringBuilder; + } + } + + /** + * This class is for Internal. Don't use this! + */ + protected static class MapAssertUtil { + public static void assertPrimaryKeyMapNotNullAndNotEmpty(java.util.Map primaryKeyMap) { + if (primaryKeyMap == null) { + String msg = "The argument[primaryKeyMap] should not be null."; + throw new IllegalArgumentException(msg); + } + if (primaryKeyMap.isEmpty()) { + String msg = "The argument[primaryKeyMap] should not be empty."; + throw new IllegalArgumentException(msg); + } + } + public static void assertColumnExistingInPrimaryKeyMap(java.util.Map primaryKeyMap, String columnName) { + if (!primaryKeyMap.containsKey(columnName)) { + String msg = "The primaryKeyMap must have the value of " + columnName; + throw new IllegalStateException(msg + ": primaryKeyMap --> " + primaryKeyMap); + } + } + public static void assertColumnValueMapNotNullAndNotEmpty(java.util.Map columnValueMap) { + if (columnValueMap == null) { + String msg = "The argument[columnValueMap] should not be null."; + throw new IllegalArgumentException(msg); + } + if (columnValueMap.isEmpty()) { + String msg = "The argument[columnValueMap] should not be empty."; + throw new IllegalArgumentException(msg); + } + } + } + + + /** + * This class is for Internal. Don't use this! + */ + protected static class MapStringValueAnalyzer { + protected java.util.Map _valueMap; + protected java.util.Set _modifiedPropertyNames; + protected String _columnName; + protected String _uncapPropName; + protected String _propertyName; + + public MapStringValueAnalyzer(java.util.Map valueMap, java.util.Set modifiedPropertyNames) { + this._valueMap = valueMap; + this._modifiedPropertyNames = modifiedPropertyNames; + } + + public boolean init(String columnName, String uncapPropName, String propertyName) { + this._columnName = columnName; + this._uncapPropName = uncapPropName; + this._propertyName = propertyName; + return _valueMap.containsKey(_columnName); + } + + public COLUMN_TYPE analyzeString(Class javaType) { + final Object obj = _valueMap.get(_columnName); + if (obj == null) { + _modifiedPropertyNames.remove(_propertyName); + return null; + } + helpCheckingTypeString(obj, _uncapPropName, javaType.getName()); + return (COLUMN_TYPE)obj; + } + + public COLUMN_TYPE analyzeNumber(Class javaType) { + final Object obj = _valueMap.get(_columnName); + if (obj == null) { + _modifiedPropertyNames.remove(_propertyName); + return null; + } + if (javaType.isAssignableFrom(obj.getClass())) { + return (COLUMN_TYPE)obj; + } + return (COLUMN_TYPE)newInstanceByConstructor(javaType, String.class, obj.toString()); + } + + public COLUMN_TYPE analyzeDate(Class javaType) { + final Object obj = _valueMap.get(_columnName); + if (obj == null) { + _modifiedPropertyNames.remove(_propertyName); + return null; + } + if (javaType.isAssignableFrom(obj.getClass())) { + return (COLUMN_TYPE)obj; + } + return (COLUMN_TYPE)newInstanceByConstructor(javaType, long.class, helpParsingDateString(obj, _uncapPropName, javaType.getName())); + } + + public COLUMN_TYPE analyzeOther(Class javaType) { + final Object obj = _valueMap.get(_columnName); + if (obj == null) { + _modifiedPropertyNames.remove(_propertyName); + return null; + } + return (COLUMN_TYPE)obj; + } + + private void helpCheckingTypeString(Object value, String uncapPropName, String typeName) { + MapStringUtil.checkTypeString(value, uncapPropName, typeName); + } + + private long helpParsingDateString(Object value, String uncapPropName, String typeName) { + return MapStringUtil.parseDateStringAsMillis(value, uncapPropName, typeName); + } + + protected Object newInstanceByConstructor(Class targetType, Class argType, Object arg) { + java.lang.reflect.Constructor constructor; + try { + constructor = targetType.getConstructor(new Class[]{argType}); + } catch (SecurityException e) { + String msg = "targetType=" + targetType + " argType=" + argType + " arg=" + arg; + throw new RuntimeException(msg, e); + } catch (NoSuchMethodException e) { + String msg = "targetType=" + targetType + " argType=" + argType + " arg=" + arg; + throw new RuntimeException(msg, e); + } + try { + return constructor.newInstance(new Object[]{arg}); + } catch (IllegalArgumentException e) { + String msg = "targetType=" + targetType + " argType=" + argType + " arg=" + arg; + throw new RuntimeException(msg, e); + } catch (InstantiationException e) { + String msg = "targetType=" + targetType + " argType=" + argType + " arg=" + arg; + throw new RuntimeException(msg, e); + } catch (IllegalAccessException e) { + String msg = "targetType=" + targetType + " argType=" + argType + " arg=" + arg; + throw new RuntimeException(msg, e); + } catch (java.lang.reflect.InvocationTargetException e) { + String msg = "targetType=" + targetType + " argType=" + argType + " arg=" + arg; + throw new RuntimeException(msg, e); + } + } + } + + + // ===================================================================================== + // Helper + // ====== + abstract protected void checkDowncast(Entity entity); + + protected String helpGettingColumnStringValue(Object value) { + if (value instanceof java.sql.Timestamp) { + return (value != null ? helpFormatingTimestamp((java.sql.Timestamp)value) : ""); + } else if (value instanceof java.util.Date) { + return (value != null ? helpFormatingDate((java.util.Date)value) : ""); + } else { + return (value != null ? value.toString() : ""); + } + } + + protected String helpFormatingDate(java.util.Date date) { + return MapStringUtil.formatDate(date); + } + + protected String helpFormatingTimestamp(java.sql.Timestamp timestamp) { + return MapStringUtil.formatTimestamp(timestamp); + } + + // ---------------------------------------------------------------- + // Assert Object + // ------------- + /** + * Assert that the argument is not null. + * + * @param variableName Variable name. (NotNull) + * @param arg Argument. (NotNull) + */ + protected void assertObjectNotNull(String variableName, Object arg) { + if (variableName == null) { + String msg = "Argument[variableName] should not be null."; + throw new IllegalArgumentException(msg); + } + if (arg == null) { + String msg = "Argument[" + variableName + "] should not be null."; + throw new IllegalArgumentException(msg); + } + } + + // ---------------------------------------------------------------- + // Assert String + // ------------- + /** + * Assert that the string is not null and not trimmed empty. + * + * @param variableName Variable name. (NotNull) + * @param value Value. (NotNull) + */ + protected void assertStringNotNullAndNotTrimmedEmpty(String variableName, String value) { + if (variableName == null) { + String msg = "Variable[variableName] should not be null."; + throw new IllegalArgumentException(msg); + } + if (value == null) { + String msg = "Variable[" + variableName + "] should not be null."; + throw new IllegalArgumentException(msg); + } + if (value.trim().length() == 0) { + String msg = "Variable[" + variableName + "] should not be empty: [" + value + "]"; + throw new IllegalArgumentException(msg); + } + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/dbmeta/DBMeta.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/dbmeta/DBMeta.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/dbmeta/DBMeta.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,472 @@ +package jp.sf.pal.pompei.allcommon.dbmeta; + + +import jp.sf.pal.pompei.allcommon.Entity; +import jp.sf.pal.pompei.allcommon.helper.MapListString; +import jp.sf.pal.pompei.allcommon.helper.MapStringBuilder; + +/** + * The interface of dbmeta. + * + * @author DBFlute(AutoGenerator) + */ +public interface DBMeta { + + // =================================================================================== + // Definition + // ========== + /** Map-string map-mark. */ + public static final String MAP_STRING_MAP_MARK = "map:"; + + /** Map-string list-mark. */ + public static final String MAP_STRING_LIST_MARK = "list:"; + + /** Map-string start-brace. */ + public static final String MAP_STRING_START_BRACE = "@{"; + + /** Map-string end-brace. */ + public static final String MAP_STRING_END_BRACE = "@}"; + + /** Map-string delimiter. */ + public static final String MAP_STRING_DELIMITER = "@;"; + + /** Map-string equal. */ + public static final String MAP_STRING_EQUAL = "@="; + + // =================================================================================== + // Table Name + // ========== + /** + * Get table db-name. + * + * @return Table db-name. (NotNull) + */ + public String getTableDbName(); + + /** + * Get table cap-prop-name. + * + * @return Table cap-prop-name. (NotNull) + */ + public String getTableCapPropName(); + + /** + * Get table uncap-prop-name. + * + * @return Table uncap-prop-name. (NotNull) + */ + public String getTableUncapPropName(); + + // =================================================================================== + // Column Name + // =========== + public java.util.List getColumnDbNameList(); + + public java.util.List getColumnCapPropNameList(); + + public java.util.List getColumnUncapPropNameList(); + + /** + * Get column-db-name comma-string. + * + * @return Column-db-name comma-string. (NotNull) + */ + public String getColumnDbNameCommaString(); + + // =================================================================================== + // Name Handling + // ============= + /** + * Is existing db-name? + * + * @param dbName Db-name. (NotNull) + * @return Determination. + */ + public boolean isExistDbName(String dbName); + + /** + * Is existing cap-prop-name? + * + * @param capPropName Cap-prop-name. (NotNull) + * @return Determination. + */ + public boolean isExistCapPropName(String capPropName); + + /** + * Is existing uncap-prop-name? + * + * @param uncapPropName Uncap-prop-name. (NotNull) + * @return Determination. + */ + public boolean isExistUncapPropName(String uncapPropName); + + /** + * Is existing multi-name? + * + * @param multiName Multi-name. (NotNull) + * @return Determination. + */ + public boolean isExistMultiName(String multiName); + + /** + * Get db-name by property-name. + * + * @param capPropName Cap-prop-name. + * @return Db-name. + */ + public String getDbNameByCapPropName(String capPropName); + + /** + * Get db-name by property-name. + * + * @param propertyName Uncap-prop-name. + * @return {db-name : cap-prop-name} map. + */ + public String getDbNameByUncapPropName(String propertyName); + + /** + * Get cap-prop-name by db-name. + * + * @param dbName Db-name. + * @return Cap-prop-name. + */ + public String getCapPropNameByDbName(String dbName); + + /** + * Get cap-prop-name by property-name. + * + * @param propertyName Uncap-prop-name. + * @return Cap-prop-name. + */ + public String getCapPropNameByUncapPropName(String propertyName); + + /** + * Get property-name by db-name. + * + * @param dbName Db-name. + * @return Uncap-prop-name. + */ + public String getUncapPropNameByDbName(String dbName); + + /** + * Get property-name by cap-prop-name. + * + * @param capPropName Cap-prop-name. + * @return Uncap-prop-name. + */ + public String getUncapPropNameByCapPropName(String capPropName); + + /** + * Get db-name by multi-name. + * + * @param multiName Multi-name. + * @return Db-name. + */ + public String getDbNameByMultiName(String multiName); + + /** + * Get cap-prop-name by multi-name. + * + * @param multiName Multi-name. + * @return Cap-prop-name. + */ + public String getCapPropNameByMultiName(String multiName); + + /** + * Get property-name by multi-name. + * + * @param multiName Multi-name. + * @return Uncap-prop-name. + */ + public String getUncapPropNameByMultiName(String multiName); + + // =================================================================================== + // Name Map + // ======== + /** + * This method implements the method that is declared at super. + * + * @return {db-name : cap-prop-name} map. + */ + public java.util.Map getDbNameCapPropNameMap(); + + /** + * This method implements the method that is declared at super. + * + * @return {db-name : uncap-prop-name} map. + */ + public java.util.Map getDbNameUncapPropNameMap(); + + /** + * This method implements the method that is declared at super. + * + * @return {cap-prop-name : db-name} map. + */ + public java.util.Map getCapPropNameDbNameMap(); + + /** + * This method implements the method that is declared at super. + * + * @return {cap-prop-name : uncap-prop-name} map. + */ + public java.util.Map getCapPropNameUncapPropNameMap(); + + /** + * This method implements the method that is declared at super. + * + * @return {uncap-prop-name : db-name} map. + */ + public java.util.Map getUncapPropNameDbNameMap(); + + /** + * This method implements the method that is declared at super. + * + * @return {uncap-prop-name : cap-prop-name} map. + */ + public java.util.Map getUncapPropNameCapPropNameMap(); + + // =================================================================================== + // Type Name + // ========= + /** + * Get the type-name of entity. + * + * @return The type-name of entity. (NotNull) + */ + public String getEntityTypeName(); + + /** + * Get the type-name of condition-bean. + * + * @return The type-name of condition-bean. (Nullable: If the condition-bean does not exist) + */ + public String getConditionBeanTypeName(); + + /** + * Get the type-name of dao. + * + * @return The type-name of dao. (Nullable: If the dao does not exist) + */ + public String getDaoTypeName(); + + /** + * Get the type-name of behavior. + * + * @return The type-name of behavior. (Nullable: If the behavior does not exist) + */ + public String getBehaviorTypeName(); + + // =================================================================================== + // Type + // ==== + /** + * Get the type of entity. + * + * @return The type of entity. (NotNull) + */ + public Class getEntityType(); + + // =================================================================================== + // Instance + // ======== + /** + * New the instance of entity. + * + * @return The instance of entity. (NotNull) + */ + public Entity newEntity(); + + // =================================================================================== + // Foreign DBMeta + // ============== + /** + * Get foreign dbmeta. + * + * @param foreignPropertyName Foreign-property-name(Both OK - InitCap or not). (NotNull) + * @return Foreign DBMeta. (NotNull) + */ + public DBMeta getForeignDBMeta(String foreignPropertyName); + + // =================================================================================== + // Determination + // ============= + /** + * Has two or more primary-keys? + * + * @return Determination. + */ + public boolean hasTwoOrMorePrimaryKeys(); + + /** + * Has common column? + * + * @return Determination. + */ + public boolean hasCommonColumn(); + + // =================================================================================== + // Entity Handling + // =============== + // ----------------------------------------------------- + // Accept + // ------ + /** + * Accept primary-key map. + * + * The column that column-value map-string doesn't have the value of is reflected as null. + * The column that column-value map-string doesn't have the key of is NOT updated nothing. + * + * @param entity Target entity. (NotNull) + * @param primaryKeyMap Primary-key map. (NotNull and NotEmpty) + */ + public void acceptPrimaryKeyMap(Entity entity, java.util.Map primaryKeyMap); + + /** + * Accept primary-key map-string. + * + * The column that column-value map-string doesn't have the value of is reflected as null. + * The column that column-value map-string doesn't have the key of is NOT updated nothing. + * + * @param entity Target entity. (NotNull) + * @param primaryKeyMapString Primary-key map-string. (NotNull) + */ + public void acceptPrimaryKeyMapString(Entity entity, String primaryKeyMapString); + + /** + * Accept column-value map. + * + * The column that column-value map-string doesn't have the value of is reflected as null. + * The column that column-value map-string doesn't have the key of is NOT updated nothing. + * + * @param entity Target entity. (NotNull) + * @param columnValueMap Column-value map. (NotNull and NotEmpty) + */ + public void acceptColumnValueMap(Entity entity, java.util.Map columnValueMap); + + /** + * Accept column-value map-string. + * + * The column that column-value map-string doesn't have the value of is reflected as null. + * The column that column-value map-string doesn't have the key of is NOT updated nothing. + * + * @param entity Target entity. (NotNull) + * @param columnValueMapString Column-value map-string. (NotNull) + */ + public void acceptColumnValueMapString(Entity entity, String columnValueMapString); + + // ----------------------------------------------------- + // Extract + // ------- + /** + * Extract primary-key map-string. Delimiter is at-mark and semicolon. + *

+ *

+     * ex) Uses that this method have.
+     *   final String primaryKeyMapString = LdBookDbm.extractPrimaryKeyMapString(entity);
+     *   final LdBook entity = dao.selectEntity(new LdBookCB().acceptPrimaryKeyMapString(primaryKeyMapString));
+     *   ... // as primary key for condition.
+     * 
+ * + * @param entity Target entity. (NotNull) + * @return Primary-key map-string. (NotNull) + */ + public String extractPrimaryKeyMapString(Entity entity); + + /** + * Extract primary-key map-string. + * + * @param entity Target entity. (NotNull) + * @param startBrace Start-brace. (NotNull) + * @param endBrace End-brace. (NotNull) + * @param delimiter Delimiter. (NotNull) + * @param equal Equal. (NotNull) + * @return Primary-key map-string. (NotNull) + */ + public String extractPrimaryKeyMapString(Entity entity, String startBrace, String endBrace, String delimiter, String equal); + + /** + * Extract column-value map-string. Delimiter is at-mark and semicolon. + * + * @param entity Target entity. (NotNull) + * @return Column-value map-string. (NotNull) + */ + public String extractColumnValueMapString(Entity entity); + + /** + * Extract column-value map-string. + * + * @param entity Target entity. (NotNull) + * @param startBrace Start-brace. (NotNull) + * @param endBrace End-brace. (NotNull) + * @param delimiter Delimiter. (NotNull) + * @param equal Equal. (NotNull) + * @return Column-value map-string. (NotNull) + */ + public String extractColumnValueMapString(Entity entity, String startBrace, String endBrace, String delimiter, String equal); + + /** + * Extract common-column-value map-string. + * + * @param entity Target entity. (NotNull) + * @return Common-column-value map-string. (NotNull) + */ + public String extractCommonColumnValueMapString(Entity entity); + + /** + * Extract common-column-value map-string. + * + * @param entity Target entity. (NotNull) + * @return Common-column-value map-string. (NotNull) + */ + public String extractCommonColumnValueMapString(Entity entity, String startBrace, String endBrace, String delimiter, String equal); + + // ----------------------------------------------------- + // Convert + // ------- + /** + * Convert entity to column value as list. + * + * @param entity Target entity. (NotNull) + * @return The list of column value. (NotNull) + */ + public java.util.List convertToColumnValueList(Entity entity); + + /** + * Convert entity to column value as map. + * + * @param entity Target entity. (NotNull) + * @return The map of column value. (NotNull) + */ + public java.util.Map convertToColumnValueMap(Entity entity); + + /** + * Convert entity to column string-value as list. + * + * @param entity Target entity. (NotNull) + * @return The list of column string-value. (NotNull) + */ + public java.util.List convertToColumnStringValueList(Entity entity); + + /** + * Convert entity to column string-value as map. + * + * @param entity Target entity. (NotNull) + * @return The map of column string-value. (NotNull) + */ + public java.util.Map convertToColumnStringValueMap(Entity entity); + + // =================================================================================== + // JDBC Support + // ============ + public int insertEntity(java.sql.Connection conn, Entity entity); + public int insertEntity(java.sql.Connection conn, Entity entity, String tablePrefix); + public String getPreparedInsertClause(); + public String getPreparedInsertClause(String tablePrefix); + + // =================================================================================== + // Map String + // ========== + public MapListString createMapListString(); + + public MapStringBuilder createMapStringBuilder(); +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/dbmeta/DBMetaInstanceHandler.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/dbmeta/DBMetaInstanceHandler.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/dbmeta/DBMetaInstanceHandler.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,314 @@ +package jp.sf.pal.pompei.allcommon.dbmeta; + + +import java.util.Map; +import java.util.LinkedHashMap; + +/** + * DBMeta instance handler. + * + * @author DBFlute(AutoGenerator) + */ +public class DBMetaInstanceHandler { + + /** Table db-name instance map. */ + protected static final Map _tableDbNameInstanceMap; + static { + Map tmpMap = new LinkedHashMap(); + + tmpMap.put("ADDRESS_BOOK", getDBMeta("jp.sf.pal.pompei.bsentity.dbmeta.AddressBookDbm")); + tmpMap.put("ADDRESS_FORMAT", getDBMeta("jp.sf.pal.pompei.bsentity.dbmeta.AddressFormatDbm")); + tmpMap.put("BANNERS", getDBMeta("jp.sf.pal.pompei.bsentity.dbmeta.BannersDbm")); + tmpMap.put("BANNERS_HISTORY", getDBMeta("jp.sf.pal.pompei.bsentity.dbmeta.BannersHistoryDbm")); + tmpMap.put("CATEGORIES", getDBMeta("jp.sf.pal.pompei.bsentity.dbmeta.CategoriesDbm")); + tmpMap.put("CATEGORIES_DESCRIPTION", getDBMeta("jp.sf.pal.pompei.bsentity.dbmeta.CategoriesDescriptionDbm")); + tmpMap.put("CONFIGURATION", getDBMeta("jp.sf.pal.pompei.bsentity.dbmeta.ConfigurationDbm")); + tmpMap.put("CONFIGURATION_GROUP", getDBMeta("jp.sf.pal.pompei.bsentity.dbmeta.ConfigurationGroupDbm")); + tmpMap.put("COUNTER", getDBMeta("jp.sf.pal.pompei.bsentity.dbmeta.CounterDbm")); + tmpMap.put("COUNTER_HISTORY", getDBMeta("jp.sf.pal.pompei.bsentity.dbmeta.CounterHistoryDbm")); + tmpMap.put("COUNTRIES", getDBMeta("jp.sf.pal.pompei.bsentity.dbmeta.CountriesDbm")); + tmpMap.put("CURRENCIES", getDBMeta("jp.sf.pal.pompei.bsentity.dbmeta.CurrenciesDbm")); + tmpMap.put("CUSTOMERS", getDBMeta("jp.sf.pal.pompei.bsentity.dbmeta.CustomersDbm")); + tmpMap.put("CUSTOMERS_BASKET", getDBMeta("jp.sf.pal.pompei.bsentity.dbmeta.CustomersBasketDbm")); + tmpMap.put("CUSTOMERS_BASKET_ATTRIBUTES", getDBMeta("jp.sf.pal.pompei.bsentity.dbmeta.CustomersBasketAttributesDbm")); + tmpMap.put("CUSTOMERS_INFO", getDBMeta("jp.sf.pal.pompei.bsentity.dbmeta.CustomersInfoDbm")); + tmpMap.put("GEO_ZONES", getDBMeta("jp.sf.pal.pompei.bsentity.dbmeta.GeoZonesDbm")); + tmpMap.put("LANGUAGES", getDBMeta("jp.sf.pal.pompei.bsentity.dbmeta.LanguagesDbm")); + tmpMap.put("MANUFACTURERS", getDBMeta("jp.sf.pal.pompei.bsentity.dbmeta.ManufacturersDbm")); + tmpMap.put("MANUFACTURERS_INFO", getDBMeta("jp.sf.pal.pompei.bsentity.dbmeta.ManufacturersInfoDbm")); + tmpMap.put("NEWSLETTERS", getDBMeta("jp.sf.pal.pompei.bsentity.dbmeta.NewslettersDbm")); + tmpMap.put("ORDERS", getDBMeta("jp.sf.pal.pompei.bsentity.dbmeta.OrdersDbm")); + tmpMap.put("ORDERS_PRODUCTS", getDBMeta("jp.sf.pal.pompei.bsentity.dbmeta.OrdersProductsDbm")); + tmpMap.put("ORDERS_PRODUCTS_ATTRIBUTES", getDBMeta("jp.sf.pal.pompei.bsentity.dbmeta.OrdersProductsAttributesDbm")); + tmpMap.put("ORDERS_PRODUCTS_DOWNLOAD", getDBMeta("jp.sf.pal.pompei.bsentity.dbmeta.OrdersProductsDownloadDbm")); + tmpMap.put("ORDERS_STATUS", getDBMeta("jp.sf.pal.pompei.bsentity.dbmeta.OrdersStatusDbm")); + tmpMap.put("ORDERS_STATUS_HISTORY", getDBMeta("jp.sf.pal.pompei.bsentity.dbmeta.OrdersStatusHistoryDbm")); + tmpMap.put("ORDERS_TOTAL", getDBMeta("jp.sf.pal.pompei.bsentity.dbmeta.OrdersTotalDbm")); + tmpMap.put("PRODUCTS", getDBMeta("jp.sf.pal.pompei.bsentity.dbmeta.ProductsDbm")); + tmpMap.put("PRODUCTS_ATTRIBUTES", getDBMeta("jp.sf.pal.pompei.bsentity.dbmeta.ProductsAttributesDbm")); + tmpMap.put("PRODUCTS_ATTRIBUTES_DOWNLOAD", getDBMeta("jp.sf.pal.pompei.bsentity.dbmeta.ProductsAttributesDownloadDbm")); + tmpMap.put("PRODUCTS_DESCRIPTION", getDBMeta("jp.sf.pal.pompei.bsentity.dbmeta.ProductsDescriptionDbm")); + tmpMap.put("PRODUCTS_NOTIFICATIONS", getDBMeta("jp.sf.pal.pompei.bsentity.dbmeta.ProductsNotificationsDbm")); + tmpMap.put("PRODUCTS_OPTIONS", getDBMeta("jp.sf.pal.pompei.bsentity.dbmeta.ProductsOptionsDbm")); + tmpMap.put("PRODUCTS_OPTIONS_VALUES", getDBMeta("jp.sf.pal.pompei.bsentity.dbmeta.ProductsOptionsValuesDbm")); + tmpMap.put("PRODUCTS_OPTIONS_VALUES_TO_PRODUCTS_OPTIONS", getDBMeta("jp.sf.pal.pompei.bsentity.dbmeta.ProductsOptionsValuesToProductsOptionsDbm")); + tmpMap.put("PRODUCTS_TO_CATEGORIES", getDBMeta("jp.sf.pal.pompei.bsentity.dbmeta.ProductsToCategoriesDbm")); + tmpMap.put("REVIEWS", getDBMeta("jp.sf.pal.pompei.bsentity.dbmeta.ReviewsDbm")); + tmpMap.put("REVIEWS_DESCRIPTION", getDBMeta("jp.sf.pal.pompei.bsentity.dbmeta.ReviewsDescriptionDbm")); + tmpMap.put("SESSIONS", getDBMeta("jp.sf.pal.pompei.bsentity.dbmeta.SessionsDbm")); + tmpMap.put("SPECIALS", getDBMeta("jp.sf.pal.pompei.bsentity.dbmeta.SpecialsDbm")); + tmpMap.put("TAX_CLASS", getDBMeta("jp.sf.pal.pompei.bsentity.dbmeta.TaxClassDbm")); + tmpMap.put("TAX_RATES", getDBMeta("jp.sf.pal.pompei.bsentity.dbmeta.TaxRatesDbm")); + tmpMap.put("WHOS_ONLINE", getDBMeta("jp.sf.pal.pompei.bsentity.dbmeta.WhosOnlineDbm")); + tmpMap.put("ZONES", getDBMeta("jp.sf.pal.pompei.bsentity.dbmeta.ZonesDbm")); + tmpMap.put("ZONES_TO_GEO_ZONES", getDBMeta("jp.sf.pal.pompei.bsentity.dbmeta.ZonesToGeoZonesDbm")); + + _tableDbNameInstanceMap = java.util.Collections.unmodifiableMap(tmpMap); + } + + /** Table cap-prop-name instance map. */ + protected static final Map _tableCapPropNameInstanceMap; + static { + Map tmpMap = new LinkedHashMap(); + + tmpMap.put("AddressBook", getDBMeta("jp.sf.pal.pompei.bsentity.dbmeta.AddressBookDbm")); + tmpMap.put("AddressFormat", getDBMeta("jp.sf.pal.pompei.bsentity.dbmeta.AddressFormatDbm")); + tmpMap.put("Banners", getDBMeta("jp.sf.pal.pompei.bsentity.dbmeta.BannersDbm")); + tmpMap.put("BannersHistory", getDBMeta("jp.sf.pal.pompei.bsentity.dbmeta.BannersHistoryDbm")); + tmpMap.put("Categories", getDBMeta("jp.sf.pal.pompei.bsentity.dbmeta.CategoriesDbm")); + tmpMap.put("CategoriesDescription", getDBMeta("jp.sf.pal.pompei.bsentity.dbmeta.CategoriesDescriptionDbm")); + tmpMap.put("Configuration", getDBMeta("jp.sf.pal.pompei.bsentity.dbmeta.ConfigurationDbm")); + tmpMap.put("ConfigurationGroup", getDBMeta("jp.sf.pal.pompei.bsentity.dbmeta.ConfigurationGroupDbm")); + tmpMap.put("Counter", getDBMeta("jp.sf.pal.pompei.bsentity.dbmeta.CounterDbm")); + tmpMap.put("CounterHistory", getDBMeta("jp.sf.pal.pompei.bsentity.dbmeta.CounterHistoryDbm")); + tmpMap.put("Countries", getDBMeta("jp.sf.pal.pompei.bsentity.dbmeta.CountriesDbm")); + tmpMap.put("Currencies", getDBMeta("jp.sf.pal.pompei.bsentity.dbmeta.CurrenciesDbm")); + tmpMap.put("Customers", getDBMeta("jp.sf.pal.pompei.bsentity.dbmeta.CustomersDbm")); + tmpMap.put("CustomersBasket", getDBMeta("jp.sf.pal.pompei.bsentity.dbmeta.CustomersBasketDbm")); + tmpMap.put("CustomersBasketAttributes", getDBMeta("jp.sf.pal.pompei.bsentity.dbmeta.CustomersBasketAttributesDbm")); + tmpMap.put("CustomersInfo", getDBMeta("jp.sf.pal.pompei.bsentity.dbmeta.CustomersInfoDbm")); + tmpMap.put("GeoZones", getDBMeta("jp.sf.pal.pompei.bsentity.dbmeta.GeoZonesDbm")); + tmpMap.put("Languages", getDBMeta("jp.sf.pal.pompei.bsentity.dbmeta.LanguagesDbm")); + tmpMap.put("Manufacturers", getDBMeta("jp.sf.pal.pompei.bsentity.dbmeta.ManufacturersDbm")); + tmpMap.put("ManufacturersInfo", getDBMeta("jp.sf.pal.pompei.bsentity.dbmeta.ManufacturersInfoDbm")); + tmpMap.put("Newsletters", getDBMeta("jp.sf.pal.pompei.bsentity.dbmeta.NewslettersDbm")); + tmpMap.put("Orders", getDBMeta("jp.sf.pal.pompei.bsentity.dbmeta.OrdersDbm")); + tmpMap.put("OrdersProducts", getDBMeta("jp.sf.pal.pompei.bsentity.dbmeta.OrdersProductsDbm")); + tmpMap.put("OrdersProductsAttributes", getDBMeta("jp.sf.pal.pompei.bsentity.dbmeta.OrdersProductsAttributesDbm")); + tmpMap.put("OrdersProductsDownload", getDBMeta("jp.sf.pal.pompei.bsentity.dbmeta.OrdersProductsDownloadDbm")); + tmpMap.put("OrdersStatus", getDBMeta("jp.sf.pal.pompei.bsentity.dbmeta.OrdersStatusDbm")); + tmpMap.put("OrdersStatusHistory", getDBMeta("jp.sf.pal.pompei.bsentity.dbmeta.OrdersStatusHistoryDbm")); + tmpMap.put("OrdersTotal", getDBMeta("jp.sf.pal.pompei.bsentity.dbmeta.OrdersTotalDbm")); + tmpMap.put("Products", getDBMeta("jp.sf.pal.pompei.bsentity.dbmeta.ProductsDbm")); + tmpMap.put("ProductsAttributes", getDBMeta("jp.sf.pal.pompei.bsentity.dbmeta.ProductsAttributesDbm")); + tmpMap.put("ProductsAttributesDownload", getDBMeta("jp.sf.pal.pompei.bsentity.dbmeta.ProductsAttributesDownloadDbm")); + tmpMap.put("ProductsDescription", getDBMeta("jp.sf.pal.pompei.bsentity.dbmeta.ProductsDescriptionDbm")); + tmpMap.put("ProductsNotifications", getDBMeta("jp.sf.pal.pompei.bsentity.dbmeta.ProductsNotificationsDbm")); + tmpMap.put("ProductsOptions", getDBMeta("jp.sf.pal.pompei.bsentity.dbmeta.ProductsOptionsDbm")); + tmpMap.put("ProductsOptionsValues", getDBMeta("jp.sf.pal.pompei.bsentity.dbmeta.ProductsOptionsValuesDbm")); + tmpMap.put("ProductsOptionsValuesToProductsOptions", getDBMeta("jp.sf.pal.pompei.bsentity.dbmeta.ProductsOptionsValuesToProductsOptionsDbm")); + tmpMap.put("ProductsToCategories", getDBMeta("jp.sf.pal.pompei.bsentity.dbmeta.ProductsToCategoriesDbm")); + tmpMap.put("Reviews", getDBMeta("jp.sf.pal.pompei.bsentity.dbmeta.ReviewsDbm")); + tmpMap.put("ReviewsDescription", getDBMeta("jp.sf.pal.pompei.bsentity.dbmeta.ReviewsDescriptionDbm")); + tmpMap.put("Sessions", getDBMeta("jp.sf.pal.pompei.bsentity.dbmeta.SessionsDbm")); + tmpMap.put("Specials", getDBMeta("jp.sf.pal.pompei.bsentity.dbmeta.SpecialsDbm")); + tmpMap.put("TaxClass", getDBMeta("jp.sf.pal.pompei.bsentity.dbmeta.TaxClassDbm")); + tmpMap.put("TaxRates", getDBMeta("jp.sf.pal.pompei.bsentity.dbmeta.TaxRatesDbm")); + tmpMap.put("WhosOnline", getDBMeta("jp.sf.pal.pompei.bsentity.dbmeta.WhosOnlineDbm")); + tmpMap.put("Zones", getDBMeta("jp.sf.pal.pompei.bsentity.dbmeta.ZonesDbm")); + tmpMap.put("ZonesToGeoZones", getDBMeta("jp.sf.pal.pompei.bsentity.dbmeta.ZonesToGeoZonesDbm")); + + _tableCapPropNameInstanceMap = java.util.Collections.unmodifiableMap(tmpMap); + } + + /** Table uncap-prop-name instance map. */ + protected static final Map _tableUncapPropNameInstanceMap; + static { + Map tmpMap = new LinkedHashMap(); + + tmpMap.put("addressBook", getDBMeta("jp.sf.pal.pompei.bsentity.dbmeta.AddressBookDbm")); + tmpMap.put("addressFormat", getDBMeta("jp.sf.pal.pompei.bsentity.dbmeta.AddressFormatDbm")); + tmpMap.put("banners", getDBMeta("jp.sf.pal.pompei.bsentity.dbmeta.BannersDbm")); + tmpMap.put("bannersHistory", getDBMeta("jp.sf.pal.pompei.bsentity.dbmeta.BannersHistoryDbm")); + tmpMap.put("categories", getDBMeta("jp.sf.pal.pompei.bsentity.dbmeta.CategoriesDbm")); + tmpMap.put("categoriesDescription", getDBMeta("jp.sf.pal.pompei.bsentity.dbmeta.CategoriesDescriptionDbm")); + tmpMap.put("configuration", getDBMeta("jp.sf.pal.pompei.bsentity.dbmeta.ConfigurationDbm")); + tmpMap.put("configurationGroup", getDBMeta("jp.sf.pal.pompei.bsentity.dbmeta.ConfigurationGroupDbm")); + tmpMap.put("counter", getDBMeta("jp.sf.pal.pompei.bsentity.dbmeta.CounterDbm")); + tmpMap.put("counterHistory", getDBMeta("jp.sf.pal.pompei.bsentity.dbmeta.CounterHistoryDbm")); + tmpMap.put("countries", getDBMeta("jp.sf.pal.pompei.bsentity.dbmeta.CountriesDbm")); + tmpMap.put("currencies", getDBMeta("jp.sf.pal.pompei.bsentity.dbmeta.CurrenciesDbm")); + tmpMap.put("customers", getDBMeta("jp.sf.pal.pompei.bsentity.dbmeta.CustomersDbm")); + tmpMap.put("customersBasket", getDBMeta("jp.sf.pal.pompei.bsentity.dbmeta.CustomersBasketDbm")); + tmpMap.put("customersBasketAttributes", getDBMeta("jp.sf.pal.pompei.bsentity.dbmeta.CustomersBasketAttributesDbm")); + tmpMap.put("customersInfo", getDBMeta("jp.sf.pal.pompei.bsentity.dbmeta.CustomersInfoDbm")); + tmpMap.put("geoZones", getDBMeta("jp.sf.pal.pompei.bsentity.dbmeta.GeoZonesDbm")); + tmpMap.put("languages", getDBMeta("jp.sf.pal.pompei.bsentity.dbmeta.LanguagesDbm")); + tmpMap.put("manufacturers", getDBMeta("jp.sf.pal.pompei.bsentity.dbmeta.ManufacturersDbm")); + tmpMap.put("manufacturersInfo", getDBMeta("jp.sf.pal.pompei.bsentity.dbmeta.ManufacturersInfoDbm")); + tmpMap.put("newsletters", getDBMeta("jp.sf.pal.pompei.bsentity.dbmeta.NewslettersDbm")); + tmpMap.put("orders", getDBMeta("jp.sf.pal.pompei.bsentity.dbmeta.OrdersDbm")); + tmpMap.put("ordersProducts", getDBMeta("jp.sf.pal.pompei.bsentity.dbmeta.OrdersProductsDbm")); + tmpMap.put("ordersProductsAttributes", getDBMeta("jp.sf.pal.pompei.bsentity.dbmeta.OrdersProductsAttributesDbm")); + tmpMap.put("ordersProductsDownload", getDBMeta("jp.sf.pal.pompei.bsentity.dbmeta.OrdersProductsDownloadDbm")); + tmpMap.put("ordersStatus", getDBMeta("jp.sf.pal.pompei.bsentity.dbmeta.OrdersStatusDbm")); + tmpMap.put("ordersStatusHistory", getDBMeta("jp.sf.pal.pompei.bsentity.dbmeta.OrdersStatusHistoryDbm")); + tmpMap.put("ordersTotal", getDBMeta("jp.sf.pal.pompei.bsentity.dbmeta.OrdersTotalDbm")); + tmpMap.put("products", getDBMeta("jp.sf.pal.pompei.bsentity.dbmeta.ProductsDbm")); + tmpMap.put("productsAttributes", getDBMeta("jp.sf.pal.pompei.bsentity.dbmeta.ProductsAttributesDbm")); + tmpMap.put("productsAttributesDownload", getDBMeta("jp.sf.pal.pompei.bsentity.dbmeta.ProductsAttributesDownloadDbm")); + tmpMap.put("productsDescription", getDBMeta("jp.sf.pal.pompei.bsentity.dbmeta.ProductsDescriptionDbm")); + tmpMap.put("productsNotifications", getDBMeta("jp.sf.pal.pompei.bsentity.dbmeta.ProductsNotificationsDbm")); + tmpMap.put("productsOptions", getDBMeta("jp.sf.pal.pompei.bsentity.dbmeta.ProductsOptionsDbm")); + tmpMap.put("productsOptionsValues", getDBMeta("jp.sf.pal.pompei.bsentity.dbmeta.ProductsOptionsValuesDbm")); + tmpMap.put("productsOptionsValuesToProductsOptions", getDBMeta("jp.sf.pal.pompei.bsentity.dbmeta.ProductsOptionsValuesToProductsOptionsDbm")); + tmpMap.put("productsToCategories", getDBMeta("jp.sf.pal.pompei.bsentity.dbmeta.ProductsToCategoriesDbm")); + tmpMap.put("reviews", getDBMeta("jp.sf.pal.pompei.bsentity.dbmeta.ReviewsDbm")); + tmpMap.put("reviewsDescription", getDBMeta("jp.sf.pal.pompei.bsentity.dbmeta.ReviewsDescriptionDbm")); + tmpMap.put("sessions", getDBMeta("jp.sf.pal.pompei.bsentity.dbmeta.SessionsDbm")); + tmpMap.put("specials", getDBMeta("jp.sf.pal.pompei.bsentity.dbmeta.SpecialsDbm")); + tmpMap.put("taxClass", getDBMeta("jp.sf.pal.pompei.bsentity.dbmeta.TaxClassDbm")); + tmpMap.put("taxRates", getDBMeta("jp.sf.pal.pompei.bsentity.dbmeta.TaxRatesDbm")); + tmpMap.put("whosOnline", getDBMeta("jp.sf.pal.pompei.bsentity.dbmeta.WhosOnlineDbm")); + tmpMap.put("zones", getDBMeta("jp.sf.pal.pompei.bsentity.dbmeta.ZonesDbm")); + tmpMap.put("zonesToGeoZones", getDBMeta("jp.sf.pal.pompei.bsentity.dbmeta.ZonesToGeoZonesDbm")); + + _tableUncapPropNameInstanceMap = java.util.Collections.unmodifiableMap(tmpMap); + } + + protected static DBMeta getDBMeta(String className) { + try { + final Class clazz = Class.forName(className); + final java.lang.reflect.Method methoz = clazz.getMethod("getInstance", (Class[])null); + final Object result = methoz.invoke(null, (Object[])null); + return (DBMeta)result; + } catch (Exception e) { + throw new RuntimeException(e); + } + } + + /** + * Get instance by table db-name. + * + * @param tableDbName Table db-name. (NotNull) + * @return Instance. (NotNull) + */ + public static DBMeta getInstanceByTableDbName(String tableDbName) { + assertStringNotNullAndNotTrimmedEmpty("tableDbName", tableDbName); + final DBMeta instance = (DBMeta)_tableDbNameInstanceMap.get(tableDbName); + if (instance == null) { + String msg = "The instance map returned null by the key: key=" + tableDbName + " instanceMap=" + _tableDbNameInstanceMap; + throw new IllegalStateException(msg); + } + return instance; + } + + /** + * Get instance by table cap-prop-name. + * + * @param tableCapPropName Table cap-prop-name. (NotNull) + * @return Instance. (NotNull) + */ + public static DBMeta getInstanceByTableCapPropName(String tableCapPropName) { + assertStringNotNullAndNotTrimmedEmpty("tableCapPropName", tableCapPropName); + final DBMeta instance = (DBMeta)_tableCapPropNameInstanceMap.get(tableCapPropName); + if (instance == null) { + String msg = "The instance map returned null by the key: key=" + tableCapPropName + " instanceMap=" + _tableCapPropNameInstanceMap; + throw new IllegalStateException(msg); + } + return instance; + } + + /** + * Get instance by table uncap-prop-name. + * + * @param tableUncapPropName Table uncap-prop-name. (NotNull) + * @return Instance. (NotNull) + */ + public static DBMeta getInstanceByTableUncapPropName(String tableUncapPropName) { + assertStringNotNullAndNotTrimmedEmpty("tableUncapPropName", tableUncapPropName); + final DBMeta instance = (DBMeta)_tableUncapPropNameInstanceMap.get(tableUncapPropName); + if (instance == null) { + String msg = "The instance map returned null by the key: key=" + tableUncapPropName + " instanceMap=" + _tableUncapPropNameInstanceMap; + throw new IllegalStateException(msg); + } + return instance; + } + + /** + * Get instance by table uncap-prop-name. + * + * @param tableMultiName Table multi-name. (NotNull) + * @return Instance. (NotNull) + */ + public static DBMeta getInstanceByTableMultiName(String tableMultiName) { + assertStringNotNullAndNotTrimmedEmpty("tableMultiName", tableMultiName); + { + final DBMeta instance = (DBMeta)_tableDbNameInstanceMap.get(tableMultiName); + if (instance != null) { + return instance; + } + } + { + final DBMeta instance = (DBMeta)_tableCapPropNameInstanceMap.get(tableMultiName); + if (instance != null) { + return instance; + } + } + { + final DBMeta instance = (DBMeta)_tableUncapPropNameInstanceMap.get(tableMultiName); + if (instance != null) { + return instance; + } + } + String msg = "The tableMultiName does not exist in all-instance-map: tableMultiName=" + tableMultiName; + msg = msg + " tableDbNameInstanceMap=" + _tableDbNameInstanceMap; + msg = msg + " tableCapPropNameInstanceMap=" + _tableCapPropNameInstanceMap; + msg = msg + " tableUncapPropNameInstanceMap=" + _tableUncapPropNameInstanceMap; + throw new IllegalStateException(msg); + } + + // ---------------------------------------------------------------- + // Assert Object + // ------------- + /** + * Assert that the argument is not null. + * + * @param variableName Variable name. (NotNull) + * @param arg Argument. (NotNull) + */ + protected static void assertObjectNotNull(String variableName, Object arg) { + if (variableName == null) { + String msg = "Argument[variableName] should not be null."; + throw new IllegalArgumentException(msg); + } + if (arg == null) { + String msg = "Argument[" + variableName + "] should not be null."; + throw new IllegalArgumentException(msg); + } + } + + // ---------------------------------------------------------------- + // Assert String + // ------------- + /** + * Assert that the string is not null and not trimmed empty. + * + * @param variableName Variable name. (NotNull) + * @param value Value. (NotNull) + */ + protected static void assertStringNotNullAndNotTrimmedEmpty(String variableName, String value) { + if (variableName == null) { + String msg = "Variable[variableName] should not be null."; + throw new IllegalArgumentException(msg); + } + if (value == null) { + String msg = "Variable[" + variableName + "] should not be null."; + throw new IllegalArgumentException(msg); + } + if (value.trim().length() == 0) { + String msg = "Variable[" + variableName + "] should not be empty: [" + value + "]"; + throw new IllegalArgumentException(msg); + } + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/exception/RecordHasAlreadyBeenDeletedException.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/exception/RecordHasAlreadyBeenDeletedException.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/exception/RecordHasAlreadyBeenDeletedException.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,21 @@ +package jp.sf.pal.pompei.allcommon.exception; + +/** + * The exception when the record has already been deleted (by other thread). + * + * @author DBFlute(AutoGenerator) + */ +public class RecordHasAlreadyBeenDeletedException extends RuntimeException { + + /** Serial version UID. (Default) */ + private static final long serialVersionUID = 1L; + + /** + * Constructor. + * + * @param msg Exception message. + */ + public RecordHasAlreadyBeenDeletedException(String msg) { + super(msg); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/exception/RecordHasOverlappedException.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/exception/RecordHasOverlappedException.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/exception/RecordHasOverlappedException.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,21 @@ +package jp.sf.pal.pompei.allcommon.exception; + +/** + * The exception when the record has overlapped. + * + * @author DBFlute(AutoGenerator) + */ +public class RecordHasOverlappedException extends RuntimeException { + + /** Serial version UID. (Default) */ + private static final long serialVersionUID = 1L; + + /** + * Constructor. + * + * @param msg Exception message. + */ + public RecordHasOverlappedException(String msg) { + super(msg); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/exception/SelectedCountExceedMaxCountException.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/exception/SelectedCountExceedMaxCountException.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/exception/SelectedCountExceedMaxCountException.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,49 @@ +package jp.sf.pal.pompei.allcommon.exception; + +/** + * The exception when selected count exceeds max count. + * + * @author DBFlute(AutoGenerator) + */ +public class SelectedCountExceedMaxCountException extends RuntimeException { + + /** Serial version UID. (Default) */ + private static final long serialVersionUID = 1L; + + /** Selected count. */ + protected int _selectedCount; + + /** Max count. */ + protected int _maxCount; + + /** + * Constructor. + * + * @param msg Exception message. + * @param maxCount Max count. + * @param selectedCount Selected count. + */ + public SelectedCountExceedMaxCountException(String msg, int selectedCount, int maxCount) { + super(msg); + _selectedCount = selectedCount; + _maxCount = maxCount; + } + + /** + * Get selected count. + * + * @return Selected count. + */ + public int getSelectedCount() { + return _selectedCount; + } + + /** + * Get max count. + * + * @return Max count. + */ + public int getMaxCount() { + return _maxCount; + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/helper/MapListString.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/helper/MapListString.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/helper/MapListString.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,102 @@ +package jp.sf.pal.pompei.allcommon.helper; + +import java.util.List; +import java.util.Map; + +/** + * MapList-String. + *

+ *

+ * # Interface that offers generation of map and list from the following character strings (map list string). 
+ * # 
+ * #   ex) map:{key1=value1,key2=list:{value21,value22,value23},key3=map:{key31=value31}}
+ * #   ex) list:{key1=value1,key2=list:{value21,value22,value23},key3=map:{key31=value31}}
+ * # 
+ * 
+ * + * @author DBFlute(AutoGenerator) + */ +public interface MapListString { + + /** Default of map-mark. */ + public static final String DEFAULT_MAP_MARK = "map:"; + + /** Default of list-mark. */ + public static final String DEFAULT_LIST_MARK = "list:"; + + /** Default of start-brace. */ + public static final String DEFAULT_START_BRACE = "{"; + + /** Default of end-brace. */ + public static final String DEFAULT_END_BRACE = "}"; + + /** Default of delimter. */ + public static final String DEFAULT_DELIMITER = ";"; + + /** Default of equal. */ + public static final String DEFAULT_EQUAL = "="; + + // ========================================================================================== + // Setter + // ====== + /** + * Set map-mark. + * + * @param mapMark Map-mark. (NotNull) + */ + public void setMapMark(String mapMark); + + /** + * Set list-mark. + * + * @param listMark List-mark. (NotNull) + */ + public void setListMark(String listMark); + + /** + * Set start brace. + * + * @param startBrace Start brace. (NotNull) + */ + public void setStartBrace(String startBrace); + + /** + * Set end brace. + * + * @param endBrace End brace. (NotNull) + */ + public void setEndBrace(String endBrace); + + /** + * Set delimiter. + * + * @param delimiter Delimiter. (NotNull) + */ + public void setDelimiter(String delimiter); + + /** + * Set equal. + * + * @param equal Equal. (NotNull) + */ + public void setEqual(String equal); + + // ========================================================================================== + // Generate + // ======== + /** + * Generate map from map-string. + * + * @param mapString Map-string (NotNull) + * @return Generated map. (NotNull) + */ + public Map generateMap(String mapString); + + /** + * Generate map from list-string. {Implement} + * + * @param listString List-string (NotNull) + * @return Generated list. (NotNull) + */ + public List generateList(String listString); +} \ No newline at end of file Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/helper/MapListStringImpl.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/helper/MapListStringImpl.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/helper/MapListStringImpl.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,938 @@ +package jp.sf.pal.pompei.allcommon.helper; + +import java.util.ArrayList; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; + +/** + * The implementation of MapList-String. + * + * @author DBFlute(AutoGenerator) + */ +public class MapListStringImpl implements MapListString { + + /** Line separator. */ + public static final String NEW_LINE = System.getProperty("line.separator"); + + /** Map-mark. */ + protected String _mapMark; + + /** List-mark. */ + protected String _listMark; + + /** Start-brace. */ + protected String _startBrace; + + /** End-brace. */ + protected String _endBrace; + + /** Delimiter. */ + protected String _delimiter; + + /** Equal. */ + protected String _equal; + + /** Top string. */ + protected String _topString; + + /** Remainder string. */ + protected String _remainderString; + + /** + * Constructor. + */ + public MapListStringImpl() { + _mapMark = DEFAULT_MAP_MARK; + _listMark = DEFAULT_LIST_MARK; + _startBrace = DEFAULT_START_BRACE; + _endBrace = DEFAULT_END_BRACE; + _delimiter = DEFAULT_DELIMITER; + _equal = DEFAULT_EQUAL; + } + + // ========================================================================================== + // Setter + // ====== + /** + * Set map-mark. + * + * @param mapMark Map mark. (NotNull) + */ + public void setMapMark(String mapMark) { + _mapMark = mapMark; + } + + /** + * Set list-mark. + * + * @param listMark List mark. (NotNull) + */ + public void setListMark(String listMark) { + _listMark = listMark; + } + + /** + * Set start-brace. + * + * @param startBrace Start-brace. (NotNull) + */ + public synchronized void setStartBrace(String startBrace) { + _startBrace = startBrace; + } + + /** + * Set end-brace. + * + * @param endBrace End-brace. (NotNull) + */ + public synchronized void setEndBrace(String endBrace) { + _endBrace = endBrace; + } + + /** + * Set delimiter. + * + * @param delimiter Delimiter. (NotNull) + */ + public synchronized void setDelimiter(String delimiter) { + _delimiter = delimiter; + } + + /** + * Set equal. + * + * @param equal Equal. (NotNull) + */ + public void setEqual(String equal) { + _equal = equal; + } + + // **************************************************************************************************** + // Main Method + // *********** + + // ========================================================================================== + // Generate + // ======== + /** + * Generate map from map-string. {Implement} + * + * @param mapString Map-string (NotNull) + * @return Generated map. (NotNull) + */ + public synchronized Map generateMap(String mapString) { + assertMapString(mapString); + + _topString = mapString; + _remainderString = mapString; + + removeBothSideSpaceAndTabAndNewLine(); + removePrefixMapMarkAndStartBrace(); + + final Map generatedMap = newStringObjectMap(); + parseRemainderMapString(generatedMap); + if (!"".equals(_remainderString)) { + String msg = "Final remainderString must be empty string:"; + msg = msg + getNewLineAndIndent() + " # remainderString --> " + _remainderString; + msg = msg + getNewLineAndIndent() + " # mapString --> " + mapString; + msg = msg + getNewLineAndIndent() + " # generatedMap --> " + generatedMap; + throw new IllegalStateException(msg); + } + return generatedMap; + } + + /** + * Generate map from list-string. {Implement} + * + * @param listString List-string (NotNull) + * @return Generated list. (NotNull) + */ + public synchronized List generateList(String listString) { + assertListString(listString); + + _topString = listString; + _remainderString = listString; + + removeBothSideSpaceAndTabAndNewLine(); + removePrefixListMarkAndStartBrace(); + + final List generatedList = newObjectList(); + parseRemainderListString(generatedList); + if (!"".equals(_remainderString)) { + String msg = "Final remainderString must be empty string:"; + msg = msg + getNewLineAndIndent() + " # remainderString --> " + _remainderString; + msg = msg + getNewLineAndIndent() + " # listString --> " + listString; + msg = msg + getNewLineAndIndent() + " # generatedList --> " + generatedList; + throw new IllegalStateException(msg); + } + return generatedList; + } + + // ========================================================================================== + // Parse + // ===== + /** + * Parse remainder map string. + * + * @param currentMap current map. + */ + protected void parseRemainderMapString(final Map currentMap) { + while (true) { + if (initializeAtLoopBeginning()) { + return; + } + + // *** Now, _remainderString should starts with the key of the map. *** + + final int equalIndex = _remainderString.indexOf(_equal); + assertEqualIndex(_remainderString, equalIndex, _topString, currentMap); + final String mapKey = _remainderString.substring(0, equalIndex).trim(); + removePrefixTargetIndexPlus(equalIndex, _equal.length()); + removeBothSideSpaceAndTabAndNewLine(); + + // *** Now, _remainderString should starts with the value of the map. *** + + if (isStartsWithMapPrefix(_remainderString)) { + removePrefixMapMarkAndStartBrace(); + parseRemainderMapString(setupNestMap(currentMap, mapKey)); + if (closingAfterParseNestMapList()) { + return; + } + continue; + } + + if (isStartsWithListPrefix(_remainderString)) { + removePrefixListMarkAndStartBrace(); + parseRemainderListString(setupNestList(currentMap, mapKey)); + if (closingAfterParseNestMapList()) { + return; + } + continue; + } + + final int delimiterIndex = _remainderString.indexOf(_delimiter); + final int endBraceIndex = _remainderString.indexOf(_endBrace); + assertEndBracekIndex(_remainderString, endBraceIndex, _topString, currentMap); + + // If delimiter exists and delimiter is closer than end brace, + // Everything from the head of the present remainder string to the delimiter becomes map value. + // ex) value1,key2=value2} + if (delimiterIndex >= 0 && delimiterIndex < endBraceIndex) { + final String mapValue = _remainderString.substring(0, delimiterIndex); + currentMap.put(mapKey, filterMapListValue(mapValue)); + + // Because the map element continues since the delimiter, skip the delimiter and continue the loop. + removePrefixTargetIndexPlus(delimiterIndex, _delimiter.length()); + continue; + } + + // Everything from the head of the present remainder string to the delimiter becomes map value. + // ex) value1}, key2=value2} + final String mapValue = _remainderString.substring(0, endBraceIndex); + currentMap.put(mapKey, filterMapListValue(mapValue)); + + // Analyzing map is over. So closing and return. + closingByEndBraceIndex(endBraceIndex); + return; + } + } + + /** + * Parse remainder list string. + * + * @param currentList current list. + */ + protected void parseRemainderListString(final List currentList) { + while (true) { + if (initializeAtLoopBeginning()) { + return; + } + + // *** Now, _remainderString should starts with the value of the list. *** + + if (isStartsWithMapPrefix(_remainderString)) { + removePrefixMapMarkAndStartBrace(); + parseRemainderMapString(setupNestMap(currentList)); + if (closingAfterParseNestMapList()) { + return; + } + continue; + } + + if (isStartsWithListPrefix(_remainderString)) { + removePrefixListMarkAndStartBrace(); + parseRemainderListString(setupNestList(currentList)); + if (closingAfterParseNestMapList()) { + return; + } + continue; + } + + final int delimiterIndex = _remainderString.indexOf(_delimiter); + final int endBraceIndex = _remainderString.indexOf(_endBrace); + assertEndBraceIndex(_remainderString, endBraceIndex, _topString, currentList); + + // If delimiter exists and delimiter is closer than end brace, + // Everything from the head of the present remainder string to the delimiter becomes list value. + // ex) value1,value2,value3} + if (delimiterIndex >= 0 && delimiterIndex < endBraceIndex) { + final String listValue = _remainderString.substring(0, delimiterIndex); + currentList.add(filterMapListValue(listValue)); + + // Because the list element continues since the delimiter, skip the delimiter and continue the loop. + removePrefixTargetIndexPlus(delimiterIndex, _delimiter.length()); + continue; + } + + // Everything from the head of the present remainder string to the delimiter becomes list value. + // ex) value1}, value2, } + final String listValue = _remainderString.substring(0, endBraceIndex); + currentList.add(filterMapListValue(listValue)); + + // Analyzing list is over. So closing and return. + closingByEndBraceIndex(endBraceIndex); + return; + } + } + + /** + * Initialize at loop beginning. + * + * @return Is return? + */ + protected boolean initializeAtLoopBeginning() { + // Remove prefix delimiter. (Result string is always trimmed.) + removePrefixAllDelimiter(); + + // If the remainder string is empty-string, Analyzing is over! + if (_remainderString.equals("")) { + return true; + } + + // If the remainder string starts with end-brace, Analyzing current map is over! + // And then remove the end-brace. + if (isStartsWithEndBrace(_remainderString)) { + removePrefixEndBrace(); + return true; + } + return false; + } + + /** + * Close after parse nest map list. + * + * @return Is return? + */ + protected boolean closingAfterParseNestMapList() { + // If the remainder string starts with end-brace, remove it and return true. + if (isStartsWithEndBrace(_remainderString)) { + removePrefixEndBrace(); + return true; + } + return false; + } + + /** + * Close by end-brace index. + * + * @param endBraceIndex End-brace index. + */ + protected void closingByEndBraceIndex(int endBraceIndex) { + // Remove the value that was finished analyzing and end-brace. + _remainderString = _remainderString.substring(endBraceIndex); + removePrefixEndBrace(); + } + + // **************************************************************************************************** + // StateFul Method + // *************** + + // ========================================================================================== + // Remove + // ====== + /** + * Remove prefix map-mark and start-brace. + */ + protected void removePrefixMapMarkAndStartBrace() { + removePrefix(_mapMark + _startBrace); + } + + /** + * Remove prefix list-mark and start-brace. + */ + protected void removePrefixListMarkAndStartBrace() { + removePrefix(_listMark + _startBrace); + } + + /** + * Remove prefix delimiter. + */ + protected void removePrefixDelimiter() { + removePrefix(_delimiter); + } + + /** + * Remove prefix end-brace. + */ + protected void removePrefixEndBrace() { + removePrefix(_endBrace); + } + + /** + * Remove prefix. + * + * @param prefixString Prefix string. (NotNull) + */ + protected void removePrefix(String prefixString) { + if (_remainderString == null) { + String msg = "Argument[remainderString] must not be null: " + _remainderString; + throw new IllegalArgumentException(msg); + } + if (prefixString == null) { + String msg = "Argument[prefixString] must not be null: " + prefixString; + throw new IllegalArgumentException(msg); + } + + removeBothSideSpaceAndTabAndNewLine(); + + if (_remainderString.length() < prefixString.length()) { + String msg = "Argument[remainderString] length must be larger than Argument[prefixString] length:"; + msg = msg + getNewLineAndIndent() + " # remainderString --> " + _remainderString; + msg = msg + getNewLineAndIndent() + " # prefixString=" + prefixString; + throw new IllegalArgumentException(msg); + } + if (!_remainderString.startsWith(prefixString)) { + String msg = "Argument[remainderString] must start with Argument[prefixString:]"; + msg = msg + getNewLineAndIndent() + " # remainderString --> " + _remainderString; + msg = msg + getNewLineAndIndent() + " # prefixString --> " + prefixString; + throw new IllegalArgumentException(msg); + } + + _remainderString = _remainderString.substring(prefixString.length()); + removeBothSideSpaceAndTabAndNewLine(); + } + + /** + * Remove prefix and delimiter. + */ + protected void removePrefixAllDelimiter() { + removeBothSideSpaceAndTabAndNewLine(); + + while (true) { + if (!isStartsWithDelimiter(_remainderString)) { + break; + } + + if (isStartsWithDelimiter(_remainderString)) { + removePrefixDelimiter(); + removeBothSideSpaceAndTabAndNewLine(); + } + } + } + + /** + * Remove both side space and tab and new-line. + */ + protected void removeBothSideSpaceAndTabAndNewLine() { + _remainderString = _remainderString.trim(); + } + + /** + * Remove prefix (target index plus one). + * + * @param index Index. + * @param plusCount Plus count. + */ + protected void removePrefixTargetIndexPlus(int index, int plusCount) { + _remainderString = _remainderString.substring(index + plusCount); + } + + // **************************************************************************************************** + // StateLess Method + // **************** + + // ========================================================================================== + // Assert + // ====== + /** + * Assert map-string. + * + * @param mapString Map-string. (NotNull) + */ + protected void assertMapString(String mapString) { + if (mapString == null) { + String msg = "Argument[mapString] must not be null: "; + throw new IllegalArgumentException(msg + "mapString=" + mapString); + } + mapString = mapString.trim(); + if (!isStartsWithMapPrefix(mapString)) { + String msg = "Argument[mapString] must start with '" + _mapMark + _startBrace + "': "; + throw new IllegalArgumentException(msg + "mapString=" + mapString); + } + if (!isEndsWithEndBrace(mapString)) { + String msg = "Argument[mapString] must end with '" + _endBrace + "': "; + throw new IllegalArgumentException(msg + "mapString=" + mapString); + } + + final int startBraceCount = getDelimiterCount(mapString, _startBrace); + final int endBraceCount = getDelimiterCount(mapString, _endBrace); + if (startBraceCount != endBraceCount) { + String msg = "It is necessary to have braces of the same number on start and end:"; + msg = msg + getNewLineAndIndent() + " # mapString --> " + mapString; + msg = msg + getNewLineAndIndent() + " # startBraceCount --> " + startBraceCount; + msg = msg + getNewLineAndIndent() + " # endBraceCount --> " + endBraceCount; + throw new IllegalArgumentException(msg); + } + } + + /** + * Assert list-string. + * + * @param listString List-string. (NotNull) + */ + protected void assertListString(String listString) { + if (listString == null) { + String msg = "Argument[listString] must not be null: "; + throw new IllegalArgumentException(msg + "listString=" + listString); + } + listString = listString.trim(); + if (!isStartsWithListPrefix(listString)) { + String msg = "Argument[listString] must start with '" + _mapMark + "': "; + throw new IllegalArgumentException(msg + "listString=" + listString); + } + if (!isEndsWithEndBrace(listString)) { + String msg = "Argument[listString] must end with '" + _endBrace + "': "; + throw new IllegalArgumentException(msg + "listString=" + listString); + } + + final int startBraceCount = getDelimiterCount(listString, _startBrace); + final int endBraceCount = getDelimiterCount(listString, _endBrace); + if (startBraceCount != endBraceCount) { + String msg = "It is necessary to have braces of the same number on start and end:"; + msg = msg + getNewLineAndIndent() + " # listString --> " + listString; + msg = msg + getNewLineAndIndent() + " # startBraceCount --> " + startBraceCount; + msg = msg + getNewLineAndIndent() + " # endBraceCount --> " + endBraceCount; + throw new IllegalArgumentException(msg); + } + } + + /** + * Assert equal-index. + * + * @param remainderMapString Remainder map-string. (NotNull) + * @param equalIndex Equal-index. + * @param mapString4Log Map-string for log. (NotNull) + * @param currentMap4Log Current-map for log. (NotNull) + */ + protected void assertEqualIndex(String remainderMapString, int equalIndex, String mapString4Log + , Map currentMap4Log) { + if (remainderMapString == null) { + String msg = "Argument[remainderMapString] must not be null:"; + msg = msg + getNewLineAndIndent() + " # remainderMapString --> " + remainderMapString; + msg = msg + getNewLineAndIndent() + " # equalIndex --> " + equalIndex; + msg = msg + getNewLineAndIndent() + " # mapString4Log --> " + mapString4Log; + msg = msg + getNewLineAndIndent() + " # currentMap4Log --> " + currentMap4Log; + msg = msg + getNewLineAndIndent() + " # _startBrace --> " + _startBrace; + msg = msg + getNewLineAndIndent() + " # _endBrace --> " + _endBrace; + msg = msg + getNewLineAndIndent() + " # _delimiter --> " + _delimiter; + msg = msg + getNewLineAndIndent() + " # _equal --> " + _equal; + throw new IllegalArgumentException(msg); + } + + if (equalIndex < 0) { + String msg = "Argument[equalIndex] must be plus or zero:"; + msg = msg + getNewLineAndIndent() + " # remainderMapString --> " + remainderMapString; + msg = msg + getNewLineAndIndent() + " # equalIndex --> " + equalIndex; + msg = msg + getNewLineAndIndent() + " # mapString4Log --> " + mapString4Log; + msg = msg + getNewLineAndIndent() + " # currentMap4Log --> " + currentMap4Log; + msg = msg + getNewLineAndIndent() + " # _startBrace --> " + _startBrace; + msg = msg + getNewLineAndIndent() + " # _endBrace --> " + _endBrace; + msg = msg + getNewLineAndIndent() + " # _delimiter --> " + _delimiter; + msg = msg + getNewLineAndIndent() + " # _equal --> " + _equal; + throw new IllegalArgumentException(msg); + } + + if (remainderMapString.length() < equalIndex) { + String msg = "Argument[remainderMapString] length must be larger than equalIndex value:"; + msg = msg + getNewLineAndIndent() + " # remainderMapString --> " + remainderMapString; + msg = msg + getNewLineAndIndent() + " # equalIndex --> " + equalIndex; + msg = msg + getNewLineAndIndent() + " # mapString4Log --> " + mapString4Log; + msg = msg + getNewLineAndIndent() + " # currentMap4Log --> " + currentMap4Log; + msg = msg + getNewLineAndIndent() + " # _startBrace --> " + _startBrace; + msg = msg + getNewLineAndIndent() + " # _endBrace --> " + _endBrace; + msg = msg + getNewLineAndIndent() + " # _delimiter --> " + _delimiter; + msg = msg + getNewLineAndIndent() + " # _equal --> " + _equal; + throw new IllegalArgumentException(msg); + } + + final String expectedAsEndMark = remainderMapString.substring(equalIndex, equalIndex + _equal.length()); + if (!expectedAsEndMark.equals(_equal)) { + String msg = "Argument[remainderMapString] must have '" + _equal + "' at Argument[equalIndex]:"; + msg = msg + getNewLineAndIndent() + " # remainderMapString --> " + remainderMapString; + msg = msg + getNewLineAndIndent() + " # equalIndex --> " + equalIndex; + msg = msg + getNewLineAndIndent() + " # expectedAsEndMark --> " + expectedAsEndMark; + msg = msg + getNewLineAndIndent() + " # mapString --> " + mapString4Log; + msg = msg + getNewLineAndIndent() + " # currentMap --> " + currentMap4Log; + msg = msg + getNewLineAndIndent() + " # _startBrace --> " + _startBrace; + msg = msg + getNewLineAndIndent() + " # _endBrace --> " + _endBrace; + msg = msg + getNewLineAndIndent() + " # _delimiter --> " + _delimiter; + msg = msg + getNewLineAndIndent() + " # _equal --> " + _equal; + throw new IllegalArgumentException(msg); + } + } + + /** + * Assert end-brace-index. + * + * @param remainderMapString Remainder map-string. (NotNull) + * @param endBraceIndex End-brace-index. + * @param mapString4Log Map-string for log. (NotNull) + * @param currentMap4Log Current-map for log. (NotNull) + */ + protected void assertEndBracekIndex(String remainderMapString, int endBraceIndex, String mapString4Log + , Map currentMap4Log) { + if (remainderMapString == null) { + String msg = "Argument[remainderMapString] must not be null:"; + msg = msg + getNewLineAndIndent() + " # remainderMapString --> " + remainderMapString; + msg = msg + getNewLineAndIndent() + " # endBraceIndex --> " + endBraceIndex; + msg = msg + getNewLineAndIndent() + " # mapString --> " + mapString4Log; + msg = msg + getNewLineAndIndent() + " # currentMap --> " + currentMap4Log; + msg = msg + getNewLineAndIndent() + " # _startBrace --> " + _startBrace; + msg = msg + getNewLineAndIndent() + " # _endBrace --> " + _endBrace; + msg = msg + getNewLineAndIndent() + " # _delimiter --> " + _delimiter; + msg = msg + getNewLineAndIndent() + " # _equal --> " + _equal; + throw new IllegalArgumentException(msg); + } + + if (endBraceIndex < 0) { + String msg = "Argument[endMarkIndex] must be plus or zero:"; + msg = msg + getNewLineAndIndent() + " # remainderMapString --> " + remainderMapString; + msg = msg + getNewLineAndIndent() + " # endBraceIndex --> " + endBraceIndex; + msg = msg + getNewLineAndIndent() + " # mapString --> =" + mapString4Log; + msg = msg + getNewLineAndIndent() + " # currentMap --> " + currentMap4Log; + msg = msg + getNewLineAndIndent() + " # _startBrace --> " + _startBrace; + msg = msg + getNewLineAndIndent() + " # _endBrace --> " + _endBrace; + msg = msg + getNewLineAndIndent() + " # _delimiter --> " + _delimiter; + msg = msg + getNewLineAndIndent() + " # _equal --> " + _equal; + throw new IllegalArgumentException(msg); + } + + if (remainderMapString.length() < endBraceIndex) { + String msg = "Argument[remainderMapString] length must be larger than endMarkIndex value:"; + msg = msg + getNewLineAndIndent() + " # remainderMapString --> " + remainderMapString; + msg = msg + getNewLineAndIndent() + " # endBraceIndex --> " + endBraceIndex; + msg = msg + getNewLineAndIndent() + " # mapString --> " + mapString4Log; + msg = msg + getNewLineAndIndent() + " # currentMap --> " + currentMap4Log; + msg = msg + getNewLineAndIndent() + " # _startBrace --> " + _startBrace; + msg = msg + getNewLineAndIndent() + " # _endBrace --> " + _endBrace; + msg = msg + getNewLineAndIndent() + " # _delimiter --> " + _delimiter; + msg = msg + getNewLineAndIndent() + " # _equal --> " + _equal; + throw new IllegalArgumentException(msg); + } + + final String expectedAsEndMark = remainderMapString.substring(endBraceIndex, endBraceIndex + _endBrace.length()); + if (!expectedAsEndMark.equals(_endBrace)) { + String msg = "Argument[remainderMapString] must have '" + _endBrace + "' at Argument[endBraceIndex]:"; + msg = msg + getNewLineAndIndent() + " # remainderMapString --> " + remainderMapString; + msg = msg + getNewLineAndIndent() + " # endBraceIndex --> " + endBraceIndex; + msg = msg + getNewLineAndIndent() + " # expectedAsEndMark --> " + expectedAsEndMark; + msg = msg + getNewLineAndIndent() + " # mapString --> " + mapString4Log; + msg = msg + getNewLineAndIndent() + " # currentMap --> " + currentMap4Log; + msg = msg + getNewLineAndIndent() + " # _startBrace --> " + _startBrace; + msg = msg + getNewLineAndIndent() + " # _endBrace --> " + _endBrace; + msg = msg + getNewLineAndIndent() + " # _delimiter --> " + _delimiter; + msg = msg + getNewLineAndIndent() + " # _equal --> " + _equal; + throw new IllegalArgumentException(msg); + } + } + + /** + * Assert end-brace-index. + * + * @param remainderListString Remainder list-string. (NotNull) + * @param endBraceIndex End-brace-index. + * @param listString4Log List-string for log. (NotNull) + * @param currentList4Log Current-list for log. (NotNull) + */ + protected void assertEndBraceIndex(String remainderListString, int endBraceIndex, String listString4Log, + List currentList4Log) { + if (remainderListString == null) { + String msg = "Argument[remainderListString] must not be null:"; + msg = msg + getNewLineAndIndent() + " # remainderListString --> " + remainderListString; + msg = msg + getNewLineAndIndent() + " # endBraceIndex --> " + endBraceIndex; + msg = msg + getNewLineAndIndent() + " # listString --> " + listString4Log; + msg = msg + getNewLineAndIndent() + " # currentList --> " + currentList4Log; + msg = msg + getNewLineAndIndent() + " # _startBrace --> " + _startBrace; + msg = msg + getNewLineAndIndent() + " # _endBrace --> " + _endBrace; + msg = msg + getNewLineAndIndent() + " # _delimiter --> " + _delimiter; + msg = msg + getNewLineAndIndent() + " # _equal --> " + _equal; + throw new IllegalArgumentException(msg); + } + + if (endBraceIndex < 0) { + String msg = "Argument[endMarkIndex] must be plus or zero:"; + msg = msg + getNewLineAndIndent() + " # remainderListString --> " + remainderListString; + msg = msg + getNewLineAndIndent() + " # endBraceIndex --> " + endBraceIndex; + msg = msg + getNewLineAndIndent() + " # listString --> " + listString4Log; + msg = msg + getNewLineAndIndent() + " # currentList --> " + currentList4Log; + msg = msg + getNewLineAndIndent() + " # _startBrace --> " + _startBrace; + msg = msg + getNewLineAndIndent() + " # _endBrace --> " + _endBrace; + msg = msg + getNewLineAndIndent() + " # _delimiter --> " + _delimiter; + msg = msg + getNewLineAndIndent() + " # _equal --> " + _equal; + throw new IllegalArgumentException(msg); + } + + if (remainderListString.length() < endBraceIndex) { + String msg = "Argument[remainderListString] length must be larger than endMarkIndex value:"; + msg = msg + getNewLineAndIndent() + " # remainderListString --> " + remainderListString; + msg = msg + getNewLineAndIndent() + " # endBraceIndex --> " + endBraceIndex; + msg = msg + getNewLineAndIndent() + " # listString --> " + listString4Log; + msg = msg + getNewLineAndIndent() + " # currentList --> " + currentList4Log; + msg = msg + getNewLineAndIndent() + " # _startBrace --> " + _startBrace; + msg = msg + getNewLineAndIndent() + " # _endBrace --> " + _endBrace; + msg = msg + getNewLineAndIndent() + " # _delimiter --> " + _delimiter; + msg = msg + getNewLineAndIndent() + " # _equal --> " + _equal; + throw new IllegalArgumentException(msg); + } + + final String expectedAsEndBrace = remainderListString.substring(endBraceIndex, endBraceIndex + _endBrace.length()); + if (!expectedAsEndBrace.equals(_endBrace)) { + String msg = "Argument[remainderListString] must have '" + _endBrace + "' at Argument[endBraceIndex]:"; + msg = msg + getNewLineAndIndent() + " # remainderListString --> " + remainderListString; + msg = msg + getNewLineAndIndent() + " # endBraceIndex --> " + endBraceIndex; + msg = msg + getNewLineAndIndent() + " # expectedAsEndBrace --> " + expectedAsEndBrace; + msg = msg + getNewLineAndIndent() + " # listString --> " + listString4Log; + msg = msg + getNewLineAndIndent() + " # currentList --> " + currentList4Log; + msg = msg + getNewLineAndIndent() + " # _startBrace --> " + _startBrace; + msg = msg + getNewLineAndIndent() + " # _endBrace --> " + _endBrace; + msg = msg + getNewLineAndIndent() + " # _delimiter --> " + _delimiter; + msg = msg + getNewLineAndIndent() + " # _equal --> " + _equal; + throw new IllegalArgumentException(msg); + } + } + + // ========================================================================================== + // Filter + // ====== + /** + * Filter map or list value. + *

+ *

+     * # The value is trimmed.
+     * # If the value is null, this returns null.
+     * # If the value is 'null', this returns null.
+     * # If the trimmed value is empty string, this returns null.
+     * 
+ * @param value value. (Nullable) + * @return Filtered value. (Nullable) + */ + protected String filterMapListValue(String value) { + if (value == null) { + return null; + } + value = value.trim(); + return (("".equals(value) || "null".equals(value)) ? null : value); + } + + // ========================================================================================== + // Judgement + // ========= + /** + * Does it start with map-prefix? + * + * @param targetString Target-string. (NotNull) + * @return Determination. + */ + protected boolean isStartsWithMapPrefix(String targetString) { + if (targetString == null) { + String msg = "Argument[targetString] must not be null: " + targetString; + throw new IllegalArgumentException(msg); + } + targetString = targetString.trim(); + if (targetString.startsWith(_mapMark + _startBrace)) { + return true; + } else { + return false; + } + } + + /** + * Does it start with list-prefix? + * + * @param targetString Target-string. (NotNull) + * @return Determination. + */ + protected boolean isStartsWithListPrefix(String targetString) { + if (targetString == null) { + String msg = "Argument[targetString] must not be null: " + targetString; + throw new IllegalArgumentException(msg); + } + targetString = targetString.trim(); + if (targetString.startsWith(_listMark + _startBrace)) { + return true; + } else { + return false; + } + } + + /** + * Does it start with delimiter? + * + * @param targetString Target-string. (NotNull) + * @return Determination. + */ + protected boolean isStartsWithDelimiter(String targetString) { + if (targetString == null) { + String msg = "Argument[targetString] must not be null: " + targetString; + throw new IllegalArgumentException(msg); + } + targetString = targetString.trim(); + if (targetString.startsWith(_delimiter)) { + return true; + } else { + return false; + } + } + + /** + * Does it start with end-brace? + * + * @param targetString Target-string. (NotNull) + * @return Determination. + */ + protected boolean isStartsWithEndBrace(String targetString) { + if (targetString == null) { + String msg = "Argument[targetString] must not be null: " + targetString; + throw new IllegalArgumentException(msg); + } + targetString = targetString.trim(); + if (targetString.startsWith(_endBrace)) { + return true; + } else { + return false; + } + } + + /** + * Does it end with end-brace? + * + * @param targetString Target-string. (NotNull) + * @return Determination. + */ + protected boolean isEndsWithEndBrace(String targetString) { + if (targetString == null) { + String msg = "Argument[targetString] must not be null: " + targetString; + throw new IllegalArgumentException(msg); + } + targetString = targetString.trim(); + if (targetString.endsWith(_endBrace)) { + return true; + } else { + return false; + } + } + + // ========================================================================================== + // Other + // ===== + /** + * Setup nest map. + * + * @param currentMap Current-map. (NotNull) + * @param mapKey Map-key. (NotNull) + * @return Nest map. (NotNull) + */ + protected Map setupNestMap(Map currentMap, String mapKey) { + final Map nestMap = newStringObjectMap(); + currentMap.put(mapKey, nestMap); + return nestMap; + } + + /** + * Setup nest map. + * + * @param currentList Current-list. (NotNull) + * @return Nest map. (NotNull) + */ + protected Map setupNestMap(List currentList) { + final Map nestMap = newStringObjectMap(); + currentList.add(nestMap); + return nestMap; + } + + /** + * Setup nest list. + * + * @param currentMap Current-map. (NotNull) + * @param mapKey Map-key. (NotNull) + * @return Nest list. (NotNull) + */ + protected List setupNestList(Map currentMap, String mapKey) { + final List nestList = newObjectList(); + currentMap.put(mapKey, nestList); + return nestList; + } + + /** + * Setup nest list. + * + * @param currentList Current-list. (NotNull) + * @return Nest list. (NotNull) + */ + protected List setupNestList(List currentList) { + final List nestList = newObjectList(); + currentList.add(nestList); + return nestList; + } + + /** + * New string-object-map. + * + * @return String-object-map. (NotNull) + */ + protected Map newStringObjectMap() { + return new LinkedHashMap(); + } + + /** + * New object-list. + * + * @return String-object-list. (NotNull) + */ + protected List newObjectList() { + return new ArrayList(); + } + + /** + * Get new-line and indent. + * + * @return New-line and indent. (NotNull) + */ + protected String getNewLineAndIndent() { + return NEW_LINE + " "; + } + + /** + * Get count that target string exist in the base string. + * + * @param targetString Target string. + * @param delimiter Delimiter + * @return Delimiter count that _remainderString contains. + */ + protected int getDelimiterCount(String targetString, String delimiter) { + int result = 0; + for (int i = 0;;) { + if (targetString.indexOf(delimiter, i) != -1) { + result++; + i = targetString.indexOf(delimiter, i) + 1; + } else { + break; + } + } + if (result == 0) { + result = -1; + } + return result; + } +} \ No newline at end of file Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/helper/MapStringBuilder.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/helper/MapStringBuilder.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/helper/MapStringBuilder.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,67 @@ +package jp.sf.pal.pompei.allcommon.helper; + +/** + * The interface of map-string-builder. + * + * @author DBFlute(AutoGenerator) + */ +public interface MapStringBuilder { + + // ===================================================================================== + // Setter + // ====== + public void setColumnNames(String[] columnNames); + + public void setColumnNameList(java.util.List columnNameList); + + public void setMsMapMark(String value); + + public void setMsStartBrace(String value); + + public void setMsEndBrace(String value); + + public void setMsDelimiter(String value); + + public void setMsEqual(String value); + + // ===================================================================================== + // Main + // ==== + public String buildByDelimiter(String values, String delimiter); + + public String buildFromList(java.util.List valueList); + + // ===================================================================================== + // Exception Static Class + // ====================== + public static class DifferentDelimiterCountException extends RuntimeException { + + /** Serial version UID. (Default) */ + private static final long serialVersionUID = 1L; + + // ===================================================================================== + // Attribute + // ========= + protected java.util.List _columnNameList; + protected java.util.List _valueList; + + // ===================================================================================== + // Constructor + // =========== + public DifferentDelimiterCountException(String msg, java.util.List columnNameList, java.util.List valueList) { + super(msg); + _columnNameList = columnNameList; + _valueList = valueList; + } + + // ===================================================================================== + // Accessor + // ======== + public java.util.List getColumnNameList() { + return _columnNameList; + } + public java.util.List getValueList() { + return _valueList; + } + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/helper/MapStringBuilderImpl.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/helper/MapStringBuilderImpl.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/helper/MapStringBuilderImpl.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,177 @@ +package jp.sf.pal.pompei.allcommon.helper; + +import jp.sf.pal.pompei.allcommon.helper.token.line.LineToken; +import jp.sf.pal.pompei.allcommon.helper.token.line.LineTokenizingOption; +import jp.sf.pal.pompei.allcommon.helper.token.line.impl.LineTokenImpl; + +/** + * The implementation of map-string-builder. + * + * @author DBFlute(AutoGenerator) + */ +public class MapStringBuilderImpl implements MapStringBuilder { + + protected java.util.List _columnNameList; + + protected String _msMapMark; + + protected String _msStartBrace; + + protected String _msEndBrace; + + protected String _msDelimiter; + + protected String _msEqual; + + protected boolean _trimDoubleQuotation; + + public void setColumnNames(String[] columnNames) { + _columnNameList = java.util.Arrays.asList(columnNames); + } + + public void setColumnNameList(java.util.List columnNameList) { + _columnNameList = columnNameList; + } + + public void setMsMapMark(String value) { + _msMapMark = value; + } + + public void setMsStartBrace(String value) { + _msStartBrace = value; + } + + public void setMsEndBrace(String value) { + _msEndBrace = value; + } + + public void setMsDelimiter(String value) { + _msDelimiter = value; + } + + public void setMsEqual(String value) { + _msEqual = value; + } + + public void trimDoubleQuotation() { + _trimDoubleQuotation = true; + } + + public String buildByDelimiter(String values, String delimiter) { + if (values == null) { + String msg = "The argument[values] should not be null."; + throw new IllegalArgumentException(msg); + } + if (delimiter == null) { + String msg = "The argument[delimiter] should not be null."; + throw new IllegalArgumentException(msg); + } + assertStringComponent(); + + final java.util.List valueList = tokenize(values, delimiter); + assertColumnValueList(_columnNameList, valueList); + + final StringBuffer sb = new StringBuffer(); + sb.append(_msMapMark).append(_msStartBrace); + for (int i = 0; i < _columnNameList.size(); i++ ) { + sb.append(_columnNameList.get(i)).append(_msEqual).append(valueList.get(i)).append(_msDelimiter); + } + + sb.delete(sb.length() - _msDelimiter.length(), sb.length()); + sb.append(_msEndBrace); + return sb.toString(); + } + + public String buildFromList(java.util.List valueList) { + if (valueList == null) { + String msg = "The argument[valueList] should not be null."; + throw new IllegalArgumentException(msg); + } + assertStringComponent(); + assertColumnValueList(_columnNameList, valueList); + + final StringBuffer sb = new StringBuffer(); + sb.append(_msMapMark).append(_msStartBrace); + for (int i = 0; i < _columnNameList.size(); i++ ) { + sb.append(_columnNameList.get(i)).append(_msEqual).append(valueList.get(i)).append(_msDelimiter); + } + + sb.delete(sb.length() - _msDelimiter.length(), sb.length()); + sb.append(_msEndBrace); + return sb.toString(); + } + + protected java.util.List tokenize(String value, String delimiter) { + final LineToken lineToken = new LineTokenImpl(); + final LineTokenizingOption lineTokenizingOption = new LineTokenizingOption(); + lineTokenizingOption.setDelimiter(delimiter); + if (_trimDoubleQuotation) { + lineTokenizingOption.trimDoubleQuotation(); + } + return lineToken.tokenize(value, lineTokenizingOption); + } + + protected void assertStringComponent() { + if (_columnNameList == null) { + String msg = "The columnNameList should not be null."; + throw new IllegalStateException(msg); + } + if (_columnNameList.isEmpty()) { + String msg = "The columnNameList should not be empty."; + throw new IllegalStateException(msg); + } + if (_msMapMark == null) { + String msg = "The msMapMark should not be null."; + throw new IllegalStateException(msg); + } + if (_msStartBrace == null) { + String msg = "The msStartBrace should not be null."; + throw new IllegalStateException(msg); + } + if (_msEndBrace == null) { + String msg = "The msEndBrace should not be null."; + throw new IllegalStateException(msg); + } + if (_msDelimiter == null) { + String msg = "The msDelimiter should not be null."; + throw new IllegalStateException(msg); + } + if (_msEqual == null) { + String msg = "The msEqual should not be null."; + throw new IllegalStateException(msg); + } + } + + protected void assertColumnValueList(java.util.List columnNameList, java.util.List valueList) { + if (columnNameList.size() != valueList.size()) { + String msg = "The length of columnNameList and valueList are difference. (" + columnNameList.size() + ", " + valueList.size() + ")"; + msg = msg + " columnNameList=" + columnNameList; + msg = msg + " valueList=" + valueList; + throw new DifferentDelimiterCountException(msg, columnNameList, valueList); + } + } + + protected static final String replace(String text, String fromText, String toText) { + if (text == null || fromText == null || toText == null) { + return null; + } + final StringBuffer buf = new StringBuffer(100); + int pos = 0; + int pos2 = 0; + while (true) { + pos = text.indexOf(fromText, pos2); + if (pos == 0) { + buf.append(toText); + pos2 = fromText.length(); + } else if (pos > 0) { + buf.append(text.substring(pos2, pos)); + buf.append(toText); + pos2 = pos + fromText.length(); + } else { + buf.append(text.substring(pos2)); + break; + } + } + return buf.toString(); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/helper/character/GeneralCharacter.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/helper/character/GeneralCharacter.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/helper/character/GeneralCharacter.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,17 @@ +package jp.sf.pal.pompei.allcommon.helper.character; + +/** + * The interface of general character. + * + * @author DBFlute(AutoGenerator) + */ +public interface GeneralCharacter { + + public String toSingleByteAlphabet(String s); + + public String toSingleByteNumber(String s); + + public String toSingleByteAlphabetNumber(String target); + + public String toSingleByteAlphabetNumberMark(String target); +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/helper/character/JapaneseCharacter.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/helper/character/JapaneseCharacter.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/helper/character/JapaneseCharacter.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,11 @@ +package jp.sf.pal.pompei.allcommon.helper.character; + +/** + * The interface of Japanese character. + * + * @author DBFlute(AutoGenerator) + */ +public interface JapaneseCharacter { + + public String toDoubleByteKatakana(String target); +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/helper/character/impl/GeneralCharacterImpl.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/helper/character/impl/GeneralCharacterImpl.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/helper/character/impl/GeneralCharacterImpl.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,100 @@ +package jp.sf.pal.pompei.allcommon.helper.character.impl; + +import jp.sf.pal.pompei.allcommon.helper.character.GeneralCharacter; + +/** + * The implementation of general character. + * + * @author DBFlute(AutoGenerator) + */ +public class GeneralCharacterImpl implements GeneralCharacter { + + public String toSingleByteAlphabet(String target) { + if (target == null || target.trim().length() == 0) { + return target; + } + final StringBuffer sb = new StringBuffer(); + for (int i = 0; i < target.length(); i++) { + final char currentChar = target.charAt(i); + + if (currentChar >= 0xff21 && currentChar <= 0xff3a) { + sb.append(toSingleByteCharacter(currentChar)); + } else if (currentChar >= 0xff41 && currentChar <= 0xff5a) { + sb.append(toSingleByteCharacter(currentChar)); + } else { + sb.append(currentChar); + } + } + return sb.toString(); + } + + public String toSingleByteNumber(String target) { + if (target == null || target.trim().length() == 0) { + return target; + } + final StringBuffer sb = new StringBuffer(); + for (int i = 0; i < target.length(); i++) { + final char currentChar = target.charAt(i); + if (currentChar >= 0xff10 && currentChar <= 0xff19) { + sb.append(toSingleByteCharacter(currentChar)); + } else { + sb.append(currentChar); + } + } + return sb.toString(); + } + + public String toSingleByteAlphabetNumber(String target) { + if (target == null || target.trim().length() == 0) { + return target; + } + final StringBuffer sb = new StringBuffer(); + for (int i = 0; i < target.length(); i++) { + final char currentChar = target.charAt(i); + + if (currentChar >= 0xff10 && currentChar <= 0xff19) { + sb.append(toSingleByteCharacter(currentChar)); + } else if (currentChar >= 0xff21 && currentChar <= 0xff3a) { + sb.append(toSingleByteCharacter(currentChar)); + } else if (currentChar >= 0xff41 && currentChar <= 0xff5a) { + sb.append(toSingleByteCharacter(currentChar)); + } else { + sb.append(currentChar); + } + } + return sb.toString(); + } + + public String toSingleByteAlphabetNumberMark(String target) { + if (target == null || target.trim().length() == 0) { + return target; + } + final StringBuffer sb = new StringBuffer(target.length()); + for (int i = 0; i < target.length(); i++) { + final char currentChar = target.charAt(i); + if (currentChar >= 0xff01 && currentChar <= 0xff5e) { + sb.append(toSingleByteCharacter(currentChar)); + + // TODO: @jflute - I will append mark... + } else if (currentChar == '\u2019' || currentChar == '\u2018' || currentChar == '\u2032') { + sb.append('\''); + } else if (currentChar == '\u201d' || currentChar == '\u201c' || currentChar == '\u2033') { + sb.append('\"'); + } else if (currentChar == '\uffe5') { + sb.append('\\'); + } else if (currentChar == '\u2010') { + sb.append('-'); + } else if (currentChar == '\uff5e') { + sb.append('~'); + + } else { + sb.append(currentChar); + } + } + return sb.toString(); + } + + protected char toSingleByteCharacter(final char currentChar) { + return (char) (currentChar - 0xfee0); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/helper/character/impl/JapaneseCharacterImpl.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/helper/character/impl/JapaneseCharacterImpl.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/helper/character/impl/JapaneseCharacterImpl.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,87 @@ +package jp.sf.pal.pompei.allcommon.helper.character.impl; + +import jp.sf.pal.pompei.allcommon.helper.character.JapaneseCharacter; + +/** + * The implementation of Japanese character. + * + * @author DBFlute(AutoGenerator) + */ +public class JapaneseCharacterImpl implements JapaneseCharacter { + + // Double-byte Katakana + protected static final String TABLE_ZENKANA = + "\u3002\u300c\u300d\u3001\u30fb\u30f2\u30a1\u30a3\u30a5" + + "\u30a7\u30a9\u30e3\u30e5\u30e7\u30c3\u30fc\u30a2\u30a4" + + "\u30a6\u30a8\u30aa\u30ab\u30ad\u30af\u30b1\u30b3\u30b5" + + "\u30b7\u30b9\u30bb\u30bd\u30bf\u30c1\u30c4\u30c6\u30c8" + + "\u30ca\u30cb\u30cc\u30cd\u30ce\u30cf\u30d2\u30d5\u30d8" + + "\u30db\u30de\u30df\u30e0\u30e1\u30e2\u30e4\u30e6\u30e8" + + "\u30e9\u30ea\u30eb\u30ec\u30ed\u30ef\u30f3\u309b\u309c"; + + // (uff71 - uff9d) + protected static final String DEF_DOUBLE_BYTE_VOICED_SOUND_NORMAL_KATAKANA = + "\u30a2\u30a4\u30f4\u30a8\u30aa" + + "\u30ac\u30ae\u30b0\u30b2\u30b4" + + "\u30b6\u30b8\u30ba\u30bc\u30be" + + "\u30c0\u30c2\u30c5\u30c7\u30c9" + + "\u30ca\u30cb\u30cc\u30cd\u30ce" + + "\u30d0\u30d3\u30d6\u30d9\u30dc" + + "\u30de\u30df\u30e0\u30e1\u30e2" + + "\u30e4\u30e6\u30e8" + + "\u30e9\u30ea\u30eb\u30ec\u30ed" + + "\u30ef\u30f3"; + + // (uff66 - uff6f) + protected static final String DEF_DOUBLE_BYTE_VOICED_SOUND_SPECIAL_KATAKANA = "\u30fa\u30a1\u30a3\u30a5\u30a7\u30a9\u30e3\u30e5\u30e7"; + + // (u30cf - u30dd) + protected static final String DEF_DOUBLE_BYTE_SEMI_VOICED_SOUND_KATAKANA = "\u30d1\u30d4\u30d7\u30da\u30dd"; + + public String toDoubleByteKatakana(String target) { + if (target == null || target.trim().length() == 0) { + return target; + } + + final StringBuffer sb = new StringBuffer(); + for (int i = 0; i < target.length(); i++) { + final char currentChar = target.charAt(i); + final char nextChar; + if (i < target.length() - 1) { + nextChar = target.charAt(i + 1); + } else { + nextChar = ' '; + } + + if (isVoicedSoundKatakana(currentChar, nextChar)) { + if (currentChar >= 0xff66 && currentChar <= 0xff6f) {// Voiced sound special Katakana + sb.append(DEF_DOUBLE_BYTE_VOICED_SOUND_SPECIAL_KATAKANA.charAt(currentChar - 0xff66)); + i++; + } else if (currentChar >= 0xff71 && currentChar <= 0xff9d) {// Voiced sound normal Katakana + sb.append(DEF_DOUBLE_BYTE_VOICED_SOUND_NORMAL_KATAKANA.charAt(currentChar - 0xff71)); + i++; + } + + } else if (isSemiVoicedSoundKatakana(currentChar, nextChar)) { + sb.append(DEF_DOUBLE_BYTE_SEMI_VOICED_SOUND_KATAKANA.charAt(currentChar - 0xff8a)); + i++; + } else if (currentChar != 0xff9e && currentChar != 0xff9f) { + if (currentChar >= 0xff61 && currentChar <= 0xff9f) { + sb.append(TABLE_ZENKANA.charAt(currentChar - 0xff61)); + } else { + sb.append(currentChar); + } + } + } + return sb.toString(); + } + + protected boolean isVoicedSoundKatakana(final char currentChar, final char nextChar) { + return ((currentChar >= 0xff66 && currentChar <= 0xff6f) || (currentChar >= 0xff71 && (currentChar <= 0xff9d))) + && (nextChar == 0xff9e); + } + + protected boolean isSemiVoicedSoundKatakana(final char currentChar, final char nextChar) { + return (currentChar >= 0xff8a && currentChar <= 0xff8e) && (nextChar == 0xff9f); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/helper/token/file/FileMakingCallback.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/helper/token/file/FileMakingCallback.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/helper/token/file/FileMakingCallback.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,17 @@ +package jp.sf.pal.pompei.allcommon.helper.token.file; + +/** + * @author DBFlute(AutoGenerator) + */ +public interface FileMakingCallback { + + /** + * Get file-making header information. + *
+     * You should return your row resource for file-making.
+     * It continues invoking until this method returns null.
+     * 
+ * @return File-making header information. (Nullable) + */ + public FileMakingRowResource getRowResource(); +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/helper/token/file/FileMakingHeaderInfo.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/helper/token/file/FileMakingHeaderInfo.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/helper/token/file/FileMakingHeaderInfo.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,23 @@ +package jp.sf.pal.pompei.allcommon.helper.token.file; + +import java.util.List; + +/** + * @author DBFlute(AutoGenerator) + */ +public class FileMakingHeaderInfo { + + protected List columnNameList = new java.util.ArrayList(); + + public List getColumnNameList() { + return columnNameList; + } + + public void setColumnNameList(List columnNameList) { + this.columnNameList = columnNameList; + } + + public boolean isEmpty() { + return this.columnNameList.isEmpty(); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/helper/token/file/FileMakingOption.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/helper/token/file/FileMakingOption.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/helper/token/file/FileMakingOption.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,103 @@ +package jp.sf.pal.pompei.allcommon.helper.token.file; + +/** + * @author DBFlute(AutoGenerator) + */ +public class FileMakingOption { + + // ===================================================================================== + // Attribute + // ========= + /** Encoding. (Required) */ + protected String _encoding; + + /** Delimiter. (Required) */ + protected String _delimiter; + + /** Line separator. (NotRequired) */ + protected String _lineSeparator; + + /** Good bye double quotation. (NotRequired) */ + protected boolean _goodByeDoubleQuotation; + + /** File-making header information. (NotRequired) */ + protected FileMakingHeaderInfo _fileMakingHeaderInfo; + + // ===================================================================================== + // Easy-to-Use + // =========== + public FileMakingOption delimitateByComma() { + _delimiter = ","; + return this; + } + + public FileMakingOption delimitateByTab() { + _delimiter = "\t"; + return this; + } + + public FileMakingOption encodeAsUTF8() { + _encoding = "UTF-8"; + return this; + } + + public FileMakingOption encodeAsWindows31J() { + _encoding = "Windows-31J"; + return this; + } + + public FileMakingOption separateCrLf() { + _lineSeparator = "\r\n"; + return this; + } + + public FileMakingOption separateLf() { + _lineSeparator = "\n"; + return this; + } + + public FileMakingOption goodByeDoubleQuotation() { + _goodByeDoubleQuotation = true; + return this; + } + + // ===================================================================================== + // Accessor + // ======== + public String getEncoding() { + return _encoding; + } + + public void setEncoding(String encoding) { + _encoding = encoding; + } + + public String getDelimiter() { + return _delimiter; + } + + public void setDelimiter(String delimiter) { + _delimiter = delimiter; + } + + public String getLineSeparator() { + return _lineSeparator; + } + + public void setLineSeparator(String lineSeparator) { + _lineSeparator = lineSeparator; + } + + public boolean isGoodByeDoubleQuotation() { + return _goodByeDoubleQuotation; + } + + public FileMakingHeaderInfo getFileMakingHeaderInfo() { + return _fileMakingHeaderInfo; + } + + public void setFileMakingHeaderInfo(FileMakingHeaderInfo fileMakingHeaderInfo) { + _fileMakingHeaderInfo = fileMakingHeaderInfo; + } + +} \ No newline at end of file Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/helper/token/file/FileMakingRowResource.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/helper/token/file/FileMakingRowResource.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/helper/token/file/FileMakingRowResource.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,23 @@ +package jp.sf.pal.pompei.allcommon.helper.token.file; + +/** + * @author DBFlute(AutoGenerator) + */ +public class FileMakingRowResource { + + // ===================================================================================== + // Attribute + // ========= + protected java.util.List _valueList; + + // ===================================================================================== + // Accessor + // ======== + public java.util.List getValueList() { + return _valueList; + } + + public void setValueList(java.util.List valueList) { + this._valueList = valueList; + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/helper/token/file/FileMakingSimpleFacade.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/helper/token/file/FileMakingSimpleFacade.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/helper/token/file/FileMakingSimpleFacade.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,29 @@ +package jp.sf.pal.pompei.allcommon.helper.token.file; + +/** + * @author DBFlute(AutoGenerator) + */ +public interface FileMakingSimpleFacade { + + /** + * Make token-file from row-list. + * + * @param filename Output target file name. (NotNull) + * @param rowList Row-list composed of value-list. (NotNull) + * @param fileMakingOption File-making option. (NotNull and Required{encoding and delimiter}) + * @throws java.io.FileNotFoundException + * @throws java.io.IOException + */ + public void makeFromRowList(final String filename, final java.util.List> rowList, final FileMakingOption fileMakingOption) throws java.io.FileNotFoundException, java.io.IOException; + + /** + * Make bytes from row-list. + * + * @param rowList Row-list composed of value-list. (NotNull) + * @param fileMakingOption File-making option. (NotNull and Required{encoding and delimiter}) + * @return Result byte array. (NotNull) + * @throws java.io.FileNotFoundException + * @throws java.io.IOException + */ + public byte[] makeFromRowList(final java.util.List> rowList, final FileMakingOption fileMakingOption) throws java.io.FileNotFoundException, java.io.IOException; +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/helper/token/file/FileToken.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/helper/token/file/FileToken.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/helper/token/file/FileToken.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,59 @@ +package jp.sf.pal.pompei.allcommon.helper.token.file; + +/** + * File-Token. + * + * @author DBFlute(AutoGenerator) + */ +public interface FileToken { + + /** + * Tokenize token-file data of a specified file. + * + * @param filename Input target file name. (NotNull) + * @param fileTokenizingCallback File-tokenizing callback. (NotNull) + * @param fileTokenizingOption File-tokenizing option. (NotNull and Required{encoding and delimiter}) + * @throws java.io.FileNotFoundException + * @throws java.io.IOException + */ + public void tokenize(String filename, FileTokenizingCallback fileTokenizingCallback, FileTokenizingOption fileTokenizingOption) throws java.io.FileNotFoundException, java.io.IOException; + + /** + * Tokenize token-file data of a specified file. + *
+     * This method uses java.io.InputStreamReader and java.io.BufferedReader that wrap the argument[inputStream].
+     * These objects are closed. (Invoking close() at finally)
+     * 
+ * @param inputStream Input target stream. (NotNull) + * @param fileTokenizingCallback File-tokenizing callback. (NotNull) + * @param fileTokenizingOption File-tokenizing option. (NotNull and Required{encoding and delimiter}) + * @throws java.io.FileNotFoundException + * @throws java.io.IOException + */ + public void tokenize(java.io.InputStream inputStream, FileTokenizingCallback fileTokenizingCallback, FileTokenizingOption fileTokenizingOption) throws java.io.FileNotFoundException, java.io.IOException; + + /** + * Make token-file from specified row resources. + * + * @param filename Output target file name. (NotNull) + * @param fileMakingCallback File-making callback. (NotNull) + * @param fileMakingOption File-making option. (NotNull and Required{encoding and delimiter}) + * @throws java.io.FileNotFoundException + * @throws java.io.IOException + */ + public void make(String filename, FileMakingCallback fileMakingCallback, FileMakingOption fileMakingOption) throws java.io.FileNotFoundException, java.io.IOException; + + /** + * Make token-file from specified row resources. + *
+     * This method uses java.io.BufferedOutputStream and java.io.OutputStreamWriter that wrap the argument[outputStream].
+     * These objects are closed. (Invoking close() at finally)
+     * 
+ * @param outputStream Output target stream. (NotNull) + * @param fileMakingCallback File-making callback. (NotNull) + * @param fileMakingOption File-making option. (NotNull and Required{encoding and delimiter}) + * @throws java.io.FileNotFoundException + * @throws java.io.IOException + */ + public void make(java.io.OutputStream outputStream, FileMakingCallback fileMakingCallback, FileMakingOption fileMakingOption) throws java.io.FileNotFoundException, java.io.IOException; +} \ No newline at end of file Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/helper/token/file/FileTokenizingCallback.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/helper/token/file/FileTokenizingCallback.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/helper/token/file/FileTokenizingCallback.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,8 @@ +package jp.sf.pal.pompei.allcommon.helper.token.file; + +/** + * @author DBFlute(AutoGenerator) + */ +public interface FileTokenizingCallback { + public void handleRowResource(FileTokenizingRowResource fileTokenizingRowResource); +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/helper/token/file/FileTokenizingHeaderInfo.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/helper/token/file/FileTokenizingHeaderInfo.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/helper/token/file/FileTokenizingHeaderInfo.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,42 @@ +package jp.sf.pal.pompei.allcommon.helper.token.file; + +import java.util.List; + +/** + * @author DBFlute(AutoGenerator) + */ +public class FileTokenizingHeaderInfo { + + // ===================================================================================== + // Attribute + // ========= + protected List _columnNameList = new java.util.ArrayList(); + + // ===================================================================================== + // Easy-to-Use + // =========== + protected String _columnNameRowString; + + public boolean isEmpty() { + return this._columnNameList.isEmpty(); + } + + // ===================================================================================== + // Accessor + // ======== + public List getColumnNameList() { + return _columnNameList; + } + + public void setColumnNameList(List columnNameList) { + this._columnNameList = columnNameList; + } + + public String getColumnNameRowString() { + return _columnNameRowString; + } + + public void setColumnNameRowString(String columnNameRowString) { + _columnNameRowString = columnNameRowString; + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/helper/token/file/FileTokenizingOption.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/helper/token/file/FileTokenizingOption.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/helper/token/file/FileTokenizingOption.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,78 @@ +package jp.sf.pal.pompei.allcommon.helper.token.file; + +/** + * @author DBFlute(AutoGenerator) + */ +public class FileTokenizingOption { + + // ===================================================================================== + // Attribute + // ========= + protected String _encoding; + + protected String _delimiter; + + protected boolean _beginFirstLine; + + protected boolean _handleEmptyAsNull; + + // ===================================================================================== + // Easy-to-Use + // =========== + public FileTokenizingOption delimitateByComma() { + _delimiter = ","; + return this; + } + + public FileTokenizingOption delimitateByTab() { + _delimiter = "\t"; + return this; + } + + public FileTokenizingOption encodeAsUTF8() { + _encoding = "UTF-8"; + return this; + } + + public FileTokenizingOption encodeAsWindows31J() { + _encoding = "Windows-31J"; + return this; + } + + public FileTokenizingOption beginFirstLine() { + _beginFirstLine = true; + return this; + } + + public FileTokenizingOption handleEmptyAsNull() { + _handleEmptyAsNull = true; + return this; + } + + // ===================================================================================== + // Accessor + // ======== + public String getDelimiter() { + return _delimiter; + } + + public void setDelimiter(String delimiter) { + _delimiter = delimiter; + } + + public String getEncoding() { + return _encoding; + } + + public void setEncoding(String encoding) { + _encoding = encoding; + } + + public boolean isBeginFirstLine() { + return _beginFirstLine; + } + + public boolean isHandleEmptyAsNull() { + return _handleEmptyAsNull; + } +} \ No newline at end of file Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/helper/token/file/FileTokenizingRowResource.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/helper/token/file/FileTokenizingRowResource.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/helper/token/file/FileTokenizingRowResource.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,65 @@ +package jp.sf.pal.pompei.allcommon.helper.token.file; + +/** + * @author DBFlute(AutoGenerator) + */ +public class FileTokenizingRowResource { + + // ===================================================================================== + // Attribute + // ========= + protected FileTokenizingHeaderInfo fileTokenizingHeaderInfo; + + protected java.util.List valueList; + + protected String rowString; + + /** The row number. */ + protected int _rowNumber; + + /** The line number. */ + protected int _lineNumber; + + // ===================================================================================== + // Accessor + // ======== + public FileTokenizingHeaderInfo getFileTokenizingHeaderInfo() { + return fileTokenizingHeaderInfo; + } + + public void setFirstLineInfo(FileTokenizingHeaderInfo fileTokenizingHeaderInfo) { + this.fileTokenizingHeaderInfo = fileTokenizingHeaderInfo; + } + + public java.util.List getValueList() { + return valueList; + } + + public void setValueList(java.util.List valueList) { + this.valueList = valueList; + } + + public String getRowString() { + return rowString; + } + + public void setRowString(String rowString) { + this.rowString = rowString; + } + + public int getRowNumber() { + return _rowNumber; + } + + public void setRowNumber(int rowNumber) { + _rowNumber = rowNumber; + } + + public int getLineNumber() { + return _lineNumber; + } + + public void setLineNumber(int lineNumber) { + _lineNumber = lineNumber; + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/helper/token/file/impl/FileMakingSimpleFacadeImpl.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/helper/token/file/impl/FileMakingSimpleFacadeImpl.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/helper/token/file/impl/FileMakingSimpleFacadeImpl.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,74 @@ +package jp.sf.pal.pompei.allcommon.helper.token.file.impl; + +import jp.sf.pal.pompei.allcommon.helper.token.file.FileToken; + +import jp.sf.pal.pompei.allcommon.helper.token.file.FileMakingCallback; +import jp.sf.pal.pompei.allcommon.helper.token.file.FileMakingOption; +import jp.sf.pal.pompei.allcommon.helper.token.file.FileMakingRowResource; +import jp.sf.pal.pompei.allcommon.helper.token.file.FileMakingSimpleFacade; + +/** + * @author DBFlute(AutoGenerator) + */ +public class FileMakingSimpleFacadeImpl implements FileMakingSimpleFacade { + + protected FileToken _fileToken = new FileTokenImpl(); + + public void setFileToken(FileToken fileToken) { + this._fileToken = fileToken; + } + + /** + * Make token-file from row-list. + * + * @param filename Output target file name. (NotNull) + * @param rowList Row-list composed of value-list. (NotNull) + * @param fileMakingOption File-making option. (NotNull and Required{encoding and delimiter}) + * @throws java.io.FileNotFoundException + * @throws java.io.IOException + */ + public void makeFromRowList(final String filename, final java.util.List> rowList, final FileMakingOption fileMakingOption) throws java.io.FileNotFoundException, java.io.IOException { + final FileMakingCallback fileMakingCallback = new FileMakingCallback() { + protected int rowCount = 0; + public FileMakingRowResource getRowResource() { + ++rowCount; + if (rowList.size() < rowCount) { + return null;// The End! + } + final java.util.List valueList = (java.util.List)rowList.get(rowCount - 1); + final FileMakingRowResource fileMakingRowResource = new FileMakingRowResource(); + fileMakingRowResource.setValueList(valueList); + return fileMakingRowResource; + } + }; + _fileToken.make(filename, fileMakingCallback, fileMakingOption); + } + + /** + * Make bytes from row-list. + * + * @param rowList Row-list composed of value-list. (NotNull) + * @param fileMakingOption File-making option. (NotNull and Required{encoding and delimiter}) + * @return Result byte array. (NotNull) + * @throws java.io.FileNotFoundException + * @throws java.io.IOException + */ + public byte[] makeFromRowList(final java.util.List> rowList, final FileMakingOption fileMakingOption) throws java.io.FileNotFoundException, java.io.IOException { + final FileMakingCallback fileMakingCallback = new FileMakingCallback() { + protected int rowCount = 0; + public FileMakingRowResource getRowResource() { + ++rowCount; + if (rowList.size() < rowCount) { + return null;// The End! + } + final java.util.List valueList = (java.util.List)rowList.get(rowCount - 1); + final FileMakingRowResource fileMakingRowResource = new FileMakingRowResource(); + fileMakingRowResource.setValueList(valueList); + return fileMakingRowResource; + } + }; + final java.io.ByteArrayOutputStream baos = new java.io.ByteArrayOutputStream(); + _fileToken.make(baos, fileMakingCallback, fileMakingOption); + return baos.toByteArray(); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/helper/token/file/impl/FileTokenImpl.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/helper/token/file/impl/FileTokenImpl.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/helper/token/file/impl/FileTokenImpl.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,502 @@ +package jp.sf.pal.pompei.allcommon.helper.token.file.impl; + +import java.util.List; +import java.util.ArrayList; + +import jp.sf.pal.pompei.allcommon.helper.token.file.FileToken; + +import jp.sf.pal.pompei.allcommon.helper.token.file.FileTokenizingCallback; +import jp.sf.pal.pompei.allcommon.helper.token.file.FileTokenizingOption; +import jp.sf.pal.pompei.allcommon.helper.token.file.FileTokenizingRowResource; +import jp.sf.pal.pompei.allcommon.helper.token.file.FileTokenizingHeaderInfo; + +import jp.sf.pal.pompei.allcommon.helper.token.file.FileMakingCallback; +import jp.sf.pal.pompei.allcommon.helper.token.file.FileMakingOption; +import jp.sf.pal.pompei.allcommon.helper.token.file.FileMakingRowResource; +import jp.sf.pal.pompei.allcommon.helper.token.file.FileMakingHeaderInfo; + +import jp.sf.pal.pompei.allcommon.helper.token.line.LineToken; +import jp.sf.pal.pompei.allcommon.helper.token.line.LineTokenizingOption; +import jp.sf.pal.pompei.allcommon.helper.token.line.LineMakingOption; +import jp.sf.pal.pompei.allcommon.helper.token.line.impl.LineTokenImpl; + +/** + * @author DBFlute(AutoGenerator) + */ +public class FileTokenImpl implements FileToken { + + // ===================================================================================== + // Attribute + // ========= + /** Line-token for help. */ + protected final LineToken _lineToken = new LineTokenImpl(); + + // ===================================================================================== + // Main + // ==== + /** + * Tokenize token-file data of a specified file. + * + * @param filename File name. (NotNull) + * @param fileTokenizingCallback File-tokenizing callback. (NotNull) + * @param fileTokenizingOption File-tokenizing option. (NotNull and Required{encoding and delimiter}) + * @throws java.io.FileNotFoundException + * @throws java.io.IOException + */ + public void tokenize(String filename, FileTokenizingCallback fileTokenizingCallback, FileTokenizingOption fileTokenizingOption) throws java.io.FileNotFoundException, java.io.IOException { + assertStringNotNullAndNotTrimmedEmpty("filename", filename); + + java.io.FileInputStream fis = null; + try { + fis = new java.io.FileInputStream(filename); + tokenize(fis, fileTokenizingCallback, fileTokenizingOption); + } catch (java.io.FileNotFoundException e) { + throw e; + } catch (java.io.IOException e) { + throw e; + } finally { + try { + if (fis != null) { + fis.close(); + } + } catch (java.io.IOException ignored) { + } + } + } + + + /** + * Tokenize token-file data of a specified file. + *
+     * This method uses java.io.InputStreamReader and java.io.BufferedReader that wrap the argument[inputStream].
+     * These objects are closed. (Invoking close() at finally)
+     * 
+ * @param inputStream Input target stream. (NotNull) + * @param fileTokenizingCallback File-tokenizing callback. (NotNull) + * @param fileTokenizingOption File-tokenizing option. (NotNull and Required{encoding and delimiter}) + * @throws java.io.FileNotFoundException + * @throws java.io.IOException + */ + public void tokenize(java.io.InputStream inputStream, FileTokenizingCallback fileTokenizingCallback, FileTokenizingOption fileTokenizingOption) throws java.io.FileNotFoundException, java.io.IOException { + assertObjectNotNull("inputStream", inputStream); + assertObjectNotNull("fileTokenizingCallback", fileTokenizingCallback); + assertObjectNotNull("fileTokenizingOption", fileTokenizingOption); + final String delimiter = fileTokenizingOption.getDelimiter(); + final String encoding = fileTokenizingOption.getEncoding(); + assertStringNotNullAndNotTrimmedEmpty("encoding", encoding); + assertObjectNotNull("delimiter", delimiter); + + java.io.InputStreamReader ir = null; + java.io.BufferedReader br = null; + + String lineString = null; + String preContinueString = ""; + final List temporaryValueList = new ArrayList(); + final List filteredValueList = new ArrayList(); + + try { + ir = new java.io.InputStreamReader(inputStream, encoding); + br = new java.io.BufferedReader(ir); + + FileTokenizingHeaderInfo fileTokenizingHeaderInfo = null; + int count = -1; + int rowNumber = 1; + int lineNumber = 0; + while (true) { + ++count; + if ("".equals(preContinueString)) { + lineNumber = count + 1; + } + + lineString = br.readLine(); + if (lineString == null) { + break; + } + if (count == 0) { + if (fileTokenizingOption.isBeginFirstLine()) { + fileTokenizingHeaderInfo = new FileTokenizingHeaderInfo();// As empty + } else { + fileTokenizingHeaderInfo = analyzeHeaderInfo(delimiter, lineString); + continue; + } + } + final String rowString; + if (preContinueString.equals("")) { + rowString = lineString; + } else { + final String lineSeparator = System.getProperty("line.separator"); + rowString = preContinueString + lineSeparator + lineString; + } + final ValueLineInfo valueLineInfo = arrangeValueList(rowString, delimiter); + final List ls = valueLineInfo.getValueList(); + if (valueLineInfo.isContinueNextLine()) { + preContinueString = (String)ls.remove(ls.size() - 1); + temporaryValueList.addAll(ls); + continue; + } + temporaryValueList.addAll(ls); + + try { + final FileTokenizingRowResource fileTokenizingRowResource = new FileTokenizingRowResource(); + fileTokenizingRowResource.setFirstLineInfo(fileTokenizingHeaderInfo); + + if (fileTokenizingOption.isHandleEmptyAsNull()) { + for (final java.util.Iterator ite = temporaryValueList.iterator(); ite.hasNext(); ) { + final String value = (String)ite.next(); + if ("".equals(value)) { + filteredValueList.add(null); + } else { + filteredValueList.add(value); + } + } + fileTokenizingRowResource.setValueList(filteredValueList); + } else { + fileTokenizingRowResource.setValueList(temporaryValueList); + } + + fileTokenizingRowResource.setRowString(rowString); + fileTokenizingRowResource.setRowNumber(rowNumber); + fileTokenizingRowResource.setLineNumber(lineNumber); + fileTokenizingCallback.handleRowResource(fileTokenizingRowResource); + } finally { + ++rowNumber; + temporaryValueList.clear(); + filteredValueList.clear(); + preContinueString = ""; + } + } + } catch (java.io.FileNotFoundException e) { + throw e; + } catch (java.io.IOException e) { + throw e; + } finally { + try { + if (ir != null) { + ir.close(); + } + if (br != null) { + br.close(); + } + } catch (java.io.IOException ignored) { + } + } + } + + protected ValueLineInfo arrangeValueList(final String lineString, String delimiter) { + final List valueList = new ArrayList(); + + // Don't use split! + // final String[] values = lineString.split(delimiter); + final LineTokenizingOption tokenizingOption = new LineTokenizingOption(); + tokenizingOption.setDelimiter(delimiter); + final List list = _lineToken.tokenize(lineString, tokenizingOption); + final String[] values = (String[])list.toArray(new String[list.size()]); + for (int i=0; i < values.length; i++) { + valueList.add(values[i]); + } + return arrangeValueList(valueList, delimiter); + } + + protected ValueLineInfo arrangeValueList(List valueList, String delimiter) { + final ValueLineInfo valueLineInfo = new ValueLineInfo(); + final ArrayList resultList = new ArrayList(); + String preString = ""; + for (int i = 0; i < valueList.size(); i++) { + final String value = (String)valueList.get(i); + if (value == null) { + continue; + } + if (i == valueList.size() - 1) {// The last loop + if (preString.equals("")) { + if (isFrontQOnly(value)) { + valueLineInfo.setContinueNextLine(true); + resultList.add(value); + break; + } else if (isRearQOnly(value)) { + resultList.add(value); + break; + } else if (isNotBothQ(value)) { + resultList.add(value); + break; + } else { + resultList.add(removeDoubleQuotation(value)); + break; + } + } else { + if (isFrontQOnly(value)) { + valueLineInfo.setContinueNextLine(true); + resultList.add(connectPreString(preString, delimiter, value)); + break; + } else if (isRearQOnly(value)) { + resultList.add(removeDoubleQuotation(connectPreString(preString, delimiter, value))); + break; + } else if (isNotBothQ(value)) { + valueLineInfo.setContinueNextLine(true); + resultList.add(connectPreString(preString, delimiter, value)); + break; + } else { + resultList.add(removeDoubleQuotation(connectPreString(preString, delimiter, value))); + break; + } + } + } + + if (preString.equals("")) { + if (isFrontQOnly(value)) { + preString = value; + continue; + } else if (isRearQOnly(value)) { + preString = value; + continue; + } else if (isNotBothQ(value)) { + resultList.add(value); + } else { + resultList.add(removeDoubleQuotation(value)); + } + } else { + if (isFrontQOnly(value)) { + preString = connectPreString(preString, delimiter, value); + continue; + } else if (isRearQOnly(value)) { + resultList.add(removeDoubleQuotation(connectPreString(preString, delimiter, value))); + } else if (isNotBothQ(value)) { + preString = connectPreString(preString, delimiter, value); + continue; + } else { + resultList.add(removeDoubleQuotation(connectPreString(preString, delimiter, value))); + } + } + preString = ""; + } + valueLineInfo.setValueList(resultList); + return valueLineInfo; + } + + protected String connectPreString(String preString, String delimiter, String value) { + if (preString.equals("")) { + return value; + } else { + return preString + delimiter + value; + } + } + + protected boolean isNotBothQ(final String value) { + return !value.startsWith("\"") && !value.endsWith("\""); + } + + protected boolean isRearQOnly(final String value) { + return !value.startsWith("\"") && value.endsWith("\""); + } + + protected boolean isFrontQOnly(final String value) { + return value.startsWith("\"") && !value.endsWith("\""); + } + + protected String removeDoubleQuotation(String value) { + if (!value.startsWith("\"") && !value.endsWith("\"")) { + return value; + } + if (value.startsWith("\"")) { + value = value.substring(1); + } + if (value.endsWith("\"")) { + value = value.substring(0, value.length() - 1); + } + return value; + } + + protected String removeRightDoubleQuotation(String value) { + if (value.endsWith("\"")) { + value = value.substring(0, value.length() - 1); + } + return value; + } + + protected FileTokenizingHeaderInfo analyzeHeaderInfo(String delimiter, final String lineString) { + final java.util.List columnNameList = new ArrayList(); + final String[] values = lineString.split(delimiter); + int count = 0; + for (int i=0; i < values.length; i++) { + String value = values[i]; + if (value == null) { + columnNameList.add(""); + } + value = value.trim();// Trimming is Header Only! + if (value.startsWith("\"") && value.endsWith("\"")) { + columnNameList.add(value.substring(1, value.length() - 1)); + } else { + columnNameList.add(value); + } + count++; + } + final FileTokenizingHeaderInfo fileTokenizingHeaderInfo = new FileTokenizingHeaderInfo(); + fileTokenizingHeaderInfo.setColumnNameList(columnNameList); + fileTokenizingHeaderInfo.setColumnNameRowString(lineString); + return fileTokenizingHeaderInfo; + } + + public static class ValueLineInfo { + protected java.util.List valueList; + + protected boolean continueNextLine; + + public java.util.List getValueList() { + return valueList; + } + + public void setValueList(List valueList) { + this.valueList = valueList; + } + + public boolean isContinueNextLine() { + return continueNextLine; + } + + public void setContinueNextLine(boolean continueNextLine) { + this.continueNextLine = continueNextLine; + } + } + + /** + * Make token-file from specified row resources. + * + * @param filename File name. (NotNull) + * @param fileMakingCallback File-making callback. (NotNull) + * @param fileMakingOption File-making option. (NotNull and Required{encoding and delimiter}) + * @throws java.io.FileNotFoundException + * @throws java.io.IOException + */ + public void make(String filename, FileMakingCallback fileMakingCallback, FileMakingOption fileMakingOption) throws java.io.FileNotFoundException, java.io.IOException { + assertStringNotNullAndNotTrimmedEmpty("filename", filename); + + java.io.FileOutputStream fos = null; + try { + fos = new java.io.FileOutputStream(filename); + make(fos, fileMakingCallback, fileMakingOption); + } catch (java.io.FileNotFoundException e) { + throw e; + } catch (java.io.IOException e) { + throw e; + } finally { + if (fos != null) { + fos.close(); + } + } + } + + /** + * Make token-file from specified row resources. + *
+     * This method uses java.io.BufferedOutputStream and java.io.OutputStreamWriter that wrap the argument[outputStream].
+     * These objects are closed. (Invoking close() at finally)
+     * 
+ * @param outputStream Output target stream. (NotNull) + * @param fileMakingCallback File-making callback. (NotNull) + * @param fileMakingOption File-making option. (NotNull and Required{encoding and delimiter}) + * @throws java.io.FileNotFoundException + * @throws java.io.IOException + */ + public void make(java.io.OutputStream outputStream, FileMakingCallback fileMakingCallback, FileMakingOption fileMakingOption) throws java.io.FileNotFoundException, java.io.IOException { + assertObjectNotNull("outputStream", outputStream); + assertObjectNotNull("fileMakingCallback", fileMakingCallback); + assertObjectNotNull("fileMakingOption", fileMakingOption); + final String encoding = fileMakingOption.getEncoding(); + final String delimiter = fileMakingOption.getDelimiter(); + assertStringNotNullAndNotTrimmedEmpty("encoding", encoding); + assertObjectNotNull("delimiter", delimiter); + final String lineSeparator; + if (fileMakingOption.getLineSeparator() != null && !fileMakingOption.getLineSeparator().equals("")) { + lineSeparator = fileMakingOption.getLineSeparator(); + } else { + lineSeparator = System.getProperty("line.separator");// Default! + } + + java.io.BufferedOutputStream bos = null; + java.io.Writer writer = null; + try { + bos = new java.io.BufferedOutputStream(outputStream); + writer = new java.io.OutputStreamWriter(bos, encoding); + + // Make header. + final FileMakingHeaderInfo fileMakingHeaderInfo = fileMakingOption.getFileMakingHeaderInfo(); + if (fileMakingHeaderInfo != null) { + final List columnNameList = fileMakingHeaderInfo.getColumnNameList(); + if (columnNameList != null && !columnNameList.isEmpty()) { + final LineMakingOption lineMakingOption = new LineMakingOption(); + lineMakingOption.setDelimiter(delimiter); + lineMakingOption.trimSpace();// Trimming is Header Only! + final String columnHeaderString = _lineToken.make(columnNameList, lineMakingOption); + writer.write(columnHeaderString + lineSeparator); + } + } + + // Make row. + FileMakingRowResource rowResource = null; + while (true) { + rowResource = fileMakingCallback.getRowResource(); + if (rowResource == null) { + break;// The End! + } + final java.util.List valueList = rowResource.getValueList(); + final LineMakingOption lineMakingOption = new LineMakingOption(); + lineMakingOption.setDelimiter(delimiter); + if (!fileMakingOption.isGoodByeDoubleQuotation()) { + lineMakingOption.quoteByDoubleQuotation(); + } + final String lineString = _lineToken.make(valueList, lineMakingOption); + writer.write(lineString + lineSeparator); + } + writer.flush(); + } catch (java.io.FileNotFoundException e) { + throw e; + } catch (java.io.IOException e) { + throw e; + } finally { + if (bos != null) { + bos.close(); + } + if (writer != null) { + writer.close(); + } + } + } + + // ---------------------------------------------------------------- + // Assert Object + // ------------- + /** + * Assert that the object is not null. + * + * @param variableName Variable name. (NotNull) + * @param value Value. (NotNull) + * @exception IllegalArgumentException + */ + protected void assertObjectNotNull(String variableName, Object value) { + if (variableName == null) { + String msg = "The value should not be null: variableName=" + variableName + " value=" + value; + throw new IllegalArgumentException(msg); + } + if (value == null) { + String msg = "The value should not be null: variableName=" + variableName; + throw new IllegalArgumentException(msg); + } + } + + // ---------------------------------------------------------------- + // Assert String + // ------------- + /** + * Assert that the entity is not null and not trimmed empty. + * + * @param variableName Variable name. (NotNull) + * @param value Value. (NotNull) + */ + protected void assertStringNotNullAndNotTrimmedEmpty(String variableName, String value) { + assertObjectNotNull("variableName", variableName); + assertObjectNotNull(variableName, value); + if (value.trim().length() ==0) { + String msg = "The value should not be empty: variableName=" + variableName + " value=" + value; + throw new IllegalArgumentException(msg); + } + } +} \ No newline at end of file Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/helper/token/line/LineMakingOption.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/helper/token/line/LineMakingOption.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/helper/token/line/LineMakingOption.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,49 @@ +package jp.sf.pal.pompei.allcommon.helper.token.line; + +/** + * @author DBFlute(AutoGenerator) + */ +public class LineMakingOption { + + protected String _delimiter; + + protected boolean _quoteByDoubleQuotation; + + protected boolean _trimSpace; + + public LineMakingOption delimitateByComma() { + _delimiter = ","; + return this; + } + + public LineMakingOption delimitateByTab() { + _delimiter = "\t"; + return this; + } + + public String getDelimiter() { + return _delimiter; + } + + public void setDelimiter(String delimiter) { + _delimiter = delimiter; + } + + public LineMakingOption quoteByDoubleQuotation() { + _quoteByDoubleQuotation = true; + return this; + } + + public boolean isQuoteByDoubleQuotation() { + return _quoteByDoubleQuotation; + } + + public LineMakingOption trimSpace() { + _trimSpace = true; + return this; + } + + public boolean isTrimSpace() { + return _trimSpace; + } +} \ No newline at end of file Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/helper/token/line/LineToken.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/helper/token/line/LineToken.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/helper/token/line/LineToken.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,11 @@ +package jp.sf.pal.pompei.allcommon.helper.token.line; + +/** + * @author DBFlute(AutoGenerator) + */ +public interface LineToken { + + public java.util.List tokenize(String lineString, LineTokenizingOption lineTokenizingOption); + + public String make(java.util.List valueList, LineMakingOption lineMakingOption); +} \ No newline at end of file Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/helper/token/line/LineTokenizingOption.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/helper/token/line/LineTokenizingOption.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/helper/token/line/LineTokenizingOption.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,58 @@ +package jp.sf.pal.pompei.allcommon.helper.token.line; + +/** + * @author DBFlute(AutoGenerator) + */ +public class LineTokenizingOption { + + // ===================================================================================== + // Attribute + // ========= + protected String _delimiter; + + protected boolean _trimDoubleQuotation; + + protected boolean _handleEmtpyAsNull; + + // ===================================================================================== + // Easy-to-Use + // =========== + public LineTokenizingOption delimitateByComma() { + _delimiter = ","; + return this; + } + + public LineTokenizingOption delimitateByTab() { + _delimiter = "\t"; + return this; + } + + public LineTokenizingOption trimDoubleQuotation() { + _trimDoubleQuotation = true; + return this; + } + + public LineTokenizingOption handleEmtpyAsNull() { + _handleEmtpyAsNull = true; + return this; + } + + // ===================================================================================== + // Accessor + // ======== + public String getDelimiter() { + return _delimiter; + } + + public void setDelimiter(String delimiter) { + _delimiter = delimiter; + } + + public boolean isTrimDoubleQuotation() { + return _trimDoubleQuotation; + } + + public boolean isHandleEmtpyAsNull() { + return _handleEmtpyAsNull; + } +} \ No newline at end of file Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/helper/token/line/impl/LineTokenImpl.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/helper/token/line/impl/LineTokenImpl.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/helper/token/line/impl/LineTokenImpl.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,111 @@ +package jp.sf.pal.pompei.allcommon.helper.token.line.impl; + +import jp.sf.pal.pompei.allcommon.helper.token.line.LineToken; +import jp.sf.pal.pompei.allcommon.helper.token.line.LineTokenizingOption; +import jp.sf.pal.pompei.allcommon.helper.token.line.LineMakingOption; + +/** + * @author DBFlute(AutoGenerator) + */ +public class LineTokenImpl implements LineToken { + + public java.util.List tokenize(String lineString, LineTokenizingOption lineTokenizingOption) { + final String delimiter = lineTokenizingOption.getDelimiter(); + final java.util.List list = new java.util.ArrayList(); + int i = 0; + int j = lineString.indexOf(delimiter); + for (int h = 0; j >= 0; h++) { + final String pureValue = lineString.substring(i, j); + if (lineTokenizingOption.isTrimDoubleQuotation()) { + final String before = pureValue; + if (before.length() > 1 && before.startsWith("\"") && before.endsWith("\"")) { + final String after = before.substring(1, before.length() - 1); + list.add(filterHandlingEmptyAsNull(after, lineTokenizingOption)); + } else { + list.add(filterHandlingEmptyAsNull(before, lineTokenizingOption)); + } + } else { + list.add(filterHandlingEmptyAsNull(pureValue, lineTokenizingOption)); + } + i = j + 1; + j = lineString.indexOf(delimiter, i); + } + list.add(filterHandlingEmptyAsNull(lineString.substring(i), lineTokenizingOption)); + return list; + } + + protected String filterHandlingEmptyAsNull(String target, LineTokenizingOption lineTokenizingOption) { + if (target == null) { + return null; + } + if (lineTokenizingOption.isHandleEmtpyAsNull() && "".equals(target)) { + return null; + } + return target; + } + + public String make(java.util.List valueList, LineMakingOption lineMakingOption) { + assertObjectNotNull("valueList", valueList); + assertObjectNotNull("lineMakingOption", lineMakingOption); + final String delimiter = lineMakingOption.getDelimiter(); + assertObjectNotNull("lineMakingOption.getDelimiter()", delimiter); + return createLineString(valueList, delimiter, lineMakingOption.isQuoteByDoubleQuotation(), lineMakingOption.isTrimSpace()); + } + + protected String createLineString(java.util.List valueList, String delimiter, boolean quoteByDoubleQuotation, boolean trimSpace) { + final StringBuffer sb = new StringBuffer(); + for (final java.util.Iterator ite = valueList.iterator(); ite.hasNext(); ) { + String value = (String)ite.next(); + value = (value != null ? value : ""); + if (trimSpace) { + value = value.trim(); + } + if (quoteByDoubleQuotation) { + sb.append(delimiter).append("\"").append(value).append("\""); + } else { + sb.append(delimiter).append(value); + } + } + sb.delete(0, delimiter.length()); + return sb.toString(); + } + + // ---------------------------------------------------------------- + // Assert Object + // ------------- + /** + * Assert that the object is not null. + * + * @param variableName Variable name. (NotNull) + * @param value Value. (NotNull) + * @exception IllegalArgumentException + */ + protected void assertObjectNotNull(String variableName, Object value) { + if (variableName == null) { + String msg = "The value should not be null: variableName=" + variableName + " value=" + value; + throw new IllegalArgumentException(msg); + } + if (value == null) { + String msg = "The value should not be null: variableName=" + variableName; + throw new IllegalArgumentException(msg); + } + } + + // ---------------------------------------------------------------- + // Assert String + // ------------- + /** + * Assert that the entity is not null and not trimmed empty. + * + * @param variableName Variable name. (NotNull) + * @param value Value. (NotNull) + */ + protected void assertStringNotNullAndNotTrimmedEmpty(String variableName, String value) { + assertObjectNotNull("variableName", variableName); + assertObjectNotNull(variableName, value); + if (value.trim().length() ==0) { + String msg = "The value should not be empty: variableName=" + variableName + " value=" + value; + throw new IllegalArgumentException(msg); + } + } +} \ No newline at end of file Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/interceptor/CommonColumnSetupAbstractInterceptor.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/interceptor/CommonColumnSetupAbstractInterceptor.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/interceptor/CommonColumnSetupAbstractInterceptor.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,127 @@ +package jp.sf.pal.pompei.allcommon.interceptor; + +import org.aopalliance.intercept.MethodInvocation; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +import jp.sf.pal.pompei.allcommon.EntityDefinedCommonColumn; + +/** + * CommonColumn-Setup Abstract Interceptor. + * + * @author DBFlute(AutoGenerator) + */ +public abstract class CommonColumnSetupAbstractInterceptor extends org.seasar.framework.aop.interceptors.AbstractInterceptor { + + /** Serial version UID. (Default) */ + private static final long serialVersionUID = 1L; + + /** Log-instance. */ + private static final Log _log = LogFactory.getLog(CommonColumnSetupAbstractInterceptor.class); + + /** + * Invoke. + * + * @param invocation Method invocation. + * @return Result of the method. + * @throws Throwable + */ + public Object invoke(MethodInvocation invocation) throws Throwable { + final java.lang.reflect.Method method = invocation.getMethod(); + final Object[] args = invocation.getArguments(); + + if (!(args != null && args.length != 0)) { + return invocation.proceed(); + } + final Object firstArgument = args[0]; + if (isEntityDefinedCommonColumn(firstArgument)) { + final EntityDefinedCommonColumn entity = (EntityDefinedCommonColumn)firstArgument; + if (_log.isDebugEnabled()) { + String msg = "Intercepted the method '" + getShortClassName(method.getDeclaringClass()) + "." + method.getName() + "()'"; + msg = msg + ": entity=" + entity.extractPrimaryKeyMapString(); + _log.debug(msg); + } + setupEntity(entity); + return invocation.proceed(); + } else if (isListSaveEntityDefinedCommonColumn(firstArgument)) { + final java.util.List ls = (java.util.List)firstArgument; + if (_log.isDebugEnabled()) { + String msg = "Intercepted the method '" + getShortClassName(method.getDeclaringClass()) + "." + method.getName() + "()'"; + msg = msg + ": entityList.size()=" + ls.size(); + _log.debug(msg); + } + for (final java.util.Iterator ite = ls.iterator(); ite.hasNext(); ) { + final EntityDefinedCommonColumn entity = (EntityDefinedCommonColumn)ite.next(); + setupEntity(entity); + } + return invocation.proceed(); + } else { + return invocation.proceed(); + } + } + + /** + * Is the object entity defined common column? + * + * @param obj Object. If the object is null, returns false. (Nullable) + * @return Determination. + */ + protected boolean isEntityDefinedCommonColumn(Object obj) { + if (obj == null) { + return false; + } + if (obj instanceof EntityDefinedCommonColumn) { + return true; + } else { + return false; + } + } + + /** + * Is the object list that saves entity defined common column? + * + * @param obj Object. If the object is null, returns false. (Nullable) + * @return Determination. + */ + protected boolean isListSaveEntityDefinedCommonColumn(Object obj) { + if (obj == null) { + return false; + } + if (!(obj instanceof java.util.List)) { + return false; + } + final java.util.List ls = (java.util.List)obj; + for (final java.util.Iterator ite = ls.iterator(); ite.hasNext(); ) { + final Object currentObj = ite.next(); + if (!(currentObj instanceof EntityDefinedCommonColumn)) { + return false; + } + } + return true; + } + + /** + * Set up the entity. + * + * @param entity Entity. (Nullable) + */ + abstract protected void setupEntity(EntityDefinedCommonColumn entity); + + // ===================================================================================== + // Helper + // ====== + /** + * Get short class name. + * + * @param clazz Class instance. (NotNull) + * @return Short class name. (NotNull) + */ + protected String getShortClassName(Class clazz) { + String s = clazz.getName(); + int i = s.lastIndexOf('.'); + if (i > 0) { + return s.substring(i + 1); + } + return s; + } +} \ No newline at end of file Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/interceptor/CommonColumnSetupBeforeDeleteInterceptor.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/interceptor/CommonColumnSetupBeforeDeleteInterceptor.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/interceptor/CommonColumnSetupBeforeDeleteInterceptor.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,35 @@ +package jp.sf.pal.pompei.allcommon.interceptor; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +import jp.sf.pal.pompei.allcommon.EntityDefinedCommonColumn; + +/** + * CommonColumn-Setup-before-Delete Interceptor. + * + * @author DBFlute(AutoGenerator) + */ +public class CommonColumnSetupBeforeDeleteInterceptor extends CommonColumnSetupAbstractInterceptor { + + /** Serial version UID. (Default) */ + private static final long serialVersionUID = 1L; + + /** Log-instance. */ + private static final Log _log = LogFactory.getLog(CommonColumnSetupBeforeDeleteInterceptor.class); + + /** + * Set up the entity. + * + * @param entity Entity. (Nullable) + */ + protected void setupEntity(EntityDefinedCommonColumn entity) { + if (_log.isDebugEnabled()) { + _log.debug(" before setup : " + entity.getDBMeta().extractCommonColumnValueMapString(entity)); + } + + if (_log.isDebugEnabled()) { + _log.debug(" after setup : " + entity.getDBMeta().extractCommonColumnValueMapString(entity)); + } + } +} \ No newline at end of file Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/interceptor/CommonColumnSetupBeforeInsertInterceptor.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/interceptor/CommonColumnSetupBeforeInsertInterceptor.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/interceptor/CommonColumnSetupBeforeInsertInterceptor.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,35 @@ +package jp.sf.pal.pompei.allcommon.interceptor; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +import jp.sf.pal.pompei.allcommon.EntityDefinedCommonColumn; + +/** + * CommonColumn-Setup-before-Insert Interceptor. + * + * @author DBFlute(AutoGenerator) + */ +public class CommonColumnSetupBeforeInsertInterceptor extends CommonColumnSetupAbstractInterceptor { + + /** Serial version UID. (Default) */ + private static final long serialVersionUID = 1L; + + /** Log-instance. */ + private static final Log _log = LogFactory.getLog(CommonColumnSetupBeforeInsertInterceptor.class); + + /** + * Set up the entity. + * + * @param entity Entity. (Nullable) + */ + protected void setupEntity(EntityDefinedCommonColumn entity) { + if (_log.isDebugEnabled()) { + _log.debug(" before setup : " + entity.getDBMeta().extractCommonColumnValueMapString(entity)); + } + + if (_log.isDebugEnabled()) { + _log.debug(" after setup : " + entity.getDBMeta().extractCommonColumnValueMapString(entity)); + } + } +} \ No newline at end of file Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/interceptor/CommonColumnSetupBeforeUpdateInterceptor.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/interceptor/CommonColumnSetupBeforeUpdateInterceptor.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/interceptor/CommonColumnSetupBeforeUpdateInterceptor.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,35 @@ +package jp.sf.pal.pompei.allcommon.interceptor; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +import jp.sf.pal.pompei.allcommon.EntityDefinedCommonColumn; + +/** + * CommonColumn-Setup-before-Update Interceptor. + * + * @author DBFlute(AutoGenerator) + */ +public class CommonColumnSetupBeforeUpdateInterceptor extends CommonColumnSetupAbstractInterceptor { + + /** Serial version UID. (Default) */ + private static final long serialVersionUID = 1L; + + /** Log-instance. */ + private static final Log _log = LogFactory.getLog(CommonColumnSetupBeforeUpdateInterceptor.class); + + /** + * Set up the entity. + * + * @param entity Entity. (Nullable) + */ + protected void setupEntity(EntityDefinedCommonColumn entity) { + if (_log.isDebugEnabled()) { + _log.debug(" before setup : " + entity.getDBMeta().extractCommonColumnValueMapString(entity)); + } + + if (_log.isDebugEnabled()) { + _log.debug(" after setup : " + entity.getDBMeta().extractCommonColumnValueMapString(entity)); + } + } +} \ No newline at end of file Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/jdbc/history/PreparedExecutionBean.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/jdbc/history/PreparedExecutionBean.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/jdbc/history/PreparedExecutionBean.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,46 @@ +package jp.sf.pal.pompei.allcommon.jdbc.history; + +/** + * The bean of prepared execution. + * + * @author DBFlute(AutoGenerator) + */ +public class PreparedExecutionBean { + + // =================================================================================== + // Attribute + // ========= + protected java.util.List preparedParameterElementList = new java.util.ArrayList(); + + protected String displaySql; + + // =================================================================================== + // Easy-to-Use + // =========== + public void addParameterElement(PreparedParameterElement parameterElement) { + this.preparedParameterElementList.add(parameterElement); + } + + public boolean isEmpty() { + return preparedParameterElementList.isEmpty(); + } + + public int size() { + return preparedParameterElementList.size(); + } + + // =================================================================================== + // Accessor + // ======== + public java.util.List getPreparedParameterElementList() { + return preparedParameterElementList; + } + + public String getDisplaySql() { + return displaySql; + } + + public void setDisplaySql(String displaySql) { + this.displaySql = displaySql; + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/jdbc/history/PreparedParameterElement.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/jdbc/history/PreparedParameterElement.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/jdbc/history/PreparedParameterElement.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,46 @@ +package jp.sf.pal.pompei.allcommon.jdbc.history; + +/** + * The element of prepared parameters. + * + * @author DBFlute(AutoGenerator) + */ +public class PreparedParameterElement { + + // ===================================================================================== + // Attribute + // ========= + protected int settingIndex; + + /** JDBC type. (java.sql.Types) */ + protected int jdbcType; + + protected Object parameterValue; + + // ===================================================================================== + // Accessor + // ======== + public int getSettingIndex() { + return settingIndex; + } + + public void setSettingIndex(int settingIndex) { + this.settingIndex = settingIndex; + } + + public int getJdbcType() { + return jdbcType; + } + + public void setJdbcType(int jdbcType) { + this.jdbcType = jdbcType; + } + + public Object getParameterValue() { + return parameterValue; + } + + public void setParameterValue(Object parameterValue) { + this.parameterValue = parameterValue; + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/jdbc/history/StatementHistory.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/jdbc/history/StatementHistory.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/jdbc/history/StatementHistory.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,48 @@ +package jp.sf.pal.pompei.allcommon.jdbc.history; + +/** + * The history of statement. + * + * @author DBFlute(AutoGenerator) + */ +public class StatementHistory { + + // =================================================================================== + // Attribute + // ========= + protected java.util.List preparedExecutionBeanList = new java.util.ArrayList(); + + // =================================================================================== + // Easy-to-Use + // =========== + public void addExecutionBean(PreparedExecutionBean parameterBean) { + this.preparedExecutionBeanList.add(parameterBean); + } + + public PreparedExecutionBean current() { + if (preparedExecutionBeanList.isEmpty()) { + preparedExecutionBeanList.add(new PreparedExecutionBean()); + } + return preparedExecutionBeanList.get(preparedExecutionBeanList.size() - 1); + } + + public PreparedExecutionBean next() { + preparedExecutionBeanList.add(new PreparedExecutionBean()); + return current(); + } + + public PreparedExecutionBean removeLast() { + return preparedExecutionBeanList.remove(preparedExecutionBeanList.size() - 1); + } + + public int size() { + return preparedExecutionBeanList.size(); + } + + // =================================================================================== + // Accessor + // ======== + public java.util.List getPreparedExecutionBeanList() { + return preparedExecutionBeanList; + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/jdbc/history/StatementHistoryWitness.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/jdbc/history/StatementHistoryWitness.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/jdbc/history/StatementHistoryWitness.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,16 @@ +package jp.sf.pal.pompei.allcommon.jdbc.history; + +/** + * The interface of statement history witness. + * + * @author DBFlute(AutoGenerator) + */ +public interface StatementHistoryWitness { + + /** + * Witness the history. + * + * @param statementHistory Statement history. (NotNull) + */ + public void witnessTheHistory(StatementHistory statementHistory); +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/jdbc/history/TraceablePreparedStatement.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/jdbc/history/TraceablePreparedStatement.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/jdbc/history/TraceablePreparedStatement.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,525 @@ +package jp.sf.pal.pompei.allcommon.jdbc.history; + +import java.io.InputStream; +import java.io.Reader; +import java.math.BigDecimal; +import java.net.URL; +import java.sql.Array; +import java.sql.Blob; +import java.sql.Clob; +import java.sql.Connection; +import java.sql.Date; +import java.sql.ParameterMetaData; +import java.sql.PreparedStatement; +import java.sql.Ref; +import java.sql.ResultSet; +import java.sql.ResultSetMetaData; +import java.sql.SQLException; +import java.sql.SQLWarning; +import java.sql.Time; +import java.sql.Timestamp; +import java.sql.Types; +import java.text.SimpleDateFormat; +import java.util.Calendar; + +/** + * The implementation of prepared statement as traceable prepared statement. + * + * @author DBFlute(AutoGenerator) + */ +public class TraceablePreparedStatement implements PreparedStatement { + + // =================================================================================== + // Attribute + // ========= + protected PreparedStatement preparedStatement; + + protected String preparedSql; + + protected StatementHistory statementHistory = new StatementHistory(); + + protected StatementHistoryWitness statementHistoryWitness; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param preparedStatement Wrap target prepared statement. (NotNull) + * @param preparedSql Prepared sql. (NotNull) + */ + public TraceablePreparedStatement(PreparedStatement preparedStatement, String preparedSql, StatementHistoryWitness statementHistoryWitness) { + this.preparedStatement = preparedStatement; + this.preparedSql = preparedSql; + this.statementHistoryWitness = statementHistoryWitness; + } + + // =================================================================================== + // Delegate + // ======== + // ----------------------------------------------------- + // Add-Batch + // --------- + public void addBatch() throws SQLException { + moveNextBatchPoint(); + preparedStatement.addBatch(); + } + + public void addBatch(String sql) throws SQLException { + preparedStatement.addBatch(sql); + } + + // ----------------------------------------------------- + // Cancel + // ------ + public void cancel() throws SQLException { + preparedStatement.cancel(); + } + + // ----------------------------------------------------- + // Clear + // ----- + public void clearBatch() throws SQLException { + preparedStatement.clearBatch(); + } + + public void clearParameters() throws SQLException { + preparedStatement.clearParameters(); + } + + public void clearWarnings() throws SQLException { + preparedStatement.clearWarnings(); + } + + // ----------------------------------------------------- + // Close + // ----- + public void close() throws SQLException { + preparedStatement.close(); + } + + // ----------------------------------------------------- + // Execute + // ------- + public boolean execute() throws SQLException { + traceSql(preparedSql); + return preparedStatement.execute(); + } + + public boolean execute(String sql, int autoGeneratedKeys) throws SQLException { + traceSql(sql); + return preparedStatement.execute(sql, autoGeneratedKeys); + } + + public boolean execute(String sql, int[] columnIndexes) throws SQLException { + traceSql(sql); + return preparedStatement.execute(sql, columnIndexes); + } + + public boolean execute(String sql, String[] columnNames) throws SQLException { + traceSql(sql); + return preparedStatement.execute(sql, columnNames); + } + + public boolean execute(String sql) throws SQLException { + traceSql(sql); + return preparedStatement.execute(sql); + } + + public int[] executeBatch() throws SQLException { + traceSql(preparedSql); + return preparedStatement.executeBatch(); + } + + public ResultSet executeQuery() throws SQLException { + traceSql(preparedSql); + return preparedStatement.executeQuery(); + } + + public ResultSet executeQuery(String sql) throws SQLException { + traceSql(sql); + return preparedStatement.executeQuery(sql); + } + + public int executeUpdate() throws SQLException { + traceSql(preparedSql); + return preparedStatement.executeUpdate(); + } + + public int executeUpdate(String sql, int autoGeneratedKeys) throws SQLException { + traceSql(sql); + return preparedStatement.executeUpdate(sql, autoGeneratedKeys); + } + + public int executeUpdate(String sql, int[] columnIndexes) throws SQLException { + traceSql(sql); + return preparedStatement.executeUpdate(sql, columnIndexes); + } + + public int executeUpdate(String sql, String[] columnNames) throws SQLException { + traceSql(sql); + return preparedStatement.executeUpdate(sql, columnNames); + } + + public int executeUpdate(String sql) throws SQLException { + traceSql(sql); + return preparedStatement.executeUpdate(sql); + } + + // ----------------------------------------------------- + // Other + // ----- + public Connection getConnection() throws SQLException { + return preparedStatement.getConnection(); + } + + public int getFetchDirection() throws SQLException { + return preparedStatement.getFetchDirection(); + } + + public int getFetchSize() throws SQLException { + return preparedStatement.getFetchSize(); + } + + public ResultSet getGeneratedKeys() throws SQLException { + return preparedStatement.getGeneratedKeys(); + } + + public int getMaxFieldSize() throws SQLException { + return preparedStatement.getMaxFieldSize(); + } + + public int getMaxRows() throws SQLException { + return preparedStatement.getMaxRows(); + } + + public ResultSetMetaData getMetaData() throws SQLException { + return preparedStatement.getMetaData(); + } + + public boolean getMoreResults() throws SQLException { + return preparedStatement.getMoreResults(); + } + + public boolean getMoreResults(int current) throws SQLException { + return preparedStatement.getMoreResults(current); + } + + public ParameterMetaData getParameterMetaData() throws SQLException { + return preparedStatement.getParameterMetaData(); + } + + public int getQueryTimeout() throws SQLException { + return preparedStatement.getQueryTimeout(); + } + + public ResultSet getResultSet() throws SQLException { + return preparedStatement.getResultSet(); + } + + public int getResultSetConcurrency() throws SQLException { + return preparedStatement.getResultSetConcurrency(); + } + + public int getResultSetHoldability() throws SQLException { + return preparedStatement.getResultSetHoldability(); + } + + public int getResultSetType() throws SQLException { + return preparedStatement.getResultSetType(); + } + + public int getUpdateCount() throws SQLException { + return preparedStatement.getUpdateCount(); + } + + public SQLWarning getWarnings() throws SQLException { + return preparedStatement.getWarnings(); + } + + // ----------------------------------------------------- + // Setting Parameter + // ----------------- + public void setArray(int parameterIndex, Array x) throws SQLException { + registerPreparedParameter(parameterIndex, Types.ARRAY, x); + preparedStatement.setArray(parameterIndex, x); + } + + public void setAsciiStream(int parameterIndex, InputStream x, int length) throws SQLException { + preparedStatement.setAsciiStream(parameterIndex, x, length); + } + + public void setBigDecimal(int parameterIndex, BigDecimal x) throws SQLException { + registerPreparedParameter(parameterIndex, Types.DECIMAL, x); + preparedStatement.setBigDecimal(parameterIndex, x); + } + + public void setBinaryStream(int parameterIndex, InputStream x, int length) throws SQLException { + preparedStatement.setBinaryStream(parameterIndex, x, length); + } + + public void setBlob(int i, Blob x) throws SQLException { + registerPreparedParameter(i, Types.BLOB, x); + preparedStatement.setBlob(i, x); + } + + public void setBoolean(int parameterIndex, boolean x) throws SQLException { + registerPreparedParameter(parameterIndex, Types.BOOLEAN, x); + preparedStatement.setBoolean(parameterIndex, x); + } + + public void setByte(int parameterIndex, byte x) throws SQLException { + preparedStatement.setByte(parameterIndex, x); + } + + public void setBytes(int parameterIndex, byte[] x) throws SQLException { + preparedStatement.setBytes(parameterIndex, x); + } + + public void setCharacterStream(int parameterIndex, Reader reader, int length) throws SQLException { + // *Out of target about registering prepared parameter. + preparedStatement.setCharacterStream(parameterIndex, reader, length); + } + + public void setClob(int i, Clob x) throws SQLException { + registerPreparedParameter(i, Types.CLOB, x); + preparedStatement.setClob(i, x); + } + + public void setCursorName(String name) throws SQLException { + preparedStatement.setCursorName(name); + } + + public void setDate(int parameterIndex, Date x, Calendar cal) throws SQLException { + registerPreparedParameter(parameterIndex, Types.DATE, x); + preparedStatement.setDate(parameterIndex, x, cal); + } + + public void setDate(int parameterIndex, Date x) throws SQLException { + registerPreparedParameter(parameterIndex, Types.DATE, x); + preparedStatement.setDate(parameterIndex, x); + } + + public void setDouble(int parameterIndex, double x) throws SQLException { + registerPreparedParameter(parameterIndex, Types.DOUBLE, x); + preparedStatement.setDouble(parameterIndex, x); + } + + public void setEscapeProcessing(boolean enable) throws SQLException { + preparedStatement.setEscapeProcessing(enable); + } + + public void setFetchDirection(int direction) throws SQLException { + preparedStatement.setFetchDirection(direction); + } + + public void setFetchSize(int rows) throws SQLException { + preparedStatement.setFetchSize(rows); + } + + public void setFloat(int parameterIndex, float x) throws SQLException { + registerPreparedParameter(parameterIndex, Types.FLOAT, x); + preparedStatement.setFloat(parameterIndex, x); + } + + public void setInt(int parameterIndex, int x) throws SQLException { + registerPreparedParameter(parameterIndex, Types.INTEGER, x); + preparedStatement.setInt(parameterIndex, x); + } + + public void setLong(int parameterIndex, long x) throws SQLException { + registerPreparedParameter(parameterIndex, Types.LONGVARCHAR, x); + preparedStatement.setLong(parameterIndex, x); + } + + public void setMaxFieldSize(int max) throws SQLException { + preparedStatement.setMaxFieldSize(max); + } + + public void setMaxRows(int max) throws SQLException { + preparedStatement.setMaxRows(max); + } + + public void setNull(int paramIndex, int sqlType, String typeName) throws SQLException { + registerPreparedParameter(paramIndex, Types.NULL, null); + preparedStatement.setNull(paramIndex, sqlType, typeName); + } + + public void setNull(int parameterIndex, int sqlType) throws SQLException { + registerPreparedParameter(parameterIndex, Types.NULL, null); + preparedStatement.setNull(parameterIndex, sqlType); + } + + public void setObject(int parameterIndex, Object x, int targetSqlType, int scale) throws SQLException { + registerPreparedParameter(parameterIndex, Types.OTHER, x); + preparedStatement.setObject(parameterIndex, x, targetSqlType, scale); + } + + public void setObject(int parameterIndex, Object x, int targetSqlType) throws SQLException { + registerPreparedParameter(parameterIndex, Types.OTHER, x); + preparedStatement.setObject(parameterIndex, x, targetSqlType); + } + + public void setObject(int parameterIndex, Object x) throws SQLException { + registerPreparedParameter(parameterIndex, Types.OTHER, x); + preparedStatement.setObject(parameterIndex, x); + } + + public void setQueryTimeout(int seconds) throws SQLException { + preparedStatement.setQueryTimeout(seconds); + } + + public void setRef(int i, Ref x) throws SQLException { + preparedStatement.setRef(i, x); + } + + public void setShort(int parameterIndex, short x) throws SQLException { + registerPreparedParameter(parameterIndex, Types.INTEGER, x); + preparedStatement.setShort(parameterIndex, x); + } + + public void setString(int parameterIndex, String x) throws SQLException { + registerPreparedParameter(parameterIndex, Types.VARCHAR, x); + preparedStatement.setString(parameterIndex, x); + } + + public void setTime(int parameterIndex, Time x, Calendar cal) throws SQLException { + registerPreparedParameter(parameterIndex, Types.TIME, x); + preparedStatement.setTime(parameterIndex, x, cal); + } + + public void setTime(int parameterIndex, Time x) throws SQLException { + registerPreparedParameter(parameterIndex, Types.TIME, x); + preparedStatement.setTime(parameterIndex, x); + } + + public void setTimestamp(int parameterIndex, Timestamp x, Calendar cal) throws SQLException { + registerPreparedParameter(parameterIndex, Types.TIMESTAMP, x); + preparedStatement.setTimestamp(parameterIndex, x, cal); + } + + public void setTimestamp(int parameterIndex, Timestamp x) throws SQLException { + registerPreparedParameter(parameterIndex, Types.TIMESTAMP, x); + preparedStatement.setTimestamp(parameterIndex, x); + } + + /** + * @deprecated + */ + public void setUnicodeStream(int parameterIndex, InputStream x, int length) throws SQLException { + preparedStatement.setUnicodeStream(parameterIndex, x, length); + } + + public void setURL(int parameterIndex, URL x) throws SQLException { + preparedStatement.setURL(parameterIndex, x); + } + + // =================================================================================== + // Trace + // ===== + protected void traceSql(String sql) { + if (statementHistory.current().isEmpty()) { + statementHistory.removeLast(); + } + setupSqlDisplayList(sql); + statementHistoryWitness.witnessTheHistory(statementHistory); + } + + protected void registerPreparedParameter(int settingIndex, int jdbcType, Object parameterValue) { + final PreparedParameterElement parameterElement = createPreparedParameterElement(settingIndex, jdbcType, parameterValue); + statementHistory.current().addParameterElement(parameterElement); + } + + protected PreparedParameterElement createPreparedParameterElement(int settingIndex, int jdbcType, Object parameterValue) { + final PreparedParameterElement element = new PreparedParameterElement(); + element.setSettingIndex(settingIndex); + element.setJdbcType(jdbcType); + element.setParameterValue(parameterValue); + return element; + } + + // =================================================================================== + // Set up + // ====== + protected void setupSqlDisplayList(String realSql) { + final java.util.List executionBeanList = statementHistory.getPreparedExecutionBeanList(); + for (PreparedExecutionBean executionBean : executionBeanList) { + if (executionBean.isEmpty()) { + continue; + } + final Object[] args = new Object[executionBean.size()]; + int index = 0; + final java.util.List parameterElementList = executionBean.getPreparedParameterElementList(); + for (PreparedParameterElement parameterElement : parameterElementList) { + final Object parameterValue = parameterElement.getParameterValue(); + args[index] = parameterValue; + ++index; + } + final String displaySql = getCompleteSql(realSql, args); + executionBean.setDisplaySql(displaySql); + } + } + + // =================================================================================== + // Batch + // ===== + protected void moveNextBatchPoint() { + statementHistory.next(); + } + + // =================================================================================== + // Helper + // ====== + protected String getCompleteSql(String sql, Object[] args) { + if (args == null || args.length == 0) { + return sql; + } + StringBuffer buf = new StringBuffer(200); + int pos = 0; + int pos2 = 0; + int pos3 = 0; + int pos4 = 0; + int index = 0; + while (true) { + pos = sql.indexOf('?', pos2); + pos3 = sql.indexOf('\'', pos2); + pos4 = sql.indexOf('\'', pos3 + 1); + if (pos > 0) { + if (pos3 >= 0 && pos3 < pos && pos < pos4) { + buf.append(sql.substring(pos2, pos4 + 1)); + pos2 = pos4 + 1; + } else { + buf.append(sql.substring(pos2, pos)); + buf.append(getBindVariableText(args[index++])); + pos2 = pos + 1; + } + } else { + buf.append(sql.substring(pos2)); + break; + } + } + return buf.toString(); + } + + protected String getBindVariableText(Object bindVariable) { + if (bindVariable instanceof String) { + return "'" + bindVariable + "'"; + } else if (bindVariable instanceof Number) { + return bindVariable.toString(); + } else if (bindVariable instanceof Timestamp) { + SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH.mm.ss"); + return "'" + sdf.format((java.util.Date) bindVariable) + "'"; + } else if (bindVariable instanceof java.util.Date) { + SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); + return "'" + sdf.format((java.util.Date) bindVariable) + "'"; + } else if (bindVariable instanceof Boolean) { + return bindVariable.toString(); + } else if (bindVariable == null) { + return "null"; + } else { + return "'" + bindVariable.toString() + "'"; + } + } + +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/s2dao/FetchNarrowingResultSetFactory.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/s2dao/FetchNarrowingResultSetFactory.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/s2dao/FetchNarrowingResultSetFactory.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,67 @@ +package jp.sf.pal.pompei.allcommon.s2dao; + +import java.sql.PreparedStatement; +import java.sql.ResultSet; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +import org.seasar.extension.jdbc.ResultSetFactory; +import org.seasar.framework.util.PreparedStatementUtil; + +import jp.sf.pal.pompei.allcommon.cbean.FetchNarrowingBean; +import jp.sf.pal.pompei.allcommon.cbean.FetchNarrowingBeanContext; + +/** + * Fetch page result set factory. + * + * @author DBFlute(AutoGenerator) + */ +public class FetchNarrowingResultSetFactory implements ResultSetFactory { + + /** Log-instance. */ + private static final Log _log = LogFactory.getLog(FetchNarrowingResultSetFactory.class); + + /** Is internal-debug enabled? */ + private boolean _isInternalDebugEnabled = false; + + /** + * Constructor. + */ + public FetchNarrowingResultSetFactory() { + } + + /** + * Create result set. + * + * @param ps Prepared statement. + * @return Result set. (NotNull) + */ + public ResultSet createResultSet(PreparedStatement ps) { + if (_isInternalDebugEnabled) { + if (_log.isDebugEnabled()) { + _log.debug("executeQuery(ps) ps=" + ps); + } + } + final ResultSet resultSet = PreparedStatementUtil.executeQuery(ps); + + if (!FetchNarrowingBeanContext.isExistFetchNarrowingBeanOnThread()) { + return resultSet; + } + + final FetchNarrowingBean cb = FetchNarrowingBeanContext.getFetchNarrowingBeanOnThread(); + if (!cb.isFetchNarrowingEffective()) { + return resultSet;// It is not necessary to control. + } + if (!cb.isFetchNarrowingSkipStartIndexEffective() && !cb.isFetchNarrowingLoopCountEffective()) { + return resultSet;// It is not necessary to control. The sql already have been controlled. + } + + if (_isInternalDebugEnabled) { + if (_log.isDebugEnabled()) { + _log.debug("Necessary to control fetch-narrowing! cb=" + cb); + } + } + return new FetchNarrowingResultSetWrapper(resultSet, cb); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/s2dao/FetchNarrowingResultSetWrapper.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/s2dao/FetchNarrowingResultSetWrapper.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/s2dao/FetchNarrowingResultSetWrapper.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,178 @@ +package jp.sf.pal.pompei.allcommon.s2dao; + +import java.sql.ResultSet; +import java.sql.SQLException; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +import org.seasar.extension.jdbc.impl.ResultSetWrapper; +import org.seasar.framework.exception.SQLRuntimeException; + +import jp.sf.pal.pompei.allcommon.cbean.FetchNarrowingBean; + +/** + * Fetch-narrowing-result-set-wrapper. + * + * @author DBFlute(AutoGenerator) + */ +public class FetchNarrowingResultSetWrapper extends ResultSetWrapper { + + /** Log-instance. */ + private static final Log _log = LogFactory.getLog(FetchNarrowingResultSetWrapper.class); + + /** Is internal-debug enabled? */ + private boolean _isInternalDebugEnabled = false; + + /** Original result set. */ + private ResultSet _resultSet; + + /** FetchNarrowing-bean. */ + private FetchNarrowingBean _cb; + + /** Fetch counter. */ + private long _counter; + + /** + * Constructor. + * + * @param resultSet Original result set. (NotNull) + * @param cb FetchNarrowing-bean. (NotNull) + */ + public FetchNarrowingResultSetWrapper(ResultSet resultSet, FetchNarrowingBean cb) { + super(resultSet); + + _resultSet = resultSet; + _cb = cb; + + if (_isInternalDebugEnabled) { + if (_log.isDebugEnabled()) { + String msg = " isFetchNarrowingSkipStartIndexEffective()=" + getFetchNarrowingBean().isFetchNarrowingSkipStartIndexEffective(); + _log.debug(msg); + msg = " isFetchNarrowingLoopCountEffective()=" + getFetchNarrowingBean().isFetchNarrowingLoopCountEffective(); + _log.debug(msg); + msg = " getFetchNarrowingSkipStartIndex()=" + getFetchNarrowingSkipStartIndex(); + _log.debug(msg); + msg = " getFetchNarrowingLoopCount()=" + getFetchNarrowingLoopCount(); + _log.debug(msg); + } + } + + skip(); + } + + /** + * Skip to start-index. + */ + private void skip() { + if (!getFetchNarrowingBean().isFetchNarrowingSkipStartIndexEffective()) { + return; + } + if (isCursorUsed()) { + try { + if (0 == getFetchNarrowingSkipStartIndex()) { + getResultSet().beforeFirst(); + } else { + getResultSet().absolute(getFetchNarrowingSkipStartIndex()); + } + _counter = getResultSet().getRow(); + } catch (SQLException e) { + throw new SQLRuntimeException(e); + } + } else { + try { + while (getResultSet().getRow() < getFetchNarrowingSkipStartIndex() && getResultSet().next()) { + ++_counter; + } + } catch (SQLException e) { + throw new SQLRuntimeException(e); + } + } + } + + /** + * Next. + * + * @return Does the result set have next record? + * @throws SQLException + */ + public boolean next() throws SQLException { + final boolean hasNext = super.next(); + if (!getFetchNarrowingBean().isFetchNarrowingLoopCountEffective()) { + return hasNext; + } + if (hasNext && _counter < getFetchNarrowingSkipStartIndex() + getFetchNarrowingLoopCount()) { + ++_counter; + return true; + } else { + if (_isInternalDebugEnabled) { + if (_log.isDebugEnabled()) { + String msg = " Finally the result of next() is false! Because counter is greater-equal"; + msg = msg + " than 'fetch-start-index + real-fetch-size'."; + msg = msg + " " + _counter + " >= " + getFetchNarrowingSkipStartIndex() + " + " + getFetchNarrowingLoopCount(); + _log.debug(msg); + } + } + return false; + } + } + + /** + * Get result set. + * + * @return Result set. + */ + protected ResultSet getResultSet() { + return _resultSet; + } + + /** + * Get fetch-narrowing-bean. + * + * @return FetchNarrowing-bean. + */ + protected FetchNarrowingBean getFetchNarrowingBean() { + return _cb; + } + + /** + * Get fetch-start-index from fetch-narrowing-bean. + * + * @return Fetch-start-index. + */ + protected int getFetchNarrowingSkipStartIndex() { + return _cb.getFetchNarrowingSkipStartIndex(); + } + + /** + * Get fetch-size from fetch-narrowing-bean. + * + * @return Fetch-size. + */ + protected int getFetchNarrowingLoopCount() { + return _cb.getFetchNarrowingLoopCount(); + } + + /** + * Is cursor used? + * + * @return Determination. + */ + protected boolean isCursorUsed() { + return isCursorSupported(getResultSet()); + } + + /** + * Is cursor supported? + * + * @param resultSet ResultSet + * @return Determation. + */ + public static boolean isCursorSupported(ResultSet resultSet) { + try { + return !(resultSet.getType() == ResultSet.TYPE_FORWARD_ONLY); + } catch (SQLException e) { + throw new SQLRuntimeException(e); + } + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/s2dao/S2BeanMetaDataFactoryImpl.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/s2dao/S2BeanMetaDataFactoryImpl.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/s2dao/S2BeanMetaDataFactoryImpl.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,14 @@ +package jp.sf.pal.pompei.allcommon.s2dao; + +import org.seasar.dao.impl.BeanMetaDataFactoryImpl; + +/** + * BeanMetaDataFactoryImpl for DBFlute. + * + * @author DBFlute(AutoGenerator) + */ +public class S2BeanMetaDataFactoryImpl extends BeanMetaDataFactoryImpl { + protected int getLimitRelationNestLevel() { + return 2; + } +} \ No newline at end of file Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/s2dao/S2DaoInterceptor.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/s2dao/S2DaoInterceptor.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/s2dao/S2DaoInterceptor.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,351 @@ +package jp.sf.pal.pompei.allcommon.s2dao; + +import org.aopalliance.intercept.MethodInvocation; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +import jp.sf.pal.pompei.allcommon.Entity; +import jp.sf.pal.pompei.allcommon.cbean.ConditionBean; +import jp.sf.pal.pompei.allcommon.cbean.ConditionBeanContext; +import jp.sf.pal.pompei.allcommon.cbean.FetchNarrowingBeanContext; +import jp.sf.pal.pompei.allcommon.cbean.FetchNarrowingBean; + +/** + * My-DaoInterceptor. + * Customises original class 'S2DaoInterceptor'. + * + * @author DBFlute(AutoGenerator) + */ +public class S2DaoInterceptor extends org.seasar.framework.aop.interceptors.AbstractInterceptor { + + /** Serial version UID. (Default) */ + private static final long serialVersionUID = 1L; + + /** Log-instance. */ + private static final Log _log = LogFactory.getLog(S2DaoInterceptor.class); + + /** Dao meta data factory. */ + private org.seasar.dao.DaoMetaDataFactory daoMetaDataFactory_; + + /** + * Constructor. + * + * @param daoMetaDataFactory Dao meta data factory. + */ + public S2DaoInterceptor(org.seasar.dao.DaoMetaDataFactory daoMetaDataFactory) { + daoMetaDataFactory_ = daoMetaDataFactory; + } + + /** + * Invoke. + * + * @param invocation Method invocation. + * @return Result of the method. + * @throws Throwable + */ + public Object invoke(MethodInvocation invocation) throws Throwable { + final java.lang.reflect.Method method = invocation.getMethod(); + if (!org.seasar.framework.util.MethodUtil.isAbstract(method)) { + return invocation.proceed(); + } + traceMethod(invocation); + final long before = System.currentTimeMillis(); + + final org.seasar.dao.SqlCommand cmd; + { + final long beforeCmd = System.currentTimeMillis(); + final Class targetClass = getTargetClass(invocation); + final org.seasar.dao.DaoMetaData dmd = daoMetaDataFactory_.getDaoMetaData(targetClass); + cmd = dmd.getSqlCommand(method.getName()); + final long afterCmd = System.currentTimeMillis(); + traceSqlCommand(invocation, cmd, beforeCmd, afterCmd); + } + + final ConditionBean cb = preprocessConditionBean(invocation, cmd); + Object ret = null; + + try { + ret = cmd.execute(invocation.getArguments()); + } catch (Exception e) { + _log.info("Dao threw the exception: " + e.getClass() + " msg=" + e.getMessage()); + _log.info(" method --> " + invocation.getMethod()); + _log.info(" argument --> " + getObjectArrayString(invocation.getArguments())); + if (e instanceof org.seasar.framework.exception.SQLRuntimeException) { + final Throwable causeException = ((org.seasar.framework.exception.SQLRuntimeException)e).getCause(); + if (causeException instanceof org.seasar.framework.exception.SSQLException) { + final String sql = ((org.seasar.framework.exception.SSQLException)causeException).getSql(); + _log.info(" sql --> " + sql); + } + } + throw e; + } finally { + postprocessConditionBean(invocation, cb); + } + final long after = System.currentTimeMillis(); + + final Class retType = method.getReturnType(); + assertRetType(retType, ret); + traceReturn(invocation, retType, ret, before, after); + + if (retType.isPrimitive()) { + return org.seasar.framework.util.NumberConversionUtil.convertPrimitiveWrapper(retType, ret); + } else if (Number.class.isAssignableFrom(retType)) { + return org.seasar.framework.util.NumberConversionUtil.convertNumber(retType, ret); + } else { + return ret; + } + } + + protected void traceMethod(MethodInvocation invocation) { + if (_log.isDebugEnabled()) { + final java.lang.reflect.Method method = invocation.getMethod(); + final String invokeName = getShortClassName(method.getDeclaringClass()) + "." + method.getName(); + final int length = invokeName.length(); + final StringBuffer sb = new StringBuffer(); + for (int i = 0; i < length; i++) { + sb.append("="); + } + _log.debug("/=====================================================" + sb.toString() + "=="); + _log.debug(" " + invokeName + "()"); + _log.debug(" " + sb.toString() + "=/"); + } + } + + protected void traceSqlCommand(MethodInvocation invocation, org.seasar.dao.SqlCommand cmd, long beforeCmd, long afterCmd) { + if (_log.isDebugEnabled()) { + _log.debug("SqlCommand Initialization Cost: [" + getPerformanceView(afterCmd - beforeCmd) + "]"); + } + } + + protected void assertRetType(Class retType, Object ret) { + if (java.util.List.class.isAssignableFrom(retType)) { + if (ret != null && !(ret instanceof java.util.List)) { + String msg = "The retType is difference from actual return: "; + msg = msg + "retType=" + retType + " ret.getClass()=" + ret.getClass() + " ref=" + ret; + throw new IllegalStateException(msg); + } + } else if (Entity.class.isAssignableFrom(retType)) { + if (ret != null && !(ret instanceof Entity)) { + String msg = "The retType is difference from actual return: "; + msg = msg + "retType=" + retType + " ret.getClass()=" + ret.getClass() + " ref=" + ret; + throw new IllegalStateException(msg); + } + } + } + + protected void traceReturn(MethodInvocation invocation, Class retType, Object ret, long before, long after) + throws Throwable { + if (_log.isDebugEnabled()) { + try { + final String daoResultPrefix = "===========/ [" + getPerformanceView(after - before) + " - "; + if (java.util.List.class.isAssignableFrom(retType)) { + if (ret == null) { + _log.debug(daoResultPrefix + "Selected count: null]"); + } else { + final java.util.List ls = (java.util.List) ret; + if (ls.isEmpty()) { + _log.debug(daoResultPrefix + "Selected count: 0]"); + } else { + _log.debug(daoResultPrefix + "Selected count: " + ls.size() + " first=" + ls.get(0) + "]"); + } + } + } else if (Entity.class.isAssignableFrom(retType)) { + if (ret == null) { + _log.debug(daoResultPrefix + "Selected entity: null" + "]"); + } else { + final Entity entity = (Entity) ret; + _log.debug(daoResultPrefix + "Selected entity: " + entity + "]"); + } + } else { + if (isSelectCountIgnoreFetchScopeMethod(invocation)) { + _log.debug(daoResultPrefix + "Selected count: " + ret + "]"); + } else { + _log.debug(daoResultPrefix + "Result: " + ret + "]"); + } + } + _log.debug(" "); + } catch (Exception e) { + String msg = "Result object debug threw the exception: methodName="; + msg = msg + invocation.getMethod().getName() + " retType=" + retType; + msg = msg + " ret=" + ret; + _log.warn(msg, e); + throw e; + } + } + } + + // ===================================================================================== + // Pre&Post Process + // ================ + /** + * Preprocess condition-bean. + *

+ * If this method is condition bean select target, make dynamic sql. + * Else nothing. + * + * @param invocation Method invocation. (NotNull) + * @param cmd Sql command. (NotNull) + * @return Condition-bean. (Nullable) + */ + protected ConditionBean preprocessConditionBean(MethodInvocation invocation, org.seasar.dao.SqlCommand cmd) { + clearThreadLocal(); + + final ConditionBean cb; + { + final Object[] args = invocation.getArguments(); + if (args == null || !(args.length >= 1)) { + return null; + } + + final Object arg0 = args[0]; + if (arg0 == null) { + return null; + } + + if (!ConditionBeanContext.isTheTypeConditionBean(arg0.getClass())) {// The argument is not condition-bean... + if (FetchNarrowingBeanContext.isTheTypeFetchNarrowingBean(arg0.getClass()) && !isSelectCountIgnoreFetchScopeMethod(invocation)) { + // Fetch-narrowing-bean and Not select count! + FetchNarrowingBeanContext.setFetchNarrowingBeanOnThread((FetchNarrowingBean)arg0); + } + return null; + } + + cb = (ConditionBean)arg0; + } + + if (!(cmd instanceof S2DaoSelectDynamicCommand)) {// The argument is condition-bean, but this method use outer-sql-file... + FetchNarrowingBeanContext.setFetchNarrowingBeanOnThread(cb); + return null; + } + + if (isSelectCountIgnoreFetchScopeMethod(invocation)) { + cb.xsetupSelectCountIgnoreFetchScope(); + } else { + FetchNarrowingBeanContext.setFetchNarrowingBeanOnThread(cb); + } + + ConditionBeanContext.setConditionBeanOnThread(cb); + return cb; + } + + /** + * Postprocess condition-bean. + * + * @param invocation Method invocation. (NotNull) + * @param cb Condition-bean. (Nullable) + */ + public void postprocessConditionBean(MethodInvocation invocation, ConditionBean cb) { + clearThreadLocal(); + + if (cb != null && isSelectCountIgnoreFetchScopeMethod(invocation)) { + cb.xafterCareSelectCountIgnoreFetchScope(); + } + } + + protected void clearThreadLocal() { + if (FetchNarrowingBeanContext.isExistFetchNarrowingBeanOnThread()) { + FetchNarrowingBeanContext.clearFetchNarrowingBeanOnThread(); + } + if (ConditionBeanContext.isExistConditionBeanOnThread()) { + ConditionBeanContext.clearConditionBeanOnThread(); + } + } + + // ===================================================================================== + // Determination + // ============= + /** + * Is select count ignore-fetch-scope method? + * + * @param invocation Method invocation. (NotNull) + * @return Determination. + */ + protected boolean isSelectCountIgnoreFetchScopeMethod(MethodInvocation invocation) { + final String name = invocation.getMethod().getName(); + if (name.startsWith("readCount") + || name.startsWith("selectCount") + || name.startsWith("readCountIgnoreFetchScope") + || name.startsWith("selectCountIgnoreFetchScope")) { + return true; + } else { + return false; + } + } + + // ===================================================================================== + // Helper + // ====== + /** + * Get short class name. + * + * @param clazz Class instance. (NotNull) + * @return Short class name. (NotNull) + */ + protected String getShortClassName(Class clazz) { + String s = clazz.getName(); + int i = s.lastIndexOf('.'); + if (i > 0) { + return s.substring(i + 1); + } + return s; + } + + /** + * Change object array to string divided with comma. + * + * @param objArray Object array. (Nullable) + * @return String (NotNull: If the argument is null, returns empty string.) + */ + protected String getObjectArrayString(Object[] objArray) { + if (objArray == null) { + return ""; + } + final StringBuffer sb = new StringBuffer(); + for (int i = 0; i < objArray.length; i++) { + if (i == 0) { + sb.append(objArray[i]); + } else { + sb.append(", ").append(objArray[i]); + } + } + return sb.toString(); + } + + /** + * Get performance view. + * + * @param mil The value of millisecound. + * @return Performance view. (ex. 1m23s456ms) (NotNull) + */ + protected String getPerformanceView(long mil) { + if (mil < 0) { + return String.valueOf(mil); + } + + long sec = mil / 1000; + long min = sec / 60; + sec = sec % 60; + mil = mil % 1000; + + StringBuffer sb = new StringBuffer(); + if (min >= 10) { // Minute + sb.append(min).append("m"); + } else if (min < 10 && min >= 0) { + sb.append("0").append(min).append("m"); + } + if (sec >= 10) { // Second + sb.append(sec).append("s"); + } else if (sec < 10 && sec >= 0) { + sb.append("0").append(sec).append("s"); + } + if (mil >= 100) { // Millisecond + sb.append(mil).append("ms"); + } else if (mil < 100 && mil >= 10) { + sb.append("0").append(mil).append("ms"); + } else if (mil < 10 && mil >= 0) { + sb.append("00").append(mil).append("ms"); + } + + return sb.toString(); + } +} \ No newline at end of file Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/s2dao/S2DaoMetaDataExtension.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/s2dao/S2DaoMetaDataExtension.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/s2dao/S2DaoMetaDataExtension.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,550 @@ + +package jp.sf.pal.pompei.allcommon.s2dao; + + +import java.lang.reflect.ParameterizedType; +import java.lang.reflect.Type; + +import java.lang.reflect.Method; +import java.sql.DatabaseMetaData; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import javax.sql.DataSource; + +import org.seasar.dao.BeanEnhancer; +import org.seasar.dao.BeanMetaData; +import org.seasar.dao.BeanMetaDataFactory; +import org.seasar.dao.CommandContext; + +import org.seasar.dao.DaoAnnotationReader; +import org.seasar.dao.DtoMetaDataFactory; + +import org.seasar.dao.Dbms; +import org.seasar.dao.RelationPropertyType; +import org.seasar.dao.RelationRowCreator; +import org.seasar.dao.ResultSetHandlerFactory; +import org.seasar.dao.SqlCommand; +import org.seasar.dao.impl.BeanMetaDataImpl; +import org.seasar.dao.impl.DaoMetaDataImpl; +import org.seasar.dao.impl.RelationRowCreatorImpl; +import org.seasar.dao.impl.AbstractSqlCommand; +import org.seasar.dao.impl.SelectDynamicCommand; +import org.seasar.dao.impl.UpdateAutoDynamicCommand; +import org.seasar.dao.impl.UpdateAutoStaticCommand; +import org.seasar.dao.impl.UpdateBatchAutoStaticCommand; +import org.seasar.dao.impl.UpdateModifiedOnlyCommand; +import org.seasar.dao.impl.DeleteAutoStaticCommand; +import org.seasar.dao.impl.DeleteBatchAutoStaticCommand; +import org.seasar.extension.jdbc.PropertyType; +import org.seasar.extension.jdbc.ResultSetFactory; +import org.seasar.extension.jdbc.ResultSetHandler; +import org.seasar.extension.jdbc.StatementFactory; +import org.seasar.extension.jdbc.impl.BasicSelectHandler; +import org.seasar.extension.jdbc.types.ValueTypes; +import org.seasar.framework.beans.BeanDesc; +import org.seasar.framework.beans.PropertyDesc; +import org.seasar.framework.util.StringUtil; + +import jp.sf.pal.pompei.allcommon.cbean.ConditionBeanContext; + +import jp.sf.pal.pompei.allcommon.annotation.OutsideSql; + +/** + * DaoMetaDataImpl for DBFlute. + * + * @author DBFlute(AutoGenerator) + */ +public class S2DaoMetaDataExtension extends DaoMetaDataImpl { + + // ===================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + public S2DaoMetaDataExtension() { + } + + + // ===================================================================================== + // Bean Enhancer + // ============= + protected BeanEnhancer beanEnhancer; + + public BeanEnhancer getBeanEnhancer() { + return beanEnhancer; + } + + public void setBeanEnhancer(final BeanEnhancer beanEnhancer) { + this.beanEnhancer = beanEnhancer; + } + + // ===================================================================================== + // OutsideSql Check Override + // ========================= + protected void setupMethodByAuto(Method method) { + final OutsideSql outsideSql = method.getAnnotation(OutsideSql.class); + if (outsideSql != null) { + String msg = "This method '" + method.getName() + "()' should use Outside Sql but the file was not found!"; + msg = msg + " Expected sql file name is '" + method.getDeclaringClass().getSimpleName() + "_" + method.getName() + ".sql'"; + throw new IllegalStateException(msg); + } + super.setupMethodByAuto(method); + } + + // ===================================================================================== + // ResultSetHandlerFactory Override + // ================================ + protected ResultSetHandlerFactory createResultSetHandlerFactory() { + return new ResultSetHandlerFactoryExtension(beanMetaData, annotationReader, dtoMetaDataFactory); + } + + // ===================================================================================== + // ConditionBean Override + // ====================== + + protected SelectDynamicCommand setupNonQuerySelectMethodByDto(Method method, ResultSetHandler handler, String[] argNames, String query) { + Class[] types = method.getParameterTypes(); + Class clazz = types[0]; + if (!ConditionBeanContext.isTheTypeConditionBean(clazz)) { + return super.setupNonQuerySelectMethodByDto(method, handler, argNames, query); + } + // /----------------------------------------------------- [MyExtension] + argNames = new String[] { "dto" }; + final String sqlNormal = getSelectClause(getBeanMetaData(), clazz); + final String sqlPKOnly = getSelectClausePKOnly(getBeanMetaData()); + final S2DaoSelectDynamicCommand dynamicCommand = newMySelectDynamicCommand(handler); + String sql = sqlNormal; + final SelectDynamicCommand cmd = dynamicCommand; + dynamicCommand.setSelectClause(sqlNormal); + dynamicCommand.setSelectClausePKOnly(sqlPKOnly); + // -----------/ + if (query != null) { + sql = sql + " " + query; + } + cmd.setSql(sql); + cmd.setArgNames(argNames); + cmd.setArgTypes(types); + return cmd; + } + + /** + * Get select clause. + * + * @param beanMetaData BeanMetaData. (NotNull) + * @param conditionBeanClass Condition-bean class. (NotNull) + * @return Select clause. (NotNull) + */ + protected String getSelectClause(BeanMetaData beanMetaData, Class conditionBeanClass) { + final StringBuffer sb = new StringBuffer(100); + sb.append("select/*$dto.selectHint*/ "); + + final StringBuffer sbMySelectList = new StringBuffer(100); + for (int i = 0; i < beanMetaData.getPropertyTypeSize(); ++i) { + final PropertyType pt = beanMetaData.getPropertyType(i); + if (pt.isPersistent()) { + if (sbMySelectList.length() != 0) { + sbMySelectList.append(", "); + } + final String columnFullName = beanMetaData.getTableName() + "." + pt.getColumnName(); + sbMySelectList.append(columnFullName); + + ConditionBeanContext.addColumnAliasInfo(conditionBeanClass, columnFullName, pt.getColumnName()); + } + } + sb.append(sbMySelectList); + + setupRelationSelectClause(sb, beanMetaData, "", "", 1, conditionBeanClass); + return sb.toString(); + } + + protected void setupRelationSelectClause(StringBuffer sb, BeanMetaData baseBmd, String judgeProp, String preNoSuffix, int cqNestNo, Class conditionBeanClass) { + for (int i = 0; i < baseBmd.getRelationPropertyTypeSize(); ++i) { + final StringBuffer sbYourSelectList = new StringBuffer(100); + final RelationPropertyType rpt = baseBmd.getRelationPropertyType(i); + if (rpt == null) { + String msg = "The baseBmd.GetRelationPropertyType(" + i + ") returned null"; + msg = msg + ": baseBmd.getTableName()=" + baseBmd.getTableName(); + msg = msg + ": baseBmd.getRelationPropertyTypeSize()=" + baseBmd.getRelationPropertyTypeSize(); + throw new IllegalStateException(msg); + } + + final BeanMetaData relationBmd = rpt.getBeanMetaData(); + final String initCapPropertyName = StringUtil.capitalize(rpt.getPropertyName()); + final String ifComment = "/*IF dto." + judgeProp + "isSelect" + initCapPropertyName + "()*/"; + final String endComment = "/*END*/"; + for (int j = 0; j < relationBmd.getPropertyTypeSize(); ++j) { + final PropertyType pt = relationBmd.getPropertyType(j); + final String tableAliasName = StringUtil.capitalize(rpt.getPropertyName()) + (cqNestNo > 1 ? "_n" + cqNestNo : ""); + if (pt.isPersistent()) { + final String columnName = pt.getColumnName(); + final String columnFullName = tableAliasName + "." + columnName; + final String columnAliasName = pt.getColumnName() + preNoSuffix + "_" + rpt.getRelationNo(); + sbYourSelectList.append(", "); + sbYourSelectList.append(columnFullName).append(" AS ").append(columnAliasName); + + ConditionBeanContext.addColumnAliasInfo(conditionBeanClass, columnFullName, columnAliasName); + } + } + if (relationBmd.getRelationPropertyTypeSize() > 0) { + final String nssString = "nss" + initCapPropertyName + "."; + final String nextPreNoSuffix = preNoSuffix + "_" + rpt.getRelationNo(); + final int nextCQNestNo = cqNestNo + 1; + setupRelationSelectClause(sbYourSelectList, relationBmd, nssString, nextPreNoSuffix, nextCQNestNo, conditionBeanClass); + } + sb.append(ifComment).append(sbYourSelectList).append(endComment); + } + } + + /** + * Get select clause PK only. + * + * @param beanMetaData BeanMetaData. (NotNull) + * @return Select clause PK only. (NotNull) + */ + protected String getSelectClausePKOnly(BeanMetaData beanMetaData) { + final StringBuffer sb = new StringBuffer(100); + sb.append("select/*$dto.selectHint*/ "); + + final StringBuffer sbMySelectList = new StringBuffer(100); + for (int i = 0; i < beanMetaData.getPropertyTypeSize(); ++i) { + final PropertyType pt = beanMetaData.getPropertyType(i); + if (pt.isPersistent() && pt.isPrimaryKey()) { + if (sbMySelectList.length() != 0) { + sbMySelectList.append(", "); + } + sbMySelectList.append(beanMetaData.getTableName()); + sbMySelectList.append("."); + sbMySelectList.append(pt.getColumnName()); + } + } + sb.append(sbMySelectList); + + return sb.toString(); + } + + /** + * New my select dynamic command for condition-bean. + * + * @param handler ResultSetHandler + * @return My select dynamic command. (NotNull) + */ + protected S2DaoSelectDynamicCommand newMySelectDynamicCommand(ResultSetHandler handler) {// for condition-bean + return new S2DaoSelectDynamicCommand(dataSource, statementFactory, handler, resultSetFactory); + } + + // ===================================================================================== + // SelectDynamicCommand Override + // ============================= + protected SelectDynamicCommand createSelectDynamicCommand(ResultSetHandler rsh) {// for all except condition-bean + return new SelectDynamicCommand(dataSource, statementFactory, rsh, resultSetFactory); + } + + public static class SelectDynamicCommandExtension extends SelectDynamicCommand { + + private ResultSetHandler resultSetHandler; + private ResultSetFactory resultSetFactory; + public SelectDynamicCommandExtension(DataSource dataSource, + StatementFactory statementFactory, + ResultSetHandler resultSetHandler, ResultSetFactory resultSetFactory) { + super(dataSource, statementFactory, resultSetHandler, resultSetFactory); + this.resultSetHandler = resultSetHandler; + this.resultSetFactory = resultSetFactory; + } + + public ResultSetHandler getResultSetHandler() { + return resultSetHandler; + } + + public Object execute(Object[] args) { + CommandContext ctx = apply(args); + + final BasicSelectHandler selectHandler = new BasicSelectHandler(getDataSource(), ctx.getSql(), resultSetHandler, getStatementFactory(), resultSetFactory); + + selectHandler.setFetchSize(-1); + return selectHandler.execute(ctx.getBindVariables(), ctx.getBindVariableTypes()); + } + } + + // ===================================================================================== + // UpdateByAuto Override + // ===================== + protected void setupUpdateMethodByAuto(Method method) { + checkAutoUpdateMethod(method); + String[] propertyNames = getPersistentPropertyNames(method); + AbstractSqlCommand cmd; + if (isUpdateSignatureForBean(method)) { + if (isUnlessNull(method.getName())) { + cmd = createUpdateAutoDynamicCommand(method, propertyNames); + } else if (isModifiedOnly(method.getName())) { + cmd = createUpdateModifiedOnlyCommand(method, propertyNames); + } else { + cmd = new UpdateAutoStaticCommand(dataSource, statementFactory, createNonConcurrencyBeanMetaData(method), propertyNames);// Extension Point! + } + } else { + cmd = new UpdateBatchAutoStaticCommand(dataSource, statementFactory, createNonConcurrencyBeanMetaData(method), propertyNames);// Extension Point! + } + sqlCommands.put(method.getName(), cmd); + } + + protected AbstractSqlCommand createUpdateAutoDynamicCommand(Method method, String[] propertyNames) { + AbstractSqlCommand cmd; + UpdateAutoDynamicCommand uac = new UpdateAutoDynamicCommand(dataSource, statementFactory); + uac.setBeanMetaData(createNonConcurrencyBeanMetaData(method));// Extension Point! + uac.setPropertyNames(propertyNames); + uac.setNotSingleRowUpdatedExceptionClass(getNotSingleRowUpdatedExceptionClass(method)); + cmd = uac; + return cmd; + } + + protected AbstractSqlCommand createUpdateModifiedOnlyCommand(final Method method, final String[] propertyNames) { + UpdateModifiedOnlyCommand uac = new UpdateModifiedOnlyCommand(dataSource, statementFactory); + uac.setBeanMetaData(createNonConcurrencyBeanMetaData(method));// Extension Point! + uac.setPropertyNames(propertyNames); + uac.setNotSingleRowUpdatedExceptionClass(getNotSingleRowUpdatedExceptionClass(method)); + return uac; + } + + + protected BeanMetaData createNonConcurrencyBeanMetaData(Method method) { + if (method.getName().contains("Nonstrict")) { + return createNonConcurrencyBmdFactory().createBeanMetaData(getBeanClass()); + } else { + return getBeanMetaData(); + } + } + + protected BeanMetaDataFactory createNonConcurrencyBmdFactory() { + final S2BeanMetaDataFactoryImpl nonConcurrencyBmdFactory = new S2BeanMetaDataFactoryImpl() { + protected BeanMetaDataImpl createBeanMetaDataImpl() { + return new BeanMetaDataImpl() { + public boolean hasVersionNoPropertyType() { + return false; + } + + public boolean hasTimestampPropertyType() { + return false; + } + }; + } + }; + nonConcurrencyBmdFactory.setAnnotationReaderFactory(this.annotationReaderFactory); + nonConcurrencyBmdFactory.setValueTypeFactory(this.valueTypeFactory); + nonConcurrencyBmdFactory.setDataSource(this.dataSource); + nonConcurrencyBmdFactory.setDaoNamingConvention(this.daoNamingConvention); + nonConcurrencyBmdFactory.setBeanEnhancer(this.beanEnhancer); + return nonConcurrencyBmdFactory; + } + + // ===================================================================================== + // DeleteByAuto Override + // ===================== + protected void setupDeleteMethodByAuto(Method method) { + checkAutoUpdateMethod(method); + String[] propertyNames = getPersistentPropertyNames(method); + SqlCommand cmd = null; + if (isUpdateSignatureForBean(method)) { + cmd = new DeleteAutoStaticCommand(dataSource, statementFactory, createNonConcurrencyBeanMetaData(method), propertyNames); + } else { + cmd = new DeleteBatchAutoStaticCommand(dataSource, statementFactory, createNonConcurrencyBeanMetaData(method), propertyNames); + } + sqlCommands.put(method.getName(), cmd); + } + + // ===================================================================================== + // ByManual Override + // ================= + protected void setupSelectMethodByManual(Method method, String sql) { + final BeanMetaData beanMetaData = buildBeanMetaData(method, this.dataSource); + + final ResultSetHandlerFactory factory = new ResultSetHandlerFactoryExtension(beanMetaData, annotationReader, dtoMetaDataFactory); + + SelectDynamicCommand cmd = createSelectDynamicCommand(factory.createResultSetHandler(method)); + cmd.setSql(sql); + cmd.setArgNames(this.annotationReader.getArgNames(method)); + cmd.setArgTypes(method.getParameterTypes()); + this.sqlCommands.put(method.getName(), cmd); + } + + protected BeanMetaData buildBeanMetaData(Method method, DataSource ds) { + final Class beanClass4SelectMethodByManual = getOriginalBeanClass(method); + if (beanClass4SelectMethodByManual.equals(getBeanClass())) { + return getBeanMetaData(); + } + return createOriginalBmdFactory().createBeanMetaData(getOriginalBeanClass(method)); + } + + protected BeanMetaDataFactory createOriginalBmdFactory() { + final S2BeanMetaDataFactoryImpl originalBmdFactory = new S2BeanMetaDataFactoryImpl() { + protected BeanMetaDataImpl createBeanMetaDataImpl() { + return new BeanMetaDataImpl() { + protected void setupDatabaseMetaData(BeanDesc beanDesc, DatabaseMetaData dbMetaData, Dbms dbms) { + // Nothing. + } + }; + } + }; + originalBmdFactory.setAnnotationReaderFactory(this.annotationReaderFactory); + originalBmdFactory.setValueTypeFactory(this.valueTypeFactory); + originalBmdFactory.setDataSource(this.dataSource); + originalBmdFactory.setDaoNamingConvention(this.daoNamingConvention); + originalBmdFactory.setBeanEnhancer(this.beanEnhancer); + return originalBmdFactory; + } + + protected Class getOriginalBeanClass(Method method) { + final Class retType = method.getReturnType(); + if (java.util.List.class.isAssignableFrom(retType)) { + final Class elementType = InternalMethodUtil.getElementTypeOfListFromReturnMethod(method); + if (elementType != null) { + return elementType; + } else { + return getBeanClass(); + } + } else if (retType.isArray()) { + return retType.getComponentType(); + } else if (retType.isPrimitive() || !ValueTypes.getValueType(retType).equals(ValueTypes.OBJECT)) { + return getBeanClass(); + } else { + return retType; + } + } + + protected static class InternalMethodUtil { + public static Class getElementTypeOfListFromReturnMethod(Method method) { + return ReflectionUtil.getElementTypeOfListFromReturnType(method); + } + } + + protected static class ReflectionUtil { + public static Class getElementTypeOfList(final Type parameterizedList) { + if (!(parameterizedList instanceof ParameterizedType)) { + return null; + } + + final ParameterizedType parameterizedType = ParameterizedType.class.cast(parameterizedList); + final Type rawType = parameterizedType.getRawType(); + if (!(rawType instanceof Class)) { + return null; + } + + final Class rawClass = Class.class.cast(rawType); + if (!rawClass.isAssignableFrom(List.class)) { + return null; + } + + final Type[] actualTypeArgument = parameterizedType.getActualTypeArguments(); + if (actualTypeArgument == null || actualTypeArgument.length != 1) { + return null; + } + if (!(actualTypeArgument[0] instanceof Class)) { + return null; + } + + return Class.class.cast(actualTypeArgument[0]); + } + + public static Class getElementTypeOfListFromParameterType(final Method method, final int parameterPosition) { + final Type[] parameterTypes = method.getGenericParameterTypes(); + return getElementTypeOfList(parameterTypes[parameterPosition]); + } + + public static Class getElementTypeOfListFromReturnType(final Method method) { + return getElementTypeOfList(method.getGenericReturnType()); + } + } + + protected static class ResultSetHandlerFactoryExtension extends ResultSetHandlerFactoryImpl { + + public ResultSetHandlerFactoryExtension(BeanMetaData beanMetaData, DaoAnnotationReader annotationReader, DtoMetaDataFactory dtoMetaDataFactory) { + super(beanMetaData, annotationReader, dtoMetaDataFactory); + } + + protected RelationRowCreator createRelationRowCreator() { + return new RelationRowCreatorExtension(); + } + } + + protected static class RelationRowCreatorExtension extends RelationRowCreatorImpl { + public Object createRelationRow(ResultSet rs, RelationPropertyType rpt, Set columnNames, Map relKeyValues) + throws SQLException { + return createRelationRow(rs, rpt, columnNames, relKeyValues, ""); + } + + public Object createRelationRow(ResultSet rs, RelationPropertyType rpt, Set columnNames, Map relKeyValues, + String preRelationNoSuffix) throws SQLException { + // It must doesn't need to invoke this! + // final Object row = setupRelationKeyValue(rpt, columnNames, relKeyValues); + + return setupRelationAllValue(rs, rpt, columnNames, relKeyValues, preRelationNoSuffix); + } + + protected Object setupRelationAllValue(ResultSet rs, RelationPropertyType rpt, Set columnNames, + Map relKeyValues, String preRelationNoSuffix) throws SQLException { + Object row = null; + final String relationNoSuffix = preRelationNoSuffix + "_" + rpt.getRelationNo(); + final BeanMetaData bmd = rpt.getBeanMetaData(); + int existColumn = 0; + for (int i = 0; i < bmd.getPropertyTypeSize(); ++i) { + final PropertyType pt = bmd.getPropertyType(i); + final String columnName = pt.getColumnName() + relationNoSuffix; + if (!columnNames.contains(columnName)) { + continue; + } + + // Return null if the primary key of foreign table is invalid(The foreign key is deadlink). + if (pt.isPrimaryKey()) { + if (!isValidValue(rs, pt, columnName, relKeyValues)) { + return null; + } + } + + existColumn++; + if (row == null) { + row = createRelationRow(rpt); + } + registerRelationValue(row, rs, rpt, pt, columnName, relKeyValues); + } + + // Return null if setupSelect_Xxx() or withXxx() has not been invoked. + if (existColumn == 0) { + return null; + } + + if (rpt.getBeanMetaData().getRelationPropertyTypeSize() != 0) { + createParentRelationRow(rs, rpt.getBeanMetaData(), columnNames, relationNoSuffix, row); + } + return row; + } + + protected boolean isValidValue(ResultSet rs, PropertyType pt, String columnName, Map relKeyValues) throws SQLException { + Object value = null; + if (relKeyValues != null && relKeyValues.containsKey(columnName)) { + value = relKeyValues.get(columnName); + } else { + final org.seasar.extension.jdbc.ValueType valueType = pt.getValueType(); + value = valueType.getValue(rs, columnName); + } + return value != null; + } + + protected void createParentRelationRow(ResultSet rs, BeanMetaData parentBmd, Set columnNames, + String relationNoSuffix, Object row) throws SQLException { + for (int i = 0; i < parentBmd.getRelationPropertyTypeSize(); ++i) { + RelationPropertyType parentParentRpt = parentBmd.getRelationPropertyType(i); + if (parentParentRpt == null) { + continue; + } + Object relationRow = createRelationRow(rs, parentParentRpt, columnNames, null, relationNoSuffix); + if (relationRow != null) { + PropertyDesc pd = parentParentRpt.getPropertyDesc(); + pd.setValue(row, relationRow); + } + } + } + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/s2dao/S2DaoMetaDataFactoryImpl.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/s2dao/S2DaoMetaDataFactoryImpl.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/s2dao/S2DaoMetaDataFactoryImpl.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,113 @@ +package jp.sf.pal.pompei.allcommon.s2dao; + +import java.sql.Connection; +import java.sql.DatabaseMetaData; +import javax.sql.DataSource; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +import org.seasar.dao.AnnotationReaderFactory; +import org.seasar.dao.BeanEnhancer; +import org.seasar.dao.impl.DaoMetaDataFactoryImpl; +import org.seasar.dao.impl.DaoMetaDataImpl; +import org.seasar.extension.jdbc.ResultSetFactory; +import org.seasar.extension.jdbc.StatementFactory; + +import org.seasar.dao.Dbms; +import org.seasar.dao.dbms.DbmsManager; +import org.seasar.extension.jdbc.util.ConnectionUtil; +import org.seasar.extension.jdbc.util.DataSourceUtil; + +import jp.sf.pal.pompei.allcommon.cbean.ConditionBeanContext; + +/** + * DaoMetaDataFactoryImpl for DBFlute. + * + * @author DBFlute(AutoGenerator) + */ +public class S2DaoMetaDataFactoryImpl extends DaoMetaDataFactoryImpl { + + /** Log-instance. */ + private static final Log _log = LogFactory.getLog(S2DaoInterceptor.class); + + // ===================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param dataSource Data source. + * @param statementFactory Statement factory. + * @param resultSetFactory Result set factory. + * @param readerFactory Annotation reader factory. + */ + public S2DaoMetaDataFactoryImpl(DataSource dataSource, + StatementFactory statementFactory, + ResultSetFactory resultSetFactory, + AnnotationReaderFactory readerFactory) { + super(dataSource, statementFactory, resultSetFactory, readerFactory); + + // Stop the LinkageError! + ConditionBeanContext.initialize(); + + initializeDatabaseProductNameOfContext(dataSource); + } + + // -------------------------------------- + // Database Product Name + // --------------------- + protected void initializeDatabaseProductNameOfContext(DataSource dataSource) { + if (getDatabaseProductNameFromContext() != null) { + return; + } + String suffix = null; + try { + final Connection con = DataSourceUtil.getConnection(dataSource); + try { + final DatabaseMetaData dbMetaData = ConnectionUtil.getMetaData(con); + final Dbms dbms = DbmsManager.getDbms(dbMetaData); + suffix = dbms.getSuffix(); + } finally { + ConnectionUtil.close(con); + } + if (suffix == null) { + setDatabaseProductNameToContext("Derby"); + return; + } + } catch (RuntimeException e) { + _log.info("initializeDatabaseProductNameOfContext threw the exception: " + e.getClass(), e); + return; + } + suffix = suffix.startsWith("_") ? suffix.substring("_".length()) : suffix; + setDatabaseProductNameToContext(suffix); + } + + protected String getDatabaseProductNameFromContext() { + return ConditionBeanContext.getDatabaseProductName(); + } + + protected void setDatabaseProductNameToContext(String name) { + ConditionBeanContext.setDatabaseProductName(name); + } + + + // ===================================================================================== + // DataMetaData Creation Override + // ============================== + protected BeanEnhancer beanEnhancer; + + public BeanEnhancer getBeanEnhancer() { + return beanEnhancer; + } + + public void setBeanEnhancer(final BeanEnhancer beanEnhancer) { + this.beanEnhancer = beanEnhancer; + } + + protected DaoMetaDataImpl createDaoMetaDataImpl() {// Override! + S2DaoMetaDataExtension dmdExtension = new S2DaoMetaDataExtension(); + dmdExtension.setBeanEnhancer(this.beanEnhancer); + return dmdExtension; + } + } \ No newline at end of file Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/s2dao/S2DaoSelectDynamicCommand.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/s2dao/S2DaoSelectDynamicCommand.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/s2dao/S2DaoSelectDynamicCommand.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,576 @@ +package jp.sf.pal.pompei.allcommon.s2dao; + +import java.util.ArrayList; +import java.util.List; +import java.util.Stack; + +import javax.sql.DataSource; + +import org.seasar.dao.CommandContext; +import org.seasar.dao.EndCommentNotFoundRuntimeException; +import org.seasar.dao.IfConditionNotFoundRuntimeException; +import org.seasar.dao.Node; +import org.seasar.dao.SqlParser; +import org.seasar.dao.SqlTokenizer; +import org.seasar.dao.impl.SelectDynamicCommand; +import org.seasar.dao.node.BeginNode; +import org.seasar.dao.node.BindVariableNode; +import org.seasar.dao.node.ContainerNode; +import org.seasar.dao.node.ElseNode; +import org.seasar.dao.node.EmbeddedValueNode; +import org.seasar.dao.node.IfNode; +import org.seasar.dao.node.ParenBindVariableNode; +import org.seasar.dao.node.PrefixSqlNode; +import org.seasar.dao.node.SqlNode; +import org.seasar.dao.parser.SqlTokenizerImpl; +import org.seasar.extension.jdbc.ResultSetFactory; +import org.seasar.extension.jdbc.ResultSetHandler; +import org.seasar.extension.jdbc.StatementFactory; +import org.seasar.extension.jdbc.impl.BasicSelectHandler; +import org.seasar.framework.beans.BeanDesc; +import org.seasar.framework.beans.PropertyDesc; +import org.seasar.framework.beans.factory.BeanDescFactory; +import org.seasar.framework.util.StringUtil; + +import jp.sf.pal.pompei.allcommon.cbean.ConditionBean; +import jp.sf.pal.pompei.allcommon.cbean.ConditionBeanContext; +import jp.sf.pal.pompei.allcommon.cbean.sqlclause.SqlClause; + +/** + * SelectDynamicCommand for DBFlute. + * + * @author DBFlute(AutoGenerator) + */ +public class S2DaoSelectDynamicCommand extends SelectDynamicCommand { + + // ===================================================================================== + // Attribute + // ========= + /** Root node. */ + private Node rootNode;// Override! + + /** Result-set handler. */ + private ResultSetHandler resultSetHandler; + + /** Result-set factory. */ + private ResultSetFactory resultSetFactory; + + /** Cache of select clause command. */ + protected S2DaoSelectDynamicCommand _selectClauseCommand; + + /** Cache of select clause PK-only command. */ + protected S2DaoSelectDynamicCommand _selectClausePKOnlyCommand; + + // ===================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param dataSource Data source. + * @param statementFactory Statement factory. + * @param resultSetHandler Result-set handler. + * @param resultSetFactory Result-set factory. + */ + public S2DaoSelectDynamicCommand(DataSource dataSource, + StatementFactory statementFactory, + ResultSetHandler resultSetHandler, ResultSetFactory resultSetFactory) { + + super(dataSource, statementFactory, resultSetHandler, resultSetFactory); + + this.resultSetHandler = resultSetHandler; + this.resultSetFactory = resultSetFactory; + } + + // ===================================================================================== + // Main + // ==== + // -------------------------------------- + // Very Important Override + // ----------------------- + public void setSql(String sql) {// Override! + super.setSql(sql); + this.rootNode = new InternalSqlParserImpl(sql).parse(); + } + + protected CommandContext apply(Object[] args) {// Override! + CommandContext ctx = createCommandContext(args); + rootNode.accept(ctx); + return ctx; + } + + public void setArgNames(String[] argNames) { + if (_selectClauseCommand != null) { + _selectClauseCommand.setArgNames(argNames); + } + if (_selectClausePKOnlyCommand != null) { + _selectClausePKOnlyCommand.setArgNames(argNames); + } + super.setArgNames(argNames); + } + + public void setArgTypes(Class[] argTypes) { + if (_selectClauseCommand != null) { + _selectClauseCommand.setArgTypes(argTypes); + } + if (_selectClausePKOnlyCommand != null) { + _selectClausePKOnlyCommand.setArgTypes(argTypes); + } + super.setArgTypes(argTypes); + } + + // -------------------------------------- + // For Public + // ---------- + /** + * Do apply. {for delegating to apply()} + * + * @param args Arguments. (NotNull) + * @return Command context. (NotNull) + */ + public CommandContext doApply(Object[] args) { + return apply(args); + } + + // -------------------------------------- + // Select-Clause + // ------------- + /** + * Set select clause. + * + * @param value Select clause. (Nullable) + * @return this. (NotNull) + */ + public S2DaoSelectDynamicCommand setSelectClause(String value) { + _selectClauseCommand = createMySelectDynamicCommand(); + _selectClauseCommand.setSql(value); + return this; + } + + /** + * Set select clause PK only. + * + * @param value Select clause PK only. (Nullable) + * @return this. (NotNull) + */ + public S2DaoSelectDynamicCommand setSelectClausePKOnly(String value) { + _selectClausePKOnlyCommand = createMySelectDynamicCommand(); + _selectClausePKOnlyCommand.setSql(value); + return this; + } + + // -------------------------------------- + // SelectDynamicCommand Creation + // ----------------------------- + protected S2DaoSelectDynamicCommand createMySelectDynamicCommand() { + return new S2DaoSelectDynamicCommand(getDataSource(), getStatementFactory(), resultSetHandler, resultSetFactory); + } + + // -------------------------------------- + // Execute + // ------- + public Object execute(Object[] args) { + if (!ConditionBeanContext.isExistConditionBeanOnThread()) { + return super.execute(args); + } + assertSelectClauseCommand(); + final List bindVariableList = new ArrayList(); + final List bindVariableTypeList = new ArrayList(); + + final ConditionBean cb = ConditionBeanContext.getConditionBeanOnThread(); + final String finalClause; + if (cb.hasUnionQueryOrUnionAllQuery()) { + final String selectClause = setupRealSelectClause(args, bindVariableList, bindVariableTypeList); + final String fromWhereClause = setupRealFromWhereClause(args, bindVariableList, bindVariableTypeList); + if (cb.isSelectCountIgnoreFetchScope()) { + // If the query uses union and it selects count, the way of select-count is as follows. + // (Then it needs included-select-column) + finalClause = "select count(*) from (" + InternalStringUtil.replace(fromWhereClause, SqlClause.INCLUDE_SELECT_CLAUSE_MARK, selectClause) + ") base"; + } else { + finalClause = InternalStringUtil.replace(fromWhereClause, SqlClause.INCLUDE_SELECT_CLAUSE_MARK, selectClause); + } + } else { + final String selectClause; + if (cb.isSelectCountIgnoreFetchScope()) { + selectClause = "select count(*)"; + } else { + selectClause = setupRealSelectClause(args, bindVariableList, bindVariableTypeList); + } + final String fromWhereClause = setupRealFromWhereClause(args, bindVariableList, bindVariableTypeList); + finalClause = InternalStringUtil.replace(fromWhereClause, SqlClause.INCLUDE_SELECT_CLAUSE_MARK, selectClause); + } + + final BasicSelectHandler selectHandler = createBasicSelectHandler(finalClause); + selectHandler.setFetchSize(-1); + + return selectHandler.execute(bindVariableList.toArray(), toClassArray(bindVariableTypeList)); + } + + // -------------------------------------- + // Setup Clause + // ------------ + protected String setupRealSelectClause(Object[] args, List bindVariableList, List bindVariableTypeList) { + final ConditionBean cb = ConditionBeanContext.getConditionBeanOnThread(); + final String realSelectClause; + { + final CommandContext ctx; + if (cb.isLimitSelect_PKOnly()) { + ctx = _selectClausePKOnlyCommand.doApply(args); + } else { + ctx = _selectClauseCommand.doApply(args); + } + realSelectClause = ctx.getSql(); + addBindVariableInfo(ctx, bindVariableList, bindVariableTypeList); + } + return realSelectClause; + } + + protected String setupRealFromWhereClause(Object[] args, List bindVariableList, List bindVariableTypeList) { + final ConditionBean cb = ConditionBeanContext.getConditionBeanOnThread(); + final String realFromWhereClause; + { + final S2DaoSelectDynamicCommand fromWhereCommand = createMySelectDynamicCommand(); + fromWhereCommand.setArgNames(getArgNames()); + fromWhereCommand.setArgTypes(getArgTypes()); + + // for Union + cb.getSqlClause().setSelectClauseColumnAliasMap(ConditionBeanContext.getSelectClauseColumnAliasMap(cb.getClass())); + + fromWhereCommand.setSql(cb.getSqlClause().getClause()); + CommandContext ctx = fromWhereCommand.doApply(args); + realFromWhereClause = ctx.getSql(); + addBindVariableInfo(ctx, bindVariableList, bindVariableTypeList); + } + return realFromWhereClause; + } + + protected BasicSelectHandler createBasicSelectHandler(String realSql) { + + return new BasicSelectHandler(getDataSource(), realSql, resultSetHandler, getStatementFactory(), resultSetFactory); + + } + + protected Class[] toClassArray(List bindVariableTypeList) { + final Class[] bindVariableTypesArray = new Class[bindVariableTypeList.size()]; + for (int i = 0; i < bindVariableTypeList.size(); i++) { + final Class bindVariableType = (Class) bindVariableTypeList.get(i); + bindVariableTypesArray[i] = bindVariableType; + } + return bindVariableTypesArray; + } + + protected void addBindVariableInfo(CommandContext ctx, List bindVariableList, List bindVariableTypeList) { + final Object[] bindVariables = ctx.getBindVariables(); + addBindVariableList(bindVariableList, bindVariables); + final Class[] bindVariableTypes = ctx.getBindVariableTypes(); + addBindVariableTypeList(bindVariableTypeList, bindVariableTypes); + } + + protected void addBindVariableList(List bindVariableList, Object[] bindVariables) { + for (int i=0; i < bindVariables.length; i++) { + bindVariableList.add(bindVariables[i]); + } + } + + protected void addBindVariableTypeList(List bindVariableTypeList, Class[] bindVariableTypes) { + for (int i=0; i < bindVariableTypes.length; i++) { + bindVariableTypeList.add(bindVariableTypes[i]); + } + } + + protected void assertSelectClauseCommand() { + if (_selectClauseCommand == null) { + String msg = "Select clause command should not be null."; + throw new IllegalStateException(msg); + } + } + + // ===================================================================================== + // Internal Static Class + // ===================== + // -------------------------------------- + // SqlParser + // --------- + protected static class InternalSqlParserImpl implements SqlParser { + + private SqlTokenizer tokenizer; + + private Stack nodeStack = new Stack(); + + public InternalSqlParserImpl(String sql) { + sql = sql.trim(); + if (sql.endsWith(";")) { + sql = sql.substring(0, sql.length() - 1); + } + tokenizer = new SqlTokenizerImpl(sql); + } + + public Node parse() { + push(new ContainerNode()); + while (SqlTokenizer.EOF != tokenizer.next()) { + parseToken(); + } + return pop(); + } + + protected void parseToken() { + switch (tokenizer.getTokenType()) { + case SqlTokenizer.SQL: + parseSql(); + break; + case SqlTokenizer.COMMENT: + parseComment(); + break; + case SqlTokenizer.ELSE: + parseElse(); + break; + case SqlTokenizer.BIND_VARIABLE: + parseBindVariable(); + break; + } + } + + protected void parseSql() { + String sql = tokenizer.getToken(); + if (isElseMode()) { + sql = StringUtil.replace(sql, "--", ""); + } + Node node = peek(); + if ((node instanceof IfNode || node instanceof ElseNode) && node.getChildSize() == 0) { + + SqlTokenizer st = new SqlTokenizerImpl(sql); + st.skipWhitespace(); + String token = st.skipToken(); + st.skipWhitespace(); + if (sql.startsWith(",")) { + if (sql.startsWith(", ")) { + node.addChild(new PrefixSqlNode(", ", sql.substring(2))); + } else { + node.addChild(new PrefixSqlNode(",", sql.substring(1))); + } + } else if ("AND".equalsIgnoreCase(token) || "OR".equalsIgnoreCase(token)) { + node.addChild(new PrefixSqlNode(st.getBefore(), st.getAfter())); + } else { + node.addChild(new SqlNode(sql)); + } + } else { + node.addChild(new SqlNode(sql)); + } + } + + protected void parseComment() { + String comment = tokenizer.getToken(); + if (isTargetComment(comment)) { + if (isIfComment(comment)) { + parseIf(); + } else if (isBeginComment(comment)) { + parseBegin(); + } else if (isEndComment(comment)) { + return; + } else { + parseCommentBindVariable(); + } + } else if (comment != null && 0 < comment.length()) { + String before = tokenizer.getBefore(); + peek().addChild(new SqlNode(before.substring(before.lastIndexOf("/*")))); + } + } + + protected void parseIf() { + String condition = tokenizer.getToken().substring(2).trim(); + if (StringUtil.isEmpty(condition)) { + throw new IfConditionNotFoundRuntimeException(); + } + IfNode ifNode = new IfNode(condition); + peek().addChild(ifNode); + push(ifNode); + parseEnd(); + } + + protected void parseBegin() { + BeginNode beginNode = new BeginNode(); + peek().addChild(beginNode); + push(beginNode); + parseEnd(); + } + + protected void parseEnd() { + while (SqlTokenizer.EOF != tokenizer.next()) { + if (tokenizer.getTokenType() == SqlTokenizer.COMMENT && isEndComment(tokenizer.getToken())) { + + pop(); + return; + } + parseToken(); + } + throw new EndCommentNotFoundRuntimeException(); + } + + protected void parseElse() { + Node parent = peek(); + if (!(parent instanceof IfNode)) { + return; + } + IfNode ifNode = (IfNode) pop(); + ElseNode elseNode = new ElseNode(); + ifNode.setElseNode(elseNode); + push(elseNode); + tokenizer.skipWhitespace(); + } + + protected void parseCommentBindVariable() { + String expr = tokenizer.getToken(); + String s = tokenizer.skipToken(); + if (s.startsWith("(") && s.endsWith(")")) { + peek().addChild(new ParenBindVariableNode(expr)); + } else if (expr.startsWith("$")) { + peek().addChild(new EmbeddedValueNode(expr.substring(1))); + } else { + peek().addChild(new InternalBindVariableNode(expr));// Extension! + } + } + + protected void parseBindVariable() { + String expr = tokenizer.getToken(); + peek().addChild(new InternalBindVariableNode(expr));// Extension! + } + + protected Node pop() { + return (Node) nodeStack.pop(); + } + + protected Node peek() { + return (Node) nodeStack.peek(); + } + + protected void push(Node node) { + nodeStack.push(node); + } + + protected boolean isElseMode() { + for (int i = 0; i < nodeStack.size(); ++i) { + if (nodeStack.get(i) instanceof ElseNode) { + return true; + } + } + return false; + } + + private static boolean isTargetComment(String comment) { + return comment != null && comment.length() > 0 && Character.isJavaIdentifierStart(comment.charAt(0)); + } + + private static boolean isIfComment(String comment) { + return comment.startsWith("IF"); + } + + private static boolean isBeginComment(String content) { + return content != null && "BEGIN".equals(content); + } + + private static boolean isEndComment(String content) { + return content != null && "END".equals(content); + } + } + + // -------------------------------------- + // BindVariableNode + // ---------------- + protected static class InternalBindVariableNode extends BindVariableNode { + private String expression; + + private String[] names; + + public InternalBindVariableNode(String expression) { + super(expression); + + this.expression = expression; + names = StringUtil.split(expression, "."); + // baseName_ = array[0]; + // if (array.length > 1) { + // propertyName_ = array[1]; + // } + } + + public String getExpression() { + return expression; + } + + public void accept(CommandContext ctx) { + Object value = ctx.getArg(names[0]); + Class clazz = ctx.getArgType(names[0]); + for (int pos = 1; pos < names.length; pos++) { + if (value == null) { + break; + } + if (java.util.Map.class.isInstance(value)) {// Extension! + final java.util.Map map = (java.util.Map) value; + value = map.get(names[pos]); + if (value == null) { + break; + } + clazz = value.getClass(); + } else { + BeanDesc beanDesc = BeanDescFactory.getBeanDesc(clazz); + PropertyDesc pd = beanDesc.getPropertyDesc(names[pos]); + value = pd.getValue(value); + clazz = pd.getPropertyType(); + } + } + ctx.addSql("?", value, clazz); + } + } + + // -------------------------------------- + // StringUtil + // ---------- + protected static class InternalStringUtil { + + public static final String[] EMPTY_STRINGS = new String[0]; + + private InternalStringUtil() { + } + + public static final boolean isEmpty(String text) { + return text == null || text.length() == 0; + } + + public static final String replace(String text, String fromText, + String toText) { + + if (text == null || fromText == null || toText == null) { + return null; + } + StringBuffer buf = new StringBuffer(100); + int pos = 0; + int pos2 = 0; + while (true) { + pos = text.indexOf(fromText, pos2); + if (pos == 0) { + buf.append(toText); + pos2 = fromText.length(); + } else if (pos > 0) { + buf.append(text.substring(pos2, pos)); + buf.append(toText); + pos2 = pos + fromText.length(); + } else { + buf.append(text.substring(pos2)); + break; + } + } + return buf.toString(); + } + + public static String[] split(String str, String delim) { + if (str == null) { + return EMPTY_STRINGS; + } + java.util.List list = new java.util.ArrayList(); + java.util.StringTokenizer st = new java.util.StringTokenizer(str, delim); + while (st.hasMoreElements()) { + list.add(st.nextToken()); + } + return (String[]) list.toArray(new String[list.size()]); + } + } +} \ No newline at end of file Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/s2dao/S2DaoStatementFactory.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/s2dao/S2DaoStatementFactory.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/allcommon/s2dao/S2DaoStatementFactory.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,20 @@ +package jp.sf.pal.pompei.allcommon.s2dao; + +import java.sql.Connection; +import java.sql.PreparedStatement; + +import org.seasar.extension.jdbc.impl.BasicStatementFactory; +import org.seasar.extension.jdbc.util.ConnectionUtil; + +/** + * Statement factory. + * + * @author DBFlute(AutoGenerator) + */ +public class S2DaoStatementFactory extends BasicStatementFactory { + + public PreparedStatement createPreparedStatement(Connection con, String sql) { + return ConnectionUtil.prepareStatement(con, sql); + } + +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/bsbhv/BsAddressBookBhv.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/bsbhv/BsAddressBookBhv.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/bsbhv/BsAddressBookBhv.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,706 @@ + +package jp.sf.pal.pompei.bsbhv; + +import jp.sf.pal.pompei.allcommon.*; +import jp.sf.pal.pompei.allcommon.bhv.load.LoadRefererOption; +import jp.sf.pal.pompei.allcommon.bhv.setup.ConditionBeanSetupper; +import jp.sf.pal.pompei.allcommon.bhv.setup.ValueLabelSetupper; +import jp.sf.pal.pompei.allcommon.cbean.ConditionBean; +import jp.sf.pal.pompei.allcommon.cbean.ListResultBean; +import jp.sf.pal.pompei.allcommon.cbean.PagingBean; +import jp.sf.pal.pompei.allcommon.cbean.PagingResultBean; +import jp.sf.pal.pompei.allcommon.dbmeta.DBMeta; + +import jp.sf.pal.pompei.exdao.*; +import jp.sf.pal.pompei.exentity.*; +import jp.sf.pal.pompei.bsentity.dbmeta.*; +import jp.sf.pal.pompei.cbean.*; + + + +/** + * The behavior of ADDRESS_BOOK. + * + *
+ * [primary-key]
+ *     ADDRESS_BOOK_ID
+ * 
+ * [column-property]
+ *     ADDRESS_BOOK_ID, CUSTOMERS_ID, ENTRY_GENDER, ENTRY_COMPANY, ENTRY_FIRSTNAME, ENTRY_LASTNAME, ENTRY_STREET_ADDRESS, ENTRY_SUBURB, ENTRY_POSTCODE, ENTRY_CITY, ENTRY_STATE, ENTRY_COUNTRY_ID, ENTRY_ZONE_ID
+ * 
+ * [foreign-property]
+ *     
+ * 
+ * [refferer-property]
+ *     
+ * 
+ * [sequence]
+ *     
+ * 
+ * [identity]
+ *     
+ * 
+ * [update-date]
+ *     
+ * 
+ * [version-no]
+ *     
+ * 
+ * 
+ * + * @author DBFlute(AutoGenerator) + */ +public abstract class BsAddressBookBhv extends jp.sf.pal.pompei.allcommon.bhv.AbstractBehaviorWritable { + + // =================================================================================== + // Attribute + // ========= + /** Dao instance. */ + protected AddressBookDao _dao; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + public BsAddressBookBhv() { + } + + // =================================================================================== + // Table name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + public String getTableDbName() { + return "ADDRESS_BOOK"; + } + + // =================================================================================== + // DBMeta + // ====== + /** + * This method implements the method that is declared at super. + * + * @return DBMeta. (NotNull) + */ + public DBMeta getDBMeta() { + return AddressBookDbm.getInstance(); + } + + /** + * Get my dbmeta. + * + * @return DBMeta. (NotNull) + */ + public AddressBookDbm getMyDBMeta() { + return AddressBookDbm.getInstance(); + } + + // =================================================================================== + // Dao Accessor + // ============ + /** + * Get my dao. + * + * @return My dao. + */ + public AddressBookDao getMyDao() { + return _dao; + } + + /** + * Set my dao. + * + * @param dao My dao. (NotNull) + */ + public void setMyDao(AddressBookDao dao) { + assertObjectNotNull("dao", dao); + _dao = dao; + } + + /** + * This method implements the method that is declared at super. + * + * @return Dao-readable. (NotNull) + */ + public DaoReadable getDaoReadable() { + return getMyDao(); + } + + /** + * This method implements the method that is declared at super. + * + * @return Dao-writable. (NotNull) + */ + public DaoWritable getDaoWritable() { + return getMyDao(); + } + + // =================================================================================== + // New Instance + // ============ + /** + * New entity. + * + * @return Entity. (NotNull) + */ + public Entity newEntity() { + return newMyEntity(); + } + + /** + * New condition-bean. + * + * @return Condition-bean. (NotNull) + */ + public ConditionBean newConditionBean() { + return newMyConditionBean(); + } + + /** + * New my entity. + * + * @return My entity. (NotNull) + */ + public AddressBook newMyEntity() { + return new AddressBook(); + } + + /** + * New my condition-bean. + * + * @return My condition-bean. (NotNull) + */ + public AddressBookCB newMyConditionBean() { + return new AddressBookCB(); + } + + // =================================================================================== + // Delegate Method + // =============== + // ----------------------------------------------------- + // Select + // ------ + /** + * Get count as all. (Delegate-Method) + * + * @return All count. (NotNull) + */ + public int delegateGetCountAll() { + return getMyDao().getCountAll(); + } + + /** + * Get list as all. (Delegate-Method) + * + * @return All list. (NotNull) + */ + public java.util.List delegateGetListAll() { + return getMyDao().getListAll(); + } + + // + // Get entity. (Delegate-Method) + // + // @param Primary-keys (NotNull) + // @return Entity. (NotNull) + // + public AddressBook delegateGetEntity(java.math.BigDecimal addressBookId) { + return getMyDao().getEntity(addressBookId); + } + + /** + * Select count by condition-bean. (Delegate-Method) + * + * @param cb Condition-bean. (NotNull) + * @return Selected count. (NotNull) + */ + public int delegateSelectCount(AddressBookCB cb) { + assertConditionBeanNotNull(cb); + return getMyDao().selectCount(cb); + } + + /** + * Select entity by condition-bean. (Delegate-Method) + * + * @param cb Condition-bean. (NotNull) + * @return Selected entity. If the select result is zero, it returns null. (Nullable) + */ + public AddressBook delegateSelectEntity(AddressBookCB cb) { + assertConditionBeanNotNull(cb); + return getMyDao().selectEntity(cb); + } + + /** + * Select list by condition-bean. (Delegate-Method) + * + * @param cb Condition-bean. (NotNull) + * @return Selected list. If the select result is zero, it returns empty list. (NotNull) + */ + public java.util.List delegateSelectList(AddressBookCB cb) { + assertConditionBeanNotNull(cb); + return getMyDao().selectList(cb); + } + + + // ----------------------------------------------------- + // Update + // ------ + /** + * Insert one entity. (Delegate-Method) + * + * @param entity Entity. (NotNull) + * @return Inserted count. + */ + public int delegateInsert(AddressBook entity) { + assertEntityNotNull(entity);// If this table use identity, the entity does not have primary-key. + filterEntityOfInsert(entity); + assertEntityOfInsert(entity); + return getMyDao().insert(entity); + } + + /** + * Update one entity. (Delegate-Method) + * {modified only} + * + * @param entity Entity. (NotNull) + * @return Updated count. + */ + public int delegateUpdate(AddressBook entity) { + assertEntityNotNullAndHasPrimaryKeyValue(entity); + filterEntityOfUpdate(entity); + assertEntityOfUpdate(entity); + return getMyDao().updateModifiedOnly(entity); + } + + /** + * Delete one entity. (Delegate-Method) + * + * @param entity Entity. (NotNull) + * @return Deleted count. + */ + public int delegateDelete(AddressBook entity) { + assertEntityNotNullAndHasPrimaryKeyValue(entity); + filterEntityOfDelete(entity); + assertEntityOfDelete(entity); + return getMyDao().delete(entity); + } + + /** + * Insert several entities. (Delegate-Method) + * + * @param entityList Entity-list. (NotNull & NotEmpty) + * @return Inserted count. + */ + public int delegateInsertList(java.util.List entityList) { + assertListNotNullAndNotEmpty(entityList); + return getMyDao().insertList(entityList); + } + + /** + * Update several entities. (Delegate-Method) + * + * @param entityList Entity-list. (NotNull & NotEmpty) + * @return Updated count. + */ + public int delegateUpdateList(java.util.List entityList) { + assertListNotNullAndNotEmpty(entityList); + return getMyDao().updateList(entityList); + } + + /** + * Delete several entities. (Delegate-Method) + * + * @param entityList Entity-list. (NotNull & NotEmpty) + * @return Deleted count. + */ + public int delegateDeleteList(java.util.List entityList) { + assertListNotNullAndNotEmpty(entityList); + return getMyDao().deleteList(entityList); + } + + // =================================================================================== + // Basic Select Count + // ================== + /** + * Select count by condition-bean. + *
+     * If the argument 'condition-bean' is effective about fetch-scope,
+     * this method invoke select count ignoring the fetch-scope.
+     * 
+ * @param cb Condition-bean. This condition-bean should not be set up about fetch-scope. (NotNull) + * @return Selected count. + */ + public int selectCount(AddressBookCB cb) { + assertConditionBeanNotNull(cb); + return delegateSelectCount(cb); + } + + // =================================================================================== + // Basic Select Entity + // =================== + /** + * Select entity by condition-bean. + * + * @param cb Condition-bean. (NotNull) + * @return Selected entity. (Nullalble) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public AddressBook selectEntity(AddressBookCB cb) { + assertConditionBeanNotNull(cb); + final java.util.List ls = selectList(cb); + if (ls.isEmpty()) { + return null; + } + assertRecordHasBeenSelectedAsOne(ls, cb); + return (AddressBook)ls.get(0); + } + + /** + * Select entity by condition-bean with deleted check. + * + * @param cb Condition-bean. (NotNull) + * @return Selected entity. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public AddressBook selectEntityWithDeletedCheck(AddressBookCB cb) { + assertConditionBeanNotNull(cb); + final java.util.List ls = selectList(cb); + assertRecordHasNotBeenDeleted(ls, cb); + assertRecordHasBeenSelectedAsOne(ls, cb); + return (AddressBook)ls.get(0); + } + + /* + * Select entity with deleted check. {by primary-key} + * + * @param primaryKey + * @return Selected entity. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public AddressBook selectByPKValueWithDeletedCheck(java.math.BigDecimal addressBookId) { + AddressBook entity = new AddressBook(); + entity.setAddressBookId(addressBookId); + final AddressBookCB cb = newMyConditionBean(); + cb.acceptPrimaryKeyMapString(getDBMeta().extractPrimaryKeyMapString(entity)); + return selectEntityWithDeletedCheck(cb); + } + + // =================================================================================== + // Basic Select List + // ================= + /** + * Select list as result-bean. + * + * @param cb Condition-bean. (NotNull) + * @return Selected list-result-bean. (NotNull) + */ + public ListResultBean selectList(AddressBookCB cb) { + assertConditionBeanNotNull(cb); + return new ResultBeanBuilder(this).buildListResultBean(cb, delegateSelectList(cb)); + } + + /** + * Select page as result-bean. + * + * @param cb Condition-bean. (NotNull) + * @return Selected paging-result-bean. (NotNull) + */ + public PagingResultBean selectPage(final AddressBookCB cb) { + assertConditionBeanNotNull(cb); + return selectPage(cb, new SelectPageSimpleInvoker(this)); + } + + /** + * Select page. + * + * @param cb Condition-bean. (NotNull) + * @param invoker Select-page-invoker (NotNull) + * @return Selected paging-result-bean. (NotNull) + */ + public PagingResultBean selectPage(final AddressBookCB cb, SelectPageInvoker invoker) { + assertConditionBeanNotNull(cb); + final SelectPageCallback pageCallback = new SelectPageCallback() { + public PagingBean getPagingBean() { return cb; } + public int selectCountIgnoreFetchScope() { + return selectCount(cb); + } + public java.util.List selectListWithFetchScope() { + return selectList(cb); + } + }; + return invoker.invokeSelectPage(pageCallback); + } + + // =================================================================================== + // Various Select + // ============== + /** + * Select value-label list. + * + * @param cb Condition-bean. (NotNull) + * @param valueLabelSetupper Value-label-setupper. (NotNull) + * @return Value-label list. (NotNull) + */ + public java.util.List> selectValueLabelList(AddressBookCB cb, ValueLabelSetupper valueLabelSetupper) { + return createValueLabelList(selectList(cb), valueLabelSetupper); + } + + // =================================================================================== + // Load Referer + // ============ + + // =================================================================================== + // Pull Out Foreign + // ================ + + // =================================================================================== + // Basic Entity Update + // =================== + /** + * Insert. + * + * @param addressBook Entity. (NotNull) + */ + public void insert(AddressBook addressBook) { + assertEntityNotNull(addressBook); + delegateInsert(addressBook); + } + + protected void doCreate(Entity addressBook) { + insert((AddressBook)addressBook); + } + + /** + * Update. + *
+     * If it updates count zero, throws exception.
+     * If concurrency control of this table is valid, this update have it.
+     * 
+ * @param addressBook Entity. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public void update(AddressBook addressBook) { + assertEntityNotNull(addressBook); + final int updatedCount = delegateUpdate(addressBook); + if (updatedCount == 0) { + throw new jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException(addressBook.toString()); + } else if (updatedCount > 1) { + String msg = "updatedCount=" + updatedCount + ": " + addressBook.toString(); + throw new jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException(msg); + } + } + + protected void doModify(Entity addressBook) { + update((AddressBook)addressBook); + } + + /** + * Update after select. + * + * @param addressBook Entity. This must contain primary-key value at least. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + */ + public void updateAfterSelect(AddressBook addressBook) { + assertEntityNotNullAndHasPrimaryKeyValue(addressBook); + final AddressBookCB cb = newMyConditionBean(); + cb.acceptPrimaryKeyMapString(getDBMeta().extractPrimaryKeyMapString(addressBook)); + final AddressBook currentEntity = selectEntityWithDeletedCheck(cb); + mergeEntity(addressBook, currentEntity); + update(currentEntity); + } + + protected void doModifyAfterSelect(Entity addressBook) { + updateAfterSelect((AddressBook)addressBook); + } + + /** + * Insert or update. + * {update: modified only} + * + * @param addressBook Entity. This should contain primary-key value at least(Except use identity). (NotNull) + */ + public void insertOrUpdate(AddressBook addressBook) { + assertEntityNotNull(addressBook); + if (!addressBook.hasPrimaryKeyValue()) { + insert(addressBook); + } else { + try { + update(addressBook); + } catch (org.seasar.dao.NotSingleRowUpdatedRuntimeException e) { + insert(addressBook); + } catch (jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException e) { + insert(addressBook); + } + } + } + + protected void doCreateOrUpdateNonstrict(Entity addressBook) { + + insertOrUpdate((AddressBook)addressBook); + + } + + /** + * Insert or update after select. + * {update: modified only} + * + * @param addressBook Entity. This should contain primary-key value at least(Except use identity). (NotNull) + */ + public void insertOrUpdateAfterSelect(AddressBook addressBook) { + assertEntityNotNull(addressBook); + if (!addressBook.hasPrimaryKeyValue()) { + insert(addressBook); + return; + } + AddressBook currentEntity = null; + try { + final AddressBookCB cb = newMyConditionBean(); + cb.acceptPrimaryKeyMapString(getDBMeta().extractPrimaryKeyMapString(addressBook)); + currentEntity = selectEntityWithDeletedCheck(cb); + } catch (jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException e) { + insert(addressBook); + return; + } + assertEntityNotNullAndHasPrimaryKeyValue(addressBook); + mergeEntity(addressBook, currentEntity); + update(currentEntity); + } + + protected void doCreateOrModifyAfterSelect(Entity entity) { + insertOrUpdateAfterSelect((AddressBook)entity); + } + + /** + * This method implements the method that is declared at super. + * + * @param sourceEntity Source entity. (NotNull) + * @param destinationEntity Destination entity. (NotNull) + */ + protected void mergeEntity(Entity sourceEntity, Entity destinationEntity) { + assertEntityNotNull(sourceEntity); + assertEntityNotNull(destinationEntity); + final AddressBook sourceMyEntity = (AddressBook)sourceEntity; + final AddressBook destinationMyEntity = (AddressBook)destinationEntity; + destinationMyEntity.clearModifiedPropertyNames(); + final java.util.Set names = sourceMyEntity.getModifiedPropertyNames(); + + if (names.contains("addressBookId")) { destinationMyEntity.setAddressBookId(sourceMyEntity.getAddressBookId()); } + if (names.contains("customersId")) { destinationMyEntity.setCustomersId(sourceMyEntity.getCustomersId()); } + if (names.contains("entryGender")) { destinationMyEntity.setEntryGender(sourceMyEntity.getEntryGender()); } + if (names.contains("entryCompany")) { destinationMyEntity.setEntryCompany(sourceMyEntity.getEntryCompany()); } + if (names.contains("entryFirstname")) { destinationMyEntity.setEntryFirstname(sourceMyEntity.getEntryFirstname()); } + if (names.contains("entryLastname")) { destinationMyEntity.setEntryLastname(sourceMyEntity.getEntryLastname()); } + if (names.contains("entryStreetAddress")) { destinationMyEntity.setEntryStreetAddress(sourceMyEntity.getEntryStreetAddress()); } + if (names.contains("entrySuburb")) { destinationMyEntity.setEntrySuburb(sourceMyEntity.getEntrySuburb()); } + if (names.contains("entryPostcode")) { destinationMyEntity.setEntryPostcode(sourceMyEntity.getEntryPostcode()); } + if (names.contains("entryCity")) { destinationMyEntity.setEntryCity(sourceMyEntity.getEntryCity()); } + if (names.contains("entryState")) { destinationMyEntity.setEntryState(sourceMyEntity.getEntryState()); } + if (names.contains("entryCountryId")) { destinationMyEntity.setEntryCountryId(sourceMyEntity.getEntryCountryId()); } + if (names.contains("entryZoneId")) { destinationMyEntity.setEntryZoneId(sourceMyEntity.getEntryZoneId()); } + + } + + /** + * Delete. + * + * @param addressBook Entity. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public void delete(AddressBook addressBook) { + assertEntityNotNull(addressBook); + final int deletedCount = delegateDelete(addressBook); + if (deletedCount == 0) { + throw new jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException(addressBook.toString()); + } else if (deletedCount > 1) { + String msg = "deletedCount=" + deletedCount + ": " + addressBook.toString(); + throw new jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException(msg); + } + } + + protected void doRemove(Entity addressBook) { + delete((AddressBook)addressBook); + } + + /** + * Delete after select. + * + * @param addressBook Entity. This must contain primary-key value at least. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + */ + public void deleteAfterSelect(AddressBook addressBook) { + assertEntityNotNullAndHasPrimaryKeyValue(addressBook); + final AddressBookCB cb = newMyConditionBean(); + cb.acceptPrimaryKeyMapString(getDBMeta().extractPrimaryKeyMapString(addressBook)); + selectEntityWithDeletedCheck(cb); + delete(addressBook); + } + + protected void doRemoveAfterSelect(Entity addressBook) { + deleteAfterSelect((AddressBook)addressBook); + } + + // =================================================================================== + // Basic Batch Update + // ================== + /** + * Insert list. + * + * @param addressBookList Entity-list. (NotNull & NotEmpty) + * @return Inserted count. + */ + public int insertList(java.util.List addressBookList) { + assertListNotNullAndNotEmpty(addressBookList); + return delegateInsertList(addressBookList); + } + + /** + * Update list. + * + * @param addressBookList Entity-list. (NotNull & NotEmpty) + * @return Updated count. + */ + public int updateList(java.util.List addressBookList) { + assertListNotNullAndNotEmpty(addressBookList); + return delegateUpdateList(addressBookList); + } + + /** + * Delete list. + * + * @param addressBookList Entity-list. (NotNull & NotEmpty) + * @return Deleted count. + */ + public int deleteList(java.util.List addressBookList) { + assertListNotNullAndNotEmpty(addressBookList); + return delegateDeleteList(addressBookList); + } + + // =================================================================================== + // Various Insert + // ============== + + // =================================================================================== + // CBSetupper + // ========== + /** + * The interface of condition-bean setupper. + */ + public static interface CBSetupper extends ConditionBeanSetupper { + + /** + * Set up condition. + * + * @param cb Condition-bean. (NotNull) + */ + public void setup(AddressBookCB cb); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/bsbhv/BsAddressFormatBhv.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/bsbhv/BsAddressFormatBhv.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/bsbhv/BsAddressFormatBhv.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,696 @@ + +package jp.sf.pal.pompei.bsbhv; + +import jp.sf.pal.pompei.allcommon.*; +import jp.sf.pal.pompei.allcommon.bhv.load.LoadRefererOption; +import jp.sf.pal.pompei.allcommon.bhv.setup.ConditionBeanSetupper; +import jp.sf.pal.pompei.allcommon.bhv.setup.ValueLabelSetupper; +import jp.sf.pal.pompei.allcommon.cbean.ConditionBean; +import jp.sf.pal.pompei.allcommon.cbean.ListResultBean; +import jp.sf.pal.pompei.allcommon.cbean.PagingBean; +import jp.sf.pal.pompei.allcommon.cbean.PagingResultBean; +import jp.sf.pal.pompei.allcommon.dbmeta.DBMeta; + +import jp.sf.pal.pompei.exdao.*; +import jp.sf.pal.pompei.exentity.*; +import jp.sf.pal.pompei.bsentity.dbmeta.*; +import jp.sf.pal.pompei.cbean.*; + + + +/** + * The behavior of ADDRESS_FORMAT. + * + *
+ * [primary-key]
+ *     ADDRESS_FORMAT_ID
+ * 
+ * [column-property]
+ *     ADDRESS_FORMAT_ID, ADDRESS_FORMAT, ADDRESS_SUMMARY
+ * 
+ * [foreign-property]
+ *     
+ * 
+ * [refferer-property]
+ *     
+ * 
+ * [sequence]
+ *     
+ * 
+ * [identity]
+ *     
+ * 
+ * [update-date]
+ *     
+ * 
+ * [version-no]
+ *     
+ * 
+ * 
+ * + * @author DBFlute(AutoGenerator) + */ +public abstract class BsAddressFormatBhv extends jp.sf.pal.pompei.allcommon.bhv.AbstractBehaviorWritable { + + // =================================================================================== + // Attribute + // ========= + /** Dao instance. */ + protected AddressFormatDao _dao; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + public BsAddressFormatBhv() { + } + + // =================================================================================== + // Table name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + public String getTableDbName() { + return "ADDRESS_FORMAT"; + } + + // =================================================================================== + // DBMeta + // ====== + /** + * This method implements the method that is declared at super. + * + * @return DBMeta. (NotNull) + */ + public DBMeta getDBMeta() { + return AddressFormatDbm.getInstance(); + } + + /** + * Get my dbmeta. + * + * @return DBMeta. (NotNull) + */ + public AddressFormatDbm getMyDBMeta() { + return AddressFormatDbm.getInstance(); + } + + // =================================================================================== + // Dao Accessor + // ============ + /** + * Get my dao. + * + * @return My dao. + */ + public AddressFormatDao getMyDao() { + return _dao; + } + + /** + * Set my dao. + * + * @param dao My dao. (NotNull) + */ + public void setMyDao(AddressFormatDao dao) { + assertObjectNotNull("dao", dao); + _dao = dao; + } + + /** + * This method implements the method that is declared at super. + * + * @return Dao-readable. (NotNull) + */ + public DaoReadable getDaoReadable() { + return getMyDao(); + } + + /** + * This method implements the method that is declared at super. + * + * @return Dao-writable. (NotNull) + */ + public DaoWritable getDaoWritable() { + return getMyDao(); + } + + // =================================================================================== + // New Instance + // ============ + /** + * New entity. + * + * @return Entity. (NotNull) + */ + public Entity newEntity() { + return newMyEntity(); + } + + /** + * New condition-bean. + * + * @return Condition-bean. (NotNull) + */ + public ConditionBean newConditionBean() { + return newMyConditionBean(); + } + + /** + * New my entity. + * + * @return My entity. (NotNull) + */ + public AddressFormat newMyEntity() { + return new AddressFormat(); + } + + /** + * New my condition-bean. + * + * @return My condition-bean. (NotNull) + */ + public AddressFormatCB newMyConditionBean() { + return new AddressFormatCB(); + } + + // =================================================================================== + // Delegate Method + // =============== + // ----------------------------------------------------- + // Select + // ------ + /** + * Get count as all. (Delegate-Method) + * + * @return All count. (NotNull) + */ + public int delegateGetCountAll() { + return getMyDao().getCountAll(); + } + + /** + * Get list as all. (Delegate-Method) + * + * @return All list. (NotNull) + */ + public java.util.List delegateGetListAll() { + return getMyDao().getListAll(); + } + + // + // Get entity. (Delegate-Method) + // + // @param Primary-keys (NotNull) + // @return Entity. (NotNull) + // + public AddressFormat delegateGetEntity(java.math.BigDecimal addressFormatId) { + return getMyDao().getEntity(addressFormatId); + } + + /** + * Select count by condition-bean. (Delegate-Method) + * + * @param cb Condition-bean. (NotNull) + * @return Selected count. (NotNull) + */ + public int delegateSelectCount(AddressFormatCB cb) { + assertConditionBeanNotNull(cb); + return getMyDao().selectCount(cb); + } + + /** + * Select entity by condition-bean. (Delegate-Method) + * + * @param cb Condition-bean. (NotNull) + * @return Selected entity. If the select result is zero, it returns null. (Nullable) + */ + public AddressFormat delegateSelectEntity(AddressFormatCB cb) { + assertConditionBeanNotNull(cb); + return getMyDao().selectEntity(cb); + } + + /** + * Select list by condition-bean. (Delegate-Method) + * + * @param cb Condition-bean. (NotNull) + * @return Selected list. If the select result is zero, it returns empty list. (NotNull) + */ + public java.util.List delegateSelectList(AddressFormatCB cb) { + assertConditionBeanNotNull(cb); + return getMyDao().selectList(cb); + } + + + // ----------------------------------------------------- + // Update + // ------ + /** + * Insert one entity. (Delegate-Method) + * + * @param entity Entity. (NotNull) + * @return Inserted count. + */ + public int delegateInsert(AddressFormat entity) { + assertEntityNotNull(entity);// If this table use identity, the entity does not have primary-key. + filterEntityOfInsert(entity); + assertEntityOfInsert(entity); + return getMyDao().insert(entity); + } + + /** + * Update one entity. (Delegate-Method) + * {modified only} + * + * @param entity Entity. (NotNull) + * @return Updated count. + */ + public int delegateUpdate(AddressFormat entity) { + assertEntityNotNullAndHasPrimaryKeyValue(entity); + filterEntityOfUpdate(entity); + assertEntityOfUpdate(entity); + return getMyDao().updateModifiedOnly(entity); + } + + /** + * Delete one entity. (Delegate-Method) + * + * @param entity Entity. (NotNull) + * @return Deleted count. + */ + public int delegateDelete(AddressFormat entity) { + assertEntityNotNullAndHasPrimaryKeyValue(entity); + filterEntityOfDelete(entity); + assertEntityOfDelete(entity); + return getMyDao().delete(entity); + } + + /** + * Insert several entities. (Delegate-Method) + * + * @param entityList Entity-list. (NotNull & NotEmpty) + * @return Inserted count. + */ + public int delegateInsertList(java.util.List entityList) { + assertListNotNullAndNotEmpty(entityList); + return getMyDao().insertList(entityList); + } + + /** + * Update several entities. (Delegate-Method) + * + * @param entityList Entity-list. (NotNull & NotEmpty) + * @return Updated count. + */ + public int delegateUpdateList(java.util.List entityList) { + assertListNotNullAndNotEmpty(entityList); + return getMyDao().updateList(entityList); + } + + /** + * Delete several entities. (Delegate-Method) + * + * @param entityList Entity-list. (NotNull & NotEmpty) + * @return Deleted count. + */ + public int delegateDeleteList(java.util.List entityList) { + assertListNotNullAndNotEmpty(entityList); + return getMyDao().deleteList(entityList); + } + + // =================================================================================== + // Basic Select Count + // ================== + /** + * Select count by condition-bean. + *
+     * If the argument 'condition-bean' is effective about fetch-scope,
+     * this method invoke select count ignoring the fetch-scope.
+     * 
+ * @param cb Condition-bean. This condition-bean should not be set up about fetch-scope. (NotNull) + * @return Selected count. + */ + public int selectCount(AddressFormatCB cb) { + assertConditionBeanNotNull(cb); + return delegateSelectCount(cb); + } + + // =================================================================================== + // Basic Select Entity + // =================== + /** + * Select entity by condition-bean. + * + * @param cb Condition-bean. (NotNull) + * @return Selected entity. (Nullalble) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public AddressFormat selectEntity(AddressFormatCB cb) { + assertConditionBeanNotNull(cb); + final java.util.List ls = selectList(cb); + if (ls.isEmpty()) { + return null; + } + assertRecordHasBeenSelectedAsOne(ls, cb); + return (AddressFormat)ls.get(0); + } + + /** + * Select entity by condition-bean with deleted check. + * + * @param cb Condition-bean. (NotNull) + * @return Selected entity. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public AddressFormat selectEntityWithDeletedCheck(AddressFormatCB cb) { + assertConditionBeanNotNull(cb); + final java.util.List ls = selectList(cb); + assertRecordHasNotBeenDeleted(ls, cb); + assertRecordHasBeenSelectedAsOne(ls, cb); + return (AddressFormat)ls.get(0); + } + + /* + * Select entity with deleted check. {by primary-key} + * + * @param primaryKey + * @return Selected entity. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public AddressFormat selectByPKValueWithDeletedCheck(java.math.BigDecimal addressFormatId) { + AddressFormat entity = new AddressFormat(); + entity.setAddressFormatId(addressFormatId); + final AddressFormatCB cb = newMyConditionBean(); + cb.acceptPrimaryKeyMapString(getDBMeta().extractPrimaryKeyMapString(entity)); + return selectEntityWithDeletedCheck(cb); + } + + // =================================================================================== + // Basic Select List + // ================= + /** + * Select list as result-bean. + * + * @param cb Condition-bean. (NotNull) + * @return Selected list-result-bean. (NotNull) + */ + public ListResultBean selectList(AddressFormatCB cb) { + assertConditionBeanNotNull(cb); + return new ResultBeanBuilder(this).buildListResultBean(cb, delegateSelectList(cb)); + } + + /** + * Select page as result-bean. + * + * @param cb Condition-bean. (NotNull) + * @return Selected paging-result-bean. (NotNull) + */ + public PagingResultBean selectPage(final AddressFormatCB cb) { + assertConditionBeanNotNull(cb); + return selectPage(cb, new SelectPageSimpleInvoker(this)); + } + + /** + * Select page. + * + * @param cb Condition-bean. (NotNull) + * @param invoker Select-page-invoker (NotNull) + * @return Selected paging-result-bean. (NotNull) + */ + public PagingResultBean selectPage(final AddressFormatCB cb, SelectPageInvoker invoker) { + assertConditionBeanNotNull(cb); + final SelectPageCallback pageCallback = new SelectPageCallback() { + public PagingBean getPagingBean() { return cb; } + public int selectCountIgnoreFetchScope() { + return selectCount(cb); + } + public java.util.List selectListWithFetchScope() { + return selectList(cb); + } + }; + return invoker.invokeSelectPage(pageCallback); + } + + // =================================================================================== + // Various Select + // ============== + /** + * Select value-label list. + * + * @param cb Condition-bean. (NotNull) + * @param valueLabelSetupper Value-label-setupper. (NotNull) + * @return Value-label list. (NotNull) + */ + public java.util.List> selectValueLabelList(AddressFormatCB cb, ValueLabelSetupper valueLabelSetupper) { + return createValueLabelList(selectList(cb), valueLabelSetupper); + } + + // =================================================================================== + // Load Referer + // ============ + + // =================================================================================== + // Pull Out Foreign + // ================ + + // =================================================================================== + // Basic Entity Update + // =================== + /** + * Insert. + * + * @param addressFormat Entity. (NotNull) + */ + public void insert(AddressFormat addressFormat) { + assertEntityNotNull(addressFormat); + delegateInsert(addressFormat); + } + + protected void doCreate(Entity addressFormat) { + insert((AddressFormat)addressFormat); + } + + /** + * Update. + *
+     * If it updates count zero, throws exception.
+     * If concurrency control of this table is valid, this update have it.
+     * 
+ * @param addressFormat Entity. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public void update(AddressFormat addressFormat) { + assertEntityNotNull(addressFormat); + final int updatedCount = delegateUpdate(addressFormat); + if (updatedCount == 0) { + throw new jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException(addressFormat.toString()); + } else if (updatedCount > 1) { + String msg = "updatedCount=" + updatedCount + ": " + addressFormat.toString(); + throw new jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException(msg); + } + } + + protected void doModify(Entity addressFormat) { + update((AddressFormat)addressFormat); + } + + /** + * Update after select. + * + * @param addressFormat Entity. This must contain primary-key value at least. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + */ + public void updateAfterSelect(AddressFormat addressFormat) { + assertEntityNotNullAndHasPrimaryKeyValue(addressFormat); + final AddressFormatCB cb = newMyConditionBean(); + cb.acceptPrimaryKeyMapString(getDBMeta().extractPrimaryKeyMapString(addressFormat)); + final AddressFormat currentEntity = selectEntityWithDeletedCheck(cb); + mergeEntity(addressFormat, currentEntity); + update(currentEntity); + } + + protected void doModifyAfterSelect(Entity addressFormat) { + updateAfterSelect((AddressFormat)addressFormat); + } + + /** + * Insert or update. + * {update: modified only} + * + * @param addressFormat Entity. This should contain primary-key value at least(Except use identity). (NotNull) + */ + public void insertOrUpdate(AddressFormat addressFormat) { + assertEntityNotNull(addressFormat); + if (!addressFormat.hasPrimaryKeyValue()) { + insert(addressFormat); + } else { + try { + update(addressFormat); + } catch (org.seasar.dao.NotSingleRowUpdatedRuntimeException e) { + insert(addressFormat); + } catch (jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException e) { + insert(addressFormat); + } + } + } + + protected void doCreateOrUpdateNonstrict(Entity addressFormat) { + + insertOrUpdate((AddressFormat)addressFormat); + + } + + /** + * Insert or update after select. + * {update: modified only} + * + * @param addressFormat Entity. This should contain primary-key value at least(Except use identity). (NotNull) + */ + public void insertOrUpdateAfterSelect(AddressFormat addressFormat) { + assertEntityNotNull(addressFormat); + if (!addressFormat.hasPrimaryKeyValue()) { + insert(addressFormat); + return; + } + AddressFormat currentEntity = null; + try { + final AddressFormatCB cb = newMyConditionBean(); + cb.acceptPrimaryKeyMapString(getDBMeta().extractPrimaryKeyMapString(addressFormat)); + currentEntity = selectEntityWithDeletedCheck(cb); + } catch (jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException e) { + insert(addressFormat); + return; + } + assertEntityNotNullAndHasPrimaryKeyValue(addressFormat); + mergeEntity(addressFormat, currentEntity); + update(currentEntity); + } + + protected void doCreateOrModifyAfterSelect(Entity entity) { + insertOrUpdateAfterSelect((AddressFormat)entity); + } + + /** + * This method implements the method that is declared at super. + * + * @param sourceEntity Source entity. (NotNull) + * @param destinationEntity Destination entity. (NotNull) + */ + protected void mergeEntity(Entity sourceEntity, Entity destinationEntity) { + assertEntityNotNull(sourceEntity); + assertEntityNotNull(destinationEntity); + final AddressFormat sourceMyEntity = (AddressFormat)sourceEntity; + final AddressFormat destinationMyEntity = (AddressFormat)destinationEntity; + destinationMyEntity.clearModifiedPropertyNames(); + final java.util.Set names = sourceMyEntity.getModifiedPropertyNames(); + + if (names.contains("addressFormatId")) { destinationMyEntity.setAddressFormatId(sourceMyEntity.getAddressFormatId()); } + if (names.contains("addressFormat")) { destinationMyEntity.setAddressFormat(sourceMyEntity.getAddressFormat()); } + if (names.contains("addressSummary")) { destinationMyEntity.setAddressSummary(sourceMyEntity.getAddressSummary()); } + + } + + /** + * Delete. + * + * @param addressFormat Entity. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public void delete(AddressFormat addressFormat) { + assertEntityNotNull(addressFormat); + final int deletedCount = delegateDelete(addressFormat); + if (deletedCount == 0) { + throw new jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException(addressFormat.toString()); + } else if (deletedCount > 1) { + String msg = "deletedCount=" + deletedCount + ": " + addressFormat.toString(); + throw new jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException(msg); + } + } + + protected void doRemove(Entity addressFormat) { + delete((AddressFormat)addressFormat); + } + + /** + * Delete after select. + * + * @param addressFormat Entity. This must contain primary-key value at least. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + */ + public void deleteAfterSelect(AddressFormat addressFormat) { + assertEntityNotNullAndHasPrimaryKeyValue(addressFormat); + final AddressFormatCB cb = newMyConditionBean(); + cb.acceptPrimaryKeyMapString(getDBMeta().extractPrimaryKeyMapString(addressFormat)); + selectEntityWithDeletedCheck(cb); + delete(addressFormat); + } + + protected void doRemoveAfterSelect(Entity addressFormat) { + deleteAfterSelect((AddressFormat)addressFormat); + } + + // =================================================================================== + // Basic Batch Update + // ================== + /** + * Insert list. + * + * @param addressFormatList Entity-list. (NotNull & NotEmpty) + * @return Inserted count. + */ + public int insertList(java.util.List addressFormatList) { + assertListNotNullAndNotEmpty(addressFormatList); + return delegateInsertList(addressFormatList); + } + + /** + * Update list. + * + * @param addressFormatList Entity-list. (NotNull & NotEmpty) + * @return Updated count. + */ + public int updateList(java.util.List addressFormatList) { + assertListNotNullAndNotEmpty(addressFormatList); + return delegateUpdateList(addressFormatList); + } + + /** + * Delete list. + * + * @param addressFormatList Entity-list. (NotNull & NotEmpty) + * @return Deleted count. + */ + public int deleteList(java.util.List addressFormatList) { + assertListNotNullAndNotEmpty(addressFormatList); + return delegateDeleteList(addressFormatList); + } + + // =================================================================================== + // Various Insert + // ============== + + // =================================================================================== + // CBSetupper + // ========== + /** + * The interface of condition-bean setupper. + */ + public static interface CBSetupper extends ConditionBeanSetupper { + + /** + * Set up condition. + * + * @param cb Condition-bean. (NotNull) + */ + public void setup(AddressFormatCB cb); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/bsbhv/BsBannersBhv.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/bsbhv/BsBannersBhv.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/bsbhv/BsBannersBhv.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,705 @@ + +package jp.sf.pal.pompei.bsbhv; + +import jp.sf.pal.pompei.allcommon.*; +import jp.sf.pal.pompei.allcommon.bhv.load.LoadRefererOption; +import jp.sf.pal.pompei.allcommon.bhv.setup.ConditionBeanSetupper; +import jp.sf.pal.pompei.allcommon.bhv.setup.ValueLabelSetupper; +import jp.sf.pal.pompei.allcommon.cbean.ConditionBean; +import jp.sf.pal.pompei.allcommon.cbean.ListResultBean; +import jp.sf.pal.pompei.allcommon.cbean.PagingBean; +import jp.sf.pal.pompei.allcommon.cbean.PagingResultBean; +import jp.sf.pal.pompei.allcommon.dbmeta.DBMeta; + +import jp.sf.pal.pompei.exdao.*; +import jp.sf.pal.pompei.exentity.*; +import jp.sf.pal.pompei.bsentity.dbmeta.*; +import jp.sf.pal.pompei.cbean.*; + + + +/** + * The behavior of BANNERS. + * + *
+ * [primary-key]
+ *     BANNERS_ID
+ * 
+ * [column-property]
+ *     BANNERS_ID, BANNERS_TITLE, BANNERS_URL, BANNERS_IMAGE, BANNERS_GROUP, BANNERS_HTML_TEXT, EXPIRES_IMPRESSIONS, EXPIRES_DATE, DATE_SCHEDULED, DATE_ADDED, DATE_STATUS_CHANGE, STATUS
+ * 
+ * [foreign-property]
+ *     
+ * 
+ * [refferer-property]
+ *     
+ * 
+ * [sequence]
+ *     
+ * 
+ * [identity]
+ *     
+ * 
+ * [update-date]
+ *     
+ * 
+ * [version-no]
+ *     
+ * 
+ * 
+ * + * @author DBFlute(AutoGenerator) + */ +public abstract class BsBannersBhv extends jp.sf.pal.pompei.allcommon.bhv.AbstractBehaviorWritable { + + // =================================================================================== + // Attribute + // ========= + /** Dao instance. */ + protected BannersDao _dao; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + public BsBannersBhv() { + } + + // =================================================================================== + // Table name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + public String getTableDbName() { + return "BANNERS"; + } + + // =================================================================================== + // DBMeta + // ====== + /** + * This method implements the method that is declared at super. + * + * @return DBMeta. (NotNull) + */ + public DBMeta getDBMeta() { + return BannersDbm.getInstance(); + } + + /** + * Get my dbmeta. + * + * @return DBMeta. (NotNull) + */ + public BannersDbm getMyDBMeta() { + return BannersDbm.getInstance(); + } + + // =================================================================================== + // Dao Accessor + // ============ + /** + * Get my dao. + * + * @return My dao. + */ + public BannersDao getMyDao() { + return _dao; + } + + /** + * Set my dao. + * + * @param dao My dao. (NotNull) + */ + public void setMyDao(BannersDao dao) { + assertObjectNotNull("dao", dao); + _dao = dao; + } + + /** + * This method implements the method that is declared at super. + * + * @return Dao-readable. (NotNull) + */ + public DaoReadable getDaoReadable() { + return getMyDao(); + } + + /** + * This method implements the method that is declared at super. + * + * @return Dao-writable. (NotNull) + */ + public DaoWritable getDaoWritable() { + return getMyDao(); + } + + // =================================================================================== + // New Instance + // ============ + /** + * New entity. + * + * @return Entity. (NotNull) + */ + public Entity newEntity() { + return newMyEntity(); + } + + /** + * New condition-bean. + * + * @return Condition-bean. (NotNull) + */ + public ConditionBean newConditionBean() { + return newMyConditionBean(); + } + + /** + * New my entity. + * + * @return My entity. (NotNull) + */ + public Banners newMyEntity() { + return new Banners(); + } + + /** + * New my condition-bean. + * + * @return My condition-bean. (NotNull) + */ + public BannersCB newMyConditionBean() { + return new BannersCB(); + } + + // =================================================================================== + // Delegate Method + // =============== + // ----------------------------------------------------- + // Select + // ------ + /** + * Get count as all. (Delegate-Method) + * + * @return All count. (NotNull) + */ + public int delegateGetCountAll() { + return getMyDao().getCountAll(); + } + + /** + * Get list as all. (Delegate-Method) + * + * @return All list. (NotNull) + */ + public java.util.List delegateGetListAll() { + return getMyDao().getListAll(); + } + + // + // Get entity. (Delegate-Method) + // + // @param Primary-keys (NotNull) + // @return Entity. (NotNull) + // + public Banners delegateGetEntity(java.math.BigDecimal bannersId) { + return getMyDao().getEntity(bannersId); + } + + /** + * Select count by condition-bean. (Delegate-Method) + * + * @param cb Condition-bean. (NotNull) + * @return Selected count. (NotNull) + */ + public int delegateSelectCount(BannersCB cb) { + assertConditionBeanNotNull(cb); + return getMyDao().selectCount(cb); + } + + /** + * Select entity by condition-bean. (Delegate-Method) + * + * @param cb Condition-bean. (NotNull) + * @return Selected entity. If the select result is zero, it returns null. (Nullable) + */ + public Banners delegateSelectEntity(BannersCB cb) { + assertConditionBeanNotNull(cb); + return getMyDao().selectEntity(cb); + } + + /** + * Select list by condition-bean. (Delegate-Method) + * + * @param cb Condition-bean. (NotNull) + * @return Selected list. If the select result is zero, it returns empty list. (NotNull) + */ + public java.util.List delegateSelectList(BannersCB cb) { + assertConditionBeanNotNull(cb); + return getMyDao().selectList(cb); + } + + + // ----------------------------------------------------- + // Update + // ------ + /** + * Insert one entity. (Delegate-Method) + * + * @param entity Entity. (NotNull) + * @return Inserted count. + */ + public int delegateInsert(Banners entity) { + assertEntityNotNull(entity);// If this table use identity, the entity does not have primary-key. + filterEntityOfInsert(entity); + assertEntityOfInsert(entity); + return getMyDao().insert(entity); + } + + /** + * Update one entity. (Delegate-Method) + * {modified only} + * + * @param entity Entity. (NotNull) + * @return Updated count. + */ + public int delegateUpdate(Banners entity) { + assertEntityNotNullAndHasPrimaryKeyValue(entity); + filterEntityOfUpdate(entity); + assertEntityOfUpdate(entity); + return getMyDao().updateModifiedOnly(entity); + } + + /** + * Delete one entity. (Delegate-Method) + * + * @param entity Entity. (NotNull) + * @return Deleted count. + */ + public int delegateDelete(Banners entity) { + assertEntityNotNullAndHasPrimaryKeyValue(entity); + filterEntityOfDelete(entity); + assertEntityOfDelete(entity); + return getMyDao().delete(entity); + } + + /** + * Insert several entities. (Delegate-Method) + * + * @param entityList Entity-list. (NotNull & NotEmpty) + * @return Inserted count. + */ + public int delegateInsertList(java.util.List entityList) { + assertListNotNullAndNotEmpty(entityList); + return getMyDao().insertList(entityList); + } + + /** + * Update several entities. (Delegate-Method) + * + * @param entityList Entity-list. (NotNull & NotEmpty) + * @return Updated count. + */ + public int delegateUpdateList(java.util.List entityList) { + assertListNotNullAndNotEmpty(entityList); + return getMyDao().updateList(entityList); + } + + /** + * Delete several entities. (Delegate-Method) + * + * @param entityList Entity-list. (NotNull & NotEmpty) + * @return Deleted count. + */ + public int delegateDeleteList(java.util.List entityList) { + assertListNotNullAndNotEmpty(entityList); + return getMyDao().deleteList(entityList); + } + + // =================================================================================== + // Basic Select Count + // ================== + /** + * Select count by condition-bean. + *
+     * If the argument 'condition-bean' is effective about fetch-scope,
+     * this method invoke select count ignoring the fetch-scope.
+     * 
+ * @param cb Condition-bean. This condition-bean should not be set up about fetch-scope. (NotNull) + * @return Selected count. + */ + public int selectCount(BannersCB cb) { + assertConditionBeanNotNull(cb); + return delegateSelectCount(cb); + } + + // =================================================================================== + // Basic Select Entity + // =================== + /** + * Select entity by condition-bean. + * + * @param cb Condition-bean. (NotNull) + * @return Selected entity. (Nullalble) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public Banners selectEntity(BannersCB cb) { + assertConditionBeanNotNull(cb); + final java.util.List ls = selectList(cb); + if (ls.isEmpty()) { + return null; + } + assertRecordHasBeenSelectedAsOne(ls, cb); + return (Banners)ls.get(0); + } + + /** + * Select entity by condition-bean with deleted check. + * + * @param cb Condition-bean. (NotNull) + * @return Selected entity. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public Banners selectEntityWithDeletedCheck(BannersCB cb) { + assertConditionBeanNotNull(cb); + final java.util.List ls = selectList(cb); + assertRecordHasNotBeenDeleted(ls, cb); + assertRecordHasBeenSelectedAsOne(ls, cb); + return (Banners)ls.get(0); + } + + /* + * Select entity with deleted check. {by primary-key} + * + * @param primaryKey + * @return Selected entity. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public Banners selectByPKValueWithDeletedCheck(java.math.BigDecimal bannersId) { + Banners entity = new Banners(); + entity.setBannersId(bannersId); + final BannersCB cb = newMyConditionBean(); + cb.acceptPrimaryKeyMapString(getDBMeta().extractPrimaryKeyMapString(entity)); + return selectEntityWithDeletedCheck(cb); + } + + // =================================================================================== + // Basic Select List + // ================= + /** + * Select list as result-bean. + * + * @param cb Condition-bean. (NotNull) + * @return Selected list-result-bean. (NotNull) + */ + public ListResultBean selectList(BannersCB cb) { + assertConditionBeanNotNull(cb); + return new ResultBeanBuilder(this).buildListResultBean(cb, delegateSelectList(cb)); + } + + /** + * Select page as result-bean. + * + * @param cb Condition-bean. (NotNull) + * @return Selected paging-result-bean. (NotNull) + */ + public PagingResultBean selectPage(final BannersCB cb) { + assertConditionBeanNotNull(cb); + return selectPage(cb, new SelectPageSimpleInvoker(this)); + } + + /** + * Select page. + * + * @param cb Condition-bean. (NotNull) + * @param invoker Select-page-invoker (NotNull) + * @return Selected paging-result-bean. (NotNull) + */ + public PagingResultBean selectPage(final BannersCB cb, SelectPageInvoker invoker) { + assertConditionBeanNotNull(cb); + final SelectPageCallback pageCallback = new SelectPageCallback() { + public PagingBean getPagingBean() { return cb; } + public int selectCountIgnoreFetchScope() { + return selectCount(cb); + } + public java.util.List selectListWithFetchScope() { + return selectList(cb); + } + }; + return invoker.invokeSelectPage(pageCallback); + } + + // =================================================================================== + // Various Select + // ============== + /** + * Select value-label list. + * + * @param cb Condition-bean. (NotNull) + * @param valueLabelSetupper Value-label-setupper. (NotNull) + * @return Value-label list. (NotNull) + */ + public java.util.List> selectValueLabelList(BannersCB cb, ValueLabelSetupper valueLabelSetupper) { + return createValueLabelList(selectList(cb), valueLabelSetupper); + } + + // =================================================================================== + // Load Referer + // ============ + + // =================================================================================== + // Pull Out Foreign + // ================ + + // =================================================================================== + // Basic Entity Update + // =================== + /** + * Insert. + * + * @param banners Entity. (NotNull) + */ + public void insert(Banners banners) { + assertEntityNotNull(banners); + delegateInsert(banners); + } + + protected void doCreate(Entity banners) { + insert((Banners)banners); + } + + /** + * Update. + *
+     * If it updates count zero, throws exception.
+     * If concurrency control of this table is valid, this update have it.
+     * 
+ * @param banners Entity. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public void update(Banners banners) { + assertEntityNotNull(banners); + final int updatedCount = delegateUpdate(banners); + if (updatedCount == 0) { + throw new jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException(banners.toString()); + } else if (updatedCount > 1) { + String msg = "updatedCount=" + updatedCount + ": " + banners.toString(); + throw new jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException(msg); + } + } + + protected void doModify(Entity banners) { + update((Banners)banners); + } + + /** + * Update after select. + * + * @param banners Entity. This must contain primary-key value at least. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + */ + public void updateAfterSelect(Banners banners) { + assertEntityNotNullAndHasPrimaryKeyValue(banners); + final BannersCB cb = newMyConditionBean(); + cb.acceptPrimaryKeyMapString(getDBMeta().extractPrimaryKeyMapString(banners)); + final Banners currentEntity = selectEntityWithDeletedCheck(cb); + mergeEntity(banners, currentEntity); + update(currentEntity); + } + + protected void doModifyAfterSelect(Entity banners) { + updateAfterSelect((Banners)banners); + } + + /** + * Insert or update. + * {update: modified only} + * + * @param banners Entity. This should contain primary-key value at least(Except use identity). (NotNull) + */ + public void insertOrUpdate(Banners banners) { + assertEntityNotNull(banners); + if (!banners.hasPrimaryKeyValue()) { + insert(banners); + } else { + try { + update(banners); + } catch (org.seasar.dao.NotSingleRowUpdatedRuntimeException e) { + insert(banners); + } catch (jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException e) { + insert(banners); + } + } + } + + protected void doCreateOrUpdateNonstrict(Entity banners) { + + insertOrUpdate((Banners)banners); + + } + + /** + * Insert or update after select. + * {update: modified only} + * + * @param banners Entity. This should contain primary-key value at least(Except use identity). (NotNull) + */ + public void insertOrUpdateAfterSelect(Banners banners) { + assertEntityNotNull(banners); + if (!banners.hasPrimaryKeyValue()) { + insert(banners); + return; + } + Banners currentEntity = null; + try { + final BannersCB cb = newMyConditionBean(); + cb.acceptPrimaryKeyMapString(getDBMeta().extractPrimaryKeyMapString(banners)); + currentEntity = selectEntityWithDeletedCheck(cb); + } catch (jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException e) { + insert(banners); + return; + } + assertEntityNotNullAndHasPrimaryKeyValue(banners); + mergeEntity(banners, currentEntity); + update(currentEntity); + } + + protected void doCreateOrModifyAfterSelect(Entity entity) { + insertOrUpdateAfterSelect((Banners)entity); + } + + /** + * This method implements the method that is declared at super. + * + * @param sourceEntity Source entity. (NotNull) + * @param destinationEntity Destination entity. (NotNull) + */ + protected void mergeEntity(Entity sourceEntity, Entity destinationEntity) { + assertEntityNotNull(sourceEntity); + assertEntityNotNull(destinationEntity); + final Banners sourceMyEntity = (Banners)sourceEntity; + final Banners destinationMyEntity = (Banners)destinationEntity; + destinationMyEntity.clearModifiedPropertyNames(); + final java.util.Set names = sourceMyEntity.getModifiedPropertyNames(); + + if (names.contains("bannersId")) { destinationMyEntity.setBannersId(sourceMyEntity.getBannersId()); } + if (names.contains("bannersTitle")) { destinationMyEntity.setBannersTitle(sourceMyEntity.getBannersTitle()); } + if (names.contains("bannersUrl")) { destinationMyEntity.setBannersUrl(sourceMyEntity.getBannersUrl()); } + if (names.contains("bannersImage")) { destinationMyEntity.setBannersImage(sourceMyEntity.getBannersImage()); } + if (names.contains("bannersGroup")) { destinationMyEntity.setBannersGroup(sourceMyEntity.getBannersGroup()); } + if (names.contains("bannersHtmlText")) { destinationMyEntity.setBannersHtmlText(sourceMyEntity.getBannersHtmlText()); } + if (names.contains("expiresImpressions")) { destinationMyEntity.setExpiresImpressions(sourceMyEntity.getExpiresImpressions()); } + if (names.contains("expiresDate")) { destinationMyEntity.setExpiresDate(sourceMyEntity.getExpiresDate()); } + if (names.contains("dateScheduled")) { destinationMyEntity.setDateScheduled(sourceMyEntity.getDateScheduled()); } + if (names.contains("dateAdded")) { destinationMyEntity.setDateAdded(sourceMyEntity.getDateAdded()); } + if (names.contains("dateStatusChange")) { destinationMyEntity.setDateStatusChange(sourceMyEntity.getDateStatusChange()); } + if (names.contains("status")) { destinationMyEntity.setStatus(sourceMyEntity.getStatus()); } + + } + + /** + * Delete. + * + * @param banners Entity. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public void delete(Banners banners) { + assertEntityNotNull(banners); + final int deletedCount = delegateDelete(banners); + if (deletedCount == 0) { + throw new jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException(banners.toString()); + } else if (deletedCount > 1) { + String msg = "deletedCount=" + deletedCount + ": " + banners.toString(); + throw new jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException(msg); + } + } + + protected void doRemove(Entity banners) { + delete((Banners)banners); + } + + /** + * Delete after select. + * + * @param banners Entity. This must contain primary-key value at least. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + */ + public void deleteAfterSelect(Banners banners) { + assertEntityNotNullAndHasPrimaryKeyValue(banners); + final BannersCB cb = newMyConditionBean(); + cb.acceptPrimaryKeyMapString(getDBMeta().extractPrimaryKeyMapString(banners)); + selectEntityWithDeletedCheck(cb); + delete(banners); + } + + protected void doRemoveAfterSelect(Entity banners) { + deleteAfterSelect((Banners)banners); + } + + // =================================================================================== + // Basic Batch Update + // ================== + /** + * Insert list. + * + * @param bannersList Entity-list. (NotNull & NotEmpty) + * @return Inserted count. + */ + public int insertList(java.util.List bannersList) { + assertListNotNullAndNotEmpty(bannersList); + return delegateInsertList(bannersList); + } + + /** + * Update list. + * + * @param bannersList Entity-list. (NotNull & NotEmpty) + * @return Updated count. + */ + public int updateList(java.util.List bannersList) { + assertListNotNullAndNotEmpty(bannersList); + return delegateUpdateList(bannersList); + } + + /** + * Delete list. + * + * @param bannersList Entity-list. (NotNull & NotEmpty) + * @return Deleted count. + */ + public int deleteList(java.util.List bannersList) { + assertListNotNullAndNotEmpty(bannersList); + return delegateDeleteList(bannersList); + } + + // =================================================================================== + // Various Insert + // ============== + + // =================================================================================== + // CBSetupper + // ========== + /** + * The interface of condition-bean setupper. + */ + public static interface CBSetupper extends ConditionBeanSetupper { + + /** + * Set up condition. + * + * @param cb Condition-bean. (NotNull) + */ + public void setup(BannersCB cb); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/bsbhv/BsBannersHistoryBhv.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/bsbhv/BsBannersHistoryBhv.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/bsbhv/BsBannersHistoryBhv.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,698 @@ + +package jp.sf.pal.pompei.bsbhv; + +import jp.sf.pal.pompei.allcommon.*; +import jp.sf.pal.pompei.allcommon.bhv.load.LoadRefererOption; +import jp.sf.pal.pompei.allcommon.bhv.setup.ConditionBeanSetupper; +import jp.sf.pal.pompei.allcommon.bhv.setup.ValueLabelSetupper; +import jp.sf.pal.pompei.allcommon.cbean.ConditionBean; +import jp.sf.pal.pompei.allcommon.cbean.ListResultBean; +import jp.sf.pal.pompei.allcommon.cbean.PagingBean; +import jp.sf.pal.pompei.allcommon.cbean.PagingResultBean; +import jp.sf.pal.pompei.allcommon.dbmeta.DBMeta; + +import jp.sf.pal.pompei.exdao.*; +import jp.sf.pal.pompei.exentity.*; +import jp.sf.pal.pompei.bsentity.dbmeta.*; +import jp.sf.pal.pompei.cbean.*; + + + +/** + * The behavior of BANNERS_HISTORY. + * + *
+ * [primary-key]
+ *     BANNERS_HISTORY_ID
+ * 
+ * [column-property]
+ *     BANNERS_HISTORY_ID, BANNERS_ID, BANNERS_SHOWN, BANNERS_CLICKED, BANNERS_HISTORY_DATE
+ * 
+ * [foreign-property]
+ *     
+ * 
+ * [refferer-property]
+ *     
+ * 
+ * [sequence]
+ *     
+ * 
+ * [identity]
+ *     
+ * 
+ * [update-date]
+ *     
+ * 
+ * [version-no]
+ *     
+ * 
+ * 
+ * + * @author DBFlute(AutoGenerator) + */ +public abstract class BsBannersHistoryBhv extends jp.sf.pal.pompei.allcommon.bhv.AbstractBehaviorWritable { + + // =================================================================================== + // Attribute + // ========= + /** Dao instance. */ + protected BannersHistoryDao _dao; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + public BsBannersHistoryBhv() { + } + + // =================================================================================== + // Table name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + public String getTableDbName() { + return "BANNERS_HISTORY"; + } + + // =================================================================================== + // DBMeta + // ====== + /** + * This method implements the method that is declared at super. + * + * @return DBMeta. (NotNull) + */ + public DBMeta getDBMeta() { + return BannersHistoryDbm.getInstance(); + } + + /** + * Get my dbmeta. + * + * @return DBMeta. (NotNull) + */ + public BannersHistoryDbm getMyDBMeta() { + return BannersHistoryDbm.getInstance(); + } + + // =================================================================================== + // Dao Accessor + // ============ + /** + * Get my dao. + * + * @return My dao. + */ + public BannersHistoryDao getMyDao() { + return _dao; + } + + /** + * Set my dao. + * + * @param dao My dao. (NotNull) + */ + public void setMyDao(BannersHistoryDao dao) { + assertObjectNotNull("dao", dao); + _dao = dao; + } + + /** + * This method implements the method that is declared at super. + * + * @return Dao-readable. (NotNull) + */ + public DaoReadable getDaoReadable() { + return getMyDao(); + } + + /** + * This method implements the method that is declared at super. + * + * @return Dao-writable. (NotNull) + */ + public DaoWritable getDaoWritable() { + return getMyDao(); + } + + // =================================================================================== + // New Instance + // ============ + /** + * New entity. + * + * @return Entity. (NotNull) + */ + public Entity newEntity() { + return newMyEntity(); + } + + /** + * New condition-bean. + * + * @return Condition-bean. (NotNull) + */ + public ConditionBean newConditionBean() { + return newMyConditionBean(); + } + + /** + * New my entity. + * + * @return My entity. (NotNull) + */ + public BannersHistory newMyEntity() { + return new BannersHistory(); + } + + /** + * New my condition-bean. + * + * @return My condition-bean. (NotNull) + */ + public BannersHistoryCB newMyConditionBean() { + return new BannersHistoryCB(); + } + + // =================================================================================== + // Delegate Method + // =============== + // ----------------------------------------------------- + // Select + // ------ + /** + * Get count as all. (Delegate-Method) + * + * @return All count. (NotNull) + */ + public int delegateGetCountAll() { + return getMyDao().getCountAll(); + } + + /** + * Get list as all. (Delegate-Method) + * + * @return All list. (NotNull) + */ + public java.util.List delegateGetListAll() { + return getMyDao().getListAll(); + } + + // + // Get entity. (Delegate-Method) + // + // @param Primary-keys (NotNull) + // @return Entity. (NotNull) + // + public BannersHistory delegateGetEntity(java.math.BigDecimal bannersHistoryId) { + return getMyDao().getEntity(bannersHistoryId); + } + + /** + * Select count by condition-bean. (Delegate-Method) + * + * @param cb Condition-bean. (NotNull) + * @return Selected count. (NotNull) + */ + public int delegateSelectCount(BannersHistoryCB cb) { + assertConditionBeanNotNull(cb); + return getMyDao().selectCount(cb); + } + + /** + * Select entity by condition-bean. (Delegate-Method) + * + * @param cb Condition-bean. (NotNull) + * @return Selected entity. If the select result is zero, it returns null. (Nullable) + */ + public BannersHistory delegateSelectEntity(BannersHistoryCB cb) { + assertConditionBeanNotNull(cb); + return getMyDao().selectEntity(cb); + } + + /** + * Select list by condition-bean. (Delegate-Method) + * + * @param cb Condition-bean. (NotNull) + * @return Selected list. If the select result is zero, it returns empty list. (NotNull) + */ + public java.util.List delegateSelectList(BannersHistoryCB cb) { + assertConditionBeanNotNull(cb); + return getMyDao().selectList(cb); + } + + + // ----------------------------------------------------- + // Update + // ------ + /** + * Insert one entity. (Delegate-Method) + * + * @param entity Entity. (NotNull) + * @return Inserted count. + */ + public int delegateInsert(BannersHistory entity) { + assertEntityNotNull(entity);// If this table use identity, the entity does not have primary-key. + filterEntityOfInsert(entity); + assertEntityOfInsert(entity); + return getMyDao().insert(entity); + } + + /** + * Update one entity. (Delegate-Method) + * {modified only} + * + * @param entity Entity. (NotNull) + * @return Updated count. + */ + public int delegateUpdate(BannersHistory entity) { + assertEntityNotNullAndHasPrimaryKeyValue(entity); + filterEntityOfUpdate(entity); + assertEntityOfUpdate(entity); + return getMyDao().updateModifiedOnly(entity); + } + + /** + * Delete one entity. (Delegate-Method) + * + * @param entity Entity. (NotNull) + * @return Deleted count. + */ + public int delegateDelete(BannersHistory entity) { + assertEntityNotNullAndHasPrimaryKeyValue(entity); + filterEntityOfDelete(entity); + assertEntityOfDelete(entity); + return getMyDao().delete(entity); + } + + /** + * Insert several entities. (Delegate-Method) + * + * @param entityList Entity-list. (NotNull & NotEmpty) + * @return Inserted count. + */ + public int delegateInsertList(java.util.List entityList) { + assertListNotNullAndNotEmpty(entityList); + return getMyDao().insertList(entityList); + } + + /** + * Update several entities. (Delegate-Method) + * + * @param entityList Entity-list. (NotNull & NotEmpty) + * @return Updated count. + */ + public int delegateUpdateList(java.util.List entityList) { + assertListNotNullAndNotEmpty(entityList); + return getMyDao().updateList(entityList); + } + + /** + * Delete several entities. (Delegate-Method) + * + * @param entityList Entity-list. (NotNull & NotEmpty) + * @return Deleted count. + */ + public int delegateDeleteList(java.util.List entityList) { + assertListNotNullAndNotEmpty(entityList); + return getMyDao().deleteList(entityList); + } + + // =================================================================================== + // Basic Select Count + // ================== + /** + * Select count by condition-bean. + *
+     * If the argument 'condition-bean' is effective about fetch-scope,
+     * this method invoke select count ignoring the fetch-scope.
+     * 
+ * @param cb Condition-bean. This condition-bean should not be set up about fetch-scope. (NotNull) + * @return Selected count. + */ + public int selectCount(BannersHistoryCB cb) { + assertConditionBeanNotNull(cb); + return delegateSelectCount(cb); + } + + // =================================================================================== + // Basic Select Entity + // =================== + /** + * Select entity by condition-bean. + * + * @param cb Condition-bean. (NotNull) + * @return Selected entity. (Nullalble) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public BannersHistory selectEntity(BannersHistoryCB cb) { + assertConditionBeanNotNull(cb); + final java.util.List ls = selectList(cb); + if (ls.isEmpty()) { + return null; + } + assertRecordHasBeenSelectedAsOne(ls, cb); + return (BannersHistory)ls.get(0); + } + + /** + * Select entity by condition-bean with deleted check. + * + * @param cb Condition-bean. (NotNull) + * @return Selected entity. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public BannersHistory selectEntityWithDeletedCheck(BannersHistoryCB cb) { + assertConditionBeanNotNull(cb); + final java.util.List ls = selectList(cb); + assertRecordHasNotBeenDeleted(ls, cb); + assertRecordHasBeenSelectedAsOne(ls, cb); + return (BannersHistory)ls.get(0); + } + + /* + * Select entity with deleted check. {by primary-key} + * + * @param primaryKey + * @return Selected entity. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public BannersHistory selectByPKValueWithDeletedCheck(java.math.BigDecimal bannersHistoryId) { + BannersHistory entity = new BannersHistory(); + entity.setBannersHistoryId(bannersHistoryId); + final BannersHistoryCB cb = newMyConditionBean(); + cb.acceptPrimaryKeyMapString(getDBMeta().extractPrimaryKeyMapString(entity)); + return selectEntityWithDeletedCheck(cb); + } + + // =================================================================================== + // Basic Select List + // ================= + /** + * Select list as result-bean. + * + * @param cb Condition-bean. (NotNull) + * @return Selected list-result-bean. (NotNull) + */ + public ListResultBean selectList(BannersHistoryCB cb) { + assertConditionBeanNotNull(cb); + return new ResultBeanBuilder(this).buildListResultBean(cb, delegateSelectList(cb)); + } + + /** + * Select page as result-bean. + * + * @param cb Condition-bean. (NotNull) + * @return Selected paging-result-bean. (NotNull) + */ + public PagingResultBean selectPage(final BannersHistoryCB cb) { + assertConditionBeanNotNull(cb); + return selectPage(cb, new SelectPageSimpleInvoker(this)); + } + + /** + * Select page. + * + * @param cb Condition-bean. (NotNull) + * @param invoker Select-page-invoker (NotNull) + * @return Selected paging-result-bean. (NotNull) + */ + public PagingResultBean selectPage(final BannersHistoryCB cb, SelectPageInvoker invoker) { + assertConditionBeanNotNull(cb); + final SelectPageCallback pageCallback = new SelectPageCallback() { + public PagingBean getPagingBean() { return cb; } + public int selectCountIgnoreFetchScope() { + return selectCount(cb); + } + public java.util.List selectListWithFetchScope() { + return selectList(cb); + } + }; + return invoker.invokeSelectPage(pageCallback); + } + + // =================================================================================== + // Various Select + // ============== + /** + * Select value-label list. + * + * @param cb Condition-bean. (NotNull) + * @param valueLabelSetupper Value-label-setupper. (NotNull) + * @return Value-label list. (NotNull) + */ + public java.util.List> selectValueLabelList(BannersHistoryCB cb, ValueLabelSetupper valueLabelSetupper) { + return createValueLabelList(selectList(cb), valueLabelSetupper); + } + + // =================================================================================== + // Load Referer + // ============ + + // =================================================================================== + // Pull Out Foreign + // ================ + + // =================================================================================== + // Basic Entity Update + // =================== + /** + * Insert. + * + * @param bannersHistory Entity. (NotNull) + */ + public void insert(BannersHistory bannersHistory) { + assertEntityNotNull(bannersHistory); + delegateInsert(bannersHistory); + } + + protected void doCreate(Entity bannersHistory) { + insert((BannersHistory)bannersHistory); + } + + /** + * Update. + *
+     * If it updates count zero, throws exception.
+     * If concurrency control of this table is valid, this update have it.
+     * 
+ * @param bannersHistory Entity. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public void update(BannersHistory bannersHistory) { + assertEntityNotNull(bannersHistory); + final int updatedCount = delegateUpdate(bannersHistory); + if (updatedCount == 0) { + throw new jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException(bannersHistory.toString()); + } else if (updatedCount > 1) { + String msg = "updatedCount=" + updatedCount + ": " + bannersHistory.toString(); + throw new jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException(msg); + } + } + + protected void doModify(Entity bannersHistory) { + update((BannersHistory)bannersHistory); + } + + /** + * Update after select. + * + * @param bannersHistory Entity. This must contain primary-key value at least. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + */ + public void updateAfterSelect(BannersHistory bannersHistory) { + assertEntityNotNullAndHasPrimaryKeyValue(bannersHistory); + final BannersHistoryCB cb = newMyConditionBean(); + cb.acceptPrimaryKeyMapString(getDBMeta().extractPrimaryKeyMapString(bannersHistory)); + final BannersHistory currentEntity = selectEntityWithDeletedCheck(cb); + mergeEntity(bannersHistory, currentEntity); + update(currentEntity); + } + + protected void doModifyAfterSelect(Entity bannersHistory) { + updateAfterSelect((BannersHistory)bannersHistory); + } + + /** + * Insert or update. + * {update: modified only} + * + * @param bannersHistory Entity. This should contain primary-key value at least(Except use identity). (NotNull) + */ + public void insertOrUpdate(BannersHistory bannersHistory) { + assertEntityNotNull(bannersHistory); + if (!bannersHistory.hasPrimaryKeyValue()) { + insert(bannersHistory); + } else { + try { + update(bannersHistory); + } catch (org.seasar.dao.NotSingleRowUpdatedRuntimeException e) { + insert(bannersHistory); + } catch (jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException e) { + insert(bannersHistory); + } + } + } + + protected void doCreateOrUpdateNonstrict(Entity bannersHistory) { + + insertOrUpdate((BannersHistory)bannersHistory); + + } + + /** + * Insert or update after select. + * {update: modified only} + * + * @param bannersHistory Entity. This should contain primary-key value at least(Except use identity). (NotNull) + */ + public void insertOrUpdateAfterSelect(BannersHistory bannersHistory) { + assertEntityNotNull(bannersHistory); + if (!bannersHistory.hasPrimaryKeyValue()) { + insert(bannersHistory); + return; + } + BannersHistory currentEntity = null; + try { + final BannersHistoryCB cb = newMyConditionBean(); + cb.acceptPrimaryKeyMapString(getDBMeta().extractPrimaryKeyMapString(bannersHistory)); + currentEntity = selectEntityWithDeletedCheck(cb); + } catch (jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException e) { + insert(bannersHistory); + return; + } + assertEntityNotNullAndHasPrimaryKeyValue(bannersHistory); + mergeEntity(bannersHistory, currentEntity); + update(currentEntity); + } + + protected void doCreateOrModifyAfterSelect(Entity entity) { + insertOrUpdateAfterSelect((BannersHistory)entity); + } + + /** + * This method implements the method that is declared at super. + * + * @param sourceEntity Source entity. (NotNull) + * @param destinationEntity Destination entity. (NotNull) + */ + protected void mergeEntity(Entity sourceEntity, Entity destinationEntity) { + assertEntityNotNull(sourceEntity); + assertEntityNotNull(destinationEntity); + final BannersHistory sourceMyEntity = (BannersHistory)sourceEntity; + final BannersHistory destinationMyEntity = (BannersHistory)destinationEntity; + destinationMyEntity.clearModifiedPropertyNames(); + final java.util.Set names = sourceMyEntity.getModifiedPropertyNames(); + + if (names.contains("bannersHistoryId")) { destinationMyEntity.setBannersHistoryId(sourceMyEntity.getBannersHistoryId()); } + if (names.contains("bannersId")) { destinationMyEntity.setBannersId(sourceMyEntity.getBannersId()); } + if (names.contains("bannersShown")) { destinationMyEntity.setBannersShown(sourceMyEntity.getBannersShown()); } + if (names.contains("bannersClicked")) { destinationMyEntity.setBannersClicked(sourceMyEntity.getBannersClicked()); } + if (names.contains("bannersHistoryDate")) { destinationMyEntity.setBannersHistoryDate(sourceMyEntity.getBannersHistoryDate()); } + + } + + /** + * Delete. + * + * @param bannersHistory Entity. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public void delete(BannersHistory bannersHistory) { + assertEntityNotNull(bannersHistory); + final int deletedCount = delegateDelete(bannersHistory); + if (deletedCount == 0) { + throw new jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException(bannersHistory.toString()); + } else if (deletedCount > 1) { + String msg = "deletedCount=" + deletedCount + ": " + bannersHistory.toString(); + throw new jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException(msg); + } + } + + protected void doRemove(Entity bannersHistory) { + delete((BannersHistory)bannersHistory); + } + + /** + * Delete after select. + * + * @param bannersHistory Entity. This must contain primary-key value at least. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + */ + public void deleteAfterSelect(BannersHistory bannersHistory) { + assertEntityNotNullAndHasPrimaryKeyValue(bannersHistory); + final BannersHistoryCB cb = newMyConditionBean(); + cb.acceptPrimaryKeyMapString(getDBMeta().extractPrimaryKeyMapString(bannersHistory)); + selectEntityWithDeletedCheck(cb); + delete(bannersHistory); + } + + protected void doRemoveAfterSelect(Entity bannersHistory) { + deleteAfterSelect((BannersHistory)bannersHistory); + } + + // =================================================================================== + // Basic Batch Update + // ================== + /** + * Insert list. + * + * @param bannersHistoryList Entity-list. (NotNull & NotEmpty) + * @return Inserted count. + */ + public int insertList(java.util.List bannersHistoryList) { + assertListNotNullAndNotEmpty(bannersHistoryList); + return delegateInsertList(bannersHistoryList); + } + + /** + * Update list. + * + * @param bannersHistoryList Entity-list. (NotNull & NotEmpty) + * @return Updated count. + */ + public int updateList(java.util.List bannersHistoryList) { + assertListNotNullAndNotEmpty(bannersHistoryList); + return delegateUpdateList(bannersHistoryList); + } + + /** + * Delete list. + * + * @param bannersHistoryList Entity-list. (NotNull & NotEmpty) + * @return Deleted count. + */ + public int deleteList(java.util.List bannersHistoryList) { + assertListNotNullAndNotEmpty(bannersHistoryList); + return delegateDeleteList(bannersHistoryList); + } + + // =================================================================================== + // Various Insert + // ============== + + // =================================================================================== + // CBSetupper + // ========== + /** + * The interface of condition-bean setupper. + */ + public static interface CBSetupper extends ConditionBeanSetupper { + + /** + * Set up condition. + * + * @param cb Condition-bean. (NotNull) + */ + public void setup(BannersHistoryCB cb); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/bsbhv/BsCategoriesBhv.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/bsbhv/BsCategoriesBhv.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/bsbhv/BsCategoriesBhv.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,699 @@ + +package jp.sf.pal.pompei.bsbhv; + +import jp.sf.pal.pompei.allcommon.*; +import jp.sf.pal.pompei.allcommon.bhv.load.LoadRefererOption; +import jp.sf.pal.pompei.allcommon.bhv.setup.ConditionBeanSetupper; +import jp.sf.pal.pompei.allcommon.bhv.setup.ValueLabelSetupper; +import jp.sf.pal.pompei.allcommon.cbean.ConditionBean; +import jp.sf.pal.pompei.allcommon.cbean.ListResultBean; +import jp.sf.pal.pompei.allcommon.cbean.PagingBean; +import jp.sf.pal.pompei.allcommon.cbean.PagingResultBean; +import jp.sf.pal.pompei.allcommon.dbmeta.DBMeta; + +import jp.sf.pal.pompei.exdao.*; +import jp.sf.pal.pompei.exentity.*; +import jp.sf.pal.pompei.bsentity.dbmeta.*; +import jp.sf.pal.pompei.cbean.*; + + + +/** + * The behavior of CATEGORIES. + * + *
+ * [primary-key]
+ *     CATEGORIES_ID
+ * 
+ * [column-property]
+ *     CATEGORIES_ID, CATEGORIES_IMAGE, PARENT_ID, SORT_ORDER, DATE_ADDED, LAST_MODIFIED
+ * 
+ * [foreign-property]
+ *     
+ * 
+ * [refferer-property]
+ *     
+ * 
+ * [sequence]
+ *     
+ * 
+ * [identity]
+ *     
+ * 
+ * [update-date]
+ *     
+ * 
+ * [version-no]
+ *     
+ * 
+ * 
+ * + * @author DBFlute(AutoGenerator) + */ +public abstract class BsCategoriesBhv extends jp.sf.pal.pompei.allcommon.bhv.AbstractBehaviorWritable { + + // =================================================================================== + // Attribute + // ========= + /** Dao instance. */ + protected CategoriesDao _dao; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + public BsCategoriesBhv() { + } + + // =================================================================================== + // Table name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + public String getTableDbName() { + return "CATEGORIES"; + } + + // =================================================================================== + // DBMeta + // ====== + /** + * This method implements the method that is declared at super. + * + * @return DBMeta. (NotNull) + */ + public DBMeta getDBMeta() { + return CategoriesDbm.getInstance(); + } + + /** + * Get my dbmeta. + * + * @return DBMeta. (NotNull) + */ + public CategoriesDbm getMyDBMeta() { + return CategoriesDbm.getInstance(); + } + + // =================================================================================== + // Dao Accessor + // ============ + /** + * Get my dao. + * + * @return My dao. + */ + public CategoriesDao getMyDao() { + return _dao; + } + + /** + * Set my dao. + * + * @param dao My dao. (NotNull) + */ + public void setMyDao(CategoriesDao dao) { + assertObjectNotNull("dao", dao); + _dao = dao; + } + + /** + * This method implements the method that is declared at super. + * + * @return Dao-readable. (NotNull) + */ + public DaoReadable getDaoReadable() { + return getMyDao(); + } + + /** + * This method implements the method that is declared at super. + * + * @return Dao-writable. (NotNull) + */ + public DaoWritable getDaoWritable() { + return getMyDao(); + } + + // =================================================================================== + // New Instance + // ============ + /** + * New entity. + * + * @return Entity. (NotNull) + */ + public Entity newEntity() { + return newMyEntity(); + } + + /** + * New condition-bean. + * + * @return Condition-bean. (NotNull) + */ + public ConditionBean newConditionBean() { + return newMyConditionBean(); + } + + /** + * New my entity. + * + * @return My entity. (NotNull) + */ + public Categories newMyEntity() { + return new Categories(); + } + + /** + * New my condition-bean. + * + * @return My condition-bean. (NotNull) + */ + public CategoriesCB newMyConditionBean() { + return new CategoriesCB(); + } + + // =================================================================================== + // Delegate Method + // =============== + // ----------------------------------------------------- + // Select + // ------ + /** + * Get count as all. (Delegate-Method) + * + * @return All count. (NotNull) + */ + public int delegateGetCountAll() { + return getMyDao().getCountAll(); + } + + /** + * Get list as all. (Delegate-Method) + * + * @return All list. (NotNull) + */ + public java.util.List delegateGetListAll() { + return getMyDao().getListAll(); + } + + // + // Get entity. (Delegate-Method) + // + // @param Primary-keys (NotNull) + // @return Entity. (NotNull) + // + public Categories delegateGetEntity(java.math.BigDecimal categoriesId) { + return getMyDao().getEntity(categoriesId); + } + + /** + * Select count by condition-bean. (Delegate-Method) + * + * @param cb Condition-bean. (NotNull) + * @return Selected count. (NotNull) + */ + public int delegateSelectCount(CategoriesCB cb) { + assertConditionBeanNotNull(cb); + return getMyDao().selectCount(cb); + } + + /** + * Select entity by condition-bean. (Delegate-Method) + * + * @param cb Condition-bean. (NotNull) + * @return Selected entity. If the select result is zero, it returns null. (Nullable) + */ + public Categories delegateSelectEntity(CategoriesCB cb) { + assertConditionBeanNotNull(cb); + return getMyDao().selectEntity(cb); + } + + /** + * Select list by condition-bean. (Delegate-Method) + * + * @param cb Condition-bean. (NotNull) + * @return Selected list. If the select result is zero, it returns empty list. (NotNull) + */ + public java.util.List delegateSelectList(CategoriesCB cb) { + assertConditionBeanNotNull(cb); + return getMyDao().selectList(cb); + } + + + // ----------------------------------------------------- + // Update + // ------ + /** + * Insert one entity. (Delegate-Method) + * + * @param entity Entity. (NotNull) + * @return Inserted count. + */ + public int delegateInsert(Categories entity) { + assertEntityNotNull(entity);// If this table use identity, the entity does not have primary-key. + filterEntityOfInsert(entity); + assertEntityOfInsert(entity); + return getMyDao().insert(entity); + } + + /** + * Update one entity. (Delegate-Method) + * {modified only} + * + * @param entity Entity. (NotNull) + * @return Updated count. + */ + public int delegateUpdate(Categories entity) { + assertEntityNotNullAndHasPrimaryKeyValue(entity); + filterEntityOfUpdate(entity); + assertEntityOfUpdate(entity); + return getMyDao().updateModifiedOnly(entity); + } + + /** + * Delete one entity. (Delegate-Method) + * + * @param entity Entity. (NotNull) + * @return Deleted count. + */ + public int delegateDelete(Categories entity) { + assertEntityNotNullAndHasPrimaryKeyValue(entity); + filterEntityOfDelete(entity); + assertEntityOfDelete(entity); + return getMyDao().delete(entity); + } + + /** + * Insert several entities. (Delegate-Method) + * + * @param entityList Entity-list. (NotNull & NotEmpty) + * @return Inserted count. + */ + public int delegateInsertList(java.util.List entityList) { + assertListNotNullAndNotEmpty(entityList); + return getMyDao().insertList(entityList); + } + + /** + * Update several entities. (Delegate-Method) + * + * @param entityList Entity-list. (NotNull & NotEmpty) + * @return Updated count. + */ + public int delegateUpdateList(java.util.List entityList) { + assertListNotNullAndNotEmpty(entityList); + return getMyDao().updateList(entityList); + } + + /** + * Delete several entities. (Delegate-Method) + * + * @param entityList Entity-list. (NotNull & NotEmpty) + * @return Deleted count. + */ + public int delegateDeleteList(java.util.List entityList) { + assertListNotNullAndNotEmpty(entityList); + return getMyDao().deleteList(entityList); + } + + // =================================================================================== + // Basic Select Count + // ================== + /** + * Select count by condition-bean. + *
+     * If the argument 'condition-bean' is effective about fetch-scope,
+     * this method invoke select count ignoring the fetch-scope.
+     * 
+ * @param cb Condition-bean. This condition-bean should not be set up about fetch-scope. (NotNull) + * @return Selected count. + */ + public int selectCount(CategoriesCB cb) { + assertConditionBeanNotNull(cb); + return delegateSelectCount(cb); + } + + // =================================================================================== + // Basic Select Entity + // =================== + /** + * Select entity by condition-bean. + * + * @param cb Condition-bean. (NotNull) + * @return Selected entity. (Nullalble) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public Categories selectEntity(CategoriesCB cb) { + assertConditionBeanNotNull(cb); + final java.util.List ls = selectList(cb); + if (ls.isEmpty()) { + return null; + } + assertRecordHasBeenSelectedAsOne(ls, cb); + return (Categories)ls.get(0); + } + + /** + * Select entity by condition-bean with deleted check. + * + * @param cb Condition-bean. (NotNull) + * @return Selected entity. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public Categories selectEntityWithDeletedCheck(CategoriesCB cb) { + assertConditionBeanNotNull(cb); + final java.util.List ls = selectList(cb); + assertRecordHasNotBeenDeleted(ls, cb); + assertRecordHasBeenSelectedAsOne(ls, cb); + return (Categories)ls.get(0); + } + + /* + * Select entity with deleted check. {by primary-key} + * + * @param primaryKey + * @return Selected entity. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public Categories selectByPKValueWithDeletedCheck(java.math.BigDecimal categoriesId) { + Categories entity = new Categories(); + entity.setCategoriesId(categoriesId); + final CategoriesCB cb = newMyConditionBean(); + cb.acceptPrimaryKeyMapString(getDBMeta().extractPrimaryKeyMapString(entity)); + return selectEntityWithDeletedCheck(cb); + } + + // =================================================================================== + // Basic Select List + // ================= + /** + * Select list as result-bean. + * + * @param cb Condition-bean. (NotNull) + * @return Selected list-result-bean. (NotNull) + */ + public ListResultBean selectList(CategoriesCB cb) { + assertConditionBeanNotNull(cb); + return new ResultBeanBuilder(this).buildListResultBean(cb, delegateSelectList(cb)); + } + + /** + * Select page as result-bean. + * + * @param cb Condition-bean. (NotNull) + * @return Selected paging-result-bean. (NotNull) + */ + public PagingResultBean selectPage(final CategoriesCB cb) { + assertConditionBeanNotNull(cb); + return selectPage(cb, new SelectPageSimpleInvoker(this)); + } + + /** + * Select page. + * + * @param cb Condition-bean. (NotNull) + * @param invoker Select-page-invoker (NotNull) + * @return Selected paging-result-bean. (NotNull) + */ + public PagingResultBean selectPage(final CategoriesCB cb, SelectPageInvoker invoker) { + assertConditionBeanNotNull(cb); + final SelectPageCallback pageCallback = new SelectPageCallback() { + public PagingBean getPagingBean() { return cb; } + public int selectCountIgnoreFetchScope() { + return selectCount(cb); + } + public java.util.List selectListWithFetchScope() { + return selectList(cb); + } + }; + return invoker.invokeSelectPage(pageCallback); + } + + // =================================================================================== + // Various Select + // ============== + /** + * Select value-label list. + * + * @param cb Condition-bean. (NotNull) + * @param valueLabelSetupper Value-label-setupper. (NotNull) + * @return Value-label list. (NotNull) + */ + public java.util.List> selectValueLabelList(CategoriesCB cb, ValueLabelSetupper valueLabelSetupper) { + return createValueLabelList(selectList(cb), valueLabelSetupper); + } + + // =================================================================================== + // Load Referer + // ============ + + // =================================================================================== + // Pull Out Foreign + // ================ + + // =================================================================================== + // Basic Entity Update + // =================== + /** + * Insert. + * + * @param categories Entity. (NotNull) + */ + public void insert(Categories categories) { + assertEntityNotNull(categories); + delegateInsert(categories); + } + + protected void doCreate(Entity categories) { + insert((Categories)categories); + } + + /** + * Update. + *
+     * If it updates count zero, throws exception.
+     * If concurrency control of this table is valid, this update have it.
+     * 
+ * @param categories Entity. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public void update(Categories categories) { + assertEntityNotNull(categories); + final int updatedCount = delegateUpdate(categories); + if (updatedCount == 0) { + throw new jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException(categories.toString()); + } else if (updatedCount > 1) { + String msg = "updatedCount=" + updatedCount + ": " + categories.toString(); + throw new jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException(msg); + } + } + + protected void doModify(Entity categories) { + update((Categories)categories); + } + + /** + * Update after select. + * + * @param categories Entity. This must contain primary-key value at least. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + */ + public void updateAfterSelect(Categories categories) { + assertEntityNotNullAndHasPrimaryKeyValue(categories); + final CategoriesCB cb = newMyConditionBean(); + cb.acceptPrimaryKeyMapString(getDBMeta().extractPrimaryKeyMapString(categories)); + final Categories currentEntity = selectEntityWithDeletedCheck(cb); + mergeEntity(categories, currentEntity); + update(currentEntity); + } + + protected void doModifyAfterSelect(Entity categories) { + updateAfterSelect((Categories)categories); + } + + /** + * Insert or update. + * {update: modified only} + * + * @param categories Entity. This should contain primary-key value at least(Except use identity). (NotNull) + */ + public void insertOrUpdate(Categories categories) { + assertEntityNotNull(categories); + if (!categories.hasPrimaryKeyValue()) { + insert(categories); + } else { + try { + update(categories); + } catch (org.seasar.dao.NotSingleRowUpdatedRuntimeException e) { + insert(categories); + } catch (jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException e) { + insert(categories); + } + } + } + + protected void doCreateOrUpdateNonstrict(Entity categories) { + + insertOrUpdate((Categories)categories); + + } + + /** + * Insert or update after select. + * {update: modified only} + * + * @param categories Entity. This should contain primary-key value at least(Except use identity). (NotNull) + */ + public void insertOrUpdateAfterSelect(Categories categories) { + assertEntityNotNull(categories); + if (!categories.hasPrimaryKeyValue()) { + insert(categories); + return; + } + Categories currentEntity = null; + try { + final CategoriesCB cb = newMyConditionBean(); + cb.acceptPrimaryKeyMapString(getDBMeta().extractPrimaryKeyMapString(categories)); + currentEntity = selectEntityWithDeletedCheck(cb); + } catch (jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException e) { + insert(categories); + return; + } + assertEntityNotNullAndHasPrimaryKeyValue(categories); + mergeEntity(categories, currentEntity); + update(currentEntity); + } + + protected void doCreateOrModifyAfterSelect(Entity entity) { + insertOrUpdateAfterSelect((Categories)entity); + } + + /** + * This method implements the method that is declared at super. + * + * @param sourceEntity Source entity. (NotNull) + * @param destinationEntity Destination entity. (NotNull) + */ + protected void mergeEntity(Entity sourceEntity, Entity destinationEntity) { + assertEntityNotNull(sourceEntity); + assertEntityNotNull(destinationEntity); + final Categories sourceMyEntity = (Categories)sourceEntity; + final Categories destinationMyEntity = (Categories)destinationEntity; + destinationMyEntity.clearModifiedPropertyNames(); + final java.util.Set names = sourceMyEntity.getModifiedPropertyNames(); + + if (names.contains("categoriesId")) { destinationMyEntity.setCategoriesId(sourceMyEntity.getCategoriesId()); } + if (names.contains("categoriesImage")) { destinationMyEntity.setCategoriesImage(sourceMyEntity.getCategoriesImage()); } + if (names.contains("parentId")) { destinationMyEntity.setParentId(sourceMyEntity.getParentId()); } + if (names.contains("sortOrder")) { destinationMyEntity.setSortOrder(sourceMyEntity.getSortOrder()); } + if (names.contains("dateAdded")) { destinationMyEntity.setDateAdded(sourceMyEntity.getDateAdded()); } + if (names.contains("lastModified")) { destinationMyEntity.setLastModified(sourceMyEntity.getLastModified()); } + + } + + /** + * Delete. + * + * @param categories Entity. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public void delete(Categories categories) { + assertEntityNotNull(categories); + final int deletedCount = delegateDelete(categories); + if (deletedCount == 0) { + throw new jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException(categories.toString()); + } else if (deletedCount > 1) { + String msg = "deletedCount=" + deletedCount + ": " + categories.toString(); + throw new jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException(msg); + } + } + + protected void doRemove(Entity categories) { + delete((Categories)categories); + } + + /** + * Delete after select. + * + * @param categories Entity. This must contain primary-key value at least. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + */ + public void deleteAfterSelect(Categories categories) { + assertEntityNotNullAndHasPrimaryKeyValue(categories); + final CategoriesCB cb = newMyConditionBean(); + cb.acceptPrimaryKeyMapString(getDBMeta().extractPrimaryKeyMapString(categories)); + selectEntityWithDeletedCheck(cb); + delete(categories); + } + + protected void doRemoveAfterSelect(Entity categories) { + deleteAfterSelect((Categories)categories); + } + + // =================================================================================== + // Basic Batch Update + // ================== + /** + * Insert list. + * + * @param categoriesList Entity-list. (NotNull & NotEmpty) + * @return Inserted count. + */ + public int insertList(java.util.List categoriesList) { + assertListNotNullAndNotEmpty(categoriesList); + return delegateInsertList(categoriesList); + } + + /** + * Update list. + * + * @param categoriesList Entity-list. (NotNull & NotEmpty) + * @return Updated count. + */ + public int updateList(java.util.List categoriesList) { + assertListNotNullAndNotEmpty(categoriesList); + return delegateUpdateList(categoriesList); + } + + /** + * Delete list. + * + * @param categoriesList Entity-list. (NotNull & NotEmpty) + * @return Deleted count. + */ + public int deleteList(java.util.List categoriesList) { + assertListNotNullAndNotEmpty(categoriesList); + return delegateDeleteList(categoriesList); + } + + // =================================================================================== + // Various Insert + // ============== + + // =================================================================================== + // CBSetupper + // ========== + /** + * The interface of condition-bean setupper. + */ + public static interface CBSetupper extends ConditionBeanSetupper { + + /** + * Set up condition. + * + * @param cb Condition-bean. (NotNull) + */ + public void setup(CategoriesCB cb); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/bsbhv/BsCategoriesDescriptionBhv.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/bsbhv/BsCategoriesDescriptionBhv.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/bsbhv/BsCategoriesDescriptionBhv.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,692 @@ + +package jp.sf.pal.pompei.bsbhv; + +import jp.sf.pal.pompei.allcommon.*; +import jp.sf.pal.pompei.allcommon.bhv.load.LoadRefererOption; +import jp.sf.pal.pompei.allcommon.bhv.setup.ConditionBeanSetupper; +import jp.sf.pal.pompei.allcommon.bhv.setup.ValueLabelSetupper; +import jp.sf.pal.pompei.allcommon.cbean.ConditionBean; +import jp.sf.pal.pompei.allcommon.cbean.ListResultBean; +import jp.sf.pal.pompei.allcommon.cbean.PagingBean; +import jp.sf.pal.pompei.allcommon.cbean.PagingResultBean; +import jp.sf.pal.pompei.allcommon.dbmeta.DBMeta; + +import jp.sf.pal.pompei.exdao.*; +import jp.sf.pal.pompei.exentity.*; +import jp.sf.pal.pompei.bsentity.dbmeta.*; +import jp.sf.pal.pompei.cbean.*; + + + +/** + * The behavior of CATEGORIES_DESCRIPTION. + * + *
+ * [primary-key]
+ *     CATEGORIES_ID, LANGUAGE_ID
+ * 
+ * [column-property]
+ *     CATEGORIES_ID, LANGUAGE_ID, CATEGORIES_NAME
+ * 
+ * [foreign-property]
+ *     
+ * 
+ * [refferer-property]
+ *     
+ * 
+ * [sequence]
+ *     
+ * 
+ * [identity]
+ *     
+ * 
+ * [update-date]
+ *     
+ * 
+ * [version-no]
+ *     
+ * 
+ * 
+ * + * @author DBFlute(AutoGenerator) + */ +public abstract class BsCategoriesDescriptionBhv extends jp.sf.pal.pompei.allcommon.bhv.AbstractBehaviorWritable { + + // =================================================================================== + // Attribute + // ========= + /** Dao instance. */ + protected CategoriesDescriptionDao _dao; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + public BsCategoriesDescriptionBhv() { + } + + // =================================================================================== + // Table name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + public String getTableDbName() { + return "CATEGORIES_DESCRIPTION"; + } + + // =================================================================================== + // DBMeta + // ====== + /** + * This method implements the method that is declared at super. + * + * @return DBMeta. (NotNull) + */ + public DBMeta getDBMeta() { + return CategoriesDescriptionDbm.getInstance(); + } + + /** + * Get my dbmeta. + * + * @return DBMeta. (NotNull) + */ + public CategoriesDescriptionDbm getMyDBMeta() { + return CategoriesDescriptionDbm.getInstance(); + } + + // =================================================================================== + // Dao Accessor + // ============ + /** + * Get my dao. + * + * @return My dao. + */ + public CategoriesDescriptionDao getMyDao() { + return _dao; + } + + /** + * Set my dao. + * + * @param dao My dao. (NotNull) + */ + public void setMyDao(CategoriesDescriptionDao dao) { + assertObjectNotNull("dao", dao); + _dao = dao; + } + + /** + * This method implements the method that is declared at super. + * + * @return Dao-readable. (NotNull) + */ + public DaoReadable getDaoReadable() { + return getMyDao(); + } + + /** + * This method implements the method that is declared at super. + * + * @return Dao-writable. (NotNull) + */ + public DaoWritable getDaoWritable() { + return getMyDao(); + } + + // =================================================================================== + // New Instance + // ============ + /** + * New entity. + * + * @return Entity. (NotNull) + */ + public Entity newEntity() { + return newMyEntity(); + } + + /** + * New condition-bean. + * + * @return Condition-bean. (NotNull) + */ + public ConditionBean newConditionBean() { + return newMyConditionBean(); + } + + /** + * New my entity. + * + * @return My entity. (NotNull) + */ + public CategoriesDescription newMyEntity() { + return new CategoriesDescription(); + } + + /** + * New my condition-bean. + * + * @return My condition-bean. (NotNull) + */ + public CategoriesDescriptionCB newMyConditionBean() { + return new CategoriesDescriptionCB(); + } + + // =================================================================================== + // Delegate Method + // =============== + // ----------------------------------------------------- + // Select + // ------ + /** + * Get count as all. (Delegate-Method) + * + * @return All count. (NotNull) + */ + public int delegateGetCountAll() { + return getMyDao().getCountAll(); + } + + /** + * Get list as all. (Delegate-Method) + * + * @return All list. (NotNull) + */ + public java.util.List delegateGetListAll() { + return getMyDao().getListAll(); + } + + // + // Get entity. (Delegate-Method) + // + // @param Primary-keys (NotNull) + // @return Entity. (NotNull) + // + public CategoriesDescription delegateGetEntity(java.math.BigDecimal categoriesId, java.math.BigDecimal languageId) { + return getMyDao().getEntity(categoriesId, languageId); + } + + /** + * Select count by condition-bean. (Delegate-Method) + * + * @param cb Condition-bean. (NotNull) + * @return Selected count. (NotNull) + */ + public int delegateSelectCount(CategoriesDescriptionCB cb) { + assertConditionBeanNotNull(cb); + return getMyDao().selectCount(cb); + } + + /** + * Select entity by condition-bean. (Delegate-Method) + * + * @param cb Condition-bean. (NotNull) + * @return Selected entity. If the select result is zero, it returns null. (Nullable) + */ + public CategoriesDescription delegateSelectEntity(CategoriesDescriptionCB cb) { + assertConditionBeanNotNull(cb); + return getMyDao().selectEntity(cb); + } + + /** + * Select list by condition-bean. (Delegate-Method) + * + * @param cb Condition-bean. (NotNull) + * @return Selected list. If the select result is zero, it returns empty list. (NotNull) + */ + public java.util.List delegateSelectList(CategoriesDescriptionCB cb) { + assertConditionBeanNotNull(cb); + return getMyDao().selectList(cb); + } + + + // ----------------------------------------------------- + // Update + // ------ + /** + * Insert one entity. (Delegate-Method) + * + * @param entity Entity. (NotNull) + * @return Inserted count. + */ + public int delegateInsert(CategoriesDescription entity) { + assertEntityNotNull(entity);// If this table use identity, the entity does not have primary-key. + filterEntityOfInsert(entity); + assertEntityOfInsert(entity); + return getMyDao().insert(entity); + } + + /** + * Update one entity. (Delegate-Method) + * {modified only} + * + * @param entity Entity. (NotNull) + * @return Updated count. + */ + public int delegateUpdate(CategoriesDescription entity) { + assertEntityNotNullAndHasPrimaryKeyValue(entity); + filterEntityOfUpdate(entity); + assertEntityOfUpdate(entity); + return getMyDao().updateModifiedOnly(entity); + } + + /** + * Delete one entity. (Delegate-Method) + * + * @param entity Entity. (NotNull) + * @return Deleted count. + */ + public int delegateDelete(CategoriesDescription entity) { + assertEntityNotNullAndHasPrimaryKeyValue(entity); + filterEntityOfDelete(entity); + assertEntityOfDelete(entity); + return getMyDao().delete(entity); + } + + /** + * Insert several entities. (Delegate-Method) + * + * @param entityList Entity-list. (NotNull & NotEmpty) + * @return Inserted count. + */ + public int delegateInsertList(java.util.List entityList) { + assertListNotNullAndNotEmpty(entityList); + return getMyDao().insertList(entityList); + } + + /** + * Update several entities. (Delegate-Method) + * + * @param entityList Entity-list. (NotNull & NotEmpty) + * @return Updated count. + */ + public int delegateUpdateList(java.util.List entityList) { + assertListNotNullAndNotEmpty(entityList); + return getMyDao().updateList(entityList); + } + + /** + * Delete several entities. (Delegate-Method) + * + * @param entityList Entity-list. (NotNull & NotEmpty) + * @return Deleted count. + */ + public int delegateDeleteList(java.util.List entityList) { + assertListNotNullAndNotEmpty(entityList); + return getMyDao().deleteList(entityList); + } + + // =================================================================================== + // Basic Select Count + // ================== + /** + * Select count by condition-bean. + *
+     * If the argument 'condition-bean' is effective about fetch-scope,
+     * this method invoke select count ignoring the fetch-scope.
+     * 
+ * @param cb Condition-bean. This condition-bean should not be set up about fetch-scope. (NotNull) + * @return Selected count. + */ + public int selectCount(CategoriesDescriptionCB cb) { + assertConditionBeanNotNull(cb); + return delegateSelectCount(cb); + } + + // =================================================================================== + // Basic Select Entity + // =================== + /** + * Select entity by condition-bean. + * + * @param cb Condition-bean. (NotNull) + * @return Selected entity. (Nullalble) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public CategoriesDescription selectEntity(CategoriesDescriptionCB cb) { + assertConditionBeanNotNull(cb); + final java.util.List ls = selectList(cb); + if (ls.isEmpty()) { + return null; + } + assertRecordHasBeenSelectedAsOne(ls, cb); + return (CategoriesDescription)ls.get(0); + } + + /** + * Select entity by condition-bean with deleted check. + * + * @param cb Condition-bean. (NotNull) + * @return Selected entity. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public CategoriesDescription selectEntityWithDeletedCheck(CategoriesDescriptionCB cb) { + assertConditionBeanNotNull(cb); + final java.util.List ls = selectList(cb); + assertRecordHasNotBeenDeleted(ls, cb); + assertRecordHasBeenSelectedAsOne(ls, cb); + return (CategoriesDescription)ls.get(0); + } + + /* + * Select entity with deleted check. {by primary-key} + * + * @param primaryKey + * @return Selected entity. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public CategoriesDescription selectByPKValueWithDeletedCheck(java.math.BigDecimal categoriesId, java.math.BigDecimal languageId) { + CategoriesDescription entity = new CategoriesDescription(); + entity.setCategoriesId(categoriesId);entity.setLanguageId(languageId); + final CategoriesDescriptionCB cb = newMyConditionBean(); + cb.acceptPrimaryKeyMapString(getDBMeta().extractPrimaryKeyMapString(entity)); + return selectEntityWithDeletedCheck(cb); + } + + // =================================================================================== + // Basic Select List + // ================= + /** + * Select list as result-bean. + * + * @param cb Condition-bean. (NotNull) + * @return Selected list-result-bean. (NotNull) + */ + public ListResultBean selectList(CategoriesDescriptionCB cb) { + assertConditionBeanNotNull(cb); + return new ResultBeanBuilder(this).buildListResultBean(cb, delegateSelectList(cb)); + } + + /** + * Select page as result-bean. + * + * @param cb Condition-bean. (NotNull) + * @return Selected paging-result-bean. (NotNull) + */ + public PagingResultBean selectPage(final CategoriesDescriptionCB cb) { + assertConditionBeanNotNull(cb); + return selectPage(cb, new SelectPageSimpleInvoker(this)); + } + + /** + * Select page. + * + * @param cb Condition-bean. (NotNull) + * @param invoker Select-page-invoker (NotNull) + * @return Selected paging-result-bean. (NotNull) + */ + public PagingResultBean selectPage(final CategoriesDescriptionCB cb, SelectPageInvoker invoker) { + assertConditionBeanNotNull(cb); + final SelectPageCallback pageCallback = new SelectPageCallback() { + public PagingBean getPagingBean() { return cb; } + public int selectCountIgnoreFetchScope() { + return selectCount(cb); + } + public java.util.List selectListWithFetchScope() { + return selectList(cb); + } + }; + return invoker.invokeSelectPage(pageCallback); + } + + // =================================================================================== + // Various Select + // ============== + /** + * Select value-label list. + * + * @param cb Condition-bean. (NotNull) + * @param valueLabelSetupper Value-label-setupper. (NotNull) + * @return Value-label list. (NotNull) + */ + public java.util.List> selectValueLabelList(CategoriesDescriptionCB cb, ValueLabelSetupper valueLabelSetupper) { + return createValueLabelList(selectList(cb), valueLabelSetupper); + } + + // =================================================================================== + // Pull Out Foreign + // ================ + + // =================================================================================== + // Basic Entity Update + // =================== + /** + * Insert. + * + * @param categoriesDescription Entity. (NotNull) + */ + public void insert(CategoriesDescription categoriesDescription) { + assertEntityNotNull(categoriesDescription); + delegateInsert(categoriesDescription); + } + + protected void doCreate(Entity categoriesDescription) { + insert((CategoriesDescription)categoriesDescription); + } + + /** + * Update. + *
+     * If it updates count zero, throws exception.
+     * If concurrency control of this table is valid, this update have it.
+     * 
+ * @param categoriesDescription Entity. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public void update(CategoriesDescription categoriesDescription) { + assertEntityNotNull(categoriesDescription); + final int updatedCount = delegateUpdate(categoriesDescription); + if (updatedCount == 0) { + throw new jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException(categoriesDescription.toString()); + } else if (updatedCount > 1) { + String msg = "updatedCount=" + updatedCount + ": " + categoriesDescription.toString(); + throw new jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException(msg); + } + } + + protected void doModify(Entity categoriesDescription) { + update((CategoriesDescription)categoriesDescription); + } + + /** + * Update after select. + * + * @param categoriesDescription Entity. This must contain primary-key value at least. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + */ + public void updateAfterSelect(CategoriesDescription categoriesDescription) { + assertEntityNotNullAndHasPrimaryKeyValue(categoriesDescription); + final CategoriesDescriptionCB cb = newMyConditionBean(); + cb.acceptPrimaryKeyMapString(getDBMeta().extractPrimaryKeyMapString(categoriesDescription)); + final CategoriesDescription currentEntity = selectEntityWithDeletedCheck(cb); + mergeEntity(categoriesDescription, currentEntity); + update(currentEntity); + } + + protected void doModifyAfterSelect(Entity categoriesDescription) { + updateAfterSelect((CategoriesDescription)categoriesDescription); + } + + /** + * Insert or update. + * {update: modified only} + * + * @param categoriesDescription Entity. This should contain primary-key value at least(Except use identity). (NotNull) + */ + public void insertOrUpdate(CategoriesDescription categoriesDescription) { + assertEntityNotNull(categoriesDescription); + if (!categoriesDescription.hasPrimaryKeyValue()) { + insert(categoriesDescription); + } else { + try { + update(categoriesDescription); + } catch (org.seasar.dao.NotSingleRowUpdatedRuntimeException e) { + insert(categoriesDescription); + } catch (jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException e) { + insert(categoriesDescription); + } + } + } + + protected void doCreateOrUpdateNonstrict(Entity categoriesDescription) { + + insertOrUpdate((CategoriesDescription)categoriesDescription); + + } + + /** + * Insert or update after select. + * {update: modified only} + * + * @param categoriesDescription Entity. This should contain primary-key value at least(Except use identity). (NotNull) + */ + public void insertOrUpdateAfterSelect(CategoriesDescription categoriesDescription) { + assertEntityNotNull(categoriesDescription); + if (!categoriesDescription.hasPrimaryKeyValue()) { + insert(categoriesDescription); + return; + } + CategoriesDescription currentEntity = null; + try { + final CategoriesDescriptionCB cb = newMyConditionBean(); + cb.acceptPrimaryKeyMapString(getDBMeta().extractPrimaryKeyMapString(categoriesDescription)); + currentEntity = selectEntityWithDeletedCheck(cb); + } catch (jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException e) { + insert(categoriesDescription); + return; + } + assertEntityNotNullAndHasPrimaryKeyValue(categoriesDescription); + mergeEntity(categoriesDescription, currentEntity); + update(currentEntity); + } + + protected void doCreateOrModifyAfterSelect(Entity entity) { + insertOrUpdateAfterSelect((CategoriesDescription)entity); + } + + /** + * This method implements the method that is declared at super. + * + * @param sourceEntity Source entity. (NotNull) + * @param destinationEntity Destination entity. (NotNull) + */ + protected void mergeEntity(Entity sourceEntity, Entity destinationEntity) { + assertEntityNotNull(sourceEntity); + assertEntityNotNull(destinationEntity); + final CategoriesDescription sourceMyEntity = (CategoriesDescription)sourceEntity; + final CategoriesDescription destinationMyEntity = (CategoriesDescription)destinationEntity; + destinationMyEntity.clearModifiedPropertyNames(); + final java.util.Set names = sourceMyEntity.getModifiedPropertyNames(); + + if (names.contains("categoriesId")) { destinationMyEntity.setCategoriesId(sourceMyEntity.getCategoriesId()); } + if (names.contains("languageId")) { destinationMyEntity.setLanguageId(sourceMyEntity.getLanguageId()); } + if (names.contains("categoriesName")) { destinationMyEntity.setCategoriesName(sourceMyEntity.getCategoriesName()); } + + } + + /** + * Delete. + * + * @param categoriesDescription Entity. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public void delete(CategoriesDescription categoriesDescription) { + assertEntityNotNull(categoriesDescription); + final int deletedCount = delegateDelete(categoriesDescription); + if (deletedCount == 0) { + throw new jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException(categoriesDescription.toString()); + } else if (deletedCount > 1) { + String msg = "deletedCount=" + deletedCount + ": " + categoriesDescription.toString(); + throw new jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException(msg); + } + } + + protected void doRemove(Entity categoriesDescription) { + delete((CategoriesDescription)categoriesDescription); + } + + /** + * Delete after select. + * + * @param categoriesDescription Entity. This must contain primary-key value at least. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + */ + public void deleteAfterSelect(CategoriesDescription categoriesDescription) { + assertEntityNotNullAndHasPrimaryKeyValue(categoriesDescription); + final CategoriesDescriptionCB cb = newMyConditionBean(); + cb.acceptPrimaryKeyMapString(getDBMeta().extractPrimaryKeyMapString(categoriesDescription)); + selectEntityWithDeletedCheck(cb); + delete(categoriesDescription); + } + + protected void doRemoveAfterSelect(Entity categoriesDescription) { + deleteAfterSelect((CategoriesDescription)categoriesDescription); + } + + // =================================================================================== + // Basic Batch Update + // ================== + /** + * Insert list. + * + * @param categoriesDescriptionList Entity-list. (NotNull & NotEmpty) + * @return Inserted count. + */ + public int insertList(java.util.List categoriesDescriptionList) { + assertListNotNullAndNotEmpty(categoriesDescriptionList); + return delegateInsertList(categoriesDescriptionList); + } + + /** + * Update list. + * + * @param categoriesDescriptionList Entity-list. (NotNull & NotEmpty) + * @return Updated count. + */ + public int updateList(java.util.List categoriesDescriptionList) { + assertListNotNullAndNotEmpty(categoriesDescriptionList); + return delegateUpdateList(categoriesDescriptionList); + } + + /** + * Delete list. + * + * @param categoriesDescriptionList Entity-list. (NotNull & NotEmpty) + * @return Deleted count. + */ + public int deleteList(java.util.List categoriesDescriptionList) { + assertListNotNullAndNotEmpty(categoriesDescriptionList); + return delegateDeleteList(categoriesDescriptionList); + } + + // =================================================================================== + // Various Insert + // ============== + + // =================================================================================== + // CBSetupper + // ========== + /** + * The interface of condition-bean setupper. + */ + public static interface CBSetupper extends ConditionBeanSetupper { + + /** + * Set up condition. + * + * @param cb Condition-bean. (NotNull) + */ + public void setup(CategoriesDescriptionCB cb); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/bsbhv/BsConfigurationBhv.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/bsbhv/BsConfigurationBhv.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/bsbhv/BsConfigurationBhv.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,704 @@ + +package jp.sf.pal.pompei.bsbhv; + +import jp.sf.pal.pompei.allcommon.*; +import jp.sf.pal.pompei.allcommon.bhv.load.LoadRefererOption; +import jp.sf.pal.pompei.allcommon.bhv.setup.ConditionBeanSetupper; +import jp.sf.pal.pompei.allcommon.bhv.setup.ValueLabelSetupper; +import jp.sf.pal.pompei.allcommon.cbean.ConditionBean; +import jp.sf.pal.pompei.allcommon.cbean.ListResultBean; +import jp.sf.pal.pompei.allcommon.cbean.PagingBean; +import jp.sf.pal.pompei.allcommon.cbean.PagingResultBean; +import jp.sf.pal.pompei.allcommon.dbmeta.DBMeta; + +import jp.sf.pal.pompei.exdao.*; +import jp.sf.pal.pompei.exentity.*; +import jp.sf.pal.pompei.bsentity.dbmeta.*; +import jp.sf.pal.pompei.cbean.*; + + + +/** + * The behavior of CONFIGURATION. + * + *
+ * [primary-key]
+ *     CONFIGURATION_ID
+ * 
+ * [column-property]
+ *     CONFIGURATION_ID, CONFIGURATION_TITLE, CONFIGURATION_KEY, CONFIGURATION_VALUE, CONFIGURATION_DESCRIPTION, CONFIGURATION_GROUP_ID, SORT_ORDER, LAST_MODIFIED, DATE_ADDED, USE_FUNCTION, SET_FUNCTION
+ * 
+ * [foreign-property]
+ *     
+ * 
+ * [refferer-property]
+ *     
+ * 
+ * [sequence]
+ *     
+ * 
+ * [identity]
+ *     
+ * 
+ * [update-date]
+ *     
+ * 
+ * [version-no]
+ *     
+ * 
+ * 
+ * + * @author DBFlute(AutoGenerator) + */ +public abstract class BsConfigurationBhv extends jp.sf.pal.pompei.allcommon.bhv.AbstractBehaviorWritable { + + // =================================================================================== + // Attribute + // ========= + /** Dao instance. */ + protected ConfigurationDao _dao; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + public BsConfigurationBhv() { + } + + // =================================================================================== + // Table name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + public String getTableDbName() { + return "CONFIGURATION"; + } + + // =================================================================================== + // DBMeta + // ====== + /** + * This method implements the method that is declared at super. + * + * @return DBMeta. (NotNull) + */ + public DBMeta getDBMeta() { + return ConfigurationDbm.getInstance(); + } + + /** + * Get my dbmeta. + * + * @return DBMeta. (NotNull) + */ + public ConfigurationDbm getMyDBMeta() { + return ConfigurationDbm.getInstance(); + } + + // =================================================================================== + // Dao Accessor + // ============ + /** + * Get my dao. + * + * @return My dao. + */ + public ConfigurationDao getMyDao() { + return _dao; + } + + /** + * Set my dao. + * + * @param dao My dao. (NotNull) + */ + public void setMyDao(ConfigurationDao dao) { + assertObjectNotNull("dao", dao); + _dao = dao; + } + + /** + * This method implements the method that is declared at super. + * + * @return Dao-readable. (NotNull) + */ + public DaoReadable getDaoReadable() { + return getMyDao(); + } + + /** + * This method implements the method that is declared at super. + * + * @return Dao-writable. (NotNull) + */ + public DaoWritable getDaoWritable() { + return getMyDao(); + } + + // =================================================================================== + // New Instance + // ============ + /** + * New entity. + * + * @return Entity. (NotNull) + */ + public Entity newEntity() { + return newMyEntity(); + } + + /** + * New condition-bean. + * + * @return Condition-bean. (NotNull) + */ + public ConditionBean newConditionBean() { + return newMyConditionBean(); + } + + /** + * New my entity. + * + * @return My entity. (NotNull) + */ + public Configuration newMyEntity() { + return new Configuration(); + } + + /** + * New my condition-bean. + * + * @return My condition-bean. (NotNull) + */ + public ConfigurationCB newMyConditionBean() { + return new ConfigurationCB(); + } + + // =================================================================================== + // Delegate Method + // =============== + // ----------------------------------------------------- + // Select + // ------ + /** + * Get count as all. (Delegate-Method) + * + * @return All count. (NotNull) + */ + public int delegateGetCountAll() { + return getMyDao().getCountAll(); + } + + /** + * Get list as all. (Delegate-Method) + * + * @return All list. (NotNull) + */ + public java.util.List delegateGetListAll() { + return getMyDao().getListAll(); + } + + // + // Get entity. (Delegate-Method) + // + // @param Primary-keys (NotNull) + // @return Entity. (NotNull) + // + public Configuration delegateGetEntity(java.math.BigDecimal configurationId) { + return getMyDao().getEntity(configurationId); + } + + /** + * Select count by condition-bean. (Delegate-Method) + * + * @param cb Condition-bean. (NotNull) + * @return Selected count. (NotNull) + */ + public int delegateSelectCount(ConfigurationCB cb) { + assertConditionBeanNotNull(cb); + return getMyDao().selectCount(cb); + } + + /** + * Select entity by condition-bean. (Delegate-Method) + * + * @param cb Condition-bean. (NotNull) + * @return Selected entity. If the select result is zero, it returns null. (Nullable) + */ + public Configuration delegateSelectEntity(ConfigurationCB cb) { + assertConditionBeanNotNull(cb); + return getMyDao().selectEntity(cb); + } + + /** + * Select list by condition-bean. (Delegate-Method) + * + * @param cb Condition-bean. (NotNull) + * @return Selected list. If the select result is zero, it returns empty list. (NotNull) + */ + public java.util.List delegateSelectList(ConfigurationCB cb) { + assertConditionBeanNotNull(cb); + return getMyDao().selectList(cb); + } + + + // ----------------------------------------------------- + // Update + // ------ + /** + * Insert one entity. (Delegate-Method) + * + * @param entity Entity. (NotNull) + * @return Inserted count. + */ + public int delegateInsert(Configuration entity) { + assertEntityNotNull(entity);// If this table use identity, the entity does not have primary-key. + filterEntityOfInsert(entity); + assertEntityOfInsert(entity); + return getMyDao().insert(entity); + } + + /** + * Update one entity. (Delegate-Method) + * {modified only} + * + * @param entity Entity. (NotNull) + * @return Updated count. + */ + public int delegateUpdate(Configuration entity) { + assertEntityNotNullAndHasPrimaryKeyValue(entity); + filterEntityOfUpdate(entity); + assertEntityOfUpdate(entity); + return getMyDao().updateModifiedOnly(entity); + } + + /** + * Delete one entity. (Delegate-Method) + * + * @param entity Entity. (NotNull) + * @return Deleted count. + */ + public int delegateDelete(Configuration entity) { + assertEntityNotNullAndHasPrimaryKeyValue(entity); + filterEntityOfDelete(entity); + assertEntityOfDelete(entity); + return getMyDao().delete(entity); + } + + /** + * Insert several entities. (Delegate-Method) + * + * @param entityList Entity-list. (NotNull & NotEmpty) + * @return Inserted count. + */ + public int delegateInsertList(java.util.List entityList) { + assertListNotNullAndNotEmpty(entityList); + return getMyDao().insertList(entityList); + } + + /** + * Update several entities. (Delegate-Method) + * + * @param entityList Entity-list. (NotNull & NotEmpty) + * @return Updated count. + */ + public int delegateUpdateList(java.util.List entityList) { + assertListNotNullAndNotEmpty(entityList); + return getMyDao().updateList(entityList); + } + + /** + * Delete several entities. (Delegate-Method) + * + * @param entityList Entity-list. (NotNull & NotEmpty) + * @return Deleted count. + */ + public int delegateDeleteList(java.util.List entityList) { + assertListNotNullAndNotEmpty(entityList); + return getMyDao().deleteList(entityList); + } + + // =================================================================================== + // Basic Select Count + // ================== + /** + * Select count by condition-bean. + *
+     * If the argument 'condition-bean' is effective about fetch-scope,
+     * this method invoke select count ignoring the fetch-scope.
+     * 
+ * @param cb Condition-bean. This condition-bean should not be set up about fetch-scope. (NotNull) + * @return Selected count. + */ + public int selectCount(ConfigurationCB cb) { + assertConditionBeanNotNull(cb); + return delegateSelectCount(cb); + } + + // =================================================================================== + // Basic Select Entity + // =================== + /** + * Select entity by condition-bean. + * + * @param cb Condition-bean. (NotNull) + * @return Selected entity. (Nullalble) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public Configuration selectEntity(ConfigurationCB cb) { + assertConditionBeanNotNull(cb); + final java.util.List ls = selectList(cb); + if (ls.isEmpty()) { + return null; + } + assertRecordHasBeenSelectedAsOne(ls, cb); + return (Configuration)ls.get(0); + } + + /** + * Select entity by condition-bean with deleted check. + * + * @param cb Condition-bean. (NotNull) + * @return Selected entity. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public Configuration selectEntityWithDeletedCheck(ConfigurationCB cb) { + assertConditionBeanNotNull(cb); + final java.util.List ls = selectList(cb); + assertRecordHasNotBeenDeleted(ls, cb); + assertRecordHasBeenSelectedAsOne(ls, cb); + return (Configuration)ls.get(0); + } + + /* + * Select entity with deleted check. {by primary-key} + * + * @param primaryKey + * @return Selected entity. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public Configuration selectByPKValueWithDeletedCheck(java.math.BigDecimal configurationId) { + Configuration entity = new Configuration(); + entity.setConfigurationId(configurationId); + final ConfigurationCB cb = newMyConditionBean(); + cb.acceptPrimaryKeyMapString(getDBMeta().extractPrimaryKeyMapString(entity)); + return selectEntityWithDeletedCheck(cb); + } + + // =================================================================================== + // Basic Select List + // ================= + /** + * Select list as result-bean. + * + * @param cb Condition-bean. (NotNull) + * @return Selected list-result-bean. (NotNull) + */ + public ListResultBean selectList(ConfigurationCB cb) { + assertConditionBeanNotNull(cb); + return new ResultBeanBuilder(this).buildListResultBean(cb, delegateSelectList(cb)); + } + + /** + * Select page as result-bean. + * + * @param cb Condition-bean. (NotNull) + * @return Selected paging-result-bean. (NotNull) + */ + public PagingResultBean selectPage(final ConfigurationCB cb) { + assertConditionBeanNotNull(cb); + return selectPage(cb, new SelectPageSimpleInvoker(this)); + } + + /** + * Select page. + * + * @param cb Condition-bean. (NotNull) + * @param invoker Select-page-invoker (NotNull) + * @return Selected paging-result-bean. (NotNull) + */ + public PagingResultBean selectPage(final ConfigurationCB cb, SelectPageInvoker invoker) { + assertConditionBeanNotNull(cb); + final SelectPageCallback pageCallback = new SelectPageCallback() { + public PagingBean getPagingBean() { return cb; } + public int selectCountIgnoreFetchScope() { + return selectCount(cb); + } + public java.util.List selectListWithFetchScope() { + return selectList(cb); + } + }; + return invoker.invokeSelectPage(pageCallback); + } + + // =================================================================================== + // Various Select + // ============== + /** + * Select value-label list. + * + * @param cb Condition-bean. (NotNull) + * @param valueLabelSetupper Value-label-setupper. (NotNull) + * @return Value-label list. (NotNull) + */ + public java.util.List> selectValueLabelList(ConfigurationCB cb, ValueLabelSetupper valueLabelSetupper) { + return createValueLabelList(selectList(cb), valueLabelSetupper); + } + + // =================================================================================== + // Load Referer + // ============ + + // =================================================================================== + // Pull Out Foreign + // ================ + + // =================================================================================== + // Basic Entity Update + // =================== + /** + * Insert. + * + * @param configuration Entity. (NotNull) + */ + public void insert(Configuration configuration) { + assertEntityNotNull(configuration); + delegateInsert(configuration); + } + + protected void doCreate(Entity configuration) { + insert((Configuration)configuration); + } + + /** + * Update. + *
+     * If it updates count zero, throws exception.
+     * If concurrency control of this table is valid, this update have it.
+     * 
+ * @param configuration Entity. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public void update(Configuration configuration) { + assertEntityNotNull(configuration); + final int updatedCount = delegateUpdate(configuration); + if (updatedCount == 0) { + throw new jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException(configuration.toString()); + } else if (updatedCount > 1) { + String msg = "updatedCount=" + updatedCount + ": " + configuration.toString(); + throw new jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException(msg); + } + } + + protected void doModify(Entity configuration) { + update((Configuration)configuration); + } + + /** + * Update after select. + * + * @param configuration Entity. This must contain primary-key value at least. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + */ + public void updateAfterSelect(Configuration configuration) { + assertEntityNotNullAndHasPrimaryKeyValue(configuration); + final ConfigurationCB cb = newMyConditionBean(); + cb.acceptPrimaryKeyMapString(getDBMeta().extractPrimaryKeyMapString(configuration)); + final Configuration currentEntity = selectEntityWithDeletedCheck(cb); + mergeEntity(configuration, currentEntity); + update(currentEntity); + } + + protected void doModifyAfterSelect(Entity configuration) { + updateAfterSelect((Configuration)configuration); + } + + /** + * Insert or update. + * {update: modified only} + * + * @param configuration Entity. This should contain primary-key value at least(Except use identity). (NotNull) + */ + public void insertOrUpdate(Configuration configuration) { + assertEntityNotNull(configuration); + if (!configuration.hasPrimaryKeyValue()) { + insert(configuration); + } else { + try { + update(configuration); + } catch (org.seasar.dao.NotSingleRowUpdatedRuntimeException e) { + insert(configuration); + } catch (jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException e) { + insert(configuration); + } + } + } + + protected void doCreateOrUpdateNonstrict(Entity configuration) { + + insertOrUpdate((Configuration)configuration); + + } + + /** + * Insert or update after select. + * {update: modified only} + * + * @param configuration Entity. This should contain primary-key value at least(Except use identity). (NotNull) + */ + public void insertOrUpdateAfterSelect(Configuration configuration) { + assertEntityNotNull(configuration); + if (!configuration.hasPrimaryKeyValue()) { + insert(configuration); + return; + } + Configuration currentEntity = null; + try { + final ConfigurationCB cb = newMyConditionBean(); + cb.acceptPrimaryKeyMapString(getDBMeta().extractPrimaryKeyMapString(configuration)); + currentEntity = selectEntityWithDeletedCheck(cb); + } catch (jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException e) { + insert(configuration); + return; + } + assertEntityNotNullAndHasPrimaryKeyValue(configuration); + mergeEntity(configuration, currentEntity); + update(currentEntity); + } + + protected void doCreateOrModifyAfterSelect(Entity entity) { + insertOrUpdateAfterSelect((Configuration)entity); + } + + /** + * This method implements the method that is declared at super. + * + * @param sourceEntity Source entity. (NotNull) + * @param destinationEntity Destination entity. (NotNull) + */ + protected void mergeEntity(Entity sourceEntity, Entity destinationEntity) { + assertEntityNotNull(sourceEntity); + assertEntityNotNull(destinationEntity); + final Configuration sourceMyEntity = (Configuration)sourceEntity; + final Configuration destinationMyEntity = (Configuration)destinationEntity; + destinationMyEntity.clearModifiedPropertyNames(); + final java.util.Set names = sourceMyEntity.getModifiedPropertyNames(); + + if (names.contains("configurationId")) { destinationMyEntity.setConfigurationId(sourceMyEntity.getConfigurationId()); } + if (names.contains("configurationTitle")) { destinationMyEntity.setConfigurationTitle(sourceMyEntity.getConfigurationTitle()); } + if (names.contains("configurationKey")) { destinationMyEntity.setConfigurationKey(sourceMyEntity.getConfigurationKey()); } + if (names.contains("configurationValue")) { destinationMyEntity.setConfigurationValue(sourceMyEntity.getConfigurationValue()); } + if (names.contains("configurationDescription")) { destinationMyEntity.setConfigurationDescription(sourceMyEntity.getConfigurationDescription()); } + if (names.contains("configurationGroupId")) { destinationMyEntity.setConfigurationGroupId(sourceMyEntity.getConfigurationGroupId()); } + if (names.contains("sortOrder")) { destinationMyEntity.setSortOrder(sourceMyEntity.getSortOrder()); } + if (names.contains("lastModified")) { destinationMyEntity.setLastModified(sourceMyEntity.getLastModified()); } + if (names.contains("dateAdded")) { destinationMyEntity.setDateAdded(sourceMyEntity.getDateAdded()); } + if (names.contains("useFunction")) { destinationMyEntity.setUseFunction(sourceMyEntity.getUseFunction()); } + if (names.contains("setFunction")) { destinationMyEntity.setSetFunction(sourceMyEntity.getSetFunction()); } + + } + + /** + * Delete. + * + * @param configuration Entity. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public void delete(Configuration configuration) { + assertEntityNotNull(configuration); + final int deletedCount = delegateDelete(configuration); + if (deletedCount == 0) { + throw new jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException(configuration.toString()); + } else if (deletedCount > 1) { + String msg = "deletedCount=" + deletedCount + ": " + configuration.toString(); + throw new jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException(msg); + } + } + + protected void doRemove(Entity configuration) { + delete((Configuration)configuration); + } + + /** + * Delete after select. + * + * @param configuration Entity. This must contain primary-key value at least. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + */ + public void deleteAfterSelect(Configuration configuration) { + assertEntityNotNullAndHasPrimaryKeyValue(configuration); + final ConfigurationCB cb = newMyConditionBean(); + cb.acceptPrimaryKeyMapString(getDBMeta().extractPrimaryKeyMapString(configuration)); + selectEntityWithDeletedCheck(cb); + delete(configuration); + } + + protected void doRemoveAfterSelect(Entity configuration) { + deleteAfterSelect((Configuration)configuration); + } + + // =================================================================================== + // Basic Batch Update + // ================== + /** + * Insert list. + * + * @param configurationList Entity-list. (NotNull & NotEmpty) + * @return Inserted count. + */ + public int insertList(java.util.List configurationList) { + assertListNotNullAndNotEmpty(configurationList); + return delegateInsertList(configurationList); + } + + /** + * Update list. + * + * @param configurationList Entity-list. (NotNull & NotEmpty) + * @return Updated count. + */ + public int updateList(java.util.List configurationList) { + assertListNotNullAndNotEmpty(configurationList); + return delegateUpdateList(configurationList); + } + + /** + * Delete list. + * + * @param configurationList Entity-list. (NotNull & NotEmpty) + * @return Deleted count. + */ + public int deleteList(java.util.List configurationList) { + assertListNotNullAndNotEmpty(configurationList); + return delegateDeleteList(configurationList); + } + + // =================================================================================== + // Various Insert + // ============== + + // =================================================================================== + // CBSetupper + // ========== + /** + * The interface of condition-bean setupper. + */ + public static interface CBSetupper extends ConditionBeanSetupper { + + /** + * Set up condition. + * + * @param cb Condition-bean. (NotNull) + */ + public void setup(ConfigurationCB cb); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/bsbhv/BsConfigurationGroupBhv.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/bsbhv/BsConfigurationGroupBhv.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/bsbhv/BsConfigurationGroupBhv.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,698 @@ + +package jp.sf.pal.pompei.bsbhv; + +import jp.sf.pal.pompei.allcommon.*; +import jp.sf.pal.pompei.allcommon.bhv.load.LoadRefererOption; +import jp.sf.pal.pompei.allcommon.bhv.setup.ConditionBeanSetupper; +import jp.sf.pal.pompei.allcommon.bhv.setup.ValueLabelSetupper; +import jp.sf.pal.pompei.allcommon.cbean.ConditionBean; +import jp.sf.pal.pompei.allcommon.cbean.ListResultBean; +import jp.sf.pal.pompei.allcommon.cbean.PagingBean; +import jp.sf.pal.pompei.allcommon.cbean.PagingResultBean; +import jp.sf.pal.pompei.allcommon.dbmeta.DBMeta; + +import jp.sf.pal.pompei.exdao.*; +import jp.sf.pal.pompei.exentity.*; +import jp.sf.pal.pompei.bsentity.dbmeta.*; +import jp.sf.pal.pompei.cbean.*; + + + +/** + * The behavior of CONFIGURATION_GROUP. + * + *
+ * [primary-key]
+ *     CONFIGURATION_GROUP_ID
+ * 
+ * [column-property]
+ *     CONFIGURATION_GROUP_ID, CONFIGURATION_GROUP_TITLE, CONFIGURATION_GROUP_DESCRIPTION, SORT_ORDER, VISIBLE
+ * 
+ * [foreign-property]
+ *     
+ * 
+ * [refferer-property]
+ *     
+ * 
+ * [sequence]
+ *     
+ * 
+ * [identity]
+ *     
+ * 
+ * [update-date]
+ *     
+ * 
+ * [version-no]
+ *     
+ * 
+ * 
+ * + * @author DBFlute(AutoGenerator) + */ +public abstract class BsConfigurationGroupBhv extends jp.sf.pal.pompei.allcommon.bhv.AbstractBehaviorWritable { + + // =================================================================================== + // Attribute + // ========= + /** Dao instance. */ + protected ConfigurationGroupDao _dao; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + public BsConfigurationGroupBhv() { + } + + // =================================================================================== + // Table name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + public String getTableDbName() { + return "CONFIGURATION_GROUP"; + } + + // =================================================================================== + // DBMeta + // ====== + /** + * This method implements the method that is declared at super. + * + * @return DBMeta. (NotNull) + */ + public DBMeta getDBMeta() { + return ConfigurationGroupDbm.getInstance(); + } + + /** + * Get my dbmeta. + * + * @return DBMeta. (NotNull) + */ + public ConfigurationGroupDbm getMyDBMeta() { + return ConfigurationGroupDbm.getInstance(); + } + + // =================================================================================== + // Dao Accessor + // ============ + /** + * Get my dao. + * + * @return My dao. + */ + public ConfigurationGroupDao getMyDao() { + return _dao; + } + + /** + * Set my dao. + * + * @param dao My dao. (NotNull) + */ + public void setMyDao(ConfigurationGroupDao dao) { + assertObjectNotNull("dao", dao); + _dao = dao; + } + + /** + * This method implements the method that is declared at super. + * + * @return Dao-readable. (NotNull) + */ + public DaoReadable getDaoReadable() { + return getMyDao(); + } + + /** + * This method implements the method that is declared at super. + * + * @return Dao-writable. (NotNull) + */ + public DaoWritable getDaoWritable() { + return getMyDao(); + } + + // =================================================================================== + // New Instance + // ============ + /** + * New entity. + * + * @return Entity. (NotNull) + */ + public Entity newEntity() { + return newMyEntity(); + } + + /** + * New condition-bean. + * + * @return Condition-bean. (NotNull) + */ + public ConditionBean newConditionBean() { + return newMyConditionBean(); + } + + /** + * New my entity. + * + * @return My entity. (NotNull) + */ + public ConfigurationGroup newMyEntity() { + return new ConfigurationGroup(); + } + + /** + * New my condition-bean. + * + * @return My condition-bean. (NotNull) + */ + public ConfigurationGroupCB newMyConditionBean() { + return new ConfigurationGroupCB(); + } + + // =================================================================================== + // Delegate Method + // =============== + // ----------------------------------------------------- + // Select + // ------ + /** + * Get count as all. (Delegate-Method) + * + * @return All count. (NotNull) + */ + public int delegateGetCountAll() { + return getMyDao().getCountAll(); + } + + /** + * Get list as all. (Delegate-Method) + * + * @return All list. (NotNull) + */ + public java.util.List delegateGetListAll() { + return getMyDao().getListAll(); + } + + // + // Get entity. (Delegate-Method) + // + // @param Primary-keys (NotNull) + // @return Entity. (NotNull) + // + public ConfigurationGroup delegateGetEntity(java.math.BigDecimal configurationGroupId) { + return getMyDao().getEntity(configurationGroupId); + } + + /** + * Select count by condition-bean. (Delegate-Method) + * + * @param cb Condition-bean. (NotNull) + * @return Selected count. (NotNull) + */ + public int delegateSelectCount(ConfigurationGroupCB cb) { + assertConditionBeanNotNull(cb); + return getMyDao().selectCount(cb); + } + + /** + * Select entity by condition-bean. (Delegate-Method) + * + * @param cb Condition-bean. (NotNull) + * @return Selected entity. If the select result is zero, it returns null. (Nullable) + */ + public ConfigurationGroup delegateSelectEntity(ConfigurationGroupCB cb) { + assertConditionBeanNotNull(cb); + return getMyDao().selectEntity(cb); + } + + /** + * Select list by condition-bean. (Delegate-Method) + * + * @param cb Condition-bean. (NotNull) + * @return Selected list. If the select result is zero, it returns empty list. (NotNull) + */ + public java.util.List delegateSelectList(ConfigurationGroupCB cb) { + assertConditionBeanNotNull(cb); + return getMyDao().selectList(cb); + } + + + // ----------------------------------------------------- + // Update + // ------ + /** + * Insert one entity. (Delegate-Method) + * + * @param entity Entity. (NotNull) + * @return Inserted count. + */ + public int delegateInsert(ConfigurationGroup entity) { + assertEntityNotNull(entity);// If this table use identity, the entity does not have primary-key. + filterEntityOfInsert(entity); + assertEntityOfInsert(entity); + return getMyDao().insert(entity); + } + + /** + * Update one entity. (Delegate-Method) + * {modified only} + * + * @param entity Entity. (NotNull) + * @return Updated count. + */ + public int delegateUpdate(ConfigurationGroup entity) { + assertEntityNotNullAndHasPrimaryKeyValue(entity); + filterEntityOfUpdate(entity); + assertEntityOfUpdate(entity); + return getMyDao().updateModifiedOnly(entity); + } + + /** + * Delete one entity. (Delegate-Method) + * + * @param entity Entity. (NotNull) + * @return Deleted count. + */ + public int delegateDelete(ConfigurationGroup entity) { + assertEntityNotNullAndHasPrimaryKeyValue(entity); + filterEntityOfDelete(entity); + assertEntityOfDelete(entity); + return getMyDao().delete(entity); + } + + /** + * Insert several entities. (Delegate-Method) + * + * @param entityList Entity-list. (NotNull & NotEmpty) + * @return Inserted count. + */ + public int delegateInsertList(java.util.List entityList) { + assertListNotNullAndNotEmpty(entityList); + return getMyDao().insertList(entityList); + } + + /** + * Update several entities. (Delegate-Method) + * + * @param entityList Entity-list. (NotNull & NotEmpty) + * @return Updated count. + */ + public int delegateUpdateList(java.util.List entityList) { + assertListNotNullAndNotEmpty(entityList); + return getMyDao().updateList(entityList); + } + + /** + * Delete several entities. (Delegate-Method) + * + * @param entityList Entity-list. (NotNull & NotEmpty) + * @return Deleted count. + */ + public int delegateDeleteList(java.util.List entityList) { + assertListNotNullAndNotEmpty(entityList); + return getMyDao().deleteList(entityList); + } + + // =================================================================================== + // Basic Select Count + // ================== + /** + * Select count by condition-bean. + *
+     * If the argument 'condition-bean' is effective about fetch-scope,
+     * this method invoke select count ignoring the fetch-scope.
+     * 
+ * @param cb Condition-bean. This condition-bean should not be set up about fetch-scope. (NotNull) + * @return Selected count. + */ + public int selectCount(ConfigurationGroupCB cb) { + assertConditionBeanNotNull(cb); + return delegateSelectCount(cb); + } + + // =================================================================================== + // Basic Select Entity + // =================== + /** + * Select entity by condition-bean. + * + * @param cb Condition-bean. (NotNull) + * @return Selected entity. (Nullalble) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public ConfigurationGroup selectEntity(ConfigurationGroupCB cb) { + assertConditionBeanNotNull(cb); + final java.util.List ls = selectList(cb); + if (ls.isEmpty()) { + return null; + } + assertRecordHasBeenSelectedAsOne(ls, cb); + return (ConfigurationGroup)ls.get(0); + } + + /** + * Select entity by condition-bean with deleted check. + * + * @param cb Condition-bean. (NotNull) + * @return Selected entity. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public ConfigurationGroup selectEntityWithDeletedCheck(ConfigurationGroupCB cb) { + assertConditionBeanNotNull(cb); + final java.util.List ls = selectList(cb); + assertRecordHasNotBeenDeleted(ls, cb); + assertRecordHasBeenSelectedAsOne(ls, cb); + return (ConfigurationGroup)ls.get(0); + } + + /* + * Select entity with deleted check. {by primary-key} + * + * @param primaryKey + * @return Selected entity. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public ConfigurationGroup selectByPKValueWithDeletedCheck(java.math.BigDecimal configurationGroupId) { + ConfigurationGroup entity = new ConfigurationGroup(); + entity.setConfigurationGroupId(configurationGroupId); + final ConfigurationGroupCB cb = newMyConditionBean(); + cb.acceptPrimaryKeyMapString(getDBMeta().extractPrimaryKeyMapString(entity)); + return selectEntityWithDeletedCheck(cb); + } + + // =================================================================================== + // Basic Select List + // ================= + /** + * Select list as result-bean. + * + * @param cb Condition-bean. (NotNull) + * @return Selected list-result-bean. (NotNull) + */ + public ListResultBean selectList(ConfigurationGroupCB cb) { + assertConditionBeanNotNull(cb); + return new ResultBeanBuilder(this).buildListResultBean(cb, delegateSelectList(cb)); + } + + /** + * Select page as result-bean. + * + * @param cb Condition-bean. (NotNull) + * @return Selected paging-result-bean. (NotNull) + */ + public PagingResultBean selectPage(final ConfigurationGroupCB cb) { + assertConditionBeanNotNull(cb); + return selectPage(cb, new SelectPageSimpleInvoker(this)); + } + + /** + * Select page. + * + * @param cb Condition-bean. (NotNull) + * @param invoker Select-page-invoker (NotNull) + * @return Selected paging-result-bean. (NotNull) + */ + public PagingResultBean selectPage(final ConfigurationGroupCB cb, SelectPageInvoker invoker) { + assertConditionBeanNotNull(cb); + final SelectPageCallback pageCallback = new SelectPageCallback() { + public PagingBean getPagingBean() { return cb; } + public int selectCountIgnoreFetchScope() { + return selectCount(cb); + } + public java.util.List selectListWithFetchScope() { + return selectList(cb); + } + }; + return invoker.invokeSelectPage(pageCallback); + } + + // =================================================================================== + // Various Select + // ============== + /** + * Select value-label list. + * + * @param cb Condition-bean. (NotNull) + * @param valueLabelSetupper Value-label-setupper. (NotNull) + * @return Value-label list. (NotNull) + */ + public java.util.List> selectValueLabelList(ConfigurationGroupCB cb, ValueLabelSetupper valueLabelSetupper) { + return createValueLabelList(selectList(cb), valueLabelSetupper); + } + + // =================================================================================== + // Load Referer + // ============ + + // =================================================================================== + // Pull Out Foreign + // ================ + + // =================================================================================== + // Basic Entity Update + // =================== + /** + * Insert. + * + * @param configurationGroup Entity. (NotNull) + */ + public void insert(ConfigurationGroup configurationGroup) { + assertEntityNotNull(configurationGroup); + delegateInsert(configurationGroup); + } + + protected void doCreate(Entity configurationGroup) { + insert((ConfigurationGroup)configurationGroup); + } + + /** + * Update. + *
+     * If it updates count zero, throws exception.
+     * If concurrency control of this table is valid, this update have it.
+     * 
+ * @param configurationGroup Entity. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public void update(ConfigurationGroup configurationGroup) { + assertEntityNotNull(configurationGroup); + final int updatedCount = delegateUpdate(configurationGroup); + if (updatedCount == 0) { + throw new jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException(configurationGroup.toString()); + } else if (updatedCount > 1) { + String msg = "updatedCount=" + updatedCount + ": " + configurationGroup.toString(); + throw new jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException(msg); + } + } + + protected void doModify(Entity configurationGroup) { + update((ConfigurationGroup)configurationGroup); + } + + /** + * Update after select. + * + * @param configurationGroup Entity. This must contain primary-key value at least. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + */ + public void updateAfterSelect(ConfigurationGroup configurationGroup) { + assertEntityNotNullAndHasPrimaryKeyValue(configurationGroup); + final ConfigurationGroupCB cb = newMyConditionBean(); + cb.acceptPrimaryKeyMapString(getDBMeta().extractPrimaryKeyMapString(configurationGroup)); + final ConfigurationGroup currentEntity = selectEntityWithDeletedCheck(cb); + mergeEntity(configurationGroup, currentEntity); + update(currentEntity); + } + + protected void doModifyAfterSelect(Entity configurationGroup) { + updateAfterSelect((ConfigurationGroup)configurationGroup); + } + + /** + * Insert or update. + * {update: modified only} + * + * @param configurationGroup Entity. This should contain primary-key value at least(Except use identity). (NotNull) + */ + public void insertOrUpdate(ConfigurationGroup configurationGroup) { + assertEntityNotNull(configurationGroup); + if (!configurationGroup.hasPrimaryKeyValue()) { + insert(configurationGroup); + } else { + try { + update(configurationGroup); + } catch (org.seasar.dao.NotSingleRowUpdatedRuntimeException e) { + insert(configurationGroup); + } catch (jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException e) { + insert(configurationGroup); + } + } + } + + protected void doCreateOrUpdateNonstrict(Entity configurationGroup) { + + insertOrUpdate((ConfigurationGroup)configurationGroup); + + } + + /** + * Insert or update after select. + * {update: modified only} + * + * @param configurationGroup Entity. This should contain primary-key value at least(Except use identity). (NotNull) + */ + public void insertOrUpdateAfterSelect(ConfigurationGroup configurationGroup) { + assertEntityNotNull(configurationGroup); + if (!configurationGroup.hasPrimaryKeyValue()) { + insert(configurationGroup); + return; + } + ConfigurationGroup currentEntity = null; + try { + final ConfigurationGroupCB cb = newMyConditionBean(); + cb.acceptPrimaryKeyMapString(getDBMeta().extractPrimaryKeyMapString(configurationGroup)); + currentEntity = selectEntityWithDeletedCheck(cb); + } catch (jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException e) { + insert(configurationGroup); + return; + } + assertEntityNotNullAndHasPrimaryKeyValue(configurationGroup); + mergeEntity(configurationGroup, currentEntity); + update(currentEntity); + } + + protected void doCreateOrModifyAfterSelect(Entity entity) { + insertOrUpdateAfterSelect((ConfigurationGroup)entity); + } + + /** + * This method implements the method that is declared at super. + * + * @param sourceEntity Source entity. (NotNull) + * @param destinationEntity Destination entity. (NotNull) + */ + protected void mergeEntity(Entity sourceEntity, Entity destinationEntity) { + assertEntityNotNull(sourceEntity); + assertEntityNotNull(destinationEntity); + final ConfigurationGroup sourceMyEntity = (ConfigurationGroup)sourceEntity; + final ConfigurationGroup destinationMyEntity = (ConfigurationGroup)destinationEntity; + destinationMyEntity.clearModifiedPropertyNames(); + final java.util.Set names = sourceMyEntity.getModifiedPropertyNames(); + + if (names.contains("configurationGroupId")) { destinationMyEntity.setConfigurationGroupId(sourceMyEntity.getConfigurationGroupId()); } + if (names.contains("configurationGroupTitle")) { destinationMyEntity.setConfigurationGroupTitle(sourceMyEntity.getConfigurationGroupTitle()); } + if (names.contains("configurationGroupDescription")) { destinationMyEntity.setConfigurationGroupDescription(sourceMyEntity.getConfigurationGroupDescription()); } + if (names.contains("sortOrder")) { destinationMyEntity.setSortOrder(sourceMyEntity.getSortOrder()); } + if (names.contains("visible")) { destinationMyEntity.setVisible(sourceMyEntity.getVisible()); } + + } + + /** + * Delete. + * + * @param configurationGroup Entity. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public void delete(ConfigurationGroup configurationGroup) { + assertEntityNotNull(configurationGroup); + final int deletedCount = delegateDelete(configurationGroup); + if (deletedCount == 0) { + throw new jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException(configurationGroup.toString()); + } else if (deletedCount > 1) { + String msg = "deletedCount=" + deletedCount + ": " + configurationGroup.toString(); + throw new jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException(msg); + } + } + + protected void doRemove(Entity configurationGroup) { + delete((ConfigurationGroup)configurationGroup); + } + + /** + * Delete after select. + * + * @param configurationGroup Entity. This must contain primary-key value at least. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + */ + public void deleteAfterSelect(ConfigurationGroup configurationGroup) { + assertEntityNotNullAndHasPrimaryKeyValue(configurationGroup); + final ConfigurationGroupCB cb = newMyConditionBean(); + cb.acceptPrimaryKeyMapString(getDBMeta().extractPrimaryKeyMapString(configurationGroup)); + selectEntityWithDeletedCheck(cb); + delete(configurationGroup); + } + + protected void doRemoveAfterSelect(Entity configurationGroup) { + deleteAfterSelect((ConfigurationGroup)configurationGroup); + } + + // =================================================================================== + // Basic Batch Update + // ================== + /** + * Insert list. + * + * @param configurationGroupList Entity-list. (NotNull & NotEmpty) + * @return Inserted count. + */ + public int insertList(java.util.List configurationGroupList) { + assertListNotNullAndNotEmpty(configurationGroupList); + return delegateInsertList(configurationGroupList); + } + + /** + * Update list. + * + * @param configurationGroupList Entity-list. (NotNull & NotEmpty) + * @return Updated count. + */ + public int updateList(java.util.List configurationGroupList) { + assertListNotNullAndNotEmpty(configurationGroupList); + return delegateUpdateList(configurationGroupList); + } + + /** + * Delete list. + * + * @param configurationGroupList Entity-list. (NotNull & NotEmpty) + * @return Deleted count. + */ + public int deleteList(java.util.List configurationGroupList) { + assertListNotNullAndNotEmpty(configurationGroupList); + return delegateDeleteList(configurationGroupList); + } + + // =================================================================================== + // Various Insert + // ============== + + // =================================================================================== + // CBSetupper + // ========== + /** + * The interface of condition-bean setupper. + */ + public static interface CBSetupper extends ConditionBeanSetupper { + + /** + * Set up condition. + * + * @param cb Condition-bean. (NotNull) + */ + public void setup(ConfigurationGroupCB cb); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/bsbhv/BsCounterBhv.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/bsbhv/BsCounterBhv.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/bsbhv/BsCounterBhv.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,365 @@ + +package jp.sf.pal.pompei.bsbhv; + +import jp.sf.pal.pompei.allcommon.*; +import jp.sf.pal.pompei.allcommon.bhv.load.LoadRefererOption; +import jp.sf.pal.pompei.allcommon.bhv.setup.ConditionBeanSetupper; +import jp.sf.pal.pompei.allcommon.bhv.setup.ValueLabelSetupper; +import jp.sf.pal.pompei.allcommon.cbean.ConditionBean; +import jp.sf.pal.pompei.allcommon.cbean.ListResultBean; +import jp.sf.pal.pompei.allcommon.cbean.PagingBean; +import jp.sf.pal.pompei.allcommon.cbean.PagingResultBean; +import jp.sf.pal.pompei.allcommon.dbmeta.DBMeta; + +import jp.sf.pal.pompei.exdao.*; +import jp.sf.pal.pompei.exentity.*; +import jp.sf.pal.pompei.bsentity.dbmeta.*; +import jp.sf.pal.pompei.cbean.*; + + + +/** + * The behavior of COUNTER. + * + *
+ * [primary-key]
+ *     
+ * 
+ * [column-property]
+ *     STARTDATE, COUNTER
+ * 
+ * [foreign-property]
+ *     
+ * 
+ * [refferer-property]
+ *     
+ * 
+ * [sequence]
+ *     
+ * 
+ * [identity]
+ *     
+ * 
+ * [update-date]
+ *     
+ * 
+ * [version-no]
+ *     
+ * 
+ * 
+ * + * @author DBFlute(AutoGenerator) + */ +public abstract class BsCounterBhv extends jp.sf.pal.pompei.allcommon.bhv.AbstractBehaviorReadable { + + // =================================================================================== + // Attribute + // ========= + /** Dao instance. */ + protected CounterDao _dao; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + public BsCounterBhv() { + } + + // =================================================================================== + // Table name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + public String getTableDbName() { + return "COUNTER"; + } + + // =================================================================================== + // DBMeta + // ====== + /** + * This method implements the method that is declared at super. + * + * @return DBMeta. (NotNull) + */ + public DBMeta getDBMeta() { + return CounterDbm.getInstance(); + } + + /** + * Get my dbmeta. + * + * @return DBMeta. (NotNull) + */ + public CounterDbm getMyDBMeta() { + return CounterDbm.getInstance(); + } + + // =================================================================================== + // Dao Accessor + // ============ + /** + * Get my dao. + * + * @return My dao. + */ + public CounterDao getMyDao() { + return _dao; + } + + /** + * Set my dao. + * + * @param dao My dao. (NotNull) + */ + public void setMyDao(CounterDao dao) { + assertObjectNotNull("dao", dao); + _dao = dao; + } + + /** + * This method implements the method that is declared at super. + * + * @return Dao-readable. (NotNull) + */ + public DaoReadable getDaoReadable() { + return getMyDao(); + } + + + // =================================================================================== + // New Instance + // ============ + /** + * New entity. + * + * @return Entity. (NotNull) + */ + public Entity newEntity() { + return newMyEntity(); + } + + /** + * New condition-bean. + * + * @return Condition-bean. (NotNull) + */ + public ConditionBean newConditionBean() { + return newMyConditionBean(); + } + + /** + * New my entity. + * + * @return My entity. (NotNull) + */ + public Counter newMyEntity() { + return new Counter(); + } + + /** + * New my condition-bean. + * + * @return My condition-bean. (NotNull) + */ + public CounterCB newMyConditionBean() { + return new CounterCB(); + } + + // =================================================================================== + // Delegate Method + // =============== + // ----------------------------------------------------- + // Select + // ------ + /** + * Get count as all. (Delegate-Method) + * + * @return All count. (NotNull) + */ + public int delegateGetCountAll() { + return getMyDao().getCountAll(); + } + + /** + * Get list as all. (Delegate-Method) + * + * @return All list. (NotNull) + */ + public java.util.List delegateGetListAll() { + return getMyDao().getListAll(); + } + + /** + * Select count by condition-bean. (Delegate-Method) + * + * @param cb Condition-bean. (NotNull) + * @return Selected count. (NotNull) + */ + public int delegateSelectCount(CounterCB cb) { + assertConditionBeanNotNull(cb); + return getMyDao().selectCount(cb); + } + + /** + * Select entity by condition-bean. (Delegate-Method) + * + * @param cb Condition-bean. (NotNull) + * @return Selected entity. If the select result is zero, it returns null. (Nullable) + */ + public Counter delegateSelectEntity(CounterCB cb) { + assertConditionBeanNotNull(cb); + return getMyDao().selectEntity(cb); + } + + /** + * Select list by condition-bean. (Delegate-Method) + * + * @param cb Condition-bean. (NotNull) + * @return Selected list. If the select result is zero, it returns empty list. (NotNull) + */ + public java.util.List delegateSelectList(CounterCB cb) { + assertConditionBeanNotNull(cb); + return getMyDao().selectList(cb); + } + + + + // =================================================================================== + // Basic Select Count + // ================== + /** + * Select count by condition-bean. + *
+     * If the argument 'condition-bean' is effective about fetch-scope,
+     * this method invoke select count ignoring the fetch-scope.
+     * 
+ * @param cb Condition-bean. This condition-bean should not be set up about fetch-scope. (NotNull) + * @return Selected count. + */ + public int selectCount(CounterCB cb) { + assertConditionBeanNotNull(cb); + return delegateSelectCount(cb); + } + + // =================================================================================== + // Basic Select Entity + // =================== + /** + * Select entity by condition-bean. + * + * @param cb Condition-bean. (NotNull) + * @return Selected entity. (Nullalble) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public Counter selectEntity(CounterCB cb) { + assertConditionBeanNotNull(cb); + final java.util.List ls = selectList(cb); + if (ls.isEmpty()) { + return null; + } + assertRecordHasBeenSelectedAsOne(ls, cb); + return (Counter)ls.get(0); + } + + /** + * Select entity by condition-bean with deleted check. + * + * @param cb Condition-bean. (NotNull) + * @return Selected entity. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public Counter selectEntityWithDeletedCheck(CounterCB cb) { + assertConditionBeanNotNull(cb); + final java.util.List ls = selectList(cb); + assertRecordHasNotBeenDeleted(ls, cb); + assertRecordHasBeenSelectedAsOne(ls, cb); + return (Counter)ls.get(0); + } + + // =================================================================================== + // Basic Select List + // ================= + /** + * Select list as result-bean. + * + * @param cb Condition-bean. (NotNull) + * @return Selected list-result-bean. (NotNull) + */ + public ListResultBean selectList(CounterCB cb) { + assertConditionBeanNotNull(cb); + return new ResultBeanBuilder(this).buildListResultBean(cb, delegateSelectList(cb)); + } + + /** + * Select page as result-bean. + * + * @param cb Condition-bean. (NotNull) + * @return Selected paging-result-bean. (NotNull) + */ + public PagingResultBean selectPage(final CounterCB cb) { + assertConditionBeanNotNull(cb); + return selectPage(cb, new SelectPageSimpleInvoker(this)); + } + + /** + * Select page. + * + * @param cb Condition-bean. (NotNull) + * @param invoker Select-page-invoker (NotNull) + * @return Selected paging-result-bean. (NotNull) + */ + public PagingResultBean selectPage(final CounterCB cb, SelectPageInvoker invoker) { + assertConditionBeanNotNull(cb); + final SelectPageCallback pageCallback = new SelectPageCallback() { + public PagingBean getPagingBean() { return cb; } + public int selectCountIgnoreFetchScope() { + return selectCount(cb); + } + public java.util.List selectListWithFetchScope() { + return selectList(cb); + } + }; + return invoker.invokeSelectPage(pageCallback); + } + + // =================================================================================== + // Various Select + // ============== + /** + * Select value-label list. + * + * @param cb Condition-bean. (NotNull) + * @param valueLabelSetupper Value-label-setupper. (NotNull) + * @return Value-label list. (NotNull) + */ + public java.util.List> selectValueLabelList(CounterCB cb, ValueLabelSetupper valueLabelSetupper) { + return createValueLabelList(selectList(cb), valueLabelSetupper); + } + + // =================================================================================== + // Pull Out Foreign + // ================ + + // =================================================================================== + // CBSetupper + // ========== + /** + * The interface of condition-bean setupper. + */ + public static interface CBSetupper extends ConditionBeanSetupper { + + /** + * Set up condition. + * + * @param cb Condition-bean. (NotNull) + */ + public void setup(CounterCB cb); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/bsbhv/BsCounterHistoryBhv.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/bsbhv/BsCounterHistoryBhv.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/bsbhv/BsCounterHistoryBhv.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,365 @@ + +package jp.sf.pal.pompei.bsbhv; + +import jp.sf.pal.pompei.allcommon.*; +import jp.sf.pal.pompei.allcommon.bhv.load.LoadRefererOption; +import jp.sf.pal.pompei.allcommon.bhv.setup.ConditionBeanSetupper; +import jp.sf.pal.pompei.allcommon.bhv.setup.ValueLabelSetupper; +import jp.sf.pal.pompei.allcommon.cbean.ConditionBean; +import jp.sf.pal.pompei.allcommon.cbean.ListResultBean; +import jp.sf.pal.pompei.allcommon.cbean.PagingBean; +import jp.sf.pal.pompei.allcommon.cbean.PagingResultBean; +import jp.sf.pal.pompei.allcommon.dbmeta.DBMeta; + +import jp.sf.pal.pompei.exdao.*; +import jp.sf.pal.pompei.exentity.*; +import jp.sf.pal.pompei.bsentity.dbmeta.*; +import jp.sf.pal.pompei.cbean.*; + + + +/** + * The behavior of COUNTER_HISTORY. + * + *
+ * [primary-key]
+ *     
+ * 
+ * [column-property]
+ *     MONTH, COUNTER
+ * 
+ * [foreign-property]
+ *     
+ * 
+ * [refferer-property]
+ *     
+ * 
+ * [sequence]
+ *     
+ * 
+ * [identity]
+ *     
+ * 
+ * [update-date]
+ *     
+ * 
+ * [version-no]
+ *     
+ * 
+ * 
+ * + * @author DBFlute(AutoGenerator) + */ +public abstract class BsCounterHistoryBhv extends jp.sf.pal.pompei.allcommon.bhv.AbstractBehaviorReadable { + + // =================================================================================== + // Attribute + // ========= + /** Dao instance. */ + protected CounterHistoryDao _dao; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + public BsCounterHistoryBhv() { + } + + // =================================================================================== + // Table name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + public String getTableDbName() { + return "COUNTER_HISTORY"; + } + + // =================================================================================== + // DBMeta + // ====== + /** + * This method implements the method that is declared at super. + * + * @return DBMeta. (NotNull) + */ + public DBMeta getDBMeta() { + return CounterHistoryDbm.getInstance(); + } + + /** + * Get my dbmeta. + * + * @return DBMeta. (NotNull) + */ + public CounterHistoryDbm getMyDBMeta() { + return CounterHistoryDbm.getInstance(); + } + + // =================================================================================== + // Dao Accessor + // ============ + /** + * Get my dao. + * + * @return My dao. + */ + public CounterHistoryDao getMyDao() { + return _dao; + } + + /** + * Set my dao. + * + * @param dao My dao. (NotNull) + */ + public void setMyDao(CounterHistoryDao dao) { + assertObjectNotNull("dao", dao); + _dao = dao; + } + + /** + * This method implements the method that is declared at super. + * + * @return Dao-readable. (NotNull) + */ + public DaoReadable getDaoReadable() { + return getMyDao(); + } + + + // =================================================================================== + // New Instance + // ============ + /** + * New entity. + * + * @return Entity. (NotNull) + */ + public Entity newEntity() { + return newMyEntity(); + } + + /** + * New condition-bean. + * + * @return Condition-bean. (NotNull) + */ + public ConditionBean newConditionBean() { + return newMyConditionBean(); + } + + /** + * New my entity. + * + * @return My entity. (NotNull) + */ + public CounterHistory newMyEntity() { + return new CounterHistory(); + } + + /** + * New my condition-bean. + * + * @return My condition-bean. (NotNull) + */ + public CounterHistoryCB newMyConditionBean() { + return new CounterHistoryCB(); + } + + // =================================================================================== + // Delegate Method + // =============== + // ----------------------------------------------------- + // Select + // ------ + /** + * Get count as all. (Delegate-Method) + * + * @return All count. (NotNull) + */ + public int delegateGetCountAll() { + return getMyDao().getCountAll(); + } + + /** + * Get list as all. (Delegate-Method) + * + * @return All list. (NotNull) + */ + public java.util.List delegateGetListAll() { + return getMyDao().getListAll(); + } + + /** + * Select count by condition-bean. (Delegate-Method) + * + * @param cb Condition-bean. (NotNull) + * @return Selected count. (NotNull) + */ + public int delegateSelectCount(CounterHistoryCB cb) { + assertConditionBeanNotNull(cb); + return getMyDao().selectCount(cb); + } + + /** + * Select entity by condition-bean. (Delegate-Method) + * + * @param cb Condition-bean. (NotNull) + * @return Selected entity. If the select result is zero, it returns null. (Nullable) + */ + public CounterHistory delegateSelectEntity(CounterHistoryCB cb) { + assertConditionBeanNotNull(cb); + return getMyDao().selectEntity(cb); + } + + /** + * Select list by condition-bean. (Delegate-Method) + * + * @param cb Condition-bean. (NotNull) + * @return Selected list. If the select result is zero, it returns empty list. (NotNull) + */ + public java.util.List delegateSelectList(CounterHistoryCB cb) { + assertConditionBeanNotNull(cb); + return getMyDao().selectList(cb); + } + + + + // =================================================================================== + // Basic Select Count + // ================== + /** + * Select count by condition-bean. + *
+     * If the argument 'condition-bean' is effective about fetch-scope,
+     * this method invoke select count ignoring the fetch-scope.
+     * 
+ * @param cb Condition-bean. This condition-bean should not be set up about fetch-scope. (NotNull) + * @return Selected count. + */ + public int selectCount(CounterHistoryCB cb) { + assertConditionBeanNotNull(cb); + return delegateSelectCount(cb); + } + + // =================================================================================== + // Basic Select Entity + // =================== + /** + * Select entity by condition-bean. + * + * @param cb Condition-bean. (NotNull) + * @return Selected entity. (Nullalble) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public CounterHistory selectEntity(CounterHistoryCB cb) { + assertConditionBeanNotNull(cb); + final java.util.List ls = selectList(cb); + if (ls.isEmpty()) { + return null; + } + assertRecordHasBeenSelectedAsOne(ls, cb); + return (CounterHistory)ls.get(0); + } + + /** + * Select entity by condition-bean with deleted check. + * + * @param cb Condition-bean. (NotNull) + * @return Selected entity. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public CounterHistory selectEntityWithDeletedCheck(CounterHistoryCB cb) { + assertConditionBeanNotNull(cb); + final java.util.List ls = selectList(cb); + assertRecordHasNotBeenDeleted(ls, cb); + assertRecordHasBeenSelectedAsOne(ls, cb); + return (CounterHistory)ls.get(0); + } + + // =================================================================================== + // Basic Select List + // ================= + /** + * Select list as result-bean. + * + * @param cb Condition-bean. (NotNull) + * @return Selected list-result-bean. (NotNull) + */ + public ListResultBean selectList(CounterHistoryCB cb) { + assertConditionBeanNotNull(cb); + return new ResultBeanBuilder(this).buildListResultBean(cb, delegateSelectList(cb)); + } + + /** + * Select page as result-bean. + * + * @param cb Condition-bean. (NotNull) + * @return Selected paging-result-bean. (NotNull) + */ + public PagingResultBean selectPage(final CounterHistoryCB cb) { + assertConditionBeanNotNull(cb); + return selectPage(cb, new SelectPageSimpleInvoker(this)); + } + + /** + * Select page. + * + * @param cb Condition-bean. (NotNull) + * @param invoker Select-page-invoker (NotNull) + * @return Selected paging-result-bean. (NotNull) + */ + public PagingResultBean selectPage(final CounterHistoryCB cb, SelectPageInvoker invoker) { + assertConditionBeanNotNull(cb); + final SelectPageCallback pageCallback = new SelectPageCallback() { + public PagingBean getPagingBean() { return cb; } + public int selectCountIgnoreFetchScope() { + return selectCount(cb); + } + public java.util.List selectListWithFetchScope() { + return selectList(cb); + } + }; + return invoker.invokeSelectPage(pageCallback); + } + + // =================================================================================== + // Various Select + // ============== + /** + * Select value-label list. + * + * @param cb Condition-bean. (NotNull) + * @param valueLabelSetupper Value-label-setupper. (NotNull) + * @return Value-label list. (NotNull) + */ + public java.util.List> selectValueLabelList(CounterHistoryCB cb, ValueLabelSetupper valueLabelSetupper) { + return createValueLabelList(selectList(cb), valueLabelSetupper); + } + + // =================================================================================== + // Pull Out Foreign + // ================ + + // =================================================================================== + // CBSetupper + // ========== + /** + * The interface of condition-bean setupper. + */ + public static interface CBSetupper extends ConditionBeanSetupper { + + /** + * Set up condition. + * + * @param cb Condition-bean. (NotNull) + */ + public void setup(CounterHistoryCB cb); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/bsbhv/BsCountriesBhv.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/bsbhv/BsCountriesBhv.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/bsbhv/BsCountriesBhv.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,698 @@ + +package jp.sf.pal.pompei.bsbhv; + +import jp.sf.pal.pompei.allcommon.*; +import jp.sf.pal.pompei.allcommon.bhv.load.LoadRefererOption; +import jp.sf.pal.pompei.allcommon.bhv.setup.ConditionBeanSetupper; +import jp.sf.pal.pompei.allcommon.bhv.setup.ValueLabelSetupper; +import jp.sf.pal.pompei.allcommon.cbean.ConditionBean; +import jp.sf.pal.pompei.allcommon.cbean.ListResultBean; +import jp.sf.pal.pompei.allcommon.cbean.PagingBean; +import jp.sf.pal.pompei.allcommon.cbean.PagingResultBean; +import jp.sf.pal.pompei.allcommon.dbmeta.DBMeta; + +import jp.sf.pal.pompei.exdao.*; +import jp.sf.pal.pompei.exentity.*; +import jp.sf.pal.pompei.bsentity.dbmeta.*; +import jp.sf.pal.pompei.cbean.*; + + + +/** + * The behavior of COUNTRIES. + * + *
+ * [primary-key]
+ *     COUNTRIES_ID
+ * 
+ * [column-property]
+ *     COUNTRIES_ID, COUNTRIES_NAME, COUNTRIES_ISO_CODE_2, COUNTRIES_ISO_CODE_3, ADDRESS_FORMAT_ID
+ * 
+ * [foreign-property]
+ *     
+ * 
+ * [refferer-property]
+ *     
+ * 
+ * [sequence]
+ *     
+ * 
+ * [identity]
+ *     
+ * 
+ * [update-date]
+ *     
+ * 
+ * [version-no]
+ *     
+ * 
+ * 
+ * + * @author DBFlute(AutoGenerator) + */ +public abstract class BsCountriesBhv extends jp.sf.pal.pompei.allcommon.bhv.AbstractBehaviorWritable { + + // =================================================================================== + // Attribute + // ========= + /** Dao instance. */ + protected CountriesDao _dao; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + public BsCountriesBhv() { + } + + // =================================================================================== + // Table name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + public String getTableDbName() { + return "COUNTRIES"; + } + + // =================================================================================== + // DBMeta + // ====== + /** + * This method implements the method that is declared at super. + * + * @return DBMeta. (NotNull) + */ + public DBMeta getDBMeta() { + return CountriesDbm.getInstance(); + } + + /** + * Get my dbmeta. + * + * @return DBMeta. (NotNull) + */ + public CountriesDbm getMyDBMeta() { + return CountriesDbm.getInstance(); + } + + // =================================================================================== + // Dao Accessor + // ============ + /** + * Get my dao. + * + * @return My dao. + */ + public CountriesDao getMyDao() { + return _dao; + } + + /** + * Set my dao. + * + * @param dao My dao. (NotNull) + */ + public void setMyDao(CountriesDao dao) { + assertObjectNotNull("dao", dao); + _dao = dao; + } + + /** + * This method implements the method that is declared at super. + * + * @return Dao-readable. (NotNull) + */ + public DaoReadable getDaoReadable() { + return getMyDao(); + } + + /** + * This method implements the method that is declared at super. + * + * @return Dao-writable. (NotNull) + */ + public DaoWritable getDaoWritable() { + return getMyDao(); + } + + // =================================================================================== + // New Instance + // ============ + /** + * New entity. + * + * @return Entity. (NotNull) + */ + public Entity newEntity() { + return newMyEntity(); + } + + /** + * New condition-bean. + * + * @return Condition-bean. (NotNull) + */ + public ConditionBean newConditionBean() { + return newMyConditionBean(); + } + + /** + * New my entity. + * + * @return My entity. (NotNull) + */ + public Countries newMyEntity() { + return new Countries(); + } + + /** + * New my condition-bean. + * + * @return My condition-bean. (NotNull) + */ + public CountriesCB newMyConditionBean() { + return new CountriesCB(); + } + + // =================================================================================== + // Delegate Method + // =============== + // ----------------------------------------------------- + // Select + // ------ + /** + * Get count as all. (Delegate-Method) + * + * @return All count. (NotNull) + */ + public int delegateGetCountAll() { + return getMyDao().getCountAll(); + } + + /** + * Get list as all. (Delegate-Method) + * + * @return All list. (NotNull) + */ + public java.util.List delegateGetListAll() { + return getMyDao().getListAll(); + } + + // + // Get entity. (Delegate-Method) + // + // @param Primary-keys (NotNull) + // @return Entity. (NotNull) + // + public Countries delegateGetEntity(java.math.BigDecimal countriesId) { + return getMyDao().getEntity(countriesId); + } + + /** + * Select count by condition-bean. (Delegate-Method) + * + * @param cb Condition-bean. (NotNull) + * @return Selected count. (NotNull) + */ + public int delegateSelectCount(CountriesCB cb) { + assertConditionBeanNotNull(cb); + return getMyDao().selectCount(cb); + } + + /** + * Select entity by condition-bean. (Delegate-Method) + * + * @param cb Condition-bean. (NotNull) + * @return Selected entity. If the select result is zero, it returns null. (Nullable) + */ + public Countries delegateSelectEntity(CountriesCB cb) { + assertConditionBeanNotNull(cb); + return getMyDao().selectEntity(cb); + } + + /** + * Select list by condition-bean. (Delegate-Method) + * + * @param cb Condition-bean. (NotNull) + * @return Selected list. If the select result is zero, it returns empty list. (NotNull) + */ + public java.util.List delegateSelectList(CountriesCB cb) { + assertConditionBeanNotNull(cb); + return getMyDao().selectList(cb); + } + + + // ----------------------------------------------------- + // Update + // ------ + /** + * Insert one entity. (Delegate-Method) + * + * @param entity Entity. (NotNull) + * @return Inserted count. + */ + public int delegateInsert(Countries entity) { + assertEntityNotNull(entity);// If this table use identity, the entity does not have primary-key. + filterEntityOfInsert(entity); + assertEntityOfInsert(entity); + return getMyDao().insert(entity); + } + + /** + * Update one entity. (Delegate-Method) + * {modified only} + * + * @param entity Entity. (NotNull) + * @return Updated count. + */ + public int delegateUpdate(Countries entity) { + assertEntityNotNullAndHasPrimaryKeyValue(entity); + filterEntityOfUpdate(entity); + assertEntityOfUpdate(entity); + return getMyDao().updateModifiedOnly(entity); + } + + /** + * Delete one entity. (Delegate-Method) + * + * @param entity Entity. (NotNull) + * @return Deleted count. + */ + public int delegateDelete(Countries entity) { + assertEntityNotNullAndHasPrimaryKeyValue(entity); + filterEntityOfDelete(entity); + assertEntityOfDelete(entity); + return getMyDao().delete(entity); + } + + /** + * Insert several entities. (Delegate-Method) + * + * @param entityList Entity-list. (NotNull & NotEmpty) + * @return Inserted count. + */ + public int delegateInsertList(java.util.List entityList) { + assertListNotNullAndNotEmpty(entityList); + return getMyDao().insertList(entityList); + } + + /** + * Update several entities. (Delegate-Method) + * + * @param entityList Entity-list. (NotNull & NotEmpty) + * @return Updated count. + */ + public int delegateUpdateList(java.util.List entityList) { + assertListNotNullAndNotEmpty(entityList); + return getMyDao().updateList(entityList); + } + + /** + * Delete several entities. (Delegate-Method) + * + * @param entityList Entity-list. (NotNull & NotEmpty) + * @return Deleted count. + */ + public int delegateDeleteList(java.util.List entityList) { + assertListNotNullAndNotEmpty(entityList); + return getMyDao().deleteList(entityList); + } + + // =================================================================================== + // Basic Select Count + // ================== + /** + * Select count by condition-bean. + *
+     * If the argument 'condition-bean' is effective about fetch-scope,
+     * this method invoke select count ignoring the fetch-scope.
+     * 
+ * @param cb Condition-bean. This condition-bean should not be set up about fetch-scope. (NotNull) + * @return Selected count. + */ + public int selectCount(CountriesCB cb) { + assertConditionBeanNotNull(cb); + return delegateSelectCount(cb); + } + + // =================================================================================== + // Basic Select Entity + // =================== + /** + * Select entity by condition-bean. + * + * @param cb Condition-bean. (NotNull) + * @return Selected entity. (Nullalble) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public Countries selectEntity(CountriesCB cb) { + assertConditionBeanNotNull(cb); + final java.util.List ls = selectList(cb); + if (ls.isEmpty()) { + return null; + } + assertRecordHasBeenSelectedAsOne(ls, cb); + return (Countries)ls.get(0); + } + + /** + * Select entity by condition-bean with deleted check. + * + * @param cb Condition-bean. (NotNull) + * @return Selected entity. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public Countries selectEntityWithDeletedCheck(CountriesCB cb) { + assertConditionBeanNotNull(cb); + final java.util.List ls = selectList(cb); + assertRecordHasNotBeenDeleted(ls, cb); + assertRecordHasBeenSelectedAsOne(ls, cb); + return (Countries)ls.get(0); + } + + /* + * Select entity with deleted check. {by primary-key} + * + * @param primaryKey + * @return Selected entity. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public Countries selectByPKValueWithDeletedCheck(java.math.BigDecimal countriesId) { + Countries entity = new Countries(); + entity.setCountriesId(countriesId); + final CountriesCB cb = newMyConditionBean(); + cb.acceptPrimaryKeyMapString(getDBMeta().extractPrimaryKeyMapString(entity)); + return selectEntityWithDeletedCheck(cb); + } + + // =================================================================================== + // Basic Select List + // ================= + /** + * Select list as result-bean. + * + * @param cb Condition-bean. (NotNull) + * @return Selected list-result-bean. (NotNull) + */ + public ListResultBean selectList(CountriesCB cb) { + assertConditionBeanNotNull(cb); + return new ResultBeanBuilder(this).buildListResultBean(cb, delegateSelectList(cb)); + } + + /** + * Select page as result-bean. + * + * @param cb Condition-bean. (NotNull) + * @return Selected paging-result-bean. (NotNull) + */ + public PagingResultBean selectPage(final CountriesCB cb) { + assertConditionBeanNotNull(cb); + return selectPage(cb, new SelectPageSimpleInvoker(this)); + } + + /** + * Select page. + * + * @param cb Condition-bean. (NotNull) + * @param invoker Select-page-invoker (NotNull) + * @return Selected paging-result-bean. (NotNull) + */ + public PagingResultBean selectPage(final CountriesCB cb, SelectPageInvoker invoker) { + assertConditionBeanNotNull(cb); + final SelectPageCallback pageCallback = new SelectPageCallback() { + public PagingBean getPagingBean() { return cb; } + public int selectCountIgnoreFetchScope() { + return selectCount(cb); + } + public java.util.List selectListWithFetchScope() { + return selectList(cb); + } + }; + return invoker.invokeSelectPage(pageCallback); + } + + // =================================================================================== + // Various Select + // ============== + /** + * Select value-label list. + * + * @param cb Condition-bean. (NotNull) + * @param valueLabelSetupper Value-label-setupper. (NotNull) + * @return Value-label list. (NotNull) + */ + public java.util.List> selectValueLabelList(CountriesCB cb, ValueLabelSetupper valueLabelSetupper) { + return createValueLabelList(selectList(cb), valueLabelSetupper); + } + + // =================================================================================== + // Load Referer + // ============ + + // =================================================================================== + // Pull Out Foreign + // ================ + + // =================================================================================== + // Basic Entity Update + // =================== + /** + * Insert. + * + * @param countries Entity. (NotNull) + */ + public void insert(Countries countries) { + assertEntityNotNull(countries); + delegateInsert(countries); + } + + protected void doCreate(Entity countries) { + insert((Countries)countries); + } + + /** + * Update. + *
+     * If it updates count zero, throws exception.
+     * If concurrency control of this table is valid, this update have it.
+     * 
+ * @param countries Entity. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public void update(Countries countries) { + assertEntityNotNull(countries); + final int updatedCount = delegateUpdate(countries); + if (updatedCount == 0) { + throw new jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException(countries.toString()); + } else if (updatedCount > 1) { + String msg = "updatedCount=" + updatedCount + ": " + countries.toString(); + throw new jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException(msg); + } + } + + protected void doModify(Entity countries) { + update((Countries)countries); + } + + /** + * Update after select. + * + * @param countries Entity. This must contain primary-key value at least. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + */ + public void updateAfterSelect(Countries countries) { + assertEntityNotNullAndHasPrimaryKeyValue(countries); + final CountriesCB cb = newMyConditionBean(); + cb.acceptPrimaryKeyMapString(getDBMeta().extractPrimaryKeyMapString(countries)); + final Countries currentEntity = selectEntityWithDeletedCheck(cb); + mergeEntity(countries, currentEntity); + update(currentEntity); + } + + protected void doModifyAfterSelect(Entity countries) { + updateAfterSelect((Countries)countries); + } + + /** + * Insert or update. + * {update: modified only} + * + * @param countries Entity. This should contain primary-key value at least(Except use identity). (NotNull) + */ + public void insertOrUpdate(Countries countries) { + assertEntityNotNull(countries); + if (!countries.hasPrimaryKeyValue()) { + insert(countries); + } else { + try { + update(countries); + } catch (org.seasar.dao.NotSingleRowUpdatedRuntimeException e) { + insert(countries); + } catch (jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException e) { + insert(countries); + } + } + } + + protected void doCreateOrUpdateNonstrict(Entity countries) { + + insertOrUpdate((Countries)countries); + + } + + /** + * Insert or update after select. + * {update: modified only} + * + * @param countries Entity. This should contain primary-key value at least(Except use identity). (NotNull) + */ + public void insertOrUpdateAfterSelect(Countries countries) { + assertEntityNotNull(countries); + if (!countries.hasPrimaryKeyValue()) { + insert(countries); + return; + } + Countries currentEntity = null; + try { + final CountriesCB cb = newMyConditionBean(); + cb.acceptPrimaryKeyMapString(getDBMeta().extractPrimaryKeyMapString(countries)); + currentEntity = selectEntityWithDeletedCheck(cb); + } catch (jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException e) { + insert(countries); + return; + } + assertEntityNotNullAndHasPrimaryKeyValue(countries); + mergeEntity(countries, currentEntity); + update(currentEntity); + } + + protected void doCreateOrModifyAfterSelect(Entity entity) { + insertOrUpdateAfterSelect((Countries)entity); + } + + /** + * This method implements the method that is declared at super. + * + * @param sourceEntity Source entity. (NotNull) + * @param destinationEntity Destination entity. (NotNull) + */ + protected void mergeEntity(Entity sourceEntity, Entity destinationEntity) { + assertEntityNotNull(sourceEntity); + assertEntityNotNull(destinationEntity); + final Countries sourceMyEntity = (Countries)sourceEntity; + final Countries destinationMyEntity = (Countries)destinationEntity; + destinationMyEntity.clearModifiedPropertyNames(); + final java.util.Set names = sourceMyEntity.getModifiedPropertyNames(); + + if (names.contains("countriesId")) { destinationMyEntity.setCountriesId(sourceMyEntity.getCountriesId()); } + if (names.contains("countriesName")) { destinationMyEntity.setCountriesName(sourceMyEntity.getCountriesName()); } + if (names.contains("countriesIsoCode2")) { destinationMyEntity.setCountriesIsoCode2(sourceMyEntity.getCountriesIsoCode2()); } + if (names.contains("countriesIsoCode3")) { destinationMyEntity.setCountriesIsoCode3(sourceMyEntity.getCountriesIsoCode3()); } + if (names.contains("addressFormatId")) { destinationMyEntity.setAddressFormatId(sourceMyEntity.getAddressFormatId()); } + + } + + /** + * Delete. + * + * @param countries Entity. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public void delete(Countries countries) { + assertEntityNotNull(countries); + final int deletedCount = delegateDelete(countries); + if (deletedCount == 0) { + throw new jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException(countries.toString()); + } else if (deletedCount > 1) { + String msg = "deletedCount=" + deletedCount + ": " + countries.toString(); + throw new jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException(msg); + } + } + + protected void doRemove(Entity countries) { + delete((Countries)countries); + } + + /** + * Delete after select. + * + * @param countries Entity. This must contain primary-key value at least. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + */ + public void deleteAfterSelect(Countries countries) { + assertEntityNotNullAndHasPrimaryKeyValue(countries); + final CountriesCB cb = newMyConditionBean(); + cb.acceptPrimaryKeyMapString(getDBMeta().extractPrimaryKeyMapString(countries)); + selectEntityWithDeletedCheck(cb); + delete(countries); + } + + protected void doRemoveAfterSelect(Entity countries) { + deleteAfterSelect((Countries)countries); + } + + // =================================================================================== + // Basic Batch Update + // ================== + /** + * Insert list. + * + * @param countriesList Entity-list. (NotNull & NotEmpty) + * @return Inserted count. + */ + public int insertList(java.util.List countriesList) { + assertListNotNullAndNotEmpty(countriesList); + return delegateInsertList(countriesList); + } + + /** + * Update list. + * + * @param countriesList Entity-list. (NotNull & NotEmpty) + * @return Updated count. + */ + public int updateList(java.util.List countriesList) { + assertListNotNullAndNotEmpty(countriesList); + return delegateUpdateList(countriesList); + } + + /** + * Delete list. + * + * @param countriesList Entity-list. (NotNull & NotEmpty) + * @return Deleted count. + */ + public int deleteList(java.util.List countriesList) { + assertListNotNullAndNotEmpty(countriesList); + return delegateDeleteList(countriesList); + } + + // =================================================================================== + // Various Insert + // ============== + + // =================================================================================== + // CBSetupper + // ========== + /** + * The interface of condition-bean setupper. + */ + public static interface CBSetupper extends ConditionBeanSetupper { + + /** + * Set up condition. + * + * @param cb Condition-bean. (NotNull) + */ + public void setup(CountriesCB cb); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/bsbhv/BsCurrenciesBhv.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/bsbhv/BsCurrenciesBhv.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/bsbhv/BsCurrenciesBhv.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,703 @@ + +package jp.sf.pal.pompei.bsbhv; + +import jp.sf.pal.pompei.allcommon.*; +import jp.sf.pal.pompei.allcommon.bhv.load.LoadRefererOption; +import jp.sf.pal.pompei.allcommon.bhv.setup.ConditionBeanSetupper; +import jp.sf.pal.pompei.allcommon.bhv.setup.ValueLabelSetupper; +import jp.sf.pal.pompei.allcommon.cbean.ConditionBean; +import jp.sf.pal.pompei.allcommon.cbean.ListResultBean; +import jp.sf.pal.pompei.allcommon.cbean.PagingBean; +import jp.sf.pal.pompei.allcommon.cbean.PagingResultBean; +import jp.sf.pal.pompei.allcommon.dbmeta.DBMeta; + +import jp.sf.pal.pompei.exdao.*; +import jp.sf.pal.pompei.exentity.*; +import jp.sf.pal.pompei.bsentity.dbmeta.*; +import jp.sf.pal.pompei.cbean.*; + + + +/** + * The behavior of CURRENCIES. + * + *
+ * [primary-key]
+ *     CURRENCIES_ID
+ * 
+ * [column-property]
+ *     CURRENCIES_ID, TITLE, CODE, SYMBOL_LEFT, SYMBOL_RIGHT, DECIMAL_POINT, THOUSANDS_POINT, DECIMAL_PLACES, VALUE, LAST_UPDATED
+ * 
+ * [foreign-property]
+ *     
+ * 
+ * [refferer-property]
+ *     
+ * 
+ * [sequence]
+ *     
+ * 
+ * [identity]
+ *     
+ * 
+ * [update-date]
+ *     
+ * 
+ * [version-no]
+ *     
+ * 
+ * 
+ * + * @author DBFlute(AutoGenerator) + */ +public abstract class BsCurrenciesBhv extends jp.sf.pal.pompei.allcommon.bhv.AbstractBehaviorWritable { + + // =================================================================================== + // Attribute + // ========= + /** Dao instance. */ + protected CurrenciesDao _dao; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + public BsCurrenciesBhv() { + } + + // =================================================================================== + // Table name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + public String getTableDbName() { + return "CURRENCIES"; + } + + // =================================================================================== + // DBMeta + // ====== + /** + * This method implements the method that is declared at super. + * + * @return DBMeta. (NotNull) + */ + public DBMeta getDBMeta() { + return CurrenciesDbm.getInstance(); + } + + /** + * Get my dbmeta. + * + * @return DBMeta. (NotNull) + */ + public CurrenciesDbm getMyDBMeta() { + return CurrenciesDbm.getInstance(); + } + + // =================================================================================== + // Dao Accessor + // ============ + /** + * Get my dao. + * + * @return My dao. + */ + public CurrenciesDao getMyDao() { + return _dao; + } + + /** + * Set my dao. + * + * @param dao My dao. (NotNull) + */ + public void setMyDao(CurrenciesDao dao) { + assertObjectNotNull("dao", dao); + _dao = dao; + } + + /** + * This method implements the method that is declared at super. + * + * @return Dao-readable. (NotNull) + */ + public DaoReadable getDaoReadable() { + return getMyDao(); + } + + /** + * This method implements the method that is declared at super. + * + * @return Dao-writable. (NotNull) + */ + public DaoWritable getDaoWritable() { + return getMyDao(); + } + + // =================================================================================== + // New Instance + // ============ + /** + * New entity. + * + * @return Entity. (NotNull) + */ + public Entity newEntity() { + return newMyEntity(); + } + + /** + * New condition-bean. + * + * @return Condition-bean. (NotNull) + */ + public ConditionBean newConditionBean() { + return newMyConditionBean(); + } + + /** + * New my entity. + * + * @return My entity. (NotNull) + */ + public Currencies newMyEntity() { + return new Currencies(); + } + + /** + * New my condition-bean. + * + * @return My condition-bean. (NotNull) + */ + public CurrenciesCB newMyConditionBean() { + return new CurrenciesCB(); + } + + // =================================================================================== + // Delegate Method + // =============== + // ----------------------------------------------------- + // Select + // ------ + /** + * Get count as all. (Delegate-Method) + * + * @return All count. (NotNull) + */ + public int delegateGetCountAll() { + return getMyDao().getCountAll(); + } + + /** + * Get list as all. (Delegate-Method) + * + * @return All list. (NotNull) + */ + public java.util.List delegateGetListAll() { + return getMyDao().getListAll(); + } + + // + // Get entity. (Delegate-Method) + // + // @param Primary-keys (NotNull) + // @return Entity. (NotNull) + // + public Currencies delegateGetEntity(java.math.BigDecimal currenciesId) { + return getMyDao().getEntity(currenciesId); + } + + /** + * Select count by condition-bean. (Delegate-Method) + * + * @param cb Condition-bean. (NotNull) + * @return Selected count. (NotNull) + */ + public int delegateSelectCount(CurrenciesCB cb) { + assertConditionBeanNotNull(cb); + return getMyDao().selectCount(cb); + } + + /** + * Select entity by condition-bean. (Delegate-Method) + * + * @param cb Condition-bean. (NotNull) + * @return Selected entity. If the select result is zero, it returns null. (Nullable) + */ + public Currencies delegateSelectEntity(CurrenciesCB cb) { + assertConditionBeanNotNull(cb); + return getMyDao().selectEntity(cb); + } + + /** + * Select list by condition-bean. (Delegate-Method) + * + * @param cb Condition-bean. (NotNull) + * @return Selected list. If the select result is zero, it returns empty list. (NotNull) + */ + public java.util.List delegateSelectList(CurrenciesCB cb) { + assertConditionBeanNotNull(cb); + return getMyDao().selectList(cb); + } + + + // ----------------------------------------------------- + // Update + // ------ + /** + * Insert one entity. (Delegate-Method) + * + * @param entity Entity. (NotNull) + * @return Inserted count. + */ + public int delegateInsert(Currencies entity) { + assertEntityNotNull(entity);// If this table use identity, the entity does not have primary-key. + filterEntityOfInsert(entity); + assertEntityOfInsert(entity); + return getMyDao().insert(entity); + } + + /** + * Update one entity. (Delegate-Method) + * {modified only} + * + * @param entity Entity. (NotNull) + * @return Updated count. + */ + public int delegateUpdate(Currencies entity) { + assertEntityNotNullAndHasPrimaryKeyValue(entity); + filterEntityOfUpdate(entity); + assertEntityOfUpdate(entity); + return getMyDao().updateModifiedOnly(entity); + } + + /** + * Delete one entity. (Delegate-Method) + * + * @param entity Entity. (NotNull) + * @return Deleted count. + */ + public int delegateDelete(Currencies entity) { + assertEntityNotNullAndHasPrimaryKeyValue(entity); + filterEntityOfDelete(entity); + assertEntityOfDelete(entity); + return getMyDao().delete(entity); + } + + /** + * Insert several entities. (Delegate-Method) + * + * @param entityList Entity-list. (NotNull & NotEmpty) + * @return Inserted count. + */ + public int delegateInsertList(java.util.List entityList) { + assertListNotNullAndNotEmpty(entityList); + return getMyDao().insertList(entityList); + } + + /** + * Update several entities. (Delegate-Method) + * + * @param entityList Entity-list. (NotNull & NotEmpty) + * @return Updated count. + */ + public int delegateUpdateList(java.util.List entityList) { + assertListNotNullAndNotEmpty(entityList); + return getMyDao().updateList(entityList); + } + + /** + * Delete several entities. (Delegate-Method) + * + * @param entityList Entity-list. (NotNull & NotEmpty) + * @return Deleted count. + */ + public int delegateDeleteList(java.util.List entityList) { + assertListNotNullAndNotEmpty(entityList); + return getMyDao().deleteList(entityList); + } + + // =================================================================================== + // Basic Select Count + // ================== + /** + * Select count by condition-bean. + *
+     * If the argument 'condition-bean' is effective about fetch-scope,
+     * this method invoke select count ignoring the fetch-scope.
+     * 
+ * @param cb Condition-bean. This condition-bean should not be set up about fetch-scope. (NotNull) + * @return Selected count. + */ + public int selectCount(CurrenciesCB cb) { + assertConditionBeanNotNull(cb); + return delegateSelectCount(cb); + } + + // =================================================================================== + // Basic Select Entity + // =================== + /** + * Select entity by condition-bean. + * + * @param cb Condition-bean. (NotNull) + * @return Selected entity. (Nullalble) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public Currencies selectEntity(CurrenciesCB cb) { + assertConditionBeanNotNull(cb); + final java.util.List ls = selectList(cb); + if (ls.isEmpty()) { + return null; + } + assertRecordHasBeenSelectedAsOne(ls, cb); + return (Currencies)ls.get(0); + } + + /** + * Select entity by condition-bean with deleted check. + * + * @param cb Condition-bean. (NotNull) + * @return Selected entity. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public Currencies selectEntityWithDeletedCheck(CurrenciesCB cb) { + assertConditionBeanNotNull(cb); + final java.util.List ls = selectList(cb); + assertRecordHasNotBeenDeleted(ls, cb); + assertRecordHasBeenSelectedAsOne(ls, cb); + return (Currencies)ls.get(0); + } + + /* + * Select entity with deleted check. {by primary-key} + * + * @param primaryKey + * @return Selected entity. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public Currencies selectByPKValueWithDeletedCheck(java.math.BigDecimal currenciesId) { + Currencies entity = new Currencies(); + entity.setCurrenciesId(currenciesId); + final CurrenciesCB cb = newMyConditionBean(); + cb.acceptPrimaryKeyMapString(getDBMeta().extractPrimaryKeyMapString(entity)); + return selectEntityWithDeletedCheck(cb); + } + + // =================================================================================== + // Basic Select List + // ================= + /** + * Select list as result-bean. + * + * @param cb Condition-bean. (NotNull) + * @return Selected list-result-bean. (NotNull) + */ + public ListResultBean selectList(CurrenciesCB cb) { + assertConditionBeanNotNull(cb); + return new ResultBeanBuilder(this).buildListResultBean(cb, delegateSelectList(cb)); + } + + /** + * Select page as result-bean. + * + * @param cb Condition-bean. (NotNull) + * @return Selected paging-result-bean. (NotNull) + */ + public PagingResultBean selectPage(final CurrenciesCB cb) { + assertConditionBeanNotNull(cb); + return selectPage(cb, new SelectPageSimpleInvoker(this)); + } + + /** + * Select page. + * + * @param cb Condition-bean. (NotNull) + * @param invoker Select-page-invoker (NotNull) + * @return Selected paging-result-bean. (NotNull) + */ + public PagingResultBean selectPage(final CurrenciesCB cb, SelectPageInvoker invoker) { + assertConditionBeanNotNull(cb); + final SelectPageCallback pageCallback = new SelectPageCallback() { + public PagingBean getPagingBean() { return cb; } + public int selectCountIgnoreFetchScope() { + return selectCount(cb); + } + public java.util.List selectListWithFetchScope() { + return selectList(cb); + } + }; + return invoker.invokeSelectPage(pageCallback); + } + + // =================================================================================== + // Various Select + // ============== + /** + * Select value-label list. + * + * @param cb Condition-bean. (NotNull) + * @param valueLabelSetupper Value-label-setupper. (NotNull) + * @return Value-label list. (NotNull) + */ + public java.util.List> selectValueLabelList(CurrenciesCB cb, ValueLabelSetupper valueLabelSetupper) { + return createValueLabelList(selectList(cb), valueLabelSetupper); + } + + // =================================================================================== + // Load Referer + // ============ + + // =================================================================================== + // Pull Out Foreign + // ================ + + // =================================================================================== + // Basic Entity Update + // =================== + /** + * Insert. + * + * @param currencies Entity. (NotNull) + */ + public void insert(Currencies currencies) { + assertEntityNotNull(currencies); + delegateInsert(currencies); + } + + protected void doCreate(Entity currencies) { + insert((Currencies)currencies); + } + + /** + * Update. + *
+     * If it updates count zero, throws exception.
+     * If concurrency control of this table is valid, this update have it.
+     * 
+ * @param currencies Entity. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public void update(Currencies currencies) { + assertEntityNotNull(currencies); + final int updatedCount = delegateUpdate(currencies); + if (updatedCount == 0) { + throw new jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException(currencies.toString()); + } else if (updatedCount > 1) { + String msg = "updatedCount=" + updatedCount + ": " + currencies.toString(); + throw new jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException(msg); + } + } + + protected void doModify(Entity currencies) { + update((Currencies)currencies); + } + + /** + * Update after select. + * + * @param currencies Entity. This must contain primary-key value at least. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + */ + public void updateAfterSelect(Currencies currencies) { + assertEntityNotNullAndHasPrimaryKeyValue(currencies); + final CurrenciesCB cb = newMyConditionBean(); + cb.acceptPrimaryKeyMapString(getDBMeta().extractPrimaryKeyMapString(currencies)); + final Currencies currentEntity = selectEntityWithDeletedCheck(cb); + mergeEntity(currencies, currentEntity); + update(currentEntity); + } + + protected void doModifyAfterSelect(Entity currencies) { + updateAfterSelect((Currencies)currencies); + } + + /** + * Insert or update. + * {update: modified only} + * + * @param currencies Entity. This should contain primary-key value at least(Except use identity). (NotNull) + */ + public void insertOrUpdate(Currencies currencies) { + assertEntityNotNull(currencies); + if (!currencies.hasPrimaryKeyValue()) { + insert(currencies); + } else { + try { + update(currencies); + } catch (org.seasar.dao.NotSingleRowUpdatedRuntimeException e) { + insert(currencies); + } catch (jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException e) { + insert(currencies); + } + } + } + + protected void doCreateOrUpdateNonstrict(Entity currencies) { + + insertOrUpdate((Currencies)currencies); + + } + + /** + * Insert or update after select. + * {update: modified only} + * + * @param currencies Entity. This should contain primary-key value at least(Except use identity). (NotNull) + */ + public void insertOrUpdateAfterSelect(Currencies currencies) { + assertEntityNotNull(currencies); + if (!currencies.hasPrimaryKeyValue()) { + insert(currencies); + return; + } + Currencies currentEntity = null; + try { + final CurrenciesCB cb = newMyConditionBean(); + cb.acceptPrimaryKeyMapString(getDBMeta().extractPrimaryKeyMapString(currencies)); + currentEntity = selectEntityWithDeletedCheck(cb); + } catch (jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException e) { + insert(currencies); + return; + } + assertEntityNotNullAndHasPrimaryKeyValue(currencies); + mergeEntity(currencies, currentEntity); + update(currentEntity); + } + + protected void doCreateOrModifyAfterSelect(Entity entity) { + insertOrUpdateAfterSelect((Currencies)entity); + } + + /** + * This method implements the method that is declared at super. + * + * @param sourceEntity Source entity. (NotNull) + * @param destinationEntity Destination entity. (NotNull) + */ + protected void mergeEntity(Entity sourceEntity, Entity destinationEntity) { + assertEntityNotNull(sourceEntity); + assertEntityNotNull(destinationEntity); + final Currencies sourceMyEntity = (Currencies)sourceEntity; + final Currencies destinationMyEntity = (Currencies)destinationEntity; + destinationMyEntity.clearModifiedPropertyNames(); + final java.util.Set names = sourceMyEntity.getModifiedPropertyNames(); + + if (names.contains("currenciesId")) { destinationMyEntity.setCurrenciesId(sourceMyEntity.getCurrenciesId()); } + if (names.contains("title")) { destinationMyEntity.setTitle(sourceMyEntity.getTitle()); } + if (names.contains("code")) { destinationMyEntity.setCode(sourceMyEntity.getCode()); } + if (names.contains("symbolLeft")) { destinationMyEntity.setSymbolLeft(sourceMyEntity.getSymbolLeft()); } + if (names.contains("symbolRight")) { destinationMyEntity.setSymbolRight(sourceMyEntity.getSymbolRight()); } + if (names.contains("decimalPoint")) { destinationMyEntity.setDecimalPoint(sourceMyEntity.getDecimalPoint()); } + if (names.contains("thousandsPoint")) { destinationMyEntity.setThousandsPoint(sourceMyEntity.getThousandsPoint()); } + if (names.contains("decimalPlaces")) { destinationMyEntity.setDecimalPlaces(sourceMyEntity.getDecimalPlaces()); } + if (names.contains("value")) { destinationMyEntity.setValue(sourceMyEntity.getValue()); } + if (names.contains("lastUpdated")) { destinationMyEntity.setLastUpdated(sourceMyEntity.getLastUpdated()); } + + } + + /** + * Delete. + * + * @param currencies Entity. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public void delete(Currencies currencies) { + assertEntityNotNull(currencies); + final int deletedCount = delegateDelete(currencies); + if (deletedCount == 0) { + throw new jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException(currencies.toString()); + } else if (deletedCount > 1) { + String msg = "deletedCount=" + deletedCount + ": " + currencies.toString(); + throw new jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException(msg); + } + } + + protected void doRemove(Entity currencies) { + delete((Currencies)currencies); + } + + /** + * Delete after select. + * + * @param currencies Entity. This must contain primary-key value at least. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + */ + public void deleteAfterSelect(Currencies currencies) { + assertEntityNotNullAndHasPrimaryKeyValue(currencies); + final CurrenciesCB cb = newMyConditionBean(); + cb.acceptPrimaryKeyMapString(getDBMeta().extractPrimaryKeyMapString(currencies)); + selectEntityWithDeletedCheck(cb); + delete(currencies); + } + + protected void doRemoveAfterSelect(Entity currencies) { + deleteAfterSelect((Currencies)currencies); + } + + // =================================================================================== + // Basic Batch Update + // ================== + /** + * Insert list. + * + * @param currenciesList Entity-list. (NotNull & NotEmpty) + * @return Inserted count. + */ + public int insertList(java.util.List currenciesList) { + assertListNotNullAndNotEmpty(currenciesList); + return delegateInsertList(currenciesList); + } + + /** + * Update list. + * + * @param currenciesList Entity-list. (NotNull & NotEmpty) + * @return Updated count. + */ + public int updateList(java.util.List currenciesList) { + assertListNotNullAndNotEmpty(currenciesList); + return delegateUpdateList(currenciesList); + } + + /** + * Delete list. + * + * @param currenciesList Entity-list. (NotNull & NotEmpty) + * @return Deleted count. + */ + public int deleteList(java.util.List currenciesList) { + assertListNotNullAndNotEmpty(currenciesList); + return delegateDeleteList(currenciesList); + } + + // =================================================================================== + // Various Insert + // ============== + + // =================================================================================== + // CBSetupper + // ========== + /** + * The interface of condition-bean setupper. + */ + public static interface CBSetupper extends ConditionBeanSetupper { + + /** + * Set up condition. + * + * @param cb Condition-bean. (NotNull) + */ + public void setup(CurrenciesCB cb); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/bsbhv/BsCustomersBasketAttributesBhv.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/bsbhv/BsCustomersBasketAttributesBhv.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/bsbhv/BsCustomersBasketAttributesBhv.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,698 @@ + +package jp.sf.pal.pompei.bsbhv; + +import jp.sf.pal.pompei.allcommon.*; +import jp.sf.pal.pompei.allcommon.bhv.load.LoadRefererOption; +import jp.sf.pal.pompei.allcommon.bhv.setup.ConditionBeanSetupper; +import jp.sf.pal.pompei.allcommon.bhv.setup.ValueLabelSetupper; +import jp.sf.pal.pompei.allcommon.cbean.ConditionBean; +import jp.sf.pal.pompei.allcommon.cbean.ListResultBean; +import jp.sf.pal.pompei.allcommon.cbean.PagingBean; +import jp.sf.pal.pompei.allcommon.cbean.PagingResultBean; +import jp.sf.pal.pompei.allcommon.dbmeta.DBMeta; + +import jp.sf.pal.pompei.exdao.*; +import jp.sf.pal.pompei.exentity.*; +import jp.sf.pal.pompei.bsentity.dbmeta.*; +import jp.sf.pal.pompei.cbean.*; + + + +/** + * The behavior of CUSTOMERS_BASKET_ATTRIBUTES. + * + *
+ * [primary-key]
+ *     CUSTOMERS_BASKET_ATTRIBUTES_ID
+ * 
+ * [column-property]
+ *     CUSTOMERS_BASKET_ATTRIBUTES_ID, CUSTOMERS_ID, PRODUCTS_ID, PRODUCTS_OPTIONS_ID, PRODUCTS_OPTIONS_VALUE_ID
+ * 
+ * [foreign-property]
+ *     
+ * 
+ * [refferer-property]
+ *     
+ * 
+ * [sequence]
+ *     
+ * 
+ * [identity]
+ *     
+ * 
+ * [update-date]
+ *     
+ * 
+ * [version-no]
+ *     
+ * 
+ * 
+ * + * @author DBFlute(AutoGenerator) + */ +public abstract class BsCustomersBasketAttributesBhv extends jp.sf.pal.pompei.allcommon.bhv.AbstractBehaviorWritable { + + // =================================================================================== + // Attribute + // ========= + /** Dao instance. */ + protected CustomersBasketAttributesDao _dao; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + public BsCustomersBasketAttributesBhv() { + } + + // =================================================================================== + // Table name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + public String getTableDbName() { + return "CUSTOMERS_BASKET_ATTRIBUTES"; + } + + // =================================================================================== + // DBMeta + // ====== + /** + * This method implements the method that is declared at super. + * + * @return DBMeta. (NotNull) + */ + public DBMeta getDBMeta() { + return CustomersBasketAttributesDbm.getInstance(); + } + + /** + * Get my dbmeta. + * + * @return DBMeta. (NotNull) + */ + public CustomersBasketAttributesDbm getMyDBMeta() { + return CustomersBasketAttributesDbm.getInstance(); + } + + // =================================================================================== + // Dao Accessor + // ============ + /** + * Get my dao. + * + * @return My dao. + */ + public CustomersBasketAttributesDao getMyDao() { + return _dao; + } + + /** + * Set my dao. + * + * @param dao My dao. (NotNull) + */ + public void setMyDao(CustomersBasketAttributesDao dao) { + assertObjectNotNull("dao", dao); + _dao = dao; + } + + /** + * This method implements the method that is declared at super. + * + * @return Dao-readable. (NotNull) + */ + public DaoReadable getDaoReadable() { + return getMyDao(); + } + + /** + * This method implements the method that is declared at super. + * + * @return Dao-writable. (NotNull) + */ + public DaoWritable getDaoWritable() { + return getMyDao(); + } + + // =================================================================================== + // New Instance + // ============ + /** + * New entity. + * + * @return Entity. (NotNull) + */ + public Entity newEntity() { + return newMyEntity(); + } + + /** + * New condition-bean. + * + * @return Condition-bean. (NotNull) + */ + public ConditionBean newConditionBean() { + return newMyConditionBean(); + } + + /** + * New my entity. + * + * @return My entity. (NotNull) + */ + public CustomersBasketAttributes newMyEntity() { + return new CustomersBasketAttributes(); + } + + /** + * New my condition-bean. + * + * @return My condition-bean. (NotNull) + */ + public CustomersBasketAttributesCB newMyConditionBean() { + return new CustomersBasketAttributesCB(); + } + + // =================================================================================== + // Delegate Method + // =============== + // ----------------------------------------------------- + // Select + // ------ + /** + * Get count as all. (Delegate-Method) + * + * @return All count. (NotNull) + */ + public int delegateGetCountAll() { + return getMyDao().getCountAll(); + } + + /** + * Get list as all. (Delegate-Method) + * + * @return All list. (NotNull) + */ + public java.util.List delegateGetListAll() { + return getMyDao().getListAll(); + } + + // + // Get entity. (Delegate-Method) + // + // @param Primary-keys (NotNull) + // @return Entity. (NotNull) + // + public CustomersBasketAttributes delegateGetEntity(java.math.BigDecimal customersBasketAttributesId) { + return getMyDao().getEntity(customersBasketAttributesId); + } + + /** + * Select count by condition-bean. (Delegate-Method) + * + * @param cb Condition-bean. (NotNull) + * @return Selected count. (NotNull) + */ + public int delegateSelectCount(CustomersBasketAttributesCB cb) { + assertConditionBeanNotNull(cb); + return getMyDao().selectCount(cb); + } + + /** + * Select entity by condition-bean. (Delegate-Method) + * + * @param cb Condition-bean. (NotNull) + * @return Selected entity. If the select result is zero, it returns null. (Nullable) + */ + public CustomersBasketAttributes delegateSelectEntity(CustomersBasketAttributesCB cb) { + assertConditionBeanNotNull(cb); + return getMyDao().selectEntity(cb); + } + + /** + * Select list by condition-bean. (Delegate-Method) + * + * @param cb Condition-bean. (NotNull) + * @return Selected list. If the select result is zero, it returns empty list. (NotNull) + */ + public java.util.List delegateSelectList(CustomersBasketAttributesCB cb) { + assertConditionBeanNotNull(cb); + return getMyDao().selectList(cb); + } + + + // ----------------------------------------------------- + // Update + // ------ + /** + * Insert one entity. (Delegate-Method) + * + * @param entity Entity. (NotNull) + * @return Inserted count. + */ + public int delegateInsert(CustomersBasketAttributes entity) { + assertEntityNotNull(entity);// If this table use identity, the entity does not have primary-key. + filterEntityOfInsert(entity); + assertEntityOfInsert(entity); + return getMyDao().insert(entity); + } + + /** + * Update one entity. (Delegate-Method) + * {modified only} + * + * @param entity Entity. (NotNull) + * @return Updated count. + */ + public int delegateUpdate(CustomersBasketAttributes entity) { + assertEntityNotNullAndHasPrimaryKeyValue(entity); + filterEntityOfUpdate(entity); + assertEntityOfUpdate(entity); + return getMyDao().updateModifiedOnly(entity); + } + + /** + * Delete one entity. (Delegate-Method) + * + * @param entity Entity. (NotNull) + * @return Deleted count. + */ + public int delegateDelete(CustomersBasketAttributes entity) { + assertEntityNotNullAndHasPrimaryKeyValue(entity); + filterEntityOfDelete(entity); + assertEntityOfDelete(entity); + return getMyDao().delete(entity); + } + + /** + * Insert several entities. (Delegate-Method) + * + * @param entityList Entity-list. (NotNull & NotEmpty) + * @return Inserted count. + */ + public int delegateInsertList(java.util.List entityList) { + assertListNotNullAndNotEmpty(entityList); + return getMyDao().insertList(entityList); + } + + /** + * Update several entities. (Delegate-Method) + * + * @param entityList Entity-list. (NotNull & NotEmpty) + * @return Updated count. + */ + public int delegateUpdateList(java.util.List entityList) { + assertListNotNullAndNotEmpty(entityList); + return getMyDao().updateList(entityList); + } + + /** + * Delete several entities. (Delegate-Method) + * + * @param entityList Entity-list. (NotNull & NotEmpty) + * @return Deleted count. + */ + public int delegateDeleteList(java.util.List entityList) { + assertListNotNullAndNotEmpty(entityList); + return getMyDao().deleteList(entityList); + } + + // =================================================================================== + // Basic Select Count + // ================== + /** + * Select count by condition-bean. + *
+     * If the argument 'condition-bean' is effective about fetch-scope,
+     * this method invoke select count ignoring the fetch-scope.
+     * 
+ * @param cb Condition-bean. This condition-bean should not be set up about fetch-scope. (NotNull) + * @return Selected count. + */ + public int selectCount(CustomersBasketAttributesCB cb) { + assertConditionBeanNotNull(cb); + return delegateSelectCount(cb); + } + + // =================================================================================== + // Basic Select Entity + // =================== + /** + * Select entity by condition-bean. + * + * @param cb Condition-bean. (NotNull) + * @return Selected entity. (Nullalble) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public CustomersBasketAttributes selectEntity(CustomersBasketAttributesCB cb) { + assertConditionBeanNotNull(cb); + final java.util.List ls = selectList(cb); + if (ls.isEmpty()) { + return null; + } + assertRecordHasBeenSelectedAsOne(ls, cb); + return (CustomersBasketAttributes)ls.get(0); + } + + /** + * Select entity by condition-bean with deleted check. + * + * @param cb Condition-bean. (NotNull) + * @return Selected entity. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public CustomersBasketAttributes selectEntityWithDeletedCheck(CustomersBasketAttributesCB cb) { + assertConditionBeanNotNull(cb); + final java.util.List ls = selectList(cb); + assertRecordHasNotBeenDeleted(ls, cb); + assertRecordHasBeenSelectedAsOne(ls, cb); + return (CustomersBasketAttributes)ls.get(0); + } + + /* + * Select entity with deleted check. {by primary-key} + * + * @param primaryKey + * @return Selected entity. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public CustomersBasketAttributes selectByPKValueWithDeletedCheck(java.math.BigDecimal customersBasketAttributesId) { + CustomersBasketAttributes entity = new CustomersBasketAttributes(); + entity.setCustomersBasketAttributesId(customersBasketAttributesId); + final CustomersBasketAttributesCB cb = newMyConditionBean(); + cb.acceptPrimaryKeyMapString(getDBMeta().extractPrimaryKeyMapString(entity)); + return selectEntityWithDeletedCheck(cb); + } + + // =================================================================================== + // Basic Select List + // ================= + /** + * Select list as result-bean. + * + * @param cb Condition-bean. (NotNull) + * @return Selected list-result-bean. (NotNull) + */ + public ListResultBean selectList(CustomersBasketAttributesCB cb) { + assertConditionBeanNotNull(cb); + return new ResultBeanBuilder(this).buildListResultBean(cb, delegateSelectList(cb)); + } + + /** + * Select page as result-bean. + * + * @param cb Condition-bean. (NotNull) + * @return Selected paging-result-bean. (NotNull) + */ + public PagingResultBean selectPage(final CustomersBasketAttributesCB cb) { + assertConditionBeanNotNull(cb); + return selectPage(cb, new SelectPageSimpleInvoker(this)); + } + + /** + * Select page. + * + * @param cb Condition-bean. (NotNull) + * @param invoker Select-page-invoker (NotNull) + * @return Selected paging-result-bean. (NotNull) + */ + public PagingResultBean selectPage(final CustomersBasketAttributesCB cb, SelectPageInvoker invoker) { + assertConditionBeanNotNull(cb); + final SelectPageCallback pageCallback = new SelectPageCallback() { + public PagingBean getPagingBean() { return cb; } + public int selectCountIgnoreFetchScope() { + return selectCount(cb); + } + public java.util.List selectListWithFetchScope() { + return selectList(cb); + } + }; + return invoker.invokeSelectPage(pageCallback); + } + + // =================================================================================== + // Various Select + // ============== + /** + * Select value-label list. + * + * @param cb Condition-bean. (NotNull) + * @param valueLabelSetupper Value-label-setupper. (NotNull) + * @return Value-label list. (NotNull) + */ + public java.util.List> selectValueLabelList(CustomersBasketAttributesCB cb, ValueLabelSetupper valueLabelSetupper) { + return createValueLabelList(selectList(cb), valueLabelSetupper); + } + + // =================================================================================== + // Load Referer + // ============ + + // =================================================================================== + // Pull Out Foreign + // ================ + + // =================================================================================== + // Basic Entity Update + // =================== + /** + * Insert. + * + * @param customersBasketAttributes Entity. (NotNull) + */ + public void insert(CustomersBasketAttributes customersBasketAttributes) { + assertEntityNotNull(customersBasketAttributes); + delegateInsert(customersBasketAttributes); + } + + protected void doCreate(Entity customersBasketAttributes) { + insert((CustomersBasketAttributes)customersBasketAttributes); + } + + /** + * Update. + *
+     * If it updates count zero, throws exception.
+     * If concurrency control of this table is valid, this update have it.
+     * 
+ * @param customersBasketAttributes Entity. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public void update(CustomersBasketAttributes customersBasketAttributes) { + assertEntityNotNull(customersBasketAttributes); + final int updatedCount = delegateUpdate(customersBasketAttributes); + if (updatedCount == 0) { + throw new jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException(customersBasketAttributes.toString()); + } else if (updatedCount > 1) { + String msg = "updatedCount=" + updatedCount + ": " + customersBasketAttributes.toString(); + throw new jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException(msg); + } + } + + protected void doModify(Entity customersBasketAttributes) { + update((CustomersBasketAttributes)customersBasketAttributes); + } + + /** + * Update after select. + * + * @param customersBasketAttributes Entity. This must contain primary-key value at least. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + */ + public void updateAfterSelect(CustomersBasketAttributes customersBasketAttributes) { + assertEntityNotNullAndHasPrimaryKeyValue(customersBasketAttributes); + final CustomersBasketAttributesCB cb = newMyConditionBean(); + cb.acceptPrimaryKeyMapString(getDBMeta().extractPrimaryKeyMapString(customersBasketAttributes)); + final CustomersBasketAttributes currentEntity = selectEntityWithDeletedCheck(cb); + mergeEntity(customersBasketAttributes, currentEntity); + update(currentEntity); + } + + protected void doModifyAfterSelect(Entity customersBasketAttributes) { + updateAfterSelect((CustomersBasketAttributes)customersBasketAttributes); + } + + /** + * Insert or update. + * {update: modified only} + * + * @param customersBasketAttributes Entity. This should contain primary-key value at least(Except use identity). (NotNull) + */ + public void insertOrUpdate(CustomersBasketAttributes customersBasketAttributes) { + assertEntityNotNull(customersBasketAttributes); + if (!customersBasketAttributes.hasPrimaryKeyValue()) { + insert(customersBasketAttributes); + } else { + try { + update(customersBasketAttributes); + } catch (org.seasar.dao.NotSingleRowUpdatedRuntimeException e) { + insert(customersBasketAttributes); + } catch (jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException e) { + insert(customersBasketAttributes); + } + } + } + + protected void doCreateOrUpdateNonstrict(Entity customersBasketAttributes) { + + insertOrUpdate((CustomersBasketAttributes)customersBasketAttributes); + + } + + /** + * Insert or update after select. + * {update: modified only} + * + * @param customersBasketAttributes Entity. This should contain primary-key value at least(Except use identity). (NotNull) + */ + public void insertOrUpdateAfterSelect(CustomersBasketAttributes customersBasketAttributes) { + assertEntityNotNull(customersBasketAttributes); + if (!customersBasketAttributes.hasPrimaryKeyValue()) { + insert(customersBasketAttributes); + return; + } + CustomersBasketAttributes currentEntity = null; + try { + final CustomersBasketAttributesCB cb = newMyConditionBean(); + cb.acceptPrimaryKeyMapString(getDBMeta().extractPrimaryKeyMapString(customersBasketAttributes)); + currentEntity = selectEntityWithDeletedCheck(cb); + } catch (jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException e) { + insert(customersBasketAttributes); + return; + } + assertEntityNotNullAndHasPrimaryKeyValue(customersBasketAttributes); + mergeEntity(customersBasketAttributes, currentEntity); + update(currentEntity); + } + + protected void doCreateOrModifyAfterSelect(Entity entity) { + insertOrUpdateAfterSelect((CustomersBasketAttributes)entity); + } + + /** + * This method implements the method that is declared at super. + * + * @param sourceEntity Source entity. (NotNull) + * @param destinationEntity Destination entity. (NotNull) + */ + protected void mergeEntity(Entity sourceEntity, Entity destinationEntity) { + assertEntityNotNull(sourceEntity); + assertEntityNotNull(destinationEntity); + final CustomersBasketAttributes sourceMyEntity = (CustomersBasketAttributes)sourceEntity; + final CustomersBasketAttributes destinationMyEntity = (CustomersBasketAttributes)destinationEntity; + destinationMyEntity.clearModifiedPropertyNames(); + final java.util.Set names = sourceMyEntity.getModifiedPropertyNames(); + + if (names.contains("customersBasketAttributesId")) { destinationMyEntity.setCustomersBasketAttributesId(sourceMyEntity.getCustomersBasketAttributesId()); } + if (names.contains("customersId")) { destinationMyEntity.setCustomersId(sourceMyEntity.getCustomersId()); } + if (names.contains("productsId")) { destinationMyEntity.setProductsId(sourceMyEntity.getProductsId()); } + if (names.contains("productsOptionsId")) { destinationMyEntity.setProductsOptionsId(sourceMyEntity.getProductsOptionsId()); } + if (names.contains("productsOptionsValueId")) { destinationMyEntity.setProductsOptionsValueId(sourceMyEntity.getProductsOptionsValueId()); } + + } + + /** + * Delete. + * + * @param customersBasketAttributes Entity. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public void delete(CustomersBasketAttributes customersBasketAttributes) { + assertEntityNotNull(customersBasketAttributes); + final int deletedCount = delegateDelete(customersBasketAttributes); + if (deletedCount == 0) { + throw new jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException(customersBasketAttributes.toString()); + } else if (deletedCount > 1) { + String msg = "deletedCount=" + deletedCount + ": " + customersBasketAttributes.toString(); + throw new jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException(msg); + } + } + + protected void doRemove(Entity customersBasketAttributes) { + delete((CustomersBasketAttributes)customersBasketAttributes); + } + + /** + * Delete after select. + * + * @param customersBasketAttributes Entity. This must contain primary-key value at least. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + */ + public void deleteAfterSelect(CustomersBasketAttributes customersBasketAttributes) { + assertEntityNotNullAndHasPrimaryKeyValue(customersBasketAttributes); + final CustomersBasketAttributesCB cb = newMyConditionBean(); + cb.acceptPrimaryKeyMapString(getDBMeta().extractPrimaryKeyMapString(customersBasketAttributes)); + selectEntityWithDeletedCheck(cb); + delete(customersBasketAttributes); + } + + protected void doRemoveAfterSelect(Entity customersBasketAttributes) { + deleteAfterSelect((CustomersBasketAttributes)customersBasketAttributes); + } + + // =================================================================================== + // Basic Batch Update + // ================== + /** + * Insert list. + * + * @param customersBasketAttributesList Entity-list. (NotNull & NotEmpty) + * @return Inserted count. + */ + public int insertList(java.util.List customersBasketAttributesList) { + assertListNotNullAndNotEmpty(customersBasketAttributesList); + return delegateInsertList(customersBasketAttributesList); + } + + /** + * Update list. + * + * @param customersBasketAttributesList Entity-list. (NotNull & NotEmpty) + * @return Updated count. + */ + public int updateList(java.util.List customersBasketAttributesList) { + assertListNotNullAndNotEmpty(customersBasketAttributesList); + return delegateUpdateList(customersBasketAttributesList); + } + + /** + * Delete list. + * + * @param customersBasketAttributesList Entity-list. (NotNull & NotEmpty) + * @return Deleted count. + */ + public int deleteList(java.util.List customersBasketAttributesList) { + assertListNotNullAndNotEmpty(customersBasketAttributesList); + return delegateDeleteList(customersBasketAttributesList); + } + + // =================================================================================== + // Various Insert + // ============== + + // =================================================================================== + // CBSetupper + // ========== + /** + * The interface of condition-bean setupper. + */ + public static interface CBSetupper extends ConditionBeanSetupper { + + /** + * Set up condition. + * + * @param cb Condition-bean. (NotNull) + */ + public void setup(CustomersBasketAttributesCB cb); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/bsbhv/BsCustomersBasketBhv.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/bsbhv/BsCustomersBasketBhv.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/bsbhv/BsCustomersBasketBhv.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,699 @@ + +package jp.sf.pal.pompei.bsbhv; + +import jp.sf.pal.pompei.allcommon.*; +import jp.sf.pal.pompei.allcommon.bhv.load.LoadRefererOption; +import jp.sf.pal.pompei.allcommon.bhv.setup.ConditionBeanSetupper; +import jp.sf.pal.pompei.allcommon.bhv.setup.ValueLabelSetupper; +import jp.sf.pal.pompei.allcommon.cbean.ConditionBean; +import jp.sf.pal.pompei.allcommon.cbean.ListResultBean; +import jp.sf.pal.pompei.allcommon.cbean.PagingBean; +import jp.sf.pal.pompei.allcommon.cbean.PagingResultBean; +import jp.sf.pal.pompei.allcommon.dbmeta.DBMeta; + +import jp.sf.pal.pompei.exdao.*; +import jp.sf.pal.pompei.exentity.*; +import jp.sf.pal.pompei.bsentity.dbmeta.*; +import jp.sf.pal.pompei.cbean.*; + + + +/** + * The behavior of CUSTOMERS_BASKET. + * + *
+ * [primary-key]
+ *     CUSTOMERS_BASKET_ID
+ * 
+ * [column-property]
+ *     CUSTOMERS_BASKET_ID, CUSTOMERS_ID, PRODUCTS_ID, CUSTOMERS_BASKET_QUANTITY, FINAL_PRICE, CUSTOMERS_BASKET_DATE_ADDED
+ * 
+ * [foreign-property]
+ *     
+ * 
+ * [refferer-property]
+ *     
+ * 
+ * [sequence]
+ *     
+ * 
+ * [identity]
+ *     
+ * 
+ * [update-date]
+ *     
+ * 
+ * [version-no]
+ *     
+ * 
+ * 
+ * + * @author DBFlute(AutoGenerator) + */ +public abstract class BsCustomersBasketBhv extends jp.sf.pal.pompei.allcommon.bhv.AbstractBehaviorWritable { + + // =================================================================================== + // Attribute + // ========= + /** Dao instance. */ + protected CustomersBasketDao _dao; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + public BsCustomersBasketBhv() { + } + + // =================================================================================== + // Table name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + public String getTableDbName() { + return "CUSTOMERS_BASKET"; + } + + // =================================================================================== + // DBMeta + // ====== + /** + * This method implements the method that is declared at super. + * + * @return DBMeta. (NotNull) + */ + public DBMeta getDBMeta() { + return CustomersBasketDbm.getInstance(); + } + + /** + * Get my dbmeta. + * + * @return DBMeta. (NotNull) + */ + public CustomersBasketDbm getMyDBMeta() { + return CustomersBasketDbm.getInstance(); + } + + // =================================================================================== + // Dao Accessor + // ============ + /** + * Get my dao. + * + * @return My dao. + */ + public CustomersBasketDao getMyDao() { + return _dao; + } + + /** + * Set my dao. + * + * @param dao My dao. (NotNull) + */ + public void setMyDao(CustomersBasketDao dao) { + assertObjectNotNull("dao", dao); + _dao = dao; + } + + /** + * This method implements the method that is declared at super. + * + * @return Dao-readable. (NotNull) + */ + public DaoReadable getDaoReadable() { + return getMyDao(); + } + + /** + * This method implements the method that is declared at super. + * + * @return Dao-writable. (NotNull) + */ + public DaoWritable getDaoWritable() { + return getMyDao(); + } + + // =================================================================================== + // New Instance + // ============ + /** + * New entity. + * + * @return Entity. (NotNull) + */ + public Entity newEntity() { + return newMyEntity(); + } + + /** + * New condition-bean. + * + * @return Condition-bean. (NotNull) + */ + public ConditionBean newConditionBean() { + return newMyConditionBean(); + } + + /** + * New my entity. + * + * @return My entity. (NotNull) + */ + public CustomersBasket newMyEntity() { + return new CustomersBasket(); + } + + /** + * New my condition-bean. + * + * @return My condition-bean. (NotNull) + */ + public CustomersBasketCB newMyConditionBean() { + return new CustomersBasketCB(); + } + + // =================================================================================== + // Delegate Method + // =============== + // ----------------------------------------------------- + // Select + // ------ + /** + * Get count as all. (Delegate-Method) + * + * @return All count. (NotNull) + */ + public int delegateGetCountAll() { + return getMyDao().getCountAll(); + } + + /** + * Get list as all. (Delegate-Method) + * + * @return All list. (NotNull) + */ + public java.util.List delegateGetListAll() { + return getMyDao().getListAll(); + } + + // + // Get entity. (Delegate-Method) + // + // @param Primary-keys (NotNull) + // @return Entity. (NotNull) + // + public CustomersBasket delegateGetEntity(java.math.BigDecimal customersBasketId) { + return getMyDao().getEntity(customersBasketId); + } + + /** + * Select count by condition-bean. (Delegate-Method) + * + * @param cb Condition-bean. (NotNull) + * @return Selected count. (NotNull) + */ + public int delegateSelectCount(CustomersBasketCB cb) { + assertConditionBeanNotNull(cb); + return getMyDao().selectCount(cb); + } + + /** + * Select entity by condition-bean. (Delegate-Method) + * + * @param cb Condition-bean. (NotNull) + * @return Selected entity. If the select result is zero, it returns null. (Nullable) + */ + public CustomersBasket delegateSelectEntity(CustomersBasketCB cb) { + assertConditionBeanNotNull(cb); + return getMyDao().selectEntity(cb); + } + + /** + * Select list by condition-bean. (Delegate-Method) + * + * @param cb Condition-bean. (NotNull) + * @return Selected list. If the select result is zero, it returns empty list. (NotNull) + */ + public java.util.List delegateSelectList(CustomersBasketCB cb) { + assertConditionBeanNotNull(cb); + return getMyDao().selectList(cb); + } + + + // ----------------------------------------------------- + // Update + // ------ + /** + * Insert one entity. (Delegate-Method) + * + * @param entity Entity. (NotNull) + * @return Inserted count. + */ + public int delegateInsert(CustomersBasket entity) { + assertEntityNotNull(entity);// If this table use identity, the entity does not have primary-key. + filterEntityOfInsert(entity); + assertEntityOfInsert(entity); + return getMyDao().insert(entity); + } + + /** + * Update one entity. (Delegate-Method) + * {modified only} + * + * @param entity Entity. (NotNull) + * @return Updated count. + */ + public int delegateUpdate(CustomersBasket entity) { + assertEntityNotNullAndHasPrimaryKeyValue(entity); + filterEntityOfUpdate(entity); + assertEntityOfUpdate(entity); + return getMyDao().updateModifiedOnly(entity); + } + + /** + * Delete one entity. (Delegate-Method) + * + * @param entity Entity. (NotNull) + * @return Deleted count. + */ + public int delegateDelete(CustomersBasket entity) { + assertEntityNotNullAndHasPrimaryKeyValue(entity); + filterEntityOfDelete(entity); + assertEntityOfDelete(entity); + return getMyDao().delete(entity); + } + + /** + * Insert several entities. (Delegate-Method) + * + * @param entityList Entity-list. (NotNull & NotEmpty) + * @return Inserted count. + */ + public int delegateInsertList(java.util.List entityList) { + assertListNotNullAndNotEmpty(entityList); + return getMyDao().insertList(entityList); + } + + /** + * Update several entities. (Delegate-Method) + * + * @param entityList Entity-list. (NotNull & NotEmpty) + * @return Updated count. + */ + public int delegateUpdateList(java.util.List entityList) { + assertListNotNullAndNotEmpty(entityList); + return getMyDao().updateList(entityList); + } + + /** + * Delete several entities. (Delegate-Method) + * + * @param entityList Entity-list. (NotNull & NotEmpty) + * @return Deleted count. + */ + public int delegateDeleteList(java.util.List entityList) { + assertListNotNullAndNotEmpty(entityList); + return getMyDao().deleteList(entityList); + } + + // =================================================================================== + // Basic Select Count + // ================== + /** + * Select count by condition-bean. + *
+     * If the argument 'condition-bean' is effective about fetch-scope,
+     * this method invoke select count ignoring the fetch-scope.
+     * 
+ * @param cb Condition-bean. This condition-bean should not be set up about fetch-scope. (NotNull) + * @return Selected count. + */ + public int selectCount(CustomersBasketCB cb) { + assertConditionBeanNotNull(cb); + return delegateSelectCount(cb); + } + + // =================================================================================== + // Basic Select Entity + // =================== + /** + * Select entity by condition-bean. + * + * @param cb Condition-bean. (NotNull) + * @return Selected entity. (Nullalble) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public CustomersBasket selectEntity(CustomersBasketCB cb) { + assertConditionBeanNotNull(cb); + final java.util.List ls = selectList(cb); + if (ls.isEmpty()) { + return null; + } + assertRecordHasBeenSelectedAsOne(ls, cb); + return (CustomersBasket)ls.get(0); + } + + /** + * Select entity by condition-bean with deleted check. + * + * @param cb Condition-bean. (NotNull) + * @return Selected entity. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public CustomersBasket selectEntityWithDeletedCheck(CustomersBasketCB cb) { + assertConditionBeanNotNull(cb); + final java.util.List ls = selectList(cb); + assertRecordHasNotBeenDeleted(ls, cb); + assertRecordHasBeenSelectedAsOne(ls, cb); + return (CustomersBasket)ls.get(0); + } + + /* + * Select entity with deleted check. {by primary-key} + * + * @param primaryKey + * @return Selected entity. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public CustomersBasket selectByPKValueWithDeletedCheck(java.math.BigDecimal customersBasketId) { + CustomersBasket entity = new CustomersBasket(); + entity.setCustomersBasketId(customersBasketId); + final CustomersBasketCB cb = newMyConditionBean(); + cb.acceptPrimaryKeyMapString(getDBMeta().extractPrimaryKeyMapString(entity)); + return selectEntityWithDeletedCheck(cb); + } + + // =================================================================================== + // Basic Select List + // ================= + /** + * Select list as result-bean. + * + * @param cb Condition-bean. (NotNull) + * @return Selected list-result-bean. (NotNull) + */ + public ListResultBean selectList(CustomersBasketCB cb) { + assertConditionBeanNotNull(cb); + return new ResultBeanBuilder(this).buildListResultBean(cb, delegateSelectList(cb)); + } + + /** + * Select page as result-bean. + * + * @param cb Condition-bean. (NotNull) + * @return Selected paging-result-bean. (NotNull) + */ + public PagingResultBean selectPage(final CustomersBasketCB cb) { + assertConditionBeanNotNull(cb); + return selectPage(cb, new SelectPageSimpleInvoker(this)); + } + + /** + * Select page. + * + * @param cb Condition-bean. (NotNull) + * @param invoker Select-page-invoker (NotNull) + * @return Selected paging-result-bean. (NotNull) + */ + public PagingResultBean selectPage(final CustomersBasketCB cb, SelectPageInvoker invoker) { + assertConditionBeanNotNull(cb); + final SelectPageCallback pageCallback = new SelectPageCallback() { + public PagingBean getPagingBean() { return cb; } + public int selectCountIgnoreFetchScope() { + return selectCount(cb); + } + public java.util.List selectListWithFetchScope() { + return selectList(cb); + } + }; + return invoker.invokeSelectPage(pageCallback); + } + + // =================================================================================== + // Various Select + // ============== + /** + * Select value-label list. + * + * @param cb Condition-bean. (NotNull) + * @param valueLabelSetupper Value-label-setupper. (NotNull) + * @return Value-label list. (NotNull) + */ + public java.util.List> selectValueLabelList(CustomersBasketCB cb, ValueLabelSetupper valueLabelSetupper) { + return createValueLabelList(selectList(cb), valueLabelSetupper); + } + + // =================================================================================== + // Load Referer + // ============ + + // =================================================================================== + // Pull Out Foreign + // ================ + + // =================================================================================== + // Basic Entity Update + // =================== + /** + * Insert. + * + * @param customersBasket Entity. (NotNull) + */ + public void insert(CustomersBasket customersBasket) { + assertEntityNotNull(customersBasket); + delegateInsert(customersBasket); + } + + protected void doCreate(Entity customersBasket) { + insert((CustomersBasket)customersBasket); + } + + /** + * Update. + *
+     * If it updates count zero, throws exception.
+     * If concurrency control of this table is valid, this update have it.
+     * 
+ * @param customersBasket Entity. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public void update(CustomersBasket customersBasket) { + assertEntityNotNull(customersBasket); + final int updatedCount = delegateUpdate(customersBasket); + if (updatedCount == 0) { + throw new jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException(customersBasket.toString()); + } else if (updatedCount > 1) { + String msg = "updatedCount=" + updatedCount + ": " + customersBasket.toString(); + throw new jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException(msg); + } + } + + protected void doModify(Entity customersBasket) { + update((CustomersBasket)customersBasket); + } + + /** + * Update after select. + * + * @param customersBasket Entity. This must contain primary-key value at least. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + */ + public void updateAfterSelect(CustomersBasket customersBasket) { + assertEntityNotNullAndHasPrimaryKeyValue(customersBasket); + final CustomersBasketCB cb = newMyConditionBean(); + cb.acceptPrimaryKeyMapString(getDBMeta().extractPrimaryKeyMapString(customersBasket)); + final CustomersBasket currentEntity = selectEntityWithDeletedCheck(cb); + mergeEntity(customersBasket, currentEntity); + update(currentEntity); + } + + protected void doModifyAfterSelect(Entity customersBasket) { + updateAfterSelect((CustomersBasket)customersBasket); + } + + /** + * Insert or update. + * {update: modified only} + * + * @param customersBasket Entity. This should contain primary-key value at least(Except use identity). (NotNull) + */ + public void insertOrUpdate(CustomersBasket customersBasket) { + assertEntityNotNull(customersBasket); + if (!customersBasket.hasPrimaryKeyValue()) { + insert(customersBasket); + } else { + try { + update(customersBasket); + } catch (org.seasar.dao.NotSingleRowUpdatedRuntimeException e) { + insert(customersBasket); + } catch (jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException e) { + insert(customersBasket); + } + } + } + + protected void doCreateOrUpdateNonstrict(Entity customersBasket) { + + insertOrUpdate((CustomersBasket)customersBasket); + + } + + /** + * Insert or update after select. + * {update: modified only} + * + * @param customersBasket Entity. This should contain primary-key value at least(Except use identity). (NotNull) + */ + public void insertOrUpdateAfterSelect(CustomersBasket customersBasket) { + assertEntityNotNull(customersBasket); + if (!customersBasket.hasPrimaryKeyValue()) { + insert(customersBasket); + return; + } + CustomersBasket currentEntity = null; + try { + final CustomersBasketCB cb = newMyConditionBean(); + cb.acceptPrimaryKeyMapString(getDBMeta().extractPrimaryKeyMapString(customersBasket)); + currentEntity = selectEntityWithDeletedCheck(cb); + } catch (jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException e) { + insert(customersBasket); + return; + } + assertEntityNotNullAndHasPrimaryKeyValue(customersBasket); + mergeEntity(customersBasket, currentEntity); + update(currentEntity); + } + + protected void doCreateOrModifyAfterSelect(Entity entity) { + insertOrUpdateAfterSelect((CustomersBasket)entity); + } + + /** + * This method implements the method that is declared at super. + * + * @param sourceEntity Source entity. (NotNull) + * @param destinationEntity Destination entity. (NotNull) + */ + protected void mergeEntity(Entity sourceEntity, Entity destinationEntity) { + assertEntityNotNull(sourceEntity); + assertEntityNotNull(destinationEntity); + final CustomersBasket sourceMyEntity = (CustomersBasket)sourceEntity; + final CustomersBasket destinationMyEntity = (CustomersBasket)destinationEntity; + destinationMyEntity.clearModifiedPropertyNames(); + final java.util.Set names = sourceMyEntity.getModifiedPropertyNames(); + + if (names.contains("customersBasketId")) { destinationMyEntity.setCustomersBasketId(sourceMyEntity.getCustomersBasketId()); } + if (names.contains("customersId")) { destinationMyEntity.setCustomersId(sourceMyEntity.getCustomersId()); } + if (names.contains("productsId")) { destinationMyEntity.setProductsId(sourceMyEntity.getProductsId()); } + if (names.contains("customersBasketQuantity")) { destinationMyEntity.setCustomersBasketQuantity(sourceMyEntity.getCustomersBasketQuantity()); } + if (names.contains("finalPrice")) { destinationMyEntity.setFinalPrice(sourceMyEntity.getFinalPrice()); } + if (names.contains("customersBasketDateAdded")) { destinationMyEntity.setCustomersBasketDateAdded(sourceMyEntity.getCustomersBasketDateAdded()); } + + } + + /** + * Delete. + * + * @param customersBasket Entity. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public void delete(CustomersBasket customersBasket) { + assertEntityNotNull(customersBasket); + final int deletedCount = delegateDelete(customersBasket); + if (deletedCount == 0) { + throw new jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException(customersBasket.toString()); + } else if (deletedCount > 1) { + String msg = "deletedCount=" + deletedCount + ": " + customersBasket.toString(); + throw new jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException(msg); + } + } + + protected void doRemove(Entity customersBasket) { + delete((CustomersBasket)customersBasket); + } + + /** + * Delete after select. + * + * @param customersBasket Entity. This must contain primary-key value at least. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + */ + public void deleteAfterSelect(CustomersBasket customersBasket) { + assertEntityNotNullAndHasPrimaryKeyValue(customersBasket); + final CustomersBasketCB cb = newMyConditionBean(); + cb.acceptPrimaryKeyMapString(getDBMeta().extractPrimaryKeyMapString(customersBasket)); + selectEntityWithDeletedCheck(cb); + delete(customersBasket); + } + + protected void doRemoveAfterSelect(Entity customersBasket) { + deleteAfterSelect((CustomersBasket)customersBasket); + } + + // =================================================================================== + // Basic Batch Update + // ================== + /** + * Insert list. + * + * @param customersBasketList Entity-list. (NotNull & NotEmpty) + * @return Inserted count. + */ + public int insertList(java.util.List customersBasketList) { + assertListNotNullAndNotEmpty(customersBasketList); + return delegateInsertList(customersBasketList); + } + + /** + * Update list. + * + * @param customersBasketList Entity-list. (NotNull & NotEmpty) + * @return Updated count. + */ + public int updateList(java.util.List customersBasketList) { + assertListNotNullAndNotEmpty(customersBasketList); + return delegateUpdateList(customersBasketList); + } + + /** + * Delete list. + * + * @param customersBasketList Entity-list. (NotNull & NotEmpty) + * @return Deleted count. + */ + public int deleteList(java.util.List customersBasketList) { + assertListNotNullAndNotEmpty(customersBasketList); + return delegateDeleteList(customersBasketList); + } + + // =================================================================================== + // Various Insert + // ============== + + // =================================================================================== + // CBSetupper + // ========== + /** + * The interface of condition-bean setupper. + */ + public static interface CBSetupper extends ConditionBeanSetupper { + + /** + * Set up condition. + * + * @param cb Condition-bean. (NotNull) + */ + public void setup(CustomersBasketCB cb); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/bsbhv/BsCustomersBhv.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/bsbhv/BsCustomersBhv.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/bsbhv/BsCustomersBhv.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,704 @@ + +package jp.sf.pal.pompei.bsbhv; + +import jp.sf.pal.pompei.allcommon.*; +import jp.sf.pal.pompei.allcommon.bhv.load.LoadRefererOption; +import jp.sf.pal.pompei.allcommon.bhv.setup.ConditionBeanSetupper; +import jp.sf.pal.pompei.allcommon.bhv.setup.ValueLabelSetupper; +import jp.sf.pal.pompei.allcommon.cbean.ConditionBean; +import jp.sf.pal.pompei.allcommon.cbean.ListResultBean; +import jp.sf.pal.pompei.allcommon.cbean.PagingBean; +import jp.sf.pal.pompei.allcommon.cbean.PagingResultBean; +import jp.sf.pal.pompei.allcommon.dbmeta.DBMeta; + +import jp.sf.pal.pompei.exdao.*; +import jp.sf.pal.pompei.exentity.*; +import jp.sf.pal.pompei.bsentity.dbmeta.*; +import jp.sf.pal.pompei.cbean.*; + + + +/** + * The behavior of CUSTOMERS. + * + *
+ * [primary-key]
+ *     CUSTOMERS_ID
+ * 
+ * [column-property]
+ *     CUSTOMERS_ID, CUSTOMERS_GENDER, CUSTOMERS_FIRSTNAME, CUSTOMERS_LASTNAME, CUSTOMERS_DOB, CUSTOMERS_EMAIL_ADDRESS, CUSTOMERS_DEFAULT_ADDRESS_ID, CUSTOMERS_TELEPHONE, CUSTOMERS_FAX, CUSTOMERS_PASSWORD, CUSTOMERS_NEWSLETTER
+ * 
+ * [foreign-property]
+ *     
+ * 
+ * [refferer-property]
+ *     
+ * 
+ * [sequence]
+ *     
+ * 
+ * [identity]
+ *     
+ * 
+ * [update-date]
+ *     
+ * 
+ * [version-no]
+ *     
+ * 
+ * 
+ * + * @author DBFlute(AutoGenerator) + */ +public abstract class BsCustomersBhv extends jp.sf.pal.pompei.allcommon.bhv.AbstractBehaviorWritable { + + // =================================================================================== + // Attribute + // ========= + /** Dao instance. */ + protected CustomersDao _dao; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + public BsCustomersBhv() { + } + + // =================================================================================== + // Table name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + public String getTableDbName() { + return "CUSTOMERS"; + } + + // =================================================================================== + // DBMeta + // ====== + /** + * This method implements the method that is declared at super. + * + * @return DBMeta. (NotNull) + */ + public DBMeta getDBMeta() { + return CustomersDbm.getInstance(); + } + + /** + * Get my dbmeta. + * + * @return DBMeta. (NotNull) + */ + public CustomersDbm getMyDBMeta() { + return CustomersDbm.getInstance(); + } + + // =================================================================================== + // Dao Accessor + // ============ + /** + * Get my dao. + * + * @return My dao. + */ + public CustomersDao getMyDao() { + return _dao; + } + + /** + * Set my dao. + * + * @param dao My dao. (NotNull) + */ + public void setMyDao(CustomersDao dao) { + assertObjectNotNull("dao", dao); + _dao = dao; + } + + /** + * This method implements the method that is declared at super. + * + * @return Dao-readable. (NotNull) + */ + public DaoReadable getDaoReadable() { + return getMyDao(); + } + + /** + * This method implements the method that is declared at super. + * + * @return Dao-writable. (NotNull) + */ + public DaoWritable getDaoWritable() { + return getMyDao(); + } + + // =================================================================================== + // New Instance + // ============ + /** + * New entity. + * + * @return Entity. (NotNull) + */ + public Entity newEntity() { + return newMyEntity(); + } + + /** + * New condition-bean. + * + * @return Condition-bean. (NotNull) + */ + public ConditionBean newConditionBean() { + return newMyConditionBean(); + } + + /** + * New my entity. + * + * @return My entity. (NotNull) + */ + public Customers newMyEntity() { + return new Customers(); + } + + /** + * New my condition-bean. + * + * @return My condition-bean. (NotNull) + */ + public CustomersCB newMyConditionBean() { + return new CustomersCB(); + } + + // =================================================================================== + // Delegate Method + // =============== + // ----------------------------------------------------- + // Select + // ------ + /** + * Get count as all. (Delegate-Method) + * + * @return All count. (NotNull) + */ + public int delegateGetCountAll() { + return getMyDao().getCountAll(); + } + + /** + * Get list as all. (Delegate-Method) + * + * @return All list. (NotNull) + */ + public java.util.List delegateGetListAll() { + return getMyDao().getListAll(); + } + + // + // Get entity. (Delegate-Method) + // + // @param Primary-keys (NotNull) + // @return Entity. (NotNull) + // + public Customers delegateGetEntity(java.math.BigDecimal customersId) { + return getMyDao().getEntity(customersId); + } + + /** + * Select count by condition-bean. (Delegate-Method) + * + * @param cb Condition-bean. (NotNull) + * @return Selected count. (NotNull) + */ + public int delegateSelectCount(CustomersCB cb) { + assertConditionBeanNotNull(cb); + return getMyDao().selectCount(cb); + } + + /** + * Select entity by condition-bean. (Delegate-Method) + * + * @param cb Condition-bean. (NotNull) + * @return Selected entity. If the select result is zero, it returns null. (Nullable) + */ + public Customers delegateSelectEntity(CustomersCB cb) { + assertConditionBeanNotNull(cb); + return getMyDao().selectEntity(cb); + } + + /** + * Select list by condition-bean. (Delegate-Method) + * + * @param cb Condition-bean. (NotNull) + * @return Selected list. If the select result is zero, it returns empty list. (NotNull) + */ + public java.util.List delegateSelectList(CustomersCB cb) { + assertConditionBeanNotNull(cb); + return getMyDao().selectList(cb); + } + + + // ----------------------------------------------------- + // Update + // ------ + /** + * Insert one entity. (Delegate-Method) + * + * @param entity Entity. (NotNull) + * @return Inserted count. + */ + public int delegateInsert(Customers entity) { + assertEntityNotNull(entity);// If this table use identity, the entity does not have primary-key. + filterEntityOfInsert(entity); + assertEntityOfInsert(entity); + return getMyDao().insert(entity); + } + + /** + * Update one entity. (Delegate-Method) + * {modified only} + * + * @param entity Entity. (NotNull) + * @return Updated count. + */ + public int delegateUpdate(Customers entity) { + assertEntityNotNullAndHasPrimaryKeyValue(entity); + filterEntityOfUpdate(entity); + assertEntityOfUpdate(entity); + return getMyDao().updateModifiedOnly(entity); + } + + /** + * Delete one entity. (Delegate-Method) + * + * @param entity Entity. (NotNull) + * @return Deleted count. + */ + public int delegateDelete(Customers entity) { + assertEntityNotNullAndHasPrimaryKeyValue(entity); + filterEntityOfDelete(entity); + assertEntityOfDelete(entity); + return getMyDao().delete(entity); + } + + /** + * Insert several entities. (Delegate-Method) + * + * @param entityList Entity-list. (NotNull & NotEmpty) + * @return Inserted count. + */ + public int delegateInsertList(java.util.List entityList) { + assertListNotNullAndNotEmpty(entityList); + return getMyDao().insertList(entityList); + } + + /** + * Update several entities. (Delegate-Method) + * + * @param entityList Entity-list. (NotNull & NotEmpty) + * @return Updated count. + */ + public int delegateUpdateList(java.util.List entityList) { + assertListNotNullAndNotEmpty(entityList); + return getMyDao().updateList(entityList); + } + + /** + * Delete several entities. (Delegate-Method) + * + * @param entityList Entity-list. (NotNull & NotEmpty) + * @return Deleted count. + */ + public int delegateDeleteList(java.util.List entityList) { + assertListNotNullAndNotEmpty(entityList); + return getMyDao().deleteList(entityList); + } + + // =================================================================================== + // Basic Select Count + // ================== + /** + * Select count by condition-bean. + *
+     * If the argument 'condition-bean' is effective about fetch-scope,
+     * this method invoke select count ignoring the fetch-scope.
+     * 
+ * @param cb Condition-bean. This condition-bean should not be set up about fetch-scope. (NotNull) + * @return Selected count. + */ + public int selectCount(CustomersCB cb) { + assertConditionBeanNotNull(cb); + return delegateSelectCount(cb); + } + + // =================================================================================== + // Basic Select Entity + // =================== + /** + * Select entity by condition-bean. + * + * @param cb Condition-bean. (NotNull) + * @return Selected entity. (Nullalble) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public Customers selectEntity(CustomersCB cb) { + assertConditionBeanNotNull(cb); + final java.util.List ls = selectList(cb); + if (ls.isEmpty()) { + return null; + } + assertRecordHasBeenSelectedAsOne(ls, cb); + return (Customers)ls.get(0); + } + + /** + * Select entity by condition-bean with deleted check. + * + * @param cb Condition-bean. (NotNull) + * @return Selected entity. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public Customers selectEntityWithDeletedCheck(CustomersCB cb) { + assertConditionBeanNotNull(cb); + final java.util.List ls = selectList(cb); + assertRecordHasNotBeenDeleted(ls, cb); + assertRecordHasBeenSelectedAsOne(ls, cb); + return (Customers)ls.get(0); + } + + /* + * Select entity with deleted check. {by primary-key} + * + * @param primaryKey + * @return Selected entity. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public Customers selectByPKValueWithDeletedCheck(java.math.BigDecimal customersId) { + Customers entity = new Customers(); + entity.setCustomersId(customersId); + final CustomersCB cb = newMyConditionBean(); + cb.acceptPrimaryKeyMapString(getDBMeta().extractPrimaryKeyMapString(entity)); + return selectEntityWithDeletedCheck(cb); + } + + // =================================================================================== + // Basic Select List + // ================= + /** + * Select list as result-bean. + * + * @param cb Condition-bean. (NotNull) + * @return Selected list-result-bean. (NotNull) + */ + public ListResultBean selectList(CustomersCB cb) { + assertConditionBeanNotNull(cb); + return new ResultBeanBuilder(this).buildListResultBean(cb, delegateSelectList(cb)); + } + + /** + * Select page as result-bean. + * + * @param cb Condition-bean. (NotNull) + * @return Selected paging-result-bean. (NotNull) + */ + public PagingResultBean selectPage(final CustomersCB cb) { + assertConditionBeanNotNull(cb); + return selectPage(cb, new SelectPageSimpleInvoker(this)); + } + + /** + * Select page. + * + * @param cb Condition-bean. (NotNull) + * @param invoker Select-page-invoker (NotNull) + * @return Selected paging-result-bean. (NotNull) + */ + public PagingResultBean selectPage(final CustomersCB cb, SelectPageInvoker invoker) { + assertConditionBeanNotNull(cb); + final SelectPageCallback pageCallback = new SelectPageCallback() { + public PagingBean getPagingBean() { return cb; } + public int selectCountIgnoreFetchScope() { + return selectCount(cb); + } + public java.util.List selectListWithFetchScope() { + return selectList(cb); + } + }; + return invoker.invokeSelectPage(pageCallback); + } + + // =================================================================================== + // Various Select + // ============== + /** + * Select value-label list. + * + * @param cb Condition-bean. (NotNull) + * @param valueLabelSetupper Value-label-setupper. (NotNull) + * @return Value-label list. (NotNull) + */ + public java.util.List> selectValueLabelList(CustomersCB cb, ValueLabelSetupper valueLabelSetupper) { + return createValueLabelList(selectList(cb), valueLabelSetupper); + } + + // =================================================================================== + // Load Referer + // ============ + + // =================================================================================== + // Pull Out Foreign + // ================ + + // =================================================================================== + // Basic Entity Update + // =================== + /** + * Insert. + * + * @param customers Entity. (NotNull) + */ + public void insert(Customers customers) { + assertEntityNotNull(customers); + delegateInsert(customers); + } + + protected void doCreate(Entity customers) { + insert((Customers)customers); + } + + /** + * Update. + *
+     * If it updates count zero, throws exception.
+     * If concurrency control of this table is valid, this update have it.
+     * 
+ * @param customers Entity. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public void update(Customers customers) { + assertEntityNotNull(customers); + final int updatedCount = delegateUpdate(customers); + if (updatedCount == 0) { + throw new jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException(customers.toString()); + } else if (updatedCount > 1) { + String msg = "updatedCount=" + updatedCount + ": " + customers.toString(); + throw new jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException(msg); + } + } + + protected void doModify(Entity customers) { + update((Customers)customers); + } + + /** + * Update after select. + * + * @param customers Entity. This must contain primary-key value at least. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + */ + public void updateAfterSelect(Customers customers) { + assertEntityNotNullAndHasPrimaryKeyValue(customers); + final CustomersCB cb = newMyConditionBean(); + cb.acceptPrimaryKeyMapString(getDBMeta().extractPrimaryKeyMapString(customers)); + final Customers currentEntity = selectEntityWithDeletedCheck(cb); + mergeEntity(customers, currentEntity); + update(currentEntity); + } + + protected void doModifyAfterSelect(Entity customers) { + updateAfterSelect((Customers)customers); + } + + /** + * Insert or update. + * {update: modified only} + * + * @param customers Entity. This should contain primary-key value at least(Except use identity). (NotNull) + */ + public void insertOrUpdate(Customers customers) { + assertEntityNotNull(customers); + if (!customers.hasPrimaryKeyValue()) { + insert(customers); + } else { + try { + update(customers); + } catch (org.seasar.dao.NotSingleRowUpdatedRuntimeException e) { + insert(customers); + } catch (jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException e) { + insert(customers); + } + } + } + + protected void doCreateOrUpdateNonstrict(Entity customers) { + + insertOrUpdate((Customers)customers); + + } + + /** + * Insert or update after select. + * {update: modified only} + * + * @param customers Entity. This should contain primary-key value at least(Except use identity). (NotNull) + */ + public void insertOrUpdateAfterSelect(Customers customers) { + assertEntityNotNull(customers); + if (!customers.hasPrimaryKeyValue()) { + insert(customers); + return; + } + Customers currentEntity = null; + try { + final CustomersCB cb = newMyConditionBean(); + cb.acceptPrimaryKeyMapString(getDBMeta().extractPrimaryKeyMapString(customers)); + currentEntity = selectEntityWithDeletedCheck(cb); + } catch (jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException e) { + insert(customers); + return; + } + assertEntityNotNullAndHasPrimaryKeyValue(customers); + mergeEntity(customers, currentEntity); + update(currentEntity); + } + + protected void doCreateOrModifyAfterSelect(Entity entity) { + insertOrUpdateAfterSelect((Customers)entity); + } + + /** + * This method implements the method that is declared at super. + * + * @param sourceEntity Source entity. (NotNull) + * @param destinationEntity Destination entity. (NotNull) + */ + protected void mergeEntity(Entity sourceEntity, Entity destinationEntity) { + assertEntityNotNull(sourceEntity); + assertEntityNotNull(destinationEntity); + final Customers sourceMyEntity = (Customers)sourceEntity; + final Customers destinationMyEntity = (Customers)destinationEntity; + destinationMyEntity.clearModifiedPropertyNames(); + final java.util.Set names = sourceMyEntity.getModifiedPropertyNames(); + + if (names.contains("customersId")) { destinationMyEntity.setCustomersId(sourceMyEntity.getCustomersId()); } + if (names.contains("customersGender")) { destinationMyEntity.setCustomersGender(sourceMyEntity.getCustomersGender()); } + if (names.contains("customersFirstname")) { destinationMyEntity.setCustomersFirstname(sourceMyEntity.getCustomersFirstname()); } + if (names.contains("customersLastname")) { destinationMyEntity.setCustomersLastname(sourceMyEntity.getCustomersLastname()); } + if (names.contains("customersDob")) { destinationMyEntity.setCustomersDob(sourceMyEntity.getCustomersDob()); } + if (names.contains("customersEmailAddress")) { destinationMyEntity.setCustomersEmailAddress(sourceMyEntity.getCustomersEmailAddress()); } + if (names.contains("customersDefaultAddressId")) { destinationMyEntity.setCustomersDefaultAddressId(sourceMyEntity.getCustomersDefaultAddressId()); } + if (names.contains("customersTelephone")) { destinationMyEntity.setCustomersTelephone(sourceMyEntity.getCustomersTelephone()); } + if (names.contains("customersFax")) { destinationMyEntity.setCustomersFax(sourceMyEntity.getCustomersFax()); } + if (names.contains("customersPassword")) { destinationMyEntity.setCustomersPassword(sourceMyEntity.getCustomersPassword()); } + if (names.contains("customersNewsletter")) { destinationMyEntity.setCustomersNewsletter(sourceMyEntity.getCustomersNewsletter()); } + + } + + /** + * Delete. + * + * @param customers Entity. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public void delete(Customers customers) { + assertEntityNotNull(customers); + final int deletedCount = delegateDelete(customers); + if (deletedCount == 0) { + throw new jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException(customers.toString()); + } else if (deletedCount > 1) { + String msg = "deletedCount=" + deletedCount + ": " + customers.toString(); + throw new jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException(msg); + } + } + + protected void doRemove(Entity customers) { + delete((Customers)customers); + } + + /** + * Delete after select. + * + * @param customers Entity. This must contain primary-key value at least. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + */ + public void deleteAfterSelect(Customers customers) { + assertEntityNotNullAndHasPrimaryKeyValue(customers); + final CustomersCB cb = newMyConditionBean(); + cb.acceptPrimaryKeyMapString(getDBMeta().extractPrimaryKeyMapString(customers)); + selectEntityWithDeletedCheck(cb); + delete(customers); + } + + protected void doRemoveAfterSelect(Entity customers) { + deleteAfterSelect((Customers)customers); + } + + // =================================================================================== + // Basic Batch Update + // ================== + /** + * Insert list. + * + * @param customersList Entity-list. (NotNull & NotEmpty) + * @return Inserted count. + */ + public int insertList(java.util.List customersList) { + assertListNotNullAndNotEmpty(customersList); + return delegateInsertList(customersList); + } + + /** + * Update list. + * + * @param customersList Entity-list. (NotNull & NotEmpty) + * @return Updated count. + */ + public int updateList(java.util.List customersList) { + assertListNotNullAndNotEmpty(customersList); + return delegateUpdateList(customersList); + } + + /** + * Delete list. + * + * @param customersList Entity-list. (NotNull & NotEmpty) + * @return Deleted count. + */ + public int deleteList(java.util.List customersList) { + assertListNotNullAndNotEmpty(customersList); + return delegateDeleteList(customersList); + } + + // =================================================================================== + // Various Insert + // ============== + + // =================================================================================== + // CBSetupper + // ========== + /** + * The interface of condition-bean setupper. + */ + public static interface CBSetupper extends ConditionBeanSetupper { + + /** + * Set up condition. + * + * @param cb Condition-bean. (NotNull) + */ + public void setup(CustomersCB cb); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/bsbhv/BsCustomersInfoBhv.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/bsbhv/BsCustomersInfoBhv.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/bsbhv/BsCustomersInfoBhv.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,699 @@ + +package jp.sf.pal.pompei.bsbhv; + +import jp.sf.pal.pompei.allcommon.*; +import jp.sf.pal.pompei.allcommon.bhv.load.LoadRefererOption; +import jp.sf.pal.pompei.allcommon.bhv.setup.ConditionBeanSetupper; +import jp.sf.pal.pompei.allcommon.bhv.setup.ValueLabelSetupper; +import jp.sf.pal.pompei.allcommon.cbean.ConditionBean; +import jp.sf.pal.pompei.allcommon.cbean.ListResultBean; +import jp.sf.pal.pompei.allcommon.cbean.PagingBean; +import jp.sf.pal.pompei.allcommon.cbean.PagingResultBean; +import jp.sf.pal.pompei.allcommon.dbmeta.DBMeta; + +import jp.sf.pal.pompei.exdao.*; +import jp.sf.pal.pompei.exentity.*; +import jp.sf.pal.pompei.bsentity.dbmeta.*; +import jp.sf.pal.pompei.cbean.*; + + + +/** + * The behavior of CUSTOMERS_INFO. + * + *
+ * [primary-key]
+ *     CUSTOMERS_INFO_ID
+ * 
+ * [column-property]
+ *     CUSTOMERS_INFO_ID, CUSTOMERS_INFO_DATE_OF_LAST_LOGON, CUSTOMERS_INFO_NUMBER_OF_LOGONS, CUSTOMERS_INFO_DATE_ACCOUNT_CREATED, CUSTOMERS_INFO_DATE_ACCOUNT_LAST_MODIFIED, GLOBAL_PRODUCT_NOTIFICATIONS
+ * 
+ * [foreign-property]
+ *     
+ * 
+ * [refferer-property]
+ *     
+ * 
+ * [sequence]
+ *     
+ * 
+ * [identity]
+ *     
+ * 
+ * [update-date]
+ *     
+ * 
+ * [version-no]
+ *     
+ * 
+ * 
+ * + * @author DBFlute(AutoGenerator) + */ +public abstract class BsCustomersInfoBhv extends jp.sf.pal.pompei.allcommon.bhv.AbstractBehaviorWritable { + + // =================================================================================== + // Attribute + // ========= + /** Dao instance. */ + protected CustomersInfoDao _dao; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + public BsCustomersInfoBhv() { + } + + // =================================================================================== + // Table name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + public String getTableDbName() { + return "CUSTOMERS_INFO"; + } + + // =================================================================================== + // DBMeta + // ====== + /** + * This method implements the method that is declared at super. + * + * @return DBMeta. (NotNull) + */ + public DBMeta getDBMeta() { + return CustomersInfoDbm.getInstance(); + } + + /** + * Get my dbmeta. + * + * @return DBMeta. (NotNull) + */ + public CustomersInfoDbm getMyDBMeta() { + return CustomersInfoDbm.getInstance(); + } + + // =================================================================================== + // Dao Accessor + // ============ + /** + * Get my dao. + * + * @return My dao. + */ + public CustomersInfoDao getMyDao() { + return _dao; + } + + /** + * Set my dao. + * + * @param dao My dao. (NotNull) + */ + public void setMyDao(CustomersInfoDao dao) { + assertObjectNotNull("dao", dao); + _dao = dao; + } + + /** + * This method implements the method that is declared at super. + * + * @return Dao-readable. (NotNull) + */ + public DaoReadable getDaoReadable() { + return getMyDao(); + } + + /** + * This method implements the method that is declared at super. + * + * @return Dao-writable. (NotNull) + */ + public DaoWritable getDaoWritable() { + return getMyDao(); + } + + // =================================================================================== + // New Instance + // ============ + /** + * New entity. + * + * @return Entity. (NotNull) + */ + public Entity newEntity() { + return newMyEntity(); + } + + /** + * New condition-bean. + * + * @return Condition-bean. (NotNull) + */ + public ConditionBean newConditionBean() { + return newMyConditionBean(); + } + + /** + * New my entity. + * + * @return My entity. (NotNull) + */ + public CustomersInfo newMyEntity() { + return new CustomersInfo(); + } + + /** + * New my condition-bean. + * + * @return My condition-bean. (NotNull) + */ + public CustomersInfoCB newMyConditionBean() { + return new CustomersInfoCB(); + } + + // =================================================================================== + // Delegate Method + // =============== + // ----------------------------------------------------- + // Select + // ------ + /** + * Get count as all. (Delegate-Method) + * + * @return All count. (NotNull) + */ + public int delegateGetCountAll() { + return getMyDao().getCountAll(); + } + + /** + * Get list as all. (Delegate-Method) + * + * @return All list. (NotNull) + */ + public java.util.List delegateGetListAll() { + return getMyDao().getListAll(); + } + + // + // Get entity. (Delegate-Method) + // + // @param Primary-keys (NotNull) + // @return Entity. (NotNull) + // + public CustomersInfo delegateGetEntity(java.math.BigDecimal customersInfoId) { + return getMyDao().getEntity(customersInfoId); + } + + /** + * Select count by condition-bean. (Delegate-Method) + * + * @param cb Condition-bean. (NotNull) + * @return Selected count. (NotNull) + */ + public int delegateSelectCount(CustomersInfoCB cb) { + assertConditionBeanNotNull(cb); + return getMyDao().selectCount(cb); + } + + /** + * Select entity by condition-bean. (Delegate-Method) + * + * @param cb Condition-bean. (NotNull) + * @return Selected entity. If the select result is zero, it returns null. (Nullable) + */ + public CustomersInfo delegateSelectEntity(CustomersInfoCB cb) { + assertConditionBeanNotNull(cb); + return getMyDao().selectEntity(cb); + } + + /** + * Select list by condition-bean. (Delegate-Method) + * + * @param cb Condition-bean. (NotNull) + * @return Selected list. If the select result is zero, it returns empty list. (NotNull) + */ + public java.util.List delegateSelectList(CustomersInfoCB cb) { + assertConditionBeanNotNull(cb); + return getMyDao().selectList(cb); + } + + + // ----------------------------------------------------- + // Update + // ------ + /** + * Insert one entity. (Delegate-Method) + * + * @param entity Entity. (NotNull) + * @return Inserted count. + */ + public int delegateInsert(CustomersInfo entity) { + assertEntityNotNull(entity);// If this table use identity, the entity does not have primary-key. + filterEntityOfInsert(entity); + assertEntityOfInsert(entity); + return getMyDao().insert(entity); + } + + /** + * Update one entity. (Delegate-Method) + * {modified only} + * + * @param entity Entity. (NotNull) + * @return Updated count. + */ + public int delegateUpdate(CustomersInfo entity) { + assertEntityNotNullAndHasPrimaryKeyValue(entity); + filterEntityOfUpdate(entity); + assertEntityOfUpdate(entity); + return getMyDao().updateModifiedOnly(entity); + } + + /** + * Delete one entity. (Delegate-Method) + * + * @param entity Entity. (NotNull) + * @return Deleted count. + */ + public int delegateDelete(CustomersInfo entity) { + assertEntityNotNullAndHasPrimaryKeyValue(entity); + filterEntityOfDelete(entity); + assertEntityOfDelete(entity); + return getMyDao().delete(entity); + } + + /** + * Insert several entities. (Delegate-Method) + * + * @param entityList Entity-list. (NotNull & NotEmpty) + * @return Inserted count. + */ + public int delegateInsertList(java.util.List entityList) { + assertListNotNullAndNotEmpty(entityList); + return getMyDao().insertList(entityList); + } + + /** + * Update several entities. (Delegate-Method) + * + * @param entityList Entity-list. (NotNull & NotEmpty) + * @return Updated count. + */ + public int delegateUpdateList(java.util.List entityList) { + assertListNotNullAndNotEmpty(entityList); + return getMyDao().updateList(entityList); + } + + /** + * Delete several entities. (Delegate-Method) + * + * @param entityList Entity-list. (NotNull & NotEmpty) + * @return Deleted count. + */ + public int delegateDeleteList(java.util.List entityList) { + assertListNotNullAndNotEmpty(entityList); + return getMyDao().deleteList(entityList); + } + + // =================================================================================== + // Basic Select Count + // ================== + /** + * Select count by condition-bean. + *
+     * If the argument 'condition-bean' is effective about fetch-scope,
+     * this method invoke select count ignoring the fetch-scope.
+     * 
+ * @param cb Condition-bean. This condition-bean should not be set up about fetch-scope. (NotNull) + * @return Selected count. + */ + public int selectCount(CustomersInfoCB cb) { + assertConditionBeanNotNull(cb); + return delegateSelectCount(cb); + } + + // =================================================================================== + // Basic Select Entity + // =================== + /** + * Select entity by condition-bean. + * + * @param cb Condition-bean. (NotNull) + * @return Selected entity. (Nullalble) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public CustomersInfo selectEntity(CustomersInfoCB cb) { + assertConditionBeanNotNull(cb); + final java.util.List ls = selectList(cb); + if (ls.isEmpty()) { + return null; + } + assertRecordHasBeenSelectedAsOne(ls, cb); + return (CustomersInfo)ls.get(0); + } + + /** + * Select entity by condition-bean with deleted check. + * + * @param cb Condition-bean. (NotNull) + * @return Selected entity. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public CustomersInfo selectEntityWithDeletedCheck(CustomersInfoCB cb) { + assertConditionBeanNotNull(cb); + final java.util.List ls = selectList(cb); + assertRecordHasNotBeenDeleted(ls, cb); + assertRecordHasBeenSelectedAsOne(ls, cb); + return (CustomersInfo)ls.get(0); + } + + /* + * Select entity with deleted check. {by primary-key} + * + * @param primaryKey + * @return Selected entity. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public CustomersInfo selectByPKValueWithDeletedCheck(java.math.BigDecimal customersInfoId) { + CustomersInfo entity = new CustomersInfo(); + entity.setCustomersInfoId(customersInfoId); + final CustomersInfoCB cb = newMyConditionBean(); + cb.acceptPrimaryKeyMapString(getDBMeta().extractPrimaryKeyMapString(entity)); + return selectEntityWithDeletedCheck(cb); + } + + // =================================================================================== + // Basic Select List + // ================= + /** + * Select list as result-bean. + * + * @param cb Condition-bean. (NotNull) + * @return Selected list-result-bean. (NotNull) + */ + public ListResultBean selectList(CustomersInfoCB cb) { + assertConditionBeanNotNull(cb); + return new ResultBeanBuilder(this).buildListResultBean(cb, delegateSelectList(cb)); + } + + /** + * Select page as result-bean. + * + * @param cb Condition-bean. (NotNull) + * @return Selected paging-result-bean. (NotNull) + */ + public PagingResultBean selectPage(final CustomersInfoCB cb) { + assertConditionBeanNotNull(cb); + return selectPage(cb, new SelectPageSimpleInvoker(this)); + } + + /** + * Select page. + * + * @param cb Condition-bean. (NotNull) + * @param invoker Select-page-invoker (NotNull) + * @return Selected paging-result-bean. (NotNull) + */ + public PagingResultBean selectPage(final CustomersInfoCB cb, SelectPageInvoker invoker) { + assertConditionBeanNotNull(cb); + final SelectPageCallback pageCallback = new SelectPageCallback() { + public PagingBean getPagingBean() { return cb; } + public int selectCountIgnoreFetchScope() { + return selectCount(cb); + } + public java.util.List selectListWithFetchScope() { + return selectList(cb); + } + }; + return invoker.invokeSelectPage(pageCallback); + } + + // =================================================================================== + // Various Select + // ============== + /** + * Select value-label list. + * + * @param cb Condition-bean. (NotNull) + * @param valueLabelSetupper Value-label-setupper. (NotNull) + * @return Value-label list. (NotNull) + */ + public java.util.List> selectValueLabelList(CustomersInfoCB cb, ValueLabelSetupper valueLabelSetupper) { + return createValueLabelList(selectList(cb), valueLabelSetupper); + } + + // =================================================================================== + // Load Referer + // ============ + + // =================================================================================== + // Pull Out Foreign + // ================ + + // =================================================================================== + // Basic Entity Update + // =================== + /** + * Insert. + * + * @param customersInfo Entity. (NotNull) + */ + public void insert(CustomersInfo customersInfo) { + assertEntityNotNull(customersInfo); + delegateInsert(customersInfo); + } + + protected void doCreate(Entity customersInfo) { + insert((CustomersInfo)customersInfo); + } + + /** + * Update. + *
+     * If it updates count zero, throws exception.
+     * If concurrency control of this table is valid, this update have it.
+     * 
+ * @param customersInfo Entity. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public void update(CustomersInfo customersInfo) { + assertEntityNotNull(customersInfo); + final int updatedCount = delegateUpdate(customersInfo); + if (updatedCount == 0) { + throw new jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException(customersInfo.toString()); + } else if (updatedCount > 1) { + String msg = "updatedCount=" + updatedCount + ": " + customersInfo.toString(); + throw new jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException(msg); + } + } + + protected void doModify(Entity customersInfo) { + update((CustomersInfo)customersInfo); + } + + /** + * Update after select. + * + * @param customersInfo Entity. This must contain primary-key value at least. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + */ + public void updateAfterSelect(CustomersInfo customersInfo) { + assertEntityNotNullAndHasPrimaryKeyValue(customersInfo); + final CustomersInfoCB cb = newMyConditionBean(); + cb.acceptPrimaryKeyMapString(getDBMeta().extractPrimaryKeyMapString(customersInfo)); + final CustomersInfo currentEntity = selectEntityWithDeletedCheck(cb); + mergeEntity(customersInfo, currentEntity); + update(currentEntity); + } + + protected void doModifyAfterSelect(Entity customersInfo) { + updateAfterSelect((CustomersInfo)customersInfo); + } + + /** + * Insert or update. + * {update: modified only} + * + * @param customersInfo Entity. This should contain primary-key value at least(Except use identity). (NotNull) + */ + public void insertOrUpdate(CustomersInfo customersInfo) { + assertEntityNotNull(customersInfo); + if (!customersInfo.hasPrimaryKeyValue()) { + insert(customersInfo); + } else { + try { + update(customersInfo); + } catch (org.seasar.dao.NotSingleRowUpdatedRuntimeException e) { + insert(customersInfo); + } catch (jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException e) { + insert(customersInfo); + } + } + } + + protected void doCreateOrUpdateNonstrict(Entity customersInfo) { + + insertOrUpdate((CustomersInfo)customersInfo); + + } + + /** + * Insert or update after select. + * {update: modified only} + * + * @param customersInfo Entity. This should contain primary-key value at least(Except use identity). (NotNull) + */ + public void insertOrUpdateAfterSelect(CustomersInfo customersInfo) { + assertEntityNotNull(customersInfo); + if (!customersInfo.hasPrimaryKeyValue()) { + insert(customersInfo); + return; + } + CustomersInfo currentEntity = null; + try { + final CustomersInfoCB cb = newMyConditionBean(); + cb.acceptPrimaryKeyMapString(getDBMeta().extractPrimaryKeyMapString(customersInfo)); + currentEntity = selectEntityWithDeletedCheck(cb); + } catch (jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException e) { + insert(customersInfo); + return; + } + assertEntityNotNullAndHasPrimaryKeyValue(customersInfo); + mergeEntity(customersInfo, currentEntity); + update(currentEntity); + } + + protected void doCreateOrModifyAfterSelect(Entity entity) { + insertOrUpdateAfterSelect((CustomersInfo)entity); + } + + /** + * This method implements the method that is declared at super. + * + * @param sourceEntity Source entity. (NotNull) + * @param destinationEntity Destination entity. (NotNull) + */ + protected void mergeEntity(Entity sourceEntity, Entity destinationEntity) { + assertEntityNotNull(sourceEntity); + assertEntityNotNull(destinationEntity); + final CustomersInfo sourceMyEntity = (CustomersInfo)sourceEntity; + final CustomersInfo destinationMyEntity = (CustomersInfo)destinationEntity; + destinationMyEntity.clearModifiedPropertyNames(); + final java.util.Set names = sourceMyEntity.getModifiedPropertyNames(); + + if (names.contains("customersInfoId")) { destinationMyEntity.setCustomersInfoId(sourceMyEntity.getCustomersInfoId()); } + if (names.contains("customersInfoDateOfLastLogon")) { destinationMyEntity.setCustomersInfoDateOfLastLogon(sourceMyEntity.getCustomersInfoDateOfLastLogon()); } + if (names.contains("customersInfoNumberOfLogons")) { destinationMyEntity.setCustomersInfoNumberOfLogons(sourceMyEntity.getCustomersInfoNumberOfLogons()); } + if (names.contains("customersInfoDateAccountCreated")) { destinationMyEntity.setCustomersInfoDateAccountCreated(sourceMyEntity.getCustomersInfoDateAccountCreated()); } + if (names.contains("customersInfoDateAccountLastModified")) { destinationMyEntity.setCustomersInfoDateAccountLastModified(sourceMyEntity.getCustomersInfoDateAccountLastModified()); } + if (names.contains("globalProductNotifications")) { destinationMyEntity.setGlobalProductNotifications(sourceMyEntity.getGlobalProductNotifications()); } + + } + + /** + * Delete. + * + * @param customersInfo Entity. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public void delete(CustomersInfo customersInfo) { + assertEntityNotNull(customersInfo); + final int deletedCount = delegateDelete(customersInfo); + if (deletedCount == 0) { + throw new jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException(customersInfo.toString()); + } else if (deletedCount > 1) { + String msg = "deletedCount=" + deletedCount + ": " + customersInfo.toString(); + throw new jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException(msg); + } + } + + protected void doRemove(Entity customersInfo) { + delete((CustomersInfo)customersInfo); + } + + /** + * Delete after select. + * + * @param customersInfo Entity. This must contain primary-key value at least. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + */ + public void deleteAfterSelect(CustomersInfo customersInfo) { + assertEntityNotNullAndHasPrimaryKeyValue(customersInfo); + final CustomersInfoCB cb = newMyConditionBean(); + cb.acceptPrimaryKeyMapString(getDBMeta().extractPrimaryKeyMapString(customersInfo)); + selectEntityWithDeletedCheck(cb); + delete(customersInfo); + } + + protected void doRemoveAfterSelect(Entity customersInfo) { + deleteAfterSelect((CustomersInfo)customersInfo); + } + + // =================================================================================== + // Basic Batch Update + // ================== + /** + * Insert list. + * + * @param customersInfoList Entity-list. (NotNull & NotEmpty) + * @return Inserted count. + */ + public int insertList(java.util.List customersInfoList) { + assertListNotNullAndNotEmpty(customersInfoList); + return delegateInsertList(customersInfoList); + } + + /** + * Update list. + * + * @param customersInfoList Entity-list. (NotNull & NotEmpty) + * @return Updated count. + */ + public int updateList(java.util.List customersInfoList) { + assertListNotNullAndNotEmpty(customersInfoList); + return delegateUpdateList(customersInfoList); + } + + /** + * Delete list. + * + * @param customersInfoList Entity-list. (NotNull & NotEmpty) + * @return Deleted count. + */ + public int deleteList(java.util.List customersInfoList) { + assertListNotNullAndNotEmpty(customersInfoList); + return delegateDeleteList(customersInfoList); + } + + // =================================================================================== + // Various Insert + // ============== + + // =================================================================================== + // CBSetupper + // ========== + /** + * The interface of condition-bean setupper. + */ + public static interface CBSetupper extends ConditionBeanSetupper { + + /** + * Set up condition. + * + * @param cb Condition-bean. (NotNull) + */ + public void setup(CustomersInfoCB cb); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/bsbhv/BsGeoZonesBhv.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/bsbhv/BsGeoZonesBhv.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/bsbhv/BsGeoZonesBhv.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,698 @@ + +package jp.sf.pal.pompei.bsbhv; + +import jp.sf.pal.pompei.allcommon.*; +import jp.sf.pal.pompei.allcommon.bhv.load.LoadRefererOption; +import jp.sf.pal.pompei.allcommon.bhv.setup.ConditionBeanSetupper; +import jp.sf.pal.pompei.allcommon.bhv.setup.ValueLabelSetupper; +import jp.sf.pal.pompei.allcommon.cbean.ConditionBean; +import jp.sf.pal.pompei.allcommon.cbean.ListResultBean; +import jp.sf.pal.pompei.allcommon.cbean.PagingBean; +import jp.sf.pal.pompei.allcommon.cbean.PagingResultBean; +import jp.sf.pal.pompei.allcommon.dbmeta.DBMeta; + +import jp.sf.pal.pompei.exdao.*; +import jp.sf.pal.pompei.exentity.*; +import jp.sf.pal.pompei.bsentity.dbmeta.*; +import jp.sf.pal.pompei.cbean.*; + + + +/** + * The behavior of GEO_ZONES. + * + *
+ * [primary-key]
+ *     GEO_ZONE_ID
+ * 
+ * [column-property]
+ *     GEO_ZONE_ID, GEO_ZONE_NAME, GEO_ZONE_DESCRIPTION, LAST_MODIFIED, DATE_ADDED
+ * 
+ * [foreign-property]
+ *     
+ * 
+ * [refferer-property]
+ *     
+ * 
+ * [sequence]
+ *     
+ * 
+ * [identity]
+ *     
+ * 
+ * [update-date]
+ *     
+ * 
+ * [version-no]
+ *     
+ * 
+ * 
+ * + * @author DBFlute(AutoGenerator) + */ +public abstract class BsGeoZonesBhv extends jp.sf.pal.pompei.allcommon.bhv.AbstractBehaviorWritable { + + // =================================================================================== + // Attribute + // ========= + /** Dao instance. */ + protected GeoZonesDao _dao; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + public BsGeoZonesBhv() { + } + + // =================================================================================== + // Table name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + public String getTableDbName() { + return "GEO_ZONES"; + } + + // =================================================================================== + // DBMeta + // ====== + /** + * This method implements the method that is declared at super. + * + * @return DBMeta. (NotNull) + */ + public DBMeta getDBMeta() { + return GeoZonesDbm.getInstance(); + } + + /** + * Get my dbmeta. + * + * @return DBMeta. (NotNull) + */ + public GeoZonesDbm getMyDBMeta() { + return GeoZonesDbm.getInstance(); + } + + // =================================================================================== + // Dao Accessor + // ============ + /** + * Get my dao. + * + * @return My dao. + */ + public GeoZonesDao getMyDao() { + return _dao; + } + + /** + * Set my dao. + * + * @param dao My dao. (NotNull) + */ + public void setMyDao(GeoZonesDao dao) { + assertObjectNotNull("dao", dao); + _dao = dao; + } + + /** + * This method implements the method that is declared at super. + * + * @return Dao-readable. (NotNull) + */ + public DaoReadable getDaoReadable() { + return getMyDao(); + } + + /** + * This method implements the method that is declared at super. + * + * @return Dao-writable. (NotNull) + */ + public DaoWritable getDaoWritable() { + return getMyDao(); + } + + // =================================================================================== + // New Instance + // ============ + /** + * New entity. + * + * @return Entity. (NotNull) + */ + public Entity newEntity() { + return newMyEntity(); + } + + /** + * New condition-bean. + * + * @return Condition-bean. (NotNull) + */ + public ConditionBean newConditionBean() { + return newMyConditionBean(); + } + + /** + * New my entity. + * + * @return My entity. (NotNull) + */ + public GeoZones newMyEntity() { + return new GeoZones(); + } + + /** + * New my condition-bean. + * + * @return My condition-bean. (NotNull) + */ + public GeoZonesCB newMyConditionBean() { + return new GeoZonesCB(); + } + + // =================================================================================== + // Delegate Method + // =============== + // ----------------------------------------------------- + // Select + // ------ + /** + * Get count as all. (Delegate-Method) + * + * @return All count. (NotNull) + */ + public int delegateGetCountAll() { + return getMyDao().getCountAll(); + } + + /** + * Get list as all. (Delegate-Method) + * + * @return All list. (NotNull) + */ + public java.util.List delegateGetListAll() { + return getMyDao().getListAll(); + } + + // + // Get entity. (Delegate-Method) + // + // @param Primary-keys (NotNull) + // @return Entity. (NotNull) + // + public GeoZones delegateGetEntity(java.math.BigDecimal geoZoneId) { + return getMyDao().getEntity(geoZoneId); + } + + /** + * Select count by condition-bean. (Delegate-Method) + * + * @param cb Condition-bean. (NotNull) + * @return Selected count. (NotNull) + */ + public int delegateSelectCount(GeoZonesCB cb) { + assertConditionBeanNotNull(cb); + return getMyDao().selectCount(cb); + } + + /** + * Select entity by condition-bean. (Delegate-Method) + * + * @param cb Condition-bean. (NotNull) + * @return Selected entity. If the select result is zero, it returns null. (Nullable) + */ + public GeoZones delegateSelectEntity(GeoZonesCB cb) { + assertConditionBeanNotNull(cb); + return getMyDao().selectEntity(cb); + } + + /** + * Select list by condition-bean. (Delegate-Method) + * + * @param cb Condition-bean. (NotNull) + * @return Selected list. If the select result is zero, it returns empty list. (NotNull) + */ + public java.util.List delegateSelectList(GeoZonesCB cb) { + assertConditionBeanNotNull(cb); + return getMyDao().selectList(cb); + } + + + // ----------------------------------------------------- + // Update + // ------ + /** + * Insert one entity. (Delegate-Method) + * + * @param entity Entity. (NotNull) + * @return Inserted count. + */ + public int delegateInsert(GeoZones entity) { + assertEntityNotNull(entity);// If this table use identity, the entity does not have primary-key. + filterEntityOfInsert(entity); + assertEntityOfInsert(entity); + return getMyDao().insert(entity); + } + + /** + * Update one entity. (Delegate-Method) + * {modified only} + * + * @param entity Entity. (NotNull) + * @return Updated count. + */ + public int delegateUpdate(GeoZones entity) { + assertEntityNotNullAndHasPrimaryKeyValue(entity); + filterEntityOfUpdate(entity); + assertEntityOfUpdate(entity); + return getMyDao().updateModifiedOnly(entity); + } + + /** + * Delete one entity. (Delegate-Method) + * + * @param entity Entity. (NotNull) + * @return Deleted count. + */ + public int delegateDelete(GeoZones entity) { + assertEntityNotNullAndHasPrimaryKeyValue(entity); + filterEntityOfDelete(entity); + assertEntityOfDelete(entity); + return getMyDao().delete(entity); + } + + /** + * Insert several entities. (Delegate-Method) + * + * @param entityList Entity-list. (NotNull & NotEmpty) + * @return Inserted count. + */ + public int delegateInsertList(java.util.List entityList) { + assertListNotNullAndNotEmpty(entityList); + return getMyDao().insertList(entityList); + } + + /** + * Update several entities. (Delegate-Method) + * + * @param entityList Entity-list. (NotNull & NotEmpty) + * @return Updated count. + */ + public int delegateUpdateList(java.util.List entityList) { + assertListNotNullAndNotEmpty(entityList); + return getMyDao().updateList(entityList); + } + + /** + * Delete several entities. (Delegate-Method) + * + * @param entityList Entity-list. (NotNull & NotEmpty) + * @return Deleted count. + */ + public int delegateDeleteList(java.util.List entityList) { + assertListNotNullAndNotEmpty(entityList); + return getMyDao().deleteList(entityList); + } + + // =================================================================================== + // Basic Select Count + // ================== + /** + * Select count by condition-bean. + *
+     * If the argument 'condition-bean' is effective about fetch-scope,
+     * this method invoke select count ignoring the fetch-scope.
+     * 
+ * @param cb Condition-bean. This condition-bean should not be set up about fetch-scope. (NotNull) + * @return Selected count. + */ + public int selectCount(GeoZonesCB cb) { + assertConditionBeanNotNull(cb); + return delegateSelectCount(cb); + } + + // =================================================================================== + // Basic Select Entity + // =================== + /** + * Select entity by condition-bean. + * + * @param cb Condition-bean. (NotNull) + * @return Selected entity. (Nullalble) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public GeoZones selectEntity(GeoZonesCB cb) { + assertConditionBeanNotNull(cb); + final java.util.List ls = selectList(cb); + if (ls.isEmpty()) { + return null; + } + assertRecordHasBeenSelectedAsOne(ls, cb); + return (GeoZones)ls.get(0); + } + + /** + * Select entity by condition-bean with deleted check. + * + * @param cb Condition-bean. (NotNull) + * @return Selected entity. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public GeoZones selectEntityWithDeletedCheck(GeoZonesCB cb) { + assertConditionBeanNotNull(cb); + final java.util.List ls = selectList(cb); + assertRecordHasNotBeenDeleted(ls, cb); + assertRecordHasBeenSelectedAsOne(ls, cb); + return (GeoZones)ls.get(0); + } + + /* + * Select entity with deleted check. {by primary-key} + * + * @param primaryKey + * @return Selected entity. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public GeoZones selectByPKValueWithDeletedCheck(java.math.BigDecimal geoZoneId) { + GeoZones entity = new GeoZones(); + entity.setGeoZoneId(geoZoneId); + final GeoZonesCB cb = newMyConditionBean(); + cb.acceptPrimaryKeyMapString(getDBMeta().extractPrimaryKeyMapString(entity)); + return selectEntityWithDeletedCheck(cb); + } + + // =================================================================================== + // Basic Select List + // ================= + /** + * Select list as result-bean. + * + * @param cb Condition-bean. (NotNull) + * @return Selected list-result-bean. (NotNull) + */ + public ListResultBean selectList(GeoZonesCB cb) { + assertConditionBeanNotNull(cb); + return new ResultBeanBuilder(this).buildListResultBean(cb, delegateSelectList(cb)); + } + + /** + * Select page as result-bean. + * + * @param cb Condition-bean. (NotNull) + * @return Selected paging-result-bean. (NotNull) + */ + public PagingResultBean selectPage(final GeoZonesCB cb) { + assertConditionBeanNotNull(cb); + return selectPage(cb, new SelectPageSimpleInvoker(this)); + } + + /** + * Select page. + * + * @param cb Condition-bean. (NotNull) + * @param invoker Select-page-invoker (NotNull) + * @return Selected paging-result-bean. (NotNull) + */ + public PagingResultBean selectPage(final GeoZonesCB cb, SelectPageInvoker invoker) { + assertConditionBeanNotNull(cb); + final SelectPageCallback pageCallback = new SelectPageCallback() { + public PagingBean getPagingBean() { return cb; } + public int selectCountIgnoreFetchScope() { + return selectCount(cb); + } + public java.util.List selectListWithFetchScope() { + return selectList(cb); + } + }; + return invoker.invokeSelectPage(pageCallback); + } + + // =================================================================================== + // Various Select + // ============== + /** + * Select value-label list. + * + * @param cb Condition-bean. (NotNull) + * @param valueLabelSetupper Value-label-setupper. (NotNull) + * @return Value-label list. (NotNull) + */ + public java.util.List> selectValueLabelList(GeoZonesCB cb, ValueLabelSetupper valueLabelSetupper) { + return createValueLabelList(selectList(cb), valueLabelSetupper); + } + + // =================================================================================== + // Load Referer + // ============ + + // =================================================================================== + // Pull Out Foreign + // ================ + + // =================================================================================== + // Basic Entity Update + // =================== + /** + * Insert. + * + * @param geoZones Entity. (NotNull) + */ + public void insert(GeoZones geoZones) { + assertEntityNotNull(geoZones); + delegateInsert(geoZones); + } + + protected void doCreate(Entity geoZones) { + insert((GeoZones)geoZones); + } + + /** + * Update. + *
+     * If it updates count zero, throws exception.
+     * If concurrency control of this table is valid, this update have it.
+     * 
+ * @param geoZones Entity. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public void update(GeoZones geoZones) { + assertEntityNotNull(geoZones); + final int updatedCount = delegateUpdate(geoZones); + if (updatedCount == 0) { + throw new jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException(geoZones.toString()); + } else if (updatedCount > 1) { + String msg = "updatedCount=" + updatedCount + ": " + geoZones.toString(); + throw new jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException(msg); + } + } + + protected void doModify(Entity geoZones) { + update((GeoZones)geoZones); + } + + /** + * Update after select. + * + * @param geoZones Entity. This must contain primary-key value at least. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + */ + public void updateAfterSelect(GeoZones geoZones) { + assertEntityNotNullAndHasPrimaryKeyValue(geoZones); + final GeoZonesCB cb = newMyConditionBean(); + cb.acceptPrimaryKeyMapString(getDBMeta().extractPrimaryKeyMapString(geoZones)); + final GeoZones currentEntity = selectEntityWithDeletedCheck(cb); + mergeEntity(geoZones, currentEntity); + update(currentEntity); + } + + protected void doModifyAfterSelect(Entity geoZones) { + updateAfterSelect((GeoZones)geoZones); + } + + /** + * Insert or update. + * {update: modified only} + * + * @param geoZones Entity. This should contain primary-key value at least(Except use identity). (NotNull) + */ + public void insertOrUpdate(GeoZones geoZones) { + assertEntityNotNull(geoZones); + if (!geoZones.hasPrimaryKeyValue()) { + insert(geoZones); + } else { + try { + update(geoZones); + } catch (org.seasar.dao.NotSingleRowUpdatedRuntimeException e) { + insert(geoZones); + } catch (jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException e) { + insert(geoZones); + } + } + } + + protected void doCreateOrUpdateNonstrict(Entity geoZones) { + + insertOrUpdate((GeoZones)geoZones); + + } + + /** + * Insert or update after select. + * {update: modified only} + * + * @param geoZones Entity. This should contain primary-key value at least(Except use identity). (NotNull) + */ + public void insertOrUpdateAfterSelect(GeoZones geoZones) { + assertEntityNotNull(geoZones); + if (!geoZones.hasPrimaryKeyValue()) { + insert(geoZones); + return; + } + GeoZones currentEntity = null; + try { + final GeoZonesCB cb = newMyConditionBean(); + cb.acceptPrimaryKeyMapString(getDBMeta().extractPrimaryKeyMapString(geoZones)); + currentEntity = selectEntityWithDeletedCheck(cb); + } catch (jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException e) { + insert(geoZones); + return; + } + assertEntityNotNullAndHasPrimaryKeyValue(geoZones); + mergeEntity(geoZones, currentEntity); + update(currentEntity); + } + + protected void doCreateOrModifyAfterSelect(Entity entity) { + insertOrUpdateAfterSelect((GeoZones)entity); + } + + /** + * This method implements the method that is declared at super. + * + * @param sourceEntity Source entity. (NotNull) + * @param destinationEntity Destination entity. (NotNull) + */ + protected void mergeEntity(Entity sourceEntity, Entity destinationEntity) { + assertEntityNotNull(sourceEntity); + assertEntityNotNull(destinationEntity); + final GeoZones sourceMyEntity = (GeoZones)sourceEntity; + final GeoZones destinationMyEntity = (GeoZones)destinationEntity; + destinationMyEntity.clearModifiedPropertyNames(); + final java.util.Set names = sourceMyEntity.getModifiedPropertyNames(); + + if (names.contains("geoZoneId")) { destinationMyEntity.setGeoZoneId(sourceMyEntity.getGeoZoneId()); } + if (names.contains("geoZoneName")) { destinationMyEntity.setGeoZoneName(sourceMyEntity.getGeoZoneName()); } + if (names.contains("geoZoneDescription")) { destinationMyEntity.setGeoZoneDescription(sourceMyEntity.getGeoZoneDescription()); } + if (names.contains("lastModified")) { destinationMyEntity.setLastModified(sourceMyEntity.getLastModified()); } + if (names.contains("dateAdded")) { destinationMyEntity.setDateAdded(sourceMyEntity.getDateAdded()); } + + } + + /** + * Delete. + * + * @param geoZones Entity. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public void delete(GeoZones geoZones) { + assertEntityNotNull(geoZones); + final int deletedCount = delegateDelete(geoZones); + if (deletedCount == 0) { + throw new jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException(geoZones.toString()); + } else if (deletedCount > 1) { + String msg = "deletedCount=" + deletedCount + ": " + geoZones.toString(); + throw new jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException(msg); + } + } + + protected void doRemove(Entity geoZones) { + delete((GeoZones)geoZones); + } + + /** + * Delete after select. + * + * @param geoZones Entity. This must contain primary-key value at least. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + */ + public void deleteAfterSelect(GeoZones geoZones) { + assertEntityNotNullAndHasPrimaryKeyValue(geoZones); + final GeoZonesCB cb = newMyConditionBean(); + cb.acceptPrimaryKeyMapString(getDBMeta().extractPrimaryKeyMapString(geoZones)); + selectEntityWithDeletedCheck(cb); + delete(geoZones); + } + + protected void doRemoveAfterSelect(Entity geoZones) { + deleteAfterSelect((GeoZones)geoZones); + } + + // =================================================================================== + // Basic Batch Update + // ================== + /** + * Insert list. + * + * @param geoZonesList Entity-list. (NotNull & NotEmpty) + * @return Inserted count. + */ + public int insertList(java.util.List geoZonesList) { + assertListNotNullAndNotEmpty(geoZonesList); + return delegateInsertList(geoZonesList); + } + + /** + * Update list. + * + * @param geoZonesList Entity-list. (NotNull & NotEmpty) + * @return Updated count. + */ + public int updateList(java.util.List geoZonesList) { + assertListNotNullAndNotEmpty(geoZonesList); + return delegateUpdateList(geoZonesList); + } + + /** + * Delete list. + * + * @param geoZonesList Entity-list. (NotNull & NotEmpty) + * @return Deleted count. + */ + public int deleteList(java.util.List geoZonesList) { + assertListNotNullAndNotEmpty(geoZonesList); + return delegateDeleteList(geoZonesList); + } + + // =================================================================================== + // Various Insert + // ============== + + // =================================================================================== + // CBSetupper + // ========== + /** + * The interface of condition-bean setupper. + */ + public static interface CBSetupper extends ConditionBeanSetupper { + + /** + * Set up condition. + * + * @param cb Condition-bean. (NotNull) + */ + public void setup(GeoZonesCB cb); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/bsbhv/BsLanguagesBhv.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/bsbhv/BsLanguagesBhv.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/bsbhv/BsLanguagesBhv.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,699 @@ + +package jp.sf.pal.pompei.bsbhv; + +import jp.sf.pal.pompei.allcommon.*; +import jp.sf.pal.pompei.allcommon.bhv.load.LoadRefererOption; +import jp.sf.pal.pompei.allcommon.bhv.setup.ConditionBeanSetupper; +import jp.sf.pal.pompei.allcommon.bhv.setup.ValueLabelSetupper; +import jp.sf.pal.pompei.allcommon.cbean.ConditionBean; +import jp.sf.pal.pompei.allcommon.cbean.ListResultBean; +import jp.sf.pal.pompei.allcommon.cbean.PagingBean; +import jp.sf.pal.pompei.allcommon.cbean.PagingResultBean; +import jp.sf.pal.pompei.allcommon.dbmeta.DBMeta; + +import jp.sf.pal.pompei.exdao.*; +import jp.sf.pal.pompei.exentity.*; +import jp.sf.pal.pompei.bsentity.dbmeta.*; +import jp.sf.pal.pompei.cbean.*; + + + +/** + * The behavior of LANGUAGES. + * + *
+ * [primary-key]
+ *     LANGUAGES_ID
+ * 
+ * [column-property]
+ *     LANGUAGES_ID, NAME, CODE, IMAGE, DIRECTORY, SORT_ORDER
+ * 
+ * [foreign-property]
+ *     
+ * 
+ * [refferer-property]
+ *     
+ * 
+ * [sequence]
+ *     
+ * 
+ * [identity]
+ *     
+ * 
+ * [update-date]
+ *     
+ * 
+ * [version-no]
+ *     
+ * 
+ * 
+ * + * @author DBFlute(AutoGenerator) + */ +public abstract class BsLanguagesBhv extends jp.sf.pal.pompei.allcommon.bhv.AbstractBehaviorWritable { + + // =================================================================================== + // Attribute + // ========= + /** Dao instance. */ + protected LanguagesDao _dao; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + public BsLanguagesBhv() { + } + + // =================================================================================== + // Table name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + public String getTableDbName() { + return "LANGUAGES"; + } + + // =================================================================================== + // DBMeta + // ====== + /** + * This method implements the method that is declared at super. + * + * @return DBMeta. (NotNull) + */ + public DBMeta getDBMeta() { + return LanguagesDbm.getInstance(); + } + + /** + * Get my dbmeta. + * + * @return DBMeta. (NotNull) + */ + public LanguagesDbm getMyDBMeta() { + return LanguagesDbm.getInstance(); + } + + // =================================================================================== + // Dao Accessor + // ============ + /** + * Get my dao. + * + * @return My dao. + */ + public LanguagesDao getMyDao() { + return _dao; + } + + /** + * Set my dao. + * + * @param dao My dao. (NotNull) + */ + public void setMyDao(LanguagesDao dao) { + assertObjectNotNull("dao", dao); + _dao = dao; + } + + /** + * This method implements the method that is declared at super. + * + * @return Dao-readable. (NotNull) + */ + public DaoReadable getDaoReadable() { + return getMyDao(); + } + + /** + * This method implements the method that is declared at super. + * + * @return Dao-writable. (NotNull) + */ + public DaoWritable getDaoWritable() { + return getMyDao(); + } + + // =================================================================================== + // New Instance + // ============ + /** + * New entity. + * + * @return Entity. (NotNull) + */ + public Entity newEntity() { + return newMyEntity(); + } + + /** + * New condition-bean. + * + * @return Condition-bean. (NotNull) + */ + public ConditionBean newConditionBean() { + return newMyConditionBean(); + } + + /** + * New my entity. + * + * @return My entity. (NotNull) + */ + public Languages newMyEntity() { + return new Languages(); + } + + /** + * New my condition-bean. + * + * @return My condition-bean. (NotNull) + */ + public LanguagesCB newMyConditionBean() { + return new LanguagesCB(); + } + + // =================================================================================== + // Delegate Method + // =============== + // ----------------------------------------------------- + // Select + // ------ + /** + * Get count as all. (Delegate-Method) + * + * @return All count. (NotNull) + */ + public int delegateGetCountAll() { + return getMyDao().getCountAll(); + } + + /** + * Get list as all. (Delegate-Method) + * + * @return All list. (NotNull) + */ + public java.util.List delegateGetListAll() { + return getMyDao().getListAll(); + } + + // + // Get entity. (Delegate-Method) + // + // @param Primary-keys (NotNull) + // @return Entity. (NotNull) + // + public Languages delegateGetEntity(java.math.BigDecimal languagesId) { + return getMyDao().getEntity(languagesId); + } + + /** + * Select count by condition-bean. (Delegate-Method) + * + * @param cb Condition-bean. (NotNull) + * @return Selected count. (NotNull) + */ + public int delegateSelectCount(LanguagesCB cb) { + assertConditionBeanNotNull(cb); + return getMyDao().selectCount(cb); + } + + /** + * Select entity by condition-bean. (Delegate-Method) + * + * @param cb Condition-bean. (NotNull) + * @return Selected entity. If the select result is zero, it returns null. (Nullable) + */ + public Languages delegateSelectEntity(LanguagesCB cb) { + assertConditionBeanNotNull(cb); + return getMyDao().selectEntity(cb); + } + + /** + * Select list by condition-bean. (Delegate-Method) + * + * @param cb Condition-bean. (NotNull) + * @return Selected list. If the select result is zero, it returns empty list. (NotNull) + */ + public java.util.List delegateSelectList(LanguagesCB cb) { + assertConditionBeanNotNull(cb); + return getMyDao().selectList(cb); + } + + + // ----------------------------------------------------- + // Update + // ------ + /** + * Insert one entity. (Delegate-Method) + * + * @param entity Entity. (NotNull) + * @return Inserted count. + */ + public int delegateInsert(Languages entity) { + assertEntityNotNull(entity);// If this table use identity, the entity does not have primary-key. + filterEntityOfInsert(entity); + assertEntityOfInsert(entity); + return getMyDao().insert(entity); + } + + /** + * Update one entity. (Delegate-Method) + * {modified only} + * + * @param entity Entity. (NotNull) + * @return Updated count. + */ + public int delegateUpdate(Languages entity) { + assertEntityNotNullAndHasPrimaryKeyValue(entity); + filterEntityOfUpdate(entity); + assertEntityOfUpdate(entity); + return getMyDao().updateModifiedOnly(entity); + } + + /** + * Delete one entity. (Delegate-Method) + * + * @param entity Entity. (NotNull) + * @return Deleted count. + */ + public int delegateDelete(Languages entity) { + assertEntityNotNullAndHasPrimaryKeyValue(entity); + filterEntityOfDelete(entity); + assertEntityOfDelete(entity); + return getMyDao().delete(entity); + } + + /** + * Insert several entities. (Delegate-Method) + * + * @param entityList Entity-list. (NotNull & NotEmpty) + * @return Inserted count. + */ + public int delegateInsertList(java.util.List entityList) { + assertListNotNullAndNotEmpty(entityList); + return getMyDao().insertList(entityList); + } + + /** + * Update several entities. (Delegate-Method) + * + * @param entityList Entity-list. (NotNull & NotEmpty) + * @return Updated count. + */ + public int delegateUpdateList(java.util.List entityList) { + assertListNotNullAndNotEmpty(entityList); + return getMyDao().updateList(entityList); + } + + /** + * Delete several entities. (Delegate-Method) + * + * @param entityList Entity-list. (NotNull & NotEmpty) + * @return Deleted count. + */ + public int delegateDeleteList(java.util.List entityList) { + assertListNotNullAndNotEmpty(entityList); + return getMyDao().deleteList(entityList); + } + + // =================================================================================== + // Basic Select Count + // ================== + /** + * Select count by condition-bean. + *
+     * If the argument 'condition-bean' is effective about fetch-scope,
+     * this method invoke select count ignoring the fetch-scope.
+     * 
+ * @param cb Condition-bean. This condition-bean should not be set up about fetch-scope. (NotNull) + * @return Selected count. + */ + public int selectCount(LanguagesCB cb) { + assertConditionBeanNotNull(cb); + return delegateSelectCount(cb); + } + + // =================================================================================== + // Basic Select Entity + // =================== + /** + * Select entity by condition-bean. + * + * @param cb Condition-bean. (NotNull) + * @return Selected entity. (Nullalble) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public Languages selectEntity(LanguagesCB cb) { + assertConditionBeanNotNull(cb); + final java.util.List ls = selectList(cb); + if (ls.isEmpty()) { + return null; + } + assertRecordHasBeenSelectedAsOne(ls, cb); + return (Languages)ls.get(0); + } + + /** + * Select entity by condition-bean with deleted check. + * + * @param cb Condition-bean. (NotNull) + * @return Selected entity. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public Languages selectEntityWithDeletedCheck(LanguagesCB cb) { + assertConditionBeanNotNull(cb); + final java.util.List ls = selectList(cb); + assertRecordHasNotBeenDeleted(ls, cb); + assertRecordHasBeenSelectedAsOne(ls, cb); + return (Languages)ls.get(0); + } + + /* + * Select entity with deleted check. {by primary-key} + * + * @param primaryKey + * @return Selected entity. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public Languages selectByPKValueWithDeletedCheck(java.math.BigDecimal languagesId) { + Languages entity = new Languages(); + entity.setLanguagesId(languagesId); + final LanguagesCB cb = newMyConditionBean(); + cb.acceptPrimaryKeyMapString(getDBMeta().extractPrimaryKeyMapString(entity)); + return selectEntityWithDeletedCheck(cb); + } + + // =================================================================================== + // Basic Select List + // ================= + /** + * Select list as result-bean. + * + * @param cb Condition-bean. (NotNull) + * @return Selected list-result-bean. (NotNull) + */ + public ListResultBean selectList(LanguagesCB cb) { + assertConditionBeanNotNull(cb); + return new ResultBeanBuilder(this).buildListResultBean(cb, delegateSelectList(cb)); + } + + /** + * Select page as result-bean. + * + * @param cb Condition-bean. (NotNull) + * @return Selected paging-result-bean. (NotNull) + */ + public PagingResultBean selectPage(final LanguagesCB cb) { + assertConditionBeanNotNull(cb); + return selectPage(cb, new SelectPageSimpleInvoker(this)); + } + + /** + * Select page. + * + * @param cb Condition-bean. (NotNull) + * @param invoker Select-page-invoker (NotNull) + * @return Selected paging-result-bean. (NotNull) + */ + public PagingResultBean selectPage(final LanguagesCB cb, SelectPageInvoker invoker) { + assertConditionBeanNotNull(cb); + final SelectPageCallback pageCallback = new SelectPageCallback() { + public PagingBean getPagingBean() { return cb; } + public int selectCountIgnoreFetchScope() { + return selectCount(cb); + } + public java.util.List selectListWithFetchScope() { + return selectList(cb); + } + }; + return invoker.invokeSelectPage(pageCallback); + } + + // =================================================================================== + // Various Select + // ============== + /** + * Select value-label list. + * + * @param cb Condition-bean. (NotNull) + * @param valueLabelSetupper Value-label-setupper. (NotNull) + * @return Value-label list. (NotNull) + */ + public java.util.List> selectValueLabelList(LanguagesCB cb, ValueLabelSetupper valueLabelSetupper) { + return createValueLabelList(selectList(cb), valueLabelSetupper); + } + + // =================================================================================== + // Load Referer + // ============ + + // =================================================================================== + // Pull Out Foreign + // ================ + + // =================================================================================== + // Basic Entity Update + // =================== + /** + * Insert. + * + * @param languages Entity. (NotNull) + */ + public void insert(Languages languages) { + assertEntityNotNull(languages); + delegateInsert(languages); + } + + protected void doCreate(Entity languages) { + insert((Languages)languages); + } + + /** + * Update. + *
+     * If it updates count zero, throws exception.
+     * If concurrency control of this table is valid, this update have it.
+     * 
+ * @param languages Entity. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public void update(Languages languages) { + assertEntityNotNull(languages); + final int updatedCount = delegateUpdate(languages); + if (updatedCount == 0) { + throw new jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException(languages.toString()); + } else if (updatedCount > 1) { + String msg = "updatedCount=" + updatedCount + ": " + languages.toString(); + throw new jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException(msg); + } + } + + protected void doModify(Entity languages) { + update((Languages)languages); + } + + /** + * Update after select. + * + * @param languages Entity. This must contain primary-key value at least. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + */ + public void updateAfterSelect(Languages languages) { + assertEntityNotNullAndHasPrimaryKeyValue(languages); + final LanguagesCB cb = newMyConditionBean(); + cb.acceptPrimaryKeyMapString(getDBMeta().extractPrimaryKeyMapString(languages)); + final Languages currentEntity = selectEntityWithDeletedCheck(cb); + mergeEntity(languages, currentEntity); + update(currentEntity); + } + + protected void doModifyAfterSelect(Entity languages) { + updateAfterSelect((Languages)languages); + } + + /** + * Insert or update. + * {update: modified only} + * + * @param languages Entity. This should contain primary-key value at least(Except use identity). (NotNull) + */ + public void insertOrUpdate(Languages languages) { + assertEntityNotNull(languages); + if (!languages.hasPrimaryKeyValue()) { + insert(languages); + } else { + try { + update(languages); + } catch (org.seasar.dao.NotSingleRowUpdatedRuntimeException e) { + insert(languages); + } catch (jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException e) { + insert(languages); + } + } + } + + protected void doCreateOrUpdateNonstrict(Entity languages) { + + insertOrUpdate((Languages)languages); + + } + + /** + * Insert or update after select. + * {update: modified only} + * + * @param languages Entity. This should contain primary-key value at least(Except use identity). (NotNull) + */ + public void insertOrUpdateAfterSelect(Languages languages) { + assertEntityNotNull(languages); + if (!languages.hasPrimaryKeyValue()) { + insert(languages); + return; + } + Languages currentEntity = null; + try { + final LanguagesCB cb = newMyConditionBean(); + cb.acceptPrimaryKeyMapString(getDBMeta().extractPrimaryKeyMapString(languages)); + currentEntity = selectEntityWithDeletedCheck(cb); + } catch (jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException e) { + insert(languages); + return; + } + assertEntityNotNullAndHasPrimaryKeyValue(languages); + mergeEntity(languages, currentEntity); + update(currentEntity); + } + + protected void doCreateOrModifyAfterSelect(Entity entity) { + insertOrUpdateAfterSelect((Languages)entity); + } + + /** + * This method implements the method that is declared at super. + * + * @param sourceEntity Source entity. (NotNull) + * @param destinationEntity Destination entity. (NotNull) + */ + protected void mergeEntity(Entity sourceEntity, Entity destinationEntity) { + assertEntityNotNull(sourceEntity); + assertEntityNotNull(destinationEntity); + final Languages sourceMyEntity = (Languages)sourceEntity; + final Languages destinationMyEntity = (Languages)destinationEntity; + destinationMyEntity.clearModifiedPropertyNames(); + final java.util.Set names = sourceMyEntity.getModifiedPropertyNames(); + + if (names.contains("languagesId")) { destinationMyEntity.setLanguagesId(sourceMyEntity.getLanguagesId()); } + if (names.contains("name")) { destinationMyEntity.setName(sourceMyEntity.getName()); } + if (names.contains("code")) { destinationMyEntity.setCode(sourceMyEntity.getCode()); } + if (names.contains("image")) { destinationMyEntity.setImage(sourceMyEntity.getImage()); } + if (names.contains("directory")) { destinationMyEntity.setDirectory(sourceMyEntity.getDirectory()); } + if (names.contains("sortOrder")) { destinationMyEntity.setSortOrder(sourceMyEntity.getSortOrder()); } + + } + + /** + * Delete. + * + * @param languages Entity. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public void delete(Languages languages) { + assertEntityNotNull(languages); + final int deletedCount = delegateDelete(languages); + if (deletedCount == 0) { + throw new jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException(languages.toString()); + } else if (deletedCount > 1) { + String msg = "deletedCount=" + deletedCount + ": " + languages.toString(); + throw new jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException(msg); + } + } + + protected void doRemove(Entity languages) { + delete((Languages)languages); + } + + /** + * Delete after select. + * + * @param languages Entity. This must contain primary-key value at least. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + */ + public void deleteAfterSelect(Languages languages) { + assertEntityNotNullAndHasPrimaryKeyValue(languages); + final LanguagesCB cb = newMyConditionBean(); + cb.acceptPrimaryKeyMapString(getDBMeta().extractPrimaryKeyMapString(languages)); + selectEntityWithDeletedCheck(cb); + delete(languages); + } + + protected void doRemoveAfterSelect(Entity languages) { + deleteAfterSelect((Languages)languages); + } + + // =================================================================================== + // Basic Batch Update + // ================== + /** + * Insert list. + * + * @param languagesList Entity-list. (NotNull & NotEmpty) + * @return Inserted count. + */ + public int insertList(java.util.List languagesList) { + assertListNotNullAndNotEmpty(languagesList); + return delegateInsertList(languagesList); + } + + /** + * Update list. + * + * @param languagesList Entity-list. (NotNull & NotEmpty) + * @return Updated count. + */ + public int updateList(java.util.List languagesList) { + assertListNotNullAndNotEmpty(languagesList); + return delegateUpdateList(languagesList); + } + + /** + * Delete list. + * + * @param languagesList Entity-list. (NotNull & NotEmpty) + * @return Deleted count. + */ + public int deleteList(java.util.List languagesList) { + assertListNotNullAndNotEmpty(languagesList); + return delegateDeleteList(languagesList); + } + + // =================================================================================== + // Various Insert + // ============== + + // =================================================================================== + // CBSetupper + // ========== + /** + * The interface of condition-bean setupper. + */ + public static interface CBSetupper extends ConditionBeanSetupper { + + /** + * Set up condition. + * + * @param cb Condition-bean. (NotNull) + */ + public void setup(LanguagesCB cb); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/bsbhv/BsManufacturersBhv.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/bsbhv/BsManufacturersBhv.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/bsbhv/BsManufacturersBhv.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,698 @@ + +package jp.sf.pal.pompei.bsbhv; + +import jp.sf.pal.pompei.allcommon.*; +import jp.sf.pal.pompei.allcommon.bhv.load.LoadRefererOption; +import jp.sf.pal.pompei.allcommon.bhv.setup.ConditionBeanSetupper; +import jp.sf.pal.pompei.allcommon.bhv.setup.ValueLabelSetupper; +import jp.sf.pal.pompei.allcommon.cbean.ConditionBean; +import jp.sf.pal.pompei.allcommon.cbean.ListResultBean; +import jp.sf.pal.pompei.allcommon.cbean.PagingBean; +import jp.sf.pal.pompei.allcommon.cbean.PagingResultBean; +import jp.sf.pal.pompei.allcommon.dbmeta.DBMeta; + +import jp.sf.pal.pompei.exdao.*; +import jp.sf.pal.pompei.exentity.*; +import jp.sf.pal.pompei.bsentity.dbmeta.*; +import jp.sf.pal.pompei.cbean.*; + + + +/** + * The behavior of MANUFACTURERS. + * + *
+ * [primary-key]
+ *     MANUFACTURERS_ID
+ * 
+ * [column-property]
+ *     MANUFACTURERS_ID, MANUFACTURERS_NAME, MANUFACTURERS_IMAGE, DATE_ADDED, LAST_MODIFIED
+ * 
+ * [foreign-property]
+ *     
+ * 
+ * [refferer-property]
+ *     
+ * 
+ * [sequence]
+ *     
+ * 
+ * [identity]
+ *     
+ * 
+ * [update-date]
+ *     
+ * 
+ * [version-no]
+ *     
+ * 
+ * 
+ * + * @author DBFlute(AutoGenerator) + */ +public abstract class BsManufacturersBhv extends jp.sf.pal.pompei.allcommon.bhv.AbstractBehaviorWritable { + + // =================================================================================== + // Attribute + // ========= + /** Dao instance. */ + protected ManufacturersDao _dao; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + public BsManufacturersBhv() { + } + + // =================================================================================== + // Table name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + public String getTableDbName() { + return "MANUFACTURERS"; + } + + // =================================================================================== + // DBMeta + // ====== + /** + * This method implements the method that is declared at super. + * + * @return DBMeta. (NotNull) + */ + public DBMeta getDBMeta() { + return ManufacturersDbm.getInstance(); + } + + /** + * Get my dbmeta. + * + * @return DBMeta. (NotNull) + */ + public ManufacturersDbm getMyDBMeta() { + return ManufacturersDbm.getInstance(); + } + + // =================================================================================== + // Dao Accessor + // ============ + /** + * Get my dao. + * + * @return My dao. + */ + public ManufacturersDao getMyDao() { + return _dao; + } + + /** + * Set my dao. + * + * @param dao My dao. (NotNull) + */ + public void setMyDao(ManufacturersDao dao) { + assertObjectNotNull("dao", dao); + _dao = dao; + } + + /** + * This method implements the method that is declared at super. + * + * @return Dao-readable. (NotNull) + */ + public DaoReadable getDaoReadable() { + return getMyDao(); + } + + /** + * This method implements the method that is declared at super. + * + * @return Dao-writable. (NotNull) + */ + public DaoWritable getDaoWritable() { + return getMyDao(); + } + + // =================================================================================== + // New Instance + // ============ + /** + * New entity. + * + * @return Entity. (NotNull) + */ + public Entity newEntity() { + return newMyEntity(); + } + + /** + * New condition-bean. + * + * @return Condition-bean. (NotNull) + */ + public ConditionBean newConditionBean() { + return newMyConditionBean(); + } + + /** + * New my entity. + * + * @return My entity. (NotNull) + */ + public Manufacturers newMyEntity() { + return new Manufacturers(); + } + + /** + * New my condition-bean. + * + * @return My condition-bean. (NotNull) + */ + public ManufacturersCB newMyConditionBean() { + return new ManufacturersCB(); + } + + // =================================================================================== + // Delegate Method + // =============== + // ----------------------------------------------------- + // Select + // ------ + /** + * Get count as all. (Delegate-Method) + * + * @return All count. (NotNull) + */ + public int delegateGetCountAll() { + return getMyDao().getCountAll(); + } + + /** + * Get list as all. (Delegate-Method) + * + * @return All list. (NotNull) + */ + public java.util.List delegateGetListAll() { + return getMyDao().getListAll(); + } + + // + // Get entity. (Delegate-Method) + // + // @param Primary-keys (NotNull) + // @return Entity. (NotNull) + // + public Manufacturers delegateGetEntity(java.math.BigDecimal manufacturersId) { + return getMyDao().getEntity(manufacturersId); + } + + /** + * Select count by condition-bean. (Delegate-Method) + * + * @param cb Condition-bean. (NotNull) + * @return Selected count. (NotNull) + */ + public int delegateSelectCount(ManufacturersCB cb) { + assertConditionBeanNotNull(cb); + return getMyDao().selectCount(cb); + } + + /** + * Select entity by condition-bean. (Delegate-Method) + * + * @param cb Condition-bean. (NotNull) + * @return Selected entity. If the select result is zero, it returns null. (Nullable) + */ + public Manufacturers delegateSelectEntity(ManufacturersCB cb) { + assertConditionBeanNotNull(cb); + return getMyDao().selectEntity(cb); + } + + /** + * Select list by condition-bean. (Delegate-Method) + * + * @param cb Condition-bean. (NotNull) + * @return Selected list. If the select result is zero, it returns empty list. (NotNull) + */ + public java.util.List delegateSelectList(ManufacturersCB cb) { + assertConditionBeanNotNull(cb); + return getMyDao().selectList(cb); + } + + + // ----------------------------------------------------- + // Update + // ------ + /** + * Insert one entity. (Delegate-Method) + * + * @param entity Entity. (NotNull) + * @return Inserted count. + */ + public int delegateInsert(Manufacturers entity) { + assertEntityNotNull(entity);// If this table use identity, the entity does not have primary-key. + filterEntityOfInsert(entity); + assertEntityOfInsert(entity); + return getMyDao().insert(entity); + } + + /** + * Update one entity. (Delegate-Method) + * {modified only} + * + * @param entity Entity. (NotNull) + * @return Updated count. + */ + public int delegateUpdate(Manufacturers entity) { + assertEntityNotNullAndHasPrimaryKeyValue(entity); + filterEntityOfUpdate(entity); + assertEntityOfUpdate(entity); + return getMyDao().updateModifiedOnly(entity); + } + + /** + * Delete one entity. (Delegate-Method) + * + * @param entity Entity. (NotNull) + * @return Deleted count. + */ + public int delegateDelete(Manufacturers entity) { + assertEntityNotNullAndHasPrimaryKeyValue(entity); + filterEntityOfDelete(entity); + assertEntityOfDelete(entity); + return getMyDao().delete(entity); + } + + /** + * Insert several entities. (Delegate-Method) + * + * @param entityList Entity-list. (NotNull & NotEmpty) + * @return Inserted count. + */ + public int delegateInsertList(java.util.List entityList) { + assertListNotNullAndNotEmpty(entityList); + return getMyDao().insertList(entityList); + } + + /** + * Update several entities. (Delegate-Method) + * + * @param entityList Entity-list. (NotNull & NotEmpty) + * @return Updated count. + */ + public int delegateUpdateList(java.util.List entityList) { + assertListNotNullAndNotEmpty(entityList); + return getMyDao().updateList(entityList); + } + + /** + * Delete several entities. (Delegate-Method) + * + * @param entityList Entity-list. (NotNull & NotEmpty) + * @return Deleted count. + */ + public int delegateDeleteList(java.util.List entityList) { + assertListNotNullAndNotEmpty(entityList); + return getMyDao().deleteList(entityList); + } + + // =================================================================================== + // Basic Select Count + // ================== + /** + * Select count by condition-bean. + *
+     * If the argument 'condition-bean' is effective about fetch-scope,
+     * this method invoke select count ignoring the fetch-scope.
+     * 
+ * @param cb Condition-bean. This condition-bean should not be set up about fetch-scope. (NotNull) + * @return Selected count. + */ + public int selectCount(ManufacturersCB cb) { + assertConditionBeanNotNull(cb); + return delegateSelectCount(cb); + } + + // =================================================================================== + // Basic Select Entity + // =================== + /** + * Select entity by condition-bean. + * + * @param cb Condition-bean. (NotNull) + * @return Selected entity. (Nullalble) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public Manufacturers selectEntity(ManufacturersCB cb) { + assertConditionBeanNotNull(cb); + final java.util.List ls = selectList(cb); + if (ls.isEmpty()) { + return null; + } + assertRecordHasBeenSelectedAsOne(ls, cb); + return (Manufacturers)ls.get(0); + } + + /** + * Select entity by condition-bean with deleted check. + * + * @param cb Condition-bean. (NotNull) + * @return Selected entity. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public Manufacturers selectEntityWithDeletedCheck(ManufacturersCB cb) { + assertConditionBeanNotNull(cb); + final java.util.List ls = selectList(cb); + assertRecordHasNotBeenDeleted(ls, cb); + assertRecordHasBeenSelectedAsOne(ls, cb); + return (Manufacturers)ls.get(0); + } + + /* + * Select entity with deleted check. {by primary-key} + * + * @param primaryKey + * @return Selected entity. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public Manufacturers selectByPKValueWithDeletedCheck(java.math.BigDecimal manufacturersId) { + Manufacturers entity = new Manufacturers(); + entity.setManufacturersId(manufacturersId); + final ManufacturersCB cb = newMyConditionBean(); + cb.acceptPrimaryKeyMapString(getDBMeta().extractPrimaryKeyMapString(entity)); + return selectEntityWithDeletedCheck(cb); + } + + // =================================================================================== + // Basic Select List + // ================= + /** + * Select list as result-bean. + * + * @param cb Condition-bean. (NotNull) + * @return Selected list-result-bean. (NotNull) + */ + public ListResultBean selectList(ManufacturersCB cb) { + assertConditionBeanNotNull(cb); + return new ResultBeanBuilder(this).buildListResultBean(cb, delegateSelectList(cb)); + } + + /** + * Select page as result-bean. + * + * @param cb Condition-bean. (NotNull) + * @return Selected paging-result-bean. (NotNull) + */ + public PagingResultBean selectPage(final ManufacturersCB cb) { + assertConditionBeanNotNull(cb); + return selectPage(cb, new SelectPageSimpleInvoker(this)); + } + + /** + * Select page. + * + * @param cb Condition-bean. (NotNull) + * @param invoker Select-page-invoker (NotNull) + * @return Selected paging-result-bean. (NotNull) + */ + public PagingResultBean selectPage(final ManufacturersCB cb, SelectPageInvoker invoker) { + assertConditionBeanNotNull(cb); + final SelectPageCallback pageCallback = new SelectPageCallback() { + public PagingBean getPagingBean() { return cb; } + public int selectCountIgnoreFetchScope() { + return selectCount(cb); + } + public java.util.List selectListWithFetchScope() { + return selectList(cb); + } + }; + return invoker.invokeSelectPage(pageCallback); + } + + // =================================================================================== + // Various Select + // ============== + /** + * Select value-label list. + * + * @param cb Condition-bean. (NotNull) + * @param valueLabelSetupper Value-label-setupper. (NotNull) + * @return Value-label list. (NotNull) + */ + public java.util.List> selectValueLabelList(ManufacturersCB cb, ValueLabelSetupper valueLabelSetupper) { + return createValueLabelList(selectList(cb), valueLabelSetupper); + } + + // =================================================================================== + // Load Referer + // ============ + + // =================================================================================== + // Pull Out Foreign + // ================ + + // =================================================================================== + // Basic Entity Update + // =================== + /** + * Insert. + * + * @param manufacturers Entity. (NotNull) + */ + public void insert(Manufacturers manufacturers) { + assertEntityNotNull(manufacturers); + delegateInsert(manufacturers); + } + + protected void doCreate(Entity manufacturers) { + insert((Manufacturers)manufacturers); + } + + /** + * Update. + *
+     * If it updates count zero, throws exception.
+     * If concurrency control of this table is valid, this update have it.
+     * 
+ * @param manufacturers Entity. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public void update(Manufacturers manufacturers) { + assertEntityNotNull(manufacturers); + final int updatedCount = delegateUpdate(manufacturers); + if (updatedCount == 0) { + throw new jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException(manufacturers.toString()); + } else if (updatedCount > 1) { + String msg = "updatedCount=" + updatedCount + ": " + manufacturers.toString(); + throw new jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException(msg); + } + } + + protected void doModify(Entity manufacturers) { + update((Manufacturers)manufacturers); + } + + /** + * Update after select. + * + * @param manufacturers Entity. This must contain primary-key value at least. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + */ + public void updateAfterSelect(Manufacturers manufacturers) { + assertEntityNotNullAndHasPrimaryKeyValue(manufacturers); + final ManufacturersCB cb = newMyConditionBean(); + cb.acceptPrimaryKeyMapString(getDBMeta().extractPrimaryKeyMapString(manufacturers)); + final Manufacturers currentEntity = selectEntityWithDeletedCheck(cb); + mergeEntity(manufacturers, currentEntity); + update(currentEntity); + } + + protected void doModifyAfterSelect(Entity manufacturers) { + updateAfterSelect((Manufacturers)manufacturers); + } + + /** + * Insert or update. + * {update: modified only} + * + * @param manufacturers Entity. This should contain primary-key value at least(Except use identity). (NotNull) + */ + public void insertOrUpdate(Manufacturers manufacturers) { + assertEntityNotNull(manufacturers); + if (!manufacturers.hasPrimaryKeyValue()) { + insert(manufacturers); + } else { + try { + update(manufacturers); + } catch (org.seasar.dao.NotSingleRowUpdatedRuntimeException e) { + insert(manufacturers); + } catch (jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException e) { + insert(manufacturers); + } + } + } + + protected void doCreateOrUpdateNonstrict(Entity manufacturers) { + + insertOrUpdate((Manufacturers)manufacturers); + + } + + /** + * Insert or update after select. + * {update: modified only} + * + * @param manufacturers Entity. This should contain primary-key value at least(Except use identity). (NotNull) + */ + public void insertOrUpdateAfterSelect(Manufacturers manufacturers) { + assertEntityNotNull(manufacturers); + if (!manufacturers.hasPrimaryKeyValue()) { + insert(manufacturers); + return; + } + Manufacturers currentEntity = null; + try { + final ManufacturersCB cb = newMyConditionBean(); + cb.acceptPrimaryKeyMapString(getDBMeta().extractPrimaryKeyMapString(manufacturers)); + currentEntity = selectEntityWithDeletedCheck(cb); + } catch (jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException e) { + insert(manufacturers); + return; + } + assertEntityNotNullAndHasPrimaryKeyValue(manufacturers); + mergeEntity(manufacturers, currentEntity); + update(currentEntity); + } + + protected void doCreateOrModifyAfterSelect(Entity entity) { + insertOrUpdateAfterSelect((Manufacturers)entity); + } + + /** + * This method implements the method that is declared at super. + * + * @param sourceEntity Source entity. (NotNull) + * @param destinationEntity Destination entity. (NotNull) + */ + protected void mergeEntity(Entity sourceEntity, Entity destinationEntity) { + assertEntityNotNull(sourceEntity); + assertEntityNotNull(destinationEntity); + final Manufacturers sourceMyEntity = (Manufacturers)sourceEntity; + final Manufacturers destinationMyEntity = (Manufacturers)destinationEntity; + destinationMyEntity.clearModifiedPropertyNames(); + final java.util.Set names = sourceMyEntity.getModifiedPropertyNames(); + + if (names.contains("manufacturersId")) { destinationMyEntity.setManufacturersId(sourceMyEntity.getManufacturersId()); } + if (names.contains("manufacturersName")) { destinationMyEntity.setManufacturersName(sourceMyEntity.getManufacturersName()); } + if (names.contains("manufacturersImage")) { destinationMyEntity.setManufacturersImage(sourceMyEntity.getManufacturersImage()); } + if (names.contains("dateAdded")) { destinationMyEntity.setDateAdded(sourceMyEntity.getDateAdded()); } + if (names.contains("lastModified")) { destinationMyEntity.setLastModified(sourceMyEntity.getLastModified()); } + + } + + /** + * Delete. + * + * @param manufacturers Entity. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public void delete(Manufacturers manufacturers) { + assertEntityNotNull(manufacturers); + final int deletedCount = delegateDelete(manufacturers); + if (deletedCount == 0) { + throw new jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException(manufacturers.toString()); + } else if (deletedCount > 1) { + String msg = "deletedCount=" + deletedCount + ": " + manufacturers.toString(); + throw new jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException(msg); + } + } + + protected void doRemove(Entity manufacturers) { + delete((Manufacturers)manufacturers); + } + + /** + * Delete after select. + * + * @param manufacturers Entity. This must contain primary-key value at least. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + */ + public void deleteAfterSelect(Manufacturers manufacturers) { + assertEntityNotNullAndHasPrimaryKeyValue(manufacturers); + final ManufacturersCB cb = newMyConditionBean(); + cb.acceptPrimaryKeyMapString(getDBMeta().extractPrimaryKeyMapString(manufacturers)); + selectEntityWithDeletedCheck(cb); + delete(manufacturers); + } + + protected void doRemoveAfterSelect(Entity manufacturers) { + deleteAfterSelect((Manufacturers)manufacturers); + } + + // =================================================================================== + // Basic Batch Update + // ================== + /** + * Insert list. + * + * @param manufacturersList Entity-list. (NotNull & NotEmpty) + * @return Inserted count. + */ + public int insertList(java.util.List manufacturersList) { + assertListNotNullAndNotEmpty(manufacturersList); + return delegateInsertList(manufacturersList); + } + + /** + * Update list. + * + * @param manufacturersList Entity-list. (NotNull & NotEmpty) + * @return Updated count. + */ + public int updateList(java.util.List manufacturersList) { + assertListNotNullAndNotEmpty(manufacturersList); + return delegateUpdateList(manufacturersList); + } + + /** + * Delete list. + * + * @param manufacturersList Entity-list. (NotNull & NotEmpty) + * @return Deleted count. + */ + public int deleteList(java.util.List manufacturersList) { + assertListNotNullAndNotEmpty(manufacturersList); + return delegateDeleteList(manufacturersList); + } + + // =================================================================================== + // Various Insert + // ============== + + // =================================================================================== + // CBSetupper + // ========== + /** + * The interface of condition-bean setupper. + */ + public static interface CBSetupper extends ConditionBeanSetupper { + + /** + * Set up condition. + * + * @param cb Condition-bean. (NotNull) + */ + public void setup(ManufacturersCB cb); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/bsbhv/BsManufacturersInfoBhv.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/bsbhv/BsManufacturersInfoBhv.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/bsbhv/BsManufacturersInfoBhv.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,694 @@ + +package jp.sf.pal.pompei.bsbhv; + +import jp.sf.pal.pompei.allcommon.*; +import jp.sf.pal.pompei.allcommon.bhv.load.LoadRefererOption; +import jp.sf.pal.pompei.allcommon.bhv.setup.ConditionBeanSetupper; +import jp.sf.pal.pompei.allcommon.bhv.setup.ValueLabelSetupper; +import jp.sf.pal.pompei.allcommon.cbean.ConditionBean; +import jp.sf.pal.pompei.allcommon.cbean.ListResultBean; +import jp.sf.pal.pompei.allcommon.cbean.PagingBean; +import jp.sf.pal.pompei.allcommon.cbean.PagingResultBean; +import jp.sf.pal.pompei.allcommon.dbmeta.DBMeta; + +import jp.sf.pal.pompei.exdao.*; +import jp.sf.pal.pompei.exentity.*; +import jp.sf.pal.pompei.bsentity.dbmeta.*; +import jp.sf.pal.pompei.cbean.*; + + + +/** + * The behavior of MANUFACTURERS_INFO. + * + *
+ * [primary-key]
+ *     MANUFACTURERS_ID, LANGUAGES_ID
+ * 
+ * [column-property]
+ *     MANUFACTURERS_ID, LANGUAGES_ID, MANUFACTURERS_URL, URL_CLICKED, DATE_LAST_CLICK
+ * 
+ * [foreign-property]
+ *     
+ * 
+ * [refferer-property]
+ *     
+ * 
+ * [sequence]
+ *     
+ * 
+ * [identity]
+ *     
+ * 
+ * [update-date]
+ *     
+ * 
+ * [version-no]
+ *     
+ * 
+ * 
+ * + * @author DBFlute(AutoGenerator) + */ +public abstract class BsManufacturersInfoBhv extends jp.sf.pal.pompei.allcommon.bhv.AbstractBehaviorWritable { + + // =================================================================================== + // Attribute + // ========= + /** Dao instance. */ + protected ManufacturersInfoDao _dao; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + public BsManufacturersInfoBhv() { + } + + // =================================================================================== + // Table name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + public String getTableDbName() { + return "MANUFACTURERS_INFO"; + } + + // =================================================================================== + // DBMeta + // ====== + /** + * This method implements the method that is declared at super. + * + * @return DBMeta. (NotNull) + */ + public DBMeta getDBMeta() { + return ManufacturersInfoDbm.getInstance(); + } + + /** + * Get my dbmeta. + * + * @return DBMeta. (NotNull) + */ + public ManufacturersInfoDbm getMyDBMeta() { + return ManufacturersInfoDbm.getInstance(); + } + + // =================================================================================== + // Dao Accessor + // ============ + /** + * Get my dao. + * + * @return My dao. + */ + public ManufacturersInfoDao getMyDao() { + return _dao; + } + + /** + * Set my dao. + * + * @param dao My dao. (NotNull) + */ + public void setMyDao(ManufacturersInfoDao dao) { + assertObjectNotNull("dao", dao); + _dao = dao; + } + + /** + * This method implements the method that is declared at super. + * + * @return Dao-readable. (NotNull) + */ + public DaoReadable getDaoReadable() { + return getMyDao(); + } + + /** + * This method implements the method that is declared at super. + * + * @return Dao-writable. (NotNull) + */ + public DaoWritable getDaoWritable() { + return getMyDao(); + } + + // =================================================================================== + // New Instance + // ============ + /** + * New entity. + * + * @return Entity. (NotNull) + */ + public Entity newEntity() { + return newMyEntity(); + } + + /** + * New condition-bean. + * + * @return Condition-bean. (NotNull) + */ + public ConditionBean newConditionBean() { + return newMyConditionBean(); + } + + /** + * New my entity. + * + * @return My entity. (NotNull) + */ + public ManufacturersInfo newMyEntity() { + return new ManufacturersInfo(); + } + + /** + * New my condition-bean. + * + * @return My condition-bean. (NotNull) + */ + public ManufacturersInfoCB newMyConditionBean() { + return new ManufacturersInfoCB(); + } + + // =================================================================================== + // Delegate Method + // =============== + // ----------------------------------------------------- + // Select + // ------ + /** + * Get count as all. (Delegate-Method) + * + * @return All count. (NotNull) + */ + public int delegateGetCountAll() { + return getMyDao().getCountAll(); + } + + /** + * Get list as all. (Delegate-Method) + * + * @return All list. (NotNull) + */ + public java.util.List delegateGetListAll() { + return getMyDao().getListAll(); + } + + // + // Get entity. (Delegate-Method) + // + // @param Primary-keys (NotNull) + // @return Entity. (NotNull) + // + public ManufacturersInfo delegateGetEntity(java.math.BigDecimal manufacturersId, java.math.BigDecimal languagesId) { + return getMyDao().getEntity(manufacturersId, languagesId); + } + + /** + * Select count by condition-bean. (Delegate-Method) + * + * @param cb Condition-bean. (NotNull) + * @return Selected count. (NotNull) + */ + public int delegateSelectCount(ManufacturersInfoCB cb) { + assertConditionBeanNotNull(cb); + return getMyDao().selectCount(cb); + } + + /** + * Select entity by condition-bean. (Delegate-Method) + * + * @param cb Condition-bean. (NotNull) + * @return Selected entity. If the select result is zero, it returns null. (Nullable) + */ + public ManufacturersInfo delegateSelectEntity(ManufacturersInfoCB cb) { + assertConditionBeanNotNull(cb); + return getMyDao().selectEntity(cb); + } + + /** + * Select list by condition-bean. (Delegate-Method) + * + * @param cb Condition-bean. (NotNull) + * @return Selected list. If the select result is zero, it returns empty list. (NotNull) + */ + public java.util.List delegateSelectList(ManufacturersInfoCB cb) { + assertConditionBeanNotNull(cb); + return getMyDao().selectList(cb); + } + + + // ----------------------------------------------------- + // Update + // ------ + /** + * Insert one entity. (Delegate-Method) + * + * @param entity Entity. (NotNull) + * @return Inserted count. + */ + public int delegateInsert(ManufacturersInfo entity) { + assertEntityNotNull(entity);// If this table use identity, the entity does not have primary-key. + filterEntityOfInsert(entity); + assertEntityOfInsert(entity); + return getMyDao().insert(entity); + } + + /** + * Update one entity. (Delegate-Method) + * {modified only} + * + * @param entity Entity. (NotNull) + * @return Updated count. + */ + public int delegateUpdate(ManufacturersInfo entity) { + assertEntityNotNullAndHasPrimaryKeyValue(entity); + filterEntityOfUpdate(entity); + assertEntityOfUpdate(entity); + return getMyDao().updateModifiedOnly(entity); + } + + /** + * Delete one entity. (Delegate-Method) + * + * @param entity Entity. (NotNull) + * @return Deleted count. + */ + public int delegateDelete(ManufacturersInfo entity) { + assertEntityNotNullAndHasPrimaryKeyValue(entity); + filterEntityOfDelete(entity); + assertEntityOfDelete(entity); + return getMyDao().delete(entity); + } + + /** + * Insert several entities. (Delegate-Method) + * + * @param entityList Entity-list. (NotNull & NotEmpty) + * @return Inserted count. + */ + public int delegateInsertList(java.util.List entityList) { + assertListNotNullAndNotEmpty(entityList); + return getMyDao().insertList(entityList); + } + + /** + * Update several entities. (Delegate-Method) + * + * @param entityList Entity-list. (NotNull & NotEmpty) + * @return Updated count. + */ + public int delegateUpdateList(java.util.List entityList) { + assertListNotNullAndNotEmpty(entityList); + return getMyDao().updateList(entityList); + } + + /** + * Delete several entities. (Delegate-Method) + * + * @param entityList Entity-list. (NotNull & NotEmpty) + * @return Deleted count. + */ + public int delegateDeleteList(java.util.List entityList) { + assertListNotNullAndNotEmpty(entityList); + return getMyDao().deleteList(entityList); + } + + // =================================================================================== + // Basic Select Count + // ================== + /** + * Select count by condition-bean. + *
+     * If the argument 'condition-bean' is effective about fetch-scope,
+     * this method invoke select count ignoring the fetch-scope.
+     * 
+ * @param cb Condition-bean. This condition-bean should not be set up about fetch-scope. (NotNull) + * @return Selected count. + */ + public int selectCount(ManufacturersInfoCB cb) { + assertConditionBeanNotNull(cb); + return delegateSelectCount(cb); + } + + // =================================================================================== + // Basic Select Entity + // =================== + /** + * Select entity by condition-bean. + * + * @param cb Condition-bean. (NotNull) + * @return Selected entity. (Nullalble) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public ManufacturersInfo selectEntity(ManufacturersInfoCB cb) { + assertConditionBeanNotNull(cb); + final java.util.List ls = selectList(cb); + if (ls.isEmpty()) { + return null; + } + assertRecordHasBeenSelectedAsOne(ls, cb); + return (ManufacturersInfo)ls.get(0); + } + + /** + * Select entity by condition-bean with deleted check. + * + * @param cb Condition-bean. (NotNull) + * @return Selected entity. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public ManufacturersInfo selectEntityWithDeletedCheck(ManufacturersInfoCB cb) { + assertConditionBeanNotNull(cb); + final java.util.List ls = selectList(cb); + assertRecordHasNotBeenDeleted(ls, cb); + assertRecordHasBeenSelectedAsOne(ls, cb); + return (ManufacturersInfo)ls.get(0); + } + + /* + * Select entity with deleted check. {by primary-key} + * + * @param primaryKey + * @return Selected entity. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public ManufacturersInfo selectByPKValueWithDeletedCheck(java.math.BigDecimal manufacturersId, java.math.BigDecimal languagesId) { + ManufacturersInfo entity = new ManufacturersInfo(); + entity.setManufacturersId(manufacturersId);entity.setLanguagesId(languagesId); + final ManufacturersInfoCB cb = newMyConditionBean(); + cb.acceptPrimaryKeyMapString(getDBMeta().extractPrimaryKeyMapString(entity)); + return selectEntityWithDeletedCheck(cb); + } + + // =================================================================================== + // Basic Select List + // ================= + /** + * Select list as result-bean. + * + * @param cb Condition-bean. (NotNull) + * @return Selected list-result-bean. (NotNull) + */ + public ListResultBean selectList(ManufacturersInfoCB cb) { + assertConditionBeanNotNull(cb); + return new ResultBeanBuilder(this).buildListResultBean(cb, delegateSelectList(cb)); + } + + /** + * Select page as result-bean. + * + * @param cb Condition-bean. (NotNull) + * @return Selected paging-result-bean. (NotNull) + */ + public PagingResultBean selectPage(final ManufacturersInfoCB cb) { + assertConditionBeanNotNull(cb); + return selectPage(cb, new SelectPageSimpleInvoker(this)); + } + + /** + * Select page. + * + * @param cb Condition-bean. (NotNull) + * @param invoker Select-page-invoker (NotNull) + * @return Selected paging-result-bean. (NotNull) + */ + public PagingResultBean selectPage(final ManufacturersInfoCB cb, SelectPageInvoker invoker) { + assertConditionBeanNotNull(cb); + final SelectPageCallback pageCallback = new SelectPageCallback() { + public PagingBean getPagingBean() { return cb; } + public int selectCountIgnoreFetchScope() { + return selectCount(cb); + } + public java.util.List selectListWithFetchScope() { + return selectList(cb); + } + }; + return invoker.invokeSelectPage(pageCallback); + } + + // =================================================================================== + // Various Select + // ============== + /** + * Select value-label list. + * + * @param cb Condition-bean. (NotNull) + * @param valueLabelSetupper Value-label-setupper. (NotNull) + * @return Value-label list. (NotNull) + */ + public java.util.List> selectValueLabelList(ManufacturersInfoCB cb, ValueLabelSetupper valueLabelSetupper) { + return createValueLabelList(selectList(cb), valueLabelSetupper); + } + + // =================================================================================== + // Pull Out Foreign + // ================ + + // =================================================================================== + // Basic Entity Update + // =================== + /** + * Insert. + * + * @param manufacturersInfo Entity. (NotNull) + */ + public void insert(ManufacturersInfo manufacturersInfo) { + assertEntityNotNull(manufacturersInfo); + delegateInsert(manufacturersInfo); + } + + protected void doCreate(Entity manufacturersInfo) { + insert((ManufacturersInfo)manufacturersInfo); + } + + /** + * Update. + *
+     * If it updates count zero, throws exception.
+     * If concurrency control of this table is valid, this update have it.
+     * 
+ * @param manufacturersInfo Entity. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public void update(ManufacturersInfo manufacturersInfo) { + assertEntityNotNull(manufacturersInfo); + final int updatedCount = delegateUpdate(manufacturersInfo); + if (updatedCount == 0) { + throw new jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException(manufacturersInfo.toString()); + } else if (updatedCount > 1) { + String msg = "updatedCount=" + updatedCount + ": " + manufacturersInfo.toString(); + throw new jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException(msg); + } + } + + protected void doModify(Entity manufacturersInfo) { + update((ManufacturersInfo)manufacturersInfo); + } + + /** + * Update after select. + * + * @param manufacturersInfo Entity. This must contain primary-key value at least. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + */ + public void updateAfterSelect(ManufacturersInfo manufacturersInfo) { + assertEntityNotNullAndHasPrimaryKeyValue(manufacturersInfo); + final ManufacturersInfoCB cb = newMyConditionBean(); + cb.acceptPrimaryKeyMapString(getDBMeta().extractPrimaryKeyMapString(manufacturersInfo)); + final ManufacturersInfo currentEntity = selectEntityWithDeletedCheck(cb); + mergeEntity(manufacturersInfo, currentEntity); + update(currentEntity); + } + + protected void doModifyAfterSelect(Entity manufacturersInfo) { + updateAfterSelect((ManufacturersInfo)manufacturersInfo); + } + + /** + * Insert or update. + * {update: modified only} + * + * @param manufacturersInfo Entity. This should contain primary-key value at least(Except use identity). (NotNull) + */ + public void insertOrUpdate(ManufacturersInfo manufacturersInfo) { + assertEntityNotNull(manufacturersInfo); + if (!manufacturersInfo.hasPrimaryKeyValue()) { + insert(manufacturersInfo); + } else { + try { + update(manufacturersInfo); + } catch (org.seasar.dao.NotSingleRowUpdatedRuntimeException e) { + insert(manufacturersInfo); + } catch (jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException e) { + insert(manufacturersInfo); + } + } + } + + protected void doCreateOrUpdateNonstrict(Entity manufacturersInfo) { + + insertOrUpdate((ManufacturersInfo)manufacturersInfo); + + } + + /** + * Insert or update after select. + * {update: modified only} + * + * @param manufacturersInfo Entity. This should contain primary-key value at least(Except use identity). (NotNull) + */ + public void insertOrUpdateAfterSelect(ManufacturersInfo manufacturersInfo) { + assertEntityNotNull(manufacturersInfo); + if (!manufacturersInfo.hasPrimaryKeyValue()) { + insert(manufacturersInfo); + return; + } + ManufacturersInfo currentEntity = null; + try { + final ManufacturersInfoCB cb = newMyConditionBean(); + cb.acceptPrimaryKeyMapString(getDBMeta().extractPrimaryKeyMapString(manufacturersInfo)); + currentEntity = selectEntityWithDeletedCheck(cb); + } catch (jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException e) { + insert(manufacturersInfo); + return; + } + assertEntityNotNullAndHasPrimaryKeyValue(manufacturersInfo); + mergeEntity(manufacturersInfo, currentEntity); + update(currentEntity); + } + + protected void doCreateOrModifyAfterSelect(Entity entity) { + insertOrUpdateAfterSelect((ManufacturersInfo)entity); + } + + /** + * This method implements the method that is declared at super. + * + * @param sourceEntity Source entity. (NotNull) + * @param destinationEntity Destination entity. (NotNull) + */ + protected void mergeEntity(Entity sourceEntity, Entity destinationEntity) { + assertEntityNotNull(sourceEntity); + assertEntityNotNull(destinationEntity); + final ManufacturersInfo sourceMyEntity = (ManufacturersInfo)sourceEntity; + final ManufacturersInfo destinationMyEntity = (ManufacturersInfo)destinationEntity; + destinationMyEntity.clearModifiedPropertyNames(); + final java.util.Set names = sourceMyEntity.getModifiedPropertyNames(); + + if (names.contains("manufacturersId")) { destinationMyEntity.setManufacturersId(sourceMyEntity.getManufacturersId()); } + if (names.contains("languagesId")) { destinationMyEntity.setLanguagesId(sourceMyEntity.getLanguagesId()); } + if (names.contains("manufacturersUrl")) { destinationMyEntity.setManufacturersUrl(sourceMyEntity.getManufacturersUrl()); } + if (names.contains("urlClicked")) { destinationMyEntity.setUrlClicked(sourceMyEntity.getUrlClicked()); } + if (names.contains("dateLastClick")) { destinationMyEntity.setDateLastClick(sourceMyEntity.getDateLastClick()); } + + } + + /** + * Delete. + * + * @param manufacturersInfo Entity. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public void delete(ManufacturersInfo manufacturersInfo) { + assertEntityNotNull(manufacturersInfo); + final int deletedCount = delegateDelete(manufacturersInfo); + if (deletedCount == 0) { + throw new jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException(manufacturersInfo.toString()); + } else if (deletedCount > 1) { + String msg = "deletedCount=" + deletedCount + ": " + manufacturersInfo.toString(); + throw new jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException(msg); + } + } + + protected void doRemove(Entity manufacturersInfo) { + delete((ManufacturersInfo)manufacturersInfo); + } + + /** + * Delete after select. + * + * @param manufacturersInfo Entity. This must contain primary-key value at least. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + */ + public void deleteAfterSelect(ManufacturersInfo manufacturersInfo) { + assertEntityNotNullAndHasPrimaryKeyValue(manufacturersInfo); + final ManufacturersInfoCB cb = newMyConditionBean(); + cb.acceptPrimaryKeyMapString(getDBMeta().extractPrimaryKeyMapString(manufacturersInfo)); + selectEntityWithDeletedCheck(cb); + delete(manufacturersInfo); + } + + protected void doRemoveAfterSelect(Entity manufacturersInfo) { + deleteAfterSelect((ManufacturersInfo)manufacturersInfo); + } + + // =================================================================================== + // Basic Batch Update + // ================== + /** + * Insert list. + * + * @param manufacturersInfoList Entity-list. (NotNull & NotEmpty) + * @return Inserted count. + */ + public int insertList(java.util.List manufacturersInfoList) { + assertListNotNullAndNotEmpty(manufacturersInfoList); + return delegateInsertList(manufacturersInfoList); + } + + /** + * Update list. + * + * @param manufacturersInfoList Entity-list. (NotNull & NotEmpty) + * @return Updated count. + */ + public int updateList(java.util.List manufacturersInfoList) { + assertListNotNullAndNotEmpty(manufacturersInfoList); + return delegateUpdateList(manufacturersInfoList); + } + + /** + * Delete list. + * + * @param manufacturersInfoList Entity-list. (NotNull & NotEmpty) + * @return Deleted count. + */ + public int deleteList(java.util.List manufacturersInfoList) { + assertListNotNullAndNotEmpty(manufacturersInfoList); + return delegateDeleteList(manufacturersInfoList); + } + + // =================================================================================== + // Various Insert + // ============== + + // =================================================================================== + // CBSetupper + // ========== + /** + * The interface of condition-bean setupper. + */ + public static interface CBSetupper extends ConditionBeanSetupper { + + /** + * Set up condition. + * + * @param cb Condition-bean. (NotNull) + */ + public void setup(ManufacturersInfoCB cb); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/bsbhv/BsNewslettersBhv.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/bsbhv/BsNewslettersBhv.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/bsbhv/BsNewslettersBhv.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,701 @@ + +package jp.sf.pal.pompei.bsbhv; + +import jp.sf.pal.pompei.allcommon.*; +import jp.sf.pal.pompei.allcommon.bhv.load.LoadRefererOption; +import jp.sf.pal.pompei.allcommon.bhv.setup.ConditionBeanSetupper; +import jp.sf.pal.pompei.allcommon.bhv.setup.ValueLabelSetupper; +import jp.sf.pal.pompei.allcommon.cbean.ConditionBean; +import jp.sf.pal.pompei.allcommon.cbean.ListResultBean; +import jp.sf.pal.pompei.allcommon.cbean.PagingBean; +import jp.sf.pal.pompei.allcommon.cbean.PagingResultBean; +import jp.sf.pal.pompei.allcommon.dbmeta.DBMeta; + +import jp.sf.pal.pompei.exdao.*; +import jp.sf.pal.pompei.exentity.*; +import jp.sf.pal.pompei.bsentity.dbmeta.*; +import jp.sf.pal.pompei.cbean.*; + + + +/** + * The behavior of NEWSLETTERS. + * + *
+ * [primary-key]
+ *     NEWSLETTERS_ID
+ * 
+ * [column-property]
+ *     NEWSLETTERS_ID, TITLE, CONTENT, MODULE, DATE_ADDED, DATE_SENT, STATUS, LOCKED
+ * 
+ * [foreign-property]
+ *     
+ * 
+ * [refferer-property]
+ *     
+ * 
+ * [sequence]
+ *     
+ * 
+ * [identity]
+ *     
+ * 
+ * [update-date]
+ *     
+ * 
+ * [version-no]
+ *     
+ * 
+ * 
+ * + * @author DBFlute(AutoGenerator) + */ +public abstract class BsNewslettersBhv extends jp.sf.pal.pompei.allcommon.bhv.AbstractBehaviorWritable { + + // =================================================================================== + // Attribute + // ========= + /** Dao instance. */ + protected NewslettersDao _dao; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + public BsNewslettersBhv() { + } + + // =================================================================================== + // Table name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + public String getTableDbName() { + return "NEWSLETTERS"; + } + + // =================================================================================== + // DBMeta + // ====== + /** + * This method implements the method that is declared at super. + * + * @return DBMeta. (NotNull) + */ + public DBMeta getDBMeta() { + return NewslettersDbm.getInstance(); + } + + /** + * Get my dbmeta. + * + * @return DBMeta. (NotNull) + */ + public NewslettersDbm getMyDBMeta() { + return NewslettersDbm.getInstance(); + } + + // =================================================================================== + // Dao Accessor + // ============ + /** + * Get my dao. + * + * @return My dao. + */ + public NewslettersDao getMyDao() { + return _dao; + } + + /** + * Set my dao. + * + * @param dao My dao. (NotNull) + */ + public void setMyDao(NewslettersDao dao) { + assertObjectNotNull("dao", dao); + _dao = dao; + } + + /** + * This method implements the method that is declared at super. + * + * @return Dao-readable. (NotNull) + */ + public DaoReadable getDaoReadable() { + return getMyDao(); + } + + /** + * This method implements the method that is declared at super. + * + * @return Dao-writable. (NotNull) + */ + public DaoWritable getDaoWritable() { + return getMyDao(); + } + + // =================================================================================== + // New Instance + // ============ + /** + * New entity. + * + * @return Entity. (NotNull) + */ + public Entity newEntity() { + return newMyEntity(); + } + + /** + * New condition-bean. + * + * @return Condition-bean. (NotNull) + */ + public ConditionBean newConditionBean() { + return newMyConditionBean(); + } + + /** + * New my entity. + * + * @return My entity. (NotNull) + */ + public Newsletters newMyEntity() { + return new Newsletters(); + } + + /** + * New my condition-bean. + * + * @return My condition-bean. (NotNull) + */ + public NewslettersCB newMyConditionBean() { + return new NewslettersCB(); + } + + // =================================================================================== + // Delegate Method + // =============== + // ----------------------------------------------------- + // Select + // ------ + /** + * Get count as all. (Delegate-Method) + * + * @return All count. (NotNull) + */ + public int delegateGetCountAll() { + return getMyDao().getCountAll(); + } + + /** + * Get list as all. (Delegate-Method) + * + * @return All list. (NotNull) + */ + public java.util.List delegateGetListAll() { + return getMyDao().getListAll(); + } + + // + // Get entity. (Delegate-Method) + // + // @param Primary-keys (NotNull) + // @return Entity. (NotNull) + // + public Newsletters delegateGetEntity(java.math.BigDecimal newslettersId) { + return getMyDao().getEntity(newslettersId); + } + + /** + * Select count by condition-bean. (Delegate-Method) + * + * @param cb Condition-bean. (NotNull) + * @return Selected count. (NotNull) + */ + public int delegateSelectCount(NewslettersCB cb) { + assertConditionBeanNotNull(cb); + return getMyDao().selectCount(cb); + } + + /** + * Select entity by condition-bean. (Delegate-Method) + * + * @param cb Condition-bean. (NotNull) + * @return Selected entity. If the select result is zero, it returns null. (Nullable) + */ + public Newsletters delegateSelectEntity(NewslettersCB cb) { + assertConditionBeanNotNull(cb); + return getMyDao().selectEntity(cb); + } + + /** + * Select list by condition-bean. (Delegate-Method) + * + * @param cb Condition-bean. (NotNull) + * @return Selected list. If the select result is zero, it returns empty list. (NotNull) + */ + public java.util.List delegateSelectList(NewslettersCB cb) { + assertConditionBeanNotNull(cb); + return getMyDao().selectList(cb); + } + + + // ----------------------------------------------------- + // Update + // ------ + /** + * Insert one entity. (Delegate-Method) + * + * @param entity Entity. (NotNull) + * @return Inserted count. + */ + public int delegateInsert(Newsletters entity) { + assertEntityNotNull(entity);// If this table use identity, the entity does not have primary-key. + filterEntityOfInsert(entity); + assertEntityOfInsert(entity); + return getMyDao().insert(entity); + } + + /** + * Update one entity. (Delegate-Method) + * {modified only} + * + * @param entity Entity. (NotNull) + * @return Updated count. + */ + public int delegateUpdate(Newsletters entity) { + assertEntityNotNullAndHasPrimaryKeyValue(entity); + filterEntityOfUpdate(entity); + assertEntityOfUpdate(entity); + return getMyDao().updateModifiedOnly(entity); + } + + /** + * Delete one entity. (Delegate-Method) + * + * @param entity Entity. (NotNull) + * @return Deleted count. + */ + public int delegateDelete(Newsletters entity) { + assertEntityNotNullAndHasPrimaryKeyValue(entity); + filterEntityOfDelete(entity); + assertEntityOfDelete(entity); + return getMyDao().delete(entity); + } + + /** + * Insert several entities. (Delegate-Method) + * + * @param entityList Entity-list. (NotNull & NotEmpty) + * @return Inserted count. + */ + public int delegateInsertList(java.util.List entityList) { + assertListNotNullAndNotEmpty(entityList); + return getMyDao().insertList(entityList); + } + + /** + * Update several entities. (Delegate-Method) + * + * @param entityList Entity-list. (NotNull & NotEmpty) + * @return Updated count. + */ + public int delegateUpdateList(java.util.List entityList) { + assertListNotNullAndNotEmpty(entityList); + return getMyDao().updateList(entityList); + } + + /** + * Delete several entities. (Delegate-Method) + * + * @param entityList Entity-list. (NotNull & NotEmpty) + * @return Deleted count. + */ + public int delegateDeleteList(java.util.List entityList) { + assertListNotNullAndNotEmpty(entityList); + return getMyDao().deleteList(entityList); + } + + // =================================================================================== + // Basic Select Count + // ================== + /** + * Select count by condition-bean. + *
+     * If the argument 'condition-bean' is effective about fetch-scope,
+     * this method invoke select count ignoring the fetch-scope.
+     * 
+ * @param cb Condition-bean. This condition-bean should not be set up about fetch-scope. (NotNull) + * @return Selected count. + */ + public int selectCount(NewslettersCB cb) { + assertConditionBeanNotNull(cb); + return delegateSelectCount(cb); + } + + // =================================================================================== + // Basic Select Entity + // =================== + /** + * Select entity by condition-bean. + * + * @param cb Condition-bean. (NotNull) + * @return Selected entity. (Nullalble) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public Newsletters selectEntity(NewslettersCB cb) { + assertConditionBeanNotNull(cb); + final java.util.List ls = selectList(cb); + if (ls.isEmpty()) { + return null; + } + assertRecordHasBeenSelectedAsOne(ls, cb); + return (Newsletters)ls.get(0); + } + + /** + * Select entity by condition-bean with deleted check. + * + * @param cb Condition-bean. (NotNull) + * @return Selected entity. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public Newsletters selectEntityWithDeletedCheck(NewslettersCB cb) { + assertConditionBeanNotNull(cb); + final java.util.List ls = selectList(cb); + assertRecordHasNotBeenDeleted(ls, cb); + assertRecordHasBeenSelectedAsOne(ls, cb); + return (Newsletters)ls.get(0); + } + + /* + * Select entity with deleted check. {by primary-key} + * + * @param primaryKey + * @return Selected entity. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public Newsletters selectByPKValueWithDeletedCheck(java.math.BigDecimal newslettersId) { + Newsletters entity = new Newsletters(); + entity.setNewslettersId(newslettersId); + final NewslettersCB cb = newMyConditionBean(); + cb.acceptPrimaryKeyMapString(getDBMeta().extractPrimaryKeyMapString(entity)); + return selectEntityWithDeletedCheck(cb); + } + + // =================================================================================== + // Basic Select List + // ================= + /** + * Select list as result-bean. + * + * @param cb Condition-bean. (NotNull) + * @return Selected list-result-bean. (NotNull) + */ + public ListResultBean selectList(NewslettersCB cb) { + assertConditionBeanNotNull(cb); + return new ResultBeanBuilder(this).buildListResultBean(cb, delegateSelectList(cb)); + } + + /** + * Select page as result-bean. + * + * @param cb Condition-bean. (NotNull) + * @return Selected paging-result-bean. (NotNull) + */ + public PagingResultBean selectPage(final NewslettersCB cb) { + assertConditionBeanNotNull(cb); + return selectPage(cb, new SelectPageSimpleInvoker(this)); + } + + /** + * Select page. + * + * @param cb Condition-bean. (NotNull) + * @param invoker Select-page-invoker (NotNull) + * @return Selected paging-result-bean. (NotNull) + */ + public PagingResultBean selectPage(final NewslettersCB cb, SelectPageInvoker invoker) { + assertConditionBeanNotNull(cb); + final SelectPageCallback pageCallback = new SelectPageCallback() { + public PagingBean getPagingBean() { return cb; } + public int selectCountIgnoreFetchScope() { + return selectCount(cb); + } + public java.util.List selectListWithFetchScope() { + return selectList(cb); + } + }; + return invoker.invokeSelectPage(pageCallback); + } + + // =================================================================================== + // Various Select + // ============== + /** + * Select value-label list. + * + * @param cb Condition-bean. (NotNull) + * @param valueLabelSetupper Value-label-setupper. (NotNull) + * @return Value-label list. (NotNull) + */ + public java.util.List> selectValueLabelList(NewslettersCB cb, ValueLabelSetupper valueLabelSetupper) { + return createValueLabelList(selectList(cb), valueLabelSetupper); + } + + // =================================================================================== + // Load Referer + // ============ + + // =================================================================================== + // Pull Out Foreign + // ================ + + // =================================================================================== + // Basic Entity Update + // =================== + /** + * Insert. + * + * @param newsletters Entity. (NotNull) + */ + public void insert(Newsletters newsletters) { + assertEntityNotNull(newsletters); + delegateInsert(newsletters); + } + + protected void doCreate(Entity newsletters) { + insert((Newsletters)newsletters); + } + + /** + * Update. + *
+     * If it updates count zero, throws exception.
+     * If concurrency control of this table is valid, this update have it.
+     * 
+ * @param newsletters Entity. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public void update(Newsletters newsletters) { + assertEntityNotNull(newsletters); + final int updatedCount = delegateUpdate(newsletters); + if (updatedCount == 0) { + throw new jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException(newsletters.toString()); + } else if (updatedCount > 1) { + String msg = "updatedCount=" + updatedCount + ": " + newsletters.toString(); + throw new jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException(msg); + } + } + + protected void doModify(Entity newsletters) { + update((Newsletters)newsletters); + } + + /** + * Update after select. + * + * @param newsletters Entity. This must contain primary-key value at least. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + */ + public void updateAfterSelect(Newsletters newsletters) { + assertEntityNotNullAndHasPrimaryKeyValue(newsletters); + final NewslettersCB cb = newMyConditionBean(); + cb.acceptPrimaryKeyMapString(getDBMeta().extractPrimaryKeyMapString(newsletters)); + final Newsletters currentEntity = selectEntityWithDeletedCheck(cb); + mergeEntity(newsletters, currentEntity); + update(currentEntity); + } + + protected void doModifyAfterSelect(Entity newsletters) { + updateAfterSelect((Newsletters)newsletters); + } + + /** + * Insert or update. + * {update: modified only} + * + * @param newsletters Entity. This should contain primary-key value at least(Except use identity). (NotNull) + */ + public void insertOrUpdate(Newsletters newsletters) { + assertEntityNotNull(newsletters); + if (!newsletters.hasPrimaryKeyValue()) { + insert(newsletters); + } else { + try { + update(newsletters); + } catch (org.seasar.dao.NotSingleRowUpdatedRuntimeException e) { + insert(newsletters); + } catch (jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException e) { + insert(newsletters); + } + } + } + + protected void doCreateOrUpdateNonstrict(Entity newsletters) { + + insertOrUpdate((Newsletters)newsletters); + + } + + /** + * Insert or update after select. + * {update: modified only} + * + * @param newsletters Entity. This should contain primary-key value at least(Except use identity). (NotNull) + */ + public void insertOrUpdateAfterSelect(Newsletters newsletters) { + assertEntityNotNull(newsletters); + if (!newsletters.hasPrimaryKeyValue()) { + insert(newsletters); + return; + } + Newsletters currentEntity = null; + try { + final NewslettersCB cb = newMyConditionBean(); + cb.acceptPrimaryKeyMapString(getDBMeta().extractPrimaryKeyMapString(newsletters)); + currentEntity = selectEntityWithDeletedCheck(cb); + } catch (jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException e) { + insert(newsletters); + return; + } + assertEntityNotNullAndHasPrimaryKeyValue(newsletters); + mergeEntity(newsletters, currentEntity); + update(currentEntity); + } + + protected void doCreateOrModifyAfterSelect(Entity entity) { + insertOrUpdateAfterSelect((Newsletters)entity); + } + + /** + * This method implements the method that is declared at super. + * + * @param sourceEntity Source entity. (NotNull) + * @param destinationEntity Destination entity. (NotNull) + */ + protected void mergeEntity(Entity sourceEntity, Entity destinationEntity) { + assertEntityNotNull(sourceEntity); + assertEntityNotNull(destinationEntity); + final Newsletters sourceMyEntity = (Newsletters)sourceEntity; + final Newsletters destinationMyEntity = (Newsletters)destinationEntity; + destinationMyEntity.clearModifiedPropertyNames(); + final java.util.Set names = sourceMyEntity.getModifiedPropertyNames(); + + if (names.contains("newslettersId")) { destinationMyEntity.setNewslettersId(sourceMyEntity.getNewslettersId()); } + if (names.contains("title")) { destinationMyEntity.setTitle(sourceMyEntity.getTitle()); } + if (names.contains("content")) { destinationMyEntity.setContent(sourceMyEntity.getContent()); } + if (names.contains("module")) { destinationMyEntity.setModule(sourceMyEntity.getModule()); } + if (names.contains("dateAdded")) { destinationMyEntity.setDateAdded(sourceMyEntity.getDateAdded()); } + if (names.contains("dateSent")) { destinationMyEntity.setDateSent(sourceMyEntity.getDateSent()); } + if (names.contains("status")) { destinationMyEntity.setStatus(sourceMyEntity.getStatus()); } + if (names.contains("locked")) { destinationMyEntity.setLocked(sourceMyEntity.getLocked()); } + + } + + /** + * Delete. + * + * @param newsletters Entity. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public void delete(Newsletters newsletters) { + assertEntityNotNull(newsletters); + final int deletedCount = delegateDelete(newsletters); + if (deletedCount == 0) { + throw new jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException(newsletters.toString()); + } else if (deletedCount > 1) { + String msg = "deletedCount=" + deletedCount + ": " + newsletters.toString(); + throw new jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException(msg); + } + } + + protected void doRemove(Entity newsletters) { + delete((Newsletters)newsletters); + } + + /** + * Delete after select. + * + * @param newsletters Entity. This must contain primary-key value at least. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + */ + public void deleteAfterSelect(Newsletters newsletters) { + assertEntityNotNullAndHasPrimaryKeyValue(newsletters); + final NewslettersCB cb = newMyConditionBean(); + cb.acceptPrimaryKeyMapString(getDBMeta().extractPrimaryKeyMapString(newsletters)); + selectEntityWithDeletedCheck(cb); + delete(newsletters); + } + + protected void doRemoveAfterSelect(Entity newsletters) { + deleteAfterSelect((Newsletters)newsletters); + } + + // =================================================================================== + // Basic Batch Update + // ================== + /** + * Insert list. + * + * @param newslettersList Entity-list. (NotNull & NotEmpty) + * @return Inserted count. + */ + public int insertList(java.util.List newslettersList) { + assertListNotNullAndNotEmpty(newslettersList); + return delegateInsertList(newslettersList); + } + + /** + * Update list. + * + * @param newslettersList Entity-list. (NotNull & NotEmpty) + * @return Updated count. + */ + public int updateList(java.util.List newslettersList) { + assertListNotNullAndNotEmpty(newslettersList); + return delegateUpdateList(newslettersList); + } + + /** + * Delete list. + * + * @param newslettersList Entity-list. (NotNull & NotEmpty) + * @return Deleted count. + */ + public int deleteList(java.util.List newslettersList) { + assertListNotNullAndNotEmpty(newslettersList); + return delegateDeleteList(newslettersList); + } + + // =================================================================================== + // Various Insert + // ============== + + // =================================================================================== + // CBSetupper + // ========== + /** + * The interface of condition-bean setupper. + */ + public static interface CBSetupper extends ConditionBeanSetupper { + + /** + * Set up condition. + * + * @param cb Condition-bean. (NotNull) + */ + public void setup(NewslettersCB cb); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/bsbhv/BsOrdersBhv.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/bsbhv/BsOrdersBhv.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/bsbhv/BsOrdersBhv.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,735 @@ + +package jp.sf.pal.pompei.bsbhv; + +import jp.sf.pal.pompei.allcommon.*; +import jp.sf.pal.pompei.allcommon.bhv.load.LoadRefererOption; +import jp.sf.pal.pompei.allcommon.bhv.setup.ConditionBeanSetupper; +import jp.sf.pal.pompei.allcommon.bhv.setup.ValueLabelSetupper; +import jp.sf.pal.pompei.allcommon.cbean.ConditionBean; +import jp.sf.pal.pompei.allcommon.cbean.ListResultBean; +import jp.sf.pal.pompei.allcommon.cbean.PagingBean; +import jp.sf.pal.pompei.allcommon.cbean.PagingResultBean; +import jp.sf.pal.pompei.allcommon.dbmeta.DBMeta; + +import jp.sf.pal.pompei.exdao.*; +import jp.sf.pal.pompei.exentity.*; +import jp.sf.pal.pompei.bsentity.dbmeta.*; +import jp.sf.pal.pompei.cbean.*; + + + +/** + * The behavior of ORDERS. + * + *
+ * [primary-key]
+ *     ORDERS_ID
+ * 
+ * [column-property]
+ *     ORDERS_ID, CUSTOMERS_ID, CUSTOMERS_NAME, CUSTOMERS_COMPANY, CUSTOMERS_STREET_ADDRESS, CUSTOMERS_SUBURB, CUSTOMERS_CITY, CUSTOMERS_POSTCODE, CUSTOMERS_STATE, CUSTOMERS_COUNTRY, CUSTOMERS_TELEPHONE, CUSTOMERS_EMAIL_ADDRESS, CUSTOMERS_ADDRESS_FORMAT_ID, DELIVERY_NAME, DELIVERY_COMPANY, DELIVERY_STREET_ADDRESS, DELIVERY_SUBURB, DELIVERY_CITY, DELIVERY_POSTCODE, DELIVERY_STATE, DELIVERY_COUNTRY, DELIVERY_ADDRESS_FORMAT_ID, BILLING_NAME, BILLING_COMPANY, BILLING_STREET_ADDRESS, BILLING_SUBURB, BILLING_CITY, BILLING_POSTCODE, BILLING_STATE, BILLING_COUNTRY, BILLING_ADDRESS_FORMAT_ID, PAYMENT_METHOD, CC_TYPE, CC_OWNER, CC_NUMBER, CC_EXPIRES, LAST_MODIFIED, DATE_PURCHASED, ORDERS_STATUS, ORDERS_DATE_FINISHED, CURRENCY, CURRENCY_VALUE
+ * 
+ * [foreign-property]
+ *     
+ * 
+ * [refferer-property]
+ *     
+ * 
+ * [sequence]
+ *     
+ * 
+ * [identity]
+ *     
+ * 
+ * [update-date]
+ *     
+ * 
+ * [version-no]
+ *     
+ * 
+ * 
+ * + * @author DBFlute(AutoGenerator) + */ +public abstract class BsOrdersBhv extends jp.sf.pal.pompei.allcommon.bhv.AbstractBehaviorWritable { + + // =================================================================================== + // Attribute + // ========= + /** Dao instance. */ + protected OrdersDao _dao; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + public BsOrdersBhv() { + } + + // =================================================================================== + // Table name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + public String getTableDbName() { + return "ORDERS"; + } + + // =================================================================================== + // DBMeta + // ====== + /** + * This method implements the method that is declared at super. + * + * @return DBMeta. (NotNull) + */ + public DBMeta getDBMeta() { + return OrdersDbm.getInstance(); + } + + /** + * Get my dbmeta. + * + * @return DBMeta. (NotNull) + */ + public OrdersDbm getMyDBMeta() { + return OrdersDbm.getInstance(); + } + + // =================================================================================== + // Dao Accessor + // ============ + /** + * Get my dao. + * + * @return My dao. + */ + public OrdersDao getMyDao() { + return _dao; + } + + /** + * Set my dao. + * + * @param dao My dao. (NotNull) + */ + public void setMyDao(OrdersDao dao) { + assertObjectNotNull("dao", dao); + _dao = dao; + } + + /** + * This method implements the method that is declared at super. + * + * @return Dao-readable. (NotNull) + */ + public DaoReadable getDaoReadable() { + return getMyDao(); + } + + /** + * This method implements the method that is declared at super. + * + * @return Dao-writable. (NotNull) + */ + public DaoWritable getDaoWritable() { + return getMyDao(); + } + + // =================================================================================== + // New Instance + // ============ + /** + * New entity. + * + * @return Entity. (NotNull) + */ + public Entity newEntity() { + return newMyEntity(); + } + + /** + * New condition-bean. + * + * @return Condition-bean. (NotNull) + */ + public ConditionBean newConditionBean() { + return newMyConditionBean(); + } + + /** + * New my entity. + * + * @return My entity. (NotNull) + */ + public Orders newMyEntity() { + return new Orders(); + } + + /** + * New my condition-bean. + * + * @return My condition-bean. (NotNull) + */ + public OrdersCB newMyConditionBean() { + return new OrdersCB(); + } + + // =================================================================================== + // Delegate Method + // =============== + // ----------------------------------------------------- + // Select + // ------ + /** + * Get count as all. (Delegate-Method) + * + * @return All count. (NotNull) + */ + public int delegateGetCountAll() { + return getMyDao().getCountAll(); + } + + /** + * Get list as all. (Delegate-Method) + * + * @return All list. (NotNull) + */ + public java.util.List delegateGetListAll() { + return getMyDao().getListAll(); + } + + // + // Get entity. (Delegate-Method) + // + // @param Primary-keys (NotNull) + // @return Entity. (NotNull) + // + public Orders delegateGetEntity(java.math.BigDecimal ordersId) { + return getMyDao().getEntity(ordersId); + } + + /** + * Select count by condition-bean. (Delegate-Method) + * + * @param cb Condition-bean. (NotNull) + * @return Selected count. (NotNull) + */ + public int delegateSelectCount(OrdersCB cb) { + assertConditionBeanNotNull(cb); + return getMyDao().selectCount(cb); + } + + /** + * Select entity by condition-bean. (Delegate-Method) + * + * @param cb Condition-bean. (NotNull) + * @return Selected entity. If the select result is zero, it returns null. (Nullable) + */ + public Orders delegateSelectEntity(OrdersCB cb) { + assertConditionBeanNotNull(cb); + return getMyDao().selectEntity(cb); + } + + /** + * Select list by condition-bean. (Delegate-Method) + * + * @param cb Condition-bean. (NotNull) + * @return Selected list. If the select result is zero, it returns empty list. (NotNull) + */ + public java.util.List delegateSelectList(OrdersCB cb) { + assertConditionBeanNotNull(cb); + return getMyDao().selectList(cb); + } + + + // ----------------------------------------------------- + // Update + // ------ + /** + * Insert one entity. (Delegate-Method) + * + * @param entity Entity. (NotNull) + * @return Inserted count. + */ + public int delegateInsert(Orders entity) { + assertEntityNotNull(entity);// If this table use identity, the entity does not have primary-key. + filterEntityOfInsert(entity); + assertEntityOfInsert(entity); + return getMyDao().insert(entity); + } + + /** + * Update one entity. (Delegate-Method) + * {modified only} + * + * @param entity Entity. (NotNull) + * @return Updated count. + */ + public int delegateUpdate(Orders entity) { + assertEntityNotNullAndHasPrimaryKeyValue(entity); + filterEntityOfUpdate(entity); + assertEntityOfUpdate(entity); + return getMyDao().updateModifiedOnly(entity); + } + + /** + * Delete one entity. (Delegate-Method) + * + * @param entity Entity. (NotNull) + * @return Deleted count. + */ + public int delegateDelete(Orders entity) { + assertEntityNotNullAndHasPrimaryKeyValue(entity); + filterEntityOfDelete(entity); + assertEntityOfDelete(entity); + return getMyDao().delete(entity); + } + + /** + * Insert several entities. (Delegate-Method) + * + * @param entityList Entity-list. (NotNull & NotEmpty) + * @return Inserted count. + */ + public int delegateInsertList(java.util.List entityList) { + assertListNotNullAndNotEmpty(entityList); + return getMyDao().insertList(entityList); + } + + /** + * Update several entities. (Delegate-Method) + * + * @param entityList Entity-list. (NotNull & NotEmpty) + * @return Updated count. + */ + public int delegateUpdateList(java.util.List entityList) { + assertListNotNullAndNotEmpty(entityList); + return getMyDao().updateList(entityList); + } + + /** + * Delete several entities. (Delegate-Method) + * + * @param entityList Entity-list. (NotNull & NotEmpty) + * @return Deleted count. + */ + public int delegateDeleteList(java.util.List entityList) { + assertListNotNullAndNotEmpty(entityList); + return getMyDao().deleteList(entityList); + } + + // =================================================================================== + // Basic Select Count + // ================== + /** + * Select count by condition-bean. + *
+     * If the argument 'condition-bean' is effective about fetch-scope,
+     * this method invoke select count ignoring the fetch-scope.
+     * 
+ * @param cb Condition-bean. This condition-bean should not be set up about fetch-scope. (NotNull) + * @return Selected count. + */ + public int selectCount(OrdersCB cb) { + assertConditionBeanNotNull(cb); + return delegateSelectCount(cb); + } + + // =================================================================================== + // Basic Select Entity + // =================== + /** + * Select entity by condition-bean. + * + * @param cb Condition-bean. (NotNull) + * @return Selected entity. (Nullalble) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public Orders selectEntity(OrdersCB cb) { + assertConditionBeanNotNull(cb); + final java.util.List ls = selectList(cb); + if (ls.isEmpty()) { + return null; + } + assertRecordHasBeenSelectedAsOne(ls, cb); + return (Orders)ls.get(0); + } + + /** + * Select entity by condition-bean with deleted check. + * + * @param cb Condition-bean. (NotNull) + * @return Selected entity. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public Orders selectEntityWithDeletedCheck(OrdersCB cb) { + assertConditionBeanNotNull(cb); + final java.util.List ls = selectList(cb); + assertRecordHasNotBeenDeleted(ls, cb); + assertRecordHasBeenSelectedAsOne(ls, cb); + return (Orders)ls.get(0); + } + + /* + * Select entity with deleted check. {by primary-key} + * + * @param primaryKey + * @return Selected entity. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public Orders selectByPKValueWithDeletedCheck(java.math.BigDecimal ordersId) { + Orders entity = new Orders(); + entity.setOrdersId(ordersId); + final OrdersCB cb = newMyConditionBean(); + cb.acceptPrimaryKeyMapString(getDBMeta().extractPrimaryKeyMapString(entity)); + return selectEntityWithDeletedCheck(cb); + } + + // =================================================================================== + // Basic Select List + // ================= + /** + * Select list as result-bean. + * + * @param cb Condition-bean. (NotNull) + * @return Selected list-result-bean. (NotNull) + */ + public ListResultBean selectList(OrdersCB cb) { + assertConditionBeanNotNull(cb); + return new ResultBeanBuilder(this).buildListResultBean(cb, delegateSelectList(cb)); + } + + /** + * Select page as result-bean. + * + * @param cb Condition-bean. (NotNull) + * @return Selected paging-result-bean. (NotNull) + */ + public PagingResultBean selectPage(final OrdersCB cb) { + assertConditionBeanNotNull(cb); + return selectPage(cb, new SelectPageSimpleInvoker(this)); + } + + /** + * Select page. + * + * @param cb Condition-bean. (NotNull) + * @param invoker Select-page-invoker (NotNull) + * @return Selected paging-result-bean. (NotNull) + */ + public PagingResultBean selectPage(final OrdersCB cb, SelectPageInvoker invoker) { + assertConditionBeanNotNull(cb); + final SelectPageCallback pageCallback = new SelectPageCallback() { + public PagingBean getPagingBean() { return cb; } + public int selectCountIgnoreFetchScope() { + return selectCount(cb); + } + public java.util.List selectListWithFetchScope() { + return selectList(cb); + } + }; + return invoker.invokeSelectPage(pageCallback); + } + + // =================================================================================== + // Various Select + // ============== + /** + * Select value-label list. + * + * @param cb Condition-bean. (NotNull) + * @param valueLabelSetupper Value-label-setupper. (NotNull) + * @return Value-label list. (NotNull) + */ + public java.util.List> selectValueLabelList(OrdersCB cb, ValueLabelSetupper valueLabelSetupper) { + return createValueLabelList(selectList(cb), valueLabelSetupper); + } + + // =================================================================================== + // Load Referer + // ============ + + // =================================================================================== + // Pull Out Foreign + // ================ + + // =================================================================================== + // Basic Entity Update + // =================== + /** + * Insert. + * + * @param orders Entity. (NotNull) + */ + public void insert(Orders orders) { + assertEntityNotNull(orders); + delegateInsert(orders); + } + + protected void doCreate(Entity orders) { + insert((Orders)orders); + } + + /** + * Update. + *
+     * If it updates count zero, throws exception.
+     * If concurrency control of this table is valid, this update have it.
+     * 
+ * @param orders Entity. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public void update(Orders orders) { + assertEntityNotNull(orders); + final int updatedCount = delegateUpdate(orders); + if (updatedCount == 0) { + throw new jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException(orders.toString()); + } else if (updatedCount > 1) { + String msg = "updatedCount=" + updatedCount + ": " + orders.toString(); + throw new jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException(msg); + } + } + + protected void doModify(Entity orders) { + update((Orders)orders); + } + + /** + * Update after select. + * + * @param orders Entity. This must contain primary-key value at least. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + */ + public void updateAfterSelect(Orders orders) { + assertEntityNotNullAndHasPrimaryKeyValue(orders); + final OrdersCB cb = newMyConditionBean(); + cb.acceptPrimaryKeyMapString(getDBMeta().extractPrimaryKeyMapString(orders)); + final Orders currentEntity = selectEntityWithDeletedCheck(cb); + mergeEntity(orders, currentEntity); + update(currentEntity); + } + + protected void doModifyAfterSelect(Entity orders) { + updateAfterSelect((Orders)orders); + } + + /** + * Insert or update. + * {update: modified only} + * + * @param orders Entity. This should contain primary-key value at least(Except use identity). (NotNull) + */ + public void insertOrUpdate(Orders orders) { + assertEntityNotNull(orders); + if (!orders.hasPrimaryKeyValue()) { + insert(orders); + } else { + try { + update(orders); + } catch (org.seasar.dao.NotSingleRowUpdatedRuntimeException e) { + insert(orders); + } catch (jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException e) { + insert(orders); + } + } + } + + protected void doCreateOrUpdateNonstrict(Entity orders) { + + insertOrUpdate((Orders)orders); + + } + + /** + * Insert or update after select. + * {update: modified only} + * + * @param orders Entity. This should contain primary-key value at least(Except use identity). (NotNull) + */ + public void insertOrUpdateAfterSelect(Orders orders) { + assertEntityNotNull(orders); + if (!orders.hasPrimaryKeyValue()) { + insert(orders); + return; + } + Orders currentEntity = null; + try { + final OrdersCB cb = newMyConditionBean(); + cb.acceptPrimaryKeyMapString(getDBMeta().extractPrimaryKeyMapString(orders)); + currentEntity = selectEntityWithDeletedCheck(cb); + } catch (jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException e) { + insert(orders); + return; + } + assertEntityNotNullAndHasPrimaryKeyValue(orders); + mergeEntity(orders, currentEntity); + update(currentEntity); + } + + protected void doCreateOrModifyAfterSelect(Entity entity) { + insertOrUpdateAfterSelect((Orders)entity); + } + + /** + * This method implements the method that is declared at super. + * + * @param sourceEntity Source entity. (NotNull) + * @param destinationEntity Destination entity. (NotNull) + */ + protected void mergeEntity(Entity sourceEntity, Entity destinationEntity) { + assertEntityNotNull(sourceEntity); + assertEntityNotNull(destinationEntity); + final Orders sourceMyEntity = (Orders)sourceEntity; + final Orders destinationMyEntity = (Orders)destinationEntity; + destinationMyEntity.clearModifiedPropertyNames(); + final java.util.Set names = sourceMyEntity.getModifiedPropertyNames(); + + if (names.contains("ordersId")) { destinationMyEntity.setOrdersId(sourceMyEntity.getOrdersId()); } + if (names.contains("customersId")) { destinationMyEntity.setCustomersId(sourceMyEntity.getCustomersId()); } + if (names.contains("customersName")) { destinationMyEntity.setCustomersName(sourceMyEntity.getCustomersName()); } + if (names.contains("customersCompany")) { destinationMyEntity.setCustomersCompany(sourceMyEntity.getCustomersCompany()); } + if (names.contains("customersStreetAddress")) { destinationMyEntity.setCustomersStreetAddress(sourceMyEntity.getCustomersStreetAddress()); } + if (names.contains("customersSuburb")) { destinationMyEntity.setCustomersSuburb(sourceMyEntity.getCustomersSuburb()); } + if (names.contains("customersCity")) { destinationMyEntity.setCustomersCity(sourceMyEntity.getCustomersCity()); } + if (names.contains("customersPostcode")) { destinationMyEntity.setCustomersPostcode(sourceMyEntity.getCustomersPostcode()); } + if (names.contains("customersState")) { destinationMyEntity.setCustomersState(sourceMyEntity.getCustomersState()); } + if (names.contains("customersCountry")) { destinationMyEntity.setCustomersCountry(sourceMyEntity.getCustomersCountry()); } + if (names.contains("customersTelephone")) { destinationMyEntity.setCustomersTelephone(sourceMyEntity.getCustomersTelephone()); } + if (names.contains("customersEmailAddress")) { destinationMyEntity.setCustomersEmailAddress(sourceMyEntity.getCustomersEmailAddress()); } + if (names.contains("customersAddressFormatId")) { destinationMyEntity.setCustomersAddressFormatId(sourceMyEntity.getCustomersAddressFormatId()); } + if (names.contains("deliveryName")) { destinationMyEntity.setDeliveryName(sourceMyEntity.getDeliveryName()); } + if (names.contains("deliveryCompany")) { destinationMyEntity.setDeliveryCompany(sourceMyEntity.getDeliveryCompany()); } + if (names.contains("deliveryStreetAddress")) { destinationMyEntity.setDeliveryStreetAddress(sourceMyEntity.getDeliveryStreetAddress()); } + if (names.contains("deliverySuburb")) { destinationMyEntity.setDeliverySuburb(sourceMyEntity.getDeliverySuburb()); } + if (names.contains("deliveryCity")) { destinationMyEntity.setDeliveryCity(sourceMyEntity.getDeliveryCity()); } + if (names.contains("deliveryPostcode")) { destinationMyEntity.setDeliveryPostcode(sourceMyEntity.getDeliveryPostcode()); } + if (names.contains("deliveryState")) { destinationMyEntity.setDeliveryState(sourceMyEntity.getDeliveryState()); } + if (names.contains("deliveryCountry")) { destinationMyEntity.setDeliveryCountry(sourceMyEntity.getDeliveryCountry()); } + if (names.contains("deliveryAddressFormatId")) { destinationMyEntity.setDeliveryAddressFormatId(sourceMyEntity.getDeliveryAddressFormatId()); } + if (names.contains("billingName")) { destinationMyEntity.setBillingName(sourceMyEntity.getBillingName()); } + if (names.contains("billingCompany")) { destinationMyEntity.setBillingCompany(sourceMyEntity.getBillingCompany()); } + if (names.contains("billingStreetAddress")) { destinationMyEntity.setBillingStreetAddress(sourceMyEntity.getBillingStreetAddress()); } + if (names.contains("billingSuburb")) { destinationMyEntity.setBillingSuburb(sourceMyEntity.getBillingSuburb()); } + if (names.contains("billingCity")) { destinationMyEntity.setBillingCity(sourceMyEntity.getBillingCity()); } + if (names.contains("billingPostcode")) { destinationMyEntity.setBillingPostcode(sourceMyEntity.getBillingPostcode()); } + if (names.contains("billingState")) { destinationMyEntity.setBillingState(sourceMyEntity.getBillingState()); } + if (names.contains("billingCountry")) { destinationMyEntity.setBillingCountry(sourceMyEntity.getBillingCountry()); } + if (names.contains("billingAddressFormatId")) { destinationMyEntity.setBillingAddressFormatId(sourceMyEntity.getBillingAddressFormatId()); } + if (names.contains("paymentMethod")) { destinationMyEntity.setPaymentMethod(sourceMyEntity.getPaymentMethod()); } + if (names.contains("ccType")) { destinationMyEntity.setCcType(sourceMyEntity.getCcType()); } + if (names.contains("ccOwner")) { destinationMyEntity.setCcOwner(sourceMyEntity.getCcOwner()); } + if (names.contains("ccNumber")) { destinationMyEntity.setCcNumber(sourceMyEntity.getCcNumber()); } + if (names.contains("ccExpires")) { destinationMyEntity.setCcExpires(sourceMyEntity.getCcExpires()); } + if (names.contains("lastModified")) { destinationMyEntity.setLastModified(sourceMyEntity.getLastModified()); } + if (names.contains("datePurchased")) { destinationMyEntity.setDatePurchased(sourceMyEntity.getDatePurchased()); } + if (names.contains("ordersStatus")) { destinationMyEntity.setOrdersStatus(sourceMyEntity.getOrdersStatus()); } + if (names.contains("ordersDateFinished")) { destinationMyEntity.setOrdersDateFinished(sourceMyEntity.getOrdersDateFinished()); } + if (names.contains("currency")) { destinationMyEntity.setCurrency(sourceMyEntity.getCurrency()); } + if (names.contains("currencyValue")) { destinationMyEntity.setCurrencyValue(sourceMyEntity.getCurrencyValue()); } + + } + + /** + * Delete. + * + * @param orders Entity. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public void delete(Orders orders) { + assertEntityNotNull(orders); + final int deletedCount = delegateDelete(orders); + if (deletedCount == 0) { + throw new jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException(orders.toString()); + } else if (deletedCount > 1) { + String msg = "deletedCount=" + deletedCount + ": " + orders.toString(); + throw new jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException(msg); + } + } + + protected void doRemove(Entity orders) { + delete((Orders)orders); + } + + /** + * Delete after select. + * + * @param orders Entity. This must contain primary-key value at least. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + */ + public void deleteAfterSelect(Orders orders) { + assertEntityNotNullAndHasPrimaryKeyValue(orders); + final OrdersCB cb = newMyConditionBean(); + cb.acceptPrimaryKeyMapString(getDBMeta().extractPrimaryKeyMapString(orders)); + selectEntityWithDeletedCheck(cb); + delete(orders); + } + + protected void doRemoveAfterSelect(Entity orders) { + deleteAfterSelect((Orders)orders); + } + + // =================================================================================== + // Basic Batch Update + // ================== + /** + * Insert list. + * + * @param ordersList Entity-list. (NotNull & NotEmpty) + * @return Inserted count. + */ + public int insertList(java.util.List ordersList) { + assertListNotNullAndNotEmpty(ordersList); + return delegateInsertList(ordersList); + } + + /** + * Update list. + * + * @param ordersList Entity-list. (NotNull & NotEmpty) + * @return Updated count. + */ + public int updateList(java.util.List ordersList) { + assertListNotNullAndNotEmpty(ordersList); + return delegateUpdateList(ordersList); + } + + /** + * Delete list. + * + * @param ordersList Entity-list. (NotNull & NotEmpty) + * @return Deleted count. + */ + public int deleteList(java.util.List ordersList) { + assertListNotNullAndNotEmpty(ordersList); + return delegateDeleteList(ordersList); + } + + // =================================================================================== + // Various Insert + // ============== + + // =================================================================================== + // CBSetupper + // ========== + /** + * The interface of condition-bean setupper. + */ + public static interface CBSetupper extends ConditionBeanSetupper { + + /** + * Set up condition. + * + * @param cb Condition-bean. (NotNull) + */ + public void setup(OrdersCB cb); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/bsbhv/BsOrdersProductsAttributesBhv.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/bsbhv/BsOrdersProductsAttributesBhv.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/bsbhv/BsOrdersProductsAttributesBhv.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,700 @@ + +package jp.sf.pal.pompei.bsbhv; + +import jp.sf.pal.pompei.allcommon.*; +import jp.sf.pal.pompei.allcommon.bhv.load.LoadRefererOption; +import jp.sf.pal.pompei.allcommon.bhv.setup.ConditionBeanSetupper; +import jp.sf.pal.pompei.allcommon.bhv.setup.ValueLabelSetupper; +import jp.sf.pal.pompei.allcommon.cbean.ConditionBean; +import jp.sf.pal.pompei.allcommon.cbean.ListResultBean; +import jp.sf.pal.pompei.allcommon.cbean.PagingBean; +import jp.sf.pal.pompei.allcommon.cbean.PagingResultBean; +import jp.sf.pal.pompei.allcommon.dbmeta.DBMeta; + +import jp.sf.pal.pompei.exdao.*; +import jp.sf.pal.pompei.exentity.*; +import jp.sf.pal.pompei.bsentity.dbmeta.*; +import jp.sf.pal.pompei.cbean.*; + + + +/** + * The behavior of ORDERS_PRODUCTS_ATTRIBUTES. + * + *
+ * [primary-key]
+ *     ORDERS_PRODUCTS_ATTRIBUTES_ID
+ * 
+ * [column-property]
+ *     ORDERS_PRODUCTS_ATTRIBUTES_ID, ORDERS_ID, ORDERS_PRODUCTS_ID, PRODUCTS_OPTIONS, PRODUCTS_OPTIONS_VALUES, OPTIONS_VALUES_PRICE, PRICE_PREFIX
+ * 
+ * [foreign-property]
+ *     
+ * 
+ * [refferer-property]
+ *     
+ * 
+ * [sequence]
+ *     
+ * 
+ * [identity]
+ *     
+ * 
+ * [update-date]
+ *     
+ * 
+ * [version-no]
+ *     
+ * 
+ * 
+ * + * @author DBFlute(AutoGenerator) + */ +public abstract class BsOrdersProductsAttributesBhv extends jp.sf.pal.pompei.allcommon.bhv.AbstractBehaviorWritable { + + // =================================================================================== + // Attribute + // ========= + /** Dao instance. */ + protected OrdersProductsAttributesDao _dao; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + public BsOrdersProductsAttributesBhv() { + } + + // =================================================================================== + // Table name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + public String getTableDbName() { + return "ORDERS_PRODUCTS_ATTRIBUTES"; + } + + // =================================================================================== + // DBMeta + // ====== + /** + * This method implements the method that is declared at super. + * + * @return DBMeta. (NotNull) + */ + public DBMeta getDBMeta() { + return OrdersProductsAttributesDbm.getInstance(); + } + + /** + * Get my dbmeta. + * + * @return DBMeta. (NotNull) + */ + public OrdersProductsAttributesDbm getMyDBMeta() { + return OrdersProductsAttributesDbm.getInstance(); + } + + // =================================================================================== + // Dao Accessor + // ============ + /** + * Get my dao. + * + * @return My dao. + */ + public OrdersProductsAttributesDao getMyDao() { + return _dao; + } + + /** + * Set my dao. + * + * @param dao My dao. (NotNull) + */ + public void setMyDao(OrdersProductsAttributesDao dao) { + assertObjectNotNull("dao", dao); + _dao = dao; + } + + /** + * This method implements the method that is declared at super. + * + * @return Dao-readable. (NotNull) + */ + public DaoReadable getDaoReadable() { + return getMyDao(); + } + + /** + * This method implements the method that is declared at super. + * + * @return Dao-writable. (NotNull) + */ + public DaoWritable getDaoWritable() { + return getMyDao(); + } + + // =================================================================================== + // New Instance + // ============ + /** + * New entity. + * + * @return Entity. (NotNull) + */ + public Entity newEntity() { + return newMyEntity(); + } + + /** + * New condition-bean. + * + * @return Condition-bean. (NotNull) + */ + public ConditionBean newConditionBean() { + return newMyConditionBean(); + } + + /** + * New my entity. + * + * @return My entity. (NotNull) + */ + public OrdersProductsAttributes newMyEntity() { + return new OrdersProductsAttributes(); + } + + /** + * New my condition-bean. + * + * @return My condition-bean. (NotNull) + */ + public OrdersProductsAttributesCB newMyConditionBean() { + return new OrdersProductsAttributesCB(); + } + + // =================================================================================== + // Delegate Method + // =============== + // ----------------------------------------------------- + // Select + // ------ + /** + * Get count as all. (Delegate-Method) + * + * @return All count. (NotNull) + */ + public int delegateGetCountAll() { + return getMyDao().getCountAll(); + } + + /** + * Get list as all. (Delegate-Method) + * + * @return All list. (NotNull) + */ + public java.util.List delegateGetListAll() { + return getMyDao().getListAll(); + } + + // + // Get entity. (Delegate-Method) + // + // @param Primary-keys (NotNull) + // @return Entity. (NotNull) + // + public OrdersProductsAttributes delegateGetEntity(java.math.BigDecimal ordersProductsAttributesId) { + return getMyDao().getEntity(ordersProductsAttributesId); + } + + /** + * Select count by condition-bean. (Delegate-Method) + * + * @param cb Condition-bean. (NotNull) + * @return Selected count. (NotNull) + */ + public int delegateSelectCount(OrdersProductsAttributesCB cb) { + assertConditionBeanNotNull(cb); + return getMyDao().selectCount(cb); + } + + /** + * Select entity by condition-bean. (Delegate-Method) + * + * @param cb Condition-bean. (NotNull) + * @return Selected entity. If the select result is zero, it returns null. (Nullable) + */ + public OrdersProductsAttributes delegateSelectEntity(OrdersProductsAttributesCB cb) { + assertConditionBeanNotNull(cb); + return getMyDao().selectEntity(cb); + } + + /** + * Select list by condition-bean. (Delegate-Method) + * + * @param cb Condition-bean. (NotNull) + * @return Selected list. If the select result is zero, it returns empty list. (NotNull) + */ + public java.util.List delegateSelectList(OrdersProductsAttributesCB cb) { + assertConditionBeanNotNull(cb); + return getMyDao().selectList(cb); + } + + + // ----------------------------------------------------- + // Update + // ------ + /** + * Insert one entity. (Delegate-Method) + * + * @param entity Entity. (NotNull) + * @return Inserted count. + */ + public int delegateInsert(OrdersProductsAttributes entity) { + assertEntityNotNull(entity);// If this table use identity, the entity does not have primary-key. + filterEntityOfInsert(entity); + assertEntityOfInsert(entity); + return getMyDao().insert(entity); + } + + /** + * Update one entity. (Delegate-Method) + * {modified only} + * + * @param entity Entity. (NotNull) + * @return Updated count. + */ + public int delegateUpdate(OrdersProductsAttributes entity) { + assertEntityNotNullAndHasPrimaryKeyValue(entity); + filterEntityOfUpdate(entity); + assertEntityOfUpdate(entity); + return getMyDao().updateModifiedOnly(entity); + } + + /** + * Delete one entity. (Delegate-Method) + * + * @param entity Entity. (NotNull) + * @return Deleted count. + */ + public int delegateDelete(OrdersProductsAttributes entity) { + assertEntityNotNullAndHasPrimaryKeyValue(entity); + filterEntityOfDelete(entity); + assertEntityOfDelete(entity); + return getMyDao().delete(entity); + } + + /** + * Insert several entities. (Delegate-Method) + * + * @param entityList Entity-list. (NotNull & NotEmpty) + * @return Inserted count. + */ + public int delegateInsertList(java.util.List entityList) { + assertListNotNullAndNotEmpty(entityList); + return getMyDao().insertList(entityList); + } + + /** + * Update several entities. (Delegate-Method) + * + * @param entityList Entity-list. (NotNull & NotEmpty) + * @return Updated count. + */ + public int delegateUpdateList(java.util.List entityList) { + assertListNotNullAndNotEmpty(entityList); + return getMyDao().updateList(entityList); + } + + /** + * Delete several entities. (Delegate-Method) + * + * @param entityList Entity-list. (NotNull & NotEmpty) + * @return Deleted count. + */ + public int delegateDeleteList(java.util.List entityList) { + assertListNotNullAndNotEmpty(entityList); + return getMyDao().deleteList(entityList); + } + + // =================================================================================== + // Basic Select Count + // ================== + /** + * Select count by condition-bean. + *
+     * If the argument 'condition-bean' is effective about fetch-scope,
+     * this method invoke select count ignoring the fetch-scope.
+     * 
+ * @param cb Condition-bean. This condition-bean should not be set up about fetch-scope. (NotNull) + * @return Selected count. + */ + public int selectCount(OrdersProductsAttributesCB cb) { + assertConditionBeanNotNull(cb); + return delegateSelectCount(cb); + } + + // =================================================================================== + // Basic Select Entity + // =================== + /** + * Select entity by condition-bean. + * + * @param cb Condition-bean. (NotNull) + * @return Selected entity. (Nullalble) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public OrdersProductsAttributes selectEntity(OrdersProductsAttributesCB cb) { + assertConditionBeanNotNull(cb); + final java.util.List ls = selectList(cb); + if (ls.isEmpty()) { + return null; + } + assertRecordHasBeenSelectedAsOne(ls, cb); + return (OrdersProductsAttributes)ls.get(0); + } + + /** + * Select entity by condition-bean with deleted check. + * + * @param cb Condition-bean. (NotNull) + * @return Selected entity. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public OrdersProductsAttributes selectEntityWithDeletedCheck(OrdersProductsAttributesCB cb) { + assertConditionBeanNotNull(cb); + final java.util.List ls = selectList(cb); + assertRecordHasNotBeenDeleted(ls, cb); + assertRecordHasBeenSelectedAsOne(ls, cb); + return (OrdersProductsAttributes)ls.get(0); + } + + /* + * Select entity with deleted check. {by primary-key} + * + * @param primaryKey + * @return Selected entity. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public OrdersProductsAttributes selectByPKValueWithDeletedCheck(java.math.BigDecimal ordersProductsAttributesId) { + OrdersProductsAttributes entity = new OrdersProductsAttributes(); + entity.setOrdersProductsAttributesId(ordersProductsAttributesId); + final OrdersProductsAttributesCB cb = newMyConditionBean(); + cb.acceptPrimaryKeyMapString(getDBMeta().extractPrimaryKeyMapString(entity)); + return selectEntityWithDeletedCheck(cb); + } + + // =================================================================================== + // Basic Select List + // ================= + /** + * Select list as result-bean. + * + * @param cb Condition-bean. (NotNull) + * @return Selected list-result-bean. (NotNull) + */ + public ListResultBean selectList(OrdersProductsAttributesCB cb) { + assertConditionBeanNotNull(cb); + return new ResultBeanBuilder(this).buildListResultBean(cb, delegateSelectList(cb)); + } + + /** + * Select page as result-bean. + * + * @param cb Condition-bean. (NotNull) + * @return Selected paging-result-bean. (NotNull) + */ + public PagingResultBean selectPage(final OrdersProductsAttributesCB cb) { + assertConditionBeanNotNull(cb); + return selectPage(cb, new SelectPageSimpleInvoker(this)); + } + + /** + * Select page. + * + * @param cb Condition-bean. (NotNull) + * @param invoker Select-page-invoker (NotNull) + * @return Selected paging-result-bean. (NotNull) + */ + public PagingResultBean selectPage(final OrdersProductsAttributesCB cb, SelectPageInvoker invoker) { + assertConditionBeanNotNull(cb); + final SelectPageCallback pageCallback = new SelectPageCallback() { + public PagingBean getPagingBean() { return cb; } + public int selectCountIgnoreFetchScope() { + return selectCount(cb); + } + public java.util.List selectListWithFetchScope() { + return selectList(cb); + } + }; + return invoker.invokeSelectPage(pageCallback); + } + + // =================================================================================== + // Various Select + // ============== + /** + * Select value-label list. + * + * @param cb Condition-bean. (NotNull) + * @param valueLabelSetupper Value-label-setupper. (NotNull) + * @return Value-label list. (NotNull) + */ + public java.util.List> selectValueLabelList(OrdersProductsAttributesCB cb, ValueLabelSetupper valueLabelSetupper) { + return createValueLabelList(selectList(cb), valueLabelSetupper); + } + + // =================================================================================== + // Load Referer + // ============ + + // =================================================================================== + // Pull Out Foreign + // ================ + + // =================================================================================== + // Basic Entity Update + // =================== + /** + * Insert. + * + * @param ordersProductsAttributes Entity. (NotNull) + */ + public void insert(OrdersProductsAttributes ordersProductsAttributes) { + assertEntityNotNull(ordersProductsAttributes); + delegateInsert(ordersProductsAttributes); + } + + protected void doCreate(Entity ordersProductsAttributes) { + insert((OrdersProductsAttributes)ordersProductsAttributes); + } + + /** + * Update. + *
+     * If it updates count zero, throws exception.
+     * If concurrency control of this table is valid, this update have it.
+     * 
+ * @param ordersProductsAttributes Entity. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public void update(OrdersProductsAttributes ordersProductsAttributes) { + assertEntityNotNull(ordersProductsAttributes); + final int updatedCount = delegateUpdate(ordersProductsAttributes); + if (updatedCount == 0) { + throw new jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException(ordersProductsAttributes.toString()); + } else if (updatedCount > 1) { + String msg = "updatedCount=" + updatedCount + ": " + ordersProductsAttributes.toString(); + throw new jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException(msg); + } + } + + protected void doModify(Entity ordersProductsAttributes) { + update((OrdersProductsAttributes)ordersProductsAttributes); + } + + /** + * Update after select. + * + * @param ordersProductsAttributes Entity. This must contain primary-key value at least. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + */ + public void updateAfterSelect(OrdersProductsAttributes ordersProductsAttributes) { + assertEntityNotNullAndHasPrimaryKeyValue(ordersProductsAttributes); + final OrdersProductsAttributesCB cb = newMyConditionBean(); + cb.acceptPrimaryKeyMapString(getDBMeta().extractPrimaryKeyMapString(ordersProductsAttributes)); + final OrdersProductsAttributes currentEntity = selectEntityWithDeletedCheck(cb); + mergeEntity(ordersProductsAttributes, currentEntity); + update(currentEntity); + } + + protected void doModifyAfterSelect(Entity ordersProductsAttributes) { + updateAfterSelect((OrdersProductsAttributes)ordersProductsAttributes); + } + + /** + * Insert or update. + * {update: modified only} + * + * @param ordersProductsAttributes Entity. This should contain primary-key value at least(Except use identity). (NotNull) + */ + public void insertOrUpdate(OrdersProductsAttributes ordersProductsAttributes) { + assertEntityNotNull(ordersProductsAttributes); + if (!ordersProductsAttributes.hasPrimaryKeyValue()) { + insert(ordersProductsAttributes); + } else { + try { + update(ordersProductsAttributes); + } catch (org.seasar.dao.NotSingleRowUpdatedRuntimeException e) { + insert(ordersProductsAttributes); + } catch (jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException e) { + insert(ordersProductsAttributes); + } + } + } + + protected void doCreateOrUpdateNonstrict(Entity ordersProductsAttributes) { + + insertOrUpdate((OrdersProductsAttributes)ordersProductsAttributes); + + } + + /** + * Insert or update after select. + * {update: modified only} + * + * @param ordersProductsAttributes Entity. This should contain primary-key value at least(Except use identity). (NotNull) + */ + public void insertOrUpdateAfterSelect(OrdersProductsAttributes ordersProductsAttributes) { + assertEntityNotNull(ordersProductsAttributes); + if (!ordersProductsAttributes.hasPrimaryKeyValue()) { + insert(ordersProductsAttributes); + return; + } + OrdersProductsAttributes currentEntity = null; + try { + final OrdersProductsAttributesCB cb = newMyConditionBean(); + cb.acceptPrimaryKeyMapString(getDBMeta().extractPrimaryKeyMapString(ordersProductsAttributes)); + currentEntity = selectEntityWithDeletedCheck(cb); + } catch (jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException e) { + insert(ordersProductsAttributes); + return; + } + assertEntityNotNullAndHasPrimaryKeyValue(ordersProductsAttributes); + mergeEntity(ordersProductsAttributes, currentEntity); + update(currentEntity); + } + + protected void doCreateOrModifyAfterSelect(Entity entity) { + insertOrUpdateAfterSelect((OrdersProductsAttributes)entity); + } + + /** + * This method implements the method that is declared at super. + * + * @param sourceEntity Source entity. (NotNull) + * @param destinationEntity Destination entity. (NotNull) + */ + protected void mergeEntity(Entity sourceEntity, Entity destinationEntity) { + assertEntityNotNull(sourceEntity); + assertEntityNotNull(destinationEntity); + final OrdersProductsAttributes sourceMyEntity = (OrdersProductsAttributes)sourceEntity; + final OrdersProductsAttributes destinationMyEntity = (OrdersProductsAttributes)destinationEntity; + destinationMyEntity.clearModifiedPropertyNames(); + final java.util.Set names = sourceMyEntity.getModifiedPropertyNames(); + + if (names.contains("ordersProductsAttributesId")) { destinationMyEntity.setOrdersProductsAttributesId(sourceMyEntity.getOrdersProductsAttributesId()); } + if (names.contains("ordersId")) { destinationMyEntity.setOrdersId(sourceMyEntity.getOrdersId()); } + if (names.contains("ordersProductsId")) { destinationMyEntity.setOrdersProductsId(sourceMyEntity.getOrdersProductsId()); } + if (names.contains("productsOptions")) { destinationMyEntity.setProductsOptions(sourceMyEntity.getProductsOptions()); } + if (names.contains("productsOptionsValues")) { destinationMyEntity.setProductsOptionsValues(sourceMyEntity.getProductsOptionsValues()); } + if (names.contains("optionsValuesPrice")) { destinationMyEntity.setOptionsValuesPrice(sourceMyEntity.getOptionsValuesPrice()); } + if (names.contains("pricePrefix")) { destinationMyEntity.setPricePrefix(sourceMyEntity.getPricePrefix()); } + + } + + /** + * Delete. + * + * @param ordersProductsAttributes Entity. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public void delete(OrdersProductsAttributes ordersProductsAttributes) { + assertEntityNotNull(ordersProductsAttributes); + final int deletedCount = delegateDelete(ordersProductsAttributes); + if (deletedCount == 0) { + throw new jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException(ordersProductsAttributes.toString()); + } else if (deletedCount > 1) { + String msg = "deletedCount=" + deletedCount + ": " + ordersProductsAttributes.toString(); + throw new jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException(msg); + } + } + + protected void doRemove(Entity ordersProductsAttributes) { + delete((OrdersProductsAttributes)ordersProductsAttributes); + } + + /** + * Delete after select. + * + * @param ordersProductsAttributes Entity. This must contain primary-key value at least. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + */ + public void deleteAfterSelect(OrdersProductsAttributes ordersProductsAttributes) { + assertEntityNotNullAndHasPrimaryKeyValue(ordersProductsAttributes); + final OrdersProductsAttributesCB cb = newMyConditionBean(); + cb.acceptPrimaryKeyMapString(getDBMeta().extractPrimaryKeyMapString(ordersProductsAttributes)); + selectEntityWithDeletedCheck(cb); + delete(ordersProductsAttributes); + } + + protected void doRemoveAfterSelect(Entity ordersProductsAttributes) { + deleteAfterSelect((OrdersProductsAttributes)ordersProductsAttributes); + } + + // =================================================================================== + // Basic Batch Update + // ================== + /** + * Insert list. + * + * @param ordersProductsAttributesList Entity-list. (NotNull & NotEmpty) + * @return Inserted count. + */ + public int insertList(java.util.List ordersProductsAttributesList) { + assertListNotNullAndNotEmpty(ordersProductsAttributesList); + return delegateInsertList(ordersProductsAttributesList); + } + + /** + * Update list. + * + * @param ordersProductsAttributesList Entity-list. (NotNull & NotEmpty) + * @return Updated count. + */ + public int updateList(java.util.List ordersProductsAttributesList) { + assertListNotNullAndNotEmpty(ordersProductsAttributesList); + return delegateUpdateList(ordersProductsAttributesList); + } + + /** + * Delete list. + * + * @param ordersProductsAttributesList Entity-list. (NotNull & NotEmpty) + * @return Deleted count. + */ + public int deleteList(java.util.List ordersProductsAttributesList) { + assertListNotNullAndNotEmpty(ordersProductsAttributesList); + return delegateDeleteList(ordersProductsAttributesList); + } + + // =================================================================================== + // Various Insert + // ============== + + // =================================================================================== + // CBSetupper + // ========== + /** + * The interface of condition-bean setupper. + */ + public static interface CBSetupper extends ConditionBeanSetupper { + + /** + * Set up condition. + * + * @param cb Condition-bean. (NotNull) + */ + public void setup(OrdersProductsAttributesCB cb); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/bsbhv/BsOrdersProductsBhv.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/bsbhv/BsOrdersProductsBhv.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/bsbhv/BsOrdersProductsBhv.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,702 @@ + +package jp.sf.pal.pompei.bsbhv; + +import jp.sf.pal.pompei.allcommon.*; +import jp.sf.pal.pompei.allcommon.bhv.load.LoadRefererOption; +import jp.sf.pal.pompei.allcommon.bhv.setup.ConditionBeanSetupper; +import jp.sf.pal.pompei.allcommon.bhv.setup.ValueLabelSetupper; +import jp.sf.pal.pompei.allcommon.cbean.ConditionBean; +import jp.sf.pal.pompei.allcommon.cbean.ListResultBean; +import jp.sf.pal.pompei.allcommon.cbean.PagingBean; +import jp.sf.pal.pompei.allcommon.cbean.PagingResultBean; +import jp.sf.pal.pompei.allcommon.dbmeta.DBMeta; + +import jp.sf.pal.pompei.exdao.*; +import jp.sf.pal.pompei.exentity.*; +import jp.sf.pal.pompei.bsentity.dbmeta.*; +import jp.sf.pal.pompei.cbean.*; + + + +/** + * The behavior of ORDERS_PRODUCTS. + * + *
+ * [primary-key]
+ *     ORDERS_PRODUCTS_ID
+ * 
+ * [column-property]
+ *     ORDERS_PRODUCTS_ID, ORDERS_ID, PRODUCTS_ID, PRODUCTS_MODEL, PRODUCTS_NAME, PRODUCTS_PRICE, FINAL_PRICE, PRODUCTS_TAX, PRODUCTS_QUANTITY
+ * 
+ * [foreign-property]
+ *     
+ * 
+ * [refferer-property]
+ *     
+ * 
+ * [sequence]
+ *     
+ * 
+ * [identity]
+ *     
+ * 
+ * [update-date]
+ *     
+ * 
+ * [version-no]
+ *     
+ * 
+ * 
+ * + * @author DBFlute(AutoGenerator) + */ +public abstract class BsOrdersProductsBhv extends jp.sf.pal.pompei.allcommon.bhv.AbstractBehaviorWritable { + + // =================================================================================== + // Attribute + // ========= + /** Dao instance. */ + protected OrdersProductsDao _dao; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + public BsOrdersProductsBhv() { + } + + // =================================================================================== + // Table name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + public String getTableDbName() { + return "ORDERS_PRODUCTS"; + } + + // =================================================================================== + // DBMeta + // ====== + /** + * This method implements the method that is declared at super. + * + * @return DBMeta. (NotNull) + */ + public DBMeta getDBMeta() { + return OrdersProductsDbm.getInstance(); + } + + /** + * Get my dbmeta. + * + * @return DBMeta. (NotNull) + */ + public OrdersProductsDbm getMyDBMeta() { + return OrdersProductsDbm.getInstance(); + } + + // =================================================================================== + // Dao Accessor + // ============ + /** + * Get my dao. + * + * @return My dao. + */ + public OrdersProductsDao getMyDao() { + return _dao; + } + + /** + * Set my dao. + * + * @param dao My dao. (NotNull) + */ + public void setMyDao(OrdersProductsDao dao) { + assertObjectNotNull("dao", dao); + _dao = dao; + } + + /** + * This method implements the method that is declared at super. + * + * @return Dao-readable. (NotNull) + */ + public DaoReadable getDaoReadable() { + return getMyDao(); + } + + /** + * This method implements the method that is declared at super. + * + * @return Dao-writable. (NotNull) + */ + public DaoWritable getDaoWritable() { + return getMyDao(); + } + + // =================================================================================== + // New Instance + // ============ + /** + * New entity. + * + * @return Entity. (NotNull) + */ + public Entity newEntity() { + return newMyEntity(); + } + + /** + * New condition-bean. + * + * @return Condition-bean. (NotNull) + */ + public ConditionBean newConditionBean() { + return newMyConditionBean(); + } + + /** + * New my entity. + * + * @return My entity. (NotNull) + */ + public OrdersProducts newMyEntity() { + return new OrdersProducts(); + } + + /** + * New my condition-bean. + * + * @return My condition-bean. (NotNull) + */ + public OrdersProductsCB newMyConditionBean() { + return new OrdersProductsCB(); + } + + // =================================================================================== + // Delegate Method + // =============== + // ----------------------------------------------------- + // Select + // ------ + /** + * Get count as all. (Delegate-Method) + * + * @return All count. (NotNull) + */ + public int delegateGetCountAll() { + return getMyDao().getCountAll(); + } + + /** + * Get list as all. (Delegate-Method) + * + * @return All list. (NotNull) + */ + public java.util.List delegateGetListAll() { + return getMyDao().getListAll(); + } + + // + // Get entity. (Delegate-Method) + // + // @param Primary-keys (NotNull) + // @return Entity. (NotNull) + // + public OrdersProducts delegateGetEntity(java.math.BigDecimal ordersProductsId) { + return getMyDao().getEntity(ordersProductsId); + } + + /** + * Select count by condition-bean. (Delegate-Method) + * + * @param cb Condition-bean. (NotNull) + * @return Selected count. (NotNull) + */ + public int delegateSelectCount(OrdersProductsCB cb) { + assertConditionBeanNotNull(cb); + return getMyDao().selectCount(cb); + } + + /** + * Select entity by condition-bean. (Delegate-Method) + * + * @param cb Condition-bean. (NotNull) + * @return Selected entity. If the select result is zero, it returns null. (Nullable) + */ + public OrdersProducts delegateSelectEntity(OrdersProductsCB cb) { + assertConditionBeanNotNull(cb); + return getMyDao().selectEntity(cb); + } + + /** + * Select list by condition-bean. (Delegate-Method) + * + * @param cb Condition-bean. (NotNull) + * @return Selected list. If the select result is zero, it returns empty list. (NotNull) + */ + public java.util.List delegateSelectList(OrdersProductsCB cb) { + assertConditionBeanNotNull(cb); + return getMyDao().selectList(cb); + } + + + // ----------------------------------------------------- + // Update + // ------ + /** + * Insert one entity. (Delegate-Method) + * + * @param entity Entity. (NotNull) + * @return Inserted count. + */ + public int delegateInsert(OrdersProducts entity) { + assertEntityNotNull(entity);// If this table use identity, the entity does not have primary-key. + filterEntityOfInsert(entity); + assertEntityOfInsert(entity); + return getMyDao().insert(entity); + } + + /** + * Update one entity. (Delegate-Method) + * {modified only} + * + * @param entity Entity. (NotNull) + * @return Updated count. + */ + public int delegateUpdate(OrdersProducts entity) { + assertEntityNotNullAndHasPrimaryKeyValue(entity); + filterEntityOfUpdate(entity); + assertEntityOfUpdate(entity); + return getMyDao().updateModifiedOnly(entity); + } + + /** + * Delete one entity. (Delegate-Method) + * + * @param entity Entity. (NotNull) + * @return Deleted count. + */ + public int delegateDelete(OrdersProducts entity) { + assertEntityNotNullAndHasPrimaryKeyValue(entity); + filterEntityOfDelete(entity); + assertEntityOfDelete(entity); + return getMyDao().delete(entity); + } + + /** + * Insert several entities. (Delegate-Method) + * + * @param entityList Entity-list. (NotNull & NotEmpty) + * @return Inserted count. + */ + public int delegateInsertList(java.util.List entityList) { + assertListNotNullAndNotEmpty(entityList); + return getMyDao().insertList(entityList); + } + + /** + * Update several entities. (Delegate-Method) + * + * @param entityList Entity-list. (NotNull & NotEmpty) + * @return Updated count. + */ + public int delegateUpdateList(java.util.List entityList) { + assertListNotNullAndNotEmpty(entityList); + return getMyDao().updateList(entityList); + } + + /** + * Delete several entities. (Delegate-Method) + * + * @param entityList Entity-list. (NotNull & NotEmpty) + * @return Deleted count. + */ + public int delegateDeleteList(java.util.List entityList) { + assertListNotNullAndNotEmpty(entityList); + return getMyDao().deleteList(entityList); + } + + // =================================================================================== + // Basic Select Count + // ================== + /** + * Select count by condition-bean. + *
+     * If the argument 'condition-bean' is effective about fetch-scope,
+     * this method invoke select count ignoring the fetch-scope.
+     * 
+ * @param cb Condition-bean. This condition-bean should not be set up about fetch-scope. (NotNull) + * @return Selected count. + */ + public int selectCount(OrdersProductsCB cb) { + assertConditionBeanNotNull(cb); + return delegateSelectCount(cb); + } + + // =================================================================================== + // Basic Select Entity + // =================== + /** + * Select entity by condition-bean. + * + * @param cb Condition-bean. (NotNull) + * @return Selected entity. (Nullalble) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public OrdersProducts selectEntity(OrdersProductsCB cb) { + assertConditionBeanNotNull(cb); + final java.util.List ls = selectList(cb); + if (ls.isEmpty()) { + return null; + } + assertRecordHasBeenSelectedAsOne(ls, cb); + return (OrdersProducts)ls.get(0); + } + + /** + * Select entity by condition-bean with deleted check. + * + * @param cb Condition-bean. (NotNull) + * @return Selected entity. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public OrdersProducts selectEntityWithDeletedCheck(OrdersProductsCB cb) { + assertConditionBeanNotNull(cb); + final java.util.List ls = selectList(cb); + assertRecordHasNotBeenDeleted(ls, cb); + assertRecordHasBeenSelectedAsOne(ls, cb); + return (OrdersProducts)ls.get(0); + } + + /* + * Select entity with deleted check. {by primary-key} + * + * @param primaryKey + * @return Selected entity. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public OrdersProducts selectByPKValueWithDeletedCheck(java.math.BigDecimal ordersProductsId) { + OrdersProducts entity = new OrdersProducts(); + entity.setOrdersProductsId(ordersProductsId); + final OrdersProductsCB cb = newMyConditionBean(); + cb.acceptPrimaryKeyMapString(getDBMeta().extractPrimaryKeyMapString(entity)); + return selectEntityWithDeletedCheck(cb); + } + + // =================================================================================== + // Basic Select List + // ================= + /** + * Select list as result-bean. + * + * @param cb Condition-bean. (NotNull) + * @return Selected list-result-bean. (NotNull) + */ + public ListResultBean selectList(OrdersProductsCB cb) { + assertConditionBeanNotNull(cb); + return new ResultBeanBuilder(this).buildListResultBean(cb, delegateSelectList(cb)); + } + + /** + * Select page as result-bean. + * + * @param cb Condition-bean. (NotNull) + * @return Selected paging-result-bean. (NotNull) + */ + public PagingResultBean selectPage(final OrdersProductsCB cb) { + assertConditionBeanNotNull(cb); + return selectPage(cb, new SelectPageSimpleInvoker(this)); + } + + /** + * Select page. + * + * @param cb Condition-bean. (NotNull) + * @param invoker Select-page-invoker (NotNull) + * @return Selected paging-result-bean. (NotNull) + */ + public PagingResultBean selectPage(final OrdersProductsCB cb, SelectPageInvoker invoker) { + assertConditionBeanNotNull(cb); + final SelectPageCallback pageCallback = new SelectPageCallback() { + public PagingBean getPagingBean() { return cb; } + public int selectCountIgnoreFetchScope() { + return selectCount(cb); + } + public java.util.List selectListWithFetchScope() { + return selectList(cb); + } + }; + return invoker.invokeSelectPage(pageCallback); + } + + // =================================================================================== + // Various Select + // ============== + /** + * Select value-label list. + * + * @param cb Condition-bean. (NotNull) + * @param valueLabelSetupper Value-label-setupper. (NotNull) + * @return Value-label list. (NotNull) + */ + public java.util.List> selectValueLabelList(OrdersProductsCB cb, ValueLabelSetupper valueLabelSetupper) { + return createValueLabelList(selectList(cb), valueLabelSetupper); + } + + // =================================================================================== + // Load Referer + // ============ + + // =================================================================================== + // Pull Out Foreign + // ================ + + // =================================================================================== + // Basic Entity Update + // =================== + /** + * Insert. + * + * @param ordersProducts Entity. (NotNull) + */ + public void insert(OrdersProducts ordersProducts) { + assertEntityNotNull(ordersProducts); + delegateInsert(ordersProducts); + } + + protected void doCreate(Entity ordersProducts) { + insert((OrdersProducts)ordersProducts); + } + + /** + * Update. + *
+     * If it updates count zero, throws exception.
+     * If concurrency control of this table is valid, this update have it.
+     * 
+ * @param ordersProducts Entity. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public void update(OrdersProducts ordersProducts) { + assertEntityNotNull(ordersProducts); + final int updatedCount = delegateUpdate(ordersProducts); + if (updatedCount == 0) { + throw new jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException(ordersProducts.toString()); + } else if (updatedCount > 1) { + String msg = "updatedCount=" + updatedCount + ": " + ordersProducts.toString(); + throw new jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException(msg); + } + } + + protected void doModify(Entity ordersProducts) { + update((OrdersProducts)ordersProducts); + } + + /** + * Update after select. + * + * @param ordersProducts Entity. This must contain primary-key value at least. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + */ + public void updateAfterSelect(OrdersProducts ordersProducts) { + assertEntityNotNullAndHasPrimaryKeyValue(ordersProducts); + final OrdersProductsCB cb = newMyConditionBean(); + cb.acceptPrimaryKeyMapString(getDBMeta().extractPrimaryKeyMapString(ordersProducts)); + final OrdersProducts currentEntity = selectEntityWithDeletedCheck(cb); + mergeEntity(ordersProducts, currentEntity); + update(currentEntity); + } + + protected void doModifyAfterSelect(Entity ordersProducts) { + updateAfterSelect((OrdersProducts)ordersProducts); + } + + /** + * Insert or update. + * {update: modified only} + * + * @param ordersProducts Entity. This should contain primary-key value at least(Except use identity). (NotNull) + */ + public void insertOrUpdate(OrdersProducts ordersProducts) { + assertEntityNotNull(ordersProducts); + if (!ordersProducts.hasPrimaryKeyValue()) { + insert(ordersProducts); + } else { + try { + update(ordersProducts); + } catch (org.seasar.dao.NotSingleRowUpdatedRuntimeException e) { + insert(ordersProducts); + } catch (jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException e) { + insert(ordersProducts); + } + } + } + + protected void doCreateOrUpdateNonstrict(Entity ordersProducts) { + + insertOrUpdate((OrdersProducts)ordersProducts); + + } + + /** + * Insert or update after select. + * {update: modified only} + * + * @param ordersProducts Entity. This should contain primary-key value at least(Except use identity). (NotNull) + */ + public void insertOrUpdateAfterSelect(OrdersProducts ordersProducts) { + assertEntityNotNull(ordersProducts); + if (!ordersProducts.hasPrimaryKeyValue()) { + insert(ordersProducts); + return; + } + OrdersProducts currentEntity = null; + try { + final OrdersProductsCB cb = newMyConditionBean(); + cb.acceptPrimaryKeyMapString(getDBMeta().extractPrimaryKeyMapString(ordersProducts)); + currentEntity = selectEntityWithDeletedCheck(cb); + } catch (jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException e) { + insert(ordersProducts); + return; + } + assertEntityNotNullAndHasPrimaryKeyValue(ordersProducts); + mergeEntity(ordersProducts, currentEntity); + update(currentEntity); + } + + protected void doCreateOrModifyAfterSelect(Entity entity) { + insertOrUpdateAfterSelect((OrdersProducts)entity); + } + + /** + * This method implements the method that is declared at super. + * + * @param sourceEntity Source entity. (NotNull) + * @param destinationEntity Destination entity. (NotNull) + */ + protected void mergeEntity(Entity sourceEntity, Entity destinationEntity) { + assertEntityNotNull(sourceEntity); + assertEntityNotNull(destinationEntity); + final OrdersProducts sourceMyEntity = (OrdersProducts)sourceEntity; + final OrdersProducts destinationMyEntity = (OrdersProducts)destinationEntity; + destinationMyEntity.clearModifiedPropertyNames(); + final java.util.Set names = sourceMyEntity.getModifiedPropertyNames(); + + if (names.contains("ordersProductsId")) { destinationMyEntity.setOrdersProductsId(sourceMyEntity.getOrdersProductsId()); } + if (names.contains("ordersId")) { destinationMyEntity.setOrdersId(sourceMyEntity.getOrdersId()); } + if (names.contains("productsId")) { destinationMyEntity.setProductsId(sourceMyEntity.getProductsId()); } + if (names.contains("productsModel")) { destinationMyEntity.setProductsModel(sourceMyEntity.getProductsModel()); } + if (names.contains("productsName")) { destinationMyEntity.setProductsName(sourceMyEntity.getProductsName()); } + if (names.contains("productsPrice")) { destinationMyEntity.setProductsPrice(sourceMyEntity.getProductsPrice()); } + if (names.contains("finalPrice")) { destinationMyEntity.setFinalPrice(sourceMyEntity.getFinalPrice()); } + if (names.contains("productsTax")) { destinationMyEntity.setProductsTax(sourceMyEntity.getProductsTax()); } + if (names.contains("productsQuantity")) { destinationMyEntity.setProductsQuantity(sourceMyEntity.getProductsQuantity()); } + + } + + /** + * Delete. + * + * @param ordersProducts Entity. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public void delete(OrdersProducts ordersProducts) { + assertEntityNotNull(ordersProducts); + final int deletedCount = delegateDelete(ordersProducts); + if (deletedCount == 0) { + throw new jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException(ordersProducts.toString()); + } else if (deletedCount > 1) { + String msg = "deletedCount=" + deletedCount + ": " + ordersProducts.toString(); + throw new jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException(msg); + } + } + + protected void doRemove(Entity ordersProducts) { + delete((OrdersProducts)ordersProducts); + } + + /** + * Delete after select. + * + * @param ordersProducts Entity. This must contain primary-key value at least. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + */ + public void deleteAfterSelect(OrdersProducts ordersProducts) { + assertEntityNotNullAndHasPrimaryKeyValue(ordersProducts); + final OrdersProductsCB cb = newMyConditionBean(); + cb.acceptPrimaryKeyMapString(getDBMeta().extractPrimaryKeyMapString(ordersProducts)); + selectEntityWithDeletedCheck(cb); + delete(ordersProducts); + } + + protected void doRemoveAfterSelect(Entity ordersProducts) { + deleteAfterSelect((OrdersProducts)ordersProducts); + } + + // =================================================================================== + // Basic Batch Update + // ================== + /** + * Insert list. + * + * @param ordersProductsList Entity-list. (NotNull & NotEmpty) + * @return Inserted count. + */ + public int insertList(java.util.List ordersProductsList) { + assertListNotNullAndNotEmpty(ordersProductsList); + return delegateInsertList(ordersProductsList); + } + + /** + * Update list. + * + * @param ordersProductsList Entity-list. (NotNull & NotEmpty) + * @return Updated count. + */ + public int updateList(java.util.List ordersProductsList) { + assertListNotNullAndNotEmpty(ordersProductsList); + return delegateUpdateList(ordersProductsList); + } + + /** + * Delete list. + * + * @param ordersProductsList Entity-list. (NotNull & NotEmpty) + * @return Deleted count. + */ + public int deleteList(java.util.List ordersProductsList) { + assertListNotNullAndNotEmpty(ordersProductsList); + return delegateDeleteList(ordersProductsList); + } + + // =================================================================================== + // Various Insert + // ============== + + // =================================================================================== + // CBSetupper + // ========== + /** + * The interface of condition-bean setupper. + */ + public static interface CBSetupper extends ConditionBeanSetupper { + + /** + * Set up condition. + * + * @param cb Condition-bean. (NotNull) + */ + public void setup(OrdersProductsCB cb); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/bsbhv/BsOrdersProductsDownloadBhv.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/bsbhv/BsOrdersProductsDownloadBhv.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/bsbhv/BsOrdersProductsDownloadBhv.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,699 @@ + +package jp.sf.pal.pompei.bsbhv; + +import jp.sf.pal.pompei.allcommon.*; +import jp.sf.pal.pompei.allcommon.bhv.load.LoadRefererOption; +import jp.sf.pal.pompei.allcommon.bhv.setup.ConditionBeanSetupper; +import jp.sf.pal.pompei.allcommon.bhv.setup.ValueLabelSetupper; +import jp.sf.pal.pompei.allcommon.cbean.ConditionBean; +import jp.sf.pal.pompei.allcommon.cbean.ListResultBean; +import jp.sf.pal.pompei.allcommon.cbean.PagingBean; +import jp.sf.pal.pompei.allcommon.cbean.PagingResultBean; +import jp.sf.pal.pompei.allcommon.dbmeta.DBMeta; + +import jp.sf.pal.pompei.exdao.*; +import jp.sf.pal.pompei.exentity.*; +import jp.sf.pal.pompei.bsentity.dbmeta.*; +import jp.sf.pal.pompei.cbean.*; + + + +/** + * The behavior of ORDERS_PRODUCTS_DOWNLOAD. + * + *
+ * [primary-key]
+ *     ORDERS_PRODUCTS_DOWNLOAD_ID
+ * 
+ * [column-property]
+ *     ORDERS_PRODUCTS_DOWNLOAD_ID, ORDERS_ID, ORDERS_PRODUCTS_ID, ORDERS_PRODUCTS_FILENAME, DOWNLOAD_MAXDAYS, DOWNLOAD_COUNT
+ * 
+ * [foreign-property]
+ *     
+ * 
+ * [refferer-property]
+ *     
+ * 
+ * [sequence]
+ *     
+ * 
+ * [identity]
+ *     
+ * 
+ * [update-date]
+ *     
+ * 
+ * [version-no]
+ *     
+ * 
+ * 
+ * + * @author DBFlute(AutoGenerator) + */ +public abstract class BsOrdersProductsDownloadBhv extends jp.sf.pal.pompei.allcommon.bhv.AbstractBehaviorWritable { + + // =================================================================================== + // Attribute + // ========= + /** Dao instance. */ + protected OrdersProductsDownloadDao _dao; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + public BsOrdersProductsDownloadBhv() { + } + + // =================================================================================== + // Table name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + public String getTableDbName() { + return "ORDERS_PRODUCTS_DOWNLOAD"; + } + + // =================================================================================== + // DBMeta + // ====== + /** + * This method implements the method that is declared at super. + * + * @return DBMeta. (NotNull) + */ + public DBMeta getDBMeta() { + return OrdersProductsDownloadDbm.getInstance(); + } + + /** + * Get my dbmeta. + * + * @return DBMeta. (NotNull) + */ + public OrdersProductsDownloadDbm getMyDBMeta() { + return OrdersProductsDownloadDbm.getInstance(); + } + + // =================================================================================== + // Dao Accessor + // ============ + /** + * Get my dao. + * + * @return My dao. + */ + public OrdersProductsDownloadDao getMyDao() { + return _dao; + } + + /** + * Set my dao. + * + * @param dao My dao. (NotNull) + */ + public void setMyDao(OrdersProductsDownloadDao dao) { + assertObjectNotNull("dao", dao); + _dao = dao; + } + + /** + * This method implements the method that is declared at super. + * + * @return Dao-readable. (NotNull) + */ + public DaoReadable getDaoReadable() { + return getMyDao(); + } + + /** + * This method implements the method that is declared at super. + * + * @return Dao-writable. (NotNull) + */ + public DaoWritable getDaoWritable() { + return getMyDao(); + } + + // =================================================================================== + // New Instance + // ============ + /** + * New entity. + * + * @return Entity. (NotNull) + */ + public Entity newEntity() { + return newMyEntity(); + } + + /** + * New condition-bean. + * + * @return Condition-bean. (NotNull) + */ + public ConditionBean newConditionBean() { + return newMyConditionBean(); + } + + /** + * New my entity. + * + * @return My entity. (NotNull) + */ + public OrdersProductsDownload newMyEntity() { + return new OrdersProductsDownload(); + } + + /** + * New my condition-bean. + * + * @return My condition-bean. (NotNull) + */ + public OrdersProductsDownloadCB newMyConditionBean() { + return new OrdersProductsDownloadCB(); + } + + // =================================================================================== + // Delegate Method + // =============== + // ----------------------------------------------------- + // Select + // ------ + /** + * Get count as all. (Delegate-Method) + * + * @return All count. (NotNull) + */ + public int delegateGetCountAll() { + return getMyDao().getCountAll(); + } + + /** + * Get list as all. (Delegate-Method) + * + * @return All list. (NotNull) + */ + public java.util.List delegateGetListAll() { + return getMyDao().getListAll(); + } + + // + // Get entity. (Delegate-Method) + // + // @param Primary-keys (NotNull) + // @return Entity. (NotNull) + // + public OrdersProductsDownload delegateGetEntity(java.math.BigDecimal ordersProductsDownloadId) { + return getMyDao().getEntity(ordersProductsDownloadId); + } + + /** + * Select count by condition-bean. (Delegate-Method) + * + * @param cb Condition-bean. (NotNull) + * @return Selected count. (NotNull) + */ + public int delegateSelectCount(OrdersProductsDownloadCB cb) { + assertConditionBeanNotNull(cb); + return getMyDao().selectCount(cb); + } + + /** + * Select entity by condition-bean. (Delegate-Method) + * + * @param cb Condition-bean. (NotNull) + * @return Selected entity. If the select result is zero, it returns null. (Nullable) + */ + public OrdersProductsDownload delegateSelectEntity(OrdersProductsDownloadCB cb) { + assertConditionBeanNotNull(cb); + return getMyDao().selectEntity(cb); + } + + /** + * Select list by condition-bean. (Delegate-Method) + * + * @param cb Condition-bean. (NotNull) + * @return Selected list. If the select result is zero, it returns empty list. (NotNull) + */ + public java.util.List delegateSelectList(OrdersProductsDownloadCB cb) { + assertConditionBeanNotNull(cb); + return getMyDao().selectList(cb); + } + + + // ----------------------------------------------------- + // Update + // ------ + /** + * Insert one entity. (Delegate-Method) + * + * @param entity Entity. (NotNull) + * @return Inserted count. + */ + public int delegateInsert(OrdersProductsDownload entity) { + assertEntityNotNull(entity);// If this table use identity, the entity does not have primary-key. + filterEntityOfInsert(entity); + assertEntityOfInsert(entity); + return getMyDao().insert(entity); + } + + /** + * Update one entity. (Delegate-Method) + * {modified only} + * + * @param entity Entity. (NotNull) + * @return Updated count. + */ + public int delegateUpdate(OrdersProductsDownload entity) { + assertEntityNotNullAndHasPrimaryKeyValue(entity); + filterEntityOfUpdate(entity); + assertEntityOfUpdate(entity); + return getMyDao().updateModifiedOnly(entity); + } + + /** + * Delete one entity. (Delegate-Method) + * + * @param entity Entity. (NotNull) + * @return Deleted count. + */ + public int delegateDelete(OrdersProductsDownload entity) { + assertEntityNotNullAndHasPrimaryKeyValue(entity); + filterEntityOfDelete(entity); + assertEntityOfDelete(entity); + return getMyDao().delete(entity); + } + + /** + * Insert several entities. (Delegate-Method) + * + * @param entityList Entity-list. (NotNull & NotEmpty) + * @return Inserted count. + */ + public int delegateInsertList(java.util.List entityList) { + assertListNotNullAndNotEmpty(entityList); + return getMyDao().insertList(entityList); + } + + /** + * Update several entities. (Delegate-Method) + * + * @param entityList Entity-list. (NotNull & NotEmpty) + * @return Updated count. + */ + public int delegateUpdateList(java.util.List entityList) { + assertListNotNullAndNotEmpty(entityList); + return getMyDao().updateList(entityList); + } + + /** + * Delete several entities. (Delegate-Method) + * + * @param entityList Entity-list. (NotNull & NotEmpty) + * @return Deleted count. + */ + public int delegateDeleteList(java.util.List entityList) { + assertListNotNullAndNotEmpty(entityList); + return getMyDao().deleteList(entityList); + } + + // =================================================================================== + // Basic Select Count + // ================== + /** + * Select count by condition-bean. + *
+     * If the argument 'condition-bean' is effective about fetch-scope,
+     * this method invoke select count ignoring the fetch-scope.
+     * 
+ * @param cb Condition-bean. This condition-bean should not be set up about fetch-scope. (NotNull) + * @return Selected count. + */ + public int selectCount(OrdersProductsDownloadCB cb) { + assertConditionBeanNotNull(cb); + return delegateSelectCount(cb); + } + + // =================================================================================== + // Basic Select Entity + // =================== + /** + * Select entity by condition-bean. + * + * @param cb Condition-bean. (NotNull) + * @return Selected entity. (Nullalble) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public OrdersProductsDownload selectEntity(OrdersProductsDownloadCB cb) { + assertConditionBeanNotNull(cb); + final java.util.List ls = selectList(cb); + if (ls.isEmpty()) { + return null; + } + assertRecordHasBeenSelectedAsOne(ls, cb); + return (OrdersProductsDownload)ls.get(0); + } + + /** + * Select entity by condition-bean with deleted check. + * + * @param cb Condition-bean. (NotNull) + * @return Selected entity. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public OrdersProductsDownload selectEntityWithDeletedCheck(OrdersProductsDownloadCB cb) { + assertConditionBeanNotNull(cb); + final java.util.List ls = selectList(cb); + assertRecordHasNotBeenDeleted(ls, cb); + assertRecordHasBeenSelectedAsOne(ls, cb); + return (OrdersProductsDownload)ls.get(0); + } + + /* + * Select entity with deleted check. {by primary-key} + * + * @param primaryKey + * @return Selected entity. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public OrdersProductsDownload selectByPKValueWithDeletedCheck(java.math.BigDecimal ordersProductsDownloadId) { + OrdersProductsDownload entity = new OrdersProductsDownload(); + entity.setOrdersProductsDownloadId(ordersProductsDownloadId); + final OrdersProductsDownloadCB cb = newMyConditionBean(); + cb.acceptPrimaryKeyMapString(getDBMeta().extractPrimaryKeyMapString(entity)); + return selectEntityWithDeletedCheck(cb); + } + + // =================================================================================== + // Basic Select List + // ================= + /** + * Select list as result-bean. + * + * @param cb Condition-bean. (NotNull) + * @return Selected list-result-bean. (NotNull) + */ + public ListResultBean selectList(OrdersProductsDownloadCB cb) { + assertConditionBeanNotNull(cb); + return new ResultBeanBuilder(this).buildListResultBean(cb, delegateSelectList(cb)); + } + + /** + * Select page as result-bean. + * + * @param cb Condition-bean. (NotNull) + * @return Selected paging-result-bean. (NotNull) + */ + public PagingResultBean selectPage(final OrdersProductsDownloadCB cb) { + assertConditionBeanNotNull(cb); + return selectPage(cb, new SelectPageSimpleInvoker(this)); + } + + /** + * Select page. + * + * @param cb Condition-bean. (NotNull) + * @param invoker Select-page-invoker (NotNull) + * @return Selected paging-result-bean. (NotNull) + */ + public PagingResultBean selectPage(final OrdersProductsDownloadCB cb, SelectPageInvoker invoker) { + assertConditionBeanNotNull(cb); + final SelectPageCallback pageCallback = new SelectPageCallback() { + public PagingBean getPagingBean() { return cb; } + public int selectCountIgnoreFetchScope() { + return selectCount(cb); + } + public java.util.List selectListWithFetchScope() { + return selectList(cb); + } + }; + return invoker.invokeSelectPage(pageCallback); + } + + // =================================================================================== + // Various Select + // ============== + /** + * Select value-label list. + * + * @param cb Condition-bean. (NotNull) + * @param valueLabelSetupper Value-label-setupper. (NotNull) + * @return Value-label list. (NotNull) + */ + public java.util.List> selectValueLabelList(OrdersProductsDownloadCB cb, ValueLabelSetupper valueLabelSetupper) { + return createValueLabelList(selectList(cb), valueLabelSetupper); + } + + // =================================================================================== + // Load Referer + // ============ + + // =================================================================================== + // Pull Out Foreign + // ================ + + // =================================================================================== + // Basic Entity Update + // =================== + /** + * Insert. + * + * @param ordersProductsDownload Entity. (NotNull) + */ + public void insert(OrdersProductsDownload ordersProductsDownload) { + assertEntityNotNull(ordersProductsDownload); + delegateInsert(ordersProductsDownload); + } + + protected void doCreate(Entity ordersProductsDownload) { + insert((OrdersProductsDownload)ordersProductsDownload); + } + + /** + * Update. + *
+     * If it updates count zero, throws exception.
+     * If concurrency control of this table is valid, this update have it.
+     * 
+ * @param ordersProductsDownload Entity. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public void update(OrdersProductsDownload ordersProductsDownload) { + assertEntityNotNull(ordersProductsDownload); + final int updatedCount = delegateUpdate(ordersProductsDownload); + if (updatedCount == 0) { + throw new jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException(ordersProductsDownload.toString()); + } else if (updatedCount > 1) { + String msg = "updatedCount=" + updatedCount + ": " + ordersProductsDownload.toString(); + throw new jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException(msg); + } + } + + protected void doModify(Entity ordersProductsDownload) { + update((OrdersProductsDownload)ordersProductsDownload); + } + + /** + * Update after select. + * + * @param ordersProductsDownload Entity. This must contain primary-key value at least. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + */ + public void updateAfterSelect(OrdersProductsDownload ordersProductsDownload) { + assertEntityNotNullAndHasPrimaryKeyValue(ordersProductsDownload); + final OrdersProductsDownloadCB cb = newMyConditionBean(); + cb.acceptPrimaryKeyMapString(getDBMeta().extractPrimaryKeyMapString(ordersProductsDownload)); + final OrdersProductsDownload currentEntity = selectEntityWithDeletedCheck(cb); + mergeEntity(ordersProductsDownload, currentEntity); + update(currentEntity); + } + + protected void doModifyAfterSelect(Entity ordersProductsDownload) { + updateAfterSelect((OrdersProductsDownload)ordersProductsDownload); + } + + /** + * Insert or update. + * {update: modified only} + * + * @param ordersProductsDownload Entity. This should contain primary-key value at least(Except use identity). (NotNull) + */ + public void insertOrUpdate(OrdersProductsDownload ordersProductsDownload) { + assertEntityNotNull(ordersProductsDownload); + if (!ordersProductsDownload.hasPrimaryKeyValue()) { + insert(ordersProductsDownload); + } else { + try { + update(ordersProductsDownload); + } catch (org.seasar.dao.NotSingleRowUpdatedRuntimeException e) { + insert(ordersProductsDownload); + } catch (jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException e) { + insert(ordersProductsDownload); + } + } + } + + protected void doCreateOrUpdateNonstrict(Entity ordersProductsDownload) { + + insertOrUpdate((OrdersProductsDownload)ordersProductsDownload); + + } + + /** + * Insert or update after select. + * {update: modified only} + * + * @param ordersProductsDownload Entity. This should contain primary-key value at least(Except use identity). (NotNull) + */ + public void insertOrUpdateAfterSelect(OrdersProductsDownload ordersProductsDownload) { + assertEntityNotNull(ordersProductsDownload); + if (!ordersProductsDownload.hasPrimaryKeyValue()) { + insert(ordersProductsDownload); + return; + } + OrdersProductsDownload currentEntity = null; + try { + final OrdersProductsDownloadCB cb = newMyConditionBean(); + cb.acceptPrimaryKeyMapString(getDBMeta().extractPrimaryKeyMapString(ordersProductsDownload)); + currentEntity = selectEntityWithDeletedCheck(cb); + } catch (jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException e) { + insert(ordersProductsDownload); + return; + } + assertEntityNotNullAndHasPrimaryKeyValue(ordersProductsDownload); + mergeEntity(ordersProductsDownload, currentEntity); + update(currentEntity); + } + + protected void doCreateOrModifyAfterSelect(Entity entity) { + insertOrUpdateAfterSelect((OrdersProductsDownload)entity); + } + + /** + * This method implements the method that is declared at super. + * + * @param sourceEntity Source entity. (NotNull) + * @param destinationEntity Destination entity. (NotNull) + */ + protected void mergeEntity(Entity sourceEntity, Entity destinationEntity) { + assertEntityNotNull(sourceEntity); + assertEntityNotNull(destinationEntity); + final OrdersProductsDownload sourceMyEntity = (OrdersProductsDownload)sourceEntity; + final OrdersProductsDownload destinationMyEntity = (OrdersProductsDownload)destinationEntity; + destinationMyEntity.clearModifiedPropertyNames(); + final java.util.Set names = sourceMyEntity.getModifiedPropertyNames(); + + if (names.contains("ordersProductsDownloadId")) { destinationMyEntity.setOrdersProductsDownloadId(sourceMyEntity.getOrdersProductsDownloadId()); } + if (names.contains("ordersId")) { destinationMyEntity.setOrdersId(sourceMyEntity.getOrdersId()); } + if (names.contains("ordersProductsId")) { destinationMyEntity.setOrdersProductsId(sourceMyEntity.getOrdersProductsId()); } + if (names.contains("ordersProductsFilename")) { destinationMyEntity.setOrdersProductsFilename(sourceMyEntity.getOrdersProductsFilename()); } + if (names.contains("downloadMaxdays")) { destinationMyEntity.setDownloadMaxdays(sourceMyEntity.getDownloadMaxdays()); } + if (names.contains("downloadCount")) { destinationMyEntity.setDownloadCount(sourceMyEntity.getDownloadCount()); } + + } + + /** + * Delete. + * + * @param ordersProductsDownload Entity. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public void delete(OrdersProductsDownload ordersProductsDownload) { + assertEntityNotNull(ordersProductsDownload); + final int deletedCount = delegateDelete(ordersProductsDownload); + if (deletedCount == 0) { + throw new jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException(ordersProductsDownload.toString()); + } else if (deletedCount > 1) { + String msg = "deletedCount=" + deletedCount + ": " + ordersProductsDownload.toString(); + throw new jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException(msg); + } + } + + protected void doRemove(Entity ordersProductsDownload) { + delete((OrdersProductsDownload)ordersProductsDownload); + } + + /** + * Delete after select. + * + * @param ordersProductsDownload Entity. This must contain primary-key value at least. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + */ + public void deleteAfterSelect(OrdersProductsDownload ordersProductsDownload) { + assertEntityNotNullAndHasPrimaryKeyValue(ordersProductsDownload); + final OrdersProductsDownloadCB cb = newMyConditionBean(); + cb.acceptPrimaryKeyMapString(getDBMeta().extractPrimaryKeyMapString(ordersProductsDownload)); + selectEntityWithDeletedCheck(cb); + delete(ordersProductsDownload); + } + + protected void doRemoveAfterSelect(Entity ordersProductsDownload) { + deleteAfterSelect((OrdersProductsDownload)ordersProductsDownload); + } + + // =================================================================================== + // Basic Batch Update + // ================== + /** + * Insert list. + * + * @param ordersProductsDownloadList Entity-list. (NotNull & NotEmpty) + * @return Inserted count. + */ + public int insertList(java.util.List ordersProductsDownloadList) { + assertListNotNullAndNotEmpty(ordersProductsDownloadList); + return delegateInsertList(ordersProductsDownloadList); + } + + /** + * Update list. + * + * @param ordersProductsDownloadList Entity-list. (NotNull & NotEmpty) + * @return Updated count. + */ + public int updateList(java.util.List ordersProductsDownloadList) { + assertListNotNullAndNotEmpty(ordersProductsDownloadList); + return delegateUpdateList(ordersProductsDownloadList); + } + + /** + * Delete list. + * + * @param ordersProductsDownloadList Entity-list. (NotNull & NotEmpty) + * @return Deleted count. + */ + public int deleteList(java.util.List ordersProductsDownloadList) { + assertListNotNullAndNotEmpty(ordersProductsDownloadList); + return delegateDeleteList(ordersProductsDownloadList); + } + + // =================================================================================== + // Various Insert + // ============== + + // =================================================================================== + // CBSetupper + // ========== + /** + * The interface of condition-bean setupper. + */ + public static interface CBSetupper extends ConditionBeanSetupper { + + /** + * Set up condition. + * + * @param cb Condition-bean. (NotNull) + */ + public void setup(OrdersProductsDownloadCB cb); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/bsbhv/BsOrdersStatusBhv.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/bsbhv/BsOrdersStatusBhv.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/bsbhv/BsOrdersStatusBhv.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,692 @@ + +package jp.sf.pal.pompei.bsbhv; + +import jp.sf.pal.pompei.allcommon.*; +import jp.sf.pal.pompei.allcommon.bhv.load.LoadRefererOption; +import jp.sf.pal.pompei.allcommon.bhv.setup.ConditionBeanSetupper; +import jp.sf.pal.pompei.allcommon.bhv.setup.ValueLabelSetupper; +import jp.sf.pal.pompei.allcommon.cbean.ConditionBean; +import jp.sf.pal.pompei.allcommon.cbean.ListResultBean; +import jp.sf.pal.pompei.allcommon.cbean.PagingBean; +import jp.sf.pal.pompei.allcommon.cbean.PagingResultBean; +import jp.sf.pal.pompei.allcommon.dbmeta.DBMeta; + +import jp.sf.pal.pompei.exdao.*; +import jp.sf.pal.pompei.exentity.*; +import jp.sf.pal.pompei.bsentity.dbmeta.*; +import jp.sf.pal.pompei.cbean.*; + + + +/** + * The behavior of ORDERS_STATUS. + * + *
+ * [primary-key]
+ *     ORDERS_STATUS_ID, LANGUAGE_ID
+ * 
+ * [column-property]
+ *     ORDERS_STATUS_ID, LANGUAGE_ID, ORDERS_STATUS_NAME
+ * 
+ * [foreign-property]
+ *     
+ * 
+ * [refferer-property]
+ *     
+ * 
+ * [sequence]
+ *     
+ * 
+ * [identity]
+ *     
+ * 
+ * [update-date]
+ *     
+ * 
+ * [version-no]
+ *     
+ * 
+ * 
+ * + * @author DBFlute(AutoGenerator) + */ +public abstract class BsOrdersStatusBhv extends jp.sf.pal.pompei.allcommon.bhv.AbstractBehaviorWritable { + + // =================================================================================== + // Attribute + // ========= + /** Dao instance. */ + protected OrdersStatusDao _dao; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + public BsOrdersStatusBhv() { + } + + // =================================================================================== + // Table name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + public String getTableDbName() { + return "ORDERS_STATUS"; + } + + // =================================================================================== + // DBMeta + // ====== + /** + * This method implements the method that is declared at super. + * + * @return DBMeta. (NotNull) + */ + public DBMeta getDBMeta() { + return OrdersStatusDbm.getInstance(); + } + + /** + * Get my dbmeta. + * + * @return DBMeta. (NotNull) + */ + public OrdersStatusDbm getMyDBMeta() { + return OrdersStatusDbm.getInstance(); + } + + // =================================================================================== + // Dao Accessor + // ============ + /** + * Get my dao. + * + * @return My dao. + */ + public OrdersStatusDao getMyDao() { + return _dao; + } + + /** + * Set my dao. + * + * @param dao My dao. (NotNull) + */ + public void setMyDao(OrdersStatusDao dao) { + assertObjectNotNull("dao", dao); + _dao = dao; + } + + /** + * This method implements the method that is declared at super. + * + * @return Dao-readable. (NotNull) + */ + public DaoReadable getDaoReadable() { + return getMyDao(); + } + + /** + * This method implements the method that is declared at super. + * + * @return Dao-writable. (NotNull) + */ + public DaoWritable getDaoWritable() { + return getMyDao(); + } + + // =================================================================================== + // New Instance + // ============ + /** + * New entity. + * + * @return Entity. (NotNull) + */ + public Entity newEntity() { + return newMyEntity(); + } + + /** + * New condition-bean. + * + * @return Condition-bean. (NotNull) + */ + public ConditionBean newConditionBean() { + return newMyConditionBean(); + } + + /** + * New my entity. + * + * @return My entity. (NotNull) + */ + public OrdersStatus newMyEntity() { + return new OrdersStatus(); + } + + /** + * New my condition-bean. + * + * @return My condition-bean. (NotNull) + */ + public OrdersStatusCB newMyConditionBean() { + return new OrdersStatusCB(); + } + + // =================================================================================== + // Delegate Method + // =============== + // ----------------------------------------------------- + // Select + // ------ + /** + * Get count as all. (Delegate-Method) + * + * @return All count. (NotNull) + */ + public int delegateGetCountAll() { + return getMyDao().getCountAll(); + } + + /** + * Get list as all. (Delegate-Method) + * + * @return All list. (NotNull) + */ + public java.util.List delegateGetListAll() { + return getMyDao().getListAll(); + } + + // + // Get entity. (Delegate-Method) + // + // @param Primary-keys (NotNull) + // @return Entity. (NotNull) + // + public OrdersStatus delegateGetEntity(java.math.BigDecimal ordersStatusId, java.math.BigDecimal languageId) { + return getMyDao().getEntity(ordersStatusId, languageId); + } + + /** + * Select count by condition-bean. (Delegate-Method) + * + * @param cb Condition-bean. (NotNull) + * @return Selected count. (NotNull) + */ + public int delegateSelectCount(OrdersStatusCB cb) { + assertConditionBeanNotNull(cb); + return getMyDao().selectCount(cb); + } + + /** + * Select entity by condition-bean. (Delegate-Method) + * + * @param cb Condition-bean. (NotNull) + * @return Selected entity. If the select result is zero, it returns null. (Nullable) + */ + public OrdersStatus delegateSelectEntity(OrdersStatusCB cb) { + assertConditionBeanNotNull(cb); + return getMyDao().selectEntity(cb); + } + + /** + * Select list by condition-bean. (Delegate-Method) + * + * @param cb Condition-bean. (NotNull) + * @return Selected list. If the select result is zero, it returns empty list. (NotNull) + */ + public java.util.List delegateSelectList(OrdersStatusCB cb) { + assertConditionBeanNotNull(cb); + return getMyDao().selectList(cb); + } + + + // ----------------------------------------------------- + // Update + // ------ + /** + * Insert one entity. (Delegate-Method) + * + * @param entity Entity. (NotNull) + * @return Inserted count. + */ + public int delegateInsert(OrdersStatus entity) { + assertEntityNotNull(entity);// If this table use identity, the entity does not have primary-key. + filterEntityOfInsert(entity); + assertEntityOfInsert(entity); + return getMyDao().insert(entity); + } + + /** + * Update one entity. (Delegate-Method) + * {modified only} + * + * @param entity Entity. (NotNull) + * @return Updated count. + */ + public int delegateUpdate(OrdersStatus entity) { + assertEntityNotNullAndHasPrimaryKeyValue(entity); + filterEntityOfUpdate(entity); + assertEntityOfUpdate(entity); + return getMyDao().updateModifiedOnly(entity); + } + + /** + * Delete one entity. (Delegate-Method) + * + * @param entity Entity. (NotNull) + * @return Deleted count. + */ + public int delegateDelete(OrdersStatus entity) { + assertEntityNotNullAndHasPrimaryKeyValue(entity); + filterEntityOfDelete(entity); + assertEntityOfDelete(entity); + return getMyDao().delete(entity); + } + + /** + * Insert several entities. (Delegate-Method) + * + * @param entityList Entity-list. (NotNull & NotEmpty) + * @return Inserted count. + */ + public int delegateInsertList(java.util.List entityList) { + assertListNotNullAndNotEmpty(entityList); + return getMyDao().insertList(entityList); + } + + /** + * Update several entities. (Delegate-Method) + * + * @param entityList Entity-list. (NotNull & NotEmpty) + * @return Updated count. + */ + public int delegateUpdateList(java.util.List entityList) { + assertListNotNullAndNotEmpty(entityList); + return getMyDao().updateList(entityList); + } + + /** + * Delete several entities. (Delegate-Method) + * + * @param entityList Entity-list. (NotNull & NotEmpty) + * @return Deleted count. + */ + public int delegateDeleteList(java.util.List entityList) { + assertListNotNullAndNotEmpty(entityList); + return getMyDao().deleteList(entityList); + } + + // =================================================================================== + // Basic Select Count + // ================== + /** + * Select count by condition-bean. + *
+     * If the argument 'condition-bean' is effective about fetch-scope,
+     * this method invoke select count ignoring the fetch-scope.
+     * 
+ * @param cb Condition-bean. This condition-bean should not be set up about fetch-scope. (NotNull) + * @return Selected count. + */ + public int selectCount(OrdersStatusCB cb) { + assertConditionBeanNotNull(cb); + return delegateSelectCount(cb); + } + + // =================================================================================== + // Basic Select Entity + // =================== + /** + * Select entity by condition-bean. + * + * @param cb Condition-bean. (NotNull) + * @return Selected entity. (Nullalble) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public OrdersStatus selectEntity(OrdersStatusCB cb) { + assertConditionBeanNotNull(cb); + final java.util.List ls = selectList(cb); + if (ls.isEmpty()) { + return null; + } + assertRecordHasBeenSelectedAsOne(ls, cb); + return (OrdersStatus)ls.get(0); + } + + /** + * Select entity by condition-bean with deleted check. + * + * @param cb Condition-bean. (NotNull) + * @return Selected entity. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public OrdersStatus selectEntityWithDeletedCheck(OrdersStatusCB cb) { + assertConditionBeanNotNull(cb); + final java.util.List ls = selectList(cb); + assertRecordHasNotBeenDeleted(ls, cb); + assertRecordHasBeenSelectedAsOne(ls, cb); + return (OrdersStatus)ls.get(0); + } + + /* + * Select entity with deleted check. {by primary-key} + * + * @param primaryKey + * @return Selected entity. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public OrdersStatus selectByPKValueWithDeletedCheck(java.math.BigDecimal ordersStatusId, java.math.BigDecimal languageId) { + OrdersStatus entity = new OrdersStatus(); + entity.setOrdersStatusId(ordersStatusId);entity.setLanguageId(languageId); + final OrdersStatusCB cb = newMyConditionBean(); + cb.acceptPrimaryKeyMapString(getDBMeta().extractPrimaryKeyMapString(entity)); + return selectEntityWithDeletedCheck(cb); + } + + // =================================================================================== + // Basic Select List + // ================= + /** + * Select list as result-bean. + * + * @param cb Condition-bean. (NotNull) + * @return Selected list-result-bean. (NotNull) + */ + public ListResultBean selectList(OrdersStatusCB cb) { + assertConditionBeanNotNull(cb); + return new ResultBeanBuilder(this).buildListResultBean(cb, delegateSelectList(cb)); + } + + /** + * Select page as result-bean. + * + * @param cb Condition-bean. (NotNull) + * @return Selected paging-result-bean. (NotNull) + */ + public PagingResultBean selectPage(final OrdersStatusCB cb) { + assertConditionBeanNotNull(cb); + return selectPage(cb, new SelectPageSimpleInvoker(this)); + } + + /** + * Select page. + * + * @param cb Condition-bean. (NotNull) + * @param invoker Select-page-invoker (NotNull) + * @return Selected paging-result-bean. (NotNull) + */ + public PagingResultBean selectPage(final OrdersStatusCB cb, SelectPageInvoker invoker) { + assertConditionBeanNotNull(cb); + final SelectPageCallback pageCallback = new SelectPageCallback() { + public PagingBean getPagingBean() { return cb; } + public int selectCountIgnoreFetchScope() { + return selectCount(cb); + } + public java.util.List selectListWithFetchScope() { + return selectList(cb); + } + }; + return invoker.invokeSelectPage(pageCallback); + } + + // =================================================================================== + // Various Select + // ============== + /** + * Select value-label list. + * + * @param cb Condition-bean. (NotNull) + * @param valueLabelSetupper Value-label-setupper. (NotNull) + * @return Value-label list. (NotNull) + */ + public java.util.List> selectValueLabelList(OrdersStatusCB cb, ValueLabelSetupper valueLabelSetupper) { + return createValueLabelList(selectList(cb), valueLabelSetupper); + } + + // =================================================================================== + // Pull Out Foreign + // ================ + + // =================================================================================== + // Basic Entity Update + // =================== + /** + * Insert. + * + * @param ordersStatus Entity. (NotNull) + */ + public void insert(OrdersStatus ordersStatus) { + assertEntityNotNull(ordersStatus); + delegateInsert(ordersStatus); + } + + protected void doCreate(Entity ordersStatus) { + insert((OrdersStatus)ordersStatus); + } + + /** + * Update. + *
+     * If it updates count zero, throws exception.
+     * If concurrency control of this table is valid, this update have it.
+     * 
+ * @param ordersStatus Entity. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public void update(OrdersStatus ordersStatus) { + assertEntityNotNull(ordersStatus); + final int updatedCount = delegateUpdate(ordersStatus); + if (updatedCount == 0) { + throw new jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException(ordersStatus.toString()); + } else if (updatedCount > 1) { + String msg = "updatedCount=" + updatedCount + ": " + ordersStatus.toString(); + throw new jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException(msg); + } + } + + protected void doModify(Entity ordersStatus) { + update((OrdersStatus)ordersStatus); + } + + /** + * Update after select. + * + * @param ordersStatus Entity. This must contain primary-key value at least. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + */ + public void updateAfterSelect(OrdersStatus ordersStatus) { + assertEntityNotNullAndHasPrimaryKeyValue(ordersStatus); + final OrdersStatusCB cb = newMyConditionBean(); + cb.acceptPrimaryKeyMapString(getDBMeta().extractPrimaryKeyMapString(ordersStatus)); + final OrdersStatus currentEntity = selectEntityWithDeletedCheck(cb); + mergeEntity(ordersStatus, currentEntity); + update(currentEntity); + } + + protected void doModifyAfterSelect(Entity ordersStatus) { + updateAfterSelect((OrdersStatus)ordersStatus); + } + + /** + * Insert or update. + * {update: modified only} + * + * @param ordersStatus Entity. This should contain primary-key value at least(Except use identity). (NotNull) + */ + public void insertOrUpdate(OrdersStatus ordersStatus) { + assertEntityNotNull(ordersStatus); + if (!ordersStatus.hasPrimaryKeyValue()) { + insert(ordersStatus); + } else { + try { + update(ordersStatus); + } catch (org.seasar.dao.NotSingleRowUpdatedRuntimeException e) { + insert(ordersStatus); + } catch (jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException e) { + insert(ordersStatus); + } + } + } + + protected void doCreateOrUpdateNonstrict(Entity ordersStatus) { + + insertOrUpdate((OrdersStatus)ordersStatus); + + } + + /** + * Insert or update after select. + * {update: modified only} + * + * @param ordersStatus Entity. This should contain primary-key value at least(Except use identity). (NotNull) + */ + public void insertOrUpdateAfterSelect(OrdersStatus ordersStatus) { + assertEntityNotNull(ordersStatus); + if (!ordersStatus.hasPrimaryKeyValue()) { + insert(ordersStatus); + return; + } + OrdersStatus currentEntity = null; + try { + final OrdersStatusCB cb = newMyConditionBean(); + cb.acceptPrimaryKeyMapString(getDBMeta().extractPrimaryKeyMapString(ordersStatus)); + currentEntity = selectEntityWithDeletedCheck(cb); + } catch (jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException e) { + insert(ordersStatus); + return; + } + assertEntityNotNullAndHasPrimaryKeyValue(ordersStatus); + mergeEntity(ordersStatus, currentEntity); + update(currentEntity); + } + + protected void doCreateOrModifyAfterSelect(Entity entity) { + insertOrUpdateAfterSelect((OrdersStatus)entity); + } + + /** + * This method implements the method that is declared at super. + * + * @param sourceEntity Source entity. (NotNull) + * @param destinationEntity Destination entity. (NotNull) + */ + protected void mergeEntity(Entity sourceEntity, Entity destinationEntity) { + assertEntityNotNull(sourceEntity); + assertEntityNotNull(destinationEntity); + final OrdersStatus sourceMyEntity = (OrdersStatus)sourceEntity; + final OrdersStatus destinationMyEntity = (OrdersStatus)destinationEntity; + destinationMyEntity.clearModifiedPropertyNames(); + final java.util.Set names = sourceMyEntity.getModifiedPropertyNames(); + + if (names.contains("ordersStatusId")) { destinationMyEntity.setOrdersStatusId(sourceMyEntity.getOrdersStatusId()); } + if (names.contains("languageId")) { destinationMyEntity.setLanguageId(sourceMyEntity.getLanguageId()); } + if (names.contains("ordersStatusName")) { destinationMyEntity.setOrdersStatusName(sourceMyEntity.getOrdersStatusName()); } + + } + + /** + * Delete. + * + * @param ordersStatus Entity. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public void delete(OrdersStatus ordersStatus) { + assertEntityNotNull(ordersStatus); + final int deletedCount = delegateDelete(ordersStatus); + if (deletedCount == 0) { + throw new jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException(ordersStatus.toString()); + } else if (deletedCount > 1) { + String msg = "deletedCount=" + deletedCount + ": " + ordersStatus.toString(); + throw new jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException(msg); + } + } + + protected void doRemove(Entity ordersStatus) { + delete((OrdersStatus)ordersStatus); + } + + /** + * Delete after select. + * + * @param ordersStatus Entity. This must contain primary-key value at least. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + */ + public void deleteAfterSelect(OrdersStatus ordersStatus) { + assertEntityNotNullAndHasPrimaryKeyValue(ordersStatus); + final OrdersStatusCB cb = newMyConditionBean(); + cb.acceptPrimaryKeyMapString(getDBMeta().extractPrimaryKeyMapString(ordersStatus)); + selectEntityWithDeletedCheck(cb); + delete(ordersStatus); + } + + protected void doRemoveAfterSelect(Entity ordersStatus) { + deleteAfterSelect((OrdersStatus)ordersStatus); + } + + // =================================================================================== + // Basic Batch Update + // ================== + /** + * Insert list. + * + * @param ordersStatusList Entity-list. (NotNull & NotEmpty) + * @return Inserted count. + */ + public int insertList(java.util.List ordersStatusList) { + assertListNotNullAndNotEmpty(ordersStatusList); + return delegateInsertList(ordersStatusList); + } + + /** + * Update list. + * + * @param ordersStatusList Entity-list. (NotNull & NotEmpty) + * @return Updated count. + */ + public int updateList(java.util.List ordersStatusList) { + assertListNotNullAndNotEmpty(ordersStatusList); + return delegateUpdateList(ordersStatusList); + } + + /** + * Delete list. + * + * @param ordersStatusList Entity-list. (NotNull & NotEmpty) + * @return Deleted count. + */ + public int deleteList(java.util.List ordersStatusList) { + assertListNotNullAndNotEmpty(ordersStatusList); + return delegateDeleteList(ordersStatusList); + } + + // =================================================================================== + // Various Insert + // ============== + + // =================================================================================== + // CBSetupper + // ========== + /** + * The interface of condition-bean setupper. + */ + public static interface CBSetupper extends ConditionBeanSetupper { + + /** + * Set up condition. + * + * @param cb Condition-bean. (NotNull) + */ + public void setup(OrdersStatusCB cb); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/bsbhv/BsOrdersStatusHistoryBhv.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/bsbhv/BsOrdersStatusHistoryBhv.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/bsbhv/BsOrdersStatusHistoryBhv.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,699 @@ + +package jp.sf.pal.pompei.bsbhv; + +import jp.sf.pal.pompei.allcommon.*; +import jp.sf.pal.pompei.allcommon.bhv.load.LoadRefererOption; +import jp.sf.pal.pompei.allcommon.bhv.setup.ConditionBeanSetupper; +import jp.sf.pal.pompei.allcommon.bhv.setup.ValueLabelSetupper; +import jp.sf.pal.pompei.allcommon.cbean.ConditionBean; +import jp.sf.pal.pompei.allcommon.cbean.ListResultBean; +import jp.sf.pal.pompei.allcommon.cbean.PagingBean; +import jp.sf.pal.pompei.allcommon.cbean.PagingResultBean; +import jp.sf.pal.pompei.allcommon.dbmeta.DBMeta; + +import jp.sf.pal.pompei.exdao.*; +import jp.sf.pal.pompei.exentity.*; +import jp.sf.pal.pompei.bsentity.dbmeta.*; +import jp.sf.pal.pompei.cbean.*; + + + +/** + * The behavior of ORDERS_STATUS_HISTORY. + * + *
+ * [primary-key]
+ *     ORDERS_STATUS_HISTORY_ID
+ * 
+ * [column-property]
+ *     ORDERS_STATUS_HISTORY_ID, ORDERS_ID, ORDERS_STATUS_ID, DATE_ADDED, CUSTOMER_NOTIFIED, COMMENTS
+ * 
+ * [foreign-property]
+ *     
+ * 
+ * [refferer-property]
+ *     
+ * 
+ * [sequence]
+ *     
+ * 
+ * [identity]
+ *     
+ * 
+ * [update-date]
+ *     
+ * 
+ * [version-no]
+ *     
+ * 
+ * 
+ * + * @author DBFlute(AutoGenerator) + */ +public abstract class BsOrdersStatusHistoryBhv extends jp.sf.pal.pompei.allcommon.bhv.AbstractBehaviorWritable { + + // =================================================================================== + // Attribute + // ========= + /** Dao instance. */ + protected OrdersStatusHistoryDao _dao; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + public BsOrdersStatusHistoryBhv() { + } + + // =================================================================================== + // Table name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + public String getTableDbName() { + return "ORDERS_STATUS_HISTORY"; + } + + // =================================================================================== + // DBMeta + // ====== + /** + * This method implements the method that is declared at super. + * + * @return DBMeta. (NotNull) + */ + public DBMeta getDBMeta() { + return OrdersStatusHistoryDbm.getInstance(); + } + + /** + * Get my dbmeta. + * + * @return DBMeta. (NotNull) + */ + public OrdersStatusHistoryDbm getMyDBMeta() { + return OrdersStatusHistoryDbm.getInstance(); + } + + // =================================================================================== + // Dao Accessor + // ============ + /** + * Get my dao. + * + * @return My dao. + */ + public OrdersStatusHistoryDao getMyDao() { + return _dao; + } + + /** + * Set my dao. + * + * @param dao My dao. (NotNull) + */ + public void setMyDao(OrdersStatusHistoryDao dao) { + assertObjectNotNull("dao", dao); + _dao = dao; + } + + /** + * This method implements the method that is declared at super. + * + * @return Dao-readable. (NotNull) + */ + public DaoReadable getDaoReadable() { + return getMyDao(); + } + + /** + * This method implements the method that is declared at super. + * + * @return Dao-writable. (NotNull) + */ + public DaoWritable getDaoWritable() { + return getMyDao(); + } + + // =================================================================================== + // New Instance + // ============ + /** + * New entity. + * + * @return Entity. (NotNull) + */ + public Entity newEntity() { + return newMyEntity(); + } + + /** + * New condition-bean. + * + * @return Condition-bean. (NotNull) + */ + public ConditionBean newConditionBean() { + return newMyConditionBean(); + } + + /** + * New my entity. + * + * @return My entity. (NotNull) + */ + public OrdersStatusHistory newMyEntity() { + return new OrdersStatusHistory(); + } + + /** + * New my condition-bean. + * + * @return My condition-bean. (NotNull) + */ + public OrdersStatusHistoryCB newMyConditionBean() { + return new OrdersStatusHistoryCB(); + } + + // =================================================================================== + // Delegate Method + // =============== + // ----------------------------------------------------- + // Select + // ------ + /** + * Get count as all. (Delegate-Method) + * + * @return All count. (NotNull) + */ + public int delegateGetCountAll() { + return getMyDao().getCountAll(); + } + + /** + * Get list as all. (Delegate-Method) + * + * @return All list. (NotNull) + */ + public java.util.List delegateGetListAll() { + return getMyDao().getListAll(); + } + + // + // Get entity. (Delegate-Method) + // + // @param Primary-keys (NotNull) + // @return Entity. (NotNull) + // + public OrdersStatusHistory delegateGetEntity(java.math.BigDecimal ordersStatusHistoryId) { + return getMyDao().getEntity(ordersStatusHistoryId); + } + + /** + * Select count by condition-bean. (Delegate-Method) + * + * @param cb Condition-bean. (NotNull) + * @return Selected count. (NotNull) + */ + public int delegateSelectCount(OrdersStatusHistoryCB cb) { + assertConditionBeanNotNull(cb); + return getMyDao().selectCount(cb); + } + + /** + * Select entity by condition-bean. (Delegate-Method) + * + * @param cb Condition-bean. (NotNull) + * @return Selected entity. If the select result is zero, it returns null. (Nullable) + */ + public OrdersStatusHistory delegateSelectEntity(OrdersStatusHistoryCB cb) { + assertConditionBeanNotNull(cb); + return getMyDao().selectEntity(cb); + } + + /** + * Select list by condition-bean. (Delegate-Method) + * + * @param cb Condition-bean. (NotNull) + * @return Selected list. If the select result is zero, it returns empty list. (NotNull) + */ + public java.util.List delegateSelectList(OrdersStatusHistoryCB cb) { + assertConditionBeanNotNull(cb); + return getMyDao().selectList(cb); + } + + + // ----------------------------------------------------- + // Update + // ------ + /** + * Insert one entity. (Delegate-Method) + * + * @param entity Entity. (NotNull) + * @return Inserted count. + */ + public int delegateInsert(OrdersStatusHistory entity) { + assertEntityNotNull(entity);// If this table use identity, the entity does not have primary-key. + filterEntityOfInsert(entity); + assertEntityOfInsert(entity); + return getMyDao().insert(entity); + } + + /** + * Update one entity. (Delegate-Method) + * {modified only} + * + * @param entity Entity. (NotNull) + * @return Updated count. + */ + public int delegateUpdate(OrdersStatusHistory entity) { + assertEntityNotNullAndHasPrimaryKeyValue(entity); + filterEntityOfUpdate(entity); + assertEntityOfUpdate(entity); + return getMyDao().updateModifiedOnly(entity); + } + + /** + * Delete one entity. (Delegate-Method) + * + * @param entity Entity. (NotNull) + * @return Deleted count. + */ + public int delegateDelete(OrdersStatusHistory entity) { + assertEntityNotNullAndHasPrimaryKeyValue(entity); + filterEntityOfDelete(entity); + assertEntityOfDelete(entity); + return getMyDao().delete(entity); + } + + /** + * Insert several entities. (Delegate-Method) + * + * @param entityList Entity-list. (NotNull & NotEmpty) + * @return Inserted count. + */ + public int delegateInsertList(java.util.List entityList) { + assertListNotNullAndNotEmpty(entityList); + return getMyDao().insertList(entityList); + } + + /** + * Update several entities. (Delegate-Method) + * + * @param entityList Entity-list. (NotNull & NotEmpty) + * @return Updated count. + */ + public int delegateUpdateList(java.util.List entityList) { + assertListNotNullAndNotEmpty(entityList); + return getMyDao().updateList(entityList); + } + + /** + * Delete several entities. (Delegate-Method) + * + * @param entityList Entity-list. (NotNull & NotEmpty) + * @return Deleted count. + */ + public int delegateDeleteList(java.util.List entityList) { + assertListNotNullAndNotEmpty(entityList); + return getMyDao().deleteList(entityList); + } + + // =================================================================================== + // Basic Select Count + // ================== + /** + * Select count by condition-bean. + *
+     * If the argument 'condition-bean' is effective about fetch-scope,
+     * this method invoke select count ignoring the fetch-scope.
+     * 
+ * @param cb Condition-bean. This condition-bean should not be set up about fetch-scope. (NotNull) + * @return Selected count. + */ + public int selectCount(OrdersStatusHistoryCB cb) { + assertConditionBeanNotNull(cb); + return delegateSelectCount(cb); + } + + // =================================================================================== + // Basic Select Entity + // =================== + /** + * Select entity by condition-bean. + * + * @param cb Condition-bean. (NotNull) + * @return Selected entity. (Nullalble) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public OrdersStatusHistory selectEntity(OrdersStatusHistoryCB cb) { + assertConditionBeanNotNull(cb); + final java.util.List ls = selectList(cb); + if (ls.isEmpty()) { + return null; + } + assertRecordHasBeenSelectedAsOne(ls, cb); + return (OrdersStatusHistory)ls.get(0); + } + + /** + * Select entity by condition-bean with deleted check. + * + * @param cb Condition-bean. (NotNull) + * @return Selected entity. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public OrdersStatusHistory selectEntityWithDeletedCheck(OrdersStatusHistoryCB cb) { + assertConditionBeanNotNull(cb); + final java.util.List ls = selectList(cb); + assertRecordHasNotBeenDeleted(ls, cb); + assertRecordHasBeenSelectedAsOne(ls, cb); + return (OrdersStatusHistory)ls.get(0); + } + + /* + * Select entity with deleted check. {by primary-key} + * + * @param primaryKey + * @return Selected entity. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public OrdersStatusHistory selectByPKValueWithDeletedCheck(java.math.BigDecimal ordersStatusHistoryId) { + OrdersStatusHistory entity = new OrdersStatusHistory(); + entity.setOrdersStatusHistoryId(ordersStatusHistoryId); + final OrdersStatusHistoryCB cb = newMyConditionBean(); + cb.acceptPrimaryKeyMapString(getDBMeta().extractPrimaryKeyMapString(entity)); + return selectEntityWithDeletedCheck(cb); + } + + // =================================================================================== + // Basic Select List + // ================= + /** + * Select list as result-bean. + * + * @param cb Condition-bean. (NotNull) + * @return Selected list-result-bean. (NotNull) + */ + public ListResultBean selectList(OrdersStatusHistoryCB cb) { + assertConditionBeanNotNull(cb); + return new ResultBeanBuilder(this).buildListResultBean(cb, delegateSelectList(cb)); + } + + /** + * Select page as result-bean. + * + * @param cb Condition-bean. (NotNull) + * @return Selected paging-result-bean. (NotNull) + */ + public PagingResultBean selectPage(final OrdersStatusHistoryCB cb) { + assertConditionBeanNotNull(cb); + return selectPage(cb, new SelectPageSimpleInvoker(this)); + } + + /** + * Select page. + * + * @param cb Condition-bean. (NotNull) + * @param invoker Select-page-invoker (NotNull) + * @return Selected paging-result-bean. (NotNull) + */ + public PagingResultBean selectPage(final OrdersStatusHistoryCB cb, SelectPageInvoker invoker) { + assertConditionBeanNotNull(cb); + final SelectPageCallback pageCallback = new SelectPageCallback() { + public PagingBean getPagingBean() { return cb; } + public int selectCountIgnoreFetchScope() { + return selectCount(cb); + } + public java.util.List selectListWithFetchScope() { + return selectList(cb); + } + }; + return invoker.invokeSelectPage(pageCallback); + } + + // =================================================================================== + // Various Select + // ============== + /** + * Select value-label list. + * + * @param cb Condition-bean. (NotNull) + * @param valueLabelSetupper Value-label-setupper. (NotNull) + * @return Value-label list. (NotNull) + */ + public java.util.List> selectValueLabelList(OrdersStatusHistoryCB cb, ValueLabelSetupper valueLabelSetupper) { + return createValueLabelList(selectList(cb), valueLabelSetupper); + } + + // =================================================================================== + // Load Referer + // ============ + + // =================================================================================== + // Pull Out Foreign + // ================ + + // =================================================================================== + // Basic Entity Update + // =================== + /** + * Insert. + * + * @param ordersStatusHistory Entity. (NotNull) + */ + public void insert(OrdersStatusHistory ordersStatusHistory) { + assertEntityNotNull(ordersStatusHistory); + delegateInsert(ordersStatusHistory); + } + + protected void doCreate(Entity ordersStatusHistory) { + insert((OrdersStatusHistory)ordersStatusHistory); + } + + /** + * Update. + *
+     * If it updates count zero, throws exception.
+     * If concurrency control of this table is valid, this update have it.
+     * 
+ * @param ordersStatusHistory Entity. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public void update(OrdersStatusHistory ordersStatusHistory) { + assertEntityNotNull(ordersStatusHistory); + final int updatedCount = delegateUpdate(ordersStatusHistory); + if (updatedCount == 0) { + throw new jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException(ordersStatusHistory.toString()); + } else if (updatedCount > 1) { + String msg = "updatedCount=" + updatedCount + ": " + ordersStatusHistory.toString(); + throw new jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException(msg); + } + } + + protected void doModify(Entity ordersStatusHistory) { + update((OrdersStatusHistory)ordersStatusHistory); + } + + /** + * Update after select. + * + * @param ordersStatusHistory Entity. This must contain primary-key value at least. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + */ + public void updateAfterSelect(OrdersStatusHistory ordersStatusHistory) { + assertEntityNotNullAndHasPrimaryKeyValue(ordersStatusHistory); + final OrdersStatusHistoryCB cb = newMyConditionBean(); + cb.acceptPrimaryKeyMapString(getDBMeta().extractPrimaryKeyMapString(ordersStatusHistory)); + final OrdersStatusHistory currentEntity = selectEntityWithDeletedCheck(cb); + mergeEntity(ordersStatusHistory, currentEntity); + update(currentEntity); + } + + protected void doModifyAfterSelect(Entity ordersStatusHistory) { + updateAfterSelect((OrdersStatusHistory)ordersStatusHistory); + } + + /** + * Insert or update. + * {update: modified only} + * + * @param ordersStatusHistory Entity. This should contain primary-key value at least(Except use identity). (NotNull) + */ + public void insertOrUpdate(OrdersStatusHistory ordersStatusHistory) { + assertEntityNotNull(ordersStatusHistory); + if (!ordersStatusHistory.hasPrimaryKeyValue()) { + insert(ordersStatusHistory); + } else { + try { + update(ordersStatusHistory); + } catch (org.seasar.dao.NotSingleRowUpdatedRuntimeException e) { + insert(ordersStatusHistory); + } catch (jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException e) { + insert(ordersStatusHistory); + } + } + } + + protected void doCreateOrUpdateNonstrict(Entity ordersStatusHistory) { + + insertOrUpdate((OrdersStatusHistory)ordersStatusHistory); + + } + + /** + * Insert or update after select. + * {update: modified only} + * + * @param ordersStatusHistory Entity. This should contain primary-key value at least(Except use identity). (NotNull) + */ + public void insertOrUpdateAfterSelect(OrdersStatusHistory ordersStatusHistory) { + assertEntityNotNull(ordersStatusHistory); + if (!ordersStatusHistory.hasPrimaryKeyValue()) { + insert(ordersStatusHistory); + return; + } + OrdersStatusHistory currentEntity = null; + try { + final OrdersStatusHistoryCB cb = newMyConditionBean(); + cb.acceptPrimaryKeyMapString(getDBMeta().extractPrimaryKeyMapString(ordersStatusHistory)); + currentEntity = selectEntityWithDeletedCheck(cb); + } catch (jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException e) { + insert(ordersStatusHistory); + return; + } + assertEntityNotNullAndHasPrimaryKeyValue(ordersStatusHistory); + mergeEntity(ordersStatusHistory, currentEntity); + update(currentEntity); + } + + protected void doCreateOrModifyAfterSelect(Entity entity) { + insertOrUpdateAfterSelect((OrdersStatusHistory)entity); + } + + /** + * This method implements the method that is declared at super. + * + * @param sourceEntity Source entity. (NotNull) + * @param destinationEntity Destination entity. (NotNull) + */ + protected void mergeEntity(Entity sourceEntity, Entity destinationEntity) { + assertEntityNotNull(sourceEntity); + assertEntityNotNull(destinationEntity); + final OrdersStatusHistory sourceMyEntity = (OrdersStatusHistory)sourceEntity; + final OrdersStatusHistory destinationMyEntity = (OrdersStatusHistory)destinationEntity; + destinationMyEntity.clearModifiedPropertyNames(); + final java.util.Set names = sourceMyEntity.getModifiedPropertyNames(); + + if (names.contains("ordersStatusHistoryId")) { destinationMyEntity.setOrdersStatusHistoryId(sourceMyEntity.getOrdersStatusHistoryId()); } + if (names.contains("ordersId")) { destinationMyEntity.setOrdersId(sourceMyEntity.getOrdersId()); } + if (names.contains("ordersStatusId")) { destinationMyEntity.setOrdersStatusId(sourceMyEntity.getOrdersStatusId()); } + if (names.contains("dateAdded")) { destinationMyEntity.setDateAdded(sourceMyEntity.getDateAdded()); } + if (names.contains("customerNotified")) { destinationMyEntity.setCustomerNotified(sourceMyEntity.getCustomerNotified()); } + if (names.contains("comments")) { destinationMyEntity.setComments(sourceMyEntity.getComments()); } + + } + + /** + * Delete. + * + * @param ordersStatusHistory Entity. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public void delete(OrdersStatusHistory ordersStatusHistory) { + assertEntityNotNull(ordersStatusHistory); + final int deletedCount = delegateDelete(ordersStatusHistory); + if (deletedCount == 0) { + throw new jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException(ordersStatusHistory.toString()); + } else if (deletedCount > 1) { + String msg = "deletedCount=" + deletedCount + ": " + ordersStatusHistory.toString(); + throw new jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException(msg); + } + } + + protected void doRemove(Entity ordersStatusHistory) { + delete((OrdersStatusHistory)ordersStatusHistory); + } + + /** + * Delete after select. + * + * @param ordersStatusHistory Entity. This must contain primary-key value at least. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + */ + public void deleteAfterSelect(OrdersStatusHistory ordersStatusHistory) { + assertEntityNotNullAndHasPrimaryKeyValue(ordersStatusHistory); + final OrdersStatusHistoryCB cb = newMyConditionBean(); + cb.acceptPrimaryKeyMapString(getDBMeta().extractPrimaryKeyMapString(ordersStatusHistory)); + selectEntityWithDeletedCheck(cb); + delete(ordersStatusHistory); + } + + protected void doRemoveAfterSelect(Entity ordersStatusHistory) { + deleteAfterSelect((OrdersStatusHistory)ordersStatusHistory); + } + + // =================================================================================== + // Basic Batch Update + // ================== + /** + * Insert list. + * + * @param ordersStatusHistoryList Entity-list. (NotNull & NotEmpty) + * @return Inserted count. + */ + public int insertList(java.util.List ordersStatusHistoryList) { + assertListNotNullAndNotEmpty(ordersStatusHistoryList); + return delegateInsertList(ordersStatusHistoryList); + } + + /** + * Update list. + * + * @param ordersStatusHistoryList Entity-list. (NotNull & NotEmpty) + * @return Updated count. + */ + public int updateList(java.util.List ordersStatusHistoryList) { + assertListNotNullAndNotEmpty(ordersStatusHistoryList); + return delegateUpdateList(ordersStatusHistoryList); + } + + /** + * Delete list. + * + * @param ordersStatusHistoryList Entity-list. (NotNull & NotEmpty) + * @return Deleted count. + */ + public int deleteList(java.util.List ordersStatusHistoryList) { + assertListNotNullAndNotEmpty(ordersStatusHistoryList); + return delegateDeleteList(ordersStatusHistoryList); + } + + // =================================================================================== + // Various Insert + // ============== + + // =================================================================================== + // CBSetupper + // ========== + /** + * The interface of condition-bean setupper. + */ + public static interface CBSetupper extends ConditionBeanSetupper { + + /** + * Set up condition. + * + * @param cb Condition-bean. (NotNull) + */ + public void setup(OrdersStatusHistoryCB cb); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/bsbhv/BsOrdersTotalBhv.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/bsbhv/BsOrdersTotalBhv.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/bsbhv/BsOrdersTotalBhv.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,700 @@ + +package jp.sf.pal.pompei.bsbhv; + +import jp.sf.pal.pompei.allcommon.*; +import jp.sf.pal.pompei.allcommon.bhv.load.LoadRefererOption; +import jp.sf.pal.pompei.allcommon.bhv.setup.ConditionBeanSetupper; +import jp.sf.pal.pompei.allcommon.bhv.setup.ValueLabelSetupper; +import jp.sf.pal.pompei.allcommon.cbean.ConditionBean; +import jp.sf.pal.pompei.allcommon.cbean.ListResultBean; +import jp.sf.pal.pompei.allcommon.cbean.PagingBean; +import jp.sf.pal.pompei.allcommon.cbean.PagingResultBean; +import jp.sf.pal.pompei.allcommon.dbmeta.DBMeta; + +import jp.sf.pal.pompei.exdao.*; +import jp.sf.pal.pompei.exentity.*; +import jp.sf.pal.pompei.bsentity.dbmeta.*; +import jp.sf.pal.pompei.cbean.*; + + + +/** + * The behavior of ORDERS_TOTAL. + * + *
+ * [primary-key]
+ *     ORDERS_TOTAL_ID
+ * 
+ * [column-property]
+ *     ORDERS_TOTAL_ID, ORDERS_ID, TITLE, TEXT, VALUE, OT_CLASS, SORT_ORDER
+ * 
+ * [foreign-property]
+ *     
+ * 
+ * [refferer-property]
+ *     
+ * 
+ * [sequence]
+ *     
+ * 
+ * [identity]
+ *     
+ * 
+ * [update-date]
+ *     
+ * 
+ * [version-no]
+ *     
+ * 
+ * 
+ * + * @author DBFlute(AutoGenerator) + */ +public abstract class BsOrdersTotalBhv extends jp.sf.pal.pompei.allcommon.bhv.AbstractBehaviorWritable { + + // =================================================================================== + // Attribute + // ========= + /** Dao instance. */ + protected OrdersTotalDao _dao; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + public BsOrdersTotalBhv() { + } + + // =================================================================================== + // Table name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + public String getTableDbName() { + return "ORDERS_TOTAL"; + } + + // =================================================================================== + // DBMeta + // ====== + /** + * This method implements the method that is declared at super. + * + * @return DBMeta. (NotNull) + */ + public DBMeta getDBMeta() { + return OrdersTotalDbm.getInstance(); + } + + /** + * Get my dbmeta. + * + * @return DBMeta. (NotNull) + */ + public OrdersTotalDbm getMyDBMeta() { + return OrdersTotalDbm.getInstance(); + } + + // =================================================================================== + // Dao Accessor + // ============ + /** + * Get my dao. + * + * @return My dao. + */ + public OrdersTotalDao getMyDao() { + return _dao; + } + + /** + * Set my dao. + * + * @param dao My dao. (NotNull) + */ + public void setMyDao(OrdersTotalDao dao) { + assertObjectNotNull("dao", dao); + _dao = dao; + } + + /** + * This method implements the method that is declared at super. + * + * @return Dao-readable. (NotNull) + */ + public DaoReadable getDaoReadable() { + return getMyDao(); + } + + /** + * This method implements the method that is declared at super. + * + * @return Dao-writable. (NotNull) + */ + public DaoWritable getDaoWritable() { + return getMyDao(); + } + + // =================================================================================== + // New Instance + // ============ + /** + * New entity. + * + * @return Entity. (NotNull) + */ + public Entity newEntity() { + return newMyEntity(); + } + + /** + * New condition-bean. + * + * @return Condition-bean. (NotNull) + */ + public ConditionBean newConditionBean() { + return newMyConditionBean(); + } + + /** + * New my entity. + * + * @return My entity. (NotNull) + */ + public OrdersTotal newMyEntity() { + return new OrdersTotal(); + } + + /** + * New my condition-bean. + * + * @return My condition-bean. (NotNull) + */ + public OrdersTotalCB newMyConditionBean() { + return new OrdersTotalCB(); + } + + // =================================================================================== + // Delegate Method + // =============== + // ----------------------------------------------------- + // Select + // ------ + /** + * Get count as all. (Delegate-Method) + * + * @return All count. (NotNull) + */ + public int delegateGetCountAll() { + return getMyDao().getCountAll(); + } + + /** + * Get list as all. (Delegate-Method) + * + * @return All list. (NotNull) + */ + public java.util.List delegateGetListAll() { + return getMyDao().getListAll(); + } + + // + // Get entity. (Delegate-Method) + // + // @param Primary-keys (NotNull) + // @return Entity. (NotNull) + // + public OrdersTotal delegateGetEntity(java.math.BigDecimal ordersTotalId) { + return getMyDao().getEntity(ordersTotalId); + } + + /** + * Select count by condition-bean. (Delegate-Method) + * + * @param cb Condition-bean. (NotNull) + * @return Selected count. (NotNull) + */ + public int delegateSelectCount(OrdersTotalCB cb) { + assertConditionBeanNotNull(cb); + return getMyDao().selectCount(cb); + } + + /** + * Select entity by condition-bean. (Delegate-Method) + * + * @param cb Condition-bean. (NotNull) + * @return Selected entity. If the select result is zero, it returns null. (Nullable) + */ + public OrdersTotal delegateSelectEntity(OrdersTotalCB cb) { + assertConditionBeanNotNull(cb); + return getMyDao().selectEntity(cb); + } + + /** + * Select list by condition-bean. (Delegate-Method) + * + * @param cb Condition-bean. (NotNull) + * @return Selected list. If the select result is zero, it returns empty list. (NotNull) + */ + public java.util.List delegateSelectList(OrdersTotalCB cb) { + assertConditionBeanNotNull(cb); + return getMyDao().selectList(cb); + } + + + // ----------------------------------------------------- + // Update + // ------ + /** + * Insert one entity. (Delegate-Method) + * + * @param entity Entity. (NotNull) + * @return Inserted count. + */ + public int delegateInsert(OrdersTotal entity) { + assertEntityNotNull(entity);// If this table use identity, the entity does not have primary-key. + filterEntityOfInsert(entity); + assertEntityOfInsert(entity); + return getMyDao().insert(entity); + } + + /** + * Update one entity. (Delegate-Method) + * {modified only} + * + * @param entity Entity. (NotNull) + * @return Updated count. + */ + public int delegateUpdate(OrdersTotal entity) { + assertEntityNotNullAndHasPrimaryKeyValue(entity); + filterEntityOfUpdate(entity); + assertEntityOfUpdate(entity); + return getMyDao().updateModifiedOnly(entity); + } + + /** + * Delete one entity. (Delegate-Method) + * + * @param entity Entity. (NotNull) + * @return Deleted count. + */ + public int delegateDelete(OrdersTotal entity) { + assertEntityNotNullAndHasPrimaryKeyValue(entity); + filterEntityOfDelete(entity); + assertEntityOfDelete(entity); + return getMyDao().delete(entity); + } + + /** + * Insert several entities. (Delegate-Method) + * + * @param entityList Entity-list. (NotNull & NotEmpty) + * @return Inserted count. + */ + public int delegateInsertList(java.util.List entityList) { + assertListNotNullAndNotEmpty(entityList); + return getMyDao().insertList(entityList); + } + + /** + * Update several entities. (Delegate-Method) + * + * @param entityList Entity-list. (NotNull & NotEmpty) + * @return Updated count. + */ + public int delegateUpdateList(java.util.List entityList) { + assertListNotNullAndNotEmpty(entityList); + return getMyDao().updateList(entityList); + } + + /** + * Delete several entities. (Delegate-Method) + * + * @param entityList Entity-list. (NotNull & NotEmpty) + * @return Deleted count. + */ + public int delegateDeleteList(java.util.List entityList) { + assertListNotNullAndNotEmpty(entityList); + return getMyDao().deleteList(entityList); + } + + // =================================================================================== + // Basic Select Count + // ================== + /** + * Select count by condition-bean. + *
+     * If the argument 'condition-bean' is effective about fetch-scope,
+     * this method invoke select count ignoring the fetch-scope.
+     * 
+ * @param cb Condition-bean. This condition-bean should not be set up about fetch-scope. (NotNull) + * @return Selected count. + */ + public int selectCount(OrdersTotalCB cb) { + assertConditionBeanNotNull(cb); + return delegateSelectCount(cb); + } + + // =================================================================================== + // Basic Select Entity + // =================== + /** + * Select entity by condition-bean. + * + * @param cb Condition-bean. (NotNull) + * @return Selected entity. (Nullalble) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public OrdersTotal selectEntity(OrdersTotalCB cb) { + assertConditionBeanNotNull(cb); + final java.util.List ls = selectList(cb); + if (ls.isEmpty()) { + return null; + } + assertRecordHasBeenSelectedAsOne(ls, cb); + return (OrdersTotal)ls.get(0); + } + + /** + * Select entity by condition-bean with deleted check. + * + * @param cb Condition-bean. (NotNull) + * @return Selected entity. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public OrdersTotal selectEntityWithDeletedCheck(OrdersTotalCB cb) { + assertConditionBeanNotNull(cb); + final java.util.List ls = selectList(cb); + assertRecordHasNotBeenDeleted(ls, cb); + assertRecordHasBeenSelectedAsOne(ls, cb); + return (OrdersTotal)ls.get(0); + } + + /* + * Select entity with deleted check. {by primary-key} + * + * @param primaryKey + * @return Selected entity. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public OrdersTotal selectByPKValueWithDeletedCheck(java.math.BigDecimal ordersTotalId) { + OrdersTotal entity = new OrdersTotal(); + entity.setOrdersTotalId(ordersTotalId); + final OrdersTotalCB cb = newMyConditionBean(); + cb.acceptPrimaryKeyMapString(getDBMeta().extractPrimaryKeyMapString(entity)); + return selectEntityWithDeletedCheck(cb); + } + + // =================================================================================== + // Basic Select List + // ================= + /** + * Select list as result-bean. + * + * @param cb Condition-bean. (NotNull) + * @return Selected list-result-bean. (NotNull) + */ + public ListResultBean selectList(OrdersTotalCB cb) { + assertConditionBeanNotNull(cb); + return new ResultBeanBuilder(this).buildListResultBean(cb, delegateSelectList(cb)); + } + + /** + * Select page as result-bean. + * + * @param cb Condition-bean. (NotNull) + * @return Selected paging-result-bean. (NotNull) + */ + public PagingResultBean selectPage(final OrdersTotalCB cb) { + assertConditionBeanNotNull(cb); + return selectPage(cb, new SelectPageSimpleInvoker(this)); + } + + /** + * Select page. + * + * @param cb Condition-bean. (NotNull) + * @param invoker Select-page-invoker (NotNull) + * @return Selected paging-result-bean. (NotNull) + */ + public PagingResultBean selectPage(final OrdersTotalCB cb, SelectPageInvoker invoker) { + assertConditionBeanNotNull(cb); + final SelectPageCallback pageCallback = new SelectPageCallback() { + public PagingBean getPagingBean() { return cb; } + public int selectCountIgnoreFetchScope() { + return selectCount(cb); + } + public java.util.List selectListWithFetchScope() { + return selectList(cb); + } + }; + return invoker.invokeSelectPage(pageCallback); + } + + // =================================================================================== + // Various Select + // ============== + /** + * Select value-label list. + * + * @param cb Condition-bean. (NotNull) + * @param valueLabelSetupper Value-label-setupper. (NotNull) + * @return Value-label list. (NotNull) + */ + public java.util.List> selectValueLabelList(OrdersTotalCB cb, ValueLabelSetupper valueLabelSetupper) { + return createValueLabelList(selectList(cb), valueLabelSetupper); + } + + // =================================================================================== + // Load Referer + // ============ + + // =================================================================================== + // Pull Out Foreign + // ================ + + // =================================================================================== + // Basic Entity Update + // =================== + /** + * Insert. + * + * @param ordersTotal Entity. (NotNull) + */ + public void insert(OrdersTotal ordersTotal) { + assertEntityNotNull(ordersTotal); + delegateInsert(ordersTotal); + } + + protected void doCreate(Entity ordersTotal) { + insert((OrdersTotal)ordersTotal); + } + + /** + * Update. + *
+     * If it updates count zero, throws exception.
+     * If concurrency control of this table is valid, this update have it.
+     * 
+ * @param ordersTotal Entity. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public void update(OrdersTotal ordersTotal) { + assertEntityNotNull(ordersTotal); + final int updatedCount = delegateUpdate(ordersTotal); + if (updatedCount == 0) { + throw new jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException(ordersTotal.toString()); + } else if (updatedCount > 1) { + String msg = "updatedCount=" + updatedCount + ": " + ordersTotal.toString(); + throw new jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException(msg); + } + } + + protected void doModify(Entity ordersTotal) { + update((OrdersTotal)ordersTotal); + } + + /** + * Update after select. + * + * @param ordersTotal Entity. This must contain primary-key value at least. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + */ + public void updateAfterSelect(OrdersTotal ordersTotal) { + assertEntityNotNullAndHasPrimaryKeyValue(ordersTotal); + final OrdersTotalCB cb = newMyConditionBean(); + cb.acceptPrimaryKeyMapString(getDBMeta().extractPrimaryKeyMapString(ordersTotal)); + final OrdersTotal currentEntity = selectEntityWithDeletedCheck(cb); + mergeEntity(ordersTotal, currentEntity); + update(currentEntity); + } + + protected void doModifyAfterSelect(Entity ordersTotal) { + updateAfterSelect((OrdersTotal)ordersTotal); + } + + /** + * Insert or update. + * {update: modified only} + * + * @param ordersTotal Entity. This should contain primary-key value at least(Except use identity). (NotNull) + */ + public void insertOrUpdate(OrdersTotal ordersTotal) { + assertEntityNotNull(ordersTotal); + if (!ordersTotal.hasPrimaryKeyValue()) { + insert(ordersTotal); + } else { + try { + update(ordersTotal); + } catch (org.seasar.dao.NotSingleRowUpdatedRuntimeException e) { + insert(ordersTotal); + } catch (jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException e) { + insert(ordersTotal); + } + } + } + + protected void doCreateOrUpdateNonstrict(Entity ordersTotal) { + + insertOrUpdate((OrdersTotal)ordersTotal); + + } + + /** + * Insert or update after select. + * {update: modified only} + * + * @param ordersTotal Entity. This should contain primary-key value at least(Except use identity). (NotNull) + */ + public void insertOrUpdateAfterSelect(OrdersTotal ordersTotal) { + assertEntityNotNull(ordersTotal); + if (!ordersTotal.hasPrimaryKeyValue()) { + insert(ordersTotal); + return; + } + OrdersTotal currentEntity = null; + try { + final OrdersTotalCB cb = newMyConditionBean(); + cb.acceptPrimaryKeyMapString(getDBMeta().extractPrimaryKeyMapString(ordersTotal)); + currentEntity = selectEntityWithDeletedCheck(cb); + } catch (jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException e) { + insert(ordersTotal); + return; + } + assertEntityNotNullAndHasPrimaryKeyValue(ordersTotal); + mergeEntity(ordersTotal, currentEntity); + update(currentEntity); + } + + protected void doCreateOrModifyAfterSelect(Entity entity) { + insertOrUpdateAfterSelect((OrdersTotal)entity); + } + + /** + * This method implements the method that is declared at super. + * + * @param sourceEntity Source entity. (NotNull) + * @param destinationEntity Destination entity. (NotNull) + */ + protected void mergeEntity(Entity sourceEntity, Entity destinationEntity) { + assertEntityNotNull(sourceEntity); + assertEntityNotNull(destinationEntity); + final OrdersTotal sourceMyEntity = (OrdersTotal)sourceEntity; + final OrdersTotal destinationMyEntity = (OrdersTotal)destinationEntity; + destinationMyEntity.clearModifiedPropertyNames(); + final java.util.Set names = sourceMyEntity.getModifiedPropertyNames(); + + if (names.contains("ordersTotalId")) { destinationMyEntity.setOrdersTotalId(sourceMyEntity.getOrdersTotalId()); } + if (names.contains("ordersId")) { destinationMyEntity.setOrdersId(sourceMyEntity.getOrdersId()); } + if (names.contains("title")) { destinationMyEntity.setTitle(sourceMyEntity.getTitle()); } + if (names.contains("text")) { destinationMyEntity.setText(sourceMyEntity.getText()); } + if (names.contains("value")) { destinationMyEntity.setValue(sourceMyEntity.getValue()); } + if (names.contains("otClass")) { destinationMyEntity.setOtClass(sourceMyEntity.getOtClass()); } + if (names.contains("sortOrder")) { destinationMyEntity.setSortOrder(sourceMyEntity.getSortOrder()); } + + } + + /** + * Delete. + * + * @param ordersTotal Entity. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public void delete(OrdersTotal ordersTotal) { + assertEntityNotNull(ordersTotal); + final int deletedCount = delegateDelete(ordersTotal); + if (deletedCount == 0) { + throw new jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException(ordersTotal.toString()); + } else if (deletedCount > 1) { + String msg = "deletedCount=" + deletedCount + ": " + ordersTotal.toString(); + throw new jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException(msg); + } + } + + protected void doRemove(Entity ordersTotal) { + delete((OrdersTotal)ordersTotal); + } + + /** + * Delete after select. + * + * @param ordersTotal Entity. This must contain primary-key value at least. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + */ + public void deleteAfterSelect(OrdersTotal ordersTotal) { + assertEntityNotNullAndHasPrimaryKeyValue(ordersTotal); + final OrdersTotalCB cb = newMyConditionBean(); + cb.acceptPrimaryKeyMapString(getDBMeta().extractPrimaryKeyMapString(ordersTotal)); + selectEntityWithDeletedCheck(cb); + delete(ordersTotal); + } + + protected void doRemoveAfterSelect(Entity ordersTotal) { + deleteAfterSelect((OrdersTotal)ordersTotal); + } + + // =================================================================================== + // Basic Batch Update + // ================== + /** + * Insert list. + * + * @param ordersTotalList Entity-list. (NotNull & NotEmpty) + * @return Inserted count. + */ + public int insertList(java.util.List ordersTotalList) { + assertListNotNullAndNotEmpty(ordersTotalList); + return delegateInsertList(ordersTotalList); + } + + /** + * Update list. + * + * @param ordersTotalList Entity-list. (NotNull & NotEmpty) + * @return Updated count. + */ + public int updateList(java.util.List ordersTotalList) { + assertListNotNullAndNotEmpty(ordersTotalList); + return delegateUpdateList(ordersTotalList); + } + + /** + * Delete list. + * + * @param ordersTotalList Entity-list. (NotNull & NotEmpty) + * @return Deleted count. + */ + public int deleteList(java.util.List ordersTotalList) { + assertListNotNullAndNotEmpty(ordersTotalList); + return delegateDeleteList(ordersTotalList); + } + + // =================================================================================== + // Various Insert + // ============== + + // =================================================================================== + // CBSetupper + // ========== + /** + * The interface of condition-bean setupper. + */ + public static interface CBSetupper extends ConditionBeanSetupper { + + /** + * Set up condition. + * + * @param cb Condition-bean. (NotNull) + */ + public void setup(OrdersTotalCB cb); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/bsbhv/BsProductsAttributesBhv.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/bsbhv/BsProductsAttributesBhv.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/bsbhv/BsProductsAttributesBhv.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,699 @@ + +package jp.sf.pal.pompei.bsbhv; + +import jp.sf.pal.pompei.allcommon.*; +import jp.sf.pal.pompei.allcommon.bhv.load.LoadRefererOption; +import jp.sf.pal.pompei.allcommon.bhv.setup.ConditionBeanSetupper; +import jp.sf.pal.pompei.allcommon.bhv.setup.ValueLabelSetupper; +import jp.sf.pal.pompei.allcommon.cbean.ConditionBean; +import jp.sf.pal.pompei.allcommon.cbean.ListResultBean; +import jp.sf.pal.pompei.allcommon.cbean.PagingBean; +import jp.sf.pal.pompei.allcommon.cbean.PagingResultBean; +import jp.sf.pal.pompei.allcommon.dbmeta.DBMeta; + +import jp.sf.pal.pompei.exdao.*; +import jp.sf.pal.pompei.exentity.*; +import jp.sf.pal.pompei.bsentity.dbmeta.*; +import jp.sf.pal.pompei.cbean.*; + + + +/** + * The behavior of PRODUCTS_ATTRIBUTES. + * + *
+ * [primary-key]
+ *     PRODUCTS_ATTRIBUTES_ID
+ * 
+ * [column-property]
+ *     PRODUCTS_ATTRIBUTES_ID, PRODUCTS_ID, OPTIONS_ID, OPTIONS_VALUES_ID, OPTIONS_VALUES_PRICE, PRICE_PREFIX
+ * 
+ * [foreign-property]
+ *     
+ * 
+ * [refferer-property]
+ *     
+ * 
+ * [sequence]
+ *     
+ * 
+ * [identity]
+ *     
+ * 
+ * [update-date]
+ *     
+ * 
+ * [version-no]
+ *     
+ * 
+ * 
+ * + * @author DBFlute(AutoGenerator) + */ +public abstract class BsProductsAttributesBhv extends jp.sf.pal.pompei.allcommon.bhv.AbstractBehaviorWritable { + + // =================================================================================== + // Attribute + // ========= + /** Dao instance. */ + protected ProductsAttributesDao _dao; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + public BsProductsAttributesBhv() { + } + + // =================================================================================== + // Table name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + public String getTableDbName() { + return "PRODUCTS_ATTRIBUTES"; + } + + // =================================================================================== + // DBMeta + // ====== + /** + * This method implements the method that is declared at super. + * + * @return DBMeta. (NotNull) + */ + public DBMeta getDBMeta() { + return ProductsAttributesDbm.getInstance(); + } + + /** + * Get my dbmeta. + * + * @return DBMeta. (NotNull) + */ + public ProductsAttributesDbm getMyDBMeta() { + return ProductsAttributesDbm.getInstance(); + } + + // =================================================================================== + // Dao Accessor + // ============ + /** + * Get my dao. + * + * @return My dao. + */ + public ProductsAttributesDao getMyDao() { + return _dao; + } + + /** + * Set my dao. + * + * @param dao My dao. (NotNull) + */ + public void setMyDao(ProductsAttributesDao dao) { + assertObjectNotNull("dao", dao); + _dao = dao; + } + + /** + * This method implements the method that is declared at super. + * + * @return Dao-readable. (NotNull) + */ + public DaoReadable getDaoReadable() { + return getMyDao(); + } + + /** + * This method implements the method that is declared at super. + * + * @return Dao-writable. (NotNull) + */ + public DaoWritable getDaoWritable() { + return getMyDao(); + } + + // =================================================================================== + // New Instance + // ============ + /** + * New entity. + * + * @return Entity. (NotNull) + */ + public Entity newEntity() { + return newMyEntity(); + } + + /** + * New condition-bean. + * + * @return Condition-bean. (NotNull) + */ + public ConditionBean newConditionBean() { + return newMyConditionBean(); + } + + /** + * New my entity. + * + * @return My entity. (NotNull) + */ + public ProductsAttributes newMyEntity() { + return new ProductsAttributes(); + } + + /** + * New my condition-bean. + * + * @return My condition-bean. (NotNull) + */ + public ProductsAttributesCB newMyConditionBean() { + return new ProductsAttributesCB(); + } + + // =================================================================================== + // Delegate Method + // =============== + // ----------------------------------------------------- + // Select + // ------ + /** + * Get count as all. (Delegate-Method) + * + * @return All count. (NotNull) + */ + public int delegateGetCountAll() { + return getMyDao().getCountAll(); + } + + /** + * Get list as all. (Delegate-Method) + * + * @return All list. (NotNull) + */ + public java.util.List delegateGetListAll() { + return getMyDao().getListAll(); + } + + // + // Get entity. (Delegate-Method) + // + // @param Primary-keys (NotNull) + // @return Entity. (NotNull) + // + public ProductsAttributes delegateGetEntity(java.math.BigDecimal productsAttributesId) { + return getMyDao().getEntity(productsAttributesId); + } + + /** + * Select count by condition-bean. (Delegate-Method) + * + * @param cb Condition-bean. (NotNull) + * @return Selected count. (NotNull) + */ + public int delegateSelectCount(ProductsAttributesCB cb) { + assertConditionBeanNotNull(cb); + return getMyDao().selectCount(cb); + } + + /** + * Select entity by condition-bean. (Delegate-Method) + * + * @param cb Condition-bean. (NotNull) + * @return Selected entity. If the select result is zero, it returns null. (Nullable) + */ + public ProductsAttributes delegateSelectEntity(ProductsAttributesCB cb) { + assertConditionBeanNotNull(cb); + return getMyDao().selectEntity(cb); + } + + /** + * Select list by condition-bean. (Delegate-Method) + * + * @param cb Condition-bean. (NotNull) + * @return Selected list. If the select result is zero, it returns empty list. (NotNull) + */ + public java.util.List delegateSelectList(ProductsAttributesCB cb) { + assertConditionBeanNotNull(cb); + return getMyDao().selectList(cb); + } + + + // ----------------------------------------------------- + // Update + // ------ + /** + * Insert one entity. (Delegate-Method) + * + * @param entity Entity. (NotNull) + * @return Inserted count. + */ + public int delegateInsert(ProductsAttributes entity) { + assertEntityNotNull(entity);// If this table use identity, the entity does not have primary-key. + filterEntityOfInsert(entity); + assertEntityOfInsert(entity); + return getMyDao().insert(entity); + } + + /** + * Update one entity. (Delegate-Method) + * {modified only} + * + * @param entity Entity. (NotNull) + * @return Updated count. + */ + public int delegateUpdate(ProductsAttributes entity) { + assertEntityNotNullAndHasPrimaryKeyValue(entity); + filterEntityOfUpdate(entity); + assertEntityOfUpdate(entity); + return getMyDao().updateModifiedOnly(entity); + } + + /** + * Delete one entity. (Delegate-Method) + * + * @param entity Entity. (NotNull) + * @return Deleted count. + */ + public int delegateDelete(ProductsAttributes entity) { + assertEntityNotNullAndHasPrimaryKeyValue(entity); + filterEntityOfDelete(entity); + assertEntityOfDelete(entity); + return getMyDao().delete(entity); + } + + /** + * Insert several entities. (Delegate-Method) + * + * @param entityList Entity-list. (NotNull & NotEmpty) + * @return Inserted count. + */ + public int delegateInsertList(java.util.List entityList) { + assertListNotNullAndNotEmpty(entityList); + return getMyDao().insertList(entityList); + } + + /** + * Update several entities. (Delegate-Method) + * + * @param entityList Entity-list. (NotNull & NotEmpty) + * @return Updated count. + */ + public int delegateUpdateList(java.util.List entityList) { + assertListNotNullAndNotEmpty(entityList); + return getMyDao().updateList(entityList); + } + + /** + * Delete several entities. (Delegate-Method) + * + * @param entityList Entity-list. (NotNull & NotEmpty) + * @return Deleted count. + */ + public int delegateDeleteList(java.util.List entityList) { + assertListNotNullAndNotEmpty(entityList); + return getMyDao().deleteList(entityList); + } + + // =================================================================================== + // Basic Select Count + // ================== + /** + * Select count by condition-bean. + *
+     * If the argument 'condition-bean' is effective about fetch-scope,
+     * this method invoke select count ignoring the fetch-scope.
+     * 
+ * @param cb Condition-bean. This condition-bean should not be set up about fetch-scope. (NotNull) + * @return Selected count. + */ + public int selectCount(ProductsAttributesCB cb) { + assertConditionBeanNotNull(cb); + return delegateSelectCount(cb); + } + + // =================================================================================== + // Basic Select Entity + // =================== + /** + * Select entity by condition-bean. + * + * @param cb Condition-bean. (NotNull) + * @return Selected entity. (Nullalble) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public ProductsAttributes selectEntity(ProductsAttributesCB cb) { + assertConditionBeanNotNull(cb); + final java.util.List ls = selectList(cb); + if (ls.isEmpty()) { + return null; + } + assertRecordHasBeenSelectedAsOne(ls, cb); + return (ProductsAttributes)ls.get(0); + } + + /** + * Select entity by condition-bean with deleted check. + * + * @param cb Condition-bean. (NotNull) + * @return Selected entity. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public ProductsAttributes selectEntityWithDeletedCheck(ProductsAttributesCB cb) { + assertConditionBeanNotNull(cb); + final java.util.List ls = selectList(cb); + assertRecordHasNotBeenDeleted(ls, cb); + assertRecordHasBeenSelectedAsOne(ls, cb); + return (ProductsAttributes)ls.get(0); + } + + /* + * Select entity with deleted check. {by primary-key} + * + * @param primaryKey + * @return Selected entity. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public ProductsAttributes selectByPKValueWithDeletedCheck(java.math.BigDecimal productsAttributesId) { + ProductsAttributes entity = new ProductsAttributes(); + entity.setProductsAttributesId(productsAttributesId); + final ProductsAttributesCB cb = newMyConditionBean(); + cb.acceptPrimaryKeyMapString(getDBMeta().extractPrimaryKeyMapString(entity)); + return selectEntityWithDeletedCheck(cb); + } + + // =================================================================================== + // Basic Select List + // ================= + /** + * Select list as result-bean. + * + * @param cb Condition-bean. (NotNull) + * @return Selected list-result-bean. (NotNull) + */ + public ListResultBean selectList(ProductsAttributesCB cb) { + assertConditionBeanNotNull(cb); + return new ResultBeanBuilder(this).buildListResultBean(cb, delegateSelectList(cb)); + } + + /** + * Select page as result-bean. + * + * @param cb Condition-bean. (NotNull) + * @return Selected paging-result-bean. (NotNull) + */ + public PagingResultBean selectPage(final ProductsAttributesCB cb) { + assertConditionBeanNotNull(cb); + return selectPage(cb, new SelectPageSimpleInvoker(this)); + } + + /** + * Select page. + * + * @param cb Condition-bean. (NotNull) + * @param invoker Select-page-invoker (NotNull) + * @return Selected paging-result-bean. (NotNull) + */ + public PagingResultBean selectPage(final ProductsAttributesCB cb, SelectPageInvoker invoker) { + assertConditionBeanNotNull(cb); + final SelectPageCallback pageCallback = new SelectPageCallback() { + public PagingBean getPagingBean() { return cb; } + public int selectCountIgnoreFetchScope() { + return selectCount(cb); + } + public java.util.List selectListWithFetchScope() { + return selectList(cb); + } + }; + return invoker.invokeSelectPage(pageCallback); + } + + // =================================================================================== + // Various Select + // ============== + /** + * Select value-label list. + * + * @param cb Condition-bean. (NotNull) + * @param valueLabelSetupper Value-label-setupper. (NotNull) + * @return Value-label list. (NotNull) + */ + public java.util.List> selectValueLabelList(ProductsAttributesCB cb, ValueLabelSetupper valueLabelSetupper) { + return createValueLabelList(selectList(cb), valueLabelSetupper); + } + + // =================================================================================== + // Load Referer + // ============ + + // =================================================================================== + // Pull Out Foreign + // ================ + + // =================================================================================== + // Basic Entity Update + // =================== + /** + * Insert. + * + * @param productsAttributes Entity. (NotNull) + */ + public void insert(ProductsAttributes productsAttributes) { + assertEntityNotNull(productsAttributes); + delegateInsert(productsAttributes); + } + + protected void doCreate(Entity productsAttributes) { + insert((ProductsAttributes)productsAttributes); + } + + /** + * Update. + *
+     * If it updates count zero, throws exception.
+     * If concurrency control of this table is valid, this update have it.
+     * 
+ * @param productsAttributes Entity. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public void update(ProductsAttributes productsAttributes) { + assertEntityNotNull(productsAttributes); + final int updatedCount = delegateUpdate(productsAttributes); + if (updatedCount == 0) { + throw new jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException(productsAttributes.toString()); + } else if (updatedCount > 1) { + String msg = "updatedCount=" + updatedCount + ": " + productsAttributes.toString(); + throw new jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException(msg); + } + } + + protected void doModify(Entity productsAttributes) { + update((ProductsAttributes)productsAttributes); + } + + /** + * Update after select. + * + * @param productsAttributes Entity. This must contain primary-key value at least. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + */ + public void updateAfterSelect(ProductsAttributes productsAttributes) { + assertEntityNotNullAndHasPrimaryKeyValue(productsAttributes); + final ProductsAttributesCB cb = newMyConditionBean(); + cb.acceptPrimaryKeyMapString(getDBMeta().extractPrimaryKeyMapString(productsAttributes)); + final ProductsAttributes currentEntity = selectEntityWithDeletedCheck(cb); + mergeEntity(productsAttributes, currentEntity); + update(currentEntity); + } + + protected void doModifyAfterSelect(Entity productsAttributes) { + updateAfterSelect((ProductsAttributes)productsAttributes); + } + + /** + * Insert or update. + * {update: modified only} + * + * @param productsAttributes Entity. This should contain primary-key value at least(Except use identity). (NotNull) + */ + public void insertOrUpdate(ProductsAttributes productsAttributes) { + assertEntityNotNull(productsAttributes); + if (!productsAttributes.hasPrimaryKeyValue()) { + insert(productsAttributes); + } else { + try { + update(productsAttributes); + } catch (org.seasar.dao.NotSingleRowUpdatedRuntimeException e) { + insert(productsAttributes); + } catch (jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException e) { + insert(productsAttributes); + } + } + } + + protected void doCreateOrUpdateNonstrict(Entity productsAttributes) { + + insertOrUpdate((ProductsAttributes)productsAttributes); + + } + + /** + * Insert or update after select. + * {update: modified only} + * + * @param productsAttributes Entity. This should contain primary-key value at least(Except use identity). (NotNull) + */ + public void insertOrUpdateAfterSelect(ProductsAttributes productsAttributes) { + assertEntityNotNull(productsAttributes); + if (!productsAttributes.hasPrimaryKeyValue()) { + insert(productsAttributes); + return; + } + ProductsAttributes currentEntity = null; + try { + final ProductsAttributesCB cb = newMyConditionBean(); + cb.acceptPrimaryKeyMapString(getDBMeta().extractPrimaryKeyMapString(productsAttributes)); + currentEntity = selectEntityWithDeletedCheck(cb); + } catch (jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException e) { + insert(productsAttributes); + return; + } + assertEntityNotNullAndHasPrimaryKeyValue(productsAttributes); + mergeEntity(productsAttributes, currentEntity); + update(currentEntity); + } + + protected void doCreateOrModifyAfterSelect(Entity entity) { + insertOrUpdateAfterSelect((ProductsAttributes)entity); + } + + /** + * This method implements the method that is declared at super. + * + * @param sourceEntity Source entity. (NotNull) + * @param destinationEntity Destination entity. (NotNull) + */ + protected void mergeEntity(Entity sourceEntity, Entity destinationEntity) { + assertEntityNotNull(sourceEntity); + assertEntityNotNull(destinationEntity); + final ProductsAttributes sourceMyEntity = (ProductsAttributes)sourceEntity; + final ProductsAttributes destinationMyEntity = (ProductsAttributes)destinationEntity; + destinationMyEntity.clearModifiedPropertyNames(); + final java.util.Set names = sourceMyEntity.getModifiedPropertyNames(); + + if (names.contains("productsAttributesId")) { destinationMyEntity.setProductsAttributesId(sourceMyEntity.getProductsAttributesId()); } + if (names.contains("productsId")) { destinationMyEntity.setProductsId(sourceMyEntity.getProductsId()); } + if (names.contains("optionsId")) { destinationMyEntity.setOptionsId(sourceMyEntity.getOptionsId()); } + if (names.contains("optionsValuesId")) { destinationMyEntity.setOptionsValuesId(sourceMyEntity.getOptionsValuesId()); } + if (names.contains("optionsValuesPrice")) { destinationMyEntity.setOptionsValuesPrice(sourceMyEntity.getOptionsValuesPrice()); } + if (names.contains("pricePrefix")) { destinationMyEntity.setPricePrefix(sourceMyEntity.getPricePrefix()); } + + } + + /** + * Delete. + * + * @param productsAttributes Entity. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public void delete(ProductsAttributes productsAttributes) { + assertEntityNotNull(productsAttributes); + final int deletedCount = delegateDelete(productsAttributes); + if (deletedCount == 0) { + throw new jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException(productsAttributes.toString()); + } else if (deletedCount > 1) { + String msg = "deletedCount=" + deletedCount + ": " + productsAttributes.toString(); + throw new jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException(msg); + } + } + + protected void doRemove(Entity productsAttributes) { + delete((ProductsAttributes)productsAttributes); + } + + /** + * Delete after select. + * + * @param productsAttributes Entity. This must contain primary-key value at least. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + */ + public void deleteAfterSelect(ProductsAttributes productsAttributes) { + assertEntityNotNullAndHasPrimaryKeyValue(productsAttributes); + final ProductsAttributesCB cb = newMyConditionBean(); + cb.acceptPrimaryKeyMapString(getDBMeta().extractPrimaryKeyMapString(productsAttributes)); + selectEntityWithDeletedCheck(cb); + delete(productsAttributes); + } + + protected void doRemoveAfterSelect(Entity productsAttributes) { + deleteAfterSelect((ProductsAttributes)productsAttributes); + } + + // =================================================================================== + // Basic Batch Update + // ================== + /** + * Insert list. + * + * @param productsAttributesList Entity-list. (NotNull & NotEmpty) + * @return Inserted count. + */ + public int insertList(java.util.List productsAttributesList) { + assertListNotNullAndNotEmpty(productsAttributesList); + return delegateInsertList(productsAttributesList); + } + + /** + * Update list. + * + * @param productsAttributesList Entity-list. (NotNull & NotEmpty) + * @return Updated count. + */ + public int updateList(java.util.List productsAttributesList) { + assertListNotNullAndNotEmpty(productsAttributesList); + return delegateUpdateList(productsAttributesList); + } + + /** + * Delete list. + * + * @param productsAttributesList Entity-list. (NotNull & NotEmpty) + * @return Deleted count. + */ + public int deleteList(java.util.List productsAttributesList) { + assertListNotNullAndNotEmpty(productsAttributesList); + return delegateDeleteList(productsAttributesList); + } + + // =================================================================================== + // Various Insert + // ============== + + // =================================================================================== + // CBSetupper + // ========== + /** + * The interface of condition-bean setupper. + */ + public static interface CBSetupper extends ConditionBeanSetupper { + + /** + * Set up condition. + * + * @param cb Condition-bean. (NotNull) + */ + public void setup(ProductsAttributesCB cb); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/bsbhv/BsProductsAttributesDownloadBhv.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/bsbhv/BsProductsAttributesDownloadBhv.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/bsbhv/BsProductsAttributesDownloadBhv.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,697 @@ + +package jp.sf.pal.pompei.bsbhv; + +import jp.sf.pal.pompei.allcommon.*; +import jp.sf.pal.pompei.allcommon.bhv.load.LoadRefererOption; +import jp.sf.pal.pompei.allcommon.bhv.setup.ConditionBeanSetupper; +import jp.sf.pal.pompei.allcommon.bhv.setup.ValueLabelSetupper; +import jp.sf.pal.pompei.allcommon.cbean.ConditionBean; +import jp.sf.pal.pompei.allcommon.cbean.ListResultBean; +import jp.sf.pal.pompei.allcommon.cbean.PagingBean; +import jp.sf.pal.pompei.allcommon.cbean.PagingResultBean; +import jp.sf.pal.pompei.allcommon.dbmeta.DBMeta; + +import jp.sf.pal.pompei.exdao.*; +import jp.sf.pal.pompei.exentity.*; +import jp.sf.pal.pompei.bsentity.dbmeta.*; +import jp.sf.pal.pompei.cbean.*; + + + +/** + * The behavior of PRODUCTS_ATTRIBUTES_DOWNLOAD. + * + *
+ * [primary-key]
+ *     PRODUCTS_ATTRIBUTES_ID
+ * 
+ * [column-property]
+ *     PRODUCTS_ATTRIBUTES_ID, PRODUCTS_ATTRIBUTES_FILENAME, PRODUCTS_ATTRIBUTES_MAXDAYS, PRODUCTS_ATTRIBUTES_MAXCOUNT
+ * 
+ * [foreign-property]
+ *     
+ * 
+ * [refferer-property]
+ *     
+ * 
+ * [sequence]
+ *     
+ * 
+ * [identity]
+ *     
+ * 
+ * [update-date]
+ *     
+ * 
+ * [version-no]
+ *     
+ * 
+ * 
+ * + * @author DBFlute(AutoGenerator) + */ +public abstract class BsProductsAttributesDownloadBhv extends jp.sf.pal.pompei.allcommon.bhv.AbstractBehaviorWritable { + + // =================================================================================== + // Attribute + // ========= + /** Dao instance. */ + protected ProductsAttributesDownloadDao _dao; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + public BsProductsAttributesDownloadBhv() { + } + + // =================================================================================== + // Table name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + public String getTableDbName() { + return "PRODUCTS_ATTRIBUTES_DOWNLOAD"; + } + + // =================================================================================== + // DBMeta + // ====== + /** + * This method implements the method that is declared at super. + * + * @return DBMeta. (NotNull) + */ + public DBMeta getDBMeta() { + return ProductsAttributesDownloadDbm.getInstance(); + } + + /** + * Get my dbmeta. + * + * @return DBMeta. (NotNull) + */ + public ProductsAttributesDownloadDbm getMyDBMeta() { + return ProductsAttributesDownloadDbm.getInstance(); + } + + // =================================================================================== + // Dao Accessor + // ============ + /** + * Get my dao. + * + * @return My dao. + */ + public ProductsAttributesDownloadDao getMyDao() { + return _dao; + } + + /** + * Set my dao. + * + * @param dao My dao. (NotNull) + */ + public void setMyDao(ProductsAttributesDownloadDao dao) { + assertObjectNotNull("dao", dao); + _dao = dao; + } + + /** + * This method implements the method that is declared at super. + * + * @return Dao-readable. (NotNull) + */ + public DaoReadable getDaoReadable() { + return getMyDao(); + } + + /** + * This method implements the method that is declared at super. + * + * @return Dao-writable. (NotNull) + */ + public DaoWritable getDaoWritable() { + return getMyDao(); + } + + // =================================================================================== + // New Instance + // ============ + /** + * New entity. + * + * @return Entity. (NotNull) + */ + public Entity newEntity() { + return newMyEntity(); + } + + /** + * New condition-bean. + * + * @return Condition-bean. (NotNull) + */ + public ConditionBean newConditionBean() { + return newMyConditionBean(); + } + + /** + * New my entity. + * + * @return My entity. (NotNull) + */ + public ProductsAttributesDownload newMyEntity() { + return new ProductsAttributesDownload(); + } + + /** + * New my condition-bean. + * + * @return My condition-bean. (NotNull) + */ + public ProductsAttributesDownloadCB newMyConditionBean() { + return new ProductsAttributesDownloadCB(); + } + + // =================================================================================== + // Delegate Method + // =============== + // ----------------------------------------------------- + // Select + // ------ + /** + * Get count as all. (Delegate-Method) + * + * @return All count. (NotNull) + */ + public int delegateGetCountAll() { + return getMyDao().getCountAll(); + } + + /** + * Get list as all. (Delegate-Method) + * + * @return All list. (NotNull) + */ + public java.util.List delegateGetListAll() { + return getMyDao().getListAll(); + } + + // + // Get entity. (Delegate-Method) + // + // @param Primary-keys (NotNull) + // @return Entity. (NotNull) + // + public ProductsAttributesDownload delegateGetEntity(java.math.BigDecimal productsAttributesId) { + return getMyDao().getEntity(productsAttributesId); + } + + /** + * Select count by condition-bean. (Delegate-Method) + * + * @param cb Condition-bean. (NotNull) + * @return Selected count. (NotNull) + */ + public int delegateSelectCount(ProductsAttributesDownloadCB cb) { + assertConditionBeanNotNull(cb); + return getMyDao().selectCount(cb); + } + + /** + * Select entity by condition-bean. (Delegate-Method) + * + * @param cb Condition-bean. (NotNull) + * @return Selected entity. If the select result is zero, it returns null. (Nullable) + */ + public ProductsAttributesDownload delegateSelectEntity(ProductsAttributesDownloadCB cb) { + assertConditionBeanNotNull(cb); + return getMyDao().selectEntity(cb); + } + + /** + * Select list by condition-bean. (Delegate-Method) + * + * @param cb Condition-bean. (NotNull) + * @return Selected list. If the select result is zero, it returns empty list. (NotNull) + */ + public java.util.List delegateSelectList(ProductsAttributesDownloadCB cb) { + assertConditionBeanNotNull(cb); + return getMyDao().selectList(cb); + } + + + // ----------------------------------------------------- + // Update + // ------ + /** + * Insert one entity. (Delegate-Method) + * + * @param entity Entity. (NotNull) + * @return Inserted count. + */ + public int delegateInsert(ProductsAttributesDownload entity) { + assertEntityNotNull(entity);// If this table use identity, the entity does not have primary-key. + filterEntityOfInsert(entity); + assertEntityOfInsert(entity); + return getMyDao().insert(entity); + } + + /** + * Update one entity. (Delegate-Method) + * {modified only} + * + * @param entity Entity. (NotNull) + * @return Updated count. + */ + public int delegateUpdate(ProductsAttributesDownload entity) { + assertEntityNotNullAndHasPrimaryKeyValue(entity); + filterEntityOfUpdate(entity); + assertEntityOfUpdate(entity); + return getMyDao().updateModifiedOnly(entity); + } + + /** + * Delete one entity. (Delegate-Method) + * + * @param entity Entity. (NotNull) + * @return Deleted count. + */ + public int delegateDelete(ProductsAttributesDownload entity) { + assertEntityNotNullAndHasPrimaryKeyValue(entity); + filterEntityOfDelete(entity); + assertEntityOfDelete(entity); + return getMyDao().delete(entity); + } + + /** + * Insert several entities. (Delegate-Method) + * + * @param entityList Entity-list. (NotNull & NotEmpty) + * @return Inserted count. + */ + public int delegateInsertList(java.util.List entityList) { + assertListNotNullAndNotEmpty(entityList); + return getMyDao().insertList(entityList); + } + + /** + * Update several entities. (Delegate-Method) + * + * @param entityList Entity-list. (NotNull & NotEmpty) + * @return Updated count. + */ + public int delegateUpdateList(java.util.List entityList) { + assertListNotNullAndNotEmpty(entityList); + return getMyDao().updateList(entityList); + } + + /** + * Delete several entities. (Delegate-Method) + * + * @param entityList Entity-list. (NotNull & NotEmpty) + * @return Deleted count. + */ + public int delegateDeleteList(java.util.List entityList) { + assertListNotNullAndNotEmpty(entityList); + return getMyDao().deleteList(entityList); + } + + // =================================================================================== + // Basic Select Count + // ================== + /** + * Select count by condition-bean. + *
+     * If the argument 'condition-bean' is effective about fetch-scope,
+     * this method invoke select count ignoring the fetch-scope.
+     * 
+ * @param cb Condition-bean. This condition-bean should not be set up about fetch-scope. (NotNull) + * @return Selected count. + */ + public int selectCount(ProductsAttributesDownloadCB cb) { + assertConditionBeanNotNull(cb); + return delegateSelectCount(cb); + } + + // =================================================================================== + // Basic Select Entity + // =================== + /** + * Select entity by condition-bean. + * + * @param cb Condition-bean. (NotNull) + * @return Selected entity. (Nullalble) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public ProductsAttributesDownload selectEntity(ProductsAttributesDownloadCB cb) { + assertConditionBeanNotNull(cb); + final java.util.List ls = selectList(cb); + if (ls.isEmpty()) { + return null; + } + assertRecordHasBeenSelectedAsOne(ls, cb); + return (ProductsAttributesDownload)ls.get(0); + } + + /** + * Select entity by condition-bean with deleted check. + * + * @param cb Condition-bean. (NotNull) + * @return Selected entity. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public ProductsAttributesDownload selectEntityWithDeletedCheck(ProductsAttributesDownloadCB cb) { + assertConditionBeanNotNull(cb); + final java.util.List ls = selectList(cb); + assertRecordHasNotBeenDeleted(ls, cb); + assertRecordHasBeenSelectedAsOne(ls, cb); + return (ProductsAttributesDownload)ls.get(0); + } + + /* + * Select entity with deleted check. {by primary-key} + * + * @param primaryKey + * @return Selected entity. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public ProductsAttributesDownload selectByPKValueWithDeletedCheck(java.math.BigDecimal productsAttributesId) { + ProductsAttributesDownload entity = new ProductsAttributesDownload(); + entity.setProductsAttributesId(productsAttributesId); + final ProductsAttributesDownloadCB cb = newMyConditionBean(); + cb.acceptPrimaryKeyMapString(getDBMeta().extractPrimaryKeyMapString(entity)); + return selectEntityWithDeletedCheck(cb); + } + + // =================================================================================== + // Basic Select List + // ================= + /** + * Select list as result-bean. + * + * @param cb Condition-bean. (NotNull) + * @return Selected list-result-bean. (NotNull) + */ + public ListResultBean selectList(ProductsAttributesDownloadCB cb) { + assertConditionBeanNotNull(cb); + return new ResultBeanBuilder(this).buildListResultBean(cb, delegateSelectList(cb)); + } + + /** + * Select page as result-bean. + * + * @param cb Condition-bean. (NotNull) + * @return Selected paging-result-bean. (NotNull) + */ + public PagingResultBean selectPage(final ProductsAttributesDownloadCB cb) { + assertConditionBeanNotNull(cb); + return selectPage(cb, new SelectPageSimpleInvoker(this)); + } + + /** + * Select page. + * + * @param cb Condition-bean. (NotNull) + * @param invoker Select-page-invoker (NotNull) + * @return Selected paging-result-bean. (NotNull) + */ + public PagingResultBean selectPage(final ProductsAttributesDownloadCB cb, SelectPageInvoker invoker) { + assertConditionBeanNotNull(cb); + final SelectPageCallback pageCallback = new SelectPageCallback() { + public PagingBean getPagingBean() { return cb; } + public int selectCountIgnoreFetchScope() { + return selectCount(cb); + } + public java.util.List selectListWithFetchScope() { + return selectList(cb); + } + }; + return invoker.invokeSelectPage(pageCallback); + } + + // =================================================================================== + // Various Select + // ============== + /** + * Select value-label list. + * + * @param cb Condition-bean. (NotNull) + * @param valueLabelSetupper Value-label-setupper. (NotNull) + * @return Value-label list. (NotNull) + */ + public java.util.List> selectValueLabelList(ProductsAttributesDownloadCB cb, ValueLabelSetupper valueLabelSetupper) { + return createValueLabelList(selectList(cb), valueLabelSetupper); + } + + // =================================================================================== + // Load Referer + // ============ + + // =================================================================================== + // Pull Out Foreign + // ================ + + // =================================================================================== + // Basic Entity Update + // =================== + /** + * Insert. + * + * @param productsAttributesDownload Entity. (NotNull) + */ + public void insert(ProductsAttributesDownload productsAttributesDownload) { + assertEntityNotNull(productsAttributesDownload); + delegateInsert(productsAttributesDownload); + } + + protected void doCreate(Entity productsAttributesDownload) { + insert((ProductsAttributesDownload)productsAttributesDownload); + } + + /** + * Update. + *
+     * If it updates count zero, throws exception.
+     * If concurrency control of this table is valid, this update have it.
+     * 
+ * @param productsAttributesDownload Entity. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public void update(ProductsAttributesDownload productsAttributesDownload) { + assertEntityNotNull(productsAttributesDownload); + final int updatedCount = delegateUpdate(productsAttributesDownload); + if (updatedCount == 0) { + throw new jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException(productsAttributesDownload.toString()); + } else if (updatedCount > 1) { + String msg = "updatedCount=" + updatedCount + ": " + productsAttributesDownload.toString(); + throw new jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException(msg); + } + } + + protected void doModify(Entity productsAttributesDownload) { + update((ProductsAttributesDownload)productsAttributesDownload); + } + + /** + * Update after select. + * + * @param productsAttributesDownload Entity. This must contain primary-key value at least. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + */ + public void updateAfterSelect(ProductsAttributesDownload productsAttributesDownload) { + assertEntityNotNullAndHasPrimaryKeyValue(productsAttributesDownload); + final ProductsAttributesDownloadCB cb = newMyConditionBean(); + cb.acceptPrimaryKeyMapString(getDBMeta().extractPrimaryKeyMapString(productsAttributesDownload)); + final ProductsAttributesDownload currentEntity = selectEntityWithDeletedCheck(cb); + mergeEntity(productsAttributesDownload, currentEntity); + update(currentEntity); + } + + protected void doModifyAfterSelect(Entity productsAttributesDownload) { + updateAfterSelect((ProductsAttributesDownload)productsAttributesDownload); + } + + /** + * Insert or update. + * {update: modified only} + * + * @param productsAttributesDownload Entity. This should contain primary-key value at least(Except use identity). (NotNull) + */ + public void insertOrUpdate(ProductsAttributesDownload productsAttributesDownload) { + assertEntityNotNull(productsAttributesDownload); + if (!productsAttributesDownload.hasPrimaryKeyValue()) { + insert(productsAttributesDownload); + } else { + try { + update(productsAttributesDownload); + } catch (org.seasar.dao.NotSingleRowUpdatedRuntimeException e) { + insert(productsAttributesDownload); + } catch (jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException e) { + insert(productsAttributesDownload); + } + } + } + + protected void doCreateOrUpdateNonstrict(Entity productsAttributesDownload) { + + insertOrUpdate((ProductsAttributesDownload)productsAttributesDownload); + + } + + /** + * Insert or update after select. + * {update: modified only} + * + * @param productsAttributesDownload Entity. This should contain primary-key value at least(Except use identity). (NotNull) + */ + public void insertOrUpdateAfterSelect(ProductsAttributesDownload productsAttributesDownload) { + assertEntityNotNull(productsAttributesDownload); + if (!productsAttributesDownload.hasPrimaryKeyValue()) { + insert(productsAttributesDownload); + return; + } + ProductsAttributesDownload currentEntity = null; + try { + final ProductsAttributesDownloadCB cb = newMyConditionBean(); + cb.acceptPrimaryKeyMapString(getDBMeta().extractPrimaryKeyMapString(productsAttributesDownload)); + currentEntity = selectEntityWithDeletedCheck(cb); + } catch (jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException e) { + insert(productsAttributesDownload); + return; + } + assertEntityNotNullAndHasPrimaryKeyValue(productsAttributesDownload); + mergeEntity(productsAttributesDownload, currentEntity); + update(currentEntity); + } + + protected void doCreateOrModifyAfterSelect(Entity entity) { + insertOrUpdateAfterSelect((ProductsAttributesDownload)entity); + } + + /** + * This method implements the method that is declared at super. + * + * @param sourceEntity Source entity. (NotNull) + * @param destinationEntity Destination entity. (NotNull) + */ + protected void mergeEntity(Entity sourceEntity, Entity destinationEntity) { + assertEntityNotNull(sourceEntity); + assertEntityNotNull(destinationEntity); + final ProductsAttributesDownload sourceMyEntity = (ProductsAttributesDownload)sourceEntity; + final ProductsAttributesDownload destinationMyEntity = (ProductsAttributesDownload)destinationEntity; + destinationMyEntity.clearModifiedPropertyNames(); + final java.util.Set names = sourceMyEntity.getModifiedPropertyNames(); + + if (names.contains("productsAttributesId")) { destinationMyEntity.setProductsAttributesId(sourceMyEntity.getProductsAttributesId()); } + if (names.contains("productsAttributesFilename")) { destinationMyEntity.setProductsAttributesFilename(sourceMyEntity.getProductsAttributesFilename()); } + if (names.contains("productsAttributesMaxdays")) { destinationMyEntity.setProductsAttributesMaxdays(sourceMyEntity.getProductsAttributesMaxdays()); } + if (names.contains("productsAttributesMaxcount")) { destinationMyEntity.setProductsAttributesMaxcount(sourceMyEntity.getProductsAttributesMaxcount()); } + + } + + /** + * Delete. + * + * @param productsAttributesDownload Entity. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public void delete(ProductsAttributesDownload productsAttributesDownload) { + assertEntityNotNull(productsAttributesDownload); + final int deletedCount = delegateDelete(productsAttributesDownload); + if (deletedCount == 0) { + throw new jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException(productsAttributesDownload.toString()); + } else if (deletedCount > 1) { + String msg = "deletedCount=" + deletedCount + ": " + productsAttributesDownload.toString(); + throw new jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException(msg); + } + } + + protected void doRemove(Entity productsAttributesDownload) { + delete((ProductsAttributesDownload)productsAttributesDownload); + } + + /** + * Delete after select. + * + * @param productsAttributesDownload Entity. This must contain primary-key value at least. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + */ + public void deleteAfterSelect(ProductsAttributesDownload productsAttributesDownload) { + assertEntityNotNullAndHasPrimaryKeyValue(productsAttributesDownload); + final ProductsAttributesDownloadCB cb = newMyConditionBean(); + cb.acceptPrimaryKeyMapString(getDBMeta().extractPrimaryKeyMapString(productsAttributesDownload)); + selectEntityWithDeletedCheck(cb); + delete(productsAttributesDownload); + } + + protected void doRemoveAfterSelect(Entity productsAttributesDownload) { + deleteAfterSelect((ProductsAttributesDownload)productsAttributesDownload); + } + + // =================================================================================== + // Basic Batch Update + // ================== + /** + * Insert list. + * + * @param productsAttributesDownloadList Entity-list. (NotNull & NotEmpty) + * @return Inserted count. + */ + public int insertList(java.util.List productsAttributesDownloadList) { + assertListNotNullAndNotEmpty(productsAttributesDownloadList); + return delegateInsertList(productsAttributesDownloadList); + } + + /** + * Update list. + * + * @param productsAttributesDownloadList Entity-list. (NotNull & NotEmpty) + * @return Updated count. + */ + public int updateList(java.util.List productsAttributesDownloadList) { + assertListNotNullAndNotEmpty(productsAttributesDownloadList); + return delegateUpdateList(productsAttributesDownloadList); + } + + /** + * Delete list. + * + * @param productsAttributesDownloadList Entity-list. (NotNull & NotEmpty) + * @return Deleted count. + */ + public int deleteList(java.util.List productsAttributesDownloadList) { + assertListNotNullAndNotEmpty(productsAttributesDownloadList); + return delegateDeleteList(productsAttributesDownloadList); + } + + // =================================================================================== + // Various Insert + // ============== + + // =================================================================================== + // CBSetupper + // ========== + /** + * The interface of condition-bean setupper. + */ + public static interface CBSetupper extends ConditionBeanSetupper { + + /** + * Set up condition. + * + * @param cb Condition-bean. (NotNull) + */ + public void setup(ProductsAttributesDownloadCB cb); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/bsbhv/BsProductsBhv.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/bsbhv/BsProductsBhv.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/bsbhv/BsProductsBhv.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,706 @@ + +package jp.sf.pal.pompei.bsbhv; + +import jp.sf.pal.pompei.allcommon.*; +import jp.sf.pal.pompei.allcommon.bhv.load.LoadRefererOption; +import jp.sf.pal.pompei.allcommon.bhv.setup.ConditionBeanSetupper; +import jp.sf.pal.pompei.allcommon.bhv.setup.ValueLabelSetupper; +import jp.sf.pal.pompei.allcommon.cbean.ConditionBean; +import jp.sf.pal.pompei.allcommon.cbean.ListResultBean; +import jp.sf.pal.pompei.allcommon.cbean.PagingBean; +import jp.sf.pal.pompei.allcommon.cbean.PagingResultBean; +import jp.sf.pal.pompei.allcommon.dbmeta.DBMeta; + +import jp.sf.pal.pompei.exdao.*; +import jp.sf.pal.pompei.exentity.*; +import jp.sf.pal.pompei.bsentity.dbmeta.*; +import jp.sf.pal.pompei.cbean.*; + + + +/** + * The behavior of PRODUCTS. + * + *
+ * [primary-key]
+ *     PRODUCTS_ID
+ * 
+ * [column-property]
+ *     PRODUCTS_ID, PRODUCTS_QUANTITY, PRODUCTS_MODEL, PRODUCTS_IMAGE, PRODUCTS_PRICE, PRODUCTS_DATE_ADDED, PRODUCTS_LAST_MODIFIED, PRODUCTS_DATE_AVAILABLE, PRODUCTS_WEIGHT, PRODUCTS_STATUS, PRODUCTS_TAX_CLASS_ID, MANUFACTURERS_ID, PRODUCTS_ORDERED
+ * 
+ * [foreign-property]
+ *     
+ * 
+ * [refferer-property]
+ *     
+ * 
+ * [sequence]
+ *     
+ * 
+ * [identity]
+ *     
+ * 
+ * [update-date]
+ *     
+ * 
+ * [version-no]
+ *     
+ * 
+ * 
+ * + * @author DBFlute(AutoGenerator) + */ +public abstract class BsProductsBhv extends jp.sf.pal.pompei.allcommon.bhv.AbstractBehaviorWritable { + + // =================================================================================== + // Attribute + // ========= + /** Dao instance. */ + protected ProductsDao _dao; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + public BsProductsBhv() { + } + + // =================================================================================== + // Table name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + public String getTableDbName() { + return "PRODUCTS"; + } + + // =================================================================================== + // DBMeta + // ====== + /** + * This method implements the method that is declared at super. + * + * @return DBMeta. (NotNull) + */ + public DBMeta getDBMeta() { + return ProductsDbm.getInstance(); + } + + /** + * Get my dbmeta. + * + * @return DBMeta. (NotNull) + */ + public ProductsDbm getMyDBMeta() { + return ProductsDbm.getInstance(); + } + + // =================================================================================== + // Dao Accessor + // ============ + /** + * Get my dao. + * + * @return My dao. + */ + public ProductsDao getMyDao() { + return _dao; + } + + /** + * Set my dao. + * + * @param dao My dao. (NotNull) + */ + public void setMyDao(ProductsDao dao) { + assertObjectNotNull("dao", dao); + _dao = dao; + } + + /** + * This method implements the method that is declared at super. + * + * @return Dao-readable. (NotNull) + */ + public DaoReadable getDaoReadable() { + return getMyDao(); + } + + /** + * This method implements the method that is declared at super. + * + * @return Dao-writable. (NotNull) + */ + public DaoWritable getDaoWritable() { + return getMyDao(); + } + + // =================================================================================== + // New Instance + // ============ + /** + * New entity. + * + * @return Entity. (NotNull) + */ + public Entity newEntity() { + return newMyEntity(); + } + + /** + * New condition-bean. + * + * @return Condition-bean. (NotNull) + */ + public ConditionBean newConditionBean() { + return newMyConditionBean(); + } + + /** + * New my entity. + * + * @return My entity. (NotNull) + */ + public Products newMyEntity() { + return new Products(); + } + + /** + * New my condition-bean. + * + * @return My condition-bean. (NotNull) + */ + public ProductsCB newMyConditionBean() { + return new ProductsCB(); + } + + // =================================================================================== + // Delegate Method + // =============== + // ----------------------------------------------------- + // Select + // ------ + /** + * Get count as all. (Delegate-Method) + * + * @return All count. (NotNull) + */ + public int delegateGetCountAll() { + return getMyDao().getCountAll(); + } + + /** + * Get list as all. (Delegate-Method) + * + * @return All list. (NotNull) + */ + public java.util.List delegateGetListAll() { + return getMyDao().getListAll(); + } + + // + // Get entity. (Delegate-Method) + // + // @param Primary-keys (NotNull) + // @return Entity. (NotNull) + // + public Products delegateGetEntity(java.math.BigDecimal productsId) { + return getMyDao().getEntity(productsId); + } + + /** + * Select count by condition-bean. (Delegate-Method) + * + * @param cb Condition-bean. (NotNull) + * @return Selected count. (NotNull) + */ + public int delegateSelectCount(ProductsCB cb) { + assertConditionBeanNotNull(cb); + return getMyDao().selectCount(cb); + } + + /** + * Select entity by condition-bean. (Delegate-Method) + * + * @param cb Condition-bean. (NotNull) + * @return Selected entity. If the select result is zero, it returns null. (Nullable) + */ + public Products delegateSelectEntity(ProductsCB cb) { + assertConditionBeanNotNull(cb); + return getMyDao().selectEntity(cb); + } + + /** + * Select list by condition-bean. (Delegate-Method) + * + * @param cb Condition-bean. (NotNull) + * @return Selected list. If the select result is zero, it returns empty list. (NotNull) + */ + public java.util.List delegateSelectList(ProductsCB cb) { + assertConditionBeanNotNull(cb); + return getMyDao().selectList(cb); + } + + + // ----------------------------------------------------- + // Update + // ------ + /** + * Insert one entity. (Delegate-Method) + * + * @param entity Entity. (NotNull) + * @return Inserted count. + */ + public int delegateInsert(Products entity) { + assertEntityNotNull(entity);// If this table use identity, the entity does not have primary-key. + filterEntityOfInsert(entity); + assertEntityOfInsert(entity); + return getMyDao().insert(entity); + } + + /** + * Update one entity. (Delegate-Method) + * {modified only} + * + * @param entity Entity. (NotNull) + * @return Updated count. + */ + public int delegateUpdate(Products entity) { + assertEntityNotNullAndHasPrimaryKeyValue(entity); + filterEntityOfUpdate(entity); + assertEntityOfUpdate(entity); + return getMyDao().updateModifiedOnly(entity); + } + + /** + * Delete one entity. (Delegate-Method) + * + * @param entity Entity. (NotNull) + * @return Deleted count. + */ + public int delegateDelete(Products entity) { + assertEntityNotNullAndHasPrimaryKeyValue(entity); + filterEntityOfDelete(entity); + assertEntityOfDelete(entity); + return getMyDao().delete(entity); + } + + /** + * Insert several entities. (Delegate-Method) + * + * @param entityList Entity-list. (NotNull & NotEmpty) + * @return Inserted count. + */ + public int delegateInsertList(java.util.List entityList) { + assertListNotNullAndNotEmpty(entityList); + return getMyDao().insertList(entityList); + } + + /** + * Update several entities. (Delegate-Method) + * + * @param entityList Entity-list. (NotNull & NotEmpty) + * @return Updated count. + */ + public int delegateUpdateList(java.util.List entityList) { + assertListNotNullAndNotEmpty(entityList); + return getMyDao().updateList(entityList); + } + + /** + * Delete several entities. (Delegate-Method) + * + * @param entityList Entity-list. (NotNull & NotEmpty) + * @return Deleted count. + */ + public int delegateDeleteList(java.util.List entityList) { + assertListNotNullAndNotEmpty(entityList); + return getMyDao().deleteList(entityList); + } + + // =================================================================================== + // Basic Select Count + // ================== + /** + * Select count by condition-bean. + *
+     * If the argument 'condition-bean' is effective about fetch-scope,
+     * this method invoke select count ignoring the fetch-scope.
+     * 
+ * @param cb Condition-bean. This condition-bean should not be set up about fetch-scope. (NotNull) + * @return Selected count. + */ + public int selectCount(ProductsCB cb) { + assertConditionBeanNotNull(cb); + return delegateSelectCount(cb); + } + + // =================================================================================== + // Basic Select Entity + // =================== + /** + * Select entity by condition-bean. + * + * @param cb Condition-bean. (NotNull) + * @return Selected entity. (Nullalble) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public Products selectEntity(ProductsCB cb) { + assertConditionBeanNotNull(cb); + final java.util.List ls = selectList(cb); + if (ls.isEmpty()) { + return null; + } + assertRecordHasBeenSelectedAsOne(ls, cb); + return (Products)ls.get(0); + } + + /** + * Select entity by condition-bean with deleted check. + * + * @param cb Condition-bean. (NotNull) + * @return Selected entity. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public Products selectEntityWithDeletedCheck(ProductsCB cb) { + assertConditionBeanNotNull(cb); + final java.util.List ls = selectList(cb); + assertRecordHasNotBeenDeleted(ls, cb); + assertRecordHasBeenSelectedAsOne(ls, cb); + return (Products)ls.get(0); + } + + /* + * Select entity with deleted check. {by primary-key} + * + * @param primaryKey + * @return Selected entity. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public Products selectByPKValueWithDeletedCheck(java.math.BigDecimal productsId) { + Products entity = new Products(); + entity.setProductsId(productsId); + final ProductsCB cb = newMyConditionBean(); + cb.acceptPrimaryKeyMapString(getDBMeta().extractPrimaryKeyMapString(entity)); + return selectEntityWithDeletedCheck(cb); + } + + // =================================================================================== + // Basic Select List + // ================= + /** + * Select list as result-bean. + * + * @param cb Condition-bean. (NotNull) + * @return Selected list-result-bean. (NotNull) + */ + public ListResultBean selectList(ProductsCB cb) { + assertConditionBeanNotNull(cb); + return new ResultBeanBuilder(this).buildListResultBean(cb, delegateSelectList(cb)); + } + + /** + * Select page as result-bean. + * + * @param cb Condition-bean. (NotNull) + * @return Selected paging-result-bean. (NotNull) + */ + public PagingResultBean selectPage(final ProductsCB cb) { + assertConditionBeanNotNull(cb); + return selectPage(cb, new SelectPageSimpleInvoker(this)); + } + + /** + * Select page. + * + * @param cb Condition-bean. (NotNull) + * @param invoker Select-page-invoker (NotNull) + * @return Selected paging-result-bean. (NotNull) + */ + public PagingResultBean selectPage(final ProductsCB cb, SelectPageInvoker invoker) { + assertConditionBeanNotNull(cb); + final SelectPageCallback pageCallback = new SelectPageCallback() { + public PagingBean getPagingBean() { return cb; } + public int selectCountIgnoreFetchScope() { + return selectCount(cb); + } + public java.util.List selectListWithFetchScope() { + return selectList(cb); + } + }; + return invoker.invokeSelectPage(pageCallback); + } + + // =================================================================================== + // Various Select + // ============== + /** + * Select value-label list. + * + * @param cb Condition-bean. (NotNull) + * @param valueLabelSetupper Value-label-setupper. (NotNull) + * @return Value-label list. (NotNull) + */ + public java.util.List> selectValueLabelList(ProductsCB cb, ValueLabelSetupper valueLabelSetupper) { + return createValueLabelList(selectList(cb), valueLabelSetupper); + } + + // =================================================================================== + // Load Referer + // ============ + + // =================================================================================== + // Pull Out Foreign + // ================ + + // =================================================================================== + // Basic Entity Update + // =================== + /** + * Insert. + * + * @param products Entity. (NotNull) + */ + public void insert(Products products) { + assertEntityNotNull(products); + delegateInsert(products); + } + + protected void doCreate(Entity products) { + insert((Products)products); + } + + /** + * Update. + *
+     * If it updates count zero, throws exception.
+     * If concurrency control of this table is valid, this update have it.
+     * 
+ * @param products Entity. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public void update(Products products) { + assertEntityNotNull(products); + final int updatedCount = delegateUpdate(products); + if (updatedCount == 0) { + throw new jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException(products.toString()); + } else if (updatedCount > 1) { + String msg = "updatedCount=" + updatedCount + ": " + products.toString(); + throw new jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException(msg); + } + } + + protected void doModify(Entity products) { + update((Products)products); + } + + /** + * Update after select. + * + * @param products Entity. This must contain primary-key value at least. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + */ + public void updateAfterSelect(Products products) { + assertEntityNotNullAndHasPrimaryKeyValue(products); + final ProductsCB cb = newMyConditionBean(); + cb.acceptPrimaryKeyMapString(getDBMeta().extractPrimaryKeyMapString(products)); + final Products currentEntity = selectEntityWithDeletedCheck(cb); + mergeEntity(products, currentEntity); + update(currentEntity); + } + + protected void doModifyAfterSelect(Entity products) { + updateAfterSelect((Products)products); + } + + /** + * Insert or update. + * {update: modified only} + * + * @param products Entity. This should contain primary-key value at least(Except use identity). (NotNull) + */ + public void insertOrUpdate(Products products) { + assertEntityNotNull(products); + if (!products.hasPrimaryKeyValue()) { + insert(products); + } else { + try { + update(products); + } catch (org.seasar.dao.NotSingleRowUpdatedRuntimeException e) { + insert(products); + } catch (jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException e) { + insert(products); + } + } + } + + protected void doCreateOrUpdateNonstrict(Entity products) { + + insertOrUpdate((Products)products); + + } + + /** + * Insert or update after select. + * {update: modified only} + * + * @param products Entity. This should contain primary-key value at least(Except use identity). (NotNull) + */ + public void insertOrUpdateAfterSelect(Products products) { + assertEntityNotNull(products); + if (!products.hasPrimaryKeyValue()) { + insert(products); + return; + } + Products currentEntity = null; + try { + final ProductsCB cb = newMyConditionBean(); + cb.acceptPrimaryKeyMapString(getDBMeta().extractPrimaryKeyMapString(products)); + currentEntity = selectEntityWithDeletedCheck(cb); + } catch (jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException e) { + insert(products); + return; + } + assertEntityNotNullAndHasPrimaryKeyValue(products); + mergeEntity(products, currentEntity); + update(currentEntity); + } + + protected void doCreateOrModifyAfterSelect(Entity entity) { + insertOrUpdateAfterSelect((Products)entity); + } + + /** + * This method implements the method that is declared at super. + * + * @param sourceEntity Source entity. (NotNull) + * @param destinationEntity Destination entity. (NotNull) + */ + protected void mergeEntity(Entity sourceEntity, Entity destinationEntity) { + assertEntityNotNull(sourceEntity); + assertEntityNotNull(destinationEntity); + final Products sourceMyEntity = (Products)sourceEntity; + final Products destinationMyEntity = (Products)destinationEntity; + destinationMyEntity.clearModifiedPropertyNames(); + final java.util.Set names = sourceMyEntity.getModifiedPropertyNames(); + + if (names.contains("productsId")) { destinationMyEntity.setProductsId(sourceMyEntity.getProductsId()); } + if (names.contains("productsQuantity")) { destinationMyEntity.setProductsQuantity(sourceMyEntity.getProductsQuantity()); } + if (names.contains("productsModel")) { destinationMyEntity.setProductsModel(sourceMyEntity.getProductsModel()); } + if (names.contains("productsImage")) { destinationMyEntity.setProductsImage(sourceMyEntity.getProductsImage()); } + if (names.contains("productsPrice")) { destinationMyEntity.setProductsPrice(sourceMyEntity.getProductsPrice()); } + if (names.contains("productsDateAdded")) { destinationMyEntity.setProductsDateAdded(sourceMyEntity.getProductsDateAdded()); } + if (names.contains("productsLastModified")) { destinationMyEntity.setProductsLastModified(sourceMyEntity.getProductsLastModified()); } + if (names.contains("productsDateAvailable")) { destinationMyEntity.setProductsDateAvailable(sourceMyEntity.getProductsDateAvailable()); } + if (names.contains("productsWeight")) { destinationMyEntity.setProductsWeight(sourceMyEntity.getProductsWeight()); } + if (names.contains("productsStatus")) { destinationMyEntity.setProductsStatus(sourceMyEntity.getProductsStatus()); } + if (names.contains("productsTaxClassId")) { destinationMyEntity.setProductsTaxClassId(sourceMyEntity.getProductsTaxClassId()); } + if (names.contains("manufacturersId")) { destinationMyEntity.setManufacturersId(sourceMyEntity.getManufacturersId()); } + if (names.contains("productsOrdered")) { destinationMyEntity.setProductsOrdered(sourceMyEntity.getProductsOrdered()); } + + } + + /** + * Delete. + * + * @param products Entity. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public void delete(Products products) { + assertEntityNotNull(products); + final int deletedCount = delegateDelete(products); + if (deletedCount == 0) { + throw new jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException(products.toString()); + } else if (deletedCount > 1) { + String msg = "deletedCount=" + deletedCount + ": " + products.toString(); + throw new jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException(msg); + } + } + + protected void doRemove(Entity products) { + delete((Products)products); + } + + /** + * Delete after select. + * + * @param products Entity. This must contain primary-key value at least. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + */ + public void deleteAfterSelect(Products products) { + assertEntityNotNullAndHasPrimaryKeyValue(products); + final ProductsCB cb = newMyConditionBean(); + cb.acceptPrimaryKeyMapString(getDBMeta().extractPrimaryKeyMapString(products)); + selectEntityWithDeletedCheck(cb); + delete(products); + } + + protected void doRemoveAfterSelect(Entity products) { + deleteAfterSelect((Products)products); + } + + // =================================================================================== + // Basic Batch Update + // ================== + /** + * Insert list. + * + * @param productsList Entity-list. (NotNull & NotEmpty) + * @return Inserted count. + */ + public int insertList(java.util.List productsList) { + assertListNotNullAndNotEmpty(productsList); + return delegateInsertList(productsList); + } + + /** + * Update list. + * + * @param productsList Entity-list. (NotNull & NotEmpty) + * @return Updated count. + */ + public int updateList(java.util.List productsList) { + assertListNotNullAndNotEmpty(productsList); + return delegateUpdateList(productsList); + } + + /** + * Delete list. + * + * @param productsList Entity-list. (NotNull & NotEmpty) + * @return Deleted count. + */ + public int deleteList(java.util.List productsList) { + assertListNotNullAndNotEmpty(productsList); + return delegateDeleteList(productsList); + } + + // =================================================================================== + // Various Insert + // ============== + + // =================================================================================== + // CBSetupper + // ========== + /** + * The interface of condition-bean setupper. + */ + public static interface CBSetupper extends ConditionBeanSetupper { + + /** + * Set up condition. + * + * @param cb Condition-bean. (NotNull) + */ + public void setup(ProductsCB cb); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/bsbhv/BsProductsDescriptionBhv.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/bsbhv/BsProductsDescriptionBhv.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/bsbhv/BsProductsDescriptionBhv.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,695 @@ + +package jp.sf.pal.pompei.bsbhv; + +import jp.sf.pal.pompei.allcommon.*; +import jp.sf.pal.pompei.allcommon.bhv.load.LoadRefererOption; +import jp.sf.pal.pompei.allcommon.bhv.setup.ConditionBeanSetupper; +import jp.sf.pal.pompei.allcommon.bhv.setup.ValueLabelSetupper; +import jp.sf.pal.pompei.allcommon.cbean.ConditionBean; +import jp.sf.pal.pompei.allcommon.cbean.ListResultBean; +import jp.sf.pal.pompei.allcommon.cbean.PagingBean; +import jp.sf.pal.pompei.allcommon.cbean.PagingResultBean; +import jp.sf.pal.pompei.allcommon.dbmeta.DBMeta; + +import jp.sf.pal.pompei.exdao.*; +import jp.sf.pal.pompei.exentity.*; +import jp.sf.pal.pompei.bsentity.dbmeta.*; +import jp.sf.pal.pompei.cbean.*; + + + +/** + * The behavior of PRODUCTS_DESCRIPTION. + * + *
+ * [primary-key]
+ *     PRODUCTS_ID, LANGUAGE_ID
+ * 
+ * [column-property]
+ *     PRODUCTS_ID, LANGUAGE_ID, PRODUCTS_NAME, PRODUCTS_DESCRIPTION, PRODUCTS_URL, PRODUCTS_VIEWED
+ * 
+ * [foreign-property]
+ *     
+ * 
+ * [refferer-property]
+ *     
+ * 
+ * [sequence]
+ *     
+ * 
+ * [identity]
+ *     
+ * 
+ * [update-date]
+ *     
+ * 
+ * [version-no]
+ *     
+ * 
+ * 
+ * + * @author DBFlute(AutoGenerator) + */ +public abstract class BsProductsDescriptionBhv extends jp.sf.pal.pompei.allcommon.bhv.AbstractBehaviorWritable { + + // =================================================================================== + // Attribute + // ========= + /** Dao instance. */ + protected ProductsDescriptionDao _dao; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + public BsProductsDescriptionBhv() { + } + + // =================================================================================== + // Table name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + public String getTableDbName() { + return "PRODUCTS_DESCRIPTION"; + } + + // =================================================================================== + // DBMeta + // ====== + /** + * This method implements the method that is declared at super. + * + * @return DBMeta. (NotNull) + */ + public DBMeta getDBMeta() { + return ProductsDescriptionDbm.getInstance(); + } + + /** + * Get my dbmeta. + * + * @return DBMeta. (NotNull) + */ + public ProductsDescriptionDbm getMyDBMeta() { + return ProductsDescriptionDbm.getInstance(); + } + + // =================================================================================== + // Dao Accessor + // ============ + /** + * Get my dao. + * + * @return My dao. + */ + public ProductsDescriptionDao getMyDao() { + return _dao; + } + + /** + * Set my dao. + * + * @param dao My dao. (NotNull) + */ + public void setMyDao(ProductsDescriptionDao dao) { + assertObjectNotNull("dao", dao); + _dao = dao; + } + + /** + * This method implements the method that is declared at super. + * + * @return Dao-readable. (NotNull) + */ + public DaoReadable getDaoReadable() { + return getMyDao(); + } + + /** + * This method implements the method that is declared at super. + * + * @return Dao-writable. (NotNull) + */ + public DaoWritable getDaoWritable() { + return getMyDao(); + } + + // =================================================================================== + // New Instance + // ============ + /** + * New entity. + * + * @return Entity. (NotNull) + */ + public Entity newEntity() { + return newMyEntity(); + } + + /** + * New condition-bean. + * + * @return Condition-bean. (NotNull) + */ + public ConditionBean newConditionBean() { + return newMyConditionBean(); + } + + /** + * New my entity. + * + * @return My entity. (NotNull) + */ + public ProductsDescription newMyEntity() { + return new ProductsDescription(); + } + + /** + * New my condition-bean. + * + * @return My condition-bean. (NotNull) + */ + public ProductsDescriptionCB newMyConditionBean() { + return new ProductsDescriptionCB(); + } + + // =================================================================================== + // Delegate Method + // =============== + // ----------------------------------------------------- + // Select + // ------ + /** + * Get count as all. (Delegate-Method) + * + * @return All count. (NotNull) + */ + public int delegateGetCountAll() { + return getMyDao().getCountAll(); + } + + /** + * Get list as all. (Delegate-Method) + * + * @return All list. (NotNull) + */ + public java.util.List delegateGetListAll() { + return getMyDao().getListAll(); + } + + // + // Get entity. (Delegate-Method) + // + // @param Primary-keys (NotNull) + // @return Entity. (NotNull) + // + public ProductsDescription delegateGetEntity(java.math.BigDecimal productsId, java.math.BigDecimal languageId) { + return getMyDao().getEntity(productsId, languageId); + } + + /** + * Select count by condition-bean. (Delegate-Method) + * + * @param cb Condition-bean. (NotNull) + * @return Selected count. (NotNull) + */ + public int delegateSelectCount(ProductsDescriptionCB cb) { + assertConditionBeanNotNull(cb); + return getMyDao().selectCount(cb); + } + + /** + * Select entity by condition-bean. (Delegate-Method) + * + * @param cb Condition-bean. (NotNull) + * @return Selected entity. If the select result is zero, it returns null. (Nullable) + */ + public ProductsDescription delegateSelectEntity(ProductsDescriptionCB cb) { + assertConditionBeanNotNull(cb); + return getMyDao().selectEntity(cb); + } + + /** + * Select list by condition-bean. (Delegate-Method) + * + * @param cb Condition-bean. (NotNull) + * @return Selected list. If the select result is zero, it returns empty list. (NotNull) + */ + public java.util.List delegateSelectList(ProductsDescriptionCB cb) { + assertConditionBeanNotNull(cb); + return getMyDao().selectList(cb); + } + + + // ----------------------------------------------------- + // Update + // ------ + /** + * Insert one entity. (Delegate-Method) + * + * @param entity Entity. (NotNull) + * @return Inserted count. + */ + public int delegateInsert(ProductsDescription entity) { + assertEntityNotNull(entity);// If this table use identity, the entity does not have primary-key. + filterEntityOfInsert(entity); + assertEntityOfInsert(entity); + return getMyDao().insert(entity); + } + + /** + * Update one entity. (Delegate-Method) + * {modified only} + * + * @param entity Entity. (NotNull) + * @return Updated count. + */ + public int delegateUpdate(ProductsDescription entity) { + assertEntityNotNullAndHasPrimaryKeyValue(entity); + filterEntityOfUpdate(entity); + assertEntityOfUpdate(entity); + return getMyDao().updateModifiedOnly(entity); + } + + /** + * Delete one entity. (Delegate-Method) + * + * @param entity Entity. (NotNull) + * @return Deleted count. + */ + public int delegateDelete(ProductsDescription entity) { + assertEntityNotNullAndHasPrimaryKeyValue(entity); + filterEntityOfDelete(entity); + assertEntityOfDelete(entity); + return getMyDao().delete(entity); + } + + /** + * Insert several entities. (Delegate-Method) + * + * @param entityList Entity-list. (NotNull & NotEmpty) + * @return Inserted count. + */ + public int delegateInsertList(java.util.List entityList) { + assertListNotNullAndNotEmpty(entityList); + return getMyDao().insertList(entityList); + } + + /** + * Update several entities. (Delegate-Method) + * + * @param entityList Entity-list. (NotNull & NotEmpty) + * @return Updated count. + */ + public int delegateUpdateList(java.util.List entityList) { + assertListNotNullAndNotEmpty(entityList); + return getMyDao().updateList(entityList); + } + + /** + * Delete several entities. (Delegate-Method) + * + * @param entityList Entity-list. (NotNull & NotEmpty) + * @return Deleted count. + */ + public int delegateDeleteList(java.util.List entityList) { + assertListNotNullAndNotEmpty(entityList); + return getMyDao().deleteList(entityList); + } + + // =================================================================================== + // Basic Select Count + // ================== + /** + * Select count by condition-bean. + *
+     * If the argument 'condition-bean' is effective about fetch-scope,
+     * this method invoke select count ignoring the fetch-scope.
+     * 
+ * @param cb Condition-bean. This condition-bean should not be set up about fetch-scope. (NotNull) + * @return Selected count. + */ + public int selectCount(ProductsDescriptionCB cb) { + assertConditionBeanNotNull(cb); + return delegateSelectCount(cb); + } + + // =================================================================================== + // Basic Select Entity + // =================== + /** + * Select entity by condition-bean. + * + * @param cb Condition-bean. (NotNull) + * @return Selected entity. (Nullalble) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public ProductsDescription selectEntity(ProductsDescriptionCB cb) { + assertConditionBeanNotNull(cb); + final java.util.List ls = selectList(cb); + if (ls.isEmpty()) { + return null; + } + assertRecordHasBeenSelectedAsOne(ls, cb); + return (ProductsDescription)ls.get(0); + } + + /** + * Select entity by condition-bean with deleted check. + * + * @param cb Condition-bean. (NotNull) + * @return Selected entity. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public ProductsDescription selectEntityWithDeletedCheck(ProductsDescriptionCB cb) { + assertConditionBeanNotNull(cb); + final java.util.List ls = selectList(cb); + assertRecordHasNotBeenDeleted(ls, cb); + assertRecordHasBeenSelectedAsOne(ls, cb); + return (ProductsDescription)ls.get(0); + } + + /* + * Select entity with deleted check. {by primary-key} + * + * @param primaryKey + * @return Selected entity. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public ProductsDescription selectByPKValueWithDeletedCheck(java.math.BigDecimal productsId, java.math.BigDecimal languageId) { + ProductsDescription entity = new ProductsDescription(); + entity.setProductsId(productsId);entity.setLanguageId(languageId); + final ProductsDescriptionCB cb = newMyConditionBean(); + cb.acceptPrimaryKeyMapString(getDBMeta().extractPrimaryKeyMapString(entity)); + return selectEntityWithDeletedCheck(cb); + } + + // =================================================================================== + // Basic Select List + // ================= + /** + * Select list as result-bean. + * + * @param cb Condition-bean. (NotNull) + * @return Selected list-result-bean. (NotNull) + */ + public ListResultBean selectList(ProductsDescriptionCB cb) { + assertConditionBeanNotNull(cb); + return new ResultBeanBuilder(this).buildListResultBean(cb, delegateSelectList(cb)); + } + + /** + * Select page as result-bean. + * + * @param cb Condition-bean. (NotNull) + * @return Selected paging-result-bean. (NotNull) + */ + public PagingResultBean selectPage(final ProductsDescriptionCB cb) { + assertConditionBeanNotNull(cb); + return selectPage(cb, new SelectPageSimpleInvoker(this)); + } + + /** + * Select page. + * + * @param cb Condition-bean. (NotNull) + * @param invoker Select-page-invoker (NotNull) + * @return Selected paging-result-bean. (NotNull) + */ + public PagingResultBean selectPage(final ProductsDescriptionCB cb, SelectPageInvoker invoker) { + assertConditionBeanNotNull(cb); + final SelectPageCallback pageCallback = new SelectPageCallback() { + public PagingBean getPagingBean() { return cb; } + public int selectCountIgnoreFetchScope() { + return selectCount(cb); + } + public java.util.List selectListWithFetchScope() { + return selectList(cb); + } + }; + return invoker.invokeSelectPage(pageCallback); + } + + // =================================================================================== + // Various Select + // ============== + /** + * Select value-label list. + * + * @param cb Condition-bean. (NotNull) + * @param valueLabelSetupper Value-label-setupper. (NotNull) + * @return Value-label list. (NotNull) + */ + public java.util.List> selectValueLabelList(ProductsDescriptionCB cb, ValueLabelSetupper valueLabelSetupper) { + return createValueLabelList(selectList(cb), valueLabelSetupper); + } + + // =================================================================================== + // Pull Out Foreign + // ================ + + // =================================================================================== + // Basic Entity Update + // =================== + /** + * Insert. + * + * @param productsDescription Entity. (NotNull) + */ + public void insert(ProductsDescription productsDescription) { + assertEntityNotNull(productsDescription); + delegateInsert(productsDescription); + } + + protected void doCreate(Entity productsDescription) { + insert((ProductsDescription)productsDescription); + } + + /** + * Update. + *
+     * If it updates count zero, throws exception.
+     * If concurrency control of this table is valid, this update have it.
+     * 
+ * @param productsDescription Entity. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public void update(ProductsDescription productsDescription) { + assertEntityNotNull(productsDescription); + final int updatedCount = delegateUpdate(productsDescription); + if (updatedCount == 0) { + throw new jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException(productsDescription.toString()); + } else if (updatedCount > 1) { + String msg = "updatedCount=" + updatedCount + ": " + productsDescription.toString(); + throw new jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException(msg); + } + } + + protected void doModify(Entity productsDescription) { + update((ProductsDescription)productsDescription); + } + + /** + * Update after select. + * + * @param productsDescription Entity. This must contain primary-key value at least. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + */ + public void updateAfterSelect(ProductsDescription productsDescription) { + assertEntityNotNullAndHasPrimaryKeyValue(productsDescription); + final ProductsDescriptionCB cb = newMyConditionBean(); + cb.acceptPrimaryKeyMapString(getDBMeta().extractPrimaryKeyMapString(productsDescription)); + final ProductsDescription currentEntity = selectEntityWithDeletedCheck(cb); + mergeEntity(productsDescription, currentEntity); + update(currentEntity); + } + + protected void doModifyAfterSelect(Entity productsDescription) { + updateAfterSelect((ProductsDescription)productsDescription); + } + + /** + * Insert or update. + * {update: modified only} + * + * @param productsDescription Entity. This should contain primary-key value at least(Except use identity). (NotNull) + */ + public void insertOrUpdate(ProductsDescription productsDescription) { + assertEntityNotNull(productsDescription); + if (!productsDescription.hasPrimaryKeyValue()) { + insert(productsDescription); + } else { + try { + update(productsDescription); + } catch (org.seasar.dao.NotSingleRowUpdatedRuntimeException e) { + insert(productsDescription); + } catch (jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException e) { + insert(productsDescription); + } + } + } + + protected void doCreateOrUpdateNonstrict(Entity productsDescription) { + + insertOrUpdate((ProductsDescription)productsDescription); + + } + + /** + * Insert or update after select. + * {update: modified only} + * + * @param productsDescription Entity. This should contain primary-key value at least(Except use identity). (NotNull) + */ + public void insertOrUpdateAfterSelect(ProductsDescription productsDescription) { + assertEntityNotNull(productsDescription); + if (!productsDescription.hasPrimaryKeyValue()) { + insert(productsDescription); + return; + } + ProductsDescription currentEntity = null; + try { + final ProductsDescriptionCB cb = newMyConditionBean(); + cb.acceptPrimaryKeyMapString(getDBMeta().extractPrimaryKeyMapString(productsDescription)); + currentEntity = selectEntityWithDeletedCheck(cb); + } catch (jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException e) { + insert(productsDescription); + return; + } + assertEntityNotNullAndHasPrimaryKeyValue(productsDescription); + mergeEntity(productsDescription, currentEntity); + update(currentEntity); + } + + protected void doCreateOrModifyAfterSelect(Entity entity) { + insertOrUpdateAfterSelect((ProductsDescription)entity); + } + + /** + * This method implements the method that is declared at super. + * + * @param sourceEntity Source entity. (NotNull) + * @param destinationEntity Destination entity. (NotNull) + */ + protected void mergeEntity(Entity sourceEntity, Entity destinationEntity) { + assertEntityNotNull(sourceEntity); + assertEntityNotNull(destinationEntity); + final ProductsDescription sourceMyEntity = (ProductsDescription)sourceEntity; + final ProductsDescription destinationMyEntity = (ProductsDescription)destinationEntity; + destinationMyEntity.clearModifiedPropertyNames(); + final java.util.Set names = sourceMyEntity.getModifiedPropertyNames(); + + if (names.contains("productsId")) { destinationMyEntity.setProductsId(sourceMyEntity.getProductsId()); } + if (names.contains("languageId")) { destinationMyEntity.setLanguageId(sourceMyEntity.getLanguageId()); } + if (names.contains("productsName")) { destinationMyEntity.setProductsName(sourceMyEntity.getProductsName()); } + if (names.contains("productsDescription")) { destinationMyEntity.setProductsDescription(sourceMyEntity.getProductsDescription()); } + if (names.contains("productsUrl")) { destinationMyEntity.setProductsUrl(sourceMyEntity.getProductsUrl()); } + if (names.contains("productsViewed")) { destinationMyEntity.setProductsViewed(sourceMyEntity.getProductsViewed()); } + + } + + /** + * Delete. + * + * @param productsDescription Entity. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public void delete(ProductsDescription productsDescription) { + assertEntityNotNull(productsDescription); + final int deletedCount = delegateDelete(productsDescription); + if (deletedCount == 0) { + throw new jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException(productsDescription.toString()); + } else if (deletedCount > 1) { + String msg = "deletedCount=" + deletedCount + ": " + productsDescription.toString(); + throw new jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException(msg); + } + } + + protected void doRemove(Entity productsDescription) { + delete((ProductsDescription)productsDescription); + } + + /** + * Delete after select. + * + * @param productsDescription Entity. This must contain primary-key value at least. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + */ + public void deleteAfterSelect(ProductsDescription productsDescription) { + assertEntityNotNullAndHasPrimaryKeyValue(productsDescription); + final ProductsDescriptionCB cb = newMyConditionBean(); + cb.acceptPrimaryKeyMapString(getDBMeta().extractPrimaryKeyMapString(productsDescription)); + selectEntityWithDeletedCheck(cb); + delete(productsDescription); + } + + protected void doRemoveAfterSelect(Entity productsDescription) { + deleteAfterSelect((ProductsDescription)productsDescription); + } + + // =================================================================================== + // Basic Batch Update + // ================== + /** + * Insert list. + * + * @param productsDescriptionList Entity-list. (NotNull & NotEmpty) + * @return Inserted count. + */ + public int insertList(java.util.List productsDescriptionList) { + assertListNotNullAndNotEmpty(productsDescriptionList); + return delegateInsertList(productsDescriptionList); + } + + /** + * Update list. + * + * @param productsDescriptionList Entity-list. (NotNull & NotEmpty) + * @return Updated count. + */ + public int updateList(java.util.List productsDescriptionList) { + assertListNotNullAndNotEmpty(productsDescriptionList); + return delegateUpdateList(productsDescriptionList); + } + + /** + * Delete list. + * + * @param productsDescriptionList Entity-list. (NotNull & NotEmpty) + * @return Deleted count. + */ + public int deleteList(java.util.List productsDescriptionList) { + assertListNotNullAndNotEmpty(productsDescriptionList); + return delegateDeleteList(productsDescriptionList); + } + + // =================================================================================== + // Various Insert + // ============== + + // =================================================================================== + // CBSetupper + // ========== + /** + * The interface of condition-bean setupper. + */ + public static interface CBSetupper extends ConditionBeanSetupper { + + /** + * Set up condition. + * + * @param cb Condition-bean. (NotNull) + */ + public void setup(ProductsDescriptionCB cb); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/bsbhv/BsProductsNotificationsBhv.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/bsbhv/BsProductsNotificationsBhv.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/bsbhv/BsProductsNotificationsBhv.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,692 @@ + +package jp.sf.pal.pompei.bsbhv; + +import jp.sf.pal.pompei.allcommon.*; +import jp.sf.pal.pompei.allcommon.bhv.load.LoadRefererOption; +import jp.sf.pal.pompei.allcommon.bhv.setup.ConditionBeanSetupper; +import jp.sf.pal.pompei.allcommon.bhv.setup.ValueLabelSetupper; +import jp.sf.pal.pompei.allcommon.cbean.ConditionBean; +import jp.sf.pal.pompei.allcommon.cbean.ListResultBean; +import jp.sf.pal.pompei.allcommon.cbean.PagingBean; +import jp.sf.pal.pompei.allcommon.cbean.PagingResultBean; +import jp.sf.pal.pompei.allcommon.dbmeta.DBMeta; + +import jp.sf.pal.pompei.exdao.*; +import jp.sf.pal.pompei.exentity.*; +import jp.sf.pal.pompei.bsentity.dbmeta.*; +import jp.sf.pal.pompei.cbean.*; + + + +/** + * The behavior of PRODUCTS_NOTIFICATIONS. + * + *
+ * [primary-key]
+ *     PRODUCTS_ID, CUSTOMERS_ID
+ * 
+ * [column-property]
+ *     PRODUCTS_ID, CUSTOMERS_ID, DATE_ADDED
+ * 
+ * [foreign-property]
+ *     
+ * 
+ * [refferer-property]
+ *     
+ * 
+ * [sequence]
+ *     
+ * 
+ * [identity]
+ *     
+ * 
+ * [update-date]
+ *     
+ * 
+ * [version-no]
+ *     
+ * 
+ * 
+ * + * @author DBFlute(AutoGenerator) + */ +public abstract class BsProductsNotificationsBhv extends jp.sf.pal.pompei.allcommon.bhv.AbstractBehaviorWritable { + + // =================================================================================== + // Attribute + // ========= + /** Dao instance. */ + protected ProductsNotificationsDao _dao; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + public BsProductsNotificationsBhv() { + } + + // =================================================================================== + // Table name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + public String getTableDbName() { + return "PRODUCTS_NOTIFICATIONS"; + } + + // =================================================================================== + // DBMeta + // ====== + /** + * This method implements the method that is declared at super. + * + * @return DBMeta. (NotNull) + */ + public DBMeta getDBMeta() { + return ProductsNotificationsDbm.getInstance(); + } + + /** + * Get my dbmeta. + * + * @return DBMeta. (NotNull) + */ + public ProductsNotificationsDbm getMyDBMeta() { + return ProductsNotificationsDbm.getInstance(); + } + + // =================================================================================== + // Dao Accessor + // ============ + /** + * Get my dao. + * + * @return My dao. + */ + public ProductsNotificationsDao getMyDao() { + return _dao; + } + + /** + * Set my dao. + * + * @param dao My dao. (NotNull) + */ + public void setMyDao(ProductsNotificationsDao dao) { + assertObjectNotNull("dao", dao); + _dao = dao; + } + + /** + * This method implements the method that is declared at super. + * + * @return Dao-readable. (NotNull) + */ + public DaoReadable getDaoReadable() { + return getMyDao(); + } + + /** + * This method implements the method that is declared at super. + * + * @return Dao-writable. (NotNull) + */ + public DaoWritable getDaoWritable() { + return getMyDao(); + } + + // =================================================================================== + // New Instance + // ============ + /** + * New entity. + * + * @return Entity. (NotNull) + */ + public Entity newEntity() { + return newMyEntity(); + } + + /** + * New condition-bean. + * + * @return Condition-bean. (NotNull) + */ + public ConditionBean newConditionBean() { + return newMyConditionBean(); + } + + /** + * New my entity. + * + * @return My entity. (NotNull) + */ + public ProductsNotifications newMyEntity() { + return new ProductsNotifications(); + } + + /** + * New my condition-bean. + * + * @return My condition-bean. (NotNull) + */ + public ProductsNotificationsCB newMyConditionBean() { + return new ProductsNotificationsCB(); + } + + // =================================================================================== + // Delegate Method + // =============== + // ----------------------------------------------------- + // Select + // ------ + /** + * Get count as all. (Delegate-Method) + * + * @return All count. (NotNull) + */ + public int delegateGetCountAll() { + return getMyDao().getCountAll(); + } + + /** + * Get list as all. (Delegate-Method) + * + * @return All list. (NotNull) + */ + public java.util.List delegateGetListAll() { + return getMyDao().getListAll(); + } + + // + // Get entity. (Delegate-Method) + // + // @param Primary-keys (NotNull) + // @return Entity. (NotNull) + // + public ProductsNotifications delegateGetEntity(java.math.BigDecimal productsId, java.math.BigDecimal customersId) { + return getMyDao().getEntity(productsId, customersId); + } + + /** + * Select count by condition-bean. (Delegate-Method) + * + * @param cb Condition-bean. (NotNull) + * @return Selected count. (NotNull) + */ + public int delegateSelectCount(ProductsNotificationsCB cb) { + assertConditionBeanNotNull(cb); + return getMyDao().selectCount(cb); + } + + /** + * Select entity by condition-bean. (Delegate-Method) + * + * @param cb Condition-bean. (NotNull) + * @return Selected entity. If the select result is zero, it returns null. (Nullable) + */ + public ProductsNotifications delegateSelectEntity(ProductsNotificationsCB cb) { + assertConditionBeanNotNull(cb); + return getMyDao().selectEntity(cb); + } + + /** + * Select list by condition-bean. (Delegate-Method) + * + * @param cb Condition-bean. (NotNull) + * @return Selected list. If the select result is zero, it returns empty list. (NotNull) + */ + public java.util.List delegateSelectList(ProductsNotificationsCB cb) { + assertConditionBeanNotNull(cb); + return getMyDao().selectList(cb); + } + + + // ----------------------------------------------------- + // Update + // ------ + /** + * Insert one entity. (Delegate-Method) + * + * @param entity Entity. (NotNull) + * @return Inserted count. + */ + public int delegateInsert(ProductsNotifications entity) { + assertEntityNotNull(entity);// If this table use identity, the entity does not have primary-key. + filterEntityOfInsert(entity); + assertEntityOfInsert(entity); + return getMyDao().insert(entity); + } + + /** + * Update one entity. (Delegate-Method) + * {modified only} + * + * @param entity Entity. (NotNull) + * @return Updated count. + */ + public int delegateUpdate(ProductsNotifications entity) { + assertEntityNotNullAndHasPrimaryKeyValue(entity); + filterEntityOfUpdate(entity); + assertEntityOfUpdate(entity); + return getMyDao().updateModifiedOnly(entity); + } + + /** + * Delete one entity. (Delegate-Method) + * + * @param entity Entity. (NotNull) + * @return Deleted count. + */ + public int delegateDelete(ProductsNotifications entity) { + assertEntityNotNullAndHasPrimaryKeyValue(entity); + filterEntityOfDelete(entity); + assertEntityOfDelete(entity); + return getMyDao().delete(entity); + } + + /** + * Insert several entities. (Delegate-Method) + * + * @param entityList Entity-list. (NotNull & NotEmpty) + * @return Inserted count. + */ + public int delegateInsertList(java.util.List entityList) { + assertListNotNullAndNotEmpty(entityList); + return getMyDao().insertList(entityList); + } + + /** + * Update several entities. (Delegate-Method) + * + * @param entityList Entity-list. (NotNull & NotEmpty) + * @return Updated count. + */ + public int delegateUpdateList(java.util.List entityList) { + assertListNotNullAndNotEmpty(entityList); + return getMyDao().updateList(entityList); + } + + /** + * Delete several entities. (Delegate-Method) + * + * @param entityList Entity-list. (NotNull & NotEmpty) + * @return Deleted count. + */ + public int delegateDeleteList(java.util.List entityList) { + assertListNotNullAndNotEmpty(entityList); + return getMyDao().deleteList(entityList); + } + + // =================================================================================== + // Basic Select Count + // ================== + /** + * Select count by condition-bean. + *
+     * If the argument 'condition-bean' is effective about fetch-scope,
+     * this method invoke select count ignoring the fetch-scope.
+     * 
+ * @param cb Condition-bean. This condition-bean should not be set up about fetch-scope. (NotNull) + * @return Selected count. + */ + public int selectCount(ProductsNotificationsCB cb) { + assertConditionBeanNotNull(cb); + return delegateSelectCount(cb); + } + + // =================================================================================== + // Basic Select Entity + // =================== + /** + * Select entity by condition-bean. + * + * @param cb Condition-bean. (NotNull) + * @return Selected entity. (Nullalble) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public ProductsNotifications selectEntity(ProductsNotificationsCB cb) { + assertConditionBeanNotNull(cb); + final java.util.List ls = selectList(cb); + if (ls.isEmpty()) { + return null; + } + assertRecordHasBeenSelectedAsOne(ls, cb); + return (ProductsNotifications)ls.get(0); + } + + /** + * Select entity by condition-bean with deleted check. + * + * @param cb Condition-bean. (NotNull) + * @return Selected entity. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public ProductsNotifications selectEntityWithDeletedCheck(ProductsNotificationsCB cb) { + assertConditionBeanNotNull(cb); + final java.util.List ls = selectList(cb); + assertRecordHasNotBeenDeleted(ls, cb); + assertRecordHasBeenSelectedAsOne(ls, cb); + return (ProductsNotifications)ls.get(0); + } + + /* + * Select entity with deleted check. {by primary-key} + * + * @param primaryKey + * @return Selected entity. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public ProductsNotifications selectByPKValueWithDeletedCheck(java.math.BigDecimal productsId, java.math.BigDecimal customersId) { + ProductsNotifications entity = new ProductsNotifications(); + entity.setProductsId(productsId);entity.setCustomersId(customersId); + final ProductsNotificationsCB cb = newMyConditionBean(); + cb.acceptPrimaryKeyMapString(getDBMeta().extractPrimaryKeyMapString(entity)); + return selectEntityWithDeletedCheck(cb); + } + + // =================================================================================== + // Basic Select List + // ================= + /** + * Select list as result-bean. + * + * @param cb Condition-bean. (NotNull) + * @return Selected list-result-bean. (NotNull) + */ + public ListResultBean selectList(ProductsNotificationsCB cb) { + assertConditionBeanNotNull(cb); + return new ResultBeanBuilder(this).buildListResultBean(cb, delegateSelectList(cb)); + } + + /** + * Select page as result-bean. + * + * @param cb Condition-bean. (NotNull) + * @return Selected paging-result-bean. (NotNull) + */ + public PagingResultBean selectPage(final ProductsNotificationsCB cb) { + assertConditionBeanNotNull(cb); + return selectPage(cb, new SelectPageSimpleInvoker(this)); + } + + /** + * Select page. + * + * @param cb Condition-bean. (NotNull) + * @param invoker Select-page-invoker (NotNull) + * @return Selected paging-result-bean. (NotNull) + */ + public PagingResultBean selectPage(final ProductsNotificationsCB cb, SelectPageInvoker invoker) { + assertConditionBeanNotNull(cb); + final SelectPageCallback pageCallback = new SelectPageCallback() { + public PagingBean getPagingBean() { return cb; } + public int selectCountIgnoreFetchScope() { + return selectCount(cb); + } + public java.util.List selectListWithFetchScope() { + return selectList(cb); + } + }; + return invoker.invokeSelectPage(pageCallback); + } + + // =================================================================================== + // Various Select + // ============== + /** + * Select value-label list. + * + * @param cb Condition-bean. (NotNull) + * @param valueLabelSetupper Value-label-setupper. (NotNull) + * @return Value-label list. (NotNull) + */ + public java.util.List> selectValueLabelList(ProductsNotificationsCB cb, ValueLabelSetupper valueLabelSetupper) { + return createValueLabelList(selectList(cb), valueLabelSetupper); + } + + // =================================================================================== + // Pull Out Foreign + // ================ + + // =================================================================================== + // Basic Entity Update + // =================== + /** + * Insert. + * + * @param productsNotifications Entity. (NotNull) + */ + public void insert(ProductsNotifications productsNotifications) { + assertEntityNotNull(productsNotifications); + delegateInsert(productsNotifications); + } + + protected void doCreate(Entity productsNotifications) { + insert((ProductsNotifications)productsNotifications); + } + + /** + * Update. + *
+     * If it updates count zero, throws exception.
+     * If concurrency control of this table is valid, this update have it.
+     * 
+ * @param productsNotifications Entity. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public void update(ProductsNotifications productsNotifications) { + assertEntityNotNull(productsNotifications); + final int updatedCount = delegateUpdate(productsNotifications); + if (updatedCount == 0) { + throw new jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException(productsNotifications.toString()); + } else if (updatedCount > 1) { + String msg = "updatedCount=" + updatedCount + ": " + productsNotifications.toString(); + throw new jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException(msg); + } + } + + protected void doModify(Entity productsNotifications) { + update((ProductsNotifications)productsNotifications); + } + + /** + * Update after select. + * + * @param productsNotifications Entity. This must contain primary-key value at least. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + */ + public void updateAfterSelect(ProductsNotifications productsNotifications) { + assertEntityNotNullAndHasPrimaryKeyValue(productsNotifications); + final ProductsNotificationsCB cb = newMyConditionBean(); + cb.acceptPrimaryKeyMapString(getDBMeta().extractPrimaryKeyMapString(productsNotifications)); + final ProductsNotifications currentEntity = selectEntityWithDeletedCheck(cb); + mergeEntity(productsNotifications, currentEntity); + update(currentEntity); + } + + protected void doModifyAfterSelect(Entity productsNotifications) { + updateAfterSelect((ProductsNotifications)productsNotifications); + } + + /** + * Insert or update. + * {update: modified only} + * + * @param productsNotifications Entity. This should contain primary-key value at least(Except use identity). (NotNull) + */ + public void insertOrUpdate(ProductsNotifications productsNotifications) { + assertEntityNotNull(productsNotifications); + if (!productsNotifications.hasPrimaryKeyValue()) { + insert(productsNotifications); + } else { + try { + update(productsNotifications); + } catch (org.seasar.dao.NotSingleRowUpdatedRuntimeException e) { + insert(productsNotifications); + } catch (jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException e) { + insert(productsNotifications); + } + } + } + + protected void doCreateOrUpdateNonstrict(Entity productsNotifications) { + + insertOrUpdate((ProductsNotifications)productsNotifications); + + } + + /** + * Insert or update after select. + * {update: modified only} + * + * @param productsNotifications Entity. This should contain primary-key value at least(Except use identity). (NotNull) + */ + public void insertOrUpdateAfterSelect(ProductsNotifications productsNotifications) { + assertEntityNotNull(productsNotifications); + if (!productsNotifications.hasPrimaryKeyValue()) { + insert(productsNotifications); + return; + } + ProductsNotifications currentEntity = null; + try { + final ProductsNotificationsCB cb = newMyConditionBean(); + cb.acceptPrimaryKeyMapString(getDBMeta().extractPrimaryKeyMapString(productsNotifications)); + currentEntity = selectEntityWithDeletedCheck(cb); + } catch (jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException e) { + insert(productsNotifications); + return; + } + assertEntityNotNullAndHasPrimaryKeyValue(productsNotifications); + mergeEntity(productsNotifications, currentEntity); + update(currentEntity); + } + + protected void doCreateOrModifyAfterSelect(Entity entity) { + insertOrUpdateAfterSelect((ProductsNotifications)entity); + } + + /** + * This method implements the method that is declared at super. + * + * @param sourceEntity Source entity. (NotNull) + * @param destinationEntity Destination entity. (NotNull) + */ + protected void mergeEntity(Entity sourceEntity, Entity destinationEntity) { + assertEntityNotNull(sourceEntity); + assertEntityNotNull(destinationEntity); + final ProductsNotifications sourceMyEntity = (ProductsNotifications)sourceEntity; + final ProductsNotifications destinationMyEntity = (ProductsNotifications)destinationEntity; + destinationMyEntity.clearModifiedPropertyNames(); + final java.util.Set names = sourceMyEntity.getModifiedPropertyNames(); + + if (names.contains("productsId")) { destinationMyEntity.setProductsId(sourceMyEntity.getProductsId()); } + if (names.contains("customersId")) { destinationMyEntity.setCustomersId(sourceMyEntity.getCustomersId()); } + if (names.contains("dateAdded")) { destinationMyEntity.setDateAdded(sourceMyEntity.getDateAdded()); } + + } + + /** + * Delete. + * + * @param productsNotifications Entity. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public void delete(ProductsNotifications productsNotifications) { + assertEntityNotNull(productsNotifications); + final int deletedCount = delegateDelete(productsNotifications); + if (deletedCount == 0) { + throw new jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException(productsNotifications.toString()); + } else if (deletedCount > 1) { + String msg = "deletedCount=" + deletedCount + ": " + productsNotifications.toString(); + throw new jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException(msg); + } + } + + protected void doRemove(Entity productsNotifications) { + delete((ProductsNotifications)productsNotifications); + } + + /** + * Delete after select. + * + * @param productsNotifications Entity. This must contain primary-key value at least. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + */ + public void deleteAfterSelect(ProductsNotifications productsNotifications) { + assertEntityNotNullAndHasPrimaryKeyValue(productsNotifications); + final ProductsNotificationsCB cb = newMyConditionBean(); + cb.acceptPrimaryKeyMapString(getDBMeta().extractPrimaryKeyMapString(productsNotifications)); + selectEntityWithDeletedCheck(cb); + delete(productsNotifications); + } + + protected void doRemoveAfterSelect(Entity productsNotifications) { + deleteAfterSelect((ProductsNotifications)productsNotifications); + } + + // =================================================================================== + // Basic Batch Update + // ================== + /** + * Insert list. + * + * @param productsNotificationsList Entity-list. (NotNull & NotEmpty) + * @return Inserted count. + */ + public int insertList(java.util.List productsNotificationsList) { + assertListNotNullAndNotEmpty(productsNotificationsList); + return delegateInsertList(productsNotificationsList); + } + + /** + * Update list. + * + * @param productsNotificationsList Entity-list. (NotNull & NotEmpty) + * @return Updated count. + */ + public int updateList(java.util.List productsNotificationsList) { + assertListNotNullAndNotEmpty(productsNotificationsList); + return delegateUpdateList(productsNotificationsList); + } + + /** + * Delete list. + * + * @param productsNotificationsList Entity-list. (NotNull & NotEmpty) + * @return Deleted count. + */ + public int deleteList(java.util.List productsNotificationsList) { + assertListNotNullAndNotEmpty(productsNotificationsList); + return delegateDeleteList(productsNotificationsList); + } + + // =================================================================================== + // Various Insert + // ============== + + // =================================================================================== + // CBSetupper + // ========== + /** + * The interface of condition-bean setupper. + */ + public static interface CBSetupper extends ConditionBeanSetupper { + + /** + * Set up condition. + * + * @param cb Condition-bean. (NotNull) + */ + public void setup(ProductsNotificationsCB cb); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/bsbhv/BsProductsOptionsBhv.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/bsbhv/BsProductsOptionsBhv.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/bsbhv/BsProductsOptionsBhv.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,692 @@ + +package jp.sf.pal.pompei.bsbhv; + +import jp.sf.pal.pompei.allcommon.*; +import jp.sf.pal.pompei.allcommon.bhv.load.LoadRefererOption; +import jp.sf.pal.pompei.allcommon.bhv.setup.ConditionBeanSetupper; +import jp.sf.pal.pompei.allcommon.bhv.setup.ValueLabelSetupper; +import jp.sf.pal.pompei.allcommon.cbean.ConditionBean; +import jp.sf.pal.pompei.allcommon.cbean.ListResultBean; +import jp.sf.pal.pompei.allcommon.cbean.PagingBean; +import jp.sf.pal.pompei.allcommon.cbean.PagingResultBean; +import jp.sf.pal.pompei.allcommon.dbmeta.DBMeta; + +import jp.sf.pal.pompei.exdao.*; +import jp.sf.pal.pompei.exentity.*; +import jp.sf.pal.pompei.bsentity.dbmeta.*; +import jp.sf.pal.pompei.cbean.*; + + + +/** + * The behavior of PRODUCTS_OPTIONS. + * + *
+ * [primary-key]
+ *     PRODUCTS_OPTIONS_ID, LANGUAGE_ID
+ * 
+ * [column-property]
+ *     PRODUCTS_OPTIONS_ID, LANGUAGE_ID, PRODUCTS_OPTIONS_NAME
+ * 
+ * [foreign-property]
+ *     
+ * 
+ * [refferer-property]
+ *     
+ * 
+ * [sequence]
+ *     
+ * 
+ * [identity]
+ *     
+ * 
+ * [update-date]
+ *     
+ * 
+ * [version-no]
+ *     
+ * 
+ * 
+ * + * @author DBFlute(AutoGenerator) + */ +public abstract class BsProductsOptionsBhv extends jp.sf.pal.pompei.allcommon.bhv.AbstractBehaviorWritable { + + // =================================================================================== + // Attribute + // ========= + /** Dao instance. */ + protected ProductsOptionsDao _dao; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + public BsProductsOptionsBhv() { + } + + // =================================================================================== + // Table name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + public String getTableDbName() { + return "PRODUCTS_OPTIONS"; + } + + // =================================================================================== + // DBMeta + // ====== + /** + * This method implements the method that is declared at super. + * + * @return DBMeta. (NotNull) + */ + public DBMeta getDBMeta() { + return ProductsOptionsDbm.getInstance(); + } + + /** + * Get my dbmeta. + * + * @return DBMeta. (NotNull) + */ + public ProductsOptionsDbm getMyDBMeta() { + return ProductsOptionsDbm.getInstance(); + } + + // =================================================================================== + // Dao Accessor + // ============ + /** + * Get my dao. + * + * @return My dao. + */ + public ProductsOptionsDao getMyDao() { + return _dao; + } + + /** + * Set my dao. + * + * @param dao My dao. (NotNull) + */ + public void setMyDao(ProductsOptionsDao dao) { + assertObjectNotNull("dao", dao); + _dao = dao; + } + + /** + * This method implements the method that is declared at super. + * + * @return Dao-readable. (NotNull) + */ + public DaoReadable getDaoReadable() { + return getMyDao(); + } + + /** + * This method implements the method that is declared at super. + * + * @return Dao-writable. (NotNull) + */ + public DaoWritable getDaoWritable() { + return getMyDao(); + } + + // =================================================================================== + // New Instance + // ============ + /** + * New entity. + * + * @return Entity. (NotNull) + */ + public Entity newEntity() { + return newMyEntity(); + } + + /** + * New condition-bean. + * + * @return Condition-bean. (NotNull) + */ + public ConditionBean newConditionBean() { + return newMyConditionBean(); + } + + /** + * New my entity. + * + * @return My entity. (NotNull) + */ + public ProductsOptions newMyEntity() { + return new ProductsOptions(); + } + + /** + * New my condition-bean. + * + * @return My condition-bean. (NotNull) + */ + public ProductsOptionsCB newMyConditionBean() { + return new ProductsOptionsCB(); + } + + // =================================================================================== + // Delegate Method + // =============== + // ----------------------------------------------------- + // Select + // ------ + /** + * Get count as all. (Delegate-Method) + * + * @return All count. (NotNull) + */ + public int delegateGetCountAll() { + return getMyDao().getCountAll(); + } + + /** + * Get list as all. (Delegate-Method) + * + * @return All list. (NotNull) + */ + public java.util.List delegateGetListAll() { + return getMyDao().getListAll(); + } + + // + // Get entity. (Delegate-Method) + // + // @param Primary-keys (NotNull) + // @return Entity. (NotNull) + // + public ProductsOptions delegateGetEntity(java.math.BigDecimal productsOptionsId, java.math.BigDecimal languageId) { + return getMyDao().getEntity(productsOptionsId, languageId); + } + + /** + * Select count by condition-bean. (Delegate-Method) + * + * @param cb Condition-bean. (NotNull) + * @return Selected count. (NotNull) + */ + public int delegateSelectCount(ProductsOptionsCB cb) { + assertConditionBeanNotNull(cb); + return getMyDao().selectCount(cb); + } + + /** + * Select entity by condition-bean. (Delegate-Method) + * + * @param cb Condition-bean. (NotNull) + * @return Selected entity. If the select result is zero, it returns null. (Nullable) + */ + public ProductsOptions delegateSelectEntity(ProductsOptionsCB cb) { + assertConditionBeanNotNull(cb); + return getMyDao().selectEntity(cb); + } + + /** + * Select list by condition-bean. (Delegate-Method) + * + * @param cb Condition-bean. (NotNull) + * @return Selected list. If the select result is zero, it returns empty list. (NotNull) + */ + public java.util.List delegateSelectList(ProductsOptionsCB cb) { + assertConditionBeanNotNull(cb); + return getMyDao().selectList(cb); + } + + + // ----------------------------------------------------- + // Update + // ------ + /** + * Insert one entity. (Delegate-Method) + * + * @param entity Entity. (NotNull) + * @return Inserted count. + */ + public int delegateInsert(ProductsOptions entity) { + assertEntityNotNull(entity);// If this table use identity, the entity does not have primary-key. + filterEntityOfInsert(entity); + assertEntityOfInsert(entity); + return getMyDao().insert(entity); + } + + /** + * Update one entity. (Delegate-Method) + * {modified only} + * + * @param entity Entity. (NotNull) + * @return Updated count. + */ + public int delegateUpdate(ProductsOptions entity) { + assertEntityNotNullAndHasPrimaryKeyValue(entity); + filterEntityOfUpdate(entity); + assertEntityOfUpdate(entity); + return getMyDao().updateModifiedOnly(entity); + } + + /** + * Delete one entity. (Delegate-Method) + * + * @param entity Entity. (NotNull) + * @return Deleted count. + */ + public int delegateDelete(ProductsOptions entity) { + assertEntityNotNullAndHasPrimaryKeyValue(entity); + filterEntityOfDelete(entity); + assertEntityOfDelete(entity); + return getMyDao().delete(entity); + } + + /** + * Insert several entities. (Delegate-Method) + * + * @param entityList Entity-list. (NotNull & NotEmpty) + * @return Inserted count. + */ + public int delegateInsertList(java.util.List entityList) { + assertListNotNullAndNotEmpty(entityList); + return getMyDao().insertList(entityList); + } + + /** + * Update several entities. (Delegate-Method) + * + * @param entityList Entity-list. (NotNull & NotEmpty) + * @return Updated count. + */ + public int delegateUpdateList(java.util.List entityList) { + assertListNotNullAndNotEmpty(entityList); + return getMyDao().updateList(entityList); + } + + /** + * Delete several entities. (Delegate-Method) + * + * @param entityList Entity-list. (NotNull & NotEmpty) + * @return Deleted count. + */ + public int delegateDeleteList(java.util.List entityList) { + assertListNotNullAndNotEmpty(entityList); + return getMyDao().deleteList(entityList); + } + + // =================================================================================== + // Basic Select Count + // ================== + /** + * Select count by condition-bean. + *
+     * If the argument 'condition-bean' is effective about fetch-scope,
+     * this method invoke select count ignoring the fetch-scope.
+     * 
+ * @param cb Condition-bean. This condition-bean should not be set up about fetch-scope. (NotNull) + * @return Selected count. + */ + public int selectCount(ProductsOptionsCB cb) { + assertConditionBeanNotNull(cb); + return delegateSelectCount(cb); + } + + // =================================================================================== + // Basic Select Entity + // =================== + /** + * Select entity by condition-bean. + * + * @param cb Condition-bean. (NotNull) + * @return Selected entity. (Nullalble) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public ProductsOptions selectEntity(ProductsOptionsCB cb) { + assertConditionBeanNotNull(cb); + final java.util.List ls = selectList(cb); + if (ls.isEmpty()) { + return null; + } + assertRecordHasBeenSelectedAsOne(ls, cb); + return (ProductsOptions)ls.get(0); + } + + /** + * Select entity by condition-bean with deleted check. + * + * @param cb Condition-bean. (NotNull) + * @return Selected entity. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public ProductsOptions selectEntityWithDeletedCheck(ProductsOptionsCB cb) { + assertConditionBeanNotNull(cb); + final java.util.List ls = selectList(cb); + assertRecordHasNotBeenDeleted(ls, cb); + assertRecordHasBeenSelectedAsOne(ls, cb); + return (ProductsOptions)ls.get(0); + } + + /* + * Select entity with deleted check. {by primary-key} + * + * @param primaryKey + * @return Selected entity. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public ProductsOptions selectByPKValueWithDeletedCheck(java.math.BigDecimal productsOptionsId, java.math.BigDecimal languageId) { + ProductsOptions entity = new ProductsOptions(); + entity.setProductsOptionsId(productsOptionsId);entity.setLanguageId(languageId); + final ProductsOptionsCB cb = newMyConditionBean(); + cb.acceptPrimaryKeyMapString(getDBMeta().extractPrimaryKeyMapString(entity)); + return selectEntityWithDeletedCheck(cb); + } + + // =================================================================================== + // Basic Select List + // ================= + /** + * Select list as result-bean. + * + * @param cb Condition-bean. (NotNull) + * @return Selected list-result-bean. (NotNull) + */ + public ListResultBean selectList(ProductsOptionsCB cb) { + assertConditionBeanNotNull(cb); + return new ResultBeanBuilder(this).buildListResultBean(cb, delegateSelectList(cb)); + } + + /** + * Select page as result-bean. + * + * @param cb Condition-bean. (NotNull) + * @return Selected paging-result-bean. (NotNull) + */ + public PagingResultBean selectPage(final ProductsOptionsCB cb) { + assertConditionBeanNotNull(cb); + return selectPage(cb, new SelectPageSimpleInvoker(this)); + } + + /** + * Select page. + * + * @param cb Condition-bean. (NotNull) + * @param invoker Select-page-invoker (NotNull) + * @return Selected paging-result-bean. (NotNull) + */ + public PagingResultBean selectPage(final ProductsOptionsCB cb, SelectPageInvoker invoker) { + assertConditionBeanNotNull(cb); + final SelectPageCallback pageCallback = new SelectPageCallback() { + public PagingBean getPagingBean() { return cb; } + public int selectCountIgnoreFetchScope() { + return selectCount(cb); + } + public java.util.List selectListWithFetchScope() { + return selectList(cb); + } + }; + return invoker.invokeSelectPage(pageCallback); + } + + // =================================================================================== + // Various Select + // ============== + /** + * Select value-label list. + * + * @param cb Condition-bean. (NotNull) + * @param valueLabelSetupper Value-label-setupper. (NotNull) + * @return Value-label list. (NotNull) + */ + public java.util.List> selectValueLabelList(ProductsOptionsCB cb, ValueLabelSetupper valueLabelSetupper) { + return createValueLabelList(selectList(cb), valueLabelSetupper); + } + + // =================================================================================== + // Pull Out Foreign + // ================ + + // =================================================================================== + // Basic Entity Update + // =================== + /** + * Insert. + * + * @param productsOptions Entity. (NotNull) + */ + public void insert(ProductsOptions productsOptions) { + assertEntityNotNull(productsOptions); + delegateInsert(productsOptions); + } + + protected void doCreate(Entity productsOptions) { + insert((ProductsOptions)productsOptions); + } + + /** + * Update. + *
+     * If it updates count zero, throws exception.
+     * If concurrency control of this table is valid, this update have it.
+     * 
+ * @param productsOptions Entity. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public void update(ProductsOptions productsOptions) { + assertEntityNotNull(productsOptions); + final int updatedCount = delegateUpdate(productsOptions); + if (updatedCount == 0) { + throw new jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException(productsOptions.toString()); + } else if (updatedCount > 1) { + String msg = "updatedCount=" + updatedCount + ": " + productsOptions.toString(); + throw new jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException(msg); + } + } + + protected void doModify(Entity productsOptions) { + update((ProductsOptions)productsOptions); + } + + /** + * Update after select. + * + * @param productsOptions Entity. This must contain primary-key value at least. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + */ + public void updateAfterSelect(ProductsOptions productsOptions) { + assertEntityNotNullAndHasPrimaryKeyValue(productsOptions); + final ProductsOptionsCB cb = newMyConditionBean(); + cb.acceptPrimaryKeyMapString(getDBMeta().extractPrimaryKeyMapString(productsOptions)); + final ProductsOptions currentEntity = selectEntityWithDeletedCheck(cb); + mergeEntity(productsOptions, currentEntity); + update(currentEntity); + } + + protected void doModifyAfterSelect(Entity productsOptions) { + updateAfterSelect((ProductsOptions)productsOptions); + } + + /** + * Insert or update. + * {update: modified only} + * + * @param productsOptions Entity. This should contain primary-key value at least(Except use identity). (NotNull) + */ + public void insertOrUpdate(ProductsOptions productsOptions) { + assertEntityNotNull(productsOptions); + if (!productsOptions.hasPrimaryKeyValue()) { + insert(productsOptions); + } else { + try { + update(productsOptions); + } catch (org.seasar.dao.NotSingleRowUpdatedRuntimeException e) { + insert(productsOptions); + } catch (jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException e) { + insert(productsOptions); + } + } + } + + protected void doCreateOrUpdateNonstrict(Entity productsOptions) { + + insertOrUpdate((ProductsOptions)productsOptions); + + } + + /** + * Insert or update after select. + * {update: modified only} + * + * @param productsOptions Entity. This should contain primary-key value at least(Except use identity). (NotNull) + */ + public void insertOrUpdateAfterSelect(ProductsOptions productsOptions) { + assertEntityNotNull(productsOptions); + if (!productsOptions.hasPrimaryKeyValue()) { + insert(productsOptions); + return; + } + ProductsOptions currentEntity = null; + try { + final ProductsOptionsCB cb = newMyConditionBean(); + cb.acceptPrimaryKeyMapString(getDBMeta().extractPrimaryKeyMapString(productsOptions)); + currentEntity = selectEntityWithDeletedCheck(cb); + } catch (jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException e) { + insert(productsOptions); + return; + } + assertEntityNotNullAndHasPrimaryKeyValue(productsOptions); + mergeEntity(productsOptions, currentEntity); + update(currentEntity); + } + + protected void doCreateOrModifyAfterSelect(Entity entity) { + insertOrUpdateAfterSelect((ProductsOptions)entity); + } + + /** + * This method implements the method that is declared at super. + * + * @param sourceEntity Source entity. (NotNull) + * @param destinationEntity Destination entity. (NotNull) + */ + protected void mergeEntity(Entity sourceEntity, Entity destinationEntity) { + assertEntityNotNull(sourceEntity); + assertEntityNotNull(destinationEntity); + final ProductsOptions sourceMyEntity = (ProductsOptions)sourceEntity; + final ProductsOptions destinationMyEntity = (ProductsOptions)destinationEntity; + destinationMyEntity.clearModifiedPropertyNames(); + final java.util.Set names = sourceMyEntity.getModifiedPropertyNames(); + + if (names.contains("productsOptionsId")) { destinationMyEntity.setProductsOptionsId(sourceMyEntity.getProductsOptionsId()); } + if (names.contains("languageId")) { destinationMyEntity.setLanguageId(sourceMyEntity.getLanguageId()); } + if (names.contains("productsOptionsName")) { destinationMyEntity.setProductsOptionsName(sourceMyEntity.getProductsOptionsName()); } + + } + + /** + * Delete. + * + * @param productsOptions Entity. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public void delete(ProductsOptions productsOptions) { + assertEntityNotNull(productsOptions); + final int deletedCount = delegateDelete(productsOptions); + if (deletedCount == 0) { + throw new jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException(productsOptions.toString()); + } else if (deletedCount > 1) { + String msg = "deletedCount=" + deletedCount + ": " + productsOptions.toString(); + throw new jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException(msg); + } + } + + protected void doRemove(Entity productsOptions) { + delete((ProductsOptions)productsOptions); + } + + /** + * Delete after select. + * + * @param productsOptions Entity. This must contain primary-key value at least. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + */ + public void deleteAfterSelect(ProductsOptions productsOptions) { + assertEntityNotNullAndHasPrimaryKeyValue(productsOptions); + final ProductsOptionsCB cb = newMyConditionBean(); + cb.acceptPrimaryKeyMapString(getDBMeta().extractPrimaryKeyMapString(productsOptions)); + selectEntityWithDeletedCheck(cb); + delete(productsOptions); + } + + protected void doRemoveAfterSelect(Entity productsOptions) { + deleteAfterSelect((ProductsOptions)productsOptions); + } + + // =================================================================================== + // Basic Batch Update + // ================== + /** + * Insert list. + * + * @param productsOptionsList Entity-list. (NotNull & NotEmpty) + * @return Inserted count. + */ + public int insertList(java.util.List productsOptionsList) { + assertListNotNullAndNotEmpty(productsOptionsList); + return delegateInsertList(productsOptionsList); + } + + /** + * Update list. + * + * @param productsOptionsList Entity-list. (NotNull & NotEmpty) + * @return Updated count. + */ + public int updateList(java.util.List productsOptionsList) { + assertListNotNullAndNotEmpty(productsOptionsList); + return delegateUpdateList(productsOptionsList); + } + + /** + * Delete list. + * + * @param productsOptionsList Entity-list. (NotNull & NotEmpty) + * @return Deleted count. + */ + public int deleteList(java.util.List productsOptionsList) { + assertListNotNullAndNotEmpty(productsOptionsList); + return delegateDeleteList(productsOptionsList); + } + + // =================================================================================== + // Various Insert + // ============== + + // =================================================================================== + // CBSetupper + // ========== + /** + * The interface of condition-bean setupper. + */ + public static interface CBSetupper extends ConditionBeanSetupper { + + /** + * Set up condition. + * + * @param cb Condition-bean. (NotNull) + */ + public void setup(ProductsOptionsCB cb); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/bsbhv/BsProductsOptionsValuesBhv.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/bsbhv/BsProductsOptionsValuesBhv.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/bsbhv/BsProductsOptionsValuesBhv.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,692 @@ + +package jp.sf.pal.pompei.bsbhv; + +import jp.sf.pal.pompei.allcommon.*; +import jp.sf.pal.pompei.allcommon.bhv.load.LoadRefererOption; +import jp.sf.pal.pompei.allcommon.bhv.setup.ConditionBeanSetupper; +import jp.sf.pal.pompei.allcommon.bhv.setup.ValueLabelSetupper; +import jp.sf.pal.pompei.allcommon.cbean.ConditionBean; +import jp.sf.pal.pompei.allcommon.cbean.ListResultBean; +import jp.sf.pal.pompei.allcommon.cbean.PagingBean; +import jp.sf.pal.pompei.allcommon.cbean.PagingResultBean; +import jp.sf.pal.pompei.allcommon.dbmeta.DBMeta; + +import jp.sf.pal.pompei.exdao.*; +import jp.sf.pal.pompei.exentity.*; +import jp.sf.pal.pompei.bsentity.dbmeta.*; +import jp.sf.pal.pompei.cbean.*; + + + +/** + * The behavior of PRODUCTS_OPTIONS_VALUES. + * + *
+ * [primary-key]
+ *     PRODUCTS_OPTIONS_VALUES_ID, LANGUAGE_ID
+ * 
+ * [column-property]
+ *     PRODUCTS_OPTIONS_VALUES_ID, LANGUAGE_ID, PRODUCTS_OPTIONS_VALUES_NAME
+ * 
+ * [foreign-property]
+ *     
+ * 
+ * [refferer-property]
+ *     
+ * 
+ * [sequence]
+ *     
+ * 
+ * [identity]
+ *     
+ * 
+ * [update-date]
+ *     
+ * 
+ * [version-no]
+ *     
+ * 
+ * 
+ * + * @author DBFlute(AutoGenerator) + */ +public abstract class BsProductsOptionsValuesBhv extends jp.sf.pal.pompei.allcommon.bhv.AbstractBehaviorWritable { + + // =================================================================================== + // Attribute + // ========= + /** Dao instance. */ + protected ProductsOptionsValuesDao _dao; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + public BsProductsOptionsValuesBhv() { + } + + // =================================================================================== + // Table name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + public String getTableDbName() { + return "PRODUCTS_OPTIONS_VALUES"; + } + + // =================================================================================== + // DBMeta + // ====== + /** + * This method implements the method that is declared at super. + * + * @return DBMeta. (NotNull) + */ + public DBMeta getDBMeta() { + return ProductsOptionsValuesDbm.getInstance(); + } + + /** + * Get my dbmeta. + * + * @return DBMeta. (NotNull) + */ + public ProductsOptionsValuesDbm getMyDBMeta() { + return ProductsOptionsValuesDbm.getInstance(); + } + + // =================================================================================== + // Dao Accessor + // ============ + /** + * Get my dao. + * + * @return My dao. + */ + public ProductsOptionsValuesDao getMyDao() { + return _dao; + } + + /** + * Set my dao. + * + * @param dao My dao. (NotNull) + */ + public void setMyDao(ProductsOptionsValuesDao dao) { + assertObjectNotNull("dao", dao); + _dao = dao; + } + + /** + * This method implements the method that is declared at super. + * + * @return Dao-readable. (NotNull) + */ + public DaoReadable getDaoReadable() { + return getMyDao(); + } + + /** + * This method implements the method that is declared at super. + * + * @return Dao-writable. (NotNull) + */ + public DaoWritable getDaoWritable() { + return getMyDao(); + } + + // =================================================================================== + // New Instance + // ============ + /** + * New entity. + * + * @return Entity. (NotNull) + */ + public Entity newEntity() { + return newMyEntity(); + } + + /** + * New condition-bean. + * + * @return Condition-bean. (NotNull) + */ + public ConditionBean newConditionBean() { + return newMyConditionBean(); + } + + /** + * New my entity. + * + * @return My entity. (NotNull) + */ + public ProductsOptionsValues newMyEntity() { + return new ProductsOptionsValues(); + } + + /** + * New my condition-bean. + * + * @return My condition-bean. (NotNull) + */ + public ProductsOptionsValuesCB newMyConditionBean() { + return new ProductsOptionsValuesCB(); + } + + // =================================================================================== + // Delegate Method + // =============== + // ----------------------------------------------------- + // Select + // ------ + /** + * Get count as all. (Delegate-Method) + * + * @return All count. (NotNull) + */ + public int delegateGetCountAll() { + return getMyDao().getCountAll(); + } + + /** + * Get list as all. (Delegate-Method) + * + * @return All list. (NotNull) + */ + public java.util.List delegateGetListAll() { + return getMyDao().getListAll(); + } + + // + // Get entity. (Delegate-Method) + // + // @param Primary-keys (NotNull) + // @return Entity. (NotNull) + // + public ProductsOptionsValues delegateGetEntity(java.math.BigDecimal productsOptionsValuesId, java.math.BigDecimal languageId) { + return getMyDao().getEntity(productsOptionsValuesId, languageId); + } + + /** + * Select count by condition-bean. (Delegate-Method) + * + * @param cb Condition-bean. (NotNull) + * @return Selected count. (NotNull) + */ + public int delegateSelectCount(ProductsOptionsValuesCB cb) { + assertConditionBeanNotNull(cb); + return getMyDao().selectCount(cb); + } + + /** + * Select entity by condition-bean. (Delegate-Method) + * + * @param cb Condition-bean. (NotNull) + * @return Selected entity. If the select result is zero, it returns null. (Nullable) + */ + public ProductsOptionsValues delegateSelectEntity(ProductsOptionsValuesCB cb) { + assertConditionBeanNotNull(cb); + return getMyDao().selectEntity(cb); + } + + /** + * Select list by condition-bean. (Delegate-Method) + * + * @param cb Condition-bean. (NotNull) + * @return Selected list. If the select result is zero, it returns empty list. (NotNull) + */ + public java.util.List delegateSelectList(ProductsOptionsValuesCB cb) { + assertConditionBeanNotNull(cb); + return getMyDao().selectList(cb); + } + + + // ----------------------------------------------------- + // Update + // ------ + /** + * Insert one entity. (Delegate-Method) + * + * @param entity Entity. (NotNull) + * @return Inserted count. + */ + public int delegateInsert(ProductsOptionsValues entity) { + assertEntityNotNull(entity);// If this table use identity, the entity does not have primary-key. + filterEntityOfInsert(entity); + assertEntityOfInsert(entity); + return getMyDao().insert(entity); + } + + /** + * Update one entity. (Delegate-Method) + * {modified only} + * + * @param entity Entity. (NotNull) + * @return Updated count. + */ + public int delegateUpdate(ProductsOptionsValues entity) { + assertEntityNotNullAndHasPrimaryKeyValue(entity); + filterEntityOfUpdate(entity); + assertEntityOfUpdate(entity); + return getMyDao().updateModifiedOnly(entity); + } + + /** + * Delete one entity. (Delegate-Method) + * + * @param entity Entity. (NotNull) + * @return Deleted count. + */ + public int delegateDelete(ProductsOptionsValues entity) { + assertEntityNotNullAndHasPrimaryKeyValue(entity); + filterEntityOfDelete(entity); + assertEntityOfDelete(entity); + return getMyDao().delete(entity); + } + + /** + * Insert several entities. (Delegate-Method) + * + * @param entityList Entity-list. (NotNull & NotEmpty) + * @return Inserted count. + */ + public int delegateInsertList(java.util.List entityList) { + assertListNotNullAndNotEmpty(entityList); + return getMyDao().insertList(entityList); + } + + /** + * Update several entities. (Delegate-Method) + * + * @param entityList Entity-list. (NotNull & NotEmpty) + * @return Updated count. + */ + public int delegateUpdateList(java.util.List entityList) { + assertListNotNullAndNotEmpty(entityList); + return getMyDao().updateList(entityList); + } + + /** + * Delete several entities. (Delegate-Method) + * + * @param entityList Entity-list. (NotNull & NotEmpty) + * @return Deleted count. + */ + public int delegateDeleteList(java.util.List entityList) { + assertListNotNullAndNotEmpty(entityList); + return getMyDao().deleteList(entityList); + } + + // =================================================================================== + // Basic Select Count + // ================== + /** + * Select count by condition-bean. + *
+     * If the argument 'condition-bean' is effective about fetch-scope,
+     * this method invoke select count ignoring the fetch-scope.
+     * 
+ * @param cb Condition-bean. This condition-bean should not be set up about fetch-scope. (NotNull) + * @return Selected count. + */ + public int selectCount(ProductsOptionsValuesCB cb) { + assertConditionBeanNotNull(cb); + return delegateSelectCount(cb); + } + + // =================================================================================== + // Basic Select Entity + // =================== + /** + * Select entity by condition-bean. + * + * @param cb Condition-bean. (NotNull) + * @return Selected entity. (Nullalble) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public ProductsOptionsValues selectEntity(ProductsOptionsValuesCB cb) { + assertConditionBeanNotNull(cb); + final java.util.List ls = selectList(cb); + if (ls.isEmpty()) { + return null; + } + assertRecordHasBeenSelectedAsOne(ls, cb); + return (ProductsOptionsValues)ls.get(0); + } + + /** + * Select entity by condition-bean with deleted check. + * + * @param cb Condition-bean. (NotNull) + * @return Selected entity. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public ProductsOptionsValues selectEntityWithDeletedCheck(ProductsOptionsValuesCB cb) { + assertConditionBeanNotNull(cb); + final java.util.List ls = selectList(cb); + assertRecordHasNotBeenDeleted(ls, cb); + assertRecordHasBeenSelectedAsOne(ls, cb); + return (ProductsOptionsValues)ls.get(0); + } + + /* + * Select entity with deleted check. {by primary-key} + * + * @param primaryKey + * @return Selected entity. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public ProductsOptionsValues selectByPKValueWithDeletedCheck(java.math.BigDecimal productsOptionsValuesId, java.math.BigDecimal languageId) { + ProductsOptionsValues entity = new ProductsOptionsValues(); + entity.setProductsOptionsValuesId(productsOptionsValuesId);entity.setLanguageId(languageId); + final ProductsOptionsValuesCB cb = newMyConditionBean(); + cb.acceptPrimaryKeyMapString(getDBMeta().extractPrimaryKeyMapString(entity)); + return selectEntityWithDeletedCheck(cb); + } + + // =================================================================================== + // Basic Select List + // ================= + /** + * Select list as result-bean. + * + * @param cb Condition-bean. (NotNull) + * @return Selected list-result-bean. (NotNull) + */ + public ListResultBean selectList(ProductsOptionsValuesCB cb) { + assertConditionBeanNotNull(cb); + return new ResultBeanBuilder(this).buildListResultBean(cb, delegateSelectList(cb)); + } + + /** + * Select page as result-bean. + * + * @param cb Condition-bean. (NotNull) + * @return Selected paging-result-bean. (NotNull) + */ + public PagingResultBean selectPage(final ProductsOptionsValuesCB cb) { + assertConditionBeanNotNull(cb); + return selectPage(cb, new SelectPageSimpleInvoker(this)); + } + + /** + * Select page. + * + * @param cb Condition-bean. (NotNull) + * @param invoker Select-page-invoker (NotNull) + * @return Selected paging-result-bean. (NotNull) + */ + public PagingResultBean selectPage(final ProductsOptionsValuesCB cb, SelectPageInvoker invoker) { + assertConditionBeanNotNull(cb); + final SelectPageCallback pageCallback = new SelectPageCallback() { + public PagingBean getPagingBean() { return cb; } + public int selectCountIgnoreFetchScope() { + return selectCount(cb); + } + public java.util.List selectListWithFetchScope() { + return selectList(cb); + } + }; + return invoker.invokeSelectPage(pageCallback); + } + + // =================================================================================== + // Various Select + // ============== + /** + * Select value-label list. + * + * @param cb Condition-bean. (NotNull) + * @param valueLabelSetupper Value-label-setupper. (NotNull) + * @return Value-label list. (NotNull) + */ + public java.util.List> selectValueLabelList(ProductsOptionsValuesCB cb, ValueLabelSetupper valueLabelSetupper) { + return createValueLabelList(selectList(cb), valueLabelSetupper); + } + + // =================================================================================== + // Pull Out Foreign + // ================ + + // =================================================================================== + // Basic Entity Update + // =================== + /** + * Insert. + * + * @param productsOptionsValues Entity. (NotNull) + */ + public void insert(ProductsOptionsValues productsOptionsValues) { + assertEntityNotNull(productsOptionsValues); + delegateInsert(productsOptionsValues); + } + + protected void doCreate(Entity productsOptionsValues) { + insert((ProductsOptionsValues)productsOptionsValues); + } + + /** + * Update. + *
+     * If it updates count zero, throws exception.
+     * If concurrency control of this table is valid, this update have it.
+     * 
+ * @param productsOptionsValues Entity. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public void update(ProductsOptionsValues productsOptionsValues) { + assertEntityNotNull(productsOptionsValues); + final int updatedCount = delegateUpdate(productsOptionsValues); + if (updatedCount == 0) { + throw new jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException(productsOptionsValues.toString()); + } else if (updatedCount > 1) { + String msg = "updatedCount=" + updatedCount + ": " + productsOptionsValues.toString(); + throw new jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException(msg); + } + } + + protected void doModify(Entity productsOptionsValues) { + update((ProductsOptionsValues)productsOptionsValues); + } + + /** + * Update after select. + * + * @param productsOptionsValues Entity. This must contain primary-key value at least. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + */ + public void updateAfterSelect(ProductsOptionsValues productsOptionsValues) { + assertEntityNotNullAndHasPrimaryKeyValue(productsOptionsValues); + final ProductsOptionsValuesCB cb = newMyConditionBean(); + cb.acceptPrimaryKeyMapString(getDBMeta().extractPrimaryKeyMapString(productsOptionsValues)); + final ProductsOptionsValues currentEntity = selectEntityWithDeletedCheck(cb); + mergeEntity(productsOptionsValues, currentEntity); + update(currentEntity); + } + + protected void doModifyAfterSelect(Entity productsOptionsValues) { + updateAfterSelect((ProductsOptionsValues)productsOptionsValues); + } + + /** + * Insert or update. + * {update: modified only} + * + * @param productsOptionsValues Entity. This should contain primary-key value at least(Except use identity). (NotNull) + */ + public void insertOrUpdate(ProductsOptionsValues productsOptionsValues) { + assertEntityNotNull(productsOptionsValues); + if (!productsOptionsValues.hasPrimaryKeyValue()) { + insert(productsOptionsValues); + } else { + try { + update(productsOptionsValues); + } catch (org.seasar.dao.NotSingleRowUpdatedRuntimeException e) { + insert(productsOptionsValues); + } catch (jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException e) { + insert(productsOptionsValues); + } + } + } + + protected void doCreateOrUpdateNonstrict(Entity productsOptionsValues) { + + insertOrUpdate((ProductsOptionsValues)productsOptionsValues); + + } + + /** + * Insert or update after select. + * {update: modified only} + * + * @param productsOptionsValues Entity. This should contain primary-key value at least(Except use identity). (NotNull) + */ + public void insertOrUpdateAfterSelect(ProductsOptionsValues productsOptionsValues) { + assertEntityNotNull(productsOptionsValues); + if (!productsOptionsValues.hasPrimaryKeyValue()) { + insert(productsOptionsValues); + return; + } + ProductsOptionsValues currentEntity = null; + try { + final ProductsOptionsValuesCB cb = newMyConditionBean(); + cb.acceptPrimaryKeyMapString(getDBMeta().extractPrimaryKeyMapString(productsOptionsValues)); + currentEntity = selectEntityWithDeletedCheck(cb); + } catch (jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException e) { + insert(productsOptionsValues); + return; + } + assertEntityNotNullAndHasPrimaryKeyValue(productsOptionsValues); + mergeEntity(productsOptionsValues, currentEntity); + update(currentEntity); + } + + protected void doCreateOrModifyAfterSelect(Entity entity) { + insertOrUpdateAfterSelect((ProductsOptionsValues)entity); + } + + /** + * This method implements the method that is declared at super. + * + * @param sourceEntity Source entity. (NotNull) + * @param destinationEntity Destination entity. (NotNull) + */ + protected void mergeEntity(Entity sourceEntity, Entity destinationEntity) { + assertEntityNotNull(sourceEntity); + assertEntityNotNull(destinationEntity); + final ProductsOptionsValues sourceMyEntity = (ProductsOptionsValues)sourceEntity; + final ProductsOptionsValues destinationMyEntity = (ProductsOptionsValues)destinationEntity; + destinationMyEntity.clearModifiedPropertyNames(); + final java.util.Set names = sourceMyEntity.getModifiedPropertyNames(); + + if (names.contains("productsOptionsValuesId")) { destinationMyEntity.setProductsOptionsValuesId(sourceMyEntity.getProductsOptionsValuesId()); } + if (names.contains("languageId")) { destinationMyEntity.setLanguageId(sourceMyEntity.getLanguageId()); } + if (names.contains("productsOptionsValuesName")) { destinationMyEntity.setProductsOptionsValuesName(sourceMyEntity.getProductsOptionsValuesName()); } + + } + + /** + * Delete. + * + * @param productsOptionsValues Entity. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public void delete(ProductsOptionsValues productsOptionsValues) { + assertEntityNotNull(productsOptionsValues); + final int deletedCount = delegateDelete(productsOptionsValues); + if (deletedCount == 0) { + throw new jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException(productsOptionsValues.toString()); + } else if (deletedCount > 1) { + String msg = "deletedCount=" + deletedCount + ": " + productsOptionsValues.toString(); + throw new jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException(msg); + } + } + + protected void doRemove(Entity productsOptionsValues) { + delete((ProductsOptionsValues)productsOptionsValues); + } + + /** + * Delete after select. + * + * @param productsOptionsValues Entity. This must contain primary-key value at least. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + */ + public void deleteAfterSelect(ProductsOptionsValues productsOptionsValues) { + assertEntityNotNullAndHasPrimaryKeyValue(productsOptionsValues); + final ProductsOptionsValuesCB cb = newMyConditionBean(); + cb.acceptPrimaryKeyMapString(getDBMeta().extractPrimaryKeyMapString(productsOptionsValues)); + selectEntityWithDeletedCheck(cb); + delete(productsOptionsValues); + } + + protected void doRemoveAfterSelect(Entity productsOptionsValues) { + deleteAfterSelect((ProductsOptionsValues)productsOptionsValues); + } + + // =================================================================================== + // Basic Batch Update + // ================== + /** + * Insert list. + * + * @param productsOptionsValuesList Entity-list. (NotNull & NotEmpty) + * @return Inserted count. + */ + public int insertList(java.util.List productsOptionsValuesList) { + assertListNotNullAndNotEmpty(productsOptionsValuesList); + return delegateInsertList(productsOptionsValuesList); + } + + /** + * Update list. + * + * @param productsOptionsValuesList Entity-list. (NotNull & NotEmpty) + * @return Updated count. + */ + public int updateList(java.util.List productsOptionsValuesList) { + assertListNotNullAndNotEmpty(productsOptionsValuesList); + return delegateUpdateList(productsOptionsValuesList); + } + + /** + * Delete list. + * + * @param productsOptionsValuesList Entity-list. (NotNull & NotEmpty) + * @return Deleted count. + */ + public int deleteList(java.util.List productsOptionsValuesList) { + assertListNotNullAndNotEmpty(productsOptionsValuesList); + return delegateDeleteList(productsOptionsValuesList); + } + + // =================================================================================== + // Various Insert + // ============== + + // =================================================================================== + // CBSetupper + // ========== + /** + * The interface of condition-bean setupper. + */ + public static interface CBSetupper extends ConditionBeanSetupper { + + /** + * Set up condition. + * + * @param cb Condition-bean. (NotNull) + */ + public void setup(ProductsOptionsValuesCB cb); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/bsbhv/BsProductsOptionsValuesToProductsOptionsBhv.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/bsbhv/BsProductsOptionsValuesToProductsOptionsBhv.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/bsbhv/BsProductsOptionsValuesToProductsOptionsBhv.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,696 @@ + +package jp.sf.pal.pompei.bsbhv; + +import jp.sf.pal.pompei.allcommon.*; +import jp.sf.pal.pompei.allcommon.bhv.load.LoadRefererOption; +import jp.sf.pal.pompei.allcommon.bhv.setup.ConditionBeanSetupper; +import jp.sf.pal.pompei.allcommon.bhv.setup.ValueLabelSetupper; +import jp.sf.pal.pompei.allcommon.cbean.ConditionBean; +import jp.sf.pal.pompei.allcommon.cbean.ListResultBean; +import jp.sf.pal.pompei.allcommon.cbean.PagingBean; +import jp.sf.pal.pompei.allcommon.cbean.PagingResultBean; +import jp.sf.pal.pompei.allcommon.dbmeta.DBMeta; + +import jp.sf.pal.pompei.exdao.*; +import jp.sf.pal.pompei.exentity.*; +import jp.sf.pal.pompei.bsentity.dbmeta.*; +import jp.sf.pal.pompei.cbean.*; + + + +/** + * The behavior of PRODUCTS_OPTIONS_VALUES_TO_PRODUCTS_OPTIONS. + * + *
+ * [primary-key]
+ *     PRODUCTS_OPTIONS_VALUES_TO_PRODUCTS_OPTIONS_ID
+ * 
+ * [column-property]
+ *     PRODUCTS_OPTIONS_VALUES_TO_PRODUCTS_OPTIONS_ID, PRODUCTS_OPTIONS_ID, PRODUCTS_OPTIONS_VALUES_ID
+ * 
+ * [foreign-property]
+ *     
+ * 
+ * [refferer-property]
+ *     
+ * 
+ * [sequence]
+ *     
+ * 
+ * [identity]
+ *     
+ * 
+ * [update-date]
+ *     
+ * 
+ * [version-no]
+ *     
+ * 
+ * 
+ * + * @author DBFlute(AutoGenerator) + */ +public abstract class BsProductsOptionsValuesToProductsOptionsBhv extends jp.sf.pal.pompei.allcommon.bhv.AbstractBehaviorWritable { + + // =================================================================================== + // Attribute + // ========= + /** Dao instance. */ + protected ProductsOptionsValuesToProductsOptionsDao _dao; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + public BsProductsOptionsValuesToProductsOptionsBhv() { + } + + // =================================================================================== + // Table name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + public String getTableDbName() { + return "PRODUCTS_OPTIONS_VALUES_TO_PRODUCTS_OPTIONS"; + } + + // =================================================================================== + // DBMeta + // ====== + /** + * This method implements the method that is declared at super. + * + * @return DBMeta. (NotNull) + */ + public DBMeta getDBMeta() { + return ProductsOptionsValuesToProductsOptionsDbm.getInstance(); + } + + /** + * Get my dbmeta. + * + * @return DBMeta. (NotNull) + */ + public ProductsOptionsValuesToProductsOptionsDbm getMyDBMeta() { + return ProductsOptionsValuesToProductsOptionsDbm.getInstance(); + } + + // =================================================================================== + // Dao Accessor + // ============ + /** + * Get my dao. + * + * @return My dao. + */ + public ProductsOptionsValuesToProductsOptionsDao getMyDao() { + return _dao; + } + + /** + * Set my dao. + * + * @param dao My dao. (NotNull) + */ + public void setMyDao(ProductsOptionsValuesToProductsOptionsDao dao) { + assertObjectNotNull("dao", dao); + _dao = dao; + } + + /** + * This method implements the method that is declared at super. + * + * @return Dao-readable. (NotNull) + */ + public DaoReadable getDaoReadable() { + return getMyDao(); + } + + /** + * This method implements the method that is declared at super. + * + * @return Dao-writable. (NotNull) + */ + public DaoWritable getDaoWritable() { + return getMyDao(); + } + + // =================================================================================== + // New Instance + // ============ + /** + * New entity. + * + * @return Entity. (NotNull) + */ + public Entity newEntity() { + return newMyEntity(); + } + + /** + * New condition-bean. + * + * @return Condition-bean. (NotNull) + */ + public ConditionBean newConditionBean() { + return newMyConditionBean(); + } + + /** + * New my entity. + * + * @return My entity. (NotNull) + */ + public ProductsOptionsValuesToProductsOptions newMyEntity() { + return new ProductsOptionsValuesToProductsOptions(); + } + + /** + * New my condition-bean. + * + * @return My condition-bean. (NotNull) + */ + public ProductsOptionsValuesToProductsOptionsCB newMyConditionBean() { + return new ProductsOptionsValuesToProductsOptionsCB(); + } + + // =================================================================================== + // Delegate Method + // =============== + // ----------------------------------------------------- + // Select + // ------ + /** + * Get count as all. (Delegate-Method) + * + * @return All count. (NotNull) + */ + public int delegateGetCountAll() { + return getMyDao().getCountAll(); + } + + /** + * Get list as all. (Delegate-Method) + * + * @return All list. (NotNull) + */ + public java.util.List delegateGetListAll() { + return getMyDao().getListAll(); + } + + // + // Get entity. (Delegate-Method) + // + // @param Primary-keys (NotNull) + // @return Entity. (NotNull) + // + public ProductsOptionsValuesToProductsOptions delegateGetEntity(java.math.BigDecimal productsOptionsValuesToProductsOptionsId) { + return getMyDao().getEntity(productsOptionsValuesToProductsOptionsId); + } + + /** + * Select count by condition-bean. (Delegate-Method) + * + * @param cb Condition-bean. (NotNull) + * @return Selected count. (NotNull) + */ + public int delegateSelectCount(ProductsOptionsValuesToProductsOptionsCB cb) { + assertConditionBeanNotNull(cb); + return getMyDao().selectCount(cb); + } + + /** + * Select entity by condition-bean. (Delegate-Method) + * + * @param cb Condition-bean. (NotNull) + * @return Selected entity. If the select result is zero, it returns null. (Nullable) + */ + public ProductsOptionsValuesToProductsOptions delegateSelectEntity(ProductsOptionsValuesToProductsOptionsCB cb) { + assertConditionBeanNotNull(cb); + return getMyDao().selectEntity(cb); + } + + /** + * Select list by condition-bean. (Delegate-Method) + * + * @param cb Condition-bean. (NotNull) + * @return Selected list. If the select result is zero, it returns empty list. (NotNull) + */ + public java.util.List delegateSelectList(ProductsOptionsValuesToProductsOptionsCB cb) { + assertConditionBeanNotNull(cb); + return getMyDao().selectList(cb); + } + + + // ----------------------------------------------------- + // Update + // ------ + /** + * Insert one entity. (Delegate-Method) + * + * @param entity Entity. (NotNull) + * @return Inserted count. + */ + public int delegateInsert(ProductsOptionsValuesToProductsOptions entity) { + assertEntityNotNull(entity);// If this table use identity, the entity does not have primary-key. + filterEntityOfInsert(entity); + assertEntityOfInsert(entity); + return getMyDao().insert(entity); + } + + /** + * Update one entity. (Delegate-Method) + * {modified only} + * + * @param entity Entity. (NotNull) + * @return Updated count. + */ + public int delegateUpdate(ProductsOptionsValuesToProductsOptions entity) { + assertEntityNotNullAndHasPrimaryKeyValue(entity); + filterEntityOfUpdate(entity); + assertEntityOfUpdate(entity); + return getMyDao().updateModifiedOnly(entity); + } + + /** + * Delete one entity. (Delegate-Method) + * + * @param entity Entity. (NotNull) + * @return Deleted count. + */ + public int delegateDelete(ProductsOptionsValuesToProductsOptions entity) { + assertEntityNotNullAndHasPrimaryKeyValue(entity); + filterEntityOfDelete(entity); + assertEntityOfDelete(entity); + return getMyDao().delete(entity); + } + + /** + * Insert several entities. (Delegate-Method) + * + * @param entityList Entity-list. (NotNull & NotEmpty) + * @return Inserted count. + */ + public int delegateInsertList(java.util.List entityList) { + assertListNotNullAndNotEmpty(entityList); + return getMyDao().insertList(entityList); + } + + /** + * Update several entities. (Delegate-Method) + * + * @param entityList Entity-list. (NotNull & NotEmpty) + * @return Updated count. + */ + public int delegateUpdateList(java.util.List entityList) { + assertListNotNullAndNotEmpty(entityList); + return getMyDao().updateList(entityList); + } + + /** + * Delete several entities. (Delegate-Method) + * + * @param entityList Entity-list. (NotNull & NotEmpty) + * @return Deleted count. + */ + public int delegateDeleteList(java.util.List entityList) { + assertListNotNullAndNotEmpty(entityList); + return getMyDao().deleteList(entityList); + } + + // =================================================================================== + // Basic Select Count + // ================== + /** + * Select count by condition-bean. + *
+     * If the argument 'condition-bean' is effective about fetch-scope,
+     * this method invoke select count ignoring the fetch-scope.
+     * 
+ * @param cb Condition-bean. This condition-bean should not be set up about fetch-scope. (NotNull) + * @return Selected count. + */ + public int selectCount(ProductsOptionsValuesToProductsOptionsCB cb) { + assertConditionBeanNotNull(cb); + return delegateSelectCount(cb); + } + + // =================================================================================== + // Basic Select Entity + // =================== + /** + * Select entity by condition-bean. + * + * @param cb Condition-bean. (NotNull) + * @return Selected entity. (Nullalble) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public ProductsOptionsValuesToProductsOptions selectEntity(ProductsOptionsValuesToProductsOptionsCB cb) { + assertConditionBeanNotNull(cb); + final java.util.List ls = selectList(cb); + if (ls.isEmpty()) { + return null; + } + assertRecordHasBeenSelectedAsOne(ls, cb); + return (ProductsOptionsValuesToProductsOptions)ls.get(0); + } + + /** + * Select entity by condition-bean with deleted check. + * + * @param cb Condition-bean. (NotNull) + * @return Selected entity. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public ProductsOptionsValuesToProductsOptions selectEntityWithDeletedCheck(ProductsOptionsValuesToProductsOptionsCB cb) { + assertConditionBeanNotNull(cb); + final java.util.List ls = selectList(cb); + assertRecordHasNotBeenDeleted(ls, cb); + assertRecordHasBeenSelectedAsOne(ls, cb); + return (ProductsOptionsValuesToProductsOptions)ls.get(0); + } + + /* + * Select entity with deleted check. {by primary-key} + * + * @param primaryKey + * @return Selected entity. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public ProductsOptionsValuesToProductsOptions selectByPKValueWithDeletedCheck(java.math.BigDecimal productsOptionsValuesToProductsOptionsId) { + ProductsOptionsValuesToProductsOptions entity = new ProductsOptionsValuesToProductsOptions(); + entity.setProductsOptionsValuesToProductsOptionsId(productsOptionsValuesToProductsOptionsId); + final ProductsOptionsValuesToProductsOptionsCB cb = newMyConditionBean(); + cb.acceptPrimaryKeyMapString(getDBMeta().extractPrimaryKeyMapString(entity)); + return selectEntityWithDeletedCheck(cb); + } + + // =================================================================================== + // Basic Select List + // ================= + /** + * Select list as result-bean. + * + * @param cb Condition-bean. (NotNull) + * @return Selected list-result-bean. (NotNull) + */ + public ListResultBean selectList(ProductsOptionsValuesToProductsOptionsCB cb) { + assertConditionBeanNotNull(cb); + return new ResultBeanBuilder(this).buildListResultBean(cb, delegateSelectList(cb)); + } + + /** + * Select page as result-bean. + * + * @param cb Condition-bean. (NotNull) + * @return Selected paging-result-bean. (NotNull) + */ + public PagingResultBean selectPage(final ProductsOptionsValuesToProductsOptionsCB cb) { + assertConditionBeanNotNull(cb); + return selectPage(cb, new SelectPageSimpleInvoker(this)); + } + + /** + * Select page. + * + * @param cb Condition-bean. (NotNull) + * @param invoker Select-page-invoker (NotNull) + * @return Selected paging-result-bean. (NotNull) + */ + public PagingResultBean selectPage(final ProductsOptionsValuesToProductsOptionsCB cb, SelectPageInvoker invoker) { + assertConditionBeanNotNull(cb); + final SelectPageCallback pageCallback = new SelectPageCallback() { + public PagingBean getPagingBean() { return cb; } + public int selectCountIgnoreFetchScope() { + return selectCount(cb); + } + public java.util.List selectListWithFetchScope() { + return selectList(cb); + } + }; + return invoker.invokeSelectPage(pageCallback); + } + + // =================================================================================== + // Various Select + // ============== + /** + * Select value-label list. + * + * @param cb Condition-bean. (NotNull) + * @param valueLabelSetupper Value-label-setupper. (NotNull) + * @return Value-label list. (NotNull) + */ + public java.util.List> selectValueLabelList(ProductsOptionsValuesToProductsOptionsCB cb, ValueLabelSetupper valueLabelSetupper) { + return createValueLabelList(selectList(cb), valueLabelSetupper); + } + + // =================================================================================== + // Load Referer + // ============ + + // =================================================================================== + // Pull Out Foreign + // ================ + + // =================================================================================== + // Basic Entity Update + // =================== + /** + * Insert. + * + * @param productsOptionsValuesToProductsOptions Entity. (NotNull) + */ + public void insert(ProductsOptionsValuesToProductsOptions productsOptionsValuesToProductsOptions) { + assertEntityNotNull(productsOptionsValuesToProductsOptions); + delegateInsert(productsOptionsValuesToProductsOptions); + } + + protected void doCreate(Entity productsOptionsValuesToProductsOptions) { + insert((ProductsOptionsValuesToProductsOptions)productsOptionsValuesToProductsOptions); + } + + /** + * Update. + *
+     * If it updates count zero, throws exception.
+     * If concurrency control of this table is valid, this update have it.
+     * 
+ * @param productsOptionsValuesToProductsOptions Entity. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public void update(ProductsOptionsValuesToProductsOptions productsOptionsValuesToProductsOptions) { + assertEntityNotNull(productsOptionsValuesToProductsOptions); + final int updatedCount = delegateUpdate(productsOptionsValuesToProductsOptions); + if (updatedCount == 0) { + throw new jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException(productsOptionsValuesToProductsOptions.toString()); + } else if (updatedCount > 1) { + String msg = "updatedCount=" + updatedCount + ": " + productsOptionsValuesToProductsOptions.toString(); + throw new jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException(msg); + } + } + + protected void doModify(Entity productsOptionsValuesToProductsOptions) { + update((ProductsOptionsValuesToProductsOptions)productsOptionsValuesToProductsOptions); + } + + /** + * Update after select. + * + * @param productsOptionsValuesToProductsOptions Entity. This must contain primary-key value at least. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + */ + public void updateAfterSelect(ProductsOptionsValuesToProductsOptions productsOptionsValuesToProductsOptions) { + assertEntityNotNullAndHasPrimaryKeyValue(productsOptionsValuesToProductsOptions); + final ProductsOptionsValuesToProductsOptionsCB cb = newMyConditionBean(); + cb.acceptPrimaryKeyMapString(getDBMeta().extractPrimaryKeyMapString(productsOptionsValuesToProductsOptions)); + final ProductsOptionsValuesToProductsOptions currentEntity = selectEntityWithDeletedCheck(cb); + mergeEntity(productsOptionsValuesToProductsOptions, currentEntity); + update(currentEntity); + } + + protected void doModifyAfterSelect(Entity productsOptionsValuesToProductsOptions) { + updateAfterSelect((ProductsOptionsValuesToProductsOptions)productsOptionsValuesToProductsOptions); + } + + /** + * Insert or update. + * {update: modified only} + * + * @param productsOptionsValuesToProductsOptions Entity. This should contain primary-key value at least(Except use identity). (NotNull) + */ + public void insertOrUpdate(ProductsOptionsValuesToProductsOptions productsOptionsValuesToProductsOptions) { + assertEntityNotNull(productsOptionsValuesToProductsOptions); + if (!productsOptionsValuesToProductsOptions.hasPrimaryKeyValue()) { + insert(productsOptionsValuesToProductsOptions); + } else { + try { + update(productsOptionsValuesToProductsOptions); + } catch (org.seasar.dao.NotSingleRowUpdatedRuntimeException e) { + insert(productsOptionsValuesToProductsOptions); + } catch (jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException e) { + insert(productsOptionsValuesToProductsOptions); + } + } + } + + protected void doCreateOrUpdateNonstrict(Entity productsOptionsValuesToProductsOptions) { + + insertOrUpdate((ProductsOptionsValuesToProductsOptions)productsOptionsValuesToProductsOptions); + + } + + /** + * Insert or update after select. + * {update: modified only} + * + * @param productsOptionsValuesToProductsOptions Entity. This should contain primary-key value at least(Except use identity). (NotNull) + */ + public void insertOrUpdateAfterSelect(ProductsOptionsValuesToProductsOptions productsOptionsValuesToProductsOptions) { + assertEntityNotNull(productsOptionsValuesToProductsOptions); + if (!productsOptionsValuesToProductsOptions.hasPrimaryKeyValue()) { + insert(productsOptionsValuesToProductsOptions); + return; + } + ProductsOptionsValuesToProductsOptions currentEntity = null; + try { + final ProductsOptionsValuesToProductsOptionsCB cb = newMyConditionBean(); + cb.acceptPrimaryKeyMapString(getDBMeta().extractPrimaryKeyMapString(productsOptionsValuesToProductsOptions)); + currentEntity = selectEntityWithDeletedCheck(cb); + } catch (jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException e) { + insert(productsOptionsValuesToProductsOptions); + return; + } + assertEntityNotNullAndHasPrimaryKeyValue(productsOptionsValuesToProductsOptions); + mergeEntity(productsOptionsValuesToProductsOptions, currentEntity); + update(currentEntity); + } + + protected void doCreateOrModifyAfterSelect(Entity entity) { + insertOrUpdateAfterSelect((ProductsOptionsValuesToProductsOptions)entity); + } + + /** + * This method implements the method that is declared at super. + * + * @param sourceEntity Source entity. (NotNull) + * @param destinationEntity Destination entity. (NotNull) + */ + protected void mergeEntity(Entity sourceEntity, Entity destinationEntity) { + assertEntityNotNull(sourceEntity); + assertEntityNotNull(destinationEntity); + final ProductsOptionsValuesToProductsOptions sourceMyEntity = (ProductsOptionsValuesToProductsOptions)sourceEntity; + final ProductsOptionsValuesToProductsOptions destinationMyEntity = (ProductsOptionsValuesToProductsOptions)destinationEntity; + destinationMyEntity.clearModifiedPropertyNames(); + final java.util.Set names = sourceMyEntity.getModifiedPropertyNames(); + + if (names.contains("productsOptionsValuesToProductsOptionsId")) { destinationMyEntity.setProductsOptionsValuesToProductsOptionsId(sourceMyEntity.getProductsOptionsValuesToProductsOptionsId()); } + if (names.contains("productsOptionsId")) { destinationMyEntity.setProductsOptionsId(sourceMyEntity.getProductsOptionsId()); } + if (names.contains("productsOptionsValuesId")) { destinationMyEntity.setProductsOptionsValuesId(sourceMyEntity.getProductsOptionsValuesId()); } + + } + + /** + * Delete. + * + * @param productsOptionsValuesToProductsOptions Entity. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public void delete(ProductsOptionsValuesToProductsOptions productsOptionsValuesToProductsOptions) { + assertEntityNotNull(productsOptionsValuesToProductsOptions); + final int deletedCount = delegateDelete(productsOptionsValuesToProductsOptions); + if (deletedCount == 0) { + throw new jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException(productsOptionsValuesToProductsOptions.toString()); + } else if (deletedCount > 1) { + String msg = "deletedCount=" + deletedCount + ": " + productsOptionsValuesToProductsOptions.toString(); + throw new jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException(msg); + } + } + + protected void doRemove(Entity productsOptionsValuesToProductsOptions) { + delete((ProductsOptionsValuesToProductsOptions)productsOptionsValuesToProductsOptions); + } + + /** + * Delete after select. + * + * @param productsOptionsValuesToProductsOptions Entity. This must contain primary-key value at least. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + */ + public void deleteAfterSelect(ProductsOptionsValuesToProductsOptions productsOptionsValuesToProductsOptions) { + assertEntityNotNullAndHasPrimaryKeyValue(productsOptionsValuesToProductsOptions); + final ProductsOptionsValuesToProductsOptionsCB cb = newMyConditionBean(); + cb.acceptPrimaryKeyMapString(getDBMeta().extractPrimaryKeyMapString(productsOptionsValuesToProductsOptions)); + selectEntityWithDeletedCheck(cb); + delete(productsOptionsValuesToProductsOptions); + } + + protected void doRemoveAfterSelect(Entity productsOptionsValuesToProductsOptions) { + deleteAfterSelect((ProductsOptionsValuesToProductsOptions)productsOptionsValuesToProductsOptions); + } + + // =================================================================================== + // Basic Batch Update + // ================== + /** + * Insert list. + * + * @param productsOptionsValuesToProductsOptionsList Entity-list. (NotNull & NotEmpty) + * @return Inserted count. + */ + public int insertList(java.util.List productsOptionsValuesToProductsOptionsList) { + assertListNotNullAndNotEmpty(productsOptionsValuesToProductsOptionsList); + return delegateInsertList(productsOptionsValuesToProductsOptionsList); + } + + /** + * Update list. + * + * @param productsOptionsValuesToProductsOptionsList Entity-list. (NotNull & NotEmpty) + * @return Updated count. + */ + public int updateList(java.util.List productsOptionsValuesToProductsOptionsList) { + assertListNotNullAndNotEmpty(productsOptionsValuesToProductsOptionsList); + return delegateUpdateList(productsOptionsValuesToProductsOptionsList); + } + + /** + * Delete list. + * + * @param productsOptionsValuesToProductsOptionsList Entity-list. (NotNull & NotEmpty) + * @return Deleted count. + */ + public int deleteList(java.util.List productsOptionsValuesToProductsOptionsList) { + assertListNotNullAndNotEmpty(productsOptionsValuesToProductsOptionsList); + return delegateDeleteList(productsOptionsValuesToProductsOptionsList); + } + + // =================================================================================== + // Various Insert + // ============== + + // =================================================================================== + // CBSetupper + // ========== + /** + * The interface of condition-bean setupper. + */ + public static interface CBSetupper extends ConditionBeanSetupper { + + /** + * Set up condition. + * + * @param cb Condition-bean. (NotNull) + */ + public void setup(ProductsOptionsValuesToProductsOptionsCB cb); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/bsbhv/BsProductsToCategoriesBhv.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/bsbhv/BsProductsToCategoriesBhv.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/bsbhv/BsProductsToCategoriesBhv.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,691 @@ + +package jp.sf.pal.pompei.bsbhv; + +import jp.sf.pal.pompei.allcommon.*; +import jp.sf.pal.pompei.allcommon.bhv.load.LoadRefererOption; +import jp.sf.pal.pompei.allcommon.bhv.setup.ConditionBeanSetupper; +import jp.sf.pal.pompei.allcommon.bhv.setup.ValueLabelSetupper; +import jp.sf.pal.pompei.allcommon.cbean.ConditionBean; +import jp.sf.pal.pompei.allcommon.cbean.ListResultBean; +import jp.sf.pal.pompei.allcommon.cbean.PagingBean; +import jp.sf.pal.pompei.allcommon.cbean.PagingResultBean; +import jp.sf.pal.pompei.allcommon.dbmeta.DBMeta; + +import jp.sf.pal.pompei.exdao.*; +import jp.sf.pal.pompei.exentity.*; +import jp.sf.pal.pompei.bsentity.dbmeta.*; +import jp.sf.pal.pompei.cbean.*; + + + +/** + * The behavior of PRODUCTS_TO_CATEGORIES. + * + *
+ * [primary-key]
+ *     PRODUCTS_ID, CATEGORIES_ID
+ * 
+ * [column-property]
+ *     PRODUCTS_ID, CATEGORIES_ID
+ * 
+ * [foreign-property]
+ *     
+ * 
+ * [refferer-property]
+ *     
+ * 
+ * [sequence]
+ *     
+ * 
+ * [identity]
+ *     
+ * 
+ * [update-date]
+ *     
+ * 
+ * [version-no]
+ *     
+ * 
+ * 
+ * + * @author DBFlute(AutoGenerator) + */ +public abstract class BsProductsToCategoriesBhv extends jp.sf.pal.pompei.allcommon.bhv.AbstractBehaviorWritable { + + // =================================================================================== + // Attribute + // ========= + /** Dao instance. */ + protected ProductsToCategoriesDao _dao; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + public BsProductsToCategoriesBhv() { + } + + // =================================================================================== + // Table name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + public String getTableDbName() { + return "PRODUCTS_TO_CATEGORIES"; + } + + // =================================================================================== + // DBMeta + // ====== + /** + * This method implements the method that is declared at super. + * + * @return DBMeta. (NotNull) + */ + public DBMeta getDBMeta() { + return ProductsToCategoriesDbm.getInstance(); + } + + /** + * Get my dbmeta. + * + * @return DBMeta. (NotNull) + */ + public ProductsToCategoriesDbm getMyDBMeta() { + return ProductsToCategoriesDbm.getInstance(); + } + + // =================================================================================== + // Dao Accessor + // ============ + /** + * Get my dao. + * + * @return My dao. + */ + public ProductsToCategoriesDao getMyDao() { + return _dao; + } + + /** + * Set my dao. + * + * @param dao My dao. (NotNull) + */ + public void setMyDao(ProductsToCategoriesDao dao) { + assertObjectNotNull("dao", dao); + _dao = dao; + } + + /** + * This method implements the method that is declared at super. + * + * @return Dao-readable. (NotNull) + */ + public DaoReadable getDaoReadable() { + return getMyDao(); + } + + /** + * This method implements the method that is declared at super. + * + * @return Dao-writable. (NotNull) + */ + public DaoWritable getDaoWritable() { + return getMyDao(); + } + + // =================================================================================== + // New Instance + // ============ + /** + * New entity. + * + * @return Entity. (NotNull) + */ + public Entity newEntity() { + return newMyEntity(); + } + + /** + * New condition-bean. + * + * @return Condition-bean. (NotNull) + */ + public ConditionBean newConditionBean() { + return newMyConditionBean(); + } + + /** + * New my entity. + * + * @return My entity. (NotNull) + */ + public ProductsToCategories newMyEntity() { + return new ProductsToCategories(); + } + + /** + * New my condition-bean. + * + * @return My condition-bean. (NotNull) + */ + public ProductsToCategoriesCB newMyConditionBean() { + return new ProductsToCategoriesCB(); + } + + // =================================================================================== + // Delegate Method + // =============== + // ----------------------------------------------------- + // Select + // ------ + /** + * Get count as all. (Delegate-Method) + * + * @return All count. (NotNull) + */ + public int delegateGetCountAll() { + return getMyDao().getCountAll(); + } + + /** + * Get list as all. (Delegate-Method) + * + * @return All list. (NotNull) + */ + public java.util.List delegateGetListAll() { + return getMyDao().getListAll(); + } + + // + // Get entity. (Delegate-Method) + // + // @param Primary-keys (NotNull) + // @return Entity. (NotNull) + // + public ProductsToCategories delegateGetEntity(java.math.BigDecimal productsId, java.math.BigDecimal categoriesId) { + return getMyDao().getEntity(productsId, categoriesId); + } + + /** + * Select count by condition-bean. (Delegate-Method) + * + * @param cb Condition-bean. (NotNull) + * @return Selected count. (NotNull) + */ + public int delegateSelectCount(ProductsToCategoriesCB cb) { + assertConditionBeanNotNull(cb); + return getMyDao().selectCount(cb); + } + + /** + * Select entity by condition-bean. (Delegate-Method) + * + * @param cb Condition-bean. (NotNull) + * @return Selected entity. If the select result is zero, it returns null. (Nullable) + */ + public ProductsToCategories delegateSelectEntity(ProductsToCategoriesCB cb) { + assertConditionBeanNotNull(cb); + return getMyDao().selectEntity(cb); + } + + /** + * Select list by condition-bean. (Delegate-Method) + * + * @param cb Condition-bean. (NotNull) + * @return Selected list. If the select result is zero, it returns empty list. (NotNull) + */ + public java.util.List delegateSelectList(ProductsToCategoriesCB cb) { + assertConditionBeanNotNull(cb); + return getMyDao().selectList(cb); + } + + + // ----------------------------------------------------- + // Update + // ------ + /** + * Insert one entity. (Delegate-Method) + * + * @param entity Entity. (NotNull) + * @return Inserted count. + */ + public int delegateInsert(ProductsToCategories entity) { + assertEntityNotNull(entity);// If this table use identity, the entity does not have primary-key. + filterEntityOfInsert(entity); + assertEntityOfInsert(entity); + return getMyDao().insert(entity); + } + + /** + * Update one entity. (Delegate-Method) + * {modified only} + * + * @param entity Entity. (NotNull) + * @return Updated count. + */ + public int delegateUpdate(ProductsToCategories entity) { + assertEntityNotNullAndHasPrimaryKeyValue(entity); + filterEntityOfUpdate(entity); + assertEntityOfUpdate(entity); + return getMyDao().updateModifiedOnly(entity); + } + + /** + * Delete one entity. (Delegate-Method) + * + * @param entity Entity. (NotNull) + * @return Deleted count. + */ + public int delegateDelete(ProductsToCategories entity) { + assertEntityNotNullAndHasPrimaryKeyValue(entity); + filterEntityOfDelete(entity); + assertEntityOfDelete(entity); + return getMyDao().delete(entity); + } + + /** + * Insert several entities. (Delegate-Method) + * + * @param entityList Entity-list. (NotNull & NotEmpty) + * @return Inserted count. + */ + public int delegateInsertList(java.util.List entityList) { + assertListNotNullAndNotEmpty(entityList); + return getMyDao().insertList(entityList); + } + + /** + * Update several entities. (Delegate-Method) + * + * @param entityList Entity-list. (NotNull & NotEmpty) + * @return Updated count. + */ + public int delegateUpdateList(java.util.List entityList) { + assertListNotNullAndNotEmpty(entityList); + return getMyDao().updateList(entityList); + } + + /** + * Delete several entities. (Delegate-Method) + * + * @param entityList Entity-list. (NotNull & NotEmpty) + * @return Deleted count. + */ + public int delegateDeleteList(java.util.List entityList) { + assertListNotNullAndNotEmpty(entityList); + return getMyDao().deleteList(entityList); + } + + // =================================================================================== + // Basic Select Count + // ================== + /** + * Select count by condition-bean. + *
+     * If the argument 'condition-bean' is effective about fetch-scope,
+     * this method invoke select count ignoring the fetch-scope.
+     * 
+ * @param cb Condition-bean. This condition-bean should not be set up about fetch-scope. (NotNull) + * @return Selected count. + */ + public int selectCount(ProductsToCategoriesCB cb) { + assertConditionBeanNotNull(cb); + return delegateSelectCount(cb); + } + + // =================================================================================== + // Basic Select Entity + // =================== + /** + * Select entity by condition-bean. + * + * @param cb Condition-bean. (NotNull) + * @return Selected entity. (Nullalble) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public ProductsToCategories selectEntity(ProductsToCategoriesCB cb) { + assertConditionBeanNotNull(cb); + final java.util.List ls = selectList(cb); + if (ls.isEmpty()) { + return null; + } + assertRecordHasBeenSelectedAsOne(ls, cb); + return (ProductsToCategories)ls.get(0); + } + + /** + * Select entity by condition-bean with deleted check. + * + * @param cb Condition-bean. (NotNull) + * @return Selected entity. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public ProductsToCategories selectEntityWithDeletedCheck(ProductsToCategoriesCB cb) { + assertConditionBeanNotNull(cb); + final java.util.List ls = selectList(cb); + assertRecordHasNotBeenDeleted(ls, cb); + assertRecordHasBeenSelectedAsOne(ls, cb); + return (ProductsToCategories)ls.get(0); + } + + /* + * Select entity with deleted check. {by primary-key} + * + * @param primaryKey + * @return Selected entity. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public ProductsToCategories selectByPKValueWithDeletedCheck(java.math.BigDecimal productsId, java.math.BigDecimal categoriesId) { + ProductsToCategories entity = new ProductsToCategories(); + entity.setProductsId(productsId);entity.setCategoriesId(categoriesId); + final ProductsToCategoriesCB cb = newMyConditionBean(); + cb.acceptPrimaryKeyMapString(getDBMeta().extractPrimaryKeyMapString(entity)); + return selectEntityWithDeletedCheck(cb); + } + + // =================================================================================== + // Basic Select List + // ================= + /** + * Select list as result-bean. + * + * @param cb Condition-bean. (NotNull) + * @return Selected list-result-bean. (NotNull) + */ + public ListResultBean selectList(ProductsToCategoriesCB cb) { + assertConditionBeanNotNull(cb); + return new ResultBeanBuilder(this).buildListResultBean(cb, delegateSelectList(cb)); + } + + /** + * Select page as result-bean. + * + * @param cb Condition-bean. (NotNull) + * @return Selected paging-result-bean. (NotNull) + */ + public PagingResultBean selectPage(final ProductsToCategoriesCB cb) { + assertConditionBeanNotNull(cb); + return selectPage(cb, new SelectPageSimpleInvoker(this)); + } + + /** + * Select page. + * + * @param cb Condition-bean. (NotNull) + * @param invoker Select-page-invoker (NotNull) + * @return Selected paging-result-bean. (NotNull) + */ + public PagingResultBean selectPage(final ProductsToCategoriesCB cb, SelectPageInvoker invoker) { + assertConditionBeanNotNull(cb); + final SelectPageCallback pageCallback = new SelectPageCallback() { + public PagingBean getPagingBean() { return cb; } + public int selectCountIgnoreFetchScope() { + return selectCount(cb); + } + public java.util.List selectListWithFetchScope() { + return selectList(cb); + } + }; + return invoker.invokeSelectPage(pageCallback); + } + + // =================================================================================== + // Various Select + // ============== + /** + * Select value-label list. + * + * @param cb Condition-bean. (NotNull) + * @param valueLabelSetupper Value-label-setupper. (NotNull) + * @return Value-label list. (NotNull) + */ + public java.util.List> selectValueLabelList(ProductsToCategoriesCB cb, ValueLabelSetupper valueLabelSetupper) { + return createValueLabelList(selectList(cb), valueLabelSetupper); + } + + // =================================================================================== + // Pull Out Foreign + // ================ + + // =================================================================================== + // Basic Entity Update + // =================== + /** + * Insert. + * + * @param productsToCategories Entity. (NotNull) + */ + public void insert(ProductsToCategories productsToCategories) { + assertEntityNotNull(productsToCategories); + delegateInsert(productsToCategories); + } + + protected void doCreate(Entity productsToCategories) { + insert((ProductsToCategories)productsToCategories); + } + + /** + * Update. + *
+     * If it updates count zero, throws exception.
+     * If concurrency control of this table is valid, this update have it.
+     * 
+ * @param productsToCategories Entity. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public void update(ProductsToCategories productsToCategories) { + assertEntityNotNull(productsToCategories); + final int updatedCount = delegateUpdate(productsToCategories); + if (updatedCount == 0) { + throw new jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException(productsToCategories.toString()); + } else if (updatedCount > 1) { + String msg = "updatedCount=" + updatedCount + ": " + productsToCategories.toString(); + throw new jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException(msg); + } + } + + protected void doModify(Entity productsToCategories) { + update((ProductsToCategories)productsToCategories); + } + + /** + * Update after select. + * + * @param productsToCategories Entity. This must contain primary-key value at least. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + */ + public void updateAfterSelect(ProductsToCategories productsToCategories) { + assertEntityNotNullAndHasPrimaryKeyValue(productsToCategories); + final ProductsToCategoriesCB cb = newMyConditionBean(); + cb.acceptPrimaryKeyMapString(getDBMeta().extractPrimaryKeyMapString(productsToCategories)); + final ProductsToCategories currentEntity = selectEntityWithDeletedCheck(cb); + mergeEntity(productsToCategories, currentEntity); + update(currentEntity); + } + + protected void doModifyAfterSelect(Entity productsToCategories) { + updateAfterSelect((ProductsToCategories)productsToCategories); + } + + /** + * Insert or update. + * {update: modified only} + * + * @param productsToCategories Entity. This should contain primary-key value at least(Except use identity). (NotNull) + */ + public void insertOrUpdate(ProductsToCategories productsToCategories) { + assertEntityNotNull(productsToCategories); + if (!productsToCategories.hasPrimaryKeyValue()) { + insert(productsToCategories); + } else { + try { + update(productsToCategories); + } catch (org.seasar.dao.NotSingleRowUpdatedRuntimeException e) { + insert(productsToCategories); + } catch (jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException e) { + insert(productsToCategories); + } + } + } + + protected void doCreateOrUpdateNonstrict(Entity productsToCategories) { + + insertOrUpdate((ProductsToCategories)productsToCategories); + + } + + /** + * Insert or update after select. + * {update: modified only} + * + * @param productsToCategories Entity. This should contain primary-key value at least(Except use identity). (NotNull) + */ + public void insertOrUpdateAfterSelect(ProductsToCategories productsToCategories) { + assertEntityNotNull(productsToCategories); + if (!productsToCategories.hasPrimaryKeyValue()) { + insert(productsToCategories); + return; + } + ProductsToCategories currentEntity = null; + try { + final ProductsToCategoriesCB cb = newMyConditionBean(); + cb.acceptPrimaryKeyMapString(getDBMeta().extractPrimaryKeyMapString(productsToCategories)); + currentEntity = selectEntityWithDeletedCheck(cb); + } catch (jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException e) { + insert(productsToCategories); + return; + } + assertEntityNotNullAndHasPrimaryKeyValue(productsToCategories); + mergeEntity(productsToCategories, currentEntity); + update(currentEntity); + } + + protected void doCreateOrModifyAfterSelect(Entity entity) { + insertOrUpdateAfterSelect((ProductsToCategories)entity); + } + + /** + * This method implements the method that is declared at super. + * + * @param sourceEntity Source entity. (NotNull) + * @param destinationEntity Destination entity. (NotNull) + */ + protected void mergeEntity(Entity sourceEntity, Entity destinationEntity) { + assertEntityNotNull(sourceEntity); + assertEntityNotNull(destinationEntity); + final ProductsToCategories sourceMyEntity = (ProductsToCategories)sourceEntity; + final ProductsToCategories destinationMyEntity = (ProductsToCategories)destinationEntity; + destinationMyEntity.clearModifiedPropertyNames(); + final java.util.Set names = sourceMyEntity.getModifiedPropertyNames(); + + if (names.contains("productsId")) { destinationMyEntity.setProductsId(sourceMyEntity.getProductsId()); } + if (names.contains("categoriesId")) { destinationMyEntity.setCategoriesId(sourceMyEntity.getCategoriesId()); } + + } + + /** + * Delete. + * + * @param productsToCategories Entity. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public void delete(ProductsToCategories productsToCategories) { + assertEntityNotNull(productsToCategories); + final int deletedCount = delegateDelete(productsToCategories); + if (deletedCount == 0) { + throw new jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException(productsToCategories.toString()); + } else if (deletedCount > 1) { + String msg = "deletedCount=" + deletedCount + ": " + productsToCategories.toString(); + throw new jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException(msg); + } + } + + protected void doRemove(Entity productsToCategories) { + delete((ProductsToCategories)productsToCategories); + } + + /** + * Delete after select. + * + * @param productsToCategories Entity. This must contain primary-key value at least. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + */ + public void deleteAfterSelect(ProductsToCategories productsToCategories) { + assertEntityNotNullAndHasPrimaryKeyValue(productsToCategories); + final ProductsToCategoriesCB cb = newMyConditionBean(); + cb.acceptPrimaryKeyMapString(getDBMeta().extractPrimaryKeyMapString(productsToCategories)); + selectEntityWithDeletedCheck(cb); + delete(productsToCategories); + } + + protected void doRemoveAfterSelect(Entity productsToCategories) { + deleteAfterSelect((ProductsToCategories)productsToCategories); + } + + // =================================================================================== + // Basic Batch Update + // ================== + /** + * Insert list. + * + * @param productsToCategoriesList Entity-list. (NotNull & NotEmpty) + * @return Inserted count. + */ + public int insertList(java.util.List productsToCategoriesList) { + assertListNotNullAndNotEmpty(productsToCategoriesList); + return delegateInsertList(productsToCategoriesList); + } + + /** + * Update list. + * + * @param productsToCategoriesList Entity-list. (NotNull & NotEmpty) + * @return Updated count. + */ + public int updateList(java.util.List productsToCategoriesList) { + assertListNotNullAndNotEmpty(productsToCategoriesList); + return delegateUpdateList(productsToCategoriesList); + } + + /** + * Delete list. + * + * @param productsToCategoriesList Entity-list. (NotNull & NotEmpty) + * @return Deleted count. + */ + public int deleteList(java.util.List productsToCategoriesList) { + assertListNotNullAndNotEmpty(productsToCategoriesList); + return delegateDeleteList(productsToCategoriesList); + } + + // =================================================================================== + // Various Insert + // ============== + + // =================================================================================== + // CBSetupper + // ========== + /** + * The interface of condition-bean setupper. + */ + public static interface CBSetupper extends ConditionBeanSetupper { + + /** + * Set up condition. + * + * @param cb Condition-bean. (NotNull) + */ + public void setup(ProductsToCategoriesCB cb); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/bsbhv/BsReviewsBhv.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/bsbhv/BsReviewsBhv.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/bsbhv/BsReviewsBhv.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,701 @@ + +package jp.sf.pal.pompei.bsbhv; + +import jp.sf.pal.pompei.allcommon.*; +import jp.sf.pal.pompei.allcommon.bhv.load.LoadRefererOption; +import jp.sf.pal.pompei.allcommon.bhv.setup.ConditionBeanSetupper; +import jp.sf.pal.pompei.allcommon.bhv.setup.ValueLabelSetupper; +import jp.sf.pal.pompei.allcommon.cbean.ConditionBean; +import jp.sf.pal.pompei.allcommon.cbean.ListResultBean; +import jp.sf.pal.pompei.allcommon.cbean.PagingBean; +import jp.sf.pal.pompei.allcommon.cbean.PagingResultBean; +import jp.sf.pal.pompei.allcommon.dbmeta.DBMeta; + +import jp.sf.pal.pompei.exdao.*; +import jp.sf.pal.pompei.exentity.*; +import jp.sf.pal.pompei.bsentity.dbmeta.*; +import jp.sf.pal.pompei.cbean.*; + + + +/** + * The behavior of REVIEWS. + * + *
+ * [primary-key]
+ *     REVIEWS_ID
+ * 
+ * [column-property]
+ *     REVIEWS_ID, PRODUCTS_ID, CUSTOMERS_ID, CUSTOMERS_NAME, REVIEWS_RATING, DATE_ADDED, LAST_MODIFIED, REVIEWS_READ
+ * 
+ * [foreign-property]
+ *     
+ * 
+ * [refferer-property]
+ *     
+ * 
+ * [sequence]
+ *     
+ * 
+ * [identity]
+ *     
+ * 
+ * [update-date]
+ *     
+ * 
+ * [version-no]
+ *     
+ * 
+ * 
+ * + * @author DBFlute(AutoGenerator) + */ +public abstract class BsReviewsBhv extends jp.sf.pal.pompei.allcommon.bhv.AbstractBehaviorWritable { + + // =================================================================================== + // Attribute + // ========= + /** Dao instance. */ + protected ReviewsDao _dao; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + public BsReviewsBhv() { + } + + // =================================================================================== + // Table name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + public String getTableDbName() { + return "REVIEWS"; + } + + // =================================================================================== + // DBMeta + // ====== + /** + * This method implements the method that is declared at super. + * + * @return DBMeta. (NotNull) + */ + public DBMeta getDBMeta() { + return ReviewsDbm.getInstance(); + } + + /** + * Get my dbmeta. + * + * @return DBMeta. (NotNull) + */ + public ReviewsDbm getMyDBMeta() { + return ReviewsDbm.getInstance(); + } + + // =================================================================================== + // Dao Accessor + // ============ + /** + * Get my dao. + * + * @return My dao. + */ + public ReviewsDao getMyDao() { + return _dao; + } + + /** + * Set my dao. + * + * @param dao My dao. (NotNull) + */ + public void setMyDao(ReviewsDao dao) { + assertObjectNotNull("dao", dao); + _dao = dao; + } + + /** + * This method implements the method that is declared at super. + * + * @return Dao-readable. (NotNull) + */ + public DaoReadable getDaoReadable() { + return getMyDao(); + } + + /** + * This method implements the method that is declared at super. + * + * @return Dao-writable. (NotNull) + */ + public DaoWritable getDaoWritable() { + return getMyDao(); + } + + // =================================================================================== + // New Instance + // ============ + /** + * New entity. + * + * @return Entity. (NotNull) + */ + public Entity newEntity() { + return newMyEntity(); + } + + /** + * New condition-bean. + * + * @return Condition-bean. (NotNull) + */ + public ConditionBean newConditionBean() { + return newMyConditionBean(); + } + + /** + * New my entity. + * + * @return My entity. (NotNull) + */ + public Reviews newMyEntity() { + return new Reviews(); + } + + /** + * New my condition-bean. + * + * @return My condition-bean. (NotNull) + */ + public ReviewsCB newMyConditionBean() { + return new ReviewsCB(); + } + + // =================================================================================== + // Delegate Method + // =============== + // ----------------------------------------------------- + // Select + // ------ + /** + * Get count as all. (Delegate-Method) + * + * @return All count. (NotNull) + */ + public int delegateGetCountAll() { + return getMyDao().getCountAll(); + } + + /** + * Get list as all. (Delegate-Method) + * + * @return All list. (NotNull) + */ + public java.util.List delegateGetListAll() { + return getMyDao().getListAll(); + } + + // + // Get entity. (Delegate-Method) + // + // @param Primary-keys (NotNull) + // @return Entity. (NotNull) + // + public Reviews delegateGetEntity(java.math.BigDecimal reviewsId) { + return getMyDao().getEntity(reviewsId); + } + + /** + * Select count by condition-bean. (Delegate-Method) + * + * @param cb Condition-bean. (NotNull) + * @return Selected count. (NotNull) + */ + public int delegateSelectCount(ReviewsCB cb) { + assertConditionBeanNotNull(cb); + return getMyDao().selectCount(cb); + } + + /** + * Select entity by condition-bean. (Delegate-Method) + * + * @param cb Condition-bean. (NotNull) + * @return Selected entity. If the select result is zero, it returns null. (Nullable) + */ + public Reviews delegateSelectEntity(ReviewsCB cb) { + assertConditionBeanNotNull(cb); + return getMyDao().selectEntity(cb); + } + + /** + * Select list by condition-bean. (Delegate-Method) + * + * @param cb Condition-bean. (NotNull) + * @return Selected list. If the select result is zero, it returns empty list. (NotNull) + */ + public java.util.List delegateSelectList(ReviewsCB cb) { + assertConditionBeanNotNull(cb); + return getMyDao().selectList(cb); + } + + + // ----------------------------------------------------- + // Update + // ------ + /** + * Insert one entity. (Delegate-Method) + * + * @param entity Entity. (NotNull) + * @return Inserted count. + */ + public int delegateInsert(Reviews entity) { + assertEntityNotNull(entity);// If this table use identity, the entity does not have primary-key. + filterEntityOfInsert(entity); + assertEntityOfInsert(entity); + return getMyDao().insert(entity); + } + + /** + * Update one entity. (Delegate-Method) + * {modified only} + * + * @param entity Entity. (NotNull) + * @return Updated count. + */ + public int delegateUpdate(Reviews entity) { + assertEntityNotNullAndHasPrimaryKeyValue(entity); + filterEntityOfUpdate(entity); + assertEntityOfUpdate(entity); + return getMyDao().updateModifiedOnly(entity); + } + + /** + * Delete one entity. (Delegate-Method) + * + * @param entity Entity. (NotNull) + * @return Deleted count. + */ + public int delegateDelete(Reviews entity) { + assertEntityNotNullAndHasPrimaryKeyValue(entity); + filterEntityOfDelete(entity); + assertEntityOfDelete(entity); + return getMyDao().delete(entity); + } + + /** + * Insert several entities. (Delegate-Method) + * + * @param entityList Entity-list. (NotNull & NotEmpty) + * @return Inserted count. + */ + public int delegateInsertList(java.util.List entityList) { + assertListNotNullAndNotEmpty(entityList); + return getMyDao().insertList(entityList); + } + + /** + * Update several entities. (Delegate-Method) + * + * @param entityList Entity-list. (NotNull & NotEmpty) + * @return Updated count. + */ + public int delegateUpdateList(java.util.List entityList) { + assertListNotNullAndNotEmpty(entityList); + return getMyDao().updateList(entityList); + } + + /** + * Delete several entities. (Delegate-Method) + * + * @param entityList Entity-list. (NotNull & NotEmpty) + * @return Deleted count. + */ + public int delegateDeleteList(java.util.List entityList) { + assertListNotNullAndNotEmpty(entityList); + return getMyDao().deleteList(entityList); + } + + // =================================================================================== + // Basic Select Count + // ================== + /** + * Select count by condition-bean. + *
+     * If the argument 'condition-bean' is effective about fetch-scope,
+     * this method invoke select count ignoring the fetch-scope.
+     * 
+ * @param cb Condition-bean. This condition-bean should not be set up about fetch-scope. (NotNull) + * @return Selected count. + */ + public int selectCount(ReviewsCB cb) { + assertConditionBeanNotNull(cb); + return delegateSelectCount(cb); + } + + // =================================================================================== + // Basic Select Entity + // =================== + /** + * Select entity by condition-bean. + * + * @param cb Condition-bean. (NotNull) + * @return Selected entity. (Nullalble) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public Reviews selectEntity(ReviewsCB cb) { + assertConditionBeanNotNull(cb); + final java.util.List ls = selectList(cb); + if (ls.isEmpty()) { + return null; + } + assertRecordHasBeenSelectedAsOne(ls, cb); + return (Reviews)ls.get(0); + } + + /** + * Select entity by condition-bean with deleted check. + * + * @param cb Condition-bean. (NotNull) + * @return Selected entity. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public Reviews selectEntityWithDeletedCheck(ReviewsCB cb) { + assertConditionBeanNotNull(cb); + final java.util.List ls = selectList(cb); + assertRecordHasNotBeenDeleted(ls, cb); + assertRecordHasBeenSelectedAsOne(ls, cb); + return (Reviews)ls.get(0); + } + + /* + * Select entity with deleted check. {by primary-key} + * + * @param primaryKey + * @return Selected entity. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public Reviews selectByPKValueWithDeletedCheck(java.math.BigDecimal reviewsId) { + Reviews entity = new Reviews(); + entity.setReviewsId(reviewsId); + final ReviewsCB cb = newMyConditionBean(); + cb.acceptPrimaryKeyMapString(getDBMeta().extractPrimaryKeyMapString(entity)); + return selectEntityWithDeletedCheck(cb); + } + + // =================================================================================== + // Basic Select List + // ================= + /** + * Select list as result-bean. + * + * @param cb Condition-bean. (NotNull) + * @return Selected list-result-bean. (NotNull) + */ + public ListResultBean selectList(ReviewsCB cb) { + assertConditionBeanNotNull(cb); + return new ResultBeanBuilder(this).buildListResultBean(cb, delegateSelectList(cb)); + } + + /** + * Select page as result-bean. + * + * @param cb Condition-bean. (NotNull) + * @return Selected paging-result-bean. (NotNull) + */ + public PagingResultBean selectPage(final ReviewsCB cb) { + assertConditionBeanNotNull(cb); + return selectPage(cb, new SelectPageSimpleInvoker(this)); + } + + /** + * Select page. + * + * @param cb Condition-bean. (NotNull) + * @param invoker Select-page-invoker (NotNull) + * @return Selected paging-result-bean. (NotNull) + */ + public PagingResultBean selectPage(final ReviewsCB cb, SelectPageInvoker invoker) { + assertConditionBeanNotNull(cb); + final SelectPageCallback pageCallback = new SelectPageCallback() { + public PagingBean getPagingBean() { return cb; } + public int selectCountIgnoreFetchScope() { + return selectCount(cb); + } + public java.util.List selectListWithFetchScope() { + return selectList(cb); + } + }; + return invoker.invokeSelectPage(pageCallback); + } + + // =================================================================================== + // Various Select + // ============== + /** + * Select value-label list. + * + * @param cb Condition-bean. (NotNull) + * @param valueLabelSetupper Value-label-setupper. (NotNull) + * @return Value-label list. (NotNull) + */ + public java.util.List> selectValueLabelList(ReviewsCB cb, ValueLabelSetupper valueLabelSetupper) { + return createValueLabelList(selectList(cb), valueLabelSetupper); + } + + // =================================================================================== + // Load Referer + // ============ + + // =================================================================================== + // Pull Out Foreign + // ================ + + // =================================================================================== + // Basic Entity Update + // =================== + /** + * Insert. + * + * @param reviews Entity. (NotNull) + */ + public void insert(Reviews reviews) { + assertEntityNotNull(reviews); + delegateInsert(reviews); + } + + protected void doCreate(Entity reviews) { + insert((Reviews)reviews); + } + + /** + * Update. + *
+     * If it updates count zero, throws exception.
+     * If concurrency control of this table is valid, this update have it.
+     * 
+ * @param reviews Entity. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public void update(Reviews reviews) { + assertEntityNotNull(reviews); + final int updatedCount = delegateUpdate(reviews); + if (updatedCount == 0) { + throw new jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException(reviews.toString()); + } else if (updatedCount > 1) { + String msg = "updatedCount=" + updatedCount + ": " + reviews.toString(); + throw new jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException(msg); + } + } + + protected void doModify(Entity reviews) { + update((Reviews)reviews); + } + + /** + * Update after select. + * + * @param reviews Entity. This must contain primary-key value at least. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + */ + public void updateAfterSelect(Reviews reviews) { + assertEntityNotNullAndHasPrimaryKeyValue(reviews); + final ReviewsCB cb = newMyConditionBean(); + cb.acceptPrimaryKeyMapString(getDBMeta().extractPrimaryKeyMapString(reviews)); + final Reviews currentEntity = selectEntityWithDeletedCheck(cb); + mergeEntity(reviews, currentEntity); + update(currentEntity); + } + + protected void doModifyAfterSelect(Entity reviews) { + updateAfterSelect((Reviews)reviews); + } + + /** + * Insert or update. + * {update: modified only} + * + * @param reviews Entity. This should contain primary-key value at least(Except use identity). (NotNull) + */ + public void insertOrUpdate(Reviews reviews) { + assertEntityNotNull(reviews); + if (!reviews.hasPrimaryKeyValue()) { + insert(reviews); + } else { + try { + update(reviews); + } catch (org.seasar.dao.NotSingleRowUpdatedRuntimeException e) { + insert(reviews); + } catch (jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException e) { + insert(reviews); + } + } + } + + protected void doCreateOrUpdateNonstrict(Entity reviews) { + + insertOrUpdate((Reviews)reviews); + + } + + /** + * Insert or update after select. + * {update: modified only} + * + * @param reviews Entity. This should contain primary-key value at least(Except use identity). (NotNull) + */ + public void insertOrUpdateAfterSelect(Reviews reviews) { + assertEntityNotNull(reviews); + if (!reviews.hasPrimaryKeyValue()) { + insert(reviews); + return; + } + Reviews currentEntity = null; + try { + final ReviewsCB cb = newMyConditionBean(); + cb.acceptPrimaryKeyMapString(getDBMeta().extractPrimaryKeyMapString(reviews)); + currentEntity = selectEntityWithDeletedCheck(cb); + } catch (jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException e) { + insert(reviews); + return; + } + assertEntityNotNullAndHasPrimaryKeyValue(reviews); + mergeEntity(reviews, currentEntity); + update(currentEntity); + } + + protected void doCreateOrModifyAfterSelect(Entity entity) { + insertOrUpdateAfterSelect((Reviews)entity); + } + + /** + * This method implements the method that is declared at super. + * + * @param sourceEntity Source entity. (NotNull) + * @param destinationEntity Destination entity. (NotNull) + */ + protected void mergeEntity(Entity sourceEntity, Entity destinationEntity) { + assertEntityNotNull(sourceEntity); + assertEntityNotNull(destinationEntity); + final Reviews sourceMyEntity = (Reviews)sourceEntity; + final Reviews destinationMyEntity = (Reviews)destinationEntity; + destinationMyEntity.clearModifiedPropertyNames(); + final java.util.Set names = sourceMyEntity.getModifiedPropertyNames(); + + if (names.contains("reviewsId")) { destinationMyEntity.setReviewsId(sourceMyEntity.getReviewsId()); } + if (names.contains("productsId")) { destinationMyEntity.setProductsId(sourceMyEntity.getProductsId()); } + if (names.contains("customersId")) { destinationMyEntity.setCustomersId(sourceMyEntity.getCustomersId()); } + if (names.contains("customersName")) { destinationMyEntity.setCustomersName(sourceMyEntity.getCustomersName()); } + if (names.contains("reviewsRating")) { destinationMyEntity.setReviewsRating(sourceMyEntity.getReviewsRating()); } + if (names.contains("dateAdded")) { destinationMyEntity.setDateAdded(sourceMyEntity.getDateAdded()); } + if (names.contains("lastModified")) { destinationMyEntity.setLastModified(sourceMyEntity.getLastModified()); } + if (names.contains("reviewsRead")) { destinationMyEntity.setReviewsRead(sourceMyEntity.getReviewsRead()); } + + } + + /** + * Delete. + * + * @param reviews Entity. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public void delete(Reviews reviews) { + assertEntityNotNull(reviews); + final int deletedCount = delegateDelete(reviews); + if (deletedCount == 0) { + throw new jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException(reviews.toString()); + } else if (deletedCount > 1) { + String msg = "deletedCount=" + deletedCount + ": " + reviews.toString(); + throw new jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException(msg); + } + } + + protected void doRemove(Entity reviews) { + delete((Reviews)reviews); + } + + /** + * Delete after select. + * + * @param reviews Entity. This must contain primary-key value at least. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + */ + public void deleteAfterSelect(Reviews reviews) { + assertEntityNotNullAndHasPrimaryKeyValue(reviews); + final ReviewsCB cb = newMyConditionBean(); + cb.acceptPrimaryKeyMapString(getDBMeta().extractPrimaryKeyMapString(reviews)); + selectEntityWithDeletedCheck(cb); + delete(reviews); + } + + protected void doRemoveAfterSelect(Entity reviews) { + deleteAfterSelect((Reviews)reviews); + } + + // =================================================================================== + // Basic Batch Update + // ================== + /** + * Insert list. + * + * @param reviewsList Entity-list. (NotNull & NotEmpty) + * @return Inserted count. + */ + public int insertList(java.util.List reviewsList) { + assertListNotNullAndNotEmpty(reviewsList); + return delegateInsertList(reviewsList); + } + + /** + * Update list. + * + * @param reviewsList Entity-list. (NotNull & NotEmpty) + * @return Updated count. + */ + public int updateList(java.util.List reviewsList) { + assertListNotNullAndNotEmpty(reviewsList); + return delegateUpdateList(reviewsList); + } + + /** + * Delete list. + * + * @param reviewsList Entity-list. (NotNull & NotEmpty) + * @return Deleted count. + */ + public int deleteList(java.util.List reviewsList) { + assertListNotNullAndNotEmpty(reviewsList); + return delegateDeleteList(reviewsList); + } + + // =================================================================================== + // Various Insert + // ============== + + // =================================================================================== + // CBSetupper + // ========== + /** + * The interface of condition-bean setupper. + */ + public static interface CBSetupper extends ConditionBeanSetupper { + + /** + * Set up condition. + * + * @param cb Condition-bean. (NotNull) + */ + public void setup(ReviewsCB cb); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/bsbhv/BsReviewsDescriptionBhv.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/bsbhv/BsReviewsDescriptionBhv.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/bsbhv/BsReviewsDescriptionBhv.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,692 @@ + +package jp.sf.pal.pompei.bsbhv; + +import jp.sf.pal.pompei.allcommon.*; +import jp.sf.pal.pompei.allcommon.bhv.load.LoadRefererOption; +import jp.sf.pal.pompei.allcommon.bhv.setup.ConditionBeanSetupper; +import jp.sf.pal.pompei.allcommon.bhv.setup.ValueLabelSetupper; +import jp.sf.pal.pompei.allcommon.cbean.ConditionBean; +import jp.sf.pal.pompei.allcommon.cbean.ListResultBean; +import jp.sf.pal.pompei.allcommon.cbean.PagingBean; +import jp.sf.pal.pompei.allcommon.cbean.PagingResultBean; +import jp.sf.pal.pompei.allcommon.dbmeta.DBMeta; + +import jp.sf.pal.pompei.exdao.*; +import jp.sf.pal.pompei.exentity.*; +import jp.sf.pal.pompei.bsentity.dbmeta.*; +import jp.sf.pal.pompei.cbean.*; + + + +/** + * The behavior of REVIEWS_DESCRIPTION. + * + *
+ * [primary-key]
+ *     REVIEWS_ID, LANGUAGES_ID
+ * 
+ * [column-property]
+ *     REVIEWS_ID, LANGUAGES_ID, REVIEWS_TEXT
+ * 
+ * [foreign-property]
+ *     
+ * 
+ * [refferer-property]
+ *     
+ * 
+ * [sequence]
+ *     
+ * 
+ * [identity]
+ *     
+ * 
+ * [update-date]
+ *     
+ * 
+ * [version-no]
+ *     
+ * 
+ * 
+ * + * @author DBFlute(AutoGenerator) + */ +public abstract class BsReviewsDescriptionBhv extends jp.sf.pal.pompei.allcommon.bhv.AbstractBehaviorWritable { + + // =================================================================================== + // Attribute + // ========= + /** Dao instance. */ + protected ReviewsDescriptionDao _dao; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + public BsReviewsDescriptionBhv() { + } + + // =================================================================================== + // Table name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + public String getTableDbName() { + return "REVIEWS_DESCRIPTION"; + } + + // =================================================================================== + // DBMeta + // ====== + /** + * This method implements the method that is declared at super. + * + * @return DBMeta. (NotNull) + */ + public DBMeta getDBMeta() { + return ReviewsDescriptionDbm.getInstance(); + } + + /** + * Get my dbmeta. + * + * @return DBMeta. (NotNull) + */ + public ReviewsDescriptionDbm getMyDBMeta() { + return ReviewsDescriptionDbm.getInstance(); + } + + // =================================================================================== + // Dao Accessor + // ============ + /** + * Get my dao. + * + * @return My dao. + */ + public ReviewsDescriptionDao getMyDao() { + return _dao; + } + + /** + * Set my dao. + * + * @param dao My dao. (NotNull) + */ + public void setMyDao(ReviewsDescriptionDao dao) { + assertObjectNotNull("dao", dao); + _dao = dao; + } + + /** + * This method implements the method that is declared at super. + * + * @return Dao-readable. (NotNull) + */ + public DaoReadable getDaoReadable() { + return getMyDao(); + } + + /** + * This method implements the method that is declared at super. + * + * @return Dao-writable. (NotNull) + */ + public DaoWritable getDaoWritable() { + return getMyDao(); + } + + // =================================================================================== + // New Instance + // ============ + /** + * New entity. + * + * @return Entity. (NotNull) + */ + public Entity newEntity() { + return newMyEntity(); + } + + /** + * New condition-bean. + * + * @return Condition-bean. (NotNull) + */ + public ConditionBean newConditionBean() { + return newMyConditionBean(); + } + + /** + * New my entity. + * + * @return My entity. (NotNull) + */ + public ReviewsDescription newMyEntity() { + return new ReviewsDescription(); + } + + /** + * New my condition-bean. + * + * @return My condition-bean. (NotNull) + */ + public ReviewsDescriptionCB newMyConditionBean() { + return new ReviewsDescriptionCB(); + } + + // =================================================================================== + // Delegate Method + // =============== + // ----------------------------------------------------- + // Select + // ------ + /** + * Get count as all. (Delegate-Method) + * + * @return All count. (NotNull) + */ + public int delegateGetCountAll() { + return getMyDao().getCountAll(); + } + + /** + * Get list as all. (Delegate-Method) + * + * @return All list. (NotNull) + */ + public java.util.List delegateGetListAll() { + return getMyDao().getListAll(); + } + + // + // Get entity. (Delegate-Method) + // + // @param Primary-keys (NotNull) + // @return Entity. (NotNull) + // + public ReviewsDescription delegateGetEntity(java.math.BigDecimal reviewsId, java.math.BigDecimal languagesId) { + return getMyDao().getEntity(reviewsId, languagesId); + } + + /** + * Select count by condition-bean. (Delegate-Method) + * + * @param cb Condition-bean. (NotNull) + * @return Selected count. (NotNull) + */ + public int delegateSelectCount(ReviewsDescriptionCB cb) { + assertConditionBeanNotNull(cb); + return getMyDao().selectCount(cb); + } + + /** + * Select entity by condition-bean. (Delegate-Method) + * + * @param cb Condition-bean. (NotNull) + * @return Selected entity. If the select result is zero, it returns null. (Nullable) + */ + public ReviewsDescription delegateSelectEntity(ReviewsDescriptionCB cb) { + assertConditionBeanNotNull(cb); + return getMyDao().selectEntity(cb); + } + + /** + * Select list by condition-bean. (Delegate-Method) + * + * @param cb Condition-bean. (NotNull) + * @return Selected list. If the select result is zero, it returns empty list. (NotNull) + */ + public java.util.List delegateSelectList(ReviewsDescriptionCB cb) { + assertConditionBeanNotNull(cb); + return getMyDao().selectList(cb); + } + + + // ----------------------------------------------------- + // Update + // ------ + /** + * Insert one entity. (Delegate-Method) + * + * @param entity Entity. (NotNull) + * @return Inserted count. + */ + public int delegateInsert(ReviewsDescription entity) { + assertEntityNotNull(entity);// If this table use identity, the entity does not have primary-key. + filterEntityOfInsert(entity); + assertEntityOfInsert(entity); + return getMyDao().insert(entity); + } + + /** + * Update one entity. (Delegate-Method) + * {modified only} + * + * @param entity Entity. (NotNull) + * @return Updated count. + */ + public int delegateUpdate(ReviewsDescription entity) { + assertEntityNotNullAndHasPrimaryKeyValue(entity); + filterEntityOfUpdate(entity); + assertEntityOfUpdate(entity); + return getMyDao().updateModifiedOnly(entity); + } + + /** + * Delete one entity. (Delegate-Method) + * + * @param entity Entity. (NotNull) + * @return Deleted count. + */ + public int delegateDelete(ReviewsDescription entity) { + assertEntityNotNullAndHasPrimaryKeyValue(entity); + filterEntityOfDelete(entity); + assertEntityOfDelete(entity); + return getMyDao().delete(entity); + } + + /** + * Insert several entities. (Delegate-Method) + * + * @param entityList Entity-list. (NotNull & NotEmpty) + * @return Inserted count. + */ + public int delegateInsertList(java.util.List entityList) { + assertListNotNullAndNotEmpty(entityList); + return getMyDao().insertList(entityList); + } + + /** + * Update several entities. (Delegate-Method) + * + * @param entityList Entity-list. (NotNull & NotEmpty) + * @return Updated count. + */ + public int delegateUpdateList(java.util.List entityList) { + assertListNotNullAndNotEmpty(entityList); + return getMyDao().updateList(entityList); + } + + /** + * Delete several entities. (Delegate-Method) + * + * @param entityList Entity-list. (NotNull & NotEmpty) + * @return Deleted count. + */ + public int delegateDeleteList(java.util.List entityList) { + assertListNotNullAndNotEmpty(entityList); + return getMyDao().deleteList(entityList); + } + + // =================================================================================== + // Basic Select Count + // ================== + /** + * Select count by condition-bean. + *
+     * If the argument 'condition-bean' is effective about fetch-scope,
+     * this method invoke select count ignoring the fetch-scope.
+     * 
+ * @param cb Condition-bean. This condition-bean should not be set up about fetch-scope. (NotNull) + * @return Selected count. + */ + public int selectCount(ReviewsDescriptionCB cb) { + assertConditionBeanNotNull(cb); + return delegateSelectCount(cb); + } + + // =================================================================================== + // Basic Select Entity + // =================== + /** + * Select entity by condition-bean. + * + * @param cb Condition-bean. (NotNull) + * @return Selected entity. (Nullalble) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public ReviewsDescription selectEntity(ReviewsDescriptionCB cb) { + assertConditionBeanNotNull(cb); + final java.util.List ls = selectList(cb); + if (ls.isEmpty()) { + return null; + } + assertRecordHasBeenSelectedAsOne(ls, cb); + return (ReviewsDescription)ls.get(0); + } + + /** + * Select entity by condition-bean with deleted check. + * + * @param cb Condition-bean. (NotNull) + * @return Selected entity. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public ReviewsDescription selectEntityWithDeletedCheck(ReviewsDescriptionCB cb) { + assertConditionBeanNotNull(cb); + final java.util.List ls = selectList(cb); + assertRecordHasNotBeenDeleted(ls, cb); + assertRecordHasBeenSelectedAsOne(ls, cb); + return (ReviewsDescription)ls.get(0); + } + + /* + * Select entity with deleted check. {by primary-key} + * + * @param primaryKey + * @return Selected entity. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public ReviewsDescription selectByPKValueWithDeletedCheck(java.math.BigDecimal reviewsId, java.math.BigDecimal languagesId) { + ReviewsDescription entity = new ReviewsDescription(); + entity.setReviewsId(reviewsId);entity.setLanguagesId(languagesId); + final ReviewsDescriptionCB cb = newMyConditionBean(); + cb.acceptPrimaryKeyMapString(getDBMeta().extractPrimaryKeyMapString(entity)); + return selectEntityWithDeletedCheck(cb); + } + + // =================================================================================== + // Basic Select List + // ================= + /** + * Select list as result-bean. + * + * @param cb Condition-bean. (NotNull) + * @return Selected list-result-bean. (NotNull) + */ + public ListResultBean selectList(ReviewsDescriptionCB cb) { + assertConditionBeanNotNull(cb); + return new ResultBeanBuilder(this).buildListResultBean(cb, delegateSelectList(cb)); + } + + /** + * Select page as result-bean. + * + * @param cb Condition-bean. (NotNull) + * @return Selected paging-result-bean. (NotNull) + */ + public PagingResultBean selectPage(final ReviewsDescriptionCB cb) { + assertConditionBeanNotNull(cb); + return selectPage(cb, new SelectPageSimpleInvoker(this)); + } + + /** + * Select page. + * + * @param cb Condition-bean. (NotNull) + * @param invoker Select-page-invoker (NotNull) + * @return Selected paging-result-bean. (NotNull) + */ + public PagingResultBean selectPage(final ReviewsDescriptionCB cb, SelectPageInvoker invoker) { + assertConditionBeanNotNull(cb); + final SelectPageCallback pageCallback = new SelectPageCallback() { + public PagingBean getPagingBean() { return cb; } + public int selectCountIgnoreFetchScope() { + return selectCount(cb); + } + public java.util.List selectListWithFetchScope() { + return selectList(cb); + } + }; + return invoker.invokeSelectPage(pageCallback); + } + + // =================================================================================== + // Various Select + // ============== + /** + * Select value-label list. + * + * @param cb Condition-bean. (NotNull) + * @param valueLabelSetupper Value-label-setupper. (NotNull) + * @return Value-label list. (NotNull) + */ + public java.util.List> selectValueLabelList(ReviewsDescriptionCB cb, ValueLabelSetupper valueLabelSetupper) { + return createValueLabelList(selectList(cb), valueLabelSetupper); + } + + // =================================================================================== + // Pull Out Foreign + // ================ + + // =================================================================================== + // Basic Entity Update + // =================== + /** + * Insert. + * + * @param reviewsDescription Entity. (NotNull) + */ + public void insert(ReviewsDescription reviewsDescription) { + assertEntityNotNull(reviewsDescription); + delegateInsert(reviewsDescription); + } + + protected void doCreate(Entity reviewsDescription) { + insert((ReviewsDescription)reviewsDescription); + } + + /** + * Update. + *
+     * If it updates count zero, throws exception.
+     * If concurrency control of this table is valid, this update have it.
+     * 
+ * @param reviewsDescription Entity. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public void update(ReviewsDescription reviewsDescription) { + assertEntityNotNull(reviewsDescription); + final int updatedCount = delegateUpdate(reviewsDescription); + if (updatedCount == 0) { + throw new jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException(reviewsDescription.toString()); + } else if (updatedCount > 1) { + String msg = "updatedCount=" + updatedCount + ": " + reviewsDescription.toString(); + throw new jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException(msg); + } + } + + protected void doModify(Entity reviewsDescription) { + update((ReviewsDescription)reviewsDescription); + } + + /** + * Update after select. + * + * @param reviewsDescription Entity. This must contain primary-key value at least. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + */ + public void updateAfterSelect(ReviewsDescription reviewsDescription) { + assertEntityNotNullAndHasPrimaryKeyValue(reviewsDescription); + final ReviewsDescriptionCB cb = newMyConditionBean(); + cb.acceptPrimaryKeyMapString(getDBMeta().extractPrimaryKeyMapString(reviewsDescription)); + final ReviewsDescription currentEntity = selectEntityWithDeletedCheck(cb); + mergeEntity(reviewsDescription, currentEntity); + update(currentEntity); + } + + protected void doModifyAfterSelect(Entity reviewsDescription) { + updateAfterSelect((ReviewsDescription)reviewsDescription); + } + + /** + * Insert or update. + * {update: modified only} + * + * @param reviewsDescription Entity. This should contain primary-key value at least(Except use identity). (NotNull) + */ + public void insertOrUpdate(ReviewsDescription reviewsDescription) { + assertEntityNotNull(reviewsDescription); + if (!reviewsDescription.hasPrimaryKeyValue()) { + insert(reviewsDescription); + } else { + try { + update(reviewsDescription); + } catch (org.seasar.dao.NotSingleRowUpdatedRuntimeException e) { + insert(reviewsDescription); + } catch (jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException e) { + insert(reviewsDescription); + } + } + } + + protected void doCreateOrUpdateNonstrict(Entity reviewsDescription) { + + insertOrUpdate((ReviewsDescription)reviewsDescription); + + } + + /** + * Insert or update after select. + * {update: modified only} + * + * @param reviewsDescription Entity. This should contain primary-key value at least(Except use identity). (NotNull) + */ + public void insertOrUpdateAfterSelect(ReviewsDescription reviewsDescription) { + assertEntityNotNull(reviewsDescription); + if (!reviewsDescription.hasPrimaryKeyValue()) { + insert(reviewsDescription); + return; + } + ReviewsDescription currentEntity = null; + try { + final ReviewsDescriptionCB cb = newMyConditionBean(); + cb.acceptPrimaryKeyMapString(getDBMeta().extractPrimaryKeyMapString(reviewsDescription)); + currentEntity = selectEntityWithDeletedCheck(cb); + } catch (jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException e) { + insert(reviewsDescription); + return; + } + assertEntityNotNullAndHasPrimaryKeyValue(reviewsDescription); + mergeEntity(reviewsDescription, currentEntity); + update(currentEntity); + } + + protected void doCreateOrModifyAfterSelect(Entity entity) { + insertOrUpdateAfterSelect((ReviewsDescription)entity); + } + + /** + * This method implements the method that is declared at super. + * + * @param sourceEntity Source entity. (NotNull) + * @param destinationEntity Destination entity. (NotNull) + */ + protected void mergeEntity(Entity sourceEntity, Entity destinationEntity) { + assertEntityNotNull(sourceEntity); + assertEntityNotNull(destinationEntity); + final ReviewsDescription sourceMyEntity = (ReviewsDescription)sourceEntity; + final ReviewsDescription destinationMyEntity = (ReviewsDescription)destinationEntity; + destinationMyEntity.clearModifiedPropertyNames(); + final java.util.Set names = sourceMyEntity.getModifiedPropertyNames(); + + if (names.contains("reviewsId")) { destinationMyEntity.setReviewsId(sourceMyEntity.getReviewsId()); } + if (names.contains("languagesId")) { destinationMyEntity.setLanguagesId(sourceMyEntity.getLanguagesId()); } + if (names.contains("reviewsText")) { destinationMyEntity.setReviewsText(sourceMyEntity.getReviewsText()); } + + } + + /** + * Delete. + * + * @param reviewsDescription Entity. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public void delete(ReviewsDescription reviewsDescription) { + assertEntityNotNull(reviewsDescription); + final int deletedCount = delegateDelete(reviewsDescription); + if (deletedCount == 0) { + throw new jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException(reviewsDescription.toString()); + } else if (deletedCount > 1) { + String msg = "deletedCount=" + deletedCount + ": " + reviewsDescription.toString(); + throw new jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException(msg); + } + } + + protected void doRemove(Entity reviewsDescription) { + delete((ReviewsDescription)reviewsDescription); + } + + /** + * Delete after select. + * + * @param reviewsDescription Entity. This must contain primary-key value at least. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + */ + public void deleteAfterSelect(ReviewsDescription reviewsDescription) { + assertEntityNotNullAndHasPrimaryKeyValue(reviewsDescription); + final ReviewsDescriptionCB cb = newMyConditionBean(); + cb.acceptPrimaryKeyMapString(getDBMeta().extractPrimaryKeyMapString(reviewsDescription)); + selectEntityWithDeletedCheck(cb); + delete(reviewsDescription); + } + + protected void doRemoveAfterSelect(Entity reviewsDescription) { + deleteAfterSelect((ReviewsDescription)reviewsDescription); + } + + // =================================================================================== + // Basic Batch Update + // ================== + /** + * Insert list. + * + * @param reviewsDescriptionList Entity-list. (NotNull & NotEmpty) + * @return Inserted count. + */ + public int insertList(java.util.List reviewsDescriptionList) { + assertListNotNullAndNotEmpty(reviewsDescriptionList); + return delegateInsertList(reviewsDescriptionList); + } + + /** + * Update list. + * + * @param reviewsDescriptionList Entity-list. (NotNull & NotEmpty) + * @return Updated count. + */ + public int updateList(java.util.List reviewsDescriptionList) { + assertListNotNullAndNotEmpty(reviewsDescriptionList); + return delegateUpdateList(reviewsDescriptionList); + } + + /** + * Delete list. + * + * @param reviewsDescriptionList Entity-list. (NotNull & NotEmpty) + * @return Deleted count. + */ + public int deleteList(java.util.List reviewsDescriptionList) { + assertListNotNullAndNotEmpty(reviewsDescriptionList); + return delegateDeleteList(reviewsDescriptionList); + } + + // =================================================================================== + // Various Insert + // ============== + + // =================================================================================== + // CBSetupper + // ========== + /** + * The interface of condition-bean setupper. + */ + public static interface CBSetupper extends ConditionBeanSetupper { + + /** + * Set up condition. + * + * @param cb Condition-bean. (NotNull) + */ + public void setup(ReviewsDescriptionCB cb); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/bsbhv/BsSessionsBhv.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/bsbhv/BsSessionsBhv.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/bsbhv/BsSessionsBhv.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,696 @@ + +package jp.sf.pal.pompei.bsbhv; + +import jp.sf.pal.pompei.allcommon.*; +import jp.sf.pal.pompei.allcommon.bhv.load.LoadRefererOption; +import jp.sf.pal.pompei.allcommon.bhv.setup.ConditionBeanSetupper; +import jp.sf.pal.pompei.allcommon.bhv.setup.ValueLabelSetupper; +import jp.sf.pal.pompei.allcommon.cbean.ConditionBean; +import jp.sf.pal.pompei.allcommon.cbean.ListResultBean; +import jp.sf.pal.pompei.allcommon.cbean.PagingBean; +import jp.sf.pal.pompei.allcommon.cbean.PagingResultBean; +import jp.sf.pal.pompei.allcommon.dbmeta.DBMeta; + +import jp.sf.pal.pompei.exdao.*; +import jp.sf.pal.pompei.exentity.*; +import jp.sf.pal.pompei.bsentity.dbmeta.*; +import jp.sf.pal.pompei.cbean.*; + + + +/** + * The behavior of SESSIONS. + * + *
+ * [primary-key]
+ *     SESSKEY
+ * 
+ * [column-property]
+ *     SESSKEY, EXPIRY, VALUE
+ * 
+ * [foreign-property]
+ *     
+ * 
+ * [refferer-property]
+ *     
+ * 
+ * [sequence]
+ *     
+ * 
+ * [identity]
+ *     
+ * 
+ * [update-date]
+ *     
+ * 
+ * [version-no]
+ *     
+ * 
+ * 
+ * + * @author DBFlute(AutoGenerator) + */ +public abstract class BsSessionsBhv extends jp.sf.pal.pompei.allcommon.bhv.AbstractBehaviorWritable { + + // =================================================================================== + // Attribute + // ========= + /** Dao instance. */ + protected SessionsDao _dao; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + public BsSessionsBhv() { + } + + // =================================================================================== + // Table name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + public String getTableDbName() { + return "SESSIONS"; + } + + // =================================================================================== + // DBMeta + // ====== + /** + * This method implements the method that is declared at super. + * + * @return DBMeta. (NotNull) + */ + public DBMeta getDBMeta() { + return SessionsDbm.getInstance(); + } + + /** + * Get my dbmeta. + * + * @return DBMeta. (NotNull) + */ + public SessionsDbm getMyDBMeta() { + return SessionsDbm.getInstance(); + } + + // =================================================================================== + // Dao Accessor + // ============ + /** + * Get my dao. + * + * @return My dao. + */ + public SessionsDao getMyDao() { + return _dao; + } + + /** + * Set my dao. + * + * @param dao My dao. (NotNull) + */ + public void setMyDao(SessionsDao dao) { + assertObjectNotNull("dao", dao); + _dao = dao; + } + + /** + * This method implements the method that is declared at super. + * + * @return Dao-readable. (NotNull) + */ + public DaoReadable getDaoReadable() { + return getMyDao(); + } + + /** + * This method implements the method that is declared at super. + * + * @return Dao-writable. (NotNull) + */ + public DaoWritable getDaoWritable() { + return getMyDao(); + } + + // =================================================================================== + // New Instance + // ============ + /** + * New entity. + * + * @return Entity. (NotNull) + */ + public Entity newEntity() { + return newMyEntity(); + } + + /** + * New condition-bean. + * + * @return Condition-bean. (NotNull) + */ + public ConditionBean newConditionBean() { + return newMyConditionBean(); + } + + /** + * New my entity. + * + * @return My entity. (NotNull) + */ + public Sessions newMyEntity() { + return new Sessions(); + } + + /** + * New my condition-bean. + * + * @return My condition-bean. (NotNull) + */ + public SessionsCB newMyConditionBean() { + return new SessionsCB(); + } + + // =================================================================================== + // Delegate Method + // =============== + // ----------------------------------------------------- + // Select + // ------ + /** + * Get count as all. (Delegate-Method) + * + * @return All count. (NotNull) + */ + public int delegateGetCountAll() { + return getMyDao().getCountAll(); + } + + /** + * Get list as all. (Delegate-Method) + * + * @return All list. (NotNull) + */ + public java.util.List delegateGetListAll() { + return getMyDao().getListAll(); + } + + // + // Get entity. (Delegate-Method) + // + // @param Primary-keys (NotNull) + // @return Entity. (NotNull) + // + public Sessions delegateGetEntity(String sesskey) { + return getMyDao().getEntity(sesskey); + } + + /** + * Select count by condition-bean. (Delegate-Method) + * + * @param cb Condition-bean. (NotNull) + * @return Selected count. (NotNull) + */ + public int delegateSelectCount(SessionsCB cb) { + assertConditionBeanNotNull(cb); + return getMyDao().selectCount(cb); + } + + /** + * Select entity by condition-bean. (Delegate-Method) + * + * @param cb Condition-bean. (NotNull) + * @return Selected entity. If the select result is zero, it returns null. (Nullable) + */ + public Sessions delegateSelectEntity(SessionsCB cb) { + assertConditionBeanNotNull(cb); + return getMyDao().selectEntity(cb); + } + + /** + * Select list by condition-bean. (Delegate-Method) + * + * @param cb Condition-bean. (NotNull) + * @return Selected list. If the select result is zero, it returns empty list. (NotNull) + */ + public java.util.List delegateSelectList(SessionsCB cb) { + assertConditionBeanNotNull(cb); + return getMyDao().selectList(cb); + } + + + // ----------------------------------------------------- + // Update + // ------ + /** + * Insert one entity. (Delegate-Method) + * + * @param entity Entity. (NotNull) + * @return Inserted count. + */ + public int delegateInsert(Sessions entity) { + assertEntityNotNull(entity);// If this table use identity, the entity does not have primary-key. + filterEntityOfInsert(entity); + assertEntityOfInsert(entity); + return getMyDao().insert(entity); + } + + /** + * Update one entity. (Delegate-Method) + * {modified only} + * + * @param entity Entity. (NotNull) + * @return Updated count. + */ + public int delegateUpdate(Sessions entity) { + assertEntityNotNullAndHasPrimaryKeyValue(entity); + filterEntityOfUpdate(entity); + assertEntityOfUpdate(entity); + return getMyDao().updateModifiedOnly(entity); + } + + /** + * Delete one entity. (Delegate-Method) + * + * @param entity Entity. (NotNull) + * @return Deleted count. + */ + public int delegateDelete(Sessions entity) { + assertEntityNotNullAndHasPrimaryKeyValue(entity); + filterEntityOfDelete(entity); + assertEntityOfDelete(entity); + return getMyDao().delete(entity); + } + + /** + * Insert several entities. (Delegate-Method) + * + * @param entityList Entity-list. (NotNull & NotEmpty) + * @return Inserted count. + */ + public int delegateInsertList(java.util.List entityList) { + assertListNotNullAndNotEmpty(entityList); + return getMyDao().insertList(entityList); + } + + /** + * Update several entities. (Delegate-Method) + * + * @param entityList Entity-list. (NotNull & NotEmpty) + * @return Updated count. + */ + public int delegateUpdateList(java.util.List entityList) { + assertListNotNullAndNotEmpty(entityList); + return getMyDao().updateList(entityList); + } + + /** + * Delete several entities. (Delegate-Method) + * + * @param entityList Entity-list. (NotNull & NotEmpty) + * @return Deleted count. + */ + public int delegateDeleteList(java.util.List entityList) { + assertListNotNullAndNotEmpty(entityList); + return getMyDao().deleteList(entityList); + } + + // =================================================================================== + // Basic Select Count + // ================== + /** + * Select count by condition-bean. + *
+     * If the argument 'condition-bean' is effective about fetch-scope,
+     * this method invoke select count ignoring the fetch-scope.
+     * 
+ * @param cb Condition-bean. This condition-bean should not be set up about fetch-scope. (NotNull) + * @return Selected count. + */ + public int selectCount(SessionsCB cb) { + assertConditionBeanNotNull(cb); + return delegateSelectCount(cb); + } + + // =================================================================================== + // Basic Select Entity + // =================== + /** + * Select entity by condition-bean. + * + * @param cb Condition-bean. (NotNull) + * @return Selected entity. (Nullalble) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public Sessions selectEntity(SessionsCB cb) { + assertConditionBeanNotNull(cb); + final java.util.List ls = selectList(cb); + if (ls.isEmpty()) { + return null; + } + assertRecordHasBeenSelectedAsOne(ls, cb); + return (Sessions)ls.get(0); + } + + /** + * Select entity by condition-bean with deleted check. + * + * @param cb Condition-bean. (NotNull) + * @return Selected entity. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public Sessions selectEntityWithDeletedCheck(SessionsCB cb) { + assertConditionBeanNotNull(cb); + final java.util.List ls = selectList(cb); + assertRecordHasNotBeenDeleted(ls, cb); + assertRecordHasBeenSelectedAsOne(ls, cb); + return (Sessions)ls.get(0); + } + + /* + * Select entity with deleted check. {by primary-key} + * + * @param primaryKey + * @return Selected entity. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public Sessions selectByPKValueWithDeletedCheck(String sesskey) { + Sessions entity = new Sessions(); + entity.setSesskey(sesskey); + final SessionsCB cb = newMyConditionBean(); + cb.acceptPrimaryKeyMapString(getDBMeta().extractPrimaryKeyMapString(entity)); + return selectEntityWithDeletedCheck(cb); + } + + // =================================================================================== + // Basic Select List + // ================= + /** + * Select list as result-bean. + * + * @param cb Condition-bean. (NotNull) + * @return Selected list-result-bean. (NotNull) + */ + public ListResultBean selectList(SessionsCB cb) { + assertConditionBeanNotNull(cb); + return new ResultBeanBuilder(this).buildListResultBean(cb, delegateSelectList(cb)); + } + + /** + * Select page as result-bean. + * + * @param cb Condition-bean. (NotNull) + * @return Selected paging-result-bean. (NotNull) + */ + public PagingResultBean selectPage(final SessionsCB cb) { + assertConditionBeanNotNull(cb); + return selectPage(cb, new SelectPageSimpleInvoker(this)); + } + + /** + * Select page. + * + * @param cb Condition-bean. (NotNull) + * @param invoker Select-page-invoker (NotNull) + * @return Selected paging-result-bean. (NotNull) + */ + public PagingResultBean selectPage(final SessionsCB cb, SelectPageInvoker invoker) { + assertConditionBeanNotNull(cb); + final SelectPageCallback pageCallback = new SelectPageCallback() { + public PagingBean getPagingBean() { return cb; } + public int selectCountIgnoreFetchScope() { + return selectCount(cb); + } + public java.util.List selectListWithFetchScope() { + return selectList(cb); + } + }; + return invoker.invokeSelectPage(pageCallback); + } + + // =================================================================================== + // Various Select + // ============== + /** + * Select value-label list. + * + * @param cb Condition-bean. (NotNull) + * @param valueLabelSetupper Value-label-setupper. (NotNull) + * @return Value-label list. (NotNull) + */ + public java.util.List> selectValueLabelList(SessionsCB cb, ValueLabelSetupper valueLabelSetupper) { + return createValueLabelList(selectList(cb), valueLabelSetupper); + } + + // =================================================================================== + // Load Referer + // ============ + + // =================================================================================== + // Pull Out Foreign + // ================ + + // =================================================================================== + // Basic Entity Update + // =================== + /** + * Insert. + * + * @param sessions Entity. (NotNull) + */ + public void insert(Sessions sessions) { + assertEntityNotNull(sessions); + delegateInsert(sessions); + } + + protected void doCreate(Entity sessions) { + insert((Sessions)sessions); + } + + /** + * Update. + *
+     * If it updates count zero, throws exception.
+     * If concurrency control of this table is valid, this update have it.
+     * 
+ * @param sessions Entity. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public void update(Sessions sessions) { + assertEntityNotNull(sessions); + final int updatedCount = delegateUpdate(sessions); + if (updatedCount == 0) { + throw new jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException(sessions.toString()); + } else if (updatedCount > 1) { + String msg = "updatedCount=" + updatedCount + ": " + sessions.toString(); + throw new jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException(msg); + } + } + + protected void doModify(Entity sessions) { + update((Sessions)sessions); + } + + /** + * Update after select. + * + * @param sessions Entity. This must contain primary-key value at least. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + */ + public void updateAfterSelect(Sessions sessions) { + assertEntityNotNullAndHasPrimaryKeyValue(sessions); + final SessionsCB cb = newMyConditionBean(); + cb.acceptPrimaryKeyMapString(getDBMeta().extractPrimaryKeyMapString(sessions)); + final Sessions currentEntity = selectEntityWithDeletedCheck(cb); + mergeEntity(sessions, currentEntity); + update(currentEntity); + } + + protected void doModifyAfterSelect(Entity sessions) { + updateAfterSelect((Sessions)sessions); + } + + /** + * Insert or update. + * {update: modified only} + * + * @param sessions Entity. This should contain primary-key value at least(Except use identity). (NotNull) + */ + public void insertOrUpdate(Sessions sessions) { + assertEntityNotNull(sessions); + if (!sessions.hasPrimaryKeyValue()) { + insert(sessions); + } else { + try { + update(sessions); + } catch (org.seasar.dao.NotSingleRowUpdatedRuntimeException e) { + insert(sessions); + } catch (jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException e) { + insert(sessions); + } + } + } + + protected void doCreateOrUpdateNonstrict(Entity sessions) { + + insertOrUpdate((Sessions)sessions); + + } + + /** + * Insert or update after select. + * {update: modified only} + * + * @param sessions Entity. This should contain primary-key value at least(Except use identity). (NotNull) + */ + public void insertOrUpdateAfterSelect(Sessions sessions) { + assertEntityNotNull(sessions); + if (!sessions.hasPrimaryKeyValue()) { + insert(sessions); + return; + } + Sessions currentEntity = null; + try { + final SessionsCB cb = newMyConditionBean(); + cb.acceptPrimaryKeyMapString(getDBMeta().extractPrimaryKeyMapString(sessions)); + currentEntity = selectEntityWithDeletedCheck(cb); + } catch (jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException e) { + insert(sessions); + return; + } + assertEntityNotNullAndHasPrimaryKeyValue(sessions); + mergeEntity(sessions, currentEntity); + update(currentEntity); + } + + protected void doCreateOrModifyAfterSelect(Entity entity) { + insertOrUpdateAfterSelect((Sessions)entity); + } + + /** + * This method implements the method that is declared at super. + * + * @param sourceEntity Source entity. (NotNull) + * @param destinationEntity Destination entity. (NotNull) + */ + protected void mergeEntity(Entity sourceEntity, Entity destinationEntity) { + assertEntityNotNull(sourceEntity); + assertEntityNotNull(destinationEntity); + final Sessions sourceMyEntity = (Sessions)sourceEntity; + final Sessions destinationMyEntity = (Sessions)destinationEntity; + destinationMyEntity.clearModifiedPropertyNames(); + final java.util.Set names = sourceMyEntity.getModifiedPropertyNames(); + + if (names.contains("sesskey")) { destinationMyEntity.setSesskey(sourceMyEntity.getSesskey()); } + if (names.contains("expiry")) { destinationMyEntity.setExpiry(sourceMyEntity.getExpiry()); } + if (names.contains("value")) { destinationMyEntity.setValue(sourceMyEntity.getValue()); } + + } + + /** + * Delete. + * + * @param sessions Entity. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public void delete(Sessions sessions) { + assertEntityNotNull(sessions); + final int deletedCount = delegateDelete(sessions); + if (deletedCount == 0) { + throw new jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException(sessions.toString()); + } else if (deletedCount > 1) { + String msg = "deletedCount=" + deletedCount + ": " + sessions.toString(); + throw new jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException(msg); + } + } + + protected void doRemove(Entity sessions) { + delete((Sessions)sessions); + } + + /** + * Delete after select. + * + * @param sessions Entity. This must contain primary-key value at least. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + */ + public void deleteAfterSelect(Sessions sessions) { + assertEntityNotNullAndHasPrimaryKeyValue(sessions); + final SessionsCB cb = newMyConditionBean(); + cb.acceptPrimaryKeyMapString(getDBMeta().extractPrimaryKeyMapString(sessions)); + selectEntityWithDeletedCheck(cb); + delete(sessions); + } + + protected void doRemoveAfterSelect(Entity sessions) { + deleteAfterSelect((Sessions)sessions); + } + + // =================================================================================== + // Basic Batch Update + // ================== + /** + * Insert list. + * + * @param sessionsList Entity-list. (NotNull & NotEmpty) + * @return Inserted count. + */ + public int insertList(java.util.List sessionsList) { + assertListNotNullAndNotEmpty(sessionsList); + return delegateInsertList(sessionsList); + } + + /** + * Update list. + * + * @param sessionsList Entity-list. (NotNull & NotEmpty) + * @return Updated count. + */ + public int updateList(java.util.List sessionsList) { + assertListNotNullAndNotEmpty(sessionsList); + return delegateUpdateList(sessionsList); + } + + /** + * Delete list. + * + * @param sessionsList Entity-list. (NotNull & NotEmpty) + * @return Deleted count. + */ + public int deleteList(java.util.List sessionsList) { + assertListNotNullAndNotEmpty(sessionsList); + return delegateDeleteList(sessionsList); + } + + // =================================================================================== + // Various Insert + // ============== + + // =================================================================================== + // CBSetupper + // ========== + /** + * The interface of condition-bean setupper. + */ + public static interface CBSetupper extends ConditionBeanSetupper { + + /** + * Set up condition. + * + * @param cb Condition-bean. (NotNull) + */ + public void setup(SessionsCB cb); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/bsbhv/BsSpecialsBhv.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/bsbhv/BsSpecialsBhv.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/bsbhv/BsSpecialsBhv.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,701 @@ + +package jp.sf.pal.pompei.bsbhv; + +import jp.sf.pal.pompei.allcommon.*; +import jp.sf.pal.pompei.allcommon.bhv.load.LoadRefererOption; +import jp.sf.pal.pompei.allcommon.bhv.setup.ConditionBeanSetupper; +import jp.sf.pal.pompei.allcommon.bhv.setup.ValueLabelSetupper; +import jp.sf.pal.pompei.allcommon.cbean.ConditionBean; +import jp.sf.pal.pompei.allcommon.cbean.ListResultBean; +import jp.sf.pal.pompei.allcommon.cbean.PagingBean; +import jp.sf.pal.pompei.allcommon.cbean.PagingResultBean; +import jp.sf.pal.pompei.allcommon.dbmeta.DBMeta; + +import jp.sf.pal.pompei.exdao.*; +import jp.sf.pal.pompei.exentity.*; +import jp.sf.pal.pompei.bsentity.dbmeta.*; +import jp.sf.pal.pompei.cbean.*; + + + +/** + * The behavior of SPECIALS. + * + *
+ * [primary-key]
+ *     SPECIALS_ID
+ * 
+ * [column-property]
+ *     SPECIALS_ID, PRODUCTS_ID, SPECIALS_NEW_PRODUCTS_PRICE, SPECIALS_DATE_ADDED, SPECIALS_LAST_MODIFIED, EXPIRES_DATE, DATE_STATUS_CHANGE, STATUS
+ * 
+ * [foreign-property]
+ *     
+ * 
+ * [refferer-property]
+ *     
+ * 
+ * [sequence]
+ *     
+ * 
+ * [identity]
+ *     
+ * 
+ * [update-date]
+ *     
+ * 
+ * [version-no]
+ *     
+ * 
+ * 
+ * + * @author DBFlute(AutoGenerator) + */ +public abstract class BsSpecialsBhv extends jp.sf.pal.pompei.allcommon.bhv.AbstractBehaviorWritable { + + // =================================================================================== + // Attribute + // ========= + /** Dao instance. */ + protected SpecialsDao _dao; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + public BsSpecialsBhv() { + } + + // =================================================================================== + // Table name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + public String getTableDbName() { + return "SPECIALS"; + } + + // =================================================================================== + // DBMeta + // ====== + /** + * This method implements the method that is declared at super. + * + * @return DBMeta. (NotNull) + */ + public DBMeta getDBMeta() { + return SpecialsDbm.getInstance(); + } + + /** + * Get my dbmeta. + * + * @return DBMeta. (NotNull) + */ + public SpecialsDbm getMyDBMeta() { + return SpecialsDbm.getInstance(); + } + + // =================================================================================== + // Dao Accessor + // ============ + /** + * Get my dao. + * + * @return My dao. + */ + public SpecialsDao getMyDao() { + return _dao; + } + + /** + * Set my dao. + * + * @param dao My dao. (NotNull) + */ + public void setMyDao(SpecialsDao dao) { + assertObjectNotNull("dao", dao); + _dao = dao; + } + + /** + * This method implements the method that is declared at super. + * + * @return Dao-readable. (NotNull) + */ + public DaoReadable getDaoReadable() { + return getMyDao(); + } + + /** + * This method implements the method that is declared at super. + * + * @return Dao-writable. (NotNull) + */ + public DaoWritable getDaoWritable() { + return getMyDao(); + } + + // =================================================================================== + // New Instance + // ============ + /** + * New entity. + * + * @return Entity. (NotNull) + */ + public Entity newEntity() { + return newMyEntity(); + } + + /** + * New condition-bean. + * + * @return Condition-bean. (NotNull) + */ + public ConditionBean newConditionBean() { + return newMyConditionBean(); + } + + /** + * New my entity. + * + * @return My entity. (NotNull) + */ + public Specials newMyEntity() { + return new Specials(); + } + + /** + * New my condition-bean. + * + * @return My condition-bean. (NotNull) + */ + public SpecialsCB newMyConditionBean() { + return new SpecialsCB(); + } + + // =================================================================================== + // Delegate Method + // =============== + // ----------------------------------------------------- + // Select + // ------ + /** + * Get count as all. (Delegate-Method) + * + * @return All count. (NotNull) + */ + public int delegateGetCountAll() { + return getMyDao().getCountAll(); + } + + /** + * Get list as all. (Delegate-Method) + * + * @return All list. (NotNull) + */ + public java.util.List delegateGetListAll() { + return getMyDao().getListAll(); + } + + // + // Get entity. (Delegate-Method) + // + // @param Primary-keys (NotNull) + // @return Entity. (NotNull) + // + public Specials delegateGetEntity(java.math.BigDecimal specialsId) { + return getMyDao().getEntity(specialsId); + } + + /** + * Select count by condition-bean. (Delegate-Method) + * + * @param cb Condition-bean. (NotNull) + * @return Selected count. (NotNull) + */ + public int delegateSelectCount(SpecialsCB cb) { + assertConditionBeanNotNull(cb); + return getMyDao().selectCount(cb); + } + + /** + * Select entity by condition-bean. (Delegate-Method) + * + * @param cb Condition-bean. (NotNull) + * @return Selected entity. If the select result is zero, it returns null. (Nullable) + */ + public Specials delegateSelectEntity(SpecialsCB cb) { + assertConditionBeanNotNull(cb); + return getMyDao().selectEntity(cb); + } + + /** + * Select list by condition-bean. (Delegate-Method) + * + * @param cb Condition-bean. (NotNull) + * @return Selected list. If the select result is zero, it returns empty list. (NotNull) + */ + public java.util.List delegateSelectList(SpecialsCB cb) { + assertConditionBeanNotNull(cb); + return getMyDao().selectList(cb); + } + + + // ----------------------------------------------------- + // Update + // ------ + /** + * Insert one entity. (Delegate-Method) + * + * @param entity Entity. (NotNull) + * @return Inserted count. + */ + public int delegateInsert(Specials entity) { + assertEntityNotNull(entity);// If this table use identity, the entity does not have primary-key. + filterEntityOfInsert(entity); + assertEntityOfInsert(entity); + return getMyDao().insert(entity); + } + + /** + * Update one entity. (Delegate-Method) + * {modified only} + * + * @param entity Entity. (NotNull) + * @return Updated count. + */ + public int delegateUpdate(Specials entity) { + assertEntityNotNullAndHasPrimaryKeyValue(entity); + filterEntityOfUpdate(entity); + assertEntityOfUpdate(entity); + return getMyDao().updateModifiedOnly(entity); + } + + /** + * Delete one entity. (Delegate-Method) + * + * @param entity Entity. (NotNull) + * @return Deleted count. + */ + public int delegateDelete(Specials entity) { + assertEntityNotNullAndHasPrimaryKeyValue(entity); + filterEntityOfDelete(entity); + assertEntityOfDelete(entity); + return getMyDao().delete(entity); + } + + /** + * Insert several entities. (Delegate-Method) + * + * @param entityList Entity-list. (NotNull & NotEmpty) + * @return Inserted count. + */ + public int delegateInsertList(java.util.List entityList) { + assertListNotNullAndNotEmpty(entityList); + return getMyDao().insertList(entityList); + } + + /** + * Update several entities. (Delegate-Method) + * + * @param entityList Entity-list. (NotNull & NotEmpty) + * @return Updated count. + */ + public int delegateUpdateList(java.util.List entityList) { + assertListNotNullAndNotEmpty(entityList); + return getMyDao().updateList(entityList); + } + + /** + * Delete several entities. (Delegate-Method) + * + * @param entityList Entity-list. (NotNull & NotEmpty) + * @return Deleted count. + */ + public int delegateDeleteList(java.util.List entityList) { + assertListNotNullAndNotEmpty(entityList); + return getMyDao().deleteList(entityList); + } + + // =================================================================================== + // Basic Select Count + // ================== + /** + * Select count by condition-bean. + *
+     * If the argument 'condition-bean' is effective about fetch-scope,
+     * this method invoke select count ignoring the fetch-scope.
+     * 
+ * @param cb Condition-bean. This condition-bean should not be set up about fetch-scope. (NotNull) + * @return Selected count. + */ + public int selectCount(SpecialsCB cb) { + assertConditionBeanNotNull(cb); + return delegateSelectCount(cb); + } + + // =================================================================================== + // Basic Select Entity + // =================== + /** + * Select entity by condition-bean. + * + * @param cb Condition-bean. (NotNull) + * @return Selected entity. (Nullalble) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public Specials selectEntity(SpecialsCB cb) { + assertConditionBeanNotNull(cb); + final java.util.List ls = selectList(cb); + if (ls.isEmpty()) { + return null; + } + assertRecordHasBeenSelectedAsOne(ls, cb); + return (Specials)ls.get(0); + } + + /** + * Select entity by condition-bean with deleted check. + * + * @param cb Condition-bean. (NotNull) + * @return Selected entity. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public Specials selectEntityWithDeletedCheck(SpecialsCB cb) { + assertConditionBeanNotNull(cb); + final java.util.List ls = selectList(cb); + assertRecordHasNotBeenDeleted(ls, cb); + assertRecordHasBeenSelectedAsOne(ls, cb); + return (Specials)ls.get(0); + } + + /* + * Select entity with deleted check. {by primary-key} + * + * @param primaryKey + * @return Selected entity. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public Specials selectByPKValueWithDeletedCheck(java.math.BigDecimal specialsId) { + Specials entity = new Specials(); + entity.setSpecialsId(specialsId); + final SpecialsCB cb = newMyConditionBean(); + cb.acceptPrimaryKeyMapString(getDBMeta().extractPrimaryKeyMapString(entity)); + return selectEntityWithDeletedCheck(cb); + } + + // =================================================================================== + // Basic Select List + // ================= + /** + * Select list as result-bean. + * + * @param cb Condition-bean. (NotNull) + * @return Selected list-result-bean. (NotNull) + */ + public ListResultBean selectList(SpecialsCB cb) { + assertConditionBeanNotNull(cb); + return new ResultBeanBuilder(this).buildListResultBean(cb, delegateSelectList(cb)); + } + + /** + * Select page as result-bean. + * + * @param cb Condition-bean. (NotNull) + * @return Selected paging-result-bean. (NotNull) + */ + public PagingResultBean selectPage(final SpecialsCB cb) { + assertConditionBeanNotNull(cb); + return selectPage(cb, new SelectPageSimpleInvoker(this)); + } + + /** + * Select page. + * + * @param cb Condition-bean. (NotNull) + * @param invoker Select-page-invoker (NotNull) + * @return Selected paging-result-bean. (NotNull) + */ + public PagingResultBean selectPage(final SpecialsCB cb, SelectPageInvoker invoker) { + assertConditionBeanNotNull(cb); + final SelectPageCallback pageCallback = new SelectPageCallback() { + public PagingBean getPagingBean() { return cb; } + public int selectCountIgnoreFetchScope() { + return selectCount(cb); + } + public java.util.List selectListWithFetchScope() { + return selectList(cb); + } + }; + return invoker.invokeSelectPage(pageCallback); + } + + // =================================================================================== + // Various Select + // ============== + /** + * Select value-label list. + * + * @param cb Condition-bean. (NotNull) + * @param valueLabelSetupper Value-label-setupper. (NotNull) + * @return Value-label list. (NotNull) + */ + public java.util.List> selectValueLabelList(SpecialsCB cb, ValueLabelSetupper valueLabelSetupper) { + return createValueLabelList(selectList(cb), valueLabelSetupper); + } + + // =================================================================================== + // Load Referer + // ============ + + // =================================================================================== + // Pull Out Foreign + // ================ + + // =================================================================================== + // Basic Entity Update + // =================== + /** + * Insert. + * + * @param specials Entity. (NotNull) + */ + public void insert(Specials specials) { + assertEntityNotNull(specials); + delegateInsert(specials); + } + + protected void doCreate(Entity specials) { + insert((Specials)specials); + } + + /** + * Update. + *
+     * If it updates count zero, throws exception.
+     * If concurrency control of this table is valid, this update have it.
+     * 
+ * @param specials Entity. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public void update(Specials specials) { + assertEntityNotNull(specials); + final int updatedCount = delegateUpdate(specials); + if (updatedCount == 0) { + throw new jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException(specials.toString()); + } else if (updatedCount > 1) { + String msg = "updatedCount=" + updatedCount + ": " + specials.toString(); + throw new jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException(msg); + } + } + + protected void doModify(Entity specials) { + update((Specials)specials); + } + + /** + * Update after select. + * + * @param specials Entity. This must contain primary-key value at least. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + */ + public void updateAfterSelect(Specials specials) { + assertEntityNotNullAndHasPrimaryKeyValue(specials); + final SpecialsCB cb = newMyConditionBean(); + cb.acceptPrimaryKeyMapString(getDBMeta().extractPrimaryKeyMapString(specials)); + final Specials currentEntity = selectEntityWithDeletedCheck(cb); + mergeEntity(specials, currentEntity); + update(currentEntity); + } + + protected void doModifyAfterSelect(Entity specials) { + updateAfterSelect((Specials)specials); + } + + /** + * Insert or update. + * {update: modified only} + * + * @param specials Entity. This should contain primary-key value at least(Except use identity). (NotNull) + */ + public void insertOrUpdate(Specials specials) { + assertEntityNotNull(specials); + if (!specials.hasPrimaryKeyValue()) { + insert(specials); + } else { + try { + update(specials); + } catch (org.seasar.dao.NotSingleRowUpdatedRuntimeException e) { + insert(specials); + } catch (jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException e) { + insert(specials); + } + } + } + + protected void doCreateOrUpdateNonstrict(Entity specials) { + + insertOrUpdate((Specials)specials); + + } + + /** + * Insert or update after select. + * {update: modified only} + * + * @param specials Entity. This should contain primary-key value at least(Except use identity). (NotNull) + */ + public void insertOrUpdateAfterSelect(Specials specials) { + assertEntityNotNull(specials); + if (!specials.hasPrimaryKeyValue()) { + insert(specials); + return; + } + Specials currentEntity = null; + try { + final SpecialsCB cb = newMyConditionBean(); + cb.acceptPrimaryKeyMapString(getDBMeta().extractPrimaryKeyMapString(specials)); + currentEntity = selectEntityWithDeletedCheck(cb); + } catch (jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException e) { + insert(specials); + return; + } + assertEntityNotNullAndHasPrimaryKeyValue(specials); + mergeEntity(specials, currentEntity); + update(currentEntity); + } + + protected void doCreateOrModifyAfterSelect(Entity entity) { + insertOrUpdateAfterSelect((Specials)entity); + } + + /** + * This method implements the method that is declared at super. + * + * @param sourceEntity Source entity. (NotNull) + * @param destinationEntity Destination entity. (NotNull) + */ + protected void mergeEntity(Entity sourceEntity, Entity destinationEntity) { + assertEntityNotNull(sourceEntity); + assertEntityNotNull(destinationEntity); + final Specials sourceMyEntity = (Specials)sourceEntity; + final Specials destinationMyEntity = (Specials)destinationEntity; + destinationMyEntity.clearModifiedPropertyNames(); + final java.util.Set names = sourceMyEntity.getModifiedPropertyNames(); + + if (names.contains("specialsId")) { destinationMyEntity.setSpecialsId(sourceMyEntity.getSpecialsId()); } + if (names.contains("productsId")) { destinationMyEntity.setProductsId(sourceMyEntity.getProductsId()); } + if (names.contains("specialsNewProductsPrice")) { destinationMyEntity.setSpecialsNewProductsPrice(sourceMyEntity.getSpecialsNewProductsPrice()); } + if (names.contains("specialsDateAdded")) { destinationMyEntity.setSpecialsDateAdded(sourceMyEntity.getSpecialsDateAdded()); } + if (names.contains("specialsLastModified")) { destinationMyEntity.setSpecialsLastModified(sourceMyEntity.getSpecialsLastModified()); } + if (names.contains("expiresDate")) { destinationMyEntity.setExpiresDate(sourceMyEntity.getExpiresDate()); } + if (names.contains("dateStatusChange")) { destinationMyEntity.setDateStatusChange(sourceMyEntity.getDateStatusChange()); } + if (names.contains("status")) { destinationMyEntity.setStatus(sourceMyEntity.getStatus()); } + + } + + /** + * Delete. + * + * @param specials Entity. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public void delete(Specials specials) { + assertEntityNotNull(specials); + final int deletedCount = delegateDelete(specials); + if (deletedCount == 0) { + throw new jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException(specials.toString()); + } else if (deletedCount > 1) { + String msg = "deletedCount=" + deletedCount + ": " + specials.toString(); + throw new jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException(msg); + } + } + + protected void doRemove(Entity specials) { + delete((Specials)specials); + } + + /** + * Delete after select. + * + * @param specials Entity. This must contain primary-key value at least. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + */ + public void deleteAfterSelect(Specials specials) { + assertEntityNotNullAndHasPrimaryKeyValue(specials); + final SpecialsCB cb = newMyConditionBean(); + cb.acceptPrimaryKeyMapString(getDBMeta().extractPrimaryKeyMapString(specials)); + selectEntityWithDeletedCheck(cb); + delete(specials); + } + + protected void doRemoveAfterSelect(Entity specials) { + deleteAfterSelect((Specials)specials); + } + + // =================================================================================== + // Basic Batch Update + // ================== + /** + * Insert list. + * + * @param specialsList Entity-list. (NotNull & NotEmpty) + * @return Inserted count. + */ + public int insertList(java.util.List specialsList) { + assertListNotNullAndNotEmpty(specialsList); + return delegateInsertList(specialsList); + } + + /** + * Update list. + * + * @param specialsList Entity-list. (NotNull & NotEmpty) + * @return Updated count. + */ + public int updateList(java.util.List specialsList) { + assertListNotNullAndNotEmpty(specialsList); + return delegateUpdateList(specialsList); + } + + /** + * Delete list. + * + * @param specialsList Entity-list. (NotNull & NotEmpty) + * @return Deleted count. + */ + public int deleteList(java.util.List specialsList) { + assertListNotNullAndNotEmpty(specialsList); + return delegateDeleteList(specialsList); + } + + // =================================================================================== + // Various Insert + // ============== + + // =================================================================================== + // CBSetupper + // ========== + /** + * The interface of condition-bean setupper. + */ + public static interface CBSetupper extends ConditionBeanSetupper { + + /** + * Set up condition. + * + * @param cb Condition-bean. (NotNull) + */ + public void setup(SpecialsCB cb); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/bsbhv/BsTaxClassBhv.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/bsbhv/BsTaxClassBhv.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/bsbhv/BsTaxClassBhv.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,698 @@ + +package jp.sf.pal.pompei.bsbhv; + +import jp.sf.pal.pompei.allcommon.*; +import jp.sf.pal.pompei.allcommon.bhv.load.LoadRefererOption; +import jp.sf.pal.pompei.allcommon.bhv.setup.ConditionBeanSetupper; +import jp.sf.pal.pompei.allcommon.bhv.setup.ValueLabelSetupper; +import jp.sf.pal.pompei.allcommon.cbean.ConditionBean; +import jp.sf.pal.pompei.allcommon.cbean.ListResultBean; +import jp.sf.pal.pompei.allcommon.cbean.PagingBean; +import jp.sf.pal.pompei.allcommon.cbean.PagingResultBean; +import jp.sf.pal.pompei.allcommon.dbmeta.DBMeta; + +import jp.sf.pal.pompei.exdao.*; +import jp.sf.pal.pompei.exentity.*; +import jp.sf.pal.pompei.bsentity.dbmeta.*; +import jp.sf.pal.pompei.cbean.*; + + + +/** + * The behavior of TAX_CLASS. + * + *
+ * [primary-key]
+ *     TAX_CLASS_ID
+ * 
+ * [column-property]
+ *     TAX_CLASS_ID, TAX_CLASS_TITLE, TAX_CLASS_DESCRIPTION, LAST_MODIFIED, DATE_ADDED
+ * 
+ * [foreign-property]
+ *     
+ * 
+ * [refferer-property]
+ *     
+ * 
+ * [sequence]
+ *     
+ * 
+ * [identity]
+ *     
+ * 
+ * [update-date]
+ *     
+ * 
+ * [version-no]
+ *     
+ * 
+ * 
+ * + * @author DBFlute(AutoGenerator) + */ +public abstract class BsTaxClassBhv extends jp.sf.pal.pompei.allcommon.bhv.AbstractBehaviorWritable { + + // =================================================================================== + // Attribute + // ========= + /** Dao instance. */ + protected TaxClassDao _dao; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + public BsTaxClassBhv() { + } + + // =================================================================================== + // Table name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + public String getTableDbName() { + return "TAX_CLASS"; + } + + // =================================================================================== + // DBMeta + // ====== + /** + * This method implements the method that is declared at super. + * + * @return DBMeta. (NotNull) + */ + public DBMeta getDBMeta() { + return TaxClassDbm.getInstance(); + } + + /** + * Get my dbmeta. + * + * @return DBMeta. (NotNull) + */ + public TaxClassDbm getMyDBMeta() { + return TaxClassDbm.getInstance(); + } + + // =================================================================================== + // Dao Accessor + // ============ + /** + * Get my dao. + * + * @return My dao. + */ + public TaxClassDao getMyDao() { + return _dao; + } + + /** + * Set my dao. + * + * @param dao My dao. (NotNull) + */ + public void setMyDao(TaxClassDao dao) { + assertObjectNotNull("dao", dao); + _dao = dao; + } + + /** + * This method implements the method that is declared at super. + * + * @return Dao-readable. (NotNull) + */ + public DaoReadable getDaoReadable() { + return getMyDao(); + } + + /** + * This method implements the method that is declared at super. + * + * @return Dao-writable. (NotNull) + */ + public DaoWritable getDaoWritable() { + return getMyDao(); + } + + // =================================================================================== + // New Instance + // ============ + /** + * New entity. + * + * @return Entity. (NotNull) + */ + public Entity newEntity() { + return newMyEntity(); + } + + /** + * New condition-bean. + * + * @return Condition-bean. (NotNull) + */ + public ConditionBean newConditionBean() { + return newMyConditionBean(); + } + + /** + * New my entity. + * + * @return My entity. (NotNull) + */ + public TaxClass newMyEntity() { + return new TaxClass(); + } + + /** + * New my condition-bean. + * + * @return My condition-bean. (NotNull) + */ + public TaxClassCB newMyConditionBean() { + return new TaxClassCB(); + } + + // =================================================================================== + // Delegate Method + // =============== + // ----------------------------------------------------- + // Select + // ------ + /** + * Get count as all. (Delegate-Method) + * + * @return All count. (NotNull) + */ + public int delegateGetCountAll() { + return getMyDao().getCountAll(); + } + + /** + * Get list as all. (Delegate-Method) + * + * @return All list. (NotNull) + */ + public java.util.List delegateGetListAll() { + return getMyDao().getListAll(); + } + + // + // Get entity. (Delegate-Method) + // + // @param Primary-keys (NotNull) + // @return Entity. (NotNull) + // + public TaxClass delegateGetEntity(java.math.BigDecimal taxClassId) { + return getMyDao().getEntity(taxClassId); + } + + /** + * Select count by condition-bean. (Delegate-Method) + * + * @param cb Condition-bean. (NotNull) + * @return Selected count. (NotNull) + */ + public int delegateSelectCount(TaxClassCB cb) { + assertConditionBeanNotNull(cb); + return getMyDao().selectCount(cb); + } + + /** + * Select entity by condition-bean. (Delegate-Method) + * + * @param cb Condition-bean. (NotNull) + * @return Selected entity. If the select result is zero, it returns null. (Nullable) + */ + public TaxClass delegateSelectEntity(TaxClassCB cb) { + assertConditionBeanNotNull(cb); + return getMyDao().selectEntity(cb); + } + + /** + * Select list by condition-bean. (Delegate-Method) + * + * @param cb Condition-bean. (NotNull) + * @return Selected list. If the select result is zero, it returns empty list. (NotNull) + */ + public java.util.List delegateSelectList(TaxClassCB cb) { + assertConditionBeanNotNull(cb); + return getMyDao().selectList(cb); + } + + + // ----------------------------------------------------- + // Update + // ------ + /** + * Insert one entity. (Delegate-Method) + * + * @param entity Entity. (NotNull) + * @return Inserted count. + */ + public int delegateInsert(TaxClass entity) { + assertEntityNotNull(entity);// If this table use identity, the entity does not have primary-key. + filterEntityOfInsert(entity); + assertEntityOfInsert(entity); + return getMyDao().insert(entity); + } + + /** + * Update one entity. (Delegate-Method) + * {modified only} + * + * @param entity Entity. (NotNull) + * @return Updated count. + */ + public int delegateUpdate(TaxClass entity) { + assertEntityNotNullAndHasPrimaryKeyValue(entity); + filterEntityOfUpdate(entity); + assertEntityOfUpdate(entity); + return getMyDao().updateModifiedOnly(entity); + } + + /** + * Delete one entity. (Delegate-Method) + * + * @param entity Entity. (NotNull) + * @return Deleted count. + */ + public int delegateDelete(TaxClass entity) { + assertEntityNotNullAndHasPrimaryKeyValue(entity); + filterEntityOfDelete(entity); + assertEntityOfDelete(entity); + return getMyDao().delete(entity); + } + + /** + * Insert several entities. (Delegate-Method) + * + * @param entityList Entity-list. (NotNull & NotEmpty) + * @return Inserted count. + */ + public int delegateInsertList(java.util.List entityList) { + assertListNotNullAndNotEmpty(entityList); + return getMyDao().insertList(entityList); + } + + /** + * Update several entities. (Delegate-Method) + * + * @param entityList Entity-list. (NotNull & NotEmpty) + * @return Updated count. + */ + public int delegateUpdateList(java.util.List entityList) { + assertListNotNullAndNotEmpty(entityList); + return getMyDao().updateList(entityList); + } + + /** + * Delete several entities. (Delegate-Method) + * + * @param entityList Entity-list. (NotNull & NotEmpty) + * @return Deleted count. + */ + public int delegateDeleteList(java.util.List entityList) { + assertListNotNullAndNotEmpty(entityList); + return getMyDao().deleteList(entityList); + } + + // =================================================================================== + // Basic Select Count + // ================== + /** + * Select count by condition-bean. + *
+     * If the argument 'condition-bean' is effective about fetch-scope,
+     * this method invoke select count ignoring the fetch-scope.
+     * 
+ * @param cb Condition-bean. This condition-bean should not be set up about fetch-scope. (NotNull) + * @return Selected count. + */ + public int selectCount(TaxClassCB cb) { + assertConditionBeanNotNull(cb); + return delegateSelectCount(cb); + } + + // =================================================================================== + // Basic Select Entity + // =================== + /** + * Select entity by condition-bean. + * + * @param cb Condition-bean. (NotNull) + * @return Selected entity. (Nullalble) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public TaxClass selectEntity(TaxClassCB cb) { + assertConditionBeanNotNull(cb); + final java.util.List ls = selectList(cb); + if (ls.isEmpty()) { + return null; + } + assertRecordHasBeenSelectedAsOne(ls, cb); + return (TaxClass)ls.get(0); + } + + /** + * Select entity by condition-bean with deleted check. + * + * @param cb Condition-bean. (NotNull) + * @return Selected entity. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public TaxClass selectEntityWithDeletedCheck(TaxClassCB cb) { + assertConditionBeanNotNull(cb); + final java.util.List ls = selectList(cb); + assertRecordHasNotBeenDeleted(ls, cb); + assertRecordHasBeenSelectedAsOne(ls, cb); + return (TaxClass)ls.get(0); + } + + /* + * Select entity with deleted check. {by primary-key} + * + * @param primaryKey + * @return Selected entity. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public TaxClass selectByPKValueWithDeletedCheck(java.math.BigDecimal taxClassId) { + TaxClass entity = new TaxClass(); + entity.setTaxClassId(taxClassId); + final TaxClassCB cb = newMyConditionBean(); + cb.acceptPrimaryKeyMapString(getDBMeta().extractPrimaryKeyMapString(entity)); + return selectEntityWithDeletedCheck(cb); + } + + // =================================================================================== + // Basic Select List + // ================= + /** + * Select list as result-bean. + * + * @param cb Condition-bean. (NotNull) + * @return Selected list-result-bean. (NotNull) + */ + public ListResultBean selectList(TaxClassCB cb) { + assertConditionBeanNotNull(cb); + return new ResultBeanBuilder(this).buildListResultBean(cb, delegateSelectList(cb)); + } + + /** + * Select page as result-bean. + * + * @param cb Condition-bean. (NotNull) + * @return Selected paging-result-bean. (NotNull) + */ + public PagingResultBean selectPage(final TaxClassCB cb) { + assertConditionBeanNotNull(cb); + return selectPage(cb, new SelectPageSimpleInvoker(this)); + } + + /** + * Select page. + * + * @param cb Condition-bean. (NotNull) + * @param invoker Select-page-invoker (NotNull) + * @return Selected paging-result-bean. (NotNull) + */ + public PagingResultBean selectPage(final TaxClassCB cb, SelectPageInvoker invoker) { + assertConditionBeanNotNull(cb); + final SelectPageCallback pageCallback = new SelectPageCallback() { + public PagingBean getPagingBean() { return cb; } + public int selectCountIgnoreFetchScope() { + return selectCount(cb); + } + public java.util.List selectListWithFetchScope() { + return selectList(cb); + } + }; + return invoker.invokeSelectPage(pageCallback); + } + + // =================================================================================== + // Various Select + // ============== + /** + * Select value-label list. + * + * @param cb Condition-bean. (NotNull) + * @param valueLabelSetupper Value-label-setupper. (NotNull) + * @return Value-label list. (NotNull) + */ + public java.util.List> selectValueLabelList(TaxClassCB cb, ValueLabelSetupper valueLabelSetupper) { + return createValueLabelList(selectList(cb), valueLabelSetupper); + } + + // =================================================================================== + // Load Referer + // ============ + + // =================================================================================== + // Pull Out Foreign + // ================ + + // =================================================================================== + // Basic Entity Update + // =================== + /** + * Insert. + * + * @param taxClass Entity. (NotNull) + */ + public void insert(TaxClass taxClass) { + assertEntityNotNull(taxClass); + delegateInsert(taxClass); + } + + protected void doCreate(Entity taxClass) { + insert((TaxClass)taxClass); + } + + /** + * Update. + *
+     * If it updates count zero, throws exception.
+     * If concurrency control of this table is valid, this update have it.
+     * 
+ * @param taxClass Entity. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public void update(TaxClass taxClass) { + assertEntityNotNull(taxClass); + final int updatedCount = delegateUpdate(taxClass); + if (updatedCount == 0) { + throw new jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException(taxClass.toString()); + } else if (updatedCount > 1) { + String msg = "updatedCount=" + updatedCount + ": " + taxClass.toString(); + throw new jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException(msg); + } + } + + protected void doModify(Entity taxClass) { + update((TaxClass)taxClass); + } + + /** + * Update after select. + * + * @param taxClass Entity. This must contain primary-key value at least. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + */ + public void updateAfterSelect(TaxClass taxClass) { + assertEntityNotNullAndHasPrimaryKeyValue(taxClass); + final TaxClassCB cb = newMyConditionBean(); + cb.acceptPrimaryKeyMapString(getDBMeta().extractPrimaryKeyMapString(taxClass)); + final TaxClass currentEntity = selectEntityWithDeletedCheck(cb); + mergeEntity(taxClass, currentEntity); + update(currentEntity); + } + + protected void doModifyAfterSelect(Entity taxClass) { + updateAfterSelect((TaxClass)taxClass); + } + + /** + * Insert or update. + * {update: modified only} + * + * @param taxClass Entity. This should contain primary-key value at least(Except use identity). (NotNull) + */ + public void insertOrUpdate(TaxClass taxClass) { + assertEntityNotNull(taxClass); + if (!taxClass.hasPrimaryKeyValue()) { + insert(taxClass); + } else { + try { + update(taxClass); + } catch (org.seasar.dao.NotSingleRowUpdatedRuntimeException e) { + insert(taxClass); + } catch (jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException e) { + insert(taxClass); + } + } + } + + protected void doCreateOrUpdateNonstrict(Entity taxClass) { + + insertOrUpdate((TaxClass)taxClass); + + } + + /** + * Insert or update after select. + * {update: modified only} + * + * @param taxClass Entity. This should contain primary-key value at least(Except use identity). (NotNull) + */ + public void insertOrUpdateAfterSelect(TaxClass taxClass) { + assertEntityNotNull(taxClass); + if (!taxClass.hasPrimaryKeyValue()) { + insert(taxClass); + return; + } + TaxClass currentEntity = null; + try { + final TaxClassCB cb = newMyConditionBean(); + cb.acceptPrimaryKeyMapString(getDBMeta().extractPrimaryKeyMapString(taxClass)); + currentEntity = selectEntityWithDeletedCheck(cb); + } catch (jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException e) { + insert(taxClass); + return; + } + assertEntityNotNullAndHasPrimaryKeyValue(taxClass); + mergeEntity(taxClass, currentEntity); + update(currentEntity); + } + + protected void doCreateOrModifyAfterSelect(Entity entity) { + insertOrUpdateAfterSelect((TaxClass)entity); + } + + /** + * This method implements the method that is declared at super. + * + * @param sourceEntity Source entity. (NotNull) + * @param destinationEntity Destination entity. (NotNull) + */ + protected void mergeEntity(Entity sourceEntity, Entity destinationEntity) { + assertEntityNotNull(sourceEntity); + assertEntityNotNull(destinationEntity); + final TaxClass sourceMyEntity = (TaxClass)sourceEntity; + final TaxClass destinationMyEntity = (TaxClass)destinationEntity; + destinationMyEntity.clearModifiedPropertyNames(); + final java.util.Set names = sourceMyEntity.getModifiedPropertyNames(); + + if (names.contains("taxClassId")) { destinationMyEntity.setTaxClassId(sourceMyEntity.getTaxClassId()); } + if (names.contains("taxClassTitle")) { destinationMyEntity.setTaxClassTitle(sourceMyEntity.getTaxClassTitle()); } + if (names.contains("taxClassDescription")) { destinationMyEntity.setTaxClassDescription(sourceMyEntity.getTaxClassDescription()); } + if (names.contains("lastModified")) { destinationMyEntity.setLastModified(sourceMyEntity.getLastModified()); } + if (names.contains("dateAdded")) { destinationMyEntity.setDateAdded(sourceMyEntity.getDateAdded()); } + + } + + /** + * Delete. + * + * @param taxClass Entity. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public void delete(TaxClass taxClass) { + assertEntityNotNull(taxClass); + final int deletedCount = delegateDelete(taxClass); + if (deletedCount == 0) { + throw new jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException(taxClass.toString()); + } else if (deletedCount > 1) { + String msg = "deletedCount=" + deletedCount + ": " + taxClass.toString(); + throw new jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException(msg); + } + } + + protected void doRemove(Entity taxClass) { + delete((TaxClass)taxClass); + } + + /** + * Delete after select. + * + * @param taxClass Entity. This must contain primary-key value at least. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + */ + public void deleteAfterSelect(TaxClass taxClass) { + assertEntityNotNullAndHasPrimaryKeyValue(taxClass); + final TaxClassCB cb = newMyConditionBean(); + cb.acceptPrimaryKeyMapString(getDBMeta().extractPrimaryKeyMapString(taxClass)); + selectEntityWithDeletedCheck(cb); + delete(taxClass); + } + + protected void doRemoveAfterSelect(Entity taxClass) { + deleteAfterSelect((TaxClass)taxClass); + } + + // =================================================================================== + // Basic Batch Update + // ================== + /** + * Insert list. + * + * @param taxClassList Entity-list. (NotNull & NotEmpty) + * @return Inserted count. + */ + public int insertList(java.util.List taxClassList) { + assertListNotNullAndNotEmpty(taxClassList); + return delegateInsertList(taxClassList); + } + + /** + * Update list. + * + * @param taxClassList Entity-list. (NotNull & NotEmpty) + * @return Updated count. + */ + public int updateList(java.util.List taxClassList) { + assertListNotNullAndNotEmpty(taxClassList); + return delegateUpdateList(taxClassList); + } + + /** + * Delete list. + * + * @param taxClassList Entity-list. (NotNull & NotEmpty) + * @return Deleted count. + */ + public int deleteList(java.util.List taxClassList) { + assertListNotNullAndNotEmpty(taxClassList); + return delegateDeleteList(taxClassList); + } + + // =================================================================================== + // Various Insert + // ============== + + // =================================================================================== + // CBSetupper + // ========== + /** + * The interface of condition-bean setupper. + */ + public static interface CBSetupper extends ConditionBeanSetupper { + + /** + * Set up condition. + * + * @param cb Condition-bean. (NotNull) + */ + public void setup(TaxClassCB cb); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/bsbhv/BsTaxRatesBhv.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/bsbhv/BsTaxRatesBhv.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/bsbhv/BsTaxRatesBhv.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,701 @@ + +package jp.sf.pal.pompei.bsbhv; + +import jp.sf.pal.pompei.allcommon.*; +import jp.sf.pal.pompei.allcommon.bhv.load.LoadRefererOption; +import jp.sf.pal.pompei.allcommon.bhv.setup.ConditionBeanSetupper; +import jp.sf.pal.pompei.allcommon.bhv.setup.ValueLabelSetupper; +import jp.sf.pal.pompei.allcommon.cbean.ConditionBean; +import jp.sf.pal.pompei.allcommon.cbean.ListResultBean; +import jp.sf.pal.pompei.allcommon.cbean.PagingBean; +import jp.sf.pal.pompei.allcommon.cbean.PagingResultBean; +import jp.sf.pal.pompei.allcommon.dbmeta.DBMeta; + +import jp.sf.pal.pompei.exdao.*; +import jp.sf.pal.pompei.exentity.*; +import jp.sf.pal.pompei.bsentity.dbmeta.*; +import jp.sf.pal.pompei.cbean.*; + + + +/** + * The behavior of TAX_RATES. + * + *
+ * [primary-key]
+ *     TAX_RATES_ID
+ * 
+ * [column-property]
+ *     TAX_RATES_ID, TAX_ZONE_ID, TAX_CLASS_ID, TAX_PRIORITY, TAX_RATE, TAX_DESCRIPTION, LAST_MODIFIED, DATE_ADDED
+ * 
+ * [foreign-property]
+ *     
+ * 
+ * [refferer-property]
+ *     
+ * 
+ * [sequence]
+ *     
+ * 
+ * [identity]
+ *     
+ * 
+ * [update-date]
+ *     
+ * 
+ * [version-no]
+ *     
+ * 
+ * 
+ * + * @author DBFlute(AutoGenerator) + */ +public abstract class BsTaxRatesBhv extends jp.sf.pal.pompei.allcommon.bhv.AbstractBehaviorWritable { + + // =================================================================================== + // Attribute + // ========= + /** Dao instance. */ + protected TaxRatesDao _dao; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + public BsTaxRatesBhv() { + } + + // =================================================================================== + // Table name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + public String getTableDbName() { + return "TAX_RATES"; + } + + // =================================================================================== + // DBMeta + // ====== + /** + * This method implements the method that is declared at super. + * + * @return DBMeta. (NotNull) + */ + public DBMeta getDBMeta() { + return TaxRatesDbm.getInstance(); + } + + /** + * Get my dbmeta. + * + * @return DBMeta. (NotNull) + */ + public TaxRatesDbm getMyDBMeta() { + return TaxRatesDbm.getInstance(); + } + + // =================================================================================== + // Dao Accessor + // ============ + /** + * Get my dao. + * + * @return My dao. + */ + public TaxRatesDao getMyDao() { + return _dao; + } + + /** + * Set my dao. + * + * @param dao My dao. (NotNull) + */ + public void setMyDao(TaxRatesDao dao) { + assertObjectNotNull("dao", dao); + _dao = dao; + } + + /** + * This method implements the method that is declared at super. + * + * @return Dao-readable. (NotNull) + */ + public DaoReadable getDaoReadable() { + return getMyDao(); + } + + /** + * This method implements the method that is declared at super. + * + * @return Dao-writable. (NotNull) + */ + public DaoWritable getDaoWritable() { + return getMyDao(); + } + + // =================================================================================== + // New Instance + // ============ + /** + * New entity. + * + * @return Entity. (NotNull) + */ + public Entity newEntity() { + return newMyEntity(); + } + + /** + * New condition-bean. + * + * @return Condition-bean. (NotNull) + */ + public ConditionBean newConditionBean() { + return newMyConditionBean(); + } + + /** + * New my entity. + * + * @return My entity. (NotNull) + */ + public TaxRates newMyEntity() { + return new TaxRates(); + } + + /** + * New my condition-bean. + * + * @return My condition-bean. (NotNull) + */ + public TaxRatesCB newMyConditionBean() { + return new TaxRatesCB(); + } + + // =================================================================================== + // Delegate Method + // =============== + // ----------------------------------------------------- + // Select + // ------ + /** + * Get count as all. (Delegate-Method) + * + * @return All count. (NotNull) + */ + public int delegateGetCountAll() { + return getMyDao().getCountAll(); + } + + /** + * Get list as all. (Delegate-Method) + * + * @return All list. (NotNull) + */ + public java.util.List delegateGetListAll() { + return getMyDao().getListAll(); + } + + // + // Get entity. (Delegate-Method) + // + // @param Primary-keys (NotNull) + // @return Entity. (NotNull) + // + public TaxRates delegateGetEntity(java.math.BigDecimal taxRatesId) { + return getMyDao().getEntity(taxRatesId); + } + + /** + * Select count by condition-bean. (Delegate-Method) + * + * @param cb Condition-bean. (NotNull) + * @return Selected count. (NotNull) + */ + public int delegateSelectCount(TaxRatesCB cb) { + assertConditionBeanNotNull(cb); + return getMyDao().selectCount(cb); + } + + /** + * Select entity by condition-bean. (Delegate-Method) + * + * @param cb Condition-bean. (NotNull) + * @return Selected entity. If the select result is zero, it returns null. (Nullable) + */ + public TaxRates delegateSelectEntity(TaxRatesCB cb) { + assertConditionBeanNotNull(cb); + return getMyDao().selectEntity(cb); + } + + /** + * Select list by condition-bean. (Delegate-Method) + * + * @param cb Condition-bean. (NotNull) + * @return Selected list. If the select result is zero, it returns empty list. (NotNull) + */ + public java.util.List delegateSelectList(TaxRatesCB cb) { + assertConditionBeanNotNull(cb); + return getMyDao().selectList(cb); + } + + + // ----------------------------------------------------- + // Update + // ------ + /** + * Insert one entity. (Delegate-Method) + * + * @param entity Entity. (NotNull) + * @return Inserted count. + */ + public int delegateInsert(TaxRates entity) { + assertEntityNotNull(entity);// If this table use identity, the entity does not have primary-key. + filterEntityOfInsert(entity); + assertEntityOfInsert(entity); + return getMyDao().insert(entity); + } + + /** + * Update one entity. (Delegate-Method) + * {modified only} + * + * @param entity Entity. (NotNull) + * @return Updated count. + */ + public int delegateUpdate(TaxRates entity) { + assertEntityNotNullAndHasPrimaryKeyValue(entity); + filterEntityOfUpdate(entity); + assertEntityOfUpdate(entity); + return getMyDao().updateModifiedOnly(entity); + } + + /** + * Delete one entity. (Delegate-Method) + * + * @param entity Entity. (NotNull) + * @return Deleted count. + */ + public int delegateDelete(TaxRates entity) { + assertEntityNotNullAndHasPrimaryKeyValue(entity); + filterEntityOfDelete(entity); + assertEntityOfDelete(entity); + return getMyDao().delete(entity); + } + + /** + * Insert several entities. (Delegate-Method) + * + * @param entityList Entity-list. (NotNull & NotEmpty) + * @return Inserted count. + */ + public int delegateInsertList(java.util.List entityList) { + assertListNotNullAndNotEmpty(entityList); + return getMyDao().insertList(entityList); + } + + /** + * Update several entities. (Delegate-Method) + * + * @param entityList Entity-list. (NotNull & NotEmpty) + * @return Updated count. + */ + public int delegateUpdateList(java.util.List entityList) { + assertListNotNullAndNotEmpty(entityList); + return getMyDao().updateList(entityList); + } + + /** + * Delete several entities. (Delegate-Method) + * + * @param entityList Entity-list. (NotNull & NotEmpty) + * @return Deleted count. + */ + public int delegateDeleteList(java.util.List entityList) { + assertListNotNullAndNotEmpty(entityList); + return getMyDao().deleteList(entityList); + } + + // =================================================================================== + // Basic Select Count + // ================== + /** + * Select count by condition-bean. + *
+     * If the argument 'condition-bean' is effective about fetch-scope,
+     * this method invoke select count ignoring the fetch-scope.
+     * 
+ * @param cb Condition-bean. This condition-bean should not be set up about fetch-scope. (NotNull) + * @return Selected count. + */ + public int selectCount(TaxRatesCB cb) { + assertConditionBeanNotNull(cb); + return delegateSelectCount(cb); + } + + // =================================================================================== + // Basic Select Entity + // =================== + /** + * Select entity by condition-bean. + * + * @param cb Condition-bean. (NotNull) + * @return Selected entity. (Nullalble) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public TaxRates selectEntity(TaxRatesCB cb) { + assertConditionBeanNotNull(cb); + final java.util.List ls = selectList(cb); + if (ls.isEmpty()) { + return null; + } + assertRecordHasBeenSelectedAsOne(ls, cb); + return (TaxRates)ls.get(0); + } + + /** + * Select entity by condition-bean with deleted check. + * + * @param cb Condition-bean. (NotNull) + * @return Selected entity. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public TaxRates selectEntityWithDeletedCheck(TaxRatesCB cb) { + assertConditionBeanNotNull(cb); + final java.util.List ls = selectList(cb); + assertRecordHasNotBeenDeleted(ls, cb); + assertRecordHasBeenSelectedAsOne(ls, cb); + return (TaxRates)ls.get(0); + } + + /* + * Select entity with deleted check. {by primary-key} + * + * @param primaryKey + * @return Selected entity. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public TaxRates selectByPKValueWithDeletedCheck(java.math.BigDecimal taxRatesId) { + TaxRates entity = new TaxRates(); + entity.setTaxRatesId(taxRatesId); + final TaxRatesCB cb = newMyConditionBean(); + cb.acceptPrimaryKeyMapString(getDBMeta().extractPrimaryKeyMapString(entity)); + return selectEntityWithDeletedCheck(cb); + } + + // =================================================================================== + // Basic Select List + // ================= + /** + * Select list as result-bean. + * + * @param cb Condition-bean. (NotNull) + * @return Selected list-result-bean. (NotNull) + */ + public ListResultBean selectList(TaxRatesCB cb) { + assertConditionBeanNotNull(cb); + return new ResultBeanBuilder(this).buildListResultBean(cb, delegateSelectList(cb)); + } + + /** + * Select page as result-bean. + * + * @param cb Condition-bean. (NotNull) + * @return Selected paging-result-bean. (NotNull) + */ + public PagingResultBean selectPage(final TaxRatesCB cb) { + assertConditionBeanNotNull(cb); + return selectPage(cb, new SelectPageSimpleInvoker(this)); + } + + /** + * Select page. + * + * @param cb Condition-bean. (NotNull) + * @param invoker Select-page-invoker (NotNull) + * @return Selected paging-result-bean. (NotNull) + */ + public PagingResultBean selectPage(final TaxRatesCB cb, SelectPageInvoker invoker) { + assertConditionBeanNotNull(cb); + final SelectPageCallback pageCallback = new SelectPageCallback() { + public PagingBean getPagingBean() { return cb; } + public int selectCountIgnoreFetchScope() { + return selectCount(cb); + } + public java.util.List selectListWithFetchScope() { + return selectList(cb); + } + }; + return invoker.invokeSelectPage(pageCallback); + } + + // =================================================================================== + // Various Select + // ============== + /** + * Select value-label list. + * + * @param cb Condition-bean. (NotNull) + * @param valueLabelSetupper Value-label-setupper. (NotNull) + * @return Value-label list. (NotNull) + */ + public java.util.List> selectValueLabelList(TaxRatesCB cb, ValueLabelSetupper valueLabelSetupper) { + return createValueLabelList(selectList(cb), valueLabelSetupper); + } + + // =================================================================================== + // Load Referer + // ============ + + // =================================================================================== + // Pull Out Foreign + // ================ + + // =================================================================================== + // Basic Entity Update + // =================== + /** + * Insert. + * + * @param taxRates Entity. (NotNull) + */ + public void insert(TaxRates taxRates) { + assertEntityNotNull(taxRates); + delegateInsert(taxRates); + } + + protected void doCreate(Entity taxRates) { + insert((TaxRates)taxRates); + } + + /** + * Update. + *
+     * If it updates count zero, throws exception.
+     * If concurrency control of this table is valid, this update have it.
+     * 
+ * @param taxRates Entity. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public void update(TaxRates taxRates) { + assertEntityNotNull(taxRates); + final int updatedCount = delegateUpdate(taxRates); + if (updatedCount == 0) { + throw new jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException(taxRates.toString()); + } else if (updatedCount > 1) { + String msg = "updatedCount=" + updatedCount + ": " + taxRates.toString(); + throw new jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException(msg); + } + } + + protected void doModify(Entity taxRates) { + update((TaxRates)taxRates); + } + + /** + * Update after select. + * + * @param taxRates Entity. This must contain primary-key value at least. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + */ + public void updateAfterSelect(TaxRates taxRates) { + assertEntityNotNullAndHasPrimaryKeyValue(taxRates); + final TaxRatesCB cb = newMyConditionBean(); + cb.acceptPrimaryKeyMapString(getDBMeta().extractPrimaryKeyMapString(taxRates)); + final TaxRates currentEntity = selectEntityWithDeletedCheck(cb); + mergeEntity(taxRates, currentEntity); + update(currentEntity); + } + + protected void doModifyAfterSelect(Entity taxRates) { + updateAfterSelect((TaxRates)taxRates); + } + + /** + * Insert or update. + * {update: modified only} + * + * @param taxRates Entity. This should contain primary-key value at least(Except use identity). (NotNull) + */ + public void insertOrUpdate(TaxRates taxRates) { + assertEntityNotNull(taxRates); + if (!taxRates.hasPrimaryKeyValue()) { + insert(taxRates); + } else { + try { + update(taxRates); + } catch (org.seasar.dao.NotSingleRowUpdatedRuntimeException e) { + insert(taxRates); + } catch (jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException e) { + insert(taxRates); + } + } + } + + protected void doCreateOrUpdateNonstrict(Entity taxRates) { + + insertOrUpdate((TaxRates)taxRates); + + } + + /** + * Insert or update after select. + * {update: modified only} + * + * @param taxRates Entity. This should contain primary-key value at least(Except use identity). (NotNull) + */ + public void insertOrUpdateAfterSelect(TaxRates taxRates) { + assertEntityNotNull(taxRates); + if (!taxRates.hasPrimaryKeyValue()) { + insert(taxRates); + return; + } + TaxRates currentEntity = null; + try { + final TaxRatesCB cb = newMyConditionBean(); + cb.acceptPrimaryKeyMapString(getDBMeta().extractPrimaryKeyMapString(taxRates)); + currentEntity = selectEntityWithDeletedCheck(cb); + } catch (jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException e) { + insert(taxRates); + return; + } + assertEntityNotNullAndHasPrimaryKeyValue(taxRates); + mergeEntity(taxRates, currentEntity); + update(currentEntity); + } + + protected void doCreateOrModifyAfterSelect(Entity entity) { + insertOrUpdateAfterSelect((TaxRates)entity); + } + + /** + * This method implements the method that is declared at super. + * + * @param sourceEntity Source entity. (NotNull) + * @param destinationEntity Destination entity. (NotNull) + */ + protected void mergeEntity(Entity sourceEntity, Entity destinationEntity) { + assertEntityNotNull(sourceEntity); + assertEntityNotNull(destinationEntity); + final TaxRates sourceMyEntity = (TaxRates)sourceEntity; + final TaxRates destinationMyEntity = (TaxRates)destinationEntity; + destinationMyEntity.clearModifiedPropertyNames(); + final java.util.Set names = sourceMyEntity.getModifiedPropertyNames(); + + if (names.contains("taxRatesId")) { destinationMyEntity.setTaxRatesId(sourceMyEntity.getTaxRatesId()); } + if (names.contains("taxZoneId")) { destinationMyEntity.setTaxZoneId(sourceMyEntity.getTaxZoneId()); } + if (names.contains("taxClassId")) { destinationMyEntity.setTaxClassId(sourceMyEntity.getTaxClassId()); } + if (names.contains("taxPriority")) { destinationMyEntity.setTaxPriority(sourceMyEntity.getTaxPriority()); } + if (names.contains("taxRate")) { destinationMyEntity.setTaxRate(sourceMyEntity.getTaxRate()); } + if (names.contains("taxDescription")) { destinationMyEntity.setTaxDescription(sourceMyEntity.getTaxDescription()); } + if (names.contains("lastModified")) { destinationMyEntity.setLastModified(sourceMyEntity.getLastModified()); } + if (names.contains("dateAdded")) { destinationMyEntity.setDateAdded(sourceMyEntity.getDateAdded()); } + + } + + /** + * Delete. + * + * @param taxRates Entity. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public void delete(TaxRates taxRates) { + assertEntityNotNull(taxRates); + final int deletedCount = delegateDelete(taxRates); + if (deletedCount == 0) { + throw new jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException(taxRates.toString()); + } else if (deletedCount > 1) { + String msg = "deletedCount=" + deletedCount + ": " + taxRates.toString(); + throw new jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException(msg); + } + } + + protected void doRemove(Entity taxRates) { + delete((TaxRates)taxRates); + } + + /** + * Delete after select. + * + * @param taxRates Entity. This must contain primary-key value at least. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + */ + public void deleteAfterSelect(TaxRates taxRates) { + assertEntityNotNullAndHasPrimaryKeyValue(taxRates); + final TaxRatesCB cb = newMyConditionBean(); + cb.acceptPrimaryKeyMapString(getDBMeta().extractPrimaryKeyMapString(taxRates)); + selectEntityWithDeletedCheck(cb); + delete(taxRates); + } + + protected void doRemoveAfterSelect(Entity taxRates) { + deleteAfterSelect((TaxRates)taxRates); + } + + // =================================================================================== + // Basic Batch Update + // ================== + /** + * Insert list. + * + * @param taxRatesList Entity-list. (NotNull & NotEmpty) + * @return Inserted count. + */ + public int insertList(java.util.List taxRatesList) { + assertListNotNullAndNotEmpty(taxRatesList); + return delegateInsertList(taxRatesList); + } + + /** + * Update list. + * + * @param taxRatesList Entity-list. (NotNull & NotEmpty) + * @return Updated count. + */ + public int updateList(java.util.List taxRatesList) { + assertListNotNullAndNotEmpty(taxRatesList); + return delegateUpdateList(taxRatesList); + } + + /** + * Delete list. + * + * @param taxRatesList Entity-list. (NotNull & NotEmpty) + * @return Deleted count. + */ + public int deleteList(java.util.List taxRatesList) { + assertListNotNullAndNotEmpty(taxRatesList); + return delegateDeleteList(taxRatesList); + } + + // =================================================================================== + // Various Insert + // ============== + + // =================================================================================== + // CBSetupper + // ========== + /** + * The interface of condition-bean setupper. + */ + public static interface CBSetupper extends ConditionBeanSetupper { + + /** + * Set up condition. + * + * @param cb Condition-bean. (NotNull) + */ + public void setup(TaxRatesCB cb); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/bsbhv/BsWhosOnlineBhv.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/bsbhv/BsWhosOnlineBhv.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/bsbhv/BsWhosOnlineBhv.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,365 @@ + +package jp.sf.pal.pompei.bsbhv; + +import jp.sf.pal.pompei.allcommon.*; +import jp.sf.pal.pompei.allcommon.bhv.load.LoadRefererOption; +import jp.sf.pal.pompei.allcommon.bhv.setup.ConditionBeanSetupper; +import jp.sf.pal.pompei.allcommon.bhv.setup.ValueLabelSetupper; +import jp.sf.pal.pompei.allcommon.cbean.ConditionBean; +import jp.sf.pal.pompei.allcommon.cbean.ListResultBean; +import jp.sf.pal.pompei.allcommon.cbean.PagingBean; +import jp.sf.pal.pompei.allcommon.cbean.PagingResultBean; +import jp.sf.pal.pompei.allcommon.dbmeta.DBMeta; + +import jp.sf.pal.pompei.exdao.*; +import jp.sf.pal.pompei.exentity.*; +import jp.sf.pal.pompei.bsentity.dbmeta.*; +import jp.sf.pal.pompei.cbean.*; + + + +/** + * The behavior of WHOS_ONLINE. + * + *
+ * [primary-key]
+ *     
+ * 
+ * [column-property]
+ *     CUSTOMER_ID, FULL_NAME, SESSION_ID, IP_ADDRESS, TIME_ENTRY, TIME_LAST_CLICK, LAST_PAGE_URL
+ * 
+ * [foreign-property]
+ *     
+ * 
+ * [refferer-property]
+ *     
+ * 
+ * [sequence]
+ *     
+ * 
+ * [identity]
+ *     
+ * 
+ * [update-date]
+ *     
+ * 
+ * [version-no]
+ *     
+ * 
+ * 
+ * + * @author DBFlute(AutoGenerator) + */ +public abstract class BsWhosOnlineBhv extends jp.sf.pal.pompei.allcommon.bhv.AbstractBehaviorReadable { + + // =================================================================================== + // Attribute + // ========= + /** Dao instance. */ + protected WhosOnlineDao _dao; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + public BsWhosOnlineBhv() { + } + + // =================================================================================== + // Table name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + public String getTableDbName() { + return "WHOS_ONLINE"; + } + + // =================================================================================== + // DBMeta + // ====== + /** + * This method implements the method that is declared at super. + * + * @return DBMeta. (NotNull) + */ + public DBMeta getDBMeta() { + return WhosOnlineDbm.getInstance(); + } + + /** + * Get my dbmeta. + * + * @return DBMeta. (NotNull) + */ + public WhosOnlineDbm getMyDBMeta() { + return WhosOnlineDbm.getInstance(); + } + + // =================================================================================== + // Dao Accessor + // ============ + /** + * Get my dao. + * + * @return My dao. + */ + public WhosOnlineDao getMyDao() { + return _dao; + } + + /** + * Set my dao. + * + * @param dao My dao. (NotNull) + */ + public void setMyDao(WhosOnlineDao dao) { + assertObjectNotNull("dao", dao); + _dao = dao; + } + + /** + * This method implements the method that is declared at super. + * + * @return Dao-readable. (NotNull) + */ + public DaoReadable getDaoReadable() { + return getMyDao(); + } + + + // =================================================================================== + // New Instance + // ============ + /** + * New entity. + * + * @return Entity. (NotNull) + */ + public Entity newEntity() { + return newMyEntity(); + } + + /** + * New condition-bean. + * + * @return Condition-bean. (NotNull) + */ + public ConditionBean newConditionBean() { + return newMyConditionBean(); + } + + /** + * New my entity. + * + * @return My entity. (NotNull) + */ + public WhosOnline newMyEntity() { + return new WhosOnline(); + } + + /** + * New my condition-bean. + * + * @return My condition-bean. (NotNull) + */ + public WhosOnlineCB newMyConditionBean() { + return new WhosOnlineCB(); + } + + // =================================================================================== + // Delegate Method + // =============== + // ----------------------------------------------------- + // Select + // ------ + /** + * Get count as all. (Delegate-Method) + * + * @return All count. (NotNull) + */ + public int delegateGetCountAll() { + return getMyDao().getCountAll(); + } + + /** + * Get list as all. (Delegate-Method) + * + * @return All list. (NotNull) + */ + public java.util.List delegateGetListAll() { + return getMyDao().getListAll(); + } + + /** + * Select count by condition-bean. (Delegate-Method) + * + * @param cb Condition-bean. (NotNull) + * @return Selected count. (NotNull) + */ + public int delegateSelectCount(WhosOnlineCB cb) { + assertConditionBeanNotNull(cb); + return getMyDao().selectCount(cb); + } + + /** + * Select entity by condition-bean. (Delegate-Method) + * + * @param cb Condition-bean. (NotNull) + * @return Selected entity. If the select result is zero, it returns null. (Nullable) + */ + public WhosOnline delegateSelectEntity(WhosOnlineCB cb) { + assertConditionBeanNotNull(cb); + return getMyDao().selectEntity(cb); + } + + /** + * Select list by condition-bean. (Delegate-Method) + * + * @param cb Condition-bean. (NotNull) + * @return Selected list. If the select result is zero, it returns empty list. (NotNull) + */ + public java.util.List delegateSelectList(WhosOnlineCB cb) { + assertConditionBeanNotNull(cb); + return getMyDao().selectList(cb); + } + + + + // =================================================================================== + // Basic Select Count + // ================== + /** + * Select count by condition-bean. + *
+     * If the argument 'condition-bean' is effective about fetch-scope,
+     * this method invoke select count ignoring the fetch-scope.
+     * 
+ * @param cb Condition-bean. This condition-bean should not be set up about fetch-scope. (NotNull) + * @return Selected count. + */ + public int selectCount(WhosOnlineCB cb) { + assertConditionBeanNotNull(cb); + return delegateSelectCount(cb); + } + + // =================================================================================== + // Basic Select Entity + // =================== + /** + * Select entity by condition-bean. + * + * @param cb Condition-bean. (NotNull) + * @return Selected entity. (Nullalble) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public WhosOnline selectEntity(WhosOnlineCB cb) { + assertConditionBeanNotNull(cb); + final java.util.List ls = selectList(cb); + if (ls.isEmpty()) { + return null; + } + assertRecordHasBeenSelectedAsOne(ls, cb); + return (WhosOnline)ls.get(0); + } + + /** + * Select entity by condition-bean with deleted check. + * + * @param cb Condition-bean. (NotNull) + * @return Selected entity. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public WhosOnline selectEntityWithDeletedCheck(WhosOnlineCB cb) { + assertConditionBeanNotNull(cb); + final java.util.List ls = selectList(cb); + assertRecordHasNotBeenDeleted(ls, cb); + assertRecordHasBeenSelectedAsOne(ls, cb); + return (WhosOnline)ls.get(0); + } + + // =================================================================================== + // Basic Select List + // ================= + /** + * Select list as result-bean. + * + * @param cb Condition-bean. (NotNull) + * @return Selected list-result-bean. (NotNull) + */ + public ListResultBean selectList(WhosOnlineCB cb) { + assertConditionBeanNotNull(cb); + return new ResultBeanBuilder(this).buildListResultBean(cb, delegateSelectList(cb)); + } + + /** + * Select page as result-bean. + * + * @param cb Condition-bean. (NotNull) + * @return Selected paging-result-bean. (NotNull) + */ + public PagingResultBean selectPage(final WhosOnlineCB cb) { + assertConditionBeanNotNull(cb); + return selectPage(cb, new SelectPageSimpleInvoker(this)); + } + + /** + * Select page. + * + * @param cb Condition-bean. (NotNull) + * @param invoker Select-page-invoker (NotNull) + * @return Selected paging-result-bean. (NotNull) + */ + public PagingResultBean selectPage(final WhosOnlineCB cb, SelectPageInvoker invoker) { + assertConditionBeanNotNull(cb); + final SelectPageCallback pageCallback = new SelectPageCallback() { + public PagingBean getPagingBean() { return cb; } + public int selectCountIgnoreFetchScope() { + return selectCount(cb); + } + public java.util.List selectListWithFetchScope() { + return selectList(cb); + } + }; + return invoker.invokeSelectPage(pageCallback); + } + + // =================================================================================== + // Various Select + // ============== + /** + * Select value-label list. + * + * @param cb Condition-bean. (NotNull) + * @param valueLabelSetupper Value-label-setupper. (NotNull) + * @return Value-label list. (NotNull) + */ + public java.util.List> selectValueLabelList(WhosOnlineCB cb, ValueLabelSetupper valueLabelSetupper) { + return createValueLabelList(selectList(cb), valueLabelSetupper); + } + + // =================================================================================== + // Pull Out Foreign + // ================ + + // =================================================================================== + // CBSetupper + // ========== + /** + * The interface of condition-bean setupper. + */ + public static interface CBSetupper extends ConditionBeanSetupper { + + /** + * Set up condition. + * + * @param cb Condition-bean. (NotNull) + */ + public void setup(WhosOnlineCB cb); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/bsbhv/BsZonesBhv.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/bsbhv/BsZonesBhv.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/bsbhv/BsZonesBhv.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,697 @@ + +package jp.sf.pal.pompei.bsbhv; + +import jp.sf.pal.pompei.allcommon.*; +import jp.sf.pal.pompei.allcommon.bhv.load.LoadRefererOption; +import jp.sf.pal.pompei.allcommon.bhv.setup.ConditionBeanSetupper; +import jp.sf.pal.pompei.allcommon.bhv.setup.ValueLabelSetupper; +import jp.sf.pal.pompei.allcommon.cbean.ConditionBean; +import jp.sf.pal.pompei.allcommon.cbean.ListResultBean; +import jp.sf.pal.pompei.allcommon.cbean.PagingBean; +import jp.sf.pal.pompei.allcommon.cbean.PagingResultBean; +import jp.sf.pal.pompei.allcommon.dbmeta.DBMeta; + +import jp.sf.pal.pompei.exdao.*; +import jp.sf.pal.pompei.exentity.*; +import jp.sf.pal.pompei.bsentity.dbmeta.*; +import jp.sf.pal.pompei.cbean.*; + + + +/** + * The behavior of ZONES. + * + *
+ * [primary-key]
+ *     ZONE_ID
+ * 
+ * [column-property]
+ *     ZONE_ID, ZONE_COUNTRY_ID, ZONE_CODE, ZONE_NAME
+ * 
+ * [foreign-property]
+ *     
+ * 
+ * [refferer-property]
+ *     
+ * 
+ * [sequence]
+ *     
+ * 
+ * [identity]
+ *     
+ * 
+ * [update-date]
+ *     
+ * 
+ * [version-no]
+ *     
+ * 
+ * 
+ * + * @author DBFlute(AutoGenerator) + */ +public abstract class BsZonesBhv extends jp.sf.pal.pompei.allcommon.bhv.AbstractBehaviorWritable { + + // =================================================================================== + // Attribute + // ========= + /** Dao instance. */ + protected ZonesDao _dao; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + public BsZonesBhv() { + } + + // =================================================================================== + // Table name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + public String getTableDbName() { + return "ZONES"; + } + + // =================================================================================== + // DBMeta + // ====== + /** + * This method implements the method that is declared at super. + * + * @return DBMeta. (NotNull) + */ + public DBMeta getDBMeta() { + return ZonesDbm.getInstance(); + } + + /** + * Get my dbmeta. + * + * @return DBMeta. (NotNull) + */ + public ZonesDbm getMyDBMeta() { + return ZonesDbm.getInstance(); + } + + // =================================================================================== + // Dao Accessor + // ============ + /** + * Get my dao. + * + * @return My dao. + */ + public ZonesDao getMyDao() { + return _dao; + } + + /** + * Set my dao. + * + * @param dao My dao. (NotNull) + */ + public void setMyDao(ZonesDao dao) { + assertObjectNotNull("dao", dao); + _dao = dao; + } + + /** + * This method implements the method that is declared at super. + * + * @return Dao-readable. (NotNull) + */ + public DaoReadable getDaoReadable() { + return getMyDao(); + } + + /** + * This method implements the method that is declared at super. + * + * @return Dao-writable. (NotNull) + */ + public DaoWritable getDaoWritable() { + return getMyDao(); + } + + // =================================================================================== + // New Instance + // ============ + /** + * New entity. + * + * @return Entity. (NotNull) + */ + public Entity newEntity() { + return newMyEntity(); + } + + /** + * New condition-bean. + * + * @return Condition-bean. (NotNull) + */ + public ConditionBean newConditionBean() { + return newMyConditionBean(); + } + + /** + * New my entity. + * + * @return My entity. (NotNull) + */ + public Zones newMyEntity() { + return new Zones(); + } + + /** + * New my condition-bean. + * + * @return My condition-bean. (NotNull) + */ + public ZonesCB newMyConditionBean() { + return new ZonesCB(); + } + + // =================================================================================== + // Delegate Method + // =============== + // ----------------------------------------------------- + // Select + // ------ + /** + * Get count as all. (Delegate-Method) + * + * @return All count. (NotNull) + */ + public int delegateGetCountAll() { + return getMyDao().getCountAll(); + } + + /** + * Get list as all. (Delegate-Method) + * + * @return All list. (NotNull) + */ + public java.util.List delegateGetListAll() { + return getMyDao().getListAll(); + } + + // + // Get entity. (Delegate-Method) + // + // @param Primary-keys (NotNull) + // @return Entity. (NotNull) + // + public Zones delegateGetEntity(java.math.BigDecimal zoneId) { + return getMyDao().getEntity(zoneId); + } + + /** + * Select count by condition-bean. (Delegate-Method) + * + * @param cb Condition-bean. (NotNull) + * @return Selected count. (NotNull) + */ + public int delegateSelectCount(ZonesCB cb) { + assertConditionBeanNotNull(cb); + return getMyDao().selectCount(cb); + } + + /** + * Select entity by condition-bean. (Delegate-Method) + * + * @param cb Condition-bean. (NotNull) + * @return Selected entity. If the select result is zero, it returns null. (Nullable) + */ + public Zones delegateSelectEntity(ZonesCB cb) { + assertConditionBeanNotNull(cb); + return getMyDao().selectEntity(cb); + } + + /** + * Select list by condition-bean. (Delegate-Method) + * + * @param cb Condition-bean. (NotNull) + * @return Selected list. If the select result is zero, it returns empty list. (NotNull) + */ + public java.util.List delegateSelectList(ZonesCB cb) { + assertConditionBeanNotNull(cb); + return getMyDao().selectList(cb); + } + + + // ----------------------------------------------------- + // Update + // ------ + /** + * Insert one entity. (Delegate-Method) + * + * @param entity Entity. (NotNull) + * @return Inserted count. + */ + public int delegateInsert(Zones entity) { + assertEntityNotNull(entity);// If this table use identity, the entity does not have primary-key. + filterEntityOfInsert(entity); + assertEntityOfInsert(entity); + return getMyDao().insert(entity); + } + + /** + * Update one entity. (Delegate-Method) + * {modified only} + * + * @param entity Entity. (NotNull) + * @return Updated count. + */ + public int delegateUpdate(Zones entity) { + assertEntityNotNullAndHasPrimaryKeyValue(entity); + filterEntityOfUpdate(entity); + assertEntityOfUpdate(entity); + return getMyDao().updateModifiedOnly(entity); + } + + /** + * Delete one entity. (Delegate-Method) + * + * @param entity Entity. (NotNull) + * @return Deleted count. + */ + public int delegateDelete(Zones entity) { + assertEntityNotNullAndHasPrimaryKeyValue(entity); + filterEntityOfDelete(entity); + assertEntityOfDelete(entity); + return getMyDao().delete(entity); + } + + /** + * Insert several entities. (Delegate-Method) + * + * @param entityList Entity-list. (NotNull & NotEmpty) + * @return Inserted count. + */ + public int delegateInsertList(java.util.List entityList) { + assertListNotNullAndNotEmpty(entityList); + return getMyDao().insertList(entityList); + } + + /** + * Update several entities. (Delegate-Method) + * + * @param entityList Entity-list. (NotNull & NotEmpty) + * @return Updated count. + */ + public int delegateUpdateList(java.util.List entityList) { + assertListNotNullAndNotEmpty(entityList); + return getMyDao().updateList(entityList); + } + + /** + * Delete several entities. (Delegate-Method) + * + * @param entityList Entity-list. (NotNull & NotEmpty) + * @return Deleted count. + */ + public int delegateDeleteList(java.util.List entityList) { + assertListNotNullAndNotEmpty(entityList); + return getMyDao().deleteList(entityList); + } + + // =================================================================================== + // Basic Select Count + // ================== + /** + * Select count by condition-bean. + *
+     * If the argument 'condition-bean' is effective about fetch-scope,
+     * this method invoke select count ignoring the fetch-scope.
+     * 
+ * @param cb Condition-bean. This condition-bean should not be set up about fetch-scope. (NotNull) + * @return Selected count. + */ + public int selectCount(ZonesCB cb) { + assertConditionBeanNotNull(cb); + return delegateSelectCount(cb); + } + + // =================================================================================== + // Basic Select Entity + // =================== + /** + * Select entity by condition-bean. + * + * @param cb Condition-bean. (NotNull) + * @return Selected entity. (Nullalble) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public Zones selectEntity(ZonesCB cb) { + assertConditionBeanNotNull(cb); + final java.util.List ls = selectList(cb); + if (ls.isEmpty()) { + return null; + } + assertRecordHasBeenSelectedAsOne(ls, cb); + return (Zones)ls.get(0); + } + + /** + * Select entity by condition-bean with deleted check. + * + * @param cb Condition-bean. (NotNull) + * @return Selected entity. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public Zones selectEntityWithDeletedCheck(ZonesCB cb) { + assertConditionBeanNotNull(cb); + final java.util.List ls = selectList(cb); + assertRecordHasNotBeenDeleted(ls, cb); + assertRecordHasBeenSelectedAsOne(ls, cb); + return (Zones)ls.get(0); + } + + /* + * Select entity with deleted check. {by primary-key} + * + * @param primaryKey + * @return Selected entity. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public Zones selectByPKValueWithDeletedCheck(java.math.BigDecimal zoneId) { + Zones entity = new Zones(); + entity.setZoneId(zoneId); + final ZonesCB cb = newMyConditionBean(); + cb.acceptPrimaryKeyMapString(getDBMeta().extractPrimaryKeyMapString(entity)); + return selectEntityWithDeletedCheck(cb); + } + + // =================================================================================== + // Basic Select List + // ================= + /** + * Select list as result-bean. + * + * @param cb Condition-bean. (NotNull) + * @return Selected list-result-bean. (NotNull) + */ + public ListResultBean selectList(ZonesCB cb) { + assertConditionBeanNotNull(cb); + return new ResultBeanBuilder(this).buildListResultBean(cb, delegateSelectList(cb)); + } + + /** + * Select page as result-bean. + * + * @param cb Condition-bean. (NotNull) + * @return Selected paging-result-bean. (NotNull) + */ + public PagingResultBean selectPage(final ZonesCB cb) { + assertConditionBeanNotNull(cb); + return selectPage(cb, new SelectPageSimpleInvoker(this)); + } + + /** + * Select page. + * + * @param cb Condition-bean. (NotNull) + * @param invoker Select-page-invoker (NotNull) + * @return Selected paging-result-bean. (NotNull) + */ + public PagingResultBean selectPage(final ZonesCB cb, SelectPageInvoker invoker) { + assertConditionBeanNotNull(cb); + final SelectPageCallback pageCallback = new SelectPageCallback() { + public PagingBean getPagingBean() { return cb; } + public int selectCountIgnoreFetchScope() { + return selectCount(cb); + } + public java.util.List selectListWithFetchScope() { + return selectList(cb); + } + }; + return invoker.invokeSelectPage(pageCallback); + } + + // =================================================================================== + // Various Select + // ============== + /** + * Select value-label list. + * + * @param cb Condition-bean. (NotNull) + * @param valueLabelSetupper Value-label-setupper. (NotNull) + * @return Value-label list. (NotNull) + */ + public java.util.List> selectValueLabelList(ZonesCB cb, ValueLabelSetupper valueLabelSetupper) { + return createValueLabelList(selectList(cb), valueLabelSetupper); + } + + // =================================================================================== + // Load Referer + // ============ + + // =================================================================================== + // Pull Out Foreign + // ================ + + // =================================================================================== + // Basic Entity Update + // =================== + /** + * Insert. + * + * @param zones Entity. (NotNull) + */ + public void insert(Zones zones) { + assertEntityNotNull(zones); + delegateInsert(zones); + } + + protected void doCreate(Entity zones) { + insert((Zones)zones); + } + + /** + * Update. + *
+     * If it updates count zero, throws exception.
+     * If concurrency control of this table is valid, this update have it.
+     * 
+ * @param zones Entity. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public void update(Zones zones) { + assertEntityNotNull(zones); + final int updatedCount = delegateUpdate(zones); + if (updatedCount == 0) { + throw new jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException(zones.toString()); + } else if (updatedCount > 1) { + String msg = "updatedCount=" + updatedCount + ": " + zones.toString(); + throw new jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException(msg); + } + } + + protected void doModify(Entity zones) { + update((Zones)zones); + } + + /** + * Update after select. + * + * @param zones Entity. This must contain primary-key value at least. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + */ + public void updateAfterSelect(Zones zones) { + assertEntityNotNullAndHasPrimaryKeyValue(zones); + final ZonesCB cb = newMyConditionBean(); + cb.acceptPrimaryKeyMapString(getDBMeta().extractPrimaryKeyMapString(zones)); + final Zones currentEntity = selectEntityWithDeletedCheck(cb); + mergeEntity(zones, currentEntity); + update(currentEntity); + } + + protected void doModifyAfterSelect(Entity zones) { + updateAfterSelect((Zones)zones); + } + + /** + * Insert or update. + * {update: modified only} + * + * @param zones Entity. This should contain primary-key value at least(Except use identity). (NotNull) + */ + public void insertOrUpdate(Zones zones) { + assertEntityNotNull(zones); + if (!zones.hasPrimaryKeyValue()) { + insert(zones); + } else { + try { + update(zones); + } catch (org.seasar.dao.NotSingleRowUpdatedRuntimeException e) { + insert(zones); + } catch (jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException e) { + insert(zones); + } + } + } + + protected void doCreateOrUpdateNonstrict(Entity zones) { + + insertOrUpdate((Zones)zones); + + } + + /** + * Insert or update after select. + * {update: modified only} + * + * @param zones Entity. This should contain primary-key value at least(Except use identity). (NotNull) + */ + public void insertOrUpdateAfterSelect(Zones zones) { + assertEntityNotNull(zones); + if (!zones.hasPrimaryKeyValue()) { + insert(zones); + return; + } + Zones currentEntity = null; + try { + final ZonesCB cb = newMyConditionBean(); + cb.acceptPrimaryKeyMapString(getDBMeta().extractPrimaryKeyMapString(zones)); + currentEntity = selectEntityWithDeletedCheck(cb); + } catch (jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException e) { + insert(zones); + return; + } + assertEntityNotNullAndHasPrimaryKeyValue(zones); + mergeEntity(zones, currentEntity); + update(currentEntity); + } + + protected void doCreateOrModifyAfterSelect(Entity entity) { + insertOrUpdateAfterSelect((Zones)entity); + } + + /** + * This method implements the method that is declared at super. + * + * @param sourceEntity Source entity. (NotNull) + * @param destinationEntity Destination entity. (NotNull) + */ + protected void mergeEntity(Entity sourceEntity, Entity destinationEntity) { + assertEntityNotNull(sourceEntity); + assertEntityNotNull(destinationEntity); + final Zones sourceMyEntity = (Zones)sourceEntity; + final Zones destinationMyEntity = (Zones)destinationEntity; + destinationMyEntity.clearModifiedPropertyNames(); + final java.util.Set names = sourceMyEntity.getModifiedPropertyNames(); + + if (names.contains("zoneId")) { destinationMyEntity.setZoneId(sourceMyEntity.getZoneId()); } + if (names.contains("zoneCountryId")) { destinationMyEntity.setZoneCountryId(sourceMyEntity.getZoneCountryId()); } + if (names.contains("zoneCode")) { destinationMyEntity.setZoneCode(sourceMyEntity.getZoneCode()); } + if (names.contains("zoneName")) { destinationMyEntity.setZoneName(sourceMyEntity.getZoneName()); } + + } + + /** + * Delete. + * + * @param zones Entity. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public void delete(Zones zones) { + assertEntityNotNull(zones); + final int deletedCount = delegateDelete(zones); + if (deletedCount == 0) { + throw new jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException(zones.toString()); + } else if (deletedCount > 1) { + String msg = "deletedCount=" + deletedCount + ": " + zones.toString(); + throw new jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException(msg); + } + } + + protected void doRemove(Entity zones) { + delete((Zones)zones); + } + + /** + * Delete after select. + * + * @param zones Entity. This must contain primary-key value at least. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + */ + public void deleteAfterSelect(Zones zones) { + assertEntityNotNullAndHasPrimaryKeyValue(zones); + final ZonesCB cb = newMyConditionBean(); + cb.acceptPrimaryKeyMapString(getDBMeta().extractPrimaryKeyMapString(zones)); + selectEntityWithDeletedCheck(cb); + delete(zones); + } + + protected void doRemoveAfterSelect(Entity zones) { + deleteAfterSelect((Zones)zones); + } + + // =================================================================================== + // Basic Batch Update + // ================== + /** + * Insert list. + * + * @param zonesList Entity-list. (NotNull & NotEmpty) + * @return Inserted count. + */ + public int insertList(java.util.List zonesList) { + assertListNotNullAndNotEmpty(zonesList); + return delegateInsertList(zonesList); + } + + /** + * Update list. + * + * @param zonesList Entity-list. (NotNull & NotEmpty) + * @return Updated count. + */ + public int updateList(java.util.List zonesList) { + assertListNotNullAndNotEmpty(zonesList); + return delegateUpdateList(zonesList); + } + + /** + * Delete list. + * + * @param zonesList Entity-list. (NotNull & NotEmpty) + * @return Deleted count. + */ + public int deleteList(java.util.List zonesList) { + assertListNotNullAndNotEmpty(zonesList); + return delegateDeleteList(zonesList); + } + + // =================================================================================== + // Various Insert + // ============== + + // =================================================================================== + // CBSetupper + // ========== + /** + * The interface of condition-bean setupper. + */ + public static interface CBSetupper extends ConditionBeanSetupper { + + /** + * Set up condition. + * + * @param cb Condition-bean. (NotNull) + */ + public void setup(ZonesCB cb); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/bsbhv/BsZonesToGeoZonesBhv.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/bsbhv/BsZonesToGeoZonesBhv.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/bsbhv/BsZonesToGeoZonesBhv.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,699 @@ + +package jp.sf.pal.pompei.bsbhv; + +import jp.sf.pal.pompei.allcommon.*; +import jp.sf.pal.pompei.allcommon.bhv.load.LoadRefererOption; +import jp.sf.pal.pompei.allcommon.bhv.setup.ConditionBeanSetupper; +import jp.sf.pal.pompei.allcommon.bhv.setup.ValueLabelSetupper; +import jp.sf.pal.pompei.allcommon.cbean.ConditionBean; +import jp.sf.pal.pompei.allcommon.cbean.ListResultBean; +import jp.sf.pal.pompei.allcommon.cbean.PagingBean; +import jp.sf.pal.pompei.allcommon.cbean.PagingResultBean; +import jp.sf.pal.pompei.allcommon.dbmeta.DBMeta; + +import jp.sf.pal.pompei.exdao.*; +import jp.sf.pal.pompei.exentity.*; +import jp.sf.pal.pompei.bsentity.dbmeta.*; +import jp.sf.pal.pompei.cbean.*; + + + +/** + * The behavior of ZONES_TO_GEO_ZONES. + * + *
+ * [primary-key]
+ *     ASSOCIATION_ID
+ * 
+ * [column-property]
+ *     ASSOCIATION_ID, ZONE_COUNTRY_ID, ZONE_ID, GEO_ZONE_ID, LAST_MODIFIED, DATE_ADDED
+ * 
+ * [foreign-property]
+ *     
+ * 
+ * [refferer-property]
+ *     
+ * 
+ * [sequence]
+ *     
+ * 
+ * [identity]
+ *     
+ * 
+ * [update-date]
+ *     
+ * 
+ * [version-no]
+ *     
+ * 
+ * 
+ * + * @author DBFlute(AutoGenerator) + */ +public abstract class BsZonesToGeoZonesBhv extends jp.sf.pal.pompei.allcommon.bhv.AbstractBehaviorWritable { + + // =================================================================================== + // Attribute + // ========= + /** Dao instance. */ + protected ZonesToGeoZonesDao _dao; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + public BsZonesToGeoZonesBhv() { + } + + // =================================================================================== + // Table name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + public String getTableDbName() { + return "ZONES_TO_GEO_ZONES"; + } + + // =================================================================================== + // DBMeta + // ====== + /** + * This method implements the method that is declared at super. + * + * @return DBMeta. (NotNull) + */ + public DBMeta getDBMeta() { + return ZonesToGeoZonesDbm.getInstance(); + } + + /** + * Get my dbmeta. + * + * @return DBMeta. (NotNull) + */ + public ZonesToGeoZonesDbm getMyDBMeta() { + return ZonesToGeoZonesDbm.getInstance(); + } + + // =================================================================================== + // Dao Accessor + // ============ + /** + * Get my dao. + * + * @return My dao. + */ + public ZonesToGeoZonesDao getMyDao() { + return _dao; + } + + /** + * Set my dao. + * + * @param dao My dao. (NotNull) + */ + public void setMyDao(ZonesToGeoZonesDao dao) { + assertObjectNotNull("dao", dao); + _dao = dao; + } + + /** + * This method implements the method that is declared at super. + * + * @return Dao-readable. (NotNull) + */ + public DaoReadable getDaoReadable() { + return getMyDao(); + } + + /** + * This method implements the method that is declared at super. + * + * @return Dao-writable. (NotNull) + */ + public DaoWritable getDaoWritable() { + return getMyDao(); + } + + // =================================================================================== + // New Instance + // ============ + /** + * New entity. + * + * @return Entity. (NotNull) + */ + public Entity newEntity() { + return newMyEntity(); + } + + /** + * New condition-bean. + * + * @return Condition-bean. (NotNull) + */ + public ConditionBean newConditionBean() { + return newMyConditionBean(); + } + + /** + * New my entity. + * + * @return My entity. (NotNull) + */ + public ZonesToGeoZones newMyEntity() { + return new ZonesToGeoZones(); + } + + /** + * New my condition-bean. + * + * @return My condition-bean. (NotNull) + */ + public ZonesToGeoZonesCB newMyConditionBean() { + return new ZonesToGeoZonesCB(); + } + + // =================================================================================== + // Delegate Method + // =============== + // ----------------------------------------------------- + // Select + // ------ + /** + * Get count as all. (Delegate-Method) + * + * @return All count. (NotNull) + */ + public int delegateGetCountAll() { + return getMyDao().getCountAll(); + } + + /** + * Get list as all. (Delegate-Method) + * + * @return All list. (NotNull) + */ + public java.util.List delegateGetListAll() { + return getMyDao().getListAll(); + } + + // + // Get entity. (Delegate-Method) + // + // @param Primary-keys (NotNull) + // @return Entity. (NotNull) + // + public ZonesToGeoZones delegateGetEntity(java.math.BigDecimal associationId) { + return getMyDao().getEntity(associationId); + } + + /** + * Select count by condition-bean. (Delegate-Method) + * + * @param cb Condition-bean. (NotNull) + * @return Selected count. (NotNull) + */ + public int delegateSelectCount(ZonesToGeoZonesCB cb) { + assertConditionBeanNotNull(cb); + return getMyDao().selectCount(cb); + } + + /** + * Select entity by condition-bean. (Delegate-Method) + * + * @param cb Condition-bean. (NotNull) + * @return Selected entity. If the select result is zero, it returns null. (Nullable) + */ + public ZonesToGeoZones delegateSelectEntity(ZonesToGeoZonesCB cb) { + assertConditionBeanNotNull(cb); + return getMyDao().selectEntity(cb); + } + + /** + * Select list by condition-bean. (Delegate-Method) + * + * @param cb Condition-bean. (NotNull) + * @return Selected list. If the select result is zero, it returns empty list. (NotNull) + */ + public java.util.List delegateSelectList(ZonesToGeoZonesCB cb) { + assertConditionBeanNotNull(cb); + return getMyDao().selectList(cb); + } + + + // ----------------------------------------------------- + // Update + // ------ + /** + * Insert one entity. (Delegate-Method) + * + * @param entity Entity. (NotNull) + * @return Inserted count. + */ + public int delegateInsert(ZonesToGeoZones entity) { + assertEntityNotNull(entity);// If this table use identity, the entity does not have primary-key. + filterEntityOfInsert(entity); + assertEntityOfInsert(entity); + return getMyDao().insert(entity); + } + + /** + * Update one entity. (Delegate-Method) + * {modified only} + * + * @param entity Entity. (NotNull) + * @return Updated count. + */ + public int delegateUpdate(ZonesToGeoZones entity) { + assertEntityNotNullAndHasPrimaryKeyValue(entity); + filterEntityOfUpdate(entity); + assertEntityOfUpdate(entity); + return getMyDao().updateModifiedOnly(entity); + } + + /** + * Delete one entity. (Delegate-Method) + * + * @param entity Entity. (NotNull) + * @return Deleted count. + */ + public int delegateDelete(ZonesToGeoZones entity) { + assertEntityNotNullAndHasPrimaryKeyValue(entity); + filterEntityOfDelete(entity); + assertEntityOfDelete(entity); + return getMyDao().delete(entity); + } + + /** + * Insert several entities. (Delegate-Method) + * + * @param entityList Entity-list. (NotNull & NotEmpty) + * @return Inserted count. + */ + public int delegateInsertList(java.util.List entityList) { + assertListNotNullAndNotEmpty(entityList); + return getMyDao().insertList(entityList); + } + + /** + * Update several entities. (Delegate-Method) + * + * @param entityList Entity-list. (NotNull & NotEmpty) + * @return Updated count. + */ + public int delegateUpdateList(java.util.List entityList) { + assertListNotNullAndNotEmpty(entityList); + return getMyDao().updateList(entityList); + } + + /** + * Delete several entities. (Delegate-Method) + * + * @param entityList Entity-list. (NotNull & NotEmpty) + * @return Deleted count. + */ + public int delegateDeleteList(java.util.List entityList) { + assertListNotNullAndNotEmpty(entityList); + return getMyDao().deleteList(entityList); + } + + // =================================================================================== + // Basic Select Count + // ================== + /** + * Select count by condition-bean. + *
+     * If the argument 'condition-bean' is effective about fetch-scope,
+     * this method invoke select count ignoring the fetch-scope.
+     * 
+ * @param cb Condition-bean. This condition-bean should not be set up about fetch-scope. (NotNull) + * @return Selected count. + */ + public int selectCount(ZonesToGeoZonesCB cb) { + assertConditionBeanNotNull(cb); + return delegateSelectCount(cb); + } + + // =================================================================================== + // Basic Select Entity + // =================== + /** + * Select entity by condition-bean. + * + * @param cb Condition-bean. (NotNull) + * @return Selected entity. (Nullalble) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public ZonesToGeoZones selectEntity(ZonesToGeoZonesCB cb) { + assertConditionBeanNotNull(cb); + final java.util.List ls = selectList(cb); + if (ls.isEmpty()) { + return null; + } + assertRecordHasBeenSelectedAsOne(ls, cb); + return (ZonesToGeoZones)ls.get(0); + } + + /** + * Select entity by condition-bean with deleted check. + * + * @param cb Condition-bean. (NotNull) + * @return Selected entity. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public ZonesToGeoZones selectEntityWithDeletedCheck(ZonesToGeoZonesCB cb) { + assertConditionBeanNotNull(cb); + final java.util.List ls = selectList(cb); + assertRecordHasNotBeenDeleted(ls, cb); + assertRecordHasBeenSelectedAsOne(ls, cb); + return (ZonesToGeoZones)ls.get(0); + } + + /* + * Select entity with deleted check. {by primary-key} + * + * @param primaryKey + * @return Selected entity. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public ZonesToGeoZones selectByPKValueWithDeletedCheck(java.math.BigDecimal associationId) { + ZonesToGeoZones entity = new ZonesToGeoZones(); + entity.setAssociationId(associationId); + final ZonesToGeoZonesCB cb = newMyConditionBean(); + cb.acceptPrimaryKeyMapString(getDBMeta().extractPrimaryKeyMapString(entity)); + return selectEntityWithDeletedCheck(cb); + } + + // =================================================================================== + // Basic Select List + // ================= + /** + * Select list as result-bean. + * + * @param cb Condition-bean. (NotNull) + * @return Selected list-result-bean. (NotNull) + */ + public ListResultBean selectList(ZonesToGeoZonesCB cb) { + assertConditionBeanNotNull(cb); + return new ResultBeanBuilder(this).buildListResultBean(cb, delegateSelectList(cb)); + } + + /** + * Select page as result-bean. + * + * @param cb Condition-bean. (NotNull) + * @return Selected paging-result-bean. (NotNull) + */ + public PagingResultBean selectPage(final ZonesToGeoZonesCB cb) { + assertConditionBeanNotNull(cb); + return selectPage(cb, new SelectPageSimpleInvoker(this)); + } + + /** + * Select page. + * + * @param cb Condition-bean. (NotNull) + * @param invoker Select-page-invoker (NotNull) + * @return Selected paging-result-bean. (NotNull) + */ + public PagingResultBean selectPage(final ZonesToGeoZonesCB cb, SelectPageInvoker invoker) { + assertConditionBeanNotNull(cb); + final SelectPageCallback pageCallback = new SelectPageCallback() { + public PagingBean getPagingBean() { return cb; } + public int selectCountIgnoreFetchScope() { + return selectCount(cb); + } + public java.util.List selectListWithFetchScope() { + return selectList(cb); + } + }; + return invoker.invokeSelectPage(pageCallback); + } + + // =================================================================================== + // Various Select + // ============== + /** + * Select value-label list. + * + * @param cb Condition-bean. (NotNull) + * @param valueLabelSetupper Value-label-setupper. (NotNull) + * @return Value-label list. (NotNull) + */ + public java.util.List> selectValueLabelList(ZonesToGeoZonesCB cb, ValueLabelSetupper valueLabelSetupper) { + return createValueLabelList(selectList(cb), valueLabelSetupper); + } + + // =================================================================================== + // Load Referer + // ============ + + // =================================================================================== + // Pull Out Foreign + // ================ + + // =================================================================================== + // Basic Entity Update + // =================== + /** + * Insert. + * + * @param zonesToGeoZones Entity. (NotNull) + */ + public void insert(ZonesToGeoZones zonesToGeoZones) { + assertEntityNotNull(zonesToGeoZones); + delegateInsert(zonesToGeoZones); + } + + protected void doCreate(Entity zonesToGeoZones) { + insert((ZonesToGeoZones)zonesToGeoZones); + } + + /** + * Update. + *
+     * If it updates count zero, throws exception.
+     * If concurrency control of this table is valid, this update have it.
+     * 
+ * @param zonesToGeoZones Entity. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public void update(ZonesToGeoZones zonesToGeoZones) { + assertEntityNotNull(zonesToGeoZones); + final int updatedCount = delegateUpdate(zonesToGeoZones); + if (updatedCount == 0) { + throw new jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException(zonesToGeoZones.toString()); + } else if (updatedCount > 1) { + String msg = "updatedCount=" + updatedCount + ": " + zonesToGeoZones.toString(); + throw new jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException(msg); + } + } + + protected void doModify(Entity zonesToGeoZones) { + update((ZonesToGeoZones)zonesToGeoZones); + } + + /** + * Update after select. + * + * @param zonesToGeoZones Entity. This must contain primary-key value at least. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + */ + public void updateAfterSelect(ZonesToGeoZones zonesToGeoZones) { + assertEntityNotNullAndHasPrimaryKeyValue(zonesToGeoZones); + final ZonesToGeoZonesCB cb = newMyConditionBean(); + cb.acceptPrimaryKeyMapString(getDBMeta().extractPrimaryKeyMapString(zonesToGeoZones)); + final ZonesToGeoZones currentEntity = selectEntityWithDeletedCheck(cb); + mergeEntity(zonesToGeoZones, currentEntity); + update(currentEntity); + } + + protected void doModifyAfterSelect(Entity zonesToGeoZones) { + updateAfterSelect((ZonesToGeoZones)zonesToGeoZones); + } + + /** + * Insert or update. + * {update: modified only} + * + * @param zonesToGeoZones Entity. This should contain primary-key value at least(Except use identity). (NotNull) + */ + public void insertOrUpdate(ZonesToGeoZones zonesToGeoZones) { + assertEntityNotNull(zonesToGeoZones); + if (!zonesToGeoZones.hasPrimaryKeyValue()) { + insert(zonesToGeoZones); + } else { + try { + update(zonesToGeoZones); + } catch (org.seasar.dao.NotSingleRowUpdatedRuntimeException e) { + insert(zonesToGeoZones); + } catch (jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException e) { + insert(zonesToGeoZones); + } + } + } + + protected void doCreateOrUpdateNonstrict(Entity zonesToGeoZones) { + + insertOrUpdate((ZonesToGeoZones)zonesToGeoZones); + + } + + /** + * Insert or update after select. + * {update: modified only} + * + * @param zonesToGeoZones Entity. This should contain primary-key value at least(Except use identity). (NotNull) + */ + public void insertOrUpdateAfterSelect(ZonesToGeoZones zonesToGeoZones) { + assertEntityNotNull(zonesToGeoZones); + if (!zonesToGeoZones.hasPrimaryKeyValue()) { + insert(zonesToGeoZones); + return; + } + ZonesToGeoZones currentEntity = null; + try { + final ZonesToGeoZonesCB cb = newMyConditionBean(); + cb.acceptPrimaryKeyMapString(getDBMeta().extractPrimaryKeyMapString(zonesToGeoZones)); + currentEntity = selectEntityWithDeletedCheck(cb); + } catch (jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException e) { + insert(zonesToGeoZones); + return; + } + assertEntityNotNullAndHasPrimaryKeyValue(zonesToGeoZones); + mergeEntity(zonesToGeoZones, currentEntity); + update(currentEntity); + } + + protected void doCreateOrModifyAfterSelect(Entity entity) { + insertOrUpdateAfterSelect((ZonesToGeoZones)entity); + } + + /** + * This method implements the method that is declared at super. + * + * @param sourceEntity Source entity. (NotNull) + * @param destinationEntity Destination entity. (NotNull) + */ + protected void mergeEntity(Entity sourceEntity, Entity destinationEntity) { + assertEntityNotNull(sourceEntity); + assertEntityNotNull(destinationEntity); + final ZonesToGeoZones sourceMyEntity = (ZonesToGeoZones)sourceEntity; + final ZonesToGeoZones destinationMyEntity = (ZonesToGeoZones)destinationEntity; + destinationMyEntity.clearModifiedPropertyNames(); + final java.util.Set names = sourceMyEntity.getModifiedPropertyNames(); + + if (names.contains("associationId")) { destinationMyEntity.setAssociationId(sourceMyEntity.getAssociationId()); } + if (names.contains("zoneCountryId")) { destinationMyEntity.setZoneCountryId(sourceMyEntity.getZoneCountryId()); } + if (names.contains("zoneId")) { destinationMyEntity.setZoneId(sourceMyEntity.getZoneId()); } + if (names.contains("geoZoneId")) { destinationMyEntity.setGeoZoneId(sourceMyEntity.getGeoZoneId()); } + if (names.contains("lastModified")) { destinationMyEntity.setLastModified(sourceMyEntity.getLastModified()); } + if (names.contains("dateAdded")) { destinationMyEntity.setDateAdded(sourceMyEntity.getDateAdded()); } + + } + + /** + * Delete. + * + * @param zonesToGeoZones Entity. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException + */ + public void delete(ZonesToGeoZones zonesToGeoZones) { + assertEntityNotNull(zonesToGeoZones); + final int deletedCount = delegateDelete(zonesToGeoZones); + if (deletedCount == 0) { + throw new jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException(zonesToGeoZones.toString()); + } else if (deletedCount > 1) { + String msg = "deletedCount=" + deletedCount + ": " + zonesToGeoZones.toString(); + throw new jp.sf.pal.pompei.allcommon.exception.RecordHasOverlappedException(msg); + } + } + + protected void doRemove(Entity zonesToGeoZones) { + delete((ZonesToGeoZones)zonesToGeoZones); + } + + /** + * Delete after select. + * + * @param zonesToGeoZones Entity. This must contain primary-key value at least. (NotNull) + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + */ + public void deleteAfterSelect(ZonesToGeoZones zonesToGeoZones) { + assertEntityNotNullAndHasPrimaryKeyValue(zonesToGeoZones); + final ZonesToGeoZonesCB cb = newMyConditionBean(); + cb.acceptPrimaryKeyMapString(getDBMeta().extractPrimaryKeyMapString(zonesToGeoZones)); + selectEntityWithDeletedCheck(cb); + delete(zonesToGeoZones); + } + + protected void doRemoveAfterSelect(Entity zonesToGeoZones) { + deleteAfterSelect((ZonesToGeoZones)zonesToGeoZones); + } + + // =================================================================================== + // Basic Batch Update + // ================== + /** + * Insert list. + * + * @param zonesToGeoZonesList Entity-list. (NotNull & NotEmpty) + * @return Inserted count. + */ + public int insertList(java.util.List zonesToGeoZonesList) { + assertListNotNullAndNotEmpty(zonesToGeoZonesList); + return delegateInsertList(zonesToGeoZonesList); + } + + /** + * Update list. + * + * @param zonesToGeoZonesList Entity-list. (NotNull & NotEmpty) + * @return Updated count. + */ + public int updateList(java.util.List zonesToGeoZonesList) { + assertListNotNullAndNotEmpty(zonesToGeoZonesList); + return delegateUpdateList(zonesToGeoZonesList); + } + + /** + * Delete list. + * + * @param zonesToGeoZonesList Entity-list. (NotNull & NotEmpty) + * @return Deleted count. + */ + public int deleteList(java.util.List zonesToGeoZonesList) { + assertListNotNullAndNotEmpty(zonesToGeoZonesList); + return delegateDeleteList(zonesToGeoZonesList); + } + + // =================================================================================== + // Various Insert + // ============== + + // =================================================================================== + // CBSetupper + // ========== + /** + * The interface of condition-bean setupper. + */ + public static interface CBSetupper extends ConditionBeanSetupper { + + /** + * Set up condition. + * + * @param cb Condition-bean. (NotNull) + */ + public void setup(ZonesToGeoZonesCB cb); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/bsdao/BsAddressBookDao.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/bsdao/BsAddressBookDao.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/bsdao/BsAddressBookDao.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,186 @@ + +package jp.sf.pal.pompei.bsdao; + +import jp.sf.pal.pompei.exentity.AddressBook; + +/** + * The dao interface of ADDRESS_BOOK. + * + *
+ * [primary-key]
+ *     ADDRESS_BOOK_ID
+ * 
+ * [column-property]
+ *     ADDRESS_BOOK_ID, CUSTOMERS_ID, ENTRY_GENDER, ENTRY_COMPANY, ENTRY_FIRSTNAME, ENTRY_LASTNAME, ENTRY_STREET_ADDRESS, ENTRY_SUBURB, ENTRY_POSTCODE, ENTRY_CITY, ENTRY_STATE, ENTRY_COUNTRY_ID, ENTRY_ZONE_ID
+ * 
+ * [foreign-property]
+ *     
+ * 
+ * [refferer-property]
+ *     
+ * 
+ * [sequence]
+ *     
+ * 
+ * [identity]
+ *     
+ * 
+ * [update-date]
+ *     
+ * 
+ * [version-no]
+ *     
+ * 
+ * 
+ * + * @author DBFlute(AutoGenerator) + */ +public interface BsAddressBookDao extends jp.sf.pal.pompei.allcommon.DaoWritable { + + /** BEAN-Annotation. */ + public Class BEAN = jp.sf.pal.pompei.exentity.AddressBook.class; + + /** SQL-Annotation for getCountAll(). */ + public static final String getCountAll_SQL = "select count(*) from ADDRESS_BOOK"; + + /** + * Get count as all. + * + * @return All count. + */ + public int getCountAll(); + + /** SQL-Annotation for getListAll(). */ + public static final String getListAll_SQL = "select * from ADDRESS_BOOK"; + + /** + * Get list as all. + * + * @return All list. (NotNull) + */ + public java.util.List getListAll(); + + /** SQL-Annotation for getEntity(). */ + public static final String getEntity_SQL = "select * from ADDRESS_BOOK where ADDRESS_BOOK.ADDRESS_BOOK_ID = /*addressBookId*/null"; + + /** Args-Annotation for getEntity(). */ + public static final String getEntity_ARGS = "addressBookId"; + + /* (non-javadoc) + * Get entity by primary key. + * + * @param primaryKey Primary key. (NotNull) + */ + public AddressBook getEntity(java.math.BigDecimal addressBookId); + + /** + * Select count by condition-bean. + *
+     * Ignore fetchFirst() and fetchScope() and fetchPage().
+     * But the fetch status of the condition-bean remains as it is.
+     * This select method generates SQL based on condition-bean.
+     * 
+     * Example)
+     *   final AddressBookCB cb = new AddressBookCB();
+     *   cb.query().setXxx_GreaterEqual(new BigDecimal(14));
+     *   final int count = dao.selectCount(cb);
+     * 
+ * + * @param cb Condition-bean. (NotNull) + * @return Selected count. (NotNull) + */ + public int selectCount(jp.sf.pal.pompei.cbean.AddressBookCB cb); + + /** + * Select entity 'AddressBook' by condition-bean. + *
+     * This select method generates SQL based on condition-bean.
+     * 
+     * Example)
+     *   final AddressBookCB cb = new AddressBookCB();
+     *   cb.query().setXxxCode_Equal("abc");// It is assumed that this is the primary key...
+     *   cb.lockForUpdate();
+     *   final AddressBook entity = dao.selectEntity(cb);
+     * 
+ * + * @param cb Condition-bean. (NotNull) + * @return Selected entity. If the select result is zero, it returns null. (Nullable) + */ + public AddressBook selectEntity(jp.sf.pal.pompei.cbean.AddressBookCB cb); + + /** + * Select list by condition-bean. + *
+     * This select method generates SQL based on condition-bean.
+     * 
+     * Example)
+     *   final AddressBookCB cb = new AddressBookCB();
+     *   cb.setupSelect_Xxx(); // Including the foreign table in select clause
+     *   cb.query().setXxxName_PrefixSearch("abc");
+     *   cb.query().setXxxStartDate_IsNotNull();
+     *   cb.addOrderBy_PK_Asc().fetchFirst(20);
+     *   final List resultList = dao.selectList(cb);
+     * 
+ * + * @param cb Condition-bean. (NotNull) + * @return Selected list. If the select result is zero, it returns empty list. (NotNull) + */ + public java.util.List selectList(jp.sf.pal.pompei.cbean.AddressBookCB cb); + + + /** + * Insert one entity. + * + * @param entity Entity. (NotNull) + * @return Inserted count. + */ + public int insert(AddressBook entity); + + /** + * Update one entity. + * + * @param entity Entity. (NotNull) + * @return Updated count. + */ + public int update(AddressBook entity); + + /** + * Update one entity. (modified only) + * + * @param entity Entity. (NotNull) + * @return Updated count. + */ + public int updateModifiedOnly(AddressBook entity); + + /** + * Delete one entity. + * + * @param entity Entity. (NotNull) + * @return Deleted count. + */ + public int delete(AddressBook entity); + + /** + * Insert several entities. + * + * @param entityList Entity-list. (NotNull) + * @return Inserted count. + */ + public int insertList(java.util.List entityList); + + /** + * Update several entities. + * + * @param entityList Entity-list. (NotNull) + * @return Updated count. + */ + public int updateList(java.util.List entityList); + + /** + * Delete several entities. + * + * @param entityList Entity-list. (NotNull) + * @return Deleted count. + */ + public int deleteList(java.util.List entityList); +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/bsdao/BsAddressFormatDao.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/bsdao/BsAddressFormatDao.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/bsdao/BsAddressFormatDao.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,186 @@ + +package jp.sf.pal.pompei.bsdao; + +import jp.sf.pal.pompei.exentity.AddressFormat; + +/** + * The dao interface of ADDRESS_FORMAT. + * + *
+ * [primary-key]
+ *     ADDRESS_FORMAT_ID
+ * 
+ * [column-property]
+ *     ADDRESS_FORMAT_ID, ADDRESS_FORMAT, ADDRESS_SUMMARY
+ * 
+ * [foreign-property]
+ *     
+ * 
+ * [refferer-property]
+ *     
+ * 
+ * [sequence]
+ *     
+ * 
+ * [identity]
+ *     
+ * 
+ * [update-date]
+ *     
+ * 
+ * [version-no]
+ *     
+ * 
+ * 
+ * + * @author DBFlute(AutoGenerator) + */ +public interface BsAddressFormatDao extends jp.sf.pal.pompei.allcommon.DaoWritable { + + /** BEAN-Annotation. */ + public Class BEAN = jp.sf.pal.pompei.exentity.AddressFormat.class; + + /** SQL-Annotation for getCountAll(). */ + public static final String getCountAll_SQL = "select count(*) from ADDRESS_FORMAT"; + + /** + * Get count as all. + * + * @return All count. + */ + public int getCountAll(); + + /** SQL-Annotation for getListAll(). */ + public static final String getListAll_SQL = "select * from ADDRESS_FORMAT"; + + /** + * Get list as all. + * + * @return All list. (NotNull) + */ + public java.util.List getListAll(); + + /** SQL-Annotation for getEntity(). */ + public static final String getEntity_SQL = "select * from ADDRESS_FORMAT where ADDRESS_FORMAT.ADDRESS_FORMAT_ID = /*addressFormatId*/null"; + + /** Args-Annotation for getEntity(). */ + public static final String getEntity_ARGS = "addressFormatId"; + + /* (non-javadoc) + * Get entity by primary key. + * + * @param primaryKey Primary key. (NotNull) + */ + public AddressFormat getEntity(java.math.BigDecimal addressFormatId); + + /** + * Select count by condition-bean. + *
+     * Ignore fetchFirst() and fetchScope() and fetchPage().
+     * But the fetch status of the condition-bean remains as it is.
+     * This select method generates SQL based on condition-bean.
+     * 
+     * Example)
+     *   final AddressFormatCB cb = new AddressFormatCB();
+     *   cb.query().setXxx_GreaterEqual(new BigDecimal(14));
+     *   final int count = dao.selectCount(cb);
+     * 
+ * + * @param cb Condition-bean. (NotNull) + * @return Selected count. (NotNull) + */ + public int selectCount(jp.sf.pal.pompei.cbean.AddressFormatCB cb); + + /** + * Select entity 'AddressFormat' by condition-bean. + *
+     * This select method generates SQL based on condition-bean.
+     * 
+     * Example)
+     *   final AddressFormatCB cb = new AddressFormatCB();
+     *   cb.query().setXxxCode_Equal("abc");// It is assumed that this is the primary key...
+     *   cb.lockForUpdate();
+     *   final AddressFormat entity = dao.selectEntity(cb);
+     * 
+ * + * @param cb Condition-bean. (NotNull) + * @return Selected entity. If the select result is zero, it returns null. (Nullable) + */ + public AddressFormat selectEntity(jp.sf.pal.pompei.cbean.AddressFormatCB cb); + + /** + * Select list by condition-bean. + *
+     * This select method generates SQL based on condition-bean.
+     * 
+     * Example)
+     *   final AddressFormatCB cb = new AddressFormatCB();
+     *   cb.setupSelect_Xxx(); // Including the foreign table in select clause
+     *   cb.query().setXxxName_PrefixSearch("abc");
+     *   cb.query().setXxxStartDate_IsNotNull();
+     *   cb.addOrderBy_PK_Asc().fetchFirst(20);
+     *   final List resultList = dao.selectList(cb);
+     * 
+ * + * @param cb Condition-bean. (NotNull) + * @return Selected list. If the select result is zero, it returns empty list. (NotNull) + */ + public java.util.List selectList(jp.sf.pal.pompei.cbean.AddressFormatCB cb); + + + /** + * Insert one entity. + * + * @param entity Entity. (NotNull) + * @return Inserted count. + */ + public int insert(AddressFormat entity); + + /** + * Update one entity. + * + * @param entity Entity. (NotNull) + * @return Updated count. + */ + public int update(AddressFormat entity); + + /** + * Update one entity. (modified only) + * + * @param entity Entity. (NotNull) + * @return Updated count. + */ + public int updateModifiedOnly(AddressFormat entity); + + /** + * Delete one entity. + * + * @param entity Entity. (NotNull) + * @return Deleted count. + */ + public int delete(AddressFormat entity); + + /** + * Insert several entities. + * + * @param entityList Entity-list. (NotNull) + * @return Inserted count. + */ + public int insertList(java.util.List entityList); + + /** + * Update several entities. + * + * @param entityList Entity-list. (NotNull) + * @return Updated count. + */ + public int updateList(java.util.List entityList); + + /** + * Delete several entities. + * + * @param entityList Entity-list. (NotNull) + * @return Deleted count. + */ + public int deleteList(java.util.List entityList); +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/bsdao/BsBannersDao.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/bsdao/BsBannersDao.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/bsdao/BsBannersDao.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,186 @@ + +package jp.sf.pal.pompei.bsdao; + +import jp.sf.pal.pompei.exentity.Banners; + +/** + * The dao interface of BANNERS. + * + *
+ * [primary-key]
+ *     BANNERS_ID
+ * 
+ * [column-property]
+ *     BANNERS_ID, BANNERS_TITLE, BANNERS_URL, BANNERS_IMAGE, BANNERS_GROUP, BANNERS_HTML_TEXT, EXPIRES_IMPRESSIONS, EXPIRES_DATE, DATE_SCHEDULED, DATE_ADDED, DATE_STATUS_CHANGE, STATUS
+ * 
+ * [foreign-property]
+ *     
+ * 
+ * [refferer-property]
+ *     
+ * 
+ * [sequence]
+ *     
+ * 
+ * [identity]
+ *     
+ * 
+ * [update-date]
+ *     
+ * 
+ * [version-no]
+ *     
+ * 
+ * 
+ * + * @author DBFlute(AutoGenerator) + */ +public interface BsBannersDao extends jp.sf.pal.pompei.allcommon.DaoWritable { + + /** BEAN-Annotation. */ + public Class BEAN = jp.sf.pal.pompei.exentity.Banners.class; + + /** SQL-Annotation for getCountAll(). */ + public static final String getCountAll_SQL = "select count(*) from BANNERS"; + + /** + * Get count as all. + * + * @return All count. + */ + public int getCountAll(); + + /** SQL-Annotation for getListAll(). */ + public static final String getListAll_SQL = "select * from BANNERS"; + + /** + * Get list as all. + * + * @return All list. (NotNull) + */ + public java.util.List getListAll(); + + /** SQL-Annotation for getEntity(). */ + public static final String getEntity_SQL = "select * from BANNERS where BANNERS.BANNERS_ID = /*bannersId*/null"; + + /** Args-Annotation for getEntity(). */ + public static final String getEntity_ARGS = "bannersId"; + + /* (non-javadoc) + * Get entity by primary key. + * + * @param primaryKey Primary key. (NotNull) + */ + public Banners getEntity(java.math.BigDecimal bannersId); + + /** + * Select count by condition-bean. + *
+     * Ignore fetchFirst() and fetchScope() and fetchPage().
+     * But the fetch status of the condition-bean remains as it is.
+     * This select method generates SQL based on condition-bean.
+     * 
+     * Example)
+     *   final BannersCB cb = new BannersCB();
+     *   cb.query().setXxx_GreaterEqual(new BigDecimal(14));
+     *   final int count = dao.selectCount(cb);
+     * 
+ * + * @param cb Condition-bean. (NotNull) + * @return Selected count. (NotNull) + */ + public int selectCount(jp.sf.pal.pompei.cbean.BannersCB cb); + + /** + * Select entity 'Banners' by condition-bean. + *
+     * This select method generates SQL based on condition-bean.
+     * 
+     * Example)
+     *   final BannersCB cb = new BannersCB();
+     *   cb.query().setXxxCode_Equal("abc");// It is assumed that this is the primary key...
+     *   cb.lockForUpdate();
+     *   final Banners entity = dao.selectEntity(cb);
+     * 
+ * + * @param cb Condition-bean. (NotNull) + * @return Selected entity. If the select result is zero, it returns null. (Nullable) + */ + public Banners selectEntity(jp.sf.pal.pompei.cbean.BannersCB cb); + + /** + * Select list by condition-bean. + *
+     * This select method generates SQL based on condition-bean.
+     * 
+     * Example)
+     *   final BannersCB cb = new BannersCB();
+     *   cb.setupSelect_Xxx(); // Including the foreign table in select clause
+     *   cb.query().setXxxName_PrefixSearch("abc");
+     *   cb.query().setXxxStartDate_IsNotNull();
+     *   cb.addOrderBy_PK_Asc().fetchFirst(20);
+     *   final List resultList = dao.selectList(cb);
+     * 
+ * + * @param cb Condition-bean. (NotNull) + * @return Selected list. If the select result is zero, it returns empty list. (NotNull) + */ + public java.util.List selectList(jp.sf.pal.pompei.cbean.BannersCB cb); + + + /** + * Insert one entity. + * + * @param entity Entity. (NotNull) + * @return Inserted count. + */ + public int insert(Banners entity); + + /** + * Update one entity. + * + * @param entity Entity. (NotNull) + * @return Updated count. + */ + public int update(Banners entity); + + /** + * Update one entity. (modified only) + * + * @param entity Entity. (NotNull) + * @return Updated count. + */ + public int updateModifiedOnly(Banners entity); + + /** + * Delete one entity. + * + * @param entity Entity. (NotNull) + * @return Deleted count. + */ + public int delete(Banners entity); + + /** + * Insert several entities. + * + * @param entityList Entity-list. (NotNull) + * @return Inserted count. + */ + public int insertList(java.util.List entityList); + + /** + * Update several entities. + * + * @param entityList Entity-list. (NotNull) + * @return Updated count. + */ + public int updateList(java.util.List entityList); + + /** + * Delete several entities. + * + * @param entityList Entity-list. (NotNull) + * @return Deleted count. + */ + public int deleteList(java.util.List entityList); +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/bsdao/BsBannersHistoryDao.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/bsdao/BsBannersHistoryDao.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/bsdao/BsBannersHistoryDao.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,186 @@ + +package jp.sf.pal.pompei.bsdao; + +import jp.sf.pal.pompei.exentity.BannersHistory; + +/** + * The dao interface of BANNERS_HISTORY. + * + *
+ * [primary-key]
+ *     BANNERS_HISTORY_ID
+ * 
+ * [column-property]
+ *     BANNERS_HISTORY_ID, BANNERS_ID, BANNERS_SHOWN, BANNERS_CLICKED, BANNERS_HISTORY_DATE
+ * 
+ * [foreign-property]
+ *     
+ * 
+ * [refferer-property]
+ *     
+ * 
+ * [sequence]
+ *     
+ * 
+ * [identity]
+ *     
+ * 
+ * [update-date]
+ *     
+ * 
+ * [version-no]
+ *     
+ * 
+ * 
+ * + * @author DBFlute(AutoGenerator) + */ +public interface BsBannersHistoryDao extends jp.sf.pal.pompei.allcommon.DaoWritable { + + /** BEAN-Annotation. */ + public Class BEAN = jp.sf.pal.pompei.exentity.BannersHistory.class; + + /** SQL-Annotation for getCountAll(). */ + public static final String getCountAll_SQL = "select count(*) from BANNERS_HISTORY"; + + /** + * Get count as all. + * + * @return All count. + */ + public int getCountAll(); + + /** SQL-Annotation for getListAll(). */ + public static final String getListAll_SQL = "select * from BANNERS_HISTORY"; + + /** + * Get list as all. + * + * @return All list. (NotNull) + */ + public java.util.List getListAll(); + + /** SQL-Annotation for getEntity(). */ + public static final String getEntity_SQL = "select * from BANNERS_HISTORY where BANNERS_HISTORY.BANNERS_HISTORY_ID = /*bannersHistoryId*/null"; + + /** Args-Annotation for getEntity(). */ + public static final String getEntity_ARGS = "bannersHistoryId"; + + /* (non-javadoc) + * Get entity by primary key. + * + * @param primaryKey Primary key. (NotNull) + */ + public BannersHistory getEntity(java.math.BigDecimal bannersHistoryId); + + /** + * Select count by condition-bean. + *
+     * Ignore fetchFirst() and fetchScope() and fetchPage().
+     * But the fetch status of the condition-bean remains as it is.
+     * This select method generates SQL based on condition-bean.
+     * 
+     * Example)
+     *   final BannersHistoryCB cb = new BannersHistoryCB();
+     *   cb.query().setXxx_GreaterEqual(new BigDecimal(14));
+     *   final int count = dao.selectCount(cb);
+     * 
+ * + * @param cb Condition-bean. (NotNull) + * @return Selected count. (NotNull) + */ + public int selectCount(jp.sf.pal.pompei.cbean.BannersHistoryCB cb); + + /** + * Select entity 'BannersHistory' by condition-bean. + *
+     * This select method generates SQL based on condition-bean.
+     * 
+     * Example)
+     *   final BannersHistoryCB cb = new BannersHistoryCB();
+     *   cb.query().setXxxCode_Equal("abc");// It is assumed that this is the primary key...
+     *   cb.lockForUpdate();
+     *   final BannersHistory entity = dao.selectEntity(cb);
+     * 
+ * + * @param cb Condition-bean. (NotNull) + * @return Selected entity. If the select result is zero, it returns null. (Nullable) + */ + public BannersHistory selectEntity(jp.sf.pal.pompei.cbean.BannersHistoryCB cb); + + /** + * Select list by condition-bean. + *
+     * This select method generates SQL based on condition-bean.
+     * 
+     * Example)
+     *   final BannersHistoryCB cb = new BannersHistoryCB();
+     *   cb.setupSelect_Xxx(); // Including the foreign table in select clause
+     *   cb.query().setXxxName_PrefixSearch("abc");
+     *   cb.query().setXxxStartDate_IsNotNull();
+     *   cb.addOrderBy_PK_Asc().fetchFirst(20);
+     *   final List resultList = dao.selectList(cb);
+     * 
+ * + * @param cb Condition-bean. (NotNull) + * @return Selected list. If the select result is zero, it returns empty list. (NotNull) + */ + public java.util.List selectList(jp.sf.pal.pompei.cbean.BannersHistoryCB cb); + + + /** + * Insert one entity. + * + * @param entity Entity. (NotNull) + * @return Inserted count. + */ + public int insert(BannersHistory entity); + + /** + * Update one entity. + * + * @param entity Entity. (NotNull) + * @return Updated count. + */ + public int update(BannersHistory entity); + + /** + * Update one entity. (modified only) + * + * @param entity Entity. (NotNull) + * @return Updated count. + */ + public int updateModifiedOnly(BannersHistory entity); + + /** + * Delete one entity. + * + * @param entity Entity. (NotNull) + * @return Deleted count. + */ + public int delete(BannersHistory entity); + + /** + * Insert several entities. + * + * @param entityList Entity-list. (NotNull) + * @return Inserted count. + */ + public int insertList(java.util.List entityList); + + /** + * Update several entities. + * + * @param entityList Entity-list. (NotNull) + * @return Updated count. + */ + public int updateList(java.util.List entityList); + + /** + * Delete several entities. + * + * @param entityList Entity-list. (NotNull) + * @return Deleted count. + */ + public int deleteList(java.util.List entityList); +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/bsdao/BsCategoriesDao.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/bsdao/BsCategoriesDao.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/bsdao/BsCategoriesDao.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,186 @@ + +package jp.sf.pal.pompei.bsdao; + +import jp.sf.pal.pompei.exentity.Categories; + +/** + * The dao interface of CATEGORIES. + * + *
+ * [primary-key]
+ *     CATEGORIES_ID
+ * 
+ * [column-property]
+ *     CATEGORIES_ID, CATEGORIES_IMAGE, PARENT_ID, SORT_ORDER, DATE_ADDED, LAST_MODIFIED
+ * 
+ * [foreign-property]
+ *     
+ * 
+ * [refferer-property]
+ *     
+ * 
+ * [sequence]
+ *     
+ * 
+ * [identity]
+ *     
+ * 
+ * [update-date]
+ *     
+ * 
+ * [version-no]
+ *     
+ * 
+ * 
+ * + * @author DBFlute(AutoGenerator) + */ +public interface BsCategoriesDao extends jp.sf.pal.pompei.allcommon.DaoWritable { + + /** BEAN-Annotation. */ + public Class BEAN = jp.sf.pal.pompei.exentity.Categories.class; + + /** SQL-Annotation for getCountAll(). */ + public static final String getCountAll_SQL = "select count(*) from CATEGORIES"; + + /** + * Get count as all. + * + * @return All count. + */ + public int getCountAll(); + + /** SQL-Annotation for getListAll(). */ + public static final String getListAll_SQL = "select * from CATEGORIES"; + + /** + * Get list as all. + * + * @return All list. (NotNull) + */ + public java.util.List getListAll(); + + /** SQL-Annotation for getEntity(). */ + public static final String getEntity_SQL = "select * from CATEGORIES where CATEGORIES.CATEGORIES_ID = /*categoriesId*/null"; + + /** Args-Annotation for getEntity(). */ + public static final String getEntity_ARGS = "categoriesId"; + + /* (non-javadoc) + * Get entity by primary key. + * + * @param primaryKey Primary key. (NotNull) + */ + public Categories getEntity(java.math.BigDecimal categoriesId); + + /** + * Select count by condition-bean. + *
+     * Ignore fetchFirst() and fetchScope() and fetchPage().
+     * But the fetch status of the condition-bean remains as it is.
+     * This select method generates SQL based on condition-bean.
+     * 
+     * Example)
+     *   final CategoriesCB cb = new CategoriesCB();
+     *   cb.query().setXxx_GreaterEqual(new BigDecimal(14));
+     *   final int count = dao.selectCount(cb);
+     * 
+ * + * @param cb Condition-bean. (NotNull) + * @return Selected count. (NotNull) + */ + public int selectCount(jp.sf.pal.pompei.cbean.CategoriesCB cb); + + /** + * Select entity 'Categories' by condition-bean. + *
+     * This select method generates SQL based on condition-bean.
+     * 
+     * Example)
+     *   final CategoriesCB cb = new CategoriesCB();
+     *   cb.query().setXxxCode_Equal("abc");// It is assumed that this is the primary key...
+     *   cb.lockForUpdate();
+     *   final Categories entity = dao.selectEntity(cb);
+     * 
+ * + * @param cb Condition-bean. (NotNull) + * @return Selected entity. If the select result is zero, it returns null. (Nullable) + */ + public Categories selectEntity(jp.sf.pal.pompei.cbean.CategoriesCB cb); + + /** + * Select list by condition-bean. + *
+     * This select method generates SQL based on condition-bean.
+     * 
+     * Example)
+     *   final CategoriesCB cb = new CategoriesCB();
+     *   cb.setupSelect_Xxx(); // Including the foreign table in select clause
+     *   cb.query().setXxxName_PrefixSearch("abc");
+     *   cb.query().setXxxStartDate_IsNotNull();
+     *   cb.addOrderBy_PK_Asc().fetchFirst(20);
+     *   final List resultList = dao.selectList(cb);
+     * 
+ * + * @param cb Condition-bean. (NotNull) + * @return Selected list. If the select result is zero, it returns empty list. (NotNull) + */ + public java.util.List selectList(jp.sf.pal.pompei.cbean.CategoriesCB cb); + + + /** + * Insert one entity. + * + * @param entity Entity. (NotNull) + * @return Inserted count. + */ + public int insert(Categories entity); + + /** + * Update one entity. + * + * @param entity Entity. (NotNull) + * @return Updated count. + */ + public int update(Categories entity); + + /** + * Update one entity. (modified only) + * + * @param entity Entity. (NotNull) + * @return Updated count. + */ + public int updateModifiedOnly(Categories entity); + + /** + * Delete one entity. + * + * @param entity Entity. (NotNull) + * @return Deleted count. + */ + public int delete(Categories entity); + + /** + * Insert several entities. + * + * @param entityList Entity-list. (NotNull) + * @return Inserted count. + */ + public int insertList(java.util.List entityList); + + /** + * Update several entities. + * + * @param entityList Entity-list. (NotNull) + * @return Updated count. + */ + public int updateList(java.util.List entityList); + + /** + * Delete several entities. + * + * @param entityList Entity-list. (NotNull) + * @return Deleted count. + */ + public int deleteList(java.util.List entityList); +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/bsdao/BsCategoriesDescriptionDao.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/bsdao/BsCategoriesDescriptionDao.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/bsdao/BsCategoriesDescriptionDao.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,186 @@ + +package jp.sf.pal.pompei.bsdao; + +import jp.sf.pal.pompei.exentity.CategoriesDescription; + +/** + * The dao interface of CATEGORIES_DESCRIPTION. + * + *
+ * [primary-key]
+ *     CATEGORIES_ID, LANGUAGE_ID
+ * 
+ * [column-property]
+ *     CATEGORIES_ID, LANGUAGE_ID, CATEGORIES_NAME
+ * 
+ * [foreign-property]
+ *     
+ * 
+ * [refferer-property]
+ *     
+ * 
+ * [sequence]
+ *     
+ * 
+ * [identity]
+ *     
+ * 
+ * [update-date]
+ *     
+ * 
+ * [version-no]
+ *     
+ * 
+ * 
+ * + * @author DBFlute(AutoGenerator) + */ +public interface BsCategoriesDescriptionDao extends jp.sf.pal.pompei.allcommon.DaoWritable { + + /** BEAN-Annotation. */ + public Class BEAN = jp.sf.pal.pompei.exentity.CategoriesDescription.class; + + /** SQL-Annotation for getCountAll(). */ + public static final String getCountAll_SQL = "select count(*) from CATEGORIES_DESCRIPTION"; + + /** + * Get count as all. + * + * @return All count. + */ + public int getCountAll(); + + /** SQL-Annotation for getListAll(). */ + public static final String getListAll_SQL = "select * from CATEGORIES_DESCRIPTION"; + + /** + * Get list as all. + * + * @return All list. (NotNull) + */ + public java.util.List getListAll(); + + /** SQL-Annotation for getEntity(). */ + public static final String getEntity_SQL = "select * from CATEGORIES_DESCRIPTION where CATEGORIES_DESCRIPTION.CATEGORIES_ID = /*categoriesId*/null and CATEGORIES_DESCRIPTION.LANGUAGE_ID = /*languageId*/null"; + + /** Args-Annotation for getEntity(). */ + public static final String getEntity_ARGS = "categoriesId, languageId"; + + /* (non-javadoc) + * Get entity by primary key. + * + * @param primaryKey Primary key. (NotNull) + */ + public CategoriesDescription getEntity(java.math.BigDecimal categoriesId, java.math.BigDecimal languageId); + + /** + * Select count by condition-bean. + *
+     * Ignore fetchFirst() and fetchScope() and fetchPage().
+     * But the fetch status of the condition-bean remains as it is.
+     * This select method generates SQL based on condition-bean.
+     * 
+     * Example)
+     *   final CategoriesDescriptionCB cb = new CategoriesDescriptionCB();
+     *   cb.query().setXxx_GreaterEqual(new BigDecimal(14));
+     *   final int count = dao.selectCount(cb);
+     * 
+ * + * @param cb Condition-bean. (NotNull) + * @return Selected count. (NotNull) + */ + public int selectCount(jp.sf.pal.pompei.cbean.CategoriesDescriptionCB cb); + + /** + * Select entity 'CategoriesDescription' by condition-bean. + *
+     * This select method generates SQL based on condition-bean.
+     * 
+     * Example)
+     *   final CategoriesDescriptionCB cb = new CategoriesDescriptionCB();
+     *   cb.query().setXxxCode_Equal("abc");// It is assumed that this is the primary key...
+     *   cb.lockForUpdate();
+     *   final CategoriesDescription entity = dao.selectEntity(cb);
+     * 
+ * + * @param cb Condition-bean. (NotNull) + * @return Selected entity. If the select result is zero, it returns null. (Nullable) + */ + public CategoriesDescription selectEntity(jp.sf.pal.pompei.cbean.CategoriesDescriptionCB cb); + + /** + * Select list by condition-bean. + *
+     * This select method generates SQL based on condition-bean.
+     * 
+     * Example)
+     *   final CategoriesDescriptionCB cb = new CategoriesDescriptionCB();
+     *   cb.setupSelect_Xxx(); // Including the foreign table in select clause
+     *   cb.query().setXxxName_PrefixSearch("abc");
+     *   cb.query().setXxxStartDate_IsNotNull();
+     *   cb.addOrderBy_PK_Asc().fetchFirst(20);
+     *   final List resultList = dao.selectList(cb);
+     * 
+ * + * @param cb Condition-bean. (NotNull) + * @return Selected list. If the select result is zero, it returns empty list. (NotNull) + */ + public java.util.List selectList(jp.sf.pal.pompei.cbean.CategoriesDescriptionCB cb); + + + /** + * Insert one entity. + * + * @param entity Entity. (NotNull) + * @return Inserted count. + */ + public int insert(CategoriesDescription entity); + + /** + * Update one entity. + * + * @param entity Entity. (NotNull) + * @return Updated count. + */ + public int update(CategoriesDescription entity); + + /** + * Update one entity. (modified only) + * + * @param entity Entity. (NotNull) + * @return Updated count. + */ + public int updateModifiedOnly(CategoriesDescription entity); + + /** + * Delete one entity. + * + * @param entity Entity. (NotNull) + * @return Deleted count. + */ + public int delete(CategoriesDescription entity); + + /** + * Insert several entities. + * + * @param entityList Entity-list. (NotNull) + * @return Inserted count. + */ + public int insertList(java.util.List entityList); + + /** + * Update several entities. + * + * @param entityList Entity-list. (NotNull) + * @return Updated count. + */ + public int updateList(java.util.List entityList); + + /** + * Delete several entities. + * + * @param entityList Entity-list. (NotNull) + * @return Deleted count. + */ + public int deleteList(java.util.List entityList); +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/bsdao/BsConfigurationDao.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/bsdao/BsConfigurationDao.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/bsdao/BsConfigurationDao.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,186 @@ + +package jp.sf.pal.pompei.bsdao; + +import jp.sf.pal.pompei.exentity.Configuration; + +/** + * The dao interface of CONFIGURATION. + * + *
+ * [primary-key]
+ *     CONFIGURATION_ID
+ * 
+ * [column-property]
+ *     CONFIGURATION_ID, CONFIGURATION_TITLE, CONFIGURATION_KEY, CONFIGURATION_VALUE, CONFIGURATION_DESCRIPTION, CONFIGURATION_GROUP_ID, SORT_ORDER, LAST_MODIFIED, DATE_ADDED, USE_FUNCTION, SET_FUNCTION
+ * 
+ * [foreign-property]
+ *     
+ * 
+ * [refferer-property]
+ *     
+ * 
+ * [sequence]
+ *     
+ * 
+ * [identity]
+ *     
+ * 
+ * [update-date]
+ *     
+ * 
+ * [version-no]
+ *     
+ * 
+ * 
+ * + * @author DBFlute(AutoGenerator) + */ +public interface BsConfigurationDao extends jp.sf.pal.pompei.allcommon.DaoWritable { + + /** BEAN-Annotation. */ + public Class BEAN = jp.sf.pal.pompei.exentity.Configuration.class; + + /** SQL-Annotation for getCountAll(). */ + public static final String getCountAll_SQL = "select count(*) from CONFIGURATION"; + + /** + * Get count as all. + * + * @return All count. + */ + public int getCountAll(); + + /** SQL-Annotation for getListAll(). */ + public static final String getListAll_SQL = "select * from CONFIGURATION"; + + /** + * Get list as all. + * + * @return All list. (NotNull) + */ + public java.util.List getListAll(); + + /** SQL-Annotation for getEntity(). */ + public static final String getEntity_SQL = "select * from CONFIGURATION where CONFIGURATION.CONFIGURATION_ID = /*configurationId*/null"; + + /** Args-Annotation for getEntity(). */ + public static final String getEntity_ARGS = "configurationId"; + + /* (non-javadoc) + * Get entity by primary key. + * + * @param primaryKey Primary key. (NotNull) + */ + public Configuration getEntity(java.math.BigDecimal configurationId); + + /** + * Select count by condition-bean. + *
+     * Ignore fetchFirst() and fetchScope() and fetchPage().
+     * But the fetch status of the condition-bean remains as it is.
+     * This select method generates SQL based on condition-bean.
+     * 
+     * Example)
+     *   final ConfigurationCB cb = new ConfigurationCB();
+     *   cb.query().setXxx_GreaterEqual(new BigDecimal(14));
+     *   final int count = dao.selectCount(cb);
+     * 
+ * + * @param cb Condition-bean. (NotNull) + * @return Selected count. (NotNull) + */ + public int selectCount(jp.sf.pal.pompei.cbean.ConfigurationCB cb); + + /** + * Select entity 'Configuration' by condition-bean. + *
+     * This select method generates SQL based on condition-bean.
+     * 
+     * Example)
+     *   final ConfigurationCB cb = new ConfigurationCB();
+     *   cb.query().setXxxCode_Equal("abc");// It is assumed that this is the primary key...
+     *   cb.lockForUpdate();
+     *   final Configuration entity = dao.selectEntity(cb);
+     * 
+ * + * @param cb Condition-bean. (NotNull) + * @return Selected entity. If the select result is zero, it returns null. (Nullable) + */ + public Configuration selectEntity(jp.sf.pal.pompei.cbean.ConfigurationCB cb); + + /** + * Select list by condition-bean. + *
+     * This select method generates SQL based on condition-bean.
+     * 
+     * Example)
+     *   final ConfigurationCB cb = new ConfigurationCB();
+     *   cb.setupSelect_Xxx(); // Including the foreign table in select clause
+     *   cb.query().setXxxName_PrefixSearch("abc");
+     *   cb.query().setXxxStartDate_IsNotNull();
+     *   cb.addOrderBy_PK_Asc().fetchFirst(20);
+     *   final List resultList = dao.selectList(cb);
+     * 
+ * + * @param cb Condition-bean. (NotNull) + * @return Selected list. If the select result is zero, it returns empty list. (NotNull) + */ + public java.util.List selectList(jp.sf.pal.pompei.cbean.ConfigurationCB cb); + + + /** + * Insert one entity. + * + * @param entity Entity. (NotNull) + * @return Inserted count. + */ + public int insert(Configuration entity); + + /** + * Update one entity. + * + * @param entity Entity. (NotNull) + * @return Updated count. + */ + public int update(Configuration entity); + + /** + * Update one entity. (modified only) + * + * @param entity Entity. (NotNull) + * @return Updated count. + */ + public int updateModifiedOnly(Configuration entity); + + /** + * Delete one entity. + * + * @param entity Entity. (NotNull) + * @return Deleted count. + */ + public int delete(Configuration entity); + + /** + * Insert several entities. + * + * @param entityList Entity-list. (NotNull) + * @return Inserted count. + */ + public int insertList(java.util.List entityList); + + /** + * Update several entities. + * + * @param entityList Entity-list. (NotNull) + * @return Updated count. + */ + public int updateList(java.util.List entityList); + + /** + * Delete several entities. + * + * @param entityList Entity-list. (NotNull) + * @return Deleted count. + */ + public int deleteList(java.util.List entityList); +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/bsdao/BsConfigurationGroupDao.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/bsdao/BsConfigurationGroupDao.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/bsdao/BsConfigurationGroupDao.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,186 @@ + +package jp.sf.pal.pompei.bsdao; + +import jp.sf.pal.pompei.exentity.ConfigurationGroup; + +/** + * The dao interface of CONFIGURATION_GROUP. + * + *
+ * [primary-key]
+ *     CONFIGURATION_GROUP_ID
+ * 
+ * [column-property]
+ *     CONFIGURATION_GROUP_ID, CONFIGURATION_GROUP_TITLE, CONFIGURATION_GROUP_DESCRIPTION, SORT_ORDER, VISIBLE
+ * 
+ * [foreign-property]
+ *     
+ * 
+ * [refferer-property]
+ *     
+ * 
+ * [sequence]
+ *     
+ * 
+ * [identity]
+ *     
+ * 
+ * [update-date]
+ *     
+ * 
+ * [version-no]
+ *     
+ * 
+ * 
+ * + * @author DBFlute(AutoGenerator) + */ +public interface BsConfigurationGroupDao extends jp.sf.pal.pompei.allcommon.DaoWritable { + + /** BEAN-Annotation. */ + public Class BEAN = jp.sf.pal.pompei.exentity.ConfigurationGroup.class; + + /** SQL-Annotation for getCountAll(). */ + public static final String getCountAll_SQL = "select count(*) from CONFIGURATION_GROUP"; + + /** + * Get count as all. + * + * @return All count. + */ + public int getCountAll(); + + /** SQL-Annotation for getListAll(). */ + public static final String getListAll_SQL = "select * from CONFIGURATION_GROUP"; + + /** + * Get list as all. + * + * @return All list. (NotNull) + */ + public java.util.List getListAll(); + + /** SQL-Annotation for getEntity(). */ + public static final String getEntity_SQL = "select * from CONFIGURATION_GROUP where CONFIGURATION_GROUP.CONFIGURATION_GROUP_ID = /*configurationGroupId*/null"; + + /** Args-Annotation for getEntity(). */ + public static final String getEntity_ARGS = "configurationGroupId"; + + /* (non-javadoc) + * Get entity by primary key. + * + * @param primaryKey Primary key. (NotNull) + */ + public ConfigurationGroup getEntity(java.math.BigDecimal configurationGroupId); + + /** + * Select count by condition-bean. + *
+     * Ignore fetchFirst() and fetchScope() and fetchPage().
+     * But the fetch status of the condition-bean remains as it is.
+     * This select method generates SQL based on condition-bean.
+     * 
+     * Example)
+     *   final ConfigurationGroupCB cb = new ConfigurationGroupCB();
+     *   cb.query().setXxx_GreaterEqual(new BigDecimal(14));
+     *   final int count = dao.selectCount(cb);
+     * 
+ * + * @param cb Condition-bean. (NotNull) + * @return Selected count. (NotNull) + */ + public int selectCount(jp.sf.pal.pompei.cbean.ConfigurationGroupCB cb); + + /** + * Select entity 'ConfigurationGroup' by condition-bean. + *
+     * This select method generates SQL based on condition-bean.
+     * 
+     * Example)
+     *   final ConfigurationGroupCB cb = new ConfigurationGroupCB();
+     *   cb.query().setXxxCode_Equal("abc");// It is assumed that this is the primary key...
+     *   cb.lockForUpdate();
+     *   final ConfigurationGroup entity = dao.selectEntity(cb);
+     * 
+ * + * @param cb Condition-bean. (NotNull) + * @return Selected entity. If the select result is zero, it returns null. (Nullable) + */ + public ConfigurationGroup selectEntity(jp.sf.pal.pompei.cbean.ConfigurationGroupCB cb); + + /** + * Select list by condition-bean. + *
+     * This select method generates SQL based on condition-bean.
+     * 
+     * Example)
+     *   final ConfigurationGroupCB cb = new ConfigurationGroupCB();
+     *   cb.setupSelect_Xxx(); // Including the foreign table in select clause
+     *   cb.query().setXxxName_PrefixSearch("abc");
+     *   cb.query().setXxxStartDate_IsNotNull();
+     *   cb.addOrderBy_PK_Asc().fetchFirst(20);
+     *   final List resultList = dao.selectList(cb);
+     * 
+ * + * @param cb Condition-bean. (NotNull) + * @return Selected list. If the select result is zero, it returns empty list. (NotNull) + */ + public java.util.List selectList(jp.sf.pal.pompei.cbean.ConfigurationGroupCB cb); + + + /** + * Insert one entity. + * + * @param entity Entity. (NotNull) + * @return Inserted count. + */ + public int insert(ConfigurationGroup entity); + + /** + * Update one entity. + * + * @param entity Entity. (NotNull) + * @return Updated count. + */ + public int update(ConfigurationGroup entity); + + /** + * Update one entity. (modified only) + * + * @param entity Entity. (NotNull) + * @return Updated count. + */ + public int updateModifiedOnly(ConfigurationGroup entity); + + /** + * Delete one entity. + * + * @param entity Entity. (NotNull) + * @return Deleted count. + */ + public int delete(ConfigurationGroup entity); + + /** + * Insert several entities. + * + * @param entityList Entity-list. (NotNull) + * @return Inserted count. + */ + public int insertList(java.util.List entityList); + + /** + * Update several entities. + * + * @param entityList Entity-list. (NotNull) + * @return Updated count. + */ + public int updateList(java.util.List entityList); + + /** + * Delete several entities. + * + * @param entityList Entity-list. (NotNull) + * @return Deleted count. + */ + public int deleteList(java.util.List entityList); +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/bsdao/BsCounterDao.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/bsdao/BsCounterDao.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/bsdao/BsCounterDao.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,117 @@ + +package jp.sf.pal.pompei.bsdao; + +import jp.sf.pal.pompei.exentity.Counter; + +/** + * The dao interface of COUNTER. + * + *
+ * [primary-key]
+ *     
+ * 
+ * [column-property]
+ *     STARTDATE, COUNTER
+ * 
+ * [foreign-property]
+ *     
+ * 
+ * [refferer-property]
+ *     
+ * 
+ * [sequence]
+ *     
+ * 
+ * [identity]
+ *     
+ * 
+ * [update-date]
+ *     
+ * 
+ * [version-no]
+ *     
+ * 
+ * 
+ * + * @author DBFlute(AutoGenerator) + */ +public interface BsCounterDao extends jp.sf.pal.pompei.allcommon.DaoReadable { + + /** BEAN-Annotation. */ + public Class BEAN = jp.sf.pal.pompei.exentity.Counter.class; + + /** SQL-Annotation for getCountAll(). */ + public static final String getCountAll_SQL = "select count(*) from COUNTER"; + + /** + * Get count as all. + * + * @return All count. + */ + public int getCountAll(); + + /** SQL-Annotation for getListAll(). */ + public static final String getListAll_SQL = "select * from COUNTER"; + + /** + * Get list as all. + * + * @return All list. (NotNull) + */ + public java.util.List getListAll(); + + /** + * Select count by condition-bean. + *
+     * Ignore fetchFirst() and fetchScope() and fetchPage().
+     * But the fetch status of the condition-bean remains as it is.
+     * This select method generates SQL based on condition-bean.
+     * 
+     * Example)
+     *   final CounterCB cb = new CounterCB();
+     *   cb.query().setXxx_GreaterEqual(new BigDecimal(14));
+     *   final int count = dao.selectCount(cb);
+     * 
+ * + * @param cb Condition-bean. (NotNull) + * @return Selected count. (NotNull) + */ + public int selectCount(jp.sf.pal.pompei.cbean.CounterCB cb); + + /** + * Select entity 'Counter' by condition-bean. + *
+     * This select method generates SQL based on condition-bean.
+     * 
+     * Example)
+     *   final CounterCB cb = new CounterCB();
+     *   cb.query().setXxxCode_Equal("abc");// It is assumed that this is the primary key...
+     *   cb.lockForUpdate();
+     *   final Counter entity = dao.selectEntity(cb);
+     * 
+ * + * @param cb Condition-bean. (NotNull) + * @return Selected entity. If the select result is zero, it returns null. (Nullable) + */ + public Counter selectEntity(jp.sf.pal.pompei.cbean.CounterCB cb); + + /** + * Select list by condition-bean. + *
+     * This select method generates SQL based on condition-bean.
+     * 
+     * Example)
+     *   final CounterCB cb = new CounterCB();
+     *   cb.setupSelect_Xxx(); // Including the foreign table in select clause
+     *   cb.query().setXxxName_PrefixSearch("abc");
+     *   cb.query().setXxxStartDate_IsNotNull();
+     *   cb.addOrderBy_PK_Asc().fetchFirst(20);
+     *   final List resultList = dao.selectList(cb);
+     * 
+ * + * @param cb Condition-bean. (NotNull) + * @return Selected list. If the select result is zero, it returns empty list. (NotNull) + */ + public java.util.List selectList(jp.sf.pal.pompei.cbean.CounterCB cb); + + } Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/bsdao/BsCounterHistoryDao.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/bsdao/BsCounterHistoryDao.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/bsdao/BsCounterHistoryDao.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,117 @@ + +package jp.sf.pal.pompei.bsdao; + +import jp.sf.pal.pompei.exentity.CounterHistory; + +/** + * The dao interface of COUNTER_HISTORY. + * + *
+ * [primary-key]
+ *     
+ * 
+ * [column-property]
+ *     MONTH, COUNTER
+ * 
+ * [foreign-property]
+ *     
+ * 
+ * [refferer-property]
+ *     
+ * 
+ * [sequence]
+ *     
+ * 
+ * [identity]
+ *     
+ * 
+ * [update-date]
+ *     
+ * 
+ * [version-no]
+ *     
+ * 
+ * 
+ * + * @author DBFlute(AutoGenerator) + */ +public interface BsCounterHistoryDao extends jp.sf.pal.pompei.allcommon.DaoReadable { + + /** BEAN-Annotation. */ + public Class BEAN = jp.sf.pal.pompei.exentity.CounterHistory.class; + + /** SQL-Annotation for getCountAll(). */ + public static final String getCountAll_SQL = "select count(*) from COUNTER_HISTORY"; + + /** + * Get count as all. + * + * @return All count. + */ + public int getCountAll(); + + /** SQL-Annotation for getListAll(). */ + public static final String getListAll_SQL = "select * from COUNTER_HISTORY"; + + /** + * Get list as all. + * + * @return All list. (NotNull) + */ + public java.util.List getListAll(); + + /** + * Select count by condition-bean. + *
+     * Ignore fetchFirst() and fetchScope() and fetchPage().
+     * But the fetch status of the condition-bean remains as it is.
+     * This select method generates SQL based on condition-bean.
+     * 
+     * Example)
+     *   final CounterHistoryCB cb = new CounterHistoryCB();
+     *   cb.query().setXxx_GreaterEqual(new BigDecimal(14));
+     *   final int count = dao.selectCount(cb);
+     * 
+ * + * @param cb Condition-bean. (NotNull) + * @return Selected count. (NotNull) + */ + public int selectCount(jp.sf.pal.pompei.cbean.CounterHistoryCB cb); + + /** + * Select entity 'CounterHistory' by condition-bean. + *
+     * This select method generates SQL based on condition-bean.
+     * 
+     * Example)
+     *   final CounterHistoryCB cb = new CounterHistoryCB();
+     *   cb.query().setXxxCode_Equal("abc");// It is assumed that this is the primary key...
+     *   cb.lockForUpdate();
+     *   final CounterHistory entity = dao.selectEntity(cb);
+     * 
+ * + * @param cb Condition-bean. (NotNull) + * @return Selected entity. If the select result is zero, it returns null. (Nullable) + */ + public CounterHistory selectEntity(jp.sf.pal.pompei.cbean.CounterHistoryCB cb); + + /** + * Select list by condition-bean. + *
+     * This select method generates SQL based on condition-bean.
+     * 
+     * Example)
+     *   final CounterHistoryCB cb = new CounterHistoryCB();
+     *   cb.setupSelect_Xxx(); // Including the foreign table in select clause
+     *   cb.query().setXxxName_PrefixSearch("abc");
+     *   cb.query().setXxxStartDate_IsNotNull();
+     *   cb.addOrderBy_PK_Asc().fetchFirst(20);
+     *   final List resultList = dao.selectList(cb);
+     * 
+ * + * @param cb Condition-bean. (NotNull) + * @return Selected list. If the select result is zero, it returns empty list. (NotNull) + */ + public java.util.List selectList(jp.sf.pal.pompei.cbean.CounterHistoryCB cb); + + } Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/bsdao/BsCountriesDao.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/bsdao/BsCountriesDao.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/bsdao/BsCountriesDao.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,186 @@ + +package jp.sf.pal.pompei.bsdao; + +import jp.sf.pal.pompei.exentity.Countries; + +/** + * The dao interface of COUNTRIES. + * + *
+ * [primary-key]
+ *     COUNTRIES_ID
+ * 
+ * [column-property]
+ *     COUNTRIES_ID, COUNTRIES_NAME, COUNTRIES_ISO_CODE_2, COUNTRIES_ISO_CODE_3, ADDRESS_FORMAT_ID
+ * 
+ * [foreign-property]
+ *     
+ * 
+ * [refferer-property]
+ *     
+ * 
+ * [sequence]
+ *     
+ * 
+ * [identity]
+ *     
+ * 
+ * [update-date]
+ *     
+ * 
+ * [version-no]
+ *     
+ * 
+ * 
+ * + * @author DBFlute(AutoGenerator) + */ +public interface BsCountriesDao extends jp.sf.pal.pompei.allcommon.DaoWritable { + + /** BEAN-Annotation. */ + public Class BEAN = jp.sf.pal.pompei.exentity.Countries.class; + + /** SQL-Annotation for getCountAll(). */ + public static final String getCountAll_SQL = "select count(*) from COUNTRIES"; + + /** + * Get count as all. + * + * @return All count. + */ + public int getCountAll(); + + /** SQL-Annotation for getListAll(). */ + public static final String getListAll_SQL = "select * from COUNTRIES"; + + /** + * Get list as all. + * + * @return All list. (NotNull) + */ + public java.util.List getListAll(); + + /** SQL-Annotation for getEntity(). */ + public static final String getEntity_SQL = "select * from COUNTRIES where COUNTRIES.COUNTRIES_ID = /*countriesId*/null"; + + /** Args-Annotation for getEntity(). */ + public static final String getEntity_ARGS = "countriesId"; + + /* (non-javadoc) + * Get entity by primary key. + * + * @param primaryKey Primary key. (NotNull) + */ + public Countries getEntity(java.math.BigDecimal countriesId); + + /** + * Select count by condition-bean. + *
+     * Ignore fetchFirst() and fetchScope() and fetchPage().
+     * But the fetch status of the condition-bean remains as it is.
+     * This select method generates SQL based on condition-bean.
+     * 
+     * Example)
+     *   final CountriesCB cb = new CountriesCB();
+     *   cb.query().setXxx_GreaterEqual(new BigDecimal(14));
+     *   final int count = dao.selectCount(cb);
+     * 
+ * + * @param cb Condition-bean. (NotNull) + * @return Selected count. (NotNull) + */ + public int selectCount(jp.sf.pal.pompei.cbean.CountriesCB cb); + + /** + * Select entity 'Countries' by condition-bean. + *
+     * This select method generates SQL based on condition-bean.
+     * 
+     * Example)
+     *   final CountriesCB cb = new CountriesCB();
+     *   cb.query().setXxxCode_Equal("abc");// It is assumed that this is the primary key...
+     *   cb.lockForUpdate();
+     *   final Countries entity = dao.selectEntity(cb);
+     * 
+ * + * @param cb Condition-bean. (NotNull) + * @return Selected entity. If the select result is zero, it returns null. (Nullable) + */ + public Countries selectEntity(jp.sf.pal.pompei.cbean.CountriesCB cb); + + /** + * Select list by condition-bean. + *
+     * This select method generates SQL based on condition-bean.
+     * 
+     * Example)
+     *   final CountriesCB cb = new CountriesCB();
+     *   cb.setupSelect_Xxx(); // Including the foreign table in select clause
+     *   cb.query().setXxxName_PrefixSearch("abc");
+     *   cb.query().setXxxStartDate_IsNotNull();
+     *   cb.addOrderBy_PK_Asc().fetchFirst(20);
+     *   final List resultList = dao.selectList(cb);
+     * 
+ * + * @param cb Condition-bean. (NotNull) + * @return Selected list. If the select result is zero, it returns empty list. (NotNull) + */ + public java.util.List selectList(jp.sf.pal.pompei.cbean.CountriesCB cb); + + + /** + * Insert one entity. + * + * @param entity Entity. (NotNull) + * @return Inserted count. + */ + public int insert(Countries entity); + + /** + * Update one entity. + * + * @param entity Entity. (NotNull) + * @return Updated count. + */ + public int update(Countries entity); + + /** + * Update one entity. (modified only) + * + * @param entity Entity. (NotNull) + * @return Updated count. + */ + public int updateModifiedOnly(Countries entity); + + /** + * Delete one entity. + * + * @param entity Entity. (NotNull) + * @return Deleted count. + */ + public int delete(Countries entity); + + /** + * Insert several entities. + * + * @param entityList Entity-list. (NotNull) + * @return Inserted count. + */ + public int insertList(java.util.List entityList); + + /** + * Update several entities. + * + * @param entityList Entity-list. (NotNull) + * @return Updated count. + */ + public int updateList(java.util.List entityList); + + /** + * Delete several entities. + * + * @param entityList Entity-list. (NotNull) + * @return Deleted count. + */ + public int deleteList(java.util.List entityList); +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/bsdao/BsCurrenciesDao.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/bsdao/BsCurrenciesDao.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/bsdao/BsCurrenciesDao.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,186 @@ + +package jp.sf.pal.pompei.bsdao; + +import jp.sf.pal.pompei.exentity.Currencies; + +/** + * The dao interface of CURRENCIES. + * + *
+ * [primary-key]
+ *     CURRENCIES_ID
+ * 
+ * [column-property]
+ *     CURRENCIES_ID, TITLE, CODE, SYMBOL_LEFT, SYMBOL_RIGHT, DECIMAL_POINT, THOUSANDS_POINT, DECIMAL_PLACES, VALUE, LAST_UPDATED
+ * 
+ * [foreign-property]
+ *     
+ * 
+ * [refferer-property]
+ *     
+ * 
+ * [sequence]
+ *     
+ * 
+ * [identity]
+ *     
+ * 
+ * [update-date]
+ *     
+ * 
+ * [version-no]
+ *     
+ * 
+ * 
+ * + * @author DBFlute(AutoGenerator) + */ +public interface BsCurrenciesDao extends jp.sf.pal.pompei.allcommon.DaoWritable { + + /** BEAN-Annotation. */ + public Class BEAN = jp.sf.pal.pompei.exentity.Currencies.class; + + /** SQL-Annotation for getCountAll(). */ + public static final String getCountAll_SQL = "select count(*) from CURRENCIES"; + + /** + * Get count as all. + * + * @return All count. + */ + public int getCountAll(); + + /** SQL-Annotation for getListAll(). */ + public static final String getListAll_SQL = "select * from CURRENCIES"; + + /** + * Get list as all. + * + * @return All list. (NotNull) + */ + public java.util.List getListAll(); + + /** SQL-Annotation for getEntity(). */ + public static final String getEntity_SQL = "select * from CURRENCIES where CURRENCIES.CURRENCIES_ID = /*currenciesId*/null"; + + /** Args-Annotation for getEntity(). */ + public static final String getEntity_ARGS = "currenciesId"; + + /* (non-javadoc) + * Get entity by primary key. + * + * @param primaryKey Primary key. (NotNull) + */ + public Currencies getEntity(java.math.BigDecimal currenciesId); + + /** + * Select count by condition-bean. + *
+     * Ignore fetchFirst() and fetchScope() and fetchPage().
+     * But the fetch status of the condition-bean remains as it is.
+     * This select method generates SQL based on condition-bean.
+     * 
+     * Example)
+     *   final CurrenciesCB cb = new CurrenciesCB();
+     *   cb.query().setXxx_GreaterEqual(new BigDecimal(14));
+     *   final int count = dao.selectCount(cb);
+     * 
+ * + * @param cb Condition-bean. (NotNull) + * @return Selected count. (NotNull) + */ + public int selectCount(jp.sf.pal.pompei.cbean.CurrenciesCB cb); + + /** + * Select entity 'Currencies' by condition-bean. + *
+     * This select method generates SQL based on condition-bean.
+     * 
+     * Example)
+     *   final CurrenciesCB cb = new CurrenciesCB();
+     *   cb.query().setXxxCode_Equal("abc");// It is assumed that this is the primary key...
+     *   cb.lockForUpdate();
+     *   final Currencies entity = dao.selectEntity(cb);
+     * 
+ * + * @param cb Condition-bean. (NotNull) + * @return Selected entity. If the select result is zero, it returns null. (Nullable) + */ + public Currencies selectEntity(jp.sf.pal.pompei.cbean.CurrenciesCB cb); + + /** + * Select list by condition-bean. + *
+     * This select method generates SQL based on condition-bean.
+     * 
+     * Example)
+     *   final CurrenciesCB cb = new CurrenciesCB();
+     *   cb.setupSelect_Xxx(); // Including the foreign table in select clause
+     *   cb.query().setXxxName_PrefixSearch("abc");
+     *   cb.query().setXxxStartDate_IsNotNull();
+     *   cb.addOrderBy_PK_Asc().fetchFirst(20);
+     *   final List resultList = dao.selectList(cb);
+     * 
+ * + * @param cb Condition-bean. (NotNull) + * @return Selected list. If the select result is zero, it returns empty list. (NotNull) + */ + public java.util.List selectList(jp.sf.pal.pompei.cbean.CurrenciesCB cb); + + + /** + * Insert one entity. + * + * @param entity Entity. (NotNull) + * @return Inserted count. + */ + public int insert(Currencies entity); + + /** + * Update one entity. + * + * @param entity Entity. (NotNull) + * @return Updated count. + */ + public int update(Currencies entity); + + /** + * Update one entity. (modified only) + * + * @param entity Entity. (NotNull) + * @return Updated count. + */ + public int updateModifiedOnly(Currencies entity); + + /** + * Delete one entity. + * + * @param entity Entity. (NotNull) + * @return Deleted count. + */ + public int delete(Currencies entity); + + /** + * Insert several entities. + * + * @param entityList Entity-list. (NotNull) + * @return Inserted count. + */ + public int insertList(java.util.List entityList); + + /** + * Update several entities. + * + * @param entityList Entity-list. (NotNull) + * @return Updated count. + */ + public int updateList(java.util.List entityList); + + /** + * Delete several entities. + * + * @param entityList Entity-list. (NotNull) + * @return Deleted count. + */ + public int deleteList(java.util.List entityList); +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/bsdao/BsCustomersBasketAttributesDao.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/bsdao/BsCustomersBasketAttributesDao.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/bsdao/BsCustomersBasketAttributesDao.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,186 @@ + +package jp.sf.pal.pompei.bsdao; + +import jp.sf.pal.pompei.exentity.CustomersBasketAttributes; + +/** + * The dao interface of CUSTOMERS_BASKET_ATTRIBUTES. + * + *
+ * [primary-key]
+ *     CUSTOMERS_BASKET_ATTRIBUTES_ID
+ * 
+ * [column-property]
+ *     CUSTOMERS_BASKET_ATTRIBUTES_ID, CUSTOMERS_ID, PRODUCTS_ID, PRODUCTS_OPTIONS_ID, PRODUCTS_OPTIONS_VALUE_ID
+ * 
+ * [foreign-property]
+ *     
+ * 
+ * [refferer-property]
+ *     
+ * 
+ * [sequence]
+ *     
+ * 
+ * [identity]
+ *     
+ * 
+ * [update-date]
+ *     
+ * 
+ * [version-no]
+ *     
+ * 
+ * 
+ * + * @author DBFlute(AutoGenerator) + */ +public interface BsCustomersBasketAttributesDao extends jp.sf.pal.pompei.allcommon.DaoWritable { + + /** BEAN-Annotation. */ + public Class BEAN = jp.sf.pal.pompei.exentity.CustomersBasketAttributes.class; + + /** SQL-Annotation for getCountAll(). */ + public static final String getCountAll_SQL = "select count(*) from CUSTOMERS_BASKET_ATTRIBUTES"; + + /** + * Get count as all. + * + * @return All count. + */ + public int getCountAll(); + + /** SQL-Annotation for getListAll(). */ + public static final String getListAll_SQL = "select * from CUSTOMERS_BASKET_ATTRIBUTES"; + + /** + * Get list as all. + * + * @return All list. (NotNull) + */ + public java.util.List getListAll(); + + /** SQL-Annotation for getEntity(). */ + public static final String getEntity_SQL = "select * from CUSTOMERS_BASKET_ATTRIBUTES where CUSTOMERS_BASKET_ATTRIBUTES.CUSTOMERS_BASKET_ATTRIBUTES_ID = /*customersBasketAttributesId*/null"; + + /** Args-Annotation for getEntity(). */ + public static final String getEntity_ARGS = "customersBasketAttributesId"; + + /* (non-javadoc) + * Get entity by primary key. + * + * @param primaryKey Primary key. (NotNull) + */ + public CustomersBasketAttributes getEntity(java.math.BigDecimal customersBasketAttributesId); + + /** + * Select count by condition-bean. + *
+     * Ignore fetchFirst() and fetchScope() and fetchPage().
+     * But the fetch status of the condition-bean remains as it is.
+     * This select method generates SQL based on condition-bean.
+     * 
+     * Example)
+     *   final CustomersBasketAttributesCB cb = new CustomersBasketAttributesCB();
+     *   cb.query().setXxx_GreaterEqual(new BigDecimal(14));
+     *   final int count = dao.selectCount(cb);
+     * 
+ * + * @param cb Condition-bean. (NotNull) + * @return Selected count. (NotNull) + */ + public int selectCount(jp.sf.pal.pompei.cbean.CustomersBasketAttributesCB cb); + + /** + * Select entity 'CustomersBasketAttributes' by condition-bean. + *
+     * This select method generates SQL based on condition-bean.
+     * 
+     * Example)
+     *   final CustomersBasketAttributesCB cb = new CustomersBasketAttributesCB();
+     *   cb.query().setXxxCode_Equal("abc");// It is assumed that this is the primary key...
+     *   cb.lockForUpdate();
+     *   final CustomersBasketAttributes entity = dao.selectEntity(cb);
+     * 
+ * + * @param cb Condition-bean. (NotNull) + * @return Selected entity. If the select result is zero, it returns null. (Nullable) + */ + public CustomersBasketAttributes selectEntity(jp.sf.pal.pompei.cbean.CustomersBasketAttributesCB cb); + + /** + * Select list by condition-bean. + *
+     * This select method generates SQL based on condition-bean.
+     * 
+     * Example)
+     *   final CustomersBasketAttributesCB cb = new CustomersBasketAttributesCB();
+     *   cb.setupSelect_Xxx(); // Including the foreign table in select clause
+     *   cb.query().setXxxName_PrefixSearch("abc");
+     *   cb.query().setXxxStartDate_IsNotNull();
+     *   cb.addOrderBy_PK_Asc().fetchFirst(20);
+     *   final List resultList = dao.selectList(cb);
+     * 
+ * + * @param cb Condition-bean. (NotNull) + * @return Selected list. If the select result is zero, it returns empty list. (NotNull) + */ + public java.util.List selectList(jp.sf.pal.pompei.cbean.CustomersBasketAttributesCB cb); + + + /** + * Insert one entity. + * + * @param entity Entity. (NotNull) + * @return Inserted count. + */ + public int insert(CustomersBasketAttributes entity); + + /** + * Update one entity. + * + * @param entity Entity. (NotNull) + * @return Updated count. + */ + public int update(CustomersBasketAttributes entity); + + /** + * Update one entity. (modified only) + * + * @param entity Entity. (NotNull) + * @return Updated count. + */ + public int updateModifiedOnly(CustomersBasketAttributes entity); + + /** + * Delete one entity. + * + * @param entity Entity. (NotNull) + * @return Deleted count. + */ + public int delete(CustomersBasketAttributes entity); + + /** + * Insert several entities. + * + * @param entityList Entity-list. (NotNull) + * @return Inserted count. + */ + public int insertList(java.util.List entityList); + + /** + * Update several entities. + * + * @param entityList Entity-list. (NotNull) + * @return Updated count. + */ + public int updateList(java.util.List entityList); + + /** + * Delete several entities. + * + * @param entityList Entity-list. (NotNull) + * @return Deleted count. + */ + public int deleteList(java.util.List entityList); +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/bsdao/BsCustomersBasketDao.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/bsdao/BsCustomersBasketDao.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/bsdao/BsCustomersBasketDao.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,186 @@ + +package jp.sf.pal.pompei.bsdao; + +import jp.sf.pal.pompei.exentity.CustomersBasket; + +/** + * The dao interface of CUSTOMERS_BASKET. + * + *
+ * [primary-key]
+ *     CUSTOMERS_BASKET_ID
+ * 
+ * [column-property]
+ *     CUSTOMERS_BASKET_ID, CUSTOMERS_ID, PRODUCTS_ID, CUSTOMERS_BASKET_QUANTITY, FINAL_PRICE, CUSTOMERS_BASKET_DATE_ADDED
+ * 
+ * [foreign-property]
+ *     
+ * 
+ * [refferer-property]
+ *     
+ * 
+ * [sequence]
+ *     
+ * 
+ * [identity]
+ *     
+ * 
+ * [update-date]
+ *     
+ * 
+ * [version-no]
+ *     
+ * 
+ * 
+ * + * @author DBFlute(AutoGenerator) + */ +public interface BsCustomersBasketDao extends jp.sf.pal.pompei.allcommon.DaoWritable { + + /** BEAN-Annotation. */ + public Class BEAN = jp.sf.pal.pompei.exentity.CustomersBasket.class; + + /** SQL-Annotation for getCountAll(). */ + public static final String getCountAll_SQL = "select count(*) from CUSTOMERS_BASKET"; + + /** + * Get count as all. + * + * @return All count. + */ + public int getCountAll(); + + /** SQL-Annotation for getListAll(). */ + public static final String getListAll_SQL = "select * from CUSTOMERS_BASKET"; + + /** + * Get list as all. + * + * @return All list. (NotNull) + */ + public java.util.List getListAll(); + + /** SQL-Annotation for getEntity(). */ + public static final String getEntity_SQL = "select * from CUSTOMERS_BASKET where CUSTOMERS_BASKET.CUSTOMERS_BASKET_ID = /*customersBasketId*/null"; + + /** Args-Annotation for getEntity(). */ + public static final String getEntity_ARGS = "customersBasketId"; + + /* (non-javadoc) + * Get entity by primary key. + * + * @param primaryKey Primary key. (NotNull) + */ + public CustomersBasket getEntity(java.math.BigDecimal customersBasketId); + + /** + * Select count by condition-bean. + *
+     * Ignore fetchFirst() and fetchScope() and fetchPage().
+     * But the fetch status of the condition-bean remains as it is.
+     * This select method generates SQL based on condition-bean.
+     * 
+     * Example)
+     *   final CustomersBasketCB cb = new CustomersBasketCB();
+     *   cb.query().setXxx_GreaterEqual(new BigDecimal(14));
+     *   final int count = dao.selectCount(cb);
+     * 
+ * + * @param cb Condition-bean. (NotNull) + * @return Selected count. (NotNull) + */ + public int selectCount(jp.sf.pal.pompei.cbean.CustomersBasketCB cb); + + /** + * Select entity 'CustomersBasket' by condition-bean. + *
+     * This select method generates SQL based on condition-bean.
+     * 
+     * Example)
+     *   final CustomersBasketCB cb = new CustomersBasketCB();
+     *   cb.query().setXxxCode_Equal("abc");// It is assumed that this is the primary key...
+     *   cb.lockForUpdate();
+     *   final CustomersBasket entity = dao.selectEntity(cb);
+     * 
+ * + * @param cb Condition-bean. (NotNull) + * @return Selected entity. If the select result is zero, it returns null. (Nullable) + */ + public CustomersBasket selectEntity(jp.sf.pal.pompei.cbean.CustomersBasketCB cb); + + /** + * Select list by condition-bean. + *
+     * This select method generates SQL based on condition-bean.
+     * 
+     * Example)
+     *   final CustomersBasketCB cb = new CustomersBasketCB();
+     *   cb.setupSelect_Xxx(); // Including the foreign table in select clause
+     *   cb.query().setXxxName_PrefixSearch("abc");
+     *   cb.query().setXxxStartDate_IsNotNull();
+     *   cb.addOrderBy_PK_Asc().fetchFirst(20);
+     *   final List resultList = dao.selectList(cb);
+     * 
+ * + * @param cb Condition-bean. (NotNull) + * @return Selected list. If the select result is zero, it returns empty list. (NotNull) + */ + public java.util.List selectList(jp.sf.pal.pompei.cbean.CustomersBasketCB cb); + + + /** + * Insert one entity. + * + * @param entity Entity. (NotNull) + * @return Inserted count. + */ + public int insert(CustomersBasket entity); + + /** + * Update one entity. + * + * @param entity Entity. (NotNull) + * @return Updated count. + */ + public int update(CustomersBasket entity); + + /** + * Update one entity. (modified only) + * + * @param entity Entity. (NotNull) + * @return Updated count. + */ + public int updateModifiedOnly(CustomersBasket entity); + + /** + * Delete one entity. + * + * @param entity Entity. (NotNull) + * @return Deleted count. + */ + public int delete(CustomersBasket entity); + + /** + * Insert several entities. + * + * @param entityList Entity-list. (NotNull) + * @return Inserted count. + */ + public int insertList(java.util.List entityList); + + /** + * Update several entities. + * + * @param entityList Entity-list. (NotNull) + * @return Updated count. + */ + public int updateList(java.util.List entityList); + + /** + * Delete several entities. + * + * @param entityList Entity-list. (NotNull) + * @return Deleted count. + */ + public int deleteList(java.util.List entityList); +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/bsdao/BsCustomersDao.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/bsdao/BsCustomersDao.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/bsdao/BsCustomersDao.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,186 @@ + +package jp.sf.pal.pompei.bsdao; + +import jp.sf.pal.pompei.exentity.Customers; + +/** + * The dao interface of CUSTOMERS. + * + *
+ * [primary-key]
+ *     CUSTOMERS_ID
+ * 
+ * [column-property]
+ *     CUSTOMERS_ID, CUSTOMERS_GENDER, CUSTOMERS_FIRSTNAME, CUSTOMERS_LASTNAME, CUSTOMERS_DOB, CUSTOMERS_EMAIL_ADDRESS, CUSTOMERS_DEFAULT_ADDRESS_ID, CUSTOMERS_TELEPHONE, CUSTOMERS_FAX, CUSTOMERS_PASSWORD, CUSTOMERS_NEWSLETTER
+ * 
+ * [foreign-property]
+ *     
+ * 
+ * [refferer-property]
+ *     
+ * 
+ * [sequence]
+ *     
+ * 
+ * [identity]
+ *     
+ * 
+ * [update-date]
+ *     
+ * 
+ * [version-no]
+ *     
+ * 
+ * 
+ * + * @author DBFlute(AutoGenerator) + */ +public interface BsCustomersDao extends jp.sf.pal.pompei.allcommon.DaoWritable { + + /** BEAN-Annotation. */ + public Class BEAN = jp.sf.pal.pompei.exentity.Customers.class; + + /** SQL-Annotation for getCountAll(). */ + public static final String getCountAll_SQL = "select count(*) from CUSTOMERS"; + + /** + * Get count as all. + * + * @return All count. + */ + public int getCountAll(); + + /** SQL-Annotation for getListAll(). */ + public static final String getListAll_SQL = "select * from CUSTOMERS"; + + /** + * Get list as all. + * + * @return All list. (NotNull) + */ + public java.util.List getListAll(); + + /** SQL-Annotation for getEntity(). */ + public static final String getEntity_SQL = "select * from CUSTOMERS where CUSTOMERS.CUSTOMERS_ID = /*customersId*/null"; + + /** Args-Annotation for getEntity(). */ + public static final String getEntity_ARGS = "customersId"; + + /* (non-javadoc) + * Get entity by primary key. + * + * @param primaryKey Primary key. (NotNull) + */ + public Customers getEntity(java.math.BigDecimal customersId); + + /** + * Select count by condition-bean. + *
+     * Ignore fetchFirst() and fetchScope() and fetchPage().
+     * But the fetch status of the condition-bean remains as it is.
+     * This select method generates SQL based on condition-bean.
+     * 
+     * Example)
+     *   final CustomersCB cb = new CustomersCB();
+     *   cb.query().setXxx_GreaterEqual(new BigDecimal(14));
+     *   final int count = dao.selectCount(cb);
+     * 
+ * + * @param cb Condition-bean. (NotNull) + * @return Selected count. (NotNull) + */ + public int selectCount(jp.sf.pal.pompei.cbean.CustomersCB cb); + + /** + * Select entity 'Customers' by condition-bean. + *
+     * This select method generates SQL based on condition-bean.
+     * 
+     * Example)
+     *   final CustomersCB cb = new CustomersCB();
+     *   cb.query().setXxxCode_Equal("abc");// It is assumed that this is the primary key...
+     *   cb.lockForUpdate();
+     *   final Customers entity = dao.selectEntity(cb);
+     * 
+ * + * @param cb Condition-bean. (NotNull) + * @return Selected entity. If the select result is zero, it returns null. (Nullable) + */ + public Customers selectEntity(jp.sf.pal.pompei.cbean.CustomersCB cb); + + /** + * Select list by condition-bean. + *
+     * This select method generates SQL based on condition-bean.
+     * 
+     * Example)
+     *   final CustomersCB cb = new CustomersCB();
+     *   cb.setupSelect_Xxx(); // Including the foreign table in select clause
+     *   cb.query().setXxxName_PrefixSearch("abc");
+     *   cb.query().setXxxStartDate_IsNotNull();
+     *   cb.addOrderBy_PK_Asc().fetchFirst(20);
+     *   final List resultList = dao.selectList(cb);
+     * 
+ * + * @param cb Condition-bean. (NotNull) + * @return Selected list. If the select result is zero, it returns empty list. (NotNull) + */ + public java.util.List selectList(jp.sf.pal.pompei.cbean.CustomersCB cb); + + + /** + * Insert one entity. + * + * @param entity Entity. (NotNull) + * @return Inserted count. + */ + public int insert(Customers entity); + + /** + * Update one entity. + * + * @param entity Entity. (NotNull) + * @return Updated count. + */ + public int update(Customers entity); + + /** + * Update one entity. (modified only) + * + * @param entity Entity. (NotNull) + * @return Updated count. + */ + public int updateModifiedOnly(Customers entity); + + /** + * Delete one entity. + * + * @param entity Entity. (NotNull) + * @return Deleted count. + */ + public int delete(Customers entity); + + /** + * Insert several entities. + * + * @param entityList Entity-list. (NotNull) + * @return Inserted count. + */ + public int insertList(java.util.List entityList); + + /** + * Update several entities. + * + * @param entityList Entity-list. (NotNull) + * @return Updated count. + */ + public int updateList(java.util.List entityList); + + /** + * Delete several entities. + * + * @param entityList Entity-list. (NotNull) + * @return Deleted count. + */ + public int deleteList(java.util.List entityList); +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/bsdao/BsCustomersInfoDao.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/bsdao/BsCustomersInfoDao.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/bsdao/BsCustomersInfoDao.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,186 @@ + +package jp.sf.pal.pompei.bsdao; + +import jp.sf.pal.pompei.exentity.CustomersInfo; + +/** + * The dao interface of CUSTOMERS_INFO. + * + *
+ * [primary-key]
+ *     CUSTOMERS_INFO_ID
+ * 
+ * [column-property]
+ *     CUSTOMERS_INFO_ID, CUSTOMERS_INFO_DATE_OF_LAST_LOGON, CUSTOMERS_INFO_NUMBER_OF_LOGONS, CUSTOMERS_INFO_DATE_ACCOUNT_CREATED, CUSTOMERS_INFO_DATE_ACCOUNT_LAST_MODIFIED, GLOBAL_PRODUCT_NOTIFICATIONS
+ * 
+ * [foreign-property]
+ *     
+ * 
+ * [refferer-property]
+ *     
+ * 
+ * [sequence]
+ *     
+ * 
+ * [identity]
+ *     
+ * 
+ * [update-date]
+ *     
+ * 
+ * [version-no]
+ *     
+ * 
+ * 
+ * + * @author DBFlute(AutoGenerator) + */ +public interface BsCustomersInfoDao extends jp.sf.pal.pompei.allcommon.DaoWritable { + + /** BEAN-Annotation. */ + public Class BEAN = jp.sf.pal.pompei.exentity.CustomersInfo.class; + + /** SQL-Annotation for getCountAll(). */ + public static final String getCountAll_SQL = "select count(*) from CUSTOMERS_INFO"; + + /** + * Get count as all. + * + * @return All count. + */ + public int getCountAll(); + + /** SQL-Annotation for getListAll(). */ + public static final String getListAll_SQL = "select * from CUSTOMERS_INFO"; + + /** + * Get list as all. + * + * @return All list. (NotNull) + */ + public java.util.List getListAll(); + + /** SQL-Annotation for getEntity(). */ + public static final String getEntity_SQL = "select * from CUSTOMERS_INFO where CUSTOMERS_INFO.CUSTOMERS_INFO_ID = /*customersInfoId*/null"; + + /** Args-Annotation for getEntity(). */ + public static final String getEntity_ARGS = "customersInfoId"; + + /* (non-javadoc) + * Get entity by primary key. + * + * @param primaryKey Primary key. (NotNull) + */ + public CustomersInfo getEntity(java.math.BigDecimal customersInfoId); + + /** + * Select count by condition-bean. + *
+     * Ignore fetchFirst() and fetchScope() and fetchPage().
+     * But the fetch status of the condition-bean remains as it is.
+     * This select method generates SQL based on condition-bean.
+     * 
+     * Example)
+     *   final CustomersInfoCB cb = new CustomersInfoCB();
+     *   cb.query().setXxx_GreaterEqual(new BigDecimal(14));
+     *   final int count = dao.selectCount(cb);
+     * 
+ * + * @param cb Condition-bean. (NotNull) + * @return Selected count. (NotNull) + */ + public int selectCount(jp.sf.pal.pompei.cbean.CustomersInfoCB cb); + + /** + * Select entity 'CustomersInfo' by condition-bean. + *
+     * This select method generates SQL based on condition-bean.
+     * 
+     * Example)
+     *   final CustomersInfoCB cb = new CustomersInfoCB();
+     *   cb.query().setXxxCode_Equal("abc");// It is assumed that this is the primary key...
+     *   cb.lockForUpdate();
+     *   final CustomersInfo entity = dao.selectEntity(cb);
+     * 
+ * + * @param cb Condition-bean. (NotNull) + * @return Selected entity. If the select result is zero, it returns null. (Nullable) + */ + public CustomersInfo selectEntity(jp.sf.pal.pompei.cbean.CustomersInfoCB cb); + + /** + * Select list by condition-bean. + *
+     * This select method generates SQL based on condition-bean.
+     * 
+     * Example)
+     *   final CustomersInfoCB cb = new CustomersInfoCB();
+     *   cb.setupSelect_Xxx(); // Including the foreign table in select clause
+     *   cb.query().setXxxName_PrefixSearch("abc");
+     *   cb.query().setXxxStartDate_IsNotNull();
+     *   cb.addOrderBy_PK_Asc().fetchFirst(20);
+     *   final List resultList = dao.selectList(cb);
+     * 
+ * + * @param cb Condition-bean. (NotNull) + * @return Selected list. If the select result is zero, it returns empty list. (NotNull) + */ + public java.util.List selectList(jp.sf.pal.pompei.cbean.CustomersInfoCB cb); + + + /** + * Insert one entity. + * + * @param entity Entity. (NotNull) + * @return Inserted count. + */ + public int insert(CustomersInfo entity); + + /** + * Update one entity. + * + * @param entity Entity. (NotNull) + * @return Updated count. + */ + public int update(CustomersInfo entity); + + /** + * Update one entity. (modified only) + * + * @param entity Entity. (NotNull) + * @return Updated count. + */ + public int updateModifiedOnly(CustomersInfo entity); + + /** + * Delete one entity. + * + * @param entity Entity. (NotNull) + * @return Deleted count. + */ + public int delete(CustomersInfo entity); + + /** + * Insert several entities. + * + * @param entityList Entity-list. (NotNull) + * @return Inserted count. + */ + public int insertList(java.util.List entityList); + + /** + * Update several entities. + * + * @param entityList Entity-list. (NotNull) + * @return Updated count. + */ + public int updateList(java.util.List entityList); + + /** + * Delete several entities. + * + * @param entityList Entity-list. (NotNull) + * @return Deleted count. + */ + public int deleteList(java.util.List entityList); +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/bsdao/BsGeoZonesDao.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/bsdao/BsGeoZonesDao.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/bsdao/BsGeoZonesDao.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,186 @@ + +package jp.sf.pal.pompei.bsdao; + +import jp.sf.pal.pompei.exentity.GeoZones; + +/** + * The dao interface of GEO_ZONES. + * + *
+ * [primary-key]
+ *     GEO_ZONE_ID
+ * 
+ * [column-property]
+ *     GEO_ZONE_ID, GEO_ZONE_NAME, GEO_ZONE_DESCRIPTION, LAST_MODIFIED, DATE_ADDED
+ * 
+ * [foreign-property]
+ *     
+ * 
+ * [refferer-property]
+ *     
+ * 
+ * [sequence]
+ *     
+ * 
+ * [identity]
+ *     
+ * 
+ * [update-date]
+ *     
+ * 
+ * [version-no]
+ *     
+ * 
+ * 
+ * + * @author DBFlute(AutoGenerator) + */ +public interface BsGeoZonesDao extends jp.sf.pal.pompei.allcommon.DaoWritable { + + /** BEAN-Annotation. */ + public Class BEAN = jp.sf.pal.pompei.exentity.GeoZones.class; + + /** SQL-Annotation for getCountAll(). */ + public static final String getCountAll_SQL = "select count(*) from GEO_ZONES"; + + /** + * Get count as all. + * + * @return All count. + */ + public int getCountAll(); + + /** SQL-Annotation for getListAll(). */ + public static final String getListAll_SQL = "select * from GEO_ZONES"; + + /** + * Get list as all. + * + * @return All list. (NotNull) + */ + public java.util.List getListAll(); + + /** SQL-Annotation for getEntity(). */ + public static final String getEntity_SQL = "select * from GEO_ZONES where GEO_ZONES.GEO_ZONE_ID = /*geoZoneId*/null"; + + /** Args-Annotation for getEntity(). */ + public static final String getEntity_ARGS = "geoZoneId"; + + /* (non-javadoc) + * Get entity by primary key. + * + * @param primaryKey Primary key. (NotNull) + */ + public GeoZones getEntity(java.math.BigDecimal geoZoneId); + + /** + * Select count by condition-bean. + *
+     * Ignore fetchFirst() and fetchScope() and fetchPage().
+     * But the fetch status of the condition-bean remains as it is.
+     * This select method generates SQL based on condition-bean.
+     * 
+     * Example)
+     *   final GeoZonesCB cb = new GeoZonesCB();
+     *   cb.query().setXxx_GreaterEqual(new BigDecimal(14));
+     *   final int count = dao.selectCount(cb);
+     * 
+ * + * @param cb Condition-bean. (NotNull) + * @return Selected count. (NotNull) + */ + public int selectCount(jp.sf.pal.pompei.cbean.GeoZonesCB cb); + + /** + * Select entity 'GeoZones' by condition-bean. + *
+     * This select method generates SQL based on condition-bean.
+     * 
+     * Example)
+     *   final GeoZonesCB cb = new GeoZonesCB();
+     *   cb.query().setXxxCode_Equal("abc");// It is assumed that this is the primary key...
+     *   cb.lockForUpdate();
+     *   final GeoZones entity = dao.selectEntity(cb);
+     * 
+ * + * @param cb Condition-bean. (NotNull) + * @return Selected entity. If the select result is zero, it returns null. (Nullable) + */ + public GeoZones selectEntity(jp.sf.pal.pompei.cbean.GeoZonesCB cb); + + /** + * Select list by condition-bean. + *
+     * This select method generates SQL based on condition-bean.
+     * 
+     * Example)
+     *   final GeoZonesCB cb = new GeoZonesCB();
+     *   cb.setupSelect_Xxx(); // Including the foreign table in select clause
+     *   cb.query().setXxxName_PrefixSearch("abc");
+     *   cb.query().setXxxStartDate_IsNotNull();
+     *   cb.addOrderBy_PK_Asc().fetchFirst(20);
+     *   final List resultList = dao.selectList(cb);
+     * 
+ * + * @param cb Condition-bean. (NotNull) + * @return Selected list. If the select result is zero, it returns empty list. (NotNull) + */ + public java.util.List selectList(jp.sf.pal.pompei.cbean.GeoZonesCB cb); + + + /** + * Insert one entity. + * + * @param entity Entity. (NotNull) + * @return Inserted count. + */ + public int insert(GeoZones entity); + + /** + * Update one entity. + * + * @param entity Entity. (NotNull) + * @return Updated count. + */ + public int update(GeoZones entity); + + /** + * Update one entity. (modified only) + * + * @param entity Entity. (NotNull) + * @return Updated count. + */ + public int updateModifiedOnly(GeoZones entity); + + /** + * Delete one entity. + * + * @param entity Entity. (NotNull) + * @return Deleted count. + */ + public int delete(GeoZones entity); + + /** + * Insert several entities. + * + * @param entityList Entity-list. (NotNull) + * @return Inserted count. + */ + public int insertList(java.util.List entityList); + + /** + * Update several entities. + * + * @param entityList Entity-list. (NotNull) + * @return Updated count. + */ + public int updateList(java.util.List entityList); + + /** + * Delete several entities. + * + * @param entityList Entity-list. (NotNull) + * @return Deleted count. + */ + public int deleteList(java.util.List entityList); +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/bsdao/BsLanguagesDao.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/bsdao/BsLanguagesDao.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/bsdao/BsLanguagesDao.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,186 @@ + +package jp.sf.pal.pompei.bsdao; + +import jp.sf.pal.pompei.exentity.Languages; + +/** + * The dao interface of LANGUAGES. + * + *
+ * [primary-key]
+ *     LANGUAGES_ID
+ * 
+ * [column-property]
+ *     LANGUAGES_ID, NAME, CODE, IMAGE, DIRECTORY, SORT_ORDER
+ * 
+ * [foreign-property]
+ *     
+ * 
+ * [refferer-property]
+ *     
+ * 
+ * [sequence]
+ *     
+ * 
+ * [identity]
+ *     
+ * 
+ * [update-date]
+ *     
+ * 
+ * [version-no]
+ *     
+ * 
+ * 
+ * + * @author DBFlute(AutoGenerator) + */ +public interface BsLanguagesDao extends jp.sf.pal.pompei.allcommon.DaoWritable { + + /** BEAN-Annotation. */ + public Class BEAN = jp.sf.pal.pompei.exentity.Languages.class; + + /** SQL-Annotation for getCountAll(). */ + public static final String getCountAll_SQL = "select count(*) from LANGUAGES"; + + /** + * Get count as all. + * + * @return All count. + */ + public int getCountAll(); + + /** SQL-Annotation for getListAll(). */ + public static final String getListAll_SQL = "select * from LANGUAGES"; + + /** + * Get list as all. + * + * @return All list. (NotNull) + */ + public java.util.List getListAll(); + + /** SQL-Annotation for getEntity(). */ + public static final String getEntity_SQL = "select * from LANGUAGES where LANGUAGES.LANGUAGES_ID = /*languagesId*/null"; + + /** Args-Annotation for getEntity(). */ + public static final String getEntity_ARGS = "languagesId"; + + /* (non-javadoc) + * Get entity by primary key. + * + * @param primaryKey Primary key. (NotNull) + */ + public Languages getEntity(java.math.BigDecimal languagesId); + + /** + * Select count by condition-bean. + *
+     * Ignore fetchFirst() and fetchScope() and fetchPage().
+     * But the fetch status of the condition-bean remains as it is.
+     * This select method generates SQL based on condition-bean.
+     * 
+     * Example)
+     *   final LanguagesCB cb = new LanguagesCB();
+     *   cb.query().setXxx_GreaterEqual(new BigDecimal(14));
+     *   final int count = dao.selectCount(cb);
+     * 
+ * + * @param cb Condition-bean. (NotNull) + * @return Selected count. (NotNull) + */ + public int selectCount(jp.sf.pal.pompei.cbean.LanguagesCB cb); + + /** + * Select entity 'Languages' by condition-bean. + *
+     * This select method generates SQL based on condition-bean.
+     * 
+     * Example)
+     *   final LanguagesCB cb = new LanguagesCB();
+     *   cb.query().setXxxCode_Equal("abc");// It is assumed that this is the primary key...
+     *   cb.lockForUpdate();
+     *   final Languages entity = dao.selectEntity(cb);
+     * 
+ * + * @param cb Condition-bean. (NotNull) + * @return Selected entity. If the select result is zero, it returns null. (Nullable) + */ + public Languages selectEntity(jp.sf.pal.pompei.cbean.LanguagesCB cb); + + /** + * Select list by condition-bean. + *
+     * This select method generates SQL based on condition-bean.
+     * 
+     * Example)
+     *   final LanguagesCB cb = new LanguagesCB();
+     *   cb.setupSelect_Xxx(); // Including the foreign table in select clause
+     *   cb.query().setXxxName_PrefixSearch("abc");
+     *   cb.query().setXxxStartDate_IsNotNull();
+     *   cb.addOrderBy_PK_Asc().fetchFirst(20);
+     *   final List resultList = dao.selectList(cb);
+     * 
+ * + * @param cb Condition-bean. (NotNull) + * @return Selected list. If the select result is zero, it returns empty list. (NotNull) + */ + public java.util.List selectList(jp.sf.pal.pompei.cbean.LanguagesCB cb); + + + /** + * Insert one entity. + * + * @param entity Entity. (NotNull) + * @return Inserted count. + */ + public int insert(Languages entity); + + /** + * Update one entity. + * + * @param entity Entity. (NotNull) + * @return Updated count. + */ + public int update(Languages entity); + + /** + * Update one entity. (modified only) + * + * @param entity Entity. (NotNull) + * @return Updated count. + */ + public int updateModifiedOnly(Languages entity); + + /** + * Delete one entity. + * + * @param entity Entity. (NotNull) + * @return Deleted count. + */ + public int delete(Languages entity); + + /** + * Insert several entities. + * + * @param entityList Entity-list. (NotNull) + * @return Inserted count. + */ + public int insertList(java.util.List entityList); + + /** + * Update several entities. + * + * @param entityList Entity-list. (NotNull) + * @return Updated count. + */ + public int updateList(java.util.List entityList); + + /** + * Delete several entities. + * + * @param entityList Entity-list. (NotNull) + * @return Deleted count. + */ + public int deleteList(java.util.List entityList); +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/bsdao/BsManufacturersDao.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/bsdao/BsManufacturersDao.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/bsdao/BsManufacturersDao.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,186 @@ + +package jp.sf.pal.pompei.bsdao; + +import jp.sf.pal.pompei.exentity.Manufacturers; + +/** + * The dao interface of MANUFACTURERS. + * + *
+ * [primary-key]
+ *     MANUFACTURERS_ID
+ * 
+ * [column-property]
+ *     MANUFACTURERS_ID, MANUFACTURERS_NAME, MANUFACTURERS_IMAGE, DATE_ADDED, LAST_MODIFIED
+ * 
+ * [foreign-property]
+ *     
+ * 
+ * [refferer-property]
+ *     
+ * 
+ * [sequence]
+ *     
+ * 
+ * [identity]
+ *     
+ * 
+ * [update-date]
+ *     
+ * 
+ * [version-no]
+ *     
+ * 
+ * 
+ * + * @author DBFlute(AutoGenerator) + */ +public interface BsManufacturersDao extends jp.sf.pal.pompei.allcommon.DaoWritable { + + /** BEAN-Annotation. */ + public Class BEAN = jp.sf.pal.pompei.exentity.Manufacturers.class; + + /** SQL-Annotation for getCountAll(). */ + public static final String getCountAll_SQL = "select count(*) from MANUFACTURERS"; + + /** + * Get count as all. + * + * @return All count. + */ + public int getCountAll(); + + /** SQL-Annotation for getListAll(). */ + public static final String getListAll_SQL = "select * from MANUFACTURERS"; + + /** + * Get list as all. + * + * @return All list. (NotNull) + */ + public java.util.List getListAll(); + + /** SQL-Annotation for getEntity(). */ + public static final String getEntity_SQL = "select * from MANUFACTURERS where MANUFACTURERS.MANUFACTURERS_ID = /*manufacturersId*/null"; + + /** Args-Annotation for getEntity(). */ + public static final String getEntity_ARGS = "manufacturersId"; + + /* (non-javadoc) + * Get entity by primary key. + * + * @param primaryKey Primary key. (NotNull) + */ + public Manufacturers getEntity(java.math.BigDecimal manufacturersId); + + /** + * Select count by condition-bean. + *
+     * Ignore fetchFirst() and fetchScope() and fetchPage().
+     * But the fetch status of the condition-bean remains as it is.
+     * This select method generates SQL based on condition-bean.
+     * 
+     * Example)
+     *   final ManufacturersCB cb = new ManufacturersCB();
+     *   cb.query().setXxx_GreaterEqual(new BigDecimal(14));
+     *   final int count = dao.selectCount(cb);
+     * 
+ * + * @param cb Condition-bean. (NotNull) + * @return Selected count. (NotNull) + */ + public int selectCount(jp.sf.pal.pompei.cbean.ManufacturersCB cb); + + /** + * Select entity 'Manufacturers' by condition-bean. + *
+     * This select method generates SQL based on condition-bean.
+     * 
+     * Example)
+     *   final ManufacturersCB cb = new ManufacturersCB();
+     *   cb.query().setXxxCode_Equal("abc");// It is assumed that this is the primary key...
+     *   cb.lockForUpdate();
+     *   final Manufacturers entity = dao.selectEntity(cb);
+     * 
+ * + * @param cb Condition-bean. (NotNull) + * @return Selected entity. If the select result is zero, it returns null. (Nullable) + */ + public Manufacturers selectEntity(jp.sf.pal.pompei.cbean.ManufacturersCB cb); + + /** + * Select list by condition-bean. + *
+     * This select method generates SQL based on condition-bean.
+     * 
+     * Example)
+     *   final ManufacturersCB cb = new ManufacturersCB();
+     *   cb.setupSelect_Xxx(); // Including the foreign table in select clause
+     *   cb.query().setXxxName_PrefixSearch("abc");
+     *   cb.query().setXxxStartDate_IsNotNull();
+     *   cb.addOrderBy_PK_Asc().fetchFirst(20);
+     *   final List resultList = dao.selectList(cb);
+     * 
+ * + * @param cb Condition-bean. (NotNull) + * @return Selected list. If the select result is zero, it returns empty list. (NotNull) + */ + public java.util.List selectList(jp.sf.pal.pompei.cbean.ManufacturersCB cb); + + + /** + * Insert one entity. + * + * @param entity Entity. (NotNull) + * @return Inserted count. + */ + public int insert(Manufacturers entity); + + /** + * Update one entity. + * + * @param entity Entity. (NotNull) + * @return Updated count. + */ + public int update(Manufacturers entity); + + /** + * Update one entity. (modified only) + * + * @param entity Entity. (NotNull) + * @return Updated count. + */ + public int updateModifiedOnly(Manufacturers entity); + + /** + * Delete one entity. + * + * @param entity Entity. (NotNull) + * @return Deleted count. + */ + public int delete(Manufacturers entity); + + /** + * Insert several entities. + * + * @param entityList Entity-list. (NotNull) + * @return Inserted count. + */ + public int insertList(java.util.List entityList); + + /** + * Update several entities. + * + * @param entityList Entity-list. (NotNull) + * @return Updated count. + */ + public int updateList(java.util.List entityList); + + /** + * Delete several entities. + * + * @param entityList Entity-list. (NotNull) + * @return Deleted count. + */ + public int deleteList(java.util.List entityList); +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/bsdao/BsManufacturersInfoDao.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/bsdao/BsManufacturersInfoDao.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/bsdao/BsManufacturersInfoDao.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,186 @@ + +package jp.sf.pal.pompei.bsdao; + +import jp.sf.pal.pompei.exentity.ManufacturersInfo; + +/** + * The dao interface of MANUFACTURERS_INFO. + * + *
+ * [primary-key]
+ *     MANUFACTURERS_ID, LANGUAGES_ID
+ * 
+ * [column-property]
+ *     MANUFACTURERS_ID, LANGUAGES_ID, MANUFACTURERS_URL, URL_CLICKED, DATE_LAST_CLICK
+ * 
+ * [foreign-property]
+ *     
+ * 
+ * [refferer-property]
+ *     
+ * 
+ * [sequence]
+ *     
+ * 
+ * [identity]
+ *     
+ * 
+ * [update-date]
+ *     
+ * 
+ * [version-no]
+ *     
+ * 
+ * 
+ * + * @author DBFlute(AutoGenerator) + */ +public interface BsManufacturersInfoDao extends jp.sf.pal.pompei.allcommon.DaoWritable { + + /** BEAN-Annotation. */ + public Class BEAN = jp.sf.pal.pompei.exentity.ManufacturersInfo.class; + + /** SQL-Annotation for getCountAll(). */ + public static final String getCountAll_SQL = "select count(*) from MANUFACTURERS_INFO"; + + /** + * Get count as all. + * + * @return All count. + */ + public int getCountAll(); + + /** SQL-Annotation for getListAll(). */ + public static final String getListAll_SQL = "select * from MANUFACTURERS_INFO"; + + /** + * Get list as all. + * + * @return All list. (NotNull) + */ + public java.util.List getListAll(); + + /** SQL-Annotation for getEntity(). */ + public static final String getEntity_SQL = "select * from MANUFACTURERS_INFO where MANUFACTURERS_INFO.MANUFACTURERS_ID = /*manufacturersId*/null and MANUFACTURERS_INFO.LANGUAGES_ID = /*languagesId*/null"; + + /** Args-Annotation for getEntity(). */ + public static final String getEntity_ARGS = "manufacturersId, languagesId"; + + /* (non-javadoc) + * Get entity by primary key. + * + * @param primaryKey Primary key. (NotNull) + */ + public ManufacturersInfo getEntity(java.math.BigDecimal manufacturersId, java.math.BigDecimal languagesId); + + /** + * Select count by condition-bean. + *
+     * Ignore fetchFirst() and fetchScope() and fetchPage().
+     * But the fetch status of the condition-bean remains as it is.
+     * This select method generates SQL based on condition-bean.
+     * 
+     * Example)
+     *   final ManufacturersInfoCB cb = new ManufacturersInfoCB();
+     *   cb.query().setXxx_GreaterEqual(new BigDecimal(14));
+     *   final int count = dao.selectCount(cb);
+     * 
+ * + * @param cb Condition-bean. (NotNull) + * @return Selected count. (NotNull) + */ + public int selectCount(jp.sf.pal.pompei.cbean.ManufacturersInfoCB cb); + + /** + * Select entity 'ManufacturersInfo' by condition-bean. + *
+     * This select method generates SQL based on condition-bean.
+     * 
+     * Example)
+     *   final ManufacturersInfoCB cb = new ManufacturersInfoCB();
+     *   cb.query().setXxxCode_Equal("abc");// It is assumed that this is the primary key...
+     *   cb.lockForUpdate();
+     *   final ManufacturersInfo entity = dao.selectEntity(cb);
+     * 
+ * + * @param cb Condition-bean. (NotNull) + * @return Selected entity. If the select result is zero, it returns null. (Nullable) + */ + public ManufacturersInfo selectEntity(jp.sf.pal.pompei.cbean.ManufacturersInfoCB cb); + + /** + * Select list by condition-bean. + *
+     * This select method generates SQL based on condition-bean.
+     * 
+     * Example)
+     *   final ManufacturersInfoCB cb = new ManufacturersInfoCB();
+     *   cb.setupSelect_Xxx(); // Including the foreign table in select clause
+     *   cb.query().setXxxName_PrefixSearch("abc");
+     *   cb.query().setXxxStartDate_IsNotNull();
+     *   cb.addOrderBy_PK_Asc().fetchFirst(20);
+     *   final List resultList = dao.selectList(cb);
+     * 
+ * + * @param cb Condition-bean. (NotNull) + * @return Selected list. If the select result is zero, it returns empty list. (NotNull) + */ + public java.util.List selectList(jp.sf.pal.pompei.cbean.ManufacturersInfoCB cb); + + + /** + * Insert one entity. + * + * @param entity Entity. (NotNull) + * @return Inserted count. + */ + public int insert(ManufacturersInfo entity); + + /** + * Update one entity. + * + * @param entity Entity. (NotNull) + * @return Updated count. + */ + public int update(ManufacturersInfo entity); + + /** + * Update one entity. (modified only) + * + * @param entity Entity. (NotNull) + * @return Updated count. + */ + public int updateModifiedOnly(ManufacturersInfo entity); + + /** + * Delete one entity. + * + * @param entity Entity. (NotNull) + * @return Deleted count. + */ + public int delete(ManufacturersInfo entity); + + /** + * Insert several entities. + * + * @param entityList Entity-list. (NotNull) + * @return Inserted count. + */ + public int insertList(java.util.List entityList); + + /** + * Update several entities. + * + * @param entityList Entity-list. (NotNull) + * @return Updated count. + */ + public int updateList(java.util.List entityList); + + /** + * Delete several entities. + * + * @param entityList Entity-list. (NotNull) + * @return Deleted count. + */ + public int deleteList(java.util.List entityList); +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/bsdao/BsNewslettersDao.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/bsdao/BsNewslettersDao.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/bsdao/BsNewslettersDao.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,186 @@ + +package jp.sf.pal.pompei.bsdao; + +import jp.sf.pal.pompei.exentity.Newsletters; + +/** + * The dao interface of NEWSLETTERS. + * + *
+ * [primary-key]
+ *     NEWSLETTERS_ID
+ * 
+ * [column-property]
+ *     NEWSLETTERS_ID, TITLE, CONTENT, MODULE, DATE_ADDED, DATE_SENT, STATUS, LOCKED
+ * 
+ * [foreign-property]
+ *     
+ * 
+ * [refferer-property]
+ *     
+ * 
+ * [sequence]
+ *     
+ * 
+ * [identity]
+ *     
+ * 
+ * [update-date]
+ *     
+ * 
+ * [version-no]
+ *     
+ * 
+ * 
+ * + * @author DBFlute(AutoGenerator) + */ +public interface BsNewslettersDao extends jp.sf.pal.pompei.allcommon.DaoWritable { + + /** BEAN-Annotation. */ + public Class BEAN = jp.sf.pal.pompei.exentity.Newsletters.class; + + /** SQL-Annotation for getCountAll(). */ + public static final String getCountAll_SQL = "select count(*) from NEWSLETTERS"; + + /** + * Get count as all. + * + * @return All count. + */ + public int getCountAll(); + + /** SQL-Annotation for getListAll(). */ + public static final String getListAll_SQL = "select * from NEWSLETTERS"; + + /** + * Get list as all. + * + * @return All list. (NotNull) + */ + public java.util.List getListAll(); + + /** SQL-Annotation for getEntity(). */ + public static final String getEntity_SQL = "select * from NEWSLETTERS where NEWSLETTERS.NEWSLETTERS_ID = /*newslettersId*/null"; + + /** Args-Annotation for getEntity(). */ + public static final String getEntity_ARGS = "newslettersId"; + + /* (non-javadoc) + * Get entity by primary key. + * + * @param primaryKey Primary key. (NotNull) + */ + public Newsletters getEntity(java.math.BigDecimal newslettersId); + + /** + * Select count by condition-bean. + *
+     * Ignore fetchFirst() and fetchScope() and fetchPage().
+     * But the fetch status of the condition-bean remains as it is.
+     * This select method generates SQL based on condition-bean.
+     * 
+     * Example)
+     *   final NewslettersCB cb = new NewslettersCB();
+     *   cb.query().setXxx_GreaterEqual(new BigDecimal(14));
+     *   final int count = dao.selectCount(cb);
+     * 
+ * + * @param cb Condition-bean. (NotNull) + * @return Selected count. (NotNull) + */ + public int selectCount(jp.sf.pal.pompei.cbean.NewslettersCB cb); + + /** + * Select entity 'Newsletters' by condition-bean. + *
+     * This select method generates SQL based on condition-bean.
+     * 
+     * Example)
+     *   final NewslettersCB cb = new NewslettersCB();
+     *   cb.query().setXxxCode_Equal("abc");// It is assumed that this is the primary key...
+     *   cb.lockForUpdate();
+     *   final Newsletters entity = dao.selectEntity(cb);
+     * 
+ * + * @param cb Condition-bean. (NotNull) + * @return Selected entity. If the select result is zero, it returns null. (Nullable) + */ + public Newsletters selectEntity(jp.sf.pal.pompei.cbean.NewslettersCB cb); + + /** + * Select list by condition-bean. + *
+     * This select method generates SQL based on condition-bean.
+     * 
+     * Example)
+     *   final NewslettersCB cb = new NewslettersCB();
+     *   cb.setupSelect_Xxx(); // Including the foreign table in select clause
+     *   cb.query().setXxxName_PrefixSearch("abc");
+     *   cb.query().setXxxStartDate_IsNotNull();
+     *   cb.addOrderBy_PK_Asc().fetchFirst(20);
+     *   final List resultList = dao.selectList(cb);
+     * 
+ * + * @param cb Condition-bean. (NotNull) + * @return Selected list. If the select result is zero, it returns empty list. (NotNull) + */ + public java.util.List selectList(jp.sf.pal.pompei.cbean.NewslettersCB cb); + + + /** + * Insert one entity. + * + * @param entity Entity. (NotNull) + * @return Inserted count. + */ + public int insert(Newsletters entity); + + /** + * Update one entity. + * + * @param entity Entity. (NotNull) + * @return Updated count. + */ + public int update(Newsletters entity); + + /** + * Update one entity. (modified only) + * + * @param entity Entity. (NotNull) + * @return Updated count. + */ + public int updateModifiedOnly(Newsletters entity); + + /** + * Delete one entity. + * + * @param entity Entity. (NotNull) + * @return Deleted count. + */ + public int delete(Newsletters entity); + + /** + * Insert several entities. + * + * @param entityList Entity-list. (NotNull) + * @return Inserted count. + */ + public int insertList(java.util.List entityList); + + /** + * Update several entities. + * + * @param entityList Entity-list. (NotNull) + * @return Updated count. + */ + public int updateList(java.util.List entityList); + + /** + * Delete several entities. + * + * @param entityList Entity-list. (NotNull) + * @return Deleted count. + */ + public int deleteList(java.util.List entityList); +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/bsdao/BsOrdersDao.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/bsdao/BsOrdersDao.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/bsdao/BsOrdersDao.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,186 @@ + +package jp.sf.pal.pompei.bsdao; + +import jp.sf.pal.pompei.exentity.Orders; + +/** + * The dao interface of ORDERS. + * + *
+ * [primary-key]
+ *     ORDERS_ID
+ * 
+ * [column-property]
+ *     ORDERS_ID, CUSTOMERS_ID, CUSTOMERS_NAME, CUSTOMERS_COMPANY, CUSTOMERS_STREET_ADDRESS, CUSTOMERS_SUBURB, CUSTOMERS_CITY, CUSTOMERS_POSTCODE, CUSTOMERS_STATE, CUSTOMERS_COUNTRY, CUSTOMERS_TELEPHONE, CUSTOMERS_EMAIL_ADDRESS, CUSTOMERS_ADDRESS_FORMAT_ID, DELIVERY_NAME, DELIVERY_COMPANY, DELIVERY_STREET_ADDRESS, DELIVERY_SUBURB, DELIVERY_CITY, DELIVERY_POSTCODE, DELIVERY_STATE, DELIVERY_COUNTRY, DELIVERY_ADDRESS_FORMAT_ID, BILLING_NAME, BILLING_COMPANY, BILLING_STREET_ADDRESS, BILLING_SUBURB, BILLING_CITY, BILLING_POSTCODE, BILLING_STATE, BILLING_COUNTRY, BILLING_ADDRESS_FORMAT_ID, PAYMENT_METHOD, CC_TYPE, CC_OWNER, CC_NUMBER, CC_EXPIRES, LAST_MODIFIED, DATE_PURCHASED, ORDERS_STATUS, ORDERS_DATE_FINISHED, CURRENCY, CURRENCY_VALUE
+ * 
+ * [foreign-property]
+ *     
+ * 
+ * [refferer-property]
+ *     
+ * 
+ * [sequence]
+ *     
+ * 
+ * [identity]
+ *     
+ * 
+ * [update-date]
+ *     
+ * 
+ * [version-no]
+ *     
+ * 
+ * 
+ * + * @author DBFlute(AutoGenerator) + */ +public interface BsOrdersDao extends jp.sf.pal.pompei.allcommon.DaoWritable { + + /** BEAN-Annotation. */ + public Class BEAN = jp.sf.pal.pompei.exentity.Orders.class; + + /** SQL-Annotation for getCountAll(). */ + public static final String getCountAll_SQL = "select count(*) from ORDERS"; + + /** + * Get count as all. + * + * @return All count. + */ + public int getCountAll(); + + /** SQL-Annotation for getListAll(). */ + public static final String getListAll_SQL = "select * from ORDERS"; + + /** + * Get list as all. + * + * @return All list. (NotNull) + */ + public java.util.List getListAll(); + + /** SQL-Annotation for getEntity(). */ + public static final String getEntity_SQL = "select * from ORDERS where ORDERS.ORDERS_ID = /*ordersId*/null"; + + /** Args-Annotation for getEntity(). */ + public static final String getEntity_ARGS = "ordersId"; + + /* (non-javadoc) + * Get entity by primary key. + * + * @param primaryKey Primary key. (NotNull) + */ + public Orders getEntity(java.math.BigDecimal ordersId); + + /** + * Select count by condition-bean. + *
+     * Ignore fetchFirst() and fetchScope() and fetchPage().
+     * But the fetch status of the condition-bean remains as it is.
+     * This select method generates SQL based on condition-bean.
+     * 
+     * Example)
+     *   final OrdersCB cb = new OrdersCB();
+     *   cb.query().setXxx_GreaterEqual(new BigDecimal(14));
+     *   final int count = dao.selectCount(cb);
+     * 
+ * + * @param cb Condition-bean. (NotNull) + * @return Selected count. (NotNull) + */ + public int selectCount(jp.sf.pal.pompei.cbean.OrdersCB cb); + + /** + * Select entity 'Orders' by condition-bean. + *
+     * This select method generates SQL based on condition-bean.
+     * 
+     * Example)
+     *   final OrdersCB cb = new OrdersCB();
+     *   cb.query().setXxxCode_Equal("abc");// It is assumed that this is the primary key...
+     *   cb.lockForUpdate();
+     *   final Orders entity = dao.selectEntity(cb);
+     * 
+ * + * @param cb Condition-bean. (NotNull) + * @return Selected entity. If the select result is zero, it returns null. (Nullable) + */ + public Orders selectEntity(jp.sf.pal.pompei.cbean.OrdersCB cb); + + /** + * Select list by condition-bean. + *
+     * This select method generates SQL based on condition-bean.
+     * 
+     * Example)
+     *   final OrdersCB cb = new OrdersCB();
+     *   cb.setupSelect_Xxx(); // Including the foreign table in select clause
+     *   cb.query().setXxxName_PrefixSearch("abc");
+     *   cb.query().setXxxStartDate_IsNotNull();
+     *   cb.addOrderBy_PK_Asc().fetchFirst(20);
+     *   final List resultList = dao.selectList(cb);
+     * 
+ * + * @param cb Condition-bean. (NotNull) + * @return Selected list. If the select result is zero, it returns empty list. (NotNull) + */ + public java.util.List selectList(jp.sf.pal.pompei.cbean.OrdersCB cb); + + + /** + * Insert one entity. + * + * @param entity Entity. (NotNull) + * @return Inserted count. + */ + public int insert(Orders entity); + + /** + * Update one entity. + * + * @param entity Entity. (NotNull) + * @return Updated count. + */ + public int update(Orders entity); + + /** + * Update one entity. (modified only) + * + * @param entity Entity. (NotNull) + * @return Updated count. + */ + public int updateModifiedOnly(Orders entity); + + /** + * Delete one entity. + * + * @param entity Entity. (NotNull) + * @return Deleted count. + */ + public int delete(Orders entity); + + /** + * Insert several entities. + * + * @param entityList Entity-list. (NotNull) + * @return Inserted count. + */ + public int insertList(java.util.List entityList); + + /** + * Update several entities. + * + * @param entityList Entity-list. (NotNull) + * @return Updated count. + */ + public int updateList(java.util.List entityList); + + /** + * Delete several entities. + * + * @param entityList Entity-list. (NotNull) + * @return Deleted count. + */ + public int deleteList(java.util.List entityList); +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/bsdao/BsOrdersProductsAttributesDao.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/bsdao/BsOrdersProductsAttributesDao.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/bsdao/BsOrdersProductsAttributesDao.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,186 @@ + +package jp.sf.pal.pompei.bsdao; + +import jp.sf.pal.pompei.exentity.OrdersProductsAttributes; + +/** + * The dao interface of ORDERS_PRODUCTS_ATTRIBUTES. + * + *
+ * [primary-key]
+ *     ORDERS_PRODUCTS_ATTRIBUTES_ID
+ * 
+ * [column-property]
+ *     ORDERS_PRODUCTS_ATTRIBUTES_ID, ORDERS_ID, ORDERS_PRODUCTS_ID, PRODUCTS_OPTIONS, PRODUCTS_OPTIONS_VALUES, OPTIONS_VALUES_PRICE, PRICE_PREFIX
+ * 
+ * [foreign-property]
+ *     
+ * 
+ * [refferer-property]
+ *     
+ * 
+ * [sequence]
+ *     
+ * 
+ * [identity]
+ *     
+ * 
+ * [update-date]
+ *     
+ * 
+ * [version-no]
+ *     
+ * 
+ * 
+ * + * @author DBFlute(AutoGenerator) + */ +public interface BsOrdersProductsAttributesDao extends jp.sf.pal.pompei.allcommon.DaoWritable { + + /** BEAN-Annotation. */ + public Class BEAN = jp.sf.pal.pompei.exentity.OrdersProductsAttributes.class; + + /** SQL-Annotation for getCountAll(). */ + public static final String getCountAll_SQL = "select count(*) from ORDERS_PRODUCTS_ATTRIBUTES"; + + /** + * Get count as all. + * + * @return All count. + */ + public int getCountAll(); + + /** SQL-Annotation for getListAll(). */ + public static final String getListAll_SQL = "select * from ORDERS_PRODUCTS_ATTRIBUTES"; + + /** + * Get list as all. + * + * @return All list. (NotNull) + */ + public java.util.List getListAll(); + + /** SQL-Annotation for getEntity(). */ + public static final String getEntity_SQL = "select * from ORDERS_PRODUCTS_ATTRIBUTES where ORDERS_PRODUCTS_ATTRIBUTES.ORDERS_PRODUCTS_ATTRIBUTES_ID = /*ordersProductsAttributesId*/null"; + + /** Args-Annotation for getEntity(). */ + public static final String getEntity_ARGS = "ordersProductsAttributesId"; + + /* (non-javadoc) + * Get entity by primary key. + * + * @param primaryKey Primary key. (NotNull) + */ + public OrdersProductsAttributes getEntity(java.math.BigDecimal ordersProductsAttributesId); + + /** + * Select count by condition-bean. + *
+     * Ignore fetchFirst() and fetchScope() and fetchPage().
+     * But the fetch status of the condition-bean remains as it is.
+     * This select method generates SQL based on condition-bean.
+     * 
+     * Example)
+     *   final OrdersProductsAttributesCB cb = new OrdersProductsAttributesCB();
+     *   cb.query().setXxx_GreaterEqual(new BigDecimal(14));
+     *   final int count = dao.selectCount(cb);
+     * 
+ * + * @param cb Condition-bean. (NotNull) + * @return Selected count. (NotNull) + */ + public int selectCount(jp.sf.pal.pompei.cbean.OrdersProductsAttributesCB cb); + + /** + * Select entity 'OrdersProductsAttributes' by condition-bean. + *
+     * This select method generates SQL based on condition-bean.
+     * 
+     * Example)
+     *   final OrdersProductsAttributesCB cb = new OrdersProductsAttributesCB();
+     *   cb.query().setXxxCode_Equal("abc");// It is assumed that this is the primary key...
+     *   cb.lockForUpdate();
+     *   final OrdersProductsAttributes entity = dao.selectEntity(cb);
+     * 
+ * + * @param cb Condition-bean. (NotNull) + * @return Selected entity. If the select result is zero, it returns null. (Nullable) + */ + public OrdersProductsAttributes selectEntity(jp.sf.pal.pompei.cbean.OrdersProductsAttributesCB cb); + + /** + * Select list by condition-bean. + *
+     * This select method generates SQL based on condition-bean.
+     * 
+     * Example)
+     *   final OrdersProductsAttributesCB cb = new OrdersProductsAttributesCB();
+     *   cb.setupSelect_Xxx(); // Including the foreign table in select clause
+     *   cb.query().setXxxName_PrefixSearch("abc");
+     *   cb.query().setXxxStartDate_IsNotNull();
+     *   cb.addOrderBy_PK_Asc().fetchFirst(20);
+     *   final List resultList = dao.selectList(cb);
+     * 
+ * + * @param cb Condition-bean. (NotNull) + * @return Selected list. If the select result is zero, it returns empty list. (NotNull) + */ + public java.util.List selectList(jp.sf.pal.pompei.cbean.OrdersProductsAttributesCB cb); + + + /** + * Insert one entity. + * + * @param entity Entity. (NotNull) + * @return Inserted count. + */ + public int insert(OrdersProductsAttributes entity); + + /** + * Update one entity. + * + * @param entity Entity. (NotNull) + * @return Updated count. + */ + public int update(OrdersProductsAttributes entity); + + /** + * Update one entity. (modified only) + * + * @param entity Entity. (NotNull) + * @return Updated count. + */ + public int updateModifiedOnly(OrdersProductsAttributes entity); + + /** + * Delete one entity. + * + * @param entity Entity. (NotNull) + * @return Deleted count. + */ + public int delete(OrdersProductsAttributes entity); + + /** + * Insert several entities. + * + * @param entityList Entity-list. (NotNull) + * @return Inserted count. + */ + public int insertList(java.util.List entityList); + + /** + * Update several entities. + * + * @param entityList Entity-list. (NotNull) + * @return Updated count. + */ + public int updateList(java.util.List entityList); + + /** + * Delete several entities. + * + * @param entityList Entity-list. (NotNull) + * @return Deleted count. + */ + public int deleteList(java.util.List entityList); +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/bsdao/BsOrdersProductsDao.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/bsdao/BsOrdersProductsDao.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/bsdao/BsOrdersProductsDao.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,186 @@ + +package jp.sf.pal.pompei.bsdao; + +import jp.sf.pal.pompei.exentity.OrdersProducts; + +/** + * The dao interface of ORDERS_PRODUCTS. + * + *
+ * [primary-key]
+ *     ORDERS_PRODUCTS_ID
+ * 
+ * [column-property]
+ *     ORDERS_PRODUCTS_ID, ORDERS_ID, PRODUCTS_ID, PRODUCTS_MODEL, PRODUCTS_NAME, PRODUCTS_PRICE, FINAL_PRICE, PRODUCTS_TAX, PRODUCTS_QUANTITY
+ * 
+ * [foreign-property]
+ *     
+ * 
+ * [refferer-property]
+ *     
+ * 
+ * [sequence]
+ *     
+ * 
+ * [identity]
+ *     
+ * 
+ * [update-date]
+ *     
+ * 
+ * [version-no]
+ *     
+ * 
+ * 
+ * + * @author DBFlute(AutoGenerator) + */ +public interface BsOrdersProductsDao extends jp.sf.pal.pompei.allcommon.DaoWritable { + + /** BEAN-Annotation. */ + public Class BEAN = jp.sf.pal.pompei.exentity.OrdersProducts.class; + + /** SQL-Annotation for getCountAll(). */ + public static final String getCountAll_SQL = "select count(*) from ORDERS_PRODUCTS"; + + /** + * Get count as all. + * + * @return All count. + */ + public int getCountAll(); + + /** SQL-Annotation for getListAll(). */ + public static final String getListAll_SQL = "select * from ORDERS_PRODUCTS"; + + /** + * Get list as all. + * + * @return All list. (NotNull) + */ + public java.util.List getListAll(); + + /** SQL-Annotation for getEntity(). */ + public static final String getEntity_SQL = "select * from ORDERS_PRODUCTS where ORDERS_PRODUCTS.ORDERS_PRODUCTS_ID = /*ordersProductsId*/null"; + + /** Args-Annotation for getEntity(). */ + public static final String getEntity_ARGS = "ordersProductsId"; + + /* (non-javadoc) + * Get entity by primary key. + * + * @param primaryKey Primary key. (NotNull) + */ + public OrdersProducts getEntity(java.math.BigDecimal ordersProductsId); + + /** + * Select count by condition-bean. + *
+     * Ignore fetchFirst() and fetchScope() and fetchPage().
+     * But the fetch status of the condition-bean remains as it is.
+     * This select method generates SQL based on condition-bean.
+     * 
+     * Example)
+     *   final OrdersProductsCB cb = new OrdersProductsCB();
+     *   cb.query().setXxx_GreaterEqual(new BigDecimal(14));
+     *   final int count = dao.selectCount(cb);
+     * 
+ * + * @param cb Condition-bean. (NotNull) + * @return Selected count. (NotNull) + */ + public int selectCount(jp.sf.pal.pompei.cbean.OrdersProductsCB cb); + + /** + * Select entity 'OrdersProducts' by condition-bean. + *
+     * This select method generates SQL based on condition-bean.
+     * 
+     * Example)
+     *   final OrdersProductsCB cb = new OrdersProductsCB();
+     *   cb.query().setXxxCode_Equal("abc");// It is assumed that this is the primary key...
+     *   cb.lockForUpdate();
+     *   final OrdersProducts entity = dao.selectEntity(cb);
+     * 
+ * + * @param cb Condition-bean. (NotNull) + * @return Selected entity. If the select result is zero, it returns null. (Nullable) + */ + public OrdersProducts selectEntity(jp.sf.pal.pompei.cbean.OrdersProductsCB cb); + + /** + * Select list by condition-bean. + *
+     * This select method generates SQL based on condition-bean.
+     * 
+     * Example)
+     *   final OrdersProductsCB cb = new OrdersProductsCB();
+     *   cb.setupSelect_Xxx(); // Including the foreign table in select clause
+     *   cb.query().setXxxName_PrefixSearch("abc");
+     *   cb.query().setXxxStartDate_IsNotNull();
+     *   cb.addOrderBy_PK_Asc().fetchFirst(20);
+     *   final List resultList = dao.selectList(cb);
+     * 
+ * + * @param cb Condition-bean. (NotNull) + * @return Selected list. If the select result is zero, it returns empty list. (NotNull) + */ + public java.util.List selectList(jp.sf.pal.pompei.cbean.OrdersProductsCB cb); + + + /** + * Insert one entity. + * + * @param entity Entity. (NotNull) + * @return Inserted count. + */ + public int insert(OrdersProducts entity); + + /** + * Update one entity. + * + * @param entity Entity. (NotNull) + * @return Updated count. + */ + public int update(OrdersProducts entity); + + /** + * Update one entity. (modified only) + * + * @param entity Entity. (NotNull) + * @return Updated count. + */ + public int updateModifiedOnly(OrdersProducts entity); + + /** + * Delete one entity. + * + * @param entity Entity. (NotNull) + * @return Deleted count. + */ + public int delete(OrdersProducts entity); + + /** + * Insert several entities. + * + * @param entityList Entity-list. (NotNull) + * @return Inserted count. + */ + public int insertList(java.util.List entityList); + + /** + * Update several entities. + * + * @param entityList Entity-list. (NotNull) + * @return Updated count. + */ + public int updateList(java.util.List entityList); + + /** + * Delete several entities. + * + * @param entityList Entity-list. (NotNull) + * @return Deleted count. + */ + public int deleteList(java.util.List entityList); +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/bsdao/BsOrdersProductsDownloadDao.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/bsdao/BsOrdersProductsDownloadDao.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/bsdao/BsOrdersProductsDownloadDao.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,186 @@ + +package jp.sf.pal.pompei.bsdao; + +import jp.sf.pal.pompei.exentity.OrdersProductsDownload; + +/** + * The dao interface of ORDERS_PRODUCTS_DOWNLOAD. + * + *
+ * [primary-key]
+ *     ORDERS_PRODUCTS_DOWNLOAD_ID
+ * 
+ * [column-property]
+ *     ORDERS_PRODUCTS_DOWNLOAD_ID, ORDERS_ID, ORDERS_PRODUCTS_ID, ORDERS_PRODUCTS_FILENAME, DOWNLOAD_MAXDAYS, DOWNLOAD_COUNT
+ * 
+ * [foreign-property]
+ *     
+ * 
+ * [refferer-property]
+ *     
+ * 
+ * [sequence]
+ *     
+ * 
+ * [identity]
+ *     
+ * 
+ * [update-date]
+ *     
+ * 
+ * [version-no]
+ *     
+ * 
+ * 
+ * + * @author DBFlute(AutoGenerator) + */ +public interface BsOrdersProductsDownloadDao extends jp.sf.pal.pompei.allcommon.DaoWritable { + + /** BEAN-Annotation. */ + public Class BEAN = jp.sf.pal.pompei.exentity.OrdersProductsDownload.class; + + /** SQL-Annotation for getCountAll(). */ + public static final String getCountAll_SQL = "select count(*) from ORDERS_PRODUCTS_DOWNLOAD"; + + /** + * Get count as all. + * + * @return All count. + */ + public int getCountAll(); + + /** SQL-Annotation for getListAll(). */ + public static final String getListAll_SQL = "select * from ORDERS_PRODUCTS_DOWNLOAD"; + + /** + * Get list as all. + * + * @return All list. (NotNull) + */ + public java.util.List getListAll(); + + /** SQL-Annotation for getEntity(). */ + public static final String getEntity_SQL = "select * from ORDERS_PRODUCTS_DOWNLOAD where ORDERS_PRODUCTS_DOWNLOAD.ORDERS_PRODUCTS_DOWNLOAD_ID = /*ordersProductsDownloadId*/null"; + + /** Args-Annotation for getEntity(). */ + public static final String getEntity_ARGS = "ordersProductsDownloadId"; + + /* (non-javadoc) + * Get entity by primary key. + * + * @param primaryKey Primary key. (NotNull) + */ + public OrdersProductsDownload getEntity(java.math.BigDecimal ordersProductsDownloadId); + + /** + * Select count by condition-bean. + *
+     * Ignore fetchFirst() and fetchScope() and fetchPage().
+     * But the fetch status of the condition-bean remains as it is.
+     * This select method generates SQL based on condition-bean.
+     * 
+     * Example)
+     *   final OrdersProductsDownloadCB cb = new OrdersProductsDownloadCB();
+     *   cb.query().setXxx_GreaterEqual(new BigDecimal(14));
+     *   final int count = dao.selectCount(cb);
+     * 
+ * + * @param cb Condition-bean. (NotNull) + * @return Selected count. (NotNull) + */ + public int selectCount(jp.sf.pal.pompei.cbean.OrdersProductsDownloadCB cb); + + /** + * Select entity 'OrdersProductsDownload' by condition-bean. + *
+     * This select method generates SQL based on condition-bean.
+     * 
+     * Example)
+     *   final OrdersProductsDownloadCB cb = new OrdersProductsDownloadCB();
+     *   cb.query().setXxxCode_Equal("abc");// It is assumed that this is the primary key...
+     *   cb.lockForUpdate();
+     *   final OrdersProductsDownload entity = dao.selectEntity(cb);
+     * 
+ * + * @param cb Condition-bean. (NotNull) + * @return Selected entity. If the select result is zero, it returns null. (Nullable) + */ + public OrdersProductsDownload selectEntity(jp.sf.pal.pompei.cbean.OrdersProductsDownloadCB cb); + + /** + * Select list by condition-bean. + *
+     * This select method generates SQL based on condition-bean.
+     * 
+     * Example)
+     *   final OrdersProductsDownloadCB cb = new OrdersProductsDownloadCB();
+     *   cb.setupSelect_Xxx(); // Including the foreign table in select clause
+     *   cb.query().setXxxName_PrefixSearch("abc");
+     *   cb.query().setXxxStartDate_IsNotNull();
+     *   cb.addOrderBy_PK_Asc().fetchFirst(20);
+     *   final List resultList = dao.selectList(cb);
+     * 
+ * + * @param cb Condition-bean. (NotNull) + * @return Selected list. If the select result is zero, it returns empty list. (NotNull) + */ + public java.util.List selectList(jp.sf.pal.pompei.cbean.OrdersProductsDownloadCB cb); + + + /** + * Insert one entity. + * + * @param entity Entity. (NotNull) + * @return Inserted count. + */ + public int insert(OrdersProductsDownload entity); + + /** + * Update one entity. + * + * @param entity Entity. (NotNull) + * @return Updated count. + */ + public int update(OrdersProductsDownload entity); + + /** + * Update one entity. (modified only) + * + * @param entity Entity. (NotNull) + * @return Updated count. + */ + public int updateModifiedOnly(OrdersProductsDownload entity); + + /** + * Delete one entity. + * + * @param entity Entity. (NotNull) + * @return Deleted count. + */ + public int delete(OrdersProductsDownload entity); + + /** + * Insert several entities. + * + * @param entityList Entity-list. (NotNull) + * @return Inserted count. + */ + public int insertList(java.util.List entityList); + + /** + * Update several entities. + * + * @param entityList Entity-list. (NotNull) + * @return Updated count. + */ + public int updateList(java.util.List entityList); + + /** + * Delete several entities. + * + * @param entityList Entity-list. (NotNull) + * @return Deleted count. + */ + public int deleteList(java.util.List entityList); +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/bsdao/BsOrdersStatusDao.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/bsdao/BsOrdersStatusDao.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/bsdao/BsOrdersStatusDao.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,186 @@ + +package jp.sf.pal.pompei.bsdao; + +import jp.sf.pal.pompei.exentity.OrdersStatus; + +/** + * The dao interface of ORDERS_STATUS. + * + *
+ * [primary-key]
+ *     ORDERS_STATUS_ID, LANGUAGE_ID
+ * 
+ * [column-property]
+ *     ORDERS_STATUS_ID, LANGUAGE_ID, ORDERS_STATUS_NAME
+ * 
+ * [foreign-property]
+ *     
+ * 
+ * [refferer-property]
+ *     
+ * 
+ * [sequence]
+ *     
+ * 
+ * [identity]
+ *     
+ * 
+ * [update-date]
+ *     
+ * 
+ * [version-no]
+ *     
+ * 
+ * 
+ * + * @author DBFlute(AutoGenerator) + */ +public interface BsOrdersStatusDao extends jp.sf.pal.pompei.allcommon.DaoWritable { + + /** BEAN-Annotation. */ + public Class BEAN = jp.sf.pal.pompei.exentity.OrdersStatus.class; + + /** SQL-Annotation for getCountAll(). */ + public static final String getCountAll_SQL = "select count(*) from ORDERS_STATUS"; + + /** + * Get count as all. + * + * @return All count. + */ + public int getCountAll(); + + /** SQL-Annotation for getListAll(). */ + public static final String getListAll_SQL = "select * from ORDERS_STATUS"; + + /** + * Get list as all. + * + * @return All list. (NotNull) + */ + public java.util.List getListAll(); + + /** SQL-Annotation for getEntity(). */ + public static final String getEntity_SQL = "select * from ORDERS_STATUS where ORDERS_STATUS.ORDERS_STATUS_ID = /*ordersStatusId*/null and ORDERS_STATUS.LANGUAGE_ID = /*languageId*/null"; + + /** Args-Annotation for getEntity(). */ + public static final String getEntity_ARGS = "ordersStatusId, languageId"; + + /* (non-javadoc) + * Get entity by primary key. + * + * @param primaryKey Primary key. (NotNull) + */ + public OrdersStatus getEntity(java.math.BigDecimal ordersStatusId, java.math.BigDecimal languageId); + + /** + * Select count by condition-bean. + *
+     * Ignore fetchFirst() and fetchScope() and fetchPage().
+     * But the fetch status of the condition-bean remains as it is.
+     * This select method generates SQL based on condition-bean.
+     * 
+     * Example)
+     *   final OrdersStatusCB cb = new OrdersStatusCB();
+     *   cb.query().setXxx_GreaterEqual(new BigDecimal(14));
+     *   final int count = dao.selectCount(cb);
+     * 
+ * + * @param cb Condition-bean. (NotNull) + * @return Selected count. (NotNull) + */ + public int selectCount(jp.sf.pal.pompei.cbean.OrdersStatusCB cb); + + /** + * Select entity 'OrdersStatus' by condition-bean. + *
+     * This select method generates SQL based on condition-bean.
+     * 
+     * Example)
+     *   final OrdersStatusCB cb = new OrdersStatusCB();
+     *   cb.query().setXxxCode_Equal("abc");// It is assumed that this is the primary key...
+     *   cb.lockForUpdate();
+     *   final OrdersStatus entity = dao.selectEntity(cb);
+     * 
+ * + * @param cb Condition-bean. (NotNull) + * @return Selected entity. If the select result is zero, it returns null. (Nullable) + */ + public OrdersStatus selectEntity(jp.sf.pal.pompei.cbean.OrdersStatusCB cb); + + /** + * Select list by condition-bean. + *
+     * This select method generates SQL based on condition-bean.
+     * 
+     * Example)
+     *   final OrdersStatusCB cb = new OrdersStatusCB();
+     *   cb.setupSelect_Xxx(); // Including the foreign table in select clause
+     *   cb.query().setXxxName_PrefixSearch("abc");
+     *   cb.query().setXxxStartDate_IsNotNull();
+     *   cb.addOrderBy_PK_Asc().fetchFirst(20);
+     *   final List resultList = dao.selectList(cb);
+     * 
+ * + * @param cb Condition-bean. (NotNull) + * @return Selected list. If the select result is zero, it returns empty list. (NotNull) + */ + public java.util.List selectList(jp.sf.pal.pompei.cbean.OrdersStatusCB cb); + + + /** + * Insert one entity. + * + * @param entity Entity. (NotNull) + * @return Inserted count. + */ + public int insert(OrdersStatus entity); + + /** + * Update one entity. + * + * @param entity Entity. (NotNull) + * @return Updated count. + */ + public int update(OrdersStatus entity); + + /** + * Update one entity. (modified only) + * + * @param entity Entity. (NotNull) + * @return Updated count. + */ + public int updateModifiedOnly(OrdersStatus entity); + + /** + * Delete one entity. + * + * @param entity Entity. (NotNull) + * @return Deleted count. + */ + public int delete(OrdersStatus entity); + + /** + * Insert several entities. + * + * @param entityList Entity-list. (NotNull) + * @return Inserted count. + */ + public int insertList(java.util.List entityList); + + /** + * Update several entities. + * + * @param entityList Entity-list. (NotNull) + * @return Updated count. + */ + public int updateList(java.util.List entityList); + + /** + * Delete several entities. + * + * @param entityList Entity-list. (NotNull) + * @return Deleted count. + */ + public int deleteList(java.util.List entityList); +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/bsdao/BsOrdersStatusHistoryDao.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/bsdao/BsOrdersStatusHistoryDao.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/bsdao/BsOrdersStatusHistoryDao.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,186 @@ + +package jp.sf.pal.pompei.bsdao; + +import jp.sf.pal.pompei.exentity.OrdersStatusHistory; + +/** + * The dao interface of ORDERS_STATUS_HISTORY. + * + *
+ * [primary-key]
+ *     ORDERS_STATUS_HISTORY_ID
+ * 
+ * [column-property]
+ *     ORDERS_STATUS_HISTORY_ID, ORDERS_ID, ORDERS_STATUS_ID, DATE_ADDED, CUSTOMER_NOTIFIED, COMMENTS
+ * 
+ * [foreign-property]
+ *     
+ * 
+ * [refferer-property]
+ *     
+ * 
+ * [sequence]
+ *     
+ * 
+ * [identity]
+ *     
+ * 
+ * [update-date]
+ *     
+ * 
+ * [version-no]
+ *     
+ * 
+ * 
+ * + * @author DBFlute(AutoGenerator) + */ +public interface BsOrdersStatusHistoryDao extends jp.sf.pal.pompei.allcommon.DaoWritable { + + /** BEAN-Annotation. */ + public Class BEAN = jp.sf.pal.pompei.exentity.OrdersStatusHistory.class; + + /** SQL-Annotation for getCountAll(). */ + public static final String getCountAll_SQL = "select count(*) from ORDERS_STATUS_HISTORY"; + + /** + * Get count as all. + * + * @return All count. + */ + public int getCountAll(); + + /** SQL-Annotation for getListAll(). */ + public static final String getListAll_SQL = "select * from ORDERS_STATUS_HISTORY"; + + /** + * Get list as all. + * + * @return All list. (NotNull) + */ + public java.util.List getListAll(); + + /** SQL-Annotation for getEntity(). */ + public static final String getEntity_SQL = "select * from ORDERS_STATUS_HISTORY where ORDERS_STATUS_HISTORY.ORDERS_STATUS_HISTORY_ID = /*ordersStatusHistoryId*/null"; + + /** Args-Annotation for getEntity(). */ + public static final String getEntity_ARGS = "ordersStatusHistoryId"; + + /* (non-javadoc) + * Get entity by primary key. + * + * @param primaryKey Primary key. (NotNull) + */ + public OrdersStatusHistory getEntity(java.math.BigDecimal ordersStatusHistoryId); + + /** + * Select count by condition-bean. + *
+     * Ignore fetchFirst() and fetchScope() and fetchPage().
+     * But the fetch status of the condition-bean remains as it is.
+     * This select method generates SQL based on condition-bean.
+     * 
+     * Example)
+     *   final OrdersStatusHistoryCB cb = new OrdersStatusHistoryCB();
+     *   cb.query().setXxx_GreaterEqual(new BigDecimal(14));
+     *   final int count = dao.selectCount(cb);
+     * 
+ * + * @param cb Condition-bean. (NotNull) + * @return Selected count. (NotNull) + */ + public int selectCount(jp.sf.pal.pompei.cbean.OrdersStatusHistoryCB cb); + + /** + * Select entity 'OrdersStatusHistory' by condition-bean. + *
+     * This select method generates SQL based on condition-bean.
+     * 
+     * Example)
+     *   final OrdersStatusHistoryCB cb = new OrdersStatusHistoryCB();
+     *   cb.query().setXxxCode_Equal("abc");// It is assumed that this is the primary key...
+     *   cb.lockForUpdate();
+     *   final OrdersStatusHistory entity = dao.selectEntity(cb);
+     * 
+ * + * @param cb Condition-bean. (NotNull) + * @return Selected entity. If the select result is zero, it returns null. (Nullable) + */ + public OrdersStatusHistory selectEntity(jp.sf.pal.pompei.cbean.OrdersStatusHistoryCB cb); + + /** + * Select list by condition-bean. + *
+     * This select method generates SQL based on condition-bean.
+     * 
+     * Example)
+     *   final OrdersStatusHistoryCB cb = new OrdersStatusHistoryCB();
+     *   cb.setupSelect_Xxx(); // Including the foreign table in select clause
+     *   cb.query().setXxxName_PrefixSearch("abc");
+     *   cb.query().setXxxStartDate_IsNotNull();
+     *   cb.addOrderBy_PK_Asc().fetchFirst(20);
+     *   final List resultList = dao.selectList(cb);
+     * 
+ * + * @param cb Condition-bean. (NotNull) + * @return Selected list. If the select result is zero, it returns empty list. (NotNull) + */ + public java.util.List selectList(jp.sf.pal.pompei.cbean.OrdersStatusHistoryCB cb); + + + /** + * Insert one entity. + * + * @param entity Entity. (NotNull) + * @return Inserted count. + */ + public int insert(OrdersStatusHistory entity); + + /** + * Update one entity. + * + * @param entity Entity. (NotNull) + * @return Updated count. + */ + public int update(OrdersStatusHistory entity); + + /** + * Update one entity. (modified only) + * + * @param entity Entity. (NotNull) + * @return Updated count. + */ + public int updateModifiedOnly(OrdersStatusHistory entity); + + /** + * Delete one entity. + * + * @param entity Entity. (NotNull) + * @return Deleted count. + */ + public int delete(OrdersStatusHistory entity); + + /** + * Insert several entities. + * + * @param entityList Entity-list. (NotNull) + * @return Inserted count. + */ + public int insertList(java.util.List entityList); + + /** + * Update several entities. + * + * @param entityList Entity-list. (NotNull) + * @return Updated count. + */ + public int updateList(java.util.List entityList); + + /** + * Delete several entities. + * + * @param entityList Entity-list. (NotNull) + * @return Deleted count. + */ + public int deleteList(java.util.List entityList); +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/bsdao/BsOrdersTotalDao.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/bsdao/BsOrdersTotalDao.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/bsdao/BsOrdersTotalDao.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,186 @@ + +package jp.sf.pal.pompei.bsdao; + +import jp.sf.pal.pompei.exentity.OrdersTotal; + +/** + * The dao interface of ORDERS_TOTAL. + * + *
+ * [primary-key]
+ *     ORDERS_TOTAL_ID
+ * 
+ * [column-property]
+ *     ORDERS_TOTAL_ID, ORDERS_ID, TITLE, TEXT, VALUE, OT_CLASS, SORT_ORDER
+ * 
+ * [foreign-property]
+ *     
+ * 
+ * [refferer-property]
+ *     
+ * 
+ * [sequence]
+ *     
+ * 
+ * [identity]
+ *     
+ * 
+ * [update-date]
+ *     
+ * 
+ * [version-no]
+ *     
+ * 
+ * 
+ * + * @author DBFlute(AutoGenerator) + */ +public interface BsOrdersTotalDao extends jp.sf.pal.pompei.allcommon.DaoWritable { + + /** BEAN-Annotation. */ + public Class BEAN = jp.sf.pal.pompei.exentity.OrdersTotal.class; + + /** SQL-Annotation for getCountAll(). */ + public static final String getCountAll_SQL = "select count(*) from ORDERS_TOTAL"; + + /** + * Get count as all. + * + * @return All count. + */ + public int getCountAll(); + + /** SQL-Annotation for getListAll(). */ + public static final String getListAll_SQL = "select * from ORDERS_TOTAL"; + + /** + * Get list as all. + * + * @return All list. (NotNull) + */ + public java.util.List getListAll(); + + /** SQL-Annotation for getEntity(). */ + public static final String getEntity_SQL = "select * from ORDERS_TOTAL where ORDERS_TOTAL.ORDERS_TOTAL_ID = /*ordersTotalId*/null"; + + /** Args-Annotation for getEntity(). */ + public static final String getEntity_ARGS = "ordersTotalId"; + + /* (non-javadoc) + * Get entity by primary key. + * + * @param primaryKey Primary key. (NotNull) + */ + public OrdersTotal getEntity(java.math.BigDecimal ordersTotalId); + + /** + * Select count by condition-bean. + *
+     * Ignore fetchFirst() and fetchScope() and fetchPage().
+     * But the fetch status of the condition-bean remains as it is.
+     * This select method generates SQL based on condition-bean.
+     * 
+     * Example)
+     *   final OrdersTotalCB cb = new OrdersTotalCB();
+     *   cb.query().setXxx_GreaterEqual(new BigDecimal(14));
+     *   final int count = dao.selectCount(cb);
+     * 
+ * + * @param cb Condition-bean. (NotNull) + * @return Selected count. (NotNull) + */ + public int selectCount(jp.sf.pal.pompei.cbean.OrdersTotalCB cb); + + /** + * Select entity 'OrdersTotal' by condition-bean. + *
+     * This select method generates SQL based on condition-bean.
+     * 
+     * Example)
+     *   final OrdersTotalCB cb = new OrdersTotalCB();
+     *   cb.query().setXxxCode_Equal("abc");// It is assumed that this is the primary key...
+     *   cb.lockForUpdate();
+     *   final OrdersTotal entity = dao.selectEntity(cb);
+     * 
+ * + * @param cb Condition-bean. (NotNull) + * @return Selected entity. If the select result is zero, it returns null. (Nullable) + */ + public OrdersTotal selectEntity(jp.sf.pal.pompei.cbean.OrdersTotalCB cb); + + /** + * Select list by condition-bean. + *
+     * This select method generates SQL based on condition-bean.
+     * 
+     * Example)
+     *   final OrdersTotalCB cb = new OrdersTotalCB();
+     *   cb.setupSelect_Xxx(); // Including the foreign table in select clause
+     *   cb.query().setXxxName_PrefixSearch("abc");
+     *   cb.query().setXxxStartDate_IsNotNull();
+     *   cb.addOrderBy_PK_Asc().fetchFirst(20);
+     *   final List resultList = dao.selectList(cb);
+     * 
+ * + * @param cb Condition-bean. (NotNull) + * @return Selected list. If the select result is zero, it returns empty list. (NotNull) + */ + public java.util.List selectList(jp.sf.pal.pompei.cbean.OrdersTotalCB cb); + + + /** + * Insert one entity. + * + * @param entity Entity. (NotNull) + * @return Inserted count. + */ + public int insert(OrdersTotal entity); + + /** + * Update one entity. + * + * @param entity Entity. (NotNull) + * @return Updated count. + */ + public int update(OrdersTotal entity); + + /** + * Update one entity. (modified only) + * + * @param entity Entity. (NotNull) + * @return Updated count. + */ + public int updateModifiedOnly(OrdersTotal entity); + + /** + * Delete one entity. + * + * @param entity Entity. (NotNull) + * @return Deleted count. + */ + public int delete(OrdersTotal entity); + + /** + * Insert several entities. + * + * @param entityList Entity-list. (NotNull) + * @return Inserted count. + */ + public int insertList(java.util.List entityList); + + /** + * Update several entities. + * + * @param entityList Entity-list. (NotNull) + * @return Updated count. + */ + public int updateList(java.util.List entityList); + + /** + * Delete several entities. + * + * @param entityList Entity-list. (NotNull) + * @return Deleted count. + */ + public int deleteList(java.util.List entityList); +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/bsdao/BsProductsAttributesDao.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/bsdao/BsProductsAttributesDao.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/bsdao/BsProductsAttributesDao.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,186 @@ + +package jp.sf.pal.pompei.bsdao; + +import jp.sf.pal.pompei.exentity.ProductsAttributes; + +/** + * The dao interface of PRODUCTS_ATTRIBUTES. + * + *
+ * [primary-key]
+ *     PRODUCTS_ATTRIBUTES_ID
+ * 
+ * [column-property]
+ *     PRODUCTS_ATTRIBUTES_ID, PRODUCTS_ID, OPTIONS_ID, OPTIONS_VALUES_ID, OPTIONS_VALUES_PRICE, PRICE_PREFIX
+ * 
+ * [foreign-property]
+ *     
+ * 
+ * [refferer-property]
+ *     
+ * 
+ * [sequence]
+ *     
+ * 
+ * [identity]
+ *     
+ * 
+ * [update-date]
+ *     
+ * 
+ * [version-no]
+ *     
+ * 
+ * 
+ * + * @author DBFlute(AutoGenerator) + */ +public interface BsProductsAttributesDao extends jp.sf.pal.pompei.allcommon.DaoWritable { + + /** BEAN-Annotation. */ + public Class BEAN = jp.sf.pal.pompei.exentity.ProductsAttributes.class; + + /** SQL-Annotation for getCountAll(). */ + public static final String getCountAll_SQL = "select count(*) from PRODUCTS_ATTRIBUTES"; + + /** + * Get count as all. + * + * @return All count. + */ + public int getCountAll(); + + /** SQL-Annotation for getListAll(). */ + public static final String getListAll_SQL = "select * from PRODUCTS_ATTRIBUTES"; + + /** + * Get list as all. + * + * @return All list. (NotNull) + */ + public java.util.List getListAll(); + + /** SQL-Annotation for getEntity(). */ + public static final String getEntity_SQL = "select * from PRODUCTS_ATTRIBUTES where PRODUCTS_ATTRIBUTES.PRODUCTS_ATTRIBUTES_ID = /*productsAttributesId*/null"; + + /** Args-Annotation for getEntity(). */ + public static final String getEntity_ARGS = "productsAttributesId"; + + /* (non-javadoc) + * Get entity by primary key. + * + * @param primaryKey Primary key. (NotNull) + */ + public ProductsAttributes getEntity(java.math.BigDecimal productsAttributesId); + + /** + * Select count by condition-bean. + *
+     * Ignore fetchFirst() and fetchScope() and fetchPage().
+     * But the fetch status of the condition-bean remains as it is.
+     * This select method generates SQL based on condition-bean.
+     * 
+     * Example)
+     *   final ProductsAttributesCB cb = new ProductsAttributesCB();
+     *   cb.query().setXxx_GreaterEqual(new BigDecimal(14));
+     *   final int count = dao.selectCount(cb);
+     * 
+ * + * @param cb Condition-bean. (NotNull) + * @return Selected count. (NotNull) + */ + public int selectCount(jp.sf.pal.pompei.cbean.ProductsAttributesCB cb); + + /** + * Select entity 'ProductsAttributes' by condition-bean. + *
+     * This select method generates SQL based on condition-bean.
+     * 
+     * Example)
+     *   final ProductsAttributesCB cb = new ProductsAttributesCB();
+     *   cb.query().setXxxCode_Equal("abc");// It is assumed that this is the primary key...
+     *   cb.lockForUpdate();
+     *   final ProductsAttributes entity = dao.selectEntity(cb);
+     * 
+ * + * @param cb Condition-bean. (NotNull) + * @return Selected entity. If the select result is zero, it returns null. (Nullable) + */ + public ProductsAttributes selectEntity(jp.sf.pal.pompei.cbean.ProductsAttributesCB cb); + + /** + * Select list by condition-bean. + *
+     * This select method generates SQL based on condition-bean.
+     * 
+     * Example)
+     *   final ProductsAttributesCB cb = new ProductsAttributesCB();
+     *   cb.setupSelect_Xxx(); // Including the foreign table in select clause
+     *   cb.query().setXxxName_PrefixSearch("abc");
+     *   cb.query().setXxxStartDate_IsNotNull();
+     *   cb.addOrderBy_PK_Asc().fetchFirst(20);
+     *   final List resultList = dao.selectList(cb);
+     * 
+ * + * @param cb Condition-bean. (NotNull) + * @return Selected list. If the select result is zero, it returns empty list. (NotNull) + */ + public java.util.List selectList(jp.sf.pal.pompei.cbean.ProductsAttributesCB cb); + + + /** + * Insert one entity. + * + * @param entity Entity. (NotNull) + * @return Inserted count. + */ + public int insert(ProductsAttributes entity); + + /** + * Update one entity. + * + * @param entity Entity. (NotNull) + * @return Updated count. + */ + public int update(ProductsAttributes entity); + + /** + * Update one entity. (modified only) + * + * @param entity Entity. (NotNull) + * @return Updated count. + */ + public int updateModifiedOnly(ProductsAttributes entity); + + /** + * Delete one entity. + * + * @param entity Entity. (NotNull) + * @return Deleted count. + */ + public int delete(ProductsAttributes entity); + + /** + * Insert several entities. + * + * @param entityList Entity-list. (NotNull) + * @return Inserted count. + */ + public int insertList(java.util.List entityList); + + /** + * Update several entities. + * + * @param entityList Entity-list. (NotNull) + * @return Updated count. + */ + public int updateList(java.util.List entityList); + + /** + * Delete several entities. + * + * @param entityList Entity-list. (NotNull) + * @return Deleted count. + */ + public int deleteList(java.util.List entityList); +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/bsdao/BsProductsAttributesDownloadDao.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/bsdao/BsProductsAttributesDownloadDao.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/bsdao/BsProductsAttributesDownloadDao.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,186 @@ + +package jp.sf.pal.pompei.bsdao; + +import jp.sf.pal.pompei.exentity.ProductsAttributesDownload; + +/** + * The dao interface of PRODUCTS_ATTRIBUTES_DOWNLOAD. + * + *
+ * [primary-key]
+ *     PRODUCTS_ATTRIBUTES_ID
+ * 
+ * [column-property]
+ *     PRODUCTS_ATTRIBUTES_ID, PRODUCTS_ATTRIBUTES_FILENAME, PRODUCTS_ATTRIBUTES_MAXDAYS, PRODUCTS_ATTRIBUTES_MAXCOUNT
+ * 
+ * [foreign-property]
+ *     
+ * 
+ * [refferer-property]
+ *     
+ * 
+ * [sequence]
+ *     
+ * 
+ * [identity]
+ *     
+ * 
+ * [update-date]
+ *     
+ * 
+ * [version-no]
+ *     
+ * 
+ * 
+ * + * @author DBFlute(AutoGenerator) + */ +public interface BsProductsAttributesDownloadDao extends jp.sf.pal.pompei.allcommon.DaoWritable { + + /** BEAN-Annotation. */ + public Class BEAN = jp.sf.pal.pompei.exentity.ProductsAttributesDownload.class; + + /** SQL-Annotation for getCountAll(). */ + public static final String getCountAll_SQL = "select count(*) from PRODUCTS_ATTRIBUTES_DOWNLOAD"; + + /** + * Get count as all. + * + * @return All count. + */ + public int getCountAll(); + + /** SQL-Annotation for getListAll(). */ + public static final String getListAll_SQL = "select * from PRODUCTS_ATTRIBUTES_DOWNLOAD"; + + /** + * Get list as all. + * + * @return All list. (NotNull) + */ + public java.util.List getListAll(); + + /** SQL-Annotation for getEntity(). */ + public static final String getEntity_SQL = "select * from PRODUCTS_ATTRIBUTES_DOWNLOAD where PRODUCTS_ATTRIBUTES_DOWNLOAD.PRODUCTS_ATTRIBUTES_ID = /*productsAttributesId*/null"; + + /** Args-Annotation for getEntity(). */ + public static final String getEntity_ARGS = "productsAttributesId"; + + /* (non-javadoc) + * Get entity by primary key. + * + * @param primaryKey Primary key. (NotNull) + */ + public ProductsAttributesDownload getEntity(java.math.BigDecimal productsAttributesId); + + /** + * Select count by condition-bean. + *
+     * Ignore fetchFirst() and fetchScope() and fetchPage().
+     * But the fetch status of the condition-bean remains as it is.
+     * This select method generates SQL based on condition-bean.
+     * 
+     * Example)
+     *   final ProductsAttributesDownloadCB cb = new ProductsAttributesDownloadCB();
+     *   cb.query().setXxx_GreaterEqual(new BigDecimal(14));
+     *   final int count = dao.selectCount(cb);
+     * 
+ * + * @param cb Condition-bean. (NotNull) + * @return Selected count. (NotNull) + */ + public int selectCount(jp.sf.pal.pompei.cbean.ProductsAttributesDownloadCB cb); + + /** + * Select entity 'ProductsAttributesDownload' by condition-bean. + *
+     * This select method generates SQL based on condition-bean.
+     * 
+     * Example)
+     *   final ProductsAttributesDownloadCB cb = new ProductsAttributesDownloadCB();
+     *   cb.query().setXxxCode_Equal("abc");// It is assumed that this is the primary key...
+     *   cb.lockForUpdate();
+     *   final ProductsAttributesDownload entity = dao.selectEntity(cb);
+     * 
+ * + * @param cb Condition-bean. (NotNull) + * @return Selected entity. If the select result is zero, it returns null. (Nullable) + */ + public ProductsAttributesDownload selectEntity(jp.sf.pal.pompei.cbean.ProductsAttributesDownloadCB cb); + + /** + * Select list by condition-bean. + *
+     * This select method generates SQL based on condition-bean.
+     * 
+     * Example)
+     *   final ProductsAttributesDownloadCB cb = new ProductsAttributesDownloadCB();
+     *   cb.setupSelect_Xxx(); // Including the foreign table in select clause
+     *   cb.query().setXxxName_PrefixSearch("abc");
+     *   cb.query().setXxxStartDate_IsNotNull();
+     *   cb.addOrderBy_PK_Asc().fetchFirst(20);
+     *   final List resultList = dao.selectList(cb);
+     * 
+ * + * @param cb Condition-bean. (NotNull) + * @return Selected list. If the select result is zero, it returns empty list. (NotNull) + */ + public java.util.List selectList(jp.sf.pal.pompei.cbean.ProductsAttributesDownloadCB cb); + + + /** + * Insert one entity. + * + * @param entity Entity. (NotNull) + * @return Inserted count. + */ + public int insert(ProductsAttributesDownload entity); + + /** + * Update one entity. + * + * @param entity Entity. (NotNull) + * @return Updated count. + */ + public int update(ProductsAttributesDownload entity); + + /** + * Update one entity. (modified only) + * + * @param entity Entity. (NotNull) + * @return Updated count. + */ + public int updateModifiedOnly(ProductsAttributesDownload entity); + + /** + * Delete one entity. + * + * @param entity Entity. (NotNull) + * @return Deleted count. + */ + public int delete(ProductsAttributesDownload entity); + + /** + * Insert several entities. + * + * @param entityList Entity-list. (NotNull) + * @return Inserted count. + */ + public int insertList(java.util.List entityList); + + /** + * Update several entities. + * + * @param entityList Entity-list. (NotNull) + * @return Updated count. + */ + public int updateList(java.util.List entityList); + + /** + * Delete several entities. + * + * @param entityList Entity-list. (NotNull) + * @return Deleted count. + */ + public int deleteList(java.util.List entityList); +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/bsdao/BsProductsDao.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/bsdao/BsProductsDao.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/bsdao/BsProductsDao.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,186 @@ + +package jp.sf.pal.pompei.bsdao; + +import jp.sf.pal.pompei.exentity.Products; + +/** + * The dao interface of PRODUCTS. + * + *
+ * [primary-key]
+ *     PRODUCTS_ID
+ * 
+ * [column-property]
+ *     PRODUCTS_ID, PRODUCTS_QUANTITY, PRODUCTS_MODEL, PRODUCTS_IMAGE, PRODUCTS_PRICE, PRODUCTS_DATE_ADDED, PRODUCTS_LAST_MODIFIED, PRODUCTS_DATE_AVAILABLE, PRODUCTS_WEIGHT, PRODUCTS_STATUS, PRODUCTS_TAX_CLASS_ID, MANUFACTURERS_ID, PRODUCTS_ORDERED
+ * 
+ * [foreign-property]
+ *     
+ * 
+ * [refferer-property]
+ *     
+ * 
+ * [sequence]
+ *     
+ * 
+ * [identity]
+ *     
+ * 
+ * [update-date]
+ *     
+ * 
+ * [version-no]
+ *     
+ * 
+ * 
+ * + * @author DBFlute(AutoGenerator) + */ +public interface BsProductsDao extends jp.sf.pal.pompei.allcommon.DaoWritable { + + /** BEAN-Annotation. */ + public Class BEAN = jp.sf.pal.pompei.exentity.Products.class; + + /** SQL-Annotation for getCountAll(). */ + public static final String getCountAll_SQL = "select count(*) from PRODUCTS"; + + /** + * Get count as all. + * + * @return All count. + */ + public int getCountAll(); + + /** SQL-Annotation for getListAll(). */ + public static final String getListAll_SQL = "select * from PRODUCTS"; + + /** + * Get list as all. + * + * @return All list. (NotNull) + */ + public java.util.List getListAll(); + + /** SQL-Annotation for getEntity(). */ + public static final String getEntity_SQL = "select * from PRODUCTS where PRODUCTS.PRODUCTS_ID = /*productsId*/null"; + + /** Args-Annotation for getEntity(). */ + public static final String getEntity_ARGS = "productsId"; + + /* (non-javadoc) + * Get entity by primary key. + * + * @param primaryKey Primary key. (NotNull) + */ + public Products getEntity(java.math.BigDecimal productsId); + + /** + * Select count by condition-bean. + *
+     * Ignore fetchFirst() and fetchScope() and fetchPage().
+     * But the fetch status of the condition-bean remains as it is.
+     * This select method generates SQL based on condition-bean.
+     * 
+     * Example)
+     *   final ProductsCB cb = new ProductsCB();
+     *   cb.query().setXxx_GreaterEqual(new BigDecimal(14));
+     *   final int count = dao.selectCount(cb);
+     * 
+ * + * @param cb Condition-bean. (NotNull) + * @return Selected count. (NotNull) + */ + public int selectCount(jp.sf.pal.pompei.cbean.ProductsCB cb); + + /** + * Select entity 'Products' by condition-bean. + *
+     * This select method generates SQL based on condition-bean.
+     * 
+     * Example)
+     *   final ProductsCB cb = new ProductsCB();
+     *   cb.query().setXxxCode_Equal("abc");// It is assumed that this is the primary key...
+     *   cb.lockForUpdate();
+     *   final Products entity = dao.selectEntity(cb);
+     * 
+ * + * @param cb Condition-bean. (NotNull) + * @return Selected entity. If the select result is zero, it returns null. (Nullable) + */ + public Products selectEntity(jp.sf.pal.pompei.cbean.ProductsCB cb); + + /** + * Select list by condition-bean. + *
+     * This select method generates SQL based on condition-bean.
+     * 
+     * Example)
+     *   final ProductsCB cb = new ProductsCB();
+     *   cb.setupSelect_Xxx(); // Including the foreign table in select clause
+     *   cb.query().setXxxName_PrefixSearch("abc");
+     *   cb.query().setXxxStartDate_IsNotNull();
+     *   cb.addOrderBy_PK_Asc().fetchFirst(20);
+     *   final List resultList = dao.selectList(cb);
+     * 
+ * + * @param cb Condition-bean. (NotNull) + * @return Selected list. If the select result is zero, it returns empty list. (NotNull) + */ + public java.util.List selectList(jp.sf.pal.pompei.cbean.ProductsCB cb); + + + /** + * Insert one entity. + * + * @param entity Entity. (NotNull) + * @return Inserted count. + */ + public int insert(Products entity); + + /** + * Update one entity. + * + * @param entity Entity. (NotNull) + * @return Updated count. + */ + public int update(Products entity); + + /** + * Update one entity. (modified only) + * + * @param entity Entity. (NotNull) + * @return Updated count. + */ + public int updateModifiedOnly(Products entity); + + /** + * Delete one entity. + * + * @param entity Entity. (NotNull) + * @return Deleted count. + */ + public int delete(Products entity); + + /** + * Insert several entities. + * + * @param entityList Entity-list. (NotNull) + * @return Inserted count. + */ + public int insertList(java.util.List entityList); + + /** + * Update several entities. + * + * @param entityList Entity-list. (NotNull) + * @return Updated count. + */ + public int updateList(java.util.List entityList); + + /** + * Delete several entities. + * + * @param entityList Entity-list. (NotNull) + * @return Deleted count. + */ + public int deleteList(java.util.List entityList); +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/bsdao/BsProductsDescriptionDao.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/bsdao/BsProductsDescriptionDao.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/bsdao/BsProductsDescriptionDao.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,186 @@ + +package jp.sf.pal.pompei.bsdao; + +import jp.sf.pal.pompei.exentity.ProductsDescription; + +/** + * The dao interface of PRODUCTS_DESCRIPTION. + * + *
+ * [primary-key]
+ *     PRODUCTS_ID, LANGUAGE_ID
+ * 
+ * [column-property]
+ *     PRODUCTS_ID, LANGUAGE_ID, PRODUCTS_NAME, PRODUCTS_DESCRIPTION, PRODUCTS_URL, PRODUCTS_VIEWED
+ * 
+ * [foreign-property]
+ *     
+ * 
+ * [refferer-property]
+ *     
+ * 
+ * [sequence]
+ *     
+ * 
+ * [identity]
+ *     
+ * 
+ * [update-date]
+ *     
+ * 
+ * [version-no]
+ *     
+ * 
+ * 
+ * + * @author DBFlute(AutoGenerator) + */ +public interface BsProductsDescriptionDao extends jp.sf.pal.pompei.allcommon.DaoWritable { + + /** BEAN-Annotation. */ + public Class BEAN = jp.sf.pal.pompei.exentity.ProductsDescription.class; + + /** SQL-Annotation for getCountAll(). */ + public static final String getCountAll_SQL = "select count(*) from PRODUCTS_DESCRIPTION"; + + /** + * Get count as all. + * + * @return All count. + */ + public int getCountAll(); + + /** SQL-Annotation for getListAll(). */ + public static final String getListAll_SQL = "select * from PRODUCTS_DESCRIPTION"; + + /** + * Get list as all. + * + * @return All list. (NotNull) + */ + public java.util.List getListAll(); + + /** SQL-Annotation for getEntity(). */ + public static final String getEntity_SQL = "select * from PRODUCTS_DESCRIPTION where PRODUCTS_DESCRIPTION.PRODUCTS_ID = /*productsId*/null and PRODUCTS_DESCRIPTION.LANGUAGE_ID = /*languageId*/null"; + + /** Args-Annotation for getEntity(). */ + public static final String getEntity_ARGS = "productsId, languageId"; + + /* (non-javadoc) + * Get entity by primary key. + * + * @param primaryKey Primary key. (NotNull) + */ + public ProductsDescription getEntity(java.math.BigDecimal productsId, java.math.BigDecimal languageId); + + /** + * Select count by condition-bean. + *
+     * Ignore fetchFirst() and fetchScope() and fetchPage().
+     * But the fetch status of the condition-bean remains as it is.
+     * This select method generates SQL based on condition-bean.
+     * 
+     * Example)
+     *   final ProductsDescriptionCB cb = new ProductsDescriptionCB();
+     *   cb.query().setXxx_GreaterEqual(new BigDecimal(14));
+     *   final int count = dao.selectCount(cb);
+     * 
+ * + * @param cb Condition-bean. (NotNull) + * @return Selected count. (NotNull) + */ + public int selectCount(jp.sf.pal.pompei.cbean.ProductsDescriptionCB cb); + + /** + * Select entity 'ProductsDescription' by condition-bean. + *
+     * This select method generates SQL based on condition-bean.
+     * 
+     * Example)
+     *   final ProductsDescriptionCB cb = new ProductsDescriptionCB();
+     *   cb.query().setXxxCode_Equal("abc");// It is assumed that this is the primary key...
+     *   cb.lockForUpdate();
+     *   final ProductsDescription entity = dao.selectEntity(cb);
+     * 
+ * + * @param cb Condition-bean. (NotNull) + * @return Selected entity. If the select result is zero, it returns null. (Nullable) + */ + public ProductsDescription selectEntity(jp.sf.pal.pompei.cbean.ProductsDescriptionCB cb); + + /** + * Select list by condition-bean. + *
+     * This select method generates SQL based on condition-bean.
+     * 
+     * Example)
+     *   final ProductsDescriptionCB cb = new ProductsDescriptionCB();
+     *   cb.setupSelect_Xxx(); // Including the foreign table in select clause
+     *   cb.query().setXxxName_PrefixSearch("abc");
+     *   cb.query().setXxxStartDate_IsNotNull();
+     *   cb.addOrderBy_PK_Asc().fetchFirst(20);
+     *   final List resultList = dao.selectList(cb);
+     * 
+ * + * @param cb Condition-bean. (NotNull) + * @return Selected list. If the select result is zero, it returns empty list. (NotNull) + */ + public java.util.List selectList(jp.sf.pal.pompei.cbean.ProductsDescriptionCB cb); + + + /** + * Insert one entity. + * + * @param entity Entity. (NotNull) + * @return Inserted count. + */ + public int insert(ProductsDescription entity); + + /** + * Update one entity. + * + * @param entity Entity. (NotNull) + * @return Updated count. + */ + public int update(ProductsDescription entity); + + /** + * Update one entity. (modified only) + * + * @param entity Entity. (NotNull) + * @return Updated count. + */ + public int updateModifiedOnly(ProductsDescription entity); + + /** + * Delete one entity. + * + * @param entity Entity. (NotNull) + * @return Deleted count. + */ + public int delete(ProductsDescription entity); + + /** + * Insert several entities. + * + * @param entityList Entity-list. (NotNull) + * @return Inserted count. + */ + public int insertList(java.util.List entityList); + + /** + * Update several entities. + * + * @param entityList Entity-list. (NotNull) + * @return Updated count. + */ + public int updateList(java.util.List entityList); + + /** + * Delete several entities. + * + * @param entityList Entity-list. (NotNull) + * @return Deleted count. + */ + public int deleteList(java.util.List entityList); +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/bsdao/BsProductsNotificationsDao.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/bsdao/BsProductsNotificationsDao.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/bsdao/BsProductsNotificationsDao.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,186 @@ + +package jp.sf.pal.pompei.bsdao; + +import jp.sf.pal.pompei.exentity.ProductsNotifications; + +/** + * The dao interface of PRODUCTS_NOTIFICATIONS. + * + *
+ * [primary-key]
+ *     PRODUCTS_ID, CUSTOMERS_ID
+ * 
+ * [column-property]
+ *     PRODUCTS_ID, CUSTOMERS_ID, DATE_ADDED
+ * 
+ * [foreign-property]
+ *     
+ * 
+ * [refferer-property]
+ *     
+ * 
+ * [sequence]
+ *     
+ * 
+ * [identity]
+ *     
+ * 
+ * [update-date]
+ *     
+ * 
+ * [version-no]
+ *     
+ * 
+ * 
+ * + * @author DBFlute(AutoGenerator) + */ +public interface BsProductsNotificationsDao extends jp.sf.pal.pompei.allcommon.DaoWritable { + + /** BEAN-Annotation. */ + public Class BEAN = jp.sf.pal.pompei.exentity.ProductsNotifications.class; + + /** SQL-Annotation for getCountAll(). */ + public static final String getCountAll_SQL = "select count(*) from PRODUCTS_NOTIFICATIONS"; + + /** + * Get count as all. + * + * @return All count. + */ + public int getCountAll(); + + /** SQL-Annotation for getListAll(). */ + public static final String getListAll_SQL = "select * from PRODUCTS_NOTIFICATIONS"; + + /** + * Get list as all. + * + * @return All list. (NotNull) + */ + public java.util.List getListAll(); + + /** SQL-Annotation for getEntity(). */ + public static final String getEntity_SQL = "select * from PRODUCTS_NOTIFICATIONS where PRODUCTS_NOTIFICATIONS.PRODUCTS_ID = /*productsId*/null and PRODUCTS_NOTIFICATIONS.CUSTOMERS_ID = /*customersId*/null"; + + /** Args-Annotation for getEntity(). */ + public static final String getEntity_ARGS = "productsId, customersId"; + + /* (non-javadoc) + * Get entity by primary key. + * + * @param primaryKey Primary key. (NotNull) + */ + public ProductsNotifications getEntity(java.math.BigDecimal productsId, java.math.BigDecimal customersId); + + /** + * Select count by condition-bean. + *
+     * Ignore fetchFirst() and fetchScope() and fetchPage().
+     * But the fetch status of the condition-bean remains as it is.
+     * This select method generates SQL based on condition-bean.
+     * 
+     * Example)
+     *   final ProductsNotificationsCB cb = new ProductsNotificationsCB();
+     *   cb.query().setXxx_GreaterEqual(new BigDecimal(14));
+     *   final int count = dao.selectCount(cb);
+     * 
+ * + * @param cb Condition-bean. (NotNull) + * @return Selected count. (NotNull) + */ + public int selectCount(jp.sf.pal.pompei.cbean.ProductsNotificationsCB cb); + + /** + * Select entity 'ProductsNotifications' by condition-bean. + *
+     * This select method generates SQL based on condition-bean.
+     * 
+     * Example)
+     *   final ProductsNotificationsCB cb = new ProductsNotificationsCB();
+     *   cb.query().setXxxCode_Equal("abc");// It is assumed that this is the primary key...
+     *   cb.lockForUpdate();
+     *   final ProductsNotifications entity = dao.selectEntity(cb);
+     * 
+ * + * @param cb Condition-bean. (NotNull) + * @return Selected entity. If the select result is zero, it returns null. (Nullable) + */ + public ProductsNotifications selectEntity(jp.sf.pal.pompei.cbean.ProductsNotificationsCB cb); + + /** + * Select list by condition-bean. + *
+     * This select method generates SQL based on condition-bean.
+     * 
+     * Example)
+     *   final ProductsNotificationsCB cb = new ProductsNotificationsCB();
+     *   cb.setupSelect_Xxx(); // Including the foreign table in select clause
+     *   cb.query().setXxxName_PrefixSearch("abc");
+     *   cb.query().setXxxStartDate_IsNotNull();
+     *   cb.addOrderBy_PK_Asc().fetchFirst(20);
+     *   final List resultList = dao.selectList(cb);
+     * 
+ * + * @param cb Condition-bean. (NotNull) + * @return Selected list. If the select result is zero, it returns empty list. (NotNull) + */ + public java.util.List selectList(jp.sf.pal.pompei.cbean.ProductsNotificationsCB cb); + + + /** + * Insert one entity. + * + * @param entity Entity. (NotNull) + * @return Inserted count. + */ + public int insert(ProductsNotifications entity); + + /** + * Update one entity. + * + * @param entity Entity. (NotNull) + * @return Updated count. + */ + public int update(ProductsNotifications entity); + + /** + * Update one entity. (modified only) + * + * @param entity Entity. (NotNull) + * @return Updated count. + */ + public int updateModifiedOnly(ProductsNotifications entity); + + /** + * Delete one entity. + * + * @param entity Entity. (NotNull) + * @return Deleted count. + */ + public int delete(ProductsNotifications entity); + + /** + * Insert several entities. + * + * @param entityList Entity-list. (NotNull) + * @return Inserted count. + */ + public int insertList(java.util.List entityList); + + /** + * Update several entities. + * + * @param entityList Entity-list. (NotNull) + * @return Updated count. + */ + public int updateList(java.util.List entityList); + + /** + * Delete several entities. + * + * @param entityList Entity-list. (NotNull) + * @return Deleted count. + */ + public int deleteList(java.util.List entityList); +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/bsdao/BsProductsOptionsDao.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/bsdao/BsProductsOptionsDao.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/bsdao/BsProductsOptionsDao.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,186 @@ + +package jp.sf.pal.pompei.bsdao; + +import jp.sf.pal.pompei.exentity.ProductsOptions; + +/** + * The dao interface of PRODUCTS_OPTIONS. + * + *
+ * [primary-key]
+ *     PRODUCTS_OPTIONS_ID, LANGUAGE_ID
+ * 
+ * [column-property]
+ *     PRODUCTS_OPTIONS_ID, LANGUAGE_ID, PRODUCTS_OPTIONS_NAME
+ * 
+ * [foreign-property]
+ *     
+ * 
+ * [refferer-property]
+ *     
+ * 
+ * [sequence]
+ *     
+ * 
+ * [identity]
+ *     
+ * 
+ * [update-date]
+ *     
+ * 
+ * [version-no]
+ *     
+ * 
+ * 
+ * + * @author DBFlute(AutoGenerator) + */ +public interface BsProductsOptionsDao extends jp.sf.pal.pompei.allcommon.DaoWritable { + + /** BEAN-Annotation. */ + public Class BEAN = jp.sf.pal.pompei.exentity.ProductsOptions.class; + + /** SQL-Annotation for getCountAll(). */ + public static final String getCountAll_SQL = "select count(*) from PRODUCTS_OPTIONS"; + + /** + * Get count as all. + * + * @return All count. + */ + public int getCountAll(); + + /** SQL-Annotation for getListAll(). */ + public static final String getListAll_SQL = "select * from PRODUCTS_OPTIONS"; + + /** + * Get list as all. + * + * @return All list. (NotNull) + */ + public java.util.List getListAll(); + + /** SQL-Annotation for getEntity(). */ + public static final String getEntity_SQL = "select * from PRODUCTS_OPTIONS where PRODUCTS_OPTIONS.PRODUCTS_OPTIONS_ID = /*productsOptionsId*/null and PRODUCTS_OPTIONS.LANGUAGE_ID = /*languageId*/null"; + + /** Args-Annotation for getEntity(). */ + public static final String getEntity_ARGS = "productsOptionsId, languageId"; + + /* (non-javadoc) + * Get entity by primary key. + * + * @param primaryKey Primary key. (NotNull) + */ + public ProductsOptions getEntity(java.math.BigDecimal productsOptionsId, java.math.BigDecimal languageId); + + /** + * Select count by condition-bean. + *
+     * Ignore fetchFirst() and fetchScope() and fetchPage().
+     * But the fetch status of the condition-bean remains as it is.
+     * This select method generates SQL based on condition-bean.
+     * 
+     * Example)
+     *   final ProductsOptionsCB cb = new ProductsOptionsCB();
+     *   cb.query().setXxx_GreaterEqual(new BigDecimal(14));
+     *   final int count = dao.selectCount(cb);
+     * 
+ * + * @param cb Condition-bean. (NotNull) + * @return Selected count. (NotNull) + */ + public int selectCount(jp.sf.pal.pompei.cbean.ProductsOptionsCB cb); + + /** + * Select entity 'ProductsOptions' by condition-bean. + *
+     * This select method generates SQL based on condition-bean.
+     * 
+     * Example)
+     *   final ProductsOptionsCB cb = new ProductsOptionsCB();
+     *   cb.query().setXxxCode_Equal("abc");// It is assumed that this is the primary key...
+     *   cb.lockForUpdate();
+     *   final ProductsOptions entity = dao.selectEntity(cb);
+     * 
+ * + * @param cb Condition-bean. (NotNull) + * @return Selected entity. If the select result is zero, it returns null. (Nullable) + */ + public ProductsOptions selectEntity(jp.sf.pal.pompei.cbean.ProductsOptionsCB cb); + + /** + * Select list by condition-bean. + *
+     * This select method generates SQL based on condition-bean.
+     * 
+     * Example)
+     *   final ProductsOptionsCB cb = new ProductsOptionsCB();
+     *   cb.setupSelect_Xxx(); // Including the foreign table in select clause
+     *   cb.query().setXxxName_PrefixSearch("abc");
+     *   cb.query().setXxxStartDate_IsNotNull();
+     *   cb.addOrderBy_PK_Asc().fetchFirst(20);
+     *   final List resultList = dao.selectList(cb);
+     * 
+ * + * @param cb Condition-bean. (NotNull) + * @return Selected list. If the select result is zero, it returns empty list. (NotNull) + */ + public java.util.List selectList(jp.sf.pal.pompei.cbean.ProductsOptionsCB cb); + + + /** + * Insert one entity. + * + * @param entity Entity. (NotNull) + * @return Inserted count. + */ + public int insert(ProductsOptions entity); + + /** + * Update one entity. + * + * @param entity Entity. (NotNull) + * @return Updated count. + */ + public int update(ProductsOptions entity); + + /** + * Update one entity. (modified only) + * + * @param entity Entity. (NotNull) + * @return Updated count. + */ + public int updateModifiedOnly(ProductsOptions entity); + + /** + * Delete one entity. + * + * @param entity Entity. (NotNull) + * @return Deleted count. + */ + public int delete(ProductsOptions entity); + + /** + * Insert several entities. + * + * @param entityList Entity-list. (NotNull) + * @return Inserted count. + */ + public int insertList(java.util.List entityList); + + /** + * Update several entities. + * + * @param entityList Entity-list. (NotNull) + * @return Updated count. + */ + public int updateList(java.util.List entityList); + + /** + * Delete several entities. + * + * @param entityList Entity-list. (NotNull) + * @return Deleted count. + */ + public int deleteList(java.util.List entityList); +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/bsdao/BsProductsOptionsValuesDao.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/bsdao/BsProductsOptionsValuesDao.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/bsdao/BsProductsOptionsValuesDao.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,186 @@ + +package jp.sf.pal.pompei.bsdao; + +import jp.sf.pal.pompei.exentity.ProductsOptionsValues; + +/** + * The dao interface of PRODUCTS_OPTIONS_VALUES. + * + *
+ * [primary-key]
+ *     PRODUCTS_OPTIONS_VALUES_ID, LANGUAGE_ID
+ * 
+ * [column-property]
+ *     PRODUCTS_OPTIONS_VALUES_ID, LANGUAGE_ID, PRODUCTS_OPTIONS_VALUES_NAME
+ * 
+ * [foreign-property]
+ *     
+ * 
+ * [refferer-property]
+ *     
+ * 
+ * [sequence]
+ *     
+ * 
+ * [identity]
+ *     
+ * 
+ * [update-date]
+ *     
+ * 
+ * [version-no]
+ *     
+ * 
+ * 
+ * + * @author DBFlute(AutoGenerator) + */ +public interface BsProductsOptionsValuesDao extends jp.sf.pal.pompei.allcommon.DaoWritable { + + /** BEAN-Annotation. */ + public Class BEAN = jp.sf.pal.pompei.exentity.ProductsOptionsValues.class; + + /** SQL-Annotation for getCountAll(). */ + public static final String getCountAll_SQL = "select count(*) from PRODUCTS_OPTIONS_VALUES"; + + /** + * Get count as all. + * + * @return All count. + */ + public int getCountAll(); + + /** SQL-Annotation for getListAll(). */ + public static final String getListAll_SQL = "select * from PRODUCTS_OPTIONS_VALUES"; + + /** + * Get list as all. + * + * @return All list. (NotNull) + */ + public java.util.List getListAll(); + + /** SQL-Annotation for getEntity(). */ + public static final String getEntity_SQL = "select * from PRODUCTS_OPTIONS_VALUES where PRODUCTS_OPTIONS_VALUES.PRODUCTS_OPTIONS_VALUES_ID = /*productsOptionsValuesId*/null and PRODUCTS_OPTIONS_VALUES.LANGUAGE_ID = /*languageId*/null"; + + /** Args-Annotation for getEntity(). */ + public static final String getEntity_ARGS = "productsOptionsValuesId, languageId"; + + /* (non-javadoc) + * Get entity by primary key. + * + * @param primaryKey Primary key. (NotNull) + */ + public ProductsOptionsValues getEntity(java.math.BigDecimal productsOptionsValuesId, java.math.BigDecimal languageId); + + /** + * Select count by condition-bean. + *
+     * Ignore fetchFirst() and fetchScope() and fetchPage().
+     * But the fetch status of the condition-bean remains as it is.
+     * This select method generates SQL based on condition-bean.
+     * 
+     * Example)
+     *   final ProductsOptionsValuesCB cb = new ProductsOptionsValuesCB();
+     *   cb.query().setXxx_GreaterEqual(new BigDecimal(14));
+     *   final int count = dao.selectCount(cb);
+     * 
+ * + * @param cb Condition-bean. (NotNull) + * @return Selected count. (NotNull) + */ + public int selectCount(jp.sf.pal.pompei.cbean.ProductsOptionsValuesCB cb); + + /** + * Select entity 'ProductsOptionsValues' by condition-bean. + *
+     * This select method generates SQL based on condition-bean.
+     * 
+     * Example)
+     *   final ProductsOptionsValuesCB cb = new ProductsOptionsValuesCB();
+     *   cb.query().setXxxCode_Equal("abc");// It is assumed that this is the primary key...
+     *   cb.lockForUpdate();
+     *   final ProductsOptionsValues entity = dao.selectEntity(cb);
+     * 
+ * + * @param cb Condition-bean. (NotNull) + * @return Selected entity. If the select result is zero, it returns null. (Nullable) + */ + public ProductsOptionsValues selectEntity(jp.sf.pal.pompei.cbean.ProductsOptionsValuesCB cb); + + /** + * Select list by condition-bean. + *
+     * This select method generates SQL based on condition-bean.
+     * 
+     * Example)
+     *   final ProductsOptionsValuesCB cb = new ProductsOptionsValuesCB();
+     *   cb.setupSelect_Xxx(); // Including the foreign table in select clause
+     *   cb.query().setXxxName_PrefixSearch("abc");
+     *   cb.query().setXxxStartDate_IsNotNull();
+     *   cb.addOrderBy_PK_Asc().fetchFirst(20);
+     *   final List resultList = dao.selectList(cb);
+     * 
+ * + * @param cb Condition-bean. (NotNull) + * @return Selected list. If the select result is zero, it returns empty list. (NotNull) + */ + public java.util.List selectList(jp.sf.pal.pompei.cbean.ProductsOptionsValuesCB cb); + + + /** + * Insert one entity. + * + * @param entity Entity. (NotNull) + * @return Inserted count. + */ + public int insert(ProductsOptionsValues entity); + + /** + * Update one entity. + * + * @param entity Entity. (NotNull) + * @return Updated count. + */ + public int update(ProductsOptionsValues entity); + + /** + * Update one entity. (modified only) + * + * @param entity Entity. (NotNull) + * @return Updated count. + */ + public int updateModifiedOnly(ProductsOptionsValues entity); + + /** + * Delete one entity. + * + * @param entity Entity. (NotNull) + * @return Deleted count. + */ + public int delete(ProductsOptionsValues entity); + + /** + * Insert several entities. + * + * @param entityList Entity-list. (NotNull) + * @return Inserted count. + */ + public int insertList(java.util.List entityList); + + /** + * Update several entities. + * + * @param entityList Entity-list. (NotNull) + * @return Updated count. + */ + public int updateList(java.util.List entityList); + + /** + * Delete several entities. + * + * @param entityList Entity-list. (NotNull) + * @return Deleted count. + */ + public int deleteList(java.util.List entityList); +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/bsdao/BsProductsOptionsValuesToProductsOptionsDao.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/bsdao/BsProductsOptionsValuesToProductsOptionsDao.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/bsdao/BsProductsOptionsValuesToProductsOptionsDao.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,186 @@ + +package jp.sf.pal.pompei.bsdao; + +import jp.sf.pal.pompei.exentity.ProductsOptionsValuesToProductsOptions; + +/** + * The dao interface of PRODUCTS_OPTIONS_VALUES_TO_PRODUCTS_OPTIONS. + * + *
+ * [primary-key]
+ *     PRODUCTS_OPTIONS_VALUES_TO_PRODUCTS_OPTIONS_ID
+ * 
+ * [column-property]
+ *     PRODUCTS_OPTIONS_VALUES_TO_PRODUCTS_OPTIONS_ID, PRODUCTS_OPTIONS_ID, PRODUCTS_OPTIONS_VALUES_ID
+ * 
+ * [foreign-property]
+ *     
+ * 
+ * [refferer-property]
+ *     
+ * 
+ * [sequence]
+ *     
+ * 
+ * [identity]
+ *     
+ * 
+ * [update-date]
+ *     
+ * 
+ * [version-no]
+ *     
+ * 
+ * 
+ * + * @author DBFlute(AutoGenerator) + */ +public interface BsProductsOptionsValuesToProductsOptionsDao extends jp.sf.pal.pompei.allcommon.DaoWritable { + + /** BEAN-Annotation. */ + public Class BEAN = jp.sf.pal.pompei.exentity.ProductsOptionsValuesToProductsOptions.class; + + /** SQL-Annotation for getCountAll(). */ + public static final String getCountAll_SQL = "select count(*) from PRODUCTS_OPTIONS_VALUES_TO_PRODUCTS_OPTIONS"; + + /** + * Get count as all. + * + * @return All count. + */ + public int getCountAll(); + + /** SQL-Annotation for getListAll(). */ + public static final String getListAll_SQL = "select * from PRODUCTS_OPTIONS_VALUES_TO_PRODUCTS_OPTIONS"; + + /** + * Get list as all. + * + * @return All list. (NotNull) + */ + public java.util.List getListAll(); + + /** SQL-Annotation for getEntity(). */ + public static final String getEntity_SQL = "select * from PRODUCTS_OPTIONS_VALUES_TO_PRODUCTS_OPTIONS where PRODUCTS_OPTIONS_VALUES_TO_PRODUCTS_OPTIONS.PRODUCTS_OPTIONS_VALUES_TO_PRODUCTS_OPTIONS_ID = /*productsOptionsValuesToProductsOptionsId*/null"; + + /** Args-Annotation for getEntity(). */ + public static final String getEntity_ARGS = "productsOptionsValuesToProductsOptionsId"; + + /* (non-javadoc) + * Get entity by primary key. + * + * @param primaryKey Primary key. (NotNull) + */ + public ProductsOptionsValuesToProductsOptions getEntity(java.math.BigDecimal productsOptionsValuesToProductsOptionsId); + + /** + * Select count by condition-bean. + *
+     * Ignore fetchFirst() and fetchScope() and fetchPage().
+     * But the fetch status of the condition-bean remains as it is.
+     * This select method generates SQL based on condition-bean.
+     * 
+     * Example)
+     *   final ProductsOptionsValuesToProductsOptionsCB cb = new ProductsOptionsValuesToProductsOptionsCB();
+     *   cb.query().setXxx_GreaterEqual(new BigDecimal(14));
+     *   final int count = dao.selectCount(cb);
+     * 
+ * + * @param cb Condition-bean. (NotNull) + * @return Selected count. (NotNull) + */ + public int selectCount(jp.sf.pal.pompei.cbean.ProductsOptionsValuesToProductsOptionsCB cb); + + /** + * Select entity 'ProductsOptionsValuesToProductsOptions' by condition-bean. + *
+     * This select method generates SQL based on condition-bean.
+     * 
+     * Example)
+     *   final ProductsOptionsValuesToProductsOptionsCB cb = new ProductsOptionsValuesToProductsOptionsCB();
+     *   cb.query().setXxxCode_Equal("abc");// It is assumed that this is the primary key...
+     *   cb.lockForUpdate();
+     *   final ProductsOptionsValuesToProductsOptions entity = dao.selectEntity(cb);
+     * 
+ * + * @param cb Condition-bean. (NotNull) + * @return Selected entity. If the select result is zero, it returns null. (Nullable) + */ + public ProductsOptionsValuesToProductsOptions selectEntity(jp.sf.pal.pompei.cbean.ProductsOptionsValuesToProductsOptionsCB cb); + + /** + * Select list by condition-bean. + *
+     * This select method generates SQL based on condition-bean.
+     * 
+     * Example)
+     *   final ProductsOptionsValuesToProductsOptionsCB cb = new ProductsOptionsValuesToProductsOptionsCB();
+     *   cb.setupSelect_Xxx(); // Including the foreign table in select clause
+     *   cb.query().setXxxName_PrefixSearch("abc");
+     *   cb.query().setXxxStartDate_IsNotNull();
+     *   cb.addOrderBy_PK_Asc().fetchFirst(20);
+     *   final List resultList = dao.selectList(cb);
+     * 
+ * + * @param cb Condition-bean. (NotNull) + * @return Selected list. If the select result is zero, it returns empty list. (NotNull) + */ + public java.util.List selectList(jp.sf.pal.pompei.cbean.ProductsOptionsValuesToProductsOptionsCB cb); + + + /** + * Insert one entity. + * + * @param entity Entity. (NotNull) + * @return Inserted count. + */ + public int insert(ProductsOptionsValuesToProductsOptions entity); + + /** + * Update one entity. + * + * @param entity Entity. (NotNull) + * @return Updated count. + */ + public int update(ProductsOptionsValuesToProductsOptions entity); + + /** + * Update one entity. (modified only) + * + * @param entity Entity. (NotNull) + * @return Updated count. + */ + public int updateModifiedOnly(ProductsOptionsValuesToProductsOptions entity); + + /** + * Delete one entity. + * + * @param entity Entity. (NotNull) + * @return Deleted count. + */ + public int delete(ProductsOptionsValuesToProductsOptions entity); + + /** + * Insert several entities. + * + * @param entityList Entity-list. (NotNull) + * @return Inserted count. + */ + public int insertList(java.util.List entityList); + + /** + * Update several entities. + * + * @param entityList Entity-list. (NotNull) + * @return Updated count. + */ + public int updateList(java.util.List entityList); + + /** + * Delete several entities. + * + * @param entityList Entity-list. (NotNull) + * @return Deleted count. + */ + public int deleteList(java.util.List entityList); +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/bsdao/BsProductsToCategoriesDao.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/bsdao/BsProductsToCategoriesDao.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/bsdao/BsProductsToCategoriesDao.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,186 @@ + +package jp.sf.pal.pompei.bsdao; + +import jp.sf.pal.pompei.exentity.ProductsToCategories; + +/** + * The dao interface of PRODUCTS_TO_CATEGORIES. + * + *
+ * [primary-key]
+ *     PRODUCTS_ID, CATEGORIES_ID
+ * 
+ * [column-property]
+ *     PRODUCTS_ID, CATEGORIES_ID
+ * 
+ * [foreign-property]
+ *     
+ * 
+ * [refferer-property]
+ *     
+ * 
+ * [sequence]
+ *     
+ * 
+ * [identity]
+ *     
+ * 
+ * [update-date]
+ *     
+ * 
+ * [version-no]
+ *     
+ * 
+ * 
+ * + * @author DBFlute(AutoGenerator) + */ +public interface BsProductsToCategoriesDao extends jp.sf.pal.pompei.allcommon.DaoWritable { + + /** BEAN-Annotation. */ + public Class BEAN = jp.sf.pal.pompei.exentity.ProductsToCategories.class; + + /** SQL-Annotation for getCountAll(). */ + public static final String getCountAll_SQL = "select count(*) from PRODUCTS_TO_CATEGORIES"; + + /** + * Get count as all. + * + * @return All count. + */ + public int getCountAll(); + + /** SQL-Annotation for getListAll(). */ + public static final String getListAll_SQL = "select * from PRODUCTS_TO_CATEGORIES"; + + /** + * Get list as all. + * + * @return All list. (NotNull) + */ + public java.util.List getListAll(); + + /** SQL-Annotation for getEntity(). */ + public static final String getEntity_SQL = "select * from PRODUCTS_TO_CATEGORIES where PRODUCTS_TO_CATEGORIES.PRODUCTS_ID = /*productsId*/null and PRODUCTS_TO_CATEGORIES.CATEGORIES_ID = /*categoriesId*/null"; + + /** Args-Annotation for getEntity(). */ + public static final String getEntity_ARGS = "productsId, categoriesId"; + + /* (non-javadoc) + * Get entity by primary key. + * + * @param primaryKey Primary key. (NotNull) + */ + public ProductsToCategories getEntity(java.math.BigDecimal productsId, java.math.BigDecimal categoriesId); + + /** + * Select count by condition-bean. + *
+     * Ignore fetchFirst() and fetchScope() and fetchPage().
+     * But the fetch status of the condition-bean remains as it is.
+     * This select method generates SQL based on condition-bean.
+     * 
+     * Example)
+     *   final ProductsToCategoriesCB cb = new ProductsToCategoriesCB();
+     *   cb.query().setXxx_GreaterEqual(new BigDecimal(14));
+     *   final int count = dao.selectCount(cb);
+     * 
+ * + * @param cb Condition-bean. (NotNull) + * @return Selected count. (NotNull) + */ + public int selectCount(jp.sf.pal.pompei.cbean.ProductsToCategoriesCB cb); + + /** + * Select entity 'ProductsToCategories' by condition-bean. + *
+     * This select method generates SQL based on condition-bean.
+     * 
+     * Example)
+     *   final ProductsToCategoriesCB cb = new ProductsToCategoriesCB();
+     *   cb.query().setXxxCode_Equal("abc");// It is assumed that this is the primary key...
+     *   cb.lockForUpdate();
+     *   final ProductsToCategories entity = dao.selectEntity(cb);
+     * 
+ * + * @param cb Condition-bean. (NotNull) + * @return Selected entity. If the select result is zero, it returns null. (Nullable) + */ + public ProductsToCategories selectEntity(jp.sf.pal.pompei.cbean.ProductsToCategoriesCB cb); + + /** + * Select list by condition-bean. + *
+     * This select method generates SQL based on condition-bean.
+     * 
+     * Example)
+     *   final ProductsToCategoriesCB cb = new ProductsToCategoriesCB();
+     *   cb.setupSelect_Xxx(); // Including the foreign table in select clause
+     *   cb.query().setXxxName_PrefixSearch("abc");
+     *   cb.query().setXxxStartDate_IsNotNull();
+     *   cb.addOrderBy_PK_Asc().fetchFirst(20);
+     *   final List resultList = dao.selectList(cb);
+     * 
+ * + * @param cb Condition-bean. (NotNull) + * @return Selected list. If the select result is zero, it returns empty list. (NotNull) + */ + public java.util.List selectList(jp.sf.pal.pompei.cbean.ProductsToCategoriesCB cb); + + + /** + * Insert one entity. + * + * @param entity Entity. (NotNull) + * @return Inserted count. + */ + public int insert(ProductsToCategories entity); + + /** + * Update one entity. + * + * @param entity Entity. (NotNull) + * @return Updated count. + */ + public int update(ProductsToCategories entity); + + /** + * Update one entity. (modified only) + * + * @param entity Entity. (NotNull) + * @return Updated count. + */ + public int updateModifiedOnly(ProductsToCategories entity); + + /** + * Delete one entity. + * + * @param entity Entity. (NotNull) + * @return Deleted count. + */ + public int delete(ProductsToCategories entity); + + /** + * Insert several entities. + * + * @param entityList Entity-list. (NotNull) + * @return Inserted count. + */ + public int insertList(java.util.List entityList); + + /** + * Update several entities. + * + * @param entityList Entity-list. (NotNull) + * @return Updated count. + */ + public int updateList(java.util.List entityList); + + /** + * Delete several entities. + * + * @param entityList Entity-list. (NotNull) + * @return Deleted count. + */ + public int deleteList(java.util.List entityList); +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/bsdao/BsReviewsDao.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/bsdao/BsReviewsDao.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/bsdao/BsReviewsDao.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,186 @@ + +package jp.sf.pal.pompei.bsdao; + +import jp.sf.pal.pompei.exentity.Reviews; + +/** + * The dao interface of REVIEWS. + * + *
+ * [primary-key]
+ *     REVIEWS_ID
+ * 
+ * [column-property]
+ *     REVIEWS_ID, PRODUCTS_ID, CUSTOMERS_ID, CUSTOMERS_NAME, REVIEWS_RATING, DATE_ADDED, LAST_MODIFIED, REVIEWS_READ
+ * 
+ * [foreign-property]
+ *     
+ * 
+ * [refferer-property]
+ *     
+ * 
+ * [sequence]
+ *     
+ * 
+ * [identity]
+ *     
+ * 
+ * [update-date]
+ *     
+ * 
+ * [version-no]
+ *     
+ * 
+ * 
+ * + * @author DBFlute(AutoGenerator) + */ +public interface BsReviewsDao extends jp.sf.pal.pompei.allcommon.DaoWritable { + + /** BEAN-Annotation. */ + public Class BEAN = jp.sf.pal.pompei.exentity.Reviews.class; + + /** SQL-Annotation for getCountAll(). */ + public static final String getCountAll_SQL = "select count(*) from REVIEWS"; + + /** + * Get count as all. + * + * @return All count. + */ + public int getCountAll(); + + /** SQL-Annotation for getListAll(). */ + public static final String getListAll_SQL = "select * from REVIEWS"; + + /** + * Get list as all. + * + * @return All list. (NotNull) + */ + public java.util.List getListAll(); + + /** SQL-Annotation for getEntity(). */ + public static final String getEntity_SQL = "select * from REVIEWS where REVIEWS.REVIEWS_ID = /*reviewsId*/null"; + + /** Args-Annotation for getEntity(). */ + public static final String getEntity_ARGS = "reviewsId"; + + /* (non-javadoc) + * Get entity by primary key. + * + * @param primaryKey Primary key. (NotNull) + */ + public Reviews getEntity(java.math.BigDecimal reviewsId); + + /** + * Select count by condition-bean. + *
+     * Ignore fetchFirst() and fetchScope() and fetchPage().
+     * But the fetch status of the condition-bean remains as it is.
+     * This select method generates SQL based on condition-bean.
+     * 
+     * Example)
+     *   final ReviewsCB cb = new ReviewsCB();
+     *   cb.query().setXxx_GreaterEqual(new BigDecimal(14));
+     *   final int count = dao.selectCount(cb);
+     * 
+ * + * @param cb Condition-bean. (NotNull) + * @return Selected count. (NotNull) + */ + public int selectCount(jp.sf.pal.pompei.cbean.ReviewsCB cb); + + /** + * Select entity 'Reviews' by condition-bean. + *
+     * This select method generates SQL based on condition-bean.
+     * 
+     * Example)
+     *   final ReviewsCB cb = new ReviewsCB();
+     *   cb.query().setXxxCode_Equal("abc");// It is assumed that this is the primary key...
+     *   cb.lockForUpdate();
+     *   final Reviews entity = dao.selectEntity(cb);
+     * 
+ * + * @param cb Condition-bean. (NotNull) + * @return Selected entity. If the select result is zero, it returns null. (Nullable) + */ + public Reviews selectEntity(jp.sf.pal.pompei.cbean.ReviewsCB cb); + + /** + * Select list by condition-bean. + *
+     * This select method generates SQL based on condition-bean.
+     * 
+     * Example)
+     *   final ReviewsCB cb = new ReviewsCB();
+     *   cb.setupSelect_Xxx(); // Including the foreign table in select clause
+     *   cb.query().setXxxName_PrefixSearch("abc");
+     *   cb.query().setXxxStartDate_IsNotNull();
+     *   cb.addOrderBy_PK_Asc().fetchFirst(20);
+     *   final List resultList = dao.selectList(cb);
+     * 
+ * + * @param cb Condition-bean. (NotNull) + * @return Selected list. If the select result is zero, it returns empty list. (NotNull) + */ + public java.util.List selectList(jp.sf.pal.pompei.cbean.ReviewsCB cb); + + + /** + * Insert one entity. + * + * @param entity Entity. (NotNull) + * @return Inserted count. + */ + public int insert(Reviews entity); + + /** + * Update one entity. + * + * @param entity Entity. (NotNull) + * @return Updated count. + */ + public int update(Reviews entity); + + /** + * Update one entity. (modified only) + * + * @param entity Entity. (NotNull) + * @return Updated count. + */ + public int updateModifiedOnly(Reviews entity); + + /** + * Delete one entity. + * + * @param entity Entity. (NotNull) + * @return Deleted count. + */ + public int delete(Reviews entity); + + /** + * Insert several entities. + * + * @param entityList Entity-list. (NotNull) + * @return Inserted count. + */ + public int insertList(java.util.List entityList); + + /** + * Update several entities. + * + * @param entityList Entity-list. (NotNull) + * @return Updated count. + */ + public int updateList(java.util.List entityList); + + /** + * Delete several entities. + * + * @param entityList Entity-list. (NotNull) + * @return Deleted count. + */ + public int deleteList(java.util.List entityList); +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/bsdao/BsReviewsDescriptionDao.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/bsdao/BsReviewsDescriptionDao.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/bsdao/BsReviewsDescriptionDao.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,186 @@ + +package jp.sf.pal.pompei.bsdao; + +import jp.sf.pal.pompei.exentity.ReviewsDescription; + +/** + * The dao interface of REVIEWS_DESCRIPTION. + * + *
+ * [primary-key]
+ *     REVIEWS_ID, LANGUAGES_ID
+ * 
+ * [column-property]
+ *     REVIEWS_ID, LANGUAGES_ID, REVIEWS_TEXT
+ * 
+ * [foreign-property]
+ *     
+ * 
+ * [refferer-property]
+ *     
+ * 
+ * [sequence]
+ *     
+ * 
+ * [identity]
+ *     
+ * 
+ * [update-date]
+ *     
+ * 
+ * [version-no]
+ *     
+ * 
+ * 
+ * + * @author DBFlute(AutoGenerator) + */ +public interface BsReviewsDescriptionDao extends jp.sf.pal.pompei.allcommon.DaoWritable { + + /** BEAN-Annotation. */ + public Class BEAN = jp.sf.pal.pompei.exentity.ReviewsDescription.class; + + /** SQL-Annotation for getCountAll(). */ + public static final String getCountAll_SQL = "select count(*) from REVIEWS_DESCRIPTION"; + + /** + * Get count as all. + * + * @return All count. + */ + public int getCountAll(); + + /** SQL-Annotation for getListAll(). */ + public static final String getListAll_SQL = "select * from REVIEWS_DESCRIPTION"; + + /** + * Get list as all. + * + * @return All list. (NotNull) + */ + public java.util.List getListAll(); + + /** SQL-Annotation for getEntity(). */ + public static final String getEntity_SQL = "select * from REVIEWS_DESCRIPTION where REVIEWS_DESCRIPTION.REVIEWS_ID = /*reviewsId*/null and REVIEWS_DESCRIPTION.LANGUAGES_ID = /*languagesId*/null"; + + /** Args-Annotation for getEntity(). */ + public static final String getEntity_ARGS = "reviewsId, languagesId"; + + /* (non-javadoc) + * Get entity by primary key. + * + * @param primaryKey Primary key. (NotNull) + */ + public ReviewsDescription getEntity(java.math.BigDecimal reviewsId, java.math.BigDecimal languagesId); + + /** + * Select count by condition-bean. + *
+     * Ignore fetchFirst() and fetchScope() and fetchPage().
+     * But the fetch status of the condition-bean remains as it is.
+     * This select method generates SQL based on condition-bean.
+     * 
+     * Example)
+     *   final ReviewsDescriptionCB cb = new ReviewsDescriptionCB();
+     *   cb.query().setXxx_GreaterEqual(new BigDecimal(14));
+     *   final int count = dao.selectCount(cb);
+     * 
+ * + * @param cb Condition-bean. (NotNull) + * @return Selected count. (NotNull) + */ + public int selectCount(jp.sf.pal.pompei.cbean.ReviewsDescriptionCB cb); + + /** + * Select entity 'ReviewsDescription' by condition-bean. + *
+     * This select method generates SQL based on condition-bean.
+     * 
+     * Example)
+     *   final ReviewsDescriptionCB cb = new ReviewsDescriptionCB();
+     *   cb.query().setXxxCode_Equal("abc");// It is assumed that this is the primary key...
+     *   cb.lockForUpdate();
+     *   final ReviewsDescription entity = dao.selectEntity(cb);
+     * 
+ * + * @param cb Condition-bean. (NotNull) + * @return Selected entity. If the select result is zero, it returns null. (Nullable) + */ + public ReviewsDescription selectEntity(jp.sf.pal.pompei.cbean.ReviewsDescriptionCB cb); + + /** + * Select list by condition-bean. + *
+     * This select method generates SQL based on condition-bean.
+     * 
+     * Example)
+     *   final ReviewsDescriptionCB cb = new ReviewsDescriptionCB();
+     *   cb.setupSelect_Xxx(); // Including the foreign table in select clause
+     *   cb.query().setXxxName_PrefixSearch("abc");
+     *   cb.query().setXxxStartDate_IsNotNull();
+     *   cb.addOrderBy_PK_Asc().fetchFirst(20);
+     *   final List resultList = dao.selectList(cb);
+     * 
+ * + * @param cb Condition-bean. (NotNull) + * @return Selected list. If the select result is zero, it returns empty list. (NotNull) + */ + public java.util.List selectList(jp.sf.pal.pompei.cbean.ReviewsDescriptionCB cb); + + + /** + * Insert one entity. + * + * @param entity Entity. (NotNull) + * @return Inserted count. + */ + public int insert(ReviewsDescription entity); + + /** + * Update one entity. + * + * @param entity Entity. (NotNull) + * @return Updated count. + */ + public int update(ReviewsDescription entity); + + /** + * Update one entity. (modified only) + * + * @param entity Entity. (NotNull) + * @return Updated count. + */ + public int updateModifiedOnly(ReviewsDescription entity); + + /** + * Delete one entity. + * + * @param entity Entity. (NotNull) + * @return Deleted count. + */ + public int delete(ReviewsDescription entity); + + /** + * Insert several entities. + * + * @param entityList Entity-list. (NotNull) + * @return Inserted count. + */ + public int insertList(java.util.List entityList); + + /** + * Update several entities. + * + * @param entityList Entity-list. (NotNull) + * @return Updated count. + */ + public int updateList(java.util.List entityList); + + /** + * Delete several entities. + * + * @param entityList Entity-list. (NotNull) + * @return Deleted count. + */ + public int deleteList(java.util.List entityList); +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/bsdao/BsSessionsDao.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/bsdao/BsSessionsDao.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/bsdao/BsSessionsDao.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,186 @@ + +package jp.sf.pal.pompei.bsdao; + +import jp.sf.pal.pompei.exentity.Sessions; + +/** + * The dao interface of SESSIONS. + * + *
+ * [primary-key]
+ *     SESSKEY
+ * 
+ * [column-property]
+ *     SESSKEY, EXPIRY, VALUE
+ * 
+ * [foreign-property]
+ *     
+ * 
+ * [refferer-property]
+ *     
+ * 
+ * [sequence]
+ *     
+ * 
+ * [identity]
+ *     
+ * 
+ * [update-date]
+ *     
+ * 
+ * [version-no]
+ *     
+ * 
+ * 
+ * + * @author DBFlute(AutoGenerator) + */ +public interface BsSessionsDao extends jp.sf.pal.pompei.allcommon.DaoWritable { + + /** BEAN-Annotation. */ + public Class BEAN = jp.sf.pal.pompei.exentity.Sessions.class; + + /** SQL-Annotation for getCountAll(). */ + public static final String getCountAll_SQL = "select count(*) from SESSIONS"; + + /** + * Get count as all. + * + * @return All count. + */ + public int getCountAll(); + + /** SQL-Annotation for getListAll(). */ + public static final String getListAll_SQL = "select * from SESSIONS"; + + /** + * Get list as all. + * + * @return All list. (NotNull) + */ + public java.util.List getListAll(); + + /** SQL-Annotation for getEntity(). */ + public static final String getEntity_SQL = "select * from SESSIONS where SESSIONS.SESSKEY = /*sesskey*/null"; + + /** Args-Annotation for getEntity(). */ + public static final String getEntity_ARGS = "sesskey"; + + /* (non-javadoc) + * Get entity by primary key. + * + * @param primaryKey Primary key. (NotNull) + */ + public Sessions getEntity(String sesskey); + + /** + * Select count by condition-bean. + *
+     * Ignore fetchFirst() and fetchScope() and fetchPage().
+     * But the fetch status of the condition-bean remains as it is.
+     * This select method generates SQL based on condition-bean.
+     * 
+     * Example)
+     *   final SessionsCB cb = new SessionsCB();
+     *   cb.query().setXxx_GreaterEqual(new BigDecimal(14));
+     *   final int count = dao.selectCount(cb);
+     * 
+ * + * @param cb Condition-bean. (NotNull) + * @return Selected count. (NotNull) + */ + public int selectCount(jp.sf.pal.pompei.cbean.SessionsCB cb); + + /** + * Select entity 'Sessions' by condition-bean. + *
+     * This select method generates SQL based on condition-bean.
+     * 
+     * Example)
+     *   final SessionsCB cb = new SessionsCB();
+     *   cb.query().setXxxCode_Equal("abc");// It is assumed that this is the primary key...
+     *   cb.lockForUpdate();
+     *   final Sessions entity = dao.selectEntity(cb);
+     * 
+ * + * @param cb Condition-bean. (NotNull) + * @return Selected entity. If the select result is zero, it returns null. (Nullable) + */ + public Sessions selectEntity(jp.sf.pal.pompei.cbean.SessionsCB cb); + + /** + * Select list by condition-bean. + *
+     * This select method generates SQL based on condition-bean.
+     * 
+     * Example)
+     *   final SessionsCB cb = new SessionsCB();
+     *   cb.setupSelect_Xxx(); // Including the foreign table in select clause
+     *   cb.query().setXxxName_PrefixSearch("abc");
+     *   cb.query().setXxxStartDate_IsNotNull();
+     *   cb.addOrderBy_PK_Asc().fetchFirst(20);
+     *   final List resultList = dao.selectList(cb);
+     * 
+ * + * @param cb Condition-bean. (NotNull) + * @return Selected list. If the select result is zero, it returns empty list. (NotNull) + */ + public java.util.List selectList(jp.sf.pal.pompei.cbean.SessionsCB cb); + + + /** + * Insert one entity. + * + * @param entity Entity. (NotNull) + * @return Inserted count. + */ + public int insert(Sessions entity); + + /** + * Update one entity. + * + * @param entity Entity. (NotNull) + * @return Updated count. + */ + public int update(Sessions entity); + + /** + * Update one entity. (modified only) + * + * @param entity Entity. (NotNull) + * @return Updated count. + */ + public int updateModifiedOnly(Sessions entity); + + /** + * Delete one entity. + * + * @param entity Entity. (NotNull) + * @return Deleted count. + */ + public int delete(Sessions entity); + + /** + * Insert several entities. + * + * @param entityList Entity-list. (NotNull) + * @return Inserted count. + */ + public int insertList(java.util.List entityList); + + /** + * Update several entities. + * + * @param entityList Entity-list. (NotNull) + * @return Updated count. + */ + public int updateList(java.util.List entityList); + + /** + * Delete several entities. + * + * @param entityList Entity-list. (NotNull) + * @return Deleted count. + */ + public int deleteList(java.util.List entityList); +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/bsdao/BsSpecialsDao.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/bsdao/BsSpecialsDao.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/bsdao/BsSpecialsDao.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,186 @@ + +package jp.sf.pal.pompei.bsdao; + +import jp.sf.pal.pompei.exentity.Specials; + +/** + * The dao interface of SPECIALS. + * + *
+ * [primary-key]
+ *     SPECIALS_ID
+ * 
+ * [column-property]
+ *     SPECIALS_ID, PRODUCTS_ID, SPECIALS_NEW_PRODUCTS_PRICE, SPECIALS_DATE_ADDED, SPECIALS_LAST_MODIFIED, EXPIRES_DATE, DATE_STATUS_CHANGE, STATUS
+ * 
+ * [foreign-property]
+ *     
+ * 
+ * [refferer-property]
+ *     
+ * 
+ * [sequence]
+ *     
+ * 
+ * [identity]
+ *     
+ * 
+ * [update-date]
+ *     
+ * 
+ * [version-no]
+ *     
+ * 
+ * 
+ * + * @author DBFlute(AutoGenerator) + */ +public interface BsSpecialsDao extends jp.sf.pal.pompei.allcommon.DaoWritable { + + /** BEAN-Annotation. */ + public Class BEAN = jp.sf.pal.pompei.exentity.Specials.class; + + /** SQL-Annotation for getCountAll(). */ + public static final String getCountAll_SQL = "select count(*) from SPECIALS"; + + /** + * Get count as all. + * + * @return All count. + */ + public int getCountAll(); + + /** SQL-Annotation for getListAll(). */ + public static final String getListAll_SQL = "select * from SPECIALS"; + + /** + * Get list as all. + * + * @return All list. (NotNull) + */ + public java.util.List getListAll(); + + /** SQL-Annotation for getEntity(). */ + public static final String getEntity_SQL = "select * from SPECIALS where SPECIALS.SPECIALS_ID = /*specialsId*/null"; + + /** Args-Annotation for getEntity(). */ + public static final String getEntity_ARGS = "specialsId"; + + /* (non-javadoc) + * Get entity by primary key. + * + * @param primaryKey Primary key. (NotNull) + */ + public Specials getEntity(java.math.BigDecimal specialsId); + + /** + * Select count by condition-bean. + *
+     * Ignore fetchFirst() and fetchScope() and fetchPage().
+     * But the fetch status of the condition-bean remains as it is.
+     * This select method generates SQL based on condition-bean.
+     * 
+     * Example)
+     *   final SpecialsCB cb = new SpecialsCB();
+     *   cb.query().setXxx_GreaterEqual(new BigDecimal(14));
+     *   final int count = dao.selectCount(cb);
+     * 
+ * + * @param cb Condition-bean. (NotNull) + * @return Selected count. (NotNull) + */ + public int selectCount(jp.sf.pal.pompei.cbean.SpecialsCB cb); + + /** + * Select entity 'Specials' by condition-bean. + *
+     * This select method generates SQL based on condition-bean.
+     * 
+     * Example)
+     *   final SpecialsCB cb = new SpecialsCB();
+     *   cb.query().setXxxCode_Equal("abc");// It is assumed that this is the primary key...
+     *   cb.lockForUpdate();
+     *   final Specials entity = dao.selectEntity(cb);
+     * 
+ * + * @param cb Condition-bean. (NotNull) + * @return Selected entity. If the select result is zero, it returns null. (Nullable) + */ + public Specials selectEntity(jp.sf.pal.pompei.cbean.SpecialsCB cb); + + /** + * Select list by condition-bean. + *
+     * This select method generates SQL based on condition-bean.
+     * 
+     * Example)
+     *   final SpecialsCB cb = new SpecialsCB();
+     *   cb.setupSelect_Xxx(); // Including the foreign table in select clause
+     *   cb.query().setXxxName_PrefixSearch("abc");
+     *   cb.query().setXxxStartDate_IsNotNull();
+     *   cb.addOrderBy_PK_Asc().fetchFirst(20);
+     *   final List resultList = dao.selectList(cb);
+     * 
+ * + * @param cb Condition-bean. (NotNull) + * @return Selected list. If the select result is zero, it returns empty list. (NotNull) + */ + public java.util.List selectList(jp.sf.pal.pompei.cbean.SpecialsCB cb); + + + /** + * Insert one entity. + * + * @param entity Entity. (NotNull) + * @return Inserted count. + */ + public int insert(Specials entity); + + /** + * Update one entity. + * + * @param entity Entity. (NotNull) + * @return Updated count. + */ + public int update(Specials entity); + + /** + * Update one entity. (modified only) + * + * @param entity Entity. (NotNull) + * @return Updated count. + */ + public int updateModifiedOnly(Specials entity); + + /** + * Delete one entity. + * + * @param entity Entity. (NotNull) + * @return Deleted count. + */ + public int delete(Specials entity); + + /** + * Insert several entities. + * + * @param entityList Entity-list. (NotNull) + * @return Inserted count. + */ + public int insertList(java.util.List entityList); + + /** + * Update several entities. + * + * @param entityList Entity-list. (NotNull) + * @return Updated count. + */ + public int updateList(java.util.List entityList); + + /** + * Delete several entities. + * + * @param entityList Entity-list. (NotNull) + * @return Deleted count. + */ + public int deleteList(java.util.List entityList); +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/bsdao/BsTaxClassDao.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/bsdao/BsTaxClassDao.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/bsdao/BsTaxClassDao.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,186 @@ + +package jp.sf.pal.pompei.bsdao; + +import jp.sf.pal.pompei.exentity.TaxClass; + +/** + * The dao interface of TAX_CLASS. + * + *
+ * [primary-key]
+ *     TAX_CLASS_ID
+ * 
+ * [column-property]
+ *     TAX_CLASS_ID, TAX_CLASS_TITLE, TAX_CLASS_DESCRIPTION, LAST_MODIFIED, DATE_ADDED
+ * 
+ * [foreign-property]
+ *     
+ * 
+ * [refferer-property]
+ *     
+ * 
+ * [sequence]
+ *     
+ * 
+ * [identity]
+ *     
+ * 
+ * [update-date]
+ *     
+ * 
+ * [version-no]
+ *     
+ * 
+ * 
+ * + * @author DBFlute(AutoGenerator) + */ +public interface BsTaxClassDao extends jp.sf.pal.pompei.allcommon.DaoWritable { + + /** BEAN-Annotation. */ + public Class BEAN = jp.sf.pal.pompei.exentity.TaxClass.class; + + /** SQL-Annotation for getCountAll(). */ + public static final String getCountAll_SQL = "select count(*) from TAX_CLASS"; + + /** + * Get count as all. + * + * @return All count. + */ + public int getCountAll(); + + /** SQL-Annotation for getListAll(). */ + public static final String getListAll_SQL = "select * from TAX_CLASS"; + + /** + * Get list as all. + * + * @return All list. (NotNull) + */ + public java.util.List getListAll(); + + /** SQL-Annotation for getEntity(). */ + public static final String getEntity_SQL = "select * from TAX_CLASS where TAX_CLASS.TAX_CLASS_ID = /*taxClassId*/null"; + + /** Args-Annotation for getEntity(). */ + public static final String getEntity_ARGS = "taxClassId"; + + /* (non-javadoc) + * Get entity by primary key. + * + * @param primaryKey Primary key. (NotNull) + */ + public TaxClass getEntity(java.math.BigDecimal taxClassId); + + /** + * Select count by condition-bean. + *
+     * Ignore fetchFirst() and fetchScope() and fetchPage().
+     * But the fetch status of the condition-bean remains as it is.
+     * This select method generates SQL based on condition-bean.
+     * 
+     * Example)
+     *   final TaxClassCB cb = new TaxClassCB();
+     *   cb.query().setXxx_GreaterEqual(new BigDecimal(14));
+     *   final int count = dao.selectCount(cb);
+     * 
+ * + * @param cb Condition-bean. (NotNull) + * @return Selected count. (NotNull) + */ + public int selectCount(jp.sf.pal.pompei.cbean.TaxClassCB cb); + + /** + * Select entity 'TaxClass' by condition-bean. + *
+     * This select method generates SQL based on condition-bean.
+     * 
+     * Example)
+     *   final TaxClassCB cb = new TaxClassCB();
+     *   cb.query().setXxxCode_Equal("abc");// It is assumed that this is the primary key...
+     *   cb.lockForUpdate();
+     *   final TaxClass entity = dao.selectEntity(cb);
+     * 
+ * + * @param cb Condition-bean. (NotNull) + * @return Selected entity. If the select result is zero, it returns null. (Nullable) + */ + public TaxClass selectEntity(jp.sf.pal.pompei.cbean.TaxClassCB cb); + + /** + * Select list by condition-bean. + *
+     * This select method generates SQL based on condition-bean.
+     * 
+     * Example)
+     *   final TaxClassCB cb = new TaxClassCB();
+     *   cb.setupSelect_Xxx(); // Including the foreign table in select clause
+     *   cb.query().setXxxName_PrefixSearch("abc");
+     *   cb.query().setXxxStartDate_IsNotNull();
+     *   cb.addOrderBy_PK_Asc().fetchFirst(20);
+     *   final List resultList = dao.selectList(cb);
+     * 
+ * + * @param cb Condition-bean. (NotNull) + * @return Selected list. If the select result is zero, it returns empty list. (NotNull) + */ + public java.util.List selectList(jp.sf.pal.pompei.cbean.TaxClassCB cb); + + + /** + * Insert one entity. + * + * @param entity Entity. (NotNull) + * @return Inserted count. + */ + public int insert(TaxClass entity); + + /** + * Update one entity. + * + * @param entity Entity. (NotNull) + * @return Updated count. + */ + public int update(TaxClass entity); + + /** + * Update one entity. (modified only) + * + * @param entity Entity. (NotNull) + * @return Updated count. + */ + public int updateModifiedOnly(TaxClass entity); + + /** + * Delete one entity. + * + * @param entity Entity. (NotNull) + * @return Deleted count. + */ + public int delete(TaxClass entity); + + /** + * Insert several entities. + * + * @param entityList Entity-list. (NotNull) + * @return Inserted count. + */ + public int insertList(java.util.List entityList); + + /** + * Update several entities. + * + * @param entityList Entity-list. (NotNull) + * @return Updated count. + */ + public int updateList(java.util.List entityList); + + /** + * Delete several entities. + * + * @param entityList Entity-list. (NotNull) + * @return Deleted count. + */ + public int deleteList(java.util.List entityList); +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/bsdao/BsTaxRatesDao.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/bsdao/BsTaxRatesDao.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/bsdao/BsTaxRatesDao.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,186 @@ + +package jp.sf.pal.pompei.bsdao; + +import jp.sf.pal.pompei.exentity.TaxRates; + +/** + * The dao interface of TAX_RATES. + * + *
+ * [primary-key]
+ *     TAX_RATES_ID
+ * 
+ * [column-property]
+ *     TAX_RATES_ID, TAX_ZONE_ID, TAX_CLASS_ID, TAX_PRIORITY, TAX_RATE, TAX_DESCRIPTION, LAST_MODIFIED, DATE_ADDED
+ * 
+ * [foreign-property]
+ *     
+ * 
+ * [refferer-property]
+ *     
+ * 
+ * [sequence]
+ *     
+ * 
+ * [identity]
+ *     
+ * 
+ * [update-date]
+ *     
+ * 
+ * [version-no]
+ *     
+ * 
+ * 
+ * + * @author DBFlute(AutoGenerator) + */ +public interface BsTaxRatesDao extends jp.sf.pal.pompei.allcommon.DaoWritable { + + /** BEAN-Annotation. */ + public Class BEAN = jp.sf.pal.pompei.exentity.TaxRates.class; + + /** SQL-Annotation for getCountAll(). */ + public static final String getCountAll_SQL = "select count(*) from TAX_RATES"; + + /** + * Get count as all. + * + * @return All count. + */ + public int getCountAll(); + + /** SQL-Annotation for getListAll(). */ + public static final String getListAll_SQL = "select * from TAX_RATES"; + + /** + * Get list as all. + * + * @return All list. (NotNull) + */ + public java.util.List getListAll(); + + /** SQL-Annotation for getEntity(). */ + public static final String getEntity_SQL = "select * from TAX_RATES where TAX_RATES.TAX_RATES_ID = /*taxRatesId*/null"; + + /** Args-Annotation for getEntity(). */ + public static final String getEntity_ARGS = "taxRatesId"; + + /* (non-javadoc) + * Get entity by primary key. + * + * @param primaryKey Primary key. (NotNull) + */ + public TaxRates getEntity(java.math.BigDecimal taxRatesId); + + /** + * Select count by condition-bean. + *
+     * Ignore fetchFirst() and fetchScope() and fetchPage().
+     * But the fetch status of the condition-bean remains as it is.
+     * This select method generates SQL based on condition-bean.
+     * 
+     * Example)
+     *   final TaxRatesCB cb = new TaxRatesCB();
+     *   cb.query().setXxx_GreaterEqual(new BigDecimal(14));
+     *   final int count = dao.selectCount(cb);
+     * 
+ * + * @param cb Condition-bean. (NotNull) + * @return Selected count. (NotNull) + */ + public int selectCount(jp.sf.pal.pompei.cbean.TaxRatesCB cb); + + /** + * Select entity 'TaxRates' by condition-bean. + *
+     * This select method generates SQL based on condition-bean.
+     * 
+     * Example)
+     *   final TaxRatesCB cb = new TaxRatesCB();
+     *   cb.query().setXxxCode_Equal("abc");// It is assumed that this is the primary key...
+     *   cb.lockForUpdate();
+     *   final TaxRates entity = dao.selectEntity(cb);
+     * 
+ * + * @param cb Condition-bean. (NotNull) + * @return Selected entity. If the select result is zero, it returns null. (Nullable) + */ + public TaxRates selectEntity(jp.sf.pal.pompei.cbean.TaxRatesCB cb); + + /** + * Select list by condition-bean. + *
+     * This select method generates SQL based on condition-bean.
+     * 
+     * Example)
+     *   final TaxRatesCB cb = new TaxRatesCB();
+     *   cb.setupSelect_Xxx(); // Including the foreign table in select clause
+     *   cb.query().setXxxName_PrefixSearch("abc");
+     *   cb.query().setXxxStartDate_IsNotNull();
+     *   cb.addOrderBy_PK_Asc().fetchFirst(20);
+     *   final List resultList = dao.selectList(cb);
+     * 
+ * + * @param cb Condition-bean. (NotNull) + * @return Selected list. If the select result is zero, it returns empty list. (NotNull) + */ + public java.util.List selectList(jp.sf.pal.pompei.cbean.TaxRatesCB cb); + + + /** + * Insert one entity. + * + * @param entity Entity. (NotNull) + * @return Inserted count. + */ + public int insert(TaxRates entity); + + /** + * Update one entity. + * + * @param entity Entity. (NotNull) + * @return Updated count. + */ + public int update(TaxRates entity); + + /** + * Update one entity. (modified only) + * + * @param entity Entity. (NotNull) + * @return Updated count. + */ + public int updateModifiedOnly(TaxRates entity); + + /** + * Delete one entity. + * + * @param entity Entity. (NotNull) + * @return Deleted count. + */ + public int delete(TaxRates entity); + + /** + * Insert several entities. + * + * @param entityList Entity-list. (NotNull) + * @return Inserted count. + */ + public int insertList(java.util.List entityList); + + /** + * Update several entities. + * + * @param entityList Entity-list. (NotNull) + * @return Updated count. + */ + public int updateList(java.util.List entityList); + + /** + * Delete several entities. + * + * @param entityList Entity-list. (NotNull) + * @return Deleted count. + */ + public int deleteList(java.util.List entityList); +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/bsdao/BsWhosOnlineDao.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/bsdao/BsWhosOnlineDao.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/bsdao/BsWhosOnlineDao.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,117 @@ + +package jp.sf.pal.pompei.bsdao; + +import jp.sf.pal.pompei.exentity.WhosOnline; + +/** + * The dao interface of WHOS_ONLINE. + * + *
+ * [primary-key]
+ *     
+ * 
+ * [column-property]
+ *     CUSTOMER_ID, FULL_NAME, SESSION_ID, IP_ADDRESS, TIME_ENTRY, TIME_LAST_CLICK, LAST_PAGE_URL
+ * 
+ * [foreign-property]
+ *     
+ * 
+ * [refferer-property]
+ *     
+ * 
+ * [sequence]
+ *     
+ * 
+ * [identity]
+ *     
+ * 
+ * [update-date]
+ *     
+ * 
+ * [version-no]
+ *     
+ * 
+ * 
+ * + * @author DBFlute(AutoGenerator) + */ +public interface BsWhosOnlineDao extends jp.sf.pal.pompei.allcommon.DaoReadable { + + /** BEAN-Annotation. */ + public Class BEAN = jp.sf.pal.pompei.exentity.WhosOnline.class; + + /** SQL-Annotation for getCountAll(). */ + public static final String getCountAll_SQL = "select count(*) from WHOS_ONLINE"; + + /** + * Get count as all. + * + * @return All count. + */ + public int getCountAll(); + + /** SQL-Annotation for getListAll(). */ + public static final String getListAll_SQL = "select * from WHOS_ONLINE"; + + /** + * Get list as all. + * + * @return All list. (NotNull) + */ + public java.util.List getListAll(); + + /** + * Select count by condition-bean. + *
+     * Ignore fetchFirst() and fetchScope() and fetchPage().
+     * But the fetch status of the condition-bean remains as it is.
+     * This select method generates SQL based on condition-bean.
+     * 
+     * Example)
+     *   final WhosOnlineCB cb = new WhosOnlineCB();
+     *   cb.query().setXxx_GreaterEqual(new BigDecimal(14));
+     *   final int count = dao.selectCount(cb);
+     * 
+ * + * @param cb Condition-bean. (NotNull) + * @return Selected count. (NotNull) + */ + public int selectCount(jp.sf.pal.pompei.cbean.WhosOnlineCB cb); + + /** + * Select entity 'WhosOnline' by condition-bean. + *
+     * This select method generates SQL based on condition-bean.
+     * 
+     * Example)
+     *   final WhosOnlineCB cb = new WhosOnlineCB();
+     *   cb.query().setXxxCode_Equal("abc");// It is assumed that this is the primary key...
+     *   cb.lockForUpdate();
+     *   final WhosOnline entity = dao.selectEntity(cb);
+     * 
+ * + * @param cb Condition-bean. (NotNull) + * @return Selected entity. If the select result is zero, it returns null. (Nullable) + */ + public WhosOnline selectEntity(jp.sf.pal.pompei.cbean.WhosOnlineCB cb); + + /** + * Select list by condition-bean. + *
+     * This select method generates SQL based on condition-bean.
+     * 
+     * Example)
+     *   final WhosOnlineCB cb = new WhosOnlineCB();
+     *   cb.setupSelect_Xxx(); // Including the foreign table in select clause
+     *   cb.query().setXxxName_PrefixSearch("abc");
+     *   cb.query().setXxxStartDate_IsNotNull();
+     *   cb.addOrderBy_PK_Asc().fetchFirst(20);
+     *   final List resultList = dao.selectList(cb);
+     * 
+ * + * @param cb Condition-bean. (NotNull) + * @return Selected list. If the select result is zero, it returns empty list. (NotNull) + */ + public java.util.List selectList(jp.sf.pal.pompei.cbean.WhosOnlineCB cb); + + } Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/bsdao/BsZonesDao.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/bsdao/BsZonesDao.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/bsdao/BsZonesDao.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,186 @@ + +package jp.sf.pal.pompei.bsdao; + +import jp.sf.pal.pompei.exentity.Zones; + +/** + * The dao interface of ZONES. + * + *
+ * [primary-key]
+ *     ZONE_ID
+ * 
+ * [column-property]
+ *     ZONE_ID, ZONE_COUNTRY_ID, ZONE_CODE, ZONE_NAME
+ * 
+ * [foreign-property]
+ *     
+ * 
+ * [refferer-property]
+ *     
+ * 
+ * [sequence]
+ *     
+ * 
+ * [identity]
+ *     
+ * 
+ * [update-date]
+ *     
+ * 
+ * [version-no]
+ *     
+ * 
+ * 
+ * + * @author DBFlute(AutoGenerator) + */ +public interface BsZonesDao extends jp.sf.pal.pompei.allcommon.DaoWritable { + + /** BEAN-Annotation. */ + public Class BEAN = jp.sf.pal.pompei.exentity.Zones.class; + + /** SQL-Annotation for getCountAll(). */ + public static final String getCountAll_SQL = "select count(*) from ZONES"; + + /** + * Get count as all. + * + * @return All count. + */ + public int getCountAll(); + + /** SQL-Annotation for getListAll(). */ + public static final String getListAll_SQL = "select * from ZONES"; + + /** + * Get list as all. + * + * @return All list. (NotNull) + */ + public java.util.List getListAll(); + + /** SQL-Annotation for getEntity(). */ + public static final String getEntity_SQL = "select * from ZONES where ZONES.ZONE_ID = /*zoneId*/null"; + + /** Args-Annotation for getEntity(). */ + public static final String getEntity_ARGS = "zoneId"; + + /* (non-javadoc) + * Get entity by primary key. + * + * @param primaryKey Primary key. (NotNull) + */ + public Zones getEntity(java.math.BigDecimal zoneId); + + /** + * Select count by condition-bean. + *
+     * Ignore fetchFirst() and fetchScope() and fetchPage().
+     * But the fetch status of the condition-bean remains as it is.
+     * This select method generates SQL based on condition-bean.
+     * 
+     * Example)
+     *   final ZonesCB cb = new ZonesCB();
+     *   cb.query().setXxx_GreaterEqual(new BigDecimal(14));
+     *   final int count = dao.selectCount(cb);
+     * 
+ * + * @param cb Condition-bean. (NotNull) + * @return Selected count. (NotNull) + */ + public int selectCount(jp.sf.pal.pompei.cbean.ZonesCB cb); + + /** + * Select entity 'Zones' by condition-bean. + *
+     * This select method generates SQL based on condition-bean.
+     * 
+     * Example)
+     *   final ZonesCB cb = new ZonesCB();
+     *   cb.query().setXxxCode_Equal("abc");// It is assumed that this is the primary key...
+     *   cb.lockForUpdate();
+     *   final Zones entity = dao.selectEntity(cb);
+     * 
+ * + * @param cb Condition-bean. (NotNull) + * @return Selected entity. If the select result is zero, it returns null. (Nullable) + */ + public Zones selectEntity(jp.sf.pal.pompei.cbean.ZonesCB cb); + + /** + * Select list by condition-bean. + *
+     * This select method generates SQL based on condition-bean.
+     * 
+     * Example)
+     *   final ZonesCB cb = new ZonesCB();
+     *   cb.setupSelect_Xxx(); // Including the foreign table in select clause
+     *   cb.query().setXxxName_PrefixSearch("abc");
+     *   cb.query().setXxxStartDate_IsNotNull();
+     *   cb.addOrderBy_PK_Asc().fetchFirst(20);
+     *   final List resultList = dao.selectList(cb);
+     * 
+ * + * @param cb Condition-bean. (NotNull) + * @return Selected list. If the select result is zero, it returns empty list. (NotNull) + */ + public java.util.List selectList(jp.sf.pal.pompei.cbean.ZonesCB cb); + + + /** + * Insert one entity. + * + * @param entity Entity. (NotNull) + * @return Inserted count. + */ + public int insert(Zones entity); + + /** + * Update one entity. + * + * @param entity Entity. (NotNull) + * @return Updated count. + */ + public int update(Zones entity); + + /** + * Update one entity. (modified only) + * + * @param entity Entity. (NotNull) + * @return Updated count. + */ + public int updateModifiedOnly(Zones entity); + + /** + * Delete one entity. + * + * @param entity Entity. (NotNull) + * @return Deleted count. + */ + public int delete(Zones entity); + + /** + * Insert several entities. + * + * @param entityList Entity-list. (NotNull) + * @return Inserted count. + */ + public int insertList(java.util.List entityList); + + /** + * Update several entities. + * + * @param entityList Entity-list. (NotNull) + * @return Updated count. + */ + public int updateList(java.util.List entityList); + + /** + * Delete several entities. + * + * @param entityList Entity-list. (NotNull) + * @return Deleted count. + */ + public int deleteList(java.util.List entityList); +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/bsdao/BsZonesToGeoZonesDao.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/bsdao/BsZonesToGeoZonesDao.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/bsdao/BsZonesToGeoZonesDao.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,186 @@ + +package jp.sf.pal.pompei.bsdao; + +import jp.sf.pal.pompei.exentity.ZonesToGeoZones; + +/** + * The dao interface of ZONES_TO_GEO_ZONES. + * + *
+ * [primary-key]
+ *     ASSOCIATION_ID
+ * 
+ * [column-property]
+ *     ASSOCIATION_ID, ZONE_COUNTRY_ID, ZONE_ID, GEO_ZONE_ID, LAST_MODIFIED, DATE_ADDED
+ * 
+ * [foreign-property]
+ *     
+ * 
+ * [refferer-property]
+ *     
+ * 
+ * [sequence]
+ *     
+ * 
+ * [identity]
+ *     
+ * 
+ * [update-date]
+ *     
+ * 
+ * [version-no]
+ *     
+ * 
+ * 
+ * + * @author DBFlute(AutoGenerator) + */ +public interface BsZonesToGeoZonesDao extends jp.sf.pal.pompei.allcommon.DaoWritable { + + /** BEAN-Annotation. */ + public Class BEAN = jp.sf.pal.pompei.exentity.ZonesToGeoZones.class; + + /** SQL-Annotation for getCountAll(). */ + public static final String getCountAll_SQL = "select count(*) from ZONES_TO_GEO_ZONES"; + + /** + * Get count as all. + * + * @return All count. + */ + public int getCountAll(); + + /** SQL-Annotation for getListAll(). */ + public static final String getListAll_SQL = "select * from ZONES_TO_GEO_ZONES"; + + /** + * Get list as all. + * + * @return All list. (NotNull) + */ + public java.util.List getListAll(); + + /** SQL-Annotation for getEntity(). */ + public static final String getEntity_SQL = "select * from ZONES_TO_GEO_ZONES where ZONES_TO_GEO_ZONES.ASSOCIATION_ID = /*associationId*/null"; + + /** Args-Annotation for getEntity(). */ + public static final String getEntity_ARGS = "associationId"; + + /* (non-javadoc) + * Get entity by primary key. + * + * @param primaryKey Primary key. (NotNull) + */ + public ZonesToGeoZones getEntity(java.math.BigDecimal associationId); + + /** + * Select count by condition-bean. + *
+     * Ignore fetchFirst() and fetchScope() and fetchPage().
+     * But the fetch status of the condition-bean remains as it is.
+     * This select method generates SQL based on condition-bean.
+     * 
+     * Example)
+     *   final ZonesToGeoZonesCB cb = new ZonesToGeoZonesCB();
+     *   cb.query().setXxx_GreaterEqual(new BigDecimal(14));
+     *   final int count = dao.selectCount(cb);
+     * 
+ * + * @param cb Condition-bean. (NotNull) + * @return Selected count. (NotNull) + */ + public int selectCount(jp.sf.pal.pompei.cbean.ZonesToGeoZonesCB cb); + + /** + * Select entity 'ZonesToGeoZones' by condition-bean. + *
+     * This select method generates SQL based on condition-bean.
+     * 
+     * Example)
+     *   final ZonesToGeoZonesCB cb = new ZonesToGeoZonesCB();
+     *   cb.query().setXxxCode_Equal("abc");// It is assumed that this is the primary key...
+     *   cb.lockForUpdate();
+     *   final ZonesToGeoZones entity = dao.selectEntity(cb);
+     * 
+ * + * @param cb Condition-bean. (NotNull) + * @return Selected entity. If the select result is zero, it returns null. (Nullable) + */ + public ZonesToGeoZones selectEntity(jp.sf.pal.pompei.cbean.ZonesToGeoZonesCB cb); + + /** + * Select list by condition-bean. + *
+     * This select method generates SQL based on condition-bean.
+     * 
+     * Example)
+     *   final ZonesToGeoZonesCB cb = new ZonesToGeoZonesCB();
+     *   cb.setupSelect_Xxx(); // Including the foreign table in select clause
+     *   cb.query().setXxxName_PrefixSearch("abc");
+     *   cb.query().setXxxStartDate_IsNotNull();
+     *   cb.addOrderBy_PK_Asc().fetchFirst(20);
+     *   final List resultList = dao.selectList(cb);
+     * 
+ * + * @param cb Condition-bean. (NotNull) + * @return Selected list. If the select result is zero, it returns empty list. (NotNull) + */ + public java.util.List selectList(jp.sf.pal.pompei.cbean.ZonesToGeoZonesCB cb); + + + /** + * Insert one entity. + * + * @param entity Entity. (NotNull) + * @return Inserted count. + */ + public int insert(ZonesToGeoZones entity); + + /** + * Update one entity. + * + * @param entity Entity. (NotNull) + * @return Updated count. + */ + public int update(ZonesToGeoZones entity); + + /** + * Update one entity. (modified only) + * + * @param entity Entity. (NotNull) + * @return Updated count. + */ + public int updateModifiedOnly(ZonesToGeoZones entity); + + /** + * Delete one entity. + * + * @param entity Entity. (NotNull) + * @return Deleted count. + */ + public int delete(ZonesToGeoZones entity); + + /** + * Insert several entities. + * + * @param entityList Entity-list. (NotNull) + * @return Inserted count. + */ + public int insertList(java.util.List entityList); + + /** + * Update several entities. + * + * @param entityList Entity-list. (NotNull) + * @return Updated count. + */ + public int updateList(java.util.List entityList); + + /** + * Delete several entities. + * + * @param entityList Entity-list. (NotNull) + * @return Deleted count. + */ + public int deleteList(java.util.List entityList); +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/BsAddressBook.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/BsAddressBook.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/BsAddressBook.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,696 @@ +package jp.sf.pal.pompei.bsentity; + + +import jp.sf.pal.pompei.allcommon.Entity; +import jp.sf.pal.pompei.allcommon.dbmeta.DBMeta; +import jp.sf.pal.pompei.allcommon.dbmeta.DBMetaInstanceHandler; + +/** + * The entity of ADDRESS_BOOK. + * + *
+ * [primary-key]
+ *     ADDRESS_BOOK_ID
+ * 
+ * [column-property]
+ *     ADDRESS_BOOK_ID, CUSTOMERS_ID, ENTRY_GENDER, ENTRY_COMPANY, ENTRY_FIRSTNAME, ENTRY_LASTNAME, ENTRY_STREET_ADDRESS, ENTRY_SUBURB, ENTRY_POSTCODE, ENTRY_CITY, ENTRY_STATE, ENTRY_COUNTRY_ID, ENTRY_ZONE_ID
+ * 
+ * [foreign-property]
+ *     
+ * 
+ * [refferer-property]
+ *     
+ * 
+ * [sequence]
+ *     
+ * 
+ * [identity]
+ *     
+ * 
+ * [update-date]
+ *     
+ * 
+ * [version-no]
+ *     
+ * 
+ * 
+ * + * @author DBFlute(AutoGenerator) + */ +public abstract class BsAddressBook implements Entity, java.io.Serializable { + + /** Serial version UID. (Default) */ + private static final long serialVersionUID = 1L; + + /** TABLE-Annotation for S2Dao */ + public static final String TABLE = "ADDRESS_BOOK"; + + + // =================================================================================== + // Attribute + // ========= + /** Entity modified properties. (for S2Dao) */ + protected EntityModifiedProperties _modifiedProperties = newEntityModifiedProperties(); + + + /** The value of addressBookId. ColumnDefinition -- PK : INTEGER : NotNull*/ + protected java.math.BigDecimal _addressBookId; + + /** The value of customersId. ColumnDefinition -- INTEGER : NotNull*/ + protected java.math.BigDecimal _customersId; + + /** The value of entryGender. ColumnDefinition -- CHAR(1) : NotNull*/ + protected String _entryGender; + + /** The value of entryCompany. ColumnDefinition -- VARCHAR(32)*/ + protected String _entryCompany; + + /** The value of entryFirstname. ColumnDefinition -- VARCHAR(32) : NotNull*/ + protected String _entryFirstname; + + /** The value of entryLastname. ColumnDefinition -- VARCHAR(32) : NotNull*/ + protected String _entryLastname; + + /** The value of entryStreetAddress. ColumnDefinition -- VARCHAR(64) : NotNull*/ + protected String _entryStreetAddress; + + /** The value of entrySuburb. ColumnDefinition -- VARCHAR(32)*/ + protected String _entrySuburb; + + /** The value of entryPostcode. ColumnDefinition -- VARCHAR(10) : NotNull*/ + protected String _entryPostcode; + + /** The value of entryCity. ColumnDefinition -- VARCHAR(32) : NotNull*/ + protected String _entryCity; + + /** The value of entryState. ColumnDefinition -- VARCHAR(32)*/ + protected String _entryState; + + /** The value of entryCountryId. ColumnDefinition -- INTEGER : NotNull : Default=[0]*/ + protected java.math.BigDecimal _entryCountryId; + + /** The value of entryZoneId. ColumnDefinition -- INTEGER : NotNull : Default=[0]*/ + protected java.math.BigDecimal _entryZoneId; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + public BsAddressBook() { + } + + + // =================================================================================== + // DBMeta + // ====== + /** + * This method implements the method that is declared at super. + * + * @return DBMeta. (NotNull) + */ + public DBMeta getDBMeta() { + return DBMetaInstanceHandler.getInstanceByTableDbName(getTableDbName()); + } + + // =================================================================================== + // Table Name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + public String getTableDbName() { + return "ADDRESS_BOOK"; + } + + /** + * This method implements the method that is declared at super. + * + * @return Table cap-prop-name. (NotNull) + */ + public String getTableCapPropName() { + return "AddressBook"; + } + + /** + * This method implements the method that is declared at super. + * + * @return Table uncap-prop-name. (NotNull) + */ + public String getTableUncapPropName() { + return "addressBook"; + } + + // =================================================================================== + // Accessor + // ======== + + /** Column-Annotation for S2Dao. ColumnDefinition -- PK : INTEGER : NotNull*/ + public static final String addressBookId_COLUMN = "ADDRESS_BOOK_ID"; + + /** + * Get the value of addressBookId.
+ * {PK : INTEGER : NotNull} + * + * @return The value of addressBookId. (Nullable) + */ + public java.math.BigDecimal getAddressBookId() { + return _addressBookId; + } + + /** + * Set the value of addressBookId.
+ * {PK : INTEGER : NotNull} + * + * @param addressBookId The value of addressBookId. (Nullable) + */ + public void setAddressBookId(java.math.BigDecimal addressBookId) { + _modifiedProperties.addPropertyName("addressBookId"); + _addressBookId = addressBookId; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- INTEGER : NotNull*/ + public static final String customersId_COLUMN = "CUSTOMERS_ID"; + + /** + * Get the value of customersId.
+ * {INTEGER : NotNull} + * + * @return The value of customersId. (Nullable) + */ + public java.math.BigDecimal getCustomersId() { + return _customersId; + } + + /** + * Set the value of customersId.
+ * {INTEGER : NotNull} + * + * @param customersId The value of customersId. (Nullable) + */ + public void setCustomersId(java.math.BigDecimal customersId) { + _modifiedProperties.addPropertyName("customersId"); + _customersId = customersId; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- CHAR(1) : NotNull*/ + public static final String entryGender_COLUMN = "ENTRY_GENDER"; + + /** + * Get the value of entryGender.
+ * {CHAR(1) : NotNull} + * + * @return The value of entryGender. (Nullable) + */ + public String getEntryGender() { + return _entryGender; + } + + /** + * Set the value of entryGender.
+ * {CHAR(1) : NotNull} + * + * @param entryGender The value of entryGender. (Nullable) + */ + public void setEntryGender(String entryGender) { + _modifiedProperties.addPropertyName("entryGender"); + _entryGender = entryGender; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- VARCHAR(32)*/ + public static final String entryCompany_COLUMN = "ENTRY_COMPANY"; + + /** + * Get the value of entryCompany.
+ * {VARCHAR(32)} + * + * @return The value of entryCompany. (Nullable) + */ + public String getEntryCompany() { + return _entryCompany; + } + + /** + * Set the value of entryCompany.
+ * {VARCHAR(32)} + * + * @param entryCompany The value of entryCompany. (Nullable) + */ + public void setEntryCompany(String entryCompany) { + _modifiedProperties.addPropertyName("entryCompany"); + _entryCompany = entryCompany; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- VARCHAR(32) : NotNull*/ + public static final String entryFirstname_COLUMN = "ENTRY_FIRSTNAME"; + + /** + * Get the value of entryFirstname.
+ * {VARCHAR(32) : NotNull} + * + * @return The value of entryFirstname. (Nullable) + */ + public String getEntryFirstname() { + return _entryFirstname; + } + + /** + * Set the value of entryFirstname.
+ * {VARCHAR(32) : NotNull} + * + * @param entryFirstname The value of entryFirstname. (Nullable) + */ + public void setEntryFirstname(String entryFirstname) { + _modifiedProperties.addPropertyName("entryFirstname"); + _entryFirstname = entryFirstname; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- VARCHAR(32) : NotNull*/ + public static final String entryLastname_COLUMN = "ENTRY_LASTNAME"; + + /** + * Get the value of entryLastname.
+ * {VARCHAR(32) : NotNull} + * + * @return The value of entryLastname. (Nullable) + */ + public String getEntryLastname() { + return _entryLastname; + } + + /** + * Set the value of entryLastname.
+ * {VARCHAR(32) : NotNull} + * + * @param entryLastname The value of entryLastname. (Nullable) + */ + public void setEntryLastname(String entryLastname) { + _modifiedProperties.addPropertyName("entryLastname"); + _entryLastname = entryLastname; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- VARCHAR(64) : NotNull*/ + public static final String entryStreetAddress_COLUMN = "ENTRY_STREET_ADDRESS"; + + /** + * Get the value of entryStreetAddress.
+ * {VARCHAR(64) : NotNull} + * + * @return The value of entryStreetAddress. (Nullable) + */ + public String getEntryStreetAddress() { + return _entryStreetAddress; + } + + /** + * Set the value of entryStreetAddress.
+ * {VARCHAR(64) : NotNull} + * + * @param entryStreetAddress The value of entryStreetAddress. (Nullable) + */ + public void setEntryStreetAddress(String entryStreetAddress) { + _modifiedProperties.addPropertyName("entryStreetAddress"); + _entryStreetAddress = entryStreetAddress; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- VARCHAR(32)*/ + public static final String entrySuburb_COLUMN = "ENTRY_SUBURB"; + + /** + * Get the value of entrySuburb.
+ * {VARCHAR(32)} + * + * @return The value of entrySuburb. (Nullable) + */ + public String getEntrySuburb() { + return _entrySuburb; + } + + /** + * Set the value of entrySuburb.
+ * {VARCHAR(32)} + * + * @param entrySuburb The value of entrySuburb. (Nullable) + */ + public void setEntrySuburb(String entrySuburb) { + _modifiedProperties.addPropertyName("entrySuburb"); + _entrySuburb = entrySuburb; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- VARCHAR(10) : NotNull*/ + public static final String entryPostcode_COLUMN = "ENTRY_POSTCODE"; + + /** + * Get the value of entryPostcode.
+ * {VARCHAR(10) : NotNull} + * + * @return The value of entryPostcode. (Nullable) + */ + public String getEntryPostcode() { + return _entryPostcode; + } + + /** + * Set the value of entryPostcode.
+ * {VARCHAR(10) : NotNull} + * + * @param entryPostcode The value of entryPostcode. (Nullable) + */ + public void setEntryPostcode(String entryPostcode) { + _modifiedProperties.addPropertyName("entryPostcode"); + _entryPostcode = entryPostcode; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- VARCHAR(32) : NotNull*/ + public static final String entryCity_COLUMN = "ENTRY_CITY"; + + /** + * Get the value of entryCity.
+ * {VARCHAR(32) : NotNull} + * + * @return The value of entryCity. (Nullable) + */ + public String getEntryCity() { + return _entryCity; + } + + /** + * Set the value of entryCity.
+ * {VARCHAR(32) : NotNull} + * + * @param entryCity The value of entryCity. (Nullable) + */ + public void setEntryCity(String entryCity) { + _modifiedProperties.addPropertyName("entryCity"); + _entryCity = entryCity; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- VARCHAR(32)*/ + public static final String entryState_COLUMN = "ENTRY_STATE"; + + /** + * Get the value of entryState.
+ * {VARCHAR(32)} + * + * @return The value of entryState. (Nullable) + */ + public String getEntryState() { + return _entryState; + } + + /** + * Set the value of entryState.
+ * {VARCHAR(32)} + * + * @param entryState The value of entryState. (Nullable) + */ + public void setEntryState(String entryState) { + _modifiedProperties.addPropertyName("entryState"); + _entryState = entryState; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- INTEGER : NotNull : Default=[0]*/ + public static final String entryCountryId_COLUMN = "ENTRY_COUNTRY_ID"; + + /** + * Get the value of entryCountryId.
+ * {INTEGER : NotNull : Default=[0]} + * + * @return The value of entryCountryId. (Nullable) + */ + public java.math.BigDecimal getEntryCountryId() { + return _entryCountryId; + } + + /** + * Set the value of entryCountryId.
+ * {INTEGER : NotNull : Default=[0]} + * + * @param entryCountryId The value of entryCountryId. (Nullable) + */ + public void setEntryCountryId(java.math.BigDecimal entryCountryId) { + _modifiedProperties.addPropertyName("entryCountryId"); + _entryCountryId = entryCountryId; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- INTEGER : NotNull : Default=[0]*/ + public static final String entryZoneId_COLUMN = "ENTRY_ZONE_ID"; + + /** + * Get the value of entryZoneId.
+ * {INTEGER : NotNull : Default=[0]} + * + * @return The value of entryZoneId. (Nullable) + */ + public java.math.BigDecimal getEntryZoneId() { + return _entryZoneId; + } + + /** + * Set the value of entryZoneId.
+ * {INTEGER : NotNull : Default=[0]} + * + * @param entryZoneId The value of entryZoneId. (Nullable) + */ + public void setEntryZoneId(java.math.BigDecimal entryZoneId) { + _modifiedProperties.addPropertyName("entryZoneId"); + _entryZoneId = entryZoneId; + } + + + // =================================================================================== + // Classify Method + // =============== + + // =================================================================================== + // Classification Determination + // ============================ + + + // =================================================================================== + // Classification Getter + // ===================== + + + // =================================================================================== + // Foreign Table + // ============= + + // =================================================================================== + // Refferer Table + // ============== + + // =================================================================================== + // Accept + // ====== + /** + * This method implements the method that is declared at super. + * + * @param primaryKeyMap Primary key map. (NotNull and NotEmpty) + * @deprecated Please use AddressBookDbm.getInstance().acceptPrimaryKeyMap(entity, primaryKeyMap); + */ + public void acceptPrimaryKeyMap(java.util.Map primaryKeyMap) { + getDBMeta().acceptPrimaryKeyMap(this, primaryKeyMap); + } + + /** + * This method implements the method that is declared at super. + * + * @param primaryKeyMapString Primary-key map-string. (NotNull and NotEmpty) + * @deprecated Please use AddressBookDbm.getInstance().acceptPrimaryKeyMapString(entity, primaryKeyMapString); + */ + public void acceptPrimaryKeyMapString(String primaryKeyMapString) { + getDBMeta().acceptPrimaryKeyMapString(this, primaryKeyMapString); + } + + /** + * This method implements the method that is declared at super. + * + * @param columnValueMap Column-value map. (NotNull and NotEmpty) + * @deprecated Please use AddressBookDbm.getInstance().acceptColumnValueMap(entity, columnValueMap); + */ + public void acceptColumnValueMap(java.util.Map columnValueMap) { + getDBMeta().acceptColumnValueMap(this, columnValueMap); + } + + /** + * This method implements the method that is declared at super. + * + * @param columnValueMapString Column-value map-string. (NotNull and NotEmpty) + * @deprecated Please use AddressBookDbm.getInstance().acceptColumnValueMap(entity, columnValueMapString); + */ + public void acceptColumnValueMapString(String columnValueMapString) { + getDBMeta().acceptColumnValueMapString(this, columnValueMapString); + } + + // =================================================================================== + // Extract + // ======= + /** + * This method implements the method that is declared at super. + * + * @return Primary-key map-string. (NotNull) + * @deprecated Please use AddressBookDbm.getInstance().extractPrimaryKeyMapString(entity); + */ + public String extractPrimaryKeyMapString() { + return getDBMeta().extractPrimaryKeyMapString(this); + } + + /** + * Extract primary-key map-string. + * + * @param startBrace Start-brace. (NotNull) + * @param endBrace End-brace. (NotNull) + * @param delimiter Delimiter. (NotNull) + * @param equal Equal. (NotNull) + * @return Primary-key map-string. (NotNull) + * @deprecated Please use AddressBookDbm.getInstance().extractPrimaryKeyMapString(entity, startBrace, endBrace, delimiter, equal); + */ + public String extractPrimaryKeyMapString(String startBrace, String endBrace, String delimiter, String equal) { + return getDBMeta().extractPrimaryKeyMapString(this, startBrace, endBrace, delimiter, equal); + } + + /** + * This method implements the method that is declared at super. + * + * @return Column-value map-string. (NotNull) + * @deprecated Please use AddressBookDbm.getInstance().extractColumnValueMapString(entity); + */ + public String extractColumnValueMapString() { + return getDBMeta().extractColumnValueMapString(this); + } + + /** + * Extract column-value map-string. + * + * @param startBrace Start-brace. (NotNull) + * @param endBrace End-brace. (NotNull) + * @param delimiter Delimiter. (NotNull) + * @param equal Equal. (NotNull) + * @return Column-value map-string. (NotNull) + * @deprecated Please use AddressBookDbm.getInstance().extractColumnValueMapString(entity, startBrace, endBrace, delimiter, equal); + */ + public String extractColumnValueMapString(String startBrace, String endBrace, String delimiter, String equal) { + return getDBMeta().extractColumnValueMapString(this, startBrace, endBrace, delimiter, equal); + } + + + // =================================================================================== + // Determination + // ============= + /** + * This method implements the method that is declared at super. + * + * @return Determination. + */ + public boolean hasPrimaryKeyValue() { + + if (_addressBookId == null) { + return false; + } + + return true; + } + + // =================================================================================== + // Modified Properties + // =================== + /** + * Get modified property names. (S2Dao uses this for updateModifiedProperties()) + * + * @return Modified property names. (NotNull) + */ + public java.util.Set getModifiedPropertyNames() { + return _modifiedProperties.getPropertyNames(); + } + + /** + * New entity modified properties. You can override this at the sub-class if you need it. + * + * @return Entity modified properties. (NotNull) + */ + protected EntityModifiedProperties newEntityModifiedProperties() { + return new EntityModifiedProperties(); + } + + /** + * Clear modified property names. + */ + public void clearModifiedPropertyNames() { + _modifiedProperties.clear(); + } + + // =================================================================================== + // Basic Override + // ============== + + /** + * This method overrides the method that is declared at super. + * If the primary-key of the other is same as this one, returns true. + * + * @param other Other entity. + * @return Comparing result. + */ + public boolean equals(Object other) { + if (other == null) { + return false; + } + if (!(other instanceof BsAddressBook)) { + return false; + } + final BsAddressBook otherEntity = (BsAddressBook)other; + + if (getAddressBookId() == null || !getAddressBookId().equals(otherEntity.getAddressBookId())) { + return false; + } + + return true; + } + + /** + * This method overrides the method that is declared at super. + * Calculates hash-code from primary-key. + * + * @return Hash-code from primary-keys. + */ + public int hashCode() { + int result = 0; + + if (this.getAddressBookId() != null) { + result = result + getAddressBookId().hashCode(); + } + + return result; + } + + /** + * This method overrides the method that is declared at super. + * + * @return Column-value map-string. (NotNull) + */ + public String toString() { + final String delimiter = ","; + final StringBuffer sb = new StringBuffer(); + + sb.append(delimiter).append(getAddressBookId()); + sb.append(delimiter).append(getCustomersId()); + sb.append(delimiter).append(getEntryGender()); + sb.append(delimiter).append(getEntryCompany()); + sb.append(delimiter).append(getEntryFirstname()); + sb.append(delimiter).append(getEntryLastname()); + sb.append(delimiter).append(getEntryStreetAddress()); + sb.append(delimiter).append(getEntrySuburb()); + sb.append(delimiter).append(getEntryPostcode()); + sb.append(delimiter).append(getEntryCity()); + sb.append(delimiter).append(getEntryState()); + sb.append(delimiter).append(getEntryCountryId()); + sb.append(delimiter).append(getEntryZoneId()); + + sb.delete(0, delimiter.length()); + sb.insert(0, "{").append("}"); + return sb.toString(); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/BsAddressFormat.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/BsAddressFormat.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/BsAddressFormat.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,416 @@ +package jp.sf.pal.pompei.bsentity; + + +import jp.sf.pal.pompei.allcommon.Entity; +import jp.sf.pal.pompei.allcommon.dbmeta.DBMeta; +import jp.sf.pal.pompei.allcommon.dbmeta.DBMetaInstanceHandler; + +/** + * The entity of ADDRESS_FORMAT. + * + *
+ * [primary-key]
+ *     ADDRESS_FORMAT_ID
+ * 
+ * [column-property]
+ *     ADDRESS_FORMAT_ID, ADDRESS_FORMAT, ADDRESS_SUMMARY
+ * 
+ * [foreign-property]
+ *     
+ * 
+ * [refferer-property]
+ *     
+ * 
+ * [sequence]
+ *     
+ * 
+ * [identity]
+ *     
+ * 
+ * [update-date]
+ *     
+ * 
+ * [version-no]
+ *     
+ * 
+ * 
+ * + * @author DBFlute(AutoGenerator) + */ +public abstract class BsAddressFormat implements Entity, java.io.Serializable { + + /** Serial version UID. (Default) */ + private static final long serialVersionUID = 1L; + + /** TABLE-Annotation for S2Dao */ + public static final String TABLE = "ADDRESS_FORMAT"; + + + // =================================================================================== + // Attribute + // ========= + /** Entity modified properties. (for S2Dao) */ + protected EntityModifiedProperties _modifiedProperties = newEntityModifiedProperties(); + + + /** The value of addressFormatId. ColumnDefinition -- PK : INTEGER : NotNull*/ + protected java.math.BigDecimal _addressFormatId; + + /** The value of addressFormat. ColumnDefinition -- VARCHAR(128) : NotNull*/ + protected String _addressFormat; + + /** The value of addressSummary. ColumnDefinition -- VARCHAR(48) : NotNull*/ + protected String _addressSummary; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + public BsAddressFormat() { + } + + + // =================================================================================== + // DBMeta + // ====== + /** + * This method implements the method that is declared at super. + * + * @return DBMeta. (NotNull) + */ + public DBMeta getDBMeta() { + return DBMetaInstanceHandler.getInstanceByTableDbName(getTableDbName()); + } + + // =================================================================================== + // Table Name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + public String getTableDbName() { + return "ADDRESS_FORMAT"; + } + + /** + * This method implements the method that is declared at super. + * + * @return Table cap-prop-name. (NotNull) + */ + public String getTableCapPropName() { + return "AddressFormat"; + } + + /** + * This method implements the method that is declared at super. + * + * @return Table uncap-prop-name. (NotNull) + */ + public String getTableUncapPropName() { + return "addressFormat"; + } + + // =================================================================================== + // Accessor + // ======== + + /** Column-Annotation for S2Dao. ColumnDefinition -- PK : INTEGER : NotNull*/ + public static final String addressFormatId_COLUMN = "ADDRESS_FORMAT_ID"; + + /** + * Get the value of addressFormatId.
+ * {PK : INTEGER : NotNull} + * + * @return The value of addressFormatId. (Nullable) + */ + public java.math.BigDecimal getAddressFormatId() { + return _addressFormatId; + } + + /** + * Set the value of addressFormatId.
+ * {PK : INTEGER : NotNull} + * + * @param addressFormatId The value of addressFormatId. (Nullable) + */ + public void setAddressFormatId(java.math.BigDecimal addressFormatId) { + _modifiedProperties.addPropertyName("addressFormatId"); + _addressFormatId = addressFormatId; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- VARCHAR(128) : NotNull*/ + public static final String addressFormat_COLUMN = "ADDRESS_FORMAT"; + + /** + * Get the value of addressFormat.
+ * {VARCHAR(128) : NotNull} + * + * @return The value of addressFormat. (Nullable) + */ + public String getAddressFormat() { + return _addressFormat; + } + + /** + * Set the value of addressFormat.
+ * {VARCHAR(128) : NotNull} + * + * @param addressFormat The value of addressFormat. (Nullable) + */ + public void setAddressFormat(String addressFormat) { + _modifiedProperties.addPropertyName("addressFormat"); + _addressFormat = addressFormat; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- VARCHAR(48) : NotNull*/ + public static final String addressSummary_COLUMN = "ADDRESS_SUMMARY"; + + /** + * Get the value of addressSummary.
+ * {VARCHAR(48) : NotNull} + * + * @return The value of addressSummary. (Nullable) + */ + public String getAddressSummary() { + return _addressSummary; + } + + /** + * Set the value of addressSummary.
+ * {VARCHAR(48) : NotNull} + * + * @param addressSummary The value of addressSummary. (Nullable) + */ + public void setAddressSummary(String addressSummary) { + _modifiedProperties.addPropertyName("addressSummary"); + _addressSummary = addressSummary; + } + + + // =================================================================================== + // Classify Method + // =============== + + // =================================================================================== + // Classification Determination + // ============================ + + + // =================================================================================== + // Classification Getter + // ===================== + + + // =================================================================================== + // Foreign Table + // ============= + + // =================================================================================== + // Refferer Table + // ============== + + // =================================================================================== + // Accept + // ====== + /** + * This method implements the method that is declared at super. + * + * @param primaryKeyMap Primary key map. (NotNull and NotEmpty) + * @deprecated Please use AddressFormatDbm.getInstance().acceptPrimaryKeyMap(entity, primaryKeyMap); + */ + public void acceptPrimaryKeyMap(java.util.Map primaryKeyMap) { + getDBMeta().acceptPrimaryKeyMap(this, primaryKeyMap); + } + + /** + * This method implements the method that is declared at super. + * + * @param primaryKeyMapString Primary-key map-string. (NotNull and NotEmpty) + * @deprecated Please use AddressFormatDbm.getInstance().acceptPrimaryKeyMapString(entity, primaryKeyMapString); + */ + public void acceptPrimaryKeyMapString(String primaryKeyMapString) { + getDBMeta().acceptPrimaryKeyMapString(this, primaryKeyMapString); + } + + /** + * This method implements the method that is declared at super. + * + * @param columnValueMap Column-value map. (NotNull and NotEmpty) + * @deprecated Please use AddressFormatDbm.getInstance().acceptColumnValueMap(entity, columnValueMap); + */ + public void acceptColumnValueMap(java.util.Map columnValueMap) { + getDBMeta().acceptColumnValueMap(this, columnValueMap); + } + + /** + * This method implements the method that is declared at super. + * + * @param columnValueMapString Column-value map-string. (NotNull and NotEmpty) + * @deprecated Please use AddressFormatDbm.getInstance().acceptColumnValueMap(entity, columnValueMapString); + */ + public void acceptColumnValueMapString(String columnValueMapString) { + getDBMeta().acceptColumnValueMapString(this, columnValueMapString); + } + + // =================================================================================== + // Extract + // ======= + /** + * This method implements the method that is declared at super. + * + * @return Primary-key map-string. (NotNull) + * @deprecated Please use AddressFormatDbm.getInstance().extractPrimaryKeyMapString(entity); + */ + public String extractPrimaryKeyMapString() { + return getDBMeta().extractPrimaryKeyMapString(this); + } + + /** + * Extract primary-key map-string. + * + * @param startBrace Start-brace. (NotNull) + * @param endBrace End-brace. (NotNull) + * @param delimiter Delimiter. (NotNull) + * @param equal Equal. (NotNull) + * @return Primary-key map-string. (NotNull) + * @deprecated Please use AddressFormatDbm.getInstance().extractPrimaryKeyMapString(entity, startBrace, endBrace, delimiter, equal); + */ + public String extractPrimaryKeyMapString(String startBrace, String endBrace, String delimiter, String equal) { + return getDBMeta().extractPrimaryKeyMapString(this, startBrace, endBrace, delimiter, equal); + } + + /** + * This method implements the method that is declared at super. + * + * @return Column-value map-string. (NotNull) + * @deprecated Please use AddressFormatDbm.getInstance().extractColumnValueMapString(entity); + */ + public String extractColumnValueMapString() { + return getDBMeta().extractColumnValueMapString(this); + } + + /** + * Extract column-value map-string. + * + * @param startBrace Start-brace. (NotNull) + * @param endBrace End-brace. (NotNull) + * @param delimiter Delimiter. (NotNull) + * @param equal Equal. (NotNull) + * @return Column-value map-string. (NotNull) + * @deprecated Please use AddressFormatDbm.getInstance().extractColumnValueMapString(entity, startBrace, endBrace, delimiter, equal); + */ + public String extractColumnValueMapString(String startBrace, String endBrace, String delimiter, String equal) { + return getDBMeta().extractColumnValueMapString(this, startBrace, endBrace, delimiter, equal); + } + + + // =================================================================================== + // Determination + // ============= + /** + * This method implements the method that is declared at super. + * + * @return Determination. + */ + public boolean hasPrimaryKeyValue() { + + if (_addressFormatId == null) { + return false; + } + + return true; + } + + // =================================================================================== + // Modified Properties + // =================== + /** + * Get modified property names. (S2Dao uses this for updateModifiedProperties()) + * + * @return Modified property names. (NotNull) + */ + public java.util.Set getModifiedPropertyNames() { + return _modifiedProperties.getPropertyNames(); + } + + /** + * New entity modified properties. You can override this at the sub-class if you need it. + * + * @return Entity modified properties. (NotNull) + */ + protected EntityModifiedProperties newEntityModifiedProperties() { + return new EntityModifiedProperties(); + } + + /** + * Clear modified property names. + */ + public void clearModifiedPropertyNames() { + _modifiedProperties.clear(); + } + + // =================================================================================== + // Basic Override + // ============== + + /** + * This method overrides the method that is declared at super. + * If the primary-key of the other is same as this one, returns true. + * + * @param other Other entity. + * @return Comparing result. + */ + public boolean equals(Object other) { + if (other == null) { + return false; + } + if (!(other instanceof BsAddressFormat)) { + return false; + } + final BsAddressFormat otherEntity = (BsAddressFormat)other; + + if (getAddressFormatId() == null || !getAddressFormatId().equals(otherEntity.getAddressFormatId())) { + return false; + } + + return true; + } + + /** + * This method overrides the method that is declared at super. + * Calculates hash-code from primary-key. + * + * @return Hash-code from primary-keys. + */ + public int hashCode() { + int result = 0; + + if (this.getAddressFormatId() != null) { + result = result + getAddressFormatId().hashCode(); + } + + return result; + } + + /** + * This method overrides the method that is declared at super. + * + * @return Column-value map-string. (NotNull) + */ + public String toString() { + final String delimiter = ","; + final StringBuffer sb = new StringBuffer(); + + sb.append(delimiter).append(getAddressFormatId()); + sb.append(delimiter).append(getAddressFormat()); + sb.append(delimiter).append(getAddressSummary()); + + sb.delete(0, delimiter.length()); + sb.insert(0, "{").append("}"); + return sb.toString(); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/BsBanners.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/BsBanners.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/BsBanners.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,668 @@ +package jp.sf.pal.pompei.bsentity; + + +import jp.sf.pal.pompei.allcommon.Entity; +import jp.sf.pal.pompei.allcommon.dbmeta.DBMeta; +import jp.sf.pal.pompei.allcommon.dbmeta.DBMetaInstanceHandler; + +/** + * The entity of BANNERS. + * + *
+ * [primary-key]
+ *     BANNERS_ID
+ * 
+ * [column-property]
+ *     BANNERS_ID, BANNERS_TITLE, BANNERS_URL, BANNERS_IMAGE, BANNERS_GROUP, BANNERS_HTML_TEXT, EXPIRES_IMPRESSIONS, EXPIRES_DATE, DATE_SCHEDULED, DATE_ADDED, DATE_STATUS_CHANGE, STATUS
+ * 
+ * [foreign-property]
+ *     
+ * 
+ * [refferer-property]
+ *     
+ * 
+ * [sequence]
+ *     
+ * 
+ * [identity]
+ *     
+ * 
+ * [update-date]
+ *     
+ * 
+ * [version-no]
+ *     
+ * 
+ * 
+ * + * @author DBFlute(AutoGenerator) + */ +public abstract class BsBanners implements Entity, java.io.Serializable { + + /** Serial version UID. (Default) */ + private static final long serialVersionUID = 1L; + + /** TABLE-Annotation for S2Dao */ + public static final String TABLE = "BANNERS"; + + + // =================================================================================== + // Attribute + // ========= + /** Entity modified properties. (for S2Dao) */ + protected EntityModifiedProperties _modifiedProperties = newEntityModifiedProperties(); + + + /** The value of bannersId. ColumnDefinition -- PK : INTEGER : NotNull*/ + protected java.math.BigDecimal _bannersId; + + /** The value of bannersTitle. ColumnDefinition -- VARCHAR(64) : NotNull*/ + protected String _bannersTitle; + + /** The value of bannersUrl. ColumnDefinition -- VARCHAR(255) : NotNull*/ + protected String _bannersUrl; + + /** The value of bannersImage. ColumnDefinition -- VARCHAR(64) : NotNull*/ + protected String _bannersImage; + + /** The value of bannersGroup. ColumnDefinition -- VARCHAR(10) : NotNull*/ + protected String _bannersGroup; + + /** The value of bannersHtmlText. ColumnDefinition -- LONG VARCHAR(32700)*/ + protected String _bannersHtmlText; + + /** The value of expiresImpressions. ColumnDefinition -- INTEGER : Default=[0]*/ + protected java.math.BigDecimal _expiresImpressions; + + /** The value of expiresDate. ColumnDefinition -- TIMESTAMP : Default=[NULL]*/ + protected java.sql.Timestamp _expiresDate; + + /** The value of dateScheduled. ColumnDefinition -- TIMESTAMP : Default=[NULL]*/ + protected java.sql.Timestamp _dateScheduled; + + /** The value of dateAdded. ColumnDefinition -- TIMESTAMP : NotNull*/ + protected java.sql.Timestamp _dateAdded; + + /** The value of dateStatusChange. ColumnDefinition -- TIMESTAMP : Default=[NULL]*/ + protected java.sql.Timestamp _dateStatusChange; + + /** The value of status. ColumnDefinition -- INTEGER : NotNull : Default=[1]*/ + protected java.math.BigDecimal _status; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + public BsBanners() { + } + + + // =================================================================================== + // DBMeta + // ====== + /** + * This method implements the method that is declared at super. + * + * @return DBMeta. (NotNull) + */ + public DBMeta getDBMeta() { + return DBMetaInstanceHandler.getInstanceByTableDbName(getTableDbName()); + } + + // =================================================================================== + // Table Name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + public String getTableDbName() { + return "BANNERS"; + } + + /** + * This method implements the method that is declared at super. + * + * @return Table cap-prop-name. (NotNull) + */ + public String getTableCapPropName() { + return "Banners"; + } + + /** + * This method implements the method that is declared at super. + * + * @return Table uncap-prop-name. (NotNull) + */ + public String getTableUncapPropName() { + return "banners"; + } + + // =================================================================================== + // Accessor + // ======== + + /** Column-Annotation for S2Dao. ColumnDefinition -- PK : INTEGER : NotNull*/ + public static final String bannersId_COLUMN = "BANNERS_ID"; + + /** + * Get the value of bannersId.
+ * {PK : INTEGER : NotNull} + * + * @return The value of bannersId. (Nullable) + */ + public java.math.BigDecimal getBannersId() { + return _bannersId; + } + + /** + * Set the value of bannersId.
+ * {PK : INTEGER : NotNull} + * + * @param bannersId The value of bannersId. (Nullable) + */ + public void setBannersId(java.math.BigDecimal bannersId) { + _modifiedProperties.addPropertyName("bannersId"); + _bannersId = bannersId; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- VARCHAR(64) : NotNull*/ + public static final String bannersTitle_COLUMN = "BANNERS_TITLE"; + + /** + * Get the value of bannersTitle.
+ * {VARCHAR(64) : NotNull} + * + * @return The value of bannersTitle. (Nullable) + */ + public String getBannersTitle() { + return _bannersTitle; + } + + /** + * Set the value of bannersTitle.
+ * {VARCHAR(64) : NotNull} + * + * @param bannersTitle The value of bannersTitle. (Nullable) + */ + public void setBannersTitle(String bannersTitle) { + _modifiedProperties.addPropertyName("bannersTitle"); + _bannersTitle = bannersTitle; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- VARCHAR(255) : NotNull*/ + public static final String bannersUrl_COLUMN = "BANNERS_URL"; + + /** + * Get the value of bannersUrl.
+ * {VARCHAR(255) : NotNull} + * + * @return The value of bannersUrl. (Nullable) + */ + public String getBannersUrl() { + return _bannersUrl; + } + + /** + * Set the value of bannersUrl.
+ * {VARCHAR(255) : NotNull} + * + * @param bannersUrl The value of bannersUrl. (Nullable) + */ + public void setBannersUrl(String bannersUrl) { + _modifiedProperties.addPropertyName("bannersUrl"); + _bannersUrl = bannersUrl; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- VARCHAR(64) : NotNull*/ + public static final String bannersImage_COLUMN = "BANNERS_IMAGE"; + + /** + * Get the value of bannersImage.
+ * {VARCHAR(64) : NotNull} + * + * @return The value of bannersImage. (Nullable) + */ + public String getBannersImage() { + return _bannersImage; + } + + /** + * Set the value of bannersImage.
+ * {VARCHAR(64) : NotNull} + * + * @param bannersImage The value of bannersImage. (Nullable) + */ + public void setBannersImage(String bannersImage) { + _modifiedProperties.addPropertyName("bannersImage"); + _bannersImage = bannersImage; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- VARCHAR(10) : NotNull*/ + public static final String bannersGroup_COLUMN = "BANNERS_GROUP"; + + /** + * Get the value of bannersGroup.
+ * {VARCHAR(10) : NotNull} + * + * @return The value of bannersGroup. (Nullable) + */ + public String getBannersGroup() { + return _bannersGroup; + } + + /** + * Set the value of bannersGroup.
+ * {VARCHAR(10) : NotNull} + * + * @param bannersGroup The value of bannersGroup. (Nullable) + */ + public void setBannersGroup(String bannersGroup) { + _modifiedProperties.addPropertyName("bannersGroup"); + _bannersGroup = bannersGroup; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- LONG VARCHAR(32700)*/ + public static final String bannersHtmlText_COLUMN = "BANNERS_HTML_TEXT"; + + /** + * Get the value of bannersHtmlText.
+ * {LONG VARCHAR(32700)} + * + * @return The value of bannersHtmlText. (Nullable) + */ + public String getBannersHtmlText() { + return _bannersHtmlText; + } + + /** + * Set the value of bannersHtmlText.
+ * {LONG VARCHAR(32700)} + * + * @param bannersHtmlText The value of bannersHtmlText. (Nullable) + */ + public void setBannersHtmlText(String bannersHtmlText) { + _modifiedProperties.addPropertyName("bannersHtmlText"); + _bannersHtmlText = bannersHtmlText; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- INTEGER : Default=[0]*/ + public static final String expiresImpressions_COLUMN = "EXPIRES_IMPRESSIONS"; + + /** + * Get the value of expiresImpressions.
+ * {INTEGER : Default=[0]} + * + * @return The value of expiresImpressions. (Nullable) + */ + public java.math.BigDecimal getExpiresImpressions() { + return _expiresImpressions; + } + + /** + * Set the value of expiresImpressions.
+ * {INTEGER : Default=[0]} + * + * @param expiresImpressions The value of expiresImpressions. (Nullable) + */ + public void setExpiresImpressions(java.math.BigDecimal expiresImpressions) { + _modifiedProperties.addPropertyName("expiresImpressions"); + _expiresImpressions = expiresImpressions; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- TIMESTAMP : Default=[NULL]*/ + public static final String expiresDate_COLUMN = "EXPIRES_DATE"; + + /** + * Get the value of expiresDate.
+ * {TIMESTAMP : Default=[NULL]} + * + * @return The value of expiresDate. (Nullable) + */ + public java.sql.Timestamp getExpiresDate() { + return _expiresDate; + } + + /** + * Set the value of expiresDate.
+ * {TIMESTAMP : Default=[NULL]} + * + * @param expiresDate The value of expiresDate. (Nullable) + */ + public void setExpiresDate(java.sql.Timestamp expiresDate) { + _modifiedProperties.addPropertyName("expiresDate"); + _expiresDate = expiresDate; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- TIMESTAMP : Default=[NULL]*/ + public static final String dateScheduled_COLUMN = "DATE_SCHEDULED"; + + /** + * Get the value of dateScheduled.
+ * {TIMESTAMP : Default=[NULL]} + * + * @return The value of dateScheduled. (Nullable) + */ + public java.sql.Timestamp getDateScheduled() { + return _dateScheduled; + } + + /** + * Set the value of dateScheduled.
+ * {TIMESTAMP : Default=[NULL]} + * + * @param dateScheduled The value of dateScheduled. (Nullable) + */ + public void setDateScheduled(java.sql.Timestamp dateScheduled) { + _modifiedProperties.addPropertyName("dateScheduled"); + _dateScheduled = dateScheduled; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- TIMESTAMP : NotNull*/ + public static final String dateAdded_COLUMN = "DATE_ADDED"; + + /** + * Get the value of dateAdded.
+ * {TIMESTAMP : NotNull} + * + * @return The value of dateAdded. (Nullable) + */ + public java.sql.Timestamp getDateAdded() { + return _dateAdded; + } + + /** + * Set the value of dateAdded.
+ * {TIMESTAMP : NotNull} + * + * @param dateAdded The value of dateAdded. (Nullable) + */ + public void setDateAdded(java.sql.Timestamp dateAdded) { + _modifiedProperties.addPropertyName("dateAdded"); + _dateAdded = dateAdded; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- TIMESTAMP : Default=[NULL]*/ + public static final String dateStatusChange_COLUMN = "DATE_STATUS_CHANGE"; + + /** + * Get the value of dateStatusChange.
+ * {TIMESTAMP : Default=[NULL]} + * + * @return The value of dateStatusChange. (Nullable) + */ + public java.sql.Timestamp getDateStatusChange() { + return _dateStatusChange; + } + + /** + * Set the value of dateStatusChange.
+ * {TIMESTAMP : Default=[NULL]} + * + * @param dateStatusChange The value of dateStatusChange. (Nullable) + */ + public void setDateStatusChange(java.sql.Timestamp dateStatusChange) { + _modifiedProperties.addPropertyName("dateStatusChange"); + _dateStatusChange = dateStatusChange; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- INTEGER : NotNull : Default=[1]*/ + public static final String status_COLUMN = "STATUS"; + + /** + * Get the value of status.
+ * {INTEGER : NotNull : Default=[1]} + * + * @return The value of status. (Nullable) + */ + public java.math.BigDecimal getStatus() { + return _status; + } + + /** + * Set the value of status.
+ * {INTEGER : NotNull : Default=[1]} + * + * @param status The value of status. (Nullable) + */ + public void setStatus(java.math.BigDecimal status) { + _modifiedProperties.addPropertyName("status"); + _status = status; + } + + + // =================================================================================== + // Classify Method + // =============== + + // =================================================================================== + // Classification Determination + // ============================ + + + // =================================================================================== + // Classification Getter + // ===================== + + + // =================================================================================== + // Foreign Table + // ============= + + // =================================================================================== + // Refferer Table + // ============== + + // =================================================================================== + // Accept + // ====== + /** + * This method implements the method that is declared at super. + * + * @param primaryKeyMap Primary key map. (NotNull and NotEmpty) + * @deprecated Please use BannersDbm.getInstance().acceptPrimaryKeyMap(entity, primaryKeyMap); + */ + public void acceptPrimaryKeyMap(java.util.Map primaryKeyMap) { + getDBMeta().acceptPrimaryKeyMap(this, primaryKeyMap); + } + + /** + * This method implements the method that is declared at super. + * + * @param primaryKeyMapString Primary-key map-string. (NotNull and NotEmpty) + * @deprecated Please use BannersDbm.getInstance().acceptPrimaryKeyMapString(entity, primaryKeyMapString); + */ + public void acceptPrimaryKeyMapString(String primaryKeyMapString) { + getDBMeta().acceptPrimaryKeyMapString(this, primaryKeyMapString); + } + + /** + * This method implements the method that is declared at super. + * + * @param columnValueMap Column-value map. (NotNull and NotEmpty) + * @deprecated Please use BannersDbm.getInstance().acceptColumnValueMap(entity, columnValueMap); + */ + public void acceptColumnValueMap(java.util.Map columnValueMap) { + getDBMeta().acceptColumnValueMap(this, columnValueMap); + } + + /** + * This method implements the method that is declared at super. + * + * @param columnValueMapString Column-value map-string. (NotNull and NotEmpty) + * @deprecated Please use BannersDbm.getInstance().acceptColumnValueMap(entity, columnValueMapString); + */ + public void acceptColumnValueMapString(String columnValueMapString) { + getDBMeta().acceptColumnValueMapString(this, columnValueMapString); + } + + // =================================================================================== + // Extract + // ======= + /** + * This method implements the method that is declared at super. + * + * @return Primary-key map-string. (NotNull) + * @deprecated Please use BannersDbm.getInstance().extractPrimaryKeyMapString(entity); + */ + public String extractPrimaryKeyMapString() { + return getDBMeta().extractPrimaryKeyMapString(this); + } + + /** + * Extract primary-key map-string. + * + * @param startBrace Start-brace. (NotNull) + * @param endBrace End-brace. (NotNull) + * @param delimiter Delimiter. (NotNull) + * @param equal Equal. (NotNull) + * @return Primary-key map-string. (NotNull) + * @deprecated Please use BannersDbm.getInstance().extractPrimaryKeyMapString(entity, startBrace, endBrace, delimiter, equal); + */ + public String extractPrimaryKeyMapString(String startBrace, String endBrace, String delimiter, String equal) { + return getDBMeta().extractPrimaryKeyMapString(this, startBrace, endBrace, delimiter, equal); + } + + /** + * This method implements the method that is declared at super. + * + * @return Column-value map-string. (NotNull) + * @deprecated Please use BannersDbm.getInstance().extractColumnValueMapString(entity); + */ + public String extractColumnValueMapString() { + return getDBMeta().extractColumnValueMapString(this); + } + + /** + * Extract column-value map-string. + * + * @param startBrace Start-brace. (NotNull) + * @param endBrace End-brace. (NotNull) + * @param delimiter Delimiter. (NotNull) + * @param equal Equal. (NotNull) + * @return Column-value map-string. (NotNull) + * @deprecated Please use BannersDbm.getInstance().extractColumnValueMapString(entity, startBrace, endBrace, delimiter, equal); + */ + public String extractColumnValueMapString(String startBrace, String endBrace, String delimiter, String equal) { + return getDBMeta().extractColumnValueMapString(this, startBrace, endBrace, delimiter, equal); + } + + + // =================================================================================== + // Determination + // ============= + /** + * This method implements the method that is declared at super. + * + * @return Determination. + */ + public boolean hasPrimaryKeyValue() { + + if (_bannersId == null) { + return false; + } + + return true; + } + + // =================================================================================== + // Modified Properties + // =================== + /** + * Get modified property names. (S2Dao uses this for updateModifiedProperties()) + * + * @return Modified property names. (NotNull) + */ + public java.util.Set getModifiedPropertyNames() { + return _modifiedProperties.getPropertyNames(); + } + + /** + * New entity modified properties. You can override this at the sub-class if you need it. + * + * @return Entity modified properties. (NotNull) + */ + protected EntityModifiedProperties newEntityModifiedProperties() { + return new EntityModifiedProperties(); + } + + /** + * Clear modified property names. + */ + public void clearModifiedPropertyNames() { + _modifiedProperties.clear(); + } + + // =================================================================================== + // Basic Override + // ============== + + /** + * This method overrides the method that is declared at super. + * If the primary-key of the other is same as this one, returns true. + * + * @param other Other entity. + * @return Comparing result. + */ + public boolean equals(Object other) { + if (other == null) { + return false; + } + if (!(other instanceof BsBanners)) { + return false; + } + final BsBanners otherEntity = (BsBanners)other; + + if (getBannersId() == null || !getBannersId().equals(otherEntity.getBannersId())) { + return false; + } + + return true; + } + + /** + * This method overrides the method that is declared at super. + * Calculates hash-code from primary-key. + * + * @return Hash-code from primary-keys. + */ + public int hashCode() { + int result = 0; + + if (this.getBannersId() != null) { + result = result + getBannersId().hashCode(); + } + + return result; + } + + /** + * This method overrides the method that is declared at super. + * + * @return Column-value map-string. (NotNull) + */ + public String toString() { + final String delimiter = ","; + final StringBuffer sb = new StringBuffer(); + + sb.append(delimiter).append(getBannersId()); + sb.append(delimiter).append(getBannersTitle()); + sb.append(delimiter).append(getBannersUrl()); + sb.append(delimiter).append(getBannersImage()); + sb.append(delimiter).append(getBannersGroup()); + sb.append(delimiter).append(getBannersHtmlText()); + sb.append(delimiter).append(getExpiresImpressions()); + sb.append(delimiter).append(getExpiresDate()); + sb.append(delimiter).append(getDateScheduled()); + sb.append(delimiter).append(getDateAdded()); + sb.append(delimiter).append(getDateStatusChange()); + sb.append(delimiter).append(getStatus()); + + sb.delete(0, delimiter.length()); + sb.insert(0, "{").append("}"); + return sb.toString(); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/BsBannersHistory.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/BsBannersHistory.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/BsBannersHistory.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,472 @@ +package jp.sf.pal.pompei.bsentity; + + +import jp.sf.pal.pompei.allcommon.Entity; +import jp.sf.pal.pompei.allcommon.dbmeta.DBMeta; +import jp.sf.pal.pompei.allcommon.dbmeta.DBMetaInstanceHandler; + +/** + * The entity of BANNERS_HISTORY. + * + *
+ * [primary-key]
+ *     BANNERS_HISTORY_ID
+ * 
+ * [column-property]
+ *     BANNERS_HISTORY_ID, BANNERS_ID, BANNERS_SHOWN, BANNERS_CLICKED, BANNERS_HISTORY_DATE
+ * 
+ * [foreign-property]
+ *     
+ * 
+ * [refferer-property]
+ *     
+ * 
+ * [sequence]
+ *     
+ * 
+ * [identity]
+ *     
+ * 
+ * [update-date]
+ *     
+ * 
+ * [version-no]
+ *     
+ * 
+ * 
+ * + * @author DBFlute(AutoGenerator) + */ +public abstract class BsBannersHistory implements Entity, java.io.Serializable { + + /** Serial version UID. (Default) */ + private static final long serialVersionUID = 1L; + + /** TABLE-Annotation for S2Dao */ + public static final String TABLE = "BANNERS_HISTORY"; + + + // =================================================================================== + // Attribute + // ========= + /** Entity modified properties. (for S2Dao) */ + protected EntityModifiedProperties _modifiedProperties = newEntityModifiedProperties(); + + + /** The value of bannersHistoryId. ColumnDefinition -- PK : INTEGER : NotNull*/ + protected java.math.BigDecimal _bannersHistoryId; + + /** The value of bannersId. ColumnDefinition -- INTEGER : NotNull*/ + protected java.math.BigDecimal _bannersId; + + /** The value of bannersShown. ColumnDefinition -- INTEGER : NotNull : Default=[0]*/ + protected java.math.BigDecimal _bannersShown; + + /** The value of bannersClicked. ColumnDefinition -- INTEGER : NotNull : Default=[0]*/ + protected java.math.BigDecimal _bannersClicked; + + /** The value of bannersHistoryDate. ColumnDefinition -- TIMESTAMP : NotNull*/ + protected java.sql.Timestamp _bannersHistoryDate; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + public BsBannersHistory() { + } + + + // =================================================================================== + // DBMeta + // ====== + /** + * This method implements the method that is declared at super. + * + * @return DBMeta. (NotNull) + */ + public DBMeta getDBMeta() { + return DBMetaInstanceHandler.getInstanceByTableDbName(getTableDbName()); + } + + // =================================================================================== + // Table Name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + public String getTableDbName() { + return "BANNERS_HISTORY"; + } + + /** + * This method implements the method that is declared at super. + * + * @return Table cap-prop-name. (NotNull) + */ + public String getTableCapPropName() { + return "BannersHistory"; + } + + /** + * This method implements the method that is declared at super. + * + * @return Table uncap-prop-name. (NotNull) + */ + public String getTableUncapPropName() { + return "bannersHistory"; + } + + // =================================================================================== + // Accessor + // ======== + + /** Column-Annotation for S2Dao. ColumnDefinition -- PK : INTEGER : NotNull*/ + public static final String bannersHistoryId_COLUMN = "BANNERS_HISTORY_ID"; + + /** + * Get the value of bannersHistoryId.
+ * {PK : INTEGER : NotNull} + * + * @return The value of bannersHistoryId. (Nullable) + */ + public java.math.BigDecimal getBannersHistoryId() { + return _bannersHistoryId; + } + + /** + * Set the value of bannersHistoryId.
+ * {PK : INTEGER : NotNull} + * + * @param bannersHistoryId The value of bannersHistoryId. (Nullable) + */ + public void setBannersHistoryId(java.math.BigDecimal bannersHistoryId) { + _modifiedProperties.addPropertyName("bannersHistoryId"); + _bannersHistoryId = bannersHistoryId; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- INTEGER : NotNull*/ + public static final String bannersId_COLUMN = "BANNERS_ID"; + + /** + * Get the value of bannersId.
+ * {INTEGER : NotNull} + * + * @return The value of bannersId. (Nullable) + */ + public java.math.BigDecimal getBannersId() { + return _bannersId; + } + + /** + * Set the value of bannersId.
+ * {INTEGER : NotNull} + * + * @param bannersId The value of bannersId. (Nullable) + */ + public void setBannersId(java.math.BigDecimal bannersId) { + _modifiedProperties.addPropertyName("bannersId"); + _bannersId = bannersId; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- INTEGER : NotNull : Default=[0]*/ + public static final String bannersShown_COLUMN = "BANNERS_SHOWN"; + + /** + * Get the value of bannersShown.
+ * {INTEGER : NotNull : Default=[0]} + * + * @return The value of bannersShown. (Nullable) + */ + public java.math.BigDecimal getBannersShown() { + return _bannersShown; + } + + /** + * Set the value of bannersShown.
+ * {INTEGER : NotNull : Default=[0]} + * + * @param bannersShown The value of bannersShown. (Nullable) + */ + public void setBannersShown(java.math.BigDecimal bannersShown) { + _modifiedProperties.addPropertyName("bannersShown"); + _bannersShown = bannersShown; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- INTEGER : NotNull : Default=[0]*/ + public static final String bannersClicked_COLUMN = "BANNERS_CLICKED"; + + /** + * Get the value of bannersClicked.
+ * {INTEGER : NotNull : Default=[0]} + * + * @return The value of bannersClicked. (Nullable) + */ + public java.math.BigDecimal getBannersClicked() { + return _bannersClicked; + } + + /** + * Set the value of bannersClicked.
+ * {INTEGER : NotNull : Default=[0]} + * + * @param bannersClicked The value of bannersClicked. (Nullable) + */ + public void setBannersClicked(java.math.BigDecimal bannersClicked) { + _modifiedProperties.addPropertyName("bannersClicked"); + _bannersClicked = bannersClicked; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- TIMESTAMP : NotNull*/ + public static final String bannersHistoryDate_COLUMN = "BANNERS_HISTORY_DATE"; + + /** + * Get the value of bannersHistoryDate.
+ * {TIMESTAMP : NotNull} + * + * @return The value of bannersHistoryDate. (Nullable) + */ + public java.sql.Timestamp getBannersHistoryDate() { + return _bannersHistoryDate; + } + + /** + * Set the value of bannersHistoryDate.
+ * {TIMESTAMP : NotNull} + * + * @param bannersHistoryDate The value of bannersHistoryDate. (Nullable) + */ + public void setBannersHistoryDate(java.sql.Timestamp bannersHistoryDate) { + _modifiedProperties.addPropertyName("bannersHistoryDate"); + _bannersHistoryDate = bannersHistoryDate; + } + + + // =================================================================================== + // Classify Method + // =============== + + // =================================================================================== + // Classification Determination + // ============================ + + + // =================================================================================== + // Classification Getter + // ===================== + + + // =================================================================================== + // Foreign Table + // ============= + + // =================================================================================== + // Refferer Table + // ============== + + // =================================================================================== + // Accept + // ====== + /** + * This method implements the method that is declared at super. + * + * @param primaryKeyMap Primary key map. (NotNull and NotEmpty) + * @deprecated Please use BannersHistoryDbm.getInstance().acceptPrimaryKeyMap(entity, primaryKeyMap); + */ + public void acceptPrimaryKeyMap(java.util.Map primaryKeyMap) { + getDBMeta().acceptPrimaryKeyMap(this, primaryKeyMap); + } + + /** + * This method implements the method that is declared at super. + * + * @param primaryKeyMapString Primary-key map-string. (NotNull and NotEmpty) + * @deprecated Please use BannersHistoryDbm.getInstance().acceptPrimaryKeyMapString(entity, primaryKeyMapString); + */ + public void acceptPrimaryKeyMapString(String primaryKeyMapString) { + getDBMeta().acceptPrimaryKeyMapString(this, primaryKeyMapString); + } + + /** + * This method implements the method that is declared at super. + * + * @param columnValueMap Column-value map. (NotNull and NotEmpty) + * @deprecated Please use BannersHistoryDbm.getInstance().acceptColumnValueMap(entity, columnValueMap); + */ + public void acceptColumnValueMap(java.util.Map columnValueMap) { + getDBMeta().acceptColumnValueMap(this, columnValueMap); + } + + /** + * This method implements the method that is declared at super. + * + * @param columnValueMapString Column-value map-string. (NotNull and NotEmpty) + * @deprecated Please use BannersHistoryDbm.getInstance().acceptColumnValueMap(entity, columnValueMapString); + */ + public void acceptColumnValueMapString(String columnValueMapString) { + getDBMeta().acceptColumnValueMapString(this, columnValueMapString); + } + + // =================================================================================== + // Extract + // ======= + /** + * This method implements the method that is declared at super. + * + * @return Primary-key map-string. (NotNull) + * @deprecated Please use BannersHistoryDbm.getInstance().extractPrimaryKeyMapString(entity); + */ + public String extractPrimaryKeyMapString() { + return getDBMeta().extractPrimaryKeyMapString(this); + } + + /** + * Extract primary-key map-string. + * + * @param startBrace Start-brace. (NotNull) + * @param endBrace End-brace. (NotNull) + * @param delimiter Delimiter. (NotNull) + * @param equal Equal. (NotNull) + * @return Primary-key map-string. (NotNull) + * @deprecated Please use BannersHistoryDbm.getInstance().extractPrimaryKeyMapString(entity, startBrace, endBrace, delimiter, equal); + */ + public String extractPrimaryKeyMapString(String startBrace, String endBrace, String delimiter, String equal) { + return getDBMeta().extractPrimaryKeyMapString(this, startBrace, endBrace, delimiter, equal); + } + + /** + * This method implements the method that is declared at super. + * + * @return Column-value map-string. (NotNull) + * @deprecated Please use BannersHistoryDbm.getInstance().extractColumnValueMapString(entity); + */ + public String extractColumnValueMapString() { + return getDBMeta().extractColumnValueMapString(this); + } + + /** + * Extract column-value map-string. + * + * @param startBrace Start-brace. (NotNull) + * @param endBrace End-brace. (NotNull) + * @param delimiter Delimiter. (NotNull) + * @param equal Equal. (NotNull) + * @return Column-value map-string. (NotNull) + * @deprecated Please use BannersHistoryDbm.getInstance().extractColumnValueMapString(entity, startBrace, endBrace, delimiter, equal); + */ + public String extractColumnValueMapString(String startBrace, String endBrace, String delimiter, String equal) { + return getDBMeta().extractColumnValueMapString(this, startBrace, endBrace, delimiter, equal); + } + + + // =================================================================================== + // Determination + // ============= + /** + * This method implements the method that is declared at super. + * + * @return Determination. + */ + public boolean hasPrimaryKeyValue() { + + if (_bannersHistoryId == null) { + return false; + } + + return true; + } + + // =================================================================================== + // Modified Properties + // =================== + /** + * Get modified property names. (S2Dao uses this for updateModifiedProperties()) + * + * @return Modified property names. (NotNull) + */ + public java.util.Set getModifiedPropertyNames() { + return _modifiedProperties.getPropertyNames(); + } + + /** + * New entity modified properties. You can override this at the sub-class if you need it. + * + * @return Entity modified properties. (NotNull) + */ + protected EntityModifiedProperties newEntityModifiedProperties() { + return new EntityModifiedProperties(); + } + + /** + * Clear modified property names. + */ + public void clearModifiedPropertyNames() { + _modifiedProperties.clear(); + } + + // =================================================================================== + // Basic Override + // ============== + + /** + * This method overrides the method that is declared at super. + * If the primary-key of the other is same as this one, returns true. + * + * @param other Other entity. + * @return Comparing result. + */ + public boolean equals(Object other) { + if (other == null) { + return false; + } + if (!(other instanceof BsBannersHistory)) { + return false; + } + final BsBannersHistory otherEntity = (BsBannersHistory)other; + + if (getBannersHistoryId() == null || !getBannersHistoryId().equals(otherEntity.getBannersHistoryId())) { + return false; + } + + return true; + } + + /** + * This method overrides the method that is declared at super. + * Calculates hash-code from primary-key. + * + * @return Hash-code from primary-keys. + */ + public int hashCode() { + int result = 0; + + if (this.getBannersHistoryId() != null) { + result = result + getBannersHistoryId().hashCode(); + } + + return result; + } + + /** + * This method overrides the method that is declared at super. + * + * @return Column-value map-string. (NotNull) + */ + public String toString() { + final String delimiter = ","; + final StringBuffer sb = new StringBuffer(); + + sb.append(delimiter).append(getBannersHistoryId()); + sb.append(delimiter).append(getBannersId()); + sb.append(delimiter).append(getBannersShown()); + sb.append(delimiter).append(getBannersClicked()); + sb.append(delimiter).append(getBannersHistoryDate()); + + sb.delete(0, delimiter.length()); + sb.insert(0, "{").append("}"); + return sb.toString(); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/BsCategories.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/BsCategories.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/BsCategories.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,500 @@ +package jp.sf.pal.pompei.bsentity; + + +import jp.sf.pal.pompei.allcommon.Entity; +import jp.sf.pal.pompei.allcommon.dbmeta.DBMeta; +import jp.sf.pal.pompei.allcommon.dbmeta.DBMetaInstanceHandler; + +/** + * The entity of CATEGORIES. + * + *
+ * [primary-key]
+ *     CATEGORIES_ID
+ * 
+ * [column-property]
+ *     CATEGORIES_ID, CATEGORIES_IMAGE, PARENT_ID, SORT_ORDER, DATE_ADDED, LAST_MODIFIED
+ * 
+ * [foreign-property]
+ *     
+ * 
+ * [refferer-property]
+ *     
+ * 
+ * [sequence]
+ *     
+ * 
+ * [identity]
+ *     
+ * 
+ * [update-date]
+ *     
+ * 
+ * [version-no]
+ *     
+ * 
+ * 
+ * + * @author DBFlute(AutoGenerator) + */ +public abstract class BsCategories implements Entity, java.io.Serializable { + + /** Serial version UID. (Default) */ + private static final long serialVersionUID = 1L; + + /** TABLE-Annotation for S2Dao */ + public static final String TABLE = "CATEGORIES"; + + + // =================================================================================== + // Attribute + // ========= + /** Entity modified properties. (for S2Dao) */ + protected EntityModifiedProperties _modifiedProperties = newEntityModifiedProperties(); + + + /** The value of categoriesId. ColumnDefinition -- PK : INTEGER : NotNull*/ + protected java.math.BigDecimal _categoriesId; + + /** The value of categoriesImage. ColumnDefinition -- VARCHAR(64)*/ + protected String _categoriesImage; + + /** The value of parentId. ColumnDefinition -- INTEGER : NotNull : Default=[0]*/ + protected java.math.BigDecimal _parentId; + + /** The value of sortOrder. ColumnDefinition -- INTEGER*/ + protected java.math.BigDecimal _sortOrder; + + /** The value of dateAdded. ColumnDefinition -- TIMESTAMP*/ + protected java.sql.Timestamp _dateAdded; + + /** The value of lastModified. ColumnDefinition -- TIMESTAMP*/ + protected java.sql.Timestamp _lastModified; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + public BsCategories() { + } + + + // =================================================================================== + // DBMeta + // ====== + /** + * This method implements the method that is declared at super. + * + * @return DBMeta. (NotNull) + */ + public DBMeta getDBMeta() { + return DBMetaInstanceHandler.getInstanceByTableDbName(getTableDbName()); + } + + // =================================================================================== + // Table Name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + public String getTableDbName() { + return "CATEGORIES"; + } + + /** + * This method implements the method that is declared at super. + * + * @return Table cap-prop-name. (NotNull) + */ + public String getTableCapPropName() { + return "Categories"; + } + + /** + * This method implements the method that is declared at super. + * + * @return Table uncap-prop-name. (NotNull) + */ + public String getTableUncapPropName() { + return "categories"; + } + + // =================================================================================== + // Accessor + // ======== + + /** Column-Annotation for S2Dao. ColumnDefinition -- PK : INTEGER : NotNull*/ + public static final String categoriesId_COLUMN = "CATEGORIES_ID"; + + /** + * Get the value of categoriesId.
+ * {PK : INTEGER : NotNull} + * + * @return The value of categoriesId. (Nullable) + */ + public java.math.BigDecimal getCategoriesId() { + return _categoriesId; + } + + /** + * Set the value of categoriesId.
+ * {PK : INTEGER : NotNull} + * + * @param categoriesId The value of categoriesId. (Nullable) + */ + public void setCategoriesId(java.math.BigDecimal categoriesId) { + _modifiedProperties.addPropertyName("categoriesId"); + _categoriesId = categoriesId; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- VARCHAR(64)*/ + public static final String categoriesImage_COLUMN = "CATEGORIES_IMAGE"; + + /** + * Get the value of categoriesImage.
+ * {VARCHAR(64)} + * + * @return The value of categoriesImage. (Nullable) + */ + public String getCategoriesImage() { + return _categoriesImage; + } + + /** + * Set the value of categoriesImage.
+ * {VARCHAR(64)} + * + * @param categoriesImage The value of categoriesImage. (Nullable) + */ + public void setCategoriesImage(String categoriesImage) { + _modifiedProperties.addPropertyName("categoriesImage"); + _categoriesImage = categoriesImage; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- INTEGER : NotNull : Default=[0]*/ + public static final String parentId_COLUMN = "PARENT_ID"; + + /** + * Get the value of parentId.
+ * {INTEGER : NotNull : Default=[0]} + * + * @return The value of parentId. (Nullable) + */ + public java.math.BigDecimal getParentId() { + return _parentId; + } + + /** + * Set the value of parentId.
+ * {INTEGER : NotNull : Default=[0]} + * + * @param parentId The value of parentId. (Nullable) + */ + public void setParentId(java.math.BigDecimal parentId) { + _modifiedProperties.addPropertyName("parentId"); + _parentId = parentId; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- INTEGER*/ + public static final String sortOrder_COLUMN = "SORT_ORDER"; + + /** + * Get the value of sortOrder.
+ * {INTEGER} + * + * @return The value of sortOrder. (Nullable) + */ + public java.math.BigDecimal getSortOrder() { + return _sortOrder; + } + + /** + * Set the value of sortOrder.
+ * {INTEGER} + * + * @param sortOrder The value of sortOrder. (Nullable) + */ + public void setSortOrder(java.math.BigDecimal sortOrder) { + _modifiedProperties.addPropertyName("sortOrder"); + _sortOrder = sortOrder; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- TIMESTAMP*/ + public static final String dateAdded_COLUMN = "DATE_ADDED"; + + /** + * Get the value of dateAdded.
+ * {TIMESTAMP} + * + * @return The value of dateAdded. (Nullable) + */ + public java.sql.Timestamp getDateAdded() { + return _dateAdded; + } + + /** + * Set the value of dateAdded.
+ * {TIMESTAMP} + * + * @param dateAdded The value of dateAdded. (Nullable) + */ + public void setDateAdded(java.sql.Timestamp dateAdded) { + _modifiedProperties.addPropertyName("dateAdded"); + _dateAdded = dateAdded; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- TIMESTAMP*/ + public static final String lastModified_COLUMN = "LAST_MODIFIED"; + + /** + * Get the value of lastModified.
+ * {TIMESTAMP} + * + * @return The value of lastModified. (Nullable) + */ + public java.sql.Timestamp getLastModified() { + return _lastModified; + } + + /** + * Set the value of lastModified.
+ * {TIMESTAMP} + * + * @param lastModified The value of lastModified. (Nullable) + */ + public void setLastModified(java.sql.Timestamp lastModified) { + _modifiedProperties.addPropertyName("lastModified"); + _lastModified = lastModified; + } + + + // =================================================================================== + // Classify Method + // =============== + + // =================================================================================== + // Classification Determination + // ============================ + + + // =================================================================================== + // Classification Getter + // ===================== + + + // =================================================================================== + // Foreign Table + // ============= + + // =================================================================================== + // Refferer Table + // ============== + + // =================================================================================== + // Accept + // ====== + /** + * This method implements the method that is declared at super. + * + * @param primaryKeyMap Primary key map. (NotNull and NotEmpty) + * @deprecated Please use CategoriesDbm.getInstance().acceptPrimaryKeyMap(entity, primaryKeyMap); + */ + public void acceptPrimaryKeyMap(java.util.Map primaryKeyMap) { + getDBMeta().acceptPrimaryKeyMap(this, primaryKeyMap); + } + + /** + * This method implements the method that is declared at super. + * + * @param primaryKeyMapString Primary-key map-string. (NotNull and NotEmpty) + * @deprecated Please use CategoriesDbm.getInstance().acceptPrimaryKeyMapString(entity, primaryKeyMapString); + */ + public void acceptPrimaryKeyMapString(String primaryKeyMapString) { + getDBMeta().acceptPrimaryKeyMapString(this, primaryKeyMapString); + } + + /** + * This method implements the method that is declared at super. + * + * @param columnValueMap Column-value map. (NotNull and NotEmpty) + * @deprecated Please use CategoriesDbm.getInstance().acceptColumnValueMap(entity, columnValueMap); + */ + public void acceptColumnValueMap(java.util.Map columnValueMap) { + getDBMeta().acceptColumnValueMap(this, columnValueMap); + } + + /** + * This method implements the method that is declared at super. + * + * @param columnValueMapString Column-value map-string. (NotNull and NotEmpty) + * @deprecated Please use CategoriesDbm.getInstance().acceptColumnValueMap(entity, columnValueMapString); + */ + public void acceptColumnValueMapString(String columnValueMapString) { + getDBMeta().acceptColumnValueMapString(this, columnValueMapString); + } + + // =================================================================================== + // Extract + // ======= + /** + * This method implements the method that is declared at super. + * + * @return Primary-key map-string. (NotNull) + * @deprecated Please use CategoriesDbm.getInstance().extractPrimaryKeyMapString(entity); + */ + public String extractPrimaryKeyMapString() { + return getDBMeta().extractPrimaryKeyMapString(this); + } + + /** + * Extract primary-key map-string. + * + * @param startBrace Start-brace. (NotNull) + * @param endBrace End-brace. (NotNull) + * @param delimiter Delimiter. (NotNull) + * @param equal Equal. (NotNull) + * @return Primary-key map-string. (NotNull) + * @deprecated Please use CategoriesDbm.getInstance().extractPrimaryKeyMapString(entity, startBrace, endBrace, delimiter, equal); + */ + public String extractPrimaryKeyMapString(String startBrace, String endBrace, String delimiter, String equal) { + return getDBMeta().extractPrimaryKeyMapString(this, startBrace, endBrace, delimiter, equal); + } + + /** + * This method implements the method that is declared at super. + * + * @return Column-value map-string. (NotNull) + * @deprecated Please use CategoriesDbm.getInstance().extractColumnValueMapString(entity); + */ + public String extractColumnValueMapString() { + return getDBMeta().extractColumnValueMapString(this); + } + + /** + * Extract column-value map-string. + * + * @param startBrace Start-brace. (NotNull) + * @param endBrace End-brace. (NotNull) + * @param delimiter Delimiter. (NotNull) + * @param equal Equal. (NotNull) + * @return Column-value map-string. (NotNull) + * @deprecated Please use CategoriesDbm.getInstance().extractColumnValueMapString(entity, startBrace, endBrace, delimiter, equal); + */ + public String extractColumnValueMapString(String startBrace, String endBrace, String delimiter, String equal) { + return getDBMeta().extractColumnValueMapString(this, startBrace, endBrace, delimiter, equal); + } + + + // =================================================================================== + // Determination + // ============= + /** + * This method implements the method that is declared at super. + * + * @return Determination. + */ + public boolean hasPrimaryKeyValue() { + + if (_categoriesId == null) { + return false; + } + + return true; + } + + // =================================================================================== + // Modified Properties + // =================== + /** + * Get modified property names. (S2Dao uses this for updateModifiedProperties()) + * + * @return Modified property names. (NotNull) + */ + public java.util.Set getModifiedPropertyNames() { + return _modifiedProperties.getPropertyNames(); + } + + /** + * New entity modified properties. You can override this at the sub-class if you need it. + * + * @return Entity modified properties. (NotNull) + */ + protected EntityModifiedProperties newEntityModifiedProperties() { + return new EntityModifiedProperties(); + } + + /** + * Clear modified property names. + */ + public void clearModifiedPropertyNames() { + _modifiedProperties.clear(); + } + + // =================================================================================== + // Basic Override + // ============== + + /** + * This method overrides the method that is declared at super. + * If the primary-key of the other is same as this one, returns true. + * + * @param other Other entity. + * @return Comparing result. + */ + public boolean equals(Object other) { + if (other == null) { + return false; + } + if (!(other instanceof BsCategories)) { + return false; + } + final BsCategories otherEntity = (BsCategories)other; + + if (getCategoriesId() == null || !getCategoriesId().equals(otherEntity.getCategoriesId())) { + return false; + } + + return true; + } + + /** + * This method overrides the method that is declared at super. + * Calculates hash-code from primary-key. + * + * @return Hash-code from primary-keys. + */ + public int hashCode() { + int result = 0; + + if (this.getCategoriesId() != null) { + result = result + getCategoriesId().hashCode(); + } + + return result; + } + + /** + * This method overrides the method that is declared at super. + * + * @return Column-value map-string. (NotNull) + */ + public String toString() { + final String delimiter = ","; + final StringBuffer sb = new StringBuffer(); + + sb.append(delimiter).append(getCategoriesId()); + sb.append(delimiter).append(getCategoriesImage()); + sb.append(delimiter).append(getParentId()); + sb.append(delimiter).append(getSortOrder()); + sb.append(delimiter).append(getDateAdded()); + sb.append(delimiter).append(getLastModified()); + + sb.delete(0, delimiter.length()); + sb.insert(0, "{").append("}"); + return sb.toString(); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/BsCategoriesDescription.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/BsCategoriesDescription.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/BsCategoriesDescription.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,425 @@ +package jp.sf.pal.pompei.bsentity; + + +import jp.sf.pal.pompei.allcommon.Entity; +import jp.sf.pal.pompei.allcommon.dbmeta.DBMeta; +import jp.sf.pal.pompei.allcommon.dbmeta.DBMetaInstanceHandler; + +/** + * The entity of CATEGORIES_DESCRIPTION. + * + *
+ * [primary-key]
+ *     CATEGORIES_ID, LANGUAGE_ID
+ * 
+ * [column-property]
+ *     CATEGORIES_ID, LANGUAGE_ID, CATEGORIES_NAME
+ * 
+ * [foreign-property]
+ *     
+ * 
+ * [refferer-property]
+ *     
+ * 
+ * [sequence]
+ *     
+ * 
+ * [identity]
+ *     
+ * 
+ * [update-date]
+ *     
+ * 
+ * [version-no]
+ *     
+ * 
+ * 
+ * + * @author DBFlute(AutoGenerator) + */ +public abstract class BsCategoriesDescription implements Entity, java.io.Serializable { + + /** Serial version UID. (Default) */ + private static final long serialVersionUID = 1L; + + /** TABLE-Annotation for S2Dao */ + public static final String TABLE = "CATEGORIES_DESCRIPTION"; + + + // =================================================================================== + // Attribute + // ========= + /** Entity modified properties. (for S2Dao) */ + protected EntityModifiedProperties _modifiedProperties = newEntityModifiedProperties(); + + + /** The value of categoriesId. ColumnDefinition -- PK : INTEGER : NotNull : Default=[0]*/ + protected java.math.BigDecimal _categoriesId; + + /** The value of languageId. ColumnDefinition -- PK : INTEGER : NotNull : Default=[1]*/ + protected java.math.BigDecimal _languageId; + + /** The value of categoriesName. ColumnDefinition -- VARCHAR(32) : NotNull*/ + protected String _categoriesName; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + public BsCategoriesDescription() { + } + + + // =================================================================================== + // DBMeta + // ====== + /** + * This method implements the method that is declared at super. + * + * @return DBMeta. (NotNull) + */ + public DBMeta getDBMeta() { + return DBMetaInstanceHandler.getInstanceByTableDbName(getTableDbName()); + } + + // =================================================================================== + // Table Name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + public String getTableDbName() { + return "CATEGORIES_DESCRIPTION"; + } + + /** + * This method implements the method that is declared at super. + * + * @return Table cap-prop-name. (NotNull) + */ + public String getTableCapPropName() { + return "CategoriesDescription"; + } + + /** + * This method implements the method that is declared at super. + * + * @return Table uncap-prop-name. (NotNull) + */ + public String getTableUncapPropName() { + return "categoriesDescription"; + } + + // =================================================================================== + // Accessor + // ======== + + /** Column-Annotation for S2Dao. ColumnDefinition -- PK : INTEGER : NotNull : Default=[0]*/ + public static final String categoriesId_COLUMN = "CATEGORIES_ID"; + + /** + * Get the value of categoriesId.
+ * {PK : INTEGER : NotNull : Default=[0]} + * + * @return The value of categoriesId. (Nullable) + */ + public java.math.BigDecimal getCategoriesId() { + return _categoriesId; + } + + /** + * Set the value of categoriesId.
+ * {PK : INTEGER : NotNull : Default=[0]} + * + * @param categoriesId The value of categoriesId. (Nullable) + */ + public void setCategoriesId(java.math.BigDecimal categoriesId) { + _modifiedProperties.addPropertyName("categoriesId"); + _categoriesId = categoriesId; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- PK : INTEGER : NotNull : Default=[1]*/ + public static final String languageId_COLUMN = "LANGUAGE_ID"; + + /** + * Get the value of languageId.
+ * {PK : INTEGER : NotNull : Default=[1]} + * + * @return The value of languageId. (Nullable) + */ + public java.math.BigDecimal getLanguageId() { + return _languageId; + } + + /** + * Set the value of languageId.
+ * {PK : INTEGER : NotNull : Default=[1]} + * + * @param languageId The value of languageId. (Nullable) + */ + public void setLanguageId(java.math.BigDecimal languageId) { + _modifiedProperties.addPropertyName("languageId"); + _languageId = languageId; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- VARCHAR(32) : NotNull*/ + public static final String categoriesName_COLUMN = "CATEGORIES_NAME"; + + /** + * Get the value of categoriesName.
+ * {VARCHAR(32) : NotNull} + * + * @return The value of categoriesName. (Nullable) + */ + public String getCategoriesName() { + return _categoriesName; + } + + /** + * Set the value of categoriesName.
+ * {VARCHAR(32) : NotNull} + * + * @param categoriesName The value of categoriesName. (Nullable) + */ + public void setCategoriesName(String categoriesName) { + _modifiedProperties.addPropertyName("categoriesName"); + _categoriesName = categoriesName; + } + + + // =================================================================================== + // Classify Method + // =============== + + // =================================================================================== + // Classification Determination + // ============================ + + + // =================================================================================== + // Classification Getter + // ===================== + + + // =================================================================================== + // Foreign Table + // ============= + + // =================================================================================== + // Refferer Table + // ============== + + // =================================================================================== + // Accept + // ====== + /** + * This method implements the method that is declared at super. + * + * @param primaryKeyMap Primary key map. (NotNull and NotEmpty) + * @deprecated Please use CategoriesDescriptionDbm.getInstance().acceptPrimaryKeyMap(entity, primaryKeyMap); + */ + public void acceptPrimaryKeyMap(java.util.Map primaryKeyMap) { + getDBMeta().acceptPrimaryKeyMap(this, primaryKeyMap); + } + + /** + * This method implements the method that is declared at super. + * + * @param primaryKeyMapString Primary-key map-string. (NotNull and NotEmpty) + * @deprecated Please use CategoriesDescriptionDbm.getInstance().acceptPrimaryKeyMapString(entity, primaryKeyMapString); + */ + public void acceptPrimaryKeyMapString(String primaryKeyMapString) { + getDBMeta().acceptPrimaryKeyMapString(this, primaryKeyMapString); + } + + /** + * This method implements the method that is declared at super. + * + * @param columnValueMap Column-value map. (NotNull and NotEmpty) + * @deprecated Please use CategoriesDescriptionDbm.getInstance().acceptColumnValueMap(entity, columnValueMap); + */ + public void acceptColumnValueMap(java.util.Map columnValueMap) { + getDBMeta().acceptColumnValueMap(this, columnValueMap); + } + + /** + * This method implements the method that is declared at super. + * + * @param columnValueMapString Column-value map-string. (NotNull and NotEmpty) + * @deprecated Please use CategoriesDescriptionDbm.getInstance().acceptColumnValueMap(entity, columnValueMapString); + */ + public void acceptColumnValueMapString(String columnValueMapString) { + getDBMeta().acceptColumnValueMapString(this, columnValueMapString); + } + + // =================================================================================== + // Extract + // ======= + /** + * This method implements the method that is declared at super. + * + * @return Primary-key map-string. (NotNull) + * @deprecated Please use CategoriesDescriptionDbm.getInstance().extractPrimaryKeyMapString(entity); + */ + public String extractPrimaryKeyMapString() { + return getDBMeta().extractPrimaryKeyMapString(this); + } + + /** + * Extract primary-key map-string. + * + * @param startBrace Start-brace. (NotNull) + * @param endBrace End-brace. (NotNull) + * @param delimiter Delimiter. (NotNull) + * @param equal Equal. (NotNull) + * @return Primary-key map-string. (NotNull) + * @deprecated Please use CategoriesDescriptionDbm.getInstance().extractPrimaryKeyMapString(entity, startBrace, endBrace, delimiter, equal); + */ + public String extractPrimaryKeyMapString(String startBrace, String endBrace, String delimiter, String equal) { + return getDBMeta().extractPrimaryKeyMapString(this, startBrace, endBrace, delimiter, equal); + } + + /** + * This method implements the method that is declared at super. + * + * @return Column-value map-string. (NotNull) + * @deprecated Please use CategoriesDescriptionDbm.getInstance().extractColumnValueMapString(entity); + */ + public String extractColumnValueMapString() { + return getDBMeta().extractColumnValueMapString(this); + } + + /** + * Extract column-value map-string. + * + * @param startBrace Start-brace. (NotNull) + * @param endBrace End-brace. (NotNull) + * @param delimiter Delimiter. (NotNull) + * @param equal Equal. (NotNull) + * @return Column-value map-string. (NotNull) + * @deprecated Please use CategoriesDescriptionDbm.getInstance().extractColumnValueMapString(entity, startBrace, endBrace, delimiter, equal); + */ + public String extractColumnValueMapString(String startBrace, String endBrace, String delimiter, String equal) { + return getDBMeta().extractColumnValueMapString(this, startBrace, endBrace, delimiter, equal); + } + + + // =================================================================================== + // Determination + // ============= + /** + * This method implements the method that is declared at super. + * + * @return Determination. + */ + public boolean hasPrimaryKeyValue() { + + if (_categoriesId == null) { + return false; + } + if (_languageId == null) { + return false; + } + + return true; + } + + // =================================================================================== + // Modified Properties + // =================== + /** + * Get modified property names. (S2Dao uses this for updateModifiedProperties()) + * + * @return Modified property names. (NotNull) + */ + public java.util.Set getModifiedPropertyNames() { + return _modifiedProperties.getPropertyNames(); + } + + /** + * New entity modified properties. You can override this at the sub-class if you need it. + * + * @return Entity modified properties. (NotNull) + */ + protected EntityModifiedProperties newEntityModifiedProperties() { + return new EntityModifiedProperties(); + } + + /** + * Clear modified property names. + */ + public void clearModifiedPropertyNames() { + _modifiedProperties.clear(); + } + + // =================================================================================== + // Basic Override + // ============== + + /** + * This method overrides the method that is declared at super. + * If the primary-key of the other is same as this one, returns true. + * + * @param other Other entity. + * @return Comparing result. + */ + public boolean equals(Object other) { + if (other == null) { + return false; + } + if (!(other instanceof BsCategoriesDescription)) { + return false; + } + final BsCategoriesDescription otherEntity = (BsCategoriesDescription)other; + + if (getCategoriesId() == null || !getCategoriesId().equals(otherEntity.getCategoriesId())) { + return false; + } + if (getLanguageId() == null || !getLanguageId().equals(otherEntity.getLanguageId())) { + return false; + } + + return true; + } + + /** + * This method overrides the method that is declared at super. + * Calculates hash-code from primary-key. + * + * @return Hash-code from primary-keys. + */ + public int hashCode() { + int result = 0; + + if (this.getCategoriesId() != null) { + result = result + getCategoriesId().hashCode(); + } + if (this.getLanguageId() != null) { + result = result + getLanguageId().hashCode(); + } + + return result; + } + + /** + * This method overrides the method that is declared at super. + * + * @return Column-value map-string. (NotNull) + */ + public String toString() { + final String delimiter = ","; + final StringBuffer sb = new StringBuffer(); + + sb.append(delimiter).append(getCategoriesId()); + sb.append(delimiter).append(getLanguageId()); + sb.append(delimiter).append(getCategoriesName()); + + sb.delete(0, delimiter.length()); + sb.insert(0, "{").append("}"); + return sb.toString(); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/BsConfiguration.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/BsConfiguration.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/BsConfiguration.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,640 @@ +package jp.sf.pal.pompei.bsentity; + + +import jp.sf.pal.pompei.allcommon.Entity; +import jp.sf.pal.pompei.allcommon.dbmeta.DBMeta; +import jp.sf.pal.pompei.allcommon.dbmeta.DBMetaInstanceHandler; + +/** + * The entity of CONFIGURATION. + * + *
+ * [primary-key]
+ *     CONFIGURATION_ID
+ * 
+ * [column-property]
+ *     CONFIGURATION_ID, CONFIGURATION_TITLE, CONFIGURATION_KEY, CONFIGURATION_VALUE, CONFIGURATION_DESCRIPTION, CONFIGURATION_GROUP_ID, SORT_ORDER, LAST_MODIFIED, DATE_ADDED, USE_FUNCTION, SET_FUNCTION
+ * 
+ * [foreign-property]
+ *     
+ * 
+ * [refferer-property]
+ *     
+ * 
+ * [sequence]
+ *     
+ * 
+ * [identity]
+ *     
+ * 
+ * [update-date]
+ *     
+ * 
+ * [version-no]
+ *     
+ * 
+ * 
+ * + * @author DBFlute(AutoGenerator) + */ +public abstract class BsConfiguration implements Entity, java.io.Serializable { + + /** Serial version UID. (Default) */ + private static final long serialVersionUID = 1L; + + /** TABLE-Annotation for S2Dao */ + public static final String TABLE = "CONFIGURATION"; + + + // =================================================================================== + // Attribute + // ========= + /** Entity modified properties. (for S2Dao) */ + protected EntityModifiedProperties _modifiedProperties = newEntityModifiedProperties(); + + + /** The value of configurationId. ColumnDefinition -- PK : INTEGER : NotNull*/ + protected java.math.BigDecimal _configurationId; + + /** The value of configurationTitle. ColumnDefinition -- VARCHAR(64) : NotNull*/ + protected String _configurationTitle; + + /** The value of configurationKey. ColumnDefinition -- VARCHAR(64) : NotNull*/ + protected String _configurationKey; + + /** The value of configurationValue. ColumnDefinition -- VARCHAR(255) : NotNull*/ + protected String _configurationValue; + + /** The value of configurationDescription. ColumnDefinition -- VARCHAR(255) : NotNull*/ + protected String _configurationDescription; + + /** The value of configurationGroupId. ColumnDefinition -- INTEGER : NotNull*/ + protected java.math.BigDecimal _configurationGroupId; + + /** The value of sortOrder. ColumnDefinition -- INTEGER*/ + protected java.math.BigDecimal _sortOrder; + + /** The value of lastModified. ColumnDefinition -- TIMESTAMP*/ + protected java.sql.Timestamp _lastModified; + + /** The value of dateAdded. ColumnDefinition -- TIMESTAMP : NotNull*/ + protected java.sql.Timestamp _dateAdded; + + /** The value of useFunction. ColumnDefinition -- VARCHAR(255)*/ + protected String _useFunction; + + /** The value of setFunction. ColumnDefinition -- VARCHAR(255)*/ + protected String _setFunction; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + public BsConfiguration() { + } + + + // =================================================================================== + // DBMeta + // ====== + /** + * This method implements the method that is declared at super. + * + * @return DBMeta. (NotNull) + */ + public DBMeta getDBMeta() { + return DBMetaInstanceHandler.getInstanceByTableDbName(getTableDbName()); + } + + // =================================================================================== + // Table Name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + public String getTableDbName() { + return "CONFIGURATION"; + } + + /** + * This method implements the method that is declared at super. + * + * @return Table cap-prop-name. (NotNull) + */ + public String getTableCapPropName() { + return "Configuration"; + } + + /** + * This method implements the method that is declared at super. + * + * @return Table uncap-prop-name. (NotNull) + */ + public String getTableUncapPropName() { + return "configuration"; + } + + // =================================================================================== + // Accessor + // ======== + + /** Column-Annotation for S2Dao. ColumnDefinition -- PK : INTEGER : NotNull*/ + public static final String configurationId_COLUMN = "CONFIGURATION_ID"; + + /** + * Get the value of configurationId.
+ * {PK : INTEGER : NotNull} + * + * @return The value of configurationId. (Nullable) + */ + public java.math.BigDecimal getConfigurationId() { + return _configurationId; + } + + /** + * Set the value of configurationId.
+ * {PK : INTEGER : NotNull} + * + * @param configurationId The value of configurationId. (Nullable) + */ + public void setConfigurationId(java.math.BigDecimal configurationId) { + _modifiedProperties.addPropertyName("configurationId"); + _configurationId = configurationId; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- VARCHAR(64) : NotNull*/ + public static final String configurationTitle_COLUMN = "CONFIGURATION_TITLE"; + + /** + * Get the value of configurationTitle.
+ * {VARCHAR(64) : NotNull} + * + * @return The value of configurationTitle. (Nullable) + */ + public String getConfigurationTitle() { + return _configurationTitle; + } + + /** + * Set the value of configurationTitle.
+ * {VARCHAR(64) : NotNull} + * + * @param configurationTitle The value of configurationTitle. (Nullable) + */ + public void setConfigurationTitle(String configurationTitle) { + _modifiedProperties.addPropertyName("configurationTitle"); + _configurationTitle = configurationTitle; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- VARCHAR(64) : NotNull*/ + public static final String configurationKey_COLUMN = "CONFIGURATION_KEY"; + + /** + * Get the value of configurationKey.
+ * {VARCHAR(64) : NotNull} + * + * @return The value of configurationKey. (Nullable) + */ + public String getConfigurationKey() { + return _configurationKey; + } + + /** + * Set the value of configurationKey.
+ * {VARCHAR(64) : NotNull} + * + * @param configurationKey The value of configurationKey. (Nullable) + */ + public void setConfigurationKey(String configurationKey) { + _modifiedProperties.addPropertyName("configurationKey"); + _configurationKey = configurationKey; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- VARCHAR(255) : NotNull*/ + public static final String configurationValue_COLUMN = "CONFIGURATION_VALUE"; + + /** + * Get the value of configurationValue.
+ * {VARCHAR(255) : NotNull} + * + * @return The value of configurationValue. (Nullable) + */ + public String getConfigurationValue() { + return _configurationValue; + } + + /** + * Set the value of configurationValue.
+ * {VARCHAR(255) : NotNull} + * + * @param configurationValue The value of configurationValue. (Nullable) + */ + public void setConfigurationValue(String configurationValue) { + _modifiedProperties.addPropertyName("configurationValue"); + _configurationValue = configurationValue; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- VARCHAR(255) : NotNull*/ + public static final String configurationDescription_COLUMN = "CONFIGURATION_DESCRIPTION"; + + /** + * Get the value of configurationDescription.
+ * {VARCHAR(255) : NotNull} + * + * @return The value of configurationDescription. (Nullable) + */ + public String getConfigurationDescription() { + return _configurationDescription; + } + + /** + * Set the value of configurationDescription.
+ * {VARCHAR(255) : NotNull} + * + * @param configurationDescription The value of configurationDescription. (Nullable) + */ + public void setConfigurationDescription(String configurationDescription) { + _modifiedProperties.addPropertyName("configurationDescription"); + _configurationDescription = configurationDescription; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- INTEGER : NotNull*/ + public static final String configurationGroupId_COLUMN = "CONFIGURATION_GROUP_ID"; + + /** + * Get the value of configurationGroupId.
+ * {INTEGER : NotNull} + * + * @return The value of configurationGroupId. (Nullable) + */ + public java.math.BigDecimal getConfigurationGroupId() { + return _configurationGroupId; + } + + /** + * Set the value of configurationGroupId.
+ * {INTEGER : NotNull} + * + * @param configurationGroupId The value of configurationGroupId. (Nullable) + */ + public void setConfigurationGroupId(java.math.BigDecimal configurationGroupId) { + _modifiedProperties.addPropertyName("configurationGroupId"); + _configurationGroupId = configurationGroupId; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- INTEGER*/ + public static final String sortOrder_COLUMN = "SORT_ORDER"; + + /** + * Get the value of sortOrder.
+ * {INTEGER} + * + * @return The value of sortOrder. (Nullable) + */ + public java.math.BigDecimal getSortOrder() { + return _sortOrder; + } + + /** + * Set the value of sortOrder.
+ * {INTEGER} + * + * @param sortOrder The value of sortOrder. (Nullable) + */ + public void setSortOrder(java.math.BigDecimal sortOrder) { + _modifiedProperties.addPropertyName("sortOrder"); + _sortOrder = sortOrder; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- TIMESTAMP*/ + public static final String lastModified_COLUMN = "LAST_MODIFIED"; + + /** + * Get the value of lastModified.
+ * {TIMESTAMP} + * + * @return The value of lastModified. (Nullable) + */ + public java.sql.Timestamp getLastModified() { + return _lastModified; + } + + /** + * Set the value of lastModified.
+ * {TIMESTAMP} + * + * @param lastModified The value of lastModified. (Nullable) + */ + public void setLastModified(java.sql.Timestamp lastModified) { + _modifiedProperties.addPropertyName("lastModified"); + _lastModified = lastModified; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- TIMESTAMP : NotNull*/ + public static final String dateAdded_COLUMN = "DATE_ADDED"; + + /** + * Get the value of dateAdded.
+ * {TIMESTAMP : NotNull} + * + * @return The value of dateAdded. (Nullable) + */ + public java.sql.Timestamp getDateAdded() { + return _dateAdded; + } + + /** + * Set the value of dateAdded.
+ * {TIMESTAMP : NotNull} + * + * @param dateAdded The value of dateAdded. (Nullable) + */ + public void setDateAdded(java.sql.Timestamp dateAdded) { + _modifiedProperties.addPropertyName("dateAdded"); + _dateAdded = dateAdded; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- VARCHAR(255)*/ + public static final String useFunction_COLUMN = "USE_FUNCTION"; + + /** + * Get the value of useFunction.
+ * {VARCHAR(255)} + * + * @return The value of useFunction. (Nullable) + */ + public String getUseFunction() { + return _useFunction; + } + + /** + * Set the value of useFunction.
+ * {VARCHAR(255)} + * + * @param useFunction The value of useFunction. (Nullable) + */ + public void setUseFunction(String useFunction) { + _modifiedProperties.addPropertyName("useFunction"); + _useFunction = useFunction; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- VARCHAR(255)*/ + public static final String setFunction_COLUMN = "SET_FUNCTION"; + + /** + * Get the value of setFunction.
+ * {VARCHAR(255)} + * + * @return The value of setFunction. (Nullable) + */ + public String getSetFunction() { + return _setFunction; + } + + /** + * Set the value of setFunction.
+ * {VARCHAR(255)} + * + * @param setFunction The value of setFunction. (Nullable) + */ + public void setSetFunction(String setFunction) { + _modifiedProperties.addPropertyName("setFunction"); + _setFunction = setFunction; + } + + + // =================================================================================== + // Classify Method + // =============== + + // =================================================================================== + // Classification Determination + // ============================ + + + // =================================================================================== + // Classification Getter + // ===================== + + + // =================================================================================== + // Foreign Table + // ============= + + // =================================================================================== + // Refferer Table + // ============== + + // =================================================================================== + // Accept + // ====== + /** + * This method implements the method that is declared at super. + * + * @param primaryKeyMap Primary key map. (NotNull and NotEmpty) + * @deprecated Please use ConfigurationDbm.getInstance().acceptPrimaryKeyMap(entity, primaryKeyMap); + */ + public void acceptPrimaryKeyMap(java.util.Map primaryKeyMap) { + getDBMeta().acceptPrimaryKeyMap(this, primaryKeyMap); + } + + /** + * This method implements the method that is declared at super. + * + * @param primaryKeyMapString Primary-key map-string. (NotNull and NotEmpty) + * @deprecated Please use ConfigurationDbm.getInstance().acceptPrimaryKeyMapString(entity, primaryKeyMapString); + */ + public void acceptPrimaryKeyMapString(String primaryKeyMapString) { + getDBMeta().acceptPrimaryKeyMapString(this, primaryKeyMapString); + } + + /** + * This method implements the method that is declared at super. + * + * @param columnValueMap Column-value map. (NotNull and NotEmpty) + * @deprecated Please use ConfigurationDbm.getInstance().acceptColumnValueMap(entity, columnValueMap); + */ + public void acceptColumnValueMap(java.util.Map columnValueMap) { + getDBMeta().acceptColumnValueMap(this, columnValueMap); + } + + /** + * This method implements the method that is declared at super. + * + * @param columnValueMapString Column-value map-string. (NotNull and NotEmpty) + * @deprecated Please use ConfigurationDbm.getInstance().acceptColumnValueMap(entity, columnValueMapString); + */ + public void acceptColumnValueMapString(String columnValueMapString) { + getDBMeta().acceptColumnValueMapString(this, columnValueMapString); + } + + // =================================================================================== + // Extract + // ======= + /** + * This method implements the method that is declared at super. + * + * @return Primary-key map-string. (NotNull) + * @deprecated Please use ConfigurationDbm.getInstance().extractPrimaryKeyMapString(entity); + */ + public String extractPrimaryKeyMapString() { + return getDBMeta().extractPrimaryKeyMapString(this); + } + + /** + * Extract primary-key map-string. + * + * @param startBrace Start-brace. (NotNull) + * @param endBrace End-brace. (NotNull) + * @param delimiter Delimiter. (NotNull) + * @param equal Equal. (NotNull) + * @return Primary-key map-string. (NotNull) + * @deprecated Please use ConfigurationDbm.getInstance().extractPrimaryKeyMapString(entity, startBrace, endBrace, delimiter, equal); + */ + public String extractPrimaryKeyMapString(String startBrace, String endBrace, String delimiter, String equal) { + return getDBMeta().extractPrimaryKeyMapString(this, startBrace, endBrace, delimiter, equal); + } + + /** + * This method implements the method that is declared at super. + * + * @return Column-value map-string. (NotNull) + * @deprecated Please use ConfigurationDbm.getInstance().extractColumnValueMapString(entity); + */ + public String extractColumnValueMapString() { + return getDBMeta().extractColumnValueMapString(this); + } + + /** + * Extract column-value map-string. + * + * @param startBrace Start-brace. (NotNull) + * @param endBrace End-brace. (NotNull) + * @param delimiter Delimiter. (NotNull) + * @param equal Equal. (NotNull) + * @return Column-value map-string. (NotNull) + * @deprecated Please use ConfigurationDbm.getInstance().extractColumnValueMapString(entity, startBrace, endBrace, delimiter, equal); + */ + public String extractColumnValueMapString(String startBrace, String endBrace, String delimiter, String equal) { + return getDBMeta().extractColumnValueMapString(this, startBrace, endBrace, delimiter, equal); + } + + + // =================================================================================== + // Determination + // ============= + /** + * This method implements the method that is declared at super. + * + * @return Determination. + */ + public boolean hasPrimaryKeyValue() { + + if (_configurationId == null) { + return false; + } + + return true; + } + + // =================================================================================== + // Modified Properties + // =================== + /** + * Get modified property names. (S2Dao uses this for updateModifiedProperties()) + * + * @return Modified property names. (NotNull) + */ + public java.util.Set getModifiedPropertyNames() { + return _modifiedProperties.getPropertyNames(); + } + + /** + * New entity modified properties. You can override this at the sub-class if you need it. + * + * @return Entity modified properties. (NotNull) + */ + protected EntityModifiedProperties newEntityModifiedProperties() { + return new EntityModifiedProperties(); + } + + /** + * Clear modified property names. + */ + public void clearModifiedPropertyNames() { + _modifiedProperties.clear(); + } + + // =================================================================================== + // Basic Override + // ============== + + /** + * This method overrides the method that is declared at super. + * If the primary-key of the other is same as this one, returns true. + * + * @param other Other entity. + * @return Comparing result. + */ + public boolean equals(Object other) { + if (other == null) { + return false; + } + if (!(other instanceof BsConfiguration)) { + return false; + } + final BsConfiguration otherEntity = (BsConfiguration)other; + + if (getConfigurationId() == null || !getConfigurationId().equals(otherEntity.getConfigurationId())) { + return false; + } + + return true; + } + + /** + * This method overrides the method that is declared at super. + * Calculates hash-code from primary-key. + * + * @return Hash-code from primary-keys. + */ + public int hashCode() { + int result = 0; + + if (this.getConfigurationId() != null) { + result = result + getConfigurationId().hashCode(); + } + + return result; + } + + /** + * This method overrides the method that is declared at super. + * + * @return Column-value map-string. (NotNull) + */ + public String toString() { + final String delimiter = ","; + final StringBuffer sb = new StringBuffer(); + + sb.append(delimiter).append(getConfigurationId()); + sb.append(delimiter).append(getConfigurationTitle()); + sb.append(delimiter).append(getConfigurationKey()); + sb.append(delimiter).append(getConfigurationValue()); + sb.append(delimiter).append(getConfigurationDescription()); + sb.append(delimiter).append(getConfigurationGroupId()); + sb.append(delimiter).append(getSortOrder()); + sb.append(delimiter).append(getLastModified()); + sb.append(delimiter).append(getDateAdded()); + sb.append(delimiter).append(getUseFunction()); + sb.append(delimiter).append(getSetFunction()); + + sb.delete(0, delimiter.length()); + sb.insert(0, "{").append("}"); + return sb.toString(); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/BsConfigurationGroup.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/BsConfigurationGroup.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/BsConfigurationGroup.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,472 @@ +package jp.sf.pal.pompei.bsentity; + + +import jp.sf.pal.pompei.allcommon.Entity; +import jp.sf.pal.pompei.allcommon.dbmeta.DBMeta; +import jp.sf.pal.pompei.allcommon.dbmeta.DBMetaInstanceHandler; + +/** + * The entity of CONFIGURATION_GROUP. + * + *
+ * [primary-key]
+ *     CONFIGURATION_GROUP_ID
+ * 
+ * [column-property]
+ *     CONFIGURATION_GROUP_ID, CONFIGURATION_GROUP_TITLE, CONFIGURATION_GROUP_DESCRIPTION, SORT_ORDER, VISIBLE
+ * 
+ * [foreign-property]
+ *     
+ * 
+ * [refferer-property]
+ *     
+ * 
+ * [sequence]
+ *     
+ * 
+ * [identity]
+ *     
+ * 
+ * [update-date]
+ *     
+ * 
+ * [version-no]
+ *     
+ * 
+ * 
+ * + * @author DBFlute(AutoGenerator) + */ +public abstract class BsConfigurationGroup implements Entity, java.io.Serializable { + + /** Serial version UID. (Default) */ + private static final long serialVersionUID = 1L; + + /** TABLE-Annotation for S2Dao */ + public static final String TABLE = "CONFIGURATION_GROUP"; + + + // =================================================================================== + // Attribute + // ========= + /** Entity modified properties. (for S2Dao) */ + protected EntityModifiedProperties _modifiedProperties = newEntityModifiedProperties(); + + + /** The value of configurationGroupId. ColumnDefinition -- PK : INTEGER : NotNull*/ + protected java.math.BigDecimal _configurationGroupId; + + /** The value of configurationGroupTitle. ColumnDefinition -- VARCHAR(64) : NotNull*/ + protected String _configurationGroupTitle; + + /** The value of configurationGroupDescription. ColumnDefinition -- VARCHAR(255) : NotNull*/ + protected String _configurationGroupDescription; + + /** The value of sortOrder. ColumnDefinition -- INTEGER*/ + protected java.math.BigDecimal _sortOrder; + + /** The value of visible. ColumnDefinition -- INTEGER : Default=[1]*/ + protected java.math.BigDecimal _visible; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + public BsConfigurationGroup() { + } + + + // =================================================================================== + // DBMeta + // ====== + /** + * This method implements the method that is declared at super. + * + * @return DBMeta. (NotNull) + */ + public DBMeta getDBMeta() { + return DBMetaInstanceHandler.getInstanceByTableDbName(getTableDbName()); + } + + // =================================================================================== + // Table Name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + public String getTableDbName() { + return "CONFIGURATION_GROUP"; + } + + /** + * This method implements the method that is declared at super. + * + * @return Table cap-prop-name. (NotNull) + */ + public String getTableCapPropName() { + return "ConfigurationGroup"; + } + + /** + * This method implements the method that is declared at super. + * + * @return Table uncap-prop-name. (NotNull) + */ + public String getTableUncapPropName() { + return "configurationGroup"; + } + + // =================================================================================== + // Accessor + // ======== + + /** Column-Annotation for S2Dao. ColumnDefinition -- PK : INTEGER : NotNull*/ + public static final String configurationGroupId_COLUMN = "CONFIGURATION_GROUP_ID"; + + /** + * Get the value of configurationGroupId.
+ * {PK : INTEGER : NotNull} + * + * @return The value of configurationGroupId. (Nullable) + */ + public java.math.BigDecimal getConfigurationGroupId() { + return _configurationGroupId; + } + + /** + * Set the value of configurationGroupId.
+ * {PK : INTEGER : NotNull} + * + * @param configurationGroupId The value of configurationGroupId. (Nullable) + */ + public void setConfigurationGroupId(java.math.BigDecimal configurationGroupId) { + _modifiedProperties.addPropertyName("configurationGroupId"); + _configurationGroupId = configurationGroupId; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- VARCHAR(64) : NotNull*/ + public static final String configurationGroupTitle_COLUMN = "CONFIGURATION_GROUP_TITLE"; + + /** + * Get the value of configurationGroupTitle.
+ * {VARCHAR(64) : NotNull} + * + * @return The value of configurationGroupTitle. (Nullable) + */ + public String getConfigurationGroupTitle() { + return _configurationGroupTitle; + } + + /** + * Set the value of configurationGroupTitle.
+ * {VARCHAR(64) : NotNull} + * + * @param configurationGroupTitle The value of configurationGroupTitle. (Nullable) + */ + public void setConfigurationGroupTitle(String configurationGroupTitle) { + _modifiedProperties.addPropertyName("configurationGroupTitle"); + _configurationGroupTitle = configurationGroupTitle; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- VARCHAR(255) : NotNull*/ + public static final String configurationGroupDescription_COLUMN = "CONFIGURATION_GROUP_DESCRIPTION"; + + /** + * Get the value of configurationGroupDescription.
+ * {VARCHAR(255) : NotNull} + * + * @return The value of configurationGroupDescription. (Nullable) + */ + public String getConfigurationGroupDescription() { + return _configurationGroupDescription; + } + + /** + * Set the value of configurationGroupDescription.
+ * {VARCHAR(255) : NotNull} + * + * @param configurationGroupDescription The value of configurationGroupDescription. (Nullable) + */ + public void setConfigurationGroupDescription(String configurationGroupDescription) { + _modifiedProperties.addPropertyName("configurationGroupDescription"); + _configurationGroupDescription = configurationGroupDescription; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- INTEGER*/ + public static final String sortOrder_COLUMN = "SORT_ORDER"; + + /** + * Get the value of sortOrder.
+ * {INTEGER} + * + * @return The value of sortOrder. (Nullable) + */ + public java.math.BigDecimal getSortOrder() { + return _sortOrder; + } + + /** + * Set the value of sortOrder.
+ * {INTEGER} + * + * @param sortOrder The value of sortOrder. (Nullable) + */ + public void setSortOrder(java.math.BigDecimal sortOrder) { + _modifiedProperties.addPropertyName("sortOrder"); + _sortOrder = sortOrder; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- INTEGER : Default=[1]*/ + public static final String visible_COLUMN = "VISIBLE"; + + /** + * Get the value of visible.
+ * {INTEGER : Default=[1]} + * + * @return The value of visible. (Nullable) + */ + public java.math.BigDecimal getVisible() { + return _visible; + } + + /** + * Set the value of visible.
+ * {INTEGER : Default=[1]} + * + * @param visible The value of visible. (Nullable) + */ + public void setVisible(java.math.BigDecimal visible) { + _modifiedProperties.addPropertyName("visible"); + _visible = visible; + } + + + // =================================================================================== + // Classify Method + // =============== + + // =================================================================================== + // Classification Determination + // ============================ + + + // =================================================================================== + // Classification Getter + // ===================== + + + // =================================================================================== + // Foreign Table + // ============= + + // =================================================================================== + // Refferer Table + // ============== + + // =================================================================================== + // Accept + // ====== + /** + * This method implements the method that is declared at super. + * + * @param primaryKeyMap Primary key map. (NotNull and NotEmpty) + * @deprecated Please use ConfigurationGroupDbm.getInstance().acceptPrimaryKeyMap(entity, primaryKeyMap); + */ + public void acceptPrimaryKeyMap(java.util.Map primaryKeyMap) { + getDBMeta().acceptPrimaryKeyMap(this, primaryKeyMap); + } + + /** + * This method implements the method that is declared at super. + * + * @param primaryKeyMapString Primary-key map-string. (NotNull and NotEmpty) + * @deprecated Please use ConfigurationGroupDbm.getInstance().acceptPrimaryKeyMapString(entity, primaryKeyMapString); + */ + public void acceptPrimaryKeyMapString(String primaryKeyMapString) { + getDBMeta().acceptPrimaryKeyMapString(this, primaryKeyMapString); + } + + /** + * This method implements the method that is declared at super. + * + * @param columnValueMap Column-value map. (NotNull and NotEmpty) + * @deprecated Please use ConfigurationGroupDbm.getInstance().acceptColumnValueMap(entity, columnValueMap); + */ + public void acceptColumnValueMap(java.util.Map columnValueMap) { + getDBMeta().acceptColumnValueMap(this, columnValueMap); + } + + /** + * This method implements the method that is declared at super. + * + * @param columnValueMapString Column-value map-string. (NotNull and NotEmpty) + * @deprecated Please use ConfigurationGroupDbm.getInstance().acceptColumnValueMap(entity, columnValueMapString); + */ + public void acceptColumnValueMapString(String columnValueMapString) { + getDBMeta().acceptColumnValueMapString(this, columnValueMapString); + } + + // =================================================================================== + // Extract + // ======= + /** + * This method implements the method that is declared at super. + * + * @return Primary-key map-string. (NotNull) + * @deprecated Please use ConfigurationGroupDbm.getInstance().extractPrimaryKeyMapString(entity); + */ + public String extractPrimaryKeyMapString() { + return getDBMeta().extractPrimaryKeyMapString(this); + } + + /** + * Extract primary-key map-string. + * + * @param startBrace Start-brace. (NotNull) + * @param endBrace End-brace. (NotNull) + * @param delimiter Delimiter. (NotNull) + * @param equal Equal. (NotNull) + * @return Primary-key map-string. (NotNull) + * @deprecated Please use ConfigurationGroupDbm.getInstance().extractPrimaryKeyMapString(entity, startBrace, endBrace, delimiter, equal); + */ + public String extractPrimaryKeyMapString(String startBrace, String endBrace, String delimiter, String equal) { + return getDBMeta().extractPrimaryKeyMapString(this, startBrace, endBrace, delimiter, equal); + } + + /** + * This method implements the method that is declared at super. + * + * @return Column-value map-string. (NotNull) + * @deprecated Please use ConfigurationGroupDbm.getInstance().extractColumnValueMapString(entity); + */ + public String extractColumnValueMapString() { + return getDBMeta().extractColumnValueMapString(this); + } + + /** + * Extract column-value map-string. + * + * @param startBrace Start-brace. (NotNull) + * @param endBrace End-brace. (NotNull) + * @param delimiter Delimiter. (NotNull) + * @param equal Equal. (NotNull) + * @return Column-value map-string. (NotNull) + * @deprecated Please use ConfigurationGroupDbm.getInstance().extractColumnValueMapString(entity, startBrace, endBrace, delimiter, equal); + */ + public String extractColumnValueMapString(String startBrace, String endBrace, String delimiter, String equal) { + return getDBMeta().extractColumnValueMapString(this, startBrace, endBrace, delimiter, equal); + } + + + // =================================================================================== + // Determination + // ============= + /** + * This method implements the method that is declared at super. + * + * @return Determination. + */ + public boolean hasPrimaryKeyValue() { + + if (_configurationGroupId == null) { + return false; + } + + return true; + } + + // =================================================================================== + // Modified Properties + // =================== + /** + * Get modified property names. (S2Dao uses this for updateModifiedProperties()) + * + * @return Modified property names. (NotNull) + */ + public java.util.Set getModifiedPropertyNames() { + return _modifiedProperties.getPropertyNames(); + } + + /** + * New entity modified properties. You can override this at the sub-class if you need it. + * + * @return Entity modified properties. (NotNull) + */ + protected EntityModifiedProperties newEntityModifiedProperties() { + return new EntityModifiedProperties(); + } + + /** + * Clear modified property names. + */ + public void clearModifiedPropertyNames() { + _modifiedProperties.clear(); + } + + // =================================================================================== + // Basic Override + // ============== + + /** + * This method overrides the method that is declared at super. + * If the primary-key of the other is same as this one, returns true. + * + * @param other Other entity. + * @return Comparing result. + */ + public boolean equals(Object other) { + if (other == null) { + return false; + } + if (!(other instanceof BsConfigurationGroup)) { + return false; + } + final BsConfigurationGroup otherEntity = (BsConfigurationGroup)other; + + if (getConfigurationGroupId() == null || !getConfigurationGroupId().equals(otherEntity.getConfigurationGroupId())) { + return false; + } + + return true; + } + + /** + * This method overrides the method that is declared at super. + * Calculates hash-code from primary-key. + * + * @return Hash-code from primary-keys. + */ + public int hashCode() { + int result = 0; + + if (this.getConfigurationGroupId() != null) { + result = result + getConfigurationGroupId().hashCode(); + } + + return result; + } + + /** + * This method overrides the method that is declared at super. + * + * @return Column-value map-string. (NotNull) + */ + public String toString() { + final String delimiter = ","; + final StringBuffer sb = new StringBuffer(); + + sb.append(delimiter).append(getConfigurationGroupId()); + sb.append(delimiter).append(getConfigurationGroupTitle()); + sb.append(delimiter).append(getConfigurationGroupDescription()); + sb.append(delimiter).append(getSortOrder()); + sb.append(delimiter).append(getVisible()); + + sb.delete(0, delimiter.length()); + sb.insert(0, "{").append("}"); + return sb.toString(); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/BsCounter.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/BsCounter.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/BsCounter.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,391 @@ +package jp.sf.pal.pompei.bsentity; + + +import jp.sf.pal.pompei.allcommon.Entity; +import jp.sf.pal.pompei.allcommon.dbmeta.DBMeta; +import jp.sf.pal.pompei.allcommon.dbmeta.DBMetaInstanceHandler; + +/** + * The entity of COUNTER. + * + *
+ * [primary-key]
+ *     
+ * 
+ * [column-property]
+ *     STARTDATE, COUNTER
+ * 
+ * [foreign-property]
+ *     
+ * 
+ * [refferer-property]
+ *     
+ * 
+ * [sequence]
+ *     
+ * 
+ * [identity]
+ *     
+ * 
+ * [update-date]
+ *     
+ * 
+ * [version-no]
+ *     
+ * 
+ * 
+ * + * @author DBFlute(AutoGenerator) + */ +public abstract class BsCounter implements Entity, java.io.Serializable { + + /** Serial version UID. (Default) */ + private static final long serialVersionUID = 1L; + + /** TABLE-Annotation for S2Dao */ + public static final String TABLE = "COUNTER"; + + + // =================================================================================== + // Attribute + // ========= + /** Entity modified properties. (for S2Dao) */ + protected EntityModifiedProperties _modifiedProperties = newEntityModifiedProperties(); + + + /** The value of startdate. ColumnDefinition -- CHAR(8)*/ + protected String _startdate; + + /** The value of counter. ColumnDefinition -- INTEGER*/ + protected java.math.BigDecimal _counter; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + public BsCounter() { + } + + + // =================================================================================== + // DBMeta + // ====== + /** + * This method implements the method that is declared at super. + * + * @return DBMeta. (NotNull) + */ + public DBMeta getDBMeta() { + return DBMetaInstanceHandler.getInstanceByTableDbName(getTableDbName()); + } + + // =================================================================================== + // Table Name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + public String getTableDbName() { + return "COUNTER"; + } + + /** + * This method implements the method that is declared at super. + * + * @return Table cap-prop-name. (NotNull) + */ + public String getTableCapPropName() { + return "Counter"; + } + + /** + * This method implements the method that is declared at super. + * + * @return Table uncap-prop-name. (NotNull) + */ + public String getTableUncapPropName() { + return "counter"; + } + + // =================================================================================== + // Accessor + // ======== + + /** Column-Annotation for S2Dao. ColumnDefinition -- CHAR(8)*/ + public static final String startdate_COLUMN = "STARTDATE"; + + /** + * Get the value of startdate.
+ * {CHAR(8)} + * + * @return The value of startdate. (Nullable) + */ + public String getStartdate() { + return _startdate; + } + + /** + * Set the value of startdate.
+ * {CHAR(8)} + * + * @param startdate The value of startdate. (Nullable) + */ + public void setStartdate(String startdate) { + _modifiedProperties.addPropertyName("startdate"); + _startdate = startdate; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- INTEGER*/ + public static final String counter_COLUMN = "COUNTER"; + + /** + * Get the value of counter.
+ * {INTEGER} + * + * @return The value of counter. (Nullable) + */ + public java.math.BigDecimal getCounter() { + return _counter; + } + + /** + * Set the value of counter.
+ * {INTEGER} + * + * @param counter The value of counter. (Nullable) + */ + public void setCounter(java.math.BigDecimal counter) { + _modifiedProperties.addPropertyName("counter"); + _counter = counter; + } + + + // =================================================================================== + // Classify Method + // =============== + + // =================================================================================== + // Classification Determination + // ============================ + + + // =================================================================================== + // Classification Getter + // ===================== + + + // =================================================================================== + // Foreign Table + // ============= + + // =================================================================================== + // Refferer Table + // ============== + + // =================================================================================== + // Accept + // ====== + /** + * This method implements the method that is declared at super. + * + * @param primaryKeyMap Primary key map. (NotNull and NotEmpty) + * @deprecated Please use CounterDbm.getInstance().acceptPrimaryKeyMap(entity, primaryKeyMap); + */ + public void acceptPrimaryKeyMap(java.util.Map primaryKeyMap) { + getDBMeta().acceptPrimaryKeyMap(this, primaryKeyMap); + } + + /** + * This method implements the method that is declared at super. + * + * @param primaryKeyMapString Primary-key map-string. (NotNull and NotEmpty) + * @deprecated Please use CounterDbm.getInstance().acceptPrimaryKeyMapString(entity, primaryKeyMapString); + */ + public void acceptPrimaryKeyMapString(String primaryKeyMapString) { + getDBMeta().acceptPrimaryKeyMapString(this, primaryKeyMapString); + } + + /** + * This method implements the method that is declared at super. + * + * @param columnValueMap Column-value map. (NotNull and NotEmpty) + * @deprecated Please use CounterDbm.getInstance().acceptColumnValueMap(entity, columnValueMap); + */ + public void acceptColumnValueMap(java.util.Map columnValueMap) { + getDBMeta().acceptColumnValueMap(this, columnValueMap); + } + + /** + * This method implements the method that is declared at super. + * + * @param columnValueMapString Column-value map-string. (NotNull and NotEmpty) + * @deprecated Please use CounterDbm.getInstance().acceptColumnValueMap(entity, columnValueMapString); + */ + public void acceptColumnValueMapString(String columnValueMapString) { + getDBMeta().acceptColumnValueMapString(this, columnValueMapString); + } + + // =================================================================================== + // Extract + // ======= + /** + * This method implements the method that is declared at super. + * + * @return Primary-key map-string. (NotNull) + * @deprecated Please use CounterDbm.getInstance().extractPrimaryKeyMapString(entity); + */ + public String extractPrimaryKeyMapString() { + return getDBMeta().extractPrimaryKeyMapString(this); + } + + /** + * Extract primary-key map-string. + * + * @param startBrace Start-brace. (NotNull) + * @param endBrace End-brace. (NotNull) + * @param delimiter Delimiter. (NotNull) + * @param equal Equal. (NotNull) + * @return Primary-key map-string. (NotNull) + * @deprecated Please use CounterDbm.getInstance().extractPrimaryKeyMapString(entity, startBrace, endBrace, delimiter, equal); + */ + public String extractPrimaryKeyMapString(String startBrace, String endBrace, String delimiter, String equal) { + return getDBMeta().extractPrimaryKeyMapString(this, startBrace, endBrace, delimiter, equal); + } + + /** + * This method implements the method that is declared at super. + * + * @return Column-value map-string. (NotNull) + * @deprecated Please use CounterDbm.getInstance().extractColumnValueMapString(entity); + */ + public String extractColumnValueMapString() { + return getDBMeta().extractColumnValueMapString(this); + } + + /** + * Extract column-value map-string. + * + * @param startBrace Start-brace. (NotNull) + * @param endBrace End-brace. (NotNull) + * @param delimiter Delimiter. (NotNull) + * @param equal Equal. (NotNull) + * @return Column-value map-string. (NotNull) + * @deprecated Please use CounterDbm.getInstance().extractColumnValueMapString(entity, startBrace, endBrace, delimiter, equal); + */ + public String extractColumnValueMapString(String startBrace, String endBrace, String delimiter, String equal) { + return getDBMeta().extractColumnValueMapString(this, startBrace, endBrace, delimiter, equal); + } + + + // =================================================================================== + // Determination + // ============= + /** + * This method implements the method that is declared at super. + * + * @return Determination. + */ + public boolean hasPrimaryKeyValue() { + + + return true; + } + + // =================================================================================== + // Modified Properties + // =================== + /** + * Get modified property names. (S2Dao uses this for updateModifiedProperties()) + * + * @return Modified property names. (NotNull) + */ + public java.util.Set getModifiedPropertyNames() { + return _modifiedProperties.getPropertyNames(); + } + + /** + * New entity modified properties. You can override this at the sub-class if you need it. + * + * @return Entity modified properties. (NotNull) + */ + protected EntityModifiedProperties newEntityModifiedProperties() { + return new EntityModifiedProperties(); + } + + /** + * Clear modified property names. + */ + public void clearModifiedPropertyNames() { + _modifiedProperties.clear(); + } + + // =================================================================================== + // Basic Override + // ============== + + /** + * This method overrides the method that is declared at super. + * If the all-column value of the other is same as this one, returns true. + * + * @param other Other entity. (Nullable) + * @return Comparing result. If other is null, returns false. + */ + public boolean equals(Object other) { + if (other == null) { + return false; + } + if (!(other instanceof BsCounter)) { + return false; + } + final BsCounter otherEntity = (BsCounter)other; + + if (getStartdate() == null || !getStartdate().equals(otherEntity.getStartdate())) { + return false; + } + if (getCounter() == null || !getCounter().equals(otherEntity.getCounter())) { + return false; + } + + return true; + } + + /** + * This method overrides the method that is declared at super. + * Calculates hash-code from all-columns. + * + * @return Hash-code from all-columns. + */ + public int hashCode() { + int result = 0; + + if (this.getStartdate() != null) { + result = result + this.getStartdate().hashCode(); + } + if (this.getCounter() != null) { + result = result + this.getCounter().hashCode(); + } + + return result; + } + + /** + * This method overrides the method that is declared at super. + * + * @return Column-value map-string. (NotNull) + */ + public String toString() { + final String delimiter = ","; + final StringBuffer sb = new StringBuffer(); + + sb.append(delimiter).append(getStartdate()); + sb.append(delimiter).append(getCounter()); + + sb.delete(0, delimiter.length()); + sb.insert(0, "{").append("}"); + return sb.toString(); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/BsCounterHistory.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/BsCounterHistory.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/BsCounterHistory.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,391 @@ +package jp.sf.pal.pompei.bsentity; + + +import jp.sf.pal.pompei.allcommon.Entity; +import jp.sf.pal.pompei.allcommon.dbmeta.DBMeta; +import jp.sf.pal.pompei.allcommon.dbmeta.DBMetaInstanceHandler; + +/** + * The entity of COUNTER_HISTORY. + * + *
+ * [primary-key]
+ *     
+ * 
+ * [column-property]
+ *     MONTH, COUNTER
+ * 
+ * [foreign-property]
+ *     
+ * 
+ * [refferer-property]
+ *     
+ * 
+ * [sequence]
+ *     
+ * 
+ * [identity]
+ *     
+ * 
+ * [update-date]
+ *     
+ * 
+ * [version-no]
+ *     
+ * 
+ * 
+ * + * @author DBFlute(AutoGenerator) + */ +public abstract class BsCounterHistory implements Entity, java.io.Serializable { + + /** Serial version UID. (Default) */ + private static final long serialVersionUID = 1L; + + /** TABLE-Annotation for S2Dao */ + public static final String TABLE = "COUNTER_HISTORY"; + + + // =================================================================================== + // Attribute + // ========= + /** Entity modified properties. (for S2Dao) */ + protected EntityModifiedProperties _modifiedProperties = newEntityModifiedProperties(); + + + /** The value of month. ColumnDefinition -- CHAR(8)*/ + protected String _month; + + /** The value of counter. ColumnDefinition -- INTEGER*/ + protected java.math.BigDecimal _counter; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + public BsCounterHistory() { + } + + + // =================================================================================== + // DBMeta + // ====== + /** + * This method implements the method that is declared at super. + * + * @return DBMeta. (NotNull) + */ + public DBMeta getDBMeta() { + return DBMetaInstanceHandler.getInstanceByTableDbName(getTableDbName()); + } + + // =================================================================================== + // Table Name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + public String getTableDbName() { + return "COUNTER_HISTORY"; + } + + /** + * This method implements the method that is declared at super. + * + * @return Table cap-prop-name. (NotNull) + */ + public String getTableCapPropName() { + return "CounterHistory"; + } + + /** + * This method implements the method that is declared at super. + * + * @return Table uncap-prop-name. (NotNull) + */ + public String getTableUncapPropName() { + return "counterHistory"; + } + + // =================================================================================== + // Accessor + // ======== + + /** Column-Annotation for S2Dao. ColumnDefinition -- CHAR(8)*/ + public static final String month_COLUMN = "MONTH"; + + /** + * Get the value of month.
+ * {CHAR(8)} + * + * @return The value of month. (Nullable) + */ + public String getMonth() { + return _month; + } + + /** + * Set the value of month.
+ * {CHAR(8)} + * + * @param month The value of month. (Nullable) + */ + public void setMonth(String month) { + _modifiedProperties.addPropertyName("month"); + _month = month; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- INTEGER*/ + public static final String counter_COLUMN = "COUNTER"; + + /** + * Get the value of counter.
+ * {INTEGER} + * + * @return The value of counter. (Nullable) + */ + public java.math.BigDecimal getCounter() { + return _counter; + } + + /** + * Set the value of counter.
+ * {INTEGER} + * + * @param counter The value of counter. (Nullable) + */ + public void setCounter(java.math.BigDecimal counter) { + _modifiedProperties.addPropertyName("counter"); + _counter = counter; + } + + + // =================================================================================== + // Classify Method + // =============== + + // =================================================================================== + // Classification Determination + // ============================ + + + // =================================================================================== + // Classification Getter + // ===================== + + + // =================================================================================== + // Foreign Table + // ============= + + // =================================================================================== + // Refferer Table + // ============== + + // =================================================================================== + // Accept + // ====== + /** + * This method implements the method that is declared at super. + * + * @param primaryKeyMap Primary key map. (NotNull and NotEmpty) + * @deprecated Please use CounterHistoryDbm.getInstance().acceptPrimaryKeyMap(entity, primaryKeyMap); + */ + public void acceptPrimaryKeyMap(java.util.Map primaryKeyMap) { + getDBMeta().acceptPrimaryKeyMap(this, primaryKeyMap); + } + + /** + * This method implements the method that is declared at super. + * + * @param primaryKeyMapString Primary-key map-string. (NotNull and NotEmpty) + * @deprecated Please use CounterHistoryDbm.getInstance().acceptPrimaryKeyMapString(entity, primaryKeyMapString); + */ + public void acceptPrimaryKeyMapString(String primaryKeyMapString) { + getDBMeta().acceptPrimaryKeyMapString(this, primaryKeyMapString); + } + + /** + * This method implements the method that is declared at super. + * + * @param columnValueMap Column-value map. (NotNull and NotEmpty) + * @deprecated Please use CounterHistoryDbm.getInstance().acceptColumnValueMap(entity, columnValueMap); + */ + public void acceptColumnValueMap(java.util.Map columnValueMap) { + getDBMeta().acceptColumnValueMap(this, columnValueMap); + } + + /** + * This method implements the method that is declared at super. + * + * @param columnValueMapString Column-value map-string. (NotNull and NotEmpty) + * @deprecated Please use CounterHistoryDbm.getInstance().acceptColumnValueMap(entity, columnValueMapString); + */ + public void acceptColumnValueMapString(String columnValueMapString) { + getDBMeta().acceptColumnValueMapString(this, columnValueMapString); + } + + // =================================================================================== + // Extract + // ======= + /** + * This method implements the method that is declared at super. + * + * @return Primary-key map-string. (NotNull) + * @deprecated Please use CounterHistoryDbm.getInstance().extractPrimaryKeyMapString(entity); + */ + public String extractPrimaryKeyMapString() { + return getDBMeta().extractPrimaryKeyMapString(this); + } + + /** + * Extract primary-key map-string. + * + * @param startBrace Start-brace. (NotNull) + * @param endBrace End-brace. (NotNull) + * @param delimiter Delimiter. (NotNull) + * @param equal Equal. (NotNull) + * @return Primary-key map-string. (NotNull) + * @deprecated Please use CounterHistoryDbm.getInstance().extractPrimaryKeyMapString(entity, startBrace, endBrace, delimiter, equal); + */ + public String extractPrimaryKeyMapString(String startBrace, String endBrace, String delimiter, String equal) { + return getDBMeta().extractPrimaryKeyMapString(this, startBrace, endBrace, delimiter, equal); + } + + /** + * This method implements the method that is declared at super. + * + * @return Column-value map-string. (NotNull) + * @deprecated Please use CounterHistoryDbm.getInstance().extractColumnValueMapString(entity); + */ + public String extractColumnValueMapString() { + return getDBMeta().extractColumnValueMapString(this); + } + + /** + * Extract column-value map-string. + * + * @param startBrace Start-brace. (NotNull) + * @param endBrace End-brace. (NotNull) + * @param delimiter Delimiter. (NotNull) + * @param equal Equal. (NotNull) + * @return Column-value map-string. (NotNull) + * @deprecated Please use CounterHistoryDbm.getInstance().extractColumnValueMapString(entity, startBrace, endBrace, delimiter, equal); + */ + public String extractColumnValueMapString(String startBrace, String endBrace, String delimiter, String equal) { + return getDBMeta().extractColumnValueMapString(this, startBrace, endBrace, delimiter, equal); + } + + + // =================================================================================== + // Determination + // ============= + /** + * This method implements the method that is declared at super. + * + * @return Determination. + */ + public boolean hasPrimaryKeyValue() { + + + return true; + } + + // =================================================================================== + // Modified Properties + // =================== + /** + * Get modified property names. (S2Dao uses this for updateModifiedProperties()) + * + * @return Modified property names. (NotNull) + */ + public java.util.Set getModifiedPropertyNames() { + return _modifiedProperties.getPropertyNames(); + } + + /** + * New entity modified properties. You can override this at the sub-class if you need it. + * + * @return Entity modified properties. (NotNull) + */ + protected EntityModifiedProperties newEntityModifiedProperties() { + return new EntityModifiedProperties(); + } + + /** + * Clear modified property names. + */ + public void clearModifiedPropertyNames() { + _modifiedProperties.clear(); + } + + // =================================================================================== + // Basic Override + // ============== + + /** + * This method overrides the method that is declared at super. + * If the all-column value of the other is same as this one, returns true. + * + * @param other Other entity. (Nullable) + * @return Comparing result. If other is null, returns false. + */ + public boolean equals(Object other) { + if (other == null) { + return false; + } + if (!(other instanceof BsCounterHistory)) { + return false; + } + final BsCounterHistory otherEntity = (BsCounterHistory)other; + + if (getMonth() == null || !getMonth().equals(otherEntity.getMonth())) { + return false; + } + if (getCounter() == null || !getCounter().equals(otherEntity.getCounter())) { + return false; + } + + return true; + } + + /** + * This method overrides the method that is declared at super. + * Calculates hash-code from all-columns. + * + * @return Hash-code from all-columns. + */ + public int hashCode() { + int result = 0; + + if (this.getMonth() != null) { + result = result + this.getMonth().hashCode(); + } + if (this.getCounter() != null) { + result = result + this.getCounter().hashCode(); + } + + return result; + } + + /** + * This method overrides the method that is declared at super. + * + * @return Column-value map-string. (NotNull) + */ + public String toString() { + final String delimiter = ","; + final StringBuffer sb = new StringBuffer(); + + sb.append(delimiter).append(getMonth()); + sb.append(delimiter).append(getCounter()); + + sb.delete(0, delimiter.length()); + sb.insert(0, "{").append("}"); + return sb.toString(); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/BsCountries.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/BsCountries.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/BsCountries.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,472 @@ +package jp.sf.pal.pompei.bsentity; + + +import jp.sf.pal.pompei.allcommon.Entity; +import jp.sf.pal.pompei.allcommon.dbmeta.DBMeta; +import jp.sf.pal.pompei.allcommon.dbmeta.DBMetaInstanceHandler; + +/** + * The entity of COUNTRIES. + * + *
+ * [primary-key]
+ *     COUNTRIES_ID
+ * 
+ * [column-property]
+ *     COUNTRIES_ID, COUNTRIES_NAME, COUNTRIES_ISO_CODE_2, COUNTRIES_ISO_CODE_3, ADDRESS_FORMAT_ID
+ * 
+ * [foreign-property]
+ *     
+ * 
+ * [refferer-property]
+ *     
+ * 
+ * [sequence]
+ *     
+ * 
+ * [identity]
+ *     
+ * 
+ * [update-date]
+ *     
+ * 
+ * [version-no]
+ *     
+ * 
+ * 
+ * + * @author DBFlute(AutoGenerator) + */ +public abstract class BsCountries implements Entity, java.io.Serializable { + + /** Serial version UID. (Default) */ + private static final long serialVersionUID = 1L; + + /** TABLE-Annotation for S2Dao */ + public static final String TABLE = "COUNTRIES"; + + + // =================================================================================== + // Attribute + // ========= + /** Entity modified properties. (for S2Dao) */ + protected EntityModifiedProperties _modifiedProperties = newEntityModifiedProperties(); + + + /** The value of countriesId. ColumnDefinition -- PK : INTEGER : NotNull*/ + protected java.math.BigDecimal _countriesId; + + /** The value of countriesName. ColumnDefinition -- VARCHAR(64) : NotNull*/ + protected String _countriesName; + + /** The value of countriesIsoCode2. ColumnDefinition -- CHAR(2) : NotNull*/ + protected String _countriesIsoCode2; + + /** The value of countriesIsoCode3. ColumnDefinition -- CHAR(3) : NotNull*/ + protected String _countriesIsoCode3; + + /** The value of addressFormatId. ColumnDefinition -- INTEGER : NotNull*/ + protected java.math.BigDecimal _addressFormatId; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + public BsCountries() { + } + + + // =================================================================================== + // DBMeta + // ====== + /** + * This method implements the method that is declared at super. + * + * @return DBMeta. (NotNull) + */ + public DBMeta getDBMeta() { + return DBMetaInstanceHandler.getInstanceByTableDbName(getTableDbName()); + } + + // =================================================================================== + // Table Name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + public String getTableDbName() { + return "COUNTRIES"; + } + + /** + * This method implements the method that is declared at super. + * + * @return Table cap-prop-name. (NotNull) + */ + public String getTableCapPropName() { + return "Countries"; + } + + /** + * This method implements the method that is declared at super. + * + * @return Table uncap-prop-name. (NotNull) + */ + public String getTableUncapPropName() { + return "countries"; + } + + // =================================================================================== + // Accessor + // ======== + + /** Column-Annotation for S2Dao. ColumnDefinition -- PK : INTEGER : NotNull*/ + public static final String countriesId_COLUMN = "COUNTRIES_ID"; + + /** + * Get the value of countriesId.
+ * {PK : INTEGER : NotNull} + * + * @return The value of countriesId. (Nullable) + */ + public java.math.BigDecimal getCountriesId() { + return _countriesId; + } + + /** + * Set the value of countriesId.
+ * {PK : INTEGER : NotNull} + * + * @param countriesId The value of countriesId. (Nullable) + */ + public void setCountriesId(java.math.BigDecimal countriesId) { + _modifiedProperties.addPropertyName("countriesId"); + _countriesId = countriesId; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- VARCHAR(64) : NotNull*/ + public static final String countriesName_COLUMN = "COUNTRIES_NAME"; + + /** + * Get the value of countriesName.
+ * {VARCHAR(64) : NotNull} + * + * @return The value of countriesName. (Nullable) + */ + public String getCountriesName() { + return _countriesName; + } + + /** + * Set the value of countriesName.
+ * {VARCHAR(64) : NotNull} + * + * @param countriesName The value of countriesName. (Nullable) + */ + public void setCountriesName(String countriesName) { + _modifiedProperties.addPropertyName("countriesName"); + _countriesName = countriesName; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- CHAR(2) : NotNull*/ + public static final String countriesIsoCode2_COLUMN = "COUNTRIES_ISO_CODE_2"; + + /** + * Get the value of countriesIsoCode2.
+ * {CHAR(2) : NotNull} + * + * @return The value of countriesIsoCode2. (Nullable) + */ + public String getCountriesIsoCode2() { + return _countriesIsoCode2; + } + + /** + * Set the value of countriesIsoCode2.
+ * {CHAR(2) : NotNull} + * + * @param countriesIsoCode2 The value of countriesIsoCode2. (Nullable) + */ + public void setCountriesIsoCode2(String countriesIsoCode2) { + _modifiedProperties.addPropertyName("countriesIsoCode2"); + _countriesIsoCode2 = countriesIsoCode2; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- CHAR(3) : NotNull*/ + public static final String countriesIsoCode3_COLUMN = "COUNTRIES_ISO_CODE_3"; + + /** + * Get the value of countriesIsoCode3.
+ * {CHAR(3) : NotNull} + * + * @return The value of countriesIsoCode3. (Nullable) + */ + public String getCountriesIsoCode3() { + return _countriesIsoCode3; + } + + /** + * Set the value of countriesIsoCode3.
+ * {CHAR(3) : NotNull} + * + * @param countriesIsoCode3 The value of countriesIsoCode3. (Nullable) + */ + public void setCountriesIsoCode3(String countriesIsoCode3) { + _modifiedProperties.addPropertyName("countriesIsoCode3"); + _countriesIsoCode3 = countriesIsoCode3; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- INTEGER : NotNull*/ + public static final String addressFormatId_COLUMN = "ADDRESS_FORMAT_ID"; + + /** + * Get the value of addressFormatId.
+ * {INTEGER : NotNull} + * + * @return The value of addressFormatId. (Nullable) + */ + public java.math.BigDecimal getAddressFormatId() { + return _addressFormatId; + } + + /** + * Set the value of addressFormatId.
+ * {INTEGER : NotNull} + * + * @param addressFormatId The value of addressFormatId. (Nullable) + */ + public void setAddressFormatId(java.math.BigDecimal addressFormatId) { + _modifiedProperties.addPropertyName("addressFormatId"); + _addressFormatId = addressFormatId; + } + + + // =================================================================================== + // Classify Method + // =============== + + // =================================================================================== + // Classification Determination + // ============================ + + + // =================================================================================== + // Classification Getter + // ===================== + + + // =================================================================================== + // Foreign Table + // ============= + + // =================================================================================== + // Refferer Table + // ============== + + // =================================================================================== + // Accept + // ====== + /** + * This method implements the method that is declared at super. + * + * @param primaryKeyMap Primary key map. (NotNull and NotEmpty) + * @deprecated Please use CountriesDbm.getInstance().acceptPrimaryKeyMap(entity, primaryKeyMap); + */ + public void acceptPrimaryKeyMap(java.util.Map primaryKeyMap) { + getDBMeta().acceptPrimaryKeyMap(this, primaryKeyMap); + } + + /** + * This method implements the method that is declared at super. + * + * @param primaryKeyMapString Primary-key map-string. (NotNull and NotEmpty) + * @deprecated Please use CountriesDbm.getInstance().acceptPrimaryKeyMapString(entity, primaryKeyMapString); + */ + public void acceptPrimaryKeyMapString(String primaryKeyMapString) { + getDBMeta().acceptPrimaryKeyMapString(this, primaryKeyMapString); + } + + /** + * This method implements the method that is declared at super. + * + * @param columnValueMap Column-value map. (NotNull and NotEmpty) + * @deprecated Please use CountriesDbm.getInstance().acceptColumnValueMap(entity, columnValueMap); + */ + public void acceptColumnValueMap(java.util.Map columnValueMap) { + getDBMeta().acceptColumnValueMap(this, columnValueMap); + } + + /** + * This method implements the method that is declared at super. + * + * @param columnValueMapString Column-value map-string. (NotNull and NotEmpty) + * @deprecated Please use CountriesDbm.getInstance().acceptColumnValueMap(entity, columnValueMapString); + */ + public void acceptColumnValueMapString(String columnValueMapString) { + getDBMeta().acceptColumnValueMapString(this, columnValueMapString); + } + + // =================================================================================== + // Extract + // ======= + /** + * This method implements the method that is declared at super. + * + * @return Primary-key map-string. (NotNull) + * @deprecated Please use CountriesDbm.getInstance().extractPrimaryKeyMapString(entity); + */ + public String extractPrimaryKeyMapString() { + return getDBMeta().extractPrimaryKeyMapString(this); + } + + /** + * Extract primary-key map-string. + * + * @param startBrace Start-brace. (NotNull) + * @param endBrace End-brace. (NotNull) + * @param delimiter Delimiter. (NotNull) + * @param equal Equal. (NotNull) + * @return Primary-key map-string. (NotNull) + * @deprecated Please use CountriesDbm.getInstance().extractPrimaryKeyMapString(entity, startBrace, endBrace, delimiter, equal); + */ + public String extractPrimaryKeyMapString(String startBrace, String endBrace, String delimiter, String equal) { + return getDBMeta().extractPrimaryKeyMapString(this, startBrace, endBrace, delimiter, equal); + } + + /** + * This method implements the method that is declared at super. + * + * @return Column-value map-string. (NotNull) + * @deprecated Please use CountriesDbm.getInstance().extractColumnValueMapString(entity); + */ + public String extractColumnValueMapString() { + return getDBMeta().extractColumnValueMapString(this); + } + + /** + * Extract column-value map-string. + * + * @param startBrace Start-brace. (NotNull) + * @param endBrace End-brace. (NotNull) + * @param delimiter Delimiter. (NotNull) + * @param equal Equal. (NotNull) + * @return Column-value map-string. (NotNull) + * @deprecated Please use CountriesDbm.getInstance().extractColumnValueMapString(entity, startBrace, endBrace, delimiter, equal); + */ + public String extractColumnValueMapString(String startBrace, String endBrace, String delimiter, String equal) { + return getDBMeta().extractColumnValueMapString(this, startBrace, endBrace, delimiter, equal); + } + + + // =================================================================================== + // Determination + // ============= + /** + * This method implements the method that is declared at super. + * + * @return Determination. + */ + public boolean hasPrimaryKeyValue() { + + if (_countriesId == null) { + return false; + } + + return true; + } + + // =================================================================================== + // Modified Properties + // =================== + /** + * Get modified property names. (S2Dao uses this for updateModifiedProperties()) + * + * @return Modified property names. (NotNull) + */ + public java.util.Set getModifiedPropertyNames() { + return _modifiedProperties.getPropertyNames(); + } + + /** + * New entity modified properties. You can override this at the sub-class if you need it. + * + * @return Entity modified properties. (NotNull) + */ + protected EntityModifiedProperties newEntityModifiedProperties() { + return new EntityModifiedProperties(); + } + + /** + * Clear modified property names. + */ + public void clearModifiedPropertyNames() { + _modifiedProperties.clear(); + } + + // =================================================================================== + // Basic Override + // ============== + + /** + * This method overrides the method that is declared at super. + * If the primary-key of the other is same as this one, returns true. + * + * @param other Other entity. + * @return Comparing result. + */ + public boolean equals(Object other) { + if (other == null) { + return false; + } + if (!(other instanceof BsCountries)) { + return false; + } + final BsCountries otherEntity = (BsCountries)other; + + if (getCountriesId() == null || !getCountriesId().equals(otherEntity.getCountriesId())) { + return false; + } + + return true; + } + + /** + * This method overrides the method that is declared at super. + * Calculates hash-code from primary-key. + * + * @return Hash-code from primary-keys. + */ + public int hashCode() { + int result = 0; + + if (this.getCountriesId() != null) { + result = result + getCountriesId().hashCode(); + } + + return result; + } + + /** + * This method overrides the method that is declared at super. + * + * @return Column-value map-string. (NotNull) + */ + public String toString() { + final String delimiter = ","; + final StringBuffer sb = new StringBuffer(); + + sb.append(delimiter).append(getCountriesId()); + sb.append(delimiter).append(getCountriesName()); + sb.append(delimiter).append(getCountriesIsoCode2()); + sb.append(delimiter).append(getCountriesIsoCode3()); + sb.append(delimiter).append(getAddressFormatId()); + + sb.delete(0, delimiter.length()); + sb.insert(0, "{").append("}"); + return sb.toString(); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/BsCurrencies.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/BsCurrencies.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/BsCurrencies.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,612 @@ +package jp.sf.pal.pompei.bsentity; + + +import jp.sf.pal.pompei.allcommon.Entity; +import jp.sf.pal.pompei.allcommon.dbmeta.DBMeta; +import jp.sf.pal.pompei.allcommon.dbmeta.DBMetaInstanceHandler; + +/** + * The entity of CURRENCIES. + * + *
+ * [primary-key]
+ *     CURRENCIES_ID
+ * 
+ * [column-property]
+ *     CURRENCIES_ID, TITLE, CODE, SYMBOL_LEFT, SYMBOL_RIGHT, DECIMAL_POINT, THOUSANDS_POINT, DECIMAL_PLACES, VALUE, LAST_UPDATED
+ * 
+ * [foreign-property]
+ *     
+ * 
+ * [refferer-property]
+ *     
+ * 
+ * [sequence]
+ *     
+ * 
+ * [identity]
+ *     
+ * 
+ * [update-date]
+ *     
+ * 
+ * [version-no]
+ *     
+ * 
+ * 
+ * + * @author DBFlute(AutoGenerator) + */ +public abstract class BsCurrencies implements Entity, java.io.Serializable { + + /** Serial version UID. (Default) */ + private static final long serialVersionUID = 1L; + + /** TABLE-Annotation for S2Dao */ + public static final String TABLE = "CURRENCIES"; + + + // =================================================================================== + // Attribute + // ========= + /** Entity modified properties. (for S2Dao) */ + protected EntityModifiedProperties _modifiedProperties = newEntityModifiedProperties(); + + + /** The value of currenciesId. ColumnDefinition -- PK : INTEGER : NotNull*/ + protected java.math.BigDecimal _currenciesId; + + /** The value of title. ColumnDefinition -- VARCHAR(32) : NotNull*/ + protected String _title; + + /** The value of code. ColumnDefinition -- CHAR(3) : NotNull*/ + protected String _code; + + /** The value of symbolLeft. ColumnDefinition -- VARCHAR(12)*/ + protected String _symbolLeft; + + /** The value of symbolRight. ColumnDefinition -- VARCHAR(12)*/ + protected String _symbolRight; + + /** The value of decimalPoint. ColumnDefinition -- CHAR(1)*/ + protected String _decimalPoint; + + /** The value of thousandsPoint. ColumnDefinition -- CHAR(1)*/ + protected String _thousandsPoint; + + /** The value of decimalPlaces. ColumnDefinition -- CHAR(1)*/ + protected String _decimalPlaces; + + /** The value of value. ColumnDefinition -- DOUBLE*/ + protected java.math.BigDecimal _value; + + /** The value of lastUpdated. ColumnDefinition -- TIMESTAMP*/ + protected java.sql.Timestamp _lastUpdated; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + public BsCurrencies() { + } + + + // =================================================================================== + // DBMeta + // ====== + /** + * This method implements the method that is declared at super. + * + * @return DBMeta. (NotNull) + */ + public DBMeta getDBMeta() { + return DBMetaInstanceHandler.getInstanceByTableDbName(getTableDbName()); + } + + // =================================================================================== + // Table Name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + public String getTableDbName() { + return "CURRENCIES"; + } + + /** + * This method implements the method that is declared at super. + * + * @return Table cap-prop-name. (NotNull) + */ + public String getTableCapPropName() { + return "Currencies"; + } + + /** + * This method implements the method that is declared at super. + * + * @return Table uncap-prop-name. (NotNull) + */ + public String getTableUncapPropName() { + return "currencies"; + } + + // =================================================================================== + // Accessor + // ======== + + /** Column-Annotation for S2Dao. ColumnDefinition -- PK : INTEGER : NotNull*/ + public static final String currenciesId_COLUMN = "CURRENCIES_ID"; + + /** + * Get the value of currenciesId.
+ * {PK : INTEGER : NotNull} + * + * @return The value of currenciesId. (Nullable) + */ + public java.math.BigDecimal getCurrenciesId() { + return _currenciesId; + } + + /** + * Set the value of currenciesId.
+ * {PK : INTEGER : NotNull} + * + * @param currenciesId The value of currenciesId. (Nullable) + */ + public void setCurrenciesId(java.math.BigDecimal currenciesId) { + _modifiedProperties.addPropertyName("currenciesId"); + _currenciesId = currenciesId; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- VARCHAR(32) : NotNull*/ + public static final String title_COLUMN = "TITLE"; + + /** + * Get the value of title.
+ * {VARCHAR(32) : NotNull} + * + * @return The value of title. (Nullable) + */ + public String getTitle() { + return _title; + } + + /** + * Set the value of title.
+ * {VARCHAR(32) : NotNull} + * + * @param title The value of title. (Nullable) + */ + public void setTitle(String title) { + _modifiedProperties.addPropertyName("title"); + _title = title; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- CHAR(3) : NotNull*/ + public static final String code_COLUMN = "CODE"; + + /** + * Get the value of code.
+ * {CHAR(3) : NotNull} + * + * @return The value of code. (Nullable) + */ + public String getCode() { + return _code; + } + + /** + * Set the value of code.
+ * {CHAR(3) : NotNull} + * + * @param code The value of code. (Nullable) + */ + public void setCode(String code) { + _modifiedProperties.addPropertyName("code"); + _code = code; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- VARCHAR(12)*/ + public static final String symbolLeft_COLUMN = "SYMBOL_LEFT"; + + /** + * Get the value of symbolLeft.
+ * {VARCHAR(12)} + * + * @return The value of symbolLeft. (Nullable) + */ + public String getSymbolLeft() { + return _symbolLeft; + } + + /** + * Set the value of symbolLeft.
+ * {VARCHAR(12)} + * + * @param symbolLeft The value of symbolLeft. (Nullable) + */ + public void setSymbolLeft(String symbolLeft) { + _modifiedProperties.addPropertyName("symbolLeft"); + _symbolLeft = symbolLeft; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- VARCHAR(12)*/ + public static final String symbolRight_COLUMN = "SYMBOL_RIGHT"; + + /** + * Get the value of symbolRight.
+ * {VARCHAR(12)} + * + * @return The value of symbolRight. (Nullable) + */ + public String getSymbolRight() { + return _symbolRight; + } + + /** + * Set the value of symbolRight.
+ * {VARCHAR(12)} + * + * @param symbolRight The value of symbolRight. (Nullable) + */ + public void setSymbolRight(String symbolRight) { + _modifiedProperties.addPropertyName("symbolRight"); + _symbolRight = symbolRight; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- CHAR(1)*/ + public static final String decimalPoint_COLUMN = "DECIMAL_POINT"; + + /** + * Get the value of decimalPoint.
+ * {CHAR(1)} + * + * @return The value of decimalPoint. (Nullable) + */ + public String getDecimalPoint() { + return _decimalPoint; + } + + /** + * Set the value of decimalPoint.
+ * {CHAR(1)} + * + * @param decimalPoint The value of decimalPoint. (Nullable) + */ + public void setDecimalPoint(String decimalPoint) { + _modifiedProperties.addPropertyName("decimalPoint"); + _decimalPoint = decimalPoint; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- CHAR(1)*/ + public static final String thousandsPoint_COLUMN = "THOUSANDS_POINT"; + + /** + * Get the value of thousandsPoint.
+ * {CHAR(1)} + * + * @return The value of thousandsPoint. (Nullable) + */ + public String getThousandsPoint() { + return _thousandsPoint; + } + + /** + * Set the value of thousandsPoint.
+ * {CHAR(1)} + * + * @param thousandsPoint The value of thousandsPoint. (Nullable) + */ + public void setThousandsPoint(String thousandsPoint) { + _modifiedProperties.addPropertyName("thousandsPoint"); + _thousandsPoint = thousandsPoint; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- CHAR(1)*/ + public static final String decimalPlaces_COLUMN = "DECIMAL_PLACES"; + + /** + * Get the value of decimalPlaces.
+ * {CHAR(1)} + * + * @return The value of decimalPlaces. (Nullable) + */ + public String getDecimalPlaces() { + return _decimalPlaces; + } + + /** + * Set the value of decimalPlaces.
+ * {CHAR(1)} + * + * @param decimalPlaces The value of decimalPlaces. (Nullable) + */ + public void setDecimalPlaces(String decimalPlaces) { + _modifiedProperties.addPropertyName("decimalPlaces"); + _decimalPlaces = decimalPlaces; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- DOUBLE*/ + public static final String value_COLUMN = "VALUE"; + + /** + * Get the value of value.
+ * {DOUBLE} + * + * @return The value of value. (Nullable) + */ + public java.math.BigDecimal getValue() { + return _value; + } + + /** + * Set the value of value.
+ * {DOUBLE} + * + * @param value The value of value. (Nullable) + */ + public void setValue(java.math.BigDecimal value) { + _modifiedProperties.addPropertyName("value"); + _value = value; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- TIMESTAMP*/ + public static final String lastUpdated_COLUMN = "LAST_UPDATED"; + + /** + * Get the value of lastUpdated.
+ * {TIMESTAMP} + * + * @return The value of lastUpdated. (Nullable) + */ + public java.sql.Timestamp getLastUpdated() { + return _lastUpdated; + } + + /** + * Set the value of lastUpdated.
+ * {TIMESTAMP} + * + * @param lastUpdated The value of lastUpdated. (Nullable) + */ + public void setLastUpdated(java.sql.Timestamp lastUpdated) { + _modifiedProperties.addPropertyName("lastUpdated"); + _lastUpdated = lastUpdated; + } + + + // =================================================================================== + // Classify Method + // =============== + + // =================================================================================== + // Classification Determination + // ============================ + + + // =================================================================================== + // Classification Getter + // ===================== + + + // =================================================================================== + // Foreign Table + // ============= + + // =================================================================================== + // Refferer Table + // ============== + + // =================================================================================== + // Accept + // ====== + /** + * This method implements the method that is declared at super. + * + * @param primaryKeyMap Primary key map. (NotNull and NotEmpty) + * @deprecated Please use CurrenciesDbm.getInstance().acceptPrimaryKeyMap(entity, primaryKeyMap); + */ + public void acceptPrimaryKeyMap(java.util.Map primaryKeyMap) { + getDBMeta().acceptPrimaryKeyMap(this, primaryKeyMap); + } + + /** + * This method implements the method that is declared at super. + * + * @param primaryKeyMapString Primary-key map-string. (NotNull and NotEmpty) + * @deprecated Please use CurrenciesDbm.getInstance().acceptPrimaryKeyMapString(entity, primaryKeyMapString); + */ + public void acceptPrimaryKeyMapString(String primaryKeyMapString) { + getDBMeta().acceptPrimaryKeyMapString(this, primaryKeyMapString); + } + + /** + * This method implements the method that is declared at super. + * + * @param columnValueMap Column-value map. (NotNull and NotEmpty) + * @deprecated Please use CurrenciesDbm.getInstance().acceptColumnValueMap(entity, columnValueMap); + */ + public void acceptColumnValueMap(java.util.Map columnValueMap) { + getDBMeta().acceptColumnValueMap(this, columnValueMap); + } + + /** + * This method implements the method that is declared at super. + * + * @param columnValueMapString Column-value map-string. (NotNull and NotEmpty) + * @deprecated Please use CurrenciesDbm.getInstance().acceptColumnValueMap(entity, columnValueMapString); + */ + public void acceptColumnValueMapString(String columnValueMapString) { + getDBMeta().acceptColumnValueMapString(this, columnValueMapString); + } + + // =================================================================================== + // Extract + // ======= + /** + * This method implements the method that is declared at super. + * + * @return Primary-key map-string. (NotNull) + * @deprecated Please use CurrenciesDbm.getInstance().extractPrimaryKeyMapString(entity); + */ + public String extractPrimaryKeyMapString() { + return getDBMeta().extractPrimaryKeyMapString(this); + } + + /** + * Extract primary-key map-string. + * + * @param startBrace Start-brace. (NotNull) + * @param endBrace End-brace. (NotNull) + * @param delimiter Delimiter. (NotNull) + * @param equal Equal. (NotNull) + * @return Primary-key map-string. (NotNull) + * @deprecated Please use CurrenciesDbm.getInstance().extractPrimaryKeyMapString(entity, startBrace, endBrace, delimiter, equal); + */ + public String extractPrimaryKeyMapString(String startBrace, String endBrace, String delimiter, String equal) { + return getDBMeta().extractPrimaryKeyMapString(this, startBrace, endBrace, delimiter, equal); + } + + /** + * This method implements the method that is declared at super. + * + * @return Column-value map-string. (NotNull) + * @deprecated Please use CurrenciesDbm.getInstance().extractColumnValueMapString(entity); + */ + public String extractColumnValueMapString() { + return getDBMeta().extractColumnValueMapString(this); + } + + /** + * Extract column-value map-string. + * + * @param startBrace Start-brace. (NotNull) + * @param endBrace End-brace. (NotNull) + * @param delimiter Delimiter. (NotNull) + * @param equal Equal. (NotNull) + * @return Column-value map-string. (NotNull) + * @deprecated Please use CurrenciesDbm.getInstance().extractColumnValueMapString(entity, startBrace, endBrace, delimiter, equal); + */ + public String extractColumnValueMapString(String startBrace, String endBrace, String delimiter, String equal) { + return getDBMeta().extractColumnValueMapString(this, startBrace, endBrace, delimiter, equal); + } + + + // =================================================================================== + // Determination + // ============= + /** + * This method implements the method that is declared at super. + * + * @return Determination. + */ + public boolean hasPrimaryKeyValue() { + + if (_currenciesId == null) { + return false; + } + + return true; + } + + // =================================================================================== + // Modified Properties + // =================== + /** + * Get modified property names. (S2Dao uses this for updateModifiedProperties()) + * + * @return Modified property names. (NotNull) + */ + public java.util.Set getModifiedPropertyNames() { + return _modifiedProperties.getPropertyNames(); + } + + /** + * New entity modified properties. You can override this at the sub-class if you need it. + * + * @return Entity modified properties. (NotNull) + */ + protected EntityModifiedProperties newEntityModifiedProperties() { + return new EntityModifiedProperties(); + } + + /** + * Clear modified property names. + */ + public void clearModifiedPropertyNames() { + _modifiedProperties.clear(); + } + + // =================================================================================== + // Basic Override + // ============== + + /** + * This method overrides the method that is declared at super. + * If the primary-key of the other is same as this one, returns true. + * + * @param other Other entity. + * @return Comparing result. + */ + public boolean equals(Object other) { + if (other == null) { + return false; + } + if (!(other instanceof BsCurrencies)) { + return false; + } + final BsCurrencies otherEntity = (BsCurrencies)other; + + if (getCurrenciesId() == null || !getCurrenciesId().equals(otherEntity.getCurrenciesId())) { + return false; + } + + return true; + } + + /** + * This method overrides the method that is declared at super. + * Calculates hash-code from primary-key. + * + * @return Hash-code from primary-keys. + */ + public int hashCode() { + int result = 0; + + if (this.getCurrenciesId() != null) { + result = result + getCurrenciesId().hashCode(); + } + + return result; + } + + /** + * This method overrides the method that is declared at super. + * + * @return Column-value map-string. (NotNull) + */ + public String toString() { + final String delimiter = ","; + final StringBuffer sb = new StringBuffer(); + + sb.append(delimiter).append(getCurrenciesId()); + sb.append(delimiter).append(getTitle()); + sb.append(delimiter).append(getCode()); + sb.append(delimiter).append(getSymbolLeft()); + sb.append(delimiter).append(getSymbolRight()); + sb.append(delimiter).append(getDecimalPoint()); + sb.append(delimiter).append(getThousandsPoint()); + sb.append(delimiter).append(getDecimalPlaces()); + sb.append(delimiter).append(getValue()); + sb.append(delimiter).append(getLastUpdated()); + + sb.delete(0, delimiter.length()); + sb.insert(0, "{").append("}"); + return sb.toString(); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/BsCustomers.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/BsCustomers.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/BsCustomers.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,640 @@ +package jp.sf.pal.pompei.bsentity; + + +import jp.sf.pal.pompei.allcommon.Entity; +import jp.sf.pal.pompei.allcommon.dbmeta.DBMeta; +import jp.sf.pal.pompei.allcommon.dbmeta.DBMetaInstanceHandler; + +/** + * The entity of CUSTOMERS. + * + *
+ * [primary-key]
+ *     CUSTOMERS_ID
+ * 
+ * [column-property]
+ *     CUSTOMERS_ID, CUSTOMERS_GENDER, CUSTOMERS_FIRSTNAME, CUSTOMERS_LASTNAME, CUSTOMERS_DOB, CUSTOMERS_EMAIL_ADDRESS, CUSTOMERS_DEFAULT_ADDRESS_ID, CUSTOMERS_TELEPHONE, CUSTOMERS_FAX, CUSTOMERS_PASSWORD, CUSTOMERS_NEWSLETTER
+ * 
+ * [foreign-property]
+ *     
+ * 
+ * [refferer-property]
+ *     
+ * 
+ * [sequence]
+ *     
+ * 
+ * [identity]
+ *     
+ * 
+ * [update-date]
+ *     
+ * 
+ * [version-no]
+ *     
+ * 
+ * 
+ * + * @author DBFlute(AutoGenerator) + */ +public abstract class BsCustomers implements Entity, java.io.Serializable { + + /** Serial version UID. (Default) */ + private static final long serialVersionUID = 1L; + + /** TABLE-Annotation for S2Dao */ + public static final String TABLE = "CUSTOMERS"; + + + // =================================================================================== + // Attribute + // ========= + /** Entity modified properties. (for S2Dao) */ + protected EntityModifiedProperties _modifiedProperties = newEntityModifiedProperties(); + + + /** The value of customersId. ColumnDefinition -- PK : INTEGER : NotNull*/ + protected java.math.BigDecimal _customersId; + + /** The value of customersGender. ColumnDefinition -- CHAR(1) : NotNull*/ + protected String _customersGender; + + /** The value of customersFirstname. ColumnDefinition -- VARCHAR(32) : NotNull*/ + protected String _customersFirstname; + + /** The value of customersLastname. ColumnDefinition -- VARCHAR(32) : NotNull*/ + protected String _customersLastname; + + /** The value of customersDob. ColumnDefinition -- TIMESTAMP : NotNull : Default=[0000-00-00 00:00:00]*/ + protected java.sql.Timestamp _customersDob; + + /** The value of customersEmailAddress. ColumnDefinition -- VARCHAR(96) : NotNull*/ + protected String _customersEmailAddress; + + /** The value of customersDefaultAddressId. ColumnDefinition -- INTEGER*/ + protected java.math.BigDecimal _customersDefaultAddressId; + + /** The value of customersTelephone. ColumnDefinition -- VARCHAR(32) : NotNull*/ + protected String _customersTelephone; + + /** The value of customersFax. ColumnDefinition -- VARCHAR(32)*/ + protected String _customersFax; + + /** The value of customersPassword. ColumnDefinition -- VARCHAR(40) : NotNull*/ + protected String _customersPassword; + + /** The value of customersNewsletter. ColumnDefinition -- CHAR(1)*/ + protected String _customersNewsletter; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + public BsCustomers() { + } + + + // =================================================================================== + // DBMeta + // ====== + /** + * This method implements the method that is declared at super. + * + * @return DBMeta. (NotNull) + */ + public DBMeta getDBMeta() { + return DBMetaInstanceHandler.getInstanceByTableDbName(getTableDbName()); + } + + // =================================================================================== + // Table Name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + public String getTableDbName() { + return "CUSTOMERS"; + } + + /** + * This method implements the method that is declared at super. + * + * @return Table cap-prop-name. (NotNull) + */ + public String getTableCapPropName() { + return "Customers"; + } + + /** + * This method implements the method that is declared at super. + * + * @return Table uncap-prop-name. (NotNull) + */ + public String getTableUncapPropName() { + return "customers"; + } + + // =================================================================================== + // Accessor + // ======== + + /** Column-Annotation for S2Dao. ColumnDefinition -- PK : INTEGER : NotNull*/ + public static final String customersId_COLUMN = "CUSTOMERS_ID"; + + /** + * Get the value of customersId.
+ * {PK : INTEGER : NotNull} + * + * @return The value of customersId. (Nullable) + */ + public java.math.BigDecimal getCustomersId() { + return _customersId; + } + + /** + * Set the value of customersId.
+ * {PK : INTEGER : NotNull} + * + * @param customersId The value of customersId. (Nullable) + */ + public void setCustomersId(java.math.BigDecimal customersId) { + _modifiedProperties.addPropertyName("customersId"); + _customersId = customersId; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- CHAR(1) : NotNull*/ + public static final String customersGender_COLUMN = "CUSTOMERS_GENDER"; + + /** + * Get the value of customersGender.
+ * {CHAR(1) : NotNull} + * + * @return The value of customersGender. (Nullable) + */ + public String getCustomersGender() { + return _customersGender; + } + + /** + * Set the value of customersGender.
+ * {CHAR(1) : NotNull} + * + * @param customersGender The value of customersGender. (Nullable) + */ + public void setCustomersGender(String customersGender) { + _modifiedProperties.addPropertyName("customersGender"); + _customersGender = customersGender; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- VARCHAR(32) : NotNull*/ + public static final String customersFirstname_COLUMN = "CUSTOMERS_FIRSTNAME"; + + /** + * Get the value of customersFirstname.
+ * {VARCHAR(32) : NotNull} + * + * @return The value of customersFirstname. (Nullable) + */ + public String getCustomersFirstname() { + return _customersFirstname; + } + + /** + * Set the value of customersFirstname.
+ * {VARCHAR(32) : NotNull} + * + * @param customersFirstname The value of customersFirstname. (Nullable) + */ + public void setCustomersFirstname(String customersFirstname) { + _modifiedProperties.addPropertyName("customersFirstname"); + _customersFirstname = customersFirstname; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- VARCHAR(32) : NotNull*/ + public static final String customersLastname_COLUMN = "CUSTOMERS_LASTNAME"; + + /** + * Get the value of customersLastname.
+ * {VARCHAR(32) : NotNull} + * + * @return The value of customersLastname. (Nullable) + */ + public String getCustomersLastname() { + return _customersLastname; + } + + /** + * Set the value of customersLastname.
+ * {VARCHAR(32) : NotNull} + * + * @param customersLastname The value of customersLastname. (Nullable) + */ + public void setCustomersLastname(String customersLastname) { + _modifiedProperties.addPropertyName("customersLastname"); + _customersLastname = customersLastname; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- TIMESTAMP : NotNull : Default=[0000-00-00 00:00:00]*/ + public static final String customersDob_COLUMN = "CUSTOMERS_DOB"; + + /** + * Get the value of customersDob.
+ * {TIMESTAMP : NotNull : Default=[0000-00-00 00:00:00]} + * + * @return The value of customersDob. (Nullable) + */ + public java.sql.Timestamp getCustomersDob() { + return _customersDob; + } + + /** + * Set the value of customersDob.
+ * {TIMESTAMP : NotNull : Default=[0000-00-00 00:00:00]} + * + * @param customersDob The value of customersDob. (Nullable) + */ + public void setCustomersDob(java.sql.Timestamp customersDob) { + _modifiedProperties.addPropertyName("customersDob"); + _customersDob = customersDob; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- VARCHAR(96) : NotNull*/ + public static final String customersEmailAddress_COLUMN = "CUSTOMERS_EMAIL_ADDRESS"; + + /** + * Get the value of customersEmailAddress.
+ * {VARCHAR(96) : NotNull} + * + * @return The value of customersEmailAddress. (Nullable) + */ + public String getCustomersEmailAddress() { + return _customersEmailAddress; + } + + /** + * Set the value of customersEmailAddress.
+ * {VARCHAR(96) : NotNull} + * + * @param customersEmailAddress The value of customersEmailAddress. (Nullable) + */ + public void setCustomersEmailAddress(String customersEmailAddress) { + _modifiedProperties.addPropertyName("customersEmailAddress"); + _customersEmailAddress = customersEmailAddress; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- INTEGER*/ + public static final String customersDefaultAddressId_COLUMN = "CUSTOMERS_DEFAULT_ADDRESS_ID"; + + /** + * Get the value of customersDefaultAddressId.
+ * {INTEGER} + * + * @return The value of customersDefaultAddressId. (Nullable) + */ + public java.math.BigDecimal getCustomersDefaultAddressId() { + return _customersDefaultAddressId; + } + + /** + * Set the value of customersDefaultAddressId.
+ * {INTEGER} + * + * @param customersDefaultAddressId The value of customersDefaultAddressId. (Nullable) + */ + public void setCustomersDefaultAddressId(java.math.BigDecimal customersDefaultAddressId) { + _modifiedProperties.addPropertyName("customersDefaultAddressId"); + _customersDefaultAddressId = customersDefaultAddressId; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- VARCHAR(32) : NotNull*/ + public static final String customersTelephone_COLUMN = "CUSTOMERS_TELEPHONE"; + + /** + * Get the value of customersTelephone.
+ * {VARCHAR(32) : NotNull} + * + * @return The value of customersTelephone. (Nullable) + */ + public String getCustomersTelephone() { + return _customersTelephone; + } + + /** + * Set the value of customersTelephone.
+ * {VARCHAR(32) : NotNull} + * + * @param customersTelephone The value of customersTelephone. (Nullable) + */ + public void setCustomersTelephone(String customersTelephone) { + _modifiedProperties.addPropertyName("customersTelephone"); + _customersTelephone = customersTelephone; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- VARCHAR(32)*/ + public static final String customersFax_COLUMN = "CUSTOMERS_FAX"; + + /** + * Get the value of customersFax.
+ * {VARCHAR(32)} + * + * @return The value of customersFax. (Nullable) + */ + public String getCustomersFax() { + return _customersFax; + } + + /** + * Set the value of customersFax.
+ * {VARCHAR(32)} + * + * @param customersFax The value of customersFax. (Nullable) + */ + public void setCustomersFax(String customersFax) { + _modifiedProperties.addPropertyName("customersFax"); + _customersFax = customersFax; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- VARCHAR(40) : NotNull*/ + public static final String customersPassword_COLUMN = "CUSTOMERS_PASSWORD"; + + /** + * Get the value of customersPassword.
+ * {VARCHAR(40) : NotNull} + * + * @return The value of customersPassword. (Nullable) + */ + public String getCustomersPassword() { + return _customersPassword; + } + + /** + * Set the value of customersPassword.
+ * {VARCHAR(40) : NotNull} + * + * @param customersPassword The value of customersPassword. (Nullable) + */ + public void setCustomersPassword(String customersPassword) { + _modifiedProperties.addPropertyName("customersPassword"); + _customersPassword = customersPassword; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- CHAR(1)*/ + public static final String customersNewsletter_COLUMN = "CUSTOMERS_NEWSLETTER"; + + /** + * Get the value of customersNewsletter.
+ * {CHAR(1)} + * + * @return The value of customersNewsletter. (Nullable) + */ + public String getCustomersNewsletter() { + return _customersNewsletter; + } + + /** + * Set the value of customersNewsletter.
+ * {CHAR(1)} + * + * @param customersNewsletter The value of customersNewsletter. (Nullable) + */ + public void setCustomersNewsletter(String customersNewsletter) { + _modifiedProperties.addPropertyName("customersNewsletter"); + _customersNewsletter = customersNewsletter; + } + + + // =================================================================================== + // Classify Method + // =============== + + // =================================================================================== + // Classification Determination + // ============================ + + + // =================================================================================== + // Classification Getter + // ===================== + + + // =================================================================================== + // Foreign Table + // ============= + + // =================================================================================== + // Refferer Table + // ============== + + // =================================================================================== + // Accept + // ====== + /** + * This method implements the method that is declared at super. + * + * @param primaryKeyMap Primary key map. (NotNull and NotEmpty) + * @deprecated Please use CustomersDbm.getInstance().acceptPrimaryKeyMap(entity, primaryKeyMap); + */ + public void acceptPrimaryKeyMap(java.util.Map primaryKeyMap) { + getDBMeta().acceptPrimaryKeyMap(this, primaryKeyMap); + } + + /** + * This method implements the method that is declared at super. + * + * @param primaryKeyMapString Primary-key map-string. (NotNull and NotEmpty) + * @deprecated Please use CustomersDbm.getInstance().acceptPrimaryKeyMapString(entity, primaryKeyMapString); + */ + public void acceptPrimaryKeyMapString(String primaryKeyMapString) { + getDBMeta().acceptPrimaryKeyMapString(this, primaryKeyMapString); + } + + /** + * This method implements the method that is declared at super. + * + * @param columnValueMap Column-value map. (NotNull and NotEmpty) + * @deprecated Please use CustomersDbm.getInstance().acceptColumnValueMap(entity, columnValueMap); + */ + public void acceptColumnValueMap(java.util.Map columnValueMap) { + getDBMeta().acceptColumnValueMap(this, columnValueMap); + } + + /** + * This method implements the method that is declared at super. + * + * @param columnValueMapString Column-value map-string. (NotNull and NotEmpty) + * @deprecated Please use CustomersDbm.getInstance().acceptColumnValueMap(entity, columnValueMapString); + */ + public void acceptColumnValueMapString(String columnValueMapString) { + getDBMeta().acceptColumnValueMapString(this, columnValueMapString); + } + + // =================================================================================== + // Extract + // ======= + /** + * This method implements the method that is declared at super. + * + * @return Primary-key map-string. (NotNull) + * @deprecated Please use CustomersDbm.getInstance().extractPrimaryKeyMapString(entity); + */ + public String extractPrimaryKeyMapString() { + return getDBMeta().extractPrimaryKeyMapString(this); + } + + /** + * Extract primary-key map-string. + * + * @param startBrace Start-brace. (NotNull) + * @param endBrace End-brace. (NotNull) + * @param delimiter Delimiter. (NotNull) + * @param equal Equal. (NotNull) + * @return Primary-key map-string. (NotNull) + * @deprecated Please use CustomersDbm.getInstance().extractPrimaryKeyMapString(entity, startBrace, endBrace, delimiter, equal); + */ + public String extractPrimaryKeyMapString(String startBrace, String endBrace, String delimiter, String equal) { + return getDBMeta().extractPrimaryKeyMapString(this, startBrace, endBrace, delimiter, equal); + } + + /** + * This method implements the method that is declared at super. + * + * @return Column-value map-string. (NotNull) + * @deprecated Please use CustomersDbm.getInstance().extractColumnValueMapString(entity); + */ + public String extractColumnValueMapString() { + return getDBMeta().extractColumnValueMapString(this); + } + + /** + * Extract column-value map-string. + * + * @param startBrace Start-brace. (NotNull) + * @param endBrace End-brace. (NotNull) + * @param delimiter Delimiter. (NotNull) + * @param equal Equal. (NotNull) + * @return Column-value map-string. (NotNull) + * @deprecated Please use CustomersDbm.getInstance().extractColumnValueMapString(entity, startBrace, endBrace, delimiter, equal); + */ + public String extractColumnValueMapString(String startBrace, String endBrace, String delimiter, String equal) { + return getDBMeta().extractColumnValueMapString(this, startBrace, endBrace, delimiter, equal); + } + + + // =================================================================================== + // Determination + // ============= + /** + * This method implements the method that is declared at super. + * + * @return Determination. + */ + public boolean hasPrimaryKeyValue() { + + if (_customersId == null) { + return false; + } + + return true; + } + + // =================================================================================== + // Modified Properties + // =================== + /** + * Get modified property names. (S2Dao uses this for updateModifiedProperties()) + * + * @return Modified property names. (NotNull) + */ + public java.util.Set getModifiedPropertyNames() { + return _modifiedProperties.getPropertyNames(); + } + + /** + * New entity modified properties. You can override this at the sub-class if you need it. + * + * @return Entity modified properties. (NotNull) + */ + protected EntityModifiedProperties newEntityModifiedProperties() { + return new EntityModifiedProperties(); + } + + /** + * Clear modified property names. + */ + public void clearModifiedPropertyNames() { + _modifiedProperties.clear(); + } + + // =================================================================================== + // Basic Override + // ============== + + /** + * This method overrides the method that is declared at super. + * If the primary-key of the other is same as this one, returns true. + * + * @param other Other entity. + * @return Comparing result. + */ + public boolean equals(Object other) { + if (other == null) { + return false; + } + if (!(other instanceof BsCustomers)) { + return false; + } + final BsCustomers otherEntity = (BsCustomers)other; + + if (getCustomersId() == null || !getCustomersId().equals(otherEntity.getCustomersId())) { + return false; + } + + return true; + } + + /** + * This method overrides the method that is declared at super. + * Calculates hash-code from primary-key. + * + * @return Hash-code from primary-keys. + */ + public int hashCode() { + int result = 0; + + if (this.getCustomersId() != null) { + result = result + getCustomersId().hashCode(); + } + + return result; + } + + /** + * This method overrides the method that is declared at super. + * + * @return Column-value map-string. (NotNull) + */ + public String toString() { + final String delimiter = ","; + final StringBuffer sb = new StringBuffer(); + + sb.append(delimiter).append(getCustomersId()); + sb.append(delimiter).append(getCustomersGender()); + sb.append(delimiter).append(getCustomersFirstname()); + sb.append(delimiter).append(getCustomersLastname()); + sb.append(delimiter).append(getCustomersDob()); + sb.append(delimiter).append(getCustomersEmailAddress()); + sb.append(delimiter).append(getCustomersDefaultAddressId()); + sb.append(delimiter).append(getCustomersTelephone()); + sb.append(delimiter).append(getCustomersFax()); + sb.append(delimiter).append(getCustomersPassword()); + sb.append(delimiter).append(getCustomersNewsletter()); + + sb.delete(0, delimiter.length()); + sb.insert(0, "{").append("}"); + return sb.toString(); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/BsCustomersBasket.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/BsCustomersBasket.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/BsCustomersBasket.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,500 @@ +package jp.sf.pal.pompei.bsentity; + + +import jp.sf.pal.pompei.allcommon.Entity; +import jp.sf.pal.pompei.allcommon.dbmeta.DBMeta; +import jp.sf.pal.pompei.allcommon.dbmeta.DBMetaInstanceHandler; + +/** + * The entity of CUSTOMERS_BASKET. + * + *
+ * [primary-key]
+ *     CUSTOMERS_BASKET_ID
+ * 
+ * [column-property]
+ *     CUSTOMERS_BASKET_ID, CUSTOMERS_ID, PRODUCTS_ID, CUSTOMERS_BASKET_QUANTITY, FINAL_PRICE, CUSTOMERS_BASKET_DATE_ADDED
+ * 
+ * [foreign-property]
+ *     
+ * 
+ * [refferer-property]
+ *     
+ * 
+ * [sequence]
+ *     
+ * 
+ * [identity]
+ *     
+ * 
+ * [update-date]
+ *     
+ * 
+ * [version-no]
+ *     
+ * 
+ * 
+ * + * @author DBFlute(AutoGenerator) + */ +public abstract class BsCustomersBasket implements Entity, java.io.Serializable { + + /** Serial version UID. (Default) */ + private static final long serialVersionUID = 1L; + + /** TABLE-Annotation for S2Dao */ + public static final String TABLE = "CUSTOMERS_BASKET"; + + + // =================================================================================== + // Attribute + // ========= + /** Entity modified properties. (for S2Dao) */ + protected EntityModifiedProperties _modifiedProperties = newEntityModifiedProperties(); + + + /** The value of customersBasketId. ColumnDefinition -- PK : INTEGER : NotNull*/ + protected java.math.BigDecimal _customersBasketId; + + /** The value of customersId. ColumnDefinition -- INTEGER : NotNull*/ + protected java.math.BigDecimal _customersId; + + /** The value of productsId. ColumnDefinition -- LONG VARCHAR(32700) : NotNull*/ + protected String _productsId; + + /** The value of customersBasketQuantity. ColumnDefinition -- INTEGER : NotNull*/ + protected java.math.BigDecimal _customersBasketQuantity; + + /** The value of finalPrice. ColumnDefinition -- DECIMAL(15)*/ + protected java.math.BigDecimal _finalPrice; + + /** The value of customersBasketDateAdded. ColumnDefinition -- CHAR(8)*/ + protected String _customersBasketDateAdded; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + public BsCustomersBasket() { + } + + + // =================================================================================== + // DBMeta + // ====== + /** + * This method implements the method that is declared at super. + * + * @return DBMeta. (NotNull) + */ + public DBMeta getDBMeta() { + return DBMetaInstanceHandler.getInstanceByTableDbName(getTableDbName()); + } + + // =================================================================================== + // Table Name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + public String getTableDbName() { + return "CUSTOMERS_BASKET"; + } + + /** + * This method implements the method that is declared at super. + * + * @return Table cap-prop-name. (NotNull) + */ + public String getTableCapPropName() { + return "CustomersBasket"; + } + + /** + * This method implements the method that is declared at super. + * + * @return Table uncap-prop-name. (NotNull) + */ + public String getTableUncapPropName() { + return "customersBasket"; + } + + // =================================================================================== + // Accessor + // ======== + + /** Column-Annotation for S2Dao. ColumnDefinition -- PK : INTEGER : NotNull*/ + public static final String customersBasketId_COLUMN = "CUSTOMERS_BASKET_ID"; + + /** + * Get the value of customersBasketId.
+ * {PK : INTEGER : NotNull} + * + * @return The value of customersBasketId. (Nullable) + */ + public java.math.BigDecimal getCustomersBasketId() { + return _customersBasketId; + } + + /** + * Set the value of customersBasketId.
+ * {PK : INTEGER : NotNull} + * + * @param customersBasketId The value of customersBasketId. (Nullable) + */ + public void setCustomersBasketId(java.math.BigDecimal customersBasketId) { + _modifiedProperties.addPropertyName("customersBasketId"); + _customersBasketId = customersBasketId; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- INTEGER : NotNull*/ + public static final String customersId_COLUMN = "CUSTOMERS_ID"; + + /** + * Get the value of customersId.
+ * {INTEGER : NotNull} + * + * @return The value of customersId. (Nullable) + */ + public java.math.BigDecimal getCustomersId() { + return _customersId; + } + + /** + * Set the value of customersId.
+ * {INTEGER : NotNull} + * + * @param customersId The value of customersId. (Nullable) + */ + public void setCustomersId(java.math.BigDecimal customersId) { + _modifiedProperties.addPropertyName("customersId"); + _customersId = customersId; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- LONG VARCHAR(32700) : NotNull*/ + public static final String productsId_COLUMN = "PRODUCTS_ID"; + + /** + * Get the value of productsId.
+ * {LONG VARCHAR(32700) : NotNull} + * + * @return The value of productsId. (Nullable) + */ + public String getProductsId() { + return _productsId; + } + + /** + * Set the value of productsId.
+ * {LONG VARCHAR(32700) : NotNull} + * + * @param productsId The value of productsId. (Nullable) + */ + public void setProductsId(String productsId) { + _modifiedProperties.addPropertyName("productsId"); + _productsId = productsId; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- INTEGER : NotNull*/ + public static final String customersBasketQuantity_COLUMN = "CUSTOMERS_BASKET_QUANTITY"; + + /** + * Get the value of customersBasketQuantity.
+ * {INTEGER : NotNull} + * + * @return The value of customersBasketQuantity. (Nullable) + */ + public java.math.BigDecimal getCustomersBasketQuantity() { + return _customersBasketQuantity; + } + + /** + * Set the value of customersBasketQuantity.
+ * {INTEGER : NotNull} + * + * @param customersBasketQuantity The value of customersBasketQuantity. (Nullable) + */ + public void setCustomersBasketQuantity(java.math.BigDecimal customersBasketQuantity) { + _modifiedProperties.addPropertyName("customersBasketQuantity"); + _customersBasketQuantity = customersBasketQuantity; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- DECIMAL(15)*/ + public static final String finalPrice_COLUMN = "FINAL_PRICE"; + + /** + * Get the value of finalPrice.
+ * {DECIMAL(15)} + * + * @return The value of finalPrice. (Nullable) + */ + public java.math.BigDecimal getFinalPrice() { + return _finalPrice; + } + + /** + * Set the value of finalPrice.
+ * {DECIMAL(15)} + * + * @param finalPrice The value of finalPrice. (Nullable) + */ + public void setFinalPrice(java.math.BigDecimal finalPrice) { + _modifiedProperties.addPropertyName("finalPrice"); + _finalPrice = finalPrice; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- CHAR(8)*/ + public static final String customersBasketDateAdded_COLUMN = "CUSTOMERS_BASKET_DATE_ADDED"; + + /** + * Get the value of customersBasketDateAdded.
+ * {CHAR(8)} + * + * @return The value of customersBasketDateAdded. (Nullable) + */ + public String getCustomersBasketDateAdded() { + return _customersBasketDateAdded; + } + + /** + * Set the value of customersBasketDateAdded.
+ * {CHAR(8)} + * + * @param customersBasketDateAdded The value of customersBasketDateAdded. (Nullable) + */ + public void setCustomersBasketDateAdded(String customersBasketDateAdded) { + _modifiedProperties.addPropertyName("customersBasketDateAdded"); + _customersBasketDateAdded = customersBasketDateAdded; + } + + + // =================================================================================== + // Classify Method + // =============== + + // =================================================================================== + // Classification Determination + // ============================ + + + // =================================================================================== + // Classification Getter + // ===================== + + + // =================================================================================== + // Foreign Table + // ============= + + // =================================================================================== + // Refferer Table + // ============== + + // =================================================================================== + // Accept + // ====== + /** + * This method implements the method that is declared at super. + * + * @param primaryKeyMap Primary key map. (NotNull and NotEmpty) + * @deprecated Please use CustomersBasketDbm.getInstance().acceptPrimaryKeyMap(entity, primaryKeyMap); + */ + public void acceptPrimaryKeyMap(java.util.Map primaryKeyMap) { + getDBMeta().acceptPrimaryKeyMap(this, primaryKeyMap); + } + + /** + * This method implements the method that is declared at super. + * + * @param primaryKeyMapString Primary-key map-string. (NotNull and NotEmpty) + * @deprecated Please use CustomersBasketDbm.getInstance().acceptPrimaryKeyMapString(entity, primaryKeyMapString); + */ + public void acceptPrimaryKeyMapString(String primaryKeyMapString) { + getDBMeta().acceptPrimaryKeyMapString(this, primaryKeyMapString); + } + + /** + * This method implements the method that is declared at super. + * + * @param columnValueMap Column-value map. (NotNull and NotEmpty) + * @deprecated Please use CustomersBasketDbm.getInstance().acceptColumnValueMap(entity, columnValueMap); + */ + public void acceptColumnValueMap(java.util.Map columnValueMap) { + getDBMeta().acceptColumnValueMap(this, columnValueMap); + } + + /** + * This method implements the method that is declared at super. + * + * @param columnValueMapString Column-value map-string. (NotNull and NotEmpty) + * @deprecated Please use CustomersBasketDbm.getInstance().acceptColumnValueMap(entity, columnValueMapString); + */ + public void acceptColumnValueMapString(String columnValueMapString) { + getDBMeta().acceptColumnValueMapString(this, columnValueMapString); + } + + // =================================================================================== + // Extract + // ======= + /** + * This method implements the method that is declared at super. + * + * @return Primary-key map-string. (NotNull) + * @deprecated Please use CustomersBasketDbm.getInstance().extractPrimaryKeyMapString(entity); + */ + public String extractPrimaryKeyMapString() { + return getDBMeta().extractPrimaryKeyMapString(this); + } + + /** + * Extract primary-key map-string. + * + * @param startBrace Start-brace. (NotNull) + * @param endBrace End-brace. (NotNull) + * @param delimiter Delimiter. (NotNull) + * @param equal Equal. (NotNull) + * @return Primary-key map-string. (NotNull) + * @deprecated Please use CustomersBasketDbm.getInstance().extractPrimaryKeyMapString(entity, startBrace, endBrace, delimiter, equal); + */ + public String extractPrimaryKeyMapString(String startBrace, String endBrace, String delimiter, String equal) { + return getDBMeta().extractPrimaryKeyMapString(this, startBrace, endBrace, delimiter, equal); + } + + /** + * This method implements the method that is declared at super. + * + * @return Column-value map-string. (NotNull) + * @deprecated Please use CustomersBasketDbm.getInstance().extractColumnValueMapString(entity); + */ + public String extractColumnValueMapString() { + return getDBMeta().extractColumnValueMapString(this); + } + + /** + * Extract column-value map-string. + * + * @param startBrace Start-brace. (NotNull) + * @param endBrace End-brace. (NotNull) + * @param delimiter Delimiter. (NotNull) + * @param equal Equal. (NotNull) + * @return Column-value map-string. (NotNull) + * @deprecated Please use CustomersBasketDbm.getInstance().extractColumnValueMapString(entity, startBrace, endBrace, delimiter, equal); + */ + public String extractColumnValueMapString(String startBrace, String endBrace, String delimiter, String equal) { + return getDBMeta().extractColumnValueMapString(this, startBrace, endBrace, delimiter, equal); + } + + + // =================================================================================== + // Determination + // ============= + /** + * This method implements the method that is declared at super. + * + * @return Determination. + */ + public boolean hasPrimaryKeyValue() { + + if (_customersBasketId == null) { + return false; + } + + return true; + } + + // =================================================================================== + // Modified Properties + // =================== + /** + * Get modified property names. (S2Dao uses this for updateModifiedProperties()) + * + * @return Modified property names. (NotNull) + */ + public java.util.Set getModifiedPropertyNames() { + return _modifiedProperties.getPropertyNames(); + } + + /** + * New entity modified properties. You can override this at the sub-class if you need it. + * + * @return Entity modified properties. (NotNull) + */ + protected EntityModifiedProperties newEntityModifiedProperties() { + return new EntityModifiedProperties(); + } + + /** + * Clear modified property names. + */ + public void clearModifiedPropertyNames() { + _modifiedProperties.clear(); + } + + // =================================================================================== + // Basic Override + // ============== + + /** + * This method overrides the method that is declared at super. + * If the primary-key of the other is same as this one, returns true. + * + * @param other Other entity. + * @return Comparing result. + */ + public boolean equals(Object other) { + if (other == null) { + return false; + } + if (!(other instanceof BsCustomersBasket)) { + return false; + } + final BsCustomersBasket otherEntity = (BsCustomersBasket)other; + + if (getCustomersBasketId() == null || !getCustomersBasketId().equals(otherEntity.getCustomersBasketId())) { + return false; + } + + return true; + } + + /** + * This method overrides the method that is declared at super. + * Calculates hash-code from primary-key. + * + * @return Hash-code from primary-keys. + */ + public int hashCode() { + int result = 0; + + if (this.getCustomersBasketId() != null) { + result = result + getCustomersBasketId().hashCode(); + } + + return result; + } + + /** + * This method overrides the method that is declared at super. + * + * @return Column-value map-string. (NotNull) + */ + public String toString() { + final String delimiter = ","; + final StringBuffer sb = new StringBuffer(); + + sb.append(delimiter).append(getCustomersBasketId()); + sb.append(delimiter).append(getCustomersId()); + sb.append(delimiter).append(getProductsId()); + sb.append(delimiter).append(getCustomersBasketQuantity()); + sb.append(delimiter).append(getFinalPrice()); + sb.append(delimiter).append(getCustomersBasketDateAdded()); + + sb.delete(0, delimiter.length()); + sb.insert(0, "{").append("}"); + return sb.toString(); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/BsCustomersBasketAttributes.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/BsCustomersBasketAttributes.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/BsCustomersBasketAttributes.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,472 @@ +package jp.sf.pal.pompei.bsentity; + + +import jp.sf.pal.pompei.allcommon.Entity; +import jp.sf.pal.pompei.allcommon.dbmeta.DBMeta; +import jp.sf.pal.pompei.allcommon.dbmeta.DBMetaInstanceHandler; + +/** + * The entity of CUSTOMERS_BASKET_ATTRIBUTES. + * + *
+ * [primary-key]
+ *     CUSTOMERS_BASKET_ATTRIBUTES_ID
+ * 
+ * [column-property]
+ *     CUSTOMERS_BASKET_ATTRIBUTES_ID, CUSTOMERS_ID, PRODUCTS_ID, PRODUCTS_OPTIONS_ID, PRODUCTS_OPTIONS_VALUE_ID
+ * 
+ * [foreign-property]
+ *     
+ * 
+ * [refferer-property]
+ *     
+ * 
+ * [sequence]
+ *     
+ * 
+ * [identity]
+ *     
+ * 
+ * [update-date]
+ *     
+ * 
+ * [version-no]
+ *     
+ * 
+ * 
+ * + * @author DBFlute(AutoGenerator) + */ +public abstract class BsCustomersBasketAttributes implements Entity, java.io.Serializable { + + /** Serial version UID. (Default) */ + private static final long serialVersionUID = 1L; + + /** TABLE-Annotation for S2Dao */ + public static final String TABLE = "CUSTOMERS_BASKET_ATTRIBUTES"; + + + // =================================================================================== + // Attribute + // ========= + /** Entity modified properties. (for S2Dao) */ + protected EntityModifiedProperties _modifiedProperties = newEntityModifiedProperties(); + + + /** The value of customersBasketAttributesId. ColumnDefinition -- PK : INTEGER : NotNull*/ + protected java.math.BigDecimal _customersBasketAttributesId; + + /** The value of customersId. ColumnDefinition -- INTEGER : NotNull*/ + protected java.math.BigDecimal _customersId; + + /** The value of productsId. ColumnDefinition -- LONG VARCHAR(32700) : NotNull*/ + protected String _productsId; + + /** The value of productsOptionsId. ColumnDefinition -- INTEGER : NotNull*/ + protected java.math.BigDecimal _productsOptionsId; + + /** The value of productsOptionsValueId. ColumnDefinition -- INTEGER : NotNull*/ + protected java.math.BigDecimal _productsOptionsValueId; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + public BsCustomersBasketAttributes() { + } + + + // =================================================================================== + // DBMeta + // ====== + /** + * This method implements the method that is declared at super. + * + * @return DBMeta. (NotNull) + */ + public DBMeta getDBMeta() { + return DBMetaInstanceHandler.getInstanceByTableDbName(getTableDbName()); + } + + // =================================================================================== + // Table Name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + public String getTableDbName() { + return "CUSTOMERS_BASKET_ATTRIBUTES"; + } + + /** + * This method implements the method that is declared at super. + * + * @return Table cap-prop-name. (NotNull) + */ + public String getTableCapPropName() { + return "CustomersBasketAttributes"; + } + + /** + * This method implements the method that is declared at super. + * + * @return Table uncap-prop-name. (NotNull) + */ + public String getTableUncapPropName() { + return "customersBasketAttributes"; + } + + // =================================================================================== + // Accessor + // ======== + + /** Column-Annotation for S2Dao. ColumnDefinition -- PK : INTEGER : NotNull*/ + public static final String customersBasketAttributesId_COLUMN = "CUSTOMERS_BASKET_ATTRIBUTES_ID"; + + /** + * Get the value of customersBasketAttributesId.
+ * {PK : INTEGER : NotNull} + * + * @return The value of customersBasketAttributesId. (Nullable) + */ + public java.math.BigDecimal getCustomersBasketAttributesId() { + return _customersBasketAttributesId; + } + + /** + * Set the value of customersBasketAttributesId.
+ * {PK : INTEGER : NotNull} + * + * @param customersBasketAttributesId The value of customersBasketAttributesId. (Nullable) + */ + public void setCustomersBasketAttributesId(java.math.BigDecimal customersBasketAttributesId) { + _modifiedProperties.addPropertyName("customersBasketAttributesId"); + _customersBasketAttributesId = customersBasketAttributesId; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- INTEGER : NotNull*/ + public static final String customersId_COLUMN = "CUSTOMERS_ID"; + + /** + * Get the value of customersId.
+ * {INTEGER : NotNull} + * + * @return The value of customersId. (Nullable) + */ + public java.math.BigDecimal getCustomersId() { + return _customersId; + } + + /** + * Set the value of customersId.
+ * {INTEGER : NotNull} + * + * @param customersId The value of customersId. (Nullable) + */ + public void setCustomersId(java.math.BigDecimal customersId) { + _modifiedProperties.addPropertyName("customersId"); + _customersId = customersId; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- LONG VARCHAR(32700) : NotNull*/ + public static final String productsId_COLUMN = "PRODUCTS_ID"; + + /** + * Get the value of productsId.
+ * {LONG VARCHAR(32700) : NotNull} + * + * @return The value of productsId. (Nullable) + */ + public String getProductsId() { + return _productsId; + } + + /** + * Set the value of productsId.
+ * {LONG VARCHAR(32700) : NotNull} + * + * @param productsId The value of productsId. (Nullable) + */ + public void setProductsId(String productsId) { + _modifiedProperties.addPropertyName("productsId"); + _productsId = productsId; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- INTEGER : NotNull*/ + public static final String productsOptionsId_COLUMN = "PRODUCTS_OPTIONS_ID"; + + /** + * Get the value of productsOptionsId.
+ * {INTEGER : NotNull} + * + * @return The value of productsOptionsId. (Nullable) + */ + public java.math.BigDecimal getProductsOptionsId() { + return _productsOptionsId; + } + + /** + * Set the value of productsOptionsId.
+ * {INTEGER : NotNull} + * + * @param productsOptionsId The value of productsOptionsId. (Nullable) + */ + public void setProductsOptionsId(java.math.BigDecimal productsOptionsId) { + _modifiedProperties.addPropertyName("productsOptionsId"); + _productsOptionsId = productsOptionsId; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- INTEGER : NotNull*/ + public static final String productsOptionsValueId_COLUMN = "PRODUCTS_OPTIONS_VALUE_ID"; + + /** + * Get the value of productsOptionsValueId.
+ * {INTEGER : NotNull} + * + * @return The value of productsOptionsValueId. (Nullable) + */ + public java.math.BigDecimal getProductsOptionsValueId() { + return _productsOptionsValueId; + } + + /** + * Set the value of productsOptionsValueId.
+ * {INTEGER : NotNull} + * + * @param productsOptionsValueId The value of productsOptionsValueId. (Nullable) + */ + public void setProductsOptionsValueId(java.math.BigDecimal productsOptionsValueId) { + _modifiedProperties.addPropertyName("productsOptionsValueId"); + _productsOptionsValueId = productsOptionsValueId; + } + + + // =================================================================================== + // Classify Method + // =============== + + // =================================================================================== + // Classification Determination + // ============================ + + + // =================================================================================== + // Classification Getter + // ===================== + + + // =================================================================================== + // Foreign Table + // ============= + + // =================================================================================== + // Refferer Table + // ============== + + // =================================================================================== + // Accept + // ====== + /** + * This method implements the method that is declared at super. + * + * @param primaryKeyMap Primary key map. (NotNull and NotEmpty) + * @deprecated Please use CustomersBasketAttributesDbm.getInstance().acceptPrimaryKeyMap(entity, primaryKeyMap); + */ + public void acceptPrimaryKeyMap(java.util.Map primaryKeyMap) { + getDBMeta().acceptPrimaryKeyMap(this, primaryKeyMap); + } + + /** + * This method implements the method that is declared at super. + * + * @param primaryKeyMapString Primary-key map-string. (NotNull and NotEmpty) + * @deprecated Please use CustomersBasketAttributesDbm.getInstance().acceptPrimaryKeyMapString(entity, primaryKeyMapString); + */ + public void acceptPrimaryKeyMapString(String primaryKeyMapString) { + getDBMeta().acceptPrimaryKeyMapString(this, primaryKeyMapString); + } + + /** + * This method implements the method that is declared at super. + * + * @param columnValueMap Column-value map. (NotNull and NotEmpty) + * @deprecated Please use CustomersBasketAttributesDbm.getInstance().acceptColumnValueMap(entity, columnValueMap); + */ + public void acceptColumnValueMap(java.util.Map columnValueMap) { + getDBMeta().acceptColumnValueMap(this, columnValueMap); + } + + /** + * This method implements the method that is declared at super. + * + * @param columnValueMapString Column-value map-string. (NotNull and NotEmpty) + * @deprecated Please use CustomersBasketAttributesDbm.getInstance().acceptColumnValueMap(entity, columnValueMapString); + */ + public void acceptColumnValueMapString(String columnValueMapString) { + getDBMeta().acceptColumnValueMapString(this, columnValueMapString); + } + + // =================================================================================== + // Extract + // ======= + /** + * This method implements the method that is declared at super. + * + * @return Primary-key map-string. (NotNull) + * @deprecated Please use CustomersBasketAttributesDbm.getInstance().extractPrimaryKeyMapString(entity); + */ + public String extractPrimaryKeyMapString() { + return getDBMeta().extractPrimaryKeyMapString(this); + } + + /** + * Extract primary-key map-string. + * + * @param startBrace Start-brace. (NotNull) + * @param endBrace End-brace. (NotNull) + * @param delimiter Delimiter. (NotNull) + * @param equal Equal. (NotNull) + * @return Primary-key map-string. (NotNull) + * @deprecated Please use CustomersBasketAttributesDbm.getInstance().extractPrimaryKeyMapString(entity, startBrace, endBrace, delimiter, equal); + */ + public String extractPrimaryKeyMapString(String startBrace, String endBrace, String delimiter, String equal) { + return getDBMeta().extractPrimaryKeyMapString(this, startBrace, endBrace, delimiter, equal); + } + + /** + * This method implements the method that is declared at super. + * + * @return Column-value map-string. (NotNull) + * @deprecated Please use CustomersBasketAttributesDbm.getInstance().extractColumnValueMapString(entity); + */ + public String extractColumnValueMapString() { + return getDBMeta().extractColumnValueMapString(this); + } + + /** + * Extract column-value map-string. + * + * @param startBrace Start-brace. (NotNull) + * @param endBrace End-brace. (NotNull) + * @param delimiter Delimiter. (NotNull) + * @param equal Equal. (NotNull) + * @return Column-value map-string. (NotNull) + * @deprecated Please use CustomersBasketAttributesDbm.getInstance().extractColumnValueMapString(entity, startBrace, endBrace, delimiter, equal); + */ + public String extractColumnValueMapString(String startBrace, String endBrace, String delimiter, String equal) { + return getDBMeta().extractColumnValueMapString(this, startBrace, endBrace, delimiter, equal); + } + + + // =================================================================================== + // Determination + // ============= + /** + * This method implements the method that is declared at super. + * + * @return Determination. + */ + public boolean hasPrimaryKeyValue() { + + if (_customersBasketAttributesId == null) { + return false; + } + + return true; + } + + // =================================================================================== + // Modified Properties + // =================== + /** + * Get modified property names. (S2Dao uses this for updateModifiedProperties()) + * + * @return Modified property names. (NotNull) + */ + public java.util.Set getModifiedPropertyNames() { + return _modifiedProperties.getPropertyNames(); + } + + /** + * New entity modified properties. You can override this at the sub-class if you need it. + * + * @return Entity modified properties. (NotNull) + */ + protected EntityModifiedProperties newEntityModifiedProperties() { + return new EntityModifiedProperties(); + } + + /** + * Clear modified property names. + */ + public void clearModifiedPropertyNames() { + _modifiedProperties.clear(); + } + + // =================================================================================== + // Basic Override + // ============== + + /** + * This method overrides the method that is declared at super. + * If the primary-key of the other is same as this one, returns true. + * + * @param other Other entity. + * @return Comparing result. + */ + public boolean equals(Object other) { + if (other == null) { + return false; + } + if (!(other instanceof BsCustomersBasketAttributes)) { + return false; + } + final BsCustomersBasketAttributes otherEntity = (BsCustomersBasketAttributes)other; + + if (getCustomersBasketAttributesId() == null || !getCustomersBasketAttributesId().equals(otherEntity.getCustomersBasketAttributesId())) { + return false; + } + + return true; + } + + /** + * This method overrides the method that is declared at super. + * Calculates hash-code from primary-key. + * + * @return Hash-code from primary-keys. + */ + public int hashCode() { + int result = 0; + + if (this.getCustomersBasketAttributesId() != null) { + result = result + getCustomersBasketAttributesId().hashCode(); + } + + return result; + } + + /** + * This method overrides the method that is declared at super. + * + * @return Column-value map-string. (NotNull) + */ + public String toString() { + final String delimiter = ","; + final StringBuffer sb = new StringBuffer(); + + sb.append(delimiter).append(getCustomersBasketAttributesId()); + sb.append(delimiter).append(getCustomersId()); + sb.append(delimiter).append(getProductsId()); + sb.append(delimiter).append(getProductsOptionsId()); + sb.append(delimiter).append(getProductsOptionsValueId()); + + sb.delete(0, delimiter.length()); + sb.insert(0, "{").append("}"); + return sb.toString(); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/BsCustomersInfo.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/BsCustomersInfo.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/BsCustomersInfo.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,500 @@ +package jp.sf.pal.pompei.bsentity; + + +import jp.sf.pal.pompei.allcommon.Entity; +import jp.sf.pal.pompei.allcommon.dbmeta.DBMeta; +import jp.sf.pal.pompei.allcommon.dbmeta.DBMetaInstanceHandler; + +/** + * The entity of CUSTOMERS_INFO. + * + *
+ * [primary-key]
+ *     CUSTOMERS_INFO_ID
+ * 
+ * [column-property]
+ *     CUSTOMERS_INFO_ID, CUSTOMERS_INFO_DATE_OF_LAST_LOGON, CUSTOMERS_INFO_NUMBER_OF_LOGONS, CUSTOMERS_INFO_DATE_ACCOUNT_CREATED, CUSTOMERS_INFO_DATE_ACCOUNT_LAST_MODIFIED, GLOBAL_PRODUCT_NOTIFICATIONS
+ * 
+ * [foreign-property]
+ *     
+ * 
+ * [refferer-property]
+ *     
+ * 
+ * [sequence]
+ *     
+ * 
+ * [identity]
+ *     
+ * 
+ * [update-date]
+ *     
+ * 
+ * [version-no]
+ *     
+ * 
+ * 
+ * + * @author DBFlute(AutoGenerator) + */ +public abstract class BsCustomersInfo implements Entity, java.io.Serializable { + + /** Serial version UID. (Default) */ + private static final long serialVersionUID = 1L; + + /** TABLE-Annotation for S2Dao */ + public static final String TABLE = "CUSTOMERS_INFO"; + + + // =================================================================================== + // Attribute + // ========= + /** Entity modified properties. (for S2Dao) */ + protected EntityModifiedProperties _modifiedProperties = newEntityModifiedProperties(); + + + /** The value of customersInfoId. ColumnDefinition -- PK : INTEGER : NotNull*/ + protected java.math.BigDecimal _customersInfoId; + + /** The value of customersInfoDateOfLastLogon. ColumnDefinition -- TIMESTAMP*/ + protected java.sql.Timestamp _customersInfoDateOfLastLogon; + + /** The value of customersInfoNumberOfLogons. ColumnDefinition -- INTEGER*/ + protected java.math.BigDecimal _customersInfoNumberOfLogons; + + /** The value of customersInfoDateAccountCreated. ColumnDefinition -- TIMESTAMP*/ + protected java.sql.Timestamp _customersInfoDateAccountCreated; + + /** The value of customersInfoDateAccountLastModified. ColumnDefinition -- TIMESTAMP*/ + protected java.sql.Timestamp _customersInfoDateAccountLastModified; + + /** The value of globalProductNotifications. ColumnDefinition -- INTEGER : Default=[0]*/ + protected java.math.BigDecimal _globalProductNotifications; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + public BsCustomersInfo() { + } + + + // =================================================================================== + // DBMeta + // ====== + /** + * This method implements the method that is declared at super. + * + * @return DBMeta. (NotNull) + */ + public DBMeta getDBMeta() { + return DBMetaInstanceHandler.getInstanceByTableDbName(getTableDbName()); + } + + // =================================================================================== + // Table Name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + public String getTableDbName() { + return "CUSTOMERS_INFO"; + } + + /** + * This method implements the method that is declared at super. + * + * @return Table cap-prop-name. (NotNull) + */ + public String getTableCapPropName() { + return "CustomersInfo"; + } + + /** + * This method implements the method that is declared at super. + * + * @return Table uncap-prop-name. (NotNull) + */ + public String getTableUncapPropName() { + return "customersInfo"; + } + + // =================================================================================== + // Accessor + // ======== + + /** Column-Annotation for S2Dao. ColumnDefinition -- PK : INTEGER : NotNull*/ + public static final String customersInfoId_COLUMN = "CUSTOMERS_INFO_ID"; + + /** + * Get the value of customersInfoId.
+ * {PK : INTEGER : NotNull} + * + * @return The value of customersInfoId. (Nullable) + */ + public java.math.BigDecimal getCustomersInfoId() { + return _customersInfoId; + } + + /** + * Set the value of customersInfoId.
+ * {PK : INTEGER : NotNull} + * + * @param customersInfoId The value of customersInfoId. (Nullable) + */ + public void setCustomersInfoId(java.math.BigDecimal customersInfoId) { + _modifiedProperties.addPropertyName("customersInfoId"); + _customersInfoId = customersInfoId; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- TIMESTAMP*/ + public static final String customersInfoDateOfLastLogon_COLUMN = "CUSTOMERS_INFO_DATE_OF_LAST_LOGON"; + + /** + * Get the value of customersInfoDateOfLastLogon.
+ * {TIMESTAMP} + * + * @return The value of customersInfoDateOfLastLogon. (Nullable) + */ + public java.sql.Timestamp getCustomersInfoDateOfLastLogon() { + return _customersInfoDateOfLastLogon; + } + + /** + * Set the value of customersInfoDateOfLastLogon.
+ * {TIMESTAMP} + * + * @param customersInfoDateOfLastLogon The value of customersInfoDateOfLastLogon. (Nullable) + */ + public void setCustomersInfoDateOfLastLogon(java.sql.Timestamp customersInfoDateOfLastLogon) { + _modifiedProperties.addPropertyName("customersInfoDateOfLastLogon"); + _customersInfoDateOfLastLogon = customersInfoDateOfLastLogon; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- INTEGER*/ + public static final String customersInfoNumberOfLogons_COLUMN = "CUSTOMERS_INFO_NUMBER_OF_LOGONS"; + + /** + * Get the value of customersInfoNumberOfLogons.
+ * {INTEGER} + * + * @return The value of customersInfoNumberOfLogons. (Nullable) + */ + public java.math.BigDecimal getCustomersInfoNumberOfLogons() { + return _customersInfoNumberOfLogons; + } + + /** + * Set the value of customersInfoNumberOfLogons.
+ * {INTEGER} + * + * @param customersInfoNumberOfLogons The value of customersInfoNumberOfLogons. (Nullable) + */ + public void setCustomersInfoNumberOfLogons(java.math.BigDecimal customersInfoNumberOfLogons) { + _modifiedProperties.addPropertyName("customersInfoNumberOfLogons"); + _customersInfoNumberOfLogons = customersInfoNumberOfLogons; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- TIMESTAMP*/ + public static final String customersInfoDateAccountCreated_COLUMN = "CUSTOMERS_INFO_DATE_ACCOUNT_CREATED"; + + /** + * Get the value of customersInfoDateAccountCreated.
+ * {TIMESTAMP} + * + * @return The value of customersInfoDateAccountCreated. (Nullable) + */ + public java.sql.Timestamp getCustomersInfoDateAccountCreated() { + return _customersInfoDateAccountCreated; + } + + /** + * Set the value of customersInfoDateAccountCreated.
+ * {TIMESTAMP} + * + * @param customersInfoDateAccountCreated The value of customersInfoDateAccountCreated. (Nullable) + */ + public void setCustomersInfoDateAccountCreated(java.sql.Timestamp customersInfoDateAccountCreated) { + _modifiedProperties.addPropertyName("customersInfoDateAccountCreated"); + _customersInfoDateAccountCreated = customersInfoDateAccountCreated; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- TIMESTAMP*/ + public static final String customersInfoDateAccountLastModified_COLUMN = "CUSTOMERS_INFO_DATE_ACCOUNT_LAST_MODIFIED"; + + /** + * Get the value of customersInfoDateAccountLastModified.
+ * {TIMESTAMP} + * + * @return The value of customersInfoDateAccountLastModified. (Nullable) + */ + public java.sql.Timestamp getCustomersInfoDateAccountLastModified() { + return _customersInfoDateAccountLastModified; + } + + /** + * Set the value of customersInfoDateAccountLastModified.
+ * {TIMESTAMP} + * + * @param customersInfoDateAccountLastModified The value of customersInfoDateAccountLastModified. (Nullable) + */ + public void setCustomersInfoDateAccountLastModified(java.sql.Timestamp customersInfoDateAccountLastModified) { + _modifiedProperties.addPropertyName("customersInfoDateAccountLastModified"); + _customersInfoDateAccountLastModified = customersInfoDateAccountLastModified; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- INTEGER : Default=[0]*/ + public static final String globalProductNotifications_COLUMN = "GLOBAL_PRODUCT_NOTIFICATIONS"; + + /** + * Get the value of globalProductNotifications.
+ * {INTEGER : Default=[0]} + * + * @return The value of globalProductNotifications. (Nullable) + */ + public java.math.BigDecimal getGlobalProductNotifications() { + return _globalProductNotifications; + } + + /** + * Set the value of globalProductNotifications.
+ * {INTEGER : Default=[0]} + * + * @param globalProductNotifications The value of globalProductNotifications. (Nullable) + */ + public void setGlobalProductNotifications(java.math.BigDecimal globalProductNotifications) { + _modifiedProperties.addPropertyName("globalProductNotifications"); + _globalProductNotifications = globalProductNotifications; + } + + + // =================================================================================== + // Classify Method + // =============== + + // =================================================================================== + // Classification Determination + // ============================ + + + // =================================================================================== + // Classification Getter + // ===================== + + + // =================================================================================== + // Foreign Table + // ============= + + // =================================================================================== + // Refferer Table + // ============== + + // =================================================================================== + // Accept + // ====== + /** + * This method implements the method that is declared at super. + * + * @param primaryKeyMap Primary key map. (NotNull and NotEmpty) + * @deprecated Please use CustomersInfoDbm.getInstance().acceptPrimaryKeyMap(entity, primaryKeyMap); + */ + public void acceptPrimaryKeyMap(java.util.Map primaryKeyMap) { + getDBMeta().acceptPrimaryKeyMap(this, primaryKeyMap); + } + + /** + * This method implements the method that is declared at super. + * + * @param primaryKeyMapString Primary-key map-string. (NotNull and NotEmpty) + * @deprecated Please use CustomersInfoDbm.getInstance().acceptPrimaryKeyMapString(entity, primaryKeyMapString); + */ + public void acceptPrimaryKeyMapString(String primaryKeyMapString) { + getDBMeta().acceptPrimaryKeyMapString(this, primaryKeyMapString); + } + + /** + * This method implements the method that is declared at super. + * + * @param columnValueMap Column-value map. (NotNull and NotEmpty) + * @deprecated Please use CustomersInfoDbm.getInstance().acceptColumnValueMap(entity, columnValueMap); + */ + public void acceptColumnValueMap(java.util.Map columnValueMap) { + getDBMeta().acceptColumnValueMap(this, columnValueMap); + } + + /** + * This method implements the method that is declared at super. + * + * @param columnValueMapString Column-value map-string. (NotNull and NotEmpty) + * @deprecated Please use CustomersInfoDbm.getInstance().acceptColumnValueMap(entity, columnValueMapString); + */ + public void acceptColumnValueMapString(String columnValueMapString) { + getDBMeta().acceptColumnValueMapString(this, columnValueMapString); + } + + // =================================================================================== + // Extract + // ======= + /** + * This method implements the method that is declared at super. + * + * @return Primary-key map-string. (NotNull) + * @deprecated Please use CustomersInfoDbm.getInstance().extractPrimaryKeyMapString(entity); + */ + public String extractPrimaryKeyMapString() { + return getDBMeta().extractPrimaryKeyMapString(this); + } + + /** + * Extract primary-key map-string. + * + * @param startBrace Start-brace. (NotNull) + * @param endBrace End-brace. (NotNull) + * @param delimiter Delimiter. (NotNull) + * @param equal Equal. (NotNull) + * @return Primary-key map-string. (NotNull) + * @deprecated Please use CustomersInfoDbm.getInstance().extractPrimaryKeyMapString(entity, startBrace, endBrace, delimiter, equal); + */ + public String extractPrimaryKeyMapString(String startBrace, String endBrace, String delimiter, String equal) { + return getDBMeta().extractPrimaryKeyMapString(this, startBrace, endBrace, delimiter, equal); + } + + /** + * This method implements the method that is declared at super. + * + * @return Column-value map-string. (NotNull) + * @deprecated Please use CustomersInfoDbm.getInstance().extractColumnValueMapString(entity); + */ + public String extractColumnValueMapString() { + return getDBMeta().extractColumnValueMapString(this); + } + + /** + * Extract column-value map-string. + * + * @param startBrace Start-brace. (NotNull) + * @param endBrace End-brace. (NotNull) + * @param delimiter Delimiter. (NotNull) + * @param equal Equal. (NotNull) + * @return Column-value map-string. (NotNull) + * @deprecated Please use CustomersInfoDbm.getInstance().extractColumnValueMapString(entity, startBrace, endBrace, delimiter, equal); + */ + public String extractColumnValueMapString(String startBrace, String endBrace, String delimiter, String equal) { + return getDBMeta().extractColumnValueMapString(this, startBrace, endBrace, delimiter, equal); + } + + + // =================================================================================== + // Determination + // ============= + /** + * This method implements the method that is declared at super. + * + * @return Determination. + */ + public boolean hasPrimaryKeyValue() { + + if (_customersInfoId == null) { + return false; + } + + return true; + } + + // =================================================================================== + // Modified Properties + // =================== + /** + * Get modified property names. (S2Dao uses this for updateModifiedProperties()) + * + * @return Modified property names. (NotNull) + */ + public java.util.Set getModifiedPropertyNames() { + return _modifiedProperties.getPropertyNames(); + } + + /** + * New entity modified properties. You can override this at the sub-class if you need it. + * + * @return Entity modified properties. (NotNull) + */ + protected EntityModifiedProperties newEntityModifiedProperties() { + return new EntityModifiedProperties(); + } + + /** + * Clear modified property names. + */ + public void clearModifiedPropertyNames() { + _modifiedProperties.clear(); + } + + // =================================================================================== + // Basic Override + // ============== + + /** + * This method overrides the method that is declared at super. + * If the primary-key of the other is same as this one, returns true. + * + * @param other Other entity. + * @return Comparing result. + */ + public boolean equals(Object other) { + if (other == null) { + return false; + } + if (!(other instanceof BsCustomersInfo)) { + return false; + } + final BsCustomersInfo otherEntity = (BsCustomersInfo)other; + + if (getCustomersInfoId() == null || !getCustomersInfoId().equals(otherEntity.getCustomersInfoId())) { + return false; + } + + return true; + } + + /** + * This method overrides the method that is declared at super. + * Calculates hash-code from primary-key. + * + * @return Hash-code from primary-keys. + */ + public int hashCode() { + int result = 0; + + if (this.getCustomersInfoId() != null) { + result = result + getCustomersInfoId().hashCode(); + } + + return result; + } + + /** + * This method overrides the method that is declared at super. + * + * @return Column-value map-string. (NotNull) + */ + public String toString() { + final String delimiter = ","; + final StringBuffer sb = new StringBuffer(); + + sb.append(delimiter).append(getCustomersInfoId()); + sb.append(delimiter).append(getCustomersInfoDateOfLastLogon()); + sb.append(delimiter).append(getCustomersInfoNumberOfLogons()); + sb.append(delimiter).append(getCustomersInfoDateAccountCreated()); + sb.append(delimiter).append(getCustomersInfoDateAccountLastModified()); + sb.append(delimiter).append(getGlobalProductNotifications()); + + sb.delete(0, delimiter.length()); + sb.insert(0, "{").append("}"); + return sb.toString(); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/BsGeoZones.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/BsGeoZones.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/BsGeoZones.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,472 @@ +package jp.sf.pal.pompei.bsentity; + + +import jp.sf.pal.pompei.allcommon.Entity; +import jp.sf.pal.pompei.allcommon.dbmeta.DBMeta; +import jp.sf.pal.pompei.allcommon.dbmeta.DBMetaInstanceHandler; + +/** + * The entity of GEO_ZONES. + * + *
+ * [primary-key]
+ *     GEO_ZONE_ID
+ * 
+ * [column-property]
+ *     GEO_ZONE_ID, GEO_ZONE_NAME, GEO_ZONE_DESCRIPTION, LAST_MODIFIED, DATE_ADDED
+ * 
+ * [foreign-property]
+ *     
+ * 
+ * [refferer-property]
+ *     
+ * 
+ * [sequence]
+ *     
+ * 
+ * [identity]
+ *     
+ * 
+ * [update-date]
+ *     
+ * 
+ * [version-no]
+ *     
+ * 
+ * 
+ * + * @author DBFlute(AutoGenerator) + */ +public abstract class BsGeoZones implements Entity, java.io.Serializable { + + /** Serial version UID. (Default) */ + private static final long serialVersionUID = 1L; + + /** TABLE-Annotation for S2Dao */ + public static final String TABLE = "GEO_ZONES"; + + + // =================================================================================== + // Attribute + // ========= + /** Entity modified properties. (for S2Dao) */ + protected EntityModifiedProperties _modifiedProperties = newEntityModifiedProperties(); + + + /** The value of geoZoneId. ColumnDefinition -- PK : INTEGER : NotNull*/ + protected java.math.BigDecimal _geoZoneId; + + /** The value of geoZoneName. ColumnDefinition -- VARCHAR(32) : NotNull*/ + protected String _geoZoneName; + + /** The value of geoZoneDescription. ColumnDefinition -- VARCHAR(255) : NotNull*/ + protected String _geoZoneDescription; + + /** The value of lastModified. ColumnDefinition -- TIMESTAMP*/ + protected java.sql.Timestamp _lastModified; + + /** The value of dateAdded. ColumnDefinition -- TIMESTAMP : NotNull*/ + protected java.sql.Timestamp _dateAdded; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + public BsGeoZones() { + } + + + // =================================================================================== + // DBMeta + // ====== + /** + * This method implements the method that is declared at super. + * + * @return DBMeta. (NotNull) + */ + public DBMeta getDBMeta() { + return DBMetaInstanceHandler.getInstanceByTableDbName(getTableDbName()); + } + + // =================================================================================== + // Table Name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + public String getTableDbName() { + return "GEO_ZONES"; + } + + /** + * This method implements the method that is declared at super. + * + * @return Table cap-prop-name. (NotNull) + */ + public String getTableCapPropName() { + return "GeoZones"; + } + + /** + * This method implements the method that is declared at super. + * + * @return Table uncap-prop-name. (NotNull) + */ + public String getTableUncapPropName() { + return "geoZones"; + } + + // =================================================================================== + // Accessor + // ======== + + /** Column-Annotation for S2Dao. ColumnDefinition -- PK : INTEGER : NotNull*/ + public static final String geoZoneId_COLUMN = "GEO_ZONE_ID"; + + /** + * Get the value of geoZoneId.
+ * {PK : INTEGER : NotNull} + * + * @return The value of geoZoneId. (Nullable) + */ + public java.math.BigDecimal getGeoZoneId() { + return _geoZoneId; + } + + /** + * Set the value of geoZoneId.
+ * {PK : INTEGER : NotNull} + * + * @param geoZoneId The value of geoZoneId. (Nullable) + */ + public void setGeoZoneId(java.math.BigDecimal geoZoneId) { + _modifiedProperties.addPropertyName("geoZoneId"); + _geoZoneId = geoZoneId; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- VARCHAR(32) : NotNull*/ + public static final String geoZoneName_COLUMN = "GEO_ZONE_NAME"; + + /** + * Get the value of geoZoneName.
+ * {VARCHAR(32) : NotNull} + * + * @return The value of geoZoneName. (Nullable) + */ + public String getGeoZoneName() { + return _geoZoneName; + } + + /** + * Set the value of geoZoneName.
+ * {VARCHAR(32) : NotNull} + * + * @param geoZoneName The value of geoZoneName. (Nullable) + */ + public void setGeoZoneName(String geoZoneName) { + _modifiedProperties.addPropertyName("geoZoneName"); + _geoZoneName = geoZoneName; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- VARCHAR(255) : NotNull*/ + public static final String geoZoneDescription_COLUMN = "GEO_ZONE_DESCRIPTION"; + + /** + * Get the value of geoZoneDescription.
+ * {VARCHAR(255) : NotNull} + * + * @return The value of geoZoneDescription. (Nullable) + */ + public String getGeoZoneDescription() { + return _geoZoneDescription; + } + + /** + * Set the value of geoZoneDescription.
+ * {VARCHAR(255) : NotNull} + * + * @param geoZoneDescription The value of geoZoneDescription. (Nullable) + */ + public void setGeoZoneDescription(String geoZoneDescription) { + _modifiedProperties.addPropertyName("geoZoneDescription"); + _geoZoneDescription = geoZoneDescription; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- TIMESTAMP*/ + public static final String lastModified_COLUMN = "LAST_MODIFIED"; + + /** + * Get the value of lastModified.
+ * {TIMESTAMP} + * + * @return The value of lastModified. (Nullable) + */ + public java.sql.Timestamp getLastModified() { + return _lastModified; + } + + /** + * Set the value of lastModified.
+ * {TIMESTAMP} + * + * @param lastModified The value of lastModified. (Nullable) + */ + public void setLastModified(java.sql.Timestamp lastModified) { + _modifiedProperties.addPropertyName("lastModified"); + _lastModified = lastModified; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- TIMESTAMP : NotNull*/ + public static final String dateAdded_COLUMN = "DATE_ADDED"; + + /** + * Get the value of dateAdded.
+ * {TIMESTAMP : NotNull} + * + * @return The value of dateAdded. (Nullable) + */ + public java.sql.Timestamp getDateAdded() { + return _dateAdded; + } + + /** + * Set the value of dateAdded.
+ * {TIMESTAMP : NotNull} + * + * @param dateAdded The value of dateAdded. (Nullable) + */ + public void setDateAdded(java.sql.Timestamp dateAdded) { + _modifiedProperties.addPropertyName("dateAdded"); + _dateAdded = dateAdded; + } + + + // =================================================================================== + // Classify Method + // =============== + + // =================================================================================== + // Classification Determination + // ============================ + + + // =================================================================================== + // Classification Getter + // ===================== + + + // =================================================================================== + // Foreign Table + // ============= + + // =================================================================================== + // Refferer Table + // ============== + + // =================================================================================== + // Accept + // ====== + /** + * This method implements the method that is declared at super. + * + * @param primaryKeyMap Primary key map. (NotNull and NotEmpty) + * @deprecated Please use GeoZonesDbm.getInstance().acceptPrimaryKeyMap(entity, primaryKeyMap); + */ + public void acceptPrimaryKeyMap(java.util.Map primaryKeyMap) { + getDBMeta().acceptPrimaryKeyMap(this, primaryKeyMap); + } + + /** + * This method implements the method that is declared at super. + * + * @param primaryKeyMapString Primary-key map-string. (NotNull and NotEmpty) + * @deprecated Please use GeoZonesDbm.getInstance().acceptPrimaryKeyMapString(entity, primaryKeyMapString); + */ + public void acceptPrimaryKeyMapString(String primaryKeyMapString) { + getDBMeta().acceptPrimaryKeyMapString(this, primaryKeyMapString); + } + + /** + * This method implements the method that is declared at super. + * + * @param columnValueMap Column-value map. (NotNull and NotEmpty) + * @deprecated Please use GeoZonesDbm.getInstance().acceptColumnValueMap(entity, columnValueMap); + */ + public void acceptColumnValueMap(java.util.Map columnValueMap) { + getDBMeta().acceptColumnValueMap(this, columnValueMap); + } + + /** + * This method implements the method that is declared at super. + * + * @param columnValueMapString Column-value map-string. (NotNull and NotEmpty) + * @deprecated Please use GeoZonesDbm.getInstance().acceptColumnValueMap(entity, columnValueMapString); + */ + public void acceptColumnValueMapString(String columnValueMapString) { + getDBMeta().acceptColumnValueMapString(this, columnValueMapString); + } + + // =================================================================================== + // Extract + // ======= + /** + * This method implements the method that is declared at super. + * + * @return Primary-key map-string. (NotNull) + * @deprecated Please use GeoZonesDbm.getInstance().extractPrimaryKeyMapString(entity); + */ + public String extractPrimaryKeyMapString() { + return getDBMeta().extractPrimaryKeyMapString(this); + } + + /** + * Extract primary-key map-string. + * + * @param startBrace Start-brace. (NotNull) + * @param endBrace End-brace. (NotNull) + * @param delimiter Delimiter. (NotNull) + * @param equal Equal. (NotNull) + * @return Primary-key map-string. (NotNull) + * @deprecated Please use GeoZonesDbm.getInstance().extractPrimaryKeyMapString(entity, startBrace, endBrace, delimiter, equal); + */ + public String extractPrimaryKeyMapString(String startBrace, String endBrace, String delimiter, String equal) { + return getDBMeta().extractPrimaryKeyMapString(this, startBrace, endBrace, delimiter, equal); + } + + /** + * This method implements the method that is declared at super. + * + * @return Column-value map-string. (NotNull) + * @deprecated Please use GeoZonesDbm.getInstance().extractColumnValueMapString(entity); + */ + public String extractColumnValueMapString() { + return getDBMeta().extractColumnValueMapString(this); + } + + /** + * Extract column-value map-string. + * + * @param startBrace Start-brace. (NotNull) + * @param endBrace End-brace. (NotNull) + * @param delimiter Delimiter. (NotNull) + * @param equal Equal. (NotNull) + * @return Column-value map-string. (NotNull) + * @deprecated Please use GeoZonesDbm.getInstance().extractColumnValueMapString(entity, startBrace, endBrace, delimiter, equal); + */ + public String extractColumnValueMapString(String startBrace, String endBrace, String delimiter, String equal) { + return getDBMeta().extractColumnValueMapString(this, startBrace, endBrace, delimiter, equal); + } + + + // =================================================================================== + // Determination + // ============= + /** + * This method implements the method that is declared at super. + * + * @return Determination. + */ + public boolean hasPrimaryKeyValue() { + + if (_geoZoneId == null) { + return false; + } + + return true; + } + + // =================================================================================== + // Modified Properties + // =================== + /** + * Get modified property names. (S2Dao uses this for updateModifiedProperties()) + * + * @return Modified property names. (NotNull) + */ + public java.util.Set getModifiedPropertyNames() { + return _modifiedProperties.getPropertyNames(); + } + + /** + * New entity modified properties. You can override this at the sub-class if you need it. + * + * @return Entity modified properties. (NotNull) + */ + protected EntityModifiedProperties newEntityModifiedProperties() { + return new EntityModifiedProperties(); + } + + /** + * Clear modified property names. + */ + public void clearModifiedPropertyNames() { + _modifiedProperties.clear(); + } + + // =================================================================================== + // Basic Override + // ============== + + /** + * This method overrides the method that is declared at super. + * If the primary-key of the other is same as this one, returns true. + * + * @param other Other entity. + * @return Comparing result. + */ + public boolean equals(Object other) { + if (other == null) { + return false; + } + if (!(other instanceof BsGeoZones)) { + return false; + } + final BsGeoZones otherEntity = (BsGeoZones)other; + + if (getGeoZoneId() == null || !getGeoZoneId().equals(otherEntity.getGeoZoneId())) { + return false; + } + + return true; + } + + /** + * This method overrides the method that is declared at super. + * Calculates hash-code from primary-key. + * + * @return Hash-code from primary-keys. + */ + public int hashCode() { + int result = 0; + + if (this.getGeoZoneId() != null) { + result = result + getGeoZoneId().hashCode(); + } + + return result; + } + + /** + * This method overrides the method that is declared at super. + * + * @return Column-value map-string. (NotNull) + */ + public String toString() { + final String delimiter = ","; + final StringBuffer sb = new StringBuffer(); + + sb.append(delimiter).append(getGeoZoneId()); + sb.append(delimiter).append(getGeoZoneName()); + sb.append(delimiter).append(getGeoZoneDescription()); + sb.append(delimiter).append(getLastModified()); + sb.append(delimiter).append(getDateAdded()); + + sb.delete(0, delimiter.length()); + sb.insert(0, "{").append("}"); + return sb.toString(); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/BsLanguages.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/BsLanguages.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/BsLanguages.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,500 @@ +package jp.sf.pal.pompei.bsentity; + + +import jp.sf.pal.pompei.allcommon.Entity; +import jp.sf.pal.pompei.allcommon.dbmeta.DBMeta; +import jp.sf.pal.pompei.allcommon.dbmeta.DBMetaInstanceHandler; + +/** + * The entity of LANGUAGES. + * + *
+ * [primary-key]
+ *     LANGUAGES_ID
+ * 
+ * [column-property]
+ *     LANGUAGES_ID, NAME, CODE, IMAGE, DIRECTORY, SORT_ORDER
+ * 
+ * [foreign-property]
+ *     
+ * 
+ * [refferer-property]
+ *     
+ * 
+ * [sequence]
+ *     
+ * 
+ * [identity]
+ *     
+ * 
+ * [update-date]
+ *     
+ * 
+ * [version-no]
+ *     
+ * 
+ * 
+ * + * @author DBFlute(AutoGenerator) + */ +public abstract class BsLanguages implements Entity, java.io.Serializable { + + /** Serial version UID. (Default) */ + private static final long serialVersionUID = 1L; + + /** TABLE-Annotation for S2Dao */ + public static final String TABLE = "LANGUAGES"; + + + // =================================================================================== + // Attribute + // ========= + /** Entity modified properties. (for S2Dao) */ + protected EntityModifiedProperties _modifiedProperties = newEntityModifiedProperties(); + + + /** The value of languagesId. ColumnDefinition -- PK : INTEGER : NotNull*/ + protected java.math.BigDecimal _languagesId; + + /** The value of name. ColumnDefinition -- VARCHAR(32) : NotNull*/ + protected String _name; + + /** The value of code. ColumnDefinition -- CHAR(2) : NotNull*/ + protected String _code; + + /** The value of image. ColumnDefinition -- VARCHAR(64)*/ + protected String _image; + + /** The value of directory. ColumnDefinition -- VARCHAR(32)*/ + protected String _directory; + + /** The value of sortOrder. ColumnDefinition -- INTEGER*/ + protected java.math.BigDecimal _sortOrder; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + public BsLanguages() { + } + + + // =================================================================================== + // DBMeta + // ====== + /** + * This method implements the method that is declared at super. + * + * @return DBMeta. (NotNull) + */ + public DBMeta getDBMeta() { + return DBMetaInstanceHandler.getInstanceByTableDbName(getTableDbName()); + } + + // =================================================================================== + // Table Name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + public String getTableDbName() { + return "LANGUAGES"; + } + + /** + * This method implements the method that is declared at super. + * + * @return Table cap-prop-name. (NotNull) + */ + public String getTableCapPropName() { + return "Languages"; + } + + /** + * This method implements the method that is declared at super. + * + * @return Table uncap-prop-name. (NotNull) + */ + public String getTableUncapPropName() { + return "languages"; + } + + // =================================================================================== + // Accessor + // ======== + + /** Column-Annotation for S2Dao. ColumnDefinition -- PK : INTEGER : NotNull*/ + public static final String languagesId_COLUMN = "LANGUAGES_ID"; + + /** + * Get the value of languagesId.
+ * {PK : INTEGER : NotNull} + * + * @return The value of languagesId. (Nullable) + */ + public java.math.BigDecimal getLanguagesId() { + return _languagesId; + } + + /** + * Set the value of languagesId.
+ * {PK : INTEGER : NotNull} + * + * @param languagesId The value of languagesId. (Nullable) + */ + public void setLanguagesId(java.math.BigDecimal languagesId) { + _modifiedProperties.addPropertyName("languagesId"); + _languagesId = languagesId; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- VARCHAR(32) : NotNull*/ + public static final String name_COLUMN = "NAME"; + + /** + * Get the value of name.
+ * {VARCHAR(32) : NotNull} + * + * @return The value of name. (Nullable) + */ + public String getName() { + return _name; + } + + /** + * Set the value of name.
+ * {VARCHAR(32) : NotNull} + * + * @param name The value of name. (Nullable) + */ + public void setName(String name) { + _modifiedProperties.addPropertyName("name"); + _name = name; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- CHAR(2) : NotNull*/ + public static final String code_COLUMN = "CODE"; + + /** + * Get the value of code.
+ * {CHAR(2) : NotNull} + * + * @return The value of code. (Nullable) + */ + public String getCode() { + return _code; + } + + /** + * Set the value of code.
+ * {CHAR(2) : NotNull} + * + * @param code The value of code. (Nullable) + */ + public void setCode(String code) { + _modifiedProperties.addPropertyName("code"); + _code = code; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- VARCHAR(64)*/ + public static final String image_COLUMN = "IMAGE"; + + /** + * Get the value of image.
+ * {VARCHAR(64)} + * + * @return The value of image. (Nullable) + */ + public String getImage() { + return _image; + } + + /** + * Set the value of image.
+ * {VARCHAR(64)} + * + * @param image The value of image. (Nullable) + */ + public void setImage(String image) { + _modifiedProperties.addPropertyName("image"); + _image = image; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- VARCHAR(32)*/ + public static final String directory_COLUMN = "DIRECTORY"; + + /** + * Get the value of directory.
+ * {VARCHAR(32)} + * + * @return The value of directory. (Nullable) + */ + public String getDirectory() { + return _directory; + } + + /** + * Set the value of directory.
+ * {VARCHAR(32)} + * + * @param directory The value of directory. (Nullable) + */ + public void setDirectory(String directory) { + _modifiedProperties.addPropertyName("directory"); + _directory = directory; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- INTEGER*/ + public static final String sortOrder_COLUMN = "SORT_ORDER"; + + /** + * Get the value of sortOrder.
+ * {INTEGER} + * + * @return The value of sortOrder. (Nullable) + */ + public java.math.BigDecimal getSortOrder() { + return _sortOrder; + } + + /** + * Set the value of sortOrder.
+ * {INTEGER} + * + * @param sortOrder The value of sortOrder. (Nullable) + */ + public void setSortOrder(java.math.BigDecimal sortOrder) { + _modifiedProperties.addPropertyName("sortOrder"); + _sortOrder = sortOrder; + } + + + // =================================================================================== + // Classify Method + // =============== + + // =================================================================================== + // Classification Determination + // ============================ + + + // =================================================================================== + // Classification Getter + // ===================== + + + // =================================================================================== + // Foreign Table + // ============= + + // =================================================================================== + // Refferer Table + // ============== + + // =================================================================================== + // Accept + // ====== + /** + * This method implements the method that is declared at super. + * + * @param primaryKeyMap Primary key map. (NotNull and NotEmpty) + * @deprecated Please use LanguagesDbm.getInstance().acceptPrimaryKeyMap(entity, primaryKeyMap); + */ + public void acceptPrimaryKeyMap(java.util.Map primaryKeyMap) { + getDBMeta().acceptPrimaryKeyMap(this, primaryKeyMap); + } + + /** + * This method implements the method that is declared at super. + * + * @param primaryKeyMapString Primary-key map-string. (NotNull and NotEmpty) + * @deprecated Please use LanguagesDbm.getInstance().acceptPrimaryKeyMapString(entity, primaryKeyMapString); + */ + public void acceptPrimaryKeyMapString(String primaryKeyMapString) { + getDBMeta().acceptPrimaryKeyMapString(this, primaryKeyMapString); + } + + /** + * This method implements the method that is declared at super. + * + * @param columnValueMap Column-value map. (NotNull and NotEmpty) + * @deprecated Please use LanguagesDbm.getInstance().acceptColumnValueMap(entity, columnValueMap); + */ + public void acceptColumnValueMap(java.util.Map columnValueMap) { + getDBMeta().acceptColumnValueMap(this, columnValueMap); + } + + /** + * This method implements the method that is declared at super. + * + * @param columnValueMapString Column-value map-string. (NotNull and NotEmpty) + * @deprecated Please use LanguagesDbm.getInstance().acceptColumnValueMap(entity, columnValueMapString); + */ + public void acceptColumnValueMapString(String columnValueMapString) { + getDBMeta().acceptColumnValueMapString(this, columnValueMapString); + } + + // =================================================================================== + // Extract + // ======= + /** + * This method implements the method that is declared at super. + * + * @return Primary-key map-string. (NotNull) + * @deprecated Please use LanguagesDbm.getInstance().extractPrimaryKeyMapString(entity); + */ + public String extractPrimaryKeyMapString() { + return getDBMeta().extractPrimaryKeyMapString(this); + } + + /** + * Extract primary-key map-string. + * + * @param startBrace Start-brace. (NotNull) + * @param endBrace End-brace. (NotNull) + * @param delimiter Delimiter. (NotNull) + * @param equal Equal. (NotNull) + * @return Primary-key map-string. (NotNull) + * @deprecated Please use LanguagesDbm.getInstance().extractPrimaryKeyMapString(entity, startBrace, endBrace, delimiter, equal); + */ + public String extractPrimaryKeyMapString(String startBrace, String endBrace, String delimiter, String equal) { + return getDBMeta().extractPrimaryKeyMapString(this, startBrace, endBrace, delimiter, equal); + } + + /** + * This method implements the method that is declared at super. + * + * @return Column-value map-string. (NotNull) + * @deprecated Please use LanguagesDbm.getInstance().extractColumnValueMapString(entity); + */ + public String extractColumnValueMapString() { + return getDBMeta().extractColumnValueMapString(this); + } + + /** + * Extract column-value map-string. + * + * @param startBrace Start-brace. (NotNull) + * @param endBrace End-brace. (NotNull) + * @param delimiter Delimiter. (NotNull) + * @param equal Equal. (NotNull) + * @return Column-value map-string. (NotNull) + * @deprecated Please use LanguagesDbm.getInstance().extractColumnValueMapString(entity, startBrace, endBrace, delimiter, equal); + */ + public String extractColumnValueMapString(String startBrace, String endBrace, String delimiter, String equal) { + return getDBMeta().extractColumnValueMapString(this, startBrace, endBrace, delimiter, equal); + } + + + // =================================================================================== + // Determination + // ============= + /** + * This method implements the method that is declared at super. + * + * @return Determination. + */ + public boolean hasPrimaryKeyValue() { + + if (_languagesId == null) { + return false; + } + + return true; + } + + // =================================================================================== + // Modified Properties + // =================== + /** + * Get modified property names. (S2Dao uses this for updateModifiedProperties()) + * + * @return Modified property names. (NotNull) + */ + public java.util.Set getModifiedPropertyNames() { + return _modifiedProperties.getPropertyNames(); + } + + /** + * New entity modified properties. You can override this at the sub-class if you need it. + * + * @return Entity modified properties. (NotNull) + */ + protected EntityModifiedProperties newEntityModifiedProperties() { + return new EntityModifiedProperties(); + } + + /** + * Clear modified property names. + */ + public void clearModifiedPropertyNames() { + _modifiedProperties.clear(); + } + + // =================================================================================== + // Basic Override + // ============== + + /** + * This method overrides the method that is declared at super. + * If the primary-key of the other is same as this one, returns true. + * + * @param other Other entity. + * @return Comparing result. + */ + public boolean equals(Object other) { + if (other == null) { + return false; + } + if (!(other instanceof BsLanguages)) { + return false; + } + final BsLanguages otherEntity = (BsLanguages)other; + + if (getLanguagesId() == null || !getLanguagesId().equals(otherEntity.getLanguagesId())) { + return false; + } + + return true; + } + + /** + * This method overrides the method that is declared at super. + * Calculates hash-code from primary-key. + * + * @return Hash-code from primary-keys. + */ + public int hashCode() { + int result = 0; + + if (this.getLanguagesId() != null) { + result = result + getLanguagesId().hashCode(); + } + + return result; + } + + /** + * This method overrides the method that is declared at super. + * + * @return Column-value map-string. (NotNull) + */ + public String toString() { + final String delimiter = ","; + final StringBuffer sb = new StringBuffer(); + + sb.append(delimiter).append(getLanguagesId()); + sb.append(delimiter).append(getName()); + sb.append(delimiter).append(getCode()); + sb.append(delimiter).append(getImage()); + sb.append(delimiter).append(getDirectory()); + sb.append(delimiter).append(getSortOrder()); + + sb.delete(0, delimiter.length()); + sb.insert(0, "{").append("}"); + return sb.toString(); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/BsManufacturers.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/BsManufacturers.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/BsManufacturers.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,472 @@ +package jp.sf.pal.pompei.bsentity; + + +import jp.sf.pal.pompei.allcommon.Entity; +import jp.sf.pal.pompei.allcommon.dbmeta.DBMeta; +import jp.sf.pal.pompei.allcommon.dbmeta.DBMetaInstanceHandler; + +/** + * The entity of MANUFACTURERS. + * + *
+ * [primary-key]
+ *     MANUFACTURERS_ID
+ * 
+ * [column-property]
+ *     MANUFACTURERS_ID, MANUFACTURERS_NAME, MANUFACTURERS_IMAGE, DATE_ADDED, LAST_MODIFIED
+ * 
+ * [foreign-property]
+ *     
+ * 
+ * [refferer-property]
+ *     
+ * 
+ * [sequence]
+ *     
+ * 
+ * [identity]
+ *     
+ * 
+ * [update-date]
+ *     
+ * 
+ * [version-no]
+ *     
+ * 
+ * 
+ * + * @author DBFlute(AutoGenerator) + */ +public abstract class BsManufacturers implements Entity, java.io.Serializable { + + /** Serial version UID. (Default) */ + private static final long serialVersionUID = 1L; + + /** TABLE-Annotation for S2Dao */ + public static final String TABLE = "MANUFACTURERS"; + + + // =================================================================================== + // Attribute + // ========= + /** Entity modified properties. (for S2Dao) */ + protected EntityModifiedProperties _modifiedProperties = newEntityModifiedProperties(); + + + /** The value of manufacturersId. ColumnDefinition -- PK : INTEGER : NotNull*/ + protected java.math.BigDecimal _manufacturersId; + + /** The value of manufacturersName. ColumnDefinition -- VARCHAR(32) : NotNull*/ + protected String _manufacturersName; + + /** The value of manufacturersImage. ColumnDefinition -- VARCHAR(64)*/ + protected String _manufacturersImage; + + /** The value of dateAdded. ColumnDefinition -- TIMESTAMP*/ + protected java.sql.Timestamp _dateAdded; + + /** The value of lastModified. ColumnDefinition -- TIMESTAMP*/ + protected java.sql.Timestamp _lastModified; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + public BsManufacturers() { + } + + + // =================================================================================== + // DBMeta + // ====== + /** + * This method implements the method that is declared at super. + * + * @return DBMeta. (NotNull) + */ + public DBMeta getDBMeta() { + return DBMetaInstanceHandler.getInstanceByTableDbName(getTableDbName()); + } + + // =================================================================================== + // Table Name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + public String getTableDbName() { + return "MANUFACTURERS"; + } + + /** + * This method implements the method that is declared at super. + * + * @return Table cap-prop-name. (NotNull) + */ + public String getTableCapPropName() { + return "Manufacturers"; + } + + /** + * This method implements the method that is declared at super. + * + * @return Table uncap-prop-name. (NotNull) + */ + public String getTableUncapPropName() { + return "manufacturers"; + } + + // =================================================================================== + // Accessor + // ======== + + /** Column-Annotation for S2Dao. ColumnDefinition -- PK : INTEGER : NotNull*/ + public static final String manufacturersId_COLUMN = "MANUFACTURERS_ID"; + + /** + * Get the value of manufacturersId.
+ * {PK : INTEGER : NotNull} + * + * @return The value of manufacturersId. (Nullable) + */ + public java.math.BigDecimal getManufacturersId() { + return _manufacturersId; + } + + /** + * Set the value of manufacturersId.
+ * {PK : INTEGER : NotNull} + * + * @param manufacturersId The value of manufacturersId. (Nullable) + */ + public void setManufacturersId(java.math.BigDecimal manufacturersId) { + _modifiedProperties.addPropertyName("manufacturersId"); + _manufacturersId = manufacturersId; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- VARCHAR(32) : NotNull*/ + public static final String manufacturersName_COLUMN = "MANUFACTURERS_NAME"; + + /** + * Get the value of manufacturersName.
+ * {VARCHAR(32) : NotNull} + * + * @return The value of manufacturersName. (Nullable) + */ + public String getManufacturersName() { + return _manufacturersName; + } + + /** + * Set the value of manufacturersName.
+ * {VARCHAR(32) : NotNull} + * + * @param manufacturersName The value of manufacturersName. (Nullable) + */ + public void setManufacturersName(String manufacturersName) { + _modifiedProperties.addPropertyName("manufacturersName"); + _manufacturersName = manufacturersName; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- VARCHAR(64)*/ + public static final String manufacturersImage_COLUMN = "MANUFACTURERS_IMAGE"; + + /** + * Get the value of manufacturersImage.
+ * {VARCHAR(64)} + * + * @return The value of manufacturersImage. (Nullable) + */ + public String getManufacturersImage() { + return _manufacturersImage; + } + + /** + * Set the value of manufacturersImage.
+ * {VARCHAR(64)} + * + * @param manufacturersImage The value of manufacturersImage. (Nullable) + */ + public void setManufacturersImage(String manufacturersImage) { + _modifiedProperties.addPropertyName("manufacturersImage"); + _manufacturersImage = manufacturersImage; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- TIMESTAMP*/ + public static final String dateAdded_COLUMN = "DATE_ADDED"; + + /** + * Get the value of dateAdded.
+ * {TIMESTAMP} + * + * @return The value of dateAdded. (Nullable) + */ + public java.sql.Timestamp getDateAdded() { + return _dateAdded; + } + + /** + * Set the value of dateAdded.
+ * {TIMESTAMP} + * + * @param dateAdded The value of dateAdded. (Nullable) + */ + public void setDateAdded(java.sql.Timestamp dateAdded) { + _modifiedProperties.addPropertyName("dateAdded"); + _dateAdded = dateAdded; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- TIMESTAMP*/ + public static final String lastModified_COLUMN = "LAST_MODIFIED"; + + /** + * Get the value of lastModified.
+ * {TIMESTAMP} + * + * @return The value of lastModified. (Nullable) + */ + public java.sql.Timestamp getLastModified() { + return _lastModified; + } + + /** + * Set the value of lastModified.
+ * {TIMESTAMP} + * + * @param lastModified The value of lastModified. (Nullable) + */ + public void setLastModified(java.sql.Timestamp lastModified) { + _modifiedProperties.addPropertyName("lastModified"); + _lastModified = lastModified; + } + + + // =================================================================================== + // Classify Method + // =============== + + // =================================================================================== + // Classification Determination + // ============================ + + + // =================================================================================== + // Classification Getter + // ===================== + + + // =================================================================================== + // Foreign Table + // ============= + + // =================================================================================== + // Refferer Table + // ============== + + // =================================================================================== + // Accept + // ====== + /** + * This method implements the method that is declared at super. + * + * @param primaryKeyMap Primary key map. (NotNull and NotEmpty) + * @deprecated Please use ManufacturersDbm.getInstance().acceptPrimaryKeyMap(entity, primaryKeyMap); + */ + public void acceptPrimaryKeyMap(java.util.Map primaryKeyMap) { + getDBMeta().acceptPrimaryKeyMap(this, primaryKeyMap); + } + + /** + * This method implements the method that is declared at super. + * + * @param primaryKeyMapString Primary-key map-string. (NotNull and NotEmpty) + * @deprecated Please use ManufacturersDbm.getInstance().acceptPrimaryKeyMapString(entity, primaryKeyMapString); + */ + public void acceptPrimaryKeyMapString(String primaryKeyMapString) { + getDBMeta().acceptPrimaryKeyMapString(this, primaryKeyMapString); + } + + /** + * This method implements the method that is declared at super. + * + * @param columnValueMap Column-value map. (NotNull and NotEmpty) + * @deprecated Please use ManufacturersDbm.getInstance().acceptColumnValueMap(entity, columnValueMap); + */ + public void acceptColumnValueMap(java.util.Map columnValueMap) { + getDBMeta().acceptColumnValueMap(this, columnValueMap); + } + + /** + * This method implements the method that is declared at super. + * + * @param columnValueMapString Column-value map-string. (NotNull and NotEmpty) + * @deprecated Please use ManufacturersDbm.getInstance().acceptColumnValueMap(entity, columnValueMapString); + */ + public void acceptColumnValueMapString(String columnValueMapString) { + getDBMeta().acceptColumnValueMapString(this, columnValueMapString); + } + + // =================================================================================== + // Extract + // ======= + /** + * This method implements the method that is declared at super. + * + * @return Primary-key map-string. (NotNull) + * @deprecated Please use ManufacturersDbm.getInstance().extractPrimaryKeyMapString(entity); + */ + public String extractPrimaryKeyMapString() { + return getDBMeta().extractPrimaryKeyMapString(this); + } + + /** + * Extract primary-key map-string. + * + * @param startBrace Start-brace. (NotNull) + * @param endBrace End-brace. (NotNull) + * @param delimiter Delimiter. (NotNull) + * @param equal Equal. (NotNull) + * @return Primary-key map-string. (NotNull) + * @deprecated Please use ManufacturersDbm.getInstance().extractPrimaryKeyMapString(entity, startBrace, endBrace, delimiter, equal); + */ + public String extractPrimaryKeyMapString(String startBrace, String endBrace, String delimiter, String equal) { + return getDBMeta().extractPrimaryKeyMapString(this, startBrace, endBrace, delimiter, equal); + } + + /** + * This method implements the method that is declared at super. + * + * @return Column-value map-string. (NotNull) + * @deprecated Please use ManufacturersDbm.getInstance().extractColumnValueMapString(entity); + */ + public String extractColumnValueMapString() { + return getDBMeta().extractColumnValueMapString(this); + } + + /** + * Extract column-value map-string. + * + * @param startBrace Start-brace. (NotNull) + * @param endBrace End-brace. (NotNull) + * @param delimiter Delimiter. (NotNull) + * @param equal Equal. (NotNull) + * @return Column-value map-string. (NotNull) + * @deprecated Please use ManufacturersDbm.getInstance().extractColumnValueMapString(entity, startBrace, endBrace, delimiter, equal); + */ + public String extractColumnValueMapString(String startBrace, String endBrace, String delimiter, String equal) { + return getDBMeta().extractColumnValueMapString(this, startBrace, endBrace, delimiter, equal); + } + + + // =================================================================================== + // Determination + // ============= + /** + * This method implements the method that is declared at super. + * + * @return Determination. + */ + public boolean hasPrimaryKeyValue() { + + if (_manufacturersId == null) { + return false; + } + + return true; + } + + // =================================================================================== + // Modified Properties + // =================== + /** + * Get modified property names. (S2Dao uses this for updateModifiedProperties()) + * + * @return Modified property names. (NotNull) + */ + public java.util.Set getModifiedPropertyNames() { + return _modifiedProperties.getPropertyNames(); + } + + /** + * New entity modified properties. You can override this at the sub-class if you need it. + * + * @return Entity modified properties. (NotNull) + */ + protected EntityModifiedProperties newEntityModifiedProperties() { + return new EntityModifiedProperties(); + } + + /** + * Clear modified property names. + */ + public void clearModifiedPropertyNames() { + _modifiedProperties.clear(); + } + + // =================================================================================== + // Basic Override + // ============== + + /** + * This method overrides the method that is declared at super. + * If the primary-key of the other is same as this one, returns true. + * + * @param other Other entity. + * @return Comparing result. + */ + public boolean equals(Object other) { + if (other == null) { + return false; + } + if (!(other instanceof BsManufacturers)) { + return false; + } + final BsManufacturers otherEntity = (BsManufacturers)other; + + if (getManufacturersId() == null || !getManufacturersId().equals(otherEntity.getManufacturersId())) { + return false; + } + + return true; + } + + /** + * This method overrides the method that is declared at super. + * Calculates hash-code from primary-key. + * + * @return Hash-code from primary-keys. + */ + public int hashCode() { + int result = 0; + + if (this.getManufacturersId() != null) { + result = result + getManufacturersId().hashCode(); + } + + return result; + } + + /** + * This method overrides the method that is declared at super. + * + * @return Column-value map-string. (NotNull) + */ + public String toString() { + final String delimiter = ","; + final StringBuffer sb = new StringBuffer(); + + sb.append(delimiter).append(getManufacturersId()); + sb.append(delimiter).append(getManufacturersName()); + sb.append(delimiter).append(getManufacturersImage()); + sb.append(delimiter).append(getDateAdded()); + sb.append(delimiter).append(getLastModified()); + + sb.delete(0, delimiter.length()); + sb.insert(0, "{").append("}"); + return sb.toString(); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/BsManufacturersInfo.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/BsManufacturersInfo.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/BsManufacturersInfo.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,481 @@ +package jp.sf.pal.pompei.bsentity; + + +import jp.sf.pal.pompei.allcommon.Entity; +import jp.sf.pal.pompei.allcommon.dbmeta.DBMeta; +import jp.sf.pal.pompei.allcommon.dbmeta.DBMetaInstanceHandler; + +/** + * The entity of MANUFACTURERS_INFO. + * + *
+ * [primary-key]
+ *     MANUFACTURERS_ID, LANGUAGES_ID
+ * 
+ * [column-property]
+ *     MANUFACTURERS_ID, LANGUAGES_ID, MANUFACTURERS_URL, URL_CLICKED, DATE_LAST_CLICK
+ * 
+ * [foreign-property]
+ *     
+ * 
+ * [refferer-property]
+ *     
+ * 
+ * [sequence]
+ *     
+ * 
+ * [identity]
+ *     
+ * 
+ * [update-date]
+ *     
+ * 
+ * [version-no]
+ *     
+ * 
+ * 
+ * + * @author DBFlute(AutoGenerator) + */ +public abstract class BsManufacturersInfo implements Entity, java.io.Serializable { + + /** Serial version UID. (Default) */ + private static final long serialVersionUID = 1L; + + /** TABLE-Annotation for S2Dao */ + public static final String TABLE = "MANUFACTURERS_INFO"; + + + // =================================================================================== + // Attribute + // ========= + /** Entity modified properties. (for S2Dao) */ + protected EntityModifiedProperties _modifiedProperties = newEntityModifiedProperties(); + + + /** The value of manufacturersId. ColumnDefinition -- PK : INTEGER : NotNull*/ + protected java.math.BigDecimal _manufacturersId; + + /** The value of languagesId. ColumnDefinition -- PK : INTEGER : NotNull*/ + protected java.math.BigDecimal _languagesId; + + /** The value of manufacturersUrl. ColumnDefinition -- VARCHAR(255) : NotNull*/ + protected String _manufacturersUrl; + + /** The value of urlClicked. ColumnDefinition -- INTEGER : NotNull : Default=[0]*/ + protected java.math.BigDecimal _urlClicked; + + /** The value of dateLastClick. ColumnDefinition -- TIMESTAMP*/ + protected java.sql.Timestamp _dateLastClick; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + public BsManufacturersInfo() { + } + + + // =================================================================================== + // DBMeta + // ====== + /** + * This method implements the method that is declared at super. + * + * @return DBMeta. (NotNull) + */ + public DBMeta getDBMeta() { + return DBMetaInstanceHandler.getInstanceByTableDbName(getTableDbName()); + } + + // =================================================================================== + // Table Name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + public String getTableDbName() { + return "MANUFACTURERS_INFO"; + } + + /** + * This method implements the method that is declared at super. + * + * @return Table cap-prop-name. (NotNull) + */ + public String getTableCapPropName() { + return "ManufacturersInfo"; + } + + /** + * This method implements the method that is declared at super. + * + * @return Table uncap-prop-name. (NotNull) + */ + public String getTableUncapPropName() { + return "manufacturersInfo"; + } + + // =================================================================================== + // Accessor + // ======== + + /** Column-Annotation for S2Dao. ColumnDefinition -- PK : INTEGER : NotNull*/ + public static final String manufacturersId_COLUMN = "MANUFACTURERS_ID"; + + /** + * Get the value of manufacturersId.
+ * {PK : INTEGER : NotNull} + * + * @return The value of manufacturersId. (Nullable) + */ + public java.math.BigDecimal getManufacturersId() { + return _manufacturersId; + } + + /** + * Set the value of manufacturersId.
+ * {PK : INTEGER : NotNull} + * + * @param manufacturersId The value of manufacturersId. (Nullable) + */ + public void setManufacturersId(java.math.BigDecimal manufacturersId) { + _modifiedProperties.addPropertyName("manufacturersId"); + _manufacturersId = manufacturersId; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- PK : INTEGER : NotNull*/ + public static final String languagesId_COLUMN = "LANGUAGES_ID"; + + /** + * Get the value of languagesId.
+ * {PK : INTEGER : NotNull} + * + * @return The value of languagesId. (Nullable) + */ + public java.math.BigDecimal getLanguagesId() { + return _languagesId; + } + + /** + * Set the value of languagesId.
+ * {PK : INTEGER : NotNull} + * + * @param languagesId The value of languagesId. (Nullable) + */ + public void setLanguagesId(java.math.BigDecimal languagesId) { + _modifiedProperties.addPropertyName("languagesId"); + _languagesId = languagesId; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- VARCHAR(255) : NotNull*/ + public static final String manufacturersUrl_COLUMN = "MANUFACTURERS_URL"; + + /** + * Get the value of manufacturersUrl.
+ * {VARCHAR(255) : NotNull} + * + * @return The value of manufacturersUrl. (Nullable) + */ + public String getManufacturersUrl() { + return _manufacturersUrl; + } + + /** + * Set the value of manufacturersUrl.
+ * {VARCHAR(255) : NotNull} + * + * @param manufacturersUrl The value of manufacturersUrl. (Nullable) + */ + public void setManufacturersUrl(String manufacturersUrl) { + _modifiedProperties.addPropertyName("manufacturersUrl"); + _manufacturersUrl = manufacturersUrl; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- INTEGER : NotNull : Default=[0]*/ + public static final String urlClicked_COLUMN = "URL_CLICKED"; + + /** + * Get the value of urlClicked.
+ * {INTEGER : NotNull : Default=[0]} + * + * @return The value of urlClicked. (Nullable) + */ + public java.math.BigDecimal getUrlClicked() { + return _urlClicked; + } + + /** + * Set the value of urlClicked.
+ * {INTEGER : NotNull : Default=[0]} + * + * @param urlClicked The value of urlClicked. (Nullable) + */ + public void setUrlClicked(java.math.BigDecimal urlClicked) { + _modifiedProperties.addPropertyName("urlClicked"); + _urlClicked = urlClicked; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- TIMESTAMP*/ + public static final String dateLastClick_COLUMN = "DATE_LAST_CLICK"; + + /** + * Get the value of dateLastClick.
+ * {TIMESTAMP} + * + * @return The value of dateLastClick. (Nullable) + */ + public java.sql.Timestamp getDateLastClick() { + return _dateLastClick; + } + + /** + * Set the value of dateLastClick.
+ * {TIMESTAMP} + * + * @param dateLastClick The value of dateLastClick. (Nullable) + */ + public void setDateLastClick(java.sql.Timestamp dateLastClick) { + _modifiedProperties.addPropertyName("dateLastClick"); + _dateLastClick = dateLastClick; + } + + + // =================================================================================== + // Classify Method + // =============== + + // =================================================================================== + // Classification Determination + // ============================ + + + // =================================================================================== + // Classification Getter + // ===================== + + + // =================================================================================== + // Foreign Table + // ============= + + // =================================================================================== + // Refferer Table + // ============== + + // =================================================================================== + // Accept + // ====== + /** + * This method implements the method that is declared at super. + * + * @param primaryKeyMap Primary key map. (NotNull and NotEmpty) + * @deprecated Please use ManufacturersInfoDbm.getInstance().acceptPrimaryKeyMap(entity, primaryKeyMap); + */ + public void acceptPrimaryKeyMap(java.util.Map primaryKeyMap) { + getDBMeta().acceptPrimaryKeyMap(this, primaryKeyMap); + } + + /** + * This method implements the method that is declared at super. + * + * @param primaryKeyMapString Primary-key map-string. (NotNull and NotEmpty) + * @deprecated Please use ManufacturersInfoDbm.getInstance().acceptPrimaryKeyMapString(entity, primaryKeyMapString); + */ + public void acceptPrimaryKeyMapString(String primaryKeyMapString) { + getDBMeta().acceptPrimaryKeyMapString(this, primaryKeyMapString); + } + + /** + * This method implements the method that is declared at super. + * + * @param columnValueMap Column-value map. (NotNull and NotEmpty) + * @deprecated Please use ManufacturersInfoDbm.getInstance().acceptColumnValueMap(entity, columnValueMap); + */ + public void acceptColumnValueMap(java.util.Map columnValueMap) { + getDBMeta().acceptColumnValueMap(this, columnValueMap); + } + + /** + * This method implements the method that is declared at super. + * + * @param columnValueMapString Column-value map-string. (NotNull and NotEmpty) + * @deprecated Please use ManufacturersInfoDbm.getInstance().acceptColumnValueMap(entity, columnValueMapString); + */ + public void acceptColumnValueMapString(String columnValueMapString) { + getDBMeta().acceptColumnValueMapString(this, columnValueMapString); + } + + // =================================================================================== + // Extract + // ======= + /** + * This method implements the method that is declared at super. + * + * @return Primary-key map-string. (NotNull) + * @deprecated Please use ManufacturersInfoDbm.getInstance().extractPrimaryKeyMapString(entity); + */ + public String extractPrimaryKeyMapString() { + return getDBMeta().extractPrimaryKeyMapString(this); + } + + /** + * Extract primary-key map-string. + * + * @param startBrace Start-brace. (NotNull) + * @param endBrace End-brace. (NotNull) + * @param delimiter Delimiter. (NotNull) + * @param equal Equal. (NotNull) + * @return Primary-key map-string. (NotNull) + * @deprecated Please use ManufacturersInfoDbm.getInstance().extractPrimaryKeyMapString(entity, startBrace, endBrace, delimiter, equal); + */ + public String extractPrimaryKeyMapString(String startBrace, String endBrace, String delimiter, String equal) { + return getDBMeta().extractPrimaryKeyMapString(this, startBrace, endBrace, delimiter, equal); + } + + /** + * This method implements the method that is declared at super. + * + * @return Column-value map-string. (NotNull) + * @deprecated Please use ManufacturersInfoDbm.getInstance().extractColumnValueMapString(entity); + */ + public String extractColumnValueMapString() { + return getDBMeta().extractColumnValueMapString(this); + } + + /** + * Extract column-value map-string. + * + * @param startBrace Start-brace. (NotNull) + * @param endBrace End-brace. (NotNull) + * @param delimiter Delimiter. (NotNull) + * @param equal Equal. (NotNull) + * @return Column-value map-string. (NotNull) + * @deprecated Please use ManufacturersInfoDbm.getInstance().extractColumnValueMapString(entity, startBrace, endBrace, delimiter, equal); + */ + public String extractColumnValueMapString(String startBrace, String endBrace, String delimiter, String equal) { + return getDBMeta().extractColumnValueMapString(this, startBrace, endBrace, delimiter, equal); + } + + + // =================================================================================== + // Determination + // ============= + /** + * This method implements the method that is declared at super. + * + * @return Determination. + */ + public boolean hasPrimaryKeyValue() { + + if (_manufacturersId == null) { + return false; + } + if (_languagesId == null) { + return false; + } + + return true; + } + + // =================================================================================== + // Modified Properties + // =================== + /** + * Get modified property names. (S2Dao uses this for updateModifiedProperties()) + * + * @return Modified property names. (NotNull) + */ + public java.util.Set getModifiedPropertyNames() { + return _modifiedProperties.getPropertyNames(); + } + + /** + * New entity modified properties. You can override this at the sub-class if you need it. + * + * @return Entity modified properties. (NotNull) + */ + protected EntityModifiedProperties newEntityModifiedProperties() { + return new EntityModifiedProperties(); + } + + /** + * Clear modified property names. + */ + public void clearModifiedPropertyNames() { + _modifiedProperties.clear(); + } + + // =================================================================================== + // Basic Override + // ============== + + /** + * This method overrides the method that is declared at super. + * If the primary-key of the other is same as this one, returns true. + * + * @param other Other entity. + * @return Comparing result. + */ + public boolean equals(Object other) { + if (other == null) { + return false; + } + if (!(other instanceof BsManufacturersInfo)) { + return false; + } + final BsManufacturersInfo otherEntity = (BsManufacturersInfo)other; + + if (getManufacturersId() == null || !getManufacturersId().equals(otherEntity.getManufacturersId())) { + return false; + } + if (getLanguagesId() == null || !getLanguagesId().equals(otherEntity.getLanguagesId())) { + return false; + } + + return true; + } + + /** + * This method overrides the method that is declared at super. + * Calculates hash-code from primary-key. + * + * @return Hash-code from primary-keys. + */ + public int hashCode() { + int result = 0; + + if (this.getManufacturersId() != null) { + result = result + getManufacturersId().hashCode(); + } + if (this.getLanguagesId() != null) { + result = result + getLanguagesId().hashCode(); + } + + return result; + } + + /** + * This method overrides the method that is declared at super. + * + * @return Column-value map-string. (NotNull) + */ + public String toString() { + final String delimiter = ","; + final StringBuffer sb = new StringBuffer(); + + sb.append(delimiter).append(getManufacturersId()); + sb.append(delimiter).append(getLanguagesId()); + sb.append(delimiter).append(getManufacturersUrl()); + sb.append(delimiter).append(getUrlClicked()); + sb.append(delimiter).append(getDateLastClick()); + + sb.delete(0, delimiter.length()); + sb.insert(0, "{").append("}"); + return sb.toString(); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/BsNewsletters.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/BsNewsletters.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/BsNewsletters.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,556 @@ +package jp.sf.pal.pompei.bsentity; + + +import jp.sf.pal.pompei.allcommon.Entity; +import jp.sf.pal.pompei.allcommon.dbmeta.DBMeta; +import jp.sf.pal.pompei.allcommon.dbmeta.DBMetaInstanceHandler; + +/** + * The entity of NEWSLETTERS. + * + *
+ * [primary-key]
+ *     NEWSLETTERS_ID
+ * 
+ * [column-property]
+ *     NEWSLETTERS_ID, TITLE, CONTENT, MODULE, DATE_ADDED, DATE_SENT, STATUS, LOCKED
+ * 
+ * [foreign-property]
+ *     
+ * 
+ * [refferer-property]
+ *     
+ * 
+ * [sequence]
+ *     
+ * 
+ * [identity]
+ *     
+ * 
+ * [update-date]
+ *     
+ * 
+ * [version-no]
+ *     
+ * 
+ * 
+ * + * @author DBFlute(AutoGenerator) + */ +public abstract class BsNewsletters implements Entity, java.io.Serializable { + + /** Serial version UID. (Default) */ + private static final long serialVersionUID = 1L; + + /** TABLE-Annotation for S2Dao */ + public static final String TABLE = "NEWSLETTERS"; + + + // =================================================================================== + // Attribute + // ========= + /** Entity modified properties. (for S2Dao) */ + protected EntityModifiedProperties _modifiedProperties = newEntityModifiedProperties(); + + + /** The value of newslettersId. ColumnDefinition -- PK : INTEGER : NotNull*/ + protected java.math.BigDecimal _newslettersId; + + /** The value of title. ColumnDefinition -- VARCHAR(255) : NotNull*/ + protected String _title; + + /** The value of content. ColumnDefinition -- LONG VARCHAR(32700) : NotNull*/ + protected String _content; + + /** The value of module. ColumnDefinition -- VARCHAR(255) : NotNull*/ + protected String _module; + + /** The value of dateAdded. ColumnDefinition -- TIMESTAMP : NotNull*/ + protected java.sql.Timestamp _dateAdded; + + /** The value of dateSent. ColumnDefinition -- TIMESTAMP*/ + protected java.sql.Timestamp _dateSent; + + /** The value of status. ColumnDefinition -- INTEGER*/ + protected java.math.BigDecimal _status; + + /** The value of locked. ColumnDefinition -- INTEGER : Default=[0]*/ + protected java.math.BigDecimal _locked; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + public BsNewsletters() { + } + + + // =================================================================================== + // DBMeta + // ====== + /** + * This method implements the method that is declared at super. + * + * @return DBMeta. (NotNull) + */ + public DBMeta getDBMeta() { + return DBMetaInstanceHandler.getInstanceByTableDbName(getTableDbName()); + } + + // =================================================================================== + // Table Name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + public String getTableDbName() { + return "NEWSLETTERS"; + } + + /** + * This method implements the method that is declared at super. + * + * @return Table cap-prop-name. (NotNull) + */ + public String getTableCapPropName() { + return "Newsletters"; + } + + /** + * This method implements the method that is declared at super. + * + * @return Table uncap-prop-name. (NotNull) + */ + public String getTableUncapPropName() { + return "newsletters"; + } + + // =================================================================================== + // Accessor + // ======== + + /** Column-Annotation for S2Dao. ColumnDefinition -- PK : INTEGER : NotNull*/ + public static final String newslettersId_COLUMN = "NEWSLETTERS_ID"; + + /** + * Get the value of newslettersId.
+ * {PK : INTEGER : NotNull} + * + * @return The value of newslettersId. (Nullable) + */ + public java.math.BigDecimal getNewslettersId() { + return _newslettersId; + } + + /** + * Set the value of newslettersId.
+ * {PK : INTEGER : NotNull} + * + * @param newslettersId The value of newslettersId. (Nullable) + */ + public void setNewslettersId(java.math.BigDecimal newslettersId) { + _modifiedProperties.addPropertyName("newslettersId"); + _newslettersId = newslettersId; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- VARCHAR(255) : NotNull*/ + public static final String title_COLUMN = "TITLE"; + + /** + * Get the value of title.
+ * {VARCHAR(255) : NotNull} + * + * @return The value of title. (Nullable) + */ + public String getTitle() { + return _title; + } + + /** + * Set the value of title.
+ * {VARCHAR(255) : NotNull} + * + * @param title The value of title. (Nullable) + */ + public void setTitle(String title) { + _modifiedProperties.addPropertyName("title"); + _title = title; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- LONG VARCHAR(32700) : NotNull*/ + public static final String content_COLUMN = "CONTENT"; + + /** + * Get the value of content.
+ * {LONG VARCHAR(32700) : NotNull} + * + * @return The value of content. (Nullable) + */ + public String getContent() { + return _content; + } + + /** + * Set the value of content.
+ * {LONG VARCHAR(32700) : NotNull} + * + * @param content The value of content. (Nullable) + */ + public void setContent(String content) { + _modifiedProperties.addPropertyName("content"); + _content = content; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- VARCHAR(255) : NotNull*/ + public static final String module_COLUMN = "MODULE"; + + /** + * Get the value of module.
+ * {VARCHAR(255) : NotNull} + * + * @return The value of module. (Nullable) + */ + public String getModule() { + return _module; + } + + /** + * Set the value of module.
+ * {VARCHAR(255) : NotNull} + * + * @param module The value of module. (Nullable) + */ + public void setModule(String module) { + _modifiedProperties.addPropertyName("module"); + _module = module; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- TIMESTAMP : NotNull*/ + public static final String dateAdded_COLUMN = "DATE_ADDED"; + + /** + * Get the value of dateAdded.
+ * {TIMESTAMP : NotNull} + * + * @return The value of dateAdded. (Nullable) + */ + public java.sql.Timestamp getDateAdded() { + return _dateAdded; + } + + /** + * Set the value of dateAdded.
+ * {TIMESTAMP : NotNull} + * + * @param dateAdded The value of dateAdded. (Nullable) + */ + public void setDateAdded(java.sql.Timestamp dateAdded) { + _modifiedProperties.addPropertyName("dateAdded"); + _dateAdded = dateAdded; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- TIMESTAMP*/ + public static final String dateSent_COLUMN = "DATE_SENT"; + + /** + * Get the value of dateSent.
+ * {TIMESTAMP} + * + * @return The value of dateSent. (Nullable) + */ + public java.sql.Timestamp getDateSent() { + return _dateSent; + } + + /** + * Set the value of dateSent.
+ * {TIMESTAMP} + * + * @param dateSent The value of dateSent. (Nullable) + */ + public void setDateSent(java.sql.Timestamp dateSent) { + _modifiedProperties.addPropertyName("dateSent"); + _dateSent = dateSent; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- INTEGER*/ + public static final String status_COLUMN = "STATUS"; + + /** + * Get the value of status.
+ * {INTEGER} + * + * @return The value of status. (Nullable) + */ + public java.math.BigDecimal getStatus() { + return _status; + } + + /** + * Set the value of status.
+ * {INTEGER} + * + * @param status The value of status. (Nullable) + */ + public void setStatus(java.math.BigDecimal status) { + _modifiedProperties.addPropertyName("status"); + _status = status; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- INTEGER : Default=[0]*/ + public static final String locked_COLUMN = "LOCKED"; + + /** + * Get the value of locked.
+ * {INTEGER : Default=[0]} + * + * @return The value of locked. (Nullable) + */ + public java.math.BigDecimal getLocked() { + return _locked; + } + + /** + * Set the value of locked.
+ * {INTEGER : Default=[0]} + * + * @param locked The value of locked. (Nullable) + */ + public void setLocked(java.math.BigDecimal locked) { + _modifiedProperties.addPropertyName("locked"); + _locked = locked; + } + + + // =================================================================================== + // Classify Method + // =============== + + // =================================================================================== + // Classification Determination + // ============================ + + + // =================================================================================== + // Classification Getter + // ===================== + + + // =================================================================================== + // Foreign Table + // ============= + + // =================================================================================== + // Refferer Table + // ============== + + // =================================================================================== + // Accept + // ====== + /** + * This method implements the method that is declared at super. + * + * @param primaryKeyMap Primary key map. (NotNull and NotEmpty) + * @deprecated Please use NewslettersDbm.getInstance().acceptPrimaryKeyMap(entity, primaryKeyMap); + */ + public void acceptPrimaryKeyMap(java.util.Map primaryKeyMap) { + getDBMeta().acceptPrimaryKeyMap(this, primaryKeyMap); + } + + /** + * This method implements the method that is declared at super. + * + * @param primaryKeyMapString Primary-key map-string. (NotNull and NotEmpty) + * @deprecated Please use NewslettersDbm.getInstance().acceptPrimaryKeyMapString(entity, primaryKeyMapString); + */ + public void acceptPrimaryKeyMapString(String primaryKeyMapString) { + getDBMeta().acceptPrimaryKeyMapString(this, primaryKeyMapString); + } + + /** + * This method implements the method that is declared at super. + * + * @param columnValueMap Column-value map. (NotNull and NotEmpty) + * @deprecated Please use NewslettersDbm.getInstance().acceptColumnValueMap(entity, columnValueMap); + */ + public void acceptColumnValueMap(java.util.Map columnValueMap) { + getDBMeta().acceptColumnValueMap(this, columnValueMap); + } + + /** + * This method implements the method that is declared at super. + * + * @param columnValueMapString Column-value map-string. (NotNull and NotEmpty) + * @deprecated Please use NewslettersDbm.getInstance().acceptColumnValueMap(entity, columnValueMapString); + */ + public void acceptColumnValueMapString(String columnValueMapString) { + getDBMeta().acceptColumnValueMapString(this, columnValueMapString); + } + + // =================================================================================== + // Extract + // ======= + /** + * This method implements the method that is declared at super. + * + * @return Primary-key map-string. (NotNull) + * @deprecated Please use NewslettersDbm.getInstance().extractPrimaryKeyMapString(entity); + */ + public String extractPrimaryKeyMapString() { + return getDBMeta().extractPrimaryKeyMapString(this); + } + + /** + * Extract primary-key map-string. + * + * @param startBrace Start-brace. (NotNull) + * @param endBrace End-brace. (NotNull) + * @param delimiter Delimiter. (NotNull) + * @param equal Equal. (NotNull) + * @return Primary-key map-string. (NotNull) + * @deprecated Please use NewslettersDbm.getInstance().extractPrimaryKeyMapString(entity, startBrace, endBrace, delimiter, equal); + */ + public String extractPrimaryKeyMapString(String startBrace, String endBrace, String delimiter, String equal) { + return getDBMeta().extractPrimaryKeyMapString(this, startBrace, endBrace, delimiter, equal); + } + + /** + * This method implements the method that is declared at super. + * + * @return Column-value map-string. (NotNull) + * @deprecated Please use NewslettersDbm.getInstance().extractColumnValueMapString(entity); + */ + public String extractColumnValueMapString() { + return getDBMeta().extractColumnValueMapString(this); + } + + /** + * Extract column-value map-string. + * + * @param startBrace Start-brace. (NotNull) + * @param endBrace End-brace. (NotNull) + * @param delimiter Delimiter. (NotNull) + * @param equal Equal. (NotNull) + * @return Column-value map-string. (NotNull) + * @deprecated Please use NewslettersDbm.getInstance().extractColumnValueMapString(entity, startBrace, endBrace, delimiter, equal); + */ + public String extractColumnValueMapString(String startBrace, String endBrace, String delimiter, String equal) { + return getDBMeta().extractColumnValueMapString(this, startBrace, endBrace, delimiter, equal); + } + + + // =================================================================================== + // Determination + // ============= + /** + * This method implements the method that is declared at super. + * + * @return Determination. + */ + public boolean hasPrimaryKeyValue() { + + if (_newslettersId == null) { + return false; + } + + return true; + } + + // =================================================================================== + // Modified Properties + // =================== + /** + * Get modified property names. (S2Dao uses this for updateModifiedProperties()) + * + * @return Modified property names. (NotNull) + */ + public java.util.Set getModifiedPropertyNames() { + return _modifiedProperties.getPropertyNames(); + } + + /** + * New entity modified properties. You can override this at the sub-class if you need it. + * + * @return Entity modified properties. (NotNull) + */ + protected EntityModifiedProperties newEntityModifiedProperties() { + return new EntityModifiedProperties(); + } + + /** + * Clear modified property names. + */ + public void clearModifiedPropertyNames() { + _modifiedProperties.clear(); + } + + // =================================================================================== + // Basic Override + // ============== + + /** + * This method overrides the method that is declared at super. + * If the primary-key of the other is same as this one, returns true. + * + * @param other Other entity. + * @return Comparing result. + */ + public boolean equals(Object other) { + if (other == null) { + return false; + } + if (!(other instanceof BsNewsletters)) { + return false; + } + final BsNewsletters otherEntity = (BsNewsletters)other; + + if (getNewslettersId() == null || !getNewslettersId().equals(otherEntity.getNewslettersId())) { + return false; + } + + return true; + } + + /** + * This method overrides the method that is declared at super. + * Calculates hash-code from primary-key. + * + * @return Hash-code from primary-keys. + */ + public int hashCode() { + int result = 0; + + if (this.getNewslettersId() != null) { + result = result + getNewslettersId().hashCode(); + } + + return result; + } + + /** + * This method overrides the method that is declared at super. + * + * @return Column-value map-string. (NotNull) + */ + public String toString() { + final String delimiter = ","; + final StringBuffer sb = new StringBuffer(); + + sb.append(delimiter).append(getNewslettersId()); + sb.append(delimiter).append(getTitle()); + sb.append(delimiter).append(getContent()); + sb.append(delimiter).append(getModule()); + sb.append(delimiter).append(getDateAdded()); + sb.append(delimiter).append(getDateSent()); + sb.append(delimiter).append(getStatus()); + sb.append(delimiter).append(getLocked()); + + sb.delete(0, delimiter.length()); + sb.insert(0, "{").append("}"); + return sb.toString(); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/BsOrders.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/BsOrders.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/BsOrders.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,1508 @@ +package jp.sf.pal.pompei.bsentity; + + +import jp.sf.pal.pompei.allcommon.Entity; +import jp.sf.pal.pompei.allcommon.dbmeta.DBMeta; +import jp.sf.pal.pompei.allcommon.dbmeta.DBMetaInstanceHandler; + +/** + * The entity of ORDERS. + * + *
+ * [primary-key]
+ *     ORDERS_ID
+ * 
+ * [column-property]
+ *     ORDERS_ID, CUSTOMERS_ID, CUSTOMERS_NAME, CUSTOMERS_COMPANY, CUSTOMERS_STREET_ADDRESS, CUSTOMERS_SUBURB, CUSTOMERS_CITY, CUSTOMERS_POSTCODE, CUSTOMERS_STATE, CUSTOMERS_COUNTRY, CUSTOMERS_TELEPHONE, CUSTOMERS_EMAIL_ADDRESS, CUSTOMERS_ADDRESS_FORMAT_ID, DELIVERY_NAME, DELIVERY_COMPANY, DELIVERY_STREET_ADDRESS, DELIVERY_SUBURB, DELIVERY_CITY, DELIVERY_POSTCODE, DELIVERY_STATE, DELIVERY_COUNTRY, DELIVERY_ADDRESS_FORMAT_ID, BILLING_NAME, BILLING_COMPANY, BILLING_STREET_ADDRESS, BILLING_SUBURB, BILLING_CITY, BILLING_POSTCODE, BILLING_STATE, BILLING_COUNTRY, BILLING_ADDRESS_FORMAT_ID, PAYMENT_METHOD, CC_TYPE, CC_OWNER, CC_NUMBER, CC_EXPIRES, LAST_MODIFIED, DATE_PURCHASED, ORDERS_STATUS, ORDERS_DATE_FINISHED, CURRENCY, CURRENCY_VALUE
+ * 
+ * [foreign-property]
+ *     
+ * 
+ * [refferer-property]
+ *     
+ * 
+ * [sequence]
+ *     
+ * 
+ * [identity]
+ *     
+ * 
+ * [update-date]
+ *     
+ * 
+ * [version-no]
+ *     
+ * 
+ * 
+ * + * @author DBFlute(AutoGenerator) + */ +public abstract class BsOrders implements Entity, java.io.Serializable { + + /** Serial version UID. (Default) */ + private static final long serialVersionUID = 1L; + + /** TABLE-Annotation for S2Dao */ + public static final String TABLE = "ORDERS"; + + + // =================================================================================== + // Attribute + // ========= + /** Entity modified properties. (for S2Dao) */ + protected EntityModifiedProperties _modifiedProperties = newEntityModifiedProperties(); + + + /** The value of ordersId. ColumnDefinition -- PK : INTEGER : NotNull*/ + protected java.math.BigDecimal _ordersId; + + /** The value of customersId. ColumnDefinition -- INTEGER : NotNull*/ + protected java.math.BigDecimal _customersId; + + /** The value of customersName. ColumnDefinition -- VARCHAR(64) : NotNull*/ + protected String _customersName; + + /** The value of customersCompany. ColumnDefinition -- VARCHAR(32)*/ + protected String _customersCompany; + + /** The value of customersStreetAddress. ColumnDefinition -- VARCHAR(64) : NotNull*/ + protected String _customersStreetAddress; + + /** The value of customersSuburb. ColumnDefinition -- VARCHAR(32)*/ + protected String _customersSuburb; + + /** The value of customersCity. ColumnDefinition -- VARCHAR(32) : NotNull*/ + protected String _customersCity; + + /** The value of customersPostcode. ColumnDefinition -- VARCHAR(10) : NotNull*/ + protected String _customersPostcode; + + /** The value of customersState. ColumnDefinition -- VARCHAR(32)*/ + protected String _customersState; + + /** The value of customersCountry. ColumnDefinition -- VARCHAR(32) : NotNull*/ + protected String _customersCountry; + + /** The value of customersTelephone. ColumnDefinition -- VARCHAR(32) : NotNull*/ + protected String _customersTelephone; + + /** The value of customersEmailAddress. ColumnDefinition -- VARCHAR(96) : NotNull*/ + protected String _customersEmailAddress; + + /** The value of customersAddressFormatId. ColumnDefinition -- INTEGER : NotNull*/ + protected java.math.BigDecimal _customersAddressFormatId; + + /** The value of deliveryName. ColumnDefinition -- VARCHAR(64) : NotNull*/ + protected String _deliveryName; + + /** The value of deliveryCompany. ColumnDefinition -- VARCHAR(32)*/ + protected String _deliveryCompany; + + /** The value of deliveryStreetAddress. ColumnDefinition -- VARCHAR(64) : NotNull*/ + protected String _deliveryStreetAddress; + + /** The value of deliverySuburb. ColumnDefinition -- VARCHAR(32)*/ + protected String _deliverySuburb; + + /** The value of deliveryCity. ColumnDefinition -- VARCHAR(32) : NotNull*/ + protected String _deliveryCity; + + /** The value of deliveryPostcode. ColumnDefinition -- VARCHAR(10) : NotNull*/ + protected String _deliveryPostcode; + + /** The value of deliveryState. ColumnDefinition -- VARCHAR(32)*/ + protected String _deliveryState; + + /** The value of deliveryCountry. ColumnDefinition -- VARCHAR(32) : NotNull*/ + protected String _deliveryCountry; + + /** The value of deliveryAddressFormatId. ColumnDefinition -- INTEGER : NotNull*/ + protected java.math.BigDecimal _deliveryAddressFormatId; + + /** The value of billingName. ColumnDefinition -- VARCHAR(64) : NotNull*/ + protected String _billingName; + + /** The value of billingCompany. ColumnDefinition -- VARCHAR(32)*/ + protected String _billingCompany; + + /** The value of billingStreetAddress. ColumnDefinition -- VARCHAR(64) : NotNull*/ + protected String _billingStreetAddress; + + /** The value of billingSuburb. ColumnDefinition -- VARCHAR(32)*/ + protected String _billingSuburb; + + /** The value of billingCity. ColumnDefinition -- VARCHAR(32) : NotNull*/ + protected String _billingCity; + + /** The value of billingPostcode. ColumnDefinition -- VARCHAR(10) : NotNull*/ + protected String _billingPostcode; + + /** The value of billingState. ColumnDefinition -- VARCHAR(32)*/ + protected String _billingState; + + /** The value of billingCountry. ColumnDefinition -- VARCHAR(32) : NotNull*/ + protected String _billingCountry; + + /** The value of billingAddressFormatId. ColumnDefinition -- INTEGER : NotNull*/ + protected java.math.BigDecimal _billingAddressFormatId; + + /** The value of paymentMethod. ColumnDefinition -- VARCHAR(32) : NotNull*/ + protected String _paymentMethod; + + /** The value of ccType. ColumnDefinition -- VARCHAR(20)*/ + protected String _ccType; + + /** The value of ccOwner. ColumnDefinition -- VARCHAR(64)*/ + protected String _ccOwner; + + /** The value of ccNumber. ColumnDefinition -- VARCHAR(32)*/ + protected String _ccNumber; + + /** The value of ccExpires. ColumnDefinition -- VARCHAR(4)*/ + protected String _ccExpires; + + /** The value of lastModified. ColumnDefinition -- TIMESTAMP*/ + protected java.sql.Timestamp _lastModified; + + /** The value of datePurchased. ColumnDefinition -- TIMESTAMP*/ + protected java.sql.Timestamp _datePurchased; + + /** The value of ordersStatus. ColumnDefinition -- INTEGER : NotNull*/ + protected java.math.BigDecimal _ordersStatus; + + /** The value of ordersDateFinished. ColumnDefinition -- TIMESTAMP*/ + protected java.sql.Timestamp _ordersDateFinished; + + /** The value of currency. ColumnDefinition -- CHAR(3)*/ + protected String _currency; + + /** The value of currencyValue. ColumnDefinition -- DECIMAL(14)*/ + protected java.math.BigDecimal _currencyValue; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + public BsOrders() { + } + + + // =================================================================================== + // DBMeta + // ====== + /** + * This method implements the method that is declared at super. + * + * @return DBMeta. (NotNull) + */ + public DBMeta getDBMeta() { + return DBMetaInstanceHandler.getInstanceByTableDbName(getTableDbName()); + } + + // =================================================================================== + // Table Name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + public String getTableDbName() { + return "ORDERS"; + } + + /** + * This method implements the method that is declared at super. + * + * @return Table cap-prop-name. (NotNull) + */ + public String getTableCapPropName() { + return "Orders"; + } + + /** + * This method implements the method that is declared at super. + * + * @return Table uncap-prop-name. (NotNull) + */ + public String getTableUncapPropName() { + return "orders"; + } + + // =================================================================================== + // Accessor + // ======== + + /** Column-Annotation for S2Dao. ColumnDefinition -- PK : INTEGER : NotNull*/ + public static final String ordersId_COLUMN = "ORDERS_ID"; + + /** + * Get the value of ordersId.
+ * {PK : INTEGER : NotNull} + * + * @return The value of ordersId. (Nullable) + */ + public java.math.BigDecimal getOrdersId() { + return _ordersId; + } + + /** + * Set the value of ordersId.
+ * {PK : INTEGER : NotNull} + * + * @param ordersId The value of ordersId. (Nullable) + */ + public void setOrdersId(java.math.BigDecimal ordersId) { + _modifiedProperties.addPropertyName("ordersId"); + _ordersId = ordersId; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- INTEGER : NotNull*/ + public static final String customersId_COLUMN = "CUSTOMERS_ID"; + + /** + * Get the value of customersId.
+ * {INTEGER : NotNull} + * + * @return The value of customersId. (Nullable) + */ + public java.math.BigDecimal getCustomersId() { + return _customersId; + } + + /** + * Set the value of customersId.
+ * {INTEGER : NotNull} + * + * @param customersId The value of customersId. (Nullable) + */ + public void setCustomersId(java.math.BigDecimal customersId) { + _modifiedProperties.addPropertyName("customersId"); + _customersId = customersId; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- VARCHAR(64) : NotNull*/ + public static final String customersName_COLUMN = "CUSTOMERS_NAME"; + + /** + * Get the value of customersName.
+ * {VARCHAR(64) : NotNull} + * + * @return The value of customersName. (Nullable) + */ + public String getCustomersName() { + return _customersName; + } + + /** + * Set the value of customersName.
+ * {VARCHAR(64) : NotNull} + * + * @param customersName The value of customersName. (Nullable) + */ + public void setCustomersName(String customersName) { + _modifiedProperties.addPropertyName("customersName"); + _customersName = customersName; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- VARCHAR(32)*/ + public static final String customersCompany_COLUMN = "CUSTOMERS_COMPANY"; + + /** + * Get the value of customersCompany.
+ * {VARCHAR(32)} + * + * @return The value of customersCompany. (Nullable) + */ + public String getCustomersCompany() { + return _customersCompany; + } + + /** + * Set the value of customersCompany.
+ * {VARCHAR(32)} + * + * @param customersCompany The value of customersCompany. (Nullable) + */ + public void setCustomersCompany(String customersCompany) { + _modifiedProperties.addPropertyName("customersCompany"); + _customersCompany = customersCompany; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- VARCHAR(64) : NotNull*/ + public static final String customersStreetAddress_COLUMN = "CUSTOMERS_STREET_ADDRESS"; + + /** + * Get the value of customersStreetAddress.
+ * {VARCHAR(64) : NotNull} + * + * @return The value of customersStreetAddress. (Nullable) + */ + public String getCustomersStreetAddress() { + return _customersStreetAddress; + } + + /** + * Set the value of customersStreetAddress.
+ * {VARCHAR(64) : NotNull} + * + * @param customersStreetAddress The value of customersStreetAddress. (Nullable) + */ + public void setCustomersStreetAddress(String customersStreetAddress) { + _modifiedProperties.addPropertyName("customersStreetAddress"); + _customersStreetAddress = customersStreetAddress; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- VARCHAR(32)*/ + public static final String customersSuburb_COLUMN = "CUSTOMERS_SUBURB"; + + /** + * Get the value of customersSuburb.
+ * {VARCHAR(32)} + * + * @return The value of customersSuburb. (Nullable) + */ + public String getCustomersSuburb() { + return _customersSuburb; + } + + /** + * Set the value of customersSuburb.
+ * {VARCHAR(32)} + * + * @param customersSuburb The value of customersSuburb. (Nullable) + */ + public void setCustomersSuburb(String customersSuburb) { + _modifiedProperties.addPropertyName("customersSuburb"); + _customersSuburb = customersSuburb; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- VARCHAR(32) : NotNull*/ + public static final String customersCity_COLUMN = "CUSTOMERS_CITY"; + + /** + * Get the value of customersCity.
+ * {VARCHAR(32) : NotNull} + * + * @return The value of customersCity. (Nullable) + */ + public String getCustomersCity() { + return _customersCity; + } + + /** + * Set the value of customersCity.
+ * {VARCHAR(32) : NotNull} + * + * @param customersCity The value of customersCity. (Nullable) + */ + public void setCustomersCity(String customersCity) { + _modifiedProperties.addPropertyName("customersCity"); + _customersCity = customersCity; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- VARCHAR(10) : NotNull*/ + public static final String customersPostcode_COLUMN = "CUSTOMERS_POSTCODE"; + + /** + * Get the value of customersPostcode.
+ * {VARCHAR(10) : NotNull} + * + * @return The value of customersPostcode. (Nullable) + */ + public String getCustomersPostcode() { + return _customersPostcode; + } + + /** + * Set the value of customersPostcode.
+ * {VARCHAR(10) : NotNull} + * + * @param customersPostcode The value of customersPostcode. (Nullable) + */ + public void setCustomersPostcode(String customersPostcode) { + _modifiedProperties.addPropertyName("customersPostcode"); + _customersPostcode = customersPostcode; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- VARCHAR(32)*/ + public static final String customersState_COLUMN = "CUSTOMERS_STATE"; + + /** + * Get the value of customersState.
+ * {VARCHAR(32)} + * + * @return The value of customersState. (Nullable) + */ + public String getCustomersState() { + return _customersState; + } + + /** + * Set the value of customersState.
+ * {VARCHAR(32)} + * + * @param customersState The value of customersState. (Nullable) + */ + public void setCustomersState(String customersState) { + _modifiedProperties.addPropertyName("customersState"); + _customersState = customersState; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- VARCHAR(32) : NotNull*/ + public static final String customersCountry_COLUMN = "CUSTOMERS_COUNTRY"; + + /** + * Get the value of customersCountry.
+ * {VARCHAR(32) : NotNull} + * + * @return The value of customersCountry. (Nullable) + */ + public String getCustomersCountry() { + return _customersCountry; + } + + /** + * Set the value of customersCountry.
+ * {VARCHAR(32) : NotNull} + * + * @param customersCountry The value of customersCountry. (Nullable) + */ + public void setCustomersCountry(String customersCountry) { + _modifiedProperties.addPropertyName("customersCountry"); + _customersCountry = customersCountry; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- VARCHAR(32) : NotNull*/ + public static final String customersTelephone_COLUMN = "CUSTOMERS_TELEPHONE"; + + /** + * Get the value of customersTelephone.
+ * {VARCHAR(32) : NotNull} + * + * @return The value of customersTelephone. (Nullable) + */ + public String getCustomersTelephone() { + return _customersTelephone; + } + + /** + * Set the value of customersTelephone.
+ * {VARCHAR(32) : NotNull} + * + * @param customersTelephone The value of customersTelephone. (Nullable) + */ + public void setCustomersTelephone(String customersTelephone) { + _modifiedProperties.addPropertyName("customersTelephone"); + _customersTelephone = customersTelephone; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- VARCHAR(96) : NotNull*/ + public static final String customersEmailAddress_COLUMN = "CUSTOMERS_EMAIL_ADDRESS"; + + /** + * Get the value of customersEmailAddress.
+ * {VARCHAR(96) : NotNull} + * + * @return The value of customersEmailAddress. (Nullable) + */ + public String getCustomersEmailAddress() { + return _customersEmailAddress; + } + + /** + * Set the value of customersEmailAddress.
+ * {VARCHAR(96) : NotNull} + * + * @param customersEmailAddress The value of customersEmailAddress. (Nullable) + */ + public void setCustomersEmailAddress(String customersEmailAddress) { + _modifiedProperties.addPropertyName("customersEmailAddress"); + _customersEmailAddress = customersEmailAddress; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- INTEGER : NotNull*/ + public static final String customersAddressFormatId_COLUMN = "CUSTOMERS_ADDRESS_FORMAT_ID"; + + /** + * Get the value of customersAddressFormatId.
+ * {INTEGER : NotNull} + * + * @return The value of customersAddressFormatId. (Nullable) + */ + public java.math.BigDecimal getCustomersAddressFormatId() { + return _customersAddressFormatId; + } + + /** + * Set the value of customersAddressFormatId.
+ * {INTEGER : NotNull} + * + * @param customersAddressFormatId The value of customersAddressFormatId. (Nullable) + */ + public void setCustomersAddressFormatId(java.math.BigDecimal customersAddressFormatId) { + _modifiedProperties.addPropertyName("customersAddressFormatId"); + _customersAddressFormatId = customersAddressFormatId; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- VARCHAR(64) : NotNull*/ + public static final String deliveryName_COLUMN = "DELIVERY_NAME"; + + /** + * Get the value of deliveryName.
+ * {VARCHAR(64) : NotNull} + * + * @return The value of deliveryName. (Nullable) + */ + public String getDeliveryName() { + return _deliveryName; + } + + /** + * Set the value of deliveryName.
+ * {VARCHAR(64) : NotNull} + * + * @param deliveryName The value of deliveryName. (Nullable) + */ + public void setDeliveryName(String deliveryName) { + _modifiedProperties.addPropertyName("deliveryName"); + _deliveryName = deliveryName; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- VARCHAR(32)*/ + public static final String deliveryCompany_COLUMN = "DELIVERY_COMPANY"; + + /** + * Get the value of deliveryCompany.
+ * {VARCHAR(32)} + * + * @return The value of deliveryCompany. (Nullable) + */ + public String getDeliveryCompany() { + return _deliveryCompany; + } + + /** + * Set the value of deliveryCompany.
+ * {VARCHAR(32)} + * + * @param deliveryCompany The value of deliveryCompany. (Nullable) + */ + public void setDeliveryCompany(String deliveryCompany) { + _modifiedProperties.addPropertyName("deliveryCompany"); + _deliveryCompany = deliveryCompany; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- VARCHAR(64) : NotNull*/ + public static final String deliveryStreetAddress_COLUMN = "DELIVERY_STREET_ADDRESS"; + + /** + * Get the value of deliveryStreetAddress.
+ * {VARCHAR(64) : NotNull} + * + * @return The value of deliveryStreetAddress. (Nullable) + */ + public String getDeliveryStreetAddress() { + return _deliveryStreetAddress; + } + + /** + * Set the value of deliveryStreetAddress.
+ * {VARCHAR(64) : NotNull} + * + * @param deliveryStreetAddress The value of deliveryStreetAddress. (Nullable) + */ + public void setDeliveryStreetAddress(String deliveryStreetAddress) { + _modifiedProperties.addPropertyName("deliveryStreetAddress"); + _deliveryStreetAddress = deliveryStreetAddress; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- VARCHAR(32)*/ + public static final String deliverySuburb_COLUMN = "DELIVERY_SUBURB"; + + /** + * Get the value of deliverySuburb.
+ * {VARCHAR(32)} + * + * @return The value of deliverySuburb. (Nullable) + */ + public String getDeliverySuburb() { + return _deliverySuburb; + } + + /** + * Set the value of deliverySuburb.
+ * {VARCHAR(32)} + * + * @param deliverySuburb The value of deliverySuburb. (Nullable) + */ + public void setDeliverySuburb(String deliverySuburb) { + _modifiedProperties.addPropertyName("deliverySuburb"); + _deliverySuburb = deliverySuburb; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- VARCHAR(32) : NotNull*/ + public static final String deliveryCity_COLUMN = "DELIVERY_CITY"; + + /** + * Get the value of deliveryCity.
+ * {VARCHAR(32) : NotNull} + * + * @return The value of deliveryCity. (Nullable) + */ + public String getDeliveryCity() { + return _deliveryCity; + } + + /** + * Set the value of deliveryCity.
+ * {VARCHAR(32) : NotNull} + * + * @param deliveryCity The value of deliveryCity. (Nullable) + */ + public void setDeliveryCity(String deliveryCity) { + _modifiedProperties.addPropertyName("deliveryCity"); + _deliveryCity = deliveryCity; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- VARCHAR(10) : NotNull*/ + public static final String deliveryPostcode_COLUMN = "DELIVERY_POSTCODE"; + + /** + * Get the value of deliveryPostcode.
+ * {VARCHAR(10) : NotNull} + * + * @return The value of deliveryPostcode. (Nullable) + */ + public String getDeliveryPostcode() { + return _deliveryPostcode; + } + + /** + * Set the value of deliveryPostcode.
+ * {VARCHAR(10) : NotNull} + * + * @param deliveryPostcode The value of deliveryPostcode. (Nullable) + */ + public void setDeliveryPostcode(String deliveryPostcode) { + _modifiedProperties.addPropertyName("deliveryPostcode"); + _deliveryPostcode = deliveryPostcode; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- VARCHAR(32)*/ + public static final String deliveryState_COLUMN = "DELIVERY_STATE"; + + /** + * Get the value of deliveryState.
+ * {VARCHAR(32)} + * + * @return The value of deliveryState. (Nullable) + */ + public String getDeliveryState() { + return _deliveryState; + } + + /** + * Set the value of deliveryState.
+ * {VARCHAR(32)} + * + * @param deliveryState The value of deliveryState. (Nullable) + */ + public void setDeliveryState(String deliveryState) { + _modifiedProperties.addPropertyName("deliveryState"); + _deliveryState = deliveryState; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- VARCHAR(32) : NotNull*/ + public static final String deliveryCountry_COLUMN = "DELIVERY_COUNTRY"; + + /** + * Get the value of deliveryCountry.
+ * {VARCHAR(32) : NotNull} + * + * @return The value of deliveryCountry. (Nullable) + */ + public String getDeliveryCountry() { + return _deliveryCountry; + } + + /** + * Set the value of deliveryCountry.
+ * {VARCHAR(32) : NotNull} + * + * @param deliveryCountry The value of deliveryCountry. (Nullable) + */ + public void setDeliveryCountry(String deliveryCountry) { + _modifiedProperties.addPropertyName("deliveryCountry"); + _deliveryCountry = deliveryCountry; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- INTEGER : NotNull*/ + public static final String deliveryAddressFormatId_COLUMN = "DELIVERY_ADDRESS_FORMAT_ID"; + + /** + * Get the value of deliveryAddressFormatId.
+ * {INTEGER : NotNull} + * + * @return The value of deliveryAddressFormatId. (Nullable) + */ + public java.math.BigDecimal getDeliveryAddressFormatId() { + return _deliveryAddressFormatId; + } + + /** + * Set the value of deliveryAddressFormatId.
+ * {INTEGER : NotNull} + * + * @param deliveryAddressFormatId The value of deliveryAddressFormatId. (Nullable) + */ + public void setDeliveryAddressFormatId(java.math.BigDecimal deliveryAddressFormatId) { + _modifiedProperties.addPropertyName("deliveryAddressFormatId"); + _deliveryAddressFormatId = deliveryAddressFormatId; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- VARCHAR(64) : NotNull*/ + public static final String billingName_COLUMN = "BILLING_NAME"; + + /** + * Get the value of billingName.
+ * {VARCHAR(64) : NotNull} + * + * @return The value of billingName. (Nullable) + */ + public String getBillingName() { + return _billingName; + } + + /** + * Set the value of billingName.
+ * {VARCHAR(64) : NotNull} + * + * @param billingName The value of billingName. (Nullable) + */ + public void setBillingName(String billingName) { + _modifiedProperties.addPropertyName("billingName"); + _billingName = billingName; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- VARCHAR(32)*/ + public static final String billingCompany_COLUMN = "BILLING_COMPANY"; + + /** + * Get the value of billingCompany.
+ * {VARCHAR(32)} + * + * @return The value of billingCompany. (Nullable) + */ + public String getBillingCompany() { + return _billingCompany; + } + + /** + * Set the value of billingCompany.
+ * {VARCHAR(32)} + * + * @param billingCompany The value of billingCompany. (Nullable) + */ + public void setBillingCompany(String billingCompany) { + _modifiedProperties.addPropertyName("billingCompany"); + _billingCompany = billingCompany; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- VARCHAR(64) : NotNull*/ + public static final String billingStreetAddress_COLUMN = "BILLING_STREET_ADDRESS"; + + /** + * Get the value of billingStreetAddress.
+ * {VARCHAR(64) : NotNull} + * + * @return The value of billingStreetAddress. (Nullable) + */ + public String getBillingStreetAddress() { + return _billingStreetAddress; + } + + /** + * Set the value of billingStreetAddress.
+ * {VARCHAR(64) : NotNull} + * + * @param billingStreetAddress The value of billingStreetAddress. (Nullable) + */ + public void setBillingStreetAddress(String billingStreetAddress) { + _modifiedProperties.addPropertyName("billingStreetAddress"); + _billingStreetAddress = billingStreetAddress; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- VARCHAR(32)*/ + public static final String billingSuburb_COLUMN = "BILLING_SUBURB"; + + /** + * Get the value of billingSuburb.
+ * {VARCHAR(32)} + * + * @return The value of billingSuburb. (Nullable) + */ + public String getBillingSuburb() { + return _billingSuburb; + } + + /** + * Set the value of billingSuburb.
+ * {VARCHAR(32)} + * + * @param billingSuburb The value of billingSuburb. (Nullable) + */ + public void setBillingSuburb(String billingSuburb) { + _modifiedProperties.addPropertyName("billingSuburb"); + _billingSuburb = billingSuburb; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- VARCHAR(32) : NotNull*/ + public static final String billingCity_COLUMN = "BILLING_CITY"; + + /** + * Get the value of billingCity.
+ * {VARCHAR(32) : NotNull} + * + * @return The value of billingCity. (Nullable) + */ + public String getBillingCity() { + return _billingCity; + } + + /** + * Set the value of billingCity.
+ * {VARCHAR(32) : NotNull} + * + * @param billingCity The value of billingCity. (Nullable) + */ + public void setBillingCity(String billingCity) { + _modifiedProperties.addPropertyName("billingCity"); + _billingCity = billingCity; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- VARCHAR(10) : NotNull*/ + public static final String billingPostcode_COLUMN = "BILLING_POSTCODE"; + + /** + * Get the value of billingPostcode.
+ * {VARCHAR(10) : NotNull} + * + * @return The value of billingPostcode. (Nullable) + */ + public String getBillingPostcode() { + return _billingPostcode; + } + + /** + * Set the value of billingPostcode.
+ * {VARCHAR(10) : NotNull} + * + * @param billingPostcode The value of billingPostcode. (Nullable) + */ + public void setBillingPostcode(String billingPostcode) { + _modifiedProperties.addPropertyName("billingPostcode"); + _billingPostcode = billingPostcode; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- VARCHAR(32)*/ + public static final String billingState_COLUMN = "BILLING_STATE"; + + /** + * Get the value of billingState.
+ * {VARCHAR(32)} + * + * @return The value of billingState. (Nullable) + */ + public String getBillingState() { + return _billingState; + } + + /** + * Set the value of billingState.
+ * {VARCHAR(32)} + * + * @param billingState The value of billingState. (Nullable) + */ + public void setBillingState(String billingState) { + _modifiedProperties.addPropertyName("billingState"); + _billingState = billingState; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- VARCHAR(32) : NotNull*/ + public static final String billingCountry_COLUMN = "BILLING_COUNTRY"; + + /** + * Get the value of billingCountry.
+ * {VARCHAR(32) : NotNull} + * + * @return The value of billingCountry. (Nullable) + */ + public String getBillingCountry() { + return _billingCountry; + } + + /** + * Set the value of billingCountry.
+ * {VARCHAR(32) : NotNull} + * + * @param billingCountry The value of billingCountry. (Nullable) + */ + public void setBillingCountry(String billingCountry) { + _modifiedProperties.addPropertyName("billingCountry"); + _billingCountry = billingCountry; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- INTEGER : NotNull*/ + public static final String billingAddressFormatId_COLUMN = "BILLING_ADDRESS_FORMAT_ID"; + + /** + * Get the value of billingAddressFormatId.
+ * {INTEGER : NotNull} + * + * @return The value of billingAddressFormatId. (Nullable) + */ + public java.math.BigDecimal getBillingAddressFormatId() { + return _billingAddressFormatId; + } + + /** + * Set the value of billingAddressFormatId.
+ * {INTEGER : NotNull} + * + * @param billingAddressFormatId The value of billingAddressFormatId. (Nullable) + */ + public void setBillingAddressFormatId(java.math.BigDecimal billingAddressFormatId) { + _modifiedProperties.addPropertyName("billingAddressFormatId"); + _billingAddressFormatId = billingAddressFormatId; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- VARCHAR(32) : NotNull*/ + public static final String paymentMethod_COLUMN = "PAYMENT_METHOD"; + + /** + * Get the value of paymentMethod.
+ * {VARCHAR(32) : NotNull} + * + * @return The value of paymentMethod. (Nullable) + */ + public String getPaymentMethod() { + return _paymentMethod; + } + + /** + * Set the value of paymentMethod.
+ * {VARCHAR(32) : NotNull} + * + * @param paymentMethod The value of paymentMethod. (Nullable) + */ + public void setPaymentMethod(String paymentMethod) { + _modifiedProperties.addPropertyName("paymentMethod"); + _paymentMethod = paymentMethod; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- VARCHAR(20)*/ + public static final String ccType_COLUMN = "CC_TYPE"; + + /** + * Get the value of ccType.
+ * {VARCHAR(20)} + * + * @return The value of ccType. (Nullable) + */ + public String getCcType() { + return _ccType; + } + + /** + * Set the value of ccType.
+ * {VARCHAR(20)} + * + * @param ccType The value of ccType. (Nullable) + */ + public void setCcType(String ccType) { + _modifiedProperties.addPropertyName("ccType"); + _ccType = ccType; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- VARCHAR(64)*/ + public static final String ccOwner_COLUMN = "CC_OWNER"; + + /** + * Get the value of ccOwner.
+ * {VARCHAR(64)} + * + * @return The value of ccOwner. (Nullable) + */ + public String getCcOwner() { + return _ccOwner; + } + + /** + * Set the value of ccOwner.
+ * {VARCHAR(64)} + * + * @param ccOwner The value of ccOwner. (Nullable) + */ + public void setCcOwner(String ccOwner) { + _modifiedProperties.addPropertyName("ccOwner"); + _ccOwner = ccOwner; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- VARCHAR(32)*/ + public static final String ccNumber_COLUMN = "CC_NUMBER"; + + /** + * Get the value of ccNumber.
+ * {VARCHAR(32)} + * + * @return The value of ccNumber. (Nullable) + */ + public String getCcNumber() { + return _ccNumber; + } + + /** + * Set the value of ccNumber.
+ * {VARCHAR(32)} + * + * @param ccNumber The value of ccNumber. (Nullable) + */ + public void setCcNumber(String ccNumber) { + _modifiedProperties.addPropertyName("ccNumber"); + _ccNumber = ccNumber; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- VARCHAR(4)*/ + public static final String ccExpires_COLUMN = "CC_EXPIRES"; + + /** + * Get the value of ccExpires.
+ * {VARCHAR(4)} + * + * @return The value of ccExpires. (Nullable) + */ + public String getCcExpires() { + return _ccExpires; + } + + /** + * Set the value of ccExpires.
+ * {VARCHAR(4)} + * + * @param ccExpires The value of ccExpires. (Nullable) + */ + public void setCcExpires(String ccExpires) { + _modifiedProperties.addPropertyName("ccExpires"); + _ccExpires = ccExpires; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- TIMESTAMP*/ + public static final String lastModified_COLUMN = "LAST_MODIFIED"; + + /** + * Get the value of lastModified.
+ * {TIMESTAMP} + * + * @return The value of lastModified. (Nullable) + */ + public java.sql.Timestamp getLastModified() { + return _lastModified; + } + + /** + * Set the value of lastModified.
+ * {TIMESTAMP} + * + * @param lastModified The value of lastModified. (Nullable) + */ + public void setLastModified(java.sql.Timestamp lastModified) { + _modifiedProperties.addPropertyName("lastModified"); + _lastModified = lastModified; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- TIMESTAMP*/ + public static final String datePurchased_COLUMN = "DATE_PURCHASED"; + + /** + * Get the value of datePurchased.
+ * {TIMESTAMP} + * + * @return The value of datePurchased. (Nullable) + */ + public java.sql.Timestamp getDatePurchased() { + return _datePurchased; + } + + /** + * Set the value of datePurchased.
+ * {TIMESTAMP} + * + * @param datePurchased The value of datePurchased. (Nullable) + */ + public void setDatePurchased(java.sql.Timestamp datePurchased) { + _modifiedProperties.addPropertyName("datePurchased"); + _datePurchased = datePurchased; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- INTEGER : NotNull*/ + public static final String ordersStatus_COLUMN = "ORDERS_STATUS"; + + /** + * Get the value of ordersStatus.
+ * {INTEGER : NotNull} + * + * @return The value of ordersStatus. (Nullable) + */ + public java.math.BigDecimal getOrdersStatus() { + return _ordersStatus; + } + + /** + * Set the value of ordersStatus.
+ * {INTEGER : NotNull} + * + * @param ordersStatus The value of ordersStatus. (Nullable) + */ + public void setOrdersStatus(java.math.BigDecimal ordersStatus) { + _modifiedProperties.addPropertyName("ordersStatus"); + _ordersStatus = ordersStatus; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- TIMESTAMP*/ + public static final String ordersDateFinished_COLUMN = "ORDERS_DATE_FINISHED"; + + /** + * Get the value of ordersDateFinished.
+ * {TIMESTAMP} + * + * @return The value of ordersDateFinished. (Nullable) + */ + public java.sql.Timestamp getOrdersDateFinished() { + return _ordersDateFinished; + } + + /** + * Set the value of ordersDateFinished.
+ * {TIMESTAMP} + * + * @param ordersDateFinished The value of ordersDateFinished. (Nullable) + */ + public void setOrdersDateFinished(java.sql.Timestamp ordersDateFinished) { + _modifiedProperties.addPropertyName("ordersDateFinished"); + _ordersDateFinished = ordersDateFinished; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- CHAR(3)*/ + public static final String currency_COLUMN = "CURRENCY"; + + /** + * Get the value of currency.
+ * {CHAR(3)} + * + * @return The value of currency. (Nullable) + */ + public String getCurrency() { + return _currency; + } + + /** + * Set the value of currency.
+ * {CHAR(3)} + * + * @param currency The value of currency. (Nullable) + */ + public void setCurrency(String currency) { + _modifiedProperties.addPropertyName("currency"); + _currency = currency; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- DECIMAL(14)*/ + public static final String currencyValue_COLUMN = "CURRENCY_VALUE"; + + /** + * Get the value of currencyValue.
+ * {DECIMAL(14)} + * + * @return The value of currencyValue. (Nullable) + */ + public java.math.BigDecimal getCurrencyValue() { + return _currencyValue; + } + + /** + * Set the value of currencyValue.
+ * {DECIMAL(14)} + * + * @param currencyValue The value of currencyValue. (Nullable) + */ + public void setCurrencyValue(java.math.BigDecimal currencyValue) { + _modifiedProperties.addPropertyName("currencyValue"); + _currencyValue = currencyValue; + } + + + // =================================================================================== + // Classify Method + // =============== + + // =================================================================================== + // Classification Determination + // ============================ + + + // =================================================================================== + // Classification Getter + // ===================== + + + // =================================================================================== + // Foreign Table + // ============= + + // =================================================================================== + // Refferer Table + // ============== + + // =================================================================================== + // Accept + // ====== + /** + * This method implements the method that is declared at super. + * + * @param primaryKeyMap Primary key map. (NotNull and NotEmpty) + * @deprecated Please use OrdersDbm.getInstance().acceptPrimaryKeyMap(entity, primaryKeyMap); + */ + public void acceptPrimaryKeyMap(java.util.Map primaryKeyMap) { + getDBMeta().acceptPrimaryKeyMap(this, primaryKeyMap); + } + + /** + * This method implements the method that is declared at super. + * + * @param primaryKeyMapString Primary-key map-string. (NotNull and NotEmpty) + * @deprecated Please use OrdersDbm.getInstance().acceptPrimaryKeyMapString(entity, primaryKeyMapString); + */ + public void acceptPrimaryKeyMapString(String primaryKeyMapString) { + getDBMeta().acceptPrimaryKeyMapString(this, primaryKeyMapString); + } + + /** + * This method implements the method that is declared at super. + * + * @param columnValueMap Column-value map. (NotNull and NotEmpty) + * @deprecated Please use OrdersDbm.getInstance().acceptColumnValueMap(entity, columnValueMap); + */ + public void acceptColumnValueMap(java.util.Map columnValueMap) { + getDBMeta().acceptColumnValueMap(this, columnValueMap); + } + + /** + * This method implements the method that is declared at super. + * + * @param columnValueMapString Column-value map-string. (NotNull and NotEmpty) + * @deprecated Please use OrdersDbm.getInstance().acceptColumnValueMap(entity, columnValueMapString); + */ + public void acceptColumnValueMapString(String columnValueMapString) { + getDBMeta().acceptColumnValueMapString(this, columnValueMapString); + } + + // =================================================================================== + // Extract + // ======= + /** + * This method implements the method that is declared at super. + * + * @return Primary-key map-string. (NotNull) + * @deprecated Please use OrdersDbm.getInstance().extractPrimaryKeyMapString(entity); + */ + public String extractPrimaryKeyMapString() { + return getDBMeta().extractPrimaryKeyMapString(this); + } + + /** + * Extract primary-key map-string. + * + * @param startBrace Start-brace. (NotNull) + * @param endBrace End-brace. (NotNull) + * @param delimiter Delimiter. (NotNull) + * @param equal Equal. (NotNull) + * @return Primary-key map-string. (NotNull) + * @deprecated Please use OrdersDbm.getInstance().extractPrimaryKeyMapString(entity, startBrace, endBrace, delimiter, equal); + */ + public String extractPrimaryKeyMapString(String startBrace, String endBrace, String delimiter, String equal) { + return getDBMeta().extractPrimaryKeyMapString(this, startBrace, endBrace, delimiter, equal); + } + + /** + * This method implements the method that is declared at super. + * + * @return Column-value map-string. (NotNull) + * @deprecated Please use OrdersDbm.getInstance().extractColumnValueMapString(entity); + */ + public String extractColumnValueMapString() { + return getDBMeta().extractColumnValueMapString(this); + } + + /** + * Extract column-value map-string. + * + * @param startBrace Start-brace. (NotNull) + * @param endBrace End-brace. (NotNull) + * @param delimiter Delimiter. (NotNull) + * @param equal Equal. (NotNull) + * @return Column-value map-string. (NotNull) + * @deprecated Please use OrdersDbm.getInstance().extractColumnValueMapString(entity, startBrace, endBrace, delimiter, equal); + */ + public String extractColumnValueMapString(String startBrace, String endBrace, String delimiter, String equal) { + return getDBMeta().extractColumnValueMapString(this, startBrace, endBrace, delimiter, equal); + } + + + // =================================================================================== + // Determination + // ============= + /** + * This method implements the method that is declared at super. + * + * @return Determination. + */ + public boolean hasPrimaryKeyValue() { + + if (_ordersId == null) { + return false; + } + + return true; + } + + // =================================================================================== + // Modified Properties + // =================== + /** + * Get modified property names. (S2Dao uses this for updateModifiedProperties()) + * + * @return Modified property names. (NotNull) + */ + public java.util.Set getModifiedPropertyNames() { + return _modifiedProperties.getPropertyNames(); + } + + /** + * New entity modified properties. You can override this at the sub-class if you need it. + * + * @return Entity modified properties. (NotNull) + */ + protected EntityModifiedProperties newEntityModifiedProperties() { + return new EntityModifiedProperties(); + } + + /** + * Clear modified property names. + */ + public void clearModifiedPropertyNames() { + _modifiedProperties.clear(); + } + + // =================================================================================== + // Basic Override + // ============== + + /** + * This method overrides the method that is declared at super. + * If the primary-key of the other is same as this one, returns true. + * + * @param other Other entity. + * @return Comparing result. + */ + public boolean equals(Object other) { + if (other == null) { + return false; + } + if (!(other instanceof BsOrders)) { + return false; + } + final BsOrders otherEntity = (BsOrders)other; + + if (getOrdersId() == null || !getOrdersId().equals(otherEntity.getOrdersId())) { + return false; + } + + return true; + } + + /** + * This method overrides the method that is declared at super. + * Calculates hash-code from primary-key. + * + * @return Hash-code from primary-keys. + */ + public int hashCode() { + int result = 0; + + if (this.getOrdersId() != null) { + result = result + getOrdersId().hashCode(); + } + + return result; + } + + /** + * This method overrides the method that is declared at super. + * + * @return Column-value map-string. (NotNull) + */ + public String toString() { + final String delimiter = ","; + final StringBuffer sb = new StringBuffer(); + + sb.append(delimiter).append(getOrdersId()); + sb.append(delimiter).append(getCustomersId()); + sb.append(delimiter).append(getCustomersName()); + sb.append(delimiter).append(getCustomersCompany()); + sb.append(delimiter).append(getCustomersStreetAddress()); + sb.append(delimiter).append(getCustomersSuburb()); + sb.append(delimiter).append(getCustomersCity()); + sb.append(delimiter).append(getCustomersPostcode()); + sb.append(delimiter).append(getCustomersState()); + sb.append(delimiter).append(getCustomersCountry()); + sb.append(delimiter).append(getCustomersTelephone()); + sb.append(delimiter).append(getCustomersEmailAddress()); + sb.append(delimiter).append(getCustomersAddressFormatId()); + sb.append(delimiter).append(getDeliveryName()); + sb.append(delimiter).append(getDeliveryCompany()); + sb.append(delimiter).append(getDeliveryStreetAddress()); + sb.append(delimiter).append(getDeliverySuburb()); + sb.append(delimiter).append(getDeliveryCity()); + sb.append(delimiter).append(getDeliveryPostcode()); + sb.append(delimiter).append(getDeliveryState()); + sb.append(delimiter).append(getDeliveryCountry()); + sb.append(delimiter).append(getDeliveryAddressFormatId()); + sb.append(delimiter).append(getBillingName()); + sb.append(delimiter).append(getBillingCompany()); + sb.append(delimiter).append(getBillingStreetAddress()); + sb.append(delimiter).append(getBillingSuburb()); + sb.append(delimiter).append(getBillingCity()); + sb.append(delimiter).append(getBillingPostcode()); + sb.append(delimiter).append(getBillingState()); + sb.append(delimiter).append(getBillingCountry()); + sb.append(delimiter).append(getBillingAddressFormatId()); + sb.append(delimiter).append(getPaymentMethod()); + sb.append(delimiter).append(getCcType()); + sb.append(delimiter).append(getCcOwner()); + sb.append(delimiter).append(getCcNumber()); + sb.append(delimiter).append(getCcExpires()); + sb.append(delimiter).append(getLastModified()); + sb.append(delimiter).append(getDatePurchased()); + sb.append(delimiter).append(getOrdersStatus()); + sb.append(delimiter).append(getOrdersDateFinished()); + sb.append(delimiter).append(getCurrency()); + sb.append(delimiter).append(getCurrencyValue()); + + sb.delete(0, delimiter.length()); + sb.insert(0, "{").append("}"); + return sb.toString(); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/BsOrdersProducts.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/BsOrdersProducts.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/BsOrdersProducts.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,584 @@ +package jp.sf.pal.pompei.bsentity; + + +import jp.sf.pal.pompei.allcommon.Entity; +import jp.sf.pal.pompei.allcommon.dbmeta.DBMeta; +import jp.sf.pal.pompei.allcommon.dbmeta.DBMetaInstanceHandler; + +/** + * The entity of ORDERS_PRODUCTS. + * + *
+ * [primary-key]
+ *     ORDERS_PRODUCTS_ID
+ * 
+ * [column-property]
+ *     ORDERS_PRODUCTS_ID, ORDERS_ID, PRODUCTS_ID, PRODUCTS_MODEL, PRODUCTS_NAME, PRODUCTS_PRICE, FINAL_PRICE, PRODUCTS_TAX, PRODUCTS_QUANTITY
+ * 
+ * [foreign-property]
+ *     
+ * 
+ * [refferer-property]
+ *     
+ * 
+ * [sequence]
+ *     
+ * 
+ * [identity]
+ *     
+ * 
+ * [update-date]
+ *     
+ * 
+ * [version-no]
+ *     
+ * 
+ * 
+ * + * @author DBFlute(AutoGenerator) + */ +public abstract class BsOrdersProducts implements Entity, java.io.Serializable { + + /** Serial version UID. (Default) */ + private static final long serialVersionUID = 1L; + + /** TABLE-Annotation for S2Dao */ + public static final String TABLE = "ORDERS_PRODUCTS"; + + + // =================================================================================== + // Attribute + // ========= + /** Entity modified properties. (for S2Dao) */ + protected EntityModifiedProperties _modifiedProperties = newEntityModifiedProperties(); + + + /** The value of ordersProductsId. ColumnDefinition -- PK : INTEGER : NotNull*/ + protected java.math.BigDecimal _ordersProductsId; + + /** The value of ordersId. ColumnDefinition -- INTEGER : NotNull*/ + protected java.math.BigDecimal _ordersId; + + /** The value of productsId. ColumnDefinition -- INTEGER : NotNull*/ + protected java.math.BigDecimal _productsId; + + /** The value of productsModel. ColumnDefinition -- VARCHAR(12)*/ + protected String _productsModel; + + /** The value of productsName. ColumnDefinition -- VARCHAR(64) : NotNull*/ + protected String _productsName; + + /** The value of productsPrice. ColumnDefinition -- DECIMAL(15) : NotNull*/ + protected java.math.BigDecimal _productsPrice; + + /** The value of finalPrice. ColumnDefinition -- DECIMAL(15) : NotNull*/ + protected java.math.BigDecimal _finalPrice; + + /** The value of productsTax. ColumnDefinition -- DECIMAL(7) : NotNull*/ + protected java.math.BigDecimal _productsTax; + + /** The value of productsQuantity. ColumnDefinition -- INTEGER : NotNull*/ + protected java.math.BigDecimal _productsQuantity; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + public BsOrdersProducts() { + } + + + // =================================================================================== + // DBMeta + // ====== + /** + * This method implements the method that is declared at super. + * + * @return DBMeta. (NotNull) + */ + public DBMeta getDBMeta() { + return DBMetaInstanceHandler.getInstanceByTableDbName(getTableDbName()); + } + + // =================================================================================== + // Table Name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + public String getTableDbName() { + return "ORDERS_PRODUCTS"; + } + + /** + * This method implements the method that is declared at super. + * + * @return Table cap-prop-name. (NotNull) + */ + public String getTableCapPropName() { + return "OrdersProducts"; + } + + /** + * This method implements the method that is declared at super. + * + * @return Table uncap-prop-name. (NotNull) + */ + public String getTableUncapPropName() { + return "ordersProducts"; + } + + // =================================================================================== + // Accessor + // ======== + + /** Column-Annotation for S2Dao. ColumnDefinition -- PK : INTEGER : NotNull*/ + public static final String ordersProductsId_COLUMN = "ORDERS_PRODUCTS_ID"; + + /** + * Get the value of ordersProductsId.
+ * {PK : INTEGER : NotNull} + * + * @return The value of ordersProductsId. (Nullable) + */ + public java.math.BigDecimal getOrdersProductsId() { + return _ordersProductsId; + } + + /** + * Set the value of ordersProductsId.
+ * {PK : INTEGER : NotNull} + * + * @param ordersProductsId The value of ordersProductsId. (Nullable) + */ + public void setOrdersProductsId(java.math.BigDecimal ordersProductsId) { + _modifiedProperties.addPropertyName("ordersProductsId"); + _ordersProductsId = ordersProductsId; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- INTEGER : NotNull*/ + public static final String ordersId_COLUMN = "ORDERS_ID"; + + /** + * Get the value of ordersId.
+ * {INTEGER : NotNull} + * + * @return The value of ordersId. (Nullable) + */ + public java.math.BigDecimal getOrdersId() { + return _ordersId; + } + + /** + * Set the value of ordersId.
+ * {INTEGER : NotNull} + * + * @param ordersId The value of ordersId. (Nullable) + */ + public void setOrdersId(java.math.BigDecimal ordersId) { + _modifiedProperties.addPropertyName("ordersId"); + _ordersId = ordersId; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- INTEGER : NotNull*/ + public static final String productsId_COLUMN = "PRODUCTS_ID"; + + /** + * Get the value of productsId.
+ * {INTEGER : NotNull} + * + * @return The value of productsId. (Nullable) + */ + public java.math.BigDecimal getProductsId() { + return _productsId; + } + + /** + * Set the value of productsId.
+ * {INTEGER : NotNull} + * + * @param productsId The value of productsId. (Nullable) + */ + public void setProductsId(java.math.BigDecimal productsId) { + _modifiedProperties.addPropertyName("productsId"); + _productsId = productsId; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- VARCHAR(12)*/ + public static final String productsModel_COLUMN = "PRODUCTS_MODEL"; + + /** + * Get the value of productsModel.
+ * {VARCHAR(12)} + * + * @return The value of productsModel. (Nullable) + */ + public String getProductsModel() { + return _productsModel; + } + + /** + * Set the value of productsModel.
+ * {VARCHAR(12)} + * + * @param productsModel The value of productsModel. (Nullable) + */ + public void setProductsModel(String productsModel) { + _modifiedProperties.addPropertyName("productsModel"); + _productsModel = productsModel; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- VARCHAR(64) : NotNull*/ + public static final String productsName_COLUMN = "PRODUCTS_NAME"; + + /** + * Get the value of productsName.
+ * {VARCHAR(64) : NotNull} + * + * @return The value of productsName. (Nullable) + */ + public String getProductsName() { + return _productsName; + } + + /** + * Set the value of productsName.
+ * {VARCHAR(64) : NotNull} + * + * @param productsName The value of productsName. (Nullable) + */ + public void setProductsName(String productsName) { + _modifiedProperties.addPropertyName("productsName"); + _productsName = productsName; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- DECIMAL(15) : NotNull*/ + public static final String productsPrice_COLUMN = "PRODUCTS_PRICE"; + + /** + * Get the value of productsPrice.
+ * {DECIMAL(15) : NotNull} + * + * @return The value of productsPrice. (Nullable) + */ + public java.math.BigDecimal getProductsPrice() { + return _productsPrice; + } + + /** + * Set the value of productsPrice.
+ * {DECIMAL(15) : NotNull} + * + * @param productsPrice The value of productsPrice. (Nullable) + */ + public void setProductsPrice(java.math.BigDecimal productsPrice) { + _modifiedProperties.addPropertyName("productsPrice"); + _productsPrice = productsPrice; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- DECIMAL(15) : NotNull*/ + public static final String finalPrice_COLUMN = "FINAL_PRICE"; + + /** + * Get the value of finalPrice.
+ * {DECIMAL(15) : NotNull} + * + * @return The value of finalPrice. (Nullable) + */ + public java.math.BigDecimal getFinalPrice() { + return _finalPrice; + } + + /** + * Set the value of finalPrice.
+ * {DECIMAL(15) : NotNull} + * + * @param finalPrice The value of finalPrice. (Nullable) + */ + public void setFinalPrice(java.math.BigDecimal finalPrice) { + _modifiedProperties.addPropertyName("finalPrice"); + _finalPrice = finalPrice; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- DECIMAL(7) : NotNull*/ + public static final String productsTax_COLUMN = "PRODUCTS_TAX"; + + /** + * Get the value of productsTax.
+ * {DECIMAL(7) : NotNull} + * + * @return The value of productsTax. (Nullable) + */ + public java.math.BigDecimal getProductsTax() { + return _productsTax; + } + + /** + * Set the value of productsTax.
+ * {DECIMAL(7) : NotNull} + * + * @param productsTax The value of productsTax. (Nullable) + */ + public void setProductsTax(java.math.BigDecimal productsTax) { + _modifiedProperties.addPropertyName("productsTax"); + _productsTax = productsTax; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- INTEGER : NotNull*/ + public static final String productsQuantity_COLUMN = "PRODUCTS_QUANTITY"; + + /** + * Get the value of productsQuantity.
+ * {INTEGER : NotNull} + * + * @return The value of productsQuantity. (Nullable) + */ + public java.math.BigDecimal getProductsQuantity() { + return _productsQuantity; + } + + /** + * Set the value of productsQuantity.
+ * {INTEGER : NotNull} + * + * @param productsQuantity The value of productsQuantity. (Nullable) + */ + public void setProductsQuantity(java.math.BigDecimal productsQuantity) { + _modifiedProperties.addPropertyName("productsQuantity"); + _productsQuantity = productsQuantity; + } + + + // =================================================================================== + // Classify Method + // =============== + + // =================================================================================== + // Classification Determination + // ============================ + + + // =================================================================================== + // Classification Getter + // ===================== + + + // =================================================================================== + // Foreign Table + // ============= + + // =================================================================================== + // Refferer Table + // ============== + + // =================================================================================== + // Accept + // ====== + /** + * This method implements the method that is declared at super. + * + * @param primaryKeyMap Primary key map. (NotNull and NotEmpty) + * @deprecated Please use OrdersProductsDbm.getInstance().acceptPrimaryKeyMap(entity, primaryKeyMap); + */ + public void acceptPrimaryKeyMap(java.util.Map primaryKeyMap) { + getDBMeta().acceptPrimaryKeyMap(this, primaryKeyMap); + } + + /** + * This method implements the method that is declared at super. + * + * @param primaryKeyMapString Primary-key map-string. (NotNull and NotEmpty) + * @deprecated Please use OrdersProductsDbm.getInstance().acceptPrimaryKeyMapString(entity, primaryKeyMapString); + */ + public void acceptPrimaryKeyMapString(String primaryKeyMapString) { + getDBMeta().acceptPrimaryKeyMapString(this, primaryKeyMapString); + } + + /** + * This method implements the method that is declared at super. + * + * @param columnValueMap Column-value map. (NotNull and NotEmpty) + * @deprecated Please use OrdersProductsDbm.getInstance().acceptColumnValueMap(entity, columnValueMap); + */ + public void acceptColumnValueMap(java.util.Map columnValueMap) { + getDBMeta().acceptColumnValueMap(this, columnValueMap); + } + + /** + * This method implements the method that is declared at super. + * + * @param columnValueMapString Column-value map-string. (NotNull and NotEmpty) + * @deprecated Please use OrdersProductsDbm.getInstance().acceptColumnValueMap(entity, columnValueMapString); + */ + public void acceptColumnValueMapString(String columnValueMapString) { + getDBMeta().acceptColumnValueMapString(this, columnValueMapString); + } + + // =================================================================================== + // Extract + // ======= + /** + * This method implements the method that is declared at super. + * + * @return Primary-key map-string. (NotNull) + * @deprecated Please use OrdersProductsDbm.getInstance().extractPrimaryKeyMapString(entity); + */ + public String extractPrimaryKeyMapString() { + return getDBMeta().extractPrimaryKeyMapString(this); + } + + /** + * Extract primary-key map-string. + * + * @param startBrace Start-brace. (NotNull) + * @param endBrace End-brace. (NotNull) + * @param delimiter Delimiter. (NotNull) + * @param equal Equal. (NotNull) + * @return Primary-key map-string. (NotNull) + * @deprecated Please use OrdersProductsDbm.getInstance().extractPrimaryKeyMapString(entity, startBrace, endBrace, delimiter, equal); + */ + public String extractPrimaryKeyMapString(String startBrace, String endBrace, String delimiter, String equal) { + return getDBMeta().extractPrimaryKeyMapString(this, startBrace, endBrace, delimiter, equal); + } + + /** + * This method implements the method that is declared at super. + * + * @return Column-value map-string. (NotNull) + * @deprecated Please use OrdersProductsDbm.getInstance().extractColumnValueMapString(entity); + */ + public String extractColumnValueMapString() { + return getDBMeta().extractColumnValueMapString(this); + } + + /** + * Extract column-value map-string. + * + * @param startBrace Start-brace. (NotNull) + * @param endBrace End-brace. (NotNull) + * @param delimiter Delimiter. (NotNull) + * @param equal Equal. (NotNull) + * @return Column-value map-string. (NotNull) + * @deprecated Please use OrdersProductsDbm.getInstance().extractColumnValueMapString(entity, startBrace, endBrace, delimiter, equal); + */ + public String extractColumnValueMapString(String startBrace, String endBrace, String delimiter, String equal) { + return getDBMeta().extractColumnValueMapString(this, startBrace, endBrace, delimiter, equal); + } + + + // =================================================================================== + // Determination + // ============= + /** + * This method implements the method that is declared at super. + * + * @return Determination. + */ + public boolean hasPrimaryKeyValue() { + + if (_ordersProductsId == null) { + return false; + } + + return true; + } + + // =================================================================================== + // Modified Properties + // =================== + /** + * Get modified property names. (S2Dao uses this for updateModifiedProperties()) + * + * @return Modified property names. (NotNull) + */ + public java.util.Set getModifiedPropertyNames() { + return _modifiedProperties.getPropertyNames(); + } + + /** + * New entity modified properties. You can override this at the sub-class if you need it. + * + * @return Entity modified properties. (NotNull) + */ + protected EntityModifiedProperties newEntityModifiedProperties() { + return new EntityModifiedProperties(); + } + + /** + * Clear modified property names. + */ + public void clearModifiedPropertyNames() { + _modifiedProperties.clear(); + } + + // =================================================================================== + // Basic Override + // ============== + + /** + * This method overrides the method that is declared at super. + * If the primary-key of the other is same as this one, returns true. + * + * @param other Other entity. + * @return Comparing result. + */ + public boolean equals(Object other) { + if (other == null) { + return false; + } + if (!(other instanceof BsOrdersProducts)) { + return false; + } + final BsOrdersProducts otherEntity = (BsOrdersProducts)other; + + if (getOrdersProductsId() == null || !getOrdersProductsId().equals(otherEntity.getOrdersProductsId())) { + return false; + } + + return true; + } + + /** + * This method overrides the method that is declared at super. + * Calculates hash-code from primary-key. + * + * @return Hash-code from primary-keys. + */ + public int hashCode() { + int result = 0; + + if (this.getOrdersProductsId() != null) { + result = result + getOrdersProductsId().hashCode(); + } + + return result; + } + + /** + * This method overrides the method that is declared at super. + * + * @return Column-value map-string. (NotNull) + */ + public String toString() { + final String delimiter = ","; + final StringBuffer sb = new StringBuffer(); + + sb.append(delimiter).append(getOrdersProductsId()); + sb.append(delimiter).append(getOrdersId()); + sb.append(delimiter).append(getProductsId()); + sb.append(delimiter).append(getProductsModel()); + sb.append(delimiter).append(getProductsName()); + sb.append(delimiter).append(getProductsPrice()); + sb.append(delimiter).append(getFinalPrice()); + sb.append(delimiter).append(getProductsTax()); + sb.append(delimiter).append(getProductsQuantity()); + + sb.delete(0, delimiter.length()); + sb.insert(0, "{").append("}"); + return sb.toString(); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/BsOrdersProductsAttributes.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/BsOrdersProductsAttributes.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/BsOrdersProductsAttributes.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,528 @@ +package jp.sf.pal.pompei.bsentity; + + +import jp.sf.pal.pompei.allcommon.Entity; +import jp.sf.pal.pompei.allcommon.dbmeta.DBMeta; +import jp.sf.pal.pompei.allcommon.dbmeta.DBMetaInstanceHandler; + +/** + * The entity of ORDERS_PRODUCTS_ATTRIBUTES. + * + *
+ * [primary-key]
+ *     ORDERS_PRODUCTS_ATTRIBUTES_ID
+ * 
+ * [column-property]
+ *     ORDERS_PRODUCTS_ATTRIBUTES_ID, ORDERS_ID, ORDERS_PRODUCTS_ID, PRODUCTS_OPTIONS, PRODUCTS_OPTIONS_VALUES, OPTIONS_VALUES_PRICE, PRICE_PREFIX
+ * 
+ * [foreign-property]
+ *     
+ * 
+ * [refferer-property]
+ *     
+ * 
+ * [sequence]
+ *     
+ * 
+ * [identity]
+ *     
+ * 
+ * [update-date]
+ *     
+ * 
+ * [version-no]
+ *     
+ * 
+ * 
+ * + * @author DBFlute(AutoGenerator) + */ +public abstract class BsOrdersProductsAttributes implements Entity, java.io.Serializable { + + /** Serial version UID. (Default) */ + private static final long serialVersionUID = 1L; + + /** TABLE-Annotation for S2Dao */ + public static final String TABLE = "ORDERS_PRODUCTS_ATTRIBUTES"; + + + // =================================================================================== + // Attribute + // ========= + /** Entity modified properties. (for S2Dao) */ + protected EntityModifiedProperties _modifiedProperties = newEntityModifiedProperties(); + + + /** The value of ordersProductsAttributesId. ColumnDefinition -- PK : INTEGER : NotNull*/ + protected java.math.BigDecimal _ordersProductsAttributesId; + + /** The value of ordersId. ColumnDefinition -- INTEGER : NotNull*/ + protected java.math.BigDecimal _ordersId; + + /** The value of ordersProductsId. ColumnDefinition -- INTEGER : NotNull*/ + protected java.math.BigDecimal _ordersProductsId; + + /** The value of productsOptions. ColumnDefinition -- VARCHAR(32) : NotNull*/ + protected String _productsOptions; + + /** The value of productsOptionsValues. ColumnDefinition -- VARCHAR(32) : NotNull*/ + protected String _productsOptionsValues; + + /** The value of optionsValuesPrice. ColumnDefinition -- DECIMAL(15) : NotNull*/ + protected java.math.BigDecimal _optionsValuesPrice; + + /** The value of pricePrefix. ColumnDefinition -- CHAR(1) : NotNull*/ + protected String _pricePrefix; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + public BsOrdersProductsAttributes() { + } + + + // =================================================================================== + // DBMeta + // ====== + /** + * This method implements the method that is declared at super. + * + * @return DBMeta. (NotNull) + */ + public DBMeta getDBMeta() { + return DBMetaInstanceHandler.getInstanceByTableDbName(getTableDbName()); + } + + // =================================================================================== + // Table Name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + public String getTableDbName() { + return "ORDERS_PRODUCTS_ATTRIBUTES"; + } + + /** + * This method implements the method that is declared at super. + * + * @return Table cap-prop-name. (NotNull) + */ + public String getTableCapPropName() { + return "OrdersProductsAttributes"; + } + + /** + * This method implements the method that is declared at super. + * + * @return Table uncap-prop-name. (NotNull) + */ + public String getTableUncapPropName() { + return "ordersProductsAttributes"; + } + + // =================================================================================== + // Accessor + // ======== + + /** Column-Annotation for S2Dao. ColumnDefinition -- PK : INTEGER : NotNull*/ + public static final String ordersProductsAttributesId_COLUMN = "ORDERS_PRODUCTS_ATTRIBUTES_ID"; + + /** + * Get the value of ordersProductsAttributesId.
+ * {PK : INTEGER : NotNull} + * + * @return The value of ordersProductsAttributesId. (Nullable) + */ + public java.math.BigDecimal getOrdersProductsAttributesId() { + return _ordersProductsAttributesId; + } + + /** + * Set the value of ordersProductsAttributesId.
+ * {PK : INTEGER : NotNull} + * + * @param ordersProductsAttributesId The value of ordersProductsAttributesId. (Nullable) + */ + public void setOrdersProductsAttributesId(java.math.BigDecimal ordersProductsAttributesId) { + _modifiedProperties.addPropertyName("ordersProductsAttributesId"); + _ordersProductsAttributesId = ordersProductsAttributesId; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- INTEGER : NotNull*/ + public static final String ordersId_COLUMN = "ORDERS_ID"; + + /** + * Get the value of ordersId.
+ * {INTEGER : NotNull} + * + * @return The value of ordersId. (Nullable) + */ + public java.math.BigDecimal getOrdersId() { + return _ordersId; + } + + /** + * Set the value of ordersId.
+ * {INTEGER : NotNull} + * + * @param ordersId The value of ordersId. (Nullable) + */ + public void setOrdersId(java.math.BigDecimal ordersId) { + _modifiedProperties.addPropertyName("ordersId"); + _ordersId = ordersId; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- INTEGER : NotNull*/ + public static final String ordersProductsId_COLUMN = "ORDERS_PRODUCTS_ID"; + + /** + * Get the value of ordersProductsId.
+ * {INTEGER : NotNull} + * + * @return The value of ordersProductsId. (Nullable) + */ + public java.math.BigDecimal getOrdersProductsId() { + return _ordersProductsId; + } + + /** + * Set the value of ordersProductsId.
+ * {INTEGER : NotNull} + * + * @param ordersProductsId The value of ordersProductsId. (Nullable) + */ + public void setOrdersProductsId(java.math.BigDecimal ordersProductsId) { + _modifiedProperties.addPropertyName("ordersProductsId"); + _ordersProductsId = ordersProductsId; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- VARCHAR(32) : NotNull*/ + public static final String productsOptions_COLUMN = "PRODUCTS_OPTIONS"; + + /** + * Get the value of productsOptions.
+ * {VARCHAR(32) : NotNull} + * + * @return The value of productsOptions. (Nullable) + */ + public String getProductsOptions() { + return _productsOptions; + } + + /** + * Set the value of productsOptions.
+ * {VARCHAR(32) : NotNull} + * + * @param productsOptions The value of productsOptions. (Nullable) + */ + public void setProductsOptions(String productsOptions) { + _modifiedProperties.addPropertyName("productsOptions"); + _productsOptions = productsOptions; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- VARCHAR(32) : NotNull*/ + public static final String productsOptionsValues_COLUMN = "PRODUCTS_OPTIONS_VALUES"; + + /** + * Get the value of productsOptionsValues.
+ * {VARCHAR(32) : NotNull} + * + * @return The value of productsOptionsValues. (Nullable) + */ + public String getProductsOptionsValues() { + return _productsOptionsValues; + } + + /** + * Set the value of productsOptionsValues.
+ * {VARCHAR(32) : NotNull} + * + * @param productsOptionsValues The value of productsOptionsValues. (Nullable) + */ + public void setProductsOptionsValues(String productsOptionsValues) { + _modifiedProperties.addPropertyName("productsOptionsValues"); + _productsOptionsValues = productsOptionsValues; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- DECIMAL(15) : NotNull*/ + public static final String optionsValuesPrice_COLUMN = "OPTIONS_VALUES_PRICE"; + + /** + * Get the value of optionsValuesPrice.
+ * {DECIMAL(15) : NotNull} + * + * @return The value of optionsValuesPrice. (Nullable) + */ + public java.math.BigDecimal getOptionsValuesPrice() { + return _optionsValuesPrice; + } + + /** + * Set the value of optionsValuesPrice.
+ * {DECIMAL(15) : NotNull} + * + * @param optionsValuesPrice The value of optionsValuesPrice. (Nullable) + */ + public void setOptionsValuesPrice(java.math.BigDecimal optionsValuesPrice) { + _modifiedProperties.addPropertyName("optionsValuesPrice"); + _optionsValuesPrice = optionsValuesPrice; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- CHAR(1) : NotNull*/ + public static final String pricePrefix_COLUMN = "PRICE_PREFIX"; + + /** + * Get the value of pricePrefix.
+ * {CHAR(1) : NotNull} + * + * @return The value of pricePrefix. (Nullable) + */ + public String getPricePrefix() { + return _pricePrefix; + } + + /** + * Set the value of pricePrefix.
+ * {CHAR(1) : NotNull} + * + * @param pricePrefix The value of pricePrefix. (Nullable) + */ + public void setPricePrefix(String pricePrefix) { + _modifiedProperties.addPropertyName("pricePrefix"); + _pricePrefix = pricePrefix; + } + + + // =================================================================================== + // Classify Method + // =============== + + // =================================================================================== + // Classification Determination + // ============================ + + + // =================================================================================== + // Classification Getter + // ===================== + + + // =================================================================================== + // Foreign Table + // ============= + + // =================================================================================== + // Refferer Table + // ============== + + // =================================================================================== + // Accept + // ====== + /** + * This method implements the method that is declared at super. + * + * @param primaryKeyMap Primary key map. (NotNull and NotEmpty) + * @deprecated Please use OrdersProductsAttributesDbm.getInstance().acceptPrimaryKeyMap(entity, primaryKeyMap); + */ + public void acceptPrimaryKeyMap(java.util.Map primaryKeyMap) { + getDBMeta().acceptPrimaryKeyMap(this, primaryKeyMap); + } + + /** + * This method implements the method that is declared at super. + * + * @param primaryKeyMapString Primary-key map-string. (NotNull and NotEmpty) + * @deprecated Please use OrdersProductsAttributesDbm.getInstance().acceptPrimaryKeyMapString(entity, primaryKeyMapString); + */ + public void acceptPrimaryKeyMapString(String primaryKeyMapString) { + getDBMeta().acceptPrimaryKeyMapString(this, primaryKeyMapString); + } + + /** + * This method implements the method that is declared at super. + * + * @param columnValueMap Column-value map. (NotNull and NotEmpty) + * @deprecated Please use OrdersProductsAttributesDbm.getInstance().acceptColumnValueMap(entity, columnValueMap); + */ + public void acceptColumnValueMap(java.util.Map columnValueMap) { + getDBMeta().acceptColumnValueMap(this, columnValueMap); + } + + /** + * This method implements the method that is declared at super. + * + * @param columnValueMapString Column-value map-string. (NotNull and NotEmpty) + * @deprecated Please use OrdersProductsAttributesDbm.getInstance().acceptColumnValueMap(entity, columnValueMapString); + */ + public void acceptColumnValueMapString(String columnValueMapString) { + getDBMeta().acceptColumnValueMapString(this, columnValueMapString); + } + + // =================================================================================== + // Extract + // ======= + /** + * This method implements the method that is declared at super. + * + * @return Primary-key map-string. (NotNull) + * @deprecated Please use OrdersProductsAttributesDbm.getInstance().extractPrimaryKeyMapString(entity); + */ + public String extractPrimaryKeyMapString() { + return getDBMeta().extractPrimaryKeyMapString(this); + } + + /** + * Extract primary-key map-string. + * + * @param startBrace Start-brace. (NotNull) + * @param endBrace End-brace. (NotNull) + * @param delimiter Delimiter. (NotNull) + * @param equal Equal. (NotNull) + * @return Primary-key map-string. (NotNull) + * @deprecated Please use OrdersProductsAttributesDbm.getInstance().extractPrimaryKeyMapString(entity, startBrace, endBrace, delimiter, equal); + */ + public String extractPrimaryKeyMapString(String startBrace, String endBrace, String delimiter, String equal) { + return getDBMeta().extractPrimaryKeyMapString(this, startBrace, endBrace, delimiter, equal); + } + + /** + * This method implements the method that is declared at super. + * + * @return Column-value map-string. (NotNull) + * @deprecated Please use OrdersProductsAttributesDbm.getInstance().extractColumnValueMapString(entity); + */ + public String extractColumnValueMapString() { + return getDBMeta().extractColumnValueMapString(this); + } + + /** + * Extract column-value map-string. + * + * @param startBrace Start-brace. (NotNull) + * @param endBrace End-brace. (NotNull) + * @param delimiter Delimiter. (NotNull) + * @param equal Equal. (NotNull) + * @return Column-value map-string. (NotNull) + * @deprecated Please use OrdersProductsAttributesDbm.getInstance().extractColumnValueMapString(entity, startBrace, endBrace, delimiter, equal); + */ + public String extractColumnValueMapString(String startBrace, String endBrace, String delimiter, String equal) { + return getDBMeta().extractColumnValueMapString(this, startBrace, endBrace, delimiter, equal); + } + + + // =================================================================================== + // Determination + // ============= + /** + * This method implements the method that is declared at super. + * + * @return Determination. + */ + public boolean hasPrimaryKeyValue() { + + if (_ordersProductsAttributesId == null) { + return false; + } + + return true; + } + + // =================================================================================== + // Modified Properties + // =================== + /** + * Get modified property names. (S2Dao uses this for updateModifiedProperties()) + * + * @return Modified property names. (NotNull) + */ + public java.util.Set getModifiedPropertyNames() { + return _modifiedProperties.getPropertyNames(); + } + + /** + * New entity modified properties. You can override this at the sub-class if you need it. + * + * @return Entity modified properties. (NotNull) + */ + protected EntityModifiedProperties newEntityModifiedProperties() { + return new EntityModifiedProperties(); + } + + /** + * Clear modified property names. + */ + public void clearModifiedPropertyNames() { + _modifiedProperties.clear(); + } + + // =================================================================================== + // Basic Override + // ============== + + /** + * This method overrides the method that is declared at super. + * If the primary-key of the other is same as this one, returns true. + * + * @param other Other entity. + * @return Comparing result. + */ + public boolean equals(Object other) { + if (other == null) { + return false; + } + if (!(other instanceof BsOrdersProductsAttributes)) { + return false; + } + final BsOrdersProductsAttributes otherEntity = (BsOrdersProductsAttributes)other; + + if (getOrdersProductsAttributesId() == null || !getOrdersProductsAttributesId().equals(otherEntity.getOrdersProductsAttributesId())) { + return false; + } + + return true; + } + + /** + * This method overrides the method that is declared at super. + * Calculates hash-code from primary-key. + * + * @return Hash-code from primary-keys. + */ + public int hashCode() { + int result = 0; + + if (this.getOrdersProductsAttributesId() != null) { + result = result + getOrdersProductsAttributesId().hashCode(); + } + + return result; + } + + /** + * This method overrides the method that is declared at super. + * + * @return Column-value map-string. (NotNull) + */ + public String toString() { + final String delimiter = ","; + final StringBuffer sb = new StringBuffer(); + + sb.append(delimiter).append(getOrdersProductsAttributesId()); + sb.append(delimiter).append(getOrdersId()); + sb.append(delimiter).append(getOrdersProductsId()); + sb.append(delimiter).append(getProductsOptions()); + sb.append(delimiter).append(getProductsOptionsValues()); + sb.append(delimiter).append(getOptionsValuesPrice()); + sb.append(delimiter).append(getPricePrefix()); + + sb.delete(0, delimiter.length()); + sb.insert(0, "{").append("}"); + return sb.toString(); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/BsOrdersProductsDownload.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/BsOrdersProductsDownload.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/BsOrdersProductsDownload.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,500 @@ +package jp.sf.pal.pompei.bsentity; + + +import jp.sf.pal.pompei.allcommon.Entity; +import jp.sf.pal.pompei.allcommon.dbmeta.DBMeta; +import jp.sf.pal.pompei.allcommon.dbmeta.DBMetaInstanceHandler; + +/** + * The entity of ORDERS_PRODUCTS_DOWNLOAD. + * + *
+ * [primary-key]
+ *     ORDERS_PRODUCTS_DOWNLOAD_ID
+ * 
+ * [column-property]
+ *     ORDERS_PRODUCTS_DOWNLOAD_ID, ORDERS_ID, ORDERS_PRODUCTS_ID, ORDERS_PRODUCTS_FILENAME, DOWNLOAD_MAXDAYS, DOWNLOAD_COUNT
+ * 
+ * [foreign-property]
+ *     
+ * 
+ * [refferer-property]
+ *     
+ * 
+ * [sequence]
+ *     
+ * 
+ * [identity]
+ *     
+ * 
+ * [update-date]
+ *     
+ * 
+ * [version-no]
+ *     
+ * 
+ * 
+ * + * @author DBFlute(AutoGenerator) + */ +public abstract class BsOrdersProductsDownload implements Entity, java.io.Serializable { + + /** Serial version UID. (Default) */ + private static final long serialVersionUID = 1L; + + /** TABLE-Annotation for S2Dao */ + public static final String TABLE = "ORDERS_PRODUCTS_DOWNLOAD"; + + + // =================================================================================== + // Attribute + // ========= + /** Entity modified properties. (for S2Dao) */ + protected EntityModifiedProperties _modifiedProperties = newEntityModifiedProperties(); + + + /** The value of ordersProductsDownloadId. ColumnDefinition -- PK : INTEGER : NotNull*/ + protected java.math.BigDecimal _ordersProductsDownloadId; + + /** The value of ordersId. ColumnDefinition -- INTEGER : NotNull : Default=[0]*/ + protected java.math.BigDecimal _ordersId; + + /** The value of ordersProductsId. ColumnDefinition -- INTEGER : NotNull : Default=[0]*/ + protected java.math.BigDecimal _ordersProductsId; + + /** The value of ordersProductsFilename. ColumnDefinition -- VARCHAR(255) : NotNull : Default=[]*/ + protected String _ordersProductsFilename; + + /** The value of downloadMaxdays. ColumnDefinition -- INTEGER : NotNull : Default=[0]*/ + protected java.math.BigDecimal _downloadMaxdays; + + /** The value of downloadCount. ColumnDefinition -- INTEGER : NotNull : Default=[0]*/ + protected java.math.BigDecimal _downloadCount; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + public BsOrdersProductsDownload() { + } + + + // =================================================================================== + // DBMeta + // ====== + /** + * This method implements the method that is declared at super. + * + * @return DBMeta. (NotNull) + */ + public DBMeta getDBMeta() { + return DBMetaInstanceHandler.getInstanceByTableDbName(getTableDbName()); + } + + // =================================================================================== + // Table Name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + public String getTableDbName() { + return "ORDERS_PRODUCTS_DOWNLOAD"; + } + + /** + * This method implements the method that is declared at super. + * + * @return Table cap-prop-name. (NotNull) + */ + public String getTableCapPropName() { + return "OrdersProductsDownload"; + } + + /** + * This method implements the method that is declared at super. + * + * @return Table uncap-prop-name. (NotNull) + */ + public String getTableUncapPropName() { + return "ordersProductsDownload"; + } + + // =================================================================================== + // Accessor + // ======== + + /** Column-Annotation for S2Dao. ColumnDefinition -- PK : INTEGER : NotNull*/ + public static final String ordersProductsDownloadId_COLUMN = "ORDERS_PRODUCTS_DOWNLOAD_ID"; + + /** + * Get the value of ordersProductsDownloadId.
+ * {PK : INTEGER : NotNull} + * + * @return The value of ordersProductsDownloadId. (Nullable) + */ + public java.math.BigDecimal getOrdersProductsDownloadId() { + return _ordersProductsDownloadId; + } + + /** + * Set the value of ordersProductsDownloadId.
+ * {PK : INTEGER : NotNull} + * + * @param ordersProductsDownloadId The value of ordersProductsDownloadId. (Nullable) + */ + public void setOrdersProductsDownloadId(java.math.BigDecimal ordersProductsDownloadId) { + _modifiedProperties.addPropertyName("ordersProductsDownloadId"); + _ordersProductsDownloadId = ordersProductsDownloadId; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- INTEGER : NotNull : Default=[0]*/ + public static final String ordersId_COLUMN = "ORDERS_ID"; + + /** + * Get the value of ordersId.
+ * {INTEGER : NotNull : Default=[0]} + * + * @return The value of ordersId. (Nullable) + */ + public java.math.BigDecimal getOrdersId() { + return _ordersId; + } + + /** + * Set the value of ordersId.
+ * {INTEGER : NotNull : Default=[0]} + * + * @param ordersId The value of ordersId. (Nullable) + */ + public void setOrdersId(java.math.BigDecimal ordersId) { + _modifiedProperties.addPropertyName("ordersId"); + _ordersId = ordersId; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- INTEGER : NotNull : Default=[0]*/ + public static final String ordersProductsId_COLUMN = "ORDERS_PRODUCTS_ID"; + + /** + * Get the value of ordersProductsId.
+ * {INTEGER : NotNull : Default=[0]} + * + * @return The value of ordersProductsId. (Nullable) + */ + public java.math.BigDecimal getOrdersProductsId() { + return _ordersProductsId; + } + + /** + * Set the value of ordersProductsId.
+ * {INTEGER : NotNull : Default=[0]} + * + * @param ordersProductsId The value of ordersProductsId. (Nullable) + */ + public void setOrdersProductsId(java.math.BigDecimal ordersProductsId) { + _modifiedProperties.addPropertyName("ordersProductsId"); + _ordersProductsId = ordersProductsId; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- VARCHAR(255) : NotNull : Default=[]*/ + public static final String ordersProductsFilename_COLUMN = "ORDERS_PRODUCTS_FILENAME"; + + /** + * Get the value of ordersProductsFilename.
+ * {VARCHAR(255) : NotNull : Default=[]} + * + * @return The value of ordersProductsFilename. (Nullable) + */ + public String getOrdersProductsFilename() { + return _ordersProductsFilename; + } + + /** + * Set the value of ordersProductsFilename.
+ * {VARCHAR(255) : NotNull : Default=[]} + * + * @param ordersProductsFilename The value of ordersProductsFilename. (Nullable) + */ + public void setOrdersProductsFilename(String ordersProductsFilename) { + _modifiedProperties.addPropertyName("ordersProductsFilename"); + _ordersProductsFilename = ordersProductsFilename; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- INTEGER : NotNull : Default=[0]*/ + public static final String downloadMaxdays_COLUMN = "DOWNLOAD_MAXDAYS"; + + /** + * Get the value of downloadMaxdays.
+ * {INTEGER : NotNull : Default=[0]} + * + * @return The value of downloadMaxdays. (Nullable) + */ + public java.math.BigDecimal getDownloadMaxdays() { + return _downloadMaxdays; + } + + /** + * Set the value of downloadMaxdays.
+ * {INTEGER : NotNull : Default=[0]} + * + * @param downloadMaxdays The value of downloadMaxdays. (Nullable) + */ + public void setDownloadMaxdays(java.math.BigDecimal downloadMaxdays) { + _modifiedProperties.addPropertyName("downloadMaxdays"); + _downloadMaxdays = downloadMaxdays; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- INTEGER : NotNull : Default=[0]*/ + public static final String downloadCount_COLUMN = "DOWNLOAD_COUNT"; + + /** + * Get the value of downloadCount.
+ * {INTEGER : NotNull : Default=[0]} + * + * @return The value of downloadCount. (Nullable) + */ + public java.math.BigDecimal getDownloadCount() { + return _downloadCount; + } + + /** + * Set the value of downloadCount.
+ * {INTEGER : NotNull : Default=[0]} + * + * @param downloadCount The value of downloadCount. (Nullable) + */ + public void setDownloadCount(java.math.BigDecimal downloadCount) { + _modifiedProperties.addPropertyName("downloadCount"); + _downloadCount = downloadCount; + } + + + // =================================================================================== + // Classify Method + // =============== + + // =================================================================================== + // Classification Determination + // ============================ + + + // =================================================================================== + // Classification Getter + // ===================== + + + // =================================================================================== + // Foreign Table + // ============= + + // =================================================================================== + // Refferer Table + // ============== + + // =================================================================================== + // Accept + // ====== + /** + * This method implements the method that is declared at super. + * + * @param primaryKeyMap Primary key map. (NotNull and NotEmpty) + * @deprecated Please use OrdersProductsDownloadDbm.getInstance().acceptPrimaryKeyMap(entity, primaryKeyMap); + */ + public void acceptPrimaryKeyMap(java.util.Map primaryKeyMap) { + getDBMeta().acceptPrimaryKeyMap(this, primaryKeyMap); + } + + /** + * This method implements the method that is declared at super. + * + * @param primaryKeyMapString Primary-key map-string. (NotNull and NotEmpty) + * @deprecated Please use OrdersProductsDownloadDbm.getInstance().acceptPrimaryKeyMapString(entity, primaryKeyMapString); + */ + public void acceptPrimaryKeyMapString(String primaryKeyMapString) { + getDBMeta().acceptPrimaryKeyMapString(this, primaryKeyMapString); + } + + /** + * This method implements the method that is declared at super. + * + * @param columnValueMap Column-value map. (NotNull and NotEmpty) + * @deprecated Please use OrdersProductsDownloadDbm.getInstance().acceptColumnValueMap(entity, columnValueMap); + */ + public void acceptColumnValueMap(java.util.Map columnValueMap) { + getDBMeta().acceptColumnValueMap(this, columnValueMap); + } + + /** + * This method implements the method that is declared at super. + * + * @param columnValueMapString Column-value map-string. (NotNull and NotEmpty) + * @deprecated Please use OrdersProductsDownloadDbm.getInstance().acceptColumnValueMap(entity, columnValueMapString); + */ + public void acceptColumnValueMapString(String columnValueMapString) { + getDBMeta().acceptColumnValueMapString(this, columnValueMapString); + } + + // =================================================================================== + // Extract + // ======= + /** + * This method implements the method that is declared at super. + * + * @return Primary-key map-string. (NotNull) + * @deprecated Please use OrdersProductsDownloadDbm.getInstance().extractPrimaryKeyMapString(entity); + */ + public String extractPrimaryKeyMapString() { + return getDBMeta().extractPrimaryKeyMapString(this); + } + + /** + * Extract primary-key map-string. + * + * @param startBrace Start-brace. (NotNull) + * @param endBrace End-brace. (NotNull) + * @param delimiter Delimiter. (NotNull) + * @param equal Equal. (NotNull) + * @return Primary-key map-string. (NotNull) + * @deprecated Please use OrdersProductsDownloadDbm.getInstance().extractPrimaryKeyMapString(entity, startBrace, endBrace, delimiter, equal); + */ + public String extractPrimaryKeyMapString(String startBrace, String endBrace, String delimiter, String equal) { + return getDBMeta().extractPrimaryKeyMapString(this, startBrace, endBrace, delimiter, equal); + } + + /** + * This method implements the method that is declared at super. + * + * @return Column-value map-string. (NotNull) + * @deprecated Please use OrdersProductsDownloadDbm.getInstance().extractColumnValueMapString(entity); + */ + public String extractColumnValueMapString() { + return getDBMeta().extractColumnValueMapString(this); + } + + /** + * Extract column-value map-string. + * + * @param startBrace Start-brace. (NotNull) + * @param endBrace End-brace. (NotNull) + * @param delimiter Delimiter. (NotNull) + * @param equal Equal. (NotNull) + * @return Column-value map-string. (NotNull) + * @deprecated Please use OrdersProductsDownloadDbm.getInstance().extractColumnValueMapString(entity, startBrace, endBrace, delimiter, equal); + */ + public String extractColumnValueMapString(String startBrace, String endBrace, String delimiter, String equal) { + return getDBMeta().extractColumnValueMapString(this, startBrace, endBrace, delimiter, equal); + } + + + // =================================================================================== + // Determination + // ============= + /** + * This method implements the method that is declared at super. + * + * @return Determination. + */ + public boolean hasPrimaryKeyValue() { + + if (_ordersProductsDownloadId == null) { + return false; + } + + return true; + } + + // =================================================================================== + // Modified Properties + // =================== + /** + * Get modified property names. (S2Dao uses this for updateModifiedProperties()) + * + * @return Modified property names. (NotNull) + */ + public java.util.Set getModifiedPropertyNames() { + return _modifiedProperties.getPropertyNames(); + } + + /** + * New entity modified properties. You can override this at the sub-class if you need it. + * + * @return Entity modified properties. (NotNull) + */ + protected EntityModifiedProperties newEntityModifiedProperties() { + return new EntityModifiedProperties(); + } + + /** + * Clear modified property names. + */ + public void clearModifiedPropertyNames() { + _modifiedProperties.clear(); + } + + // =================================================================================== + // Basic Override + // ============== + + /** + * This method overrides the method that is declared at super. + * If the primary-key of the other is same as this one, returns true. + * + * @param other Other entity. + * @return Comparing result. + */ + public boolean equals(Object other) { + if (other == null) { + return false; + } + if (!(other instanceof BsOrdersProductsDownload)) { + return false; + } + final BsOrdersProductsDownload otherEntity = (BsOrdersProductsDownload)other; + + if (getOrdersProductsDownloadId() == null || !getOrdersProductsDownloadId().equals(otherEntity.getOrdersProductsDownloadId())) { + return false; + } + + return true; + } + + /** + * This method overrides the method that is declared at super. + * Calculates hash-code from primary-key. + * + * @return Hash-code from primary-keys. + */ + public int hashCode() { + int result = 0; + + if (this.getOrdersProductsDownloadId() != null) { + result = result + getOrdersProductsDownloadId().hashCode(); + } + + return result; + } + + /** + * This method overrides the method that is declared at super. + * + * @return Column-value map-string. (NotNull) + */ + public String toString() { + final String delimiter = ","; + final StringBuffer sb = new StringBuffer(); + + sb.append(delimiter).append(getOrdersProductsDownloadId()); + sb.append(delimiter).append(getOrdersId()); + sb.append(delimiter).append(getOrdersProductsId()); + sb.append(delimiter).append(getOrdersProductsFilename()); + sb.append(delimiter).append(getDownloadMaxdays()); + sb.append(delimiter).append(getDownloadCount()); + + sb.delete(0, delimiter.length()); + sb.insert(0, "{").append("}"); + return sb.toString(); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/BsOrdersStatus.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/BsOrdersStatus.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/BsOrdersStatus.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,425 @@ +package jp.sf.pal.pompei.bsentity; + + +import jp.sf.pal.pompei.allcommon.Entity; +import jp.sf.pal.pompei.allcommon.dbmeta.DBMeta; +import jp.sf.pal.pompei.allcommon.dbmeta.DBMetaInstanceHandler; + +/** + * The entity of ORDERS_STATUS. + * + *
+ * [primary-key]
+ *     ORDERS_STATUS_ID, LANGUAGE_ID
+ * 
+ * [column-property]
+ *     ORDERS_STATUS_ID, LANGUAGE_ID, ORDERS_STATUS_NAME
+ * 
+ * [foreign-property]
+ *     
+ * 
+ * [refferer-property]
+ *     
+ * 
+ * [sequence]
+ *     
+ * 
+ * [identity]
+ *     
+ * 
+ * [update-date]
+ *     
+ * 
+ * [version-no]
+ *     
+ * 
+ * 
+ * + * @author DBFlute(AutoGenerator) + */ +public abstract class BsOrdersStatus implements Entity, java.io.Serializable { + + /** Serial version UID. (Default) */ + private static final long serialVersionUID = 1L; + + /** TABLE-Annotation for S2Dao */ + public static final String TABLE = "ORDERS_STATUS"; + + + // =================================================================================== + // Attribute + // ========= + /** Entity modified properties. (for S2Dao) */ + protected EntityModifiedProperties _modifiedProperties = newEntityModifiedProperties(); + + + /** The value of ordersStatusId. ColumnDefinition -- PK : INTEGER : NotNull : Default=[0]*/ + protected java.math.BigDecimal _ordersStatusId; + + /** The value of languageId. ColumnDefinition -- PK : INTEGER : NotNull : Default=[1]*/ + protected java.math.BigDecimal _languageId; + + /** The value of ordersStatusName. ColumnDefinition -- VARCHAR(32) : NotNull*/ + protected String _ordersStatusName; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + public BsOrdersStatus() { + } + + + // =================================================================================== + // DBMeta + // ====== + /** + * This method implements the method that is declared at super. + * + * @return DBMeta. (NotNull) + */ + public DBMeta getDBMeta() { + return DBMetaInstanceHandler.getInstanceByTableDbName(getTableDbName()); + } + + // =================================================================================== + // Table Name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + public String getTableDbName() { + return "ORDERS_STATUS"; + } + + /** + * This method implements the method that is declared at super. + * + * @return Table cap-prop-name. (NotNull) + */ + public String getTableCapPropName() { + return "OrdersStatus"; + } + + /** + * This method implements the method that is declared at super. + * + * @return Table uncap-prop-name. (NotNull) + */ + public String getTableUncapPropName() { + return "ordersStatus"; + } + + // =================================================================================== + // Accessor + // ======== + + /** Column-Annotation for S2Dao. ColumnDefinition -- PK : INTEGER : NotNull : Default=[0]*/ + public static final String ordersStatusId_COLUMN = "ORDERS_STATUS_ID"; + + /** + * Get the value of ordersStatusId.
+ * {PK : INTEGER : NotNull : Default=[0]} + * + * @return The value of ordersStatusId. (Nullable) + */ + public java.math.BigDecimal getOrdersStatusId() { + return _ordersStatusId; + } + + /** + * Set the value of ordersStatusId.
+ * {PK : INTEGER : NotNull : Default=[0]} + * + * @param ordersStatusId The value of ordersStatusId. (Nullable) + */ + public void setOrdersStatusId(java.math.BigDecimal ordersStatusId) { + _modifiedProperties.addPropertyName("ordersStatusId"); + _ordersStatusId = ordersStatusId; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- PK : INTEGER : NotNull : Default=[1]*/ + public static final String languageId_COLUMN = "LANGUAGE_ID"; + + /** + * Get the value of languageId.
+ * {PK : INTEGER : NotNull : Default=[1]} + * + * @return The value of languageId. (Nullable) + */ + public java.math.BigDecimal getLanguageId() { + return _languageId; + } + + /** + * Set the value of languageId.
+ * {PK : INTEGER : NotNull : Default=[1]} + * + * @param languageId The value of languageId. (Nullable) + */ + public void setLanguageId(java.math.BigDecimal languageId) { + _modifiedProperties.addPropertyName("languageId"); + _languageId = languageId; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- VARCHAR(32) : NotNull*/ + public static final String ordersStatusName_COLUMN = "ORDERS_STATUS_NAME"; + + /** + * Get the value of ordersStatusName.
+ * {VARCHAR(32) : NotNull} + * + * @return The value of ordersStatusName. (Nullable) + */ + public String getOrdersStatusName() { + return _ordersStatusName; + } + + /** + * Set the value of ordersStatusName.
+ * {VARCHAR(32) : NotNull} + * + * @param ordersStatusName The value of ordersStatusName. (Nullable) + */ + public void setOrdersStatusName(String ordersStatusName) { + _modifiedProperties.addPropertyName("ordersStatusName"); + _ordersStatusName = ordersStatusName; + } + + + // =================================================================================== + // Classify Method + // =============== + + // =================================================================================== + // Classification Determination + // ============================ + + + // =================================================================================== + // Classification Getter + // ===================== + + + // =================================================================================== + // Foreign Table + // ============= + + // =================================================================================== + // Refferer Table + // ============== + + // =================================================================================== + // Accept + // ====== + /** + * This method implements the method that is declared at super. + * + * @param primaryKeyMap Primary key map. (NotNull and NotEmpty) + * @deprecated Please use OrdersStatusDbm.getInstance().acceptPrimaryKeyMap(entity, primaryKeyMap); + */ + public void acceptPrimaryKeyMap(java.util.Map primaryKeyMap) { + getDBMeta().acceptPrimaryKeyMap(this, primaryKeyMap); + } + + /** + * This method implements the method that is declared at super. + * + * @param primaryKeyMapString Primary-key map-string. (NotNull and NotEmpty) + * @deprecated Please use OrdersStatusDbm.getInstance().acceptPrimaryKeyMapString(entity, primaryKeyMapString); + */ + public void acceptPrimaryKeyMapString(String primaryKeyMapString) { + getDBMeta().acceptPrimaryKeyMapString(this, primaryKeyMapString); + } + + /** + * This method implements the method that is declared at super. + * + * @param columnValueMap Column-value map. (NotNull and NotEmpty) + * @deprecated Please use OrdersStatusDbm.getInstance().acceptColumnValueMap(entity, columnValueMap); + */ + public void acceptColumnValueMap(java.util.Map columnValueMap) { + getDBMeta().acceptColumnValueMap(this, columnValueMap); + } + + /** + * This method implements the method that is declared at super. + * + * @param columnValueMapString Column-value map-string. (NotNull and NotEmpty) + * @deprecated Please use OrdersStatusDbm.getInstance().acceptColumnValueMap(entity, columnValueMapString); + */ + public void acceptColumnValueMapString(String columnValueMapString) { + getDBMeta().acceptColumnValueMapString(this, columnValueMapString); + } + + // =================================================================================== + // Extract + // ======= + /** + * This method implements the method that is declared at super. + * + * @return Primary-key map-string. (NotNull) + * @deprecated Please use OrdersStatusDbm.getInstance().extractPrimaryKeyMapString(entity); + */ + public String extractPrimaryKeyMapString() { + return getDBMeta().extractPrimaryKeyMapString(this); + } + + /** + * Extract primary-key map-string. + * + * @param startBrace Start-brace. (NotNull) + * @param endBrace End-brace. (NotNull) + * @param delimiter Delimiter. (NotNull) + * @param equal Equal. (NotNull) + * @return Primary-key map-string. (NotNull) + * @deprecated Please use OrdersStatusDbm.getInstance().extractPrimaryKeyMapString(entity, startBrace, endBrace, delimiter, equal); + */ + public String extractPrimaryKeyMapString(String startBrace, String endBrace, String delimiter, String equal) { + return getDBMeta().extractPrimaryKeyMapString(this, startBrace, endBrace, delimiter, equal); + } + + /** + * This method implements the method that is declared at super. + * + * @return Column-value map-string. (NotNull) + * @deprecated Please use OrdersStatusDbm.getInstance().extractColumnValueMapString(entity); + */ + public String extractColumnValueMapString() { + return getDBMeta().extractColumnValueMapString(this); + } + + /** + * Extract column-value map-string. + * + * @param startBrace Start-brace. (NotNull) + * @param endBrace End-brace. (NotNull) + * @param delimiter Delimiter. (NotNull) + * @param equal Equal. (NotNull) + * @return Column-value map-string. (NotNull) + * @deprecated Please use OrdersStatusDbm.getInstance().extractColumnValueMapString(entity, startBrace, endBrace, delimiter, equal); + */ + public String extractColumnValueMapString(String startBrace, String endBrace, String delimiter, String equal) { + return getDBMeta().extractColumnValueMapString(this, startBrace, endBrace, delimiter, equal); + } + + + // =================================================================================== + // Determination + // ============= + /** + * This method implements the method that is declared at super. + * + * @return Determination. + */ + public boolean hasPrimaryKeyValue() { + + if (_ordersStatusId == null) { + return false; + } + if (_languageId == null) { + return false; + } + + return true; + } + + // =================================================================================== + // Modified Properties + // =================== + /** + * Get modified property names. (S2Dao uses this for updateModifiedProperties()) + * + * @return Modified property names. (NotNull) + */ + public java.util.Set getModifiedPropertyNames() { + return _modifiedProperties.getPropertyNames(); + } + + /** + * New entity modified properties. You can override this at the sub-class if you need it. + * + * @return Entity modified properties. (NotNull) + */ + protected EntityModifiedProperties newEntityModifiedProperties() { + return new EntityModifiedProperties(); + } + + /** + * Clear modified property names. + */ + public void clearModifiedPropertyNames() { + _modifiedProperties.clear(); + } + + // =================================================================================== + // Basic Override + // ============== + + /** + * This method overrides the method that is declared at super. + * If the primary-key of the other is same as this one, returns true. + * + * @param other Other entity. + * @return Comparing result. + */ + public boolean equals(Object other) { + if (other == null) { + return false; + } + if (!(other instanceof BsOrdersStatus)) { + return false; + } + final BsOrdersStatus otherEntity = (BsOrdersStatus)other; + + if (getOrdersStatusId() == null || !getOrdersStatusId().equals(otherEntity.getOrdersStatusId())) { + return false; + } + if (getLanguageId() == null || !getLanguageId().equals(otherEntity.getLanguageId())) { + return false; + } + + return true; + } + + /** + * This method overrides the method that is declared at super. + * Calculates hash-code from primary-key. + * + * @return Hash-code from primary-keys. + */ + public int hashCode() { + int result = 0; + + if (this.getOrdersStatusId() != null) { + result = result + getOrdersStatusId().hashCode(); + } + if (this.getLanguageId() != null) { + result = result + getLanguageId().hashCode(); + } + + return result; + } + + /** + * This method overrides the method that is declared at super. + * + * @return Column-value map-string. (NotNull) + */ + public String toString() { + final String delimiter = ","; + final StringBuffer sb = new StringBuffer(); + + sb.append(delimiter).append(getOrdersStatusId()); + sb.append(delimiter).append(getLanguageId()); + sb.append(delimiter).append(getOrdersStatusName()); + + sb.delete(0, delimiter.length()); + sb.insert(0, "{").append("}"); + return sb.toString(); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/BsOrdersStatusHistory.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/BsOrdersStatusHistory.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/BsOrdersStatusHistory.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,500 @@ +package jp.sf.pal.pompei.bsentity; + + +import jp.sf.pal.pompei.allcommon.Entity; +import jp.sf.pal.pompei.allcommon.dbmeta.DBMeta; +import jp.sf.pal.pompei.allcommon.dbmeta.DBMetaInstanceHandler; + +/** + * The entity of ORDERS_STATUS_HISTORY. + * + *
+ * [primary-key]
+ *     ORDERS_STATUS_HISTORY_ID
+ * 
+ * [column-property]
+ *     ORDERS_STATUS_HISTORY_ID, ORDERS_ID, ORDERS_STATUS_ID, DATE_ADDED, CUSTOMER_NOTIFIED, COMMENTS
+ * 
+ * [foreign-property]
+ *     
+ * 
+ * [refferer-property]
+ *     
+ * 
+ * [sequence]
+ *     
+ * 
+ * [identity]
+ *     
+ * 
+ * [update-date]
+ *     
+ * 
+ * [version-no]
+ *     
+ * 
+ * 
+ * + * @author DBFlute(AutoGenerator) + */ +public abstract class BsOrdersStatusHistory implements Entity, java.io.Serializable { + + /** Serial version UID. (Default) */ + private static final long serialVersionUID = 1L; + + /** TABLE-Annotation for S2Dao */ + public static final String TABLE = "ORDERS_STATUS_HISTORY"; + + + // =================================================================================== + // Attribute + // ========= + /** Entity modified properties. (for S2Dao) */ + protected EntityModifiedProperties _modifiedProperties = newEntityModifiedProperties(); + + + /** The value of ordersStatusHistoryId. ColumnDefinition -- PK : INTEGER : NotNull*/ + protected java.math.BigDecimal _ordersStatusHistoryId; + + /** The value of ordersId. ColumnDefinition -- INTEGER : NotNull*/ + protected java.math.BigDecimal _ordersId; + + /** The value of ordersStatusId. ColumnDefinition -- INTEGER : NotNull*/ + protected java.math.BigDecimal _ordersStatusId; + + /** The value of dateAdded. ColumnDefinition -- TIMESTAMP : NotNull*/ + protected java.sql.Timestamp _dateAdded; + + /** The value of customerNotified. ColumnDefinition -- INTEGER : Default=[0]*/ + protected java.math.BigDecimal _customerNotified; + + /** The value of comments. ColumnDefinition -- LONG VARCHAR(32700)*/ + protected String _comments; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + public BsOrdersStatusHistory() { + } + + + // =================================================================================== + // DBMeta + // ====== + /** + * This method implements the method that is declared at super. + * + * @return DBMeta. (NotNull) + */ + public DBMeta getDBMeta() { + return DBMetaInstanceHandler.getInstanceByTableDbName(getTableDbName()); + } + + // =================================================================================== + // Table Name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + public String getTableDbName() { + return "ORDERS_STATUS_HISTORY"; + } + + /** + * This method implements the method that is declared at super. + * + * @return Table cap-prop-name. (NotNull) + */ + public String getTableCapPropName() { + return "OrdersStatusHistory"; + } + + /** + * This method implements the method that is declared at super. + * + * @return Table uncap-prop-name. (NotNull) + */ + public String getTableUncapPropName() { + return "ordersStatusHistory"; + } + + // =================================================================================== + // Accessor + // ======== + + /** Column-Annotation for S2Dao. ColumnDefinition -- PK : INTEGER : NotNull*/ + public static final String ordersStatusHistoryId_COLUMN = "ORDERS_STATUS_HISTORY_ID"; + + /** + * Get the value of ordersStatusHistoryId.
+ * {PK : INTEGER : NotNull} + * + * @return The value of ordersStatusHistoryId. (Nullable) + */ + public java.math.BigDecimal getOrdersStatusHistoryId() { + return _ordersStatusHistoryId; + } + + /** + * Set the value of ordersStatusHistoryId.
+ * {PK : INTEGER : NotNull} + * + * @param ordersStatusHistoryId The value of ordersStatusHistoryId. (Nullable) + */ + public void setOrdersStatusHistoryId(java.math.BigDecimal ordersStatusHistoryId) { + _modifiedProperties.addPropertyName("ordersStatusHistoryId"); + _ordersStatusHistoryId = ordersStatusHistoryId; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- INTEGER : NotNull*/ + public static final String ordersId_COLUMN = "ORDERS_ID"; + + /** + * Get the value of ordersId.
+ * {INTEGER : NotNull} + * + * @return The value of ordersId. (Nullable) + */ + public java.math.BigDecimal getOrdersId() { + return _ordersId; + } + + /** + * Set the value of ordersId.
+ * {INTEGER : NotNull} + * + * @param ordersId The value of ordersId. (Nullable) + */ + public void setOrdersId(java.math.BigDecimal ordersId) { + _modifiedProperties.addPropertyName("ordersId"); + _ordersId = ordersId; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- INTEGER : NotNull*/ + public static final String ordersStatusId_COLUMN = "ORDERS_STATUS_ID"; + + /** + * Get the value of ordersStatusId.
+ * {INTEGER : NotNull} + * + * @return The value of ordersStatusId. (Nullable) + */ + public java.math.BigDecimal getOrdersStatusId() { + return _ordersStatusId; + } + + /** + * Set the value of ordersStatusId.
+ * {INTEGER : NotNull} + * + * @param ordersStatusId The value of ordersStatusId. (Nullable) + */ + public void setOrdersStatusId(java.math.BigDecimal ordersStatusId) { + _modifiedProperties.addPropertyName("ordersStatusId"); + _ordersStatusId = ordersStatusId; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- TIMESTAMP : NotNull*/ + public static final String dateAdded_COLUMN = "DATE_ADDED"; + + /** + * Get the value of dateAdded.
+ * {TIMESTAMP : NotNull} + * + * @return The value of dateAdded. (Nullable) + */ + public java.sql.Timestamp getDateAdded() { + return _dateAdded; + } + + /** + * Set the value of dateAdded.
+ * {TIMESTAMP : NotNull} + * + * @param dateAdded The value of dateAdded. (Nullable) + */ + public void setDateAdded(java.sql.Timestamp dateAdded) { + _modifiedProperties.addPropertyName("dateAdded"); + _dateAdded = dateAdded; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- INTEGER : Default=[0]*/ + public static final String customerNotified_COLUMN = "CUSTOMER_NOTIFIED"; + + /** + * Get the value of customerNotified.
+ * {INTEGER : Default=[0]} + * + * @return The value of customerNotified. (Nullable) + */ + public java.math.BigDecimal getCustomerNotified() { + return _customerNotified; + } + + /** + * Set the value of customerNotified.
+ * {INTEGER : Default=[0]} + * + * @param customerNotified The value of customerNotified. (Nullable) + */ + public void setCustomerNotified(java.math.BigDecimal customerNotified) { + _modifiedProperties.addPropertyName("customerNotified"); + _customerNotified = customerNotified; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- LONG VARCHAR(32700)*/ + public static final String comments_COLUMN = "COMMENTS"; + + /** + * Get the value of comments.
+ * {LONG VARCHAR(32700)} + * + * @return The value of comments. (Nullable) + */ + public String getComments() { + return _comments; + } + + /** + * Set the value of comments.
+ * {LONG VARCHAR(32700)} + * + * @param comments The value of comments. (Nullable) + */ + public void setComments(String comments) { + _modifiedProperties.addPropertyName("comments"); + _comments = comments; + } + + + // =================================================================================== + // Classify Method + // =============== + + // =================================================================================== + // Classification Determination + // ============================ + + + // =================================================================================== + // Classification Getter + // ===================== + + + // =================================================================================== + // Foreign Table + // ============= + + // =================================================================================== + // Refferer Table + // ============== + + // =================================================================================== + // Accept + // ====== + /** + * This method implements the method that is declared at super. + * + * @param primaryKeyMap Primary key map. (NotNull and NotEmpty) + * @deprecated Please use OrdersStatusHistoryDbm.getInstance().acceptPrimaryKeyMap(entity, primaryKeyMap); + */ + public void acceptPrimaryKeyMap(java.util.Map primaryKeyMap) { + getDBMeta().acceptPrimaryKeyMap(this, primaryKeyMap); + } + + /** + * This method implements the method that is declared at super. + * + * @param primaryKeyMapString Primary-key map-string. (NotNull and NotEmpty) + * @deprecated Please use OrdersStatusHistoryDbm.getInstance().acceptPrimaryKeyMapString(entity, primaryKeyMapString); + */ + public void acceptPrimaryKeyMapString(String primaryKeyMapString) { + getDBMeta().acceptPrimaryKeyMapString(this, primaryKeyMapString); + } + + /** + * This method implements the method that is declared at super. + * + * @param columnValueMap Column-value map. (NotNull and NotEmpty) + * @deprecated Please use OrdersStatusHistoryDbm.getInstance().acceptColumnValueMap(entity, columnValueMap); + */ + public void acceptColumnValueMap(java.util.Map columnValueMap) { + getDBMeta().acceptColumnValueMap(this, columnValueMap); + } + + /** + * This method implements the method that is declared at super. + * + * @param columnValueMapString Column-value map-string. (NotNull and NotEmpty) + * @deprecated Please use OrdersStatusHistoryDbm.getInstance().acceptColumnValueMap(entity, columnValueMapString); + */ + public void acceptColumnValueMapString(String columnValueMapString) { + getDBMeta().acceptColumnValueMapString(this, columnValueMapString); + } + + // =================================================================================== + // Extract + // ======= + /** + * This method implements the method that is declared at super. + * + * @return Primary-key map-string. (NotNull) + * @deprecated Please use OrdersStatusHistoryDbm.getInstance().extractPrimaryKeyMapString(entity); + */ + public String extractPrimaryKeyMapString() { + return getDBMeta().extractPrimaryKeyMapString(this); + } + + /** + * Extract primary-key map-string. + * + * @param startBrace Start-brace. (NotNull) + * @param endBrace End-brace. (NotNull) + * @param delimiter Delimiter. (NotNull) + * @param equal Equal. (NotNull) + * @return Primary-key map-string. (NotNull) + * @deprecated Please use OrdersStatusHistoryDbm.getInstance().extractPrimaryKeyMapString(entity, startBrace, endBrace, delimiter, equal); + */ + public String extractPrimaryKeyMapString(String startBrace, String endBrace, String delimiter, String equal) { + return getDBMeta().extractPrimaryKeyMapString(this, startBrace, endBrace, delimiter, equal); + } + + /** + * This method implements the method that is declared at super. + * + * @return Column-value map-string. (NotNull) + * @deprecated Please use OrdersStatusHistoryDbm.getInstance().extractColumnValueMapString(entity); + */ + public String extractColumnValueMapString() { + return getDBMeta().extractColumnValueMapString(this); + } + + /** + * Extract column-value map-string. + * + * @param startBrace Start-brace. (NotNull) + * @param endBrace End-brace. (NotNull) + * @param delimiter Delimiter. (NotNull) + * @param equal Equal. (NotNull) + * @return Column-value map-string. (NotNull) + * @deprecated Please use OrdersStatusHistoryDbm.getInstance().extractColumnValueMapString(entity, startBrace, endBrace, delimiter, equal); + */ + public String extractColumnValueMapString(String startBrace, String endBrace, String delimiter, String equal) { + return getDBMeta().extractColumnValueMapString(this, startBrace, endBrace, delimiter, equal); + } + + + // =================================================================================== + // Determination + // ============= + /** + * This method implements the method that is declared at super. + * + * @return Determination. + */ + public boolean hasPrimaryKeyValue() { + + if (_ordersStatusHistoryId == null) { + return false; + } + + return true; + } + + // =================================================================================== + // Modified Properties + // =================== + /** + * Get modified property names. (S2Dao uses this for updateModifiedProperties()) + * + * @return Modified property names. (NotNull) + */ + public java.util.Set getModifiedPropertyNames() { + return _modifiedProperties.getPropertyNames(); + } + + /** + * New entity modified properties. You can override this at the sub-class if you need it. + * + * @return Entity modified properties. (NotNull) + */ + protected EntityModifiedProperties newEntityModifiedProperties() { + return new EntityModifiedProperties(); + } + + /** + * Clear modified property names. + */ + public void clearModifiedPropertyNames() { + _modifiedProperties.clear(); + } + + // =================================================================================== + // Basic Override + // ============== + + /** + * This method overrides the method that is declared at super. + * If the primary-key of the other is same as this one, returns true. + * + * @param other Other entity. + * @return Comparing result. + */ + public boolean equals(Object other) { + if (other == null) { + return false; + } + if (!(other instanceof BsOrdersStatusHistory)) { + return false; + } + final BsOrdersStatusHistory otherEntity = (BsOrdersStatusHistory)other; + + if (getOrdersStatusHistoryId() == null || !getOrdersStatusHistoryId().equals(otherEntity.getOrdersStatusHistoryId())) { + return false; + } + + return true; + } + + /** + * This method overrides the method that is declared at super. + * Calculates hash-code from primary-key. + * + * @return Hash-code from primary-keys. + */ + public int hashCode() { + int result = 0; + + if (this.getOrdersStatusHistoryId() != null) { + result = result + getOrdersStatusHistoryId().hashCode(); + } + + return result; + } + + /** + * This method overrides the method that is declared at super. + * + * @return Column-value map-string. (NotNull) + */ + public String toString() { + final String delimiter = ","; + final StringBuffer sb = new StringBuffer(); + + sb.append(delimiter).append(getOrdersStatusHistoryId()); + sb.append(delimiter).append(getOrdersId()); + sb.append(delimiter).append(getOrdersStatusId()); + sb.append(delimiter).append(getDateAdded()); + sb.append(delimiter).append(getCustomerNotified()); + sb.append(delimiter).append(getComments()); + + sb.delete(0, delimiter.length()); + sb.insert(0, "{").append("}"); + return sb.toString(); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/BsOrdersTotal.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/BsOrdersTotal.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/BsOrdersTotal.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,528 @@ +package jp.sf.pal.pompei.bsentity; + + +import jp.sf.pal.pompei.allcommon.Entity; +import jp.sf.pal.pompei.allcommon.dbmeta.DBMeta; +import jp.sf.pal.pompei.allcommon.dbmeta.DBMetaInstanceHandler; + +/** + * The entity of ORDERS_TOTAL. + * + *
+ * [primary-key]
+ *     ORDERS_TOTAL_ID
+ * 
+ * [column-property]
+ *     ORDERS_TOTAL_ID, ORDERS_ID, TITLE, TEXT, VALUE, OT_CLASS, SORT_ORDER
+ * 
+ * [foreign-property]
+ *     
+ * 
+ * [refferer-property]
+ *     
+ * 
+ * [sequence]
+ *     
+ * 
+ * [identity]
+ *     
+ * 
+ * [update-date]
+ *     
+ * 
+ * [version-no]
+ *     
+ * 
+ * 
+ * + * @author DBFlute(AutoGenerator) + */ +public abstract class BsOrdersTotal implements Entity, java.io.Serializable { + + /** Serial version UID. (Default) */ + private static final long serialVersionUID = 1L; + + /** TABLE-Annotation for S2Dao */ + public static final String TABLE = "ORDERS_TOTAL"; + + + // =================================================================================== + // Attribute + // ========= + /** Entity modified properties. (for S2Dao) */ + protected EntityModifiedProperties _modifiedProperties = newEntityModifiedProperties(); + + + /** The value of ordersTotalId. ColumnDefinition -- PK : INTEGER : NotNull*/ + protected java.math.BigDecimal _ordersTotalId; + + /** The value of ordersId. ColumnDefinition -- INTEGER : NotNull*/ + protected java.math.BigDecimal _ordersId; + + /** The value of title. ColumnDefinition -- VARCHAR(255) : NotNull*/ + protected String _title; + + /** The value of text. ColumnDefinition -- VARCHAR(255) : NotNull*/ + protected String _text; + + /** The value of value. ColumnDefinition -- DECIMAL(15) : NotNull*/ + protected java.math.BigDecimal _value; + + /** The value of otClass. ColumnDefinition -- VARCHAR(32) : NotNull*/ + protected String _otClass; + + /** The value of sortOrder. ColumnDefinition -- INTEGER : NotNull*/ + protected java.math.BigDecimal _sortOrder; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + public BsOrdersTotal() { + } + + + // =================================================================================== + // DBMeta + // ====== + /** + * This method implements the method that is declared at super. + * + * @return DBMeta. (NotNull) + */ + public DBMeta getDBMeta() { + return DBMetaInstanceHandler.getInstanceByTableDbName(getTableDbName()); + } + + // =================================================================================== + // Table Name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + public String getTableDbName() { + return "ORDERS_TOTAL"; + } + + /** + * This method implements the method that is declared at super. + * + * @return Table cap-prop-name. (NotNull) + */ + public String getTableCapPropName() { + return "OrdersTotal"; + } + + /** + * This method implements the method that is declared at super. + * + * @return Table uncap-prop-name. (NotNull) + */ + public String getTableUncapPropName() { + return "ordersTotal"; + } + + // =================================================================================== + // Accessor + // ======== + + /** Column-Annotation for S2Dao. ColumnDefinition -- PK : INTEGER : NotNull*/ + public static final String ordersTotalId_COLUMN = "ORDERS_TOTAL_ID"; + + /** + * Get the value of ordersTotalId.
+ * {PK : INTEGER : NotNull} + * + * @return The value of ordersTotalId. (Nullable) + */ + public java.math.BigDecimal getOrdersTotalId() { + return _ordersTotalId; + } + + /** + * Set the value of ordersTotalId.
+ * {PK : INTEGER : NotNull} + * + * @param ordersTotalId The value of ordersTotalId. (Nullable) + */ + public void setOrdersTotalId(java.math.BigDecimal ordersTotalId) { + _modifiedProperties.addPropertyName("ordersTotalId"); + _ordersTotalId = ordersTotalId; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- INTEGER : NotNull*/ + public static final String ordersId_COLUMN = "ORDERS_ID"; + + /** + * Get the value of ordersId.
+ * {INTEGER : NotNull} + * + * @return The value of ordersId. (Nullable) + */ + public java.math.BigDecimal getOrdersId() { + return _ordersId; + } + + /** + * Set the value of ordersId.
+ * {INTEGER : NotNull} + * + * @param ordersId The value of ordersId. (Nullable) + */ + public void setOrdersId(java.math.BigDecimal ordersId) { + _modifiedProperties.addPropertyName("ordersId"); + _ordersId = ordersId; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- VARCHAR(255) : NotNull*/ + public static final String title_COLUMN = "TITLE"; + + /** + * Get the value of title.
+ * {VARCHAR(255) : NotNull} + * + * @return The value of title. (Nullable) + */ + public String getTitle() { + return _title; + } + + /** + * Set the value of title.
+ * {VARCHAR(255) : NotNull} + * + * @param title The value of title. (Nullable) + */ + public void setTitle(String title) { + _modifiedProperties.addPropertyName("title"); + _title = title; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- VARCHAR(255) : NotNull*/ + public static final String text_COLUMN = "TEXT"; + + /** + * Get the value of text.
+ * {VARCHAR(255) : NotNull} + * + * @return The value of text. (Nullable) + */ + public String getText() { + return _text; + } + + /** + * Set the value of text.
+ * {VARCHAR(255) : NotNull} + * + * @param text The value of text. (Nullable) + */ + public void setText(String text) { + _modifiedProperties.addPropertyName("text"); + _text = text; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- DECIMAL(15) : NotNull*/ + public static final String value_COLUMN = "VALUE"; + + /** + * Get the value of value.
+ * {DECIMAL(15) : NotNull} + * + * @return The value of value. (Nullable) + */ + public java.math.BigDecimal getValue() { + return _value; + } + + /** + * Set the value of value.
+ * {DECIMAL(15) : NotNull} + * + * @param value The value of value. (Nullable) + */ + public void setValue(java.math.BigDecimal value) { + _modifiedProperties.addPropertyName("value"); + _value = value; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- VARCHAR(32) : NotNull*/ + public static final String otClass_COLUMN = "OT_CLASS"; + + /** + * Get the value of otClass.
+ * {VARCHAR(32) : NotNull} + * + * @return The value of otClass. (Nullable) + */ + public String getOtClass() { + return _otClass; + } + + /** + * Set the value of otClass.
+ * {VARCHAR(32) : NotNull} + * + * @param otClass The value of otClass. (Nullable) + */ + public void setOtClass(String otClass) { + _modifiedProperties.addPropertyName("otClass"); + _otClass = otClass; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- INTEGER : NotNull*/ + public static final String sortOrder_COLUMN = "SORT_ORDER"; + + /** + * Get the value of sortOrder.
+ * {INTEGER : NotNull} + * + * @return The value of sortOrder. (Nullable) + */ + public java.math.BigDecimal getSortOrder() { + return _sortOrder; + } + + /** + * Set the value of sortOrder.
+ * {INTEGER : NotNull} + * + * @param sortOrder The value of sortOrder. (Nullable) + */ + public void setSortOrder(java.math.BigDecimal sortOrder) { + _modifiedProperties.addPropertyName("sortOrder"); + _sortOrder = sortOrder; + } + + + // =================================================================================== + // Classify Method + // =============== + + // =================================================================================== + // Classification Determination + // ============================ + + + // =================================================================================== + // Classification Getter + // ===================== + + + // =================================================================================== + // Foreign Table + // ============= + + // =================================================================================== + // Refferer Table + // ============== + + // =================================================================================== + // Accept + // ====== + /** + * This method implements the method that is declared at super. + * + * @param primaryKeyMap Primary key map. (NotNull and NotEmpty) + * @deprecated Please use OrdersTotalDbm.getInstance().acceptPrimaryKeyMap(entity, primaryKeyMap); + */ + public void acceptPrimaryKeyMap(java.util.Map primaryKeyMap) { + getDBMeta().acceptPrimaryKeyMap(this, primaryKeyMap); + } + + /** + * This method implements the method that is declared at super. + * + * @param primaryKeyMapString Primary-key map-string. (NotNull and NotEmpty) + * @deprecated Please use OrdersTotalDbm.getInstance().acceptPrimaryKeyMapString(entity, primaryKeyMapString); + */ + public void acceptPrimaryKeyMapString(String primaryKeyMapString) { + getDBMeta().acceptPrimaryKeyMapString(this, primaryKeyMapString); + } + + /** + * This method implements the method that is declared at super. + * + * @param columnValueMap Column-value map. (NotNull and NotEmpty) + * @deprecated Please use OrdersTotalDbm.getInstance().acceptColumnValueMap(entity, columnValueMap); + */ + public void acceptColumnValueMap(java.util.Map columnValueMap) { + getDBMeta().acceptColumnValueMap(this, columnValueMap); + } + + /** + * This method implements the method that is declared at super. + * + * @param columnValueMapString Column-value map-string. (NotNull and NotEmpty) + * @deprecated Please use OrdersTotalDbm.getInstance().acceptColumnValueMap(entity, columnValueMapString); + */ + public void acceptColumnValueMapString(String columnValueMapString) { + getDBMeta().acceptColumnValueMapString(this, columnValueMapString); + } + + // =================================================================================== + // Extract + // ======= + /** + * This method implements the method that is declared at super. + * + * @return Primary-key map-string. (NotNull) + * @deprecated Please use OrdersTotalDbm.getInstance().extractPrimaryKeyMapString(entity); + */ + public String extractPrimaryKeyMapString() { + return getDBMeta().extractPrimaryKeyMapString(this); + } + + /** + * Extract primary-key map-string. + * + * @param startBrace Start-brace. (NotNull) + * @param endBrace End-brace. (NotNull) + * @param delimiter Delimiter. (NotNull) + * @param equal Equal. (NotNull) + * @return Primary-key map-string. (NotNull) + * @deprecated Please use OrdersTotalDbm.getInstance().extractPrimaryKeyMapString(entity, startBrace, endBrace, delimiter, equal); + */ + public String extractPrimaryKeyMapString(String startBrace, String endBrace, String delimiter, String equal) { + return getDBMeta().extractPrimaryKeyMapString(this, startBrace, endBrace, delimiter, equal); + } + + /** + * This method implements the method that is declared at super. + * + * @return Column-value map-string. (NotNull) + * @deprecated Please use OrdersTotalDbm.getInstance().extractColumnValueMapString(entity); + */ + public String extractColumnValueMapString() { + return getDBMeta().extractColumnValueMapString(this); + } + + /** + * Extract column-value map-string. + * + * @param startBrace Start-brace. (NotNull) + * @param endBrace End-brace. (NotNull) + * @param delimiter Delimiter. (NotNull) + * @param equal Equal. (NotNull) + * @return Column-value map-string. (NotNull) + * @deprecated Please use OrdersTotalDbm.getInstance().extractColumnValueMapString(entity, startBrace, endBrace, delimiter, equal); + */ + public String extractColumnValueMapString(String startBrace, String endBrace, String delimiter, String equal) { + return getDBMeta().extractColumnValueMapString(this, startBrace, endBrace, delimiter, equal); + } + + + // =================================================================================== + // Determination + // ============= + /** + * This method implements the method that is declared at super. + * + * @return Determination. + */ + public boolean hasPrimaryKeyValue() { + + if (_ordersTotalId == null) { + return false; + } + + return true; + } + + // =================================================================================== + // Modified Properties + // =================== + /** + * Get modified property names. (S2Dao uses this for updateModifiedProperties()) + * + * @return Modified property names. (NotNull) + */ + public java.util.Set getModifiedPropertyNames() { + return _modifiedProperties.getPropertyNames(); + } + + /** + * New entity modified properties. You can override this at the sub-class if you need it. + * + * @return Entity modified properties. (NotNull) + */ + protected EntityModifiedProperties newEntityModifiedProperties() { + return new EntityModifiedProperties(); + } + + /** + * Clear modified property names. + */ + public void clearModifiedPropertyNames() { + _modifiedProperties.clear(); + } + + // =================================================================================== + // Basic Override + // ============== + + /** + * This method overrides the method that is declared at super. + * If the primary-key of the other is same as this one, returns true. + * + * @param other Other entity. + * @return Comparing result. + */ + public boolean equals(Object other) { + if (other == null) { + return false; + } + if (!(other instanceof BsOrdersTotal)) { + return false; + } + final BsOrdersTotal otherEntity = (BsOrdersTotal)other; + + if (getOrdersTotalId() == null || !getOrdersTotalId().equals(otherEntity.getOrdersTotalId())) { + return false; + } + + return true; + } + + /** + * This method overrides the method that is declared at super. + * Calculates hash-code from primary-key. + * + * @return Hash-code from primary-keys. + */ + public int hashCode() { + int result = 0; + + if (this.getOrdersTotalId() != null) { + result = result + getOrdersTotalId().hashCode(); + } + + return result; + } + + /** + * This method overrides the method that is declared at super. + * + * @return Column-value map-string. (NotNull) + */ + public String toString() { + final String delimiter = ","; + final StringBuffer sb = new StringBuffer(); + + sb.append(delimiter).append(getOrdersTotalId()); + sb.append(delimiter).append(getOrdersId()); + sb.append(delimiter).append(getTitle()); + sb.append(delimiter).append(getText()); + sb.append(delimiter).append(getValue()); + sb.append(delimiter).append(getOtClass()); + sb.append(delimiter).append(getSortOrder()); + + sb.delete(0, delimiter.length()); + sb.insert(0, "{").append("}"); + return sb.toString(); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/BsProducts.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/BsProducts.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/BsProducts.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,696 @@ +package jp.sf.pal.pompei.bsentity; + + +import jp.sf.pal.pompei.allcommon.Entity; +import jp.sf.pal.pompei.allcommon.dbmeta.DBMeta; +import jp.sf.pal.pompei.allcommon.dbmeta.DBMetaInstanceHandler; + +/** + * The entity of PRODUCTS. + * + *
+ * [primary-key]
+ *     PRODUCTS_ID
+ * 
+ * [column-property]
+ *     PRODUCTS_ID, PRODUCTS_QUANTITY, PRODUCTS_MODEL, PRODUCTS_IMAGE, PRODUCTS_PRICE, PRODUCTS_DATE_ADDED, PRODUCTS_LAST_MODIFIED, PRODUCTS_DATE_AVAILABLE, PRODUCTS_WEIGHT, PRODUCTS_STATUS, PRODUCTS_TAX_CLASS_ID, MANUFACTURERS_ID, PRODUCTS_ORDERED
+ * 
+ * [foreign-property]
+ *     
+ * 
+ * [refferer-property]
+ *     
+ * 
+ * [sequence]
+ *     
+ * 
+ * [identity]
+ *     
+ * 
+ * [update-date]
+ *     
+ * 
+ * [version-no]
+ *     
+ * 
+ * 
+ * + * @author DBFlute(AutoGenerator) + */ +public abstract class BsProducts implements Entity, java.io.Serializable { + + /** Serial version UID. (Default) */ + private static final long serialVersionUID = 1L; + + /** TABLE-Annotation for S2Dao */ + public static final String TABLE = "PRODUCTS"; + + + // =================================================================================== + // Attribute + // ========= + /** Entity modified properties. (for S2Dao) */ + protected EntityModifiedProperties _modifiedProperties = newEntityModifiedProperties(); + + + /** The value of productsId. ColumnDefinition -- PK : INTEGER : NotNull*/ + protected java.math.BigDecimal _productsId; + + /** The value of productsQuantity. ColumnDefinition -- INTEGER : NotNull*/ + protected java.math.BigDecimal _productsQuantity; + + /** The value of productsModel. ColumnDefinition -- VARCHAR(12)*/ + protected String _productsModel; + + /** The value of productsImage. ColumnDefinition -- VARCHAR(64)*/ + protected String _productsImage; + + /** The value of productsPrice. ColumnDefinition -- DECIMAL(15) : NotNull*/ + protected java.math.BigDecimal _productsPrice; + + /** The value of productsDateAdded. ColumnDefinition -- TIMESTAMP : NotNull*/ + protected java.sql.Timestamp _productsDateAdded; + + /** The value of productsLastModified. ColumnDefinition -- TIMESTAMP*/ + protected java.sql.Timestamp _productsLastModified; + + /** The value of productsDateAvailable. ColumnDefinition -- TIMESTAMP*/ + protected java.sql.Timestamp _productsDateAvailable; + + /** The value of productsWeight. ColumnDefinition -- DECIMAL(5) : NotNull*/ + protected java.math.BigDecimal _productsWeight; + + /** The value of productsStatus. ColumnDefinition -- INTEGER : NotNull*/ + protected java.math.BigDecimal _productsStatus; + + /** The value of productsTaxClassId. ColumnDefinition -- INTEGER : NotNull*/ + protected java.math.BigDecimal _productsTaxClassId; + + /** The value of manufacturersId. ColumnDefinition -- INTEGER*/ + protected java.math.BigDecimal _manufacturersId; + + /** The value of productsOrdered. ColumnDefinition -- INTEGER : NotNull : Default=[0]*/ + protected java.math.BigDecimal _productsOrdered; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + public BsProducts() { + } + + + // =================================================================================== + // DBMeta + // ====== + /** + * This method implements the method that is declared at super. + * + * @return DBMeta. (NotNull) + */ + public DBMeta getDBMeta() { + return DBMetaInstanceHandler.getInstanceByTableDbName(getTableDbName()); + } + + // =================================================================================== + // Table Name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + public String getTableDbName() { + return "PRODUCTS"; + } + + /** + * This method implements the method that is declared at super. + * + * @return Table cap-prop-name. (NotNull) + */ + public String getTableCapPropName() { + return "Products"; + } + + /** + * This method implements the method that is declared at super. + * + * @return Table uncap-prop-name. (NotNull) + */ + public String getTableUncapPropName() { + return "products"; + } + + // =================================================================================== + // Accessor + // ======== + + /** Column-Annotation for S2Dao. ColumnDefinition -- PK : INTEGER : NotNull*/ + public static final String productsId_COLUMN = "PRODUCTS_ID"; + + /** + * Get the value of productsId.
+ * {PK : INTEGER : NotNull} + * + * @return The value of productsId. (Nullable) + */ + public java.math.BigDecimal getProductsId() { + return _productsId; + } + + /** + * Set the value of productsId.
+ * {PK : INTEGER : NotNull} + * + * @param productsId The value of productsId. (Nullable) + */ + public void setProductsId(java.math.BigDecimal productsId) { + _modifiedProperties.addPropertyName("productsId"); + _productsId = productsId; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- INTEGER : NotNull*/ + public static final String productsQuantity_COLUMN = "PRODUCTS_QUANTITY"; + + /** + * Get the value of productsQuantity.
+ * {INTEGER : NotNull} + * + * @return The value of productsQuantity. (Nullable) + */ + public java.math.BigDecimal getProductsQuantity() { + return _productsQuantity; + } + + /** + * Set the value of productsQuantity.
+ * {INTEGER : NotNull} + * + * @param productsQuantity The value of productsQuantity. (Nullable) + */ + public void setProductsQuantity(java.math.BigDecimal productsQuantity) { + _modifiedProperties.addPropertyName("productsQuantity"); + _productsQuantity = productsQuantity; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- VARCHAR(12)*/ + public static final String productsModel_COLUMN = "PRODUCTS_MODEL"; + + /** + * Get the value of productsModel.
+ * {VARCHAR(12)} + * + * @return The value of productsModel. (Nullable) + */ + public String getProductsModel() { + return _productsModel; + } + + /** + * Set the value of productsModel.
+ * {VARCHAR(12)} + * + * @param productsModel The value of productsModel. (Nullable) + */ + public void setProductsModel(String productsModel) { + _modifiedProperties.addPropertyName("productsModel"); + _productsModel = productsModel; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- VARCHAR(64)*/ + public static final String productsImage_COLUMN = "PRODUCTS_IMAGE"; + + /** + * Get the value of productsImage.
+ * {VARCHAR(64)} + * + * @return The value of productsImage. (Nullable) + */ + public String getProductsImage() { + return _productsImage; + } + + /** + * Set the value of productsImage.
+ * {VARCHAR(64)} + * + * @param productsImage The value of productsImage. (Nullable) + */ + public void setProductsImage(String productsImage) { + _modifiedProperties.addPropertyName("productsImage"); + _productsImage = productsImage; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- DECIMAL(15) : NotNull*/ + public static final String productsPrice_COLUMN = "PRODUCTS_PRICE"; + + /** + * Get the value of productsPrice.
+ * {DECIMAL(15) : NotNull} + * + * @return The value of productsPrice. (Nullable) + */ + public java.math.BigDecimal getProductsPrice() { + return _productsPrice; + } + + /** + * Set the value of productsPrice.
+ * {DECIMAL(15) : NotNull} + * + * @param productsPrice The value of productsPrice. (Nullable) + */ + public void setProductsPrice(java.math.BigDecimal productsPrice) { + _modifiedProperties.addPropertyName("productsPrice"); + _productsPrice = productsPrice; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- TIMESTAMP : NotNull*/ + public static final String productsDateAdded_COLUMN = "PRODUCTS_DATE_ADDED"; + + /** + * Get the value of productsDateAdded.
+ * {TIMESTAMP : NotNull} + * + * @return The value of productsDateAdded. (Nullable) + */ + public java.sql.Timestamp getProductsDateAdded() { + return _productsDateAdded; + } + + /** + * Set the value of productsDateAdded.
+ * {TIMESTAMP : NotNull} + * + * @param productsDateAdded The value of productsDateAdded. (Nullable) + */ + public void setProductsDateAdded(java.sql.Timestamp productsDateAdded) { + _modifiedProperties.addPropertyName("productsDateAdded"); + _productsDateAdded = productsDateAdded; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- TIMESTAMP*/ + public static final String productsLastModified_COLUMN = "PRODUCTS_LAST_MODIFIED"; + + /** + * Get the value of productsLastModified.
+ * {TIMESTAMP} + * + * @return The value of productsLastModified. (Nullable) + */ + public java.sql.Timestamp getProductsLastModified() { + return _productsLastModified; + } + + /** + * Set the value of productsLastModified.
+ * {TIMESTAMP} + * + * @param productsLastModified The value of productsLastModified. (Nullable) + */ + public void setProductsLastModified(java.sql.Timestamp productsLastModified) { + _modifiedProperties.addPropertyName("productsLastModified"); + _productsLastModified = productsLastModified; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- TIMESTAMP*/ + public static final String productsDateAvailable_COLUMN = "PRODUCTS_DATE_AVAILABLE"; + + /** + * Get the value of productsDateAvailable.
+ * {TIMESTAMP} + * + * @return The value of productsDateAvailable. (Nullable) + */ + public java.sql.Timestamp getProductsDateAvailable() { + return _productsDateAvailable; + } + + /** + * Set the value of productsDateAvailable.
+ * {TIMESTAMP} + * + * @param productsDateAvailable The value of productsDateAvailable. (Nullable) + */ + public void setProductsDateAvailable(java.sql.Timestamp productsDateAvailable) { + _modifiedProperties.addPropertyName("productsDateAvailable"); + _productsDateAvailable = productsDateAvailable; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- DECIMAL(5) : NotNull*/ + public static final String productsWeight_COLUMN = "PRODUCTS_WEIGHT"; + + /** + * Get the value of productsWeight.
+ * {DECIMAL(5) : NotNull} + * + * @return The value of productsWeight. (Nullable) + */ + public java.math.BigDecimal getProductsWeight() { + return _productsWeight; + } + + /** + * Set the value of productsWeight.
+ * {DECIMAL(5) : NotNull} + * + * @param productsWeight The value of productsWeight. (Nullable) + */ + public void setProductsWeight(java.math.BigDecimal productsWeight) { + _modifiedProperties.addPropertyName("productsWeight"); + _productsWeight = productsWeight; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- INTEGER : NotNull*/ + public static final String productsStatus_COLUMN = "PRODUCTS_STATUS"; + + /** + * Get the value of productsStatus.
+ * {INTEGER : NotNull} + * + * @return The value of productsStatus. (Nullable) + */ + public java.math.BigDecimal getProductsStatus() { + return _productsStatus; + } + + /** + * Set the value of productsStatus.
+ * {INTEGER : NotNull} + * + * @param productsStatus The value of productsStatus. (Nullable) + */ + public void setProductsStatus(java.math.BigDecimal productsStatus) { + _modifiedProperties.addPropertyName("productsStatus"); + _productsStatus = productsStatus; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- INTEGER : NotNull*/ + public static final String productsTaxClassId_COLUMN = "PRODUCTS_TAX_CLASS_ID"; + + /** + * Get the value of productsTaxClassId.
+ * {INTEGER : NotNull} + * + * @return The value of productsTaxClassId. (Nullable) + */ + public java.math.BigDecimal getProductsTaxClassId() { + return _productsTaxClassId; + } + + /** + * Set the value of productsTaxClassId.
+ * {INTEGER : NotNull} + * + * @param productsTaxClassId The value of productsTaxClassId. (Nullable) + */ + public void setProductsTaxClassId(java.math.BigDecimal productsTaxClassId) { + _modifiedProperties.addPropertyName("productsTaxClassId"); + _productsTaxClassId = productsTaxClassId; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- INTEGER*/ + public static final String manufacturersId_COLUMN = "MANUFACTURERS_ID"; + + /** + * Get the value of manufacturersId.
+ * {INTEGER} + * + * @return The value of manufacturersId. (Nullable) + */ + public java.math.BigDecimal getManufacturersId() { + return _manufacturersId; + } + + /** + * Set the value of manufacturersId.
+ * {INTEGER} + * + * @param manufacturersId The value of manufacturersId. (Nullable) + */ + public void setManufacturersId(java.math.BigDecimal manufacturersId) { + _modifiedProperties.addPropertyName("manufacturersId"); + _manufacturersId = manufacturersId; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- INTEGER : NotNull : Default=[0]*/ + public static final String productsOrdered_COLUMN = "PRODUCTS_ORDERED"; + + /** + * Get the value of productsOrdered.
+ * {INTEGER : NotNull : Default=[0]} + * + * @return The value of productsOrdered. (Nullable) + */ + public java.math.BigDecimal getProductsOrdered() { + return _productsOrdered; + } + + /** + * Set the value of productsOrdered.
+ * {INTEGER : NotNull : Default=[0]} + * + * @param productsOrdered The value of productsOrdered. (Nullable) + */ + public void setProductsOrdered(java.math.BigDecimal productsOrdered) { + _modifiedProperties.addPropertyName("productsOrdered"); + _productsOrdered = productsOrdered; + } + + + // =================================================================================== + // Classify Method + // =============== + + // =================================================================================== + // Classification Determination + // ============================ + + + // =================================================================================== + // Classification Getter + // ===================== + + + // =================================================================================== + // Foreign Table + // ============= + + // =================================================================================== + // Refferer Table + // ============== + + // =================================================================================== + // Accept + // ====== + /** + * This method implements the method that is declared at super. + * + * @param primaryKeyMap Primary key map. (NotNull and NotEmpty) + * @deprecated Please use ProductsDbm.getInstance().acceptPrimaryKeyMap(entity, primaryKeyMap); + */ + public void acceptPrimaryKeyMap(java.util.Map primaryKeyMap) { + getDBMeta().acceptPrimaryKeyMap(this, primaryKeyMap); + } + + /** + * This method implements the method that is declared at super. + * + * @param primaryKeyMapString Primary-key map-string. (NotNull and NotEmpty) + * @deprecated Please use ProductsDbm.getInstance().acceptPrimaryKeyMapString(entity, primaryKeyMapString); + */ + public void acceptPrimaryKeyMapString(String primaryKeyMapString) { + getDBMeta().acceptPrimaryKeyMapString(this, primaryKeyMapString); + } + + /** + * This method implements the method that is declared at super. + * + * @param columnValueMap Column-value map. (NotNull and NotEmpty) + * @deprecated Please use ProductsDbm.getInstance().acceptColumnValueMap(entity, columnValueMap); + */ + public void acceptColumnValueMap(java.util.Map columnValueMap) { + getDBMeta().acceptColumnValueMap(this, columnValueMap); + } + + /** + * This method implements the method that is declared at super. + * + * @param columnValueMapString Column-value map-string. (NotNull and NotEmpty) + * @deprecated Please use ProductsDbm.getInstance().acceptColumnValueMap(entity, columnValueMapString); + */ + public void acceptColumnValueMapString(String columnValueMapString) { + getDBMeta().acceptColumnValueMapString(this, columnValueMapString); + } + + // =================================================================================== + // Extract + // ======= + /** + * This method implements the method that is declared at super. + * + * @return Primary-key map-string. (NotNull) + * @deprecated Please use ProductsDbm.getInstance().extractPrimaryKeyMapString(entity); + */ + public String extractPrimaryKeyMapString() { + return getDBMeta().extractPrimaryKeyMapString(this); + } + + /** + * Extract primary-key map-string. + * + * @param startBrace Start-brace. (NotNull) + * @param endBrace End-brace. (NotNull) + * @param delimiter Delimiter. (NotNull) + * @param equal Equal. (NotNull) + * @return Primary-key map-string. (NotNull) + * @deprecated Please use ProductsDbm.getInstance().extractPrimaryKeyMapString(entity, startBrace, endBrace, delimiter, equal); + */ + public String extractPrimaryKeyMapString(String startBrace, String endBrace, String delimiter, String equal) { + return getDBMeta().extractPrimaryKeyMapString(this, startBrace, endBrace, delimiter, equal); + } + + /** + * This method implements the method that is declared at super. + * + * @return Column-value map-string. (NotNull) + * @deprecated Please use ProductsDbm.getInstance().extractColumnValueMapString(entity); + */ + public String extractColumnValueMapString() { + return getDBMeta().extractColumnValueMapString(this); + } + + /** + * Extract column-value map-string. + * + * @param startBrace Start-brace. (NotNull) + * @param endBrace End-brace. (NotNull) + * @param delimiter Delimiter. (NotNull) + * @param equal Equal. (NotNull) + * @return Column-value map-string. (NotNull) + * @deprecated Please use ProductsDbm.getInstance().extractColumnValueMapString(entity, startBrace, endBrace, delimiter, equal); + */ + public String extractColumnValueMapString(String startBrace, String endBrace, String delimiter, String equal) { + return getDBMeta().extractColumnValueMapString(this, startBrace, endBrace, delimiter, equal); + } + + + // =================================================================================== + // Determination + // ============= + /** + * This method implements the method that is declared at super. + * + * @return Determination. + */ + public boolean hasPrimaryKeyValue() { + + if (_productsId == null) { + return false; + } + + return true; + } + + // =================================================================================== + // Modified Properties + // =================== + /** + * Get modified property names. (S2Dao uses this for updateModifiedProperties()) + * + * @return Modified property names. (NotNull) + */ + public java.util.Set getModifiedPropertyNames() { + return _modifiedProperties.getPropertyNames(); + } + + /** + * New entity modified properties. You can override this at the sub-class if you need it. + * + * @return Entity modified properties. (NotNull) + */ + protected EntityModifiedProperties newEntityModifiedProperties() { + return new EntityModifiedProperties(); + } + + /** + * Clear modified property names. + */ + public void clearModifiedPropertyNames() { + _modifiedProperties.clear(); + } + + // =================================================================================== + // Basic Override + // ============== + + /** + * This method overrides the method that is declared at super. + * If the primary-key of the other is same as this one, returns true. + * + * @param other Other entity. + * @return Comparing result. + */ + public boolean equals(Object other) { + if (other == null) { + return false; + } + if (!(other instanceof BsProducts)) { + return false; + } + final BsProducts otherEntity = (BsProducts)other; + + if (getProductsId() == null || !getProductsId().equals(otherEntity.getProductsId())) { + return false; + } + + return true; + } + + /** + * This method overrides the method that is declared at super. + * Calculates hash-code from primary-key. + * + * @return Hash-code from primary-keys. + */ + public int hashCode() { + int result = 0; + + if (this.getProductsId() != null) { + result = result + getProductsId().hashCode(); + } + + return result; + } + + /** + * This method overrides the method that is declared at super. + * + * @return Column-value map-string. (NotNull) + */ + public String toString() { + final String delimiter = ","; + final StringBuffer sb = new StringBuffer(); + + sb.append(delimiter).append(getProductsId()); + sb.append(delimiter).append(getProductsQuantity()); + sb.append(delimiter).append(getProductsModel()); + sb.append(delimiter).append(getProductsImage()); + sb.append(delimiter).append(getProductsPrice()); + sb.append(delimiter).append(getProductsDateAdded()); + sb.append(delimiter).append(getProductsLastModified()); + sb.append(delimiter).append(getProductsDateAvailable()); + sb.append(delimiter).append(getProductsWeight()); + sb.append(delimiter).append(getProductsStatus()); + sb.append(delimiter).append(getProductsTaxClassId()); + sb.append(delimiter).append(getManufacturersId()); + sb.append(delimiter).append(getProductsOrdered()); + + sb.delete(0, delimiter.length()); + sb.insert(0, "{").append("}"); + return sb.toString(); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/BsProductsAttributes.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/BsProductsAttributes.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/BsProductsAttributes.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,500 @@ +package jp.sf.pal.pompei.bsentity; + + +import jp.sf.pal.pompei.allcommon.Entity; +import jp.sf.pal.pompei.allcommon.dbmeta.DBMeta; +import jp.sf.pal.pompei.allcommon.dbmeta.DBMetaInstanceHandler; + +/** + * The entity of PRODUCTS_ATTRIBUTES. + * + *
+ * [primary-key]
+ *     PRODUCTS_ATTRIBUTES_ID
+ * 
+ * [column-property]
+ *     PRODUCTS_ATTRIBUTES_ID, PRODUCTS_ID, OPTIONS_ID, OPTIONS_VALUES_ID, OPTIONS_VALUES_PRICE, PRICE_PREFIX
+ * 
+ * [foreign-property]
+ *     
+ * 
+ * [refferer-property]
+ *     
+ * 
+ * [sequence]
+ *     
+ * 
+ * [identity]
+ *     
+ * 
+ * [update-date]
+ *     
+ * 
+ * [version-no]
+ *     
+ * 
+ * 
+ * + * @author DBFlute(AutoGenerator) + */ +public abstract class BsProductsAttributes implements Entity, java.io.Serializable { + + /** Serial version UID. (Default) */ + private static final long serialVersionUID = 1L; + + /** TABLE-Annotation for S2Dao */ + public static final String TABLE = "PRODUCTS_ATTRIBUTES"; + + + // =================================================================================== + // Attribute + // ========= + /** Entity modified properties. (for S2Dao) */ + protected EntityModifiedProperties _modifiedProperties = newEntityModifiedProperties(); + + + /** The value of productsAttributesId. ColumnDefinition -- PK : INTEGER : NotNull*/ + protected java.math.BigDecimal _productsAttributesId; + + /** The value of productsId. ColumnDefinition -- INTEGER : NotNull*/ + protected java.math.BigDecimal _productsId; + + /** The value of optionsId. ColumnDefinition -- INTEGER : NotNull*/ + protected java.math.BigDecimal _optionsId; + + /** The value of optionsValuesId. ColumnDefinition -- INTEGER : NotNull*/ + protected java.math.BigDecimal _optionsValuesId; + + /** The value of optionsValuesPrice. ColumnDefinition -- DECIMAL(15) : NotNull*/ + protected java.math.BigDecimal _optionsValuesPrice; + + /** The value of pricePrefix. ColumnDefinition -- CHAR(1) : NotNull*/ + protected String _pricePrefix; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + public BsProductsAttributes() { + } + + + // =================================================================================== + // DBMeta + // ====== + /** + * This method implements the method that is declared at super. + * + * @return DBMeta. (NotNull) + */ + public DBMeta getDBMeta() { + return DBMetaInstanceHandler.getInstanceByTableDbName(getTableDbName()); + } + + // =================================================================================== + // Table Name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + public String getTableDbName() { + return "PRODUCTS_ATTRIBUTES"; + } + + /** + * This method implements the method that is declared at super. + * + * @return Table cap-prop-name. (NotNull) + */ + public String getTableCapPropName() { + return "ProductsAttributes"; + } + + /** + * This method implements the method that is declared at super. + * + * @return Table uncap-prop-name. (NotNull) + */ + public String getTableUncapPropName() { + return "productsAttributes"; + } + + // =================================================================================== + // Accessor + // ======== + + /** Column-Annotation for S2Dao. ColumnDefinition -- PK : INTEGER : NotNull*/ + public static final String productsAttributesId_COLUMN = "PRODUCTS_ATTRIBUTES_ID"; + + /** + * Get the value of productsAttributesId.
+ * {PK : INTEGER : NotNull} + * + * @return The value of productsAttributesId. (Nullable) + */ + public java.math.BigDecimal getProductsAttributesId() { + return _productsAttributesId; + } + + /** + * Set the value of productsAttributesId.
+ * {PK : INTEGER : NotNull} + * + * @param productsAttributesId The value of productsAttributesId. (Nullable) + */ + public void setProductsAttributesId(java.math.BigDecimal productsAttributesId) { + _modifiedProperties.addPropertyName("productsAttributesId"); + _productsAttributesId = productsAttributesId; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- INTEGER : NotNull*/ + public static final String productsId_COLUMN = "PRODUCTS_ID"; + + /** + * Get the value of productsId.
+ * {INTEGER : NotNull} + * + * @return The value of productsId. (Nullable) + */ + public java.math.BigDecimal getProductsId() { + return _productsId; + } + + /** + * Set the value of productsId.
+ * {INTEGER : NotNull} + * + * @param productsId The value of productsId. (Nullable) + */ + public void setProductsId(java.math.BigDecimal productsId) { + _modifiedProperties.addPropertyName("productsId"); + _productsId = productsId; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- INTEGER : NotNull*/ + public static final String optionsId_COLUMN = "OPTIONS_ID"; + + /** + * Get the value of optionsId.
+ * {INTEGER : NotNull} + * + * @return The value of optionsId. (Nullable) + */ + public java.math.BigDecimal getOptionsId() { + return _optionsId; + } + + /** + * Set the value of optionsId.
+ * {INTEGER : NotNull} + * + * @param optionsId The value of optionsId. (Nullable) + */ + public void setOptionsId(java.math.BigDecimal optionsId) { + _modifiedProperties.addPropertyName("optionsId"); + _optionsId = optionsId; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- INTEGER : NotNull*/ + public static final String optionsValuesId_COLUMN = "OPTIONS_VALUES_ID"; + + /** + * Get the value of optionsValuesId.
+ * {INTEGER : NotNull} + * + * @return The value of optionsValuesId. (Nullable) + */ + public java.math.BigDecimal getOptionsValuesId() { + return _optionsValuesId; + } + + /** + * Set the value of optionsValuesId.
+ * {INTEGER : NotNull} + * + * @param optionsValuesId The value of optionsValuesId. (Nullable) + */ + public void setOptionsValuesId(java.math.BigDecimal optionsValuesId) { + _modifiedProperties.addPropertyName("optionsValuesId"); + _optionsValuesId = optionsValuesId; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- DECIMAL(15) : NotNull*/ + public static final String optionsValuesPrice_COLUMN = "OPTIONS_VALUES_PRICE"; + + /** + * Get the value of optionsValuesPrice.
+ * {DECIMAL(15) : NotNull} + * + * @return The value of optionsValuesPrice. (Nullable) + */ + public java.math.BigDecimal getOptionsValuesPrice() { + return _optionsValuesPrice; + } + + /** + * Set the value of optionsValuesPrice.
+ * {DECIMAL(15) : NotNull} + * + * @param optionsValuesPrice The value of optionsValuesPrice. (Nullable) + */ + public void setOptionsValuesPrice(java.math.BigDecimal optionsValuesPrice) { + _modifiedProperties.addPropertyName("optionsValuesPrice"); + _optionsValuesPrice = optionsValuesPrice; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- CHAR(1) : NotNull*/ + public static final String pricePrefix_COLUMN = "PRICE_PREFIX"; + + /** + * Get the value of pricePrefix.
+ * {CHAR(1) : NotNull} + * + * @return The value of pricePrefix. (Nullable) + */ + public String getPricePrefix() { + return _pricePrefix; + } + + /** + * Set the value of pricePrefix.
+ * {CHAR(1) : NotNull} + * + * @param pricePrefix The value of pricePrefix. (Nullable) + */ + public void setPricePrefix(String pricePrefix) { + _modifiedProperties.addPropertyName("pricePrefix"); + _pricePrefix = pricePrefix; + } + + + // =================================================================================== + // Classify Method + // =============== + + // =================================================================================== + // Classification Determination + // ============================ + + + // =================================================================================== + // Classification Getter + // ===================== + + + // =================================================================================== + // Foreign Table + // ============= + + // =================================================================================== + // Refferer Table + // ============== + + // =================================================================================== + // Accept + // ====== + /** + * This method implements the method that is declared at super. + * + * @param primaryKeyMap Primary key map. (NotNull and NotEmpty) + * @deprecated Please use ProductsAttributesDbm.getInstance().acceptPrimaryKeyMap(entity, primaryKeyMap); + */ + public void acceptPrimaryKeyMap(java.util.Map primaryKeyMap) { + getDBMeta().acceptPrimaryKeyMap(this, primaryKeyMap); + } + + /** + * This method implements the method that is declared at super. + * + * @param primaryKeyMapString Primary-key map-string. (NotNull and NotEmpty) + * @deprecated Please use ProductsAttributesDbm.getInstance().acceptPrimaryKeyMapString(entity, primaryKeyMapString); + */ + public void acceptPrimaryKeyMapString(String primaryKeyMapString) { + getDBMeta().acceptPrimaryKeyMapString(this, primaryKeyMapString); + } + + /** + * This method implements the method that is declared at super. + * + * @param columnValueMap Column-value map. (NotNull and NotEmpty) + * @deprecated Please use ProductsAttributesDbm.getInstance().acceptColumnValueMap(entity, columnValueMap); + */ + public void acceptColumnValueMap(java.util.Map columnValueMap) { + getDBMeta().acceptColumnValueMap(this, columnValueMap); + } + + /** + * This method implements the method that is declared at super. + * + * @param columnValueMapString Column-value map-string. (NotNull and NotEmpty) + * @deprecated Please use ProductsAttributesDbm.getInstance().acceptColumnValueMap(entity, columnValueMapString); + */ + public void acceptColumnValueMapString(String columnValueMapString) { + getDBMeta().acceptColumnValueMapString(this, columnValueMapString); + } + + // =================================================================================== + // Extract + // ======= + /** + * This method implements the method that is declared at super. + * + * @return Primary-key map-string. (NotNull) + * @deprecated Please use ProductsAttributesDbm.getInstance().extractPrimaryKeyMapString(entity); + */ + public String extractPrimaryKeyMapString() { + return getDBMeta().extractPrimaryKeyMapString(this); + } + + /** + * Extract primary-key map-string. + * + * @param startBrace Start-brace. (NotNull) + * @param endBrace End-brace. (NotNull) + * @param delimiter Delimiter. (NotNull) + * @param equal Equal. (NotNull) + * @return Primary-key map-string. (NotNull) + * @deprecated Please use ProductsAttributesDbm.getInstance().extractPrimaryKeyMapString(entity, startBrace, endBrace, delimiter, equal); + */ + public String extractPrimaryKeyMapString(String startBrace, String endBrace, String delimiter, String equal) { + return getDBMeta().extractPrimaryKeyMapString(this, startBrace, endBrace, delimiter, equal); + } + + /** + * This method implements the method that is declared at super. + * + * @return Column-value map-string. (NotNull) + * @deprecated Please use ProductsAttributesDbm.getInstance().extractColumnValueMapString(entity); + */ + public String extractColumnValueMapString() { + return getDBMeta().extractColumnValueMapString(this); + } + + /** + * Extract column-value map-string. + * + * @param startBrace Start-brace. (NotNull) + * @param endBrace End-brace. (NotNull) + * @param delimiter Delimiter. (NotNull) + * @param equal Equal. (NotNull) + * @return Column-value map-string. (NotNull) + * @deprecated Please use ProductsAttributesDbm.getInstance().extractColumnValueMapString(entity, startBrace, endBrace, delimiter, equal); + */ + public String extractColumnValueMapString(String startBrace, String endBrace, String delimiter, String equal) { + return getDBMeta().extractColumnValueMapString(this, startBrace, endBrace, delimiter, equal); + } + + + // =================================================================================== + // Determination + // ============= + /** + * This method implements the method that is declared at super. + * + * @return Determination. + */ + public boolean hasPrimaryKeyValue() { + + if (_productsAttributesId == null) { + return false; + } + + return true; + } + + // =================================================================================== + // Modified Properties + // =================== + /** + * Get modified property names. (S2Dao uses this for updateModifiedProperties()) + * + * @return Modified property names. (NotNull) + */ + public java.util.Set getModifiedPropertyNames() { + return _modifiedProperties.getPropertyNames(); + } + + /** + * New entity modified properties. You can override this at the sub-class if you need it. + * + * @return Entity modified properties. (NotNull) + */ + protected EntityModifiedProperties newEntityModifiedProperties() { + return new EntityModifiedProperties(); + } + + /** + * Clear modified property names. + */ + public void clearModifiedPropertyNames() { + _modifiedProperties.clear(); + } + + // =================================================================================== + // Basic Override + // ============== + + /** + * This method overrides the method that is declared at super. + * If the primary-key of the other is same as this one, returns true. + * + * @param other Other entity. + * @return Comparing result. + */ + public boolean equals(Object other) { + if (other == null) { + return false; + } + if (!(other instanceof BsProductsAttributes)) { + return false; + } + final BsProductsAttributes otherEntity = (BsProductsAttributes)other; + + if (getProductsAttributesId() == null || !getProductsAttributesId().equals(otherEntity.getProductsAttributesId())) { + return false; + } + + return true; + } + + /** + * This method overrides the method that is declared at super. + * Calculates hash-code from primary-key. + * + * @return Hash-code from primary-keys. + */ + public int hashCode() { + int result = 0; + + if (this.getProductsAttributesId() != null) { + result = result + getProductsAttributesId().hashCode(); + } + + return result; + } + + /** + * This method overrides the method that is declared at super. + * + * @return Column-value map-string. (NotNull) + */ + public String toString() { + final String delimiter = ","; + final StringBuffer sb = new StringBuffer(); + + sb.append(delimiter).append(getProductsAttributesId()); + sb.append(delimiter).append(getProductsId()); + sb.append(delimiter).append(getOptionsId()); + sb.append(delimiter).append(getOptionsValuesId()); + sb.append(delimiter).append(getOptionsValuesPrice()); + sb.append(delimiter).append(getPricePrefix()); + + sb.delete(0, delimiter.length()); + sb.insert(0, "{").append("}"); + return sb.toString(); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/BsProductsAttributesDownload.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/BsProductsAttributesDownload.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/BsProductsAttributesDownload.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,444 @@ +package jp.sf.pal.pompei.bsentity; + + +import jp.sf.pal.pompei.allcommon.Entity; +import jp.sf.pal.pompei.allcommon.dbmeta.DBMeta; +import jp.sf.pal.pompei.allcommon.dbmeta.DBMetaInstanceHandler; + +/** + * The entity of PRODUCTS_ATTRIBUTES_DOWNLOAD. + * + *
+ * [primary-key]
+ *     PRODUCTS_ATTRIBUTES_ID
+ * 
+ * [column-property]
+ *     PRODUCTS_ATTRIBUTES_ID, PRODUCTS_ATTRIBUTES_FILENAME, PRODUCTS_ATTRIBUTES_MAXDAYS, PRODUCTS_ATTRIBUTES_MAXCOUNT
+ * 
+ * [foreign-property]
+ *     
+ * 
+ * [refferer-property]
+ *     
+ * 
+ * [sequence]
+ *     
+ * 
+ * [identity]
+ *     
+ * 
+ * [update-date]
+ *     
+ * 
+ * [version-no]
+ *     
+ * 
+ * 
+ * + * @author DBFlute(AutoGenerator) + */ +public abstract class BsProductsAttributesDownload implements Entity, java.io.Serializable { + + /** Serial version UID. (Default) */ + private static final long serialVersionUID = 1L; + + /** TABLE-Annotation for S2Dao */ + public static final String TABLE = "PRODUCTS_ATTRIBUTES_DOWNLOAD"; + + + // =================================================================================== + // Attribute + // ========= + /** Entity modified properties. (for S2Dao) */ + protected EntityModifiedProperties _modifiedProperties = newEntityModifiedProperties(); + + + /** The value of productsAttributesId. ColumnDefinition -- PK : INTEGER : NotNull*/ + protected java.math.BigDecimal _productsAttributesId; + + /** The value of productsAttributesFilename. ColumnDefinition -- VARCHAR(255) : NotNull : Default=[]*/ + protected String _productsAttributesFilename; + + /** The value of productsAttributesMaxdays. ColumnDefinition -- INTEGER : Default=[0]*/ + protected java.math.BigDecimal _productsAttributesMaxdays; + + /** The value of productsAttributesMaxcount. ColumnDefinition -- INTEGER : Default=[0]*/ + protected java.math.BigDecimal _productsAttributesMaxcount; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + public BsProductsAttributesDownload() { + } + + + // =================================================================================== + // DBMeta + // ====== + /** + * This method implements the method that is declared at super. + * + * @return DBMeta. (NotNull) + */ + public DBMeta getDBMeta() { + return DBMetaInstanceHandler.getInstanceByTableDbName(getTableDbName()); + } + + // =================================================================================== + // Table Name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + public String getTableDbName() { + return "PRODUCTS_ATTRIBUTES_DOWNLOAD"; + } + + /** + * This method implements the method that is declared at super. + * + * @return Table cap-prop-name. (NotNull) + */ + public String getTableCapPropName() { + return "ProductsAttributesDownload"; + } + + /** + * This method implements the method that is declared at super. + * + * @return Table uncap-prop-name. (NotNull) + */ + public String getTableUncapPropName() { + return "productsAttributesDownload"; + } + + // =================================================================================== + // Accessor + // ======== + + /** Column-Annotation for S2Dao. ColumnDefinition -- PK : INTEGER : NotNull*/ + public static final String productsAttributesId_COLUMN = "PRODUCTS_ATTRIBUTES_ID"; + + /** + * Get the value of productsAttributesId.
+ * {PK : INTEGER : NotNull} + * + * @return The value of productsAttributesId. (Nullable) + */ + public java.math.BigDecimal getProductsAttributesId() { + return _productsAttributesId; + } + + /** + * Set the value of productsAttributesId.
+ * {PK : INTEGER : NotNull} + * + * @param productsAttributesId The value of productsAttributesId. (Nullable) + */ + public void setProductsAttributesId(java.math.BigDecimal productsAttributesId) { + _modifiedProperties.addPropertyName("productsAttributesId"); + _productsAttributesId = productsAttributesId; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- VARCHAR(255) : NotNull : Default=[]*/ + public static final String productsAttributesFilename_COLUMN = "PRODUCTS_ATTRIBUTES_FILENAME"; + + /** + * Get the value of productsAttributesFilename.
+ * {VARCHAR(255) : NotNull : Default=[]} + * + * @return The value of productsAttributesFilename. (Nullable) + */ + public String getProductsAttributesFilename() { + return _productsAttributesFilename; + } + + /** + * Set the value of productsAttributesFilename.
+ * {VARCHAR(255) : NotNull : Default=[]} + * + * @param productsAttributesFilename The value of productsAttributesFilename. (Nullable) + */ + public void setProductsAttributesFilename(String productsAttributesFilename) { + _modifiedProperties.addPropertyName("productsAttributesFilename"); + _productsAttributesFilename = productsAttributesFilename; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- INTEGER : Default=[0]*/ + public static final String productsAttributesMaxdays_COLUMN = "PRODUCTS_ATTRIBUTES_MAXDAYS"; + + /** + * Get the value of productsAttributesMaxdays.
+ * {INTEGER : Default=[0]} + * + * @return The value of productsAttributesMaxdays. (Nullable) + */ + public java.math.BigDecimal getProductsAttributesMaxdays() { + return _productsAttributesMaxdays; + } + + /** + * Set the value of productsAttributesMaxdays.
+ * {INTEGER : Default=[0]} + * + * @param productsAttributesMaxdays The value of productsAttributesMaxdays. (Nullable) + */ + public void setProductsAttributesMaxdays(java.math.BigDecimal productsAttributesMaxdays) { + _modifiedProperties.addPropertyName("productsAttributesMaxdays"); + _productsAttributesMaxdays = productsAttributesMaxdays; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- INTEGER : Default=[0]*/ + public static final String productsAttributesMaxcount_COLUMN = "PRODUCTS_ATTRIBUTES_MAXCOUNT"; + + /** + * Get the value of productsAttributesMaxcount.
+ * {INTEGER : Default=[0]} + * + * @return The value of productsAttributesMaxcount. (Nullable) + */ + public java.math.BigDecimal getProductsAttributesMaxcount() { + return _productsAttributesMaxcount; + } + + /** + * Set the value of productsAttributesMaxcount.
+ * {INTEGER : Default=[0]} + * + * @param productsAttributesMaxcount The value of productsAttributesMaxcount. (Nullable) + */ + public void setProductsAttributesMaxcount(java.math.BigDecimal productsAttributesMaxcount) { + _modifiedProperties.addPropertyName("productsAttributesMaxcount"); + _productsAttributesMaxcount = productsAttributesMaxcount; + } + + + // =================================================================================== + // Classify Method + // =============== + + // =================================================================================== + // Classification Determination + // ============================ + + + // =================================================================================== + // Classification Getter + // ===================== + + + // =================================================================================== + // Foreign Table + // ============= + + // =================================================================================== + // Refferer Table + // ============== + + // =================================================================================== + // Accept + // ====== + /** + * This method implements the method that is declared at super. + * + * @param primaryKeyMap Primary key map. (NotNull and NotEmpty) + * @deprecated Please use ProductsAttributesDownloadDbm.getInstance().acceptPrimaryKeyMap(entity, primaryKeyMap); + */ + public void acceptPrimaryKeyMap(java.util.Map primaryKeyMap) { + getDBMeta().acceptPrimaryKeyMap(this, primaryKeyMap); + } + + /** + * This method implements the method that is declared at super. + * + * @param primaryKeyMapString Primary-key map-string. (NotNull and NotEmpty) + * @deprecated Please use ProductsAttributesDownloadDbm.getInstance().acceptPrimaryKeyMapString(entity, primaryKeyMapString); + */ + public void acceptPrimaryKeyMapString(String primaryKeyMapString) { + getDBMeta().acceptPrimaryKeyMapString(this, primaryKeyMapString); + } + + /** + * This method implements the method that is declared at super. + * + * @param columnValueMap Column-value map. (NotNull and NotEmpty) + * @deprecated Please use ProductsAttributesDownloadDbm.getInstance().acceptColumnValueMap(entity, columnValueMap); + */ + public void acceptColumnValueMap(java.util.Map columnValueMap) { + getDBMeta().acceptColumnValueMap(this, columnValueMap); + } + + /** + * This method implements the method that is declared at super. + * + * @param columnValueMapString Column-value map-string. (NotNull and NotEmpty) + * @deprecated Please use ProductsAttributesDownloadDbm.getInstance().acceptColumnValueMap(entity, columnValueMapString); + */ + public void acceptColumnValueMapString(String columnValueMapString) { + getDBMeta().acceptColumnValueMapString(this, columnValueMapString); + } + + // =================================================================================== + // Extract + // ======= + /** + * This method implements the method that is declared at super. + * + * @return Primary-key map-string. (NotNull) + * @deprecated Please use ProductsAttributesDownloadDbm.getInstance().extractPrimaryKeyMapString(entity); + */ + public String extractPrimaryKeyMapString() { + return getDBMeta().extractPrimaryKeyMapString(this); + } + + /** + * Extract primary-key map-string. + * + * @param startBrace Start-brace. (NotNull) + * @param endBrace End-brace. (NotNull) + * @param delimiter Delimiter. (NotNull) + * @param equal Equal. (NotNull) + * @return Primary-key map-string. (NotNull) + * @deprecated Please use ProductsAttributesDownloadDbm.getInstance().extractPrimaryKeyMapString(entity, startBrace, endBrace, delimiter, equal); + */ + public String extractPrimaryKeyMapString(String startBrace, String endBrace, String delimiter, String equal) { + return getDBMeta().extractPrimaryKeyMapString(this, startBrace, endBrace, delimiter, equal); + } + + /** + * This method implements the method that is declared at super. + * + * @return Column-value map-string. (NotNull) + * @deprecated Please use ProductsAttributesDownloadDbm.getInstance().extractColumnValueMapString(entity); + */ + public String extractColumnValueMapString() { + return getDBMeta().extractColumnValueMapString(this); + } + + /** + * Extract column-value map-string. + * + * @param startBrace Start-brace. (NotNull) + * @param endBrace End-brace. (NotNull) + * @param delimiter Delimiter. (NotNull) + * @param equal Equal. (NotNull) + * @return Column-value map-string. (NotNull) + * @deprecated Please use ProductsAttributesDownloadDbm.getInstance().extractColumnValueMapString(entity, startBrace, endBrace, delimiter, equal); + */ + public String extractColumnValueMapString(String startBrace, String endBrace, String delimiter, String equal) { + return getDBMeta().extractColumnValueMapString(this, startBrace, endBrace, delimiter, equal); + } + + + // =================================================================================== + // Determination + // ============= + /** + * This method implements the method that is declared at super. + * + * @return Determination. + */ + public boolean hasPrimaryKeyValue() { + + if (_productsAttributesId == null) { + return false; + } + + return true; + } + + // =================================================================================== + // Modified Properties + // =================== + /** + * Get modified property names. (S2Dao uses this for updateModifiedProperties()) + * + * @return Modified property names. (NotNull) + */ + public java.util.Set getModifiedPropertyNames() { + return _modifiedProperties.getPropertyNames(); + } + + /** + * New entity modified properties. You can override this at the sub-class if you need it. + * + * @return Entity modified properties. (NotNull) + */ + protected EntityModifiedProperties newEntityModifiedProperties() { + return new EntityModifiedProperties(); + } + + /** + * Clear modified property names. + */ + public void clearModifiedPropertyNames() { + _modifiedProperties.clear(); + } + + // =================================================================================== + // Basic Override + // ============== + + /** + * This method overrides the method that is declared at super. + * If the primary-key of the other is same as this one, returns true. + * + * @param other Other entity. + * @return Comparing result. + */ + public boolean equals(Object other) { + if (other == null) { + return false; + } + if (!(other instanceof BsProductsAttributesDownload)) { + return false; + } + final BsProductsAttributesDownload otherEntity = (BsProductsAttributesDownload)other; + + if (getProductsAttributesId() == null || !getProductsAttributesId().equals(otherEntity.getProductsAttributesId())) { + return false; + } + + return true; + } + + /** + * This method overrides the method that is declared at super. + * Calculates hash-code from primary-key. + * + * @return Hash-code from primary-keys. + */ + public int hashCode() { + int result = 0; + + if (this.getProductsAttributesId() != null) { + result = result + getProductsAttributesId().hashCode(); + } + + return result; + } + + /** + * This method overrides the method that is declared at super. + * + * @return Column-value map-string. (NotNull) + */ + public String toString() { + final String delimiter = ","; + final StringBuffer sb = new StringBuffer(); + + sb.append(delimiter).append(getProductsAttributesId()); + sb.append(delimiter).append(getProductsAttributesFilename()); + sb.append(delimiter).append(getProductsAttributesMaxdays()); + sb.append(delimiter).append(getProductsAttributesMaxcount()); + + sb.delete(0, delimiter.length()); + sb.insert(0, "{").append("}"); + return sb.toString(); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/BsProductsDescription.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/BsProductsDescription.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/BsProductsDescription.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,509 @@ +package jp.sf.pal.pompei.bsentity; + + +import jp.sf.pal.pompei.allcommon.Entity; +import jp.sf.pal.pompei.allcommon.dbmeta.DBMeta; +import jp.sf.pal.pompei.allcommon.dbmeta.DBMetaInstanceHandler; + +/** + * The entity of PRODUCTS_DESCRIPTION. + * + *
+ * [primary-key]
+ *     PRODUCTS_ID, LANGUAGE_ID
+ * 
+ * [column-property]
+ *     PRODUCTS_ID, LANGUAGE_ID, PRODUCTS_NAME, PRODUCTS_DESCRIPTION, PRODUCTS_URL, PRODUCTS_VIEWED
+ * 
+ * [foreign-property]
+ *     
+ * 
+ * [refferer-property]
+ *     
+ * 
+ * [sequence]
+ *     
+ * 
+ * [identity]
+ *     
+ * 
+ * [update-date]
+ *     
+ * 
+ * [version-no]
+ *     
+ * 
+ * 
+ * + * @author DBFlute(AutoGenerator) + */ +public abstract class BsProductsDescription implements Entity, java.io.Serializable { + + /** Serial version UID. (Default) */ + private static final long serialVersionUID = 1L; + + /** TABLE-Annotation for S2Dao */ + public static final String TABLE = "PRODUCTS_DESCRIPTION"; + + + // =================================================================================== + // Attribute + // ========= + /** Entity modified properties. (for S2Dao) */ + protected EntityModifiedProperties _modifiedProperties = newEntityModifiedProperties(); + + + /** The value of productsId. ColumnDefinition -- PK : INTEGER : NotNull*/ + protected java.math.BigDecimal _productsId; + + /** The value of languageId. ColumnDefinition -- PK : INTEGER : NotNull : Default=[1]*/ + protected java.math.BigDecimal _languageId; + + /** The value of productsName. ColumnDefinition -- VARCHAR(64) : NotNull : Default=[]*/ + protected String _productsName; + + /** The value of productsDescription. ColumnDefinition -- LONG VARCHAR(32700)*/ + protected String _productsDescription; + + /** The value of productsUrl. ColumnDefinition -- VARCHAR(255)*/ + protected String _productsUrl; + + /** The value of productsViewed. ColumnDefinition -- INTEGER : Default=[0]*/ + protected java.math.BigDecimal _productsViewed; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + public BsProductsDescription() { + } + + + // =================================================================================== + // DBMeta + // ====== + /** + * This method implements the method that is declared at super. + * + * @return DBMeta. (NotNull) + */ + public DBMeta getDBMeta() { + return DBMetaInstanceHandler.getInstanceByTableDbName(getTableDbName()); + } + + // =================================================================================== + // Table Name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + public String getTableDbName() { + return "PRODUCTS_DESCRIPTION"; + } + + /** + * This method implements the method that is declared at super. + * + * @return Table cap-prop-name. (NotNull) + */ + public String getTableCapPropName() { + return "ProductsDescription"; + } + + /** + * This method implements the method that is declared at super. + * + * @return Table uncap-prop-name. (NotNull) + */ + public String getTableUncapPropName() { + return "productsDescription"; + } + + // =================================================================================== + // Accessor + // ======== + + /** Column-Annotation for S2Dao. ColumnDefinition -- PK : INTEGER : NotNull*/ + public static final String productsId_COLUMN = "PRODUCTS_ID"; + + /** + * Get the value of productsId.
+ * {PK : INTEGER : NotNull} + * + * @return The value of productsId. (Nullable) + */ + public java.math.BigDecimal getProductsId() { + return _productsId; + } + + /** + * Set the value of productsId.
+ * {PK : INTEGER : NotNull} + * + * @param productsId The value of productsId. (Nullable) + */ + public void setProductsId(java.math.BigDecimal productsId) { + _modifiedProperties.addPropertyName("productsId"); + _productsId = productsId; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- PK : INTEGER : NotNull : Default=[1]*/ + public static final String languageId_COLUMN = "LANGUAGE_ID"; + + /** + * Get the value of languageId.
+ * {PK : INTEGER : NotNull : Default=[1]} + * + * @return The value of languageId. (Nullable) + */ + public java.math.BigDecimal getLanguageId() { + return _languageId; + } + + /** + * Set the value of languageId.
+ * {PK : INTEGER : NotNull : Default=[1]} + * + * @param languageId The value of languageId. (Nullable) + */ + public void setLanguageId(java.math.BigDecimal languageId) { + _modifiedProperties.addPropertyName("languageId"); + _languageId = languageId; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- VARCHAR(64) : NotNull : Default=[]*/ + public static final String productsName_COLUMN = "PRODUCTS_NAME"; + + /** + * Get the value of productsName.
+ * {VARCHAR(64) : NotNull : Default=[]} + * + * @return The value of productsName. (Nullable) + */ + public String getProductsName() { + return _productsName; + } + + /** + * Set the value of productsName.
+ * {VARCHAR(64) : NotNull : Default=[]} + * + * @param productsName The value of productsName. (Nullable) + */ + public void setProductsName(String productsName) { + _modifiedProperties.addPropertyName("productsName"); + _productsName = productsName; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- LONG VARCHAR(32700)*/ + public static final String productsDescription_COLUMN = "PRODUCTS_DESCRIPTION"; + + /** + * Get the value of productsDescription.
+ * {LONG VARCHAR(32700)} + * + * @return The value of productsDescription. (Nullable) + */ + public String getProductsDescription() { + return _productsDescription; + } + + /** + * Set the value of productsDescription.
+ * {LONG VARCHAR(32700)} + * + * @param productsDescription The value of productsDescription. (Nullable) + */ + public void setProductsDescription(String productsDescription) { + _modifiedProperties.addPropertyName("productsDescription"); + _productsDescription = productsDescription; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- VARCHAR(255)*/ + public static final String productsUrl_COLUMN = "PRODUCTS_URL"; + + /** + * Get the value of productsUrl.
+ * {VARCHAR(255)} + * + * @return The value of productsUrl. (Nullable) + */ + public String getProductsUrl() { + return _productsUrl; + } + + /** + * Set the value of productsUrl.
+ * {VARCHAR(255)} + * + * @param productsUrl The value of productsUrl. (Nullable) + */ + public void setProductsUrl(String productsUrl) { + _modifiedProperties.addPropertyName("productsUrl"); + _productsUrl = productsUrl; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- INTEGER : Default=[0]*/ + public static final String productsViewed_COLUMN = "PRODUCTS_VIEWED"; + + /** + * Get the value of productsViewed.
+ * {INTEGER : Default=[0]} + * + * @return The value of productsViewed. (Nullable) + */ + public java.math.BigDecimal getProductsViewed() { + return _productsViewed; + } + + /** + * Set the value of productsViewed.
+ * {INTEGER : Default=[0]} + * + * @param productsViewed The value of productsViewed. (Nullable) + */ + public void setProductsViewed(java.math.BigDecimal productsViewed) { + _modifiedProperties.addPropertyName("productsViewed"); + _productsViewed = productsViewed; + } + + + // =================================================================================== + // Classify Method + // =============== + + // =================================================================================== + // Classification Determination + // ============================ + + + // =================================================================================== + // Classification Getter + // ===================== + + + // =================================================================================== + // Foreign Table + // ============= + + // =================================================================================== + // Refferer Table + // ============== + + // =================================================================================== + // Accept + // ====== + /** + * This method implements the method that is declared at super. + * + * @param primaryKeyMap Primary key map. (NotNull and NotEmpty) + * @deprecated Please use ProductsDescriptionDbm.getInstance().acceptPrimaryKeyMap(entity, primaryKeyMap); + */ + public void acceptPrimaryKeyMap(java.util.Map primaryKeyMap) { + getDBMeta().acceptPrimaryKeyMap(this, primaryKeyMap); + } + + /** + * This method implements the method that is declared at super. + * + * @param primaryKeyMapString Primary-key map-string. (NotNull and NotEmpty) + * @deprecated Please use ProductsDescriptionDbm.getInstance().acceptPrimaryKeyMapString(entity, primaryKeyMapString); + */ + public void acceptPrimaryKeyMapString(String primaryKeyMapString) { + getDBMeta().acceptPrimaryKeyMapString(this, primaryKeyMapString); + } + + /** + * This method implements the method that is declared at super. + * + * @param columnValueMap Column-value map. (NotNull and NotEmpty) + * @deprecated Please use ProductsDescriptionDbm.getInstance().acceptColumnValueMap(entity, columnValueMap); + */ + public void acceptColumnValueMap(java.util.Map columnValueMap) { + getDBMeta().acceptColumnValueMap(this, columnValueMap); + } + + /** + * This method implements the method that is declared at super. + * + * @param columnValueMapString Column-value map-string. (NotNull and NotEmpty) + * @deprecated Please use ProductsDescriptionDbm.getInstance().acceptColumnValueMap(entity, columnValueMapString); + */ + public void acceptColumnValueMapString(String columnValueMapString) { + getDBMeta().acceptColumnValueMapString(this, columnValueMapString); + } + + // =================================================================================== + // Extract + // ======= + /** + * This method implements the method that is declared at super. + * + * @return Primary-key map-string. (NotNull) + * @deprecated Please use ProductsDescriptionDbm.getInstance().extractPrimaryKeyMapString(entity); + */ + public String extractPrimaryKeyMapString() { + return getDBMeta().extractPrimaryKeyMapString(this); + } + + /** + * Extract primary-key map-string. + * + * @param startBrace Start-brace. (NotNull) + * @param endBrace End-brace. (NotNull) + * @param delimiter Delimiter. (NotNull) + * @param equal Equal. (NotNull) + * @return Primary-key map-string. (NotNull) + * @deprecated Please use ProductsDescriptionDbm.getInstance().extractPrimaryKeyMapString(entity, startBrace, endBrace, delimiter, equal); + */ + public String extractPrimaryKeyMapString(String startBrace, String endBrace, String delimiter, String equal) { + return getDBMeta().extractPrimaryKeyMapString(this, startBrace, endBrace, delimiter, equal); + } + + /** + * This method implements the method that is declared at super. + * + * @return Column-value map-string. (NotNull) + * @deprecated Please use ProductsDescriptionDbm.getInstance().extractColumnValueMapString(entity); + */ + public String extractColumnValueMapString() { + return getDBMeta().extractColumnValueMapString(this); + } + + /** + * Extract column-value map-string. + * + * @param startBrace Start-brace. (NotNull) + * @param endBrace End-brace. (NotNull) + * @param delimiter Delimiter. (NotNull) + * @param equal Equal. (NotNull) + * @return Column-value map-string. (NotNull) + * @deprecated Please use ProductsDescriptionDbm.getInstance().extractColumnValueMapString(entity, startBrace, endBrace, delimiter, equal); + */ + public String extractColumnValueMapString(String startBrace, String endBrace, String delimiter, String equal) { + return getDBMeta().extractColumnValueMapString(this, startBrace, endBrace, delimiter, equal); + } + + + // =================================================================================== + // Determination + // ============= + /** + * This method implements the method that is declared at super. + * + * @return Determination. + */ + public boolean hasPrimaryKeyValue() { + + if (_productsId == null) { + return false; + } + if (_languageId == null) { + return false; + } + + return true; + } + + // =================================================================================== + // Modified Properties + // =================== + /** + * Get modified property names. (S2Dao uses this for updateModifiedProperties()) + * + * @return Modified property names. (NotNull) + */ + public java.util.Set getModifiedPropertyNames() { + return _modifiedProperties.getPropertyNames(); + } + + /** + * New entity modified properties. You can override this at the sub-class if you need it. + * + * @return Entity modified properties. (NotNull) + */ + protected EntityModifiedProperties newEntityModifiedProperties() { + return new EntityModifiedProperties(); + } + + /** + * Clear modified property names. + */ + public void clearModifiedPropertyNames() { + _modifiedProperties.clear(); + } + + // =================================================================================== + // Basic Override + // ============== + + /** + * This method overrides the method that is declared at super. + * If the primary-key of the other is same as this one, returns true. + * + * @param other Other entity. + * @return Comparing result. + */ + public boolean equals(Object other) { + if (other == null) { + return false; + } + if (!(other instanceof BsProductsDescription)) { + return false; + } + final BsProductsDescription otherEntity = (BsProductsDescription)other; + + if (getProductsId() == null || !getProductsId().equals(otherEntity.getProductsId())) { + return false; + } + if (getLanguageId() == null || !getLanguageId().equals(otherEntity.getLanguageId())) { + return false; + } + + return true; + } + + /** + * This method overrides the method that is declared at super. + * Calculates hash-code from primary-key. + * + * @return Hash-code from primary-keys. + */ + public int hashCode() { + int result = 0; + + if (this.getProductsId() != null) { + result = result + getProductsId().hashCode(); + } + if (this.getLanguageId() != null) { + result = result + getLanguageId().hashCode(); + } + + return result; + } + + /** + * This method overrides the method that is declared at super. + * + * @return Column-value map-string. (NotNull) + */ + public String toString() { + final String delimiter = ","; + final StringBuffer sb = new StringBuffer(); + + sb.append(delimiter).append(getProductsId()); + sb.append(delimiter).append(getLanguageId()); + sb.append(delimiter).append(getProductsName()); + sb.append(delimiter).append(getProductsDescription()); + sb.append(delimiter).append(getProductsUrl()); + sb.append(delimiter).append(getProductsViewed()); + + sb.delete(0, delimiter.length()); + sb.insert(0, "{").append("}"); + return sb.toString(); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/BsProductsNotifications.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/BsProductsNotifications.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/BsProductsNotifications.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,425 @@ +package jp.sf.pal.pompei.bsentity; + + +import jp.sf.pal.pompei.allcommon.Entity; +import jp.sf.pal.pompei.allcommon.dbmeta.DBMeta; +import jp.sf.pal.pompei.allcommon.dbmeta.DBMetaInstanceHandler; + +/** + * The entity of PRODUCTS_NOTIFICATIONS. + * + *
+ * [primary-key]
+ *     PRODUCTS_ID, CUSTOMERS_ID
+ * 
+ * [column-property]
+ *     PRODUCTS_ID, CUSTOMERS_ID, DATE_ADDED
+ * 
+ * [foreign-property]
+ *     
+ * 
+ * [refferer-property]
+ *     
+ * 
+ * [sequence]
+ *     
+ * 
+ * [identity]
+ *     
+ * 
+ * [update-date]
+ *     
+ * 
+ * [version-no]
+ *     
+ * 
+ * 
+ * + * @author DBFlute(AutoGenerator) + */ +public abstract class BsProductsNotifications implements Entity, java.io.Serializable { + + /** Serial version UID. (Default) */ + private static final long serialVersionUID = 1L; + + /** TABLE-Annotation for S2Dao */ + public static final String TABLE = "PRODUCTS_NOTIFICATIONS"; + + + // =================================================================================== + // Attribute + // ========= + /** Entity modified properties. (for S2Dao) */ + protected EntityModifiedProperties _modifiedProperties = newEntityModifiedProperties(); + + + /** The value of productsId. ColumnDefinition -- PK : INTEGER : NotNull*/ + protected java.math.BigDecimal _productsId; + + /** The value of customersId. ColumnDefinition -- PK : INTEGER : NotNull*/ + protected java.math.BigDecimal _customersId; + + /** The value of dateAdded. ColumnDefinition -- TIMESTAMP : NotNull*/ + protected java.sql.Timestamp _dateAdded; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + public BsProductsNotifications() { + } + + + // =================================================================================== + // DBMeta + // ====== + /** + * This method implements the method that is declared at super. + * + * @return DBMeta. (NotNull) + */ + public DBMeta getDBMeta() { + return DBMetaInstanceHandler.getInstanceByTableDbName(getTableDbName()); + } + + // =================================================================================== + // Table Name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + public String getTableDbName() { + return "PRODUCTS_NOTIFICATIONS"; + } + + /** + * This method implements the method that is declared at super. + * + * @return Table cap-prop-name. (NotNull) + */ + public String getTableCapPropName() { + return "ProductsNotifications"; + } + + /** + * This method implements the method that is declared at super. + * + * @return Table uncap-prop-name. (NotNull) + */ + public String getTableUncapPropName() { + return "productsNotifications"; + } + + // =================================================================================== + // Accessor + // ======== + + /** Column-Annotation for S2Dao. ColumnDefinition -- PK : INTEGER : NotNull*/ + public static final String productsId_COLUMN = "PRODUCTS_ID"; + + /** + * Get the value of productsId.
+ * {PK : INTEGER : NotNull} + * + * @return The value of productsId. (Nullable) + */ + public java.math.BigDecimal getProductsId() { + return _productsId; + } + + /** + * Set the value of productsId.
+ * {PK : INTEGER : NotNull} + * + * @param productsId The value of productsId. (Nullable) + */ + public void setProductsId(java.math.BigDecimal productsId) { + _modifiedProperties.addPropertyName("productsId"); + _productsId = productsId; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- PK : INTEGER : NotNull*/ + public static final String customersId_COLUMN = "CUSTOMERS_ID"; + + /** + * Get the value of customersId.
+ * {PK : INTEGER : NotNull} + * + * @return The value of customersId. (Nullable) + */ + public java.math.BigDecimal getCustomersId() { + return _customersId; + } + + /** + * Set the value of customersId.
+ * {PK : INTEGER : NotNull} + * + * @param customersId The value of customersId. (Nullable) + */ + public void setCustomersId(java.math.BigDecimal customersId) { + _modifiedProperties.addPropertyName("customersId"); + _customersId = customersId; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- TIMESTAMP : NotNull*/ + public static final String dateAdded_COLUMN = "DATE_ADDED"; + + /** + * Get the value of dateAdded.
+ * {TIMESTAMP : NotNull} + * + * @return The value of dateAdded. (Nullable) + */ + public java.sql.Timestamp getDateAdded() { + return _dateAdded; + } + + /** + * Set the value of dateAdded.
+ * {TIMESTAMP : NotNull} + * + * @param dateAdded The value of dateAdded. (Nullable) + */ + public void setDateAdded(java.sql.Timestamp dateAdded) { + _modifiedProperties.addPropertyName("dateAdded"); + _dateAdded = dateAdded; + } + + + // =================================================================================== + // Classify Method + // =============== + + // =================================================================================== + // Classification Determination + // ============================ + + + // =================================================================================== + // Classification Getter + // ===================== + + + // =================================================================================== + // Foreign Table + // ============= + + // =================================================================================== + // Refferer Table + // ============== + + // =================================================================================== + // Accept + // ====== + /** + * This method implements the method that is declared at super. + * + * @param primaryKeyMap Primary key map. (NotNull and NotEmpty) + * @deprecated Please use ProductsNotificationsDbm.getInstance().acceptPrimaryKeyMap(entity, primaryKeyMap); + */ + public void acceptPrimaryKeyMap(java.util.Map primaryKeyMap) { + getDBMeta().acceptPrimaryKeyMap(this, primaryKeyMap); + } + + /** + * This method implements the method that is declared at super. + * + * @param primaryKeyMapString Primary-key map-string. (NotNull and NotEmpty) + * @deprecated Please use ProductsNotificationsDbm.getInstance().acceptPrimaryKeyMapString(entity, primaryKeyMapString); + */ + public void acceptPrimaryKeyMapString(String primaryKeyMapString) { + getDBMeta().acceptPrimaryKeyMapString(this, primaryKeyMapString); + } + + /** + * This method implements the method that is declared at super. + * + * @param columnValueMap Column-value map. (NotNull and NotEmpty) + * @deprecated Please use ProductsNotificationsDbm.getInstance().acceptColumnValueMap(entity, columnValueMap); + */ + public void acceptColumnValueMap(java.util.Map columnValueMap) { + getDBMeta().acceptColumnValueMap(this, columnValueMap); + } + + /** + * This method implements the method that is declared at super. + * + * @param columnValueMapString Column-value map-string. (NotNull and NotEmpty) + * @deprecated Please use ProductsNotificationsDbm.getInstance().acceptColumnValueMap(entity, columnValueMapString); + */ + public void acceptColumnValueMapString(String columnValueMapString) { + getDBMeta().acceptColumnValueMapString(this, columnValueMapString); + } + + // =================================================================================== + // Extract + // ======= + /** + * This method implements the method that is declared at super. + * + * @return Primary-key map-string. (NotNull) + * @deprecated Please use ProductsNotificationsDbm.getInstance().extractPrimaryKeyMapString(entity); + */ + public String extractPrimaryKeyMapString() { + return getDBMeta().extractPrimaryKeyMapString(this); + } + + /** + * Extract primary-key map-string. + * + * @param startBrace Start-brace. (NotNull) + * @param endBrace End-brace. (NotNull) + * @param delimiter Delimiter. (NotNull) + * @param equal Equal. (NotNull) + * @return Primary-key map-string. (NotNull) + * @deprecated Please use ProductsNotificationsDbm.getInstance().extractPrimaryKeyMapString(entity, startBrace, endBrace, delimiter, equal); + */ + public String extractPrimaryKeyMapString(String startBrace, String endBrace, String delimiter, String equal) { + return getDBMeta().extractPrimaryKeyMapString(this, startBrace, endBrace, delimiter, equal); + } + + /** + * This method implements the method that is declared at super. + * + * @return Column-value map-string. (NotNull) + * @deprecated Please use ProductsNotificationsDbm.getInstance().extractColumnValueMapString(entity); + */ + public String extractColumnValueMapString() { + return getDBMeta().extractColumnValueMapString(this); + } + + /** + * Extract column-value map-string. + * + * @param startBrace Start-brace. (NotNull) + * @param endBrace End-brace. (NotNull) + * @param delimiter Delimiter. (NotNull) + * @param equal Equal. (NotNull) + * @return Column-value map-string. (NotNull) + * @deprecated Please use ProductsNotificationsDbm.getInstance().extractColumnValueMapString(entity, startBrace, endBrace, delimiter, equal); + */ + public String extractColumnValueMapString(String startBrace, String endBrace, String delimiter, String equal) { + return getDBMeta().extractColumnValueMapString(this, startBrace, endBrace, delimiter, equal); + } + + + // =================================================================================== + // Determination + // ============= + /** + * This method implements the method that is declared at super. + * + * @return Determination. + */ + public boolean hasPrimaryKeyValue() { + + if (_productsId == null) { + return false; + } + if (_customersId == null) { + return false; + } + + return true; + } + + // =================================================================================== + // Modified Properties + // =================== + /** + * Get modified property names. (S2Dao uses this for updateModifiedProperties()) + * + * @return Modified property names. (NotNull) + */ + public java.util.Set getModifiedPropertyNames() { + return _modifiedProperties.getPropertyNames(); + } + + /** + * New entity modified properties. You can override this at the sub-class if you need it. + * + * @return Entity modified properties. (NotNull) + */ + protected EntityModifiedProperties newEntityModifiedProperties() { + return new EntityModifiedProperties(); + } + + /** + * Clear modified property names. + */ + public void clearModifiedPropertyNames() { + _modifiedProperties.clear(); + } + + // =================================================================================== + // Basic Override + // ============== + + /** + * This method overrides the method that is declared at super. + * If the primary-key of the other is same as this one, returns true. + * + * @param other Other entity. + * @return Comparing result. + */ + public boolean equals(Object other) { + if (other == null) { + return false; + } + if (!(other instanceof BsProductsNotifications)) { + return false; + } + final BsProductsNotifications otherEntity = (BsProductsNotifications)other; + + if (getProductsId() == null || !getProductsId().equals(otherEntity.getProductsId())) { + return false; + } + if (getCustomersId() == null || !getCustomersId().equals(otherEntity.getCustomersId())) { + return false; + } + + return true; + } + + /** + * This method overrides the method that is declared at super. + * Calculates hash-code from primary-key. + * + * @return Hash-code from primary-keys. + */ + public int hashCode() { + int result = 0; + + if (this.getProductsId() != null) { + result = result + getProductsId().hashCode(); + } + if (this.getCustomersId() != null) { + result = result + getCustomersId().hashCode(); + } + + return result; + } + + /** + * This method overrides the method that is declared at super. + * + * @return Column-value map-string. (NotNull) + */ + public String toString() { + final String delimiter = ","; + final StringBuffer sb = new StringBuffer(); + + sb.append(delimiter).append(getProductsId()); + sb.append(delimiter).append(getCustomersId()); + sb.append(delimiter).append(getDateAdded()); + + sb.delete(0, delimiter.length()); + sb.insert(0, "{").append("}"); + return sb.toString(); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/BsProductsOptions.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/BsProductsOptions.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/BsProductsOptions.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,425 @@ +package jp.sf.pal.pompei.bsentity; + + +import jp.sf.pal.pompei.allcommon.Entity; +import jp.sf.pal.pompei.allcommon.dbmeta.DBMeta; +import jp.sf.pal.pompei.allcommon.dbmeta.DBMetaInstanceHandler; + +/** + * The entity of PRODUCTS_OPTIONS. + * + *
+ * [primary-key]
+ *     PRODUCTS_OPTIONS_ID, LANGUAGE_ID
+ * 
+ * [column-property]
+ *     PRODUCTS_OPTIONS_ID, LANGUAGE_ID, PRODUCTS_OPTIONS_NAME
+ * 
+ * [foreign-property]
+ *     
+ * 
+ * [refferer-property]
+ *     
+ * 
+ * [sequence]
+ *     
+ * 
+ * [identity]
+ *     
+ * 
+ * [update-date]
+ *     
+ * 
+ * [version-no]
+ *     
+ * 
+ * 
+ * + * @author DBFlute(AutoGenerator) + */ +public abstract class BsProductsOptions implements Entity, java.io.Serializable { + + /** Serial version UID. (Default) */ + private static final long serialVersionUID = 1L; + + /** TABLE-Annotation for S2Dao */ + public static final String TABLE = "PRODUCTS_OPTIONS"; + + + // =================================================================================== + // Attribute + // ========= + /** Entity modified properties. (for S2Dao) */ + protected EntityModifiedProperties _modifiedProperties = newEntityModifiedProperties(); + + + /** The value of productsOptionsId. ColumnDefinition -- PK : INTEGER : NotNull : Default=[0]*/ + protected java.math.BigDecimal _productsOptionsId; + + /** The value of languageId. ColumnDefinition -- PK : INTEGER : NotNull : Default=[1]*/ + protected java.math.BigDecimal _languageId; + + /** The value of productsOptionsName. ColumnDefinition -- VARCHAR(32) : NotNull : Default=[]*/ + protected String _productsOptionsName; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + public BsProductsOptions() { + } + + + // =================================================================================== + // DBMeta + // ====== + /** + * This method implements the method that is declared at super. + * + * @return DBMeta. (NotNull) + */ + public DBMeta getDBMeta() { + return DBMetaInstanceHandler.getInstanceByTableDbName(getTableDbName()); + } + + // =================================================================================== + // Table Name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + public String getTableDbName() { + return "PRODUCTS_OPTIONS"; + } + + /** + * This method implements the method that is declared at super. + * + * @return Table cap-prop-name. (NotNull) + */ + public String getTableCapPropName() { + return "ProductsOptions"; + } + + /** + * This method implements the method that is declared at super. + * + * @return Table uncap-prop-name. (NotNull) + */ + public String getTableUncapPropName() { + return "productsOptions"; + } + + // =================================================================================== + // Accessor + // ======== + + /** Column-Annotation for S2Dao. ColumnDefinition -- PK : INTEGER : NotNull : Default=[0]*/ + public static final String productsOptionsId_COLUMN = "PRODUCTS_OPTIONS_ID"; + + /** + * Get the value of productsOptionsId.
+ * {PK : INTEGER : NotNull : Default=[0]} + * + * @return The value of productsOptionsId. (Nullable) + */ + public java.math.BigDecimal getProductsOptionsId() { + return _productsOptionsId; + } + + /** + * Set the value of productsOptionsId.
+ * {PK : INTEGER : NotNull : Default=[0]} + * + * @param productsOptionsId The value of productsOptionsId. (Nullable) + */ + public void setProductsOptionsId(java.math.BigDecimal productsOptionsId) { + _modifiedProperties.addPropertyName("productsOptionsId"); + _productsOptionsId = productsOptionsId; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- PK : INTEGER : NotNull : Default=[1]*/ + public static final String languageId_COLUMN = "LANGUAGE_ID"; + + /** + * Get the value of languageId.
+ * {PK : INTEGER : NotNull : Default=[1]} + * + * @return The value of languageId. (Nullable) + */ + public java.math.BigDecimal getLanguageId() { + return _languageId; + } + + /** + * Set the value of languageId.
+ * {PK : INTEGER : NotNull : Default=[1]} + * + * @param languageId The value of languageId. (Nullable) + */ + public void setLanguageId(java.math.BigDecimal languageId) { + _modifiedProperties.addPropertyName("languageId"); + _languageId = languageId; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- VARCHAR(32) : NotNull : Default=[]*/ + public static final String productsOptionsName_COLUMN = "PRODUCTS_OPTIONS_NAME"; + + /** + * Get the value of productsOptionsName.
+ * {VARCHAR(32) : NotNull : Default=[]} + * + * @return The value of productsOptionsName. (Nullable) + */ + public String getProductsOptionsName() { + return _productsOptionsName; + } + + /** + * Set the value of productsOptionsName.
+ * {VARCHAR(32) : NotNull : Default=[]} + * + * @param productsOptionsName The value of productsOptionsName. (Nullable) + */ + public void setProductsOptionsName(String productsOptionsName) { + _modifiedProperties.addPropertyName("productsOptionsName"); + _productsOptionsName = productsOptionsName; + } + + + // =================================================================================== + // Classify Method + // =============== + + // =================================================================================== + // Classification Determination + // ============================ + + + // =================================================================================== + // Classification Getter + // ===================== + + + // =================================================================================== + // Foreign Table + // ============= + + // =================================================================================== + // Refferer Table + // ============== + + // =================================================================================== + // Accept + // ====== + /** + * This method implements the method that is declared at super. + * + * @param primaryKeyMap Primary key map. (NotNull and NotEmpty) + * @deprecated Please use ProductsOptionsDbm.getInstance().acceptPrimaryKeyMap(entity, primaryKeyMap); + */ + public void acceptPrimaryKeyMap(java.util.Map primaryKeyMap) { + getDBMeta().acceptPrimaryKeyMap(this, primaryKeyMap); + } + + /** + * This method implements the method that is declared at super. + * + * @param primaryKeyMapString Primary-key map-string. (NotNull and NotEmpty) + * @deprecated Please use ProductsOptionsDbm.getInstance().acceptPrimaryKeyMapString(entity, primaryKeyMapString); + */ + public void acceptPrimaryKeyMapString(String primaryKeyMapString) { + getDBMeta().acceptPrimaryKeyMapString(this, primaryKeyMapString); + } + + /** + * This method implements the method that is declared at super. + * + * @param columnValueMap Column-value map. (NotNull and NotEmpty) + * @deprecated Please use ProductsOptionsDbm.getInstance().acceptColumnValueMap(entity, columnValueMap); + */ + public void acceptColumnValueMap(java.util.Map columnValueMap) { + getDBMeta().acceptColumnValueMap(this, columnValueMap); + } + + /** + * This method implements the method that is declared at super. + * + * @param columnValueMapString Column-value map-string. (NotNull and NotEmpty) + * @deprecated Please use ProductsOptionsDbm.getInstance().acceptColumnValueMap(entity, columnValueMapString); + */ + public void acceptColumnValueMapString(String columnValueMapString) { + getDBMeta().acceptColumnValueMapString(this, columnValueMapString); + } + + // =================================================================================== + // Extract + // ======= + /** + * This method implements the method that is declared at super. + * + * @return Primary-key map-string. (NotNull) + * @deprecated Please use ProductsOptionsDbm.getInstance().extractPrimaryKeyMapString(entity); + */ + public String extractPrimaryKeyMapString() { + return getDBMeta().extractPrimaryKeyMapString(this); + } + + /** + * Extract primary-key map-string. + * + * @param startBrace Start-brace. (NotNull) + * @param endBrace End-brace. (NotNull) + * @param delimiter Delimiter. (NotNull) + * @param equal Equal. (NotNull) + * @return Primary-key map-string. (NotNull) + * @deprecated Please use ProductsOptionsDbm.getInstance().extractPrimaryKeyMapString(entity, startBrace, endBrace, delimiter, equal); + */ + public String extractPrimaryKeyMapString(String startBrace, String endBrace, String delimiter, String equal) { + return getDBMeta().extractPrimaryKeyMapString(this, startBrace, endBrace, delimiter, equal); + } + + /** + * This method implements the method that is declared at super. + * + * @return Column-value map-string. (NotNull) + * @deprecated Please use ProductsOptionsDbm.getInstance().extractColumnValueMapString(entity); + */ + public String extractColumnValueMapString() { + return getDBMeta().extractColumnValueMapString(this); + } + + /** + * Extract column-value map-string. + * + * @param startBrace Start-brace. (NotNull) + * @param endBrace End-brace. (NotNull) + * @param delimiter Delimiter. (NotNull) + * @param equal Equal. (NotNull) + * @return Column-value map-string. (NotNull) + * @deprecated Please use ProductsOptionsDbm.getInstance().extractColumnValueMapString(entity, startBrace, endBrace, delimiter, equal); + */ + public String extractColumnValueMapString(String startBrace, String endBrace, String delimiter, String equal) { + return getDBMeta().extractColumnValueMapString(this, startBrace, endBrace, delimiter, equal); + } + + + // =================================================================================== + // Determination + // ============= + /** + * This method implements the method that is declared at super. + * + * @return Determination. + */ + public boolean hasPrimaryKeyValue() { + + if (_productsOptionsId == null) { + return false; + } + if (_languageId == null) { + return false; + } + + return true; + } + + // =================================================================================== + // Modified Properties + // =================== + /** + * Get modified property names. (S2Dao uses this for updateModifiedProperties()) + * + * @return Modified property names. (NotNull) + */ + public java.util.Set getModifiedPropertyNames() { + return _modifiedProperties.getPropertyNames(); + } + + /** + * New entity modified properties. You can override this at the sub-class if you need it. + * + * @return Entity modified properties. (NotNull) + */ + protected EntityModifiedProperties newEntityModifiedProperties() { + return new EntityModifiedProperties(); + } + + /** + * Clear modified property names. + */ + public void clearModifiedPropertyNames() { + _modifiedProperties.clear(); + } + + // =================================================================================== + // Basic Override + // ============== + + /** + * This method overrides the method that is declared at super. + * If the primary-key of the other is same as this one, returns true. + * + * @param other Other entity. + * @return Comparing result. + */ + public boolean equals(Object other) { + if (other == null) { + return false; + } + if (!(other instanceof BsProductsOptions)) { + return false; + } + final BsProductsOptions otherEntity = (BsProductsOptions)other; + + if (getProductsOptionsId() == null || !getProductsOptionsId().equals(otherEntity.getProductsOptionsId())) { + return false; + } + if (getLanguageId() == null || !getLanguageId().equals(otherEntity.getLanguageId())) { + return false; + } + + return true; + } + + /** + * This method overrides the method that is declared at super. + * Calculates hash-code from primary-key. + * + * @return Hash-code from primary-keys. + */ + public int hashCode() { + int result = 0; + + if (this.getProductsOptionsId() != null) { + result = result + getProductsOptionsId().hashCode(); + } + if (this.getLanguageId() != null) { + result = result + getLanguageId().hashCode(); + } + + return result; + } + + /** + * This method overrides the method that is declared at super. + * + * @return Column-value map-string. (NotNull) + */ + public String toString() { + final String delimiter = ","; + final StringBuffer sb = new StringBuffer(); + + sb.append(delimiter).append(getProductsOptionsId()); + sb.append(delimiter).append(getLanguageId()); + sb.append(delimiter).append(getProductsOptionsName()); + + sb.delete(0, delimiter.length()); + sb.insert(0, "{").append("}"); + return sb.toString(); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/BsProductsOptionsValues.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/BsProductsOptionsValues.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/BsProductsOptionsValues.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,425 @@ +package jp.sf.pal.pompei.bsentity; + + +import jp.sf.pal.pompei.allcommon.Entity; +import jp.sf.pal.pompei.allcommon.dbmeta.DBMeta; +import jp.sf.pal.pompei.allcommon.dbmeta.DBMetaInstanceHandler; + +/** + * The entity of PRODUCTS_OPTIONS_VALUES. + * + *
+ * [primary-key]
+ *     PRODUCTS_OPTIONS_VALUES_ID, LANGUAGE_ID
+ * 
+ * [column-property]
+ *     PRODUCTS_OPTIONS_VALUES_ID, LANGUAGE_ID, PRODUCTS_OPTIONS_VALUES_NAME
+ * 
+ * [foreign-property]
+ *     
+ * 
+ * [refferer-property]
+ *     
+ * 
+ * [sequence]
+ *     
+ * 
+ * [identity]
+ *     
+ * 
+ * [update-date]
+ *     
+ * 
+ * [version-no]
+ *     
+ * 
+ * 
+ * + * @author DBFlute(AutoGenerator) + */ +public abstract class BsProductsOptionsValues implements Entity, java.io.Serializable { + + /** Serial version UID. (Default) */ + private static final long serialVersionUID = 1L; + + /** TABLE-Annotation for S2Dao */ + public static final String TABLE = "PRODUCTS_OPTIONS_VALUES"; + + + // =================================================================================== + // Attribute + // ========= + /** Entity modified properties. (for S2Dao) */ + protected EntityModifiedProperties _modifiedProperties = newEntityModifiedProperties(); + + + /** The value of productsOptionsValuesId. ColumnDefinition -- PK : INTEGER : NotNull : Default=[0]*/ + protected java.math.BigDecimal _productsOptionsValuesId; + + /** The value of languageId. ColumnDefinition -- PK : INTEGER : NotNull : Default=[1]*/ + protected java.math.BigDecimal _languageId; + + /** The value of productsOptionsValuesName. ColumnDefinition -- VARCHAR(64) : NotNull : Default=[]*/ + protected String _productsOptionsValuesName; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + public BsProductsOptionsValues() { + } + + + // =================================================================================== + // DBMeta + // ====== + /** + * This method implements the method that is declared at super. + * + * @return DBMeta. (NotNull) + */ + public DBMeta getDBMeta() { + return DBMetaInstanceHandler.getInstanceByTableDbName(getTableDbName()); + } + + // =================================================================================== + // Table Name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + public String getTableDbName() { + return "PRODUCTS_OPTIONS_VALUES"; + } + + /** + * This method implements the method that is declared at super. + * + * @return Table cap-prop-name. (NotNull) + */ + public String getTableCapPropName() { + return "ProductsOptionsValues"; + } + + /** + * This method implements the method that is declared at super. + * + * @return Table uncap-prop-name. (NotNull) + */ + public String getTableUncapPropName() { + return "productsOptionsValues"; + } + + // =================================================================================== + // Accessor + // ======== + + /** Column-Annotation for S2Dao. ColumnDefinition -- PK : INTEGER : NotNull : Default=[0]*/ + public static final String productsOptionsValuesId_COLUMN = "PRODUCTS_OPTIONS_VALUES_ID"; + + /** + * Get the value of productsOptionsValuesId.
+ * {PK : INTEGER : NotNull : Default=[0]} + * + * @return The value of productsOptionsValuesId. (Nullable) + */ + public java.math.BigDecimal getProductsOptionsValuesId() { + return _productsOptionsValuesId; + } + + /** + * Set the value of productsOptionsValuesId.
+ * {PK : INTEGER : NotNull : Default=[0]} + * + * @param productsOptionsValuesId The value of productsOptionsValuesId. (Nullable) + */ + public void setProductsOptionsValuesId(java.math.BigDecimal productsOptionsValuesId) { + _modifiedProperties.addPropertyName("productsOptionsValuesId"); + _productsOptionsValuesId = productsOptionsValuesId; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- PK : INTEGER : NotNull : Default=[1]*/ + public static final String languageId_COLUMN = "LANGUAGE_ID"; + + /** + * Get the value of languageId.
+ * {PK : INTEGER : NotNull : Default=[1]} + * + * @return The value of languageId. (Nullable) + */ + public java.math.BigDecimal getLanguageId() { + return _languageId; + } + + /** + * Set the value of languageId.
+ * {PK : INTEGER : NotNull : Default=[1]} + * + * @param languageId The value of languageId. (Nullable) + */ + public void setLanguageId(java.math.BigDecimal languageId) { + _modifiedProperties.addPropertyName("languageId"); + _languageId = languageId; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- VARCHAR(64) : NotNull : Default=[]*/ + public static final String productsOptionsValuesName_COLUMN = "PRODUCTS_OPTIONS_VALUES_NAME"; + + /** + * Get the value of productsOptionsValuesName.
+ * {VARCHAR(64) : NotNull : Default=[]} + * + * @return The value of productsOptionsValuesName. (Nullable) + */ + public String getProductsOptionsValuesName() { + return _productsOptionsValuesName; + } + + /** + * Set the value of productsOptionsValuesName.
+ * {VARCHAR(64) : NotNull : Default=[]} + * + * @param productsOptionsValuesName The value of productsOptionsValuesName. (Nullable) + */ + public void setProductsOptionsValuesName(String productsOptionsValuesName) { + _modifiedProperties.addPropertyName("productsOptionsValuesName"); + _productsOptionsValuesName = productsOptionsValuesName; + } + + + // =================================================================================== + // Classify Method + // =============== + + // =================================================================================== + // Classification Determination + // ============================ + + + // =================================================================================== + // Classification Getter + // ===================== + + + // =================================================================================== + // Foreign Table + // ============= + + // =================================================================================== + // Refferer Table + // ============== + + // =================================================================================== + // Accept + // ====== + /** + * This method implements the method that is declared at super. + * + * @param primaryKeyMap Primary key map. (NotNull and NotEmpty) + * @deprecated Please use ProductsOptionsValuesDbm.getInstance().acceptPrimaryKeyMap(entity, primaryKeyMap); + */ + public void acceptPrimaryKeyMap(java.util.Map primaryKeyMap) { + getDBMeta().acceptPrimaryKeyMap(this, primaryKeyMap); + } + + /** + * This method implements the method that is declared at super. + * + * @param primaryKeyMapString Primary-key map-string. (NotNull and NotEmpty) + * @deprecated Please use ProductsOptionsValuesDbm.getInstance().acceptPrimaryKeyMapString(entity, primaryKeyMapString); + */ + public void acceptPrimaryKeyMapString(String primaryKeyMapString) { + getDBMeta().acceptPrimaryKeyMapString(this, primaryKeyMapString); + } + + /** + * This method implements the method that is declared at super. + * + * @param columnValueMap Column-value map. (NotNull and NotEmpty) + * @deprecated Please use ProductsOptionsValuesDbm.getInstance().acceptColumnValueMap(entity, columnValueMap); + */ + public void acceptColumnValueMap(java.util.Map columnValueMap) { + getDBMeta().acceptColumnValueMap(this, columnValueMap); + } + + /** + * This method implements the method that is declared at super. + * + * @param columnValueMapString Column-value map-string. (NotNull and NotEmpty) + * @deprecated Please use ProductsOptionsValuesDbm.getInstance().acceptColumnValueMap(entity, columnValueMapString); + */ + public void acceptColumnValueMapString(String columnValueMapString) { + getDBMeta().acceptColumnValueMapString(this, columnValueMapString); + } + + // =================================================================================== + // Extract + // ======= + /** + * This method implements the method that is declared at super. + * + * @return Primary-key map-string. (NotNull) + * @deprecated Please use ProductsOptionsValuesDbm.getInstance().extractPrimaryKeyMapString(entity); + */ + public String extractPrimaryKeyMapString() { + return getDBMeta().extractPrimaryKeyMapString(this); + } + + /** + * Extract primary-key map-string. + * + * @param startBrace Start-brace. (NotNull) + * @param endBrace End-brace. (NotNull) + * @param delimiter Delimiter. (NotNull) + * @param equal Equal. (NotNull) + * @return Primary-key map-string. (NotNull) + * @deprecated Please use ProductsOptionsValuesDbm.getInstance().extractPrimaryKeyMapString(entity, startBrace, endBrace, delimiter, equal); + */ + public String extractPrimaryKeyMapString(String startBrace, String endBrace, String delimiter, String equal) { + return getDBMeta().extractPrimaryKeyMapString(this, startBrace, endBrace, delimiter, equal); + } + + /** + * This method implements the method that is declared at super. + * + * @return Column-value map-string. (NotNull) + * @deprecated Please use ProductsOptionsValuesDbm.getInstance().extractColumnValueMapString(entity); + */ + public String extractColumnValueMapString() { + return getDBMeta().extractColumnValueMapString(this); + } + + /** + * Extract column-value map-string. + * + * @param startBrace Start-brace. (NotNull) + * @param endBrace End-brace. (NotNull) + * @param delimiter Delimiter. (NotNull) + * @param equal Equal. (NotNull) + * @return Column-value map-string. (NotNull) + * @deprecated Please use ProductsOptionsValuesDbm.getInstance().extractColumnValueMapString(entity, startBrace, endBrace, delimiter, equal); + */ + public String extractColumnValueMapString(String startBrace, String endBrace, String delimiter, String equal) { + return getDBMeta().extractColumnValueMapString(this, startBrace, endBrace, delimiter, equal); + } + + + // =================================================================================== + // Determination + // ============= + /** + * This method implements the method that is declared at super. + * + * @return Determination. + */ + public boolean hasPrimaryKeyValue() { + + if (_productsOptionsValuesId == null) { + return false; + } + if (_languageId == null) { + return false; + } + + return true; + } + + // =================================================================================== + // Modified Properties + // =================== + /** + * Get modified property names. (S2Dao uses this for updateModifiedProperties()) + * + * @return Modified property names. (NotNull) + */ + public java.util.Set getModifiedPropertyNames() { + return _modifiedProperties.getPropertyNames(); + } + + /** + * New entity modified properties. You can override this at the sub-class if you need it. + * + * @return Entity modified properties. (NotNull) + */ + protected EntityModifiedProperties newEntityModifiedProperties() { + return new EntityModifiedProperties(); + } + + /** + * Clear modified property names. + */ + public void clearModifiedPropertyNames() { + _modifiedProperties.clear(); + } + + // =================================================================================== + // Basic Override + // ============== + + /** + * This method overrides the method that is declared at super. + * If the primary-key of the other is same as this one, returns true. + * + * @param other Other entity. + * @return Comparing result. + */ + public boolean equals(Object other) { + if (other == null) { + return false; + } + if (!(other instanceof BsProductsOptionsValues)) { + return false; + } + final BsProductsOptionsValues otherEntity = (BsProductsOptionsValues)other; + + if (getProductsOptionsValuesId() == null || !getProductsOptionsValuesId().equals(otherEntity.getProductsOptionsValuesId())) { + return false; + } + if (getLanguageId() == null || !getLanguageId().equals(otherEntity.getLanguageId())) { + return false; + } + + return true; + } + + /** + * This method overrides the method that is declared at super. + * Calculates hash-code from primary-key. + * + * @return Hash-code from primary-keys. + */ + public int hashCode() { + int result = 0; + + if (this.getProductsOptionsValuesId() != null) { + result = result + getProductsOptionsValuesId().hashCode(); + } + if (this.getLanguageId() != null) { + result = result + getLanguageId().hashCode(); + } + + return result; + } + + /** + * This method overrides the method that is declared at super. + * + * @return Column-value map-string. (NotNull) + */ + public String toString() { + final String delimiter = ","; + final StringBuffer sb = new StringBuffer(); + + sb.append(delimiter).append(getProductsOptionsValuesId()); + sb.append(delimiter).append(getLanguageId()); + sb.append(delimiter).append(getProductsOptionsValuesName()); + + sb.delete(0, delimiter.length()); + sb.insert(0, "{").append("}"); + return sb.toString(); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/BsProductsOptionsValuesToProductsOptions.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/BsProductsOptionsValuesToProductsOptions.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/BsProductsOptionsValuesToProductsOptions.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,416 @@ +package jp.sf.pal.pompei.bsentity; + + +import jp.sf.pal.pompei.allcommon.Entity; +import jp.sf.pal.pompei.allcommon.dbmeta.DBMeta; +import jp.sf.pal.pompei.allcommon.dbmeta.DBMetaInstanceHandler; + +/** + * The entity of PRODUCTS_OPTIONS_VALUES_TO_PRODUCTS_OPTIONS. + * + *
+ * [primary-key]
+ *     PRODUCTS_OPTIONS_VALUES_TO_PRODUCTS_OPTIONS_ID
+ * 
+ * [column-property]
+ *     PRODUCTS_OPTIONS_VALUES_TO_PRODUCTS_OPTIONS_ID, PRODUCTS_OPTIONS_ID, PRODUCTS_OPTIONS_VALUES_ID
+ * 
+ * [foreign-property]
+ *     
+ * 
+ * [refferer-property]
+ *     
+ * 
+ * [sequence]
+ *     
+ * 
+ * [identity]
+ *     
+ * 
+ * [update-date]
+ *     
+ * 
+ * [version-no]
+ *     
+ * 
+ * 
+ * + * @author DBFlute(AutoGenerator) + */ +public abstract class BsProductsOptionsValuesToProductsOptions implements Entity, java.io.Serializable { + + /** Serial version UID. (Default) */ + private static final long serialVersionUID = 1L; + + /** TABLE-Annotation for S2Dao */ + public static final String TABLE = "PRODUCTS_OPTIONS_VALUES_TO_PRODUCTS_OPTIONS"; + + + // =================================================================================== + // Attribute + // ========= + /** Entity modified properties. (for S2Dao) */ + protected EntityModifiedProperties _modifiedProperties = newEntityModifiedProperties(); + + + /** The value of productsOptionsValuesToProductsOptionsId. ColumnDefinition -- PK : INTEGER : NotNull*/ + protected java.math.BigDecimal _productsOptionsValuesToProductsOptionsId; + + /** The value of productsOptionsId. ColumnDefinition -- INTEGER : NotNull*/ + protected java.math.BigDecimal _productsOptionsId; + + /** The value of productsOptionsValuesId. ColumnDefinition -- INTEGER : NotNull*/ + protected java.math.BigDecimal _productsOptionsValuesId; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + public BsProductsOptionsValuesToProductsOptions() { + } + + + // =================================================================================== + // DBMeta + // ====== + /** + * This method implements the method that is declared at super. + * + * @return DBMeta. (NotNull) + */ + public DBMeta getDBMeta() { + return DBMetaInstanceHandler.getInstanceByTableDbName(getTableDbName()); + } + + // =================================================================================== + // Table Name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + public String getTableDbName() { + return "PRODUCTS_OPTIONS_VALUES_TO_PRODUCTS_OPTIONS"; + } + + /** + * This method implements the method that is declared at super. + * + * @return Table cap-prop-name. (NotNull) + */ + public String getTableCapPropName() { + return "ProductsOptionsValuesToProductsOptions"; + } + + /** + * This method implements the method that is declared at super. + * + * @return Table uncap-prop-name. (NotNull) + */ + public String getTableUncapPropName() { + return "productsOptionsValuesToProductsOptions"; + } + + // =================================================================================== + // Accessor + // ======== + + /** Column-Annotation for S2Dao. ColumnDefinition -- PK : INTEGER : NotNull*/ + public static final String productsOptionsValuesToProductsOptionsId_COLUMN = "PRODUCTS_OPTIONS_VALUES_TO_PRODUCTS_OPTIONS_ID"; + + /** + * Get the value of productsOptionsValuesToProductsOptionsId.
+ * {PK : INTEGER : NotNull} + * + * @return The value of productsOptionsValuesToProductsOptionsId. (Nullable) + */ + public java.math.BigDecimal getProductsOptionsValuesToProductsOptionsId() { + return _productsOptionsValuesToProductsOptionsId; + } + + /** + * Set the value of productsOptionsValuesToProductsOptionsId.
+ * {PK : INTEGER : NotNull} + * + * @param productsOptionsValuesToProductsOptionsId The value of productsOptionsValuesToProductsOptionsId. (Nullable) + */ + public void setProductsOptionsValuesToProductsOptionsId(java.math.BigDecimal productsOptionsValuesToProductsOptionsId) { + _modifiedProperties.addPropertyName("productsOptionsValuesToProductsOptionsId"); + _productsOptionsValuesToProductsOptionsId = productsOptionsValuesToProductsOptionsId; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- INTEGER : NotNull*/ + public static final String productsOptionsId_COLUMN = "PRODUCTS_OPTIONS_ID"; + + /** + * Get the value of productsOptionsId.
+ * {INTEGER : NotNull} + * + * @return The value of productsOptionsId. (Nullable) + */ + public java.math.BigDecimal getProductsOptionsId() { + return _productsOptionsId; + } + + /** + * Set the value of productsOptionsId.
+ * {INTEGER : NotNull} + * + * @param productsOptionsId The value of productsOptionsId. (Nullable) + */ + public void setProductsOptionsId(java.math.BigDecimal productsOptionsId) { + _modifiedProperties.addPropertyName("productsOptionsId"); + _productsOptionsId = productsOptionsId; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- INTEGER : NotNull*/ + public static final String productsOptionsValuesId_COLUMN = "PRODUCTS_OPTIONS_VALUES_ID"; + + /** + * Get the value of productsOptionsValuesId.
+ * {INTEGER : NotNull} + * + * @return The value of productsOptionsValuesId. (Nullable) + */ + public java.math.BigDecimal getProductsOptionsValuesId() { + return _productsOptionsValuesId; + } + + /** + * Set the value of productsOptionsValuesId.
+ * {INTEGER : NotNull} + * + * @param productsOptionsValuesId The value of productsOptionsValuesId. (Nullable) + */ + public void setProductsOptionsValuesId(java.math.BigDecimal productsOptionsValuesId) { + _modifiedProperties.addPropertyName("productsOptionsValuesId"); + _productsOptionsValuesId = productsOptionsValuesId; + } + + + // =================================================================================== + // Classify Method + // =============== + + // =================================================================================== + // Classification Determination + // ============================ + + + // =================================================================================== + // Classification Getter + // ===================== + + + // =================================================================================== + // Foreign Table + // ============= + + // =================================================================================== + // Refferer Table + // ============== + + // =================================================================================== + // Accept + // ====== + /** + * This method implements the method that is declared at super. + * + * @param primaryKeyMap Primary key map. (NotNull and NotEmpty) + * @deprecated Please use ProductsOptionsValuesToProductsOptionsDbm.getInstance().acceptPrimaryKeyMap(entity, primaryKeyMap); + */ + public void acceptPrimaryKeyMap(java.util.Map primaryKeyMap) { + getDBMeta().acceptPrimaryKeyMap(this, primaryKeyMap); + } + + /** + * This method implements the method that is declared at super. + * + * @param primaryKeyMapString Primary-key map-string. (NotNull and NotEmpty) + * @deprecated Please use ProductsOptionsValuesToProductsOptionsDbm.getInstance().acceptPrimaryKeyMapString(entity, primaryKeyMapString); + */ + public void acceptPrimaryKeyMapString(String primaryKeyMapString) { + getDBMeta().acceptPrimaryKeyMapString(this, primaryKeyMapString); + } + + /** + * This method implements the method that is declared at super. + * + * @param columnValueMap Column-value map. (NotNull and NotEmpty) + * @deprecated Please use ProductsOptionsValuesToProductsOptionsDbm.getInstance().acceptColumnValueMap(entity, columnValueMap); + */ + public void acceptColumnValueMap(java.util.Map columnValueMap) { + getDBMeta().acceptColumnValueMap(this, columnValueMap); + } + + /** + * This method implements the method that is declared at super. + * + * @param columnValueMapString Column-value map-string. (NotNull and NotEmpty) + * @deprecated Please use ProductsOptionsValuesToProductsOptionsDbm.getInstance().acceptColumnValueMap(entity, columnValueMapString); + */ + public void acceptColumnValueMapString(String columnValueMapString) { + getDBMeta().acceptColumnValueMapString(this, columnValueMapString); + } + + // =================================================================================== + // Extract + // ======= + /** + * This method implements the method that is declared at super. + * + * @return Primary-key map-string. (NotNull) + * @deprecated Please use ProductsOptionsValuesToProductsOptionsDbm.getInstance().extractPrimaryKeyMapString(entity); + */ + public String extractPrimaryKeyMapString() { + return getDBMeta().extractPrimaryKeyMapString(this); + } + + /** + * Extract primary-key map-string. + * + * @param startBrace Start-brace. (NotNull) + * @param endBrace End-brace. (NotNull) + * @param delimiter Delimiter. (NotNull) + * @param equal Equal. (NotNull) + * @return Primary-key map-string. (NotNull) + * @deprecated Please use ProductsOptionsValuesToProductsOptionsDbm.getInstance().extractPrimaryKeyMapString(entity, startBrace, endBrace, delimiter, equal); + */ + public String extractPrimaryKeyMapString(String startBrace, String endBrace, String delimiter, String equal) { + return getDBMeta().extractPrimaryKeyMapString(this, startBrace, endBrace, delimiter, equal); + } + + /** + * This method implements the method that is declared at super. + * + * @return Column-value map-string. (NotNull) + * @deprecated Please use ProductsOptionsValuesToProductsOptionsDbm.getInstance().extractColumnValueMapString(entity); + */ + public String extractColumnValueMapString() { + return getDBMeta().extractColumnValueMapString(this); + } + + /** + * Extract column-value map-string. + * + * @param startBrace Start-brace. (NotNull) + * @param endBrace End-brace. (NotNull) + * @param delimiter Delimiter. (NotNull) + * @param equal Equal. (NotNull) + * @return Column-value map-string. (NotNull) + * @deprecated Please use ProductsOptionsValuesToProductsOptionsDbm.getInstance().extractColumnValueMapString(entity, startBrace, endBrace, delimiter, equal); + */ + public String extractColumnValueMapString(String startBrace, String endBrace, String delimiter, String equal) { + return getDBMeta().extractColumnValueMapString(this, startBrace, endBrace, delimiter, equal); + } + + + // =================================================================================== + // Determination + // ============= + /** + * This method implements the method that is declared at super. + * + * @return Determination. + */ + public boolean hasPrimaryKeyValue() { + + if (_productsOptionsValuesToProductsOptionsId == null) { + return false; + } + + return true; + } + + // =================================================================================== + // Modified Properties + // =================== + /** + * Get modified property names. (S2Dao uses this for updateModifiedProperties()) + * + * @return Modified property names. (NotNull) + */ + public java.util.Set getModifiedPropertyNames() { + return _modifiedProperties.getPropertyNames(); + } + + /** + * New entity modified properties. You can override this at the sub-class if you need it. + * + * @return Entity modified properties. (NotNull) + */ + protected EntityModifiedProperties newEntityModifiedProperties() { + return new EntityModifiedProperties(); + } + + /** + * Clear modified property names. + */ + public void clearModifiedPropertyNames() { + _modifiedProperties.clear(); + } + + // =================================================================================== + // Basic Override + // ============== + + /** + * This method overrides the method that is declared at super. + * If the primary-key of the other is same as this one, returns true. + * + * @param other Other entity. + * @return Comparing result. + */ + public boolean equals(Object other) { + if (other == null) { + return false; + } + if (!(other instanceof BsProductsOptionsValuesToProductsOptions)) { + return false; + } + final BsProductsOptionsValuesToProductsOptions otherEntity = (BsProductsOptionsValuesToProductsOptions)other; + + if (getProductsOptionsValuesToProductsOptionsId() == null || !getProductsOptionsValuesToProductsOptionsId().equals(otherEntity.getProductsOptionsValuesToProductsOptionsId())) { + return false; + } + + return true; + } + + /** + * This method overrides the method that is declared at super. + * Calculates hash-code from primary-key. + * + * @return Hash-code from primary-keys. + */ + public int hashCode() { + int result = 0; + + if (this.getProductsOptionsValuesToProductsOptionsId() != null) { + result = result + getProductsOptionsValuesToProductsOptionsId().hashCode(); + } + + return result; + } + + /** + * This method overrides the method that is declared at super. + * + * @return Column-value map-string. (NotNull) + */ + public String toString() { + final String delimiter = ","; + final StringBuffer sb = new StringBuffer(); + + sb.append(delimiter).append(getProductsOptionsValuesToProductsOptionsId()); + sb.append(delimiter).append(getProductsOptionsId()); + sb.append(delimiter).append(getProductsOptionsValuesId()); + + sb.delete(0, delimiter.length()); + sb.insert(0, "{").append("}"); + return sb.toString(); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/BsProductsToCategories.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/BsProductsToCategories.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/BsProductsToCategories.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,397 @@ +package jp.sf.pal.pompei.bsentity; + + +import jp.sf.pal.pompei.allcommon.Entity; +import jp.sf.pal.pompei.allcommon.dbmeta.DBMeta; +import jp.sf.pal.pompei.allcommon.dbmeta.DBMetaInstanceHandler; + +/** + * The entity of PRODUCTS_TO_CATEGORIES. + * + *
+ * [primary-key]
+ *     PRODUCTS_ID, CATEGORIES_ID
+ * 
+ * [column-property]
+ *     PRODUCTS_ID, CATEGORIES_ID
+ * 
+ * [foreign-property]
+ *     
+ * 
+ * [refferer-property]
+ *     
+ * 
+ * [sequence]
+ *     
+ * 
+ * [identity]
+ *     
+ * 
+ * [update-date]
+ *     
+ * 
+ * [version-no]
+ *     
+ * 
+ * 
+ * + * @author DBFlute(AutoGenerator) + */ +public abstract class BsProductsToCategories implements Entity, java.io.Serializable { + + /** Serial version UID. (Default) */ + private static final long serialVersionUID = 1L; + + /** TABLE-Annotation for S2Dao */ + public static final String TABLE = "PRODUCTS_TO_CATEGORIES"; + + + // =================================================================================== + // Attribute + // ========= + /** Entity modified properties. (for S2Dao) */ + protected EntityModifiedProperties _modifiedProperties = newEntityModifiedProperties(); + + + /** The value of productsId. ColumnDefinition -- PK : INTEGER : NotNull*/ + protected java.math.BigDecimal _productsId; + + /** The value of categoriesId. ColumnDefinition -- PK : INTEGER : NotNull*/ + protected java.math.BigDecimal _categoriesId; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + public BsProductsToCategories() { + } + + + // =================================================================================== + // DBMeta + // ====== + /** + * This method implements the method that is declared at super. + * + * @return DBMeta. (NotNull) + */ + public DBMeta getDBMeta() { + return DBMetaInstanceHandler.getInstanceByTableDbName(getTableDbName()); + } + + // =================================================================================== + // Table Name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + public String getTableDbName() { + return "PRODUCTS_TO_CATEGORIES"; + } + + /** + * This method implements the method that is declared at super. + * + * @return Table cap-prop-name. (NotNull) + */ + public String getTableCapPropName() { + return "ProductsToCategories"; + } + + /** + * This method implements the method that is declared at super. + * + * @return Table uncap-prop-name. (NotNull) + */ + public String getTableUncapPropName() { + return "productsToCategories"; + } + + // =================================================================================== + // Accessor + // ======== + + /** Column-Annotation for S2Dao. ColumnDefinition -- PK : INTEGER : NotNull*/ + public static final String productsId_COLUMN = "PRODUCTS_ID"; + + /** + * Get the value of productsId.
+ * {PK : INTEGER : NotNull} + * + * @return The value of productsId. (Nullable) + */ + public java.math.BigDecimal getProductsId() { + return _productsId; + } + + /** + * Set the value of productsId.
+ * {PK : INTEGER : NotNull} + * + * @param productsId The value of productsId. (Nullable) + */ + public void setProductsId(java.math.BigDecimal productsId) { + _modifiedProperties.addPropertyName("productsId"); + _productsId = productsId; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- PK : INTEGER : NotNull*/ + public static final String categoriesId_COLUMN = "CATEGORIES_ID"; + + /** + * Get the value of categoriesId.
+ * {PK : INTEGER : NotNull} + * + * @return The value of categoriesId. (Nullable) + */ + public java.math.BigDecimal getCategoriesId() { + return _categoriesId; + } + + /** + * Set the value of categoriesId.
+ * {PK : INTEGER : NotNull} + * + * @param categoriesId The value of categoriesId. (Nullable) + */ + public void setCategoriesId(java.math.BigDecimal categoriesId) { + _modifiedProperties.addPropertyName("categoriesId"); + _categoriesId = categoriesId; + } + + + // =================================================================================== + // Classify Method + // =============== + + // =================================================================================== + // Classification Determination + // ============================ + + + // =================================================================================== + // Classification Getter + // ===================== + + + // =================================================================================== + // Foreign Table + // ============= + + // =================================================================================== + // Refferer Table + // ============== + + // =================================================================================== + // Accept + // ====== + /** + * This method implements the method that is declared at super. + * + * @param primaryKeyMap Primary key map. (NotNull and NotEmpty) + * @deprecated Please use ProductsToCategoriesDbm.getInstance().acceptPrimaryKeyMap(entity, primaryKeyMap); + */ + public void acceptPrimaryKeyMap(java.util.Map primaryKeyMap) { + getDBMeta().acceptPrimaryKeyMap(this, primaryKeyMap); + } + + /** + * This method implements the method that is declared at super. + * + * @param primaryKeyMapString Primary-key map-string. (NotNull and NotEmpty) + * @deprecated Please use ProductsToCategoriesDbm.getInstance().acceptPrimaryKeyMapString(entity, primaryKeyMapString); + */ + public void acceptPrimaryKeyMapString(String primaryKeyMapString) { + getDBMeta().acceptPrimaryKeyMapString(this, primaryKeyMapString); + } + + /** + * This method implements the method that is declared at super. + * + * @param columnValueMap Column-value map. (NotNull and NotEmpty) + * @deprecated Please use ProductsToCategoriesDbm.getInstance().acceptColumnValueMap(entity, columnValueMap); + */ + public void acceptColumnValueMap(java.util.Map columnValueMap) { + getDBMeta().acceptColumnValueMap(this, columnValueMap); + } + + /** + * This method implements the method that is declared at super. + * + * @param columnValueMapString Column-value map-string. (NotNull and NotEmpty) + * @deprecated Please use ProductsToCategoriesDbm.getInstance().acceptColumnValueMap(entity, columnValueMapString); + */ + public void acceptColumnValueMapString(String columnValueMapString) { + getDBMeta().acceptColumnValueMapString(this, columnValueMapString); + } + + // =================================================================================== + // Extract + // ======= + /** + * This method implements the method that is declared at super. + * + * @return Primary-key map-string. (NotNull) + * @deprecated Please use ProductsToCategoriesDbm.getInstance().extractPrimaryKeyMapString(entity); + */ + public String extractPrimaryKeyMapString() { + return getDBMeta().extractPrimaryKeyMapString(this); + } + + /** + * Extract primary-key map-string. + * + * @param startBrace Start-brace. (NotNull) + * @param endBrace End-brace. (NotNull) + * @param delimiter Delimiter. (NotNull) + * @param equal Equal. (NotNull) + * @return Primary-key map-string. (NotNull) + * @deprecated Please use ProductsToCategoriesDbm.getInstance().extractPrimaryKeyMapString(entity, startBrace, endBrace, delimiter, equal); + */ + public String extractPrimaryKeyMapString(String startBrace, String endBrace, String delimiter, String equal) { + return getDBMeta().extractPrimaryKeyMapString(this, startBrace, endBrace, delimiter, equal); + } + + /** + * This method implements the method that is declared at super. + * + * @return Column-value map-string. (NotNull) + * @deprecated Please use ProductsToCategoriesDbm.getInstance().extractColumnValueMapString(entity); + */ + public String extractColumnValueMapString() { + return getDBMeta().extractColumnValueMapString(this); + } + + /** + * Extract column-value map-string. + * + * @param startBrace Start-brace. (NotNull) + * @param endBrace End-brace. (NotNull) + * @param delimiter Delimiter. (NotNull) + * @param equal Equal. (NotNull) + * @return Column-value map-string. (NotNull) + * @deprecated Please use ProductsToCategoriesDbm.getInstance().extractColumnValueMapString(entity, startBrace, endBrace, delimiter, equal); + */ + public String extractColumnValueMapString(String startBrace, String endBrace, String delimiter, String equal) { + return getDBMeta().extractColumnValueMapString(this, startBrace, endBrace, delimiter, equal); + } + + + // =================================================================================== + // Determination + // ============= + /** + * This method implements the method that is declared at super. + * + * @return Determination. + */ + public boolean hasPrimaryKeyValue() { + + if (_productsId == null) { + return false; + } + if (_categoriesId == null) { + return false; + } + + return true; + } + + // =================================================================================== + // Modified Properties + // =================== + /** + * Get modified property names. (S2Dao uses this for updateModifiedProperties()) + * + * @return Modified property names. (NotNull) + */ + public java.util.Set getModifiedPropertyNames() { + return _modifiedProperties.getPropertyNames(); + } + + /** + * New entity modified properties. You can override this at the sub-class if you need it. + * + * @return Entity modified properties. (NotNull) + */ + protected EntityModifiedProperties newEntityModifiedProperties() { + return new EntityModifiedProperties(); + } + + /** + * Clear modified property names. + */ + public void clearModifiedPropertyNames() { + _modifiedProperties.clear(); + } + + // =================================================================================== + // Basic Override + // ============== + + /** + * This method overrides the method that is declared at super. + * If the primary-key of the other is same as this one, returns true. + * + * @param other Other entity. + * @return Comparing result. + */ + public boolean equals(Object other) { + if (other == null) { + return false; + } + if (!(other instanceof BsProductsToCategories)) { + return false; + } + final BsProductsToCategories otherEntity = (BsProductsToCategories)other; + + if (getProductsId() == null || !getProductsId().equals(otherEntity.getProductsId())) { + return false; + } + if (getCategoriesId() == null || !getCategoriesId().equals(otherEntity.getCategoriesId())) { + return false; + } + + return true; + } + + /** + * This method overrides the method that is declared at super. + * Calculates hash-code from primary-key. + * + * @return Hash-code from primary-keys. + */ + public int hashCode() { + int result = 0; + + if (this.getProductsId() != null) { + result = result + getProductsId().hashCode(); + } + if (this.getCategoriesId() != null) { + result = result + getCategoriesId().hashCode(); + } + + return result; + } + + /** + * This method overrides the method that is declared at super. + * + * @return Column-value map-string. (NotNull) + */ + public String toString() { + final String delimiter = ","; + final StringBuffer sb = new StringBuffer(); + + sb.append(delimiter).append(getProductsId()); + sb.append(delimiter).append(getCategoriesId()); + + sb.delete(0, delimiter.length()); + sb.insert(0, "{").append("}"); + return sb.toString(); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/BsReviews.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/BsReviews.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/BsReviews.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,556 @@ +package jp.sf.pal.pompei.bsentity; + + +import jp.sf.pal.pompei.allcommon.Entity; +import jp.sf.pal.pompei.allcommon.dbmeta.DBMeta; +import jp.sf.pal.pompei.allcommon.dbmeta.DBMetaInstanceHandler; + +/** + * The entity of REVIEWS. + * + *
+ * [primary-key]
+ *     REVIEWS_ID
+ * 
+ * [column-property]
+ *     REVIEWS_ID, PRODUCTS_ID, CUSTOMERS_ID, CUSTOMERS_NAME, REVIEWS_RATING, DATE_ADDED, LAST_MODIFIED, REVIEWS_READ
+ * 
+ * [foreign-property]
+ *     
+ * 
+ * [refferer-property]
+ *     
+ * 
+ * [sequence]
+ *     
+ * 
+ * [identity]
+ *     
+ * 
+ * [update-date]
+ *     
+ * 
+ * [version-no]
+ *     
+ * 
+ * 
+ * + * @author DBFlute(AutoGenerator) + */ +public abstract class BsReviews implements Entity, java.io.Serializable { + + /** Serial version UID. (Default) */ + private static final long serialVersionUID = 1L; + + /** TABLE-Annotation for S2Dao */ + public static final String TABLE = "REVIEWS"; + + + // =================================================================================== + // Attribute + // ========= + /** Entity modified properties. (for S2Dao) */ + protected EntityModifiedProperties _modifiedProperties = newEntityModifiedProperties(); + + + /** The value of reviewsId. ColumnDefinition -- PK : INTEGER : NotNull*/ + protected java.math.BigDecimal _reviewsId; + + /** The value of productsId. ColumnDefinition -- INTEGER : NotNull*/ + protected java.math.BigDecimal _productsId; + + /** The value of customersId. ColumnDefinition -- INTEGER*/ + protected java.math.BigDecimal _customersId; + + /** The value of customersName. ColumnDefinition -- VARCHAR(64) : NotNull*/ + protected String _customersName; + + /** The value of reviewsRating. ColumnDefinition -- INTEGER*/ + protected java.math.BigDecimal _reviewsRating; + + /** The value of dateAdded. ColumnDefinition -- TIMESTAMP*/ + protected java.sql.Timestamp _dateAdded; + + /** The value of lastModified. ColumnDefinition -- TIMESTAMP*/ + protected java.sql.Timestamp _lastModified; + + /** The value of reviewsRead. ColumnDefinition -- INTEGER : NotNull : Default=[0]*/ + protected java.math.BigDecimal _reviewsRead; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + public BsReviews() { + } + + + // =================================================================================== + // DBMeta + // ====== + /** + * This method implements the method that is declared at super. + * + * @return DBMeta. (NotNull) + */ + public DBMeta getDBMeta() { + return DBMetaInstanceHandler.getInstanceByTableDbName(getTableDbName()); + } + + // =================================================================================== + // Table Name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + public String getTableDbName() { + return "REVIEWS"; + } + + /** + * This method implements the method that is declared at super. + * + * @return Table cap-prop-name. (NotNull) + */ + public String getTableCapPropName() { + return "Reviews"; + } + + /** + * This method implements the method that is declared at super. + * + * @return Table uncap-prop-name. (NotNull) + */ + public String getTableUncapPropName() { + return "reviews"; + } + + // =================================================================================== + // Accessor + // ======== + + /** Column-Annotation for S2Dao. ColumnDefinition -- PK : INTEGER : NotNull*/ + public static final String reviewsId_COLUMN = "REVIEWS_ID"; + + /** + * Get the value of reviewsId.
+ * {PK : INTEGER : NotNull} + * + * @return The value of reviewsId. (Nullable) + */ + public java.math.BigDecimal getReviewsId() { + return _reviewsId; + } + + /** + * Set the value of reviewsId.
+ * {PK : INTEGER : NotNull} + * + * @param reviewsId The value of reviewsId. (Nullable) + */ + public void setReviewsId(java.math.BigDecimal reviewsId) { + _modifiedProperties.addPropertyName("reviewsId"); + _reviewsId = reviewsId; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- INTEGER : NotNull*/ + public static final String productsId_COLUMN = "PRODUCTS_ID"; + + /** + * Get the value of productsId.
+ * {INTEGER : NotNull} + * + * @return The value of productsId. (Nullable) + */ + public java.math.BigDecimal getProductsId() { + return _productsId; + } + + /** + * Set the value of productsId.
+ * {INTEGER : NotNull} + * + * @param productsId The value of productsId. (Nullable) + */ + public void setProductsId(java.math.BigDecimal productsId) { + _modifiedProperties.addPropertyName("productsId"); + _productsId = productsId; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- INTEGER*/ + public static final String customersId_COLUMN = "CUSTOMERS_ID"; + + /** + * Get the value of customersId.
+ * {INTEGER} + * + * @return The value of customersId. (Nullable) + */ + public java.math.BigDecimal getCustomersId() { + return _customersId; + } + + /** + * Set the value of customersId.
+ * {INTEGER} + * + * @param customersId The value of customersId. (Nullable) + */ + public void setCustomersId(java.math.BigDecimal customersId) { + _modifiedProperties.addPropertyName("customersId"); + _customersId = customersId; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- VARCHAR(64) : NotNull*/ + public static final String customersName_COLUMN = "CUSTOMERS_NAME"; + + /** + * Get the value of customersName.
+ * {VARCHAR(64) : NotNull} + * + * @return The value of customersName. (Nullable) + */ + public String getCustomersName() { + return _customersName; + } + + /** + * Set the value of customersName.
+ * {VARCHAR(64) : NotNull} + * + * @param customersName The value of customersName. (Nullable) + */ + public void setCustomersName(String customersName) { + _modifiedProperties.addPropertyName("customersName"); + _customersName = customersName; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- INTEGER*/ + public static final String reviewsRating_COLUMN = "REVIEWS_RATING"; + + /** + * Get the value of reviewsRating.
+ * {INTEGER} + * + * @return The value of reviewsRating. (Nullable) + */ + public java.math.BigDecimal getReviewsRating() { + return _reviewsRating; + } + + /** + * Set the value of reviewsRating.
+ * {INTEGER} + * + * @param reviewsRating The value of reviewsRating. (Nullable) + */ + public void setReviewsRating(java.math.BigDecimal reviewsRating) { + _modifiedProperties.addPropertyName("reviewsRating"); + _reviewsRating = reviewsRating; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- TIMESTAMP*/ + public static final String dateAdded_COLUMN = "DATE_ADDED"; + + /** + * Get the value of dateAdded.
+ * {TIMESTAMP} + * + * @return The value of dateAdded. (Nullable) + */ + public java.sql.Timestamp getDateAdded() { + return _dateAdded; + } + + /** + * Set the value of dateAdded.
+ * {TIMESTAMP} + * + * @param dateAdded The value of dateAdded. (Nullable) + */ + public void setDateAdded(java.sql.Timestamp dateAdded) { + _modifiedProperties.addPropertyName("dateAdded"); + _dateAdded = dateAdded; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- TIMESTAMP*/ + public static final String lastModified_COLUMN = "LAST_MODIFIED"; + + /** + * Get the value of lastModified.
+ * {TIMESTAMP} + * + * @return The value of lastModified. (Nullable) + */ + public java.sql.Timestamp getLastModified() { + return _lastModified; + } + + /** + * Set the value of lastModified.
+ * {TIMESTAMP} + * + * @param lastModified The value of lastModified. (Nullable) + */ + public void setLastModified(java.sql.Timestamp lastModified) { + _modifiedProperties.addPropertyName("lastModified"); + _lastModified = lastModified; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- INTEGER : NotNull : Default=[0]*/ + public static final String reviewsRead_COLUMN = "REVIEWS_READ"; + + /** + * Get the value of reviewsRead.
+ * {INTEGER : NotNull : Default=[0]} + * + * @return The value of reviewsRead. (Nullable) + */ + public java.math.BigDecimal getReviewsRead() { + return _reviewsRead; + } + + /** + * Set the value of reviewsRead.
+ * {INTEGER : NotNull : Default=[0]} + * + * @param reviewsRead The value of reviewsRead. (Nullable) + */ + public void setReviewsRead(java.math.BigDecimal reviewsRead) { + _modifiedProperties.addPropertyName("reviewsRead"); + _reviewsRead = reviewsRead; + } + + + // =================================================================================== + // Classify Method + // =============== + + // =================================================================================== + // Classification Determination + // ============================ + + + // =================================================================================== + // Classification Getter + // ===================== + + + // =================================================================================== + // Foreign Table + // ============= + + // =================================================================================== + // Refferer Table + // ============== + + // =================================================================================== + // Accept + // ====== + /** + * This method implements the method that is declared at super. + * + * @param primaryKeyMap Primary key map. (NotNull and NotEmpty) + * @deprecated Please use ReviewsDbm.getInstance().acceptPrimaryKeyMap(entity, primaryKeyMap); + */ + public void acceptPrimaryKeyMap(java.util.Map primaryKeyMap) { + getDBMeta().acceptPrimaryKeyMap(this, primaryKeyMap); + } + + /** + * This method implements the method that is declared at super. + * + * @param primaryKeyMapString Primary-key map-string. (NotNull and NotEmpty) + * @deprecated Please use ReviewsDbm.getInstance().acceptPrimaryKeyMapString(entity, primaryKeyMapString); + */ + public void acceptPrimaryKeyMapString(String primaryKeyMapString) { + getDBMeta().acceptPrimaryKeyMapString(this, primaryKeyMapString); + } + + /** + * This method implements the method that is declared at super. + * + * @param columnValueMap Column-value map. (NotNull and NotEmpty) + * @deprecated Please use ReviewsDbm.getInstance().acceptColumnValueMap(entity, columnValueMap); + */ + public void acceptColumnValueMap(java.util.Map columnValueMap) { + getDBMeta().acceptColumnValueMap(this, columnValueMap); + } + + /** + * This method implements the method that is declared at super. + * + * @param columnValueMapString Column-value map-string. (NotNull and NotEmpty) + * @deprecated Please use ReviewsDbm.getInstance().acceptColumnValueMap(entity, columnValueMapString); + */ + public void acceptColumnValueMapString(String columnValueMapString) { + getDBMeta().acceptColumnValueMapString(this, columnValueMapString); + } + + // =================================================================================== + // Extract + // ======= + /** + * This method implements the method that is declared at super. + * + * @return Primary-key map-string. (NotNull) + * @deprecated Please use ReviewsDbm.getInstance().extractPrimaryKeyMapString(entity); + */ + public String extractPrimaryKeyMapString() { + return getDBMeta().extractPrimaryKeyMapString(this); + } + + /** + * Extract primary-key map-string. + * + * @param startBrace Start-brace. (NotNull) + * @param endBrace End-brace. (NotNull) + * @param delimiter Delimiter. (NotNull) + * @param equal Equal. (NotNull) + * @return Primary-key map-string. (NotNull) + * @deprecated Please use ReviewsDbm.getInstance().extractPrimaryKeyMapString(entity, startBrace, endBrace, delimiter, equal); + */ + public String extractPrimaryKeyMapString(String startBrace, String endBrace, String delimiter, String equal) { + return getDBMeta().extractPrimaryKeyMapString(this, startBrace, endBrace, delimiter, equal); + } + + /** + * This method implements the method that is declared at super. + * + * @return Column-value map-string. (NotNull) + * @deprecated Please use ReviewsDbm.getInstance().extractColumnValueMapString(entity); + */ + public String extractColumnValueMapString() { + return getDBMeta().extractColumnValueMapString(this); + } + + /** + * Extract column-value map-string. + * + * @param startBrace Start-brace. (NotNull) + * @param endBrace End-brace. (NotNull) + * @param delimiter Delimiter. (NotNull) + * @param equal Equal. (NotNull) + * @return Column-value map-string. (NotNull) + * @deprecated Please use ReviewsDbm.getInstance().extractColumnValueMapString(entity, startBrace, endBrace, delimiter, equal); + */ + public String extractColumnValueMapString(String startBrace, String endBrace, String delimiter, String equal) { + return getDBMeta().extractColumnValueMapString(this, startBrace, endBrace, delimiter, equal); + } + + + // =================================================================================== + // Determination + // ============= + /** + * This method implements the method that is declared at super. + * + * @return Determination. + */ + public boolean hasPrimaryKeyValue() { + + if (_reviewsId == null) { + return false; + } + + return true; + } + + // =================================================================================== + // Modified Properties + // =================== + /** + * Get modified property names. (S2Dao uses this for updateModifiedProperties()) + * + * @return Modified property names. (NotNull) + */ + public java.util.Set getModifiedPropertyNames() { + return _modifiedProperties.getPropertyNames(); + } + + /** + * New entity modified properties. You can override this at the sub-class if you need it. + * + * @return Entity modified properties. (NotNull) + */ + protected EntityModifiedProperties newEntityModifiedProperties() { + return new EntityModifiedProperties(); + } + + /** + * Clear modified property names. + */ + public void clearModifiedPropertyNames() { + _modifiedProperties.clear(); + } + + // =================================================================================== + // Basic Override + // ============== + + /** + * This method overrides the method that is declared at super. + * If the primary-key of the other is same as this one, returns true. + * + * @param other Other entity. + * @return Comparing result. + */ + public boolean equals(Object other) { + if (other == null) { + return false; + } + if (!(other instanceof BsReviews)) { + return false; + } + final BsReviews otherEntity = (BsReviews)other; + + if (getReviewsId() == null || !getReviewsId().equals(otherEntity.getReviewsId())) { + return false; + } + + return true; + } + + /** + * This method overrides the method that is declared at super. + * Calculates hash-code from primary-key. + * + * @return Hash-code from primary-keys. + */ + public int hashCode() { + int result = 0; + + if (this.getReviewsId() != null) { + result = result + getReviewsId().hashCode(); + } + + return result; + } + + /** + * This method overrides the method that is declared at super. + * + * @return Column-value map-string. (NotNull) + */ + public String toString() { + final String delimiter = ","; + final StringBuffer sb = new StringBuffer(); + + sb.append(delimiter).append(getReviewsId()); + sb.append(delimiter).append(getProductsId()); + sb.append(delimiter).append(getCustomersId()); + sb.append(delimiter).append(getCustomersName()); + sb.append(delimiter).append(getReviewsRating()); + sb.append(delimiter).append(getDateAdded()); + sb.append(delimiter).append(getLastModified()); + sb.append(delimiter).append(getReviewsRead()); + + sb.delete(0, delimiter.length()); + sb.insert(0, "{").append("}"); + return sb.toString(); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/BsReviewsDescription.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/BsReviewsDescription.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/BsReviewsDescription.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,425 @@ +package jp.sf.pal.pompei.bsentity; + + +import jp.sf.pal.pompei.allcommon.Entity; +import jp.sf.pal.pompei.allcommon.dbmeta.DBMeta; +import jp.sf.pal.pompei.allcommon.dbmeta.DBMetaInstanceHandler; + +/** + * The entity of REVIEWS_DESCRIPTION. + * + *
+ * [primary-key]
+ *     REVIEWS_ID, LANGUAGES_ID
+ * 
+ * [column-property]
+ *     REVIEWS_ID, LANGUAGES_ID, REVIEWS_TEXT
+ * 
+ * [foreign-property]
+ *     
+ * 
+ * [refferer-property]
+ *     
+ * 
+ * [sequence]
+ *     
+ * 
+ * [identity]
+ *     
+ * 
+ * [update-date]
+ *     
+ * 
+ * [version-no]
+ *     
+ * 
+ * 
+ * + * @author DBFlute(AutoGenerator) + */ +public abstract class BsReviewsDescription implements Entity, java.io.Serializable { + + /** Serial version UID. (Default) */ + private static final long serialVersionUID = 1L; + + /** TABLE-Annotation for S2Dao */ + public static final String TABLE = "REVIEWS_DESCRIPTION"; + + + // =================================================================================== + // Attribute + // ========= + /** Entity modified properties. (for S2Dao) */ + protected EntityModifiedProperties _modifiedProperties = newEntityModifiedProperties(); + + + /** The value of reviewsId. ColumnDefinition -- PK : INTEGER : NotNull*/ + protected java.math.BigDecimal _reviewsId; + + /** The value of languagesId. ColumnDefinition -- PK : INTEGER : NotNull*/ + protected java.math.BigDecimal _languagesId; + + /** The value of reviewsText. ColumnDefinition -- LONG VARCHAR(32700) : NotNull*/ + protected String _reviewsText; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + public BsReviewsDescription() { + } + + + // =================================================================================== + // DBMeta + // ====== + /** + * This method implements the method that is declared at super. + * + * @return DBMeta. (NotNull) + */ + public DBMeta getDBMeta() { + return DBMetaInstanceHandler.getInstanceByTableDbName(getTableDbName()); + } + + // =================================================================================== + // Table Name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + public String getTableDbName() { + return "REVIEWS_DESCRIPTION"; + } + + /** + * This method implements the method that is declared at super. + * + * @return Table cap-prop-name. (NotNull) + */ + public String getTableCapPropName() { + return "ReviewsDescription"; + } + + /** + * This method implements the method that is declared at super. + * + * @return Table uncap-prop-name. (NotNull) + */ + public String getTableUncapPropName() { + return "reviewsDescription"; + } + + // =================================================================================== + // Accessor + // ======== + + /** Column-Annotation for S2Dao. ColumnDefinition -- PK : INTEGER : NotNull*/ + public static final String reviewsId_COLUMN = "REVIEWS_ID"; + + /** + * Get the value of reviewsId.
+ * {PK : INTEGER : NotNull} + * + * @return The value of reviewsId. (Nullable) + */ + public java.math.BigDecimal getReviewsId() { + return _reviewsId; + } + + /** + * Set the value of reviewsId.
+ * {PK : INTEGER : NotNull} + * + * @param reviewsId The value of reviewsId. (Nullable) + */ + public void setReviewsId(java.math.BigDecimal reviewsId) { + _modifiedProperties.addPropertyName("reviewsId"); + _reviewsId = reviewsId; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- PK : INTEGER : NotNull*/ + public static final String languagesId_COLUMN = "LANGUAGES_ID"; + + /** + * Get the value of languagesId.
+ * {PK : INTEGER : NotNull} + * + * @return The value of languagesId. (Nullable) + */ + public java.math.BigDecimal getLanguagesId() { + return _languagesId; + } + + /** + * Set the value of languagesId.
+ * {PK : INTEGER : NotNull} + * + * @param languagesId The value of languagesId. (Nullable) + */ + public void setLanguagesId(java.math.BigDecimal languagesId) { + _modifiedProperties.addPropertyName("languagesId"); + _languagesId = languagesId; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- LONG VARCHAR(32700) : NotNull*/ + public static final String reviewsText_COLUMN = "REVIEWS_TEXT"; + + /** + * Get the value of reviewsText.
+ * {LONG VARCHAR(32700) : NotNull} + * + * @return The value of reviewsText. (Nullable) + */ + public String getReviewsText() { + return _reviewsText; + } + + /** + * Set the value of reviewsText.
+ * {LONG VARCHAR(32700) : NotNull} + * + * @param reviewsText The value of reviewsText. (Nullable) + */ + public void setReviewsText(String reviewsText) { + _modifiedProperties.addPropertyName("reviewsText"); + _reviewsText = reviewsText; + } + + + // =================================================================================== + // Classify Method + // =============== + + // =================================================================================== + // Classification Determination + // ============================ + + + // =================================================================================== + // Classification Getter + // ===================== + + + // =================================================================================== + // Foreign Table + // ============= + + // =================================================================================== + // Refferer Table + // ============== + + // =================================================================================== + // Accept + // ====== + /** + * This method implements the method that is declared at super. + * + * @param primaryKeyMap Primary key map. (NotNull and NotEmpty) + * @deprecated Please use ReviewsDescriptionDbm.getInstance().acceptPrimaryKeyMap(entity, primaryKeyMap); + */ + public void acceptPrimaryKeyMap(java.util.Map primaryKeyMap) { + getDBMeta().acceptPrimaryKeyMap(this, primaryKeyMap); + } + + /** + * This method implements the method that is declared at super. + * + * @param primaryKeyMapString Primary-key map-string. (NotNull and NotEmpty) + * @deprecated Please use ReviewsDescriptionDbm.getInstance().acceptPrimaryKeyMapString(entity, primaryKeyMapString); + */ + public void acceptPrimaryKeyMapString(String primaryKeyMapString) { + getDBMeta().acceptPrimaryKeyMapString(this, primaryKeyMapString); + } + + /** + * This method implements the method that is declared at super. + * + * @param columnValueMap Column-value map. (NotNull and NotEmpty) + * @deprecated Please use ReviewsDescriptionDbm.getInstance().acceptColumnValueMap(entity, columnValueMap); + */ + public void acceptColumnValueMap(java.util.Map columnValueMap) { + getDBMeta().acceptColumnValueMap(this, columnValueMap); + } + + /** + * This method implements the method that is declared at super. + * + * @param columnValueMapString Column-value map-string. (NotNull and NotEmpty) + * @deprecated Please use ReviewsDescriptionDbm.getInstance().acceptColumnValueMap(entity, columnValueMapString); + */ + public void acceptColumnValueMapString(String columnValueMapString) { + getDBMeta().acceptColumnValueMapString(this, columnValueMapString); + } + + // =================================================================================== + // Extract + // ======= + /** + * This method implements the method that is declared at super. + * + * @return Primary-key map-string. (NotNull) + * @deprecated Please use ReviewsDescriptionDbm.getInstance().extractPrimaryKeyMapString(entity); + */ + public String extractPrimaryKeyMapString() { + return getDBMeta().extractPrimaryKeyMapString(this); + } + + /** + * Extract primary-key map-string. + * + * @param startBrace Start-brace. (NotNull) + * @param endBrace End-brace. (NotNull) + * @param delimiter Delimiter. (NotNull) + * @param equal Equal. (NotNull) + * @return Primary-key map-string. (NotNull) + * @deprecated Please use ReviewsDescriptionDbm.getInstance().extractPrimaryKeyMapString(entity, startBrace, endBrace, delimiter, equal); + */ + public String extractPrimaryKeyMapString(String startBrace, String endBrace, String delimiter, String equal) { + return getDBMeta().extractPrimaryKeyMapString(this, startBrace, endBrace, delimiter, equal); + } + + /** + * This method implements the method that is declared at super. + * + * @return Column-value map-string. (NotNull) + * @deprecated Please use ReviewsDescriptionDbm.getInstance().extractColumnValueMapString(entity); + */ + public String extractColumnValueMapString() { + return getDBMeta().extractColumnValueMapString(this); + } + + /** + * Extract column-value map-string. + * + * @param startBrace Start-brace. (NotNull) + * @param endBrace End-brace. (NotNull) + * @param delimiter Delimiter. (NotNull) + * @param equal Equal. (NotNull) + * @return Column-value map-string. (NotNull) + * @deprecated Please use ReviewsDescriptionDbm.getInstance().extractColumnValueMapString(entity, startBrace, endBrace, delimiter, equal); + */ + public String extractColumnValueMapString(String startBrace, String endBrace, String delimiter, String equal) { + return getDBMeta().extractColumnValueMapString(this, startBrace, endBrace, delimiter, equal); + } + + + // =================================================================================== + // Determination + // ============= + /** + * This method implements the method that is declared at super. + * + * @return Determination. + */ + public boolean hasPrimaryKeyValue() { + + if (_reviewsId == null) { + return false; + } + if (_languagesId == null) { + return false; + } + + return true; + } + + // =================================================================================== + // Modified Properties + // =================== + /** + * Get modified property names. (S2Dao uses this for updateModifiedProperties()) + * + * @return Modified property names. (NotNull) + */ + public java.util.Set getModifiedPropertyNames() { + return _modifiedProperties.getPropertyNames(); + } + + /** + * New entity modified properties. You can override this at the sub-class if you need it. + * + * @return Entity modified properties. (NotNull) + */ + protected EntityModifiedProperties newEntityModifiedProperties() { + return new EntityModifiedProperties(); + } + + /** + * Clear modified property names. + */ + public void clearModifiedPropertyNames() { + _modifiedProperties.clear(); + } + + // =================================================================================== + // Basic Override + // ============== + + /** + * This method overrides the method that is declared at super. + * If the primary-key of the other is same as this one, returns true. + * + * @param other Other entity. + * @return Comparing result. + */ + public boolean equals(Object other) { + if (other == null) { + return false; + } + if (!(other instanceof BsReviewsDescription)) { + return false; + } + final BsReviewsDescription otherEntity = (BsReviewsDescription)other; + + if (getReviewsId() == null || !getReviewsId().equals(otherEntity.getReviewsId())) { + return false; + } + if (getLanguagesId() == null || !getLanguagesId().equals(otherEntity.getLanguagesId())) { + return false; + } + + return true; + } + + /** + * This method overrides the method that is declared at super. + * Calculates hash-code from primary-key. + * + * @return Hash-code from primary-keys. + */ + public int hashCode() { + int result = 0; + + if (this.getReviewsId() != null) { + result = result + getReviewsId().hashCode(); + } + if (this.getLanguagesId() != null) { + result = result + getLanguagesId().hashCode(); + } + + return result; + } + + /** + * This method overrides the method that is declared at super. + * + * @return Column-value map-string. (NotNull) + */ + public String toString() { + final String delimiter = ","; + final StringBuffer sb = new StringBuffer(); + + sb.append(delimiter).append(getReviewsId()); + sb.append(delimiter).append(getLanguagesId()); + sb.append(delimiter).append(getReviewsText()); + + sb.delete(0, delimiter.length()); + sb.insert(0, "{").append("}"); + return sb.toString(); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/BsSessions.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/BsSessions.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/BsSessions.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,416 @@ +package jp.sf.pal.pompei.bsentity; + + +import jp.sf.pal.pompei.allcommon.Entity; +import jp.sf.pal.pompei.allcommon.dbmeta.DBMeta; +import jp.sf.pal.pompei.allcommon.dbmeta.DBMetaInstanceHandler; + +/** + * The entity of SESSIONS. + * + *
+ * [primary-key]
+ *     SESSKEY
+ * 
+ * [column-property]
+ *     SESSKEY, EXPIRY, VALUE
+ * 
+ * [foreign-property]
+ *     
+ * 
+ * [refferer-property]
+ *     
+ * 
+ * [sequence]
+ *     
+ * 
+ * [identity]
+ *     
+ * 
+ * [update-date]
+ *     
+ * 
+ * [version-no]
+ *     
+ * 
+ * 
+ * + * @author DBFlute(AutoGenerator) + */ +public abstract class BsSessions implements Entity, java.io.Serializable { + + /** Serial version UID. (Default) */ + private static final long serialVersionUID = 1L; + + /** TABLE-Annotation for S2Dao */ + public static final String TABLE = "SESSIONS"; + + + // =================================================================================== + // Attribute + // ========= + /** Entity modified properties. (for S2Dao) */ + protected EntityModifiedProperties _modifiedProperties = newEntityModifiedProperties(); + + + /** The value of sesskey. ColumnDefinition -- PK : VARCHAR(32) : NotNull*/ + protected String _sesskey; + + /** The value of expiry. ColumnDefinition -- INTEGER : NotNull*/ + protected java.math.BigDecimal _expiry; + + /** The value of value. ColumnDefinition -- LONG VARCHAR(32700) : NotNull*/ + protected String _value; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + public BsSessions() { + } + + + // =================================================================================== + // DBMeta + // ====== + /** + * This method implements the method that is declared at super. + * + * @return DBMeta. (NotNull) + */ + public DBMeta getDBMeta() { + return DBMetaInstanceHandler.getInstanceByTableDbName(getTableDbName()); + } + + // =================================================================================== + // Table Name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + public String getTableDbName() { + return "SESSIONS"; + } + + /** + * This method implements the method that is declared at super. + * + * @return Table cap-prop-name. (NotNull) + */ + public String getTableCapPropName() { + return "Sessions"; + } + + /** + * This method implements the method that is declared at super. + * + * @return Table uncap-prop-name. (NotNull) + */ + public String getTableUncapPropName() { + return "sessions"; + } + + // =================================================================================== + // Accessor + // ======== + + /** Column-Annotation for S2Dao. ColumnDefinition -- PK : VARCHAR(32) : NotNull*/ + public static final String sesskey_COLUMN = "SESSKEY"; + + /** + * Get the value of sesskey.
+ * {PK : VARCHAR(32) : NotNull} + * + * @return The value of sesskey. (Nullable) + */ + public String getSesskey() { + return _sesskey; + } + + /** + * Set the value of sesskey.
+ * {PK : VARCHAR(32) : NotNull} + * + * @param sesskey The value of sesskey. (Nullable) + */ + public void setSesskey(String sesskey) { + _modifiedProperties.addPropertyName("sesskey"); + _sesskey = sesskey; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- INTEGER : NotNull*/ + public static final String expiry_COLUMN = "EXPIRY"; + + /** + * Get the value of expiry.
+ * {INTEGER : NotNull} + * + * @return The value of expiry. (Nullable) + */ + public java.math.BigDecimal getExpiry() { + return _expiry; + } + + /** + * Set the value of expiry.
+ * {INTEGER : NotNull} + * + * @param expiry The value of expiry. (Nullable) + */ + public void setExpiry(java.math.BigDecimal expiry) { + _modifiedProperties.addPropertyName("expiry"); + _expiry = expiry; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- LONG VARCHAR(32700) : NotNull*/ + public static final String value_COLUMN = "VALUE"; + + /** + * Get the value of value.
+ * {LONG VARCHAR(32700) : NotNull} + * + * @return The value of value. (Nullable) + */ + public String getValue() { + return _value; + } + + /** + * Set the value of value.
+ * {LONG VARCHAR(32700) : NotNull} + * + * @param value The value of value. (Nullable) + */ + public void setValue(String value) { + _modifiedProperties.addPropertyName("value"); + _value = value; + } + + + // =================================================================================== + // Classify Method + // =============== + + // =================================================================================== + // Classification Determination + // ============================ + + + // =================================================================================== + // Classification Getter + // ===================== + + + // =================================================================================== + // Foreign Table + // ============= + + // =================================================================================== + // Refferer Table + // ============== + + // =================================================================================== + // Accept + // ====== + /** + * This method implements the method that is declared at super. + * + * @param primaryKeyMap Primary key map. (NotNull and NotEmpty) + * @deprecated Please use SessionsDbm.getInstance().acceptPrimaryKeyMap(entity, primaryKeyMap); + */ + public void acceptPrimaryKeyMap(java.util.Map primaryKeyMap) { + getDBMeta().acceptPrimaryKeyMap(this, primaryKeyMap); + } + + /** + * This method implements the method that is declared at super. + * + * @param primaryKeyMapString Primary-key map-string. (NotNull and NotEmpty) + * @deprecated Please use SessionsDbm.getInstance().acceptPrimaryKeyMapString(entity, primaryKeyMapString); + */ + public void acceptPrimaryKeyMapString(String primaryKeyMapString) { + getDBMeta().acceptPrimaryKeyMapString(this, primaryKeyMapString); + } + + /** + * This method implements the method that is declared at super. + * + * @param columnValueMap Column-value map. (NotNull and NotEmpty) + * @deprecated Please use SessionsDbm.getInstance().acceptColumnValueMap(entity, columnValueMap); + */ + public void acceptColumnValueMap(java.util.Map columnValueMap) { + getDBMeta().acceptColumnValueMap(this, columnValueMap); + } + + /** + * This method implements the method that is declared at super. + * + * @param columnValueMapString Column-value map-string. (NotNull and NotEmpty) + * @deprecated Please use SessionsDbm.getInstance().acceptColumnValueMap(entity, columnValueMapString); + */ + public void acceptColumnValueMapString(String columnValueMapString) { + getDBMeta().acceptColumnValueMapString(this, columnValueMapString); + } + + // =================================================================================== + // Extract + // ======= + /** + * This method implements the method that is declared at super. + * + * @return Primary-key map-string. (NotNull) + * @deprecated Please use SessionsDbm.getInstance().extractPrimaryKeyMapString(entity); + */ + public String extractPrimaryKeyMapString() { + return getDBMeta().extractPrimaryKeyMapString(this); + } + + /** + * Extract primary-key map-string. + * + * @param startBrace Start-brace. (NotNull) + * @param endBrace End-brace. (NotNull) + * @param delimiter Delimiter. (NotNull) + * @param equal Equal. (NotNull) + * @return Primary-key map-string. (NotNull) + * @deprecated Please use SessionsDbm.getInstance().extractPrimaryKeyMapString(entity, startBrace, endBrace, delimiter, equal); + */ + public String extractPrimaryKeyMapString(String startBrace, String endBrace, String delimiter, String equal) { + return getDBMeta().extractPrimaryKeyMapString(this, startBrace, endBrace, delimiter, equal); + } + + /** + * This method implements the method that is declared at super. + * + * @return Column-value map-string. (NotNull) + * @deprecated Please use SessionsDbm.getInstance().extractColumnValueMapString(entity); + */ + public String extractColumnValueMapString() { + return getDBMeta().extractColumnValueMapString(this); + } + + /** + * Extract column-value map-string. + * + * @param startBrace Start-brace. (NotNull) + * @param endBrace End-brace. (NotNull) + * @param delimiter Delimiter. (NotNull) + * @param equal Equal. (NotNull) + * @return Column-value map-string. (NotNull) + * @deprecated Please use SessionsDbm.getInstance().extractColumnValueMapString(entity, startBrace, endBrace, delimiter, equal); + */ + public String extractColumnValueMapString(String startBrace, String endBrace, String delimiter, String equal) { + return getDBMeta().extractColumnValueMapString(this, startBrace, endBrace, delimiter, equal); + } + + + // =================================================================================== + // Determination + // ============= + /** + * This method implements the method that is declared at super. + * + * @return Determination. + */ + public boolean hasPrimaryKeyValue() { + + if (_sesskey == null) { + return false; + } + + return true; + } + + // =================================================================================== + // Modified Properties + // =================== + /** + * Get modified property names. (S2Dao uses this for updateModifiedProperties()) + * + * @return Modified property names. (NotNull) + */ + public java.util.Set getModifiedPropertyNames() { + return _modifiedProperties.getPropertyNames(); + } + + /** + * New entity modified properties. You can override this at the sub-class if you need it. + * + * @return Entity modified properties. (NotNull) + */ + protected EntityModifiedProperties newEntityModifiedProperties() { + return new EntityModifiedProperties(); + } + + /** + * Clear modified property names. + */ + public void clearModifiedPropertyNames() { + _modifiedProperties.clear(); + } + + // =================================================================================== + // Basic Override + // ============== + + /** + * This method overrides the method that is declared at super. + * If the primary-key of the other is same as this one, returns true. + * + * @param other Other entity. + * @return Comparing result. + */ + public boolean equals(Object other) { + if (other == null) { + return false; + } + if (!(other instanceof BsSessions)) { + return false; + } + final BsSessions otherEntity = (BsSessions)other; + + if (getSesskey() == null || !getSesskey().equals(otherEntity.getSesskey())) { + return false; + } + + return true; + } + + /** + * This method overrides the method that is declared at super. + * Calculates hash-code from primary-key. + * + * @return Hash-code from primary-keys. + */ + public int hashCode() { + int result = 0; + + if (this.getSesskey() != null) { + result = result + getSesskey().hashCode(); + } + + return result; + } + + /** + * This method overrides the method that is declared at super. + * + * @return Column-value map-string. (NotNull) + */ + public String toString() { + final String delimiter = ","; + final StringBuffer sb = new StringBuffer(); + + sb.append(delimiter).append(getSesskey()); + sb.append(delimiter).append(getExpiry()); + sb.append(delimiter).append(getValue()); + + sb.delete(0, delimiter.length()); + sb.insert(0, "{").append("}"); + return sb.toString(); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/BsSpecials.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/BsSpecials.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/BsSpecials.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,556 @@ +package jp.sf.pal.pompei.bsentity; + + +import jp.sf.pal.pompei.allcommon.Entity; +import jp.sf.pal.pompei.allcommon.dbmeta.DBMeta; +import jp.sf.pal.pompei.allcommon.dbmeta.DBMetaInstanceHandler; + +/** + * The entity of SPECIALS. + * + *
+ * [primary-key]
+ *     SPECIALS_ID
+ * 
+ * [column-property]
+ *     SPECIALS_ID, PRODUCTS_ID, SPECIALS_NEW_PRODUCTS_PRICE, SPECIALS_DATE_ADDED, SPECIALS_LAST_MODIFIED, EXPIRES_DATE, DATE_STATUS_CHANGE, STATUS
+ * 
+ * [foreign-property]
+ *     
+ * 
+ * [refferer-property]
+ *     
+ * 
+ * [sequence]
+ *     
+ * 
+ * [identity]
+ *     
+ * 
+ * [update-date]
+ *     
+ * 
+ * [version-no]
+ *     
+ * 
+ * 
+ * + * @author DBFlute(AutoGenerator) + */ +public abstract class BsSpecials implements Entity, java.io.Serializable { + + /** Serial version UID. (Default) */ + private static final long serialVersionUID = 1L; + + /** TABLE-Annotation for S2Dao */ + public static final String TABLE = "SPECIALS"; + + + // =================================================================================== + // Attribute + // ========= + /** Entity modified properties. (for S2Dao) */ + protected EntityModifiedProperties _modifiedProperties = newEntityModifiedProperties(); + + + /** The value of specialsId. ColumnDefinition -- PK : INTEGER : NotNull*/ + protected java.math.BigDecimal _specialsId; + + /** The value of productsId. ColumnDefinition -- INTEGER : NotNull*/ + protected java.math.BigDecimal _productsId; + + /** The value of specialsNewProductsPrice. ColumnDefinition -- DECIMAL(15) : NotNull*/ + protected java.math.BigDecimal _specialsNewProductsPrice; + + /** The value of specialsDateAdded. ColumnDefinition -- TIMESTAMP*/ + protected java.sql.Timestamp _specialsDateAdded; + + /** The value of specialsLastModified. ColumnDefinition -- TIMESTAMP*/ + protected java.sql.Timestamp _specialsLastModified; + + /** The value of expiresDate. ColumnDefinition -- TIMESTAMP*/ + protected java.sql.Timestamp _expiresDate; + + /** The value of dateStatusChange. ColumnDefinition -- TIMESTAMP*/ + protected java.sql.Timestamp _dateStatusChange; + + /** The value of status. ColumnDefinition -- INTEGER : NotNull : Default=[1]*/ + protected java.math.BigDecimal _status; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + public BsSpecials() { + } + + + // =================================================================================== + // DBMeta + // ====== + /** + * This method implements the method that is declared at super. + * + * @return DBMeta. (NotNull) + */ + public DBMeta getDBMeta() { + return DBMetaInstanceHandler.getInstanceByTableDbName(getTableDbName()); + } + + // =================================================================================== + // Table Name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + public String getTableDbName() { + return "SPECIALS"; + } + + /** + * This method implements the method that is declared at super. + * + * @return Table cap-prop-name. (NotNull) + */ + public String getTableCapPropName() { + return "Specials"; + } + + /** + * This method implements the method that is declared at super. + * + * @return Table uncap-prop-name. (NotNull) + */ + public String getTableUncapPropName() { + return "specials"; + } + + // =================================================================================== + // Accessor + // ======== + + /** Column-Annotation for S2Dao. ColumnDefinition -- PK : INTEGER : NotNull*/ + public static final String specialsId_COLUMN = "SPECIALS_ID"; + + /** + * Get the value of specialsId.
+ * {PK : INTEGER : NotNull} + * + * @return The value of specialsId. (Nullable) + */ + public java.math.BigDecimal getSpecialsId() { + return _specialsId; + } + + /** + * Set the value of specialsId.
+ * {PK : INTEGER : NotNull} + * + * @param specialsId The value of specialsId. (Nullable) + */ + public void setSpecialsId(java.math.BigDecimal specialsId) { + _modifiedProperties.addPropertyName("specialsId"); + _specialsId = specialsId; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- INTEGER : NotNull*/ + public static final String productsId_COLUMN = "PRODUCTS_ID"; + + /** + * Get the value of productsId.
+ * {INTEGER : NotNull} + * + * @return The value of productsId. (Nullable) + */ + public java.math.BigDecimal getProductsId() { + return _productsId; + } + + /** + * Set the value of productsId.
+ * {INTEGER : NotNull} + * + * @param productsId The value of productsId. (Nullable) + */ + public void setProductsId(java.math.BigDecimal productsId) { + _modifiedProperties.addPropertyName("productsId"); + _productsId = productsId; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- DECIMAL(15) : NotNull*/ + public static final String specialsNewProductsPrice_COLUMN = "SPECIALS_NEW_PRODUCTS_PRICE"; + + /** + * Get the value of specialsNewProductsPrice.
+ * {DECIMAL(15) : NotNull} + * + * @return The value of specialsNewProductsPrice. (Nullable) + */ + public java.math.BigDecimal getSpecialsNewProductsPrice() { + return _specialsNewProductsPrice; + } + + /** + * Set the value of specialsNewProductsPrice.
+ * {DECIMAL(15) : NotNull} + * + * @param specialsNewProductsPrice The value of specialsNewProductsPrice. (Nullable) + */ + public void setSpecialsNewProductsPrice(java.math.BigDecimal specialsNewProductsPrice) { + _modifiedProperties.addPropertyName("specialsNewProductsPrice"); + _specialsNewProductsPrice = specialsNewProductsPrice; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- TIMESTAMP*/ + public static final String specialsDateAdded_COLUMN = "SPECIALS_DATE_ADDED"; + + /** + * Get the value of specialsDateAdded.
+ * {TIMESTAMP} + * + * @return The value of specialsDateAdded. (Nullable) + */ + public java.sql.Timestamp getSpecialsDateAdded() { + return _specialsDateAdded; + } + + /** + * Set the value of specialsDateAdded.
+ * {TIMESTAMP} + * + * @param specialsDateAdded The value of specialsDateAdded. (Nullable) + */ + public void setSpecialsDateAdded(java.sql.Timestamp specialsDateAdded) { + _modifiedProperties.addPropertyName("specialsDateAdded"); + _specialsDateAdded = specialsDateAdded; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- TIMESTAMP*/ + public static final String specialsLastModified_COLUMN = "SPECIALS_LAST_MODIFIED"; + + /** + * Get the value of specialsLastModified.
+ * {TIMESTAMP} + * + * @return The value of specialsLastModified. (Nullable) + */ + public java.sql.Timestamp getSpecialsLastModified() { + return _specialsLastModified; + } + + /** + * Set the value of specialsLastModified.
+ * {TIMESTAMP} + * + * @param specialsLastModified The value of specialsLastModified. (Nullable) + */ + public void setSpecialsLastModified(java.sql.Timestamp specialsLastModified) { + _modifiedProperties.addPropertyName("specialsLastModified"); + _specialsLastModified = specialsLastModified; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- TIMESTAMP*/ + public static final String expiresDate_COLUMN = "EXPIRES_DATE"; + + /** + * Get the value of expiresDate.
+ * {TIMESTAMP} + * + * @return The value of expiresDate. (Nullable) + */ + public java.sql.Timestamp getExpiresDate() { + return _expiresDate; + } + + /** + * Set the value of expiresDate.
+ * {TIMESTAMP} + * + * @param expiresDate The value of expiresDate. (Nullable) + */ + public void setExpiresDate(java.sql.Timestamp expiresDate) { + _modifiedProperties.addPropertyName("expiresDate"); + _expiresDate = expiresDate; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- TIMESTAMP*/ + public static final String dateStatusChange_COLUMN = "DATE_STATUS_CHANGE"; + + /** + * Get the value of dateStatusChange.
+ * {TIMESTAMP} + * + * @return The value of dateStatusChange. (Nullable) + */ + public java.sql.Timestamp getDateStatusChange() { + return _dateStatusChange; + } + + /** + * Set the value of dateStatusChange.
+ * {TIMESTAMP} + * + * @param dateStatusChange The value of dateStatusChange. (Nullable) + */ + public void setDateStatusChange(java.sql.Timestamp dateStatusChange) { + _modifiedProperties.addPropertyName("dateStatusChange"); + _dateStatusChange = dateStatusChange; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- INTEGER : NotNull : Default=[1]*/ + public static final String status_COLUMN = "STATUS"; + + /** + * Get the value of status.
+ * {INTEGER : NotNull : Default=[1]} + * + * @return The value of status. (Nullable) + */ + public java.math.BigDecimal getStatus() { + return _status; + } + + /** + * Set the value of status.
+ * {INTEGER : NotNull : Default=[1]} + * + * @param status The value of status. (Nullable) + */ + public void setStatus(java.math.BigDecimal status) { + _modifiedProperties.addPropertyName("status"); + _status = status; + } + + + // =================================================================================== + // Classify Method + // =============== + + // =================================================================================== + // Classification Determination + // ============================ + + + // =================================================================================== + // Classification Getter + // ===================== + + + // =================================================================================== + // Foreign Table + // ============= + + // =================================================================================== + // Refferer Table + // ============== + + // =================================================================================== + // Accept + // ====== + /** + * This method implements the method that is declared at super. + * + * @param primaryKeyMap Primary key map. (NotNull and NotEmpty) + * @deprecated Please use SpecialsDbm.getInstance().acceptPrimaryKeyMap(entity, primaryKeyMap); + */ + public void acceptPrimaryKeyMap(java.util.Map primaryKeyMap) { + getDBMeta().acceptPrimaryKeyMap(this, primaryKeyMap); + } + + /** + * This method implements the method that is declared at super. + * + * @param primaryKeyMapString Primary-key map-string. (NotNull and NotEmpty) + * @deprecated Please use SpecialsDbm.getInstance().acceptPrimaryKeyMapString(entity, primaryKeyMapString); + */ + public void acceptPrimaryKeyMapString(String primaryKeyMapString) { + getDBMeta().acceptPrimaryKeyMapString(this, primaryKeyMapString); + } + + /** + * This method implements the method that is declared at super. + * + * @param columnValueMap Column-value map. (NotNull and NotEmpty) + * @deprecated Please use SpecialsDbm.getInstance().acceptColumnValueMap(entity, columnValueMap); + */ + public void acceptColumnValueMap(java.util.Map columnValueMap) { + getDBMeta().acceptColumnValueMap(this, columnValueMap); + } + + /** + * This method implements the method that is declared at super. + * + * @param columnValueMapString Column-value map-string. (NotNull and NotEmpty) + * @deprecated Please use SpecialsDbm.getInstance().acceptColumnValueMap(entity, columnValueMapString); + */ + public void acceptColumnValueMapString(String columnValueMapString) { + getDBMeta().acceptColumnValueMapString(this, columnValueMapString); + } + + // =================================================================================== + // Extract + // ======= + /** + * This method implements the method that is declared at super. + * + * @return Primary-key map-string. (NotNull) + * @deprecated Please use SpecialsDbm.getInstance().extractPrimaryKeyMapString(entity); + */ + public String extractPrimaryKeyMapString() { + return getDBMeta().extractPrimaryKeyMapString(this); + } + + /** + * Extract primary-key map-string. + * + * @param startBrace Start-brace. (NotNull) + * @param endBrace End-brace. (NotNull) + * @param delimiter Delimiter. (NotNull) + * @param equal Equal. (NotNull) + * @return Primary-key map-string. (NotNull) + * @deprecated Please use SpecialsDbm.getInstance().extractPrimaryKeyMapString(entity, startBrace, endBrace, delimiter, equal); + */ + public String extractPrimaryKeyMapString(String startBrace, String endBrace, String delimiter, String equal) { + return getDBMeta().extractPrimaryKeyMapString(this, startBrace, endBrace, delimiter, equal); + } + + /** + * This method implements the method that is declared at super. + * + * @return Column-value map-string. (NotNull) + * @deprecated Please use SpecialsDbm.getInstance().extractColumnValueMapString(entity); + */ + public String extractColumnValueMapString() { + return getDBMeta().extractColumnValueMapString(this); + } + + /** + * Extract column-value map-string. + * + * @param startBrace Start-brace. (NotNull) + * @param endBrace End-brace. (NotNull) + * @param delimiter Delimiter. (NotNull) + * @param equal Equal. (NotNull) + * @return Column-value map-string. (NotNull) + * @deprecated Please use SpecialsDbm.getInstance().extractColumnValueMapString(entity, startBrace, endBrace, delimiter, equal); + */ + public String extractColumnValueMapString(String startBrace, String endBrace, String delimiter, String equal) { + return getDBMeta().extractColumnValueMapString(this, startBrace, endBrace, delimiter, equal); + } + + + // =================================================================================== + // Determination + // ============= + /** + * This method implements the method that is declared at super. + * + * @return Determination. + */ + public boolean hasPrimaryKeyValue() { + + if (_specialsId == null) { + return false; + } + + return true; + } + + // =================================================================================== + // Modified Properties + // =================== + /** + * Get modified property names. (S2Dao uses this for updateModifiedProperties()) + * + * @return Modified property names. (NotNull) + */ + public java.util.Set getModifiedPropertyNames() { + return _modifiedProperties.getPropertyNames(); + } + + /** + * New entity modified properties. You can override this at the sub-class if you need it. + * + * @return Entity modified properties. (NotNull) + */ + protected EntityModifiedProperties newEntityModifiedProperties() { + return new EntityModifiedProperties(); + } + + /** + * Clear modified property names. + */ + public void clearModifiedPropertyNames() { + _modifiedProperties.clear(); + } + + // =================================================================================== + // Basic Override + // ============== + + /** + * This method overrides the method that is declared at super. + * If the primary-key of the other is same as this one, returns true. + * + * @param other Other entity. + * @return Comparing result. + */ + public boolean equals(Object other) { + if (other == null) { + return false; + } + if (!(other instanceof BsSpecials)) { + return false; + } + final BsSpecials otherEntity = (BsSpecials)other; + + if (getSpecialsId() == null || !getSpecialsId().equals(otherEntity.getSpecialsId())) { + return false; + } + + return true; + } + + /** + * This method overrides the method that is declared at super. + * Calculates hash-code from primary-key. + * + * @return Hash-code from primary-keys. + */ + public int hashCode() { + int result = 0; + + if (this.getSpecialsId() != null) { + result = result + getSpecialsId().hashCode(); + } + + return result; + } + + /** + * This method overrides the method that is declared at super. + * + * @return Column-value map-string. (NotNull) + */ + public String toString() { + final String delimiter = ","; + final StringBuffer sb = new StringBuffer(); + + sb.append(delimiter).append(getSpecialsId()); + sb.append(delimiter).append(getProductsId()); + sb.append(delimiter).append(getSpecialsNewProductsPrice()); + sb.append(delimiter).append(getSpecialsDateAdded()); + sb.append(delimiter).append(getSpecialsLastModified()); + sb.append(delimiter).append(getExpiresDate()); + sb.append(delimiter).append(getDateStatusChange()); + sb.append(delimiter).append(getStatus()); + + sb.delete(0, delimiter.length()); + sb.insert(0, "{").append("}"); + return sb.toString(); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/BsTaxClass.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/BsTaxClass.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/BsTaxClass.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,472 @@ +package jp.sf.pal.pompei.bsentity; + + +import jp.sf.pal.pompei.allcommon.Entity; +import jp.sf.pal.pompei.allcommon.dbmeta.DBMeta; +import jp.sf.pal.pompei.allcommon.dbmeta.DBMetaInstanceHandler; + +/** + * The entity of TAX_CLASS. + * + *
+ * [primary-key]
+ *     TAX_CLASS_ID
+ * 
+ * [column-property]
+ *     TAX_CLASS_ID, TAX_CLASS_TITLE, TAX_CLASS_DESCRIPTION, LAST_MODIFIED, DATE_ADDED
+ * 
+ * [foreign-property]
+ *     
+ * 
+ * [refferer-property]
+ *     
+ * 
+ * [sequence]
+ *     
+ * 
+ * [identity]
+ *     
+ * 
+ * [update-date]
+ *     
+ * 
+ * [version-no]
+ *     
+ * 
+ * 
+ * + * @author DBFlute(AutoGenerator) + */ +public abstract class BsTaxClass implements Entity, java.io.Serializable { + + /** Serial version UID. (Default) */ + private static final long serialVersionUID = 1L; + + /** TABLE-Annotation for S2Dao */ + public static final String TABLE = "TAX_CLASS"; + + + // =================================================================================== + // Attribute + // ========= + /** Entity modified properties. (for S2Dao) */ + protected EntityModifiedProperties _modifiedProperties = newEntityModifiedProperties(); + + + /** The value of taxClassId. ColumnDefinition -- PK : INTEGER : NotNull*/ + protected java.math.BigDecimal _taxClassId; + + /** The value of taxClassTitle. ColumnDefinition -- VARCHAR(32) : NotNull*/ + protected String _taxClassTitle; + + /** The value of taxClassDescription. ColumnDefinition -- VARCHAR(255) : NotNull*/ + protected String _taxClassDescription; + + /** The value of lastModified. ColumnDefinition -- TIMESTAMP*/ + protected java.sql.Timestamp _lastModified; + + /** The value of dateAdded. ColumnDefinition -- TIMESTAMP : NotNull*/ + protected java.sql.Timestamp _dateAdded; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + public BsTaxClass() { + } + + + // =================================================================================== + // DBMeta + // ====== + /** + * This method implements the method that is declared at super. + * + * @return DBMeta. (NotNull) + */ + public DBMeta getDBMeta() { + return DBMetaInstanceHandler.getInstanceByTableDbName(getTableDbName()); + } + + // =================================================================================== + // Table Name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + public String getTableDbName() { + return "TAX_CLASS"; + } + + /** + * This method implements the method that is declared at super. + * + * @return Table cap-prop-name. (NotNull) + */ + public String getTableCapPropName() { + return "TaxClass"; + } + + /** + * This method implements the method that is declared at super. + * + * @return Table uncap-prop-name. (NotNull) + */ + public String getTableUncapPropName() { + return "taxClass"; + } + + // =================================================================================== + // Accessor + // ======== + + /** Column-Annotation for S2Dao. ColumnDefinition -- PK : INTEGER : NotNull*/ + public static final String taxClassId_COLUMN = "TAX_CLASS_ID"; + + /** + * Get the value of taxClassId.
+ * {PK : INTEGER : NotNull} + * + * @return The value of taxClassId. (Nullable) + */ + public java.math.BigDecimal getTaxClassId() { + return _taxClassId; + } + + /** + * Set the value of taxClassId.
+ * {PK : INTEGER : NotNull} + * + * @param taxClassId The value of taxClassId. (Nullable) + */ + public void setTaxClassId(java.math.BigDecimal taxClassId) { + _modifiedProperties.addPropertyName("taxClassId"); + _taxClassId = taxClassId; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- VARCHAR(32) : NotNull*/ + public static final String taxClassTitle_COLUMN = "TAX_CLASS_TITLE"; + + /** + * Get the value of taxClassTitle.
+ * {VARCHAR(32) : NotNull} + * + * @return The value of taxClassTitle. (Nullable) + */ + public String getTaxClassTitle() { + return _taxClassTitle; + } + + /** + * Set the value of taxClassTitle.
+ * {VARCHAR(32) : NotNull} + * + * @param taxClassTitle The value of taxClassTitle. (Nullable) + */ + public void setTaxClassTitle(String taxClassTitle) { + _modifiedProperties.addPropertyName("taxClassTitle"); + _taxClassTitle = taxClassTitle; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- VARCHAR(255) : NotNull*/ + public static final String taxClassDescription_COLUMN = "TAX_CLASS_DESCRIPTION"; + + /** + * Get the value of taxClassDescription.
+ * {VARCHAR(255) : NotNull} + * + * @return The value of taxClassDescription. (Nullable) + */ + public String getTaxClassDescription() { + return _taxClassDescription; + } + + /** + * Set the value of taxClassDescription.
+ * {VARCHAR(255) : NotNull} + * + * @param taxClassDescription The value of taxClassDescription. (Nullable) + */ + public void setTaxClassDescription(String taxClassDescription) { + _modifiedProperties.addPropertyName("taxClassDescription"); + _taxClassDescription = taxClassDescription; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- TIMESTAMP*/ + public static final String lastModified_COLUMN = "LAST_MODIFIED"; + + /** + * Get the value of lastModified.
+ * {TIMESTAMP} + * + * @return The value of lastModified. (Nullable) + */ + public java.sql.Timestamp getLastModified() { + return _lastModified; + } + + /** + * Set the value of lastModified.
+ * {TIMESTAMP} + * + * @param lastModified The value of lastModified. (Nullable) + */ + public void setLastModified(java.sql.Timestamp lastModified) { + _modifiedProperties.addPropertyName("lastModified"); + _lastModified = lastModified; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- TIMESTAMP : NotNull*/ + public static final String dateAdded_COLUMN = "DATE_ADDED"; + + /** + * Get the value of dateAdded.
+ * {TIMESTAMP : NotNull} + * + * @return The value of dateAdded. (Nullable) + */ + public java.sql.Timestamp getDateAdded() { + return _dateAdded; + } + + /** + * Set the value of dateAdded.
+ * {TIMESTAMP : NotNull} + * + * @param dateAdded The value of dateAdded. (Nullable) + */ + public void setDateAdded(java.sql.Timestamp dateAdded) { + _modifiedProperties.addPropertyName("dateAdded"); + _dateAdded = dateAdded; + } + + + // =================================================================================== + // Classify Method + // =============== + + // =================================================================================== + // Classification Determination + // ============================ + + + // =================================================================================== + // Classification Getter + // ===================== + + + // =================================================================================== + // Foreign Table + // ============= + + // =================================================================================== + // Refferer Table + // ============== + + // =================================================================================== + // Accept + // ====== + /** + * This method implements the method that is declared at super. + * + * @param primaryKeyMap Primary key map. (NotNull and NotEmpty) + * @deprecated Please use TaxClassDbm.getInstance().acceptPrimaryKeyMap(entity, primaryKeyMap); + */ + public void acceptPrimaryKeyMap(java.util.Map primaryKeyMap) { + getDBMeta().acceptPrimaryKeyMap(this, primaryKeyMap); + } + + /** + * This method implements the method that is declared at super. + * + * @param primaryKeyMapString Primary-key map-string. (NotNull and NotEmpty) + * @deprecated Please use TaxClassDbm.getInstance().acceptPrimaryKeyMapString(entity, primaryKeyMapString); + */ + public void acceptPrimaryKeyMapString(String primaryKeyMapString) { + getDBMeta().acceptPrimaryKeyMapString(this, primaryKeyMapString); + } + + /** + * This method implements the method that is declared at super. + * + * @param columnValueMap Column-value map. (NotNull and NotEmpty) + * @deprecated Please use TaxClassDbm.getInstance().acceptColumnValueMap(entity, columnValueMap); + */ + public void acceptColumnValueMap(java.util.Map columnValueMap) { + getDBMeta().acceptColumnValueMap(this, columnValueMap); + } + + /** + * This method implements the method that is declared at super. + * + * @param columnValueMapString Column-value map-string. (NotNull and NotEmpty) + * @deprecated Please use TaxClassDbm.getInstance().acceptColumnValueMap(entity, columnValueMapString); + */ + public void acceptColumnValueMapString(String columnValueMapString) { + getDBMeta().acceptColumnValueMapString(this, columnValueMapString); + } + + // =================================================================================== + // Extract + // ======= + /** + * This method implements the method that is declared at super. + * + * @return Primary-key map-string. (NotNull) + * @deprecated Please use TaxClassDbm.getInstance().extractPrimaryKeyMapString(entity); + */ + public String extractPrimaryKeyMapString() { + return getDBMeta().extractPrimaryKeyMapString(this); + } + + /** + * Extract primary-key map-string. + * + * @param startBrace Start-brace. (NotNull) + * @param endBrace End-brace. (NotNull) + * @param delimiter Delimiter. (NotNull) + * @param equal Equal. (NotNull) + * @return Primary-key map-string. (NotNull) + * @deprecated Please use TaxClassDbm.getInstance().extractPrimaryKeyMapString(entity, startBrace, endBrace, delimiter, equal); + */ + public String extractPrimaryKeyMapString(String startBrace, String endBrace, String delimiter, String equal) { + return getDBMeta().extractPrimaryKeyMapString(this, startBrace, endBrace, delimiter, equal); + } + + /** + * This method implements the method that is declared at super. + * + * @return Column-value map-string. (NotNull) + * @deprecated Please use TaxClassDbm.getInstance().extractColumnValueMapString(entity); + */ + public String extractColumnValueMapString() { + return getDBMeta().extractColumnValueMapString(this); + } + + /** + * Extract column-value map-string. + * + * @param startBrace Start-brace. (NotNull) + * @param endBrace End-brace. (NotNull) + * @param delimiter Delimiter. (NotNull) + * @param equal Equal. (NotNull) + * @return Column-value map-string. (NotNull) + * @deprecated Please use TaxClassDbm.getInstance().extractColumnValueMapString(entity, startBrace, endBrace, delimiter, equal); + */ + public String extractColumnValueMapString(String startBrace, String endBrace, String delimiter, String equal) { + return getDBMeta().extractColumnValueMapString(this, startBrace, endBrace, delimiter, equal); + } + + + // =================================================================================== + // Determination + // ============= + /** + * This method implements the method that is declared at super. + * + * @return Determination. + */ + public boolean hasPrimaryKeyValue() { + + if (_taxClassId == null) { + return false; + } + + return true; + } + + // =================================================================================== + // Modified Properties + // =================== + /** + * Get modified property names. (S2Dao uses this for updateModifiedProperties()) + * + * @return Modified property names. (NotNull) + */ + public java.util.Set getModifiedPropertyNames() { + return _modifiedProperties.getPropertyNames(); + } + + /** + * New entity modified properties. You can override this at the sub-class if you need it. + * + * @return Entity modified properties. (NotNull) + */ + protected EntityModifiedProperties newEntityModifiedProperties() { + return new EntityModifiedProperties(); + } + + /** + * Clear modified property names. + */ + public void clearModifiedPropertyNames() { + _modifiedProperties.clear(); + } + + // =================================================================================== + // Basic Override + // ============== + + /** + * This method overrides the method that is declared at super. + * If the primary-key of the other is same as this one, returns true. + * + * @param other Other entity. + * @return Comparing result. + */ + public boolean equals(Object other) { + if (other == null) { + return false; + } + if (!(other instanceof BsTaxClass)) { + return false; + } + final BsTaxClass otherEntity = (BsTaxClass)other; + + if (getTaxClassId() == null || !getTaxClassId().equals(otherEntity.getTaxClassId())) { + return false; + } + + return true; + } + + /** + * This method overrides the method that is declared at super. + * Calculates hash-code from primary-key. + * + * @return Hash-code from primary-keys. + */ + public int hashCode() { + int result = 0; + + if (this.getTaxClassId() != null) { + result = result + getTaxClassId().hashCode(); + } + + return result; + } + + /** + * This method overrides the method that is declared at super. + * + * @return Column-value map-string. (NotNull) + */ + public String toString() { + final String delimiter = ","; + final StringBuffer sb = new StringBuffer(); + + sb.append(delimiter).append(getTaxClassId()); + sb.append(delimiter).append(getTaxClassTitle()); + sb.append(delimiter).append(getTaxClassDescription()); + sb.append(delimiter).append(getLastModified()); + sb.append(delimiter).append(getDateAdded()); + + sb.delete(0, delimiter.length()); + sb.insert(0, "{").append("}"); + return sb.toString(); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/BsTaxRates.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/BsTaxRates.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/BsTaxRates.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,556 @@ +package jp.sf.pal.pompei.bsentity; + + +import jp.sf.pal.pompei.allcommon.Entity; +import jp.sf.pal.pompei.allcommon.dbmeta.DBMeta; +import jp.sf.pal.pompei.allcommon.dbmeta.DBMetaInstanceHandler; + +/** + * The entity of TAX_RATES. + * + *
+ * [primary-key]
+ *     TAX_RATES_ID
+ * 
+ * [column-property]
+ *     TAX_RATES_ID, TAX_ZONE_ID, TAX_CLASS_ID, TAX_PRIORITY, TAX_RATE, TAX_DESCRIPTION, LAST_MODIFIED, DATE_ADDED
+ * 
+ * [foreign-property]
+ *     
+ * 
+ * [refferer-property]
+ *     
+ * 
+ * [sequence]
+ *     
+ * 
+ * [identity]
+ *     
+ * 
+ * [update-date]
+ *     
+ * 
+ * [version-no]
+ *     
+ * 
+ * 
+ * + * @author DBFlute(AutoGenerator) + */ +public abstract class BsTaxRates implements Entity, java.io.Serializable { + + /** Serial version UID. (Default) */ + private static final long serialVersionUID = 1L; + + /** TABLE-Annotation for S2Dao */ + public static final String TABLE = "TAX_RATES"; + + + // =================================================================================== + // Attribute + // ========= + /** Entity modified properties. (for S2Dao) */ + protected EntityModifiedProperties _modifiedProperties = newEntityModifiedProperties(); + + + /** The value of taxRatesId. ColumnDefinition -- PK : INTEGER : NotNull*/ + protected java.math.BigDecimal _taxRatesId; + + /** The value of taxZoneId. ColumnDefinition -- INTEGER : NotNull*/ + protected java.math.BigDecimal _taxZoneId; + + /** The value of taxClassId. ColumnDefinition -- INTEGER : NotNull*/ + protected java.math.BigDecimal _taxClassId; + + /** The value of taxPriority. ColumnDefinition -- INTEGER : Default=[1]*/ + protected java.math.BigDecimal _taxPriority; + + /** The value of taxRate. ColumnDefinition -- DECIMAL(7) : NotNull*/ + protected java.math.BigDecimal _taxRate; + + /** The value of taxDescription. ColumnDefinition -- VARCHAR(255) : NotNull*/ + protected String _taxDescription; + + /** The value of lastModified. ColumnDefinition -- TIMESTAMP*/ + protected java.sql.Timestamp _lastModified; + + /** The value of dateAdded. ColumnDefinition -- TIMESTAMP : NotNull*/ + protected java.sql.Timestamp _dateAdded; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + public BsTaxRates() { + } + + + // =================================================================================== + // DBMeta + // ====== + /** + * This method implements the method that is declared at super. + * + * @return DBMeta. (NotNull) + */ + public DBMeta getDBMeta() { + return DBMetaInstanceHandler.getInstanceByTableDbName(getTableDbName()); + } + + // =================================================================================== + // Table Name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + public String getTableDbName() { + return "TAX_RATES"; + } + + /** + * This method implements the method that is declared at super. + * + * @return Table cap-prop-name. (NotNull) + */ + public String getTableCapPropName() { + return "TaxRates"; + } + + /** + * This method implements the method that is declared at super. + * + * @return Table uncap-prop-name. (NotNull) + */ + public String getTableUncapPropName() { + return "taxRates"; + } + + // =================================================================================== + // Accessor + // ======== + + /** Column-Annotation for S2Dao. ColumnDefinition -- PK : INTEGER : NotNull*/ + public static final String taxRatesId_COLUMN = "TAX_RATES_ID"; + + /** + * Get the value of taxRatesId.
+ * {PK : INTEGER : NotNull} + * + * @return The value of taxRatesId. (Nullable) + */ + public java.math.BigDecimal getTaxRatesId() { + return _taxRatesId; + } + + /** + * Set the value of taxRatesId.
+ * {PK : INTEGER : NotNull} + * + * @param taxRatesId The value of taxRatesId. (Nullable) + */ + public void setTaxRatesId(java.math.BigDecimal taxRatesId) { + _modifiedProperties.addPropertyName("taxRatesId"); + _taxRatesId = taxRatesId; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- INTEGER : NotNull*/ + public static final String taxZoneId_COLUMN = "TAX_ZONE_ID"; + + /** + * Get the value of taxZoneId.
+ * {INTEGER : NotNull} + * + * @return The value of taxZoneId. (Nullable) + */ + public java.math.BigDecimal getTaxZoneId() { + return _taxZoneId; + } + + /** + * Set the value of taxZoneId.
+ * {INTEGER : NotNull} + * + * @param taxZoneId The value of taxZoneId. (Nullable) + */ + public void setTaxZoneId(java.math.BigDecimal taxZoneId) { + _modifiedProperties.addPropertyName("taxZoneId"); + _taxZoneId = taxZoneId; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- INTEGER : NotNull*/ + public static final String taxClassId_COLUMN = "TAX_CLASS_ID"; + + /** + * Get the value of taxClassId.
+ * {INTEGER : NotNull} + * + * @return The value of taxClassId. (Nullable) + */ + public java.math.BigDecimal getTaxClassId() { + return _taxClassId; + } + + /** + * Set the value of taxClassId.
+ * {INTEGER : NotNull} + * + * @param taxClassId The value of taxClassId. (Nullable) + */ + public void setTaxClassId(java.math.BigDecimal taxClassId) { + _modifiedProperties.addPropertyName("taxClassId"); + _taxClassId = taxClassId; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- INTEGER : Default=[1]*/ + public static final String taxPriority_COLUMN = "TAX_PRIORITY"; + + /** + * Get the value of taxPriority.
+ * {INTEGER : Default=[1]} + * + * @return The value of taxPriority. (Nullable) + */ + public java.math.BigDecimal getTaxPriority() { + return _taxPriority; + } + + /** + * Set the value of taxPriority.
+ * {INTEGER : Default=[1]} + * + * @param taxPriority The value of taxPriority. (Nullable) + */ + public void setTaxPriority(java.math.BigDecimal taxPriority) { + _modifiedProperties.addPropertyName("taxPriority"); + _taxPriority = taxPriority; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- DECIMAL(7) : NotNull*/ + public static final String taxRate_COLUMN = "TAX_RATE"; + + /** + * Get the value of taxRate.
+ * {DECIMAL(7) : NotNull} + * + * @return The value of taxRate. (Nullable) + */ + public java.math.BigDecimal getTaxRate() { + return _taxRate; + } + + /** + * Set the value of taxRate.
+ * {DECIMAL(7) : NotNull} + * + * @param taxRate The value of taxRate. (Nullable) + */ + public void setTaxRate(java.math.BigDecimal taxRate) { + _modifiedProperties.addPropertyName("taxRate"); + _taxRate = taxRate; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- VARCHAR(255) : NotNull*/ + public static final String taxDescription_COLUMN = "TAX_DESCRIPTION"; + + /** + * Get the value of taxDescription.
+ * {VARCHAR(255) : NotNull} + * + * @return The value of taxDescription. (Nullable) + */ + public String getTaxDescription() { + return _taxDescription; + } + + /** + * Set the value of taxDescription.
+ * {VARCHAR(255) : NotNull} + * + * @param taxDescription The value of taxDescription. (Nullable) + */ + public void setTaxDescription(String taxDescription) { + _modifiedProperties.addPropertyName("taxDescription"); + _taxDescription = taxDescription; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- TIMESTAMP*/ + public static final String lastModified_COLUMN = "LAST_MODIFIED"; + + /** + * Get the value of lastModified.
+ * {TIMESTAMP} + * + * @return The value of lastModified. (Nullable) + */ + public java.sql.Timestamp getLastModified() { + return _lastModified; + } + + /** + * Set the value of lastModified.
+ * {TIMESTAMP} + * + * @param lastModified The value of lastModified. (Nullable) + */ + public void setLastModified(java.sql.Timestamp lastModified) { + _modifiedProperties.addPropertyName("lastModified"); + _lastModified = lastModified; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- TIMESTAMP : NotNull*/ + public static final String dateAdded_COLUMN = "DATE_ADDED"; + + /** + * Get the value of dateAdded.
+ * {TIMESTAMP : NotNull} + * + * @return The value of dateAdded. (Nullable) + */ + public java.sql.Timestamp getDateAdded() { + return _dateAdded; + } + + /** + * Set the value of dateAdded.
+ * {TIMESTAMP : NotNull} + * + * @param dateAdded The value of dateAdded. (Nullable) + */ + public void setDateAdded(java.sql.Timestamp dateAdded) { + _modifiedProperties.addPropertyName("dateAdded"); + _dateAdded = dateAdded; + } + + + // =================================================================================== + // Classify Method + // =============== + + // =================================================================================== + // Classification Determination + // ============================ + + + // =================================================================================== + // Classification Getter + // ===================== + + + // =================================================================================== + // Foreign Table + // ============= + + // =================================================================================== + // Refferer Table + // ============== + + // =================================================================================== + // Accept + // ====== + /** + * This method implements the method that is declared at super. + * + * @param primaryKeyMap Primary key map. (NotNull and NotEmpty) + * @deprecated Please use TaxRatesDbm.getInstance().acceptPrimaryKeyMap(entity, primaryKeyMap); + */ + public void acceptPrimaryKeyMap(java.util.Map primaryKeyMap) { + getDBMeta().acceptPrimaryKeyMap(this, primaryKeyMap); + } + + /** + * This method implements the method that is declared at super. + * + * @param primaryKeyMapString Primary-key map-string. (NotNull and NotEmpty) + * @deprecated Please use TaxRatesDbm.getInstance().acceptPrimaryKeyMapString(entity, primaryKeyMapString); + */ + public void acceptPrimaryKeyMapString(String primaryKeyMapString) { + getDBMeta().acceptPrimaryKeyMapString(this, primaryKeyMapString); + } + + /** + * This method implements the method that is declared at super. + * + * @param columnValueMap Column-value map. (NotNull and NotEmpty) + * @deprecated Please use TaxRatesDbm.getInstance().acceptColumnValueMap(entity, columnValueMap); + */ + public void acceptColumnValueMap(java.util.Map columnValueMap) { + getDBMeta().acceptColumnValueMap(this, columnValueMap); + } + + /** + * This method implements the method that is declared at super. + * + * @param columnValueMapString Column-value map-string. (NotNull and NotEmpty) + * @deprecated Please use TaxRatesDbm.getInstance().acceptColumnValueMap(entity, columnValueMapString); + */ + public void acceptColumnValueMapString(String columnValueMapString) { + getDBMeta().acceptColumnValueMapString(this, columnValueMapString); + } + + // =================================================================================== + // Extract + // ======= + /** + * This method implements the method that is declared at super. + * + * @return Primary-key map-string. (NotNull) + * @deprecated Please use TaxRatesDbm.getInstance().extractPrimaryKeyMapString(entity); + */ + public String extractPrimaryKeyMapString() { + return getDBMeta().extractPrimaryKeyMapString(this); + } + + /** + * Extract primary-key map-string. + * + * @param startBrace Start-brace. (NotNull) + * @param endBrace End-brace. (NotNull) + * @param delimiter Delimiter. (NotNull) + * @param equal Equal. (NotNull) + * @return Primary-key map-string. (NotNull) + * @deprecated Please use TaxRatesDbm.getInstance().extractPrimaryKeyMapString(entity, startBrace, endBrace, delimiter, equal); + */ + public String extractPrimaryKeyMapString(String startBrace, String endBrace, String delimiter, String equal) { + return getDBMeta().extractPrimaryKeyMapString(this, startBrace, endBrace, delimiter, equal); + } + + /** + * This method implements the method that is declared at super. + * + * @return Column-value map-string. (NotNull) + * @deprecated Please use TaxRatesDbm.getInstance().extractColumnValueMapString(entity); + */ + public String extractColumnValueMapString() { + return getDBMeta().extractColumnValueMapString(this); + } + + /** + * Extract column-value map-string. + * + * @param startBrace Start-brace. (NotNull) + * @param endBrace End-brace. (NotNull) + * @param delimiter Delimiter. (NotNull) + * @param equal Equal. (NotNull) + * @return Column-value map-string. (NotNull) + * @deprecated Please use TaxRatesDbm.getInstance().extractColumnValueMapString(entity, startBrace, endBrace, delimiter, equal); + */ + public String extractColumnValueMapString(String startBrace, String endBrace, String delimiter, String equal) { + return getDBMeta().extractColumnValueMapString(this, startBrace, endBrace, delimiter, equal); + } + + + // =================================================================================== + // Determination + // ============= + /** + * This method implements the method that is declared at super. + * + * @return Determination. + */ + public boolean hasPrimaryKeyValue() { + + if (_taxRatesId == null) { + return false; + } + + return true; + } + + // =================================================================================== + // Modified Properties + // =================== + /** + * Get modified property names. (S2Dao uses this for updateModifiedProperties()) + * + * @return Modified property names. (NotNull) + */ + public java.util.Set getModifiedPropertyNames() { + return _modifiedProperties.getPropertyNames(); + } + + /** + * New entity modified properties. You can override this at the sub-class if you need it. + * + * @return Entity modified properties. (NotNull) + */ + protected EntityModifiedProperties newEntityModifiedProperties() { + return new EntityModifiedProperties(); + } + + /** + * Clear modified property names. + */ + public void clearModifiedPropertyNames() { + _modifiedProperties.clear(); + } + + // =================================================================================== + // Basic Override + // ============== + + /** + * This method overrides the method that is declared at super. + * If the primary-key of the other is same as this one, returns true. + * + * @param other Other entity. + * @return Comparing result. + */ + public boolean equals(Object other) { + if (other == null) { + return false; + } + if (!(other instanceof BsTaxRates)) { + return false; + } + final BsTaxRates otherEntity = (BsTaxRates)other; + + if (getTaxRatesId() == null || !getTaxRatesId().equals(otherEntity.getTaxRatesId())) { + return false; + } + + return true; + } + + /** + * This method overrides the method that is declared at super. + * Calculates hash-code from primary-key. + * + * @return Hash-code from primary-keys. + */ + public int hashCode() { + int result = 0; + + if (this.getTaxRatesId() != null) { + result = result + getTaxRatesId().hashCode(); + } + + return result; + } + + /** + * This method overrides the method that is declared at super. + * + * @return Column-value map-string. (NotNull) + */ + public String toString() { + final String delimiter = ","; + final StringBuffer sb = new StringBuffer(); + + sb.append(delimiter).append(getTaxRatesId()); + sb.append(delimiter).append(getTaxZoneId()); + sb.append(delimiter).append(getTaxClassId()); + sb.append(delimiter).append(getTaxPriority()); + sb.append(delimiter).append(getTaxRate()); + sb.append(delimiter).append(getTaxDescription()); + sb.append(delimiter).append(getLastModified()); + sb.append(delimiter).append(getDateAdded()); + + sb.delete(0, delimiter.length()); + sb.insert(0, "{").append("}"); + return sb.toString(); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/BsWhosOnline.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/BsWhosOnline.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/BsWhosOnline.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,561 @@ +package jp.sf.pal.pompei.bsentity; + + +import jp.sf.pal.pompei.allcommon.Entity; +import jp.sf.pal.pompei.allcommon.dbmeta.DBMeta; +import jp.sf.pal.pompei.allcommon.dbmeta.DBMetaInstanceHandler; + +/** + * The entity of WHOS_ONLINE. + * + *
+ * [primary-key]
+ *     
+ * 
+ * [column-property]
+ *     CUSTOMER_ID, FULL_NAME, SESSION_ID, IP_ADDRESS, TIME_ENTRY, TIME_LAST_CLICK, LAST_PAGE_URL
+ * 
+ * [foreign-property]
+ *     
+ * 
+ * [refferer-property]
+ *     
+ * 
+ * [sequence]
+ *     
+ * 
+ * [identity]
+ *     
+ * 
+ * [update-date]
+ *     
+ * 
+ * [version-no]
+ *     
+ * 
+ * 
+ * + * @author DBFlute(AutoGenerator) + */ +public abstract class BsWhosOnline implements Entity, java.io.Serializable { + + /** Serial version UID. (Default) */ + private static final long serialVersionUID = 1L; + + /** TABLE-Annotation for S2Dao */ + public static final String TABLE = "WHOS_ONLINE"; + + + // =================================================================================== + // Attribute + // ========= + /** Entity modified properties. (for S2Dao) */ + protected EntityModifiedProperties _modifiedProperties = newEntityModifiedProperties(); + + + /** The value of customerId. ColumnDefinition -- INTEGER*/ + protected java.math.BigDecimal _customerId; + + /** The value of fullName. ColumnDefinition -- VARCHAR(64) : NotNull*/ + protected String _fullName; + + /** The value of sessionId. ColumnDefinition -- VARCHAR(128) : NotNull*/ + protected String _sessionId; + + /** The value of ipAddress. ColumnDefinition -- VARCHAR(15) : NotNull*/ + protected String _ipAddress; + + /** The value of timeEntry. ColumnDefinition -- VARCHAR(14) : NotNull*/ + protected String _timeEntry; + + /** The value of timeLastClick. ColumnDefinition -- VARCHAR(14) : NotNull*/ + protected String _timeLastClick; + + /** The value of lastPageUrl. ColumnDefinition -- VARCHAR(255) : NotNull*/ + protected String _lastPageUrl; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + public BsWhosOnline() { + } + + + // =================================================================================== + // DBMeta + // ====== + /** + * This method implements the method that is declared at super. + * + * @return DBMeta. (NotNull) + */ + public DBMeta getDBMeta() { + return DBMetaInstanceHandler.getInstanceByTableDbName(getTableDbName()); + } + + // =================================================================================== + // Table Name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + public String getTableDbName() { + return "WHOS_ONLINE"; + } + + /** + * This method implements the method that is declared at super. + * + * @return Table cap-prop-name. (NotNull) + */ + public String getTableCapPropName() { + return "WhosOnline"; + } + + /** + * This method implements the method that is declared at super. + * + * @return Table uncap-prop-name. (NotNull) + */ + public String getTableUncapPropName() { + return "whosOnline"; + } + + // =================================================================================== + // Accessor + // ======== + + /** Column-Annotation for S2Dao. ColumnDefinition -- INTEGER*/ + public static final String customerId_COLUMN = "CUSTOMER_ID"; + + /** + * Get the value of customerId.
+ * {INTEGER} + * + * @return The value of customerId. (Nullable) + */ + public java.math.BigDecimal getCustomerId() { + return _customerId; + } + + /** + * Set the value of customerId.
+ * {INTEGER} + * + * @param customerId The value of customerId. (Nullable) + */ + public void setCustomerId(java.math.BigDecimal customerId) { + _modifiedProperties.addPropertyName("customerId"); + _customerId = customerId; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- VARCHAR(64) : NotNull*/ + public static final String fullName_COLUMN = "FULL_NAME"; + + /** + * Get the value of fullName.
+ * {VARCHAR(64) : NotNull} + * + * @return The value of fullName. (Nullable) + */ + public String getFullName() { + return _fullName; + } + + /** + * Set the value of fullName.
+ * {VARCHAR(64) : NotNull} + * + * @param fullName The value of fullName. (Nullable) + */ + public void setFullName(String fullName) { + _modifiedProperties.addPropertyName("fullName"); + _fullName = fullName; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- VARCHAR(128) : NotNull*/ + public static final String sessionId_COLUMN = "SESSION_ID"; + + /** + * Get the value of sessionId.
+ * {VARCHAR(128) : NotNull} + * + * @return The value of sessionId. (Nullable) + */ + public String getSessionId() { + return _sessionId; + } + + /** + * Set the value of sessionId.
+ * {VARCHAR(128) : NotNull} + * + * @param sessionId The value of sessionId. (Nullable) + */ + public void setSessionId(String sessionId) { + _modifiedProperties.addPropertyName("sessionId"); + _sessionId = sessionId; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- VARCHAR(15) : NotNull*/ + public static final String ipAddress_COLUMN = "IP_ADDRESS"; + + /** + * Get the value of ipAddress.
+ * {VARCHAR(15) : NotNull} + * + * @return The value of ipAddress. (Nullable) + */ + public String getIpAddress() { + return _ipAddress; + } + + /** + * Set the value of ipAddress.
+ * {VARCHAR(15) : NotNull} + * + * @param ipAddress The value of ipAddress. (Nullable) + */ + public void setIpAddress(String ipAddress) { + _modifiedProperties.addPropertyName("ipAddress"); + _ipAddress = ipAddress; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- VARCHAR(14) : NotNull*/ + public static final String timeEntry_COLUMN = "TIME_ENTRY"; + + /** + * Get the value of timeEntry.
+ * {VARCHAR(14) : NotNull} + * + * @return The value of timeEntry. (Nullable) + */ + public String getTimeEntry() { + return _timeEntry; + } + + /** + * Set the value of timeEntry.
+ * {VARCHAR(14) : NotNull} + * + * @param timeEntry The value of timeEntry. (Nullable) + */ + public void setTimeEntry(String timeEntry) { + _modifiedProperties.addPropertyName("timeEntry"); + _timeEntry = timeEntry; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- VARCHAR(14) : NotNull*/ + public static final String timeLastClick_COLUMN = "TIME_LAST_CLICK"; + + /** + * Get the value of timeLastClick.
+ * {VARCHAR(14) : NotNull} + * + * @return The value of timeLastClick. (Nullable) + */ + public String getTimeLastClick() { + return _timeLastClick; + } + + /** + * Set the value of timeLastClick.
+ * {VARCHAR(14) : NotNull} + * + * @param timeLastClick The value of timeLastClick. (Nullable) + */ + public void setTimeLastClick(String timeLastClick) { + _modifiedProperties.addPropertyName("timeLastClick"); + _timeLastClick = timeLastClick; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- VARCHAR(255) : NotNull*/ + public static final String lastPageUrl_COLUMN = "LAST_PAGE_URL"; + + /** + * Get the value of lastPageUrl.
+ * {VARCHAR(255) : NotNull} + * + * @return The value of lastPageUrl. (Nullable) + */ + public String getLastPageUrl() { + return _lastPageUrl; + } + + /** + * Set the value of lastPageUrl.
+ * {VARCHAR(255) : NotNull} + * + * @param lastPageUrl The value of lastPageUrl. (Nullable) + */ + public void setLastPageUrl(String lastPageUrl) { + _modifiedProperties.addPropertyName("lastPageUrl"); + _lastPageUrl = lastPageUrl; + } + + + // =================================================================================== + // Classify Method + // =============== + + // =================================================================================== + // Classification Determination + // ============================ + + + // =================================================================================== + // Classification Getter + // ===================== + + + // =================================================================================== + // Foreign Table + // ============= + + // =================================================================================== + // Refferer Table + // ============== + + // =================================================================================== + // Accept + // ====== + /** + * This method implements the method that is declared at super. + * + * @param primaryKeyMap Primary key map. (NotNull and NotEmpty) + * @deprecated Please use WhosOnlineDbm.getInstance().acceptPrimaryKeyMap(entity, primaryKeyMap); + */ + public void acceptPrimaryKeyMap(java.util.Map primaryKeyMap) { + getDBMeta().acceptPrimaryKeyMap(this, primaryKeyMap); + } + + /** + * This method implements the method that is declared at super. + * + * @param primaryKeyMapString Primary-key map-string. (NotNull and NotEmpty) + * @deprecated Please use WhosOnlineDbm.getInstance().acceptPrimaryKeyMapString(entity, primaryKeyMapString); + */ + public void acceptPrimaryKeyMapString(String primaryKeyMapString) { + getDBMeta().acceptPrimaryKeyMapString(this, primaryKeyMapString); + } + + /** + * This method implements the method that is declared at super. + * + * @param columnValueMap Column-value map. (NotNull and NotEmpty) + * @deprecated Please use WhosOnlineDbm.getInstance().acceptColumnValueMap(entity, columnValueMap); + */ + public void acceptColumnValueMap(java.util.Map columnValueMap) { + getDBMeta().acceptColumnValueMap(this, columnValueMap); + } + + /** + * This method implements the method that is declared at super. + * + * @param columnValueMapString Column-value map-string. (NotNull and NotEmpty) + * @deprecated Please use WhosOnlineDbm.getInstance().acceptColumnValueMap(entity, columnValueMapString); + */ + public void acceptColumnValueMapString(String columnValueMapString) { + getDBMeta().acceptColumnValueMapString(this, columnValueMapString); + } + + // =================================================================================== + // Extract + // ======= + /** + * This method implements the method that is declared at super. + * + * @return Primary-key map-string. (NotNull) + * @deprecated Please use WhosOnlineDbm.getInstance().extractPrimaryKeyMapString(entity); + */ + public String extractPrimaryKeyMapString() { + return getDBMeta().extractPrimaryKeyMapString(this); + } + + /** + * Extract primary-key map-string. + * + * @param startBrace Start-brace. (NotNull) + * @param endBrace End-brace. (NotNull) + * @param delimiter Delimiter. (NotNull) + * @param equal Equal. (NotNull) + * @return Primary-key map-string. (NotNull) + * @deprecated Please use WhosOnlineDbm.getInstance().extractPrimaryKeyMapString(entity, startBrace, endBrace, delimiter, equal); + */ + public String extractPrimaryKeyMapString(String startBrace, String endBrace, String delimiter, String equal) { + return getDBMeta().extractPrimaryKeyMapString(this, startBrace, endBrace, delimiter, equal); + } + + /** + * This method implements the method that is declared at super. + * + * @return Column-value map-string. (NotNull) + * @deprecated Please use WhosOnlineDbm.getInstance().extractColumnValueMapString(entity); + */ + public String extractColumnValueMapString() { + return getDBMeta().extractColumnValueMapString(this); + } + + /** + * Extract column-value map-string. + * + * @param startBrace Start-brace. (NotNull) + * @param endBrace End-brace. (NotNull) + * @param delimiter Delimiter. (NotNull) + * @param equal Equal. (NotNull) + * @return Column-value map-string. (NotNull) + * @deprecated Please use WhosOnlineDbm.getInstance().extractColumnValueMapString(entity, startBrace, endBrace, delimiter, equal); + */ + public String extractColumnValueMapString(String startBrace, String endBrace, String delimiter, String equal) { + return getDBMeta().extractColumnValueMapString(this, startBrace, endBrace, delimiter, equal); + } + + + // =================================================================================== + // Determination + // ============= + /** + * This method implements the method that is declared at super. + * + * @return Determination. + */ + public boolean hasPrimaryKeyValue() { + + + return true; + } + + // =================================================================================== + // Modified Properties + // =================== + /** + * Get modified property names. (S2Dao uses this for updateModifiedProperties()) + * + * @return Modified property names. (NotNull) + */ + public java.util.Set getModifiedPropertyNames() { + return _modifiedProperties.getPropertyNames(); + } + + /** + * New entity modified properties. You can override this at the sub-class if you need it. + * + * @return Entity modified properties. (NotNull) + */ + protected EntityModifiedProperties newEntityModifiedProperties() { + return new EntityModifiedProperties(); + } + + /** + * Clear modified property names. + */ + public void clearModifiedPropertyNames() { + _modifiedProperties.clear(); + } + + // =================================================================================== + // Basic Override + // ============== + + /** + * This method overrides the method that is declared at super. + * If the all-column value of the other is same as this one, returns true. + * + * @param other Other entity. (Nullable) + * @return Comparing result. If other is null, returns false. + */ + public boolean equals(Object other) { + if (other == null) { + return false; + } + if (!(other instanceof BsWhosOnline)) { + return false; + } + final BsWhosOnline otherEntity = (BsWhosOnline)other; + + if (getCustomerId() == null || !getCustomerId().equals(otherEntity.getCustomerId())) { + return false; + } + if (getFullName() == null || !getFullName().equals(otherEntity.getFullName())) { + return false; + } + if (getSessionId() == null || !getSessionId().equals(otherEntity.getSessionId())) { + return false; + } + if (getIpAddress() == null || !getIpAddress().equals(otherEntity.getIpAddress())) { + return false; + } + if (getTimeEntry() == null || !getTimeEntry().equals(otherEntity.getTimeEntry())) { + return false; + } + if (getTimeLastClick() == null || !getTimeLastClick().equals(otherEntity.getTimeLastClick())) { + return false; + } + if (getLastPageUrl() == null || !getLastPageUrl().equals(otherEntity.getLastPageUrl())) { + return false; + } + + return true; + } + + /** + * This method overrides the method that is declared at super. + * Calculates hash-code from all-columns. + * + * @return Hash-code from all-columns. + */ + public int hashCode() { + int result = 0; + + if (this.getCustomerId() != null) { + result = result + this.getCustomerId().hashCode(); + } + if (this.getFullName() != null) { + result = result + this.getFullName().hashCode(); + } + if (this.getSessionId() != null) { + result = result + this.getSessionId().hashCode(); + } + if (this.getIpAddress() != null) { + result = result + this.getIpAddress().hashCode(); + } + if (this.getTimeEntry() != null) { + result = result + this.getTimeEntry().hashCode(); + } + if (this.getTimeLastClick() != null) { + result = result + this.getTimeLastClick().hashCode(); + } + if (this.getLastPageUrl() != null) { + result = result + this.getLastPageUrl().hashCode(); + } + + return result; + } + + /** + * This method overrides the method that is declared at super. + * + * @return Column-value map-string. (NotNull) + */ + public String toString() { + final String delimiter = ","; + final StringBuffer sb = new StringBuffer(); + + sb.append(delimiter).append(getCustomerId()); + sb.append(delimiter).append(getFullName()); + sb.append(delimiter).append(getSessionId()); + sb.append(delimiter).append(getIpAddress()); + sb.append(delimiter).append(getTimeEntry()); + sb.append(delimiter).append(getTimeLastClick()); + sb.append(delimiter).append(getLastPageUrl()); + + sb.delete(0, delimiter.length()); + sb.insert(0, "{").append("}"); + return sb.toString(); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/BsZones.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/BsZones.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/BsZones.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,444 @@ +package jp.sf.pal.pompei.bsentity; + + +import jp.sf.pal.pompei.allcommon.Entity; +import jp.sf.pal.pompei.allcommon.dbmeta.DBMeta; +import jp.sf.pal.pompei.allcommon.dbmeta.DBMetaInstanceHandler; + +/** + * The entity of ZONES. + * + *
+ * [primary-key]
+ *     ZONE_ID
+ * 
+ * [column-property]
+ *     ZONE_ID, ZONE_COUNTRY_ID, ZONE_CODE, ZONE_NAME
+ * 
+ * [foreign-property]
+ *     
+ * 
+ * [refferer-property]
+ *     
+ * 
+ * [sequence]
+ *     
+ * 
+ * [identity]
+ *     
+ * 
+ * [update-date]
+ *     
+ * 
+ * [version-no]
+ *     
+ * 
+ * 
+ * + * @author DBFlute(AutoGenerator) + */ +public abstract class BsZones implements Entity, java.io.Serializable { + + /** Serial version UID. (Default) */ + private static final long serialVersionUID = 1L; + + /** TABLE-Annotation for S2Dao */ + public static final String TABLE = "ZONES"; + + + // =================================================================================== + // Attribute + // ========= + /** Entity modified properties. (for S2Dao) */ + protected EntityModifiedProperties _modifiedProperties = newEntityModifiedProperties(); + + + /** The value of zoneId. ColumnDefinition -- PK : INTEGER : NotNull*/ + protected java.math.BigDecimal _zoneId; + + /** The value of zoneCountryId. ColumnDefinition -- INTEGER : NotNull*/ + protected java.math.BigDecimal _zoneCountryId; + + /** The value of zoneCode. ColumnDefinition -- VARCHAR(32) : NotNull*/ + protected String _zoneCode; + + /** The value of zoneName. ColumnDefinition -- VARCHAR(32) : NotNull*/ + protected String _zoneName; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + public BsZones() { + } + + + // =================================================================================== + // DBMeta + // ====== + /** + * This method implements the method that is declared at super. + * + * @return DBMeta. (NotNull) + */ + public DBMeta getDBMeta() { + return DBMetaInstanceHandler.getInstanceByTableDbName(getTableDbName()); + } + + // =================================================================================== + // Table Name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + public String getTableDbName() { + return "ZONES"; + } + + /** + * This method implements the method that is declared at super. + * + * @return Table cap-prop-name. (NotNull) + */ + public String getTableCapPropName() { + return "Zones"; + } + + /** + * This method implements the method that is declared at super. + * + * @return Table uncap-prop-name. (NotNull) + */ + public String getTableUncapPropName() { + return "zones"; + } + + // =================================================================================== + // Accessor + // ======== + + /** Column-Annotation for S2Dao. ColumnDefinition -- PK : INTEGER : NotNull*/ + public static final String zoneId_COLUMN = "ZONE_ID"; + + /** + * Get the value of zoneId.
+ * {PK : INTEGER : NotNull} + * + * @return The value of zoneId. (Nullable) + */ + public java.math.BigDecimal getZoneId() { + return _zoneId; + } + + /** + * Set the value of zoneId.
+ * {PK : INTEGER : NotNull} + * + * @param zoneId The value of zoneId. (Nullable) + */ + public void setZoneId(java.math.BigDecimal zoneId) { + _modifiedProperties.addPropertyName("zoneId"); + _zoneId = zoneId; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- INTEGER : NotNull*/ + public static final String zoneCountryId_COLUMN = "ZONE_COUNTRY_ID"; + + /** + * Get the value of zoneCountryId.
+ * {INTEGER : NotNull} + * + * @return The value of zoneCountryId. (Nullable) + */ + public java.math.BigDecimal getZoneCountryId() { + return _zoneCountryId; + } + + /** + * Set the value of zoneCountryId.
+ * {INTEGER : NotNull} + * + * @param zoneCountryId The value of zoneCountryId. (Nullable) + */ + public void setZoneCountryId(java.math.BigDecimal zoneCountryId) { + _modifiedProperties.addPropertyName("zoneCountryId"); + _zoneCountryId = zoneCountryId; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- VARCHAR(32) : NotNull*/ + public static final String zoneCode_COLUMN = "ZONE_CODE"; + + /** + * Get the value of zoneCode.
+ * {VARCHAR(32) : NotNull} + * + * @return The value of zoneCode. (Nullable) + */ + public String getZoneCode() { + return _zoneCode; + } + + /** + * Set the value of zoneCode.
+ * {VARCHAR(32) : NotNull} + * + * @param zoneCode The value of zoneCode. (Nullable) + */ + public void setZoneCode(String zoneCode) { + _modifiedProperties.addPropertyName("zoneCode"); + _zoneCode = zoneCode; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- VARCHAR(32) : NotNull*/ + public static final String zoneName_COLUMN = "ZONE_NAME"; + + /** + * Get the value of zoneName.
+ * {VARCHAR(32) : NotNull} + * + * @return The value of zoneName. (Nullable) + */ + public String getZoneName() { + return _zoneName; + } + + /** + * Set the value of zoneName.
+ * {VARCHAR(32) : NotNull} + * + * @param zoneName The value of zoneName. (Nullable) + */ + public void setZoneName(String zoneName) { + _modifiedProperties.addPropertyName("zoneName"); + _zoneName = zoneName; + } + + + // =================================================================================== + // Classify Method + // =============== + + // =================================================================================== + // Classification Determination + // ============================ + + + // =================================================================================== + // Classification Getter + // ===================== + + + // =================================================================================== + // Foreign Table + // ============= + + // =================================================================================== + // Refferer Table + // ============== + + // =================================================================================== + // Accept + // ====== + /** + * This method implements the method that is declared at super. + * + * @param primaryKeyMap Primary key map. (NotNull and NotEmpty) + * @deprecated Please use ZonesDbm.getInstance().acceptPrimaryKeyMap(entity, primaryKeyMap); + */ + public void acceptPrimaryKeyMap(java.util.Map primaryKeyMap) { + getDBMeta().acceptPrimaryKeyMap(this, primaryKeyMap); + } + + /** + * This method implements the method that is declared at super. + * + * @param primaryKeyMapString Primary-key map-string. (NotNull and NotEmpty) + * @deprecated Please use ZonesDbm.getInstance().acceptPrimaryKeyMapString(entity, primaryKeyMapString); + */ + public void acceptPrimaryKeyMapString(String primaryKeyMapString) { + getDBMeta().acceptPrimaryKeyMapString(this, primaryKeyMapString); + } + + /** + * This method implements the method that is declared at super. + * + * @param columnValueMap Column-value map. (NotNull and NotEmpty) + * @deprecated Please use ZonesDbm.getInstance().acceptColumnValueMap(entity, columnValueMap); + */ + public void acceptColumnValueMap(java.util.Map columnValueMap) { + getDBMeta().acceptColumnValueMap(this, columnValueMap); + } + + /** + * This method implements the method that is declared at super. + * + * @param columnValueMapString Column-value map-string. (NotNull and NotEmpty) + * @deprecated Please use ZonesDbm.getInstance().acceptColumnValueMap(entity, columnValueMapString); + */ + public void acceptColumnValueMapString(String columnValueMapString) { + getDBMeta().acceptColumnValueMapString(this, columnValueMapString); + } + + // =================================================================================== + // Extract + // ======= + /** + * This method implements the method that is declared at super. + * + * @return Primary-key map-string. (NotNull) + * @deprecated Please use ZonesDbm.getInstance().extractPrimaryKeyMapString(entity); + */ + public String extractPrimaryKeyMapString() { + return getDBMeta().extractPrimaryKeyMapString(this); + } + + /** + * Extract primary-key map-string. + * + * @param startBrace Start-brace. (NotNull) + * @param endBrace End-brace. (NotNull) + * @param delimiter Delimiter. (NotNull) + * @param equal Equal. (NotNull) + * @return Primary-key map-string. (NotNull) + * @deprecated Please use ZonesDbm.getInstance().extractPrimaryKeyMapString(entity, startBrace, endBrace, delimiter, equal); + */ + public String extractPrimaryKeyMapString(String startBrace, String endBrace, String delimiter, String equal) { + return getDBMeta().extractPrimaryKeyMapString(this, startBrace, endBrace, delimiter, equal); + } + + /** + * This method implements the method that is declared at super. + * + * @return Column-value map-string. (NotNull) + * @deprecated Please use ZonesDbm.getInstance().extractColumnValueMapString(entity); + */ + public String extractColumnValueMapString() { + return getDBMeta().extractColumnValueMapString(this); + } + + /** + * Extract column-value map-string. + * + * @param startBrace Start-brace. (NotNull) + * @param endBrace End-brace. (NotNull) + * @param delimiter Delimiter. (NotNull) + * @param equal Equal. (NotNull) + * @return Column-value map-string. (NotNull) + * @deprecated Please use ZonesDbm.getInstance().extractColumnValueMapString(entity, startBrace, endBrace, delimiter, equal); + */ + public String extractColumnValueMapString(String startBrace, String endBrace, String delimiter, String equal) { + return getDBMeta().extractColumnValueMapString(this, startBrace, endBrace, delimiter, equal); + } + + + // =================================================================================== + // Determination + // ============= + /** + * This method implements the method that is declared at super. + * + * @return Determination. + */ + public boolean hasPrimaryKeyValue() { + + if (_zoneId == null) { + return false; + } + + return true; + } + + // =================================================================================== + // Modified Properties + // =================== + /** + * Get modified property names. (S2Dao uses this for updateModifiedProperties()) + * + * @return Modified property names. (NotNull) + */ + public java.util.Set getModifiedPropertyNames() { + return _modifiedProperties.getPropertyNames(); + } + + /** + * New entity modified properties. You can override this at the sub-class if you need it. + * + * @return Entity modified properties. (NotNull) + */ + protected EntityModifiedProperties newEntityModifiedProperties() { + return new EntityModifiedProperties(); + } + + /** + * Clear modified property names. + */ + public void clearModifiedPropertyNames() { + _modifiedProperties.clear(); + } + + // =================================================================================== + // Basic Override + // ============== + + /** + * This method overrides the method that is declared at super. + * If the primary-key of the other is same as this one, returns true. + * + * @param other Other entity. + * @return Comparing result. + */ + public boolean equals(Object other) { + if (other == null) { + return false; + } + if (!(other instanceof BsZones)) { + return false; + } + final BsZones otherEntity = (BsZones)other; + + if (getZoneId() == null || !getZoneId().equals(otherEntity.getZoneId())) { + return false; + } + + return true; + } + + /** + * This method overrides the method that is declared at super. + * Calculates hash-code from primary-key. + * + * @return Hash-code from primary-keys. + */ + public int hashCode() { + int result = 0; + + if (this.getZoneId() != null) { + result = result + getZoneId().hashCode(); + } + + return result; + } + + /** + * This method overrides the method that is declared at super. + * + * @return Column-value map-string. (NotNull) + */ + public String toString() { + final String delimiter = ","; + final StringBuffer sb = new StringBuffer(); + + sb.append(delimiter).append(getZoneId()); + sb.append(delimiter).append(getZoneCountryId()); + sb.append(delimiter).append(getZoneCode()); + sb.append(delimiter).append(getZoneName()); + + sb.delete(0, delimiter.length()); + sb.insert(0, "{").append("}"); + return sb.toString(); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/BsZonesToGeoZones.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/BsZonesToGeoZones.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/BsZonesToGeoZones.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,500 @@ +package jp.sf.pal.pompei.bsentity; + + +import jp.sf.pal.pompei.allcommon.Entity; +import jp.sf.pal.pompei.allcommon.dbmeta.DBMeta; +import jp.sf.pal.pompei.allcommon.dbmeta.DBMetaInstanceHandler; + +/** + * The entity of ZONES_TO_GEO_ZONES. + * + *
+ * [primary-key]
+ *     ASSOCIATION_ID
+ * 
+ * [column-property]
+ *     ASSOCIATION_ID, ZONE_COUNTRY_ID, ZONE_ID, GEO_ZONE_ID, LAST_MODIFIED, DATE_ADDED
+ * 
+ * [foreign-property]
+ *     
+ * 
+ * [refferer-property]
+ *     
+ * 
+ * [sequence]
+ *     
+ * 
+ * [identity]
+ *     
+ * 
+ * [update-date]
+ *     
+ * 
+ * [version-no]
+ *     
+ * 
+ * 
+ * + * @author DBFlute(AutoGenerator) + */ +public abstract class BsZonesToGeoZones implements Entity, java.io.Serializable { + + /** Serial version UID. (Default) */ + private static final long serialVersionUID = 1L; + + /** TABLE-Annotation for S2Dao */ + public static final String TABLE = "ZONES_TO_GEO_ZONES"; + + + // =================================================================================== + // Attribute + // ========= + /** Entity modified properties. (for S2Dao) */ + protected EntityModifiedProperties _modifiedProperties = newEntityModifiedProperties(); + + + /** The value of associationId. ColumnDefinition -- PK : INTEGER : NotNull*/ + protected java.math.BigDecimal _associationId; + + /** The value of zoneCountryId. ColumnDefinition -- INTEGER : NotNull*/ + protected java.math.BigDecimal _zoneCountryId; + + /** The value of zoneId. ColumnDefinition -- INTEGER*/ + protected java.math.BigDecimal _zoneId; + + /** The value of geoZoneId. ColumnDefinition -- INTEGER*/ + protected java.math.BigDecimal _geoZoneId; + + /** The value of lastModified. ColumnDefinition -- TIMESTAMP*/ + protected java.sql.Timestamp _lastModified; + + /** The value of dateAdded. ColumnDefinition -- TIMESTAMP : NotNull*/ + protected java.sql.Timestamp _dateAdded; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + public BsZonesToGeoZones() { + } + + + // =================================================================================== + // DBMeta + // ====== + /** + * This method implements the method that is declared at super. + * + * @return DBMeta. (NotNull) + */ + public DBMeta getDBMeta() { + return DBMetaInstanceHandler.getInstanceByTableDbName(getTableDbName()); + } + + // =================================================================================== + // Table Name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + public String getTableDbName() { + return "ZONES_TO_GEO_ZONES"; + } + + /** + * This method implements the method that is declared at super. + * + * @return Table cap-prop-name. (NotNull) + */ + public String getTableCapPropName() { + return "ZonesToGeoZones"; + } + + /** + * This method implements the method that is declared at super. + * + * @return Table uncap-prop-name. (NotNull) + */ + public String getTableUncapPropName() { + return "zonesToGeoZones"; + } + + // =================================================================================== + // Accessor + // ======== + + /** Column-Annotation for S2Dao. ColumnDefinition -- PK : INTEGER : NotNull*/ + public static final String associationId_COLUMN = "ASSOCIATION_ID"; + + /** + * Get the value of associationId.
+ * {PK : INTEGER : NotNull} + * + * @return The value of associationId. (Nullable) + */ + public java.math.BigDecimal getAssociationId() { + return _associationId; + } + + /** + * Set the value of associationId.
+ * {PK : INTEGER : NotNull} + * + * @param associationId The value of associationId. (Nullable) + */ + public void setAssociationId(java.math.BigDecimal associationId) { + _modifiedProperties.addPropertyName("associationId"); + _associationId = associationId; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- INTEGER : NotNull*/ + public static final String zoneCountryId_COLUMN = "ZONE_COUNTRY_ID"; + + /** + * Get the value of zoneCountryId.
+ * {INTEGER : NotNull} + * + * @return The value of zoneCountryId. (Nullable) + */ + public java.math.BigDecimal getZoneCountryId() { + return _zoneCountryId; + } + + /** + * Set the value of zoneCountryId.
+ * {INTEGER : NotNull} + * + * @param zoneCountryId The value of zoneCountryId. (Nullable) + */ + public void setZoneCountryId(java.math.BigDecimal zoneCountryId) { + _modifiedProperties.addPropertyName("zoneCountryId"); + _zoneCountryId = zoneCountryId; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- INTEGER*/ + public static final String zoneId_COLUMN = "ZONE_ID"; + + /** + * Get the value of zoneId.
+ * {INTEGER} + * + * @return The value of zoneId. (Nullable) + */ + public java.math.BigDecimal getZoneId() { + return _zoneId; + } + + /** + * Set the value of zoneId.
+ * {INTEGER} + * + * @param zoneId The value of zoneId. (Nullable) + */ + public void setZoneId(java.math.BigDecimal zoneId) { + _modifiedProperties.addPropertyName("zoneId"); + _zoneId = zoneId; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- INTEGER*/ + public static final String geoZoneId_COLUMN = "GEO_ZONE_ID"; + + /** + * Get the value of geoZoneId.
+ * {INTEGER} + * + * @return The value of geoZoneId. (Nullable) + */ + public java.math.BigDecimal getGeoZoneId() { + return _geoZoneId; + } + + /** + * Set the value of geoZoneId.
+ * {INTEGER} + * + * @param geoZoneId The value of geoZoneId. (Nullable) + */ + public void setGeoZoneId(java.math.BigDecimal geoZoneId) { + _modifiedProperties.addPropertyName("geoZoneId"); + _geoZoneId = geoZoneId; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- TIMESTAMP*/ + public static final String lastModified_COLUMN = "LAST_MODIFIED"; + + /** + * Get the value of lastModified.
+ * {TIMESTAMP} + * + * @return The value of lastModified. (Nullable) + */ + public java.sql.Timestamp getLastModified() { + return _lastModified; + } + + /** + * Set the value of lastModified.
+ * {TIMESTAMP} + * + * @param lastModified The value of lastModified. (Nullable) + */ + public void setLastModified(java.sql.Timestamp lastModified) { + _modifiedProperties.addPropertyName("lastModified"); + _lastModified = lastModified; + } + + /** Column-Annotation for S2Dao. ColumnDefinition -- TIMESTAMP : NotNull*/ + public static final String dateAdded_COLUMN = "DATE_ADDED"; + + /** + * Get the value of dateAdded.
+ * {TIMESTAMP : NotNull} + * + * @return The value of dateAdded. (Nullable) + */ + public java.sql.Timestamp getDateAdded() { + return _dateAdded; + } + + /** + * Set the value of dateAdded.
+ * {TIMESTAMP : NotNull} + * + * @param dateAdded The value of dateAdded. (Nullable) + */ + public void setDateAdded(java.sql.Timestamp dateAdded) { + _modifiedProperties.addPropertyName("dateAdded"); + _dateAdded = dateAdded; + } + + + // =================================================================================== + // Classify Method + // =============== + + // =================================================================================== + // Classification Determination + // ============================ + + + // =================================================================================== + // Classification Getter + // ===================== + + + // =================================================================================== + // Foreign Table + // ============= + + // =================================================================================== + // Refferer Table + // ============== + + // =================================================================================== + // Accept + // ====== + /** + * This method implements the method that is declared at super. + * + * @param primaryKeyMap Primary key map. (NotNull and NotEmpty) + * @deprecated Please use ZonesToGeoZonesDbm.getInstance().acceptPrimaryKeyMap(entity, primaryKeyMap); + */ + public void acceptPrimaryKeyMap(java.util.Map primaryKeyMap) { + getDBMeta().acceptPrimaryKeyMap(this, primaryKeyMap); + } + + /** + * This method implements the method that is declared at super. + * + * @param primaryKeyMapString Primary-key map-string. (NotNull and NotEmpty) + * @deprecated Please use ZonesToGeoZonesDbm.getInstance().acceptPrimaryKeyMapString(entity, primaryKeyMapString); + */ + public void acceptPrimaryKeyMapString(String primaryKeyMapString) { + getDBMeta().acceptPrimaryKeyMapString(this, primaryKeyMapString); + } + + /** + * This method implements the method that is declared at super. + * + * @param columnValueMap Column-value map. (NotNull and NotEmpty) + * @deprecated Please use ZonesToGeoZonesDbm.getInstance().acceptColumnValueMap(entity, columnValueMap); + */ + public void acceptColumnValueMap(java.util.Map columnValueMap) { + getDBMeta().acceptColumnValueMap(this, columnValueMap); + } + + /** + * This method implements the method that is declared at super. + * + * @param columnValueMapString Column-value map-string. (NotNull and NotEmpty) + * @deprecated Please use ZonesToGeoZonesDbm.getInstance().acceptColumnValueMap(entity, columnValueMapString); + */ + public void acceptColumnValueMapString(String columnValueMapString) { + getDBMeta().acceptColumnValueMapString(this, columnValueMapString); + } + + // =================================================================================== + // Extract + // ======= + /** + * This method implements the method that is declared at super. + * + * @return Primary-key map-string. (NotNull) + * @deprecated Please use ZonesToGeoZonesDbm.getInstance().extractPrimaryKeyMapString(entity); + */ + public String extractPrimaryKeyMapString() { + return getDBMeta().extractPrimaryKeyMapString(this); + } + + /** + * Extract primary-key map-string. + * + * @param startBrace Start-brace. (NotNull) + * @param endBrace End-brace. (NotNull) + * @param delimiter Delimiter. (NotNull) + * @param equal Equal. (NotNull) + * @return Primary-key map-string. (NotNull) + * @deprecated Please use ZonesToGeoZonesDbm.getInstance().extractPrimaryKeyMapString(entity, startBrace, endBrace, delimiter, equal); + */ + public String extractPrimaryKeyMapString(String startBrace, String endBrace, String delimiter, String equal) { + return getDBMeta().extractPrimaryKeyMapString(this, startBrace, endBrace, delimiter, equal); + } + + /** + * This method implements the method that is declared at super. + * + * @return Column-value map-string. (NotNull) + * @deprecated Please use ZonesToGeoZonesDbm.getInstance().extractColumnValueMapString(entity); + */ + public String extractColumnValueMapString() { + return getDBMeta().extractColumnValueMapString(this); + } + + /** + * Extract column-value map-string. + * + * @param startBrace Start-brace. (NotNull) + * @param endBrace End-brace. (NotNull) + * @param delimiter Delimiter. (NotNull) + * @param equal Equal. (NotNull) + * @return Column-value map-string. (NotNull) + * @deprecated Please use ZonesToGeoZonesDbm.getInstance().extractColumnValueMapString(entity, startBrace, endBrace, delimiter, equal); + */ + public String extractColumnValueMapString(String startBrace, String endBrace, String delimiter, String equal) { + return getDBMeta().extractColumnValueMapString(this, startBrace, endBrace, delimiter, equal); + } + + + // =================================================================================== + // Determination + // ============= + /** + * This method implements the method that is declared at super. + * + * @return Determination. + */ + public boolean hasPrimaryKeyValue() { + + if (_associationId == null) { + return false; + } + + return true; + } + + // =================================================================================== + // Modified Properties + // =================== + /** + * Get modified property names. (S2Dao uses this for updateModifiedProperties()) + * + * @return Modified property names. (NotNull) + */ + public java.util.Set getModifiedPropertyNames() { + return _modifiedProperties.getPropertyNames(); + } + + /** + * New entity modified properties. You can override this at the sub-class if you need it. + * + * @return Entity modified properties. (NotNull) + */ + protected EntityModifiedProperties newEntityModifiedProperties() { + return new EntityModifiedProperties(); + } + + /** + * Clear modified property names. + */ + public void clearModifiedPropertyNames() { + _modifiedProperties.clear(); + } + + // =================================================================================== + // Basic Override + // ============== + + /** + * This method overrides the method that is declared at super. + * If the primary-key of the other is same as this one, returns true. + * + * @param other Other entity. + * @return Comparing result. + */ + public boolean equals(Object other) { + if (other == null) { + return false; + } + if (!(other instanceof BsZonesToGeoZones)) { + return false; + } + final BsZonesToGeoZones otherEntity = (BsZonesToGeoZones)other; + + if (getAssociationId() == null || !getAssociationId().equals(otherEntity.getAssociationId())) { + return false; + } + + return true; + } + + /** + * This method overrides the method that is declared at super. + * Calculates hash-code from primary-key. + * + * @return Hash-code from primary-keys. + */ + public int hashCode() { + int result = 0; + + if (this.getAssociationId() != null) { + result = result + getAssociationId().hashCode(); + } + + return result; + } + + /** + * This method overrides the method that is declared at super. + * + * @return Column-value map-string. (NotNull) + */ + public String toString() { + final String delimiter = ","; + final StringBuffer sb = new StringBuffer(); + + sb.append(delimiter).append(getAssociationId()); + sb.append(delimiter).append(getZoneCountryId()); + sb.append(delimiter).append(getZoneId()); + sb.append(delimiter).append(getGeoZoneId()); + sb.append(delimiter).append(getLastModified()); + sb.append(delimiter).append(getDateAdded()); + + sb.delete(0, delimiter.length()); + sb.insert(0, "{").append("}"); + return sb.toString(); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/dbmeta/AddressBookDbm.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/dbmeta/AddressBookDbm.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/dbmeta/AddressBookDbm.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,832 @@ +package jp.sf.pal.pompei.bsentity.dbmeta; + + +import jp.sf.pal.pompei.allcommon.Entity; +import jp.sf.pal.pompei.allcommon.dbmeta.DBMeta; +import jp.sf.pal.pompei.allcommon.dbmeta.AbstractDBMeta; +import jp.sf.pal.pompei.exentity.AddressBook; + +/** + * The dbmeta of ADDRESS_BOOK. (Singleton) + * + *
+ * [primary-key]
+ *     ADDRESS_BOOK_ID
+ * 
+ * [column-property]
+ *     ADDRESS_BOOK_ID, CUSTOMERS_ID, ENTRY_GENDER, ENTRY_COMPANY, ENTRY_FIRSTNAME, ENTRY_LASTNAME, ENTRY_STREET_ADDRESS, ENTRY_SUBURB, ENTRY_POSTCODE, ENTRY_CITY, ENTRY_STATE, ENTRY_COUNTRY_ID, ENTRY_ZONE_ID
+ * 
+ * [foreign-property]
+ *     
+ * 
+ * [refferer-property]
+ *     
+ * 
+ * [sequence]
+ *     
+ * 
+ * [identity]
+ *     
+ * 
+ * [update-date]
+ *     
+ * 
+ * [version-no]
+ *     
+ * 
+ * 
+ * + * @author DBFlute(AutoGenerator) + */ +public class AddressBookDbm extends AbstractDBMeta { + + // =================================================================================== + // Definition + // ========== + /** The type of entity. */ + protected static final Class ENTITY_TYPE = AddressBook.class; + + /** Singleton instance. */ + private static final AddressBookDbm _instance = new AddressBookDbm(); + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + private AddressBookDbm() { + } + + // =================================================================================== + // Singleton + // ========= + /** + * Get instance. + * + * @return Singleton instance. (NotNull) + */ + public static AddressBookDbm getInstance() { + return _instance; + } + + // =================================================================================== + // Name Definition + // =============== + /** Table db name. */ + public static final String TABLE_DB_NAME = "ADDRESS_BOOK"; + + /** Table cap-prop name. */ + public static final String TABLE_CAP_PROP_NAME = "AddressBook"; + + /** Table uncap-prop name. */ + public static final String TABLE_UNCAP_PROP_NAME = "addressBook"; + + /** Db-name of AddressBookId. */ + public static final String COLUMN_DB_NAME_OF_AddressBookId = "ADDRESS_BOOK_ID"; + /** Db-name of CustomersId. */ + public static final String COLUMN_DB_NAME_OF_CustomersId = "CUSTOMERS_ID"; + /** Db-name of EntryGender. */ + public static final String COLUMN_DB_NAME_OF_EntryGender = "ENTRY_GENDER"; + /** Db-name of EntryCompany. */ + public static final String COLUMN_DB_NAME_OF_EntryCompany = "ENTRY_COMPANY"; + /** Db-name of EntryFirstname. */ + public static final String COLUMN_DB_NAME_OF_EntryFirstname = "ENTRY_FIRSTNAME"; + /** Db-name of EntryLastname. */ + public static final String COLUMN_DB_NAME_OF_EntryLastname = "ENTRY_LASTNAME"; + /** Db-name of EntryStreetAddress. */ + public static final String COLUMN_DB_NAME_OF_EntryStreetAddress = "ENTRY_STREET_ADDRESS"; + /** Db-name of EntrySuburb. */ + public static final String COLUMN_DB_NAME_OF_EntrySuburb = "ENTRY_SUBURB"; + /** Db-name of EntryPostcode. */ + public static final String COLUMN_DB_NAME_OF_EntryPostcode = "ENTRY_POSTCODE"; + /** Db-name of EntryCity. */ + public static final String COLUMN_DB_NAME_OF_EntryCity = "ENTRY_CITY"; + /** Db-name of EntryState. */ + public static final String COLUMN_DB_NAME_OF_EntryState = "ENTRY_STATE"; + /** Db-name of EntryCountryId. */ + public static final String COLUMN_DB_NAME_OF_EntryCountryId = "ENTRY_COUNTRY_ID"; + /** Db-name of EntryZoneId. */ + public static final String COLUMN_DB_NAME_OF_EntryZoneId = "ENTRY_ZONE_ID"; + + /** Cap-prop-name of AddressBookId. */ + public static final String COLUMN_CAP_PROP_NAME_OF_AddressBookId = "AddressBookId"; + /** Cap-prop-name of CustomersId. */ + public static final String COLUMN_CAP_PROP_NAME_OF_CustomersId = "CustomersId"; + /** Cap-prop-name of EntryGender. */ + public static final String COLUMN_CAP_PROP_NAME_OF_EntryGender = "EntryGender"; + /** Cap-prop-name of EntryCompany. */ + public static final String COLUMN_CAP_PROP_NAME_OF_EntryCompany = "EntryCompany"; + /** Cap-prop-name of EntryFirstname. */ + public static final String COLUMN_CAP_PROP_NAME_OF_EntryFirstname = "EntryFirstname"; + /** Cap-prop-name of EntryLastname. */ + public static final String COLUMN_CAP_PROP_NAME_OF_EntryLastname = "EntryLastname"; + /** Cap-prop-name of EntryStreetAddress. */ + public static final String COLUMN_CAP_PROP_NAME_OF_EntryStreetAddress = "EntryStreetAddress"; + /** Cap-prop-name of EntrySuburb. */ + public static final String COLUMN_CAP_PROP_NAME_OF_EntrySuburb = "EntrySuburb"; + /** Cap-prop-name of EntryPostcode. */ + public static final String COLUMN_CAP_PROP_NAME_OF_EntryPostcode = "EntryPostcode"; + /** Cap-prop-name of EntryCity. */ + public static final String COLUMN_CAP_PROP_NAME_OF_EntryCity = "EntryCity"; + /** Cap-prop-name of EntryState. */ + public static final String COLUMN_CAP_PROP_NAME_OF_EntryState = "EntryState"; + /** Cap-prop-name of EntryCountryId. */ + public static final String COLUMN_CAP_PROP_NAME_OF_EntryCountryId = "EntryCountryId"; + /** Cap-prop-name of EntryZoneId. */ + public static final String COLUMN_CAP_PROP_NAME_OF_EntryZoneId = "EntryZoneId"; + + + + /** Uncap-prop-name of AddressBookId. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_AddressBookId = "addressBookId"; + /** Uncap-prop-name of CustomersId. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_CustomersId = "customersId"; + /** Uncap-prop-name of EntryGender. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_EntryGender = "entryGender"; + /** Uncap-prop-name of EntryCompany. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_EntryCompany = "entryCompany"; + /** Uncap-prop-name of EntryFirstname. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_EntryFirstname = "entryFirstname"; + /** Uncap-prop-name of EntryLastname. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_EntryLastname = "entryLastname"; + /** Uncap-prop-name of EntryStreetAddress. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_EntryStreetAddress = "entryStreetAddress"; + /** Uncap-prop-name of EntrySuburb. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_EntrySuburb = "entrySuburb"; + /** Uncap-prop-name of EntryPostcode. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_EntryPostcode = "entryPostcode"; + /** Uncap-prop-name of EntryCity. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_EntryCity = "entryCity"; + /** Uncap-prop-name of EntryState. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_EntryState = "entryState"; + /** Uncap-prop-name of EntryCountryId. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_EntryCountryId = "entryCountryId"; + /** Uncap-prop-name of EntryZoneId. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_EntryZoneId = "entryZoneId"; + + + + /** {db-name : cap-prop-name} map. */ + private static java.util.Map _dbNameCapPropNameMap; + protected static java.util.Map createDbNameCapPropNameMap() { + if (_dbNameCapPropNameMap != null) { + return _dbNameCapPropNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_DB_NAME, TABLE_CAP_PROP_NAME); + + map.put(COLUMN_DB_NAME_OF_AddressBookId, COLUMN_CAP_PROP_NAME_OF_AddressBookId); + map.put(COLUMN_DB_NAME_OF_CustomersId, COLUMN_CAP_PROP_NAME_OF_CustomersId); + map.put(COLUMN_DB_NAME_OF_EntryGender, COLUMN_CAP_PROP_NAME_OF_EntryGender); + map.put(COLUMN_DB_NAME_OF_EntryCompany, COLUMN_CAP_PROP_NAME_OF_EntryCompany); + map.put(COLUMN_DB_NAME_OF_EntryFirstname, COLUMN_CAP_PROP_NAME_OF_EntryFirstname); + map.put(COLUMN_DB_NAME_OF_EntryLastname, COLUMN_CAP_PROP_NAME_OF_EntryLastname); + map.put(COLUMN_DB_NAME_OF_EntryStreetAddress, COLUMN_CAP_PROP_NAME_OF_EntryStreetAddress); + map.put(COLUMN_DB_NAME_OF_EntrySuburb, COLUMN_CAP_PROP_NAME_OF_EntrySuburb); + map.put(COLUMN_DB_NAME_OF_EntryPostcode, COLUMN_CAP_PROP_NAME_OF_EntryPostcode); + map.put(COLUMN_DB_NAME_OF_EntryCity, COLUMN_CAP_PROP_NAME_OF_EntryCity); + map.put(COLUMN_DB_NAME_OF_EntryState, COLUMN_CAP_PROP_NAME_OF_EntryState); + map.put(COLUMN_DB_NAME_OF_EntryCountryId, COLUMN_CAP_PROP_NAME_OF_EntryCountryId); + map.put(COLUMN_DB_NAME_OF_EntryZoneId, COLUMN_CAP_PROP_NAME_OF_EntryZoneId); + + _dbNameCapPropNameMap = java.util.Collections.unmodifiableMap(map); + return _dbNameCapPropNameMap; + } + + /** {db-name : uncap-prop-name} map. */ + private static java.util.Map _dbNameUncapPropNameMap; + protected static java.util.Map createDbNameUncapPropNameMap() { + if (_dbNameUncapPropNameMap != null) { + return _dbNameUncapPropNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_DB_NAME, TABLE_UNCAP_PROP_NAME); + + map.put(COLUMN_DB_NAME_OF_AddressBookId, COLUMN_UNCAP_PROP_NAME_OF_AddressBookId); + map.put(COLUMN_DB_NAME_OF_CustomersId, COLUMN_UNCAP_PROP_NAME_OF_CustomersId); + map.put(COLUMN_DB_NAME_OF_EntryGender, COLUMN_UNCAP_PROP_NAME_OF_EntryGender); + map.put(COLUMN_DB_NAME_OF_EntryCompany, COLUMN_UNCAP_PROP_NAME_OF_EntryCompany); + map.put(COLUMN_DB_NAME_OF_EntryFirstname, COLUMN_UNCAP_PROP_NAME_OF_EntryFirstname); + map.put(COLUMN_DB_NAME_OF_EntryLastname, COLUMN_UNCAP_PROP_NAME_OF_EntryLastname); + map.put(COLUMN_DB_NAME_OF_EntryStreetAddress, COLUMN_UNCAP_PROP_NAME_OF_EntryStreetAddress); + map.put(COLUMN_DB_NAME_OF_EntrySuburb, COLUMN_UNCAP_PROP_NAME_OF_EntrySuburb); + map.put(COLUMN_DB_NAME_OF_EntryPostcode, COLUMN_UNCAP_PROP_NAME_OF_EntryPostcode); + map.put(COLUMN_DB_NAME_OF_EntryCity, COLUMN_UNCAP_PROP_NAME_OF_EntryCity); + map.put(COLUMN_DB_NAME_OF_EntryState, COLUMN_UNCAP_PROP_NAME_OF_EntryState); + map.put(COLUMN_DB_NAME_OF_EntryCountryId, COLUMN_UNCAP_PROP_NAME_OF_EntryCountryId); + map.put(COLUMN_DB_NAME_OF_EntryZoneId, COLUMN_UNCAP_PROP_NAME_OF_EntryZoneId); + + _dbNameUncapPropNameMap = java.util.Collections.unmodifiableMap(map); + return _dbNameUncapPropNameMap; + } + + /** {cap-prop-name : db-name} map. */ + private static java.util.Map _capPropNameDbNameMap; + protected static java.util.Map createCapPropNameDbNameMap() { + if (_capPropNameDbNameMap != null) { + return _capPropNameDbNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_CAP_PROP_NAME, TABLE_DB_NAME); + + map.put(COLUMN_CAP_PROP_NAME_OF_AddressBookId, COLUMN_DB_NAME_OF_AddressBookId); + map.put(COLUMN_CAP_PROP_NAME_OF_CustomersId, COLUMN_DB_NAME_OF_CustomersId); + map.put(COLUMN_CAP_PROP_NAME_OF_EntryGender, COLUMN_DB_NAME_OF_EntryGender); + map.put(COLUMN_CAP_PROP_NAME_OF_EntryCompany, COLUMN_DB_NAME_OF_EntryCompany); + map.put(COLUMN_CAP_PROP_NAME_OF_EntryFirstname, COLUMN_DB_NAME_OF_EntryFirstname); + map.put(COLUMN_CAP_PROP_NAME_OF_EntryLastname, COLUMN_DB_NAME_OF_EntryLastname); + map.put(COLUMN_CAP_PROP_NAME_OF_EntryStreetAddress, COLUMN_DB_NAME_OF_EntryStreetAddress); + map.put(COLUMN_CAP_PROP_NAME_OF_EntrySuburb, COLUMN_DB_NAME_OF_EntrySuburb); + map.put(COLUMN_CAP_PROP_NAME_OF_EntryPostcode, COLUMN_DB_NAME_OF_EntryPostcode); + map.put(COLUMN_CAP_PROP_NAME_OF_EntryCity, COLUMN_DB_NAME_OF_EntryCity); + map.put(COLUMN_CAP_PROP_NAME_OF_EntryState, COLUMN_DB_NAME_OF_EntryState); + map.put(COLUMN_CAP_PROP_NAME_OF_EntryCountryId, COLUMN_DB_NAME_OF_EntryCountryId); + map.put(COLUMN_CAP_PROP_NAME_OF_EntryZoneId, COLUMN_DB_NAME_OF_EntryZoneId); + + _capPropNameDbNameMap = java.util.Collections.unmodifiableMap(map); + return _capPropNameDbNameMap; + } + + /** {cap-prop-name : uncap-prop-name} map. */ + private static java.util.Map _capPropNameUncapPropNameMap; + protected static java.util.Map createCapPropNameUncapPropNameMap() { + if (_capPropNameUncapPropNameMap != null) { + return _capPropNameUncapPropNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_CAP_PROP_NAME, TABLE_UNCAP_PROP_NAME); + + map.put(COLUMN_CAP_PROP_NAME_OF_AddressBookId, COLUMN_UNCAP_PROP_NAME_OF_AddressBookId); + map.put(COLUMN_CAP_PROP_NAME_OF_CustomersId, COLUMN_UNCAP_PROP_NAME_OF_CustomersId); + map.put(COLUMN_CAP_PROP_NAME_OF_EntryGender, COLUMN_UNCAP_PROP_NAME_OF_EntryGender); + map.put(COLUMN_CAP_PROP_NAME_OF_EntryCompany, COLUMN_UNCAP_PROP_NAME_OF_EntryCompany); + map.put(COLUMN_CAP_PROP_NAME_OF_EntryFirstname, COLUMN_UNCAP_PROP_NAME_OF_EntryFirstname); + map.put(COLUMN_CAP_PROP_NAME_OF_EntryLastname, COLUMN_UNCAP_PROP_NAME_OF_EntryLastname); + map.put(COLUMN_CAP_PROP_NAME_OF_EntryStreetAddress, COLUMN_UNCAP_PROP_NAME_OF_EntryStreetAddress); + map.put(COLUMN_CAP_PROP_NAME_OF_EntrySuburb, COLUMN_UNCAP_PROP_NAME_OF_EntrySuburb); + map.put(COLUMN_CAP_PROP_NAME_OF_EntryPostcode, COLUMN_UNCAP_PROP_NAME_OF_EntryPostcode); + map.put(COLUMN_CAP_PROP_NAME_OF_EntryCity, COLUMN_UNCAP_PROP_NAME_OF_EntryCity); + map.put(COLUMN_CAP_PROP_NAME_OF_EntryState, COLUMN_UNCAP_PROP_NAME_OF_EntryState); + map.put(COLUMN_CAP_PROP_NAME_OF_EntryCountryId, COLUMN_UNCAP_PROP_NAME_OF_EntryCountryId); + map.put(COLUMN_CAP_PROP_NAME_OF_EntryZoneId, COLUMN_UNCAP_PROP_NAME_OF_EntryZoneId); + + _capPropNameUncapPropNameMap = java.util.Collections.unmodifiableMap(map); + return _capPropNameUncapPropNameMap; + } + + /** {uncap-prop-name : db-name} map. */ + private static java.util.Map _uncapPropNameDbNameMap; + protected static java.util.Map createUncapPropNameDbNameMap() { + if (_uncapPropNameDbNameMap != null) { + return _uncapPropNameDbNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_UNCAP_PROP_NAME, TABLE_DB_NAME); + + map.put(COLUMN_UNCAP_PROP_NAME_OF_AddressBookId, COLUMN_DB_NAME_OF_AddressBookId); + map.put(COLUMN_UNCAP_PROP_NAME_OF_CustomersId, COLUMN_DB_NAME_OF_CustomersId); + map.put(COLUMN_UNCAP_PROP_NAME_OF_EntryGender, COLUMN_DB_NAME_OF_EntryGender); + map.put(COLUMN_UNCAP_PROP_NAME_OF_EntryCompany, COLUMN_DB_NAME_OF_EntryCompany); + map.put(COLUMN_UNCAP_PROP_NAME_OF_EntryFirstname, COLUMN_DB_NAME_OF_EntryFirstname); + map.put(COLUMN_UNCAP_PROP_NAME_OF_EntryLastname, COLUMN_DB_NAME_OF_EntryLastname); + map.put(COLUMN_UNCAP_PROP_NAME_OF_EntryStreetAddress, COLUMN_DB_NAME_OF_EntryStreetAddress); + map.put(COLUMN_UNCAP_PROP_NAME_OF_EntrySuburb, COLUMN_DB_NAME_OF_EntrySuburb); + map.put(COLUMN_UNCAP_PROP_NAME_OF_EntryPostcode, COLUMN_DB_NAME_OF_EntryPostcode); + map.put(COLUMN_UNCAP_PROP_NAME_OF_EntryCity, COLUMN_DB_NAME_OF_EntryCity); + map.put(COLUMN_UNCAP_PROP_NAME_OF_EntryState, COLUMN_DB_NAME_OF_EntryState); + map.put(COLUMN_UNCAP_PROP_NAME_OF_EntryCountryId, COLUMN_DB_NAME_OF_EntryCountryId); + map.put(COLUMN_UNCAP_PROP_NAME_OF_EntryZoneId, COLUMN_DB_NAME_OF_EntryZoneId); + + _uncapPropNameDbNameMap = java.util.Collections.unmodifiableMap(map); + return _uncapPropNameDbNameMap; + } + + /** {uncap-prop-name : cap-prop-name} map. */ + private static java.util.Map _uncapPropNameCapPropNameMap; + protected static java.util.Map createUncapPropNameCapPropNameMap() { + if (_uncapPropNameCapPropNameMap != null) { + return _uncapPropNameCapPropNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_UNCAP_PROP_NAME, TABLE_CAP_PROP_NAME); + + map.put(COLUMN_UNCAP_PROP_NAME_OF_AddressBookId, COLUMN_CAP_PROP_NAME_OF_AddressBookId); + map.put(COLUMN_UNCAP_PROP_NAME_OF_CustomersId, COLUMN_CAP_PROP_NAME_OF_CustomersId); + map.put(COLUMN_UNCAP_PROP_NAME_OF_EntryGender, COLUMN_CAP_PROP_NAME_OF_EntryGender); + map.put(COLUMN_UNCAP_PROP_NAME_OF_EntryCompany, COLUMN_CAP_PROP_NAME_OF_EntryCompany); + map.put(COLUMN_UNCAP_PROP_NAME_OF_EntryFirstname, COLUMN_CAP_PROP_NAME_OF_EntryFirstname); + map.put(COLUMN_UNCAP_PROP_NAME_OF_EntryLastname, COLUMN_CAP_PROP_NAME_OF_EntryLastname); + map.put(COLUMN_UNCAP_PROP_NAME_OF_EntryStreetAddress, COLUMN_CAP_PROP_NAME_OF_EntryStreetAddress); + map.put(COLUMN_UNCAP_PROP_NAME_OF_EntrySuburb, COLUMN_CAP_PROP_NAME_OF_EntrySuburb); + map.put(COLUMN_UNCAP_PROP_NAME_OF_EntryPostcode, COLUMN_CAP_PROP_NAME_OF_EntryPostcode); + map.put(COLUMN_UNCAP_PROP_NAME_OF_EntryCity, COLUMN_CAP_PROP_NAME_OF_EntryCity); + map.put(COLUMN_UNCAP_PROP_NAME_OF_EntryState, COLUMN_CAP_PROP_NAME_OF_EntryState); + map.put(COLUMN_UNCAP_PROP_NAME_OF_EntryCountryId, COLUMN_CAP_PROP_NAME_OF_EntryCountryId); + map.put(COLUMN_UNCAP_PROP_NAME_OF_EntryZoneId, COLUMN_CAP_PROP_NAME_OF_EntryZoneId); + + _uncapPropNameCapPropNameMap = java.util.Collections.unmodifiableMap(map); + return _uncapPropNameCapPropNameMap; + } + + // =================================================================================== + // Name-Map + // ======== + /** + * This method implements the method that is declared at super. + * + * @return {db-name : cap-prop-name} map. + */ + public java.util.Map getDbNameCapPropNameMap() { + return createDbNameCapPropNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {db-name : uncap-prop-name} map. + */ + public java.util.Map getDbNameUncapPropNameMap() { + return createDbNameUncapPropNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {cap-prop-name : db-name} map. + */ + public java.util.Map getCapPropNameDbNameMap() { + return createCapPropNameDbNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {cap-prop-name : uncap-prop-name} map. + */ + public java.util.Map getCapPropNameUncapPropNameMap() { + return createCapPropNameUncapPropNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {uncap-prop-name : db-name} map. + */ + public java.util.Map getUncapPropNameDbNameMap() { + return createUncapPropNameDbNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {uncap-prop-name : cap-prop-name} map. + */ + public java.util.Map getUncapPropNameCapPropNameMap() { + return createUncapPropNameCapPropNameMap(); + } + + // =================================================================================== + // Table Name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + public String getTableDbName() { + return TABLE_DB_NAME; + } + + /** + * This method implements the method that is declared at super. + * + * @return Table cap-prop-name. (NotNull) + */ + public String getTableCapPropName() { + return TABLE_CAP_PROP_NAME; + } + + /** + * This method implements the method that is declared at super. + * + * @return Table property-name. (NotNull) + */ + public String getTableUncapPropName() { + return TABLE_UNCAP_PROP_NAME; + } + + // =================================================================================== + // Column Name + // =========== + public java.util.List getColumnDbNameList() { + final String[] columns = getColumnDbNameCommaString().split(","); + final java.util.List resultList = new java.util.ArrayList(); + for (int i=0; i < columns.length; i++) { + resultList.add(columns[i].trim()); + } + return resultList; + } + + public java.util.List getColumnCapPropNameList() { + final java.util.List columnDbNameList = getColumnDbNameList(); + final java.util.List resultList = new java.util.ArrayList(); + for (final java.util.Iterator ite = columnDbNameList.iterator(); ite.hasNext(); ) { + resultList.add(getDbNameCapPropNameMap().get((String)ite.next())); + } + return resultList; + } + + public java.util.List getColumnUncapPropNameList() { + final java.util.List columnDbNameList = getColumnDbNameList(); + final java.util.List resultList = new java.util.ArrayList(); + for (final java.util.Iterator ite = columnDbNameList.iterator(); ite.hasNext(); ) { + resultList.add(getDbNameUncapPropNameMap().get((String)ite.next())); + } + return resultList; + } + + /** + * This method implements the method that is declared at super. + * + * @return Column-db-name comma-string. (NotNull) + */ + public String getColumnDbNameCommaString() { + return "ADDRESS_BOOK_ID, CUSTOMERS_ID, ENTRY_GENDER, ENTRY_COMPANY, ENTRY_FIRSTNAME, ENTRY_LASTNAME, ENTRY_STREET_ADDRESS, ENTRY_SUBURB, ENTRY_POSTCODE, ENTRY_CITY, ENTRY_STATE, ENTRY_COUNTRY_ID, ENTRY_ZONE_ID"; + } + + // =================================================================================== + // Type Name + // ========= + /** + * This method implements the method that is declared at super. + * + * @return The type-name of entity. (NotNull) + */ + public String getEntityTypeName() { + return "jp.sf.pal.pompei.exentity.AddressBook"; + } + + /** + * This method implements the method that is declared at super. + * + * @return The type-name of condition-bean. (NotNull) + */ + public String getConditionBeanTypeName() { + return "jp.sf.pal.pompei.cbean.bs.AddressBookCB"; + } + + /** + * This method implements the method that is declared at super. + * + * @return The type-name of dao. (NotNull) + */ + public String getDaoTypeName() { + return "jp.sf.pal.pompei.exdao.AddressBookDao"; + } + + /** + * This method implements the method that is declared at super. + * + * @return The type-name of behavior. (NotNull) + */ + public String getBehaviorTypeName() { + return "jp.sf.pal.pompei.exbhv.AddressBookBhv"; + } + + // =================================================================================== + // Type + // ==== + /** + * This method implements the method that is declared at super. + * + * @return The type of entity. (NotNull) + */ + public Class getEntityType() { + return ENTITY_TYPE; + } + + // =================================================================================== + // Instance + // ======== + /** + * This method implements the method that is declared at super. + * + * @return The type of entity. (NotNull) + */ + public Entity newEntity() { + return newMyEntity(); + } + + /** + * New the instance of my entity. + * + * @return The instance of my entity. (NotNull) + */ + public AddressBook newMyEntity() { + return new AddressBook(); + } + + // =================================================================================== + // Foreign DBMeta + // ============== + /** + * This method implements the method that is declared at super. + * + * @param foreignPropertyName Foreign-property-name(Both OK - InitCap or not). (NotNull) + * @return Foreign DBMeta. (NotNull) + */ + public DBMeta getForeignDBMeta(String foreignPropertyName) { + assertStringNotNullAndNotTrimmedEmpty("foreignPropertyName", foreignPropertyName); + final String methodName = "getForeignDBMeta_" + foreignPropertyName.substring(0, 1) + foreignPropertyName.substring(1); + + java.lang.reflect.Method method = null; + try { + method = this.getClass().getMethod(methodName, new Class[]{}); + } catch (NoSuchMethodException e) { + String msg = "The foreignPropertyName is not found: foreignPropertyName=" + foreignPropertyName; + msg = msg + " tableName=" + TABLE_DB_NAME + " methodName=" + methodName; + throw new RuntimeException(msg, e); + } + try { + return (DBMeta)method.invoke(this, new Object[]{}); + } catch (IllegalAccessException e) { + throw new RuntimeException(e); + } catch (java.lang.reflect.InvocationTargetException e) { + throw new RuntimeException(e.getCause()); + } + } + + // =================================================================================== + // Determination + // ============= + /** + * This method implements the method that is declared at super. + * + * @return Determination. + */ + public boolean hasTwoOrMorePrimaryKeys() { + return false; + } + + /** + * This method implements the method that is declared at super. + * + * @return Determination. + */ + public boolean hasCommonColumn() { + return false; + } + + // =================================================================================== + // Entity Handling + // =============== + // ----------------------------------------------------- + // Accept + // ------ + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @param primaryKeyMap Primary key map. (NotNull and NotEmpty) + */ + public void acceptPrimaryKeyMap(Entity entity, java.util.Map primaryKeyMap) { + final AddressBook myEntity = (AddressBook)entity; + MapAssertUtil.assertPrimaryKeyMapNotNullAndNotEmpty(primaryKeyMap); + final MapStringValueAnalyzer analyzer = new MapStringValueAnalyzer(primaryKeyMap, entity.getModifiedPropertyNames()); + + MapAssertUtil.assertColumnExistingInPrimaryKeyMap(primaryKeyMap, "ADDRESS_BOOK_ID"); + if (analyzer.init("ADDRESS_BOOK_ID", "addressBookId", "addressBookId")) { myEntity.setAddressBookId(analyzer.analyzeNumber(java.math.BigDecimal.class)); }; + + + } + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @param primaryKeyMapString Primary-key map-string. (NotNull and NotEmpty) + */ + public void acceptPrimaryKeyMapString(Entity entity, String primaryKeyMapString) { + MapStringUtil.acceptPrimaryKeyMapString(primaryKeyMapString, entity); + } + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @param columnValueMap Column-value map. (NotNull and NotEmpty) + */ + public void acceptColumnValueMap(Entity entity, java.util.Map columnValueMap) { + final AddressBook myEntity = (AddressBook)entity; + MapAssertUtil.assertColumnValueMapNotNullAndNotEmpty(columnValueMap); + final MapStringValueAnalyzer analyzer = new MapStringValueAnalyzer(columnValueMap, entity.getModifiedPropertyNames()); + + if (analyzer.init("ADDRESS_BOOK_ID", "addressBookId", "addressBookId")) { myEntity.setAddressBookId(analyzer.analyzeNumber(java.math.BigDecimal.class)); }; + if (analyzer.init("CUSTOMERS_ID", "customersId", "customersId")) { myEntity.setCustomersId(analyzer.analyzeNumber(java.math.BigDecimal.class)); }; + if (analyzer.init("ENTRY_GENDER", "entryGender", "entryGender")) { myEntity.setEntryGender(analyzer.analyzeString(String.class)); }; + if (analyzer.init("ENTRY_COMPANY", "entryCompany", "entryCompany")) { myEntity.setEntryCompany(analyzer.analyzeString(String.class)); }; + if (analyzer.init("ENTRY_FIRSTNAME", "entryFirstname", "entryFirstname")) { myEntity.setEntryFirstname(analyzer.analyzeString(String.class)); }; + if (analyzer.init("ENTRY_LASTNAME", "entryLastname", "entryLastname")) { myEntity.setEntryLastname(analyzer.analyzeString(String.class)); }; + if (analyzer.init("ENTRY_STREET_ADDRESS", "entryStreetAddress", "entryStreetAddress")) { myEntity.setEntryStreetAddress(analyzer.analyzeString(String.class)); }; + if (analyzer.init("ENTRY_SUBURB", "entrySuburb", "entrySuburb")) { myEntity.setEntrySuburb(analyzer.analyzeString(String.class)); }; + if (analyzer.init("ENTRY_POSTCODE", "entryPostcode", "entryPostcode")) { myEntity.setEntryPostcode(analyzer.analyzeString(String.class)); }; + if (analyzer.init("ENTRY_CITY", "entryCity", "entryCity")) { myEntity.setEntryCity(analyzer.analyzeString(String.class)); }; + if (analyzer.init("ENTRY_STATE", "entryState", "entryState")) { myEntity.setEntryState(analyzer.analyzeString(String.class)); }; + if (analyzer.init("ENTRY_COUNTRY_ID", "entryCountryId", "entryCountryId")) { myEntity.setEntryCountryId(analyzer.analyzeNumber(java.math.BigDecimal.class)); }; + if (analyzer.init("ENTRY_ZONE_ID", "entryZoneId", "entryZoneId")) { myEntity.setEntryZoneId(analyzer.analyzeNumber(java.math.BigDecimal.class)); }; + + } + + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @param columnValueMapString Column-value map-string. (NotNull and NotEmpty) + */ + public void acceptColumnValueMapString(Entity entity, String columnValueMapString) { + MapStringUtil.acceptColumnValueMapString(columnValueMapString, entity); + } + + + // ----------------------------------------------------- + // Extract + // ------- + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @return Primary-key map-string. (NotNull) + */ + public String extractPrimaryKeyMapString(Entity entity) { + return MapStringUtil.extractPrimaryKeyMapString(entity); + } + + /** + * Extract primary-key map-string. + * + * @param entity Target entity. (NotNull) + * @param startBrace Start-brace. (NotNull) + * @param endBrace End-brace. (NotNull) + * @param delimiter Delimiter. (NotNull) + * @param equal Equal. (NotNull) + * @return Primary-key map-string. (NotNull) + */ + public String extractPrimaryKeyMapString(Entity entity, String startBrace, String endBrace, String delimiter, String equal) { + final AddressBook myEntity = (AddressBook)entity; + final String mapMarkAndStartBrace = MAP_STRING_MAP_MARK + startBrace; + final StringBuffer sb = new StringBuffer(); + helpAppendingColumnValueString(sb, delimiter, equal, "ADDRESS_BOOK_ID", myEntity.getAddressBookId()); + + sb.delete(0, delimiter.length()).insert(0, mapMarkAndStartBrace).append(endBrace); + return sb.toString(); + + } + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @return Column-value map-string. (NotNull) + */ + public String extractColumnValueMapString(Entity entity) { + return MapStringUtil.extractColumnValueMapString(entity); + } + + /** + * Extract column-value map-string. + * + * @param entity Target entity. (NotNull) + * @param startBrace Start-brace. (NotNull) + * @param endBrace End-brace. (NotNull) + * @param delimiter Delimiter. (NotNull) + * @param equal Equal. (NotNull) + * @return Column-value map-string. (NotNull) + */ + public String extractColumnValueMapString(Entity entity, String startBrace, String endBrace, String delimiter, String equal) { + final AddressBook myEntity = (AddressBook)entity; + final String mapMarkAndStartBrace = MAP_STRING_MAP_MARK + startBrace; + final StringBuffer sb = new StringBuffer(); + helpAppendingColumnValueString(sb, delimiter, equal, "ADDRESS_BOOK_ID", myEntity.getAddressBookId()); + helpAppendingColumnValueString(sb, delimiter, equal, "CUSTOMERS_ID", myEntity.getCustomersId()); + helpAppendingColumnValueString(sb, delimiter, equal, "ENTRY_GENDER", myEntity.getEntryGender()); + helpAppendingColumnValueString(sb, delimiter, equal, "ENTRY_COMPANY", myEntity.getEntryCompany()); + helpAppendingColumnValueString(sb, delimiter, equal, "ENTRY_FIRSTNAME", myEntity.getEntryFirstname()); + helpAppendingColumnValueString(sb, delimiter, equal, "ENTRY_LASTNAME", myEntity.getEntryLastname()); + helpAppendingColumnValueString(sb, delimiter, equal, "ENTRY_STREET_ADDRESS", myEntity.getEntryStreetAddress()); + helpAppendingColumnValueString(sb, delimiter, equal, "ENTRY_SUBURB", myEntity.getEntrySuburb()); + helpAppendingColumnValueString(sb, delimiter, equal, "ENTRY_POSTCODE", myEntity.getEntryPostcode()); + helpAppendingColumnValueString(sb, delimiter, equal, "ENTRY_CITY", myEntity.getEntryCity()); + helpAppendingColumnValueString(sb, delimiter, equal, "ENTRY_STATE", myEntity.getEntryState()); + helpAppendingColumnValueString(sb, delimiter, equal, "ENTRY_COUNTRY_ID", myEntity.getEntryCountryId()); + helpAppendingColumnValueString(sb, delimiter, equal, "ENTRY_ZONE_ID", myEntity.getEntryZoneId()); + + sb.delete(0, delimiter.length()).insert(0, mapMarkAndStartBrace).append(endBrace); + return sb.toString(); + } + + private void helpAppendingColumnValueString(StringBuffer sb, String delimiter, String equal, String colName, Object value) { + sb.append(delimiter).append(colName).append(equal); + sb.append(helpGettingColumnStringValue(value)); + } + + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @return Column-value map-string. (NotNull) + */ + public String extractCommonColumnValueMapString(Entity entity) { + return "map:{}"; + } + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @return Column-value map-string. (NotNull) + */ + public String extractCommonColumnValueMapString(Entity entity, String startBrace, String endBrace, String delimiter, String equal) { + return "map:" + startBrace + endBrace; + } + + + // ----------------------------------------------------- + // Convert + // ------- + public java.util.List convertToColumnValueList(Entity entity) { + return new java.util.ArrayList(convertToColumnValueMap(entity).values()); + } + + public java.util.Map convertToColumnValueMap(Entity entity) { + final AddressBook myEntity = downcast(entity); + final java.util.Map valueMap = new java.util.LinkedHashMap(); + valueMap.put("ADDRESS_BOOK_ID", myEntity.getAddressBookId()); + valueMap.put("CUSTOMERS_ID", myEntity.getCustomersId()); + valueMap.put("ENTRY_GENDER", myEntity.getEntryGender()); + valueMap.put("ENTRY_COMPANY", myEntity.getEntryCompany()); + valueMap.put("ENTRY_FIRSTNAME", myEntity.getEntryFirstname()); + valueMap.put("ENTRY_LASTNAME", myEntity.getEntryLastname()); + valueMap.put("ENTRY_STREET_ADDRESS", myEntity.getEntryStreetAddress()); + valueMap.put("ENTRY_SUBURB", myEntity.getEntrySuburb()); + valueMap.put("ENTRY_POSTCODE", myEntity.getEntryPostcode()); + valueMap.put("ENTRY_CITY", myEntity.getEntryCity()); + valueMap.put("ENTRY_STATE", myEntity.getEntryState()); + valueMap.put("ENTRY_COUNTRY_ID", myEntity.getEntryCountryId()); + valueMap.put("ENTRY_ZONE_ID", myEntity.getEntryZoneId()); + return valueMap; + } + + public java.util.List convertToColumnStringValueList(Entity entity) { + return new java.util.ArrayList(convertToColumnStringValueMap(entity).values()); + } + + public java.util.Map convertToColumnStringValueMap(Entity entity) { + final AddressBook myEntity = downcast(entity); + final java.util.Map valueMap = new java.util.LinkedHashMap(); + valueMap.put("ADDRESS_BOOK_ID", helpGettingColumnStringValue(myEntity.getAddressBookId())); + valueMap.put("CUSTOMERS_ID", helpGettingColumnStringValue(myEntity.getCustomersId())); + valueMap.put("ENTRY_GENDER", helpGettingColumnStringValue(myEntity.getEntryGender())); + valueMap.put("ENTRY_COMPANY", helpGettingColumnStringValue(myEntity.getEntryCompany())); + valueMap.put("ENTRY_FIRSTNAME", helpGettingColumnStringValue(myEntity.getEntryFirstname())); + valueMap.put("ENTRY_LASTNAME", helpGettingColumnStringValue(myEntity.getEntryLastname())); + valueMap.put("ENTRY_STREET_ADDRESS", helpGettingColumnStringValue(myEntity.getEntryStreetAddress())); + valueMap.put("ENTRY_SUBURB", helpGettingColumnStringValue(myEntity.getEntrySuburb())); + valueMap.put("ENTRY_POSTCODE", helpGettingColumnStringValue(myEntity.getEntryPostcode())); + valueMap.put("ENTRY_CITY", helpGettingColumnStringValue(myEntity.getEntryCity())); + valueMap.put("ENTRY_STATE", helpGettingColumnStringValue(myEntity.getEntryState())); + valueMap.put("ENTRY_COUNTRY_ID", helpGettingColumnStringValue(myEntity.getEntryCountryId())); + valueMap.put("ENTRY_ZONE_ID", helpGettingColumnStringValue(myEntity.getEntryZoneId())); + return valueMap; + } + + // =================================================================================== + // JDBC Support + // ============ + public String getPreparedInsertClause() { + return "insert into ADDRESS_BOOK(ADDRESS_BOOK_ID, CUSTOMERS_ID, ENTRY_GENDER, ENTRY_COMPANY, ENTRY_FIRSTNAME, ENTRY_LASTNAME, ENTRY_STREET_ADDRESS, ENTRY_SUBURB, ENTRY_POSTCODE, ENTRY_CITY, ENTRY_STATE, ENTRY_COUNTRY_ID, ENTRY_ZONE_ID) values(? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? )"; + } + + public String getPreparedInsertClause(String tablePrefix) { + return "insert into " + tablePrefix + "ADDRESS_BOOK(ADDRESS_BOOK_ID, CUSTOMERS_ID, ENTRY_GENDER, ENTRY_COMPANY, ENTRY_FIRSTNAME, ENTRY_LASTNAME, ENTRY_STREET_ADDRESS, ENTRY_SUBURB, ENTRY_POSTCODE, ENTRY_CITY, ENTRY_STATE, ENTRY_COUNTRY_ID, ENTRY_ZONE_ID) values(? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? )"; + } + + // =================================================================================== + // Helper + // ====== + protected AddressBook downcast(Entity entity) { + assertObjectNotNull("entity", entity); + try { + return (AddressBook)entity; + } catch (ClassCastException e) { + String msg = "The entity should be AddressBook but it was: " + entity.getClass(); + throw new IllegalStateException(msg, e); + } + } + + protected void checkDowncast(Entity entity) { + downcast(entity); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/dbmeta/AddressFormatDbm.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/dbmeta/AddressFormatDbm.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/dbmeta/AddressFormatDbm.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,672 @@ +package jp.sf.pal.pompei.bsentity.dbmeta; + + +import jp.sf.pal.pompei.allcommon.Entity; +import jp.sf.pal.pompei.allcommon.dbmeta.DBMeta; +import jp.sf.pal.pompei.allcommon.dbmeta.AbstractDBMeta; +import jp.sf.pal.pompei.exentity.AddressFormat; + +/** + * The dbmeta of ADDRESS_FORMAT. (Singleton) + * + *
+ * [primary-key]
+ *     ADDRESS_FORMAT_ID
+ * 
+ * [column-property]
+ *     ADDRESS_FORMAT_ID, ADDRESS_FORMAT, ADDRESS_SUMMARY
+ * 
+ * [foreign-property]
+ *     
+ * 
+ * [refferer-property]
+ *     
+ * 
+ * [sequence]
+ *     
+ * 
+ * [identity]
+ *     
+ * 
+ * [update-date]
+ *     
+ * 
+ * [version-no]
+ *     
+ * 
+ * 
+ * + * @author DBFlute(AutoGenerator) + */ +public class AddressFormatDbm extends AbstractDBMeta { + + // =================================================================================== + // Definition + // ========== + /** The type of entity. */ + protected static final Class ENTITY_TYPE = AddressFormat.class; + + /** Singleton instance. */ + private static final AddressFormatDbm _instance = new AddressFormatDbm(); + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + private AddressFormatDbm() { + } + + // =================================================================================== + // Singleton + // ========= + /** + * Get instance. + * + * @return Singleton instance. (NotNull) + */ + public static AddressFormatDbm getInstance() { + return _instance; + } + + // =================================================================================== + // Name Definition + // =============== + /** Table db name. */ + public static final String TABLE_DB_NAME = "ADDRESS_FORMAT"; + + /** Table cap-prop name. */ + public static final String TABLE_CAP_PROP_NAME = "AddressFormat"; + + /** Table uncap-prop name. */ + public static final String TABLE_UNCAP_PROP_NAME = "addressFormat"; + + /** Db-name of AddressFormatId. */ + public static final String COLUMN_DB_NAME_OF_AddressFormatId = "ADDRESS_FORMAT_ID"; + /** Db-name of AddressFormat. */ + public static final String COLUMN_DB_NAME_OF_AddressFormat = "ADDRESS_FORMAT"; + /** Db-name of AddressSummary. */ + public static final String COLUMN_DB_NAME_OF_AddressSummary = "ADDRESS_SUMMARY"; + + /** Cap-prop-name of AddressFormatId. */ + public static final String COLUMN_CAP_PROP_NAME_OF_AddressFormatId = "AddressFormatId"; + /** Cap-prop-name of AddressFormat. */ + public static final String COLUMN_CAP_PROP_NAME_OF_AddressFormat = "AddressFormat"; + /** Cap-prop-name of AddressSummary. */ + public static final String COLUMN_CAP_PROP_NAME_OF_AddressSummary = "AddressSummary"; + + + + /** Uncap-prop-name of AddressFormatId. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_AddressFormatId = "addressFormatId"; + /** Uncap-prop-name of AddressFormat. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_AddressFormat = "addressFormat"; + /** Uncap-prop-name of AddressSummary. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_AddressSummary = "addressSummary"; + + + + /** {db-name : cap-prop-name} map. */ + private static java.util.Map _dbNameCapPropNameMap; + protected static java.util.Map createDbNameCapPropNameMap() { + if (_dbNameCapPropNameMap != null) { + return _dbNameCapPropNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_DB_NAME, TABLE_CAP_PROP_NAME); + + map.put(COLUMN_DB_NAME_OF_AddressFormatId, COLUMN_CAP_PROP_NAME_OF_AddressFormatId); + map.put(COLUMN_DB_NAME_OF_AddressFormat, COLUMN_CAP_PROP_NAME_OF_AddressFormat); + map.put(COLUMN_DB_NAME_OF_AddressSummary, COLUMN_CAP_PROP_NAME_OF_AddressSummary); + + _dbNameCapPropNameMap = java.util.Collections.unmodifiableMap(map); + return _dbNameCapPropNameMap; + } + + /** {db-name : uncap-prop-name} map. */ + private static java.util.Map _dbNameUncapPropNameMap; + protected static java.util.Map createDbNameUncapPropNameMap() { + if (_dbNameUncapPropNameMap != null) { + return _dbNameUncapPropNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_DB_NAME, TABLE_UNCAP_PROP_NAME); + + map.put(COLUMN_DB_NAME_OF_AddressFormatId, COLUMN_UNCAP_PROP_NAME_OF_AddressFormatId); + map.put(COLUMN_DB_NAME_OF_AddressFormat, COLUMN_UNCAP_PROP_NAME_OF_AddressFormat); + map.put(COLUMN_DB_NAME_OF_AddressSummary, COLUMN_UNCAP_PROP_NAME_OF_AddressSummary); + + _dbNameUncapPropNameMap = java.util.Collections.unmodifiableMap(map); + return _dbNameUncapPropNameMap; + } + + /** {cap-prop-name : db-name} map. */ + private static java.util.Map _capPropNameDbNameMap; + protected static java.util.Map createCapPropNameDbNameMap() { + if (_capPropNameDbNameMap != null) { + return _capPropNameDbNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_CAP_PROP_NAME, TABLE_DB_NAME); + + map.put(COLUMN_CAP_PROP_NAME_OF_AddressFormatId, COLUMN_DB_NAME_OF_AddressFormatId); + map.put(COLUMN_CAP_PROP_NAME_OF_AddressFormat, COLUMN_DB_NAME_OF_AddressFormat); + map.put(COLUMN_CAP_PROP_NAME_OF_AddressSummary, COLUMN_DB_NAME_OF_AddressSummary); + + _capPropNameDbNameMap = java.util.Collections.unmodifiableMap(map); + return _capPropNameDbNameMap; + } + + /** {cap-prop-name : uncap-prop-name} map. */ + private static java.util.Map _capPropNameUncapPropNameMap; + protected static java.util.Map createCapPropNameUncapPropNameMap() { + if (_capPropNameUncapPropNameMap != null) { + return _capPropNameUncapPropNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_CAP_PROP_NAME, TABLE_UNCAP_PROP_NAME); + + map.put(COLUMN_CAP_PROP_NAME_OF_AddressFormatId, COLUMN_UNCAP_PROP_NAME_OF_AddressFormatId); + map.put(COLUMN_CAP_PROP_NAME_OF_AddressFormat, COLUMN_UNCAP_PROP_NAME_OF_AddressFormat); + map.put(COLUMN_CAP_PROP_NAME_OF_AddressSummary, COLUMN_UNCAP_PROP_NAME_OF_AddressSummary); + + _capPropNameUncapPropNameMap = java.util.Collections.unmodifiableMap(map); + return _capPropNameUncapPropNameMap; + } + + /** {uncap-prop-name : db-name} map. */ + private static java.util.Map _uncapPropNameDbNameMap; + protected static java.util.Map createUncapPropNameDbNameMap() { + if (_uncapPropNameDbNameMap != null) { + return _uncapPropNameDbNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_UNCAP_PROP_NAME, TABLE_DB_NAME); + + map.put(COLUMN_UNCAP_PROP_NAME_OF_AddressFormatId, COLUMN_DB_NAME_OF_AddressFormatId); + map.put(COLUMN_UNCAP_PROP_NAME_OF_AddressFormat, COLUMN_DB_NAME_OF_AddressFormat); + map.put(COLUMN_UNCAP_PROP_NAME_OF_AddressSummary, COLUMN_DB_NAME_OF_AddressSummary); + + _uncapPropNameDbNameMap = java.util.Collections.unmodifiableMap(map); + return _uncapPropNameDbNameMap; + } + + /** {uncap-prop-name : cap-prop-name} map. */ + private static java.util.Map _uncapPropNameCapPropNameMap; + protected static java.util.Map createUncapPropNameCapPropNameMap() { + if (_uncapPropNameCapPropNameMap != null) { + return _uncapPropNameCapPropNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_UNCAP_PROP_NAME, TABLE_CAP_PROP_NAME); + + map.put(COLUMN_UNCAP_PROP_NAME_OF_AddressFormatId, COLUMN_CAP_PROP_NAME_OF_AddressFormatId); + map.put(COLUMN_UNCAP_PROP_NAME_OF_AddressFormat, COLUMN_CAP_PROP_NAME_OF_AddressFormat); + map.put(COLUMN_UNCAP_PROP_NAME_OF_AddressSummary, COLUMN_CAP_PROP_NAME_OF_AddressSummary); + + _uncapPropNameCapPropNameMap = java.util.Collections.unmodifiableMap(map); + return _uncapPropNameCapPropNameMap; + } + + // =================================================================================== + // Name-Map + // ======== + /** + * This method implements the method that is declared at super. + * + * @return {db-name : cap-prop-name} map. + */ + public java.util.Map getDbNameCapPropNameMap() { + return createDbNameCapPropNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {db-name : uncap-prop-name} map. + */ + public java.util.Map getDbNameUncapPropNameMap() { + return createDbNameUncapPropNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {cap-prop-name : db-name} map. + */ + public java.util.Map getCapPropNameDbNameMap() { + return createCapPropNameDbNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {cap-prop-name : uncap-prop-name} map. + */ + public java.util.Map getCapPropNameUncapPropNameMap() { + return createCapPropNameUncapPropNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {uncap-prop-name : db-name} map. + */ + public java.util.Map getUncapPropNameDbNameMap() { + return createUncapPropNameDbNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {uncap-prop-name : cap-prop-name} map. + */ + public java.util.Map getUncapPropNameCapPropNameMap() { + return createUncapPropNameCapPropNameMap(); + } + + // =================================================================================== + // Table Name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + public String getTableDbName() { + return TABLE_DB_NAME; + } + + /** + * This method implements the method that is declared at super. + * + * @return Table cap-prop-name. (NotNull) + */ + public String getTableCapPropName() { + return TABLE_CAP_PROP_NAME; + } + + /** + * This method implements the method that is declared at super. + * + * @return Table property-name. (NotNull) + */ + public String getTableUncapPropName() { + return TABLE_UNCAP_PROP_NAME; + } + + // =================================================================================== + // Column Name + // =========== + public java.util.List getColumnDbNameList() { + final String[] columns = getColumnDbNameCommaString().split(","); + final java.util.List resultList = new java.util.ArrayList(); + for (int i=0; i < columns.length; i++) { + resultList.add(columns[i].trim()); + } + return resultList; + } + + public java.util.List getColumnCapPropNameList() { + final java.util.List columnDbNameList = getColumnDbNameList(); + final java.util.List resultList = new java.util.ArrayList(); + for (final java.util.Iterator ite = columnDbNameList.iterator(); ite.hasNext(); ) { + resultList.add(getDbNameCapPropNameMap().get((String)ite.next())); + } + return resultList; + } + + public java.util.List getColumnUncapPropNameList() { + final java.util.List columnDbNameList = getColumnDbNameList(); + final java.util.List resultList = new java.util.ArrayList(); + for (final java.util.Iterator ite = columnDbNameList.iterator(); ite.hasNext(); ) { + resultList.add(getDbNameUncapPropNameMap().get((String)ite.next())); + } + return resultList; + } + + /** + * This method implements the method that is declared at super. + * + * @return Column-db-name comma-string. (NotNull) + */ + public String getColumnDbNameCommaString() { + return "ADDRESS_FORMAT_ID, ADDRESS_FORMAT, ADDRESS_SUMMARY"; + } + + // =================================================================================== + // Type Name + // ========= + /** + * This method implements the method that is declared at super. + * + * @return The type-name of entity. (NotNull) + */ + public String getEntityTypeName() { + return "jp.sf.pal.pompei.exentity.AddressFormat"; + } + + /** + * This method implements the method that is declared at super. + * + * @return The type-name of condition-bean. (NotNull) + */ + public String getConditionBeanTypeName() { + return "jp.sf.pal.pompei.cbean.bs.AddressFormatCB"; + } + + /** + * This method implements the method that is declared at super. + * + * @return The type-name of dao. (NotNull) + */ + public String getDaoTypeName() { + return "jp.sf.pal.pompei.exdao.AddressFormatDao"; + } + + /** + * This method implements the method that is declared at super. + * + * @return The type-name of behavior. (NotNull) + */ + public String getBehaviorTypeName() { + return "jp.sf.pal.pompei.exbhv.AddressFormatBhv"; + } + + // =================================================================================== + // Type + // ==== + /** + * This method implements the method that is declared at super. + * + * @return The type of entity. (NotNull) + */ + public Class getEntityType() { + return ENTITY_TYPE; + } + + // =================================================================================== + // Instance + // ======== + /** + * This method implements the method that is declared at super. + * + * @return The type of entity. (NotNull) + */ + public Entity newEntity() { + return newMyEntity(); + } + + /** + * New the instance of my entity. + * + * @return The instance of my entity. (NotNull) + */ + public AddressFormat newMyEntity() { + return new AddressFormat(); + } + + // =================================================================================== + // Foreign DBMeta + // ============== + /** + * This method implements the method that is declared at super. + * + * @param foreignPropertyName Foreign-property-name(Both OK - InitCap or not). (NotNull) + * @return Foreign DBMeta. (NotNull) + */ + public DBMeta getForeignDBMeta(String foreignPropertyName) { + assertStringNotNullAndNotTrimmedEmpty("foreignPropertyName", foreignPropertyName); + final String methodName = "getForeignDBMeta_" + foreignPropertyName.substring(0, 1) + foreignPropertyName.substring(1); + + java.lang.reflect.Method method = null; + try { + method = this.getClass().getMethod(methodName, new Class[]{}); + } catch (NoSuchMethodException e) { + String msg = "The foreignPropertyName is not found: foreignPropertyName=" + foreignPropertyName; + msg = msg + " tableName=" + TABLE_DB_NAME + " methodName=" + methodName; + throw new RuntimeException(msg, e); + } + try { + return (DBMeta)method.invoke(this, new Object[]{}); + } catch (IllegalAccessException e) { + throw new RuntimeException(e); + } catch (java.lang.reflect.InvocationTargetException e) { + throw new RuntimeException(e.getCause()); + } + } + + // =================================================================================== + // Determination + // ============= + /** + * This method implements the method that is declared at super. + * + * @return Determination. + */ + public boolean hasTwoOrMorePrimaryKeys() { + return false; + } + + /** + * This method implements the method that is declared at super. + * + * @return Determination. + */ + public boolean hasCommonColumn() { + return false; + } + + // =================================================================================== + // Entity Handling + // =============== + // ----------------------------------------------------- + // Accept + // ------ + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @param primaryKeyMap Primary key map. (NotNull and NotEmpty) + */ + public void acceptPrimaryKeyMap(Entity entity, java.util.Map primaryKeyMap) { + final AddressFormat myEntity = (AddressFormat)entity; + MapAssertUtil.assertPrimaryKeyMapNotNullAndNotEmpty(primaryKeyMap); + final MapStringValueAnalyzer analyzer = new MapStringValueAnalyzer(primaryKeyMap, entity.getModifiedPropertyNames()); + + MapAssertUtil.assertColumnExistingInPrimaryKeyMap(primaryKeyMap, "ADDRESS_FORMAT_ID"); + if (analyzer.init("ADDRESS_FORMAT_ID", "addressFormatId", "addressFormatId")) { myEntity.setAddressFormatId(analyzer.analyzeNumber(java.math.BigDecimal.class)); }; + + + } + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @param primaryKeyMapString Primary-key map-string. (NotNull and NotEmpty) + */ + public void acceptPrimaryKeyMapString(Entity entity, String primaryKeyMapString) { + MapStringUtil.acceptPrimaryKeyMapString(primaryKeyMapString, entity); + } + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @param columnValueMap Column-value map. (NotNull and NotEmpty) + */ + public void acceptColumnValueMap(Entity entity, java.util.Map columnValueMap) { + final AddressFormat myEntity = (AddressFormat)entity; + MapAssertUtil.assertColumnValueMapNotNullAndNotEmpty(columnValueMap); + final MapStringValueAnalyzer analyzer = new MapStringValueAnalyzer(columnValueMap, entity.getModifiedPropertyNames()); + + if (analyzer.init("ADDRESS_FORMAT_ID", "addressFormatId", "addressFormatId")) { myEntity.setAddressFormatId(analyzer.analyzeNumber(java.math.BigDecimal.class)); }; + if (analyzer.init("ADDRESS_FORMAT", "addressFormat", "addressFormat")) { myEntity.setAddressFormat(analyzer.analyzeString(String.class)); }; + if (analyzer.init("ADDRESS_SUMMARY", "addressSummary", "addressSummary")) { myEntity.setAddressSummary(analyzer.analyzeString(String.class)); }; + + } + + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @param columnValueMapString Column-value map-string. (NotNull and NotEmpty) + */ + public void acceptColumnValueMapString(Entity entity, String columnValueMapString) { + MapStringUtil.acceptColumnValueMapString(columnValueMapString, entity); + } + + + // ----------------------------------------------------- + // Extract + // ------- + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @return Primary-key map-string. (NotNull) + */ + public String extractPrimaryKeyMapString(Entity entity) { + return MapStringUtil.extractPrimaryKeyMapString(entity); + } + + /** + * Extract primary-key map-string. + * + * @param entity Target entity. (NotNull) + * @param startBrace Start-brace. (NotNull) + * @param endBrace End-brace. (NotNull) + * @param delimiter Delimiter. (NotNull) + * @param equal Equal. (NotNull) + * @return Primary-key map-string. (NotNull) + */ + public String extractPrimaryKeyMapString(Entity entity, String startBrace, String endBrace, String delimiter, String equal) { + final AddressFormat myEntity = (AddressFormat)entity; + final String mapMarkAndStartBrace = MAP_STRING_MAP_MARK + startBrace; + final StringBuffer sb = new StringBuffer(); + helpAppendingColumnValueString(sb, delimiter, equal, "ADDRESS_FORMAT_ID", myEntity.getAddressFormatId()); + + sb.delete(0, delimiter.length()).insert(0, mapMarkAndStartBrace).append(endBrace); + return sb.toString(); + + } + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @return Column-value map-string. (NotNull) + */ + public String extractColumnValueMapString(Entity entity) { + return MapStringUtil.extractColumnValueMapString(entity); + } + + /** + * Extract column-value map-string. + * + * @param entity Target entity. (NotNull) + * @param startBrace Start-brace. (NotNull) + * @param endBrace End-brace. (NotNull) + * @param delimiter Delimiter. (NotNull) + * @param equal Equal. (NotNull) + * @return Column-value map-string. (NotNull) + */ + public String extractColumnValueMapString(Entity entity, String startBrace, String endBrace, String delimiter, String equal) { + final AddressFormat myEntity = (AddressFormat)entity; + final String mapMarkAndStartBrace = MAP_STRING_MAP_MARK + startBrace; + final StringBuffer sb = new StringBuffer(); + helpAppendingColumnValueString(sb, delimiter, equal, "ADDRESS_FORMAT_ID", myEntity.getAddressFormatId()); + helpAppendingColumnValueString(sb, delimiter, equal, "ADDRESS_FORMAT", myEntity.getAddressFormat()); + helpAppendingColumnValueString(sb, delimiter, equal, "ADDRESS_SUMMARY", myEntity.getAddressSummary()); + + sb.delete(0, delimiter.length()).insert(0, mapMarkAndStartBrace).append(endBrace); + return sb.toString(); + } + + private void helpAppendingColumnValueString(StringBuffer sb, String delimiter, String equal, String colName, Object value) { + sb.append(delimiter).append(colName).append(equal); + sb.append(helpGettingColumnStringValue(value)); + } + + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @return Column-value map-string. (NotNull) + */ + public String extractCommonColumnValueMapString(Entity entity) { + return "map:{}"; + } + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @return Column-value map-string. (NotNull) + */ + public String extractCommonColumnValueMapString(Entity entity, String startBrace, String endBrace, String delimiter, String equal) { + return "map:" + startBrace + endBrace; + } + + + // ----------------------------------------------------- + // Convert + // ------- + public java.util.List convertToColumnValueList(Entity entity) { + return new java.util.ArrayList(convertToColumnValueMap(entity).values()); + } + + public java.util.Map convertToColumnValueMap(Entity entity) { + final AddressFormat myEntity = downcast(entity); + final java.util.Map valueMap = new java.util.LinkedHashMap(); + valueMap.put("ADDRESS_FORMAT_ID", myEntity.getAddressFormatId()); + valueMap.put("ADDRESS_FORMAT", myEntity.getAddressFormat()); + valueMap.put("ADDRESS_SUMMARY", myEntity.getAddressSummary()); + return valueMap; + } + + public java.util.List convertToColumnStringValueList(Entity entity) { + return new java.util.ArrayList(convertToColumnStringValueMap(entity).values()); + } + + public java.util.Map convertToColumnStringValueMap(Entity entity) { + final AddressFormat myEntity = downcast(entity); + final java.util.Map valueMap = new java.util.LinkedHashMap(); + valueMap.put("ADDRESS_FORMAT_ID", helpGettingColumnStringValue(myEntity.getAddressFormatId())); + valueMap.put("ADDRESS_FORMAT", helpGettingColumnStringValue(myEntity.getAddressFormat())); + valueMap.put("ADDRESS_SUMMARY", helpGettingColumnStringValue(myEntity.getAddressSummary())); + return valueMap; + } + + // =================================================================================== + // JDBC Support + // ============ + public String getPreparedInsertClause() { + return "insert into ADDRESS_FORMAT(ADDRESS_FORMAT_ID, ADDRESS_FORMAT, ADDRESS_SUMMARY) values(? , ? , ? )"; + } + + public String getPreparedInsertClause(String tablePrefix) { + return "insert into " + tablePrefix + "ADDRESS_FORMAT(ADDRESS_FORMAT_ID, ADDRESS_FORMAT, ADDRESS_SUMMARY) values(? , ? , ? )"; + } + + // =================================================================================== + // Helper + // ====== + protected AddressFormat downcast(Entity entity) { + assertObjectNotNull("entity", entity); + try { + return (AddressFormat)entity; + } catch (ClassCastException e) { + String msg = "The entity should be AddressFormat but it was: " + entity.getClass(); + throw new IllegalStateException(msg, e); + } + } + + protected void checkDowncast(Entity entity) { + downcast(entity); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/dbmeta/BannersDbm.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/dbmeta/BannersDbm.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/dbmeta/BannersDbm.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,816 @@ +package jp.sf.pal.pompei.bsentity.dbmeta; + + +import jp.sf.pal.pompei.allcommon.Entity; +import jp.sf.pal.pompei.allcommon.dbmeta.DBMeta; +import jp.sf.pal.pompei.allcommon.dbmeta.AbstractDBMeta; +import jp.sf.pal.pompei.exentity.Banners; + +/** + * The dbmeta of BANNERS. (Singleton) + * + *
+ * [primary-key]
+ *     BANNERS_ID
+ * 
+ * [column-property]
+ *     BANNERS_ID, BANNERS_TITLE, BANNERS_URL, BANNERS_IMAGE, BANNERS_GROUP, BANNERS_HTML_TEXT, EXPIRES_IMPRESSIONS, EXPIRES_DATE, DATE_SCHEDULED, DATE_ADDED, DATE_STATUS_CHANGE, STATUS
+ * 
+ * [foreign-property]
+ *     
+ * 
+ * [refferer-property]
+ *     
+ * 
+ * [sequence]
+ *     
+ * 
+ * [identity]
+ *     
+ * 
+ * [update-date]
+ *     
+ * 
+ * [version-no]
+ *     
+ * 
+ * 
+ * + * @author DBFlute(AutoGenerator) + */ +public class BannersDbm extends AbstractDBMeta { + + // =================================================================================== + // Definition + // ========== + /** The type of entity. */ + protected static final Class ENTITY_TYPE = Banners.class; + + /** Singleton instance. */ + private static final BannersDbm _instance = new BannersDbm(); + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + private BannersDbm() { + } + + // =================================================================================== + // Singleton + // ========= + /** + * Get instance. + * + * @return Singleton instance. (NotNull) + */ + public static BannersDbm getInstance() { + return _instance; + } + + // =================================================================================== + // Name Definition + // =============== + /** Table db name. */ + public static final String TABLE_DB_NAME = "BANNERS"; + + /** Table cap-prop name. */ + public static final String TABLE_CAP_PROP_NAME = "Banners"; + + /** Table uncap-prop name. */ + public static final String TABLE_UNCAP_PROP_NAME = "banners"; + + /** Db-name of BannersId. */ + public static final String COLUMN_DB_NAME_OF_BannersId = "BANNERS_ID"; + /** Db-name of BannersTitle. */ + public static final String COLUMN_DB_NAME_OF_BannersTitle = "BANNERS_TITLE"; + /** Db-name of BannersUrl. */ + public static final String COLUMN_DB_NAME_OF_BannersUrl = "BANNERS_URL"; + /** Db-name of BannersImage. */ + public static final String COLUMN_DB_NAME_OF_BannersImage = "BANNERS_IMAGE"; + /** Db-name of BannersGroup. */ + public static final String COLUMN_DB_NAME_OF_BannersGroup = "BANNERS_GROUP"; + /** Db-name of BannersHtmlText. */ + public static final String COLUMN_DB_NAME_OF_BannersHtmlText = "BANNERS_HTML_TEXT"; + /** Db-name of ExpiresImpressions. */ + public static final String COLUMN_DB_NAME_OF_ExpiresImpressions = "EXPIRES_IMPRESSIONS"; + /** Db-name of ExpiresDate. */ + public static final String COLUMN_DB_NAME_OF_ExpiresDate = "EXPIRES_DATE"; + /** Db-name of DateScheduled. */ + public static final String COLUMN_DB_NAME_OF_DateScheduled = "DATE_SCHEDULED"; + /** Db-name of DateAdded. */ + public static final String COLUMN_DB_NAME_OF_DateAdded = "DATE_ADDED"; + /** Db-name of DateStatusChange. */ + public static final String COLUMN_DB_NAME_OF_DateStatusChange = "DATE_STATUS_CHANGE"; + /** Db-name of Status. */ + public static final String COLUMN_DB_NAME_OF_Status = "STATUS"; + + /** Cap-prop-name of BannersId. */ + public static final String COLUMN_CAP_PROP_NAME_OF_BannersId = "BannersId"; + /** Cap-prop-name of BannersTitle. */ + public static final String COLUMN_CAP_PROP_NAME_OF_BannersTitle = "BannersTitle"; + /** Cap-prop-name of BannersUrl. */ + public static final String COLUMN_CAP_PROP_NAME_OF_BannersUrl = "BannersUrl"; + /** Cap-prop-name of BannersImage. */ + public static final String COLUMN_CAP_PROP_NAME_OF_BannersImage = "BannersImage"; + /** Cap-prop-name of BannersGroup. */ + public static final String COLUMN_CAP_PROP_NAME_OF_BannersGroup = "BannersGroup"; + /** Cap-prop-name of BannersHtmlText. */ + public static final String COLUMN_CAP_PROP_NAME_OF_BannersHtmlText = "BannersHtmlText"; + /** Cap-prop-name of ExpiresImpressions. */ + public static final String COLUMN_CAP_PROP_NAME_OF_ExpiresImpressions = "ExpiresImpressions"; + /** Cap-prop-name of ExpiresDate. */ + public static final String COLUMN_CAP_PROP_NAME_OF_ExpiresDate = "ExpiresDate"; + /** Cap-prop-name of DateScheduled. */ + public static final String COLUMN_CAP_PROP_NAME_OF_DateScheduled = "DateScheduled"; + /** Cap-prop-name of DateAdded. */ + public static final String COLUMN_CAP_PROP_NAME_OF_DateAdded = "DateAdded"; + /** Cap-prop-name of DateStatusChange. */ + public static final String COLUMN_CAP_PROP_NAME_OF_DateStatusChange = "DateStatusChange"; + /** Cap-prop-name of Status. */ + public static final String COLUMN_CAP_PROP_NAME_OF_Status = "Status"; + + + + /** Uncap-prop-name of BannersId. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_BannersId = "bannersId"; + /** Uncap-prop-name of BannersTitle. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_BannersTitle = "bannersTitle"; + /** Uncap-prop-name of BannersUrl. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_BannersUrl = "bannersUrl"; + /** Uncap-prop-name of BannersImage. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_BannersImage = "bannersImage"; + /** Uncap-prop-name of BannersGroup. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_BannersGroup = "bannersGroup"; + /** Uncap-prop-name of BannersHtmlText. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_BannersHtmlText = "bannersHtmlText"; + /** Uncap-prop-name of ExpiresImpressions. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_ExpiresImpressions = "expiresImpressions"; + /** Uncap-prop-name of ExpiresDate. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_ExpiresDate = "expiresDate"; + /** Uncap-prop-name of DateScheduled. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_DateScheduled = "dateScheduled"; + /** Uncap-prop-name of DateAdded. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_DateAdded = "dateAdded"; + /** Uncap-prop-name of DateStatusChange. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_DateStatusChange = "dateStatusChange"; + /** Uncap-prop-name of Status. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_Status = "status"; + + + + /** {db-name : cap-prop-name} map. */ + private static java.util.Map _dbNameCapPropNameMap; + protected static java.util.Map createDbNameCapPropNameMap() { + if (_dbNameCapPropNameMap != null) { + return _dbNameCapPropNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_DB_NAME, TABLE_CAP_PROP_NAME); + + map.put(COLUMN_DB_NAME_OF_BannersId, COLUMN_CAP_PROP_NAME_OF_BannersId); + map.put(COLUMN_DB_NAME_OF_BannersTitle, COLUMN_CAP_PROP_NAME_OF_BannersTitle); + map.put(COLUMN_DB_NAME_OF_BannersUrl, COLUMN_CAP_PROP_NAME_OF_BannersUrl); + map.put(COLUMN_DB_NAME_OF_BannersImage, COLUMN_CAP_PROP_NAME_OF_BannersImage); + map.put(COLUMN_DB_NAME_OF_BannersGroup, COLUMN_CAP_PROP_NAME_OF_BannersGroup); + map.put(COLUMN_DB_NAME_OF_BannersHtmlText, COLUMN_CAP_PROP_NAME_OF_BannersHtmlText); + map.put(COLUMN_DB_NAME_OF_ExpiresImpressions, COLUMN_CAP_PROP_NAME_OF_ExpiresImpressions); + map.put(COLUMN_DB_NAME_OF_ExpiresDate, COLUMN_CAP_PROP_NAME_OF_ExpiresDate); + map.put(COLUMN_DB_NAME_OF_DateScheduled, COLUMN_CAP_PROP_NAME_OF_DateScheduled); + map.put(COLUMN_DB_NAME_OF_DateAdded, COLUMN_CAP_PROP_NAME_OF_DateAdded); + map.put(COLUMN_DB_NAME_OF_DateStatusChange, COLUMN_CAP_PROP_NAME_OF_DateStatusChange); + map.put(COLUMN_DB_NAME_OF_Status, COLUMN_CAP_PROP_NAME_OF_Status); + + _dbNameCapPropNameMap = java.util.Collections.unmodifiableMap(map); + return _dbNameCapPropNameMap; + } + + /** {db-name : uncap-prop-name} map. */ + private static java.util.Map _dbNameUncapPropNameMap; + protected static java.util.Map createDbNameUncapPropNameMap() { + if (_dbNameUncapPropNameMap != null) { + return _dbNameUncapPropNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_DB_NAME, TABLE_UNCAP_PROP_NAME); + + map.put(COLUMN_DB_NAME_OF_BannersId, COLUMN_UNCAP_PROP_NAME_OF_BannersId); + map.put(COLUMN_DB_NAME_OF_BannersTitle, COLUMN_UNCAP_PROP_NAME_OF_BannersTitle); + map.put(COLUMN_DB_NAME_OF_BannersUrl, COLUMN_UNCAP_PROP_NAME_OF_BannersUrl); + map.put(COLUMN_DB_NAME_OF_BannersImage, COLUMN_UNCAP_PROP_NAME_OF_BannersImage); + map.put(COLUMN_DB_NAME_OF_BannersGroup, COLUMN_UNCAP_PROP_NAME_OF_BannersGroup); + map.put(COLUMN_DB_NAME_OF_BannersHtmlText, COLUMN_UNCAP_PROP_NAME_OF_BannersHtmlText); + map.put(COLUMN_DB_NAME_OF_ExpiresImpressions, COLUMN_UNCAP_PROP_NAME_OF_ExpiresImpressions); + map.put(COLUMN_DB_NAME_OF_ExpiresDate, COLUMN_UNCAP_PROP_NAME_OF_ExpiresDate); + map.put(COLUMN_DB_NAME_OF_DateScheduled, COLUMN_UNCAP_PROP_NAME_OF_DateScheduled); + map.put(COLUMN_DB_NAME_OF_DateAdded, COLUMN_UNCAP_PROP_NAME_OF_DateAdded); + map.put(COLUMN_DB_NAME_OF_DateStatusChange, COLUMN_UNCAP_PROP_NAME_OF_DateStatusChange); + map.put(COLUMN_DB_NAME_OF_Status, COLUMN_UNCAP_PROP_NAME_OF_Status); + + _dbNameUncapPropNameMap = java.util.Collections.unmodifiableMap(map); + return _dbNameUncapPropNameMap; + } + + /** {cap-prop-name : db-name} map. */ + private static java.util.Map _capPropNameDbNameMap; + protected static java.util.Map createCapPropNameDbNameMap() { + if (_capPropNameDbNameMap != null) { + return _capPropNameDbNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_CAP_PROP_NAME, TABLE_DB_NAME); + + map.put(COLUMN_CAP_PROP_NAME_OF_BannersId, COLUMN_DB_NAME_OF_BannersId); + map.put(COLUMN_CAP_PROP_NAME_OF_BannersTitle, COLUMN_DB_NAME_OF_BannersTitle); + map.put(COLUMN_CAP_PROP_NAME_OF_BannersUrl, COLUMN_DB_NAME_OF_BannersUrl); + map.put(COLUMN_CAP_PROP_NAME_OF_BannersImage, COLUMN_DB_NAME_OF_BannersImage); + map.put(COLUMN_CAP_PROP_NAME_OF_BannersGroup, COLUMN_DB_NAME_OF_BannersGroup); + map.put(COLUMN_CAP_PROP_NAME_OF_BannersHtmlText, COLUMN_DB_NAME_OF_BannersHtmlText); + map.put(COLUMN_CAP_PROP_NAME_OF_ExpiresImpressions, COLUMN_DB_NAME_OF_ExpiresImpressions); + map.put(COLUMN_CAP_PROP_NAME_OF_ExpiresDate, COLUMN_DB_NAME_OF_ExpiresDate); + map.put(COLUMN_CAP_PROP_NAME_OF_DateScheduled, COLUMN_DB_NAME_OF_DateScheduled); + map.put(COLUMN_CAP_PROP_NAME_OF_DateAdded, COLUMN_DB_NAME_OF_DateAdded); + map.put(COLUMN_CAP_PROP_NAME_OF_DateStatusChange, COLUMN_DB_NAME_OF_DateStatusChange); + map.put(COLUMN_CAP_PROP_NAME_OF_Status, COLUMN_DB_NAME_OF_Status); + + _capPropNameDbNameMap = java.util.Collections.unmodifiableMap(map); + return _capPropNameDbNameMap; + } + + /** {cap-prop-name : uncap-prop-name} map. */ + private static java.util.Map _capPropNameUncapPropNameMap; + protected static java.util.Map createCapPropNameUncapPropNameMap() { + if (_capPropNameUncapPropNameMap != null) { + return _capPropNameUncapPropNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_CAP_PROP_NAME, TABLE_UNCAP_PROP_NAME); + + map.put(COLUMN_CAP_PROP_NAME_OF_BannersId, COLUMN_UNCAP_PROP_NAME_OF_BannersId); + map.put(COLUMN_CAP_PROP_NAME_OF_BannersTitle, COLUMN_UNCAP_PROP_NAME_OF_BannersTitle); + map.put(COLUMN_CAP_PROP_NAME_OF_BannersUrl, COLUMN_UNCAP_PROP_NAME_OF_BannersUrl); + map.put(COLUMN_CAP_PROP_NAME_OF_BannersImage, COLUMN_UNCAP_PROP_NAME_OF_BannersImage); + map.put(COLUMN_CAP_PROP_NAME_OF_BannersGroup, COLUMN_UNCAP_PROP_NAME_OF_BannersGroup); + map.put(COLUMN_CAP_PROP_NAME_OF_BannersHtmlText, COLUMN_UNCAP_PROP_NAME_OF_BannersHtmlText); + map.put(COLUMN_CAP_PROP_NAME_OF_ExpiresImpressions, COLUMN_UNCAP_PROP_NAME_OF_ExpiresImpressions); + map.put(COLUMN_CAP_PROP_NAME_OF_ExpiresDate, COLUMN_UNCAP_PROP_NAME_OF_ExpiresDate); + map.put(COLUMN_CAP_PROP_NAME_OF_DateScheduled, COLUMN_UNCAP_PROP_NAME_OF_DateScheduled); + map.put(COLUMN_CAP_PROP_NAME_OF_DateAdded, COLUMN_UNCAP_PROP_NAME_OF_DateAdded); + map.put(COLUMN_CAP_PROP_NAME_OF_DateStatusChange, COLUMN_UNCAP_PROP_NAME_OF_DateStatusChange); + map.put(COLUMN_CAP_PROP_NAME_OF_Status, COLUMN_UNCAP_PROP_NAME_OF_Status); + + _capPropNameUncapPropNameMap = java.util.Collections.unmodifiableMap(map); + return _capPropNameUncapPropNameMap; + } + + /** {uncap-prop-name : db-name} map. */ + private static java.util.Map _uncapPropNameDbNameMap; + protected static java.util.Map createUncapPropNameDbNameMap() { + if (_uncapPropNameDbNameMap != null) { + return _uncapPropNameDbNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_UNCAP_PROP_NAME, TABLE_DB_NAME); + + map.put(COLUMN_UNCAP_PROP_NAME_OF_BannersId, COLUMN_DB_NAME_OF_BannersId); + map.put(COLUMN_UNCAP_PROP_NAME_OF_BannersTitle, COLUMN_DB_NAME_OF_BannersTitle); + map.put(COLUMN_UNCAP_PROP_NAME_OF_BannersUrl, COLUMN_DB_NAME_OF_BannersUrl); + map.put(COLUMN_UNCAP_PROP_NAME_OF_BannersImage, COLUMN_DB_NAME_OF_BannersImage); + map.put(COLUMN_UNCAP_PROP_NAME_OF_BannersGroup, COLUMN_DB_NAME_OF_BannersGroup); + map.put(COLUMN_UNCAP_PROP_NAME_OF_BannersHtmlText, COLUMN_DB_NAME_OF_BannersHtmlText); + map.put(COLUMN_UNCAP_PROP_NAME_OF_ExpiresImpressions, COLUMN_DB_NAME_OF_ExpiresImpressions); + map.put(COLUMN_UNCAP_PROP_NAME_OF_ExpiresDate, COLUMN_DB_NAME_OF_ExpiresDate); + map.put(COLUMN_UNCAP_PROP_NAME_OF_DateScheduled, COLUMN_DB_NAME_OF_DateScheduled); + map.put(COLUMN_UNCAP_PROP_NAME_OF_DateAdded, COLUMN_DB_NAME_OF_DateAdded); + map.put(COLUMN_UNCAP_PROP_NAME_OF_DateStatusChange, COLUMN_DB_NAME_OF_DateStatusChange); + map.put(COLUMN_UNCAP_PROP_NAME_OF_Status, COLUMN_DB_NAME_OF_Status); + + _uncapPropNameDbNameMap = java.util.Collections.unmodifiableMap(map); + return _uncapPropNameDbNameMap; + } + + /** {uncap-prop-name : cap-prop-name} map. */ + private static java.util.Map _uncapPropNameCapPropNameMap; + protected static java.util.Map createUncapPropNameCapPropNameMap() { + if (_uncapPropNameCapPropNameMap != null) { + return _uncapPropNameCapPropNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_UNCAP_PROP_NAME, TABLE_CAP_PROP_NAME); + + map.put(COLUMN_UNCAP_PROP_NAME_OF_BannersId, COLUMN_CAP_PROP_NAME_OF_BannersId); + map.put(COLUMN_UNCAP_PROP_NAME_OF_BannersTitle, COLUMN_CAP_PROP_NAME_OF_BannersTitle); + map.put(COLUMN_UNCAP_PROP_NAME_OF_BannersUrl, COLUMN_CAP_PROP_NAME_OF_BannersUrl); + map.put(COLUMN_UNCAP_PROP_NAME_OF_BannersImage, COLUMN_CAP_PROP_NAME_OF_BannersImage); + map.put(COLUMN_UNCAP_PROP_NAME_OF_BannersGroup, COLUMN_CAP_PROP_NAME_OF_BannersGroup); + map.put(COLUMN_UNCAP_PROP_NAME_OF_BannersHtmlText, COLUMN_CAP_PROP_NAME_OF_BannersHtmlText); + map.put(COLUMN_UNCAP_PROP_NAME_OF_ExpiresImpressions, COLUMN_CAP_PROP_NAME_OF_ExpiresImpressions); + map.put(COLUMN_UNCAP_PROP_NAME_OF_ExpiresDate, COLUMN_CAP_PROP_NAME_OF_ExpiresDate); + map.put(COLUMN_UNCAP_PROP_NAME_OF_DateScheduled, COLUMN_CAP_PROP_NAME_OF_DateScheduled); + map.put(COLUMN_UNCAP_PROP_NAME_OF_DateAdded, COLUMN_CAP_PROP_NAME_OF_DateAdded); + map.put(COLUMN_UNCAP_PROP_NAME_OF_DateStatusChange, COLUMN_CAP_PROP_NAME_OF_DateStatusChange); + map.put(COLUMN_UNCAP_PROP_NAME_OF_Status, COLUMN_CAP_PROP_NAME_OF_Status); + + _uncapPropNameCapPropNameMap = java.util.Collections.unmodifiableMap(map); + return _uncapPropNameCapPropNameMap; + } + + // =================================================================================== + // Name-Map + // ======== + /** + * This method implements the method that is declared at super. + * + * @return {db-name : cap-prop-name} map. + */ + public java.util.Map getDbNameCapPropNameMap() { + return createDbNameCapPropNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {db-name : uncap-prop-name} map. + */ + public java.util.Map getDbNameUncapPropNameMap() { + return createDbNameUncapPropNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {cap-prop-name : db-name} map. + */ + public java.util.Map getCapPropNameDbNameMap() { + return createCapPropNameDbNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {cap-prop-name : uncap-prop-name} map. + */ + public java.util.Map getCapPropNameUncapPropNameMap() { + return createCapPropNameUncapPropNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {uncap-prop-name : db-name} map. + */ + public java.util.Map getUncapPropNameDbNameMap() { + return createUncapPropNameDbNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {uncap-prop-name : cap-prop-name} map. + */ + public java.util.Map getUncapPropNameCapPropNameMap() { + return createUncapPropNameCapPropNameMap(); + } + + // =================================================================================== + // Table Name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + public String getTableDbName() { + return TABLE_DB_NAME; + } + + /** + * This method implements the method that is declared at super. + * + * @return Table cap-prop-name. (NotNull) + */ + public String getTableCapPropName() { + return TABLE_CAP_PROP_NAME; + } + + /** + * This method implements the method that is declared at super. + * + * @return Table property-name. (NotNull) + */ + public String getTableUncapPropName() { + return TABLE_UNCAP_PROP_NAME; + } + + // =================================================================================== + // Column Name + // =========== + public java.util.List getColumnDbNameList() { + final String[] columns = getColumnDbNameCommaString().split(","); + final java.util.List resultList = new java.util.ArrayList(); + for (int i=0; i < columns.length; i++) { + resultList.add(columns[i].trim()); + } + return resultList; + } + + public java.util.List getColumnCapPropNameList() { + final java.util.List columnDbNameList = getColumnDbNameList(); + final java.util.List resultList = new java.util.ArrayList(); + for (final java.util.Iterator ite = columnDbNameList.iterator(); ite.hasNext(); ) { + resultList.add(getDbNameCapPropNameMap().get((String)ite.next())); + } + return resultList; + } + + public java.util.List getColumnUncapPropNameList() { + final java.util.List columnDbNameList = getColumnDbNameList(); + final java.util.List resultList = new java.util.ArrayList(); + for (final java.util.Iterator ite = columnDbNameList.iterator(); ite.hasNext(); ) { + resultList.add(getDbNameUncapPropNameMap().get((String)ite.next())); + } + return resultList; + } + + /** + * This method implements the method that is declared at super. + * + * @return Column-db-name comma-string. (NotNull) + */ + public String getColumnDbNameCommaString() { + return "BANNERS_ID, BANNERS_TITLE, BANNERS_URL, BANNERS_IMAGE, BANNERS_GROUP, BANNERS_HTML_TEXT, EXPIRES_IMPRESSIONS, EXPIRES_DATE, DATE_SCHEDULED, DATE_ADDED, DATE_STATUS_CHANGE, STATUS"; + } + + // =================================================================================== + // Type Name + // ========= + /** + * This method implements the method that is declared at super. + * + * @return The type-name of entity. (NotNull) + */ + public String getEntityTypeName() { + return "jp.sf.pal.pompei.exentity.Banners"; + } + + /** + * This method implements the method that is declared at super. + * + * @return The type-name of condition-bean. (NotNull) + */ + public String getConditionBeanTypeName() { + return "jp.sf.pal.pompei.cbean.bs.BannersCB"; + } + + /** + * This method implements the method that is declared at super. + * + * @return The type-name of dao. (NotNull) + */ + public String getDaoTypeName() { + return "jp.sf.pal.pompei.exdao.BannersDao"; + } + + /** + * This method implements the method that is declared at super. + * + * @return The type-name of behavior. (NotNull) + */ + public String getBehaviorTypeName() { + return "jp.sf.pal.pompei.exbhv.BannersBhv"; + } + + // =================================================================================== + // Type + // ==== + /** + * This method implements the method that is declared at super. + * + * @return The type of entity. (NotNull) + */ + public Class getEntityType() { + return ENTITY_TYPE; + } + + // =================================================================================== + // Instance + // ======== + /** + * This method implements the method that is declared at super. + * + * @return The type of entity. (NotNull) + */ + public Entity newEntity() { + return newMyEntity(); + } + + /** + * New the instance of my entity. + * + * @return The instance of my entity. (NotNull) + */ + public Banners newMyEntity() { + return new Banners(); + } + + // =================================================================================== + // Foreign DBMeta + // ============== + /** + * This method implements the method that is declared at super. + * + * @param foreignPropertyName Foreign-property-name(Both OK - InitCap or not). (NotNull) + * @return Foreign DBMeta. (NotNull) + */ + public DBMeta getForeignDBMeta(String foreignPropertyName) { + assertStringNotNullAndNotTrimmedEmpty("foreignPropertyName", foreignPropertyName); + final String methodName = "getForeignDBMeta_" + foreignPropertyName.substring(0, 1) + foreignPropertyName.substring(1); + + java.lang.reflect.Method method = null; + try { + method = this.getClass().getMethod(methodName, new Class[]{}); + } catch (NoSuchMethodException e) { + String msg = "The foreignPropertyName is not found: foreignPropertyName=" + foreignPropertyName; + msg = msg + " tableName=" + TABLE_DB_NAME + " methodName=" + methodName; + throw new RuntimeException(msg, e); + } + try { + return (DBMeta)method.invoke(this, new Object[]{}); + } catch (IllegalAccessException e) { + throw new RuntimeException(e); + } catch (java.lang.reflect.InvocationTargetException e) { + throw new RuntimeException(e.getCause()); + } + } + + // =================================================================================== + // Determination + // ============= + /** + * This method implements the method that is declared at super. + * + * @return Determination. + */ + public boolean hasTwoOrMorePrimaryKeys() { + return false; + } + + /** + * This method implements the method that is declared at super. + * + * @return Determination. + */ + public boolean hasCommonColumn() { + return false; + } + + // =================================================================================== + // Entity Handling + // =============== + // ----------------------------------------------------- + // Accept + // ------ + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @param primaryKeyMap Primary key map. (NotNull and NotEmpty) + */ + public void acceptPrimaryKeyMap(Entity entity, java.util.Map primaryKeyMap) { + final Banners myEntity = (Banners)entity; + MapAssertUtil.assertPrimaryKeyMapNotNullAndNotEmpty(primaryKeyMap); + final MapStringValueAnalyzer analyzer = new MapStringValueAnalyzer(primaryKeyMap, entity.getModifiedPropertyNames()); + + MapAssertUtil.assertColumnExistingInPrimaryKeyMap(primaryKeyMap, "BANNERS_ID"); + if (analyzer.init("BANNERS_ID", "bannersId", "bannersId")) { myEntity.setBannersId(analyzer.analyzeNumber(java.math.BigDecimal.class)); }; + + + } + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @param primaryKeyMapString Primary-key map-string. (NotNull and NotEmpty) + */ + public void acceptPrimaryKeyMapString(Entity entity, String primaryKeyMapString) { + MapStringUtil.acceptPrimaryKeyMapString(primaryKeyMapString, entity); + } + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @param columnValueMap Column-value map. (NotNull and NotEmpty) + */ + public void acceptColumnValueMap(Entity entity, java.util.Map columnValueMap) { + final Banners myEntity = (Banners)entity; + MapAssertUtil.assertColumnValueMapNotNullAndNotEmpty(columnValueMap); + final MapStringValueAnalyzer analyzer = new MapStringValueAnalyzer(columnValueMap, entity.getModifiedPropertyNames()); + + if (analyzer.init("BANNERS_ID", "bannersId", "bannersId")) { myEntity.setBannersId(analyzer.analyzeNumber(java.math.BigDecimal.class)); }; + if (analyzer.init("BANNERS_TITLE", "bannersTitle", "bannersTitle")) { myEntity.setBannersTitle(analyzer.analyzeString(String.class)); }; + if (analyzer.init("BANNERS_URL", "bannersUrl", "bannersUrl")) { myEntity.setBannersUrl(analyzer.analyzeString(String.class)); }; + if (analyzer.init("BANNERS_IMAGE", "bannersImage", "bannersImage")) { myEntity.setBannersImage(analyzer.analyzeString(String.class)); }; + if (analyzer.init("BANNERS_GROUP", "bannersGroup", "bannersGroup")) { myEntity.setBannersGroup(analyzer.analyzeString(String.class)); }; + if (analyzer.init("BANNERS_HTML_TEXT", "bannersHtmlText", "bannersHtmlText")) { myEntity.setBannersHtmlText(analyzer.analyzeString(String.class)); }; + if (analyzer.init("EXPIRES_IMPRESSIONS", "expiresImpressions", "expiresImpressions")) { myEntity.setExpiresImpressions(analyzer.analyzeNumber(java.math.BigDecimal.class)); }; + if (analyzer.init("EXPIRES_DATE", "expiresDate", "expiresDate")) { myEntity.setExpiresDate(analyzer.analyzeDate(java.sql.Timestamp.class)); }; + if (analyzer.init("DATE_SCHEDULED", "dateScheduled", "dateScheduled")) { myEntity.setDateScheduled(analyzer.analyzeDate(java.sql.Timestamp.class)); }; + if (analyzer.init("DATE_ADDED", "dateAdded", "dateAdded")) { myEntity.setDateAdded(analyzer.analyzeDate(java.sql.Timestamp.class)); }; + if (analyzer.init("DATE_STATUS_CHANGE", "dateStatusChange", "dateStatusChange")) { myEntity.setDateStatusChange(analyzer.analyzeDate(java.sql.Timestamp.class)); }; + if (analyzer.init("STATUS", "status", "status")) { myEntity.setStatus(analyzer.analyzeNumber(java.math.BigDecimal.class)); }; + + } + + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @param columnValueMapString Column-value map-string. (NotNull and NotEmpty) + */ + public void acceptColumnValueMapString(Entity entity, String columnValueMapString) { + MapStringUtil.acceptColumnValueMapString(columnValueMapString, entity); + } + + + // ----------------------------------------------------- + // Extract + // ------- + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @return Primary-key map-string. (NotNull) + */ + public String extractPrimaryKeyMapString(Entity entity) { + return MapStringUtil.extractPrimaryKeyMapString(entity); + } + + /** + * Extract primary-key map-string. + * + * @param entity Target entity. (NotNull) + * @param startBrace Start-brace. (NotNull) + * @param endBrace End-brace. (NotNull) + * @param delimiter Delimiter. (NotNull) + * @param equal Equal. (NotNull) + * @return Primary-key map-string. (NotNull) + */ + public String extractPrimaryKeyMapString(Entity entity, String startBrace, String endBrace, String delimiter, String equal) { + final Banners myEntity = (Banners)entity; + final String mapMarkAndStartBrace = MAP_STRING_MAP_MARK + startBrace; + final StringBuffer sb = new StringBuffer(); + helpAppendingColumnValueString(sb, delimiter, equal, "BANNERS_ID", myEntity.getBannersId()); + + sb.delete(0, delimiter.length()).insert(0, mapMarkAndStartBrace).append(endBrace); + return sb.toString(); + + } + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @return Column-value map-string. (NotNull) + */ + public String extractColumnValueMapString(Entity entity) { + return MapStringUtil.extractColumnValueMapString(entity); + } + + /** + * Extract column-value map-string. + * + * @param entity Target entity. (NotNull) + * @param startBrace Start-brace. (NotNull) + * @param endBrace End-brace. (NotNull) + * @param delimiter Delimiter. (NotNull) + * @param equal Equal. (NotNull) + * @return Column-value map-string. (NotNull) + */ + public String extractColumnValueMapString(Entity entity, String startBrace, String endBrace, String delimiter, String equal) { + final Banners myEntity = (Banners)entity; + final String mapMarkAndStartBrace = MAP_STRING_MAP_MARK + startBrace; + final StringBuffer sb = new StringBuffer(); + helpAppendingColumnValueString(sb, delimiter, equal, "BANNERS_ID", myEntity.getBannersId()); + helpAppendingColumnValueString(sb, delimiter, equal, "BANNERS_TITLE", myEntity.getBannersTitle()); + helpAppendingColumnValueString(sb, delimiter, equal, "BANNERS_URL", myEntity.getBannersUrl()); + helpAppendingColumnValueString(sb, delimiter, equal, "BANNERS_IMAGE", myEntity.getBannersImage()); + helpAppendingColumnValueString(sb, delimiter, equal, "BANNERS_GROUP", myEntity.getBannersGroup()); + helpAppendingColumnValueString(sb, delimiter, equal, "BANNERS_HTML_TEXT", myEntity.getBannersHtmlText()); + helpAppendingColumnValueString(sb, delimiter, equal, "EXPIRES_IMPRESSIONS", myEntity.getExpiresImpressions()); + helpAppendingColumnValueString(sb, delimiter, equal, "EXPIRES_DATE", myEntity.getExpiresDate()); + helpAppendingColumnValueString(sb, delimiter, equal, "DATE_SCHEDULED", myEntity.getDateScheduled()); + helpAppendingColumnValueString(sb, delimiter, equal, "DATE_ADDED", myEntity.getDateAdded()); + helpAppendingColumnValueString(sb, delimiter, equal, "DATE_STATUS_CHANGE", myEntity.getDateStatusChange()); + helpAppendingColumnValueString(sb, delimiter, equal, "STATUS", myEntity.getStatus()); + + sb.delete(0, delimiter.length()).insert(0, mapMarkAndStartBrace).append(endBrace); + return sb.toString(); + } + + private void helpAppendingColumnValueString(StringBuffer sb, String delimiter, String equal, String colName, Object value) { + sb.append(delimiter).append(colName).append(equal); + sb.append(helpGettingColumnStringValue(value)); + } + + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @return Column-value map-string. (NotNull) + */ + public String extractCommonColumnValueMapString(Entity entity) { + return "map:{}"; + } + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @return Column-value map-string. (NotNull) + */ + public String extractCommonColumnValueMapString(Entity entity, String startBrace, String endBrace, String delimiter, String equal) { + return "map:" + startBrace + endBrace; + } + + + // ----------------------------------------------------- + // Convert + // ------- + public java.util.List convertToColumnValueList(Entity entity) { + return new java.util.ArrayList(convertToColumnValueMap(entity).values()); + } + + public java.util.Map convertToColumnValueMap(Entity entity) { + final Banners myEntity = downcast(entity); + final java.util.Map valueMap = new java.util.LinkedHashMap(); + valueMap.put("BANNERS_ID", myEntity.getBannersId()); + valueMap.put("BANNERS_TITLE", myEntity.getBannersTitle()); + valueMap.put("BANNERS_URL", myEntity.getBannersUrl()); + valueMap.put("BANNERS_IMAGE", myEntity.getBannersImage()); + valueMap.put("BANNERS_GROUP", myEntity.getBannersGroup()); + valueMap.put("BANNERS_HTML_TEXT", myEntity.getBannersHtmlText()); + valueMap.put("EXPIRES_IMPRESSIONS", myEntity.getExpiresImpressions()); + valueMap.put("EXPIRES_DATE", myEntity.getExpiresDate()); + valueMap.put("DATE_SCHEDULED", myEntity.getDateScheduled()); + valueMap.put("DATE_ADDED", myEntity.getDateAdded()); + valueMap.put("DATE_STATUS_CHANGE", myEntity.getDateStatusChange()); + valueMap.put("STATUS", myEntity.getStatus()); + return valueMap; + } + + public java.util.List convertToColumnStringValueList(Entity entity) { + return new java.util.ArrayList(convertToColumnStringValueMap(entity).values()); + } + + public java.util.Map convertToColumnStringValueMap(Entity entity) { + final Banners myEntity = downcast(entity); + final java.util.Map valueMap = new java.util.LinkedHashMap(); + valueMap.put("BANNERS_ID", helpGettingColumnStringValue(myEntity.getBannersId())); + valueMap.put("BANNERS_TITLE", helpGettingColumnStringValue(myEntity.getBannersTitle())); + valueMap.put("BANNERS_URL", helpGettingColumnStringValue(myEntity.getBannersUrl())); + valueMap.put("BANNERS_IMAGE", helpGettingColumnStringValue(myEntity.getBannersImage())); + valueMap.put("BANNERS_GROUP", helpGettingColumnStringValue(myEntity.getBannersGroup())); + valueMap.put("BANNERS_HTML_TEXT", helpGettingColumnStringValue(myEntity.getBannersHtmlText())); + valueMap.put("EXPIRES_IMPRESSIONS", helpGettingColumnStringValue(myEntity.getExpiresImpressions())); + valueMap.put("EXPIRES_DATE", helpGettingColumnStringValue(myEntity.getExpiresDate())); + valueMap.put("DATE_SCHEDULED", helpGettingColumnStringValue(myEntity.getDateScheduled())); + valueMap.put("DATE_ADDED", helpGettingColumnStringValue(myEntity.getDateAdded())); + valueMap.put("DATE_STATUS_CHANGE", helpGettingColumnStringValue(myEntity.getDateStatusChange())); + valueMap.put("STATUS", helpGettingColumnStringValue(myEntity.getStatus())); + return valueMap; + } + + // =================================================================================== + // JDBC Support + // ============ + public String getPreparedInsertClause() { + return "insert into BANNERS(BANNERS_ID, BANNERS_TITLE, BANNERS_URL, BANNERS_IMAGE, BANNERS_GROUP, BANNERS_HTML_TEXT, EXPIRES_IMPRESSIONS, EXPIRES_DATE, DATE_SCHEDULED, DATE_ADDED, DATE_STATUS_CHANGE, STATUS) values(? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? )"; + } + + public String getPreparedInsertClause(String tablePrefix) { + return "insert into " + tablePrefix + "BANNERS(BANNERS_ID, BANNERS_TITLE, BANNERS_URL, BANNERS_IMAGE, BANNERS_GROUP, BANNERS_HTML_TEXT, EXPIRES_IMPRESSIONS, EXPIRES_DATE, DATE_SCHEDULED, DATE_ADDED, DATE_STATUS_CHANGE, STATUS) values(? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? )"; + } + + // =================================================================================== + // Helper + // ====== + protected Banners downcast(Entity entity) { + assertObjectNotNull("entity", entity); + try { + return (Banners)entity; + } catch (ClassCastException e) { + String msg = "The entity should be Banners but it was: " + entity.getClass(); + throw new IllegalStateException(msg, e); + } + } + + protected void checkDowncast(Entity entity) { + downcast(entity); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/dbmeta/BannersHistoryDbm.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/dbmeta/BannersHistoryDbm.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/dbmeta/BannersHistoryDbm.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,704 @@ +package jp.sf.pal.pompei.bsentity.dbmeta; + + +import jp.sf.pal.pompei.allcommon.Entity; +import jp.sf.pal.pompei.allcommon.dbmeta.DBMeta; +import jp.sf.pal.pompei.allcommon.dbmeta.AbstractDBMeta; +import jp.sf.pal.pompei.exentity.BannersHistory; + +/** + * The dbmeta of BANNERS_HISTORY. (Singleton) + * + *
+ * [primary-key]
+ *     BANNERS_HISTORY_ID
+ * 
+ * [column-property]
+ *     BANNERS_HISTORY_ID, BANNERS_ID, BANNERS_SHOWN, BANNERS_CLICKED, BANNERS_HISTORY_DATE
+ * 
+ * [foreign-property]
+ *     
+ * 
+ * [refferer-property]
+ *     
+ * 
+ * [sequence]
+ *     
+ * 
+ * [identity]
+ *     
+ * 
+ * [update-date]
+ *     
+ * 
+ * [version-no]
+ *     
+ * 
+ * 
+ * + * @author DBFlute(AutoGenerator) + */ +public class BannersHistoryDbm extends AbstractDBMeta { + + // =================================================================================== + // Definition + // ========== + /** The type of entity. */ + protected static final Class ENTITY_TYPE = BannersHistory.class; + + /** Singleton instance. */ + private static final BannersHistoryDbm _instance = new BannersHistoryDbm(); + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + private BannersHistoryDbm() { + } + + // =================================================================================== + // Singleton + // ========= + /** + * Get instance. + * + * @return Singleton instance. (NotNull) + */ + public static BannersHistoryDbm getInstance() { + return _instance; + } + + // =================================================================================== + // Name Definition + // =============== + /** Table db name. */ + public static final String TABLE_DB_NAME = "BANNERS_HISTORY"; + + /** Table cap-prop name. */ + public static final String TABLE_CAP_PROP_NAME = "BannersHistory"; + + /** Table uncap-prop name. */ + public static final String TABLE_UNCAP_PROP_NAME = "bannersHistory"; + + /** Db-name of BannersHistoryId. */ + public static final String COLUMN_DB_NAME_OF_BannersHistoryId = "BANNERS_HISTORY_ID"; + /** Db-name of BannersId. */ + public static final String COLUMN_DB_NAME_OF_BannersId = "BANNERS_ID"; + /** Db-name of BannersShown. */ + public static final String COLUMN_DB_NAME_OF_BannersShown = "BANNERS_SHOWN"; + /** Db-name of BannersClicked. */ + public static final String COLUMN_DB_NAME_OF_BannersClicked = "BANNERS_CLICKED"; + /** Db-name of BannersHistoryDate. */ + public static final String COLUMN_DB_NAME_OF_BannersHistoryDate = "BANNERS_HISTORY_DATE"; + + /** Cap-prop-name of BannersHistoryId. */ + public static final String COLUMN_CAP_PROP_NAME_OF_BannersHistoryId = "BannersHistoryId"; + /** Cap-prop-name of BannersId. */ + public static final String COLUMN_CAP_PROP_NAME_OF_BannersId = "BannersId"; + /** Cap-prop-name of BannersShown. */ + public static final String COLUMN_CAP_PROP_NAME_OF_BannersShown = "BannersShown"; + /** Cap-prop-name of BannersClicked. */ + public static final String COLUMN_CAP_PROP_NAME_OF_BannersClicked = "BannersClicked"; + /** Cap-prop-name of BannersHistoryDate. */ + public static final String COLUMN_CAP_PROP_NAME_OF_BannersHistoryDate = "BannersHistoryDate"; + + + + /** Uncap-prop-name of BannersHistoryId. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_BannersHistoryId = "bannersHistoryId"; + /** Uncap-prop-name of BannersId. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_BannersId = "bannersId"; + /** Uncap-prop-name of BannersShown. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_BannersShown = "bannersShown"; + /** Uncap-prop-name of BannersClicked. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_BannersClicked = "bannersClicked"; + /** Uncap-prop-name of BannersHistoryDate. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_BannersHistoryDate = "bannersHistoryDate"; + + + + /** {db-name : cap-prop-name} map. */ + private static java.util.Map _dbNameCapPropNameMap; + protected static java.util.Map createDbNameCapPropNameMap() { + if (_dbNameCapPropNameMap != null) { + return _dbNameCapPropNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_DB_NAME, TABLE_CAP_PROP_NAME); + + map.put(COLUMN_DB_NAME_OF_BannersHistoryId, COLUMN_CAP_PROP_NAME_OF_BannersHistoryId); + map.put(COLUMN_DB_NAME_OF_BannersId, COLUMN_CAP_PROP_NAME_OF_BannersId); + map.put(COLUMN_DB_NAME_OF_BannersShown, COLUMN_CAP_PROP_NAME_OF_BannersShown); + map.put(COLUMN_DB_NAME_OF_BannersClicked, COLUMN_CAP_PROP_NAME_OF_BannersClicked); + map.put(COLUMN_DB_NAME_OF_BannersHistoryDate, COLUMN_CAP_PROP_NAME_OF_BannersHistoryDate); + + _dbNameCapPropNameMap = java.util.Collections.unmodifiableMap(map); + return _dbNameCapPropNameMap; + } + + /** {db-name : uncap-prop-name} map. */ + private static java.util.Map _dbNameUncapPropNameMap; + protected static java.util.Map createDbNameUncapPropNameMap() { + if (_dbNameUncapPropNameMap != null) { + return _dbNameUncapPropNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_DB_NAME, TABLE_UNCAP_PROP_NAME); + + map.put(COLUMN_DB_NAME_OF_BannersHistoryId, COLUMN_UNCAP_PROP_NAME_OF_BannersHistoryId); + map.put(COLUMN_DB_NAME_OF_BannersId, COLUMN_UNCAP_PROP_NAME_OF_BannersId); + map.put(COLUMN_DB_NAME_OF_BannersShown, COLUMN_UNCAP_PROP_NAME_OF_BannersShown); + map.put(COLUMN_DB_NAME_OF_BannersClicked, COLUMN_UNCAP_PROP_NAME_OF_BannersClicked); + map.put(COLUMN_DB_NAME_OF_BannersHistoryDate, COLUMN_UNCAP_PROP_NAME_OF_BannersHistoryDate); + + _dbNameUncapPropNameMap = java.util.Collections.unmodifiableMap(map); + return _dbNameUncapPropNameMap; + } + + /** {cap-prop-name : db-name} map. */ + private static java.util.Map _capPropNameDbNameMap; + protected static java.util.Map createCapPropNameDbNameMap() { + if (_capPropNameDbNameMap != null) { + return _capPropNameDbNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_CAP_PROP_NAME, TABLE_DB_NAME); + + map.put(COLUMN_CAP_PROP_NAME_OF_BannersHistoryId, COLUMN_DB_NAME_OF_BannersHistoryId); + map.put(COLUMN_CAP_PROP_NAME_OF_BannersId, COLUMN_DB_NAME_OF_BannersId); + map.put(COLUMN_CAP_PROP_NAME_OF_BannersShown, COLUMN_DB_NAME_OF_BannersShown); + map.put(COLUMN_CAP_PROP_NAME_OF_BannersClicked, COLUMN_DB_NAME_OF_BannersClicked); + map.put(COLUMN_CAP_PROP_NAME_OF_BannersHistoryDate, COLUMN_DB_NAME_OF_BannersHistoryDate); + + _capPropNameDbNameMap = java.util.Collections.unmodifiableMap(map); + return _capPropNameDbNameMap; + } + + /** {cap-prop-name : uncap-prop-name} map. */ + private static java.util.Map _capPropNameUncapPropNameMap; + protected static java.util.Map createCapPropNameUncapPropNameMap() { + if (_capPropNameUncapPropNameMap != null) { + return _capPropNameUncapPropNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_CAP_PROP_NAME, TABLE_UNCAP_PROP_NAME); + + map.put(COLUMN_CAP_PROP_NAME_OF_BannersHistoryId, COLUMN_UNCAP_PROP_NAME_OF_BannersHistoryId); + map.put(COLUMN_CAP_PROP_NAME_OF_BannersId, COLUMN_UNCAP_PROP_NAME_OF_BannersId); + map.put(COLUMN_CAP_PROP_NAME_OF_BannersShown, COLUMN_UNCAP_PROP_NAME_OF_BannersShown); + map.put(COLUMN_CAP_PROP_NAME_OF_BannersClicked, COLUMN_UNCAP_PROP_NAME_OF_BannersClicked); + map.put(COLUMN_CAP_PROP_NAME_OF_BannersHistoryDate, COLUMN_UNCAP_PROP_NAME_OF_BannersHistoryDate); + + _capPropNameUncapPropNameMap = java.util.Collections.unmodifiableMap(map); + return _capPropNameUncapPropNameMap; + } + + /** {uncap-prop-name : db-name} map. */ + private static java.util.Map _uncapPropNameDbNameMap; + protected static java.util.Map createUncapPropNameDbNameMap() { + if (_uncapPropNameDbNameMap != null) { + return _uncapPropNameDbNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_UNCAP_PROP_NAME, TABLE_DB_NAME); + + map.put(COLUMN_UNCAP_PROP_NAME_OF_BannersHistoryId, COLUMN_DB_NAME_OF_BannersHistoryId); + map.put(COLUMN_UNCAP_PROP_NAME_OF_BannersId, COLUMN_DB_NAME_OF_BannersId); + map.put(COLUMN_UNCAP_PROP_NAME_OF_BannersShown, COLUMN_DB_NAME_OF_BannersShown); + map.put(COLUMN_UNCAP_PROP_NAME_OF_BannersClicked, COLUMN_DB_NAME_OF_BannersClicked); + map.put(COLUMN_UNCAP_PROP_NAME_OF_BannersHistoryDate, COLUMN_DB_NAME_OF_BannersHistoryDate); + + _uncapPropNameDbNameMap = java.util.Collections.unmodifiableMap(map); + return _uncapPropNameDbNameMap; + } + + /** {uncap-prop-name : cap-prop-name} map. */ + private static java.util.Map _uncapPropNameCapPropNameMap; + protected static java.util.Map createUncapPropNameCapPropNameMap() { + if (_uncapPropNameCapPropNameMap != null) { + return _uncapPropNameCapPropNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_UNCAP_PROP_NAME, TABLE_CAP_PROP_NAME); + + map.put(COLUMN_UNCAP_PROP_NAME_OF_BannersHistoryId, COLUMN_CAP_PROP_NAME_OF_BannersHistoryId); + map.put(COLUMN_UNCAP_PROP_NAME_OF_BannersId, COLUMN_CAP_PROP_NAME_OF_BannersId); + map.put(COLUMN_UNCAP_PROP_NAME_OF_BannersShown, COLUMN_CAP_PROP_NAME_OF_BannersShown); + map.put(COLUMN_UNCAP_PROP_NAME_OF_BannersClicked, COLUMN_CAP_PROP_NAME_OF_BannersClicked); + map.put(COLUMN_UNCAP_PROP_NAME_OF_BannersHistoryDate, COLUMN_CAP_PROP_NAME_OF_BannersHistoryDate); + + _uncapPropNameCapPropNameMap = java.util.Collections.unmodifiableMap(map); + return _uncapPropNameCapPropNameMap; + } + + // =================================================================================== + // Name-Map + // ======== + /** + * This method implements the method that is declared at super. + * + * @return {db-name : cap-prop-name} map. + */ + public java.util.Map getDbNameCapPropNameMap() { + return createDbNameCapPropNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {db-name : uncap-prop-name} map. + */ + public java.util.Map getDbNameUncapPropNameMap() { + return createDbNameUncapPropNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {cap-prop-name : db-name} map. + */ + public java.util.Map getCapPropNameDbNameMap() { + return createCapPropNameDbNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {cap-prop-name : uncap-prop-name} map. + */ + public java.util.Map getCapPropNameUncapPropNameMap() { + return createCapPropNameUncapPropNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {uncap-prop-name : db-name} map. + */ + public java.util.Map getUncapPropNameDbNameMap() { + return createUncapPropNameDbNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {uncap-prop-name : cap-prop-name} map. + */ + public java.util.Map getUncapPropNameCapPropNameMap() { + return createUncapPropNameCapPropNameMap(); + } + + // =================================================================================== + // Table Name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + public String getTableDbName() { + return TABLE_DB_NAME; + } + + /** + * This method implements the method that is declared at super. + * + * @return Table cap-prop-name. (NotNull) + */ + public String getTableCapPropName() { + return TABLE_CAP_PROP_NAME; + } + + /** + * This method implements the method that is declared at super. + * + * @return Table property-name. (NotNull) + */ + public String getTableUncapPropName() { + return TABLE_UNCAP_PROP_NAME; + } + + // =================================================================================== + // Column Name + // =========== + public java.util.List getColumnDbNameList() { + final String[] columns = getColumnDbNameCommaString().split(","); + final java.util.List resultList = new java.util.ArrayList(); + for (int i=0; i < columns.length; i++) { + resultList.add(columns[i].trim()); + } + return resultList; + } + + public java.util.List getColumnCapPropNameList() { + final java.util.List columnDbNameList = getColumnDbNameList(); + final java.util.List resultList = new java.util.ArrayList(); + for (final java.util.Iterator ite = columnDbNameList.iterator(); ite.hasNext(); ) { + resultList.add(getDbNameCapPropNameMap().get((String)ite.next())); + } + return resultList; + } + + public java.util.List getColumnUncapPropNameList() { + final java.util.List columnDbNameList = getColumnDbNameList(); + final java.util.List resultList = new java.util.ArrayList(); + for (final java.util.Iterator ite = columnDbNameList.iterator(); ite.hasNext(); ) { + resultList.add(getDbNameUncapPropNameMap().get((String)ite.next())); + } + return resultList; + } + + /** + * This method implements the method that is declared at super. + * + * @return Column-db-name comma-string. (NotNull) + */ + public String getColumnDbNameCommaString() { + return "BANNERS_HISTORY_ID, BANNERS_ID, BANNERS_SHOWN, BANNERS_CLICKED, BANNERS_HISTORY_DATE"; + } + + // =================================================================================== + // Type Name + // ========= + /** + * This method implements the method that is declared at super. + * + * @return The type-name of entity. (NotNull) + */ + public String getEntityTypeName() { + return "jp.sf.pal.pompei.exentity.BannersHistory"; + } + + /** + * This method implements the method that is declared at super. + * + * @return The type-name of condition-bean. (NotNull) + */ + public String getConditionBeanTypeName() { + return "jp.sf.pal.pompei.cbean.bs.BannersHistoryCB"; + } + + /** + * This method implements the method that is declared at super. + * + * @return The type-name of dao. (NotNull) + */ + public String getDaoTypeName() { + return "jp.sf.pal.pompei.exdao.BannersHistoryDao"; + } + + /** + * This method implements the method that is declared at super. + * + * @return The type-name of behavior. (NotNull) + */ + public String getBehaviorTypeName() { + return "jp.sf.pal.pompei.exbhv.BannersHistoryBhv"; + } + + // =================================================================================== + // Type + // ==== + /** + * This method implements the method that is declared at super. + * + * @return The type of entity. (NotNull) + */ + public Class getEntityType() { + return ENTITY_TYPE; + } + + // =================================================================================== + // Instance + // ======== + /** + * This method implements the method that is declared at super. + * + * @return The type of entity. (NotNull) + */ + public Entity newEntity() { + return newMyEntity(); + } + + /** + * New the instance of my entity. + * + * @return The instance of my entity. (NotNull) + */ + public BannersHistory newMyEntity() { + return new BannersHistory(); + } + + // =================================================================================== + // Foreign DBMeta + // ============== + /** + * This method implements the method that is declared at super. + * + * @param foreignPropertyName Foreign-property-name(Both OK - InitCap or not). (NotNull) + * @return Foreign DBMeta. (NotNull) + */ + public DBMeta getForeignDBMeta(String foreignPropertyName) { + assertStringNotNullAndNotTrimmedEmpty("foreignPropertyName", foreignPropertyName); + final String methodName = "getForeignDBMeta_" + foreignPropertyName.substring(0, 1) + foreignPropertyName.substring(1); + + java.lang.reflect.Method method = null; + try { + method = this.getClass().getMethod(methodName, new Class[]{}); + } catch (NoSuchMethodException e) { + String msg = "The foreignPropertyName is not found: foreignPropertyName=" + foreignPropertyName; + msg = msg + " tableName=" + TABLE_DB_NAME + " methodName=" + methodName; + throw new RuntimeException(msg, e); + } + try { + return (DBMeta)method.invoke(this, new Object[]{}); + } catch (IllegalAccessException e) { + throw new RuntimeException(e); + } catch (java.lang.reflect.InvocationTargetException e) { + throw new RuntimeException(e.getCause()); + } + } + + // =================================================================================== + // Determination + // ============= + /** + * This method implements the method that is declared at super. + * + * @return Determination. + */ + public boolean hasTwoOrMorePrimaryKeys() { + return false; + } + + /** + * This method implements the method that is declared at super. + * + * @return Determination. + */ + public boolean hasCommonColumn() { + return false; + } + + // =================================================================================== + // Entity Handling + // =============== + // ----------------------------------------------------- + // Accept + // ------ + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @param primaryKeyMap Primary key map. (NotNull and NotEmpty) + */ + public void acceptPrimaryKeyMap(Entity entity, java.util.Map primaryKeyMap) { + final BannersHistory myEntity = (BannersHistory)entity; + MapAssertUtil.assertPrimaryKeyMapNotNullAndNotEmpty(primaryKeyMap); + final MapStringValueAnalyzer analyzer = new MapStringValueAnalyzer(primaryKeyMap, entity.getModifiedPropertyNames()); + + MapAssertUtil.assertColumnExistingInPrimaryKeyMap(primaryKeyMap, "BANNERS_HISTORY_ID"); + if (analyzer.init("BANNERS_HISTORY_ID", "bannersHistoryId", "bannersHistoryId")) { myEntity.setBannersHistoryId(analyzer.analyzeNumber(java.math.BigDecimal.class)); }; + + + } + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @param primaryKeyMapString Primary-key map-string. (NotNull and NotEmpty) + */ + public void acceptPrimaryKeyMapString(Entity entity, String primaryKeyMapString) { + MapStringUtil.acceptPrimaryKeyMapString(primaryKeyMapString, entity); + } + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @param columnValueMap Column-value map. (NotNull and NotEmpty) + */ + public void acceptColumnValueMap(Entity entity, java.util.Map columnValueMap) { + final BannersHistory myEntity = (BannersHistory)entity; + MapAssertUtil.assertColumnValueMapNotNullAndNotEmpty(columnValueMap); + final MapStringValueAnalyzer analyzer = new MapStringValueAnalyzer(columnValueMap, entity.getModifiedPropertyNames()); + + if (analyzer.init("BANNERS_HISTORY_ID", "bannersHistoryId", "bannersHistoryId")) { myEntity.setBannersHistoryId(analyzer.analyzeNumber(java.math.BigDecimal.class)); }; + if (analyzer.init("BANNERS_ID", "bannersId", "bannersId")) { myEntity.setBannersId(analyzer.analyzeNumber(java.math.BigDecimal.class)); }; + if (analyzer.init("BANNERS_SHOWN", "bannersShown", "bannersShown")) { myEntity.setBannersShown(analyzer.analyzeNumber(java.math.BigDecimal.class)); }; + if (analyzer.init("BANNERS_CLICKED", "bannersClicked", "bannersClicked")) { myEntity.setBannersClicked(analyzer.analyzeNumber(java.math.BigDecimal.class)); }; + if (analyzer.init("BANNERS_HISTORY_DATE", "bannersHistoryDate", "bannersHistoryDate")) { myEntity.setBannersHistoryDate(analyzer.analyzeDate(java.sql.Timestamp.class)); }; + + } + + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @param columnValueMapString Column-value map-string. (NotNull and NotEmpty) + */ + public void acceptColumnValueMapString(Entity entity, String columnValueMapString) { + MapStringUtil.acceptColumnValueMapString(columnValueMapString, entity); + } + + + // ----------------------------------------------------- + // Extract + // ------- + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @return Primary-key map-string. (NotNull) + */ + public String extractPrimaryKeyMapString(Entity entity) { + return MapStringUtil.extractPrimaryKeyMapString(entity); + } + + /** + * Extract primary-key map-string. + * + * @param entity Target entity. (NotNull) + * @param startBrace Start-brace. (NotNull) + * @param endBrace End-brace. (NotNull) + * @param delimiter Delimiter. (NotNull) + * @param equal Equal. (NotNull) + * @return Primary-key map-string. (NotNull) + */ + public String extractPrimaryKeyMapString(Entity entity, String startBrace, String endBrace, String delimiter, String equal) { + final BannersHistory myEntity = (BannersHistory)entity; + final String mapMarkAndStartBrace = MAP_STRING_MAP_MARK + startBrace; + final StringBuffer sb = new StringBuffer(); + helpAppendingColumnValueString(sb, delimiter, equal, "BANNERS_HISTORY_ID", myEntity.getBannersHistoryId()); + + sb.delete(0, delimiter.length()).insert(0, mapMarkAndStartBrace).append(endBrace); + return sb.toString(); + + } + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @return Column-value map-string. (NotNull) + */ + public String extractColumnValueMapString(Entity entity) { + return MapStringUtil.extractColumnValueMapString(entity); + } + + /** + * Extract column-value map-string. + * + * @param entity Target entity. (NotNull) + * @param startBrace Start-brace. (NotNull) + * @param endBrace End-brace. (NotNull) + * @param delimiter Delimiter. (NotNull) + * @param equal Equal. (NotNull) + * @return Column-value map-string. (NotNull) + */ + public String extractColumnValueMapString(Entity entity, String startBrace, String endBrace, String delimiter, String equal) { + final BannersHistory myEntity = (BannersHistory)entity; + final String mapMarkAndStartBrace = MAP_STRING_MAP_MARK + startBrace; + final StringBuffer sb = new StringBuffer(); + helpAppendingColumnValueString(sb, delimiter, equal, "BANNERS_HISTORY_ID", myEntity.getBannersHistoryId()); + helpAppendingColumnValueString(sb, delimiter, equal, "BANNERS_ID", myEntity.getBannersId()); + helpAppendingColumnValueString(sb, delimiter, equal, "BANNERS_SHOWN", myEntity.getBannersShown()); + helpAppendingColumnValueString(sb, delimiter, equal, "BANNERS_CLICKED", myEntity.getBannersClicked()); + helpAppendingColumnValueString(sb, delimiter, equal, "BANNERS_HISTORY_DATE", myEntity.getBannersHistoryDate()); + + sb.delete(0, delimiter.length()).insert(0, mapMarkAndStartBrace).append(endBrace); + return sb.toString(); + } + + private void helpAppendingColumnValueString(StringBuffer sb, String delimiter, String equal, String colName, Object value) { + sb.append(delimiter).append(colName).append(equal); + sb.append(helpGettingColumnStringValue(value)); + } + + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @return Column-value map-string. (NotNull) + */ + public String extractCommonColumnValueMapString(Entity entity) { + return "map:{}"; + } + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @return Column-value map-string. (NotNull) + */ + public String extractCommonColumnValueMapString(Entity entity, String startBrace, String endBrace, String delimiter, String equal) { + return "map:" + startBrace + endBrace; + } + + + // ----------------------------------------------------- + // Convert + // ------- + public java.util.List convertToColumnValueList(Entity entity) { + return new java.util.ArrayList(convertToColumnValueMap(entity).values()); + } + + public java.util.Map convertToColumnValueMap(Entity entity) { + final BannersHistory myEntity = downcast(entity); + final java.util.Map valueMap = new java.util.LinkedHashMap(); + valueMap.put("BANNERS_HISTORY_ID", myEntity.getBannersHistoryId()); + valueMap.put("BANNERS_ID", myEntity.getBannersId()); + valueMap.put("BANNERS_SHOWN", myEntity.getBannersShown()); + valueMap.put("BANNERS_CLICKED", myEntity.getBannersClicked()); + valueMap.put("BANNERS_HISTORY_DATE", myEntity.getBannersHistoryDate()); + return valueMap; + } + + public java.util.List convertToColumnStringValueList(Entity entity) { + return new java.util.ArrayList(convertToColumnStringValueMap(entity).values()); + } + + public java.util.Map convertToColumnStringValueMap(Entity entity) { + final BannersHistory myEntity = downcast(entity); + final java.util.Map valueMap = new java.util.LinkedHashMap(); + valueMap.put("BANNERS_HISTORY_ID", helpGettingColumnStringValue(myEntity.getBannersHistoryId())); + valueMap.put("BANNERS_ID", helpGettingColumnStringValue(myEntity.getBannersId())); + valueMap.put("BANNERS_SHOWN", helpGettingColumnStringValue(myEntity.getBannersShown())); + valueMap.put("BANNERS_CLICKED", helpGettingColumnStringValue(myEntity.getBannersClicked())); + valueMap.put("BANNERS_HISTORY_DATE", helpGettingColumnStringValue(myEntity.getBannersHistoryDate())); + return valueMap; + } + + // =================================================================================== + // JDBC Support + // ============ + public String getPreparedInsertClause() { + return "insert into BANNERS_HISTORY(BANNERS_HISTORY_ID, BANNERS_ID, BANNERS_SHOWN, BANNERS_CLICKED, BANNERS_HISTORY_DATE) values(? , ? , ? , ? , ? )"; + } + + public String getPreparedInsertClause(String tablePrefix) { + return "insert into " + tablePrefix + "BANNERS_HISTORY(BANNERS_HISTORY_ID, BANNERS_ID, BANNERS_SHOWN, BANNERS_CLICKED, BANNERS_HISTORY_DATE) values(? , ? , ? , ? , ? )"; + } + + // =================================================================================== + // Helper + // ====== + protected BannersHistory downcast(Entity entity) { + assertObjectNotNull("entity", entity); + try { + return (BannersHistory)entity; + } catch (ClassCastException e) { + String msg = "The entity should be BannersHistory but it was: " + entity.getClass(); + throw new IllegalStateException(msg, e); + } + } + + protected void checkDowncast(Entity entity) { + downcast(entity); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/dbmeta/CategoriesDbm.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/dbmeta/CategoriesDbm.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/dbmeta/CategoriesDbm.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,720 @@ +package jp.sf.pal.pompei.bsentity.dbmeta; + + +import jp.sf.pal.pompei.allcommon.Entity; +import jp.sf.pal.pompei.allcommon.dbmeta.DBMeta; +import jp.sf.pal.pompei.allcommon.dbmeta.AbstractDBMeta; +import jp.sf.pal.pompei.exentity.Categories; + +/** + * The dbmeta of CATEGORIES. (Singleton) + * + *
+ * [primary-key]
+ *     CATEGORIES_ID
+ * 
+ * [column-property]
+ *     CATEGORIES_ID, CATEGORIES_IMAGE, PARENT_ID, SORT_ORDER, DATE_ADDED, LAST_MODIFIED
+ * 
+ * [foreign-property]
+ *     
+ * 
+ * [refferer-property]
+ *     
+ * 
+ * [sequence]
+ *     
+ * 
+ * [identity]
+ *     
+ * 
+ * [update-date]
+ *     
+ * 
+ * [version-no]
+ *     
+ * 
+ * 
+ * + * @author DBFlute(AutoGenerator) + */ +public class CategoriesDbm extends AbstractDBMeta { + + // =================================================================================== + // Definition + // ========== + /** The type of entity. */ + protected static final Class ENTITY_TYPE = Categories.class; + + /** Singleton instance. */ + private static final CategoriesDbm _instance = new CategoriesDbm(); + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + private CategoriesDbm() { + } + + // =================================================================================== + // Singleton + // ========= + /** + * Get instance. + * + * @return Singleton instance. (NotNull) + */ + public static CategoriesDbm getInstance() { + return _instance; + } + + // =================================================================================== + // Name Definition + // =============== + /** Table db name. */ + public static final String TABLE_DB_NAME = "CATEGORIES"; + + /** Table cap-prop name. */ + public static final String TABLE_CAP_PROP_NAME = "Categories"; + + /** Table uncap-prop name. */ + public static final String TABLE_UNCAP_PROP_NAME = "categories"; + + /** Db-name of CategoriesId. */ + public static final String COLUMN_DB_NAME_OF_CategoriesId = "CATEGORIES_ID"; + /** Db-name of CategoriesImage. */ + public static final String COLUMN_DB_NAME_OF_CategoriesImage = "CATEGORIES_IMAGE"; + /** Db-name of ParentId. */ + public static final String COLUMN_DB_NAME_OF_ParentId = "PARENT_ID"; + /** Db-name of SortOrder. */ + public static final String COLUMN_DB_NAME_OF_SortOrder = "SORT_ORDER"; + /** Db-name of DateAdded. */ + public static final String COLUMN_DB_NAME_OF_DateAdded = "DATE_ADDED"; + /** Db-name of LastModified. */ + public static final String COLUMN_DB_NAME_OF_LastModified = "LAST_MODIFIED"; + + /** Cap-prop-name of CategoriesId. */ + public static final String COLUMN_CAP_PROP_NAME_OF_CategoriesId = "CategoriesId"; + /** Cap-prop-name of CategoriesImage. */ + public static final String COLUMN_CAP_PROP_NAME_OF_CategoriesImage = "CategoriesImage"; + /** Cap-prop-name of ParentId. */ + public static final String COLUMN_CAP_PROP_NAME_OF_ParentId = "ParentId"; + /** Cap-prop-name of SortOrder. */ + public static final String COLUMN_CAP_PROP_NAME_OF_SortOrder = "SortOrder"; + /** Cap-prop-name of DateAdded. */ + public static final String COLUMN_CAP_PROP_NAME_OF_DateAdded = "DateAdded"; + /** Cap-prop-name of LastModified. */ + public static final String COLUMN_CAP_PROP_NAME_OF_LastModified = "LastModified"; + + + + /** Uncap-prop-name of CategoriesId. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_CategoriesId = "categoriesId"; + /** Uncap-prop-name of CategoriesImage. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_CategoriesImage = "categoriesImage"; + /** Uncap-prop-name of ParentId. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_ParentId = "parentId"; + /** Uncap-prop-name of SortOrder. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_SortOrder = "sortOrder"; + /** Uncap-prop-name of DateAdded. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_DateAdded = "dateAdded"; + /** Uncap-prop-name of LastModified. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_LastModified = "lastModified"; + + + + /** {db-name : cap-prop-name} map. */ + private static java.util.Map _dbNameCapPropNameMap; + protected static java.util.Map createDbNameCapPropNameMap() { + if (_dbNameCapPropNameMap != null) { + return _dbNameCapPropNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_DB_NAME, TABLE_CAP_PROP_NAME); + + map.put(COLUMN_DB_NAME_OF_CategoriesId, COLUMN_CAP_PROP_NAME_OF_CategoriesId); + map.put(COLUMN_DB_NAME_OF_CategoriesImage, COLUMN_CAP_PROP_NAME_OF_CategoriesImage); + map.put(COLUMN_DB_NAME_OF_ParentId, COLUMN_CAP_PROP_NAME_OF_ParentId); + map.put(COLUMN_DB_NAME_OF_SortOrder, COLUMN_CAP_PROP_NAME_OF_SortOrder); + map.put(COLUMN_DB_NAME_OF_DateAdded, COLUMN_CAP_PROP_NAME_OF_DateAdded); + map.put(COLUMN_DB_NAME_OF_LastModified, COLUMN_CAP_PROP_NAME_OF_LastModified); + + _dbNameCapPropNameMap = java.util.Collections.unmodifiableMap(map); + return _dbNameCapPropNameMap; + } + + /** {db-name : uncap-prop-name} map. */ + private static java.util.Map _dbNameUncapPropNameMap; + protected static java.util.Map createDbNameUncapPropNameMap() { + if (_dbNameUncapPropNameMap != null) { + return _dbNameUncapPropNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_DB_NAME, TABLE_UNCAP_PROP_NAME); + + map.put(COLUMN_DB_NAME_OF_CategoriesId, COLUMN_UNCAP_PROP_NAME_OF_CategoriesId); + map.put(COLUMN_DB_NAME_OF_CategoriesImage, COLUMN_UNCAP_PROP_NAME_OF_CategoriesImage); + map.put(COLUMN_DB_NAME_OF_ParentId, COLUMN_UNCAP_PROP_NAME_OF_ParentId); + map.put(COLUMN_DB_NAME_OF_SortOrder, COLUMN_UNCAP_PROP_NAME_OF_SortOrder); + map.put(COLUMN_DB_NAME_OF_DateAdded, COLUMN_UNCAP_PROP_NAME_OF_DateAdded); + map.put(COLUMN_DB_NAME_OF_LastModified, COLUMN_UNCAP_PROP_NAME_OF_LastModified); + + _dbNameUncapPropNameMap = java.util.Collections.unmodifiableMap(map); + return _dbNameUncapPropNameMap; + } + + /** {cap-prop-name : db-name} map. */ + private static java.util.Map _capPropNameDbNameMap; + protected static java.util.Map createCapPropNameDbNameMap() { + if (_capPropNameDbNameMap != null) { + return _capPropNameDbNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_CAP_PROP_NAME, TABLE_DB_NAME); + + map.put(COLUMN_CAP_PROP_NAME_OF_CategoriesId, COLUMN_DB_NAME_OF_CategoriesId); + map.put(COLUMN_CAP_PROP_NAME_OF_CategoriesImage, COLUMN_DB_NAME_OF_CategoriesImage); + map.put(COLUMN_CAP_PROP_NAME_OF_ParentId, COLUMN_DB_NAME_OF_ParentId); + map.put(COLUMN_CAP_PROP_NAME_OF_SortOrder, COLUMN_DB_NAME_OF_SortOrder); + map.put(COLUMN_CAP_PROP_NAME_OF_DateAdded, COLUMN_DB_NAME_OF_DateAdded); + map.put(COLUMN_CAP_PROP_NAME_OF_LastModified, COLUMN_DB_NAME_OF_LastModified); + + _capPropNameDbNameMap = java.util.Collections.unmodifiableMap(map); + return _capPropNameDbNameMap; + } + + /** {cap-prop-name : uncap-prop-name} map. */ + private static java.util.Map _capPropNameUncapPropNameMap; + protected static java.util.Map createCapPropNameUncapPropNameMap() { + if (_capPropNameUncapPropNameMap != null) { + return _capPropNameUncapPropNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_CAP_PROP_NAME, TABLE_UNCAP_PROP_NAME); + + map.put(COLUMN_CAP_PROP_NAME_OF_CategoriesId, COLUMN_UNCAP_PROP_NAME_OF_CategoriesId); + map.put(COLUMN_CAP_PROP_NAME_OF_CategoriesImage, COLUMN_UNCAP_PROP_NAME_OF_CategoriesImage); + map.put(COLUMN_CAP_PROP_NAME_OF_ParentId, COLUMN_UNCAP_PROP_NAME_OF_ParentId); + map.put(COLUMN_CAP_PROP_NAME_OF_SortOrder, COLUMN_UNCAP_PROP_NAME_OF_SortOrder); + map.put(COLUMN_CAP_PROP_NAME_OF_DateAdded, COLUMN_UNCAP_PROP_NAME_OF_DateAdded); + map.put(COLUMN_CAP_PROP_NAME_OF_LastModified, COLUMN_UNCAP_PROP_NAME_OF_LastModified); + + _capPropNameUncapPropNameMap = java.util.Collections.unmodifiableMap(map); + return _capPropNameUncapPropNameMap; + } + + /** {uncap-prop-name : db-name} map. */ + private static java.util.Map _uncapPropNameDbNameMap; + protected static java.util.Map createUncapPropNameDbNameMap() { + if (_uncapPropNameDbNameMap != null) { + return _uncapPropNameDbNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_UNCAP_PROP_NAME, TABLE_DB_NAME); + + map.put(COLUMN_UNCAP_PROP_NAME_OF_CategoriesId, COLUMN_DB_NAME_OF_CategoriesId); + map.put(COLUMN_UNCAP_PROP_NAME_OF_CategoriesImage, COLUMN_DB_NAME_OF_CategoriesImage); + map.put(COLUMN_UNCAP_PROP_NAME_OF_ParentId, COLUMN_DB_NAME_OF_ParentId); + map.put(COLUMN_UNCAP_PROP_NAME_OF_SortOrder, COLUMN_DB_NAME_OF_SortOrder); + map.put(COLUMN_UNCAP_PROP_NAME_OF_DateAdded, COLUMN_DB_NAME_OF_DateAdded); + map.put(COLUMN_UNCAP_PROP_NAME_OF_LastModified, COLUMN_DB_NAME_OF_LastModified); + + _uncapPropNameDbNameMap = java.util.Collections.unmodifiableMap(map); + return _uncapPropNameDbNameMap; + } + + /** {uncap-prop-name : cap-prop-name} map. */ + private static java.util.Map _uncapPropNameCapPropNameMap; + protected static java.util.Map createUncapPropNameCapPropNameMap() { + if (_uncapPropNameCapPropNameMap != null) { + return _uncapPropNameCapPropNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_UNCAP_PROP_NAME, TABLE_CAP_PROP_NAME); + + map.put(COLUMN_UNCAP_PROP_NAME_OF_CategoriesId, COLUMN_CAP_PROP_NAME_OF_CategoriesId); + map.put(COLUMN_UNCAP_PROP_NAME_OF_CategoriesImage, COLUMN_CAP_PROP_NAME_OF_CategoriesImage); + map.put(COLUMN_UNCAP_PROP_NAME_OF_ParentId, COLUMN_CAP_PROP_NAME_OF_ParentId); + map.put(COLUMN_UNCAP_PROP_NAME_OF_SortOrder, COLUMN_CAP_PROP_NAME_OF_SortOrder); + map.put(COLUMN_UNCAP_PROP_NAME_OF_DateAdded, COLUMN_CAP_PROP_NAME_OF_DateAdded); + map.put(COLUMN_UNCAP_PROP_NAME_OF_LastModified, COLUMN_CAP_PROP_NAME_OF_LastModified); + + _uncapPropNameCapPropNameMap = java.util.Collections.unmodifiableMap(map); + return _uncapPropNameCapPropNameMap; + } + + // =================================================================================== + // Name-Map + // ======== + /** + * This method implements the method that is declared at super. + * + * @return {db-name : cap-prop-name} map. + */ + public java.util.Map getDbNameCapPropNameMap() { + return createDbNameCapPropNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {db-name : uncap-prop-name} map. + */ + public java.util.Map getDbNameUncapPropNameMap() { + return createDbNameUncapPropNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {cap-prop-name : db-name} map. + */ + public java.util.Map getCapPropNameDbNameMap() { + return createCapPropNameDbNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {cap-prop-name : uncap-prop-name} map. + */ + public java.util.Map getCapPropNameUncapPropNameMap() { + return createCapPropNameUncapPropNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {uncap-prop-name : db-name} map. + */ + public java.util.Map getUncapPropNameDbNameMap() { + return createUncapPropNameDbNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {uncap-prop-name : cap-prop-name} map. + */ + public java.util.Map getUncapPropNameCapPropNameMap() { + return createUncapPropNameCapPropNameMap(); + } + + // =================================================================================== + // Table Name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + public String getTableDbName() { + return TABLE_DB_NAME; + } + + /** + * This method implements the method that is declared at super. + * + * @return Table cap-prop-name. (NotNull) + */ + public String getTableCapPropName() { + return TABLE_CAP_PROP_NAME; + } + + /** + * This method implements the method that is declared at super. + * + * @return Table property-name. (NotNull) + */ + public String getTableUncapPropName() { + return TABLE_UNCAP_PROP_NAME; + } + + // =================================================================================== + // Column Name + // =========== + public java.util.List getColumnDbNameList() { + final String[] columns = getColumnDbNameCommaString().split(","); + final java.util.List resultList = new java.util.ArrayList(); + for (int i=0; i < columns.length; i++) { + resultList.add(columns[i].trim()); + } + return resultList; + } + + public java.util.List getColumnCapPropNameList() { + final java.util.List columnDbNameList = getColumnDbNameList(); + final java.util.List resultList = new java.util.ArrayList(); + for (final java.util.Iterator ite = columnDbNameList.iterator(); ite.hasNext(); ) { + resultList.add(getDbNameCapPropNameMap().get((String)ite.next())); + } + return resultList; + } + + public java.util.List getColumnUncapPropNameList() { + final java.util.List columnDbNameList = getColumnDbNameList(); + final java.util.List resultList = new java.util.ArrayList(); + for (final java.util.Iterator ite = columnDbNameList.iterator(); ite.hasNext(); ) { + resultList.add(getDbNameUncapPropNameMap().get((String)ite.next())); + } + return resultList; + } + + /** + * This method implements the method that is declared at super. + * + * @return Column-db-name comma-string. (NotNull) + */ + public String getColumnDbNameCommaString() { + return "CATEGORIES_ID, CATEGORIES_IMAGE, PARENT_ID, SORT_ORDER, DATE_ADDED, LAST_MODIFIED"; + } + + // =================================================================================== + // Type Name + // ========= + /** + * This method implements the method that is declared at super. + * + * @return The type-name of entity. (NotNull) + */ + public String getEntityTypeName() { + return "jp.sf.pal.pompei.exentity.Categories"; + } + + /** + * This method implements the method that is declared at super. + * + * @return The type-name of condition-bean. (NotNull) + */ + public String getConditionBeanTypeName() { + return "jp.sf.pal.pompei.cbean.bs.CategoriesCB"; + } + + /** + * This method implements the method that is declared at super. + * + * @return The type-name of dao. (NotNull) + */ + public String getDaoTypeName() { + return "jp.sf.pal.pompei.exdao.CategoriesDao"; + } + + /** + * This method implements the method that is declared at super. + * + * @return The type-name of behavior. (NotNull) + */ + public String getBehaviorTypeName() { + return "jp.sf.pal.pompei.exbhv.CategoriesBhv"; + } + + // =================================================================================== + // Type + // ==== + /** + * This method implements the method that is declared at super. + * + * @return The type of entity. (NotNull) + */ + public Class getEntityType() { + return ENTITY_TYPE; + } + + // =================================================================================== + // Instance + // ======== + /** + * This method implements the method that is declared at super. + * + * @return The type of entity. (NotNull) + */ + public Entity newEntity() { + return newMyEntity(); + } + + /** + * New the instance of my entity. + * + * @return The instance of my entity. (NotNull) + */ + public Categories newMyEntity() { + return new Categories(); + } + + // =================================================================================== + // Foreign DBMeta + // ============== + /** + * This method implements the method that is declared at super. + * + * @param foreignPropertyName Foreign-property-name(Both OK - InitCap or not). (NotNull) + * @return Foreign DBMeta. (NotNull) + */ + public DBMeta getForeignDBMeta(String foreignPropertyName) { + assertStringNotNullAndNotTrimmedEmpty("foreignPropertyName", foreignPropertyName); + final String methodName = "getForeignDBMeta_" + foreignPropertyName.substring(0, 1) + foreignPropertyName.substring(1); + + java.lang.reflect.Method method = null; + try { + method = this.getClass().getMethod(methodName, new Class[]{}); + } catch (NoSuchMethodException e) { + String msg = "The foreignPropertyName is not found: foreignPropertyName=" + foreignPropertyName; + msg = msg + " tableName=" + TABLE_DB_NAME + " methodName=" + methodName; + throw new RuntimeException(msg, e); + } + try { + return (DBMeta)method.invoke(this, new Object[]{}); + } catch (IllegalAccessException e) { + throw new RuntimeException(e); + } catch (java.lang.reflect.InvocationTargetException e) { + throw new RuntimeException(e.getCause()); + } + } + + // =================================================================================== + // Determination + // ============= + /** + * This method implements the method that is declared at super. + * + * @return Determination. + */ + public boolean hasTwoOrMorePrimaryKeys() { + return false; + } + + /** + * This method implements the method that is declared at super. + * + * @return Determination. + */ + public boolean hasCommonColumn() { + return false; + } + + // =================================================================================== + // Entity Handling + // =============== + // ----------------------------------------------------- + // Accept + // ------ + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @param primaryKeyMap Primary key map. (NotNull and NotEmpty) + */ + public void acceptPrimaryKeyMap(Entity entity, java.util.Map primaryKeyMap) { + final Categories myEntity = (Categories)entity; + MapAssertUtil.assertPrimaryKeyMapNotNullAndNotEmpty(primaryKeyMap); + final MapStringValueAnalyzer analyzer = new MapStringValueAnalyzer(primaryKeyMap, entity.getModifiedPropertyNames()); + + MapAssertUtil.assertColumnExistingInPrimaryKeyMap(primaryKeyMap, "CATEGORIES_ID"); + if (analyzer.init("CATEGORIES_ID", "categoriesId", "categoriesId")) { myEntity.setCategoriesId(analyzer.analyzeNumber(java.math.BigDecimal.class)); }; + + + } + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @param primaryKeyMapString Primary-key map-string. (NotNull and NotEmpty) + */ + public void acceptPrimaryKeyMapString(Entity entity, String primaryKeyMapString) { + MapStringUtil.acceptPrimaryKeyMapString(primaryKeyMapString, entity); + } + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @param columnValueMap Column-value map. (NotNull and NotEmpty) + */ + public void acceptColumnValueMap(Entity entity, java.util.Map columnValueMap) { + final Categories myEntity = (Categories)entity; + MapAssertUtil.assertColumnValueMapNotNullAndNotEmpty(columnValueMap); + final MapStringValueAnalyzer analyzer = new MapStringValueAnalyzer(columnValueMap, entity.getModifiedPropertyNames()); + + if (analyzer.init("CATEGORIES_ID", "categoriesId", "categoriesId")) { myEntity.setCategoriesId(analyzer.analyzeNumber(java.math.BigDecimal.class)); }; + if (analyzer.init("CATEGORIES_IMAGE", "categoriesImage", "categoriesImage")) { myEntity.setCategoriesImage(analyzer.analyzeString(String.class)); }; + if (analyzer.init("PARENT_ID", "parentId", "parentId")) { myEntity.setParentId(analyzer.analyzeNumber(java.math.BigDecimal.class)); }; + if (analyzer.init("SORT_ORDER", "sortOrder", "sortOrder")) { myEntity.setSortOrder(analyzer.analyzeNumber(java.math.BigDecimal.class)); }; + if (analyzer.init("DATE_ADDED", "dateAdded", "dateAdded")) { myEntity.setDateAdded(analyzer.analyzeDate(java.sql.Timestamp.class)); }; + if (analyzer.init("LAST_MODIFIED", "lastModified", "lastModified")) { myEntity.setLastModified(analyzer.analyzeDate(java.sql.Timestamp.class)); }; + + } + + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @param columnValueMapString Column-value map-string. (NotNull and NotEmpty) + */ + public void acceptColumnValueMapString(Entity entity, String columnValueMapString) { + MapStringUtil.acceptColumnValueMapString(columnValueMapString, entity); + } + + + // ----------------------------------------------------- + // Extract + // ------- + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @return Primary-key map-string. (NotNull) + */ + public String extractPrimaryKeyMapString(Entity entity) { + return MapStringUtil.extractPrimaryKeyMapString(entity); + } + + /** + * Extract primary-key map-string. + * + * @param entity Target entity. (NotNull) + * @param startBrace Start-brace. (NotNull) + * @param endBrace End-brace. (NotNull) + * @param delimiter Delimiter. (NotNull) + * @param equal Equal. (NotNull) + * @return Primary-key map-string. (NotNull) + */ + public String extractPrimaryKeyMapString(Entity entity, String startBrace, String endBrace, String delimiter, String equal) { + final Categories myEntity = (Categories)entity; + final String mapMarkAndStartBrace = MAP_STRING_MAP_MARK + startBrace; + final StringBuffer sb = new StringBuffer(); + helpAppendingColumnValueString(sb, delimiter, equal, "CATEGORIES_ID", myEntity.getCategoriesId()); + + sb.delete(0, delimiter.length()).insert(0, mapMarkAndStartBrace).append(endBrace); + return sb.toString(); + + } + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @return Column-value map-string. (NotNull) + */ + public String extractColumnValueMapString(Entity entity) { + return MapStringUtil.extractColumnValueMapString(entity); + } + + /** + * Extract column-value map-string. + * + * @param entity Target entity. (NotNull) + * @param startBrace Start-brace. (NotNull) + * @param endBrace End-brace. (NotNull) + * @param delimiter Delimiter. (NotNull) + * @param equal Equal. (NotNull) + * @return Column-value map-string. (NotNull) + */ + public String extractColumnValueMapString(Entity entity, String startBrace, String endBrace, String delimiter, String equal) { + final Categories myEntity = (Categories)entity; + final String mapMarkAndStartBrace = MAP_STRING_MAP_MARK + startBrace; + final StringBuffer sb = new StringBuffer(); + helpAppendingColumnValueString(sb, delimiter, equal, "CATEGORIES_ID", myEntity.getCategoriesId()); + helpAppendingColumnValueString(sb, delimiter, equal, "CATEGORIES_IMAGE", myEntity.getCategoriesImage()); + helpAppendingColumnValueString(sb, delimiter, equal, "PARENT_ID", myEntity.getParentId()); + helpAppendingColumnValueString(sb, delimiter, equal, "SORT_ORDER", myEntity.getSortOrder()); + helpAppendingColumnValueString(sb, delimiter, equal, "DATE_ADDED", myEntity.getDateAdded()); + helpAppendingColumnValueString(sb, delimiter, equal, "LAST_MODIFIED", myEntity.getLastModified()); + + sb.delete(0, delimiter.length()).insert(0, mapMarkAndStartBrace).append(endBrace); + return sb.toString(); + } + + private void helpAppendingColumnValueString(StringBuffer sb, String delimiter, String equal, String colName, Object value) { + sb.append(delimiter).append(colName).append(equal); + sb.append(helpGettingColumnStringValue(value)); + } + + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @return Column-value map-string. (NotNull) + */ + public String extractCommonColumnValueMapString(Entity entity) { + return "map:{}"; + } + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @return Column-value map-string. (NotNull) + */ + public String extractCommonColumnValueMapString(Entity entity, String startBrace, String endBrace, String delimiter, String equal) { + return "map:" + startBrace + endBrace; + } + + + // ----------------------------------------------------- + // Convert + // ------- + public java.util.List convertToColumnValueList(Entity entity) { + return new java.util.ArrayList(convertToColumnValueMap(entity).values()); + } + + public java.util.Map convertToColumnValueMap(Entity entity) { + final Categories myEntity = downcast(entity); + final java.util.Map valueMap = new java.util.LinkedHashMap(); + valueMap.put("CATEGORIES_ID", myEntity.getCategoriesId()); + valueMap.put("CATEGORIES_IMAGE", myEntity.getCategoriesImage()); + valueMap.put("PARENT_ID", myEntity.getParentId()); + valueMap.put("SORT_ORDER", myEntity.getSortOrder()); + valueMap.put("DATE_ADDED", myEntity.getDateAdded()); + valueMap.put("LAST_MODIFIED", myEntity.getLastModified()); + return valueMap; + } + + public java.util.List convertToColumnStringValueList(Entity entity) { + return new java.util.ArrayList(convertToColumnStringValueMap(entity).values()); + } + + public java.util.Map convertToColumnStringValueMap(Entity entity) { + final Categories myEntity = downcast(entity); + final java.util.Map valueMap = new java.util.LinkedHashMap(); + valueMap.put("CATEGORIES_ID", helpGettingColumnStringValue(myEntity.getCategoriesId())); + valueMap.put("CATEGORIES_IMAGE", helpGettingColumnStringValue(myEntity.getCategoriesImage())); + valueMap.put("PARENT_ID", helpGettingColumnStringValue(myEntity.getParentId())); + valueMap.put("SORT_ORDER", helpGettingColumnStringValue(myEntity.getSortOrder())); + valueMap.put("DATE_ADDED", helpGettingColumnStringValue(myEntity.getDateAdded())); + valueMap.put("LAST_MODIFIED", helpGettingColumnStringValue(myEntity.getLastModified())); + return valueMap; + } + + // =================================================================================== + // JDBC Support + // ============ + public String getPreparedInsertClause() { + return "insert into CATEGORIES(CATEGORIES_ID, CATEGORIES_IMAGE, PARENT_ID, SORT_ORDER, DATE_ADDED, LAST_MODIFIED) values(? , ? , ? , ? , ? , ? )"; + } + + public String getPreparedInsertClause(String tablePrefix) { + return "insert into " + tablePrefix + "CATEGORIES(CATEGORIES_ID, CATEGORIES_IMAGE, PARENT_ID, SORT_ORDER, DATE_ADDED, LAST_MODIFIED) values(? , ? , ? , ? , ? , ? )"; + } + + // =================================================================================== + // Helper + // ====== + protected Categories downcast(Entity entity) { + assertObjectNotNull("entity", entity); + try { + return (Categories)entity; + } catch (ClassCastException e) { + String msg = "The entity should be Categories but it was: " + entity.getClass(); + throw new IllegalStateException(msg, e); + } + } + + protected void checkDowncast(Entity entity) { + downcast(entity); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/dbmeta/CategoriesDescriptionDbm.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/dbmeta/CategoriesDescriptionDbm.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/dbmeta/CategoriesDescriptionDbm.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,675 @@ +package jp.sf.pal.pompei.bsentity.dbmeta; + + +import jp.sf.pal.pompei.allcommon.Entity; +import jp.sf.pal.pompei.allcommon.dbmeta.DBMeta; +import jp.sf.pal.pompei.allcommon.dbmeta.AbstractDBMeta; +import jp.sf.pal.pompei.exentity.CategoriesDescription; + +/** + * The dbmeta of CATEGORIES_DESCRIPTION. (Singleton) + * + *
+ * [primary-key]
+ *     CATEGORIES_ID, LANGUAGE_ID
+ * 
+ * [column-property]
+ *     CATEGORIES_ID, LANGUAGE_ID, CATEGORIES_NAME
+ * 
+ * [foreign-property]
+ *     
+ * 
+ * [refferer-property]
+ *     
+ * 
+ * [sequence]
+ *     
+ * 
+ * [identity]
+ *     
+ * 
+ * [update-date]
+ *     
+ * 
+ * [version-no]
+ *     
+ * 
+ * 
+ * + * @author DBFlute(AutoGenerator) + */ +public class CategoriesDescriptionDbm extends AbstractDBMeta { + + // =================================================================================== + // Definition + // ========== + /** The type of entity. */ + protected static final Class ENTITY_TYPE = CategoriesDescription.class; + + /** Singleton instance. */ + private static final CategoriesDescriptionDbm _instance = new CategoriesDescriptionDbm(); + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + private CategoriesDescriptionDbm() { + } + + // =================================================================================== + // Singleton + // ========= + /** + * Get instance. + * + * @return Singleton instance. (NotNull) + */ + public static CategoriesDescriptionDbm getInstance() { + return _instance; + } + + // =================================================================================== + // Name Definition + // =============== + /** Table db name. */ + public static final String TABLE_DB_NAME = "CATEGORIES_DESCRIPTION"; + + /** Table cap-prop name. */ + public static final String TABLE_CAP_PROP_NAME = "CategoriesDescription"; + + /** Table uncap-prop name. */ + public static final String TABLE_UNCAP_PROP_NAME = "categoriesDescription"; + + /** Db-name of CategoriesId. */ + public static final String COLUMN_DB_NAME_OF_CategoriesId = "CATEGORIES_ID"; + /** Db-name of LanguageId. */ + public static final String COLUMN_DB_NAME_OF_LanguageId = "LANGUAGE_ID"; + /** Db-name of CategoriesName. */ + public static final String COLUMN_DB_NAME_OF_CategoriesName = "CATEGORIES_NAME"; + + /** Cap-prop-name of CategoriesId. */ + public static final String COLUMN_CAP_PROP_NAME_OF_CategoriesId = "CategoriesId"; + /** Cap-prop-name of LanguageId. */ + public static final String COLUMN_CAP_PROP_NAME_OF_LanguageId = "LanguageId"; + /** Cap-prop-name of CategoriesName. */ + public static final String COLUMN_CAP_PROP_NAME_OF_CategoriesName = "CategoriesName"; + + + + /** Uncap-prop-name of CategoriesId. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_CategoriesId = "categoriesId"; + /** Uncap-prop-name of LanguageId. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_LanguageId = "languageId"; + /** Uncap-prop-name of CategoriesName. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_CategoriesName = "categoriesName"; + + + + /** {db-name : cap-prop-name} map. */ + private static java.util.Map _dbNameCapPropNameMap; + protected static java.util.Map createDbNameCapPropNameMap() { + if (_dbNameCapPropNameMap != null) { + return _dbNameCapPropNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_DB_NAME, TABLE_CAP_PROP_NAME); + + map.put(COLUMN_DB_NAME_OF_CategoriesId, COLUMN_CAP_PROP_NAME_OF_CategoriesId); + map.put(COLUMN_DB_NAME_OF_LanguageId, COLUMN_CAP_PROP_NAME_OF_LanguageId); + map.put(COLUMN_DB_NAME_OF_CategoriesName, COLUMN_CAP_PROP_NAME_OF_CategoriesName); + + _dbNameCapPropNameMap = java.util.Collections.unmodifiableMap(map); + return _dbNameCapPropNameMap; + } + + /** {db-name : uncap-prop-name} map. */ + private static java.util.Map _dbNameUncapPropNameMap; + protected static java.util.Map createDbNameUncapPropNameMap() { + if (_dbNameUncapPropNameMap != null) { + return _dbNameUncapPropNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_DB_NAME, TABLE_UNCAP_PROP_NAME); + + map.put(COLUMN_DB_NAME_OF_CategoriesId, COLUMN_UNCAP_PROP_NAME_OF_CategoriesId); + map.put(COLUMN_DB_NAME_OF_LanguageId, COLUMN_UNCAP_PROP_NAME_OF_LanguageId); + map.put(COLUMN_DB_NAME_OF_CategoriesName, COLUMN_UNCAP_PROP_NAME_OF_CategoriesName); + + _dbNameUncapPropNameMap = java.util.Collections.unmodifiableMap(map); + return _dbNameUncapPropNameMap; + } + + /** {cap-prop-name : db-name} map. */ + private static java.util.Map _capPropNameDbNameMap; + protected static java.util.Map createCapPropNameDbNameMap() { + if (_capPropNameDbNameMap != null) { + return _capPropNameDbNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_CAP_PROP_NAME, TABLE_DB_NAME); + + map.put(COLUMN_CAP_PROP_NAME_OF_CategoriesId, COLUMN_DB_NAME_OF_CategoriesId); + map.put(COLUMN_CAP_PROP_NAME_OF_LanguageId, COLUMN_DB_NAME_OF_LanguageId); + map.put(COLUMN_CAP_PROP_NAME_OF_CategoriesName, COLUMN_DB_NAME_OF_CategoriesName); + + _capPropNameDbNameMap = java.util.Collections.unmodifiableMap(map); + return _capPropNameDbNameMap; + } + + /** {cap-prop-name : uncap-prop-name} map. */ + private static java.util.Map _capPropNameUncapPropNameMap; + protected static java.util.Map createCapPropNameUncapPropNameMap() { + if (_capPropNameUncapPropNameMap != null) { + return _capPropNameUncapPropNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_CAP_PROP_NAME, TABLE_UNCAP_PROP_NAME); + + map.put(COLUMN_CAP_PROP_NAME_OF_CategoriesId, COLUMN_UNCAP_PROP_NAME_OF_CategoriesId); + map.put(COLUMN_CAP_PROP_NAME_OF_LanguageId, COLUMN_UNCAP_PROP_NAME_OF_LanguageId); + map.put(COLUMN_CAP_PROP_NAME_OF_CategoriesName, COLUMN_UNCAP_PROP_NAME_OF_CategoriesName); + + _capPropNameUncapPropNameMap = java.util.Collections.unmodifiableMap(map); + return _capPropNameUncapPropNameMap; + } + + /** {uncap-prop-name : db-name} map. */ + private static java.util.Map _uncapPropNameDbNameMap; + protected static java.util.Map createUncapPropNameDbNameMap() { + if (_uncapPropNameDbNameMap != null) { + return _uncapPropNameDbNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_UNCAP_PROP_NAME, TABLE_DB_NAME); + + map.put(COLUMN_UNCAP_PROP_NAME_OF_CategoriesId, COLUMN_DB_NAME_OF_CategoriesId); + map.put(COLUMN_UNCAP_PROP_NAME_OF_LanguageId, COLUMN_DB_NAME_OF_LanguageId); + map.put(COLUMN_UNCAP_PROP_NAME_OF_CategoriesName, COLUMN_DB_NAME_OF_CategoriesName); + + _uncapPropNameDbNameMap = java.util.Collections.unmodifiableMap(map); + return _uncapPropNameDbNameMap; + } + + /** {uncap-prop-name : cap-prop-name} map. */ + private static java.util.Map _uncapPropNameCapPropNameMap; + protected static java.util.Map createUncapPropNameCapPropNameMap() { + if (_uncapPropNameCapPropNameMap != null) { + return _uncapPropNameCapPropNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_UNCAP_PROP_NAME, TABLE_CAP_PROP_NAME); + + map.put(COLUMN_UNCAP_PROP_NAME_OF_CategoriesId, COLUMN_CAP_PROP_NAME_OF_CategoriesId); + map.put(COLUMN_UNCAP_PROP_NAME_OF_LanguageId, COLUMN_CAP_PROP_NAME_OF_LanguageId); + map.put(COLUMN_UNCAP_PROP_NAME_OF_CategoriesName, COLUMN_CAP_PROP_NAME_OF_CategoriesName); + + _uncapPropNameCapPropNameMap = java.util.Collections.unmodifiableMap(map); + return _uncapPropNameCapPropNameMap; + } + + // =================================================================================== + // Name-Map + // ======== + /** + * This method implements the method that is declared at super. + * + * @return {db-name : cap-prop-name} map. + */ + public java.util.Map getDbNameCapPropNameMap() { + return createDbNameCapPropNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {db-name : uncap-prop-name} map. + */ + public java.util.Map getDbNameUncapPropNameMap() { + return createDbNameUncapPropNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {cap-prop-name : db-name} map. + */ + public java.util.Map getCapPropNameDbNameMap() { + return createCapPropNameDbNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {cap-prop-name : uncap-prop-name} map. + */ + public java.util.Map getCapPropNameUncapPropNameMap() { + return createCapPropNameUncapPropNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {uncap-prop-name : db-name} map. + */ + public java.util.Map getUncapPropNameDbNameMap() { + return createUncapPropNameDbNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {uncap-prop-name : cap-prop-name} map. + */ + public java.util.Map getUncapPropNameCapPropNameMap() { + return createUncapPropNameCapPropNameMap(); + } + + // =================================================================================== + // Table Name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + public String getTableDbName() { + return TABLE_DB_NAME; + } + + /** + * This method implements the method that is declared at super. + * + * @return Table cap-prop-name. (NotNull) + */ + public String getTableCapPropName() { + return TABLE_CAP_PROP_NAME; + } + + /** + * This method implements the method that is declared at super. + * + * @return Table property-name. (NotNull) + */ + public String getTableUncapPropName() { + return TABLE_UNCAP_PROP_NAME; + } + + // =================================================================================== + // Column Name + // =========== + public java.util.List getColumnDbNameList() { + final String[] columns = getColumnDbNameCommaString().split(","); + final java.util.List resultList = new java.util.ArrayList(); + for (int i=0; i < columns.length; i++) { + resultList.add(columns[i].trim()); + } + return resultList; + } + + public java.util.List getColumnCapPropNameList() { + final java.util.List columnDbNameList = getColumnDbNameList(); + final java.util.List resultList = new java.util.ArrayList(); + for (final java.util.Iterator ite = columnDbNameList.iterator(); ite.hasNext(); ) { + resultList.add(getDbNameCapPropNameMap().get((String)ite.next())); + } + return resultList; + } + + public java.util.List getColumnUncapPropNameList() { + final java.util.List columnDbNameList = getColumnDbNameList(); + final java.util.List resultList = new java.util.ArrayList(); + for (final java.util.Iterator ite = columnDbNameList.iterator(); ite.hasNext(); ) { + resultList.add(getDbNameUncapPropNameMap().get((String)ite.next())); + } + return resultList; + } + + /** + * This method implements the method that is declared at super. + * + * @return Column-db-name comma-string. (NotNull) + */ + public String getColumnDbNameCommaString() { + return "CATEGORIES_ID, LANGUAGE_ID, CATEGORIES_NAME"; + } + + // =================================================================================== + // Type Name + // ========= + /** + * This method implements the method that is declared at super. + * + * @return The type-name of entity. (NotNull) + */ + public String getEntityTypeName() { + return "jp.sf.pal.pompei.exentity.CategoriesDescription"; + } + + /** + * This method implements the method that is declared at super. + * + * @return The type-name of condition-bean. (NotNull) + */ + public String getConditionBeanTypeName() { + return "jp.sf.pal.pompei.cbean.bs.CategoriesDescriptionCB"; + } + + /** + * This method implements the method that is declared at super. + * + * @return The type-name of dao. (NotNull) + */ + public String getDaoTypeName() { + return "jp.sf.pal.pompei.exdao.CategoriesDescriptionDao"; + } + + /** + * This method implements the method that is declared at super. + * + * @return The type-name of behavior. (NotNull) + */ + public String getBehaviorTypeName() { + return "jp.sf.pal.pompei.exbhv.CategoriesDescriptionBhv"; + } + + // =================================================================================== + // Type + // ==== + /** + * This method implements the method that is declared at super. + * + * @return The type of entity. (NotNull) + */ + public Class getEntityType() { + return ENTITY_TYPE; + } + + // =================================================================================== + // Instance + // ======== + /** + * This method implements the method that is declared at super. + * + * @return The type of entity. (NotNull) + */ + public Entity newEntity() { + return newMyEntity(); + } + + /** + * New the instance of my entity. + * + * @return The instance of my entity. (NotNull) + */ + public CategoriesDescription newMyEntity() { + return new CategoriesDescription(); + } + + // =================================================================================== + // Foreign DBMeta + // ============== + /** + * This method implements the method that is declared at super. + * + * @param foreignPropertyName Foreign-property-name(Both OK - InitCap or not). (NotNull) + * @return Foreign DBMeta. (NotNull) + */ + public DBMeta getForeignDBMeta(String foreignPropertyName) { + assertStringNotNullAndNotTrimmedEmpty("foreignPropertyName", foreignPropertyName); + final String methodName = "getForeignDBMeta_" + foreignPropertyName.substring(0, 1) + foreignPropertyName.substring(1); + + java.lang.reflect.Method method = null; + try { + method = this.getClass().getMethod(methodName, new Class[]{}); + } catch (NoSuchMethodException e) { + String msg = "The foreignPropertyName is not found: foreignPropertyName=" + foreignPropertyName; + msg = msg + " tableName=" + TABLE_DB_NAME + " methodName=" + methodName; + throw new RuntimeException(msg, e); + } + try { + return (DBMeta)method.invoke(this, new Object[]{}); + } catch (IllegalAccessException e) { + throw new RuntimeException(e); + } catch (java.lang.reflect.InvocationTargetException e) { + throw new RuntimeException(e.getCause()); + } + } + + // =================================================================================== + // Determination + // ============= + /** + * This method implements the method that is declared at super. + * + * @return Determination. + */ + public boolean hasTwoOrMorePrimaryKeys() { + return true; + } + + /** + * This method implements the method that is declared at super. + * + * @return Determination. + */ + public boolean hasCommonColumn() { + return false; + } + + // =================================================================================== + // Entity Handling + // =============== + // ----------------------------------------------------- + // Accept + // ------ + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @param primaryKeyMap Primary key map. (NotNull and NotEmpty) + */ + public void acceptPrimaryKeyMap(Entity entity, java.util.Map primaryKeyMap) { + final CategoriesDescription myEntity = (CategoriesDescription)entity; + MapAssertUtil.assertPrimaryKeyMapNotNullAndNotEmpty(primaryKeyMap); + final MapStringValueAnalyzer analyzer = new MapStringValueAnalyzer(primaryKeyMap, entity.getModifiedPropertyNames()); + + MapAssertUtil.assertColumnExistingInPrimaryKeyMap(primaryKeyMap, "CATEGORIES_ID"); + if (analyzer.init("CATEGORIES_ID", "categoriesId", "categoriesId")) { myEntity.setCategoriesId(analyzer.analyzeNumber(java.math.BigDecimal.class)); }; + MapAssertUtil.assertColumnExistingInPrimaryKeyMap(primaryKeyMap, "LANGUAGE_ID"); + if (analyzer.init("LANGUAGE_ID", "languageId", "languageId")) { myEntity.setLanguageId(analyzer.analyzeNumber(java.math.BigDecimal.class)); }; + + + } + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @param primaryKeyMapString Primary-key map-string. (NotNull and NotEmpty) + */ + public void acceptPrimaryKeyMapString(Entity entity, String primaryKeyMapString) { + MapStringUtil.acceptPrimaryKeyMapString(primaryKeyMapString, entity); + } + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @param columnValueMap Column-value map. (NotNull and NotEmpty) + */ + public void acceptColumnValueMap(Entity entity, java.util.Map columnValueMap) { + final CategoriesDescription myEntity = (CategoriesDescription)entity; + MapAssertUtil.assertColumnValueMapNotNullAndNotEmpty(columnValueMap); + final MapStringValueAnalyzer analyzer = new MapStringValueAnalyzer(columnValueMap, entity.getModifiedPropertyNames()); + + if (analyzer.init("CATEGORIES_ID", "categoriesId", "categoriesId")) { myEntity.setCategoriesId(analyzer.analyzeNumber(java.math.BigDecimal.class)); }; + if (analyzer.init("LANGUAGE_ID", "languageId", "languageId")) { myEntity.setLanguageId(analyzer.analyzeNumber(java.math.BigDecimal.class)); }; + if (analyzer.init("CATEGORIES_NAME", "categoriesName", "categoriesName")) { myEntity.setCategoriesName(analyzer.analyzeString(String.class)); }; + + } + + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @param columnValueMapString Column-value map-string. (NotNull and NotEmpty) + */ + public void acceptColumnValueMapString(Entity entity, String columnValueMapString) { + MapStringUtil.acceptColumnValueMapString(columnValueMapString, entity); + } + + + // ----------------------------------------------------- + // Extract + // ------- + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @return Primary-key map-string. (NotNull) + */ + public String extractPrimaryKeyMapString(Entity entity) { + return MapStringUtil.extractPrimaryKeyMapString(entity); + } + + /** + * Extract primary-key map-string. + * + * @param entity Target entity. (NotNull) + * @param startBrace Start-brace. (NotNull) + * @param endBrace End-brace. (NotNull) + * @param delimiter Delimiter. (NotNull) + * @param equal Equal. (NotNull) + * @return Primary-key map-string. (NotNull) + */ + public String extractPrimaryKeyMapString(Entity entity, String startBrace, String endBrace, String delimiter, String equal) { + final CategoriesDescription myEntity = (CategoriesDescription)entity; + final String mapMarkAndStartBrace = MAP_STRING_MAP_MARK + startBrace; + final StringBuffer sb = new StringBuffer(); + helpAppendingColumnValueString(sb, delimiter, equal, "CATEGORIES_ID", myEntity.getCategoriesId()); + helpAppendingColumnValueString(sb, delimiter, equal, "LANGUAGE_ID", myEntity.getLanguageId()); + + sb.delete(0, delimiter.length()).insert(0, mapMarkAndStartBrace).append(endBrace); + return sb.toString(); + + } + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @return Column-value map-string. (NotNull) + */ + public String extractColumnValueMapString(Entity entity) { + return MapStringUtil.extractColumnValueMapString(entity); + } + + /** + * Extract column-value map-string. + * + * @param entity Target entity. (NotNull) + * @param startBrace Start-brace. (NotNull) + * @param endBrace End-brace. (NotNull) + * @param delimiter Delimiter. (NotNull) + * @param equal Equal. (NotNull) + * @return Column-value map-string. (NotNull) + */ + public String extractColumnValueMapString(Entity entity, String startBrace, String endBrace, String delimiter, String equal) { + final CategoriesDescription myEntity = (CategoriesDescription)entity; + final String mapMarkAndStartBrace = MAP_STRING_MAP_MARK + startBrace; + final StringBuffer sb = new StringBuffer(); + helpAppendingColumnValueString(sb, delimiter, equal, "CATEGORIES_ID", myEntity.getCategoriesId()); + helpAppendingColumnValueString(sb, delimiter, equal, "LANGUAGE_ID", myEntity.getLanguageId()); + helpAppendingColumnValueString(sb, delimiter, equal, "CATEGORIES_NAME", myEntity.getCategoriesName()); + + sb.delete(0, delimiter.length()).insert(0, mapMarkAndStartBrace).append(endBrace); + return sb.toString(); + } + + private void helpAppendingColumnValueString(StringBuffer sb, String delimiter, String equal, String colName, Object value) { + sb.append(delimiter).append(colName).append(equal); + sb.append(helpGettingColumnStringValue(value)); + } + + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @return Column-value map-string. (NotNull) + */ + public String extractCommonColumnValueMapString(Entity entity) { + return "map:{}"; + } + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @return Column-value map-string. (NotNull) + */ + public String extractCommonColumnValueMapString(Entity entity, String startBrace, String endBrace, String delimiter, String equal) { + return "map:" + startBrace + endBrace; + } + + + // ----------------------------------------------------- + // Convert + // ------- + public java.util.List convertToColumnValueList(Entity entity) { + return new java.util.ArrayList(convertToColumnValueMap(entity).values()); + } + + public java.util.Map convertToColumnValueMap(Entity entity) { + final CategoriesDescription myEntity = downcast(entity); + final java.util.Map valueMap = new java.util.LinkedHashMap(); + valueMap.put("CATEGORIES_ID", myEntity.getCategoriesId()); + valueMap.put("LANGUAGE_ID", myEntity.getLanguageId()); + valueMap.put("CATEGORIES_NAME", myEntity.getCategoriesName()); + return valueMap; + } + + public java.util.List convertToColumnStringValueList(Entity entity) { + return new java.util.ArrayList(convertToColumnStringValueMap(entity).values()); + } + + public java.util.Map convertToColumnStringValueMap(Entity entity) { + final CategoriesDescription myEntity = downcast(entity); + final java.util.Map valueMap = new java.util.LinkedHashMap(); + valueMap.put("CATEGORIES_ID", helpGettingColumnStringValue(myEntity.getCategoriesId())); + valueMap.put("LANGUAGE_ID", helpGettingColumnStringValue(myEntity.getLanguageId())); + valueMap.put("CATEGORIES_NAME", helpGettingColumnStringValue(myEntity.getCategoriesName())); + return valueMap; + } + + // =================================================================================== + // JDBC Support + // ============ + public String getPreparedInsertClause() { + return "insert into CATEGORIES_DESCRIPTION(CATEGORIES_ID, LANGUAGE_ID, CATEGORIES_NAME) values(? , ? , ? )"; + } + + public String getPreparedInsertClause(String tablePrefix) { + return "insert into " + tablePrefix + "CATEGORIES_DESCRIPTION(CATEGORIES_ID, LANGUAGE_ID, CATEGORIES_NAME) values(? , ? , ? )"; + } + + // =================================================================================== + // Helper + // ====== + protected CategoriesDescription downcast(Entity entity) { + assertObjectNotNull("entity", entity); + try { + return (CategoriesDescription)entity; + } catch (ClassCastException e) { + String msg = "The entity should be CategoriesDescription but it was: " + entity.getClass(); + throw new IllegalStateException(msg, e); + } + } + + protected void checkDowncast(Entity entity) { + downcast(entity); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/dbmeta/ConfigurationDbm.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/dbmeta/ConfigurationDbm.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/dbmeta/ConfigurationDbm.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,800 @@ +package jp.sf.pal.pompei.bsentity.dbmeta; + + +import jp.sf.pal.pompei.allcommon.Entity; +import jp.sf.pal.pompei.allcommon.dbmeta.DBMeta; +import jp.sf.pal.pompei.allcommon.dbmeta.AbstractDBMeta; +import jp.sf.pal.pompei.exentity.Configuration; + +/** + * The dbmeta of CONFIGURATION. (Singleton) + * + *
+ * [primary-key]
+ *     CONFIGURATION_ID
+ * 
+ * [column-property]
+ *     CONFIGURATION_ID, CONFIGURATION_TITLE, CONFIGURATION_KEY, CONFIGURATION_VALUE, CONFIGURATION_DESCRIPTION, CONFIGURATION_GROUP_ID, SORT_ORDER, LAST_MODIFIED, DATE_ADDED, USE_FUNCTION, SET_FUNCTION
+ * 
+ * [foreign-property]
+ *     
+ * 
+ * [refferer-property]
+ *     
+ * 
+ * [sequence]
+ *     
+ * 
+ * [identity]
+ *     
+ * 
+ * [update-date]
+ *     
+ * 
+ * [version-no]
+ *     
+ * 
+ * 
+ * + * @author DBFlute(AutoGenerator) + */ +public class ConfigurationDbm extends AbstractDBMeta { + + // =================================================================================== + // Definition + // ========== + /** The type of entity. */ + protected static final Class ENTITY_TYPE = Configuration.class; + + /** Singleton instance. */ + private static final ConfigurationDbm _instance = new ConfigurationDbm(); + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + private ConfigurationDbm() { + } + + // =================================================================================== + // Singleton + // ========= + /** + * Get instance. + * + * @return Singleton instance. (NotNull) + */ + public static ConfigurationDbm getInstance() { + return _instance; + } + + // =================================================================================== + // Name Definition + // =============== + /** Table db name. */ + public static final String TABLE_DB_NAME = "CONFIGURATION"; + + /** Table cap-prop name. */ + public static final String TABLE_CAP_PROP_NAME = "Configuration"; + + /** Table uncap-prop name. */ + public static final String TABLE_UNCAP_PROP_NAME = "configuration"; + + /** Db-name of ConfigurationId. */ + public static final String COLUMN_DB_NAME_OF_ConfigurationId = "CONFIGURATION_ID"; + /** Db-name of ConfigurationTitle. */ + public static final String COLUMN_DB_NAME_OF_ConfigurationTitle = "CONFIGURATION_TITLE"; + /** Db-name of ConfigurationKey. */ + public static final String COLUMN_DB_NAME_OF_ConfigurationKey = "CONFIGURATION_KEY"; + /** Db-name of ConfigurationValue. */ + public static final String COLUMN_DB_NAME_OF_ConfigurationValue = "CONFIGURATION_VALUE"; + /** Db-name of ConfigurationDescription. */ + public static final String COLUMN_DB_NAME_OF_ConfigurationDescription = "CONFIGURATION_DESCRIPTION"; + /** Db-name of ConfigurationGroupId. */ + public static final String COLUMN_DB_NAME_OF_ConfigurationGroupId = "CONFIGURATION_GROUP_ID"; + /** Db-name of SortOrder. */ + public static final String COLUMN_DB_NAME_OF_SortOrder = "SORT_ORDER"; + /** Db-name of LastModified. */ + public static final String COLUMN_DB_NAME_OF_LastModified = "LAST_MODIFIED"; + /** Db-name of DateAdded. */ + public static final String COLUMN_DB_NAME_OF_DateAdded = "DATE_ADDED"; + /** Db-name of UseFunction. */ + public static final String COLUMN_DB_NAME_OF_UseFunction = "USE_FUNCTION"; + /** Db-name of SetFunction. */ + public static final String COLUMN_DB_NAME_OF_SetFunction = "SET_FUNCTION"; + + /** Cap-prop-name of ConfigurationId. */ + public static final String COLUMN_CAP_PROP_NAME_OF_ConfigurationId = "ConfigurationId"; + /** Cap-prop-name of ConfigurationTitle. */ + public static final String COLUMN_CAP_PROP_NAME_OF_ConfigurationTitle = "ConfigurationTitle"; + /** Cap-prop-name of ConfigurationKey. */ + public static final String COLUMN_CAP_PROP_NAME_OF_ConfigurationKey = "ConfigurationKey"; + /** Cap-prop-name of ConfigurationValue. */ + public static final String COLUMN_CAP_PROP_NAME_OF_ConfigurationValue = "ConfigurationValue"; + /** Cap-prop-name of ConfigurationDescription. */ + public static final String COLUMN_CAP_PROP_NAME_OF_ConfigurationDescription = "ConfigurationDescription"; + /** Cap-prop-name of ConfigurationGroupId. */ + public static final String COLUMN_CAP_PROP_NAME_OF_ConfigurationGroupId = "ConfigurationGroupId"; + /** Cap-prop-name of SortOrder. */ + public static final String COLUMN_CAP_PROP_NAME_OF_SortOrder = "SortOrder"; + /** Cap-prop-name of LastModified. */ + public static final String COLUMN_CAP_PROP_NAME_OF_LastModified = "LastModified"; + /** Cap-prop-name of DateAdded. */ + public static final String COLUMN_CAP_PROP_NAME_OF_DateAdded = "DateAdded"; + /** Cap-prop-name of UseFunction. */ + public static final String COLUMN_CAP_PROP_NAME_OF_UseFunction = "UseFunction"; + /** Cap-prop-name of SetFunction. */ + public static final String COLUMN_CAP_PROP_NAME_OF_SetFunction = "SetFunction"; + + + + /** Uncap-prop-name of ConfigurationId. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_ConfigurationId = "configurationId"; + /** Uncap-prop-name of ConfigurationTitle. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_ConfigurationTitle = "configurationTitle"; + /** Uncap-prop-name of ConfigurationKey. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_ConfigurationKey = "configurationKey"; + /** Uncap-prop-name of ConfigurationValue. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_ConfigurationValue = "configurationValue"; + /** Uncap-prop-name of ConfigurationDescription. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_ConfigurationDescription = "configurationDescription"; + /** Uncap-prop-name of ConfigurationGroupId. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_ConfigurationGroupId = "configurationGroupId"; + /** Uncap-prop-name of SortOrder. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_SortOrder = "sortOrder"; + /** Uncap-prop-name of LastModified. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_LastModified = "lastModified"; + /** Uncap-prop-name of DateAdded. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_DateAdded = "dateAdded"; + /** Uncap-prop-name of UseFunction. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_UseFunction = "useFunction"; + /** Uncap-prop-name of SetFunction. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_SetFunction = "setFunction"; + + + + /** {db-name : cap-prop-name} map. */ + private static java.util.Map _dbNameCapPropNameMap; + protected static java.util.Map createDbNameCapPropNameMap() { + if (_dbNameCapPropNameMap != null) { + return _dbNameCapPropNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_DB_NAME, TABLE_CAP_PROP_NAME); + + map.put(COLUMN_DB_NAME_OF_ConfigurationId, COLUMN_CAP_PROP_NAME_OF_ConfigurationId); + map.put(COLUMN_DB_NAME_OF_ConfigurationTitle, COLUMN_CAP_PROP_NAME_OF_ConfigurationTitle); + map.put(COLUMN_DB_NAME_OF_ConfigurationKey, COLUMN_CAP_PROP_NAME_OF_ConfigurationKey); + map.put(COLUMN_DB_NAME_OF_ConfigurationValue, COLUMN_CAP_PROP_NAME_OF_ConfigurationValue); + map.put(COLUMN_DB_NAME_OF_ConfigurationDescription, COLUMN_CAP_PROP_NAME_OF_ConfigurationDescription); + map.put(COLUMN_DB_NAME_OF_ConfigurationGroupId, COLUMN_CAP_PROP_NAME_OF_ConfigurationGroupId); + map.put(COLUMN_DB_NAME_OF_SortOrder, COLUMN_CAP_PROP_NAME_OF_SortOrder); + map.put(COLUMN_DB_NAME_OF_LastModified, COLUMN_CAP_PROP_NAME_OF_LastModified); + map.put(COLUMN_DB_NAME_OF_DateAdded, COLUMN_CAP_PROP_NAME_OF_DateAdded); + map.put(COLUMN_DB_NAME_OF_UseFunction, COLUMN_CAP_PROP_NAME_OF_UseFunction); + map.put(COLUMN_DB_NAME_OF_SetFunction, COLUMN_CAP_PROP_NAME_OF_SetFunction); + + _dbNameCapPropNameMap = java.util.Collections.unmodifiableMap(map); + return _dbNameCapPropNameMap; + } + + /** {db-name : uncap-prop-name} map. */ + private static java.util.Map _dbNameUncapPropNameMap; + protected static java.util.Map createDbNameUncapPropNameMap() { + if (_dbNameUncapPropNameMap != null) { + return _dbNameUncapPropNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_DB_NAME, TABLE_UNCAP_PROP_NAME); + + map.put(COLUMN_DB_NAME_OF_ConfigurationId, COLUMN_UNCAP_PROP_NAME_OF_ConfigurationId); + map.put(COLUMN_DB_NAME_OF_ConfigurationTitle, COLUMN_UNCAP_PROP_NAME_OF_ConfigurationTitle); + map.put(COLUMN_DB_NAME_OF_ConfigurationKey, COLUMN_UNCAP_PROP_NAME_OF_ConfigurationKey); + map.put(COLUMN_DB_NAME_OF_ConfigurationValue, COLUMN_UNCAP_PROP_NAME_OF_ConfigurationValue); + map.put(COLUMN_DB_NAME_OF_ConfigurationDescription, COLUMN_UNCAP_PROP_NAME_OF_ConfigurationDescription); + map.put(COLUMN_DB_NAME_OF_ConfigurationGroupId, COLUMN_UNCAP_PROP_NAME_OF_ConfigurationGroupId); + map.put(COLUMN_DB_NAME_OF_SortOrder, COLUMN_UNCAP_PROP_NAME_OF_SortOrder); + map.put(COLUMN_DB_NAME_OF_LastModified, COLUMN_UNCAP_PROP_NAME_OF_LastModified); + map.put(COLUMN_DB_NAME_OF_DateAdded, COLUMN_UNCAP_PROP_NAME_OF_DateAdded); + map.put(COLUMN_DB_NAME_OF_UseFunction, COLUMN_UNCAP_PROP_NAME_OF_UseFunction); + map.put(COLUMN_DB_NAME_OF_SetFunction, COLUMN_UNCAP_PROP_NAME_OF_SetFunction); + + _dbNameUncapPropNameMap = java.util.Collections.unmodifiableMap(map); + return _dbNameUncapPropNameMap; + } + + /** {cap-prop-name : db-name} map. */ + private static java.util.Map _capPropNameDbNameMap; + protected static java.util.Map createCapPropNameDbNameMap() { + if (_capPropNameDbNameMap != null) { + return _capPropNameDbNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_CAP_PROP_NAME, TABLE_DB_NAME); + + map.put(COLUMN_CAP_PROP_NAME_OF_ConfigurationId, COLUMN_DB_NAME_OF_ConfigurationId); + map.put(COLUMN_CAP_PROP_NAME_OF_ConfigurationTitle, COLUMN_DB_NAME_OF_ConfigurationTitle); + map.put(COLUMN_CAP_PROP_NAME_OF_ConfigurationKey, COLUMN_DB_NAME_OF_ConfigurationKey); + map.put(COLUMN_CAP_PROP_NAME_OF_ConfigurationValue, COLUMN_DB_NAME_OF_ConfigurationValue); + map.put(COLUMN_CAP_PROP_NAME_OF_ConfigurationDescription, COLUMN_DB_NAME_OF_ConfigurationDescription); + map.put(COLUMN_CAP_PROP_NAME_OF_ConfigurationGroupId, COLUMN_DB_NAME_OF_ConfigurationGroupId); + map.put(COLUMN_CAP_PROP_NAME_OF_SortOrder, COLUMN_DB_NAME_OF_SortOrder); + map.put(COLUMN_CAP_PROP_NAME_OF_LastModified, COLUMN_DB_NAME_OF_LastModified); + map.put(COLUMN_CAP_PROP_NAME_OF_DateAdded, COLUMN_DB_NAME_OF_DateAdded); + map.put(COLUMN_CAP_PROP_NAME_OF_UseFunction, COLUMN_DB_NAME_OF_UseFunction); + map.put(COLUMN_CAP_PROP_NAME_OF_SetFunction, COLUMN_DB_NAME_OF_SetFunction); + + _capPropNameDbNameMap = java.util.Collections.unmodifiableMap(map); + return _capPropNameDbNameMap; + } + + /** {cap-prop-name : uncap-prop-name} map. */ + private static java.util.Map _capPropNameUncapPropNameMap; + protected static java.util.Map createCapPropNameUncapPropNameMap() { + if (_capPropNameUncapPropNameMap != null) { + return _capPropNameUncapPropNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_CAP_PROP_NAME, TABLE_UNCAP_PROP_NAME); + + map.put(COLUMN_CAP_PROP_NAME_OF_ConfigurationId, COLUMN_UNCAP_PROP_NAME_OF_ConfigurationId); + map.put(COLUMN_CAP_PROP_NAME_OF_ConfigurationTitle, COLUMN_UNCAP_PROP_NAME_OF_ConfigurationTitle); + map.put(COLUMN_CAP_PROP_NAME_OF_ConfigurationKey, COLUMN_UNCAP_PROP_NAME_OF_ConfigurationKey); + map.put(COLUMN_CAP_PROP_NAME_OF_ConfigurationValue, COLUMN_UNCAP_PROP_NAME_OF_ConfigurationValue); + map.put(COLUMN_CAP_PROP_NAME_OF_ConfigurationDescription, COLUMN_UNCAP_PROP_NAME_OF_ConfigurationDescription); + map.put(COLUMN_CAP_PROP_NAME_OF_ConfigurationGroupId, COLUMN_UNCAP_PROP_NAME_OF_ConfigurationGroupId); + map.put(COLUMN_CAP_PROP_NAME_OF_SortOrder, COLUMN_UNCAP_PROP_NAME_OF_SortOrder); + map.put(COLUMN_CAP_PROP_NAME_OF_LastModified, COLUMN_UNCAP_PROP_NAME_OF_LastModified); + map.put(COLUMN_CAP_PROP_NAME_OF_DateAdded, COLUMN_UNCAP_PROP_NAME_OF_DateAdded); + map.put(COLUMN_CAP_PROP_NAME_OF_UseFunction, COLUMN_UNCAP_PROP_NAME_OF_UseFunction); + map.put(COLUMN_CAP_PROP_NAME_OF_SetFunction, COLUMN_UNCAP_PROP_NAME_OF_SetFunction); + + _capPropNameUncapPropNameMap = java.util.Collections.unmodifiableMap(map); + return _capPropNameUncapPropNameMap; + } + + /** {uncap-prop-name : db-name} map. */ + private static java.util.Map _uncapPropNameDbNameMap; + protected static java.util.Map createUncapPropNameDbNameMap() { + if (_uncapPropNameDbNameMap != null) { + return _uncapPropNameDbNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_UNCAP_PROP_NAME, TABLE_DB_NAME); + + map.put(COLUMN_UNCAP_PROP_NAME_OF_ConfigurationId, COLUMN_DB_NAME_OF_ConfigurationId); + map.put(COLUMN_UNCAP_PROP_NAME_OF_ConfigurationTitle, COLUMN_DB_NAME_OF_ConfigurationTitle); + map.put(COLUMN_UNCAP_PROP_NAME_OF_ConfigurationKey, COLUMN_DB_NAME_OF_ConfigurationKey); + map.put(COLUMN_UNCAP_PROP_NAME_OF_ConfigurationValue, COLUMN_DB_NAME_OF_ConfigurationValue); + map.put(COLUMN_UNCAP_PROP_NAME_OF_ConfigurationDescription, COLUMN_DB_NAME_OF_ConfigurationDescription); + map.put(COLUMN_UNCAP_PROP_NAME_OF_ConfigurationGroupId, COLUMN_DB_NAME_OF_ConfigurationGroupId); + map.put(COLUMN_UNCAP_PROP_NAME_OF_SortOrder, COLUMN_DB_NAME_OF_SortOrder); + map.put(COLUMN_UNCAP_PROP_NAME_OF_LastModified, COLUMN_DB_NAME_OF_LastModified); + map.put(COLUMN_UNCAP_PROP_NAME_OF_DateAdded, COLUMN_DB_NAME_OF_DateAdded); + map.put(COLUMN_UNCAP_PROP_NAME_OF_UseFunction, COLUMN_DB_NAME_OF_UseFunction); + map.put(COLUMN_UNCAP_PROP_NAME_OF_SetFunction, COLUMN_DB_NAME_OF_SetFunction); + + _uncapPropNameDbNameMap = java.util.Collections.unmodifiableMap(map); + return _uncapPropNameDbNameMap; + } + + /** {uncap-prop-name : cap-prop-name} map. */ + private static java.util.Map _uncapPropNameCapPropNameMap; + protected static java.util.Map createUncapPropNameCapPropNameMap() { + if (_uncapPropNameCapPropNameMap != null) { + return _uncapPropNameCapPropNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_UNCAP_PROP_NAME, TABLE_CAP_PROP_NAME); + + map.put(COLUMN_UNCAP_PROP_NAME_OF_ConfigurationId, COLUMN_CAP_PROP_NAME_OF_ConfigurationId); + map.put(COLUMN_UNCAP_PROP_NAME_OF_ConfigurationTitle, COLUMN_CAP_PROP_NAME_OF_ConfigurationTitle); + map.put(COLUMN_UNCAP_PROP_NAME_OF_ConfigurationKey, COLUMN_CAP_PROP_NAME_OF_ConfigurationKey); + map.put(COLUMN_UNCAP_PROP_NAME_OF_ConfigurationValue, COLUMN_CAP_PROP_NAME_OF_ConfigurationValue); + map.put(COLUMN_UNCAP_PROP_NAME_OF_ConfigurationDescription, COLUMN_CAP_PROP_NAME_OF_ConfigurationDescription); + map.put(COLUMN_UNCAP_PROP_NAME_OF_ConfigurationGroupId, COLUMN_CAP_PROP_NAME_OF_ConfigurationGroupId); + map.put(COLUMN_UNCAP_PROP_NAME_OF_SortOrder, COLUMN_CAP_PROP_NAME_OF_SortOrder); + map.put(COLUMN_UNCAP_PROP_NAME_OF_LastModified, COLUMN_CAP_PROP_NAME_OF_LastModified); + map.put(COLUMN_UNCAP_PROP_NAME_OF_DateAdded, COLUMN_CAP_PROP_NAME_OF_DateAdded); + map.put(COLUMN_UNCAP_PROP_NAME_OF_UseFunction, COLUMN_CAP_PROP_NAME_OF_UseFunction); + map.put(COLUMN_UNCAP_PROP_NAME_OF_SetFunction, COLUMN_CAP_PROP_NAME_OF_SetFunction); + + _uncapPropNameCapPropNameMap = java.util.Collections.unmodifiableMap(map); + return _uncapPropNameCapPropNameMap; + } + + // =================================================================================== + // Name-Map + // ======== + /** + * This method implements the method that is declared at super. + * + * @return {db-name : cap-prop-name} map. + */ + public java.util.Map getDbNameCapPropNameMap() { + return createDbNameCapPropNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {db-name : uncap-prop-name} map. + */ + public java.util.Map getDbNameUncapPropNameMap() { + return createDbNameUncapPropNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {cap-prop-name : db-name} map. + */ + public java.util.Map getCapPropNameDbNameMap() { + return createCapPropNameDbNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {cap-prop-name : uncap-prop-name} map. + */ + public java.util.Map getCapPropNameUncapPropNameMap() { + return createCapPropNameUncapPropNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {uncap-prop-name : db-name} map. + */ + public java.util.Map getUncapPropNameDbNameMap() { + return createUncapPropNameDbNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {uncap-prop-name : cap-prop-name} map. + */ + public java.util.Map getUncapPropNameCapPropNameMap() { + return createUncapPropNameCapPropNameMap(); + } + + // =================================================================================== + // Table Name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + public String getTableDbName() { + return TABLE_DB_NAME; + } + + /** + * This method implements the method that is declared at super. + * + * @return Table cap-prop-name. (NotNull) + */ + public String getTableCapPropName() { + return TABLE_CAP_PROP_NAME; + } + + /** + * This method implements the method that is declared at super. + * + * @return Table property-name. (NotNull) + */ + public String getTableUncapPropName() { + return TABLE_UNCAP_PROP_NAME; + } + + // =================================================================================== + // Column Name + // =========== + public java.util.List getColumnDbNameList() { + final String[] columns = getColumnDbNameCommaString().split(","); + final java.util.List resultList = new java.util.ArrayList(); + for (int i=0; i < columns.length; i++) { + resultList.add(columns[i].trim()); + } + return resultList; + } + + public java.util.List getColumnCapPropNameList() { + final java.util.List columnDbNameList = getColumnDbNameList(); + final java.util.List resultList = new java.util.ArrayList(); + for (final java.util.Iterator ite = columnDbNameList.iterator(); ite.hasNext(); ) { + resultList.add(getDbNameCapPropNameMap().get((String)ite.next())); + } + return resultList; + } + + public java.util.List getColumnUncapPropNameList() { + final java.util.List columnDbNameList = getColumnDbNameList(); + final java.util.List resultList = new java.util.ArrayList(); + for (final java.util.Iterator ite = columnDbNameList.iterator(); ite.hasNext(); ) { + resultList.add(getDbNameUncapPropNameMap().get((String)ite.next())); + } + return resultList; + } + + /** + * This method implements the method that is declared at super. + * + * @return Column-db-name comma-string. (NotNull) + */ + public String getColumnDbNameCommaString() { + return "CONFIGURATION_ID, CONFIGURATION_TITLE, CONFIGURATION_KEY, CONFIGURATION_VALUE, CONFIGURATION_DESCRIPTION, CONFIGURATION_GROUP_ID, SORT_ORDER, LAST_MODIFIED, DATE_ADDED, USE_FUNCTION, SET_FUNCTION"; + } + + // =================================================================================== + // Type Name + // ========= + /** + * This method implements the method that is declared at super. + * + * @return The type-name of entity. (NotNull) + */ + public String getEntityTypeName() { + return "jp.sf.pal.pompei.exentity.Configuration"; + } + + /** + * This method implements the method that is declared at super. + * + * @return The type-name of condition-bean. (NotNull) + */ + public String getConditionBeanTypeName() { + return "jp.sf.pal.pompei.cbean.bs.ConfigurationCB"; + } + + /** + * This method implements the method that is declared at super. + * + * @return The type-name of dao. (NotNull) + */ + public String getDaoTypeName() { + return "jp.sf.pal.pompei.exdao.ConfigurationDao"; + } + + /** + * This method implements the method that is declared at super. + * + * @return The type-name of behavior. (NotNull) + */ + public String getBehaviorTypeName() { + return "jp.sf.pal.pompei.exbhv.ConfigurationBhv"; + } + + // =================================================================================== + // Type + // ==== + /** + * This method implements the method that is declared at super. + * + * @return The type of entity. (NotNull) + */ + public Class getEntityType() { + return ENTITY_TYPE; + } + + // =================================================================================== + // Instance + // ======== + /** + * This method implements the method that is declared at super. + * + * @return The type of entity. (NotNull) + */ + public Entity newEntity() { + return newMyEntity(); + } + + /** + * New the instance of my entity. + * + * @return The instance of my entity. (NotNull) + */ + public Configuration newMyEntity() { + return new Configuration(); + } + + // =================================================================================== + // Foreign DBMeta + // ============== + /** + * This method implements the method that is declared at super. + * + * @param foreignPropertyName Foreign-property-name(Both OK - InitCap or not). (NotNull) + * @return Foreign DBMeta. (NotNull) + */ + public DBMeta getForeignDBMeta(String foreignPropertyName) { + assertStringNotNullAndNotTrimmedEmpty("foreignPropertyName", foreignPropertyName); + final String methodName = "getForeignDBMeta_" + foreignPropertyName.substring(0, 1) + foreignPropertyName.substring(1); + + java.lang.reflect.Method method = null; + try { + method = this.getClass().getMethod(methodName, new Class[]{}); + } catch (NoSuchMethodException e) { + String msg = "The foreignPropertyName is not found: foreignPropertyName=" + foreignPropertyName; + msg = msg + " tableName=" + TABLE_DB_NAME + " methodName=" + methodName; + throw new RuntimeException(msg, e); + } + try { + return (DBMeta)method.invoke(this, new Object[]{}); + } catch (IllegalAccessException e) { + throw new RuntimeException(e); + } catch (java.lang.reflect.InvocationTargetException e) { + throw new RuntimeException(e.getCause()); + } + } + + // =================================================================================== + // Determination + // ============= + /** + * This method implements the method that is declared at super. + * + * @return Determination. + */ + public boolean hasTwoOrMorePrimaryKeys() { + return false; + } + + /** + * This method implements the method that is declared at super. + * + * @return Determination. + */ + public boolean hasCommonColumn() { + return false; + } + + // =================================================================================== + // Entity Handling + // =============== + // ----------------------------------------------------- + // Accept + // ------ + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @param primaryKeyMap Primary key map. (NotNull and NotEmpty) + */ + public void acceptPrimaryKeyMap(Entity entity, java.util.Map primaryKeyMap) { + final Configuration myEntity = (Configuration)entity; + MapAssertUtil.assertPrimaryKeyMapNotNullAndNotEmpty(primaryKeyMap); + final MapStringValueAnalyzer analyzer = new MapStringValueAnalyzer(primaryKeyMap, entity.getModifiedPropertyNames()); + + MapAssertUtil.assertColumnExistingInPrimaryKeyMap(primaryKeyMap, "CONFIGURATION_ID"); + if (analyzer.init("CONFIGURATION_ID", "configurationId", "configurationId")) { myEntity.setConfigurationId(analyzer.analyzeNumber(java.math.BigDecimal.class)); }; + + + } + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @param primaryKeyMapString Primary-key map-string. (NotNull and NotEmpty) + */ + public void acceptPrimaryKeyMapString(Entity entity, String primaryKeyMapString) { + MapStringUtil.acceptPrimaryKeyMapString(primaryKeyMapString, entity); + } + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @param columnValueMap Column-value map. (NotNull and NotEmpty) + */ + public void acceptColumnValueMap(Entity entity, java.util.Map columnValueMap) { + final Configuration myEntity = (Configuration)entity; + MapAssertUtil.assertColumnValueMapNotNullAndNotEmpty(columnValueMap); + final MapStringValueAnalyzer analyzer = new MapStringValueAnalyzer(columnValueMap, entity.getModifiedPropertyNames()); + + if (analyzer.init("CONFIGURATION_ID", "configurationId", "configurationId")) { myEntity.setConfigurationId(analyzer.analyzeNumber(java.math.BigDecimal.class)); }; + if (analyzer.init("CONFIGURATION_TITLE", "configurationTitle", "configurationTitle")) { myEntity.setConfigurationTitle(analyzer.analyzeString(String.class)); }; + if (analyzer.init("CONFIGURATION_KEY", "configurationKey", "configurationKey")) { myEntity.setConfigurationKey(analyzer.analyzeString(String.class)); }; + if (analyzer.init("CONFIGURATION_VALUE", "configurationValue", "configurationValue")) { myEntity.setConfigurationValue(analyzer.analyzeString(String.class)); }; + if (analyzer.init("CONFIGURATION_DESCRIPTION", "configurationDescription", "configurationDescription")) { myEntity.setConfigurationDescription(analyzer.analyzeString(String.class)); }; + if (analyzer.init("CONFIGURATION_GROUP_ID", "configurationGroupId", "configurationGroupId")) { myEntity.setConfigurationGroupId(analyzer.analyzeNumber(java.math.BigDecimal.class)); }; + if (analyzer.init("SORT_ORDER", "sortOrder", "sortOrder")) { myEntity.setSortOrder(analyzer.analyzeNumber(java.math.BigDecimal.class)); }; + if (analyzer.init("LAST_MODIFIED", "lastModified", "lastModified")) { myEntity.setLastModified(analyzer.analyzeDate(java.sql.Timestamp.class)); }; + if (analyzer.init("DATE_ADDED", "dateAdded", "dateAdded")) { myEntity.setDateAdded(analyzer.analyzeDate(java.sql.Timestamp.class)); }; + if (analyzer.init("USE_FUNCTION", "useFunction", "useFunction")) { myEntity.setUseFunction(analyzer.analyzeString(String.class)); }; + if (analyzer.init("SET_FUNCTION", "setFunction", "setFunction")) { myEntity.setSetFunction(analyzer.analyzeString(String.class)); }; + + } + + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @param columnValueMapString Column-value map-string. (NotNull and NotEmpty) + */ + public void acceptColumnValueMapString(Entity entity, String columnValueMapString) { + MapStringUtil.acceptColumnValueMapString(columnValueMapString, entity); + } + + + // ----------------------------------------------------- + // Extract + // ------- + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @return Primary-key map-string. (NotNull) + */ + public String extractPrimaryKeyMapString(Entity entity) { + return MapStringUtil.extractPrimaryKeyMapString(entity); + } + + /** + * Extract primary-key map-string. + * + * @param entity Target entity. (NotNull) + * @param startBrace Start-brace. (NotNull) + * @param endBrace End-brace. (NotNull) + * @param delimiter Delimiter. (NotNull) + * @param equal Equal. (NotNull) + * @return Primary-key map-string. (NotNull) + */ + public String extractPrimaryKeyMapString(Entity entity, String startBrace, String endBrace, String delimiter, String equal) { + final Configuration myEntity = (Configuration)entity; + final String mapMarkAndStartBrace = MAP_STRING_MAP_MARK + startBrace; + final StringBuffer sb = new StringBuffer(); + helpAppendingColumnValueString(sb, delimiter, equal, "CONFIGURATION_ID", myEntity.getConfigurationId()); + + sb.delete(0, delimiter.length()).insert(0, mapMarkAndStartBrace).append(endBrace); + return sb.toString(); + + } + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @return Column-value map-string. (NotNull) + */ + public String extractColumnValueMapString(Entity entity) { + return MapStringUtil.extractColumnValueMapString(entity); + } + + /** + * Extract column-value map-string. + * + * @param entity Target entity. (NotNull) + * @param startBrace Start-brace. (NotNull) + * @param endBrace End-brace. (NotNull) + * @param delimiter Delimiter. (NotNull) + * @param equal Equal. (NotNull) + * @return Column-value map-string. (NotNull) + */ + public String extractColumnValueMapString(Entity entity, String startBrace, String endBrace, String delimiter, String equal) { + final Configuration myEntity = (Configuration)entity; + final String mapMarkAndStartBrace = MAP_STRING_MAP_MARK + startBrace; + final StringBuffer sb = new StringBuffer(); + helpAppendingColumnValueString(sb, delimiter, equal, "CONFIGURATION_ID", myEntity.getConfigurationId()); + helpAppendingColumnValueString(sb, delimiter, equal, "CONFIGURATION_TITLE", myEntity.getConfigurationTitle()); + helpAppendingColumnValueString(sb, delimiter, equal, "CONFIGURATION_KEY", myEntity.getConfigurationKey()); + helpAppendingColumnValueString(sb, delimiter, equal, "CONFIGURATION_VALUE", myEntity.getConfigurationValue()); + helpAppendingColumnValueString(sb, delimiter, equal, "CONFIGURATION_DESCRIPTION", myEntity.getConfigurationDescription()); + helpAppendingColumnValueString(sb, delimiter, equal, "CONFIGURATION_GROUP_ID", myEntity.getConfigurationGroupId()); + helpAppendingColumnValueString(sb, delimiter, equal, "SORT_ORDER", myEntity.getSortOrder()); + helpAppendingColumnValueString(sb, delimiter, equal, "LAST_MODIFIED", myEntity.getLastModified()); + helpAppendingColumnValueString(sb, delimiter, equal, "DATE_ADDED", myEntity.getDateAdded()); + helpAppendingColumnValueString(sb, delimiter, equal, "USE_FUNCTION", myEntity.getUseFunction()); + helpAppendingColumnValueString(sb, delimiter, equal, "SET_FUNCTION", myEntity.getSetFunction()); + + sb.delete(0, delimiter.length()).insert(0, mapMarkAndStartBrace).append(endBrace); + return sb.toString(); + } + + private void helpAppendingColumnValueString(StringBuffer sb, String delimiter, String equal, String colName, Object value) { + sb.append(delimiter).append(colName).append(equal); + sb.append(helpGettingColumnStringValue(value)); + } + + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @return Column-value map-string. (NotNull) + */ + public String extractCommonColumnValueMapString(Entity entity) { + return "map:{}"; + } + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @return Column-value map-string. (NotNull) + */ + public String extractCommonColumnValueMapString(Entity entity, String startBrace, String endBrace, String delimiter, String equal) { + return "map:" + startBrace + endBrace; + } + + + // ----------------------------------------------------- + // Convert + // ------- + public java.util.List convertToColumnValueList(Entity entity) { + return new java.util.ArrayList(convertToColumnValueMap(entity).values()); + } + + public java.util.Map convertToColumnValueMap(Entity entity) { + final Configuration myEntity = downcast(entity); + final java.util.Map valueMap = new java.util.LinkedHashMap(); + valueMap.put("CONFIGURATION_ID", myEntity.getConfigurationId()); + valueMap.put("CONFIGURATION_TITLE", myEntity.getConfigurationTitle()); + valueMap.put("CONFIGURATION_KEY", myEntity.getConfigurationKey()); + valueMap.put("CONFIGURATION_VALUE", myEntity.getConfigurationValue()); + valueMap.put("CONFIGURATION_DESCRIPTION", myEntity.getConfigurationDescription()); + valueMap.put("CONFIGURATION_GROUP_ID", myEntity.getConfigurationGroupId()); + valueMap.put("SORT_ORDER", myEntity.getSortOrder()); + valueMap.put("LAST_MODIFIED", myEntity.getLastModified()); + valueMap.put("DATE_ADDED", myEntity.getDateAdded()); + valueMap.put("USE_FUNCTION", myEntity.getUseFunction()); + valueMap.put("SET_FUNCTION", myEntity.getSetFunction()); + return valueMap; + } + + public java.util.List convertToColumnStringValueList(Entity entity) { + return new java.util.ArrayList(convertToColumnStringValueMap(entity).values()); + } + + public java.util.Map convertToColumnStringValueMap(Entity entity) { + final Configuration myEntity = downcast(entity); + final java.util.Map valueMap = new java.util.LinkedHashMap(); + valueMap.put("CONFIGURATION_ID", helpGettingColumnStringValue(myEntity.getConfigurationId())); + valueMap.put("CONFIGURATION_TITLE", helpGettingColumnStringValue(myEntity.getConfigurationTitle())); + valueMap.put("CONFIGURATION_KEY", helpGettingColumnStringValue(myEntity.getConfigurationKey())); + valueMap.put("CONFIGURATION_VALUE", helpGettingColumnStringValue(myEntity.getConfigurationValue())); + valueMap.put("CONFIGURATION_DESCRIPTION", helpGettingColumnStringValue(myEntity.getConfigurationDescription())); + valueMap.put("CONFIGURATION_GROUP_ID", helpGettingColumnStringValue(myEntity.getConfigurationGroupId())); + valueMap.put("SORT_ORDER", helpGettingColumnStringValue(myEntity.getSortOrder())); + valueMap.put("LAST_MODIFIED", helpGettingColumnStringValue(myEntity.getLastModified())); + valueMap.put("DATE_ADDED", helpGettingColumnStringValue(myEntity.getDateAdded())); + valueMap.put("USE_FUNCTION", helpGettingColumnStringValue(myEntity.getUseFunction())); + valueMap.put("SET_FUNCTION", helpGettingColumnStringValue(myEntity.getSetFunction())); + return valueMap; + } + + // =================================================================================== + // JDBC Support + // ============ + public String getPreparedInsertClause() { + return "insert into CONFIGURATION(CONFIGURATION_ID, CONFIGURATION_TITLE, CONFIGURATION_KEY, CONFIGURATION_VALUE, CONFIGURATION_DESCRIPTION, CONFIGURATION_GROUP_ID, SORT_ORDER, LAST_MODIFIED, DATE_ADDED, USE_FUNCTION, SET_FUNCTION) values(? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? )"; + } + + public String getPreparedInsertClause(String tablePrefix) { + return "insert into " + tablePrefix + "CONFIGURATION(CONFIGURATION_ID, CONFIGURATION_TITLE, CONFIGURATION_KEY, CONFIGURATION_VALUE, CONFIGURATION_DESCRIPTION, CONFIGURATION_GROUP_ID, SORT_ORDER, LAST_MODIFIED, DATE_ADDED, USE_FUNCTION, SET_FUNCTION) values(? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? )"; + } + + // =================================================================================== + // Helper + // ====== + protected Configuration downcast(Entity entity) { + assertObjectNotNull("entity", entity); + try { + return (Configuration)entity; + } catch (ClassCastException e) { + String msg = "The entity should be Configuration but it was: " + entity.getClass(); + throw new IllegalStateException(msg, e); + } + } + + protected void checkDowncast(Entity entity) { + downcast(entity); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/dbmeta/ConfigurationGroupDbm.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/dbmeta/ConfigurationGroupDbm.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/dbmeta/ConfigurationGroupDbm.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,704 @@ +package jp.sf.pal.pompei.bsentity.dbmeta; + + +import jp.sf.pal.pompei.allcommon.Entity; +import jp.sf.pal.pompei.allcommon.dbmeta.DBMeta; +import jp.sf.pal.pompei.allcommon.dbmeta.AbstractDBMeta; +import jp.sf.pal.pompei.exentity.ConfigurationGroup; + +/** + * The dbmeta of CONFIGURATION_GROUP. (Singleton) + * + *
+ * [primary-key]
+ *     CONFIGURATION_GROUP_ID
+ * 
+ * [column-property]
+ *     CONFIGURATION_GROUP_ID, CONFIGURATION_GROUP_TITLE, CONFIGURATION_GROUP_DESCRIPTION, SORT_ORDER, VISIBLE
+ * 
+ * [foreign-property]
+ *     
+ * 
+ * [refferer-property]
+ *     
+ * 
+ * [sequence]
+ *     
+ * 
+ * [identity]
+ *     
+ * 
+ * [update-date]
+ *     
+ * 
+ * [version-no]
+ *     
+ * 
+ * 
+ * + * @author DBFlute(AutoGenerator) + */ +public class ConfigurationGroupDbm extends AbstractDBMeta { + + // =================================================================================== + // Definition + // ========== + /** The type of entity. */ + protected static final Class ENTITY_TYPE = ConfigurationGroup.class; + + /** Singleton instance. */ + private static final ConfigurationGroupDbm _instance = new ConfigurationGroupDbm(); + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + private ConfigurationGroupDbm() { + } + + // =================================================================================== + // Singleton + // ========= + /** + * Get instance. + * + * @return Singleton instance. (NotNull) + */ + public static ConfigurationGroupDbm getInstance() { + return _instance; + } + + // =================================================================================== + // Name Definition + // =============== + /** Table db name. */ + public static final String TABLE_DB_NAME = "CONFIGURATION_GROUP"; + + /** Table cap-prop name. */ + public static final String TABLE_CAP_PROP_NAME = "ConfigurationGroup"; + + /** Table uncap-prop name. */ + public static final String TABLE_UNCAP_PROP_NAME = "configurationGroup"; + + /** Db-name of ConfigurationGroupId. */ + public static final String COLUMN_DB_NAME_OF_ConfigurationGroupId = "CONFIGURATION_GROUP_ID"; + /** Db-name of ConfigurationGroupTitle. */ + public static final String COLUMN_DB_NAME_OF_ConfigurationGroupTitle = "CONFIGURATION_GROUP_TITLE"; + /** Db-name of ConfigurationGroupDescription. */ + public static final String COLUMN_DB_NAME_OF_ConfigurationGroupDescription = "CONFIGURATION_GROUP_DESCRIPTION"; + /** Db-name of SortOrder. */ + public static final String COLUMN_DB_NAME_OF_SortOrder = "SORT_ORDER"; + /** Db-name of Visible. */ + public static final String COLUMN_DB_NAME_OF_Visible = "VISIBLE"; + + /** Cap-prop-name of ConfigurationGroupId. */ + public static final String COLUMN_CAP_PROP_NAME_OF_ConfigurationGroupId = "ConfigurationGroupId"; + /** Cap-prop-name of ConfigurationGroupTitle. */ + public static final String COLUMN_CAP_PROP_NAME_OF_ConfigurationGroupTitle = "ConfigurationGroupTitle"; + /** Cap-prop-name of ConfigurationGroupDescription. */ + public static final String COLUMN_CAP_PROP_NAME_OF_ConfigurationGroupDescription = "ConfigurationGroupDescription"; + /** Cap-prop-name of SortOrder. */ + public static final String COLUMN_CAP_PROP_NAME_OF_SortOrder = "SortOrder"; + /** Cap-prop-name of Visible. */ + public static final String COLUMN_CAP_PROP_NAME_OF_Visible = "Visible"; + + + + /** Uncap-prop-name of ConfigurationGroupId. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_ConfigurationGroupId = "configurationGroupId"; + /** Uncap-prop-name of ConfigurationGroupTitle. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_ConfigurationGroupTitle = "configurationGroupTitle"; + /** Uncap-prop-name of ConfigurationGroupDescription. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_ConfigurationGroupDescription = "configurationGroupDescription"; + /** Uncap-prop-name of SortOrder. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_SortOrder = "sortOrder"; + /** Uncap-prop-name of Visible. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_Visible = "visible"; + + + + /** {db-name : cap-prop-name} map. */ + private static java.util.Map _dbNameCapPropNameMap; + protected static java.util.Map createDbNameCapPropNameMap() { + if (_dbNameCapPropNameMap != null) { + return _dbNameCapPropNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_DB_NAME, TABLE_CAP_PROP_NAME); + + map.put(COLUMN_DB_NAME_OF_ConfigurationGroupId, COLUMN_CAP_PROP_NAME_OF_ConfigurationGroupId); + map.put(COLUMN_DB_NAME_OF_ConfigurationGroupTitle, COLUMN_CAP_PROP_NAME_OF_ConfigurationGroupTitle); + map.put(COLUMN_DB_NAME_OF_ConfigurationGroupDescription, COLUMN_CAP_PROP_NAME_OF_ConfigurationGroupDescription); + map.put(COLUMN_DB_NAME_OF_SortOrder, COLUMN_CAP_PROP_NAME_OF_SortOrder); + map.put(COLUMN_DB_NAME_OF_Visible, COLUMN_CAP_PROP_NAME_OF_Visible); + + _dbNameCapPropNameMap = java.util.Collections.unmodifiableMap(map); + return _dbNameCapPropNameMap; + } + + /** {db-name : uncap-prop-name} map. */ + private static java.util.Map _dbNameUncapPropNameMap; + protected static java.util.Map createDbNameUncapPropNameMap() { + if (_dbNameUncapPropNameMap != null) { + return _dbNameUncapPropNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_DB_NAME, TABLE_UNCAP_PROP_NAME); + + map.put(COLUMN_DB_NAME_OF_ConfigurationGroupId, COLUMN_UNCAP_PROP_NAME_OF_ConfigurationGroupId); + map.put(COLUMN_DB_NAME_OF_ConfigurationGroupTitle, COLUMN_UNCAP_PROP_NAME_OF_ConfigurationGroupTitle); + map.put(COLUMN_DB_NAME_OF_ConfigurationGroupDescription, COLUMN_UNCAP_PROP_NAME_OF_ConfigurationGroupDescription); + map.put(COLUMN_DB_NAME_OF_SortOrder, COLUMN_UNCAP_PROP_NAME_OF_SortOrder); + map.put(COLUMN_DB_NAME_OF_Visible, COLUMN_UNCAP_PROP_NAME_OF_Visible); + + _dbNameUncapPropNameMap = java.util.Collections.unmodifiableMap(map); + return _dbNameUncapPropNameMap; + } + + /** {cap-prop-name : db-name} map. */ + private static java.util.Map _capPropNameDbNameMap; + protected static java.util.Map createCapPropNameDbNameMap() { + if (_capPropNameDbNameMap != null) { + return _capPropNameDbNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_CAP_PROP_NAME, TABLE_DB_NAME); + + map.put(COLUMN_CAP_PROP_NAME_OF_ConfigurationGroupId, COLUMN_DB_NAME_OF_ConfigurationGroupId); + map.put(COLUMN_CAP_PROP_NAME_OF_ConfigurationGroupTitle, COLUMN_DB_NAME_OF_ConfigurationGroupTitle); + map.put(COLUMN_CAP_PROP_NAME_OF_ConfigurationGroupDescription, COLUMN_DB_NAME_OF_ConfigurationGroupDescription); + map.put(COLUMN_CAP_PROP_NAME_OF_SortOrder, COLUMN_DB_NAME_OF_SortOrder); + map.put(COLUMN_CAP_PROP_NAME_OF_Visible, COLUMN_DB_NAME_OF_Visible); + + _capPropNameDbNameMap = java.util.Collections.unmodifiableMap(map); + return _capPropNameDbNameMap; + } + + /** {cap-prop-name : uncap-prop-name} map. */ + private static java.util.Map _capPropNameUncapPropNameMap; + protected static java.util.Map createCapPropNameUncapPropNameMap() { + if (_capPropNameUncapPropNameMap != null) { + return _capPropNameUncapPropNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_CAP_PROP_NAME, TABLE_UNCAP_PROP_NAME); + + map.put(COLUMN_CAP_PROP_NAME_OF_ConfigurationGroupId, COLUMN_UNCAP_PROP_NAME_OF_ConfigurationGroupId); + map.put(COLUMN_CAP_PROP_NAME_OF_ConfigurationGroupTitle, COLUMN_UNCAP_PROP_NAME_OF_ConfigurationGroupTitle); + map.put(COLUMN_CAP_PROP_NAME_OF_ConfigurationGroupDescription, COLUMN_UNCAP_PROP_NAME_OF_ConfigurationGroupDescription); + map.put(COLUMN_CAP_PROP_NAME_OF_SortOrder, COLUMN_UNCAP_PROP_NAME_OF_SortOrder); + map.put(COLUMN_CAP_PROP_NAME_OF_Visible, COLUMN_UNCAP_PROP_NAME_OF_Visible); + + _capPropNameUncapPropNameMap = java.util.Collections.unmodifiableMap(map); + return _capPropNameUncapPropNameMap; + } + + /** {uncap-prop-name : db-name} map. */ + private static java.util.Map _uncapPropNameDbNameMap; + protected static java.util.Map createUncapPropNameDbNameMap() { + if (_uncapPropNameDbNameMap != null) { + return _uncapPropNameDbNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_UNCAP_PROP_NAME, TABLE_DB_NAME); + + map.put(COLUMN_UNCAP_PROP_NAME_OF_ConfigurationGroupId, COLUMN_DB_NAME_OF_ConfigurationGroupId); + map.put(COLUMN_UNCAP_PROP_NAME_OF_ConfigurationGroupTitle, COLUMN_DB_NAME_OF_ConfigurationGroupTitle); + map.put(COLUMN_UNCAP_PROP_NAME_OF_ConfigurationGroupDescription, COLUMN_DB_NAME_OF_ConfigurationGroupDescription); + map.put(COLUMN_UNCAP_PROP_NAME_OF_SortOrder, COLUMN_DB_NAME_OF_SortOrder); + map.put(COLUMN_UNCAP_PROP_NAME_OF_Visible, COLUMN_DB_NAME_OF_Visible); + + _uncapPropNameDbNameMap = java.util.Collections.unmodifiableMap(map); + return _uncapPropNameDbNameMap; + } + + /** {uncap-prop-name : cap-prop-name} map. */ + private static java.util.Map _uncapPropNameCapPropNameMap; + protected static java.util.Map createUncapPropNameCapPropNameMap() { + if (_uncapPropNameCapPropNameMap != null) { + return _uncapPropNameCapPropNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_UNCAP_PROP_NAME, TABLE_CAP_PROP_NAME); + + map.put(COLUMN_UNCAP_PROP_NAME_OF_ConfigurationGroupId, COLUMN_CAP_PROP_NAME_OF_ConfigurationGroupId); + map.put(COLUMN_UNCAP_PROP_NAME_OF_ConfigurationGroupTitle, COLUMN_CAP_PROP_NAME_OF_ConfigurationGroupTitle); + map.put(COLUMN_UNCAP_PROP_NAME_OF_ConfigurationGroupDescription, COLUMN_CAP_PROP_NAME_OF_ConfigurationGroupDescription); + map.put(COLUMN_UNCAP_PROP_NAME_OF_SortOrder, COLUMN_CAP_PROP_NAME_OF_SortOrder); + map.put(COLUMN_UNCAP_PROP_NAME_OF_Visible, COLUMN_CAP_PROP_NAME_OF_Visible); + + _uncapPropNameCapPropNameMap = java.util.Collections.unmodifiableMap(map); + return _uncapPropNameCapPropNameMap; + } + + // =================================================================================== + // Name-Map + // ======== + /** + * This method implements the method that is declared at super. + * + * @return {db-name : cap-prop-name} map. + */ + public java.util.Map getDbNameCapPropNameMap() { + return createDbNameCapPropNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {db-name : uncap-prop-name} map. + */ + public java.util.Map getDbNameUncapPropNameMap() { + return createDbNameUncapPropNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {cap-prop-name : db-name} map. + */ + public java.util.Map getCapPropNameDbNameMap() { + return createCapPropNameDbNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {cap-prop-name : uncap-prop-name} map. + */ + public java.util.Map getCapPropNameUncapPropNameMap() { + return createCapPropNameUncapPropNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {uncap-prop-name : db-name} map. + */ + public java.util.Map getUncapPropNameDbNameMap() { + return createUncapPropNameDbNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {uncap-prop-name : cap-prop-name} map. + */ + public java.util.Map getUncapPropNameCapPropNameMap() { + return createUncapPropNameCapPropNameMap(); + } + + // =================================================================================== + // Table Name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + public String getTableDbName() { + return TABLE_DB_NAME; + } + + /** + * This method implements the method that is declared at super. + * + * @return Table cap-prop-name. (NotNull) + */ + public String getTableCapPropName() { + return TABLE_CAP_PROP_NAME; + } + + /** + * This method implements the method that is declared at super. + * + * @return Table property-name. (NotNull) + */ + public String getTableUncapPropName() { + return TABLE_UNCAP_PROP_NAME; + } + + // =================================================================================== + // Column Name + // =========== + public java.util.List getColumnDbNameList() { + final String[] columns = getColumnDbNameCommaString().split(","); + final java.util.List resultList = new java.util.ArrayList(); + for (int i=0; i < columns.length; i++) { + resultList.add(columns[i].trim()); + } + return resultList; + } + + public java.util.List getColumnCapPropNameList() { + final java.util.List columnDbNameList = getColumnDbNameList(); + final java.util.List resultList = new java.util.ArrayList(); + for (final java.util.Iterator ite = columnDbNameList.iterator(); ite.hasNext(); ) { + resultList.add(getDbNameCapPropNameMap().get((String)ite.next())); + } + return resultList; + } + + public java.util.List getColumnUncapPropNameList() { + final java.util.List columnDbNameList = getColumnDbNameList(); + final java.util.List resultList = new java.util.ArrayList(); + for (final java.util.Iterator ite = columnDbNameList.iterator(); ite.hasNext(); ) { + resultList.add(getDbNameUncapPropNameMap().get((String)ite.next())); + } + return resultList; + } + + /** + * This method implements the method that is declared at super. + * + * @return Column-db-name comma-string. (NotNull) + */ + public String getColumnDbNameCommaString() { + return "CONFIGURATION_GROUP_ID, CONFIGURATION_GROUP_TITLE, CONFIGURATION_GROUP_DESCRIPTION, SORT_ORDER, VISIBLE"; + } + + // =================================================================================== + // Type Name + // ========= + /** + * This method implements the method that is declared at super. + * + * @return The type-name of entity. (NotNull) + */ + public String getEntityTypeName() { + return "jp.sf.pal.pompei.exentity.ConfigurationGroup"; + } + + /** + * This method implements the method that is declared at super. + * + * @return The type-name of condition-bean. (NotNull) + */ + public String getConditionBeanTypeName() { + return "jp.sf.pal.pompei.cbean.bs.ConfigurationGroupCB"; + } + + /** + * This method implements the method that is declared at super. + * + * @return The type-name of dao. (NotNull) + */ + public String getDaoTypeName() { + return "jp.sf.pal.pompei.exdao.ConfigurationGroupDao"; + } + + /** + * This method implements the method that is declared at super. + * + * @return The type-name of behavior. (NotNull) + */ + public String getBehaviorTypeName() { + return "jp.sf.pal.pompei.exbhv.ConfigurationGroupBhv"; + } + + // =================================================================================== + // Type + // ==== + /** + * This method implements the method that is declared at super. + * + * @return The type of entity. (NotNull) + */ + public Class getEntityType() { + return ENTITY_TYPE; + } + + // =================================================================================== + // Instance + // ======== + /** + * This method implements the method that is declared at super. + * + * @return The type of entity. (NotNull) + */ + public Entity newEntity() { + return newMyEntity(); + } + + /** + * New the instance of my entity. + * + * @return The instance of my entity. (NotNull) + */ + public ConfigurationGroup newMyEntity() { + return new ConfigurationGroup(); + } + + // =================================================================================== + // Foreign DBMeta + // ============== + /** + * This method implements the method that is declared at super. + * + * @param foreignPropertyName Foreign-property-name(Both OK - InitCap or not). (NotNull) + * @return Foreign DBMeta. (NotNull) + */ + public DBMeta getForeignDBMeta(String foreignPropertyName) { + assertStringNotNullAndNotTrimmedEmpty("foreignPropertyName", foreignPropertyName); + final String methodName = "getForeignDBMeta_" + foreignPropertyName.substring(0, 1) + foreignPropertyName.substring(1); + + java.lang.reflect.Method method = null; + try { + method = this.getClass().getMethod(methodName, new Class[]{}); + } catch (NoSuchMethodException e) { + String msg = "The foreignPropertyName is not found: foreignPropertyName=" + foreignPropertyName; + msg = msg + " tableName=" + TABLE_DB_NAME + " methodName=" + methodName; + throw new RuntimeException(msg, e); + } + try { + return (DBMeta)method.invoke(this, new Object[]{}); + } catch (IllegalAccessException e) { + throw new RuntimeException(e); + } catch (java.lang.reflect.InvocationTargetException e) { + throw new RuntimeException(e.getCause()); + } + } + + // =================================================================================== + // Determination + // ============= + /** + * This method implements the method that is declared at super. + * + * @return Determination. + */ + public boolean hasTwoOrMorePrimaryKeys() { + return false; + } + + /** + * This method implements the method that is declared at super. + * + * @return Determination. + */ + public boolean hasCommonColumn() { + return false; + } + + // =================================================================================== + // Entity Handling + // =============== + // ----------------------------------------------------- + // Accept + // ------ + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @param primaryKeyMap Primary key map. (NotNull and NotEmpty) + */ + public void acceptPrimaryKeyMap(Entity entity, java.util.Map primaryKeyMap) { + final ConfigurationGroup myEntity = (ConfigurationGroup)entity; + MapAssertUtil.assertPrimaryKeyMapNotNullAndNotEmpty(primaryKeyMap); + final MapStringValueAnalyzer analyzer = new MapStringValueAnalyzer(primaryKeyMap, entity.getModifiedPropertyNames()); + + MapAssertUtil.assertColumnExistingInPrimaryKeyMap(primaryKeyMap, "CONFIGURATION_GROUP_ID"); + if (analyzer.init("CONFIGURATION_GROUP_ID", "configurationGroupId", "configurationGroupId")) { myEntity.setConfigurationGroupId(analyzer.analyzeNumber(java.math.BigDecimal.class)); }; + + + } + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @param primaryKeyMapString Primary-key map-string. (NotNull and NotEmpty) + */ + public void acceptPrimaryKeyMapString(Entity entity, String primaryKeyMapString) { + MapStringUtil.acceptPrimaryKeyMapString(primaryKeyMapString, entity); + } + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @param columnValueMap Column-value map. (NotNull and NotEmpty) + */ + public void acceptColumnValueMap(Entity entity, java.util.Map columnValueMap) { + final ConfigurationGroup myEntity = (ConfigurationGroup)entity; + MapAssertUtil.assertColumnValueMapNotNullAndNotEmpty(columnValueMap); + final MapStringValueAnalyzer analyzer = new MapStringValueAnalyzer(columnValueMap, entity.getModifiedPropertyNames()); + + if (analyzer.init("CONFIGURATION_GROUP_ID", "configurationGroupId", "configurationGroupId")) { myEntity.setConfigurationGroupId(analyzer.analyzeNumber(java.math.BigDecimal.class)); }; + if (analyzer.init("CONFIGURATION_GROUP_TITLE", "configurationGroupTitle", "configurationGroupTitle")) { myEntity.setConfigurationGroupTitle(analyzer.analyzeString(String.class)); }; + if (analyzer.init("CONFIGURATION_GROUP_DESCRIPTION", "configurationGroupDescription", "configurationGroupDescription")) { myEntity.setConfigurationGroupDescription(analyzer.analyzeString(String.class)); }; + if (analyzer.init("SORT_ORDER", "sortOrder", "sortOrder")) { myEntity.setSortOrder(analyzer.analyzeNumber(java.math.BigDecimal.class)); }; + if (analyzer.init("VISIBLE", "visible", "visible")) { myEntity.setVisible(analyzer.analyzeNumber(java.math.BigDecimal.class)); }; + + } + + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @param columnValueMapString Column-value map-string. (NotNull and NotEmpty) + */ + public void acceptColumnValueMapString(Entity entity, String columnValueMapString) { + MapStringUtil.acceptColumnValueMapString(columnValueMapString, entity); + } + + + // ----------------------------------------------------- + // Extract + // ------- + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @return Primary-key map-string. (NotNull) + */ + public String extractPrimaryKeyMapString(Entity entity) { + return MapStringUtil.extractPrimaryKeyMapString(entity); + } + + /** + * Extract primary-key map-string. + * + * @param entity Target entity. (NotNull) + * @param startBrace Start-brace. (NotNull) + * @param endBrace End-brace. (NotNull) + * @param delimiter Delimiter. (NotNull) + * @param equal Equal. (NotNull) + * @return Primary-key map-string. (NotNull) + */ + public String extractPrimaryKeyMapString(Entity entity, String startBrace, String endBrace, String delimiter, String equal) { + final ConfigurationGroup myEntity = (ConfigurationGroup)entity; + final String mapMarkAndStartBrace = MAP_STRING_MAP_MARK + startBrace; + final StringBuffer sb = new StringBuffer(); + helpAppendingColumnValueString(sb, delimiter, equal, "CONFIGURATION_GROUP_ID", myEntity.getConfigurationGroupId()); + + sb.delete(0, delimiter.length()).insert(0, mapMarkAndStartBrace).append(endBrace); + return sb.toString(); + + } + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @return Column-value map-string. (NotNull) + */ + public String extractColumnValueMapString(Entity entity) { + return MapStringUtil.extractColumnValueMapString(entity); + } + + /** + * Extract column-value map-string. + * + * @param entity Target entity. (NotNull) + * @param startBrace Start-brace. (NotNull) + * @param endBrace End-brace. (NotNull) + * @param delimiter Delimiter. (NotNull) + * @param equal Equal. (NotNull) + * @return Column-value map-string. (NotNull) + */ + public String extractColumnValueMapString(Entity entity, String startBrace, String endBrace, String delimiter, String equal) { + final ConfigurationGroup myEntity = (ConfigurationGroup)entity; + final String mapMarkAndStartBrace = MAP_STRING_MAP_MARK + startBrace; + final StringBuffer sb = new StringBuffer(); + helpAppendingColumnValueString(sb, delimiter, equal, "CONFIGURATION_GROUP_ID", myEntity.getConfigurationGroupId()); + helpAppendingColumnValueString(sb, delimiter, equal, "CONFIGURATION_GROUP_TITLE", myEntity.getConfigurationGroupTitle()); + helpAppendingColumnValueString(sb, delimiter, equal, "CONFIGURATION_GROUP_DESCRIPTION", myEntity.getConfigurationGroupDescription()); + helpAppendingColumnValueString(sb, delimiter, equal, "SORT_ORDER", myEntity.getSortOrder()); + helpAppendingColumnValueString(sb, delimiter, equal, "VISIBLE", myEntity.getVisible()); + + sb.delete(0, delimiter.length()).insert(0, mapMarkAndStartBrace).append(endBrace); + return sb.toString(); + } + + private void helpAppendingColumnValueString(StringBuffer sb, String delimiter, String equal, String colName, Object value) { + sb.append(delimiter).append(colName).append(equal); + sb.append(helpGettingColumnStringValue(value)); + } + + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @return Column-value map-string. (NotNull) + */ + public String extractCommonColumnValueMapString(Entity entity) { + return "map:{}"; + } + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @return Column-value map-string. (NotNull) + */ + public String extractCommonColumnValueMapString(Entity entity, String startBrace, String endBrace, String delimiter, String equal) { + return "map:" + startBrace + endBrace; + } + + + // ----------------------------------------------------- + // Convert + // ------- + public java.util.List convertToColumnValueList(Entity entity) { + return new java.util.ArrayList(convertToColumnValueMap(entity).values()); + } + + public java.util.Map convertToColumnValueMap(Entity entity) { + final ConfigurationGroup myEntity = downcast(entity); + final java.util.Map valueMap = new java.util.LinkedHashMap(); + valueMap.put("CONFIGURATION_GROUP_ID", myEntity.getConfigurationGroupId()); + valueMap.put("CONFIGURATION_GROUP_TITLE", myEntity.getConfigurationGroupTitle()); + valueMap.put("CONFIGURATION_GROUP_DESCRIPTION", myEntity.getConfigurationGroupDescription()); + valueMap.put("SORT_ORDER", myEntity.getSortOrder()); + valueMap.put("VISIBLE", myEntity.getVisible()); + return valueMap; + } + + public java.util.List convertToColumnStringValueList(Entity entity) { + return new java.util.ArrayList(convertToColumnStringValueMap(entity).values()); + } + + public java.util.Map convertToColumnStringValueMap(Entity entity) { + final ConfigurationGroup myEntity = downcast(entity); + final java.util.Map valueMap = new java.util.LinkedHashMap(); + valueMap.put("CONFIGURATION_GROUP_ID", helpGettingColumnStringValue(myEntity.getConfigurationGroupId())); + valueMap.put("CONFIGURATION_GROUP_TITLE", helpGettingColumnStringValue(myEntity.getConfigurationGroupTitle())); + valueMap.put("CONFIGURATION_GROUP_DESCRIPTION", helpGettingColumnStringValue(myEntity.getConfigurationGroupDescription())); + valueMap.put("SORT_ORDER", helpGettingColumnStringValue(myEntity.getSortOrder())); + valueMap.put("VISIBLE", helpGettingColumnStringValue(myEntity.getVisible())); + return valueMap; + } + + // =================================================================================== + // JDBC Support + // ============ + public String getPreparedInsertClause() { + return "insert into CONFIGURATION_GROUP(CONFIGURATION_GROUP_ID, CONFIGURATION_GROUP_TITLE, CONFIGURATION_GROUP_DESCRIPTION, SORT_ORDER, VISIBLE) values(? , ? , ? , ? , ? )"; + } + + public String getPreparedInsertClause(String tablePrefix) { + return "insert into " + tablePrefix + "CONFIGURATION_GROUP(CONFIGURATION_GROUP_ID, CONFIGURATION_GROUP_TITLE, CONFIGURATION_GROUP_DESCRIPTION, SORT_ORDER, VISIBLE) values(? , ? , ? , ? , ? )"; + } + + // =================================================================================== + // Helper + // ====== + protected ConfigurationGroup downcast(Entity entity) { + assertObjectNotNull("entity", entity); + try { + return (ConfigurationGroup)entity; + } catch (ClassCastException e) { + String msg = "The entity should be ConfigurationGroup but it was: " + entity.getClass(); + throw new IllegalStateException(msg, e); + } + } + + protected void checkDowncast(Entity entity) { + downcast(entity); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/dbmeta/CounterDbm.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/dbmeta/CounterDbm.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/dbmeta/CounterDbm.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,647 @@ +package jp.sf.pal.pompei.bsentity.dbmeta; + + +import jp.sf.pal.pompei.allcommon.Entity; +import jp.sf.pal.pompei.allcommon.dbmeta.DBMeta; +import jp.sf.pal.pompei.allcommon.dbmeta.AbstractDBMeta; +import jp.sf.pal.pompei.exentity.Counter; + +/** + * The dbmeta of COUNTER. (Singleton) + * + *
+ * [primary-key]
+ *     
+ * 
+ * [column-property]
+ *     STARTDATE, COUNTER
+ * 
+ * [foreign-property]
+ *     
+ * 
+ * [refferer-property]
+ *     
+ * 
+ * [sequence]
+ *     
+ * 
+ * [identity]
+ *     
+ * 
+ * [update-date]
+ *     
+ * 
+ * [version-no]
+ *     
+ * 
+ * 
+ * + * @author DBFlute(AutoGenerator) + */ +public class CounterDbm extends AbstractDBMeta { + + // =================================================================================== + // Definition + // ========== + /** The type of entity. */ + protected static final Class ENTITY_TYPE = Counter.class; + + /** Singleton instance. */ + private static final CounterDbm _instance = new CounterDbm(); + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + private CounterDbm() { + } + + // =================================================================================== + // Singleton + // ========= + /** + * Get instance. + * + * @return Singleton instance. (NotNull) + */ + public static CounterDbm getInstance() { + return _instance; + } + + // =================================================================================== + // Name Definition + // =============== + /** Table db name. */ + public static final String TABLE_DB_NAME = "COUNTER"; + + /** Table cap-prop name. */ + public static final String TABLE_CAP_PROP_NAME = "Counter"; + + /** Table uncap-prop name. */ + public static final String TABLE_UNCAP_PROP_NAME = "counter"; + + /** Db-name of Startdate. */ + public static final String COLUMN_DB_NAME_OF_Startdate = "STARTDATE"; + /** Db-name of Counter. */ + public static final String COLUMN_DB_NAME_OF_Counter = "COUNTER"; + + /** Cap-prop-name of Startdate. */ + public static final String COLUMN_CAP_PROP_NAME_OF_Startdate = "Startdate"; + /** Cap-prop-name of Counter. */ + public static final String COLUMN_CAP_PROP_NAME_OF_Counter = "Counter"; + + + + /** Uncap-prop-name of Startdate. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_Startdate = "startdate"; + /** Uncap-prop-name of Counter. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_Counter = "counter"; + + + + /** {db-name : cap-prop-name} map. */ + private static java.util.Map _dbNameCapPropNameMap; + protected static java.util.Map createDbNameCapPropNameMap() { + if (_dbNameCapPropNameMap != null) { + return _dbNameCapPropNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_DB_NAME, TABLE_CAP_PROP_NAME); + + map.put(COLUMN_DB_NAME_OF_Startdate, COLUMN_CAP_PROP_NAME_OF_Startdate); + map.put(COLUMN_DB_NAME_OF_Counter, COLUMN_CAP_PROP_NAME_OF_Counter); + + _dbNameCapPropNameMap = java.util.Collections.unmodifiableMap(map); + return _dbNameCapPropNameMap; + } + + /** {db-name : uncap-prop-name} map. */ + private static java.util.Map _dbNameUncapPropNameMap; + protected static java.util.Map createDbNameUncapPropNameMap() { + if (_dbNameUncapPropNameMap != null) { + return _dbNameUncapPropNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_DB_NAME, TABLE_UNCAP_PROP_NAME); + + map.put(COLUMN_DB_NAME_OF_Startdate, COLUMN_UNCAP_PROP_NAME_OF_Startdate); + map.put(COLUMN_DB_NAME_OF_Counter, COLUMN_UNCAP_PROP_NAME_OF_Counter); + + _dbNameUncapPropNameMap = java.util.Collections.unmodifiableMap(map); + return _dbNameUncapPropNameMap; + } + + /** {cap-prop-name : db-name} map. */ + private static java.util.Map _capPropNameDbNameMap; + protected static java.util.Map createCapPropNameDbNameMap() { + if (_capPropNameDbNameMap != null) { + return _capPropNameDbNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_CAP_PROP_NAME, TABLE_DB_NAME); + + map.put(COLUMN_CAP_PROP_NAME_OF_Startdate, COLUMN_DB_NAME_OF_Startdate); + map.put(COLUMN_CAP_PROP_NAME_OF_Counter, COLUMN_DB_NAME_OF_Counter); + + _capPropNameDbNameMap = java.util.Collections.unmodifiableMap(map); + return _capPropNameDbNameMap; + } + + /** {cap-prop-name : uncap-prop-name} map. */ + private static java.util.Map _capPropNameUncapPropNameMap; + protected static java.util.Map createCapPropNameUncapPropNameMap() { + if (_capPropNameUncapPropNameMap != null) { + return _capPropNameUncapPropNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_CAP_PROP_NAME, TABLE_UNCAP_PROP_NAME); + + map.put(COLUMN_CAP_PROP_NAME_OF_Startdate, COLUMN_UNCAP_PROP_NAME_OF_Startdate); + map.put(COLUMN_CAP_PROP_NAME_OF_Counter, COLUMN_UNCAP_PROP_NAME_OF_Counter); + + _capPropNameUncapPropNameMap = java.util.Collections.unmodifiableMap(map); + return _capPropNameUncapPropNameMap; + } + + /** {uncap-prop-name : db-name} map. */ + private static java.util.Map _uncapPropNameDbNameMap; + protected static java.util.Map createUncapPropNameDbNameMap() { + if (_uncapPropNameDbNameMap != null) { + return _uncapPropNameDbNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_UNCAP_PROP_NAME, TABLE_DB_NAME); + + map.put(COLUMN_UNCAP_PROP_NAME_OF_Startdate, COLUMN_DB_NAME_OF_Startdate); + map.put(COLUMN_UNCAP_PROP_NAME_OF_Counter, COLUMN_DB_NAME_OF_Counter); + + _uncapPropNameDbNameMap = java.util.Collections.unmodifiableMap(map); + return _uncapPropNameDbNameMap; + } + + /** {uncap-prop-name : cap-prop-name} map. */ + private static java.util.Map _uncapPropNameCapPropNameMap; + protected static java.util.Map createUncapPropNameCapPropNameMap() { + if (_uncapPropNameCapPropNameMap != null) { + return _uncapPropNameCapPropNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_UNCAP_PROP_NAME, TABLE_CAP_PROP_NAME); + + map.put(COLUMN_UNCAP_PROP_NAME_OF_Startdate, COLUMN_CAP_PROP_NAME_OF_Startdate); + map.put(COLUMN_UNCAP_PROP_NAME_OF_Counter, COLUMN_CAP_PROP_NAME_OF_Counter); + + _uncapPropNameCapPropNameMap = java.util.Collections.unmodifiableMap(map); + return _uncapPropNameCapPropNameMap; + } + + // =================================================================================== + // Name-Map + // ======== + /** + * This method implements the method that is declared at super. + * + * @return {db-name : cap-prop-name} map. + */ + public java.util.Map getDbNameCapPropNameMap() { + return createDbNameCapPropNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {db-name : uncap-prop-name} map. + */ + public java.util.Map getDbNameUncapPropNameMap() { + return createDbNameUncapPropNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {cap-prop-name : db-name} map. + */ + public java.util.Map getCapPropNameDbNameMap() { + return createCapPropNameDbNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {cap-prop-name : uncap-prop-name} map. + */ + public java.util.Map getCapPropNameUncapPropNameMap() { + return createCapPropNameUncapPropNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {uncap-prop-name : db-name} map. + */ + public java.util.Map getUncapPropNameDbNameMap() { + return createUncapPropNameDbNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {uncap-prop-name : cap-prop-name} map. + */ + public java.util.Map getUncapPropNameCapPropNameMap() { + return createUncapPropNameCapPropNameMap(); + } + + // =================================================================================== + // Table Name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + public String getTableDbName() { + return TABLE_DB_NAME; + } + + /** + * This method implements the method that is declared at super. + * + * @return Table cap-prop-name. (NotNull) + */ + public String getTableCapPropName() { + return TABLE_CAP_PROP_NAME; + } + + /** + * This method implements the method that is declared at super. + * + * @return Table property-name. (NotNull) + */ + public String getTableUncapPropName() { + return TABLE_UNCAP_PROP_NAME; + } + + // =================================================================================== + // Column Name + // =========== + public java.util.List getColumnDbNameList() { + final String[] columns = getColumnDbNameCommaString().split(","); + final java.util.List resultList = new java.util.ArrayList(); + for (int i=0; i < columns.length; i++) { + resultList.add(columns[i].trim()); + } + return resultList; + } + + public java.util.List getColumnCapPropNameList() { + final java.util.List columnDbNameList = getColumnDbNameList(); + final java.util.List resultList = new java.util.ArrayList(); + for (final java.util.Iterator ite = columnDbNameList.iterator(); ite.hasNext(); ) { + resultList.add(getDbNameCapPropNameMap().get((String)ite.next())); + } + return resultList; + } + + public java.util.List getColumnUncapPropNameList() { + final java.util.List columnDbNameList = getColumnDbNameList(); + final java.util.List resultList = new java.util.ArrayList(); + for (final java.util.Iterator ite = columnDbNameList.iterator(); ite.hasNext(); ) { + resultList.add(getDbNameUncapPropNameMap().get((String)ite.next())); + } + return resultList; + } + + /** + * This method implements the method that is declared at super. + * + * @return Column-db-name comma-string. (NotNull) + */ + public String getColumnDbNameCommaString() { + return "STARTDATE, COUNTER"; + } + + // =================================================================================== + // Type Name + // ========= + /** + * This method implements the method that is declared at super. + * + * @return The type-name of entity. (NotNull) + */ + public String getEntityTypeName() { + return "jp.sf.pal.pompei.exentity.Counter"; + } + + /** + * This method implements the method that is declared at super. + * + * @return The type-name of condition-bean. (NotNull) + */ + public String getConditionBeanTypeName() { + return "jp.sf.pal.pompei.cbean.bs.CounterCB"; + } + + /** + * This method implements the method that is declared at super. + * + * @return The type-name of dao. (NotNull) + */ + public String getDaoTypeName() { + return "jp.sf.pal.pompei.exdao.CounterDao"; + } + + /** + * This method implements the method that is declared at super. + * + * @return The type-name of behavior. (NotNull) + */ + public String getBehaviorTypeName() { + return "jp.sf.pal.pompei.exbhv.CounterBhv"; + } + + // =================================================================================== + // Type + // ==== + /** + * This method implements the method that is declared at super. + * + * @return The type of entity. (NotNull) + */ + public Class getEntityType() { + return ENTITY_TYPE; + } + + // =================================================================================== + // Instance + // ======== + /** + * This method implements the method that is declared at super. + * + * @return The type of entity. (NotNull) + */ + public Entity newEntity() { + return newMyEntity(); + } + + /** + * New the instance of my entity. + * + * @return The instance of my entity. (NotNull) + */ + public Counter newMyEntity() { + return new Counter(); + } + + // =================================================================================== + // Foreign DBMeta + // ============== + /** + * This method implements the method that is declared at super. + * + * @param foreignPropertyName Foreign-property-name(Both OK - InitCap or not). (NotNull) + * @return Foreign DBMeta. (NotNull) + */ + public DBMeta getForeignDBMeta(String foreignPropertyName) { + assertStringNotNullAndNotTrimmedEmpty("foreignPropertyName", foreignPropertyName); + final String methodName = "getForeignDBMeta_" + foreignPropertyName.substring(0, 1) + foreignPropertyName.substring(1); + + java.lang.reflect.Method method = null; + try { + method = this.getClass().getMethod(methodName, new Class[]{}); + } catch (NoSuchMethodException e) { + String msg = "The foreignPropertyName is not found: foreignPropertyName=" + foreignPropertyName; + msg = msg + " tableName=" + TABLE_DB_NAME + " methodName=" + methodName; + throw new RuntimeException(msg, e); + } + try { + return (DBMeta)method.invoke(this, new Object[]{}); + } catch (IllegalAccessException e) { + throw new RuntimeException(e); + } catch (java.lang.reflect.InvocationTargetException e) { + throw new RuntimeException(e.getCause()); + } + } + + // =================================================================================== + // Determination + // ============= + /** + * This method implements the method that is declared at super. + * + * @return Determination. + */ + public boolean hasTwoOrMorePrimaryKeys() { + return false; + } + + /** + * This method implements the method that is declared at super. + * + * @return Determination. + */ + public boolean hasCommonColumn() { + return false; + } + + // =================================================================================== + // Entity Handling + // =============== + // ----------------------------------------------------- + // Accept + // ------ + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @param primaryKeyMap Primary key map. (NotNull and NotEmpty) + */ + public void acceptPrimaryKeyMap(Entity entity, java.util.Map primaryKeyMap) { + + String msg = "This table has no primary-keys: " + getTableDbName(); + throw new IllegalStateException(msg); + + } + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @param primaryKeyMapString Primary-key map-string. (NotNull and NotEmpty) + */ + public void acceptPrimaryKeyMapString(Entity entity, String primaryKeyMapString) { + MapStringUtil.acceptPrimaryKeyMapString(primaryKeyMapString, entity); + } + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @param columnValueMap Column-value map. (NotNull and NotEmpty) + */ + public void acceptColumnValueMap(Entity entity, java.util.Map columnValueMap) { + final Counter myEntity = (Counter)entity; + MapAssertUtil.assertColumnValueMapNotNullAndNotEmpty(columnValueMap); + final MapStringValueAnalyzer analyzer = new MapStringValueAnalyzer(columnValueMap, entity.getModifiedPropertyNames()); + + if (analyzer.init("STARTDATE", "startdate", "startdate")) { myEntity.setStartdate(analyzer.analyzeString(String.class)); }; + if (analyzer.init("COUNTER", "counter", "counter")) { myEntity.setCounter(analyzer.analyzeNumber(java.math.BigDecimal.class)); }; + + } + + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @param columnValueMapString Column-value map-string. (NotNull and NotEmpty) + */ + public void acceptColumnValueMapString(Entity entity, String columnValueMapString) { + MapStringUtil.acceptColumnValueMapString(columnValueMapString, entity); + } + + + // ----------------------------------------------------- + // Extract + // ------- + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @return Primary-key map-string. (NotNull) + */ + public String extractPrimaryKeyMapString(Entity entity) { + return MapStringUtil.extractPrimaryKeyMapString(entity); + } + + /** + * Extract primary-key map-string. + * + * @param entity Target entity. (NotNull) + * @param startBrace Start-brace. (NotNull) + * @param endBrace End-brace. (NotNull) + * @param delimiter Delimiter. (NotNull) + * @param equal Equal. (NotNull) + * @return Primary-key map-string. (NotNull) + */ + public String extractPrimaryKeyMapString(Entity entity, String startBrace, String endBrace, String delimiter, String equal) { + final Counter myEntity = (Counter)entity; + return extractColumnValueMapString(entity, startBrace, endBrace, delimiter, equal); + + } + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @return Column-value map-string. (NotNull) + */ + public String extractColumnValueMapString(Entity entity) { + return MapStringUtil.extractColumnValueMapString(entity); + } + + /** + * Extract column-value map-string. + * + * @param entity Target entity. (NotNull) + * @param startBrace Start-brace. (NotNull) + * @param endBrace End-brace. (NotNull) + * @param delimiter Delimiter. (NotNull) + * @param equal Equal. (NotNull) + * @return Column-value map-string. (NotNull) + */ + public String extractColumnValueMapString(Entity entity, String startBrace, String endBrace, String delimiter, String equal) { + final Counter myEntity = (Counter)entity; + final String mapMarkAndStartBrace = MAP_STRING_MAP_MARK + startBrace; + final StringBuffer sb = new StringBuffer(); + helpAppendingColumnValueString(sb, delimiter, equal, "STARTDATE", myEntity.getStartdate()); + helpAppendingColumnValueString(sb, delimiter, equal, "COUNTER", myEntity.getCounter()); + + sb.delete(0, delimiter.length()).insert(0, mapMarkAndStartBrace).append(endBrace); + return sb.toString(); + } + + private void helpAppendingColumnValueString(StringBuffer sb, String delimiter, String equal, String colName, Object value) { + sb.append(delimiter).append(colName).append(equal); + sb.append(helpGettingColumnStringValue(value)); + } + + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @return Column-value map-string. (NotNull) + */ + public String extractCommonColumnValueMapString(Entity entity) { + return "map:{}"; + } + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @return Column-value map-string. (NotNull) + */ + public String extractCommonColumnValueMapString(Entity entity, String startBrace, String endBrace, String delimiter, String equal) { + return "map:" + startBrace + endBrace; + } + + + // ----------------------------------------------------- + // Convert + // ------- + public java.util.List convertToColumnValueList(Entity entity) { + return new java.util.ArrayList(convertToColumnValueMap(entity).values()); + } + + public java.util.Map convertToColumnValueMap(Entity entity) { + final Counter myEntity = downcast(entity); + final java.util.Map valueMap = new java.util.LinkedHashMap(); + valueMap.put("STARTDATE", myEntity.getStartdate()); + valueMap.put("COUNTER", myEntity.getCounter()); + return valueMap; + } + + public java.util.List convertToColumnStringValueList(Entity entity) { + return new java.util.ArrayList(convertToColumnStringValueMap(entity).values()); + } + + public java.util.Map convertToColumnStringValueMap(Entity entity) { + final Counter myEntity = downcast(entity); + final java.util.Map valueMap = new java.util.LinkedHashMap(); + valueMap.put("STARTDATE", helpGettingColumnStringValue(myEntity.getStartdate())); + valueMap.put("COUNTER", helpGettingColumnStringValue(myEntity.getCounter())); + return valueMap; + } + + // =================================================================================== + // JDBC Support + // ============ + public String getPreparedInsertClause() { + return "insert into COUNTER(STARTDATE, COUNTER) values(? , ? )"; + } + + public String getPreparedInsertClause(String tablePrefix) { + return "insert into " + tablePrefix + "COUNTER(STARTDATE, COUNTER) values(? , ? )"; + } + + // =================================================================================== + // Helper + // ====== + protected Counter downcast(Entity entity) { + assertObjectNotNull("entity", entity); + try { + return (Counter)entity; + } catch (ClassCastException e) { + String msg = "The entity should be Counter but it was: " + entity.getClass(); + throw new IllegalStateException(msg, e); + } + } + + protected void checkDowncast(Entity entity) { + downcast(entity); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/dbmeta/CounterHistoryDbm.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/dbmeta/CounterHistoryDbm.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/dbmeta/CounterHistoryDbm.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,647 @@ +package jp.sf.pal.pompei.bsentity.dbmeta; + + +import jp.sf.pal.pompei.allcommon.Entity; +import jp.sf.pal.pompei.allcommon.dbmeta.DBMeta; +import jp.sf.pal.pompei.allcommon.dbmeta.AbstractDBMeta; +import jp.sf.pal.pompei.exentity.CounterHistory; + +/** + * The dbmeta of COUNTER_HISTORY. (Singleton) + * + *
+ * [primary-key]
+ *     
+ * 
+ * [column-property]
+ *     MONTH, COUNTER
+ * 
+ * [foreign-property]
+ *     
+ * 
+ * [refferer-property]
+ *     
+ * 
+ * [sequence]
+ *     
+ * 
+ * [identity]
+ *     
+ * 
+ * [update-date]
+ *     
+ * 
+ * [version-no]
+ *     
+ * 
+ * 
+ * + * @author DBFlute(AutoGenerator) + */ +public class CounterHistoryDbm extends AbstractDBMeta { + + // =================================================================================== + // Definition + // ========== + /** The type of entity. */ + protected static final Class ENTITY_TYPE = CounterHistory.class; + + /** Singleton instance. */ + private static final CounterHistoryDbm _instance = new CounterHistoryDbm(); + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + private CounterHistoryDbm() { + } + + // =================================================================================== + // Singleton + // ========= + /** + * Get instance. + * + * @return Singleton instance. (NotNull) + */ + public static CounterHistoryDbm getInstance() { + return _instance; + } + + // =================================================================================== + // Name Definition + // =============== + /** Table db name. */ + public static final String TABLE_DB_NAME = "COUNTER_HISTORY"; + + /** Table cap-prop name. */ + public static final String TABLE_CAP_PROP_NAME = "CounterHistory"; + + /** Table uncap-prop name. */ + public static final String TABLE_UNCAP_PROP_NAME = "counterHistory"; + + /** Db-name of Month. */ + public static final String COLUMN_DB_NAME_OF_Month = "MONTH"; + /** Db-name of Counter. */ + public static final String COLUMN_DB_NAME_OF_Counter = "COUNTER"; + + /** Cap-prop-name of Month. */ + public static final String COLUMN_CAP_PROP_NAME_OF_Month = "Month"; + /** Cap-prop-name of Counter. */ + public static final String COLUMN_CAP_PROP_NAME_OF_Counter = "Counter"; + + + + /** Uncap-prop-name of Month. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_Month = "month"; + /** Uncap-prop-name of Counter. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_Counter = "counter"; + + + + /** {db-name : cap-prop-name} map. */ + private static java.util.Map _dbNameCapPropNameMap; + protected static java.util.Map createDbNameCapPropNameMap() { + if (_dbNameCapPropNameMap != null) { + return _dbNameCapPropNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_DB_NAME, TABLE_CAP_PROP_NAME); + + map.put(COLUMN_DB_NAME_OF_Month, COLUMN_CAP_PROP_NAME_OF_Month); + map.put(COLUMN_DB_NAME_OF_Counter, COLUMN_CAP_PROP_NAME_OF_Counter); + + _dbNameCapPropNameMap = java.util.Collections.unmodifiableMap(map); + return _dbNameCapPropNameMap; + } + + /** {db-name : uncap-prop-name} map. */ + private static java.util.Map _dbNameUncapPropNameMap; + protected static java.util.Map createDbNameUncapPropNameMap() { + if (_dbNameUncapPropNameMap != null) { + return _dbNameUncapPropNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_DB_NAME, TABLE_UNCAP_PROP_NAME); + + map.put(COLUMN_DB_NAME_OF_Month, COLUMN_UNCAP_PROP_NAME_OF_Month); + map.put(COLUMN_DB_NAME_OF_Counter, COLUMN_UNCAP_PROP_NAME_OF_Counter); + + _dbNameUncapPropNameMap = java.util.Collections.unmodifiableMap(map); + return _dbNameUncapPropNameMap; + } + + /** {cap-prop-name : db-name} map. */ + private static java.util.Map _capPropNameDbNameMap; + protected static java.util.Map createCapPropNameDbNameMap() { + if (_capPropNameDbNameMap != null) { + return _capPropNameDbNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_CAP_PROP_NAME, TABLE_DB_NAME); + + map.put(COLUMN_CAP_PROP_NAME_OF_Month, COLUMN_DB_NAME_OF_Month); + map.put(COLUMN_CAP_PROP_NAME_OF_Counter, COLUMN_DB_NAME_OF_Counter); + + _capPropNameDbNameMap = java.util.Collections.unmodifiableMap(map); + return _capPropNameDbNameMap; + } + + /** {cap-prop-name : uncap-prop-name} map. */ + private static java.util.Map _capPropNameUncapPropNameMap; + protected static java.util.Map createCapPropNameUncapPropNameMap() { + if (_capPropNameUncapPropNameMap != null) { + return _capPropNameUncapPropNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_CAP_PROP_NAME, TABLE_UNCAP_PROP_NAME); + + map.put(COLUMN_CAP_PROP_NAME_OF_Month, COLUMN_UNCAP_PROP_NAME_OF_Month); + map.put(COLUMN_CAP_PROP_NAME_OF_Counter, COLUMN_UNCAP_PROP_NAME_OF_Counter); + + _capPropNameUncapPropNameMap = java.util.Collections.unmodifiableMap(map); + return _capPropNameUncapPropNameMap; + } + + /** {uncap-prop-name : db-name} map. */ + private static java.util.Map _uncapPropNameDbNameMap; + protected static java.util.Map createUncapPropNameDbNameMap() { + if (_uncapPropNameDbNameMap != null) { + return _uncapPropNameDbNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_UNCAP_PROP_NAME, TABLE_DB_NAME); + + map.put(COLUMN_UNCAP_PROP_NAME_OF_Month, COLUMN_DB_NAME_OF_Month); + map.put(COLUMN_UNCAP_PROP_NAME_OF_Counter, COLUMN_DB_NAME_OF_Counter); + + _uncapPropNameDbNameMap = java.util.Collections.unmodifiableMap(map); + return _uncapPropNameDbNameMap; + } + + /** {uncap-prop-name : cap-prop-name} map. */ + private static java.util.Map _uncapPropNameCapPropNameMap; + protected static java.util.Map createUncapPropNameCapPropNameMap() { + if (_uncapPropNameCapPropNameMap != null) { + return _uncapPropNameCapPropNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_UNCAP_PROP_NAME, TABLE_CAP_PROP_NAME); + + map.put(COLUMN_UNCAP_PROP_NAME_OF_Month, COLUMN_CAP_PROP_NAME_OF_Month); + map.put(COLUMN_UNCAP_PROP_NAME_OF_Counter, COLUMN_CAP_PROP_NAME_OF_Counter); + + _uncapPropNameCapPropNameMap = java.util.Collections.unmodifiableMap(map); + return _uncapPropNameCapPropNameMap; + } + + // =================================================================================== + // Name-Map + // ======== + /** + * This method implements the method that is declared at super. + * + * @return {db-name : cap-prop-name} map. + */ + public java.util.Map getDbNameCapPropNameMap() { + return createDbNameCapPropNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {db-name : uncap-prop-name} map. + */ + public java.util.Map getDbNameUncapPropNameMap() { + return createDbNameUncapPropNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {cap-prop-name : db-name} map. + */ + public java.util.Map getCapPropNameDbNameMap() { + return createCapPropNameDbNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {cap-prop-name : uncap-prop-name} map. + */ + public java.util.Map getCapPropNameUncapPropNameMap() { + return createCapPropNameUncapPropNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {uncap-prop-name : db-name} map. + */ + public java.util.Map getUncapPropNameDbNameMap() { + return createUncapPropNameDbNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {uncap-prop-name : cap-prop-name} map. + */ + public java.util.Map getUncapPropNameCapPropNameMap() { + return createUncapPropNameCapPropNameMap(); + } + + // =================================================================================== + // Table Name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + public String getTableDbName() { + return TABLE_DB_NAME; + } + + /** + * This method implements the method that is declared at super. + * + * @return Table cap-prop-name. (NotNull) + */ + public String getTableCapPropName() { + return TABLE_CAP_PROP_NAME; + } + + /** + * This method implements the method that is declared at super. + * + * @return Table property-name. (NotNull) + */ + public String getTableUncapPropName() { + return TABLE_UNCAP_PROP_NAME; + } + + // =================================================================================== + // Column Name + // =========== + public java.util.List getColumnDbNameList() { + final String[] columns = getColumnDbNameCommaString().split(","); + final java.util.List resultList = new java.util.ArrayList(); + for (int i=0; i < columns.length; i++) { + resultList.add(columns[i].trim()); + } + return resultList; + } + + public java.util.List getColumnCapPropNameList() { + final java.util.List columnDbNameList = getColumnDbNameList(); + final java.util.List resultList = new java.util.ArrayList(); + for (final java.util.Iterator ite = columnDbNameList.iterator(); ite.hasNext(); ) { + resultList.add(getDbNameCapPropNameMap().get((String)ite.next())); + } + return resultList; + } + + public java.util.List getColumnUncapPropNameList() { + final java.util.List columnDbNameList = getColumnDbNameList(); + final java.util.List resultList = new java.util.ArrayList(); + for (final java.util.Iterator ite = columnDbNameList.iterator(); ite.hasNext(); ) { + resultList.add(getDbNameUncapPropNameMap().get((String)ite.next())); + } + return resultList; + } + + /** + * This method implements the method that is declared at super. + * + * @return Column-db-name comma-string. (NotNull) + */ + public String getColumnDbNameCommaString() { + return "MONTH, COUNTER"; + } + + // =================================================================================== + // Type Name + // ========= + /** + * This method implements the method that is declared at super. + * + * @return The type-name of entity. (NotNull) + */ + public String getEntityTypeName() { + return "jp.sf.pal.pompei.exentity.CounterHistory"; + } + + /** + * This method implements the method that is declared at super. + * + * @return The type-name of condition-bean. (NotNull) + */ + public String getConditionBeanTypeName() { + return "jp.sf.pal.pompei.cbean.bs.CounterHistoryCB"; + } + + /** + * This method implements the method that is declared at super. + * + * @return The type-name of dao. (NotNull) + */ + public String getDaoTypeName() { + return "jp.sf.pal.pompei.exdao.CounterHistoryDao"; + } + + /** + * This method implements the method that is declared at super. + * + * @return The type-name of behavior. (NotNull) + */ + public String getBehaviorTypeName() { + return "jp.sf.pal.pompei.exbhv.CounterHistoryBhv"; + } + + // =================================================================================== + // Type + // ==== + /** + * This method implements the method that is declared at super. + * + * @return The type of entity. (NotNull) + */ + public Class getEntityType() { + return ENTITY_TYPE; + } + + // =================================================================================== + // Instance + // ======== + /** + * This method implements the method that is declared at super. + * + * @return The type of entity. (NotNull) + */ + public Entity newEntity() { + return newMyEntity(); + } + + /** + * New the instance of my entity. + * + * @return The instance of my entity. (NotNull) + */ + public CounterHistory newMyEntity() { + return new CounterHistory(); + } + + // =================================================================================== + // Foreign DBMeta + // ============== + /** + * This method implements the method that is declared at super. + * + * @param foreignPropertyName Foreign-property-name(Both OK - InitCap or not). (NotNull) + * @return Foreign DBMeta. (NotNull) + */ + public DBMeta getForeignDBMeta(String foreignPropertyName) { + assertStringNotNullAndNotTrimmedEmpty("foreignPropertyName", foreignPropertyName); + final String methodName = "getForeignDBMeta_" + foreignPropertyName.substring(0, 1) + foreignPropertyName.substring(1); + + java.lang.reflect.Method method = null; + try { + method = this.getClass().getMethod(methodName, new Class[]{}); + } catch (NoSuchMethodException e) { + String msg = "The foreignPropertyName is not found: foreignPropertyName=" + foreignPropertyName; + msg = msg + " tableName=" + TABLE_DB_NAME + " methodName=" + methodName; + throw new RuntimeException(msg, e); + } + try { + return (DBMeta)method.invoke(this, new Object[]{}); + } catch (IllegalAccessException e) { + throw new RuntimeException(e); + } catch (java.lang.reflect.InvocationTargetException e) { + throw new RuntimeException(e.getCause()); + } + } + + // =================================================================================== + // Determination + // ============= + /** + * This method implements the method that is declared at super. + * + * @return Determination. + */ + public boolean hasTwoOrMorePrimaryKeys() { + return false; + } + + /** + * This method implements the method that is declared at super. + * + * @return Determination. + */ + public boolean hasCommonColumn() { + return false; + } + + // =================================================================================== + // Entity Handling + // =============== + // ----------------------------------------------------- + // Accept + // ------ + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @param primaryKeyMap Primary key map. (NotNull and NotEmpty) + */ + public void acceptPrimaryKeyMap(Entity entity, java.util.Map primaryKeyMap) { + + String msg = "This table has no primary-keys: " + getTableDbName(); + throw new IllegalStateException(msg); + + } + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @param primaryKeyMapString Primary-key map-string. (NotNull and NotEmpty) + */ + public void acceptPrimaryKeyMapString(Entity entity, String primaryKeyMapString) { + MapStringUtil.acceptPrimaryKeyMapString(primaryKeyMapString, entity); + } + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @param columnValueMap Column-value map. (NotNull and NotEmpty) + */ + public void acceptColumnValueMap(Entity entity, java.util.Map columnValueMap) { + final CounterHistory myEntity = (CounterHistory)entity; + MapAssertUtil.assertColumnValueMapNotNullAndNotEmpty(columnValueMap); + final MapStringValueAnalyzer analyzer = new MapStringValueAnalyzer(columnValueMap, entity.getModifiedPropertyNames()); + + if (analyzer.init("MONTH", "month", "month")) { myEntity.setMonth(analyzer.analyzeString(String.class)); }; + if (analyzer.init("COUNTER", "counter", "counter")) { myEntity.setCounter(analyzer.analyzeNumber(java.math.BigDecimal.class)); }; + + } + + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @param columnValueMapString Column-value map-string. (NotNull and NotEmpty) + */ + public void acceptColumnValueMapString(Entity entity, String columnValueMapString) { + MapStringUtil.acceptColumnValueMapString(columnValueMapString, entity); + } + + + // ----------------------------------------------------- + // Extract + // ------- + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @return Primary-key map-string. (NotNull) + */ + public String extractPrimaryKeyMapString(Entity entity) { + return MapStringUtil.extractPrimaryKeyMapString(entity); + } + + /** + * Extract primary-key map-string. + * + * @param entity Target entity. (NotNull) + * @param startBrace Start-brace. (NotNull) + * @param endBrace End-brace. (NotNull) + * @param delimiter Delimiter. (NotNull) + * @param equal Equal. (NotNull) + * @return Primary-key map-string. (NotNull) + */ + public String extractPrimaryKeyMapString(Entity entity, String startBrace, String endBrace, String delimiter, String equal) { + final CounterHistory myEntity = (CounterHistory)entity; + return extractColumnValueMapString(entity, startBrace, endBrace, delimiter, equal); + + } + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @return Column-value map-string. (NotNull) + */ + public String extractColumnValueMapString(Entity entity) { + return MapStringUtil.extractColumnValueMapString(entity); + } + + /** + * Extract column-value map-string. + * + * @param entity Target entity. (NotNull) + * @param startBrace Start-brace. (NotNull) + * @param endBrace End-brace. (NotNull) + * @param delimiter Delimiter. (NotNull) + * @param equal Equal. (NotNull) + * @return Column-value map-string. (NotNull) + */ + public String extractColumnValueMapString(Entity entity, String startBrace, String endBrace, String delimiter, String equal) { + final CounterHistory myEntity = (CounterHistory)entity; + final String mapMarkAndStartBrace = MAP_STRING_MAP_MARK + startBrace; + final StringBuffer sb = new StringBuffer(); + helpAppendingColumnValueString(sb, delimiter, equal, "MONTH", myEntity.getMonth()); + helpAppendingColumnValueString(sb, delimiter, equal, "COUNTER", myEntity.getCounter()); + + sb.delete(0, delimiter.length()).insert(0, mapMarkAndStartBrace).append(endBrace); + return sb.toString(); + } + + private void helpAppendingColumnValueString(StringBuffer sb, String delimiter, String equal, String colName, Object value) { + sb.append(delimiter).append(colName).append(equal); + sb.append(helpGettingColumnStringValue(value)); + } + + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @return Column-value map-string. (NotNull) + */ + public String extractCommonColumnValueMapString(Entity entity) { + return "map:{}"; + } + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @return Column-value map-string. (NotNull) + */ + public String extractCommonColumnValueMapString(Entity entity, String startBrace, String endBrace, String delimiter, String equal) { + return "map:" + startBrace + endBrace; + } + + + // ----------------------------------------------------- + // Convert + // ------- + public java.util.List convertToColumnValueList(Entity entity) { + return new java.util.ArrayList(convertToColumnValueMap(entity).values()); + } + + public java.util.Map convertToColumnValueMap(Entity entity) { + final CounterHistory myEntity = downcast(entity); + final java.util.Map valueMap = new java.util.LinkedHashMap(); + valueMap.put("MONTH", myEntity.getMonth()); + valueMap.put("COUNTER", myEntity.getCounter()); + return valueMap; + } + + public java.util.List convertToColumnStringValueList(Entity entity) { + return new java.util.ArrayList(convertToColumnStringValueMap(entity).values()); + } + + public java.util.Map convertToColumnStringValueMap(Entity entity) { + final CounterHistory myEntity = downcast(entity); + final java.util.Map valueMap = new java.util.LinkedHashMap(); + valueMap.put("MONTH", helpGettingColumnStringValue(myEntity.getMonth())); + valueMap.put("COUNTER", helpGettingColumnStringValue(myEntity.getCounter())); + return valueMap; + } + + // =================================================================================== + // JDBC Support + // ============ + public String getPreparedInsertClause() { + return "insert into COUNTER_HISTORY(MONTH, COUNTER) values(? , ? )"; + } + + public String getPreparedInsertClause(String tablePrefix) { + return "insert into " + tablePrefix + "COUNTER_HISTORY(MONTH, COUNTER) values(? , ? )"; + } + + // =================================================================================== + // Helper + // ====== + protected CounterHistory downcast(Entity entity) { + assertObjectNotNull("entity", entity); + try { + return (CounterHistory)entity; + } catch (ClassCastException e) { + String msg = "The entity should be CounterHistory but it was: " + entity.getClass(); + throw new IllegalStateException(msg, e); + } + } + + protected void checkDowncast(Entity entity) { + downcast(entity); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/dbmeta/CountriesDbm.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/dbmeta/CountriesDbm.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/dbmeta/CountriesDbm.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,704 @@ +package jp.sf.pal.pompei.bsentity.dbmeta; + + +import jp.sf.pal.pompei.allcommon.Entity; +import jp.sf.pal.pompei.allcommon.dbmeta.DBMeta; +import jp.sf.pal.pompei.allcommon.dbmeta.AbstractDBMeta; +import jp.sf.pal.pompei.exentity.Countries; + +/** + * The dbmeta of COUNTRIES. (Singleton) + * + *
+ * [primary-key]
+ *     COUNTRIES_ID
+ * 
+ * [column-property]
+ *     COUNTRIES_ID, COUNTRIES_NAME, COUNTRIES_ISO_CODE_2, COUNTRIES_ISO_CODE_3, ADDRESS_FORMAT_ID
+ * 
+ * [foreign-property]
+ *     
+ * 
+ * [refferer-property]
+ *     
+ * 
+ * [sequence]
+ *     
+ * 
+ * [identity]
+ *     
+ * 
+ * [update-date]
+ *     
+ * 
+ * [version-no]
+ *     
+ * 
+ * 
+ * + * @author DBFlute(AutoGenerator) + */ +public class CountriesDbm extends AbstractDBMeta { + + // =================================================================================== + // Definition + // ========== + /** The type of entity. */ + protected static final Class ENTITY_TYPE = Countries.class; + + /** Singleton instance. */ + private static final CountriesDbm _instance = new CountriesDbm(); + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + private CountriesDbm() { + } + + // =================================================================================== + // Singleton + // ========= + /** + * Get instance. + * + * @return Singleton instance. (NotNull) + */ + public static CountriesDbm getInstance() { + return _instance; + } + + // =================================================================================== + // Name Definition + // =============== + /** Table db name. */ + public static final String TABLE_DB_NAME = "COUNTRIES"; + + /** Table cap-prop name. */ + public static final String TABLE_CAP_PROP_NAME = "Countries"; + + /** Table uncap-prop name. */ + public static final String TABLE_UNCAP_PROP_NAME = "countries"; + + /** Db-name of CountriesId. */ + public static final String COLUMN_DB_NAME_OF_CountriesId = "COUNTRIES_ID"; + /** Db-name of CountriesName. */ + public static final String COLUMN_DB_NAME_OF_CountriesName = "COUNTRIES_NAME"; + /** Db-name of CountriesIsoCode2. */ + public static final String COLUMN_DB_NAME_OF_CountriesIsoCode2 = "COUNTRIES_ISO_CODE_2"; + /** Db-name of CountriesIsoCode3. */ + public static final String COLUMN_DB_NAME_OF_CountriesIsoCode3 = "COUNTRIES_ISO_CODE_3"; + /** Db-name of AddressFormatId. */ + public static final String COLUMN_DB_NAME_OF_AddressFormatId = "ADDRESS_FORMAT_ID"; + + /** Cap-prop-name of CountriesId. */ + public static final String COLUMN_CAP_PROP_NAME_OF_CountriesId = "CountriesId"; + /** Cap-prop-name of CountriesName. */ + public static final String COLUMN_CAP_PROP_NAME_OF_CountriesName = "CountriesName"; + /** Cap-prop-name of CountriesIsoCode2. */ + public static final String COLUMN_CAP_PROP_NAME_OF_CountriesIsoCode2 = "CountriesIsoCode2"; + /** Cap-prop-name of CountriesIsoCode3. */ + public static final String COLUMN_CAP_PROP_NAME_OF_CountriesIsoCode3 = "CountriesIsoCode3"; + /** Cap-prop-name of AddressFormatId. */ + public static final String COLUMN_CAP_PROP_NAME_OF_AddressFormatId = "AddressFormatId"; + + + + /** Uncap-prop-name of CountriesId. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_CountriesId = "countriesId"; + /** Uncap-prop-name of CountriesName. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_CountriesName = "countriesName"; + /** Uncap-prop-name of CountriesIsoCode2. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_CountriesIsoCode2 = "countriesIsoCode2"; + /** Uncap-prop-name of CountriesIsoCode3. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_CountriesIsoCode3 = "countriesIsoCode3"; + /** Uncap-prop-name of AddressFormatId. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_AddressFormatId = "addressFormatId"; + + + + /** {db-name : cap-prop-name} map. */ + private static java.util.Map _dbNameCapPropNameMap; + protected static java.util.Map createDbNameCapPropNameMap() { + if (_dbNameCapPropNameMap != null) { + return _dbNameCapPropNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_DB_NAME, TABLE_CAP_PROP_NAME); + + map.put(COLUMN_DB_NAME_OF_CountriesId, COLUMN_CAP_PROP_NAME_OF_CountriesId); + map.put(COLUMN_DB_NAME_OF_CountriesName, COLUMN_CAP_PROP_NAME_OF_CountriesName); + map.put(COLUMN_DB_NAME_OF_CountriesIsoCode2, COLUMN_CAP_PROP_NAME_OF_CountriesIsoCode2); + map.put(COLUMN_DB_NAME_OF_CountriesIsoCode3, COLUMN_CAP_PROP_NAME_OF_CountriesIsoCode3); + map.put(COLUMN_DB_NAME_OF_AddressFormatId, COLUMN_CAP_PROP_NAME_OF_AddressFormatId); + + _dbNameCapPropNameMap = java.util.Collections.unmodifiableMap(map); + return _dbNameCapPropNameMap; + } + + /** {db-name : uncap-prop-name} map. */ + private static java.util.Map _dbNameUncapPropNameMap; + protected static java.util.Map createDbNameUncapPropNameMap() { + if (_dbNameUncapPropNameMap != null) { + return _dbNameUncapPropNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_DB_NAME, TABLE_UNCAP_PROP_NAME); + + map.put(COLUMN_DB_NAME_OF_CountriesId, COLUMN_UNCAP_PROP_NAME_OF_CountriesId); + map.put(COLUMN_DB_NAME_OF_CountriesName, COLUMN_UNCAP_PROP_NAME_OF_CountriesName); + map.put(COLUMN_DB_NAME_OF_CountriesIsoCode2, COLUMN_UNCAP_PROP_NAME_OF_CountriesIsoCode2); + map.put(COLUMN_DB_NAME_OF_CountriesIsoCode3, COLUMN_UNCAP_PROP_NAME_OF_CountriesIsoCode3); + map.put(COLUMN_DB_NAME_OF_AddressFormatId, COLUMN_UNCAP_PROP_NAME_OF_AddressFormatId); + + _dbNameUncapPropNameMap = java.util.Collections.unmodifiableMap(map); + return _dbNameUncapPropNameMap; + } + + /** {cap-prop-name : db-name} map. */ + private static java.util.Map _capPropNameDbNameMap; + protected static java.util.Map createCapPropNameDbNameMap() { + if (_capPropNameDbNameMap != null) { + return _capPropNameDbNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_CAP_PROP_NAME, TABLE_DB_NAME); + + map.put(COLUMN_CAP_PROP_NAME_OF_CountriesId, COLUMN_DB_NAME_OF_CountriesId); + map.put(COLUMN_CAP_PROP_NAME_OF_CountriesName, COLUMN_DB_NAME_OF_CountriesName); + map.put(COLUMN_CAP_PROP_NAME_OF_CountriesIsoCode2, COLUMN_DB_NAME_OF_CountriesIsoCode2); + map.put(COLUMN_CAP_PROP_NAME_OF_CountriesIsoCode3, COLUMN_DB_NAME_OF_CountriesIsoCode3); + map.put(COLUMN_CAP_PROP_NAME_OF_AddressFormatId, COLUMN_DB_NAME_OF_AddressFormatId); + + _capPropNameDbNameMap = java.util.Collections.unmodifiableMap(map); + return _capPropNameDbNameMap; + } + + /** {cap-prop-name : uncap-prop-name} map. */ + private static java.util.Map _capPropNameUncapPropNameMap; + protected static java.util.Map createCapPropNameUncapPropNameMap() { + if (_capPropNameUncapPropNameMap != null) { + return _capPropNameUncapPropNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_CAP_PROP_NAME, TABLE_UNCAP_PROP_NAME); + + map.put(COLUMN_CAP_PROP_NAME_OF_CountriesId, COLUMN_UNCAP_PROP_NAME_OF_CountriesId); + map.put(COLUMN_CAP_PROP_NAME_OF_CountriesName, COLUMN_UNCAP_PROP_NAME_OF_CountriesName); + map.put(COLUMN_CAP_PROP_NAME_OF_CountriesIsoCode2, COLUMN_UNCAP_PROP_NAME_OF_CountriesIsoCode2); + map.put(COLUMN_CAP_PROP_NAME_OF_CountriesIsoCode3, COLUMN_UNCAP_PROP_NAME_OF_CountriesIsoCode3); + map.put(COLUMN_CAP_PROP_NAME_OF_AddressFormatId, COLUMN_UNCAP_PROP_NAME_OF_AddressFormatId); + + _capPropNameUncapPropNameMap = java.util.Collections.unmodifiableMap(map); + return _capPropNameUncapPropNameMap; + } + + /** {uncap-prop-name : db-name} map. */ + private static java.util.Map _uncapPropNameDbNameMap; + protected static java.util.Map createUncapPropNameDbNameMap() { + if (_uncapPropNameDbNameMap != null) { + return _uncapPropNameDbNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_UNCAP_PROP_NAME, TABLE_DB_NAME); + + map.put(COLUMN_UNCAP_PROP_NAME_OF_CountriesId, COLUMN_DB_NAME_OF_CountriesId); + map.put(COLUMN_UNCAP_PROP_NAME_OF_CountriesName, COLUMN_DB_NAME_OF_CountriesName); + map.put(COLUMN_UNCAP_PROP_NAME_OF_CountriesIsoCode2, COLUMN_DB_NAME_OF_CountriesIsoCode2); + map.put(COLUMN_UNCAP_PROP_NAME_OF_CountriesIsoCode3, COLUMN_DB_NAME_OF_CountriesIsoCode3); + map.put(COLUMN_UNCAP_PROP_NAME_OF_AddressFormatId, COLUMN_DB_NAME_OF_AddressFormatId); + + _uncapPropNameDbNameMap = java.util.Collections.unmodifiableMap(map); + return _uncapPropNameDbNameMap; + } + + /** {uncap-prop-name : cap-prop-name} map. */ + private static java.util.Map _uncapPropNameCapPropNameMap; + protected static java.util.Map createUncapPropNameCapPropNameMap() { + if (_uncapPropNameCapPropNameMap != null) { + return _uncapPropNameCapPropNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_UNCAP_PROP_NAME, TABLE_CAP_PROP_NAME); + + map.put(COLUMN_UNCAP_PROP_NAME_OF_CountriesId, COLUMN_CAP_PROP_NAME_OF_CountriesId); + map.put(COLUMN_UNCAP_PROP_NAME_OF_CountriesName, COLUMN_CAP_PROP_NAME_OF_CountriesName); + map.put(COLUMN_UNCAP_PROP_NAME_OF_CountriesIsoCode2, COLUMN_CAP_PROP_NAME_OF_CountriesIsoCode2); + map.put(COLUMN_UNCAP_PROP_NAME_OF_CountriesIsoCode3, COLUMN_CAP_PROP_NAME_OF_CountriesIsoCode3); + map.put(COLUMN_UNCAP_PROP_NAME_OF_AddressFormatId, COLUMN_CAP_PROP_NAME_OF_AddressFormatId); + + _uncapPropNameCapPropNameMap = java.util.Collections.unmodifiableMap(map); + return _uncapPropNameCapPropNameMap; + } + + // =================================================================================== + // Name-Map + // ======== + /** + * This method implements the method that is declared at super. + * + * @return {db-name : cap-prop-name} map. + */ + public java.util.Map getDbNameCapPropNameMap() { + return createDbNameCapPropNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {db-name : uncap-prop-name} map. + */ + public java.util.Map getDbNameUncapPropNameMap() { + return createDbNameUncapPropNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {cap-prop-name : db-name} map. + */ + public java.util.Map getCapPropNameDbNameMap() { + return createCapPropNameDbNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {cap-prop-name : uncap-prop-name} map. + */ + public java.util.Map getCapPropNameUncapPropNameMap() { + return createCapPropNameUncapPropNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {uncap-prop-name : db-name} map. + */ + public java.util.Map getUncapPropNameDbNameMap() { + return createUncapPropNameDbNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {uncap-prop-name : cap-prop-name} map. + */ + public java.util.Map getUncapPropNameCapPropNameMap() { + return createUncapPropNameCapPropNameMap(); + } + + // =================================================================================== + // Table Name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + public String getTableDbName() { + return TABLE_DB_NAME; + } + + /** + * This method implements the method that is declared at super. + * + * @return Table cap-prop-name. (NotNull) + */ + public String getTableCapPropName() { + return TABLE_CAP_PROP_NAME; + } + + /** + * This method implements the method that is declared at super. + * + * @return Table property-name. (NotNull) + */ + public String getTableUncapPropName() { + return TABLE_UNCAP_PROP_NAME; + } + + // =================================================================================== + // Column Name + // =========== + public java.util.List getColumnDbNameList() { + final String[] columns = getColumnDbNameCommaString().split(","); + final java.util.List resultList = new java.util.ArrayList(); + for (int i=0; i < columns.length; i++) { + resultList.add(columns[i].trim()); + } + return resultList; + } + + public java.util.List getColumnCapPropNameList() { + final java.util.List columnDbNameList = getColumnDbNameList(); + final java.util.List resultList = new java.util.ArrayList(); + for (final java.util.Iterator ite = columnDbNameList.iterator(); ite.hasNext(); ) { + resultList.add(getDbNameCapPropNameMap().get((String)ite.next())); + } + return resultList; + } + + public java.util.List getColumnUncapPropNameList() { + final java.util.List columnDbNameList = getColumnDbNameList(); + final java.util.List resultList = new java.util.ArrayList(); + for (final java.util.Iterator ite = columnDbNameList.iterator(); ite.hasNext(); ) { + resultList.add(getDbNameUncapPropNameMap().get((String)ite.next())); + } + return resultList; + } + + /** + * This method implements the method that is declared at super. + * + * @return Column-db-name comma-string. (NotNull) + */ + public String getColumnDbNameCommaString() { + return "COUNTRIES_ID, COUNTRIES_NAME, COUNTRIES_ISO_CODE_2, COUNTRIES_ISO_CODE_3, ADDRESS_FORMAT_ID"; + } + + // =================================================================================== + // Type Name + // ========= + /** + * This method implements the method that is declared at super. + * + * @return The type-name of entity. (NotNull) + */ + public String getEntityTypeName() { + return "jp.sf.pal.pompei.exentity.Countries"; + } + + /** + * This method implements the method that is declared at super. + * + * @return The type-name of condition-bean. (NotNull) + */ + public String getConditionBeanTypeName() { + return "jp.sf.pal.pompei.cbean.bs.CountriesCB"; + } + + /** + * This method implements the method that is declared at super. + * + * @return The type-name of dao. (NotNull) + */ + public String getDaoTypeName() { + return "jp.sf.pal.pompei.exdao.CountriesDao"; + } + + /** + * This method implements the method that is declared at super. + * + * @return The type-name of behavior. (NotNull) + */ + public String getBehaviorTypeName() { + return "jp.sf.pal.pompei.exbhv.CountriesBhv"; + } + + // =================================================================================== + // Type + // ==== + /** + * This method implements the method that is declared at super. + * + * @return The type of entity. (NotNull) + */ + public Class getEntityType() { + return ENTITY_TYPE; + } + + // =================================================================================== + // Instance + // ======== + /** + * This method implements the method that is declared at super. + * + * @return The type of entity. (NotNull) + */ + public Entity newEntity() { + return newMyEntity(); + } + + /** + * New the instance of my entity. + * + * @return The instance of my entity. (NotNull) + */ + public Countries newMyEntity() { + return new Countries(); + } + + // =================================================================================== + // Foreign DBMeta + // ============== + /** + * This method implements the method that is declared at super. + * + * @param foreignPropertyName Foreign-property-name(Both OK - InitCap or not). (NotNull) + * @return Foreign DBMeta. (NotNull) + */ + public DBMeta getForeignDBMeta(String foreignPropertyName) { + assertStringNotNullAndNotTrimmedEmpty("foreignPropertyName", foreignPropertyName); + final String methodName = "getForeignDBMeta_" + foreignPropertyName.substring(0, 1) + foreignPropertyName.substring(1); + + java.lang.reflect.Method method = null; + try { + method = this.getClass().getMethod(methodName, new Class[]{}); + } catch (NoSuchMethodException e) { + String msg = "The foreignPropertyName is not found: foreignPropertyName=" + foreignPropertyName; + msg = msg + " tableName=" + TABLE_DB_NAME + " methodName=" + methodName; + throw new RuntimeException(msg, e); + } + try { + return (DBMeta)method.invoke(this, new Object[]{}); + } catch (IllegalAccessException e) { + throw new RuntimeException(e); + } catch (java.lang.reflect.InvocationTargetException e) { + throw new RuntimeException(e.getCause()); + } + } + + // =================================================================================== + // Determination + // ============= + /** + * This method implements the method that is declared at super. + * + * @return Determination. + */ + public boolean hasTwoOrMorePrimaryKeys() { + return false; + } + + /** + * This method implements the method that is declared at super. + * + * @return Determination. + */ + public boolean hasCommonColumn() { + return false; + } + + // =================================================================================== + // Entity Handling + // =============== + // ----------------------------------------------------- + // Accept + // ------ + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @param primaryKeyMap Primary key map. (NotNull and NotEmpty) + */ + public void acceptPrimaryKeyMap(Entity entity, java.util.Map primaryKeyMap) { + final Countries myEntity = (Countries)entity; + MapAssertUtil.assertPrimaryKeyMapNotNullAndNotEmpty(primaryKeyMap); + final MapStringValueAnalyzer analyzer = new MapStringValueAnalyzer(primaryKeyMap, entity.getModifiedPropertyNames()); + + MapAssertUtil.assertColumnExistingInPrimaryKeyMap(primaryKeyMap, "COUNTRIES_ID"); + if (analyzer.init("COUNTRIES_ID", "countriesId", "countriesId")) { myEntity.setCountriesId(analyzer.analyzeNumber(java.math.BigDecimal.class)); }; + + + } + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @param primaryKeyMapString Primary-key map-string. (NotNull and NotEmpty) + */ + public void acceptPrimaryKeyMapString(Entity entity, String primaryKeyMapString) { + MapStringUtil.acceptPrimaryKeyMapString(primaryKeyMapString, entity); + } + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @param columnValueMap Column-value map. (NotNull and NotEmpty) + */ + public void acceptColumnValueMap(Entity entity, java.util.Map columnValueMap) { + final Countries myEntity = (Countries)entity; + MapAssertUtil.assertColumnValueMapNotNullAndNotEmpty(columnValueMap); + final MapStringValueAnalyzer analyzer = new MapStringValueAnalyzer(columnValueMap, entity.getModifiedPropertyNames()); + + if (analyzer.init("COUNTRIES_ID", "countriesId", "countriesId")) { myEntity.setCountriesId(analyzer.analyzeNumber(java.math.BigDecimal.class)); }; + if (analyzer.init("COUNTRIES_NAME", "countriesName", "countriesName")) { myEntity.setCountriesName(analyzer.analyzeString(String.class)); }; + if (analyzer.init("COUNTRIES_ISO_CODE_2", "countriesIsoCode2", "countriesIsoCode2")) { myEntity.setCountriesIsoCode2(analyzer.analyzeString(String.class)); }; + if (analyzer.init("COUNTRIES_ISO_CODE_3", "countriesIsoCode3", "countriesIsoCode3")) { myEntity.setCountriesIsoCode3(analyzer.analyzeString(String.class)); }; + if (analyzer.init("ADDRESS_FORMAT_ID", "addressFormatId", "addressFormatId")) { myEntity.setAddressFormatId(analyzer.analyzeNumber(java.math.BigDecimal.class)); }; + + } + + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @param columnValueMapString Column-value map-string. (NotNull and NotEmpty) + */ + public void acceptColumnValueMapString(Entity entity, String columnValueMapString) { + MapStringUtil.acceptColumnValueMapString(columnValueMapString, entity); + } + + + // ----------------------------------------------------- + // Extract + // ------- + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @return Primary-key map-string. (NotNull) + */ + public String extractPrimaryKeyMapString(Entity entity) { + return MapStringUtil.extractPrimaryKeyMapString(entity); + } + + /** + * Extract primary-key map-string. + * + * @param entity Target entity. (NotNull) + * @param startBrace Start-brace. (NotNull) + * @param endBrace End-brace. (NotNull) + * @param delimiter Delimiter. (NotNull) + * @param equal Equal. (NotNull) + * @return Primary-key map-string. (NotNull) + */ + public String extractPrimaryKeyMapString(Entity entity, String startBrace, String endBrace, String delimiter, String equal) { + final Countries myEntity = (Countries)entity; + final String mapMarkAndStartBrace = MAP_STRING_MAP_MARK + startBrace; + final StringBuffer sb = new StringBuffer(); + helpAppendingColumnValueString(sb, delimiter, equal, "COUNTRIES_ID", myEntity.getCountriesId()); + + sb.delete(0, delimiter.length()).insert(0, mapMarkAndStartBrace).append(endBrace); + return sb.toString(); + + } + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @return Column-value map-string. (NotNull) + */ + public String extractColumnValueMapString(Entity entity) { + return MapStringUtil.extractColumnValueMapString(entity); + } + + /** + * Extract column-value map-string. + * + * @param entity Target entity. (NotNull) + * @param startBrace Start-brace. (NotNull) + * @param endBrace End-brace. (NotNull) + * @param delimiter Delimiter. (NotNull) + * @param equal Equal. (NotNull) + * @return Column-value map-string. (NotNull) + */ + public String extractColumnValueMapString(Entity entity, String startBrace, String endBrace, String delimiter, String equal) { + final Countries myEntity = (Countries)entity; + final String mapMarkAndStartBrace = MAP_STRING_MAP_MARK + startBrace; + final StringBuffer sb = new StringBuffer(); + helpAppendingColumnValueString(sb, delimiter, equal, "COUNTRIES_ID", myEntity.getCountriesId()); + helpAppendingColumnValueString(sb, delimiter, equal, "COUNTRIES_NAME", myEntity.getCountriesName()); + helpAppendingColumnValueString(sb, delimiter, equal, "COUNTRIES_ISO_CODE_2", myEntity.getCountriesIsoCode2()); + helpAppendingColumnValueString(sb, delimiter, equal, "COUNTRIES_ISO_CODE_3", myEntity.getCountriesIsoCode3()); + helpAppendingColumnValueString(sb, delimiter, equal, "ADDRESS_FORMAT_ID", myEntity.getAddressFormatId()); + + sb.delete(0, delimiter.length()).insert(0, mapMarkAndStartBrace).append(endBrace); + return sb.toString(); + } + + private void helpAppendingColumnValueString(StringBuffer sb, String delimiter, String equal, String colName, Object value) { + sb.append(delimiter).append(colName).append(equal); + sb.append(helpGettingColumnStringValue(value)); + } + + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @return Column-value map-string. (NotNull) + */ + public String extractCommonColumnValueMapString(Entity entity) { + return "map:{}"; + } + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @return Column-value map-string. (NotNull) + */ + public String extractCommonColumnValueMapString(Entity entity, String startBrace, String endBrace, String delimiter, String equal) { + return "map:" + startBrace + endBrace; + } + + + // ----------------------------------------------------- + // Convert + // ------- + public java.util.List convertToColumnValueList(Entity entity) { + return new java.util.ArrayList(convertToColumnValueMap(entity).values()); + } + + public java.util.Map convertToColumnValueMap(Entity entity) { + final Countries myEntity = downcast(entity); + final java.util.Map valueMap = new java.util.LinkedHashMap(); + valueMap.put("COUNTRIES_ID", myEntity.getCountriesId()); + valueMap.put("COUNTRIES_NAME", myEntity.getCountriesName()); + valueMap.put("COUNTRIES_ISO_CODE_2", myEntity.getCountriesIsoCode2()); + valueMap.put("COUNTRIES_ISO_CODE_3", myEntity.getCountriesIsoCode3()); + valueMap.put("ADDRESS_FORMAT_ID", myEntity.getAddressFormatId()); + return valueMap; + } + + public java.util.List convertToColumnStringValueList(Entity entity) { + return new java.util.ArrayList(convertToColumnStringValueMap(entity).values()); + } + + public java.util.Map convertToColumnStringValueMap(Entity entity) { + final Countries myEntity = downcast(entity); + final java.util.Map valueMap = new java.util.LinkedHashMap(); + valueMap.put("COUNTRIES_ID", helpGettingColumnStringValue(myEntity.getCountriesId())); + valueMap.put("COUNTRIES_NAME", helpGettingColumnStringValue(myEntity.getCountriesName())); + valueMap.put("COUNTRIES_ISO_CODE_2", helpGettingColumnStringValue(myEntity.getCountriesIsoCode2())); + valueMap.put("COUNTRIES_ISO_CODE_3", helpGettingColumnStringValue(myEntity.getCountriesIsoCode3())); + valueMap.put("ADDRESS_FORMAT_ID", helpGettingColumnStringValue(myEntity.getAddressFormatId())); + return valueMap; + } + + // =================================================================================== + // JDBC Support + // ============ + public String getPreparedInsertClause() { + return "insert into COUNTRIES(COUNTRIES_ID, COUNTRIES_NAME, COUNTRIES_ISO_CODE_2, COUNTRIES_ISO_CODE_3, ADDRESS_FORMAT_ID) values(? , ? , ? , ? , ? )"; + } + + public String getPreparedInsertClause(String tablePrefix) { + return "insert into " + tablePrefix + "COUNTRIES(COUNTRIES_ID, COUNTRIES_NAME, COUNTRIES_ISO_CODE_2, COUNTRIES_ISO_CODE_3, ADDRESS_FORMAT_ID) values(? , ? , ? , ? , ? )"; + } + + // =================================================================================== + // Helper + // ====== + protected Countries downcast(Entity entity) { + assertObjectNotNull("entity", entity); + try { + return (Countries)entity; + } catch (ClassCastException e) { + String msg = "The entity should be Countries but it was: " + entity.getClass(); + throw new IllegalStateException(msg, e); + } + } + + protected void checkDowncast(Entity entity) { + downcast(entity); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/dbmeta/CurrenciesDbm.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/dbmeta/CurrenciesDbm.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/dbmeta/CurrenciesDbm.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,784 @@ +package jp.sf.pal.pompei.bsentity.dbmeta; + + +import jp.sf.pal.pompei.allcommon.Entity; +import jp.sf.pal.pompei.allcommon.dbmeta.DBMeta; +import jp.sf.pal.pompei.allcommon.dbmeta.AbstractDBMeta; +import jp.sf.pal.pompei.exentity.Currencies; + +/** + * The dbmeta of CURRENCIES. (Singleton) + * + *
+ * [primary-key]
+ *     CURRENCIES_ID
+ * 
+ * [column-property]
+ *     CURRENCIES_ID, TITLE, CODE, SYMBOL_LEFT, SYMBOL_RIGHT, DECIMAL_POINT, THOUSANDS_POINT, DECIMAL_PLACES, VALUE, LAST_UPDATED
+ * 
+ * [foreign-property]
+ *     
+ * 
+ * [refferer-property]
+ *     
+ * 
+ * [sequence]
+ *     
+ * 
+ * [identity]
+ *     
+ * 
+ * [update-date]
+ *     
+ * 
+ * [version-no]
+ *     
+ * 
+ * 
+ * + * @author DBFlute(AutoGenerator) + */ +public class CurrenciesDbm extends AbstractDBMeta { + + // =================================================================================== + // Definition + // ========== + /** The type of entity. */ + protected static final Class ENTITY_TYPE = Currencies.class; + + /** Singleton instance. */ + private static final CurrenciesDbm _instance = new CurrenciesDbm(); + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + private CurrenciesDbm() { + } + + // =================================================================================== + // Singleton + // ========= + /** + * Get instance. + * + * @return Singleton instance. (NotNull) + */ + public static CurrenciesDbm getInstance() { + return _instance; + } + + // =================================================================================== + // Name Definition + // =============== + /** Table db name. */ + public static final String TABLE_DB_NAME = "CURRENCIES"; + + /** Table cap-prop name. */ + public static final String TABLE_CAP_PROP_NAME = "Currencies"; + + /** Table uncap-prop name. */ + public static final String TABLE_UNCAP_PROP_NAME = "currencies"; + + /** Db-name of CurrenciesId. */ + public static final String COLUMN_DB_NAME_OF_CurrenciesId = "CURRENCIES_ID"; + /** Db-name of Title. */ + public static final String COLUMN_DB_NAME_OF_Title = "TITLE"; + /** Db-name of Code. */ + public static final String COLUMN_DB_NAME_OF_Code = "CODE"; + /** Db-name of SymbolLeft. */ + public static final String COLUMN_DB_NAME_OF_SymbolLeft = "SYMBOL_LEFT"; + /** Db-name of SymbolRight. */ + public static final String COLUMN_DB_NAME_OF_SymbolRight = "SYMBOL_RIGHT"; + /** Db-name of DecimalPoint. */ + public static final String COLUMN_DB_NAME_OF_DecimalPoint = "DECIMAL_POINT"; + /** Db-name of ThousandsPoint. */ + public static final String COLUMN_DB_NAME_OF_ThousandsPoint = "THOUSANDS_POINT"; + /** Db-name of DecimalPlaces. */ + public static final String COLUMN_DB_NAME_OF_DecimalPlaces = "DECIMAL_PLACES"; + /** Db-name of Value. */ + public static final String COLUMN_DB_NAME_OF_Value = "VALUE"; + /** Db-name of LastUpdated. */ + public static final String COLUMN_DB_NAME_OF_LastUpdated = "LAST_UPDATED"; + + /** Cap-prop-name of CurrenciesId. */ + public static final String COLUMN_CAP_PROP_NAME_OF_CurrenciesId = "CurrenciesId"; + /** Cap-prop-name of Title. */ + public static final String COLUMN_CAP_PROP_NAME_OF_Title = "Title"; + /** Cap-prop-name of Code. */ + public static final String COLUMN_CAP_PROP_NAME_OF_Code = "Code"; + /** Cap-prop-name of SymbolLeft. */ + public static final String COLUMN_CAP_PROP_NAME_OF_SymbolLeft = "SymbolLeft"; + /** Cap-prop-name of SymbolRight. */ + public static final String COLUMN_CAP_PROP_NAME_OF_SymbolRight = "SymbolRight"; + /** Cap-prop-name of DecimalPoint. */ + public static final String COLUMN_CAP_PROP_NAME_OF_DecimalPoint = "DecimalPoint"; + /** Cap-prop-name of ThousandsPoint. */ + public static final String COLUMN_CAP_PROP_NAME_OF_ThousandsPoint = "ThousandsPoint"; + /** Cap-prop-name of DecimalPlaces. */ + public static final String COLUMN_CAP_PROP_NAME_OF_DecimalPlaces = "DecimalPlaces"; + /** Cap-prop-name of Value. */ + public static final String COLUMN_CAP_PROP_NAME_OF_Value = "Value"; + /** Cap-prop-name of LastUpdated. */ + public static final String COLUMN_CAP_PROP_NAME_OF_LastUpdated = "LastUpdated"; + + + + /** Uncap-prop-name of CurrenciesId. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_CurrenciesId = "currenciesId"; + /** Uncap-prop-name of Title. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_Title = "title"; + /** Uncap-prop-name of Code. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_Code = "code"; + /** Uncap-prop-name of SymbolLeft. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_SymbolLeft = "symbolLeft"; + /** Uncap-prop-name of SymbolRight. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_SymbolRight = "symbolRight"; + /** Uncap-prop-name of DecimalPoint. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_DecimalPoint = "decimalPoint"; + /** Uncap-prop-name of ThousandsPoint. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_ThousandsPoint = "thousandsPoint"; + /** Uncap-prop-name of DecimalPlaces. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_DecimalPlaces = "decimalPlaces"; + /** Uncap-prop-name of Value. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_Value = "value"; + /** Uncap-prop-name of LastUpdated. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_LastUpdated = "lastUpdated"; + + + + /** {db-name : cap-prop-name} map. */ + private static java.util.Map _dbNameCapPropNameMap; + protected static java.util.Map createDbNameCapPropNameMap() { + if (_dbNameCapPropNameMap != null) { + return _dbNameCapPropNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_DB_NAME, TABLE_CAP_PROP_NAME); + + map.put(COLUMN_DB_NAME_OF_CurrenciesId, COLUMN_CAP_PROP_NAME_OF_CurrenciesId); + map.put(COLUMN_DB_NAME_OF_Title, COLUMN_CAP_PROP_NAME_OF_Title); + map.put(COLUMN_DB_NAME_OF_Code, COLUMN_CAP_PROP_NAME_OF_Code); + map.put(COLUMN_DB_NAME_OF_SymbolLeft, COLUMN_CAP_PROP_NAME_OF_SymbolLeft); + map.put(COLUMN_DB_NAME_OF_SymbolRight, COLUMN_CAP_PROP_NAME_OF_SymbolRight); + map.put(COLUMN_DB_NAME_OF_DecimalPoint, COLUMN_CAP_PROP_NAME_OF_DecimalPoint); + map.put(COLUMN_DB_NAME_OF_ThousandsPoint, COLUMN_CAP_PROP_NAME_OF_ThousandsPoint); + map.put(COLUMN_DB_NAME_OF_DecimalPlaces, COLUMN_CAP_PROP_NAME_OF_DecimalPlaces); + map.put(COLUMN_DB_NAME_OF_Value, COLUMN_CAP_PROP_NAME_OF_Value); + map.put(COLUMN_DB_NAME_OF_LastUpdated, COLUMN_CAP_PROP_NAME_OF_LastUpdated); + + _dbNameCapPropNameMap = java.util.Collections.unmodifiableMap(map); + return _dbNameCapPropNameMap; + } + + /** {db-name : uncap-prop-name} map. */ + private static java.util.Map _dbNameUncapPropNameMap; + protected static java.util.Map createDbNameUncapPropNameMap() { + if (_dbNameUncapPropNameMap != null) { + return _dbNameUncapPropNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_DB_NAME, TABLE_UNCAP_PROP_NAME); + + map.put(COLUMN_DB_NAME_OF_CurrenciesId, COLUMN_UNCAP_PROP_NAME_OF_CurrenciesId); + map.put(COLUMN_DB_NAME_OF_Title, COLUMN_UNCAP_PROP_NAME_OF_Title); + map.put(COLUMN_DB_NAME_OF_Code, COLUMN_UNCAP_PROP_NAME_OF_Code); + map.put(COLUMN_DB_NAME_OF_SymbolLeft, COLUMN_UNCAP_PROP_NAME_OF_SymbolLeft); + map.put(COLUMN_DB_NAME_OF_SymbolRight, COLUMN_UNCAP_PROP_NAME_OF_SymbolRight); + map.put(COLUMN_DB_NAME_OF_DecimalPoint, COLUMN_UNCAP_PROP_NAME_OF_DecimalPoint); + map.put(COLUMN_DB_NAME_OF_ThousandsPoint, COLUMN_UNCAP_PROP_NAME_OF_ThousandsPoint); + map.put(COLUMN_DB_NAME_OF_DecimalPlaces, COLUMN_UNCAP_PROP_NAME_OF_DecimalPlaces); + map.put(COLUMN_DB_NAME_OF_Value, COLUMN_UNCAP_PROP_NAME_OF_Value); + map.put(COLUMN_DB_NAME_OF_LastUpdated, COLUMN_UNCAP_PROP_NAME_OF_LastUpdated); + + _dbNameUncapPropNameMap = java.util.Collections.unmodifiableMap(map); + return _dbNameUncapPropNameMap; + } + + /** {cap-prop-name : db-name} map. */ + private static java.util.Map _capPropNameDbNameMap; + protected static java.util.Map createCapPropNameDbNameMap() { + if (_capPropNameDbNameMap != null) { + return _capPropNameDbNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_CAP_PROP_NAME, TABLE_DB_NAME); + + map.put(COLUMN_CAP_PROP_NAME_OF_CurrenciesId, COLUMN_DB_NAME_OF_CurrenciesId); + map.put(COLUMN_CAP_PROP_NAME_OF_Title, COLUMN_DB_NAME_OF_Title); + map.put(COLUMN_CAP_PROP_NAME_OF_Code, COLUMN_DB_NAME_OF_Code); + map.put(COLUMN_CAP_PROP_NAME_OF_SymbolLeft, COLUMN_DB_NAME_OF_SymbolLeft); + map.put(COLUMN_CAP_PROP_NAME_OF_SymbolRight, COLUMN_DB_NAME_OF_SymbolRight); + map.put(COLUMN_CAP_PROP_NAME_OF_DecimalPoint, COLUMN_DB_NAME_OF_DecimalPoint); + map.put(COLUMN_CAP_PROP_NAME_OF_ThousandsPoint, COLUMN_DB_NAME_OF_ThousandsPoint); + map.put(COLUMN_CAP_PROP_NAME_OF_DecimalPlaces, COLUMN_DB_NAME_OF_DecimalPlaces); + map.put(COLUMN_CAP_PROP_NAME_OF_Value, COLUMN_DB_NAME_OF_Value); + map.put(COLUMN_CAP_PROP_NAME_OF_LastUpdated, COLUMN_DB_NAME_OF_LastUpdated); + + _capPropNameDbNameMap = java.util.Collections.unmodifiableMap(map); + return _capPropNameDbNameMap; + } + + /** {cap-prop-name : uncap-prop-name} map. */ + private static java.util.Map _capPropNameUncapPropNameMap; + protected static java.util.Map createCapPropNameUncapPropNameMap() { + if (_capPropNameUncapPropNameMap != null) { + return _capPropNameUncapPropNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_CAP_PROP_NAME, TABLE_UNCAP_PROP_NAME); + + map.put(COLUMN_CAP_PROP_NAME_OF_CurrenciesId, COLUMN_UNCAP_PROP_NAME_OF_CurrenciesId); + map.put(COLUMN_CAP_PROP_NAME_OF_Title, COLUMN_UNCAP_PROP_NAME_OF_Title); + map.put(COLUMN_CAP_PROP_NAME_OF_Code, COLUMN_UNCAP_PROP_NAME_OF_Code); + map.put(COLUMN_CAP_PROP_NAME_OF_SymbolLeft, COLUMN_UNCAP_PROP_NAME_OF_SymbolLeft); + map.put(COLUMN_CAP_PROP_NAME_OF_SymbolRight, COLUMN_UNCAP_PROP_NAME_OF_SymbolRight); + map.put(COLUMN_CAP_PROP_NAME_OF_DecimalPoint, COLUMN_UNCAP_PROP_NAME_OF_DecimalPoint); + map.put(COLUMN_CAP_PROP_NAME_OF_ThousandsPoint, COLUMN_UNCAP_PROP_NAME_OF_ThousandsPoint); + map.put(COLUMN_CAP_PROP_NAME_OF_DecimalPlaces, COLUMN_UNCAP_PROP_NAME_OF_DecimalPlaces); + map.put(COLUMN_CAP_PROP_NAME_OF_Value, COLUMN_UNCAP_PROP_NAME_OF_Value); + map.put(COLUMN_CAP_PROP_NAME_OF_LastUpdated, COLUMN_UNCAP_PROP_NAME_OF_LastUpdated); + + _capPropNameUncapPropNameMap = java.util.Collections.unmodifiableMap(map); + return _capPropNameUncapPropNameMap; + } + + /** {uncap-prop-name : db-name} map. */ + private static java.util.Map _uncapPropNameDbNameMap; + protected static java.util.Map createUncapPropNameDbNameMap() { + if (_uncapPropNameDbNameMap != null) { + return _uncapPropNameDbNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_UNCAP_PROP_NAME, TABLE_DB_NAME); + + map.put(COLUMN_UNCAP_PROP_NAME_OF_CurrenciesId, COLUMN_DB_NAME_OF_CurrenciesId); + map.put(COLUMN_UNCAP_PROP_NAME_OF_Title, COLUMN_DB_NAME_OF_Title); + map.put(COLUMN_UNCAP_PROP_NAME_OF_Code, COLUMN_DB_NAME_OF_Code); + map.put(COLUMN_UNCAP_PROP_NAME_OF_SymbolLeft, COLUMN_DB_NAME_OF_SymbolLeft); + map.put(COLUMN_UNCAP_PROP_NAME_OF_SymbolRight, COLUMN_DB_NAME_OF_SymbolRight); + map.put(COLUMN_UNCAP_PROP_NAME_OF_DecimalPoint, COLUMN_DB_NAME_OF_DecimalPoint); + map.put(COLUMN_UNCAP_PROP_NAME_OF_ThousandsPoint, COLUMN_DB_NAME_OF_ThousandsPoint); + map.put(COLUMN_UNCAP_PROP_NAME_OF_DecimalPlaces, COLUMN_DB_NAME_OF_DecimalPlaces); + map.put(COLUMN_UNCAP_PROP_NAME_OF_Value, COLUMN_DB_NAME_OF_Value); + map.put(COLUMN_UNCAP_PROP_NAME_OF_LastUpdated, COLUMN_DB_NAME_OF_LastUpdated); + + _uncapPropNameDbNameMap = java.util.Collections.unmodifiableMap(map); + return _uncapPropNameDbNameMap; + } + + /** {uncap-prop-name : cap-prop-name} map. */ + private static java.util.Map _uncapPropNameCapPropNameMap; + protected static java.util.Map createUncapPropNameCapPropNameMap() { + if (_uncapPropNameCapPropNameMap != null) { + return _uncapPropNameCapPropNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_UNCAP_PROP_NAME, TABLE_CAP_PROP_NAME); + + map.put(COLUMN_UNCAP_PROP_NAME_OF_CurrenciesId, COLUMN_CAP_PROP_NAME_OF_CurrenciesId); + map.put(COLUMN_UNCAP_PROP_NAME_OF_Title, COLUMN_CAP_PROP_NAME_OF_Title); + map.put(COLUMN_UNCAP_PROP_NAME_OF_Code, COLUMN_CAP_PROP_NAME_OF_Code); + map.put(COLUMN_UNCAP_PROP_NAME_OF_SymbolLeft, COLUMN_CAP_PROP_NAME_OF_SymbolLeft); + map.put(COLUMN_UNCAP_PROP_NAME_OF_SymbolRight, COLUMN_CAP_PROP_NAME_OF_SymbolRight); + map.put(COLUMN_UNCAP_PROP_NAME_OF_DecimalPoint, COLUMN_CAP_PROP_NAME_OF_DecimalPoint); + map.put(COLUMN_UNCAP_PROP_NAME_OF_ThousandsPoint, COLUMN_CAP_PROP_NAME_OF_ThousandsPoint); + map.put(COLUMN_UNCAP_PROP_NAME_OF_DecimalPlaces, COLUMN_CAP_PROP_NAME_OF_DecimalPlaces); + map.put(COLUMN_UNCAP_PROP_NAME_OF_Value, COLUMN_CAP_PROP_NAME_OF_Value); + map.put(COLUMN_UNCAP_PROP_NAME_OF_LastUpdated, COLUMN_CAP_PROP_NAME_OF_LastUpdated); + + _uncapPropNameCapPropNameMap = java.util.Collections.unmodifiableMap(map); + return _uncapPropNameCapPropNameMap; + } + + // =================================================================================== + // Name-Map + // ======== + /** + * This method implements the method that is declared at super. + * + * @return {db-name : cap-prop-name} map. + */ + public java.util.Map getDbNameCapPropNameMap() { + return createDbNameCapPropNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {db-name : uncap-prop-name} map. + */ + public java.util.Map getDbNameUncapPropNameMap() { + return createDbNameUncapPropNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {cap-prop-name : db-name} map. + */ + public java.util.Map getCapPropNameDbNameMap() { + return createCapPropNameDbNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {cap-prop-name : uncap-prop-name} map. + */ + public java.util.Map getCapPropNameUncapPropNameMap() { + return createCapPropNameUncapPropNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {uncap-prop-name : db-name} map. + */ + public java.util.Map getUncapPropNameDbNameMap() { + return createUncapPropNameDbNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {uncap-prop-name : cap-prop-name} map. + */ + public java.util.Map getUncapPropNameCapPropNameMap() { + return createUncapPropNameCapPropNameMap(); + } + + // =================================================================================== + // Table Name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + public String getTableDbName() { + return TABLE_DB_NAME; + } + + /** + * This method implements the method that is declared at super. + * + * @return Table cap-prop-name. (NotNull) + */ + public String getTableCapPropName() { + return TABLE_CAP_PROP_NAME; + } + + /** + * This method implements the method that is declared at super. + * + * @return Table property-name. (NotNull) + */ + public String getTableUncapPropName() { + return TABLE_UNCAP_PROP_NAME; + } + + // =================================================================================== + // Column Name + // =========== + public java.util.List getColumnDbNameList() { + final String[] columns = getColumnDbNameCommaString().split(","); + final java.util.List resultList = new java.util.ArrayList(); + for (int i=0; i < columns.length; i++) { + resultList.add(columns[i].trim()); + } + return resultList; + } + + public java.util.List getColumnCapPropNameList() { + final java.util.List columnDbNameList = getColumnDbNameList(); + final java.util.List resultList = new java.util.ArrayList(); + for (final java.util.Iterator ite = columnDbNameList.iterator(); ite.hasNext(); ) { + resultList.add(getDbNameCapPropNameMap().get((String)ite.next())); + } + return resultList; + } + + public java.util.List getColumnUncapPropNameList() { + final java.util.List columnDbNameList = getColumnDbNameList(); + final java.util.List resultList = new java.util.ArrayList(); + for (final java.util.Iterator ite = columnDbNameList.iterator(); ite.hasNext(); ) { + resultList.add(getDbNameUncapPropNameMap().get((String)ite.next())); + } + return resultList; + } + + /** + * This method implements the method that is declared at super. + * + * @return Column-db-name comma-string. (NotNull) + */ + public String getColumnDbNameCommaString() { + return "CURRENCIES_ID, TITLE, CODE, SYMBOL_LEFT, SYMBOL_RIGHT, DECIMAL_POINT, THOUSANDS_POINT, DECIMAL_PLACES, VALUE, LAST_UPDATED"; + } + + // =================================================================================== + // Type Name + // ========= + /** + * This method implements the method that is declared at super. + * + * @return The type-name of entity. (NotNull) + */ + public String getEntityTypeName() { + return "jp.sf.pal.pompei.exentity.Currencies"; + } + + /** + * This method implements the method that is declared at super. + * + * @return The type-name of condition-bean. (NotNull) + */ + public String getConditionBeanTypeName() { + return "jp.sf.pal.pompei.cbean.bs.CurrenciesCB"; + } + + /** + * This method implements the method that is declared at super. + * + * @return The type-name of dao. (NotNull) + */ + public String getDaoTypeName() { + return "jp.sf.pal.pompei.exdao.CurrenciesDao"; + } + + /** + * This method implements the method that is declared at super. + * + * @return The type-name of behavior. (NotNull) + */ + public String getBehaviorTypeName() { + return "jp.sf.pal.pompei.exbhv.CurrenciesBhv"; + } + + // =================================================================================== + // Type + // ==== + /** + * This method implements the method that is declared at super. + * + * @return The type of entity. (NotNull) + */ + public Class getEntityType() { + return ENTITY_TYPE; + } + + // =================================================================================== + // Instance + // ======== + /** + * This method implements the method that is declared at super. + * + * @return The type of entity. (NotNull) + */ + public Entity newEntity() { + return newMyEntity(); + } + + /** + * New the instance of my entity. + * + * @return The instance of my entity. (NotNull) + */ + public Currencies newMyEntity() { + return new Currencies(); + } + + // =================================================================================== + // Foreign DBMeta + // ============== + /** + * This method implements the method that is declared at super. + * + * @param foreignPropertyName Foreign-property-name(Both OK - InitCap or not). (NotNull) + * @return Foreign DBMeta. (NotNull) + */ + public DBMeta getForeignDBMeta(String foreignPropertyName) { + assertStringNotNullAndNotTrimmedEmpty("foreignPropertyName", foreignPropertyName); + final String methodName = "getForeignDBMeta_" + foreignPropertyName.substring(0, 1) + foreignPropertyName.substring(1); + + java.lang.reflect.Method method = null; + try { + method = this.getClass().getMethod(methodName, new Class[]{}); + } catch (NoSuchMethodException e) { + String msg = "The foreignPropertyName is not found: foreignPropertyName=" + foreignPropertyName; + msg = msg + " tableName=" + TABLE_DB_NAME + " methodName=" + methodName; + throw new RuntimeException(msg, e); + } + try { + return (DBMeta)method.invoke(this, new Object[]{}); + } catch (IllegalAccessException e) { + throw new RuntimeException(e); + } catch (java.lang.reflect.InvocationTargetException e) { + throw new RuntimeException(e.getCause()); + } + } + + // =================================================================================== + // Determination + // ============= + /** + * This method implements the method that is declared at super. + * + * @return Determination. + */ + public boolean hasTwoOrMorePrimaryKeys() { + return false; + } + + /** + * This method implements the method that is declared at super. + * + * @return Determination. + */ + public boolean hasCommonColumn() { + return false; + } + + // =================================================================================== + // Entity Handling + // =============== + // ----------------------------------------------------- + // Accept + // ------ + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @param primaryKeyMap Primary key map. (NotNull and NotEmpty) + */ + public void acceptPrimaryKeyMap(Entity entity, java.util.Map primaryKeyMap) { + final Currencies myEntity = (Currencies)entity; + MapAssertUtil.assertPrimaryKeyMapNotNullAndNotEmpty(primaryKeyMap); + final MapStringValueAnalyzer analyzer = new MapStringValueAnalyzer(primaryKeyMap, entity.getModifiedPropertyNames()); + + MapAssertUtil.assertColumnExistingInPrimaryKeyMap(primaryKeyMap, "CURRENCIES_ID"); + if (analyzer.init("CURRENCIES_ID", "currenciesId", "currenciesId")) { myEntity.setCurrenciesId(analyzer.analyzeNumber(java.math.BigDecimal.class)); }; + + + } + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @param primaryKeyMapString Primary-key map-string. (NotNull and NotEmpty) + */ + public void acceptPrimaryKeyMapString(Entity entity, String primaryKeyMapString) { + MapStringUtil.acceptPrimaryKeyMapString(primaryKeyMapString, entity); + } + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @param columnValueMap Column-value map. (NotNull and NotEmpty) + */ + public void acceptColumnValueMap(Entity entity, java.util.Map columnValueMap) { + final Currencies myEntity = (Currencies)entity; + MapAssertUtil.assertColumnValueMapNotNullAndNotEmpty(columnValueMap); + final MapStringValueAnalyzer analyzer = new MapStringValueAnalyzer(columnValueMap, entity.getModifiedPropertyNames()); + + if (analyzer.init("CURRENCIES_ID", "currenciesId", "currenciesId")) { myEntity.setCurrenciesId(analyzer.analyzeNumber(java.math.BigDecimal.class)); }; + if (analyzer.init("TITLE", "title", "title")) { myEntity.setTitle(analyzer.analyzeString(String.class)); }; + if (analyzer.init("CODE", "code", "code")) { myEntity.setCode(analyzer.analyzeString(String.class)); }; + if (analyzer.init("SYMBOL_LEFT", "symbolLeft", "symbolLeft")) { myEntity.setSymbolLeft(analyzer.analyzeString(String.class)); }; + if (analyzer.init("SYMBOL_RIGHT", "symbolRight", "symbolRight")) { myEntity.setSymbolRight(analyzer.analyzeString(String.class)); }; + if (analyzer.init("DECIMAL_POINT", "decimalPoint", "decimalPoint")) { myEntity.setDecimalPoint(analyzer.analyzeString(String.class)); }; + if (analyzer.init("THOUSANDS_POINT", "thousandsPoint", "thousandsPoint")) { myEntity.setThousandsPoint(analyzer.analyzeString(String.class)); }; + if (analyzer.init("DECIMAL_PLACES", "decimalPlaces", "decimalPlaces")) { myEntity.setDecimalPlaces(analyzer.analyzeString(String.class)); }; + if (analyzer.init("VALUE", "value", "value")) { myEntity.setValue(analyzer.analyzeNumber(java.math.BigDecimal.class)); }; + if (analyzer.init("LAST_UPDATED", "lastUpdated", "lastUpdated")) { myEntity.setLastUpdated(analyzer.analyzeDate(java.sql.Timestamp.class)); }; + + } + + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @param columnValueMapString Column-value map-string. (NotNull and NotEmpty) + */ + public void acceptColumnValueMapString(Entity entity, String columnValueMapString) { + MapStringUtil.acceptColumnValueMapString(columnValueMapString, entity); + } + + + // ----------------------------------------------------- + // Extract + // ------- + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @return Primary-key map-string. (NotNull) + */ + public String extractPrimaryKeyMapString(Entity entity) { + return MapStringUtil.extractPrimaryKeyMapString(entity); + } + + /** + * Extract primary-key map-string. + * + * @param entity Target entity. (NotNull) + * @param startBrace Start-brace. (NotNull) + * @param endBrace End-brace. (NotNull) + * @param delimiter Delimiter. (NotNull) + * @param equal Equal. (NotNull) + * @return Primary-key map-string. (NotNull) + */ + public String extractPrimaryKeyMapString(Entity entity, String startBrace, String endBrace, String delimiter, String equal) { + final Currencies myEntity = (Currencies)entity; + final String mapMarkAndStartBrace = MAP_STRING_MAP_MARK + startBrace; + final StringBuffer sb = new StringBuffer(); + helpAppendingColumnValueString(sb, delimiter, equal, "CURRENCIES_ID", myEntity.getCurrenciesId()); + + sb.delete(0, delimiter.length()).insert(0, mapMarkAndStartBrace).append(endBrace); + return sb.toString(); + + } + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @return Column-value map-string. (NotNull) + */ + public String extractColumnValueMapString(Entity entity) { + return MapStringUtil.extractColumnValueMapString(entity); + } + + /** + * Extract column-value map-string. + * + * @param entity Target entity. (NotNull) + * @param startBrace Start-brace. (NotNull) + * @param endBrace End-brace. (NotNull) + * @param delimiter Delimiter. (NotNull) + * @param equal Equal. (NotNull) + * @return Column-value map-string. (NotNull) + */ + public String extractColumnValueMapString(Entity entity, String startBrace, String endBrace, String delimiter, String equal) { + final Currencies myEntity = (Currencies)entity; + final String mapMarkAndStartBrace = MAP_STRING_MAP_MARK + startBrace; + final StringBuffer sb = new StringBuffer(); + helpAppendingColumnValueString(sb, delimiter, equal, "CURRENCIES_ID", myEntity.getCurrenciesId()); + helpAppendingColumnValueString(sb, delimiter, equal, "TITLE", myEntity.getTitle()); + helpAppendingColumnValueString(sb, delimiter, equal, "CODE", myEntity.getCode()); + helpAppendingColumnValueString(sb, delimiter, equal, "SYMBOL_LEFT", myEntity.getSymbolLeft()); + helpAppendingColumnValueString(sb, delimiter, equal, "SYMBOL_RIGHT", myEntity.getSymbolRight()); + helpAppendingColumnValueString(sb, delimiter, equal, "DECIMAL_POINT", myEntity.getDecimalPoint()); + helpAppendingColumnValueString(sb, delimiter, equal, "THOUSANDS_POINT", myEntity.getThousandsPoint()); + helpAppendingColumnValueString(sb, delimiter, equal, "DECIMAL_PLACES", myEntity.getDecimalPlaces()); + helpAppendingColumnValueString(sb, delimiter, equal, "VALUE", myEntity.getValue()); + helpAppendingColumnValueString(sb, delimiter, equal, "LAST_UPDATED", myEntity.getLastUpdated()); + + sb.delete(0, delimiter.length()).insert(0, mapMarkAndStartBrace).append(endBrace); + return sb.toString(); + } + + private void helpAppendingColumnValueString(StringBuffer sb, String delimiter, String equal, String colName, Object value) { + sb.append(delimiter).append(colName).append(equal); + sb.append(helpGettingColumnStringValue(value)); + } + + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @return Column-value map-string. (NotNull) + */ + public String extractCommonColumnValueMapString(Entity entity) { + return "map:{}"; + } + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @return Column-value map-string. (NotNull) + */ + public String extractCommonColumnValueMapString(Entity entity, String startBrace, String endBrace, String delimiter, String equal) { + return "map:" + startBrace + endBrace; + } + + + // ----------------------------------------------------- + // Convert + // ------- + public java.util.List convertToColumnValueList(Entity entity) { + return new java.util.ArrayList(convertToColumnValueMap(entity).values()); + } + + public java.util.Map convertToColumnValueMap(Entity entity) { + final Currencies myEntity = downcast(entity); + final java.util.Map valueMap = new java.util.LinkedHashMap(); + valueMap.put("CURRENCIES_ID", myEntity.getCurrenciesId()); + valueMap.put("TITLE", myEntity.getTitle()); + valueMap.put("CODE", myEntity.getCode()); + valueMap.put("SYMBOL_LEFT", myEntity.getSymbolLeft()); + valueMap.put("SYMBOL_RIGHT", myEntity.getSymbolRight()); + valueMap.put("DECIMAL_POINT", myEntity.getDecimalPoint()); + valueMap.put("THOUSANDS_POINT", myEntity.getThousandsPoint()); + valueMap.put("DECIMAL_PLACES", myEntity.getDecimalPlaces()); + valueMap.put("VALUE", myEntity.getValue()); + valueMap.put("LAST_UPDATED", myEntity.getLastUpdated()); + return valueMap; + } + + public java.util.List convertToColumnStringValueList(Entity entity) { + return new java.util.ArrayList(convertToColumnStringValueMap(entity).values()); + } + + public java.util.Map convertToColumnStringValueMap(Entity entity) { + final Currencies myEntity = downcast(entity); + final java.util.Map valueMap = new java.util.LinkedHashMap(); + valueMap.put("CURRENCIES_ID", helpGettingColumnStringValue(myEntity.getCurrenciesId())); + valueMap.put("TITLE", helpGettingColumnStringValue(myEntity.getTitle())); + valueMap.put("CODE", helpGettingColumnStringValue(myEntity.getCode())); + valueMap.put("SYMBOL_LEFT", helpGettingColumnStringValue(myEntity.getSymbolLeft())); + valueMap.put("SYMBOL_RIGHT", helpGettingColumnStringValue(myEntity.getSymbolRight())); + valueMap.put("DECIMAL_POINT", helpGettingColumnStringValue(myEntity.getDecimalPoint())); + valueMap.put("THOUSANDS_POINT", helpGettingColumnStringValue(myEntity.getThousandsPoint())); + valueMap.put("DECIMAL_PLACES", helpGettingColumnStringValue(myEntity.getDecimalPlaces())); + valueMap.put("VALUE", helpGettingColumnStringValue(myEntity.getValue())); + valueMap.put("LAST_UPDATED", helpGettingColumnStringValue(myEntity.getLastUpdated())); + return valueMap; + } + + // =================================================================================== + // JDBC Support + // ============ + public String getPreparedInsertClause() { + return "insert into CURRENCIES(CURRENCIES_ID, TITLE, CODE, SYMBOL_LEFT, SYMBOL_RIGHT, DECIMAL_POINT, THOUSANDS_POINT, DECIMAL_PLACES, VALUE, LAST_UPDATED) values(? , ? , ? , ? , ? , ? , ? , ? , ? , ? )"; + } + + public String getPreparedInsertClause(String tablePrefix) { + return "insert into " + tablePrefix + "CURRENCIES(CURRENCIES_ID, TITLE, CODE, SYMBOL_LEFT, SYMBOL_RIGHT, DECIMAL_POINT, THOUSANDS_POINT, DECIMAL_PLACES, VALUE, LAST_UPDATED) values(? , ? , ? , ? , ? , ? , ? , ? , ? , ? )"; + } + + // =================================================================================== + // Helper + // ====== + protected Currencies downcast(Entity entity) { + assertObjectNotNull("entity", entity); + try { + return (Currencies)entity; + } catch (ClassCastException e) { + String msg = "The entity should be Currencies but it was: " + entity.getClass(); + throw new IllegalStateException(msg, e); + } + } + + protected void checkDowncast(Entity entity) { + downcast(entity); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/dbmeta/CustomersBasketAttributesDbm.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/dbmeta/CustomersBasketAttributesDbm.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/dbmeta/CustomersBasketAttributesDbm.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,704 @@ +package jp.sf.pal.pompei.bsentity.dbmeta; + + +import jp.sf.pal.pompei.allcommon.Entity; +import jp.sf.pal.pompei.allcommon.dbmeta.DBMeta; +import jp.sf.pal.pompei.allcommon.dbmeta.AbstractDBMeta; +import jp.sf.pal.pompei.exentity.CustomersBasketAttributes; + +/** + * The dbmeta of CUSTOMERS_BASKET_ATTRIBUTES. (Singleton) + * + *
+ * [primary-key]
+ *     CUSTOMERS_BASKET_ATTRIBUTES_ID
+ * 
+ * [column-property]
+ *     CUSTOMERS_BASKET_ATTRIBUTES_ID, CUSTOMERS_ID, PRODUCTS_ID, PRODUCTS_OPTIONS_ID, PRODUCTS_OPTIONS_VALUE_ID
+ * 
+ * [foreign-property]
+ *     
+ * 
+ * [refferer-property]
+ *     
+ * 
+ * [sequence]
+ *     
+ * 
+ * [identity]
+ *     
+ * 
+ * [update-date]
+ *     
+ * 
+ * [version-no]
+ *     
+ * 
+ * 
+ * + * @author DBFlute(AutoGenerator) + */ +public class CustomersBasketAttributesDbm extends AbstractDBMeta { + + // =================================================================================== + // Definition + // ========== + /** The type of entity. */ + protected static final Class ENTITY_TYPE = CustomersBasketAttributes.class; + + /** Singleton instance. */ + private static final CustomersBasketAttributesDbm _instance = new CustomersBasketAttributesDbm(); + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + private CustomersBasketAttributesDbm() { + } + + // =================================================================================== + // Singleton + // ========= + /** + * Get instance. + * + * @return Singleton instance. (NotNull) + */ + public static CustomersBasketAttributesDbm getInstance() { + return _instance; + } + + // =================================================================================== + // Name Definition + // =============== + /** Table db name. */ + public static final String TABLE_DB_NAME = "CUSTOMERS_BASKET_ATTRIBUTES"; + + /** Table cap-prop name. */ + public static final String TABLE_CAP_PROP_NAME = "CustomersBasketAttributes"; + + /** Table uncap-prop name. */ + public static final String TABLE_UNCAP_PROP_NAME = "customersBasketAttributes"; + + /** Db-name of CustomersBasketAttributesId. */ + public static final String COLUMN_DB_NAME_OF_CustomersBasketAttributesId = "CUSTOMERS_BASKET_ATTRIBUTES_ID"; + /** Db-name of CustomersId. */ + public static final String COLUMN_DB_NAME_OF_CustomersId = "CUSTOMERS_ID"; + /** Db-name of ProductsId. */ + public static final String COLUMN_DB_NAME_OF_ProductsId = "PRODUCTS_ID"; + /** Db-name of ProductsOptionsId. */ + public static final String COLUMN_DB_NAME_OF_ProductsOptionsId = "PRODUCTS_OPTIONS_ID"; + /** Db-name of ProductsOptionsValueId. */ + public static final String COLUMN_DB_NAME_OF_ProductsOptionsValueId = "PRODUCTS_OPTIONS_VALUE_ID"; + + /** Cap-prop-name of CustomersBasketAttributesId. */ + public static final String COLUMN_CAP_PROP_NAME_OF_CustomersBasketAttributesId = "CustomersBasketAttributesId"; + /** Cap-prop-name of CustomersId. */ + public static final String COLUMN_CAP_PROP_NAME_OF_CustomersId = "CustomersId"; + /** Cap-prop-name of ProductsId. */ + public static final String COLUMN_CAP_PROP_NAME_OF_ProductsId = "ProductsId"; + /** Cap-prop-name of ProductsOptionsId. */ + public static final String COLUMN_CAP_PROP_NAME_OF_ProductsOptionsId = "ProductsOptionsId"; + /** Cap-prop-name of ProductsOptionsValueId. */ + public static final String COLUMN_CAP_PROP_NAME_OF_ProductsOptionsValueId = "ProductsOptionsValueId"; + + + + /** Uncap-prop-name of CustomersBasketAttributesId. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_CustomersBasketAttributesId = "customersBasketAttributesId"; + /** Uncap-prop-name of CustomersId. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_CustomersId = "customersId"; + /** Uncap-prop-name of ProductsId. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_ProductsId = "productsId"; + /** Uncap-prop-name of ProductsOptionsId. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_ProductsOptionsId = "productsOptionsId"; + /** Uncap-prop-name of ProductsOptionsValueId. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_ProductsOptionsValueId = "productsOptionsValueId"; + + + + /** {db-name : cap-prop-name} map. */ + private static java.util.Map _dbNameCapPropNameMap; + protected static java.util.Map createDbNameCapPropNameMap() { + if (_dbNameCapPropNameMap != null) { + return _dbNameCapPropNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_DB_NAME, TABLE_CAP_PROP_NAME); + + map.put(COLUMN_DB_NAME_OF_CustomersBasketAttributesId, COLUMN_CAP_PROP_NAME_OF_CustomersBasketAttributesId); + map.put(COLUMN_DB_NAME_OF_CustomersId, COLUMN_CAP_PROP_NAME_OF_CustomersId); + map.put(COLUMN_DB_NAME_OF_ProductsId, COLUMN_CAP_PROP_NAME_OF_ProductsId); + map.put(COLUMN_DB_NAME_OF_ProductsOptionsId, COLUMN_CAP_PROP_NAME_OF_ProductsOptionsId); + map.put(COLUMN_DB_NAME_OF_ProductsOptionsValueId, COLUMN_CAP_PROP_NAME_OF_ProductsOptionsValueId); + + _dbNameCapPropNameMap = java.util.Collections.unmodifiableMap(map); + return _dbNameCapPropNameMap; + } + + /** {db-name : uncap-prop-name} map. */ + private static java.util.Map _dbNameUncapPropNameMap; + protected static java.util.Map createDbNameUncapPropNameMap() { + if (_dbNameUncapPropNameMap != null) { + return _dbNameUncapPropNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_DB_NAME, TABLE_UNCAP_PROP_NAME); + + map.put(COLUMN_DB_NAME_OF_CustomersBasketAttributesId, COLUMN_UNCAP_PROP_NAME_OF_CustomersBasketAttributesId); + map.put(COLUMN_DB_NAME_OF_CustomersId, COLUMN_UNCAP_PROP_NAME_OF_CustomersId); + map.put(COLUMN_DB_NAME_OF_ProductsId, COLUMN_UNCAP_PROP_NAME_OF_ProductsId); + map.put(COLUMN_DB_NAME_OF_ProductsOptionsId, COLUMN_UNCAP_PROP_NAME_OF_ProductsOptionsId); + map.put(COLUMN_DB_NAME_OF_ProductsOptionsValueId, COLUMN_UNCAP_PROP_NAME_OF_ProductsOptionsValueId); + + _dbNameUncapPropNameMap = java.util.Collections.unmodifiableMap(map); + return _dbNameUncapPropNameMap; + } + + /** {cap-prop-name : db-name} map. */ + private static java.util.Map _capPropNameDbNameMap; + protected static java.util.Map createCapPropNameDbNameMap() { + if (_capPropNameDbNameMap != null) { + return _capPropNameDbNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_CAP_PROP_NAME, TABLE_DB_NAME); + + map.put(COLUMN_CAP_PROP_NAME_OF_CustomersBasketAttributesId, COLUMN_DB_NAME_OF_CustomersBasketAttributesId); + map.put(COLUMN_CAP_PROP_NAME_OF_CustomersId, COLUMN_DB_NAME_OF_CustomersId); + map.put(COLUMN_CAP_PROP_NAME_OF_ProductsId, COLUMN_DB_NAME_OF_ProductsId); + map.put(COLUMN_CAP_PROP_NAME_OF_ProductsOptionsId, COLUMN_DB_NAME_OF_ProductsOptionsId); + map.put(COLUMN_CAP_PROP_NAME_OF_ProductsOptionsValueId, COLUMN_DB_NAME_OF_ProductsOptionsValueId); + + _capPropNameDbNameMap = java.util.Collections.unmodifiableMap(map); + return _capPropNameDbNameMap; + } + + /** {cap-prop-name : uncap-prop-name} map. */ + private static java.util.Map _capPropNameUncapPropNameMap; + protected static java.util.Map createCapPropNameUncapPropNameMap() { + if (_capPropNameUncapPropNameMap != null) { + return _capPropNameUncapPropNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_CAP_PROP_NAME, TABLE_UNCAP_PROP_NAME); + + map.put(COLUMN_CAP_PROP_NAME_OF_CustomersBasketAttributesId, COLUMN_UNCAP_PROP_NAME_OF_CustomersBasketAttributesId); + map.put(COLUMN_CAP_PROP_NAME_OF_CustomersId, COLUMN_UNCAP_PROP_NAME_OF_CustomersId); + map.put(COLUMN_CAP_PROP_NAME_OF_ProductsId, COLUMN_UNCAP_PROP_NAME_OF_ProductsId); + map.put(COLUMN_CAP_PROP_NAME_OF_ProductsOptionsId, COLUMN_UNCAP_PROP_NAME_OF_ProductsOptionsId); + map.put(COLUMN_CAP_PROP_NAME_OF_ProductsOptionsValueId, COLUMN_UNCAP_PROP_NAME_OF_ProductsOptionsValueId); + + _capPropNameUncapPropNameMap = java.util.Collections.unmodifiableMap(map); + return _capPropNameUncapPropNameMap; + } + + /** {uncap-prop-name : db-name} map. */ + private static java.util.Map _uncapPropNameDbNameMap; + protected static java.util.Map createUncapPropNameDbNameMap() { + if (_uncapPropNameDbNameMap != null) { + return _uncapPropNameDbNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_UNCAP_PROP_NAME, TABLE_DB_NAME); + + map.put(COLUMN_UNCAP_PROP_NAME_OF_CustomersBasketAttributesId, COLUMN_DB_NAME_OF_CustomersBasketAttributesId); + map.put(COLUMN_UNCAP_PROP_NAME_OF_CustomersId, COLUMN_DB_NAME_OF_CustomersId); + map.put(COLUMN_UNCAP_PROP_NAME_OF_ProductsId, COLUMN_DB_NAME_OF_ProductsId); + map.put(COLUMN_UNCAP_PROP_NAME_OF_ProductsOptionsId, COLUMN_DB_NAME_OF_ProductsOptionsId); + map.put(COLUMN_UNCAP_PROP_NAME_OF_ProductsOptionsValueId, COLUMN_DB_NAME_OF_ProductsOptionsValueId); + + _uncapPropNameDbNameMap = java.util.Collections.unmodifiableMap(map); + return _uncapPropNameDbNameMap; + } + + /** {uncap-prop-name : cap-prop-name} map. */ + private static java.util.Map _uncapPropNameCapPropNameMap; + protected static java.util.Map createUncapPropNameCapPropNameMap() { + if (_uncapPropNameCapPropNameMap != null) { + return _uncapPropNameCapPropNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_UNCAP_PROP_NAME, TABLE_CAP_PROP_NAME); + + map.put(COLUMN_UNCAP_PROP_NAME_OF_CustomersBasketAttributesId, COLUMN_CAP_PROP_NAME_OF_CustomersBasketAttributesId); + map.put(COLUMN_UNCAP_PROP_NAME_OF_CustomersId, COLUMN_CAP_PROP_NAME_OF_CustomersId); + map.put(COLUMN_UNCAP_PROP_NAME_OF_ProductsId, COLUMN_CAP_PROP_NAME_OF_ProductsId); + map.put(COLUMN_UNCAP_PROP_NAME_OF_ProductsOptionsId, COLUMN_CAP_PROP_NAME_OF_ProductsOptionsId); + map.put(COLUMN_UNCAP_PROP_NAME_OF_ProductsOptionsValueId, COLUMN_CAP_PROP_NAME_OF_ProductsOptionsValueId); + + _uncapPropNameCapPropNameMap = java.util.Collections.unmodifiableMap(map); + return _uncapPropNameCapPropNameMap; + } + + // =================================================================================== + // Name-Map + // ======== + /** + * This method implements the method that is declared at super. + * + * @return {db-name : cap-prop-name} map. + */ + public java.util.Map getDbNameCapPropNameMap() { + return createDbNameCapPropNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {db-name : uncap-prop-name} map. + */ + public java.util.Map getDbNameUncapPropNameMap() { + return createDbNameUncapPropNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {cap-prop-name : db-name} map. + */ + public java.util.Map getCapPropNameDbNameMap() { + return createCapPropNameDbNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {cap-prop-name : uncap-prop-name} map. + */ + public java.util.Map getCapPropNameUncapPropNameMap() { + return createCapPropNameUncapPropNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {uncap-prop-name : db-name} map. + */ + public java.util.Map getUncapPropNameDbNameMap() { + return createUncapPropNameDbNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {uncap-prop-name : cap-prop-name} map. + */ + public java.util.Map getUncapPropNameCapPropNameMap() { + return createUncapPropNameCapPropNameMap(); + } + + // =================================================================================== + // Table Name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + public String getTableDbName() { + return TABLE_DB_NAME; + } + + /** + * This method implements the method that is declared at super. + * + * @return Table cap-prop-name. (NotNull) + */ + public String getTableCapPropName() { + return TABLE_CAP_PROP_NAME; + } + + /** + * This method implements the method that is declared at super. + * + * @return Table property-name. (NotNull) + */ + public String getTableUncapPropName() { + return TABLE_UNCAP_PROP_NAME; + } + + // =================================================================================== + // Column Name + // =========== + public java.util.List getColumnDbNameList() { + final String[] columns = getColumnDbNameCommaString().split(","); + final java.util.List resultList = new java.util.ArrayList(); + for (int i=0; i < columns.length; i++) { + resultList.add(columns[i].trim()); + } + return resultList; + } + + public java.util.List getColumnCapPropNameList() { + final java.util.List columnDbNameList = getColumnDbNameList(); + final java.util.List resultList = new java.util.ArrayList(); + for (final java.util.Iterator ite = columnDbNameList.iterator(); ite.hasNext(); ) { + resultList.add(getDbNameCapPropNameMap().get((String)ite.next())); + } + return resultList; + } + + public java.util.List getColumnUncapPropNameList() { + final java.util.List columnDbNameList = getColumnDbNameList(); + final java.util.List resultList = new java.util.ArrayList(); + for (final java.util.Iterator ite = columnDbNameList.iterator(); ite.hasNext(); ) { + resultList.add(getDbNameUncapPropNameMap().get((String)ite.next())); + } + return resultList; + } + + /** + * This method implements the method that is declared at super. + * + * @return Column-db-name comma-string. (NotNull) + */ + public String getColumnDbNameCommaString() { + return "CUSTOMERS_BASKET_ATTRIBUTES_ID, CUSTOMERS_ID, PRODUCTS_ID, PRODUCTS_OPTIONS_ID, PRODUCTS_OPTIONS_VALUE_ID"; + } + + // =================================================================================== + // Type Name + // ========= + /** + * This method implements the method that is declared at super. + * + * @return The type-name of entity. (NotNull) + */ + public String getEntityTypeName() { + return "jp.sf.pal.pompei.exentity.CustomersBasketAttributes"; + } + + /** + * This method implements the method that is declared at super. + * + * @return The type-name of condition-bean. (NotNull) + */ + public String getConditionBeanTypeName() { + return "jp.sf.pal.pompei.cbean.bs.CustomersBasketAttributesCB"; + } + + /** + * This method implements the method that is declared at super. + * + * @return The type-name of dao. (NotNull) + */ + public String getDaoTypeName() { + return "jp.sf.pal.pompei.exdao.CustomersBasketAttributesDao"; + } + + /** + * This method implements the method that is declared at super. + * + * @return The type-name of behavior. (NotNull) + */ + public String getBehaviorTypeName() { + return "jp.sf.pal.pompei.exbhv.CustomersBasketAttributesBhv"; + } + + // =================================================================================== + // Type + // ==== + /** + * This method implements the method that is declared at super. + * + * @return The type of entity. (NotNull) + */ + public Class getEntityType() { + return ENTITY_TYPE; + } + + // =================================================================================== + // Instance + // ======== + /** + * This method implements the method that is declared at super. + * + * @return The type of entity. (NotNull) + */ + public Entity newEntity() { + return newMyEntity(); + } + + /** + * New the instance of my entity. + * + * @return The instance of my entity. (NotNull) + */ + public CustomersBasketAttributes newMyEntity() { + return new CustomersBasketAttributes(); + } + + // =================================================================================== + // Foreign DBMeta + // ============== + /** + * This method implements the method that is declared at super. + * + * @param foreignPropertyName Foreign-property-name(Both OK - InitCap or not). (NotNull) + * @return Foreign DBMeta. (NotNull) + */ + public DBMeta getForeignDBMeta(String foreignPropertyName) { + assertStringNotNullAndNotTrimmedEmpty("foreignPropertyName", foreignPropertyName); + final String methodName = "getForeignDBMeta_" + foreignPropertyName.substring(0, 1) + foreignPropertyName.substring(1); + + java.lang.reflect.Method method = null; + try { + method = this.getClass().getMethod(methodName, new Class[]{}); + } catch (NoSuchMethodException e) { + String msg = "The foreignPropertyName is not found: foreignPropertyName=" + foreignPropertyName; + msg = msg + " tableName=" + TABLE_DB_NAME + " methodName=" + methodName; + throw new RuntimeException(msg, e); + } + try { + return (DBMeta)method.invoke(this, new Object[]{}); + } catch (IllegalAccessException e) { + throw new RuntimeException(e); + } catch (java.lang.reflect.InvocationTargetException e) { + throw new RuntimeException(e.getCause()); + } + } + + // =================================================================================== + // Determination + // ============= + /** + * This method implements the method that is declared at super. + * + * @return Determination. + */ + public boolean hasTwoOrMorePrimaryKeys() { + return false; + } + + /** + * This method implements the method that is declared at super. + * + * @return Determination. + */ + public boolean hasCommonColumn() { + return false; + } + + // =================================================================================== + // Entity Handling + // =============== + // ----------------------------------------------------- + // Accept + // ------ + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @param primaryKeyMap Primary key map. (NotNull and NotEmpty) + */ + public void acceptPrimaryKeyMap(Entity entity, java.util.Map primaryKeyMap) { + final CustomersBasketAttributes myEntity = (CustomersBasketAttributes)entity; + MapAssertUtil.assertPrimaryKeyMapNotNullAndNotEmpty(primaryKeyMap); + final MapStringValueAnalyzer analyzer = new MapStringValueAnalyzer(primaryKeyMap, entity.getModifiedPropertyNames()); + + MapAssertUtil.assertColumnExistingInPrimaryKeyMap(primaryKeyMap, "CUSTOMERS_BASKET_ATTRIBUTES_ID"); + if (analyzer.init("CUSTOMERS_BASKET_ATTRIBUTES_ID", "customersBasketAttributesId", "customersBasketAttributesId")) { myEntity.setCustomersBasketAttributesId(analyzer.analyzeNumber(java.math.BigDecimal.class)); }; + + + } + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @param primaryKeyMapString Primary-key map-string. (NotNull and NotEmpty) + */ + public void acceptPrimaryKeyMapString(Entity entity, String primaryKeyMapString) { + MapStringUtil.acceptPrimaryKeyMapString(primaryKeyMapString, entity); + } + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @param columnValueMap Column-value map. (NotNull and NotEmpty) + */ + public void acceptColumnValueMap(Entity entity, java.util.Map columnValueMap) { + final CustomersBasketAttributes myEntity = (CustomersBasketAttributes)entity; + MapAssertUtil.assertColumnValueMapNotNullAndNotEmpty(columnValueMap); + final MapStringValueAnalyzer analyzer = new MapStringValueAnalyzer(columnValueMap, entity.getModifiedPropertyNames()); + + if (analyzer.init("CUSTOMERS_BASKET_ATTRIBUTES_ID", "customersBasketAttributesId", "customersBasketAttributesId")) { myEntity.setCustomersBasketAttributesId(analyzer.analyzeNumber(java.math.BigDecimal.class)); }; + if (analyzer.init("CUSTOMERS_ID", "customersId", "customersId")) { myEntity.setCustomersId(analyzer.analyzeNumber(java.math.BigDecimal.class)); }; + if (analyzer.init("PRODUCTS_ID", "productsId", "productsId")) { myEntity.setProductsId(analyzer.analyzeString(String.class)); }; + if (analyzer.init("PRODUCTS_OPTIONS_ID", "productsOptionsId", "productsOptionsId")) { myEntity.setProductsOptionsId(analyzer.analyzeNumber(java.math.BigDecimal.class)); }; + if (analyzer.init("PRODUCTS_OPTIONS_VALUE_ID", "productsOptionsValueId", "productsOptionsValueId")) { myEntity.setProductsOptionsValueId(analyzer.analyzeNumber(java.math.BigDecimal.class)); }; + + } + + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @param columnValueMapString Column-value map-string. (NotNull and NotEmpty) + */ + public void acceptColumnValueMapString(Entity entity, String columnValueMapString) { + MapStringUtil.acceptColumnValueMapString(columnValueMapString, entity); + } + + + // ----------------------------------------------------- + // Extract + // ------- + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @return Primary-key map-string. (NotNull) + */ + public String extractPrimaryKeyMapString(Entity entity) { + return MapStringUtil.extractPrimaryKeyMapString(entity); + } + + /** + * Extract primary-key map-string. + * + * @param entity Target entity. (NotNull) + * @param startBrace Start-brace. (NotNull) + * @param endBrace End-brace. (NotNull) + * @param delimiter Delimiter. (NotNull) + * @param equal Equal. (NotNull) + * @return Primary-key map-string. (NotNull) + */ + public String extractPrimaryKeyMapString(Entity entity, String startBrace, String endBrace, String delimiter, String equal) { + final CustomersBasketAttributes myEntity = (CustomersBasketAttributes)entity; + final String mapMarkAndStartBrace = MAP_STRING_MAP_MARK + startBrace; + final StringBuffer sb = new StringBuffer(); + helpAppendingColumnValueString(sb, delimiter, equal, "CUSTOMERS_BASKET_ATTRIBUTES_ID", myEntity.getCustomersBasketAttributesId()); + + sb.delete(0, delimiter.length()).insert(0, mapMarkAndStartBrace).append(endBrace); + return sb.toString(); + + } + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @return Column-value map-string. (NotNull) + */ + public String extractColumnValueMapString(Entity entity) { + return MapStringUtil.extractColumnValueMapString(entity); + } + + /** + * Extract column-value map-string. + * + * @param entity Target entity. (NotNull) + * @param startBrace Start-brace. (NotNull) + * @param endBrace End-brace. (NotNull) + * @param delimiter Delimiter. (NotNull) + * @param equal Equal. (NotNull) + * @return Column-value map-string. (NotNull) + */ + public String extractColumnValueMapString(Entity entity, String startBrace, String endBrace, String delimiter, String equal) { + final CustomersBasketAttributes myEntity = (CustomersBasketAttributes)entity; + final String mapMarkAndStartBrace = MAP_STRING_MAP_MARK + startBrace; + final StringBuffer sb = new StringBuffer(); + helpAppendingColumnValueString(sb, delimiter, equal, "CUSTOMERS_BASKET_ATTRIBUTES_ID", myEntity.getCustomersBasketAttributesId()); + helpAppendingColumnValueString(sb, delimiter, equal, "CUSTOMERS_ID", myEntity.getCustomersId()); + helpAppendingColumnValueString(sb, delimiter, equal, "PRODUCTS_ID", myEntity.getProductsId()); + helpAppendingColumnValueString(sb, delimiter, equal, "PRODUCTS_OPTIONS_ID", myEntity.getProductsOptionsId()); + helpAppendingColumnValueString(sb, delimiter, equal, "PRODUCTS_OPTIONS_VALUE_ID", myEntity.getProductsOptionsValueId()); + + sb.delete(0, delimiter.length()).insert(0, mapMarkAndStartBrace).append(endBrace); + return sb.toString(); + } + + private void helpAppendingColumnValueString(StringBuffer sb, String delimiter, String equal, String colName, Object value) { + sb.append(delimiter).append(colName).append(equal); + sb.append(helpGettingColumnStringValue(value)); + } + + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @return Column-value map-string. (NotNull) + */ + public String extractCommonColumnValueMapString(Entity entity) { + return "map:{}"; + } + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @return Column-value map-string. (NotNull) + */ + public String extractCommonColumnValueMapString(Entity entity, String startBrace, String endBrace, String delimiter, String equal) { + return "map:" + startBrace + endBrace; + } + + + // ----------------------------------------------------- + // Convert + // ------- + public java.util.List convertToColumnValueList(Entity entity) { + return new java.util.ArrayList(convertToColumnValueMap(entity).values()); + } + + public java.util.Map convertToColumnValueMap(Entity entity) { + final CustomersBasketAttributes myEntity = downcast(entity); + final java.util.Map valueMap = new java.util.LinkedHashMap(); + valueMap.put("CUSTOMERS_BASKET_ATTRIBUTES_ID", myEntity.getCustomersBasketAttributesId()); + valueMap.put("CUSTOMERS_ID", myEntity.getCustomersId()); + valueMap.put("PRODUCTS_ID", myEntity.getProductsId()); + valueMap.put("PRODUCTS_OPTIONS_ID", myEntity.getProductsOptionsId()); + valueMap.put("PRODUCTS_OPTIONS_VALUE_ID", myEntity.getProductsOptionsValueId()); + return valueMap; + } + + public java.util.List convertToColumnStringValueList(Entity entity) { + return new java.util.ArrayList(convertToColumnStringValueMap(entity).values()); + } + + public java.util.Map convertToColumnStringValueMap(Entity entity) { + final CustomersBasketAttributes myEntity = downcast(entity); + final java.util.Map valueMap = new java.util.LinkedHashMap(); + valueMap.put("CUSTOMERS_BASKET_ATTRIBUTES_ID", helpGettingColumnStringValue(myEntity.getCustomersBasketAttributesId())); + valueMap.put("CUSTOMERS_ID", helpGettingColumnStringValue(myEntity.getCustomersId())); + valueMap.put("PRODUCTS_ID", helpGettingColumnStringValue(myEntity.getProductsId())); + valueMap.put("PRODUCTS_OPTIONS_ID", helpGettingColumnStringValue(myEntity.getProductsOptionsId())); + valueMap.put("PRODUCTS_OPTIONS_VALUE_ID", helpGettingColumnStringValue(myEntity.getProductsOptionsValueId())); + return valueMap; + } + + // =================================================================================== + // JDBC Support + // ============ + public String getPreparedInsertClause() { + return "insert into CUSTOMERS_BASKET_ATTRIBUTES(CUSTOMERS_BASKET_ATTRIBUTES_ID, CUSTOMERS_ID, PRODUCTS_ID, PRODUCTS_OPTIONS_ID, PRODUCTS_OPTIONS_VALUE_ID) values(? , ? , ? , ? , ? )"; + } + + public String getPreparedInsertClause(String tablePrefix) { + return "insert into " + tablePrefix + "CUSTOMERS_BASKET_ATTRIBUTES(CUSTOMERS_BASKET_ATTRIBUTES_ID, CUSTOMERS_ID, PRODUCTS_ID, PRODUCTS_OPTIONS_ID, PRODUCTS_OPTIONS_VALUE_ID) values(? , ? , ? , ? , ? )"; + } + + // =================================================================================== + // Helper + // ====== + protected CustomersBasketAttributes downcast(Entity entity) { + assertObjectNotNull("entity", entity); + try { + return (CustomersBasketAttributes)entity; + } catch (ClassCastException e) { + String msg = "The entity should be CustomersBasketAttributes but it was: " + entity.getClass(); + throw new IllegalStateException(msg, e); + } + } + + protected void checkDowncast(Entity entity) { + downcast(entity); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/dbmeta/CustomersBasketDbm.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/dbmeta/CustomersBasketDbm.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/dbmeta/CustomersBasketDbm.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,720 @@ +package jp.sf.pal.pompei.bsentity.dbmeta; + + +import jp.sf.pal.pompei.allcommon.Entity; +import jp.sf.pal.pompei.allcommon.dbmeta.DBMeta; +import jp.sf.pal.pompei.allcommon.dbmeta.AbstractDBMeta; +import jp.sf.pal.pompei.exentity.CustomersBasket; + +/** + * The dbmeta of CUSTOMERS_BASKET. (Singleton) + * + *
+ * [primary-key]
+ *     CUSTOMERS_BASKET_ID
+ * 
+ * [column-property]
+ *     CUSTOMERS_BASKET_ID, CUSTOMERS_ID, PRODUCTS_ID, CUSTOMERS_BASKET_QUANTITY, FINAL_PRICE, CUSTOMERS_BASKET_DATE_ADDED
+ * 
+ * [foreign-property]
+ *     
+ * 
+ * [refferer-property]
+ *     
+ * 
+ * [sequence]
+ *     
+ * 
+ * [identity]
+ *     
+ * 
+ * [update-date]
+ *     
+ * 
+ * [version-no]
+ *     
+ * 
+ * 
+ * + * @author DBFlute(AutoGenerator) + */ +public class CustomersBasketDbm extends AbstractDBMeta { + + // =================================================================================== + // Definition + // ========== + /** The type of entity. */ + protected static final Class ENTITY_TYPE = CustomersBasket.class; + + /** Singleton instance. */ + private static final CustomersBasketDbm _instance = new CustomersBasketDbm(); + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + private CustomersBasketDbm() { + } + + // =================================================================================== + // Singleton + // ========= + /** + * Get instance. + * + * @return Singleton instance. (NotNull) + */ + public static CustomersBasketDbm getInstance() { + return _instance; + } + + // =================================================================================== + // Name Definition + // =============== + /** Table db name. */ + public static final String TABLE_DB_NAME = "CUSTOMERS_BASKET"; + + /** Table cap-prop name. */ + public static final String TABLE_CAP_PROP_NAME = "CustomersBasket"; + + /** Table uncap-prop name. */ + public static final String TABLE_UNCAP_PROP_NAME = "customersBasket"; + + /** Db-name of CustomersBasketId. */ + public static final String COLUMN_DB_NAME_OF_CustomersBasketId = "CUSTOMERS_BASKET_ID"; + /** Db-name of CustomersId. */ + public static final String COLUMN_DB_NAME_OF_CustomersId = "CUSTOMERS_ID"; + /** Db-name of ProductsId. */ + public static final String COLUMN_DB_NAME_OF_ProductsId = "PRODUCTS_ID"; + /** Db-name of CustomersBasketQuantity. */ + public static final String COLUMN_DB_NAME_OF_CustomersBasketQuantity = "CUSTOMERS_BASKET_QUANTITY"; + /** Db-name of FinalPrice. */ + public static final String COLUMN_DB_NAME_OF_FinalPrice = "FINAL_PRICE"; + /** Db-name of CustomersBasketDateAdded. */ + public static final String COLUMN_DB_NAME_OF_CustomersBasketDateAdded = "CUSTOMERS_BASKET_DATE_ADDED"; + + /** Cap-prop-name of CustomersBasketId. */ + public static final String COLUMN_CAP_PROP_NAME_OF_CustomersBasketId = "CustomersBasketId"; + /** Cap-prop-name of CustomersId. */ + public static final String COLUMN_CAP_PROP_NAME_OF_CustomersId = "CustomersId"; + /** Cap-prop-name of ProductsId. */ + public static final String COLUMN_CAP_PROP_NAME_OF_ProductsId = "ProductsId"; + /** Cap-prop-name of CustomersBasketQuantity. */ + public static final String COLUMN_CAP_PROP_NAME_OF_CustomersBasketQuantity = "CustomersBasketQuantity"; + /** Cap-prop-name of FinalPrice. */ + public static final String COLUMN_CAP_PROP_NAME_OF_FinalPrice = "FinalPrice"; + /** Cap-prop-name of CustomersBasketDateAdded. */ + public static final String COLUMN_CAP_PROP_NAME_OF_CustomersBasketDateAdded = "CustomersBasketDateAdded"; + + + + /** Uncap-prop-name of CustomersBasketId. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_CustomersBasketId = "customersBasketId"; + /** Uncap-prop-name of CustomersId. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_CustomersId = "customersId"; + /** Uncap-prop-name of ProductsId. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_ProductsId = "productsId"; + /** Uncap-prop-name of CustomersBasketQuantity. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_CustomersBasketQuantity = "customersBasketQuantity"; + /** Uncap-prop-name of FinalPrice. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_FinalPrice = "finalPrice"; + /** Uncap-prop-name of CustomersBasketDateAdded. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_CustomersBasketDateAdded = "customersBasketDateAdded"; + + + + /** {db-name : cap-prop-name} map. */ + private static java.util.Map _dbNameCapPropNameMap; + protected static java.util.Map createDbNameCapPropNameMap() { + if (_dbNameCapPropNameMap != null) { + return _dbNameCapPropNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_DB_NAME, TABLE_CAP_PROP_NAME); + + map.put(COLUMN_DB_NAME_OF_CustomersBasketId, COLUMN_CAP_PROP_NAME_OF_CustomersBasketId); + map.put(COLUMN_DB_NAME_OF_CustomersId, COLUMN_CAP_PROP_NAME_OF_CustomersId); + map.put(COLUMN_DB_NAME_OF_ProductsId, COLUMN_CAP_PROP_NAME_OF_ProductsId); + map.put(COLUMN_DB_NAME_OF_CustomersBasketQuantity, COLUMN_CAP_PROP_NAME_OF_CustomersBasketQuantity); + map.put(COLUMN_DB_NAME_OF_FinalPrice, COLUMN_CAP_PROP_NAME_OF_FinalPrice); + map.put(COLUMN_DB_NAME_OF_CustomersBasketDateAdded, COLUMN_CAP_PROP_NAME_OF_CustomersBasketDateAdded); + + _dbNameCapPropNameMap = java.util.Collections.unmodifiableMap(map); + return _dbNameCapPropNameMap; + } + + /** {db-name : uncap-prop-name} map. */ + private static java.util.Map _dbNameUncapPropNameMap; + protected static java.util.Map createDbNameUncapPropNameMap() { + if (_dbNameUncapPropNameMap != null) { + return _dbNameUncapPropNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_DB_NAME, TABLE_UNCAP_PROP_NAME); + + map.put(COLUMN_DB_NAME_OF_CustomersBasketId, COLUMN_UNCAP_PROP_NAME_OF_CustomersBasketId); + map.put(COLUMN_DB_NAME_OF_CustomersId, COLUMN_UNCAP_PROP_NAME_OF_CustomersId); + map.put(COLUMN_DB_NAME_OF_ProductsId, COLUMN_UNCAP_PROP_NAME_OF_ProductsId); + map.put(COLUMN_DB_NAME_OF_CustomersBasketQuantity, COLUMN_UNCAP_PROP_NAME_OF_CustomersBasketQuantity); + map.put(COLUMN_DB_NAME_OF_FinalPrice, COLUMN_UNCAP_PROP_NAME_OF_FinalPrice); + map.put(COLUMN_DB_NAME_OF_CustomersBasketDateAdded, COLUMN_UNCAP_PROP_NAME_OF_CustomersBasketDateAdded); + + _dbNameUncapPropNameMap = java.util.Collections.unmodifiableMap(map); + return _dbNameUncapPropNameMap; + } + + /** {cap-prop-name : db-name} map. */ + private static java.util.Map _capPropNameDbNameMap; + protected static java.util.Map createCapPropNameDbNameMap() { + if (_capPropNameDbNameMap != null) { + return _capPropNameDbNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_CAP_PROP_NAME, TABLE_DB_NAME); + + map.put(COLUMN_CAP_PROP_NAME_OF_CustomersBasketId, COLUMN_DB_NAME_OF_CustomersBasketId); + map.put(COLUMN_CAP_PROP_NAME_OF_CustomersId, COLUMN_DB_NAME_OF_CustomersId); + map.put(COLUMN_CAP_PROP_NAME_OF_ProductsId, COLUMN_DB_NAME_OF_ProductsId); + map.put(COLUMN_CAP_PROP_NAME_OF_CustomersBasketQuantity, COLUMN_DB_NAME_OF_CustomersBasketQuantity); + map.put(COLUMN_CAP_PROP_NAME_OF_FinalPrice, COLUMN_DB_NAME_OF_FinalPrice); + map.put(COLUMN_CAP_PROP_NAME_OF_CustomersBasketDateAdded, COLUMN_DB_NAME_OF_CustomersBasketDateAdded); + + _capPropNameDbNameMap = java.util.Collections.unmodifiableMap(map); + return _capPropNameDbNameMap; + } + + /** {cap-prop-name : uncap-prop-name} map. */ + private static java.util.Map _capPropNameUncapPropNameMap; + protected static java.util.Map createCapPropNameUncapPropNameMap() { + if (_capPropNameUncapPropNameMap != null) { + return _capPropNameUncapPropNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_CAP_PROP_NAME, TABLE_UNCAP_PROP_NAME); + + map.put(COLUMN_CAP_PROP_NAME_OF_CustomersBasketId, COLUMN_UNCAP_PROP_NAME_OF_CustomersBasketId); + map.put(COLUMN_CAP_PROP_NAME_OF_CustomersId, COLUMN_UNCAP_PROP_NAME_OF_CustomersId); + map.put(COLUMN_CAP_PROP_NAME_OF_ProductsId, COLUMN_UNCAP_PROP_NAME_OF_ProductsId); + map.put(COLUMN_CAP_PROP_NAME_OF_CustomersBasketQuantity, COLUMN_UNCAP_PROP_NAME_OF_CustomersBasketQuantity); + map.put(COLUMN_CAP_PROP_NAME_OF_FinalPrice, COLUMN_UNCAP_PROP_NAME_OF_FinalPrice); + map.put(COLUMN_CAP_PROP_NAME_OF_CustomersBasketDateAdded, COLUMN_UNCAP_PROP_NAME_OF_CustomersBasketDateAdded); + + _capPropNameUncapPropNameMap = java.util.Collections.unmodifiableMap(map); + return _capPropNameUncapPropNameMap; + } + + /** {uncap-prop-name : db-name} map. */ + private static java.util.Map _uncapPropNameDbNameMap; + protected static java.util.Map createUncapPropNameDbNameMap() { + if (_uncapPropNameDbNameMap != null) { + return _uncapPropNameDbNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_UNCAP_PROP_NAME, TABLE_DB_NAME); + + map.put(COLUMN_UNCAP_PROP_NAME_OF_CustomersBasketId, COLUMN_DB_NAME_OF_CustomersBasketId); + map.put(COLUMN_UNCAP_PROP_NAME_OF_CustomersId, COLUMN_DB_NAME_OF_CustomersId); + map.put(COLUMN_UNCAP_PROP_NAME_OF_ProductsId, COLUMN_DB_NAME_OF_ProductsId); + map.put(COLUMN_UNCAP_PROP_NAME_OF_CustomersBasketQuantity, COLUMN_DB_NAME_OF_CustomersBasketQuantity); + map.put(COLUMN_UNCAP_PROP_NAME_OF_FinalPrice, COLUMN_DB_NAME_OF_FinalPrice); + map.put(COLUMN_UNCAP_PROP_NAME_OF_CustomersBasketDateAdded, COLUMN_DB_NAME_OF_CustomersBasketDateAdded); + + _uncapPropNameDbNameMap = java.util.Collections.unmodifiableMap(map); + return _uncapPropNameDbNameMap; + } + + /** {uncap-prop-name : cap-prop-name} map. */ + private static java.util.Map _uncapPropNameCapPropNameMap; + protected static java.util.Map createUncapPropNameCapPropNameMap() { + if (_uncapPropNameCapPropNameMap != null) { + return _uncapPropNameCapPropNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_UNCAP_PROP_NAME, TABLE_CAP_PROP_NAME); + + map.put(COLUMN_UNCAP_PROP_NAME_OF_CustomersBasketId, COLUMN_CAP_PROP_NAME_OF_CustomersBasketId); + map.put(COLUMN_UNCAP_PROP_NAME_OF_CustomersId, COLUMN_CAP_PROP_NAME_OF_CustomersId); + map.put(COLUMN_UNCAP_PROP_NAME_OF_ProductsId, COLUMN_CAP_PROP_NAME_OF_ProductsId); + map.put(COLUMN_UNCAP_PROP_NAME_OF_CustomersBasketQuantity, COLUMN_CAP_PROP_NAME_OF_CustomersBasketQuantity); + map.put(COLUMN_UNCAP_PROP_NAME_OF_FinalPrice, COLUMN_CAP_PROP_NAME_OF_FinalPrice); + map.put(COLUMN_UNCAP_PROP_NAME_OF_CustomersBasketDateAdded, COLUMN_CAP_PROP_NAME_OF_CustomersBasketDateAdded); + + _uncapPropNameCapPropNameMap = java.util.Collections.unmodifiableMap(map); + return _uncapPropNameCapPropNameMap; + } + + // =================================================================================== + // Name-Map + // ======== + /** + * This method implements the method that is declared at super. + * + * @return {db-name : cap-prop-name} map. + */ + public java.util.Map getDbNameCapPropNameMap() { + return createDbNameCapPropNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {db-name : uncap-prop-name} map. + */ + public java.util.Map getDbNameUncapPropNameMap() { + return createDbNameUncapPropNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {cap-prop-name : db-name} map. + */ + public java.util.Map getCapPropNameDbNameMap() { + return createCapPropNameDbNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {cap-prop-name : uncap-prop-name} map. + */ + public java.util.Map getCapPropNameUncapPropNameMap() { + return createCapPropNameUncapPropNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {uncap-prop-name : db-name} map. + */ + public java.util.Map getUncapPropNameDbNameMap() { + return createUncapPropNameDbNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {uncap-prop-name : cap-prop-name} map. + */ + public java.util.Map getUncapPropNameCapPropNameMap() { + return createUncapPropNameCapPropNameMap(); + } + + // =================================================================================== + // Table Name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + public String getTableDbName() { + return TABLE_DB_NAME; + } + + /** + * This method implements the method that is declared at super. + * + * @return Table cap-prop-name. (NotNull) + */ + public String getTableCapPropName() { + return TABLE_CAP_PROP_NAME; + } + + /** + * This method implements the method that is declared at super. + * + * @return Table property-name. (NotNull) + */ + public String getTableUncapPropName() { + return TABLE_UNCAP_PROP_NAME; + } + + // =================================================================================== + // Column Name + // =========== + public java.util.List getColumnDbNameList() { + final String[] columns = getColumnDbNameCommaString().split(","); + final java.util.List resultList = new java.util.ArrayList(); + for (int i=0; i < columns.length; i++) { + resultList.add(columns[i].trim()); + } + return resultList; + } + + public java.util.List getColumnCapPropNameList() { + final java.util.List columnDbNameList = getColumnDbNameList(); + final java.util.List resultList = new java.util.ArrayList(); + for (final java.util.Iterator ite = columnDbNameList.iterator(); ite.hasNext(); ) { + resultList.add(getDbNameCapPropNameMap().get((String)ite.next())); + } + return resultList; + } + + public java.util.List getColumnUncapPropNameList() { + final java.util.List columnDbNameList = getColumnDbNameList(); + final java.util.List resultList = new java.util.ArrayList(); + for (final java.util.Iterator ite = columnDbNameList.iterator(); ite.hasNext(); ) { + resultList.add(getDbNameUncapPropNameMap().get((String)ite.next())); + } + return resultList; + } + + /** + * This method implements the method that is declared at super. + * + * @return Column-db-name comma-string. (NotNull) + */ + public String getColumnDbNameCommaString() { + return "CUSTOMERS_BASKET_ID, CUSTOMERS_ID, PRODUCTS_ID, CUSTOMERS_BASKET_QUANTITY, FINAL_PRICE, CUSTOMERS_BASKET_DATE_ADDED"; + } + + // =================================================================================== + // Type Name + // ========= + /** + * This method implements the method that is declared at super. + * + * @return The type-name of entity. (NotNull) + */ + public String getEntityTypeName() { + return "jp.sf.pal.pompei.exentity.CustomersBasket"; + } + + /** + * This method implements the method that is declared at super. + * + * @return The type-name of condition-bean. (NotNull) + */ + public String getConditionBeanTypeName() { + return "jp.sf.pal.pompei.cbean.bs.CustomersBasketCB"; + } + + /** + * This method implements the method that is declared at super. + * + * @return The type-name of dao. (NotNull) + */ + public String getDaoTypeName() { + return "jp.sf.pal.pompei.exdao.CustomersBasketDao"; + } + + /** + * This method implements the method that is declared at super. + * + * @return The type-name of behavior. (NotNull) + */ + public String getBehaviorTypeName() { + return "jp.sf.pal.pompei.exbhv.CustomersBasketBhv"; + } + + // =================================================================================== + // Type + // ==== + /** + * This method implements the method that is declared at super. + * + * @return The type of entity. (NotNull) + */ + public Class getEntityType() { + return ENTITY_TYPE; + } + + // =================================================================================== + // Instance + // ======== + /** + * This method implements the method that is declared at super. + * + * @return The type of entity. (NotNull) + */ + public Entity newEntity() { + return newMyEntity(); + } + + /** + * New the instance of my entity. + * + * @return The instance of my entity. (NotNull) + */ + public CustomersBasket newMyEntity() { + return new CustomersBasket(); + } + + // =================================================================================== + // Foreign DBMeta + // ============== + /** + * This method implements the method that is declared at super. + * + * @param foreignPropertyName Foreign-property-name(Both OK - InitCap or not). (NotNull) + * @return Foreign DBMeta. (NotNull) + */ + public DBMeta getForeignDBMeta(String foreignPropertyName) { + assertStringNotNullAndNotTrimmedEmpty("foreignPropertyName", foreignPropertyName); + final String methodName = "getForeignDBMeta_" + foreignPropertyName.substring(0, 1) + foreignPropertyName.substring(1); + + java.lang.reflect.Method method = null; + try { + method = this.getClass().getMethod(methodName, new Class[]{}); + } catch (NoSuchMethodException e) { + String msg = "The foreignPropertyName is not found: foreignPropertyName=" + foreignPropertyName; + msg = msg + " tableName=" + TABLE_DB_NAME + " methodName=" + methodName; + throw new RuntimeException(msg, e); + } + try { + return (DBMeta)method.invoke(this, new Object[]{}); + } catch (IllegalAccessException e) { + throw new RuntimeException(e); + } catch (java.lang.reflect.InvocationTargetException e) { + throw new RuntimeException(e.getCause()); + } + } + + // =================================================================================== + // Determination + // ============= + /** + * This method implements the method that is declared at super. + * + * @return Determination. + */ + public boolean hasTwoOrMorePrimaryKeys() { + return false; + } + + /** + * This method implements the method that is declared at super. + * + * @return Determination. + */ + public boolean hasCommonColumn() { + return false; + } + + // =================================================================================== + // Entity Handling + // =============== + // ----------------------------------------------------- + // Accept + // ------ + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @param primaryKeyMap Primary key map. (NotNull and NotEmpty) + */ + public void acceptPrimaryKeyMap(Entity entity, java.util.Map primaryKeyMap) { + final CustomersBasket myEntity = (CustomersBasket)entity; + MapAssertUtil.assertPrimaryKeyMapNotNullAndNotEmpty(primaryKeyMap); + final MapStringValueAnalyzer analyzer = new MapStringValueAnalyzer(primaryKeyMap, entity.getModifiedPropertyNames()); + + MapAssertUtil.assertColumnExistingInPrimaryKeyMap(primaryKeyMap, "CUSTOMERS_BASKET_ID"); + if (analyzer.init("CUSTOMERS_BASKET_ID", "customersBasketId", "customersBasketId")) { myEntity.setCustomersBasketId(analyzer.analyzeNumber(java.math.BigDecimal.class)); }; + + + } + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @param primaryKeyMapString Primary-key map-string. (NotNull and NotEmpty) + */ + public void acceptPrimaryKeyMapString(Entity entity, String primaryKeyMapString) { + MapStringUtil.acceptPrimaryKeyMapString(primaryKeyMapString, entity); + } + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @param columnValueMap Column-value map. (NotNull and NotEmpty) + */ + public void acceptColumnValueMap(Entity entity, java.util.Map columnValueMap) { + final CustomersBasket myEntity = (CustomersBasket)entity; + MapAssertUtil.assertColumnValueMapNotNullAndNotEmpty(columnValueMap); + final MapStringValueAnalyzer analyzer = new MapStringValueAnalyzer(columnValueMap, entity.getModifiedPropertyNames()); + + if (analyzer.init("CUSTOMERS_BASKET_ID", "customersBasketId", "customersBasketId")) { myEntity.setCustomersBasketId(analyzer.analyzeNumber(java.math.BigDecimal.class)); }; + if (analyzer.init("CUSTOMERS_ID", "customersId", "customersId")) { myEntity.setCustomersId(analyzer.analyzeNumber(java.math.BigDecimal.class)); }; + if (analyzer.init("PRODUCTS_ID", "productsId", "productsId")) { myEntity.setProductsId(analyzer.analyzeString(String.class)); }; + if (analyzer.init("CUSTOMERS_BASKET_QUANTITY", "customersBasketQuantity", "customersBasketQuantity")) { myEntity.setCustomersBasketQuantity(analyzer.analyzeNumber(java.math.BigDecimal.class)); }; + if (analyzer.init("FINAL_PRICE", "finalPrice", "finalPrice")) { myEntity.setFinalPrice(analyzer.analyzeNumber(java.math.BigDecimal.class)); }; + if (analyzer.init("CUSTOMERS_BASKET_DATE_ADDED", "customersBasketDateAdded", "customersBasketDateAdded")) { myEntity.setCustomersBasketDateAdded(analyzer.analyzeString(String.class)); }; + + } + + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @param columnValueMapString Column-value map-string. (NotNull and NotEmpty) + */ + public void acceptColumnValueMapString(Entity entity, String columnValueMapString) { + MapStringUtil.acceptColumnValueMapString(columnValueMapString, entity); + } + + + // ----------------------------------------------------- + // Extract + // ------- + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @return Primary-key map-string. (NotNull) + */ + public String extractPrimaryKeyMapString(Entity entity) { + return MapStringUtil.extractPrimaryKeyMapString(entity); + } + + /** + * Extract primary-key map-string. + * + * @param entity Target entity. (NotNull) + * @param startBrace Start-brace. (NotNull) + * @param endBrace End-brace. (NotNull) + * @param delimiter Delimiter. (NotNull) + * @param equal Equal. (NotNull) + * @return Primary-key map-string. (NotNull) + */ + public String extractPrimaryKeyMapString(Entity entity, String startBrace, String endBrace, String delimiter, String equal) { + final CustomersBasket myEntity = (CustomersBasket)entity; + final String mapMarkAndStartBrace = MAP_STRING_MAP_MARK + startBrace; + final StringBuffer sb = new StringBuffer(); + helpAppendingColumnValueString(sb, delimiter, equal, "CUSTOMERS_BASKET_ID", myEntity.getCustomersBasketId()); + + sb.delete(0, delimiter.length()).insert(0, mapMarkAndStartBrace).append(endBrace); + return sb.toString(); + + } + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @return Column-value map-string. (NotNull) + */ + public String extractColumnValueMapString(Entity entity) { + return MapStringUtil.extractColumnValueMapString(entity); + } + + /** + * Extract column-value map-string. + * + * @param entity Target entity. (NotNull) + * @param startBrace Start-brace. (NotNull) + * @param endBrace End-brace. (NotNull) + * @param delimiter Delimiter. (NotNull) + * @param equal Equal. (NotNull) + * @return Column-value map-string. (NotNull) + */ + public String extractColumnValueMapString(Entity entity, String startBrace, String endBrace, String delimiter, String equal) { + final CustomersBasket myEntity = (CustomersBasket)entity; + final String mapMarkAndStartBrace = MAP_STRING_MAP_MARK + startBrace; + final StringBuffer sb = new StringBuffer(); + helpAppendingColumnValueString(sb, delimiter, equal, "CUSTOMERS_BASKET_ID", myEntity.getCustomersBasketId()); + helpAppendingColumnValueString(sb, delimiter, equal, "CUSTOMERS_ID", myEntity.getCustomersId()); + helpAppendingColumnValueString(sb, delimiter, equal, "PRODUCTS_ID", myEntity.getProductsId()); + helpAppendingColumnValueString(sb, delimiter, equal, "CUSTOMERS_BASKET_QUANTITY", myEntity.getCustomersBasketQuantity()); + helpAppendingColumnValueString(sb, delimiter, equal, "FINAL_PRICE", myEntity.getFinalPrice()); + helpAppendingColumnValueString(sb, delimiter, equal, "CUSTOMERS_BASKET_DATE_ADDED", myEntity.getCustomersBasketDateAdded()); + + sb.delete(0, delimiter.length()).insert(0, mapMarkAndStartBrace).append(endBrace); + return sb.toString(); + } + + private void helpAppendingColumnValueString(StringBuffer sb, String delimiter, String equal, String colName, Object value) { + sb.append(delimiter).append(colName).append(equal); + sb.append(helpGettingColumnStringValue(value)); + } + + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @return Column-value map-string. (NotNull) + */ + public String extractCommonColumnValueMapString(Entity entity) { + return "map:{}"; + } + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @return Column-value map-string. (NotNull) + */ + public String extractCommonColumnValueMapString(Entity entity, String startBrace, String endBrace, String delimiter, String equal) { + return "map:" + startBrace + endBrace; + } + + + // ----------------------------------------------------- + // Convert + // ------- + public java.util.List convertToColumnValueList(Entity entity) { + return new java.util.ArrayList(convertToColumnValueMap(entity).values()); + } + + public java.util.Map convertToColumnValueMap(Entity entity) { + final CustomersBasket myEntity = downcast(entity); + final java.util.Map valueMap = new java.util.LinkedHashMap(); + valueMap.put("CUSTOMERS_BASKET_ID", myEntity.getCustomersBasketId()); + valueMap.put("CUSTOMERS_ID", myEntity.getCustomersId()); + valueMap.put("PRODUCTS_ID", myEntity.getProductsId()); + valueMap.put("CUSTOMERS_BASKET_QUANTITY", myEntity.getCustomersBasketQuantity()); + valueMap.put("FINAL_PRICE", myEntity.getFinalPrice()); + valueMap.put("CUSTOMERS_BASKET_DATE_ADDED", myEntity.getCustomersBasketDateAdded()); + return valueMap; + } + + public java.util.List convertToColumnStringValueList(Entity entity) { + return new java.util.ArrayList(convertToColumnStringValueMap(entity).values()); + } + + public java.util.Map convertToColumnStringValueMap(Entity entity) { + final CustomersBasket myEntity = downcast(entity); + final java.util.Map valueMap = new java.util.LinkedHashMap(); + valueMap.put("CUSTOMERS_BASKET_ID", helpGettingColumnStringValue(myEntity.getCustomersBasketId())); + valueMap.put("CUSTOMERS_ID", helpGettingColumnStringValue(myEntity.getCustomersId())); + valueMap.put("PRODUCTS_ID", helpGettingColumnStringValue(myEntity.getProductsId())); + valueMap.put("CUSTOMERS_BASKET_QUANTITY", helpGettingColumnStringValue(myEntity.getCustomersBasketQuantity())); + valueMap.put("FINAL_PRICE", helpGettingColumnStringValue(myEntity.getFinalPrice())); + valueMap.put("CUSTOMERS_BASKET_DATE_ADDED", helpGettingColumnStringValue(myEntity.getCustomersBasketDateAdded())); + return valueMap; + } + + // =================================================================================== + // JDBC Support + // ============ + public String getPreparedInsertClause() { + return "insert into CUSTOMERS_BASKET(CUSTOMERS_BASKET_ID, CUSTOMERS_ID, PRODUCTS_ID, CUSTOMERS_BASKET_QUANTITY, FINAL_PRICE, CUSTOMERS_BASKET_DATE_ADDED) values(? , ? , ? , ? , ? , ? )"; + } + + public String getPreparedInsertClause(String tablePrefix) { + return "insert into " + tablePrefix + "CUSTOMERS_BASKET(CUSTOMERS_BASKET_ID, CUSTOMERS_ID, PRODUCTS_ID, CUSTOMERS_BASKET_QUANTITY, FINAL_PRICE, CUSTOMERS_BASKET_DATE_ADDED) values(? , ? , ? , ? , ? , ? )"; + } + + // =================================================================================== + // Helper + // ====== + protected CustomersBasket downcast(Entity entity) { + assertObjectNotNull("entity", entity); + try { + return (CustomersBasket)entity; + } catch (ClassCastException e) { + String msg = "The entity should be CustomersBasket but it was: " + entity.getClass(); + throw new IllegalStateException(msg, e); + } + } + + protected void checkDowncast(Entity entity) { + downcast(entity); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/dbmeta/CustomersDbm.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/dbmeta/CustomersDbm.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/dbmeta/CustomersDbm.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,800 @@ +package jp.sf.pal.pompei.bsentity.dbmeta; + + +import jp.sf.pal.pompei.allcommon.Entity; +import jp.sf.pal.pompei.allcommon.dbmeta.DBMeta; +import jp.sf.pal.pompei.allcommon.dbmeta.AbstractDBMeta; +import jp.sf.pal.pompei.exentity.Customers; + +/** + * The dbmeta of CUSTOMERS. (Singleton) + * + *
+ * [primary-key]
+ *     CUSTOMERS_ID
+ * 
+ * [column-property]
+ *     CUSTOMERS_ID, CUSTOMERS_GENDER, CUSTOMERS_FIRSTNAME, CUSTOMERS_LASTNAME, CUSTOMERS_DOB, CUSTOMERS_EMAIL_ADDRESS, CUSTOMERS_DEFAULT_ADDRESS_ID, CUSTOMERS_TELEPHONE, CUSTOMERS_FAX, CUSTOMERS_PASSWORD, CUSTOMERS_NEWSLETTER
+ * 
+ * [foreign-property]
+ *     
+ * 
+ * [refferer-property]
+ *     
+ * 
+ * [sequence]
+ *     
+ * 
+ * [identity]
+ *     
+ * 
+ * [update-date]
+ *     
+ * 
+ * [version-no]
+ *     
+ * 
+ * 
+ * + * @author DBFlute(AutoGenerator) + */ +public class CustomersDbm extends AbstractDBMeta { + + // =================================================================================== + // Definition + // ========== + /** The type of entity. */ + protected static final Class ENTITY_TYPE = Customers.class; + + /** Singleton instance. */ + private static final CustomersDbm _instance = new CustomersDbm(); + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + private CustomersDbm() { + } + + // =================================================================================== + // Singleton + // ========= + /** + * Get instance. + * + * @return Singleton instance. (NotNull) + */ + public static CustomersDbm getInstance() { + return _instance; + } + + // =================================================================================== + // Name Definition + // =============== + /** Table db name. */ + public static final String TABLE_DB_NAME = "CUSTOMERS"; + + /** Table cap-prop name. */ + public static final String TABLE_CAP_PROP_NAME = "Customers"; + + /** Table uncap-prop name. */ + public static final String TABLE_UNCAP_PROP_NAME = "customers"; + + /** Db-name of CustomersId. */ + public static final String COLUMN_DB_NAME_OF_CustomersId = "CUSTOMERS_ID"; + /** Db-name of CustomersGender. */ + public static final String COLUMN_DB_NAME_OF_CustomersGender = "CUSTOMERS_GENDER"; + /** Db-name of CustomersFirstname. */ + public static final String COLUMN_DB_NAME_OF_CustomersFirstname = "CUSTOMERS_FIRSTNAME"; + /** Db-name of CustomersLastname. */ + public static final String COLUMN_DB_NAME_OF_CustomersLastname = "CUSTOMERS_LASTNAME"; + /** Db-name of CustomersDob. */ + public static final String COLUMN_DB_NAME_OF_CustomersDob = "CUSTOMERS_DOB"; + /** Db-name of CustomersEmailAddress. */ + public static final String COLUMN_DB_NAME_OF_CustomersEmailAddress = "CUSTOMERS_EMAIL_ADDRESS"; + /** Db-name of CustomersDefaultAddressId. */ + public static final String COLUMN_DB_NAME_OF_CustomersDefaultAddressId = "CUSTOMERS_DEFAULT_ADDRESS_ID"; + /** Db-name of CustomersTelephone. */ + public static final String COLUMN_DB_NAME_OF_CustomersTelephone = "CUSTOMERS_TELEPHONE"; + /** Db-name of CustomersFax. */ + public static final String COLUMN_DB_NAME_OF_CustomersFax = "CUSTOMERS_FAX"; + /** Db-name of CustomersPassword. */ + public static final String COLUMN_DB_NAME_OF_CustomersPassword = "CUSTOMERS_PASSWORD"; + /** Db-name of CustomersNewsletter. */ + public static final String COLUMN_DB_NAME_OF_CustomersNewsletter = "CUSTOMERS_NEWSLETTER"; + + /** Cap-prop-name of CustomersId. */ + public static final String COLUMN_CAP_PROP_NAME_OF_CustomersId = "CustomersId"; + /** Cap-prop-name of CustomersGender. */ + public static final String COLUMN_CAP_PROP_NAME_OF_CustomersGender = "CustomersGender"; + /** Cap-prop-name of CustomersFirstname. */ + public static final String COLUMN_CAP_PROP_NAME_OF_CustomersFirstname = "CustomersFirstname"; + /** Cap-prop-name of CustomersLastname. */ + public static final String COLUMN_CAP_PROP_NAME_OF_CustomersLastname = "CustomersLastname"; + /** Cap-prop-name of CustomersDob. */ + public static final String COLUMN_CAP_PROP_NAME_OF_CustomersDob = "CustomersDob"; + /** Cap-prop-name of CustomersEmailAddress. */ + public static final String COLUMN_CAP_PROP_NAME_OF_CustomersEmailAddress = "CustomersEmailAddress"; + /** Cap-prop-name of CustomersDefaultAddressId. */ + public static final String COLUMN_CAP_PROP_NAME_OF_CustomersDefaultAddressId = "CustomersDefaultAddressId"; + /** Cap-prop-name of CustomersTelephone. */ + public static final String COLUMN_CAP_PROP_NAME_OF_CustomersTelephone = "CustomersTelephone"; + /** Cap-prop-name of CustomersFax. */ + public static final String COLUMN_CAP_PROP_NAME_OF_CustomersFax = "CustomersFax"; + /** Cap-prop-name of CustomersPassword. */ + public static final String COLUMN_CAP_PROP_NAME_OF_CustomersPassword = "CustomersPassword"; + /** Cap-prop-name of CustomersNewsletter. */ + public static final String COLUMN_CAP_PROP_NAME_OF_CustomersNewsletter = "CustomersNewsletter"; + + + + /** Uncap-prop-name of CustomersId. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_CustomersId = "customersId"; + /** Uncap-prop-name of CustomersGender. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_CustomersGender = "customersGender"; + /** Uncap-prop-name of CustomersFirstname. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_CustomersFirstname = "customersFirstname"; + /** Uncap-prop-name of CustomersLastname. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_CustomersLastname = "customersLastname"; + /** Uncap-prop-name of CustomersDob. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_CustomersDob = "customersDob"; + /** Uncap-prop-name of CustomersEmailAddress. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_CustomersEmailAddress = "customersEmailAddress"; + /** Uncap-prop-name of CustomersDefaultAddressId. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_CustomersDefaultAddressId = "customersDefaultAddressId"; + /** Uncap-prop-name of CustomersTelephone. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_CustomersTelephone = "customersTelephone"; + /** Uncap-prop-name of CustomersFax. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_CustomersFax = "customersFax"; + /** Uncap-prop-name of CustomersPassword. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_CustomersPassword = "customersPassword"; + /** Uncap-prop-name of CustomersNewsletter. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_CustomersNewsletter = "customersNewsletter"; + + + + /** {db-name : cap-prop-name} map. */ + private static java.util.Map _dbNameCapPropNameMap; + protected static java.util.Map createDbNameCapPropNameMap() { + if (_dbNameCapPropNameMap != null) { + return _dbNameCapPropNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_DB_NAME, TABLE_CAP_PROP_NAME); + + map.put(COLUMN_DB_NAME_OF_CustomersId, COLUMN_CAP_PROP_NAME_OF_CustomersId); + map.put(COLUMN_DB_NAME_OF_CustomersGender, COLUMN_CAP_PROP_NAME_OF_CustomersGender); + map.put(COLUMN_DB_NAME_OF_CustomersFirstname, COLUMN_CAP_PROP_NAME_OF_CustomersFirstname); + map.put(COLUMN_DB_NAME_OF_CustomersLastname, COLUMN_CAP_PROP_NAME_OF_CustomersLastname); + map.put(COLUMN_DB_NAME_OF_CustomersDob, COLUMN_CAP_PROP_NAME_OF_CustomersDob); + map.put(COLUMN_DB_NAME_OF_CustomersEmailAddress, COLUMN_CAP_PROP_NAME_OF_CustomersEmailAddress); + map.put(COLUMN_DB_NAME_OF_CustomersDefaultAddressId, COLUMN_CAP_PROP_NAME_OF_CustomersDefaultAddressId); + map.put(COLUMN_DB_NAME_OF_CustomersTelephone, COLUMN_CAP_PROP_NAME_OF_CustomersTelephone); + map.put(COLUMN_DB_NAME_OF_CustomersFax, COLUMN_CAP_PROP_NAME_OF_CustomersFax); + map.put(COLUMN_DB_NAME_OF_CustomersPassword, COLUMN_CAP_PROP_NAME_OF_CustomersPassword); + map.put(COLUMN_DB_NAME_OF_CustomersNewsletter, COLUMN_CAP_PROP_NAME_OF_CustomersNewsletter); + + _dbNameCapPropNameMap = java.util.Collections.unmodifiableMap(map); + return _dbNameCapPropNameMap; + } + + /** {db-name : uncap-prop-name} map. */ + private static java.util.Map _dbNameUncapPropNameMap; + protected static java.util.Map createDbNameUncapPropNameMap() { + if (_dbNameUncapPropNameMap != null) { + return _dbNameUncapPropNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_DB_NAME, TABLE_UNCAP_PROP_NAME); + + map.put(COLUMN_DB_NAME_OF_CustomersId, COLUMN_UNCAP_PROP_NAME_OF_CustomersId); + map.put(COLUMN_DB_NAME_OF_CustomersGender, COLUMN_UNCAP_PROP_NAME_OF_CustomersGender); + map.put(COLUMN_DB_NAME_OF_CustomersFirstname, COLUMN_UNCAP_PROP_NAME_OF_CustomersFirstname); + map.put(COLUMN_DB_NAME_OF_CustomersLastname, COLUMN_UNCAP_PROP_NAME_OF_CustomersLastname); + map.put(COLUMN_DB_NAME_OF_CustomersDob, COLUMN_UNCAP_PROP_NAME_OF_CustomersDob); + map.put(COLUMN_DB_NAME_OF_CustomersEmailAddress, COLUMN_UNCAP_PROP_NAME_OF_CustomersEmailAddress); + map.put(COLUMN_DB_NAME_OF_CustomersDefaultAddressId, COLUMN_UNCAP_PROP_NAME_OF_CustomersDefaultAddressId); + map.put(COLUMN_DB_NAME_OF_CustomersTelephone, COLUMN_UNCAP_PROP_NAME_OF_CustomersTelephone); + map.put(COLUMN_DB_NAME_OF_CustomersFax, COLUMN_UNCAP_PROP_NAME_OF_CustomersFax); + map.put(COLUMN_DB_NAME_OF_CustomersPassword, COLUMN_UNCAP_PROP_NAME_OF_CustomersPassword); + map.put(COLUMN_DB_NAME_OF_CustomersNewsletter, COLUMN_UNCAP_PROP_NAME_OF_CustomersNewsletter); + + _dbNameUncapPropNameMap = java.util.Collections.unmodifiableMap(map); + return _dbNameUncapPropNameMap; + } + + /** {cap-prop-name : db-name} map. */ + private static java.util.Map _capPropNameDbNameMap; + protected static java.util.Map createCapPropNameDbNameMap() { + if (_capPropNameDbNameMap != null) { + return _capPropNameDbNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_CAP_PROP_NAME, TABLE_DB_NAME); + + map.put(COLUMN_CAP_PROP_NAME_OF_CustomersId, COLUMN_DB_NAME_OF_CustomersId); + map.put(COLUMN_CAP_PROP_NAME_OF_CustomersGender, COLUMN_DB_NAME_OF_CustomersGender); + map.put(COLUMN_CAP_PROP_NAME_OF_CustomersFirstname, COLUMN_DB_NAME_OF_CustomersFirstname); + map.put(COLUMN_CAP_PROP_NAME_OF_CustomersLastname, COLUMN_DB_NAME_OF_CustomersLastname); + map.put(COLUMN_CAP_PROP_NAME_OF_CustomersDob, COLUMN_DB_NAME_OF_CustomersDob); + map.put(COLUMN_CAP_PROP_NAME_OF_CustomersEmailAddress, COLUMN_DB_NAME_OF_CustomersEmailAddress); + map.put(COLUMN_CAP_PROP_NAME_OF_CustomersDefaultAddressId, COLUMN_DB_NAME_OF_CustomersDefaultAddressId); + map.put(COLUMN_CAP_PROP_NAME_OF_CustomersTelephone, COLUMN_DB_NAME_OF_CustomersTelephone); + map.put(COLUMN_CAP_PROP_NAME_OF_CustomersFax, COLUMN_DB_NAME_OF_CustomersFax); + map.put(COLUMN_CAP_PROP_NAME_OF_CustomersPassword, COLUMN_DB_NAME_OF_CustomersPassword); + map.put(COLUMN_CAP_PROP_NAME_OF_CustomersNewsletter, COLUMN_DB_NAME_OF_CustomersNewsletter); + + _capPropNameDbNameMap = java.util.Collections.unmodifiableMap(map); + return _capPropNameDbNameMap; + } + + /** {cap-prop-name : uncap-prop-name} map. */ + private static java.util.Map _capPropNameUncapPropNameMap; + protected static java.util.Map createCapPropNameUncapPropNameMap() { + if (_capPropNameUncapPropNameMap != null) { + return _capPropNameUncapPropNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_CAP_PROP_NAME, TABLE_UNCAP_PROP_NAME); + + map.put(COLUMN_CAP_PROP_NAME_OF_CustomersId, COLUMN_UNCAP_PROP_NAME_OF_CustomersId); + map.put(COLUMN_CAP_PROP_NAME_OF_CustomersGender, COLUMN_UNCAP_PROP_NAME_OF_CustomersGender); + map.put(COLUMN_CAP_PROP_NAME_OF_CustomersFirstname, COLUMN_UNCAP_PROP_NAME_OF_CustomersFirstname); + map.put(COLUMN_CAP_PROP_NAME_OF_CustomersLastname, COLUMN_UNCAP_PROP_NAME_OF_CustomersLastname); + map.put(COLUMN_CAP_PROP_NAME_OF_CustomersDob, COLUMN_UNCAP_PROP_NAME_OF_CustomersDob); + map.put(COLUMN_CAP_PROP_NAME_OF_CustomersEmailAddress, COLUMN_UNCAP_PROP_NAME_OF_CustomersEmailAddress); + map.put(COLUMN_CAP_PROP_NAME_OF_CustomersDefaultAddressId, COLUMN_UNCAP_PROP_NAME_OF_CustomersDefaultAddressId); + map.put(COLUMN_CAP_PROP_NAME_OF_CustomersTelephone, COLUMN_UNCAP_PROP_NAME_OF_CustomersTelephone); + map.put(COLUMN_CAP_PROP_NAME_OF_CustomersFax, COLUMN_UNCAP_PROP_NAME_OF_CustomersFax); + map.put(COLUMN_CAP_PROP_NAME_OF_CustomersPassword, COLUMN_UNCAP_PROP_NAME_OF_CustomersPassword); + map.put(COLUMN_CAP_PROP_NAME_OF_CustomersNewsletter, COLUMN_UNCAP_PROP_NAME_OF_CustomersNewsletter); + + _capPropNameUncapPropNameMap = java.util.Collections.unmodifiableMap(map); + return _capPropNameUncapPropNameMap; + } + + /** {uncap-prop-name : db-name} map. */ + private static java.util.Map _uncapPropNameDbNameMap; + protected static java.util.Map createUncapPropNameDbNameMap() { + if (_uncapPropNameDbNameMap != null) { + return _uncapPropNameDbNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_UNCAP_PROP_NAME, TABLE_DB_NAME); + + map.put(COLUMN_UNCAP_PROP_NAME_OF_CustomersId, COLUMN_DB_NAME_OF_CustomersId); + map.put(COLUMN_UNCAP_PROP_NAME_OF_CustomersGender, COLUMN_DB_NAME_OF_CustomersGender); + map.put(COLUMN_UNCAP_PROP_NAME_OF_CustomersFirstname, COLUMN_DB_NAME_OF_CustomersFirstname); + map.put(COLUMN_UNCAP_PROP_NAME_OF_CustomersLastname, COLUMN_DB_NAME_OF_CustomersLastname); + map.put(COLUMN_UNCAP_PROP_NAME_OF_CustomersDob, COLUMN_DB_NAME_OF_CustomersDob); + map.put(COLUMN_UNCAP_PROP_NAME_OF_CustomersEmailAddress, COLUMN_DB_NAME_OF_CustomersEmailAddress); + map.put(COLUMN_UNCAP_PROP_NAME_OF_CustomersDefaultAddressId, COLUMN_DB_NAME_OF_CustomersDefaultAddressId); + map.put(COLUMN_UNCAP_PROP_NAME_OF_CustomersTelephone, COLUMN_DB_NAME_OF_CustomersTelephone); + map.put(COLUMN_UNCAP_PROP_NAME_OF_CustomersFax, COLUMN_DB_NAME_OF_CustomersFax); + map.put(COLUMN_UNCAP_PROP_NAME_OF_CustomersPassword, COLUMN_DB_NAME_OF_CustomersPassword); + map.put(COLUMN_UNCAP_PROP_NAME_OF_CustomersNewsletter, COLUMN_DB_NAME_OF_CustomersNewsletter); + + _uncapPropNameDbNameMap = java.util.Collections.unmodifiableMap(map); + return _uncapPropNameDbNameMap; + } + + /** {uncap-prop-name : cap-prop-name} map. */ + private static java.util.Map _uncapPropNameCapPropNameMap; + protected static java.util.Map createUncapPropNameCapPropNameMap() { + if (_uncapPropNameCapPropNameMap != null) { + return _uncapPropNameCapPropNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_UNCAP_PROP_NAME, TABLE_CAP_PROP_NAME); + + map.put(COLUMN_UNCAP_PROP_NAME_OF_CustomersId, COLUMN_CAP_PROP_NAME_OF_CustomersId); + map.put(COLUMN_UNCAP_PROP_NAME_OF_CustomersGender, COLUMN_CAP_PROP_NAME_OF_CustomersGender); + map.put(COLUMN_UNCAP_PROP_NAME_OF_CustomersFirstname, COLUMN_CAP_PROP_NAME_OF_CustomersFirstname); + map.put(COLUMN_UNCAP_PROP_NAME_OF_CustomersLastname, COLUMN_CAP_PROP_NAME_OF_CustomersLastname); + map.put(COLUMN_UNCAP_PROP_NAME_OF_CustomersDob, COLUMN_CAP_PROP_NAME_OF_CustomersDob); + map.put(COLUMN_UNCAP_PROP_NAME_OF_CustomersEmailAddress, COLUMN_CAP_PROP_NAME_OF_CustomersEmailAddress); + map.put(COLUMN_UNCAP_PROP_NAME_OF_CustomersDefaultAddressId, COLUMN_CAP_PROP_NAME_OF_CustomersDefaultAddressId); + map.put(COLUMN_UNCAP_PROP_NAME_OF_CustomersTelephone, COLUMN_CAP_PROP_NAME_OF_CustomersTelephone); + map.put(COLUMN_UNCAP_PROP_NAME_OF_CustomersFax, COLUMN_CAP_PROP_NAME_OF_CustomersFax); + map.put(COLUMN_UNCAP_PROP_NAME_OF_CustomersPassword, COLUMN_CAP_PROP_NAME_OF_CustomersPassword); + map.put(COLUMN_UNCAP_PROP_NAME_OF_CustomersNewsletter, COLUMN_CAP_PROP_NAME_OF_CustomersNewsletter); + + _uncapPropNameCapPropNameMap = java.util.Collections.unmodifiableMap(map); + return _uncapPropNameCapPropNameMap; + } + + // =================================================================================== + // Name-Map + // ======== + /** + * This method implements the method that is declared at super. + * + * @return {db-name : cap-prop-name} map. + */ + public java.util.Map getDbNameCapPropNameMap() { + return createDbNameCapPropNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {db-name : uncap-prop-name} map. + */ + public java.util.Map getDbNameUncapPropNameMap() { + return createDbNameUncapPropNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {cap-prop-name : db-name} map. + */ + public java.util.Map getCapPropNameDbNameMap() { + return createCapPropNameDbNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {cap-prop-name : uncap-prop-name} map. + */ + public java.util.Map getCapPropNameUncapPropNameMap() { + return createCapPropNameUncapPropNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {uncap-prop-name : db-name} map. + */ + public java.util.Map getUncapPropNameDbNameMap() { + return createUncapPropNameDbNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {uncap-prop-name : cap-prop-name} map. + */ + public java.util.Map getUncapPropNameCapPropNameMap() { + return createUncapPropNameCapPropNameMap(); + } + + // =================================================================================== + // Table Name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + public String getTableDbName() { + return TABLE_DB_NAME; + } + + /** + * This method implements the method that is declared at super. + * + * @return Table cap-prop-name. (NotNull) + */ + public String getTableCapPropName() { + return TABLE_CAP_PROP_NAME; + } + + /** + * This method implements the method that is declared at super. + * + * @return Table property-name. (NotNull) + */ + public String getTableUncapPropName() { + return TABLE_UNCAP_PROP_NAME; + } + + // =================================================================================== + // Column Name + // =========== + public java.util.List getColumnDbNameList() { + final String[] columns = getColumnDbNameCommaString().split(","); + final java.util.List resultList = new java.util.ArrayList(); + for (int i=0; i < columns.length; i++) { + resultList.add(columns[i].trim()); + } + return resultList; + } + + public java.util.List getColumnCapPropNameList() { + final java.util.List columnDbNameList = getColumnDbNameList(); + final java.util.List resultList = new java.util.ArrayList(); + for (final java.util.Iterator ite = columnDbNameList.iterator(); ite.hasNext(); ) { + resultList.add(getDbNameCapPropNameMap().get((String)ite.next())); + } + return resultList; + } + + public java.util.List getColumnUncapPropNameList() { + final java.util.List columnDbNameList = getColumnDbNameList(); + final java.util.List resultList = new java.util.ArrayList(); + for (final java.util.Iterator ite = columnDbNameList.iterator(); ite.hasNext(); ) { + resultList.add(getDbNameUncapPropNameMap().get((String)ite.next())); + } + return resultList; + } + + /** + * This method implements the method that is declared at super. + * + * @return Column-db-name comma-string. (NotNull) + */ + public String getColumnDbNameCommaString() { + return "CUSTOMERS_ID, CUSTOMERS_GENDER, CUSTOMERS_FIRSTNAME, CUSTOMERS_LASTNAME, CUSTOMERS_DOB, CUSTOMERS_EMAIL_ADDRESS, CUSTOMERS_DEFAULT_ADDRESS_ID, CUSTOMERS_TELEPHONE, CUSTOMERS_FAX, CUSTOMERS_PASSWORD, CUSTOMERS_NEWSLETTER"; + } + + // =================================================================================== + // Type Name + // ========= + /** + * This method implements the method that is declared at super. + * + * @return The type-name of entity. (NotNull) + */ + public String getEntityTypeName() { + return "jp.sf.pal.pompei.exentity.Customers"; + } + + /** + * This method implements the method that is declared at super. + * + * @return The type-name of condition-bean. (NotNull) + */ + public String getConditionBeanTypeName() { + return "jp.sf.pal.pompei.cbean.bs.CustomersCB"; + } + + /** + * This method implements the method that is declared at super. + * + * @return The type-name of dao. (NotNull) + */ + public String getDaoTypeName() { + return "jp.sf.pal.pompei.exdao.CustomersDao"; + } + + /** + * This method implements the method that is declared at super. + * + * @return The type-name of behavior. (NotNull) + */ + public String getBehaviorTypeName() { + return "jp.sf.pal.pompei.exbhv.CustomersBhv"; + } + + // =================================================================================== + // Type + // ==== + /** + * This method implements the method that is declared at super. + * + * @return The type of entity. (NotNull) + */ + public Class getEntityType() { + return ENTITY_TYPE; + } + + // =================================================================================== + // Instance + // ======== + /** + * This method implements the method that is declared at super. + * + * @return The type of entity. (NotNull) + */ + public Entity newEntity() { + return newMyEntity(); + } + + /** + * New the instance of my entity. + * + * @return The instance of my entity. (NotNull) + */ + public Customers newMyEntity() { + return new Customers(); + } + + // =================================================================================== + // Foreign DBMeta + // ============== + /** + * This method implements the method that is declared at super. + * + * @param foreignPropertyName Foreign-property-name(Both OK - InitCap or not). (NotNull) + * @return Foreign DBMeta. (NotNull) + */ + public DBMeta getForeignDBMeta(String foreignPropertyName) { + assertStringNotNullAndNotTrimmedEmpty("foreignPropertyName", foreignPropertyName); + final String methodName = "getForeignDBMeta_" + foreignPropertyName.substring(0, 1) + foreignPropertyName.substring(1); + + java.lang.reflect.Method method = null; + try { + method = this.getClass().getMethod(methodName, new Class[]{}); + } catch (NoSuchMethodException e) { + String msg = "The foreignPropertyName is not found: foreignPropertyName=" + foreignPropertyName; + msg = msg + " tableName=" + TABLE_DB_NAME + " methodName=" + methodName; + throw new RuntimeException(msg, e); + } + try { + return (DBMeta)method.invoke(this, new Object[]{}); + } catch (IllegalAccessException e) { + throw new RuntimeException(e); + } catch (java.lang.reflect.InvocationTargetException e) { + throw new RuntimeException(e.getCause()); + } + } + + // =================================================================================== + // Determination + // ============= + /** + * This method implements the method that is declared at super. + * + * @return Determination. + */ + public boolean hasTwoOrMorePrimaryKeys() { + return false; + } + + /** + * This method implements the method that is declared at super. + * + * @return Determination. + */ + public boolean hasCommonColumn() { + return false; + } + + // =================================================================================== + // Entity Handling + // =============== + // ----------------------------------------------------- + // Accept + // ------ + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @param primaryKeyMap Primary key map. (NotNull and NotEmpty) + */ + public void acceptPrimaryKeyMap(Entity entity, java.util.Map primaryKeyMap) { + final Customers myEntity = (Customers)entity; + MapAssertUtil.assertPrimaryKeyMapNotNullAndNotEmpty(primaryKeyMap); + final MapStringValueAnalyzer analyzer = new MapStringValueAnalyzer(primaryKeyMap, entity.getModifiedPropertyNames()); + + MapAssertUtil.assertColumnExistingInPrimaryKeyMap(primaryKeyMap, "CUSTOMERS_ID"); + if (analyzer.init("CUSTOMERS_ID", "customersId", "customersId")) { myEntity.setCustomersId(analyzer.analyzeNumber(java.math.BigDecimal.class)); }; + + + } + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @param primaryKeyMapString Primary-key map-string. (NotNull and NotEmpty) + */ + public void acceptPrimaryKeyMapString(Entity entity, String primaryKeyMapString) { + MapStringUtil.acceptPrimaryKeyMapString(primaryKeyMapString, entity); + } + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @param columnValueMap Column-value map. (NotNull and NotEmpty) + */ + public void acceptColumnValueMap(Entity entity, java.util.Map columnValueMap) { + final Customers myEntity = (Customers)entity; + MapAssertUtil.assertColumnValueMapNotNullAndNotEmpty(columnValueMap); + final MapStringValueAnalyzer analyzer = new MapStringValueAnalyzer(columnValueMap, entity.getModifiedPropertyNames()); + + if (analyzer.init("CUSTOMERS_ID", "customersId", "customersId")) { myEntity.setCustomersId(analyzer.analyzeNumber(java.math.BigDecimal.class)); }; + if (analyzer.init("CUSTOMERS_GENDER", "customersGender", "customersGender")) { myEntity.setCustomersGender(analyzer.analyzeString(String.class)); }; + if (analyzer.init("CUSTOMERS_FIRSTNAME", "customersFirstname", "customersFirstname")) { myEntity.setCustomersFirstname(analyzer.analyzeString(String.class)); }; + if (analyzer.init("CUSTOMERS_LASTNAME", "customersLastname", "customersLastname")) { myEntity.setCustomersLastname(analyzer.analyzeString(String.class)); }; + if (analyzer.init("CUSTOMERS_DOB", "customersDob", "customersDob")) { myEntity.setCustomersDob(analyzer.analyzeDate(java.sql.Timestamp.class)); }; + if (analyzer.init("CUSTOMERS_EMAIL_ADDRESS", "customersEmailAddress", "customersEmailAddress")) { myEntity.setCustomersEmailAddress(analyzer.analyzeString(String.class)); }; + if (analyzer.init("CUSTOMERS_DEFAULT_ADDRESS_ID", "customersDefaultAddressId", "customersDefaultAddressId")) { myEntity.setCustomersDefaultAddressId(analyzer.analyzeNumber(java.math.BigDecimal.class)); }; + if (analyzer.init("CUSTOMERS_TELEPHONE", "customersTelephone", "customersTelephone")) { myEntity.setCustomersTelephone(analyzer.analyzeString(String.class)); }; + if (analyzer.init("CUSTOMERS_FAX", "customersFax", "customersFax")) { myEntity.setCustomersFax(analyzer.analyzeString(String.class)); }; + if (analyzer.init("CUSTOMERS_PASSWORD", "customersPassword", "customersPassword")) { myEntity.setCustomersPassword(analyzer.analyzeString(String.class)); }; + if (analyzer.init("CUSTOMERS_NEWSLETTER", "customersNewsletter", "customersNewsletter")) { myEntity.setCustomersNewsletter(analyzer.analyzeString(String.class)); }; + + } + + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @param columnValueMapString Column-value map-string. (NotNull and NotEmpty) + */ + public void acceptColumnValueMapString(Entity entity, String columnValueMapString) { + MapStringUtil.acceptColumnValueMapString(columnValueMapString, entity); + } + + + // ----------------------------------------------------- + // Extract + // ------- + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @return Primary-key map-string. (NotNull) + */ + public String extractPrimaryKeyMapString(Entity entity) { + return MapStringUtil.extractPrimaryKeyMapString(entity); + } + + /** + * Extract primary-key map-string. + * + * @param entity Target entity. (NotNull) + * @param startBrace Start-brace. (NotNull) + * @param endBrace End-brace. (NotNull) + * @param delimiter Delimiter. (NotNull) + * @param equal Equal. (NotNull) + * @return Primary-key map-string. (NotNull) + */ + public String extractPrimaryKeyMapString(Entity entity, String startBrace, String endBrace, String delimiter, String equal) { + final Customers myEntity = (Customers)entity; + final String mapMarkAndStartBrace = MAP_STRING_MAP_MARK + startBrace; + final StringBuffer sb = new StringBuffer(); + helpAppendingColumnValueString(sb, delimiter, equal, "CUSTOMERS_ID", myEntity.getCustomersId()); + + sb.delete(0, delimiter.length()).insert(0, mapMarkAndStartBrace).append(endBrace); + return sb.toString(); + + } + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @return Column-value map-string. (NotNull) + */ + public String extractColumnValueMapString(Entity entity) { + return MapStringUtil.extractColumnValueMapString(entity); + } + + /** + * Extract column-value map-string. + * + * @param entity Target entity. (NotNull) + * @param startBrace Start-brace. (NotNull) + * @param endBrace End-brace. (NotNull) + * @param delimiter Delimiter. (NotNull) + * @param equal Equal. (NotNull) + * @return Column-value map-string. (NotNull) + */ + public String extractColumnValueMapString(Entity entity, String startBrace, String endBrace, String delimiter, String equal) { + final Customers myEntity = (Customers)entity; + final String mapMarkAndStartBrace = MAP_STRING_MAP_MARK + startBrace; + final StringBuffer sb = new StringBuffer(); + helpAppendingColumnValueString(sb, delimiter, equal, "CUSTOMERS_ID", myEntity.getCustomersId()); + helpAppendingColumnValueString(sb, delimiter, equal, "CUSTOMERS_GENDER", myEntity.getCustomersGender()); + helpAppendingColumnValueString(sb, delimiter, equal, "CUSTOMERS_FIRSTNAME", myEntity.getCustomersFirstname()); + helpAppendingColumnValueString(sb, delimiter, equal, "CUSTOMERS_LASTNAME", myEntity.getCustomersLastname()); + helpAppendingColumnValueString(sb, delimiter, equal, "CUSTOMERS_DOB", myEntity.getCustomersDob()); + helpAppendingColumnValueString(sb, delimiter, equal, "CUSTOMERS_EMAIL_ADDRESS", myEntity.getCustomersEmailAddress()); + helpAppendingColumnValueString(sb, delimiter, equal, "CUSTOMERS_DEFAULT_ADDRESS_ID", myEntity.getCustomersDefaultAddressId()); + helpAppendingColumnValueString(sb, delimiter, equal, "CUSTOMERS_TELEPHONE", myEntity.getCustomersTelephone()); + helpAppendingColumnValueString(sb, delimiter, equal, "CUSTOMERS_FAX", myEntity.getCustomersFax()); + helpAppendingColumnValueString(sb, delimiter, equal, "CUSTOMERS_PASSWORD", myEntity.getCustomersPassword()); + helpAppendingColumnValueString(sb, delimiter, equal, "CUSTOMERS_NEWSLETTER", myEntity.getCustomersNewsletter()); + + sb.delete(0, delimiter.length()).insert(0, mapMarkAndStartBrace).append(endBrace); + return sb.toString(); + } + + private void helpAppendingColumnValueString(StringBuffer sb, String delimiter, String equal, String colName, Object value) { + sb.append(delimiter).append(colName).append(equal); + sb.append(helpGettingColumnStringValue(value)); + } + + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @return Column-value map-string. (NotNull) + */ + public String extractCommonColumnValueMapString(Entity entity) { + return "map:{}"; + } + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @return Column-value map-string. (NotNull) + */ + public String extractCommonColumnValueMapString(Entity entity, String startBrace, String endBrace, String delimiter, String equal) { + return "map:" + startBrace + endBrace; + } + + + // ----------------------------------------------------- + // Convert + // ------- + public java.util.List convertToColumnValueList(Entity entity) { + return new java.util.ArrayList(convertToColumnValueMap(entity).values()); + } + + public java.util.Map convertToColumnValueMap(Entity entity) { + final Customers myEntity = downcast(entity); + final java.util.Map valueMap = new java.util.LinkedHashMap(); + valueMap.put("CUSTOMERS_ID", myEntity.getCustomersId()); + valueMap.put("CUSTOMERS_GENDER", myEntity.getCustomersGender()); + valueMap.put("CUSTOMERS_FIRSTNAME", myEntity.getCustomersFirstname()); + valueMap.put("CUSTOMERS_LASTNAME", myEntity.getCustomersLastname()); + valueMap.put("CUSTOMERS_DOB", myEntity.getCustomersDob()); + valueMap.put("CUSTOMERS_EMAIL_ADDRESS", myEntity.getCustomersEmailAddress()); + valueMap.put("CUSTOMERS_DEFAULT_ADDRESS_ID", myEntity.getCustomersDefaultAddressId()); + valueMap.put("CUSTOMERS_TELEPHONE", myEntity.getCustomersTelephone()); + valueMap.put("CUSTOMERS_FAX", myEntity.getCustomersFax()); + valueMap.put("CUSTOMERS_PASSWORD", myEntity.getCustomersPassword()); + valueMap.put("CUSTOMERS_NEWSLETTER", myEntity.getCustomersNewsletter()); + return valueMap; + } + + public java.util.List convertToColumnStringValueList(Entity entity) { + return new java.util.ArrayList(convertToColumnStringValueMap(entity).values()); + } + + public java.util.Map convertToColumnStringValueMap(Entity entity) { + final Customers myEntity = downcast(entity); + final java.util.Map valueMap = new java.util.LinkedHashMap(); + valueMap.put("CUSTOMERS_ID", helpGettingColumnStringValue(myEntity.getCustomersId())); + valueMap.put("CUSTOMERS_GENDER", helpGettingColumnStringValue(myEntity.getCustomersGender())); + valueMap.put("CUSTOMERS_FIRSTNAME", helpGettingColumnStringValue(myEntity.getCustomersFirstname())); + valueMap.put("CUSTOMERS_LASTNAME", helpGettingColumnStringValue(myEntity.getCustomersLastname())); + valueMap.put("CUSTOMERS_DOB", helpGettingColumnStringValue(myEntity.getCustomersDob())); + valueMap.put("CUSTOMERS_EMAIL_ADDRESS", helpGettingColumnStringValue(myEntity.getCustomersEmailAddress())); + valueMap.put("CUSTOMERS_DEFAULT_ADDRESS_ID", helpGettingColumnStringValue(myEntity.getCustomersDefaultAddressId())); + valueMap.put("CUSTOMERS_TELEPHONE", helpGettingColumnStringValue(myEntity.getCustomersTelephone())); + valueMap.put("CUSTOMERS_FAX", helpGettingColumnStringValue(myEntity.getCustomersFax())); + valueMap.put("CUSTOMERS_PASSWORD", helpGettingColumnStringValue(myEntity.getCustomersPassword())); + valueMap.put("CUSTOMERS_NEWSLETTER", helpGettingColumnStringValue(myEntity.getCustomersNewsletter())); + return valueMap; + } + + // =================================================================================== + // JDBC Support + // ============ + public String getPreparedInsertClause() { + return "insert into CUSTOMERS(CUSTOMERS_ID, CUSTOMERS_GENDER, CUSTOMERS_FIRSTNAME, CUSTOMERS_LASTNAME, CUSTOMERS_DOB, CUSTOMERS_EMAIL_ADDRESS, CUSTOMERS_DEFAULT_ADDRESS_ID, CUSTOMERS_TELEPHONE, CUSTOMERS_FAX, CUSTOMERS_PASSWORD, CUSTOMERS_NEWSLETTER) values(? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? )"; + } + + public String getPreparedInsertClause(String tablePrefix) { + return "insert into " + tablePrefix + "CUSTOMERS(CUSTOMERS_ID, CUSTOMERS_GENDER, CUSTOMERS_FIRSTNAME, CUSTOMERS_LASTNAME, CUSTOMERS_DOB, CUSTOMERS_EMAIL_ADDRESS, CUSTOMERS_DEFAULT_ADDRESS_ID, CUSTOMERS_TELEPHONE, CUSTOMERS_FAX, CUSTOMERS_PASSWORD, CUSTOMERS_NEWSLETTER) values(? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? )"; + } + + // =================================================================================== + // Helper + // ====== + protected Customers downcast(Entity entity) { + assertObjectNotNull("entity", entity); + try { + return (Customers)entity; + } catch (ClassCastException e) { + String msg = "The entity should be Customers but it was: " + entity.getClass(); + throw new IllegalStateException(msg, e); + } + } + + protected void checkDowncast(Entity entity) { + downcast(entity); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/dbmeta/CustomersInfoDbm.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/dbmeta/CustomersInfoDbm.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/dbmeta/CustomersInfoDbm.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,720 @@ +package jp.sf.pal.pompei.bsentity.dbmeta; + + +import jp.sf.pal.pompei.allcommon.Entity; +import jp.sf.pal.pompei.allcommon.dbmeta.DBMeta; +import jp.sf.pal.pompei.allcommon.dbmeta.AbstractDBMeta; +import jp.sf.pal.pompei.exentity.CustomersInfo; + +/** + * The dbmeta of CUSTOMERS_INFO. (Singleton) + * + *
+ * [primary-key]
+ *     CUSTOMERS_INFO_ID
+ * 
+ * [column-property]
+ *     CUSTOMERS_INFO_ID, CUSTOMERS_INFO_DATE_OF_LAST_LOGON, CUSTOMERS_INFO_NUMBER_OF_LOGONS, CUSTOMERS_INFO_DATE_ACCOUNT_CREATED, CUSTOMERS_INFO_DATE_ACCOUNT_LAST_MODIFIED, GLOBAL_PRODUCT_NOTIFICATIONS
+ * 
+ * [foreign-property]
+ *     
+ * 
+ * [refferer-property]
+ *     
+ * 
+ * [sequence]
+ *     
+ * 
+ * [identity]
+ *     
+ * 
+ * [update-date]
+ *     
+ * 
+ * [version-no]
+ *     
+ * 
+ * 
+ * + * @author DBFlute(AutoGenerator) + */ +public class CustomersInfoDbm extends AbstractDBMeta { + + // =================================================================================== + // Definition + // ========== + /** The type of entity. */ + protected static final Class ENTITY_TYPE = CustomersInfo.class; + + /** Singleton instance. */ + private static final CustomersInfoDbm _instance = new CustomersInfoDbm(); + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + private CustomersInfoDbm() { + } + + // =================================================================================== + // Singleton + // ========= + /** + * Get instance. + * + * @return Singleton instance. (NotNull) + */ + public static CustomersInfoDbm getInstance() { + return _instance; + } + + // =================================================================================== + // Name Definition + // =============== + /** Table db name. */ + public static final String TABLE_DB_NAME = "CUSTOMERS_INFO"; + + /** Table cap-prop name. */ + public static final String TABLE_CAP_PROP_NAME = "CustomersInfo"; + + /** Table uncap-prop name. */ + public static final String TABLE_UNCAP_PROP_NAME = "customersInfo"; + + /** Db-name of CustomersInfoId. */ + public static final String COLUMN_DB_NAME_OF_CustomersInfoId = "CUSTOMERS_INFO_ID"; + /** Db-name of CustomersInfoDateOfLastLogon. */ + public static final String COLUMN_DB_NAME_OF_CustomersInfoDateOfLastLogon = "CUSTOMERS_INFO_DATE_OF_LAST_LOGON"; + /** Db-name of CustomersInfoNumberOfLogons. */ + public static final String COLUMN_DB_NAME_OF_CustomersInfoNumberOfLogons = "CUSTOMERS_INFO_NUMBER_OF_LOGONS"; + /** Db-name of CustomersInfoDateAccountCreated. */ + public static final String COLUMN_DB_NAME_OF_CustomersInfoDateAccountCreated = "CUSTOMERS_INFO_DATE_ACCOUNT_CREATED"; + /** Db-name of CustomersInfoDateAccountLastModified. */ + public static final String COLUMN_DB_NAME_OF_CustomersInfoDateAccountLastModified = "CUSTOMERS_INFO_DATE_ACCOUNT_LAST_MODIFIED"; + /** Db-name of GlobalProductNotifications. */ + public static final String COLUMN_DB_NAME_OF_GlobalProductNotifications = "GLOBAL_PRODUCT_NOTIFICATIONS"; + + /** Cap-prop-name of CustomersInfoId. */ + public static final String COLUMN_CAP_PROP_NAME_OF_CustomersInfoId = "CustomersInfoId"; + /** Cap-prop-name of CustomersInfoDateOfLastLogon. */ + public static final String COLUMN_CAP_PROP_NAME_OF_CustomersInfoDateOfLastLogon = "CustomersInfoDateOfLastLogon"; + /** Cap-prop-name of CustomersInfoNumberOfLogons. */ + public static final String COLUMN_CAP_PROP_NAME_OF_CustomersInfoNumberOfLogons = "CustomersInfoNumberOfLogons"; + /** Cap-prop-name of CustomersInfoDateAccountCreated. */ + public static final String COLUMN_CAP_PROP_NAME_OF_CustomersInfoDateAccountCreated = "CustomersInfoDateAccountCreated"; + /** Cap-prop-name of CustomersInfoDateAccountLastModified. */ + public static final String COLUMN_CAP_PROP_NAME_OF_CustomersInfoDateAccountLastModified = "CustomersInfoDateAccountLastModified"; + /** Cap-prop-name of GlobalProductNotifications. */ + public static final String COLUMN_CAP_PROP_NAME_OF_GlobalProductNotifications = "GlobalProductNotifications"; + + + + /** Uncap-prop-name of CustomersInfoId. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_CustomersInfoId = "customersInfoId"; + /** Uncap-prop-name of CustomersInfoDateOfLastLogon. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_CustomersInfoDateOfLastLogon = "customersInfoDateOfLastLogon"; + /** Uncap-prop-name of CustomersInfoNumberOfLogons. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_CustomersInfoNumberOfLogons = "customersInfoNumberOfLogons"; + /** Uncap-prop-name of CustomersInfoDateAccountCreated. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_CustomersInfoDateAccountCreated = "customersInfoDateAccountCreated"; + /** Uncap-prop-name of CustomersInfoDateAccountLastModified. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_CustomersInfoDateAccountLastModified = "customersInfoDateAccountLastModified"; + /** Uncap-prop-name of GlobalProductNotifications. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_GlobalProductNotifications = "globalProductNotifications"; + + + + /** {db-name : cap-prop-name} map. */ + private static java.util.Map _dbNameCapPropNameMap; + protected static java.util.Map createDbNameCapPropNameMap() { + if (_dbNameCapPropNameMap != null) { + return _dbNameCapPropNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_DB_NAME, TABLE_CAP_PROP_NAME); + + map.put(COLUMN_DB_NAME_OF_CustomersInfoId, COLUMN_CAP_PROP_NAME_OF_CustomersInfoId); + map.put(COLUMN_DB_NAME_OF_CustomersInfoDateOfLastLogon, COLUMN_CAP_PROP_NAME_OF_CustomersInfoDateOfLastLogon); + map.put(COLUMN_DB_NAME_OF_CustomersInfoNumberOfLogons, COLUMN_CAP_PROP_NAME_OF_CustomersInfoNumberOfLogons); + map.put(COLUMN_DB_NAME_OF_CustomersInfoDateAccountCreated, COLUMN_CAP_PROP_NAME_OF_CustomersInfoDateAccountCreated); + map.put(COLUMN_DB_NAME_OF_CustomersInfoDateAccountLastModified, COLUMN_CAP_PROP_NAME_OF_CustomersInfoDateAccountLastModified); + map.put(COLUMN_DB_NAME_OF_GlobalProductNotifications, COLUMN_CAP_PROP_NAME_OF_GlobalProductNotifications); + + _dbNameCapPropNameMap = java.util.Collections.unmodifiableMap(map); + return _dbNameCapPropNameMap; + } + + /** {db-name : uncap-prop-name} map. */ + private static java.util.Map _dbNameUncapPropNameMap; + protected static java.util.Map createDbNameUncapPropNameMap() { + if (_dbNameUncapPropNameMap != null) { + return _dbNameUncapPropNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_DB_NAME, TABLE_UNCAP_PROP_NAME); + + map.put(COLUMN_DB_NAME_OF_CustomersInfoId, COLUMN_UNCAP_PROP_NAME_OF_CustomersInfoId); + map.put(COLUMN_DB_NAME_OF_CustomersInfoDateOfLastLogon, COLUMN_UNCAP_PROP_NAME_OF_CustomersInfoDateOfLastLogon); + map.put(COLUMN_DB_NAME_OF_CustomersInfoNumberOfLogons, COLUMN_UNCAP_PROP_NAME_OF_CustomersInfoNumberOfLogons); + map.put(COLUMN_DB_NAME_OF_CustomersInfoDateAccountCreated, COLUMN_UNCAP_PROP_NAME_OF_CustomersInfoDateAccountCreated); + map.put(COLUMN_DB_NAME_OF_CustomersInfoDateAccountLastModified, COLUMN_UNCAP_PROP_NAME_OF_CustomersInfoDateAccountLastModified); + map.put(COLUMN_DB_NAME_OF_GlobalProductNotifications, COLUMN_UNCAP_PROP_NAME_OF_GlobalProductNotifications); + + _dbNameUncapPropNameMap = java.util.Collections.unmodifiableMap(map); + return _dbNameUncapPropNameMap; + } + + /** {cap-prop-name : db-name} map. */ + private static java.util.Map _capPropNameDbNameMap; + protected static java.util.Map createCapPropNameDbNameMap() { + if (_capPropNameDbNameMap != null) { + return _capPropNameDbNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_CAP_PROP_NAME, TABLE_DB_NAME); + + map.put(COLUMN_CAP_PROP_NAME_OF_CustomersInfoId, COLUMN_DB_NAME_OF_CustomersInfoId); + map.put(COLUMN_CAP_PROP_NAME_OF_CustomersInfoDateOfLastLogon, COLUMN_DB_NAME_OF_CustomersInfoDateOfLastLogon); + map.put(COLUMN_CAP_PROP_NAME_OF_CustomersInfoNumberOfLogons, COLUMN_DB_NAME_OF_CustomersInfoNumberOfLogons); + map.put(COLUMN_CAP_PROP_NAME_OF_CustomersInfoDateAccountCreated, COLUMN_DB_NAME_OF_CustomersInfoDateAccountCreated); + map.put(COLUMN_CAP_PROP_NAME_OF_CustomersInfoDateAccountLastModified, COLUMN_DB_NAME_OF_CustomersInfoDateAccountLastModified); + map.put(COLUMN_CAP_PROP_NAME_OF_GlobalProductNotifications, COLUMN_DB_NAME_OF_GlobalProductNotifications); + + _capPropNameDbNameMap = java.util.Collections.unmodifiableMap(map); + return _capPropNameDbNameMap; + } + + /** {cap-prop-name : uncap-prop-name} map. */ + private static java.util.Map _capPropNameUncapPropNameMap; + protected static java.util.Map createCapPropNameUncapPropNameMap() { + if (_capPropNameUncapPropNameMap != null) { + return _capPropNameUncapPropNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_CAP_PROP_NAME, TABLE_UNCAP_PROP_NAME); + + map.put(COLUMN_CAP_PROP_NAME_OF_CustomersInfoId, COLUMN_UNCAP_PROP_NAME_OF_CustomersInfoId); + map.put(COLUMN_CAP_PROP_NAME_OF_CustomersInfoDateOfLastLogon, COLUMN_UNCAP_PROP_NAME_OF_CustomersInfoDateOfLastLogon); + map.put(COLUMN_CAP_PROP_NAME_OF_CustomersInfoNumberOfLogons, COLUMN_UNCAP_PROP_NAME_OF_CustomersInfoNumberOfLogons); + map.put(COLUMN_CAP_PROP_NAME_OF_CustomersInfoDateAccountCreated, COLUMN_UNCAP_PROP_NAME_OF_CustomersInfoDateAccountCreated); + map.put(COLUMN_CAP_PROP_NAME_OF_CustomersInfoDateAccountLastModified, COLUMN_UNCAP_PROP_NAME_OF_CustomersInfoDateAccountLastModified); + map.put(COLUMN_CAP_PROP_NAME_OF_GlobalProductNotifications, COLUMN_UNCAP_PROP_NAME_OF_GlobalProductNotifications); + + _capPropNameUncapPropNameMap = java.util.Collections.unmodifiableMap(map); + return _capPropNameUncapPropNameMap; + } + + /** {uncap-prop-name : db-name} map. */ + private static java.util.Map _uncapPropNameDbNameMap; + protected static java.util.Map createUncapPropNameDbNameMap() { + if (_uncapPropNameDbNameMap != null) { + return _uncapPropNameDbNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_UNCAP_PROP_NAME, TABLE_DB_NAME); + + map.put(COLUMN_UNCAP_PROP_NAME_OF_CustomersInfoId, COLUMN_DB_NAME_OF_CustomersInfoId); + map.put(COLUMN_UNCAP_PROP_NAME_OF_CustomersInfoDateOfLastLogon, COLUMN_DB_NAME_OF_CustomersInfoDateOfLastLogon); + map.put(COLUMN_UNCAP_PROP_NAME_OF_CustomersInfoNumberOfLogons, COLUMN_DB_NAME_OF_CustomersInfoNumberOfLogons); + map.put(COLUMN_UNCAP_PROP_NAME_OF_CustomersInfoDateAccountCreated, COLUMN_DB_NAME_OF_CustomersInfoDateAccountCreated); + map.put(COLUMN_UNCAP_PROP_NAME_OF_CustomersInfoDateAccountLastModified, COLUMN_DB_NAME_OF_CustomersInfoDateAccountLastModified); + map.put(COLUMN_UNCAP_PROP_NAME_OF_GlobalProductNotifications, COLUMN_DB_NAME_OF_GlobalProductNotifications); + + _uncapPropNameDbNameMap = java.util.Collections.unmodifiableMap(map); + return _uncapPropNameDbNameMap; + } + + /** {uncap-prop-name : cap-prop-name} map. */ + private static java.util.Map _uncapPropNameCapPropNameMap; + protected static java.util.Map createUncapPropNameCapPropNameMap() { + if (_uncapPropNameCapPropNameMap != null) { + return _uncapPropNameCapPropNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_UNCAP_PROP_NAME, TABLE_CAP_PROP_NAME); + + map.put(COLUMN_UNCAP_PROP_NAME_OF_CustomersInfoId, COLUMN_CAP_PROP_NAME_OF_CustomersInfoId); + map.put(COLUMN_UNCAP_PROP_NAME_OF_CustomersInfoDateOfLastLogon, COLUMN_CAP_PROP_NAME_OF_CustomersInfoDateOfLastLogon); + map.put(COLUMN_UNCAP_PROP_NAME_OF_CustomersInfoNumberOfLogons, COLUMN_CAP_PROP_NAME_OF_CustomersInfoNumberOfLogons); + map.put(COLUMN_UNCAP_PROP_NAME_OF_CustomersInfoDateAccountCreated, COLUMN_CAP_PROP_NAME_OF_CustomersInfoDateAccountCreated); + map.put(COLUMN_UNCAP_PROP_NAME_OF_CustomersInfoDateAccountLastModified, COLUMN_CAP_PROP_NAME_OF_CustomersInfoDateAccountLastModified); + map.put(COLUMN_UNCAP_PROP_NAME_OF_GlobalProductNotifications, COLUMN_CAP_PROP_NAME_OF_GlobalProductNotifications); + + _uncapPropNameCapPropNameMap = java.util.Collections.unmodifiableMap(map); + return _uncapPropNameCapPropNameMap; + } + + // =================================================================================== + // Name-Map + // ======== + /** + * This method implements the method that is declared at super. + * + * @return {db-name : cap-prop-name} map. + */ + public java.util.Map getDbNameCapPropNameMap() { + return createDbNameCapPropNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {db-name : uncap-prop-name} map. + */ + public java.util.Map getDbNameUncapPropNameMap() { + return createDbNameUncapPropNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {cap-prop-name : db-name} map. + */ + public java.util.Map getCapPropNameDbNameMap() { + return createCapPropNameDbNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {cap-prop-name : uncap-prop-name} map. + */ + public java.util.Map getCapPropNameUncapPropNameMap() { + return createCapPropNameUncapPropNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {uncap-prop-name : db-name} map. + */ + public java.util.Map getUncapPropNameDbNameMap() { + return createUncapPropNameDbNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {uncap-prop-name : cap-prop-name} map. + */ + public java.util.Map getUncapPropNameCapPropNameMap() { + return createUncapPropNameCapPropNameMap(); + } + + // =================================================================================== + // Table Name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + public String getTableDbName() { + return TABLE_DB_NAME; + } + + /** + * This method implements the method that is declared at super. + * + * @return Table cap-prop-name. (NotNull) + */ + public String getTableCapPropName() { + return TABLE_CAP_PROP_NAME; + } + + /** + * This method implements the method that is declared at super. + * + * @return Table property-name. (NotNull) + */ + public String getTableUncapPropName() { + return TABLE_UNCAP_PROP_NAME; + } + + // =================================================================================== + // Column Name + // =========== + public java.util.List getColumnDbNameList() { + final String[] columns = getColumnDbNameCommaString().split(","); + final java.util.List resultList = new java.util.ArrayList(); + for (int i=0; i < columns.length; i++) { + resultList.add(columns[i].trim()); + } + return resultList; + } + + public java.util.List getColumnCapPropNameList() { + final java.util.List columnDbNameList = getColumnDbNameList(); + final java.util.List resultList = new java.util.ArrayList(); + for (final java.util.Iterator ite = columnDbNameList.iterator(); ite.hasNext(); ) { + resultList.add(getDbNameCapPropNameMap().get((String)ite.next())); + } + return resultList; + } + + public java.util.List getColumnUncapPropNameList() { + final java.util.List columnDbNameList = getColumnDbNameList(); + final java.util.List resultList = new java.util.ArrayList(); + for (final java.util.Iterator ite = columnDbNameList.iterator(); ite.hasNext(); ) { + resultList.add(getDbNameUncapPropNameMap().get((String)ite.next())); + } + return resultList; + } + + /** + * This method implements the method that is declared at super. + * + * @return Column-db-name comma-string. (NotNull) + */ + public String getColumnDbNameCommaString() { + return "CUSTOMERS_INFO_ID, CUSTOMERS_INFO_DATE_OF_LAST_LOGON, CUSTOMERS_INFO_NUMBER_OF_LOGONS, CUSTOMERS_INFO_DATE_ACCOUNT_CREATED, CUSTOMERS_INFO_DATE_ACCOUNT_LAST_MODIFIED, GLOBAL_PRODUCT_NOTIFICATIONS"; + } + + // =================================================================================== + // Type Name + // ========= + /** + * This method implements the method that is declared at super. + * + * @return The type-name of entity. (NotNull) + */ + public String getEntityTypeName() { + return "jp.sf.pal.pompei.exentity.CustomersInfo"; + } + + /** + * This method implements the method that is declared at super. + * + * @return The type-name of condition-bean. (NotNull) + */ + public String getConditionBeanTypeName() { + return "jp.sf.pal.pompei.cbean.bs.CustomersInfoCB"; + } + + /** + * This method implements the method that is declared at super. + * + * @return The type-name of dao. (NotNull) + */ + public String getDaoTypeName() { + return "jp.sf.pal.pompei.exdao.CustomersInfoDao"; + } + + /** + * This method implements the method that is declared at super. + * + * @return The type-name of behavior. (NotNull) + */ + public String getBehaviorTypeName() { + return "jp.sf.pal.pompei.exbhv.CustomersInfoBhv"; + } + + // =================================================================================== + // Type + // ==== + /** + * This method implements the method that is declared at super. + * + * @return The type of entity. (NotNull) + */ + public Class getEntityType() { + return ENTITY_TYPE; + } + + // =================================================================================== + // Instance + // ======== + /** + * This method implements the method that is declared at super. + * + * @return The type of entity. (NotNull) + */ + public Entity newEntity() { + return newMyEntity(); + } + + /** + * New the instance of my entity. + * + * @return The instance of my entity. (NotNull) + */ + public CustomersInfo newMyEntity() { + return new CustomersInfo(); + } + + // =================================================================================== + // Foreign DBMeta + // ============== + /** + * This method implements the method that is declared at super. + * + * @param foreignPropertyName Foreign-property-name(Both OK - InitCap or not). (NotNull) + * @return Foreign DBMeta. (NotNull) + */ + public DBMeta getForeignDBMeta(String foreignPropertyName) { + assertStringNotNullAndNotTrimmedEmpty("foreignPropertyName", foreignPropertyName); + final String methodName = "getForeignDBMeta_" + foreignPropertyName.substring(0, 1) + foreignPropertyName.substring(1); + + java.lang.reflect.Method method = null; + try { + method = this.getClass().getMethod(methodName, new Class[]{}); + } catch (NoSuchMethodException e) { + String msg = "The foreignPropertyName is not found: foreignPropertyName=" + foreignPropertyName; + msg = msg + " tableName=" + TABLE_DB_NAME + " methodName=" + methodName; + throw new RuntimeException(msg, e); + } + try { + return (DBMeta)method.invoke(this, new Object[]{}); + } catch (IllegalAccessException e) { + throw new RuntimeException(e); + } catch (java.lang.reflect.InvocationTargetException e) { + throw new RuntimeException(e.getCause()); + } + } + + // =================================================================================== + // Determination + // ============= + /** + * This method implements the method that is declared at super. + * + * @return Determination. + */ + public boolean hasTwoOrMorePrimaryKeys() { + return false; + } + + /** + * This method implements the method that is declared at super. + * + * @return Determination. + */ + public boolean hasCommonColumn() { + return false; + } + + // =================================================================================== + // Entity Handling + // =============== + // ----------------------------------------------------- + // Accept + // ------ + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @param primaryKeyMap Primary key map. (NotNull and NotEmpty) + */ + public void acceptPrimaryKeyMap(Entity entity, java.util.Map primaryKeyMap) { + final CustomersInfo myEntity = (CustomersInfo)entity; + MapAssertUtil.assertPrimaryKeyMapNotNullAndNotEmpty(primaryKeyMap); + final MapStringValueAnalyzer analyzer = new MapStringValueAnalyzer(primaryKeyMap, entity.getModifiedPropertyNames()); + + MapAssertUtil.assertColumnExistingInPrimaryKeyMap(primaryKeyMap, "CUSTOMERS_INFO_ID"); + if (analyzer.init("CUSTOMERS_INFO_ID", "customersInfoId", "customersInfoId")) { myEntity.setCustomersInfoId(analyzer.analyzeNumber(java.math.BigDecimal.class)); }; + + + } + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @param primaryKeyMapString Primary-key map-string. (NotNull and NotEmpty) + */ + public void acceptPrimaryKeyMapString(Entity entity, String primaryKeyMapString) { + MapStringUtil.acceptPrimaryKeyMapString(primaryKeyMapString, entity); + } + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @param columnValueMap Column-value map. (NotNull and NotEmpty) + */ + public void acceptColumnValueMap(Entity entity, java.util.Map columnValueMap) { + final CustomersInfo myEntity = (CustomersInfo)entity; + MapAssertUtil.assertColumnValueMapNotNullAndNotEmpty(columnValueMap); + final MapStringValueAnalyzer analyzer = new MapStringValueAnalyzer(columnValueMap, entity.getModifiedPropertyNames()); + + if (analyzer.init("CUSTOMERS_INFO_ID", "customersInfoId", "customersInfoId")) { myEntity.setCustomersInfoId(analyzer.analyzeNumber(java.math.BigDecimal.class)); }; + if (analyzer.init("CUSTOMERS_INFO_DATE_OF_LAST_LOGON", "customersInfoDateOfLastLogon", "customersInfoDateOfLastLogon")) { myEntity.setCustomersInfoDateOfLastLogon(analyzer.analyzeDate(java.sql.Timestamp.class)); }; + if (analyzer.init("CUSTOMERS_INFO_NUMBER_OF_LOGONS", "customersInfoNumberOfLogons", "customersInfoNumberOfLogons")) { myEntity.setCustomersInfoNumberOfLogons(analyzer.analyzeNumber(java.math.BigDecimal.class)); }; + if (analyzer.init("CUSTOMERS_INFO_DATE_ACCOUNT_CREATED", "customersInfoDateAccountCreated", "customersInfoDateAccountCreated")) { myEntity.setCustomersInfoDateAccountCreated(analyzer.analyzeDate(java.sql.Timestamp.class)); }; + if (analyzer.init("CUSTOMERS_INFO_DATE_ACCOUNT_LAST_MODIFIED", "customersInfoDateAccountLastModified", "customersInfoDateAccountLastModified")) { myEntity.setCustomersInfoDateAccountLastModified(analyzer.analyzeDate(java.sql.Timestamp.class)); }; + if (analyzer.init("GLOBAL_PRODUCT_NOTIFICATIONS", "globalProductNotifications", "globalProductNotifications")) { myEntity.setGlobalProductNotifications(analyzer.analyzeNumber(java.math.BigDecimal.class)); }; + + } + + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @param columnValueMapString Column-value map-string. (NotNull and NotEmpty) + */ + public void acceptColumnValueMapString(Entity entity, String columnValueMapString) { + MapStringUtil.acceptColumnValueMapString(columnValueMapString, entity); + } + + + // ----------------------------------------------------- + // Extract + // ------- + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @return Primary-key map-string. (NotNull) + */ + public String extractPrimaryKeyMapString(Entity entity) { + return MapStringUtil.extractPrimaryKeyMapString(entity); + } + + /** + * Extract primary-key map-string. + * + * @param entity Target entity. (NotNull) + * @param startBrace Start-brace. (NotNull) + * @param endBrace End-brace. (NotNull) + * @param delimiter Delimiter. (NotNull) + * @param equal Equal. (NotNull) + * @return Primary-key map-string. (NotNull) + */ + public String extractPrimaryKeyMapString(Entity entity, String startBrace, String endBrace, String delimiter, String equal) { + final CustomersInfo myEntity = (CustomersInfo)entity; + final String mapMarkAndStartBrace = MAP_STRING_MAP_MARK + startBrace; + final StringBuffer sb = new StringBuffer(); + helpAppendingColumnValueString(sb, delimiter, equal, "CUSTOMERS_INFO_ID", myEntity.getCustomersInfoId()); + + sb.delete(0, delimiter.length()).insert(0, mapMarkAndStartBrace).append(endBrace); + return sb.toString(); + + } + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @return Column-value map-string. (NotNull) + */ + public String extractColumnValueMapString(Entity entity) { + return MapStringUtil.extractColumnValueMapString(entity); + } + + /** + * Extract column-value map-string. + * + * @param entity Target entity. (NotNull) + * @param startBrace Start-brace. (NotNull) + * @param endBrace End-brace. (NotNull) + * @param delimiter Delimiter. (NotNull) + * @param equal Equal. (NotNull) + * @return Column-value map-string. (NotNull) + */ + public String extractColumnValueMapString(Entity entity, String startBrace, String endBrace, String delimiter, String equal) { + final CustomersInfo myEntity = (CustomersInfo)entity; + final String mapMarkAndStartBrace = MAP_STRING_MAP_MARK + startBrace; + final StringBuffer sb = new StringBuffer(); + helpAppendingColumnValueString(sb, delimiter, equal, "CUSTOMERS_INFO_ID", myEntity.getCustomersInfoId()); + helpAppendingColumnValueString(sb, delimiter, equal, "CUSTOMERS_INFO_DATE_OF_LAST_LOGON", myEntity.getCustomersInfoDateOfLastLogon()); + helpAppendingColumnValueString(sb, delimiter, equal, "CUSTOMERS_INFO_NUMBER_OF_LOGONS", myEntity.getCustomersInfoNumberOfLogons()); + helpAppendingColumnValueString(sb, delimiter, equal, "CUSTOMERS_INFO_DATE_ACCOUNT_CREATED", myEntity.getCustomersInfoDateAccountCreated()); + helpAppendingColumnValueString(sb, delimiter, equal, "CUSTOMERS_INFO_DATE_ACCOUNT_LAST_MODIFIED", myEntity.getCustomersInfoDateAccountLastModified()); + helpAppendingColumnValueString(sb, delimiter, equal, "GLOBAL_PRODUCT_NOTIFICATIONS", myEntity.getGlobalProductNotifications()); + + sb.delete(0, delimiter.length()).insert(0, mapMarkAndStartBrace).append(endBrace); + return sb.toString(); + } + + private void helpAppendingColumnValueString(StringBuffer sb, String delimiter, String equal, String colName, Object value) { + sb.append(delimiter).append(colName).append(equal); + sb.append(helpGettingColumnStringValue(value)); + } + + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @return Column-value map-string. (NotNull) + */ + public String extractCommonColumnValueMapString(Entity entity) { + return "map:{}"; + } + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @return Column-value map-string. (NotNull) + */ + public String extractCommonColumnValueMapString(Entity entity, String startBrace, String endBrace, String delimiter, String equal) { + return "map:" + startBrace + endBrace; + } + + + // ----------------------------------------------------- + // Convert + // ------- + public java.util.List convertToColumnValueList(Entity entity) { + return new java.util.ArrayList(convertToColumnValueMap(entity).values()); + } + + public java.util.Map convertToColumnValueMap(Entity entity) { + final CustomersInfo myEntity = downcast(entity); + final java.util.Map valueMap = new java.util.LinkedHashMap(); + valueMap.put("CUSTOMERS_INFO_ID", myEntity.getCustomersInfoId()); + valueMap.put("CUSTOMERS_INFO_DATE_OF_LAST_LOGON", myEntity.getCustomersInfoDateOfLastLogon()); + valueMap.put("CUSTOMERS_INFO_NUMBER_OF_LOGONS", myEntity.getCustomersInfoNumberOfLogons()); + valueMap.put("CUSTOMERS_INFO_DATE_ACCOUNT_CREATED", myEntity.getCustomersInfoDateAccountCreated()); + valueMap.put("CUSTOMERS_INFO_DATE_ACCOUNT_LAST_MODIFIED", myEntity.getCustomersInfoDateAccountLastModified()); + valueMap.put("GLOBAL_PRODUCT_NOTIFICATIONS", myEntity.getGlobalProductNotifications()); + return valueMap; + } + + public java.util.List convertToColumnStringValueList(Entity entity) { + return new java.util.ArrayList(convertToColumnStringValueMap(entity).values()); + } + + public java.util.Map convertToColumnStringValueMap(Entity entity) { + final CustomersInfo myEntity = downcast(entity); + final java.util.Map valueMap = new java.util.LinkedHashMap(); + valueMap.put("CUSTOMERS_INFO_ID", helpGettingColumnStringValue(myEntity.getCustomersInfoId())); + valueMap.put("CUSTOMERS_INFO_DATE_OF_LAST_LOGON", helpGettingColumnStringValue(myEntity.getCustomersInfoDateOfLastLogon())); + valueMap.put("CUSTOMERS_INFO_NUMBER_OF_LOGONS", helpGettingColumnStringValue(myEntity.getCustomersInfoNumberOfLogons())); + valueMap.put("CUSTOMERS_INFO_DATE_ACCOUNT_CREATED", helpGettingColumnStringValue(myEntity.getCustomersInfoDateAccountCreated())); + valueMap.put("CUSTOMERS_INFO_DATE_ACCOUNT_LAST_MODIFIED", helpGettingColumnStringValue(myEntity.getCustomersInfoDateAccountLastModified())); + valueMap.put("GLOBAL_PRODUCT_NOTIFICATIONS", helpGettingColumnStringValue(myEntity.getGlobalProductNotifications())); + return valueMap; + } + + // =================================================================================== + // JDBC Support + // ============ + public String getPreparedInsertClause() { + return "insert into CUSTOMERS_INFO(CUSTOMERS_INFO_ID, CUSTOMERS_INFO_DATE_OF_LAST_LOGON, CUSTOMERS_INFO_NUMBER_OF_LOGONS, CUSTOMERS_INFO_DATE_ACCOUNT_CREATED, CUSTOMERS_INFO_DATE_ACCOUNT_LAST_MODIFIED, GLOBAL_PRODUCT_NOTIFICATIONS) values(? , ? , ? , ? , ? , ? )"; + } + + public String getPreparedInsertClause(String tablePrefix) { + return "insert into " + tablePrefix + "CUSTOMERS_INFO(CUSTOMERS_INFO_ID, CUSTOMERS_INFO_DATE_OF_LAST_LOGON, CUSTOMERS_INFO_NUMBER_OF_LOGONS, CUSTOMERS_INFO_DATE_ACCOUNT_CREATED, CUSTOMERS_INFO_DATE_ACCOUNT_LAST_MODIFIED, GLOBAL_PRODUCT_NOTIFICATIONS) values(? , ? , ? , ? , ? , ? )"; + } + + // =================================================================================== + // Helper + // ====== + protected CustomersInfo downcast(Entity entity) { + assertObjectNotNull("entity", entity); + try { + return (CustomersInfo)entity; + } catch (ClassCastException e) { + String msg = "The entity should be CustomersInfo but it was: " + entity.getClass(); + throw new IllegalStateException(msg, e); + } + } + + protected void checkDowncast(Entity entity) { + downcast(entity); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/dbmeta/GeoZonesDbm.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/dbmeta/GeoZonesDbm.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/dbmeta/GeoZonesDbm.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,704 @@ +package jp.sf.pal.pompei.bsentity.dbmeta; + + +import jp.sf.pal.pompei.allcommon.Entity; +import jp.sf.pal.pompei.allcommon.dbmeta.DBMeta; +import jp.sf.pal.pompei.allcommon.dbmeta.AbstractDBMeta; +import jp.sf.pal.pompei.exentity.GeoZones; + +/** + * The dbmeta of GEO_ZONES. (Singleton) + * + *
+ * [primary-key]
+ *     GEO_ZONE_ID
+ * 
+ * [column-property]
+ *     GEO_ZONE_ID, GEO_ZONE_NAME, GEO_ZONE_DESCRIPTION, LAST_MODIFIED, DATE_ADDED
+ * 
+ * [foreign-property]
+ *     
+ * 
+ * [refferer-property]
+ *     
+ * 
+ * [sequence]
+ *     
+ * 
+ * [identity]
+ *     
+ * 
+ * [update-date]
+ *     
+ * 
+ * [version-no]
+ *     
+ * 
+ * 
+ * + * @author DBFlute(AutoGenerator) + */ +public class GeoZonesDbm extends AbstractDBMeta { + + // =================================================================================== + // Definition + // ========== + /** The type of entity. */ + protected static final Class ENTITY_TYPE = GeoZones.class; + + /** Singleton instance. */ + private static final GeoZonesDbm _instance = new GeoZonesDbm(); + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + private GeoZonesDbm() { + } + + // =================================================================================== + // Singleton + // ========= + /** + * Get instance. + * + * @return Singleton instance. (NotNull) + */ + public static GeoZonesDbm getInstance() { + return _instance; + } + + // =================================================================================== + // Name Definition + // =============== + /** Table db name. */ + public static final String TABLE_DB_NAME = "GEO_ZONES"; + + /** Table cap-prop name. */ + public static final String TABLE_CAP_PROP_NAME = "GeoZones"; + + /** Table uncap-prop name. */ + public static final String TABLE_UNCAP_PROP_NAME = "geoZones"; + + /** Db-name of GeoZoneId. */ + public static final String COLUMN_DB_NAME_OF_GeoZoneId = "GEO_ZONE_ID"; + /** Db-name of GeoZoneName. */ + public static final String COLUMN_DB_NAME_OF_GeoZoneName = "GEO_ZONE_NAME"; + /** Db-name of GeoZoneDescription. */ + public static final String COLUMN_DB_NAME_OF_GeoZoneDescription = "GEO_ZONE_DESCRIPTION"; + /** Db-name of LastModified. */ + public static final String COLUMN_DB_NAME_OF_LastModified = "LAST_MODIFIED"; + /** Db-name of DateAdded. */ + public static final String COLUMN_DB_NAME_OF_DateAdded = "DATE_ADDED"; + + /** Cap-prop-name of GeoZoneId. */ + public static final String COLUMN_CAP_PROP_NAME_OF_GeoZoneId = "GeoZoneId"; + /** Cap-prop-name of GeoZoneName. */ + public static final String COLUMN_CAP_PROP_NAME_OF_GeoZoneName = "GeoZoneName"; + /** Cap-prop-name of GeoZoneDescription. */ + public static final String COLUMN_CAP_PROP_NAME_OF_GeoZoneDescription = "GeoZoneDescription"; + /** Cap-prop-name of LastModified. */ + public static final String COLUMN_CAP_PROP_NAME_OF_LastModified = "LastModified"; + /** Cap-prop-name of DateAdded. */ + public static final String COLUMN_CAP_PROP_NAME_OF_DateAdded = "DateAdded"; + + + + /** Uncap-prop-name of GeoZoneId. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_GeoZoneId = "geoZoneId"; + /** Uncap-prop-name of GeoZoneName. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_GeoZoneName = "geoZoneName"; + /** Uncap-prop-name of GeoZoneDescription. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_GeoZoneDescription = "geoZoneDescription"; + /** Uncap-prop-name of LastModified. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_LastModified = "lastModified"; + /** Uncap-prop-name of DateAdded. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_DateAdded = "dateAdded"; + + + + /** {db-name : cap-prop-name} map. */ + private static java.util.Map _dbNameCapPropNameMap; + protected static java.util.Map createDbNameCapPropNameMap() { + if (_dbNameCapPropNameMap != null) { + return _dbNameCapPropNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_DB_NAME, TABLE_CAP_PROP_NAME); + + map.put(COLUMN_DB_NAME_OF_GeoZoneId, COLUMN_CAP_PROP_NAME_OF_GeoZoneId); + map.put(COLUMN_DB_NAME_OF_GeoZoneName, COLUMN_CAP_PROP_NAME_OF_GeoZoneName); + map.put(COLUMN_DB_NAME_OF_GeoZoneDescription, COLUMN_CAP_PROP_NAME_OF_GeoZoneDescription); + map.put(COLUMN_DB_NAME_OF_LastModified, COLUMN_CAP_PROP_NAME_OF_LastModified); + map.put(COLUMN_DB_NAME_OF_DateAdded, COLUMN_CAP_PROP_NAME_OF_DateAdded); + + _dbNameCapPropNameMap = java.util.Collections.unmodifiableMap(map); + return _dbNameCapPropNameMap; + } + + /** {db-name : uncap-prop-name} map. */ + private static java.util.Map _dbNameUncapPropNameMap; + protected static java.util.Map createDbNameUncapPropNameMap() { + if (_dbNameUncapPropNameMap != null) { + return _dbNameUncapPropNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_DB_NAME, TABLE_UNCAP_PROP_NAME); + + map.put(COLUMN_DB_NAME_OF_GeoZoneId, COLUMN_UNCAP_PROP_NAME_OF_GeoZoneId); + map.put(COLUMN_DB_NAME_OF_GeoZoneName, COLUMN_UNCAP_PROP_NAME_OF_GeoZoneName); + map.put(COLUMN_DB_NAME_OF_GeoZoneDescription, COLUMN_UNCAP_PROP_NAME_OF_GeoZoneDescription); + map.put(COLUMN_DB_NAME_OF_LastModified, COLUMN_UNCAP_PROP_NAME_OF_LastModified); + map.put(COLUMN_DB_NAME_OF_DateAdded, COLUMN_UNCAP_PROP_NAME_OF_DateAdded); + + _dbNameUncapPropNameMap = java.util.Collections.unmodifiableMap(map); + return _dbNameUncapPropNameMap; + } + + /** {cap-prop-name : db-name} map. */ + private static java.util.Map _capPropNameDbNameMap; + protected static java.util.Map createCapPropNameDbNameMap() { + if (_capPropNameDbNameMap != null) { + return _capPropNameDbNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_CAP_PROP_NAME, TABLE_DB_NAME); + + map.put(COLUMN_CAP_PROP_NAME_OF_GeoZoneId, COLUMN_DB_NAME_OF_GeoZoneId); + map.put(COLUMN_CAP_PROP_NAME_OF_GeoZoneName, COLUMN_DB_NAME_OF_GeoZoneName); + map.put(COLUMN_CAP_PROP_NAME_OF_GeoZoneDescription, COLUMN_DB_NAME_OF_GeoZoneDescription); + map.put(COLUMN_CAP_PROP_NAME_OF_LastModified, COLUMN_DB_NAME_OF_LastModified); + map.put(COLUMN_CAP_PROP_NAME_OF_DateAdded, COLUMN_DB_NAME_OF_DateAdded); + + _capPropNameDbNameMap = java.util.Collections.unmodifiableMap(map); + return _capPropNameDbNameMap; + } + + /** {cap-prop-name : uncap-prop-name} map. */ + private static java.util.Map _capPropNameUncapPropNameMap; + protected static java.util.Map createCapPropNameUncapPropNameMap() { + if (_capPropNameUncapPropNameMap != null) { + return _capPropNameUncapPropNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_CAP_PROP_NAME, TABLE_UNCAP_PROP_NAME); + + map.put(COLUMN_CAP_PROP_NAME_OF_GeoZoneId, COLUMN_UNCAP_PROP_NAME_OF_GeoZoneId); + map.put(COLUMN_CAP_PROP_NAME_OF_GeoZoneName, COLUMN_UNCAP_PROP_NAME_OF_GeoZoneName); + map.put(COLUMN_CAP_PROP_NAME_OF_GeoZoneDescription, COLUMN_UNCAP_PROP_NAME_OF_GeoZoneDescription); + map.put(COLUMN_CAP_PROP_NAME_OF_LastModified, COLUMN_UNCAP_PROP_NAME_OF_LastModified); + map.put(COLUMN_CAP_PROP_NAME_OF_DateAdded, COLUMN_UNCAP_PROP_NAME_OF_DateAdded); + + _capPropNameUncapPropNameMap = java.util.Collections.unmodifiableMap(map); + return _capPropNameUncapPropNameMap; + } + + /** {uncap-prop-name : db-name} map. */ + private static java.util.Map _uncapPropNameDbNameMap; + protected static java.util.Map createUncapPropNameDbNameMap() { + if (_uncapPropNameDbNameMap != null) { + return _uncapPropNameDbNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_UNCAP_PROP_NAME, TABLE_DB_NAME); + + map.put(COLUMN_UNCAP_PROP_NAME_OF_GeoZoneId, COLUMN_DB_NAME_OF_GeoZoneId); + map.put(COLUMN_UNCAP_PROP_NAME_OF_GeoZoneName, COLUMN_DB_NAME_OF_GeoZoneName); + map.put(COLUMN_UNCAP_PROP_NAME_OF_GeoZoneDescription, COLUMN_DB_NAME_OF_GeoZoneDescription); + map.put(COLUMN_UNCAP_PROP_NAME_OF_LastModified, COLUMN_DB_NAME_OF_LastModified); + map.put(COLUMN_UNCAP_PROP_NAME_OF_DateAdded, COLUMN_DB_NAME_OF_DateAdded); + + _uncapPropNameDbNameMap = java.util.Collections.unmodifiableMap(map); + return _uncapPropNameDbNameMap; + } + + /** {uncap-prop-name : cap-prop-name} map. */ + private static java.util.Map _uncapPropNameCapPropNameMap; + protected static java.util.Map createUncapPropNameCapPropNameMap() { + if (_uncapPropNameCapPropNameMap != null) { + return _uncapPropNameCapPropNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_UNCAP_PROP_NAME, TABLE_CAP_PROP_NAME); + + map.put(COLUMN_UNCAP_PROP_NAME_OF_GeoZoneId, COLUMN_CAP_PROP_NAME_OF_GeoZoneId); + map.put(COLUMN_UNCAP_PROP_NAME_OF_GeoZoneName, COLUMN_CAP_PROP_NAME_OF_GeoZoneName); + map.put(COLUMN_UNCAP_PROP_NAME_OF_GeoZoneDescription, COLUMN_CAP_PROP_NAME_OF_GeoZoneDescription); + map.put(COLUMN_UNCAP_PROP_NAME_OF_LastModified, COLUMN_CAP_PROP_NAME_OF_LastModified); + map.put(COLUMN_UNCAP_PROP_NAME_OF_DateAdded, COLUMN_CAP_PROP_NAME_OF_DateAdded); + + _uncapPropNameCapPropNameMap = java.util.Collections.unmodifiableMap(map); + return _uncapPropNameCapPropNameMap; + } + + // =================================================================================== + // Name-Map + // ======== + /** + * This method implements the method that is declared at super. + * + * @return {db-name : cap-prop-name} map. + */ + public java.util.Map getDbNameCapPropNameMap() { + return createDbNameCapPropNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {db-name : uncap-prop-name} map. + */ + public java.util.Map getDbNameUncapPropNameMap() { + return createDbNameUncapPropNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {cap-prop-name : db-name} map. + */ + public java.util.Map getCapPropNameDbNameMap() { + return createCapPropNameDbNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {cap-prop-name : uncap-prop-name} map. + */ + public java.util.Map getCapPropNameUncapPropNameMap() { + return createCapPropNameUncapPropNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {uncap-prop-name : db-name} map. + */ + public java.util.Map getUncapPropNameDbNameMap() { + return createUncapPropNameDbNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {uncap-prop-name : cap-prop-name} map. + */ + public java.util.Map getUncapPropNameCapPropNameMap() { + return createUncapPropNameCapPropNameMap(); + } + + // =================================================================================== + // Table Name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + public String getTableDbName() { + return TABLE_DB_NAME; + } + + /** + * This method implements the method that is declared at super. + * + * @return Table cap-prop-name. (NotNull) + */ + public String getTableCapPropName() { + return TABLE_CAP_PROP_NAME; + } + + /** + * This method implements the method that is declared at super. + * + * @return Table property-name. (NotNull) + */ + public String getTableUncapPropName() { + return TABLE_UNCAP_PROP_NAME; + } + + // =================================================================================== + // Column Name + // =========== + public java.util.List getColumnDbNameList() { + final String[] columns = getColumnDbNameCommaString().split(","); + final java.util.List resultList = new java.util.ArrayList(); + for (int i=0; i < columns.length; i++) { + resultList.add(columns[i].trim()); + } + return resultList; + } + + public java.util.List getColumnCapPropNameList() { + final java.util.List columnDbNameList = getColumnDbNameList(); + final java.util.List resultList = new java.util.ArrayList(); + for (final java.util.Iterator ite = columnDbNameList.iterator(); ite.hasNext(); ) { + resultList.add(getDbNameCapPropNameMap().get((String)ite.next())); + } + return resultList; + } + + public java.util.List getColumnUncapPropNameList() { + final java.util.List columnDbNameList = getColumnDbNameList(); + final java.util.List resultList = new java.util.ArrayList(); + for (final java.util.Iterator ite = columnDbNameList.iterator(); ite.hasNext(); ) { + resultList.add(getDbNameUncapPropNameMap().get((String)ite.next())); + } + return resultList; + } + + /** + * This method implements the method that is declared at super. + * + * @return Column-db-name comma-string. (NotNull) + */ + public String getColumnDbNameCommaString() { + return "GEO_ZONE_ID, GEO_ZONE_NAME, GEO_ZONE_DESCRIPTION, LAST_MODIFIED, DATE_ADDED"; + } + + // =================================================================================== + // Type Name + // ========= + /** + * This method implements the method that is declared at super. + * + * @return The type-name of entity. (NotNull) + */ + public String getEntityTypeName() { + return "jp.sf.pal.pompei.exentity.GeoZones"; + } + + /** + * This method implements the method that is declared at super. + * + * @return The type-name of condition-bean. (NotNull) + */ + public String getConditionBeanTypeName() { + return "jp.sf.pal.pompei.cbean.bs.GeoZonesCB"; + } + + /** + * This method implements the method that is declared at super. + * + * @return The type-name of dao. (NotNull) + */ + public String getDaoTypeName() { + return "jp.sf.pal.pompei.exdao.GeoZonesDao"; + } + + /** + * This method implements the method that is declared at super. + * + * @return The type-name of behavior. (NotNull) + */ + public String getBehaviorTypeName() { + return "jp.sf.pal.pompei.exbhv.GeoZonesBhv"; + } + + // =================================================================================== + // Type + // ==== + /** + * This method implements the method that is declared at super. + * + * @return The type of entity. (NotNull) + */ + public Class getEntityType() { + return ENTITY_TYPE; + } + + // =================================================================================== + // Instance + // ======== + /** + * This method implements the method that is declared at super. + * + * @return The type of entity. (NotNull) + */ + public Entity newEntity() { + return newMyEntity(); + } + + /** + * New the instance of my entity. + * + * @return The instance of my entity. (NotNull) + */ + public GeoZones newMyEntity() { + return new GeoZones(); + } + + // =================================================================================== + // Foreign DBMeta + // ============== + /** + * This method implements the method that is declared at super. + * + * @param foreignPropertyName Foreign-property-name(Both OK - InitCap or not). (NotNull) + * @return Foreign DBMeta. (NotNull) + */ + public DBMeta getForeignDBMeta(String foreignPropertyName) { + assertStringNotNullAndNotTrimmedEmpty("foreignPropertyName", foreignPropertyName); + final String methodName = "getForeignDBMeta_" + foreignPropertyName.substring(0, 1) + foreignPropertyName.substring(1); + + java.lang.reflect.Method method = null; + try { + method = this.getClass().getMethod(methodName, new Class[]{}); + } catch (NoSuchMethodException e) { + String msg = "The foreignPropertyName is not found: foreignPropertyName=" + foreignPropertyName; + msg = msg + " tableName=" + TABLE_DB_NAME + " methodName=" + methodName; + throw new RuntimeException(msg, e); + } + try { + return (DBMeta)method.invoke(this, new Object[]{}); + } catch (IllegalAccessException e) { + throw new RuntimeException(e); + } catch (java.lang.reflect.InvocationTargetException e) { + throw new RuntimeException(e.getCause()); + } + } + + // =================================================================================== + // Determination + // ============= + /** + * This method implements the method that is declared at super. + * + * @return Determination. + */ + public boolean hasTwoOrMorePrimaryKeys() { + return false; + } + + /** + * This method implements the method that is declared at super. + * + * @return Determination. + */ + public boolean hasCommonColumn() { + return false; + } + + // =================================================================================== + // Entity Handling + // =============== + // ----------------------------------------------------- + // Accept + // ------ + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @param primaryKeyMap Primary key map. (NotNull and NotEmpty) + */ + public void acceptPrimaryKeyMap(Entity entity, java.util.Map primaryKeyMap) { + final GeoZones myEntity = (GeoZones)entity; + MapAssertUtil.assertPrimaryKeyMapNotNullAndNotEmpty(primaryKeyMap); + final MapStringValueAnalyzer analyzer = new MapStringValueAnalyzer(primaryKeyMap, entity.getModifiedPropertyNames()); + + MapAssertUtil.assertColumnExistingInPrimaryKeyMap(primaryKeyMap, "GEO_ZONE_ID"); + if (analyzer.init("GEO_ZONE_ID", "geoZoneId", "geoZoneId")) { myEntity.setGeoZoneId(analyzer.analyzeNumber(java.math.BigDecimal.class)); }; + + + } + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @param primaryKeyMapString Primary-key map-string. (NotNull and NotEmpty) + */ + public void acceptPrimaryKeyMapString(Entity entity, String primaryKeyMapString) { + MapStringUtil.acceptPrimaryKeyMapString(primaryKeyMapString, entity); + } + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @param columnValueMap Column-value map. (NotNull and NotEmpty) + */ + public void acceptColumnValueMap(Entity entity, java.util.Map columnValueMap) { + final GeoZones myEntity = (GeoZones)entity; + MapAssertUtil.assertColumnValueMapNotNullAndNotEmpty(columnValueMap); + final MapStringValueAnalyzer analyzer = new MapStringValueAnalyzer(columnValueMap, entity.getModifiedPropertyNames()); + + if (analyzer.init("GEO_ZONE_ID", "geoZoneId", "geoZoneId")) { myEntity.setGeoZoneId(analyzer.analyzeNumber(java.math.BigDecimal.class)); }; + if (analyzer.init("GEO_ZONE_NAME", "geoZoneName", "geoZoneName")) { myEntity.setGeoZoneName(analyzer.analyzeString(String.class)); }; + if (analyzer.init("GEO_ZONE_DESCRIPTION", "geoZoneDescription", "geoZoneDescription")) { myEntity.setGeoZoneDescription(analyzer.analyzeString(String.class)); }; + if (analyzer.init("LAST_MODIFIED", "lastModified", "lastModified")) { myEntity.setLastModified(analyzer.analyzeDate(java.sql.Timestamp.class)); }; + if (analyzer.init("DATE_ADDED", "dateAdded", "dateAdded")) { myEntity.setDateAdded(analyzer.analyzeDate(java.sql.Timestamp.class)); }; + + } + + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @param columnValueMapString Column-value map-string. (NotNull and NotEmpty) + */ + public void acceptColumnValueMapString(Entity entity, String columnValueMapString) { + MapStringUtil.acceptColumnValueMapString(columnValueMapString, entity); + } + + + // ----------------------------------------------------- + // Extract + // ------- + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @return Primary-key map-string. (NotNull) + */ + public String extractPrimaryKeyMapString(Entity entity) { + return MapStringUtil.extractPrimaryKeyMapString(entity); + } + + /** + * Extract primary-key map-string. + * + * @param entity Target entity. (NotNull) + * @param startBrace Start-brace. (NotNull) + * @param endBrace End-brace. (NotNull) + * @param delimiter Delimiter. (NotNull) + * @param equal Equal. (NotNull) + * @return Primary-key map-string. (NotNull) + */ + public String extractPrimaryKeyMapString(Entity entity, String startBrace, String endBrace, String delimiter, String equal) { + final GeoZones myEntity = (GeoZones)entity; + final String mapMarkAndStartBrace = MAP_STRING_MAP_MARK + startBrace; + final StringBuffer sb = new StringBuffer(); + helpAppendingColumnValueString(sb, delimiter, equal, "GEO_ZONE_ID", myEntity.getGeoZoneId()); + + sb.delete(0, delimiter.length()).insert(0, mapMarkAndStartBrace).append(endBrace); + return sb.toString(); + + } + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @return Column-value map-string. (NotNull) + */ + public String extractColumnValueMapString(Entity entity) { + return MapStringUtil.extractColumnValueMapString(entity); + } + + /** + * Extract column-value map-string. + * + * @param entity Target entity. (NotNull) + * @param startBrace Start-brace. (NotNull) + * @param endBrace End-brace. (NotNull) + * @param delimiter Delimiter. (NotNull) + * @param equal Equal. (NotNull) + * @return Column-value map-string. (NotNull) + */ + public String extractColumnValueMapString(Entity entity, String startBrace, String endBrace, String delimiter, String equal) { + final GeoZones myEntity = (GeoZones)entity; + final String mapMarkAndStartBrace = MAP_STRING_MAP_MARK + startBrace; + final StringBuffer sb = new StringBuffer(); + helpAppendingColumnValueString(sb, delimiter, equal, "GEO_ZONE_ID", myEntity.getGeoZoneId()); + helpAppendingColumnValueString(sb, delimiter, equal, "GEO_ZONE_NAME", myEntity.getGeoZoneName()); + helpAppendingColumnValueString(sb, delimiter, equal, "GEO_ZONE_DESCRIPTION", myEntity.getGeoZoneDescription()); + helpAppendingColumnValueString(sb, delimiter, equal, "LAST_MODIFIED", myEntity.getLastModified()); + helpAppendingColumnValueString(sb, delimiter, equal, "DATE_ADDED", myEntity.getDateAdded()); + + sb.delete(0, delimiter.length()).insert(0, mapMarkAndStartBrace).append(endBrace); + return sb.toString(); + } + + private void helpAppendingColumnValueString(StringBuffer sb, String delimiter, String equal, String colName, Object value) { + sb.append(delimiter).append(colName).append(equal); + sb.append(helpGettingColumnStringValue(value)); + } + + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @return Column-value map-string. (NotNull) + */ + public String extractCommonColumnValueMapString(Entity entity) { + return "map:{}"; + } + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @return Column-value map-string. (NotNull) + */ + public String extractCommonColumnValueMapString(Entity entity, String startBrace, String endBrace, String delimiter, String equal) { + return "map:" + startBrace + endBrace; + } + + + // ----------------------------------------------------- + // Convert + // ------- + public java.util.List convertToColumnValueList(Entity entity) { + return new java.util.ArrayList(convertToColumnValueMap(entity).values()); + } + + public java.util.Map convertToColumnValueMap(Entity entity) { + final GeoZones myEntity = downcast(entity); + final java.util.Map valueMap = new java.util.LinkedHashMap(); + valueMap.put("GEO_ZONE_ID", myEntity.getGeoZoneId()); + valueMap.put("GEO_ZONE_NAME", myEntity.getGeoZoneName()); + valueMap.put("GEO_ZONE_DESCRIPTION", myEntity.getGeoZoneDescription()); + valueMap.put("LAST_MODIFIED", myEntity.getLastModified()); + valueMap.put("DATE_ADDED", myEntity.getDateAdded()); + return valueMap; + } + + public java.util.List convertToColumnStringValueList(Entity entity) { + return new java.util.ArrayList(convertToColumnStringValueMap(entity).values()); + } + + public java.util.Map convertToColumnStringValueMap(Entity entity) { + final GeoZones myEntity = downcast(entity); + final java.util.Map valueMap = new java.util.LinkedHashMap(); + valueMap.put("GEO_ZONE_ID", helpGettingColumnStringValue(myEntity.getGeoZoneId())); + valueMap.put("GEO_ZONE_NAME", helpGettingColumnStringValue(myEntity.getGeoZoneName())); + valueMap.put("GEO_ZONE_DESCRIPTION", helpGettingColumnStringValue(myEntity.getGeoZoneDescription())); + valueMap.put("LAST_MODIFIED", helpGettingColumnStringValue(myEntity.getLastModified())); + valueMap.put("DATE_ADDED", helpGettingColumnStringValue(myEntity.getDateAdded())); + return valueMap; + } + + // =================================================================================== + // JDBC Support + // ============ + public String getPreparedInsertClause() { + return "insert into GEO_ZONES(GEO_ZONE_ID, GEO_ZONE_NAME, GEO_ZONE_DESCRIPTION, LAST_MODIFIED, DATE_ADDED) values(? , ? , ? , ? , ? )"; + } + + public String getPreparedInsertClause(String tablePrefix) { + return "insert into " + tablePrefix + "GEO_ZONES(GEO_ZONE_ID, GEO_ZONE_NAME, GEO_ZONE_DESCRIPTION, LAST_MODIFIED, DATE_ADDED) values(? , ? , ? , ? , ? )"; + } + + // =================================================================================== + // Helper + // ====== + protected GeoZones downcast(Entity entity) { + assertObjectNotNull("entity", entity); + try { + return (GeoZones)entity; + } catch (ClassCastException e) { + String msg = "The entity should be GeoZones but it was: " + entity.getClass(); + throw new IllegalStateException(msg, e); + } + } + + protected void checkDowncast(Entity entity) { + downcast(entity); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/dbmeta/LanguagesDbm.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/dbmeta/LanguagesDbm.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/dbmeta/LanguagesDbm.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,720 @@ +package jp.sf.pal.pompei.bsentity.dbmeta; + + +import jp.sf.pal.pompei.allcommon.Entity; +import jp.sf.pal.pompei.allcommon.dbmeta.DBMeta; +import jp.sf.pal.pompei.allcommon.dbmeta.AbstractDBMeta; +import jp.sf.pal.pompei.exentity.Languages; + +/** + * The dbmeta of LANGUAGES. (Singleton) + * + *
+ * [primary-key]
+ *     LANGUAGES_ID
+ * 
+ * [column-property]
+ *     LANGUAGES_ID, NAME, CODE, IMAGE, DIRECTORY, SORT_ORDER
+ * 
+ * [foreign-property]
+ *     
+ * 
+ * [refferer-property]
+ *     
+ * 
+ * [sequence]
+ *     
+ * 
+ * [identity]
+ *     
+ * 
+ * [update-date]
+ *     
+ * 
+ * [version-no]
+ *     
+ * 
+ * 
+ * + * @author DBFlute(AutoGenerator) + */ +public class LanguagesDbm extends AbstractDBMeta { + + // =================================================================================== + // Definition + // ========== + /** The type of entity. */ + protected static final Class ENTITY_TYPE = Languages.class; + + /** Singleton instance. */ + private static final LanguagesDbm _instance = new LanguagesDbm(); + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + private LanguagesDbm() { + } + + // =================================================================================== + // Singleton + // ========= + /** + * Get instance. + * + * @return Singleton instance. (NotNull) + */ + public static LanguagesDbm getInstance() { + return _instance; + } + + // =================================================================================== + // Name Definition + // =============== + /** Table db name. */ + public static final String TABLE_DB_NAME = "LANGUAGES"; + + /** Table cap-prop name. */ + public static final String TABLE_CAP_PROP_NAME = "Languages"; + + /** Table uncap-prop name. */ + public static final String TABLE_UNCAP_PROP_NAME = "languages"; + + /** Db-name of LanguagesId. */ + public static final String COLUMN_DB_NAME_OF_LanguagesId = "LANGUAGES_ID"; + /** Db-name of Name. */ + public static final String COLUMN_DB_NAME_OF_Name = "NAME"; + /** Db-name of Code. */ + public static final String COLUMN_DB_NAME_OF_Code = "CODE"; + /** Db-name of Image. */ + public static final String COLUMN_DB_NAME_OF_Image = "IMAGE"; + /** Db-name of Directory. */ + public static final String COLUMN_DB_NAME_OF_Directory = "DIRECTORY"; + /** Db-name of SortOrder. */ + public static final String COLUMN_DB_NAME_OF_SortOrder = "SORT_ORDER"; + + /** Cap-prop-name of LanguagesId. */ + public static final String COLUMN_CAP_PROP_NAME_OF_LanguagesId = "LanguagesId"; + /** Cap-prop-name of Name. */ + public static final String COLUMN_CAP_PROP_NAME_OF_Name = "Name"; + /** Cap-prop-name of Code. */ + public static final String COLUMN_CAP_PROP_NAME_OF_Code = "Code"; + /** Cap-prop-name of Image. */ + public static final String COLUMN_CAP_PROP_NAME_OF_Image = "Image"; + /** Cap-prop-name of Directory. */ + public static final String COLUMN_CAP_PROP_NAME_OF_Directory = "Directory"; + /** Cap-prop-name of SortOrder. */ + public static final String COLUMN_CAP_PROP_NAME_OF_SortOrder = "SortOrder"; + + + + /** Uncap-prop-name of LanguagesId. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_LanguagesId = "languagesId"; + /** Uncap-prop-name of Name. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_Name = "name"; + /** Uncap-prop-name of Code. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_Code = "code"; + /** Uncap-prop-name of Image. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_Image = "image"; + /** Uncap-prop-name of Directory. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_Directory = "directory"; + /** Uncap-prop-name of SortOrder. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_SortOrder = "sortOrder"; + + + + /** {db-name : cap-prop-name} map. */ + private static java.util.Map _dbNameCapPropNameMap; + protected static java.util.Map createDbNameCapPropNameMap() { + if (_dbNameCapPropNameMap != null) { + return _dbNameCapPropNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_DB_NAME, TABLE_CAP_PROP_NAME); + + map.put(COLUMN_DB_NAME_OF_LanguagesId, COLUMN_CAP_PROP_NAME_OF_LanguagesId); + map.put(COLUMN_DB_NAME_OF_Name, COLUMN_CAP_PROP_NAME_OF_Name); + map.put(COLUMN_DB_NAME_OF_Code, COLUMN_CAP_PROP_NAME_OF_Code); + map.put(COLUMN_DB_NAME_OF_Image, COLUMN_CAP_PROP_NAME_OF_Image); + map.put(COLUMN_DB_NAME_OF_Directory, COLUMN_CAP_PROP_NAME_OF_Directory); + map.put(COLUMN_DB_NAME_OF_SortOrder, COLUMN_CAP_PROP_NAME_OF_SortOrder); + + _dbNameCapPropNameMap = java.util.Collections.unmodifiableMap(map); + return _dbNameCapPropNameMap; + } + + /** {db-name : uncap-prop-name} map. */ + private static java.util.Map _dbNameUncapPropNameMap; + protected static java.util.Map createDbNameUncapPropNameMap() { + if (_dbNameUncapPropNameMap != null) { + return _dbNameUncapPropNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_DB_NAME, TABLE_UNCAP_PROP_NAME); + + map.put(COLUMN_DB_NAME_OF_LanguagesId, COLUMN_UNCAP_PROP_NAME_OF_LanguagesId); + map.put(COLUMN_DB_NAME_OF_Name, COLUMN_UNCAP_PROP_NAME_OF_Name); + map.put(COLUMN_DB_NAME_OF_Code, COLUMN_UNCAP_PROP_NAME_OF_Code); + map.put(COLUMN_DB_NAME_OF_Image, COLUMN_UNCAP_PROP_NAME_OF_Image); + map.put(COLUMN_DB_NAME_OF_Directory, COLUMN_UNCAP_PROP_NAME_OF_Directory); + map.put(COLUMN_DB_NAME_OF_SortOrder, COLUMN_UNCAP_PROP_NAME_OF_SortOrder); + + _dbNameUncapPropNameMap = java.util.Collections.unmodifiableMap(map); + return _dbNameUncapPropNameMap; + } + + /** {cap-prop-name : db-name} map. */ + private static java.util.Map _capPropNameDbNameMap; + protected static java.util.Map createCapPropNameDbNameMap() { + if (_capPropNameDbNameMap != null) { + return _capPropNameDbNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_CAP_PROP_NAME, TABLE_DB_NAME); + + map.put(COLUMN_CAP_PROP_NAME_OF_LanguagesId, COLUMN_DB_NAME_OF_LanguagesId); + map.put(COLUMN_CAP_PROP_NAME_OF_Name, COLUMN_DB_NAME_OF_Name); + map.put(COLUMN_CAP_PROP_NAME_OF_Code, COLUMN_DB_NAME_OF_Code); + map.put(COLUMN_CAP_PROP_NAME_OF_Image, COLUMN_DB_NAME_OF_Image); + map.put(COLUMN_CAP_PROP_NAME_OF_Directory, COLUMN_DB_NAME_OF_Directory); + map.put(COLUMN_CAP_PROP_NAME_OF_SortOrder, COLUMN_DB_NAME_OF_SortOrder); + + _capPropNameDbNameMap = java.util.Collections.unmodifiableMap(map); + return _capPropNameDbNameMap; + } + + /** {cap-prop-name : uncap-prop-name} map. */ + private static java.util.Map _capPropNameUncapPropNameMap; + protected static java.util.Map createCapPropNameUncapPropNameMap() { + if (_capPropNameUncapPropNameMap != null) { + return _capPropNameUncapPropNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_CAP_PROP_NAME, TABLE_UNCAP_PROP_NAME); + + map.put(COLUMN_CAP_PROP_NAME_OF_LanguagesId, COLUMN_UNCAP_PROP_NAME_OF_LanguagesId); + map.put(COLUMN_CAP_PROP_NAME_OF_Name, COLUMN_UNCAP_PROP_NAME_OF_Name); + map.put(COLUMN_CAP_PROP_NAME_OF_Code, COLUMN_UNCAP_PROP_NAME_OF_Code); + map.put(COLUMN_CAP_PROP_NAME_OF_Image, COLUMN_UNCAP_PROP_NAME_OF_Image); + map.put(COLUMN_CAP_PROP_NAME_OF_Directory, COLUMN_UNCAP_PROP_NAME_OF_Directory); + map.put(COLUMN_CAP_PROP_NAME_OF_SortOrder, COLUMN_UNCAP_PROP_NAME_OF_SortOrder); + + _capPropNameUncapPropNameMap = java.util.Collections.unmodifiableMap(map); + return _capPropNameUncapPropNameMap; + } + + /** {uncap-prop-name : db-name} map. */ + private static java.util.Map _uncapPropNameDbNameMap; + protected static java.util.Map createUncapPropNameDbNameMap() { + if (_uncapPropNameDbNameMap != null) { + return _uncapPropNameDbNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_UNCAP_PROP_NAME, TABLE_DB_NAME); + + map.put(COLUMN_UNCAP_PROP_NAME_OF_LanguagesId, COLUMN_DB_NAME_OF_LanguagesId); + map.put(COLUMN_UNCAP_PROP_NAME_OF_Name, COLUMN_DB_NAME_OF_Name); + map.put(COLUMN_UNCAP_PROP_NAME_OF_Code, COLUMN_DB_NAME_OF_Code); + map.put(COLUMN_UNCAP_PROP_NAME_OF_Image, COLUMN_DB_NAME_OF_Image); + map.put(COLUMN_UNCAP_PROP_NAME_OF_Directory, COLUMN_DB_NAME_OF_Directory); + map.put(COLUMN_UNCAP_PROP_NAME_OF_SortOrder, COLUMN_DB_NAME_OF_SortOrder); + + _uncapPropNameDbNameMap = java.util.Collections.unmodifiableMap(map); + return _uncapPropNameDbNameMap; + } + + /** {uncap-prop-name : cap-prop-name} map. */ + private static java.util.Map _uncapPropNameCapPropNameMap; + protected static java.util.Map createUncapPropNameCapPropNameMap() { + if (_uncapPropNameCapPropNameMap != null) { + return _uncapPropNameCapPropNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_UNCAP_PROP_NAME, TABLE_CAP_PROP_NAME); + + map.put(COLUMN_UNCAP_PROP_NAME_OF_LanguagesId, COLUMN_CAP_PROP_NAME_OF_LanguagesId); + map.put(COLUMN_UNCAP_PROP_NAME_OF_Name, COLUMN_CAP_PROP_NAME_OF_Name); + map.put(COLUMN_UNCAP_PROP_NAME_OF_Code, COLUMN_CAP_PROP_NAME_OF_Code); + map.put(COLUMN_UNCAP_PROP_NAME_OF_Image, COLUMN_CAP_PROP_NAME_OF_Image); + map.put(COLUMN_UNCAP_PROP_NAME_OF_Directory, COLUMN_CAP_PROP_NAME_OF_Directory); + map.put(COLUMN_UNCAP_PROP_NAME_OF_SortOrder, COLUMN_CAP_PROP_NAME_OF_SortOrder); + + _uncapPropNameCapPropNameMap = java.util.Collections.unmodifiableMap(map); + return _uncapPropNameCapPropNameMap; + } + + // =================================================================================== + // Name-Map + // ======== + /** + * This method implements the method that is declared at super. + * + * @return {db-name : cap-prop-name} map. + */ + public java.util.Map getDbNameCapPropNameMap() { + return createDbNameCapPropNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {db-name : uncap-prop-name} map. + */ + public java.util.Map getDbNameUncapPropNameMap() { + return createDbNameUncapPropNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {cap-prop-name : db-name} map. + */ + public java.util.Map getCapPropNameDbNameMap() { + return createCapPropNameDbNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {cap-prop-name : uncap-prop-name} map. + */ + public java.util.Map getCapPropNameUncapPropNameMap() { + return createCapPropNameUncapPropNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {uncap-prop-name : db-name} map. + */ + public java.util.Map getUncapPropNameDbNameMap() { + return createUncapPropNameDbNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {uncap-prop-name : cap-prop-name} map. + */ + public java.util.Map getUncapPropNameCapPropNameMap() { + return createUncapPropNameCapPropNameMap(); + } + + // =================================================================================== + // Table Name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + public String getTableDbName() { + return TABLE_DB_NAME; + } + + /** + * This method implements the method that is declared at super. + * + * @return Table cap-prop-name. (NotNull) + */ + public String getTableCapPropName() { + return TABLE_CAP_PROP_NAME; + } + + /** + * This method implements the method that is declared at super. + * + * @return Table property-name. (NotNull) + */ + public String getTableUncapPropName() { + return TABLE_UNCAP_PROP_NAME; + } + + // =================================================================================== + // Column Name + // =========== + public java.util.List getColumnDbNameList() { + final String[] columns = getColumnDbNameCommaString().split(","); + final java.util.List resultList = new java.util.ArrayList(); + for (int i=0; i < columns.length; i++) { + resultList.add(columns[i].trim()); + } + return resultList; + } + + public java.util.List getColumnCapPropNameList() { + final java.util.List columnDbNameList = getColumnDbNameList(); + final java.util.List resultList = new java.util.ArrayList(); + for (final java.util.Iterator ite = columnDbNameList.iterator(); ite.hasNext(); ) { + resultList.add(getDbNameCapPropNameMap().get((String)ite.next())); + } + return resultList; + } + + public java.util.List getColumnUncapPropNameList() { + final java.util.List columnDbNameList = getColumnDbNameList(); + final java.util.List resultList = new java.util.ArrayList(); + for (final java.util.Iterator ite = columnDbNameList.iterator(); ite.hasNext(); ) { + resultList.add(getDbNameUncapPropNameMap().get((String)ite.next())); + } + return resultList; + } + + /** + * This method implements the method that is declared at super. + * + * @return Column-db-name comma-string. (NotNull) + */ + public String getColumnDbNameCommaString() { + return "LANGUAGES_ID, NAME, CODE, IMAGE, DIRECTORY, SORT_ORDER"; + } + + // =================================================================================== + // Type Name + // ========= + /** + * This method implements the method that is declared at super. + * + * @return The type-name of entity. (NotNull) + */ + public String getEntityTypeName() { + return "jp.sf.pal.pompei.exentity.Languages"; + } + + /** + * This method implements the method that is declared at super. + * + * @return The type-name of condition-bean. (NotNull) + */ + public String getConditionBeanTypeName() { + return "jp.sf.pal.pompei.cbean.bs.LanguagesCB"; + } + + /** + * This method implements the method that is declared at super. + * + * @return The type-name of dao. (NotNull) + */ + public String getDaoTypeName() { + return "jp.sf.pal.pompei.exdao.LanguagesDao"; + } + + /** + * This method implements the method that is declared at super. + * + * @return The type-name of behavior. (NotNull) + */ + public String getBehaviorTypeName() { + return "jp.sf.pal.pompei.exbhv.LanguagesBhv"; + } + + // =================================================================================== + // Type + // ==== + /** + * This method implements the method that is declared at super. + * + * @return The type of entity. (NotNull) + */ + public Class getEntityType() { + return ENTITY_TYPE; + } + + // =================================================================================== + // Instance + // ======== + /** + * This method implements the method that is declared at super. + * + * @return The type of entity. (NotNull) + */ + public Entity newEntity() { + return newMyEntity(); + } + + /** + * New the instance of my entity. + * + * @return The instance of my entity. (NotNull) + */ + public Languages newMyEntity() { + return new Languages(); + } + + // =================================================================================== + // Foreign DBMeta + // ============== + /** + * This method implements the method that is declared at super. + * + * @param foreignPropertyName Foreign-property-name(Both OK - InitCap or not). (NotNull) + * @return Foreign DBMeta. (NotNull) + */ + public DBMeta getForeignDBMeta(String foreignPropertyName) { + assertStringNotNullAndNotTrimmedEmpty("foreignPropertyName", foreignPropertyName); + final String methodName = "getForeignDBMeta_" + foreignPropertyName.substring(0, 1) + foreignPropertyName.substring(1); + + java.lang.reflect.Method method = null; + try { + method = this.getClass().getMethod(methodName, new Class[]{}); + } catch (NoSuchMethodException e) { + String msg = "The foreignPropertyName is not found: foreignPropertyName=" + foreignPropertyName; + msg = msg + " tableName=" + TABLE_DB_NAME + " methodName=" + methodName; + throw new RuntimeException(msg, e); + } + try { + return (DBMeta)method.invoke(this, new Object[]{}); + } catch (IllegalAccessException e) { + throw new RuntimeException(e); + } catch (java.lang.reflect.InvocationTargetException e) { + throw new RuntimeException(e.getCause()); + } + } + + // =================================================================================== + // Determination + // ============= + /** + * This method implements the method that is declared at super. + * + * @return Determination. + */ + public boolean hasTwoOrMorePrimaryKeys() { + return false; + } + + /** + * This method implements the method that is declared at super. + * + * @return Determination. + */ + public boolean hasCommonColumn() { + return false; + } + + // =================================================================================== + // Entity Handling + // =============== + // ----------------------------------------------------- + // Accept + // ------ + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @param primaryKeyMap Primary key map. (NotNull and NotEmpty) + */ + public void acceptPrimaryKeyMap(Entity entity, java.util.Map primaryKeyMap) { + final Languages myEntity = (Languages)entity; + MapAssertUtil.assertPrimaryKeyMapNotNullAndNotEmpty(primaryKeyMap); + final MapStringValueAnalyzer analyzer = new MapStringValueAnalyzer(primaryKeyMap, entity.getModifiedPropertyNames()); + + MapAssertUtil.assertColumnExistingInPrimaryKeyMap(primaryKeyMap, "LANGUAGES_ID"); + if (analyzer.init("LANGUAGES_ID", "languagesId", "languagesId")) { myEntity.setLanguagesId(analyzer.analyzeNumber(java.math.BigDecimal.class)); }; + + + } + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @param primaryKeyMapString Primary-key map-string. (NotNull and NotEmpty) + */ + public void acceptPrimaryKeyMapString(Entity entity, String primaryKeyMapString) { + MapStringUtil.acceptPrimaryKeyMapString(primaryKeyMapString, entity); + } + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @param columnValueMap Column-value map. (NotNull and NotEmpty) + */ + public void acceptColumnValueMap(Entity entity, java.util.Map columnValueMap) { + final Languages myEntity = (Languages)entity; + MapAssertUtil.assertColumnValueMapNotNullAndNotEmpty(columnValueMap); + final MapStringValueAnalyzer analyzer = new MapStringValueAnalyzer(columnValueMap, entity.getModifiedPropertyNames()); + + if (analyzer.init("LANGUAGES_ID", "languagesId", "languagesId")) { myEntity.setLanguagesId(analyzer.analyzeNumber(java.math.BigDecimal.class)); }; + if (analyzer.init("NAME", "name", "name")) { myEntity.setName(analyzer.analyzeString(String.class)); }; + if (analyzer.init("CODE", "code", "code")) { myEntity.setCode(analyzer.analyzeString(String.class)); }; + if (analyzer.init("IMAGE", "image", "image")) { myEntity.setImage(analyzer.analyzeString(String.class)); }; + if (analyzer.init("DIRECTORY", "directory", "directory")) { myEntity.setDirectory(analyzer.analyzeString(String.class)); }; + if (analyzer.init("SORT_ORDER", "sortOrder", "sortOrder")) { myEntity.setSortOrder(analyzer.analyzeNumber(java.math.BigDecimal.class)); }; + + } + + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @param columnValueMapString Column-value map-string. (NotNull and NotEmpty) + */ + public void acceptColumnValueMapString(Entity entity, String columnValueMapString) { + MapStringUtil.acceptColumnValueMapString(columnValueMapString, entity); + } + + + // ----------------------------------------------------- + // Extract + // ------- + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @return Primary-key map-string. (NotNull) + */ + public String extractPrimaryKeyMapString(Entity entity) { + return MapStringUtil.extractPrimaryKeyMapString(entity); + } + + /** + * Extract primary-key map-string. + * + * @param entity Target entity. (NotNull) + * @param startBrace Start-brace. (NotNull) + * @param endBrace End-brace. (NotNull) + * @param delimiter Delimiter. (NotNull) + * @param equal Equal. (NotNull) + * @return Primary-key map-string. (NotNull) + */ + public String extractPrimaryKeyMapString(Entity entity, String startBrace, String endBrace, String delimiter, String equal) { + final Languages myEntity = (Languages)entity; + final String mapMarkAndStartBrace = MAP_STRING_MAP_MARK + startBrace; + final StringBuffer sb = new StringBuffer(); + helpAppendingColumnValueString(sb, delimiter, equal, "LANGUAGES_ID", myEntity.getLanguagesId()); + + sb.delete(0, delimiter.length()).insert(0, mapMarkAndStartBrace).append(endBrace); + return sb.toString(); + + } + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @return Column-value map-string. (NotNull) + */ + public String extractColumnValueMapString(Entity entity) { + return MapStringUtil.extractColumnValueMapString(entity); + } + + /** + * Extract column-value map-string. + * + * @param entity Target entity. (NotNull) + * @param startBrace Start-brace. (NotNull) + * @param endBrace End-brace. (NotNull) + * @param delimiter Delimiter. (NotNull) + * @param equal Equal. (NotNull) + * @return Column-value map-string. (NotNull) + */ + public String extractColumnValueMapString(Entity entity, String startBrace, String endBrace, String delimiter, String equal) { + final Languages myEntity = (Languages)entity; + final String mapMarkAndStartBrace = MAP_STRING_MAP_MARK + startBrace; + final StringBuffer sb = new StringBuffer(); + helpAppendingColumnValueString(sb, delimiter, equal, "LANGUAGES_ID", myEntity.getLanguagesId()); + helpAppendingColumnValueString(sb, delimiter, equal, "NAME", myEntity.getName()); + helpAppendingColumnValueString(sb, delimiter, equal, "CODE", myEntity.getCode()); + helpAppendingColumnValueString(sb, delimiter, equal, "IMAGE", myEntity.getImage()); + helpAppendingColumnValueString(sb, delimiter, equal, "DIRECTORY", myEntity.getDirectory()); + helpAppendingColumnValueString(sb, delimiter, equal, "SORT_ORDER", myEntity.getSortOrder()); + + sb.delete(0, delimiter.length()).insert(0, mapMarkAndStartBrace).append(endBrace); + return sb.toString(); + } + + private void helpAppendingColumnValueString(StringBuffer sb, String delimiter, String equal, String colName, Object value) { + sb.append(delimiter).append(colName).append(equal); + sb.append(helpGettingColumnStringValue(value)); + } + + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @return Column-value map-string. (NotNull) + */ + public String extractCommonColumnValueMapString(Entity entity) { + return "map:{}"; + } + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @return Column-value map-string. (NotNull) + */ + public String extractCommonColumnValueMapString(Entity entity, String startBrace, String endBrace, String delimiter, String equal) { + return "map:" + startBrace + endBrace; + } + + + // ----------------------------------------------------- + // Convert + // ------- + public java.util.List convertToColumnValueList(Entity entity) { + return new java.util.ArrayList(convertToColumnValueMap(entity).values()); + } + + public java.util.Map convertToColumnValueMap(Entity entity) { + final Languages myEntity = downcast(entity); + final java.util.Map valueMap = new java.util.LinkedHashMap(); + valueMap.put("LANGUAGES_ID", myEntity.getLanguagesId()); + valueMap.put("NAME", myEntity.getName()); + valueMap.put("CODE", myEntity.getCode()); + valueMap.put("IMAGE", myEntity.getImage()); + valueMap.put("DIRECTORY", myEntity.getDirectory()); + valueMap.put("SORT_ORDER", myEntity.getSortOrder()); + return valueMap; + } + + public java.util.List convertToColumnStringValueList(Entity entity) { + return new java.util.ArrayList(convertToColumnStringValueMap(entity).values()); + } + + public java.util.Map convertToColumnStringValueMap(Entity entity) { + final Languages myEntity = downcast(entity); + final java.util.Map valueMap = new java.util.LinkedHashMap(); + valueMap.put("LANGUAGES_ID", helpGettingColumnStringValue(myEntity.getLanguagesId())); + valueMap.put("NAME", helpGettingColumnStringValue(myEntity.getName())); + valueMap.put("CODE", helpGettingColumnStringValue(myEntity.getCode())); + valueMap.put("IMAGE", helpGettingColumnStringValue(myEntity.getImage())); + valueMap.put("DIRECTORY", helpGettingColumnStringValue(myEntity.getDirectory())); + valueMap.put("SORT_ORDER", helpGettingColumnStringValue(myEntity.getSortOrder())); + return valueMap; + } + + // =================================================================================== + // JDBC Support + // ============ + public String getPreparedInsertClause() { + return "insert into LANGUAGES(LANGUAGES_ID, NAME, CODE, IMAGE, DIRECTORY, SORT_ORDER) values(? , ? , ? , ? , ? , ? )"; + } + + public String getPreparedInsertClause(String tablePrefix) { + return "insert into " + tablePrefix + "LANGUAGES(LANGUAGES_ID, NAME, CODE, IMAGE, DIRECTORY, SORT_ORDER) values(? , ? , ? , ? , ? , ? )"; + } + + // =================================================================================== + // Helper + // ====== + protected Languages downcast(Entity entity) { + assertObjectNotNull("entity", entity); + try { + return (Languages)entity; + } catch (ClassCastException e) { + String msg = "The entity should be Languages but it was: " + entity.getClass(); + throw new IllegalStateException(msg, e); + } + } + + protected void checkDowncast(Entity entity) { + downcast(entity); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/dbmeta/ManufacturersDbm.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/dbmeta/ManufacturersDbm.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/dbmeta/ManufacturersDbm.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,704 @@ +package jp.sf.pal.pompei.bsentity.dbmeta; + + +import jp.sf.pal.pompei.allcommon.Entity; +import jp.sf.pal.pompei.allcommon.dbmeta.DBMeta; +import jp.sf.pal.pompei.allcommon.dbmeta.AbstractDBMeta; +import jp.sf.pal.pompei.exentity.Manufacturers; + +/** + * The dbmeta of MANUFACTURERS. (Singleton) + * + *
+ * [primary-key]
+ *     MANUFACTURERS_ID
+ * 
+ * [column-property]
+ *     MANUFACTURERS_ID, MANUFACTURERS_NAME, MANUFACTURERS_IMAGE, DATE_ADDED, LAST_MODIFIED
+ * 
+ * [foreign-property]
+ *     
+ * 
+ * [refferer-property]
+ *     
+ * 
+ * [sequence]
+ *     
+ * 
+ * [identity]
+ *     
+ * 
+ * [update-date]
+ *     
+ * 
+ * [version-no]
+ *     
+ * 
+ * 
+ * + * @author DBFlute(AutoGenerator) + */ +public class ManufacturersDbm extends AbstractDBMeta { + + // =================================================================================== + // Definition + // ========== + /** The type of entity. */ + protected static final Class ENTITY_TYPE = Manufacturers.class; + + /** Singleton instance. */ + private static final ManufacturersDbm _instance = new ManufacturersDbm(); + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + private ManufacturersDbm() { + } + + // =================================================================================== + // Singleton + // ========= + /** + * Get instance. + * + * @return Singleton instance. (NotNull) + */ + public static ManufacturersDbm getInstance() { + return _instance; + } + + // =================================================================================== + // Name Definition + // =============== + /** Table db name. */ + public static final String TABLE_DB_NAME = "MANUFACTURERS"; + + /** Table cap-prop name. */ + public static final String TABLE_CAP_PROP_NAME = "Manufacturers"; + + /** Table uncap-prop name. */ + public static final String TABLE_UNCAP_PROP_NAME = "manufacturers"; + + /** Db-name of ManufacturersId. */ + public static final String COLUMN_DB_NAME_OF_ManufacturersId = "MANUFACTURERS_ID"; + /** Db-name of ManufacturersName. */ + public static final String COLUMN_DB_NAME_OF_ManufacturersName = "MANUFACTURERS_NAME"; + /** Db-name of ManufacturersImage. */ + public static final String COLUMN_DB_NAME_OF_ManufacturersImage = "MANUFACTURERS_IMAGE"; + /** Db-name of DateAdded. */ + public static final String COLUMN_DB_NAME_OF_DateAdded = "DATE_ADDED"; + /** Db-name of LastModified. */ + public static final String COLUMN_DB_NAME_OF_LastModified = "LAST_MODIFIED"; + + /** Cap-prop-name of ManufacturersId. */ + public static final String COLUMN_CAP_PROP_NAME_OF_ManufacturersId = "ManufacturersId"; + /** Cap-prop-name of ManufacturersName. */ + public static final String COLUMN_CAP_PROP_NAME_OF_ManufacturersName = "ManufacturersName"; + /** Cap-prop-name of ManufacturersImage. */ + public static final String COLUMN_CAP_PROP_NAME_OF_ManufacturersImage = "ManufacturersImage"; + /** Cap-prop-name of DateAdded. */ + public static final String COLUMN_CAP_PROP_NAME_OF_DateAdded = "DateAdded"; + /** Cap-prop-name of LastModified. */ + public static final String COLUMN_CAP_PROP_NAME_OF_LastModified = "LastModified"; + + + + /** Uncap-prop-name of ManufacturersId. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_ManufacturersId = "manufacturersId"; + /** Uncap-prop-name of ManufacturersName. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_ManufacturersName = "manufacturersName"; + /** Uncap-prop-name of ManufacturersImage. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_ManufacturersImage = "manufacturersImage"; + /** Uncap-prop-name of DateAdded. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_DateAdded = "dateAdded"; + /** Uncap-prop-name of LastModified. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_LastModified = "lastModified"; + + + + /** {db-name : cap-prop-name} map. */ + private static java.util.Map _dbNameCapPropNameMap; + protected static java.util.Map createDbNameCapPropNameMap() { + if (_dbNameCapPropNameMap != null) { + return _dbNameCapPropNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_DB_NAME, TABLE_CAP_PROP_NAME); + + map.put(COLUMN_DB_NAME_OF_ManufacturersId, COLUMN_CAP_PROP_NAME_OF_ManufacturersId); + map.put(COLUMN_DB_NAME_OF_ManufacturersName, COLUMN_CAP_PROP_NAME_OF_ManufacturersName); + map.put(COLUMN_DB_NAME_OF_ManufacturersImage, COLUMN_CAP_PROP_NAME_OF_ManufacturersImage); + map.put(COLUMN_DB_NAME_OF_DateAdded, COLUMN_CAP_PROP_NAME_OF_DateAdded); + map.put(COLUMN_DB_NAME_OF_LastModified, COLUMN_CAP_PROP_NAME_OF_LastModified); + + _dbNameCapPropNameMap = java.util.Collections.unmodifiableMap(map); + return _dbNameCapPropNameMap; + } + + /** {db-name : uncap-prop-name} map. */ + private static java.util.Map _dbNameUncapPropNameMap; + protected static java.util.Map createDbNameUncapPropNameMap() { + if (_dbNameUncapPropNameMap != null) { + return _dbNameUncapPropNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_DB_NAME, TABLE_UNCAP_PROP_NAME); + + map.put(COLUMN_DB_NAME_OF_ManufacturersId, COLUMN_UNCAP_PROP_NAME_OF_ManufacturersId); + map.put(COLUMN_DB_NAME_OF_ManufacturersName, COLUMN_UNCAP_PROP_NAME_OF_ManufacturersName); + map.put(COLUMN_DB_NAME_OF_ManufacturersImage, COLUMN_UNCAP_PROP_NAME_OF_ManufacturersImage); + map.put(COLUMN_DB_NAME_OF_DateAdded, COLUMN_UNCAP_PROP_NAME_OF_DateAdded); + map.put(COLUMN_DB_NAME_OF_LastModified, COLUMN_UNCAP_PROP_NAME_OF_LastModified); + + _dbNameUncapPropNameMap = java.util.Collections.unmodifiableMap(map); + return _dbNameUncapPropNameMap; + } + + /** {cap-prop-name : db-name} map. */ + private static java.util.Map _capPropNameDbNameMap; + protected static java.util.Map createCapPropNameDbNameMap() { + if (_capPropNameDbNameMap != null) { + return _capPropNameDbNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_CAP_PROP_NAME, TABLE_DB_NAME); + + map.put(COLUMN_CAP_PROP_NAME_OF_ManufacturersId, COLUMN_DB_NAME_OF_ManufacturersId); + map.put(COLUMN_CAP_PROP_NAME_OF_ManufacturersName, COLUMN_DB_NAME_OF_ManufacturersName); + map.put(COLUMN_CAP_PROP_NAME_OF_ManufacturersImage, COLUMN_DB_NAME_OF_ManufacturersImage); + map.put(COLUMN_CAP_PROP_NAME_OF_DateAdded, COLUMN_DB_NAME_OF_DateAdded); + map.put(COLUMN_CAP_PROP_NAME_OF_LastModified, COLUMN_DB_NAME_OF_LastModified); + + _capPropNameDbNameMap = java.util.Collections.unmodifiableMap(map); + return _capPropNameDbNameMap; + } + + /** {cap-prop-name : uncap-prop-name} map. */ + private static java.util.Map _capPropNameUncapPropNameMap; + protected static java.util.Map createCapPropNameUncapPropNameMap() { + if (_capPropNameUncapPropNameMap != null) { + return _capPropNameUncapPropNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_CAP_PROP_NAME, TABLE_UNCAP_PROP_NAME); + + map.put(COLUMN_CAP_PROP_NAME_OF_ManufacturersId, COLUMN_UNCAP_PROP_NAME_OF_ManufacturersId); + map.put(COLUMN_CAP_PROP_NAME_OF_ManufacturersName, COLUMN_UNCAP_PROP_NAME_OF_ManufacturersName); + map.put(COLUMN_CAP_PROP_NAME_OF_ManufacturersImage, COLUMN_UNCAP_PROP_NAME_OF_ManufacturersImage); + map.put(COLUMN_CAP_PROP_NAME_OF_DateAdded, COLUMN_UNCAP_PROP_NAME_OF_DateAdded); + map.put(COLUMN_CAP_PROP_NAME_OF_LastModified, COLUMN_UNCAP_PROP_NAME_OF_LastModified); + + _capPropNameUncapPropNameMap = java.util.Collections.unmodifiableMap(map); + return _capPropNameUncapPropNameMap; + } + + /** {uncap-prop-name : db-name} map. */ + private static java.util.Map _uncapPropNameDbNameMap; + protected static java.util.Map createUncapPropNameDbNameMap() { + if (_uncapPropNameDbNameMap != null) { + return _uncapPropNameDbNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_UNCAP_PROP_NAME, TABLE_DB_NAME); + + map.put(COLUMN_UNCAP_PROP_NAME_OF_ManufacturersId, COLUMN_DB_NAME_OF_ManufacturersId); + map.put(COLUMN_UNCAP_PROP_NAME_OF_ManufacturersName, COLUMN_DB_NAME_OF_ManufacturersName); + map.put(COLUMN_UNCAP_PROP_NAME_OF_ManufacturersImage, COLUMN_DB_NAME_OF_ManufacturersImage); + map.put(COLUMN_UNCAP_PROP_NAME_OF_DateAdded, COLUMN_DB_NAME_OF_DateAdded); + map.put(COLUMN_UNCAP_PROP_NAME_OF_LastModified, COLUMN_DB_NAME_OF_LastModified); + + _uncapPropNameDbNameMap = java.util.Collections.unmodifiableMap(map); + return _uncapPropNameDbNameMap; + } + + /** {uncap-prop-name : cap-prop-name} map. */ + private static java.util.Map _uncapPropNameCapPropNameMap; + protected static java.util.Map createUncapPropNameCapPropNameMap() { + if (_uncapPropNameCapPropNameMap != null) { + return _uncapPropNameCapPropNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_UNCAP_PROP_NAME, TABLE_CAP_PROP_NAME); + + map.put(COLUMN_UNCAP_PROP_NAME_OF_ManufacturersId, COLUMN_CAP_PROP_NAME_OF_ManufacturersId); + map.put(COLUMN_UNCAP_PROP_NAME_OF_ManufacturersName, COLUMN_CAP_PROP_NAME_OF_ManufacturersName); + map.put(COLUMN_UNCAP_PROP_NAME_OF_ManufacturersImage, COLUMN_CAP_PROP_NAME_OF_ManufacturersImage); + map.put(COLUMN_UNCAP_PROP_NAME_OF_DateAdded, COLUMN_CAP_PROP_NAME_OF_DateAdded); + map.put(COLUMN_UNCAP_PROP_NAME_OF_LastModified, COLUMN_CAP_PROP_NAME_OF_LastModified); + + _uncapPropNameCapPropNameMap = java.util.Collections.unmodifiableMap(map); + return _uncapPropNameCapPropNameMap; + } + + // =================================================================================== + // Name-Map + // ======== + /** + * This method implements the method that is declared at super. + * + * @return {db-name : cap-prop-name} map. + */ + public java.util.Map getDbNameCapPropNameMap() { + return createDbNameCapPropNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {db-name : uncap-prop-name} map. + */ + public java.util.Map getDbNameUncapPropNameMap() { + return createDbNameUncapPropNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {cap-prop-name : db-name} map. + */ + public java.util.Map getCapPropNameDbNameMap() { + return createCapPropNameDbNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {cap-prop-name : uncap-prop-name} map. + */ + public java.util.Map getCapPropNameUncapPropNameMap() { + return createCapPropNameUncapPropNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {uncap-prop-name : db-name} map. + */ + public java.util.Map getUncapPropNameDbNameMap() { + return createUncapPropNameDbNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {uncap-prop-name : cap-prop-name} map. + */ + public java.util.Map getUncapPropNameCapPropNameMap() { + return createUncapPropNameCapPropNameMap(); + } + + // =================================================================================== + // Table Name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + public String getTableDbName() { + return TABLE_DB_NAME; + } + + /** + * This method implements the method that is declared at super. + * + * @return Table cap-prop-name. (NotNull) + */ + public String getTableCapPropName() { + return TABLE_CAP_PROP_NAME; + } + + /** + * This method implements the method that is declared at super. + * + * @return Table property-name. (NotNull) + */ + public String getTableUncapPropName() { + return TABLE_UNCAP_PROP_NAME; + } + + // =================================================================================== + // Column Name + // =========== + public java.util.List getColumnDbNameList() { + final String[] columns = getColumnDbNameCommaString().split(","); + final java.util.List resultList = new java.util.ArrayList(); + for (int i=0; i < columns.length; i++) { + resultList.add(columns[i].trim()); + } + return resultList; + } + + public java.util.List getColumnCapPropNameList() { + final java.util.List columnDbNameList = getColumnDbNameList(); + final java.util.List resultList = new java.util.ArrayList(); + for (final java.util.Iterator ite = columnDbNameList.iterator(); ite.hasNext(); ) { + resultList.add(getDbNameCapPropNameMap().get((String)ite.next())); + } + return resultList; + } + + public java.util.List getColumnUncapPropNameList() { + final java.util.List columnDbNameList = getColumnDbNameList(); + final java.util.List resultList = new java.util.ArrayList(); + for (final java.util.Iterator ite = columnDbNameList.iterator(); ite.hasNext(); ) { + resultList.add(getDbNameUncapPropNameMap().get((String)ite.next())); + } + return resultList; + } + + /** + * This method implements the method that is declared at super. + * + * @return Column-db-name comma-string. (NotNull) + */ + public String getColumnDbNameCommaString() { + return "MANUFACTURERS_ID, MANUFACTURERS_NAME, MANUFACTURERS_IMAGE, DATE_ADDED, LAST_MODIFIED"; + } + + // =================================================================================== + // Type Name + // ========= + /** + * This method implements the method that is declared at super. + * + * @return The type-name of entity. (NotNull) + */ + public String getEntityTypeName() { + return "jp.sf.pal.pompei.exentity.Manufacturers"; + } + + /** + * This method implements the method that is declared at super. + * + * @return The type-name of condition-bean. (NotNull) + */ + public String getConditionBeanTypeName() { + return "jp.sf.pal.pompei.cbean.bs.ManufacturersCB"; + } + + /** + * This method implements the method that is declared at super. + * + * @return The type-name of dao. (NotNull) + */ + public String getDaoTypeName() { + return "jp.sf.pal.pompei.exdao.ManufacturersDao"; + } + + /** + * This method implements the method that is declared at super. + * + * @return The type-name of behavior. (NotNull) + */ + public String getBehaviorTypeName() { + return "jp.sf.pal.pompei.exbhv.ManufacturersBhv"; + } + + // =================================================================================== + // Type + // ==== + /** + * This method implements the method that is declared at super. + * + * @return The type of entity. (NotNull) + */ + public Class getEntityType() { + return ENTITY_TYPE; + } + + // =================================================================================== + // Instance + // ======== + /** + * This method implements the method that is declared at super. + * + * @return The type of entity. (NotNull) + */ + public Entity newEntity() { + return newMyEntity(); + } + + /** + * New the instance of my entity. + * + * @return The instance of my entity. (NotNull) + */ + public Manufacturers newMyEntity() { + return new Manufacturers(); + } + + // =================================================================================== + // Foreign DBMeta + // ============== + /** + * This method implements the method that is declared at super. + * + * @param foreignPropertyName Foreign-property-name(Both OK - InitCap or not). (NotNull) + * @return Foreign DBMeta. (NotNull) + */ + public DBMeta getForeignDBMeta(String foreignPropertyName) { + assertStringNotNullAndNotTrimmedEmpty("foreignPropertyName", foreignPropertyName); + final String methodName = "getForeignDBMeta_" + foreignPropertyName.substring(0, 1) + foreignPropertyName.substring(1); + + java.lang.reflect.Method method = null; + try { + method = this.getClass().getMethod(methodName, new Class[]{}); + } catch (NoSuchMethodException e) { + String msg = "The foreignPropertyName is not found: foreignPropertyName=" + foreignPropertyName; + msg = msg + " tableName=" + TABLE_DB_NAME + " methodName=" + methodName; + throw new RuntimeException(msg, e); + } + try { + return (DBMeta)method.invoke(this, new Object[]{}); + } catch (IllegalAccessException e) { + throw new RuntimeException(e); + } catch (java.lang.reflect.InvocationTargetException e) { + throw new RuntimeException(e.getCause()); + } + } + + // =================================================================================== + // Determination + // ============= + /** + * This method implements the method that is declared at super. + * + * @return Determination. + */ + public boolean hasTwoOrMorePrimaryKeys() { + return false; + } + + /** + * This method implements the method that is declared at super. + * + * @return Determination. + */ + public boolean hasCommonColumn() { + return false; + } + + // =================================================================================== + // Entity Handling + // =============== + // ----------------------------------------------------- + // Accept + // ------ + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @param primaryKeyMap Primary key map. (NotNull and NotEmpty) + */ + public void acceptPrimaryKeyMap(Entity entity, java.util.Map primaryKeyMap) { + final Manufacturers myEntity = (Manufacturers)entity; + MapAssertUtil.assertPrimaryKeyMapNotNullAndNotEmpty(primaryKeyMap); + final MapStringValueAnalyzer analyzer = new MapStringValueAnalyzer(primaryKeyMap, entity.getModifiedPropertyNames()); + + MapAssertUtil.assertColumnExistingInPrimaryKeyMap(primaryKeyMap, "MANUFACTURERS_ID"); + if (analyzer.init("MANUFACTURERS_ID", "manufacturersId", "manufacturersId")) { myEntity.setManufacturersId(analyzer.analyzeNumber(java.math.BigDecimal.class)); }; + + + } + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @param primaryKeyMapString Primary-key map-string. (NotNull and NotEmpty) + */ + public void acceptPrimaryKeyMapString(Entity entity, String primaryKeyMapString) { + MapStringUtil.acceptPrimaryKeyMapString(primaryKeyMapString, entity); + } + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @param columnValueMap Column-value map. (NotNull and NotEmpty) + */ + public void acceptColumnValueMap(Entity entity, java.util.Map columnValueMap) { + final Manufacturers myEntity = (Manufacturers)entity; + MapAssertUtil.assertColumnValueMapNotNullAndNotEmpty(columnValueMap); + final MapStringValueAnalyzer analyzer = new MapStringValueAnalyzer(columnValueMap, entity.getModifiedPropertyNames()); + + if (analyzer.init("MANUFACTURERS_ID", "manufacturersId", "manufacturersId")) { myEntity.setManufacturersId(analyzer.analyzeNumber(java.math.BigDecimal.class)); }; + if (analyzer.init("MANUFACTURERS_NAME", "manufacturersName", "manufacturersName")) { myEntity.setManufacturersName(analyzer.analyzeString(String.class)); }; + if (analyzer.init("MANUFACTURERS_IMAGE", "manufacturersImage", "manufacturersImage")) { myEntity.setManufacturersImage(analyzer.analyzeString(String.class)); }; + if (analyzer.init("DATE_ADDED", "dateAdded", "dateAdded")) { myEntity.setDateAdded(analyzer.analyzeDate(java.sql.Timestamp.class)); }; + if (analyzer.init("LAST_MODIFIED", "lastModified", "lastModified")) { myEntity.setLastModified(analyzer.analyzeDate(java.sql.Timestamp.class)); }; + + } + + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @param columnValueMapString Column-value map-string. (NotNull and NotEmpty) + */ + public void acceptColumnValueMapString(Entity entity, String columnValueMapString) { + MapStringUtil.acceptColumnValueMapString(columnValueMapString, entity); + } + + + // ----------------------------------------------------- + // Extract + // ------- + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @return Primary-key map-string. (NotNull) + */ + public String extractPrimaryKeyMapString(Entity entity) { + return MapStringUtil.extractPrimaryKeyMapString(entity); + } + + /** + * Extract primary-key map-string. + * + * @param entity Target entity. (NotNull) + * @param startBrace Start-brace. (NotNull) + * @param endBrace End-brace. (NotNull) + * @param delimiter Delimiter. (NotNull) + * @param equal Equal. (NotNull) + * @return Primary-key map-string. (NotNull) + */ + public String extractPrimaryKeyMapString(Entity entity, String startBrace, String endBrace, String delimiter, String equal) { + final Manufacturers myEntity = (Manufacturers)entity; + final String mapMarkAndStartBrace = MAP_STRING_MAP_MARK + startBrace; + final StringBuffer sb = new StringBuffer(); + helpAppendingColumnValueString(sb, delimiter, equal, "MANUFACTURERS_ID", myEntity.getManufacturersId()); + + sb.delete(0, delimiter.length()).insert(0, mapMarkAndStartBrace).append(endBrace); + return sb.toString(); + + } + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @return Column-value map-string. (NotNull) + */ + public String extractColumnValueMapString(Entity entity) { + return MapStringUtil.extractColumnValueMapString(entity); + } + + /** + * Extract column-value map-string. + * + * @param entity Target entity. (NotNull) + * @param startBrace Start-brace. (NotNull) + * @param endBrace End-brace. (NotNull) + * @param delimiter Delimiter. (NotNull) + * @param equal Equal. (NotNull) + * @return Column-value map-string. (NotNull) + */ + public String extractColumnValueMapString(Entity entity, String startBrace, String endBrace, String delimiter, String equal) { + final Manufacturers myEntity = (Manufacturers)entity; + final String mapMarkAndStartBrace = MAP_STRING_MAP_MARK + startBrace; + final StringBuffer sb = new StringBuffer(); + helpAppendingColumnValueString(sb, delimiter, equal, "MANUFACTURERS_ID", myEntity.getManufacturersId()); + helpAppendingColumnValueString(sb, delimiter, equal, "MANUFACTURERS_NAME", myEntity.getManufacturersName()); + helpAppendingColumnValueString(sb, delimiter, equal, "MANUFACTURERS_IMAGE", myEntity.getManufacturersImage()); + helpAppendingColumnValueString(sb, delimiter, equal, "DATE_ADDED", myEntity.getDateAdded()); + helpAppendingColumnValueString(sb, delimiter, equal, "LAST_MODIFIED", myEntity.getLastModified()); + + sb.delete(0, delimiter.length()).insert(0, mapMarkAndStartBrace).append(endBrace); + return sb.toString(); + } + + private void helpAppendingColumnValueString(StringBuffer sb, String delimiter, String equal, String colName, Object value) { + sb.append(delimiter).append(colName).append(equal); + sb.append(helpGettingColumnStringValue(value)); + } + + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @return Column-value map-string. (NotNull) + */ + public String extractCommonColumnValueMapString(Entity entity) { + return "map:{}"; + } + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @return Column-value map-string. (NotNull) + */ + public String extractCommonColumnValueMapString(Entity entity, String startBrace, String endBrace, String delimiter, String equal) { + return "map:" + startBrace + endBrace; + } + + + // ----------------------------------------------------- + // Convert + // ------- + public java.util.List convertToColumnValueList(Entity entity) { + return new java.util.ArrayList(convertToColumnValueMap(entity).values()); + } + + public java.util.Map convertToColumnValueMap(Entity entity) { + final Manufacturers myEntity = downcast(entity); + final java.util.Map valueMap = new java.util.LinkedHashMap(); + valueMap.put("MANUFACTURERS_ID", myEntity.getManufacturersId()); + valueMap.put("MANUFACTURERS_NAME", myEntity.getManufacturersName()); + valueMap.put("MANUFACTURERS_IMAGE", myEntity.getManufacturersImage()); + valueMap.put("DATE_ADDED", myEntity.getDateAdded()); + valueMap.put("LAST_MODIFIED", myEntity.getLastModified()); + return valueMap; + } + + public java.util.List convertToColumnStringValueList(Entity entity) { + return new java.util.ArrayList(convertToColumnStringValueMap(entity).values()); + } + + public java.util.Map convertToColumnStringValueMap(Entity entity) { + final Manufacturers myEntity = downcast(entity); + final java.util.Map valueMap = new java.util.LinkedHashMap(); + valueMap.put("MANUFACTURERS_ID", helpGettingColumnStringValue(myEntity.getManufacturersId())); + valueMap.put("MANUFACTURERS_NAME", helpGettingColumnStringValue(myEntity.getManufacturersName())); + valueMap.put("MANUFACTURERS_IMAGE", helpGettingColumnStringValue(myEntity.getManufacturersImage())); + valueMap.put("DATE_ADDED", helpGettingColumnStringValue(myEntity.getDateAdded())); + valueMap.put("LAST_MODIFIED", helpGettingColumnStringValue(myEntity.getLastModified())); + return valueMap; + } + + // =================================================================================== + // JDBC Support + // ============ + public String getPreparedInsertClause() { + return "insert into MANUFACTURERS(MANUFACTURERS_ID, MANUFACTURERS_NAME, MANUFACTURERS_IMAGE, DATE_ADDED, LAST_MODIFIED) values(? , ? , ? , ? , ? )"; + } + + public String getPreparedInsertClause(String tablePrefix) { + return "insert into " + tablePrefix + "MANUFACTURERS(MANUFACTURERS_ID, MANUFACTURERS_NAME, MANUFACTURERS_IMAGE, DATE_ADDED, LAST_MODIFIED) values(? , ? , ? , ? , ? )"; + } + + // =================================================================================== + // Helper + // ====== + protected Manufacturers downcast(Entity entity) { + assertObjectNotNull("entity", entity); + try { + return (Manufacturers)entity; + } catch (ClassCastException e) { + String msg = "The entity should be Manufacturers but it was: " + entity.getClass(); + throw new IllegalStateException(msg, e); + } + } + + protected void checkDowncast(Entity entity) { + downcast(entity); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/dbmeta/ManufacturersInfoDbm.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/dbmeta/ManufacturersInfoDbm.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/dbmeta/ManufacturersInfoDbm.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,707 @@ +package jp.sf.pal.pompei.bsentity.dbmeta; + + +import jp.sf.pal.pompei.allcommon.Entity; +import jp.sf.pal.pompei.allcommon.dbmeta.DBMeta; +import jp.sf.pal.pompei.allcommon.dbmeta.AbstractDBMeta; +import jp.sf.pal.pompei.exentity.ManufacturersInfo; + +/** + * The dbmeta of MANUFACTURERS_INFO. (Singleton) + * + *
+ * [primary-key]
+ *     MANUFACTURERS_ID, LANGUAGES_ID
+ * 
+ * [column-property]
+ *     MANUFACTURERS_ID, LANGUAGES_ID, MANUFACTURERS_URL, URL_CLICKED, DATE_LAST_CLICK
+ * 
+ * [foreign-property]
+ *     
+ * 
+ * [refferer-property]
+ *     
+ * 
+ * [sequence]
+ *     
+ * 
+ * [identity]
+ *     
+ * 
+ * [update-date]
+ *     
+ * 
+ * [version-no]
+ *     
+ * 
+ * 
+ * + * @author DBFlute(AutoGenerator) + */ +public class ManufacturersInfoDbm extends AbstractDBMeta { + + // =================================================================================== + // Definition + // ========== + /** The type of entity. */ + protected static final Class ENTITY_TYPE = ManufacturersInfo.class; + + /** Singleton instance. */ + private static final ManufacturersInfoDbm _instance = new ManufacturersInfoDbm(); + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + private ManufacturersInfoDbm() { + } + + // =================================================================================== + // Singleton + // ========= + /** + * Get instance. + * + * @return Singleton instance. (NotNull) + */ + public static ManufacturersInfoDbm getInstance() { + return _instance; + } + + // =================================================================================== + // Name Definition + // =============== + /** Table db name. */ + public static final String TABLE_DB_NAME = "MANUFACTURERS_INFO"; + + /** Table cap-prop name. */ + public static final String TABLE_CAP_PROP_NAME = "ManufacturersInfo"; + + /** Table uncap-prop name. */ + public static final String TABLE_UNCAP_PROP_NAME = "manufacturersInfo"; + + /** Db-name of ManufacturersId. */ + public static final String COLUMN_DB_NAME_OF_ManufacturersId = "MANUFACTURERS_ID"; + /** Db-name of LanguagesId. */ + public static final String COLUMN_DB_NAME_OF_LanguagesId = "LANGUAGES_ID"; + /** Db-name of ManufacturersUrl. */ + public static final String COLUMN_DB_NAME_OF_ManufacturersUrl = "MANUFACTURERS_URL"; + /** Db-name of UrlClicked. */ + public static final String COLUMN_DB_NAME_OF_UrlClicked = "URL_CLICKED"; + /** Db-name of DateLastClick. */ + public static final String COLUMN_DB_NAME_OF_DateLastClick = "DATE_LAST_CLICK"; + + /** Cap-prop-name of ManufacturersId. */ + public static final String COLUMN_CAP_PROP_NAME_OF_ManufacturersId = "ManufacturersId"; + /** Cap-prop-name of LanguagesId. */ + public static final String COLUMN_CAP_PROP_NAME_OF_LanguagesId = "LanguagesId"; + /** Cap-prop-name of ManufacturersUrl. */ + public static final String COLUMN_CAP_PROP_NAME_OF_ManufacturersUrl = "ManufacturersUrl"; + /** Cap-prop-name of UrlClicked. */ + public static final String COLUMN_CAP_PROP_NAME_OF_UrlClicked = "UrlClicked"; + /** Cap-prop-name of DateLastClick. */ + public static final String COLUMN_CAP_PROP_NAME_OF_DateLastClick = "DateLastClick"; + + + + /** Uncap-prop-name of ManufacturersId. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_ManufacturersId = "manufacturersId"; + /** Uncap-prop-name of LanguagesId. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_LanguagesId = "languagesId"; + /** Uncap-prop-name of ManufacturersUrl. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_ManufacturersUrl = "manufacturersUrl"; + /** Uncap-prop-name of UrlClicked. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_UrlClicked = "urlClicked"; + /** Uncap-prop-name of DateLastClick. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_DateLastClick = "dateLastClick"; + + + + /** {db-name : cap-prop-name} map. */ + private static java.util.Map _dbNameCapPropNameMap; + protected static java.util.Map createDbNameCapPropNameMap() { + if (_dbNameCapPropNameMap != null) { + return _dbNameCapPropNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_DB_NAME, TABLE_CAP_PROP_NAME); + + map.put(COLUMN_DB_NAME_OF_ManufacturersId, COLUMN_CAP_PROP_NAME_OF_ManufacturersId); + map.put(COLUMN_DB_NAME_OF_LanguagesId, COLUMN_CAP_PROP_NAME_OF_LanguagesId); + map.put(COLUMN_DB_NAME_OF_ManufacturersUrl, COLUMN_CAP_PROP_NAME_OF_ManufacturersUrl); + map.put(COLUMN_DB_NAME_OF_UrlClicked, COLUMN_CAP_PROP_NAME_OF_UrlClicked); + map.put(COLUMN_DB_NAME_OF_DateLastClick, COLUMN_CAP_PROP_NAME_OF_DateLastClick); + + _dbNameCapPropNameMap = java.util.Collections.unmodifiableMap(map); + return _dbNameCapPropNameMap; + } + + /** {db-name : uncap-prop-name} map. */ + private static java.util.Map _dbNameUncapPropNameMap; + protected static java.util.Map createDbNameUncapPropNameMap() { + if (_dbNameUncapPropNameMap != null) { + return _dbNameUncapPropNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_DB_NAME, TABLE_UNCAP_PROP_NAME); + + map.put(COLUMN_DB_NAME_OF_ManufacturersId, COLUMN_UNCAP_PROP_NAME_OF_ManufacturersId); + map.put(COLUMN_DB_NAME_OF_LanguagesId, COLUMN_UNCAP_PROP_NAME_OF_LanguagesId); + map.put(COLUMN_DB_NAME_OF_ManufacturersUrl, COLUMN_UNCAP_PROP_NAME_OF_ManufacturersUrl); + map.put(COLUMN_DB_NAME_OF_UrlClicked, COLUMN_UNCAP_PROP_NAME_OF_UrlClicked); + map.put(COLUMN_DB_NAME_OF_DateLastClick, COLUMN_UNCAP_PROP_NAME_OF_DateLastClick); + + _dbNameUncapPropNameMap = java.util.Collections.unmodifiableMap(map); + return _dbNameUncapPropNameMap; + } + + /** {cap-prop-name : db-name} map. */ + private static java.util.Map _capPropNameDbNameMap; + protected static java.util.Map createCapPropNameDbNameMap() { + if (_capPropNameDbNameMap != null) { + return _capPropNameDbNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_CAP_PROP_NAME, TABLE_DB_NAME); + + map.put(COLUMN_CAP_PROP_NAME_OF_ManufacturersId, COLUMN_DB_NAME_OF_ManufacturersId); + map.put(COLUMN_CAP_PROP_NAME_OF_LanguagesId, COLUMN_DB_NAME_OF_LanguagesId); + map.put(COLUMN_CAP_PROP_NAME_OF_ManufacturersUrl, COLUMN_DB_NAME_OF_ManufacturersUrl); + map.put(COLUMN_CAP_PROP_NAME_OF_UrlClicked, COLUMN_DB_NAME_OF_UrlClicked); + map.put(COLUMN_CAP_PROP_NAME_OF_DateLastClick, COLUMN_DB_NAME_OF_DateLastClick); + + _capPropNameDbNameMap = java.util.Collections.unmodifiableMap(map); + return _capPropNameDbNameMap; + } + + /** {cap-prop-name : uncap-prop-name} map. */ + private static java.util.Map _capPropNameUncapPropNameMap; + protected static java.util.Map createCapPropNameUncapPropNameMap() { + if (_capPropNameUncapPropNameMap != null) { + return _capPropNameUncapPropNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_CAP_PROP_NAME, TABLE_UNCAP_PROP_NAME); + + map.put(COLUMN_CAP_PROP_NAME_OF_ManufacturersId, COLUMN_UNCAP_PROP_NAME_OF_ManufacturersId); + map.put(COLUMN_CAP_PROP_NAME_OF_LanguagesId, COLUMN_UNCAP_PROP_NAME_OF_LanguagesId); + map.put(COLUMN_CAP_PROP_NAME_OF_ManufacturersUrl, COLUMN_UNCAP_PROP_NAME_OF_ManufacturersUrl); + map.put(COLUMN_CAP_PROP_NAME_OF_UrlClicked, COLUMN_UNCAP_PROP_NAME_OF_UrlClicked); + map.put(COLUMN_CAP_PROP_NAME_OF_DateLastClick, COLUMN_UNCAP_PROP_NAME_OF_DateLastClick); + + _capPropNameUncapPropNameMap = java.util.Collections.unmodifiableMap(map); + return _capPropNameUncapPropNameMap; + } + + /** {uncap-prop-name : db-name} map. */ + private static java.util.Map _uncapPropNameDbNameMap; + protected static java.util.Map createUncapPropNameDbNameMap() { + if (_uncapPropNameDbNameMap != null) { + return _uncapPropNameDbNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_UNCAP_PROP_NAME, TABLE_DB_NAME); + + map.put(COLUMN_UNCAP_PROP_NAME_OF_ManufacturersId, COLUMN_DB_NAME_OF_ManufacturersId); + map.put(COLUMN_UNCAP_PROP_NAME_OF_LanguagesId, COLUMN_DB_NAME_OF_LanguagesId); + map.put(COLUMN_UNCAP_PROP_NAME_OF_ManufacturersUrl, COLUMN_DB_NAME_OF_ManufacturersUrl); + map.put(COLUMN_UNCAP_PROP_NAME_OF_UrlClicked, COLUMN_DB_NAME_OF_UrlClicked); + map.put(COLUMN_UNCAP_PROP_NAME_OF_DateLastClick, COLUMN_DB_NAME_OF_DateLastClick); + + _uncapPropNameDbNameMap = java.util.Collections.unmodifiableMap(map); + return _uncapPropNameDbNameMap; + } + + /** {uncap-prop-name : cap-prop-name} map. */ + private static java.util.Map _uncapPropNameCapPropNameMap; + protected static java.util.Map createUncapPropNameCapPropNameMap() { + if (_uncapPropNameCapPropNameMap != null) { + return _uncapPropNameCapPropNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_UNCAP_PROP_NAME, TABLE_CAP_PROP_NAME); + + map.put(COLUMN_UNCAP_PROP_NAME_OF_ManufacturersId, COLUMN_CAP_PROP_NAME_OF_ManufacturersId); + map.put(COLUMN_UNCAP_PROP_NAME_OF_LanguagesId, COLUMN_CAP_PROP_NAME_OF_LanguagesId); + map.put(COLUMN_UNCAP_PROP_NAME_OF_ManufacturersUrl, COLUMN_CAP_PROP_NAME_OF_ManufacturersUrl); + map.put(COLUMN_UNCAP_PROP_NAME_OF_UrlClicked, COLUMN_CAP_PROP_NAME_OF_UrlClicked); + map.put(COLUMN_UNCAP_PROP_NAME_OF_DateLastClick, COLUMN_CAP_PROP_NAME_OF_DateLastClick); + + _uncapPropNameCapPropNameMap = java.util.Collections.unmodifiableMap(map); + return _uncapPropNameCapPropNameMap; + } + + // =================================================================================== + // Name-Map + // ======== + /** + * This method implements the method that is declared at super. + * + * @return {db-name : cap-prop-name} map. + */ + public java.util.Map getDbNameCapPropNameMap() { + return createDbNameCapPropNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {db-name : uncap-prop-name} map. + */ + public java.util.Map getDbNameUncapPropNameMap() { + return createDbNameUncapPropNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {cap-prop-name : db-name} map. + */ + public java.util.Map getCapPropNameDbNameMap() { + return createCapPropNameDbNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {cap-prop-name : uncap-prop-name} map. + */ + public java.util.Map getCapPropNameUncapPropNameMap() { + return createCapPropNameUncapPropNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {uncap-prop-name : db-name} map. + */ + public java.util.Map getUncapPropNameDbNameMap() { + return createUncapPropNameDbNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {uncap-prop-name : cap-prop-name} map. + */ + public java.util.Map getUncapPropNameCapPropNameMap() { + return createUncapPropNameCapPropNameMap(); + } + + // =================================================================================== + // Table Name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + public String getTableDbName() { + return TABLE_DB_NAME; + } + + /** + * This method implements the method that is declared at super. + * + * @return Table cap-prop-name. (NotNull) + */ + public String getTableCapPropName() { + return TABLE_CAP_PROP_NAME; + } + + /** + * This method implements the method that is declared at super. + * + * @return Table property-name. (NotNull) + */ + public String getTableUncapPropName() { + return TABLE_UNCAP_PROP_NAME; + } + + // =================================================================================== + // Column Name + // =========== + public java.util.List getColumnDbNameList() { + final String[] columns = getColumnDbNameCommaString().split(","); + final java.util.List resultList = new java.util.ArrayList(); + for (int i=0; i < columns.length; i++) { + resultList.add(columns[i].trim()); + } + return resultList; + } + + public java.util.List getColumnCapPropNameList() { + final java.util.List columnDbNameList = getColumnDbNameList(); + final java.util.List resultList = new java.util.ArrayList(); + for (final java.util.Iterator ite = columnDbNameList.iterator(); ite.hasNext(); ) { + resultList.add(getDbNameCapPropNameMap().get((String)ite.next())); + } + return resultList; + } + + public java.util.List getColumnUncapPropNameList() { + final java.util.List columnDbNameList = getColumnDbNameList(); + final java.util.List resultList = new java.util.ArrayList(); + for (final java.util.Iterator ite = columnDbNameList.iterator(); ite.hasNext(); ) { + resultList.add(getDbNameUncapPropNameMap().get((String)ite.next())); + } + return resultList; + } + + /** + * This method implements the method that is declared at super. + * + * @return Column-db-name comma-string. (NotNull) + */ + public String getColumnDbNameCommaString() { + return "MANUFACTURERS_ID, LANGUAGES_ID, MANUFACTURERS_URL, URL_CLICKED, DATE_LAST_CLICK"; + } + + // =================================================================================== + // Type Name + // ========= + /** + * This method implements the method that is declared at super. + * + * @return The type-name of entity. (NotNull) + */ + public String getEntityTypeName() { + return "jp.sf.pal.pompei.exentity.ManufacturersInfo"; + } + + /** + * This method implements the method that is declared at super. + * + * @return The type-name of condition-bean. (NotNull) + */ + public String getConditionBeanTypeName() { + return "jp.sf.pal.pompei.cbean.bs.ManufacturersInfoCB"; + } + + /** + * This method implements the method that is declared at super. + * + * @return The type-name of dao. (NotNull) + */ + public String getDaoTypeName() { + return "jp.sf.pal.pompei.exdao.ManufacturersInfoDao"; + } + + /** + * This method implements the method that is declared at super. + * + * @return The type-name of behavior. (NotNull) + */ + public String getBehaviorTypeName() { + return "jp.sf.pal.pompei.exbhv.ManufacturersInfoBhv"; + } + + // =================================================================================== + // Type + // ==== + /** + * This method implements the method that is declared at super. + * + * @return The type of entity. (NotNull) + */ + public Class getEntityType() { + return ENTITY_TYPE; + } + + // =================================================================================== + // Instance + // ======== + /** + * This method implements the method that is declared at super. + * + * @return The type of entity. (NotNull) + */ + public Entity newEntity() { + return newMyEntity(); + } + + /** + * New the instance of my entity. + * + * @return The instance of my entity. (NotNull) + */ + public ManufacturersInfo newMyEntity() { + return new ManufacturersInfo(); + } + + // =================================================================================== + // Foreign DBMeta + // ============== + /** + * This method implements the method that is declared at super. + * + * @param foreignPropertyName Foreign-property-name(Both OK - InitCap or not). (NotNull) + * @return Foreign DBMeta. (NotNull) + */ + public DBMeta getForeignDBMeta(String foreignPropertyName) { + assertStringNotNullAndNotTrimmedEmpty("foreignPropertyName", foreignPropertyName); + final String methodName = "getForeignDBMeta_" + foreignPropertyName.substring(0, 1) + foreignPropertyName.substring(1); + + java.lang.reflect.Method method = null; + try { + method = this.getClass().getMethod(methodName, new Class[]{}); + } catch (NoSuchMethodException e) { + String msg = "The foreignPropertyName is not found: foreignPropertyName=" + foreignPropertyName; + msg = msg + " tableName=" + TABLE_DB_NAME + " methodName=" + methodName; + throw new RuntimeException(msg, e); + } + try { + return (DBMeta)method.invoke(this, new Object[]{}); + } catch (IllegalAccessException e) { + throw new RuntimeException(e); + } catch (java.lang.reflect.InvocationTargetException e) { + throw new RuntimeException(e.getCause()); + } + } + + // =================================================================================== + // Determination + // ============= + /** + * This method implements the method that is declared at super. + * + * @return Determination. + */ + public boolean hasTwoOrMorePrimaryKeys() { + return true; + } + + /** + * This method implements the method that is declared at super. + * + * @return Determination. + */ + public boolean hasCommonColumn() { + return false; + } + + // =================================================================================== + // Entity Handling + // =============== + // ----------------------------------------------------- + // Accept + // ------ + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @param primaryKeyMap Primary key map. (NotNull and NotEmpty) + */ + public void acceptPrimaryKeyMap(Entity entity, java.util.Map primaryKeyMap) { + final ManufacturersInfo myEntity = (ManufacturersInfo)entity; + MapAssertUtil.assertPrimaryKeyMapNotNullAndNotEmpty(primaryKeyMap); + final MapStringValueAnalyzer analyzer = new MapStringValueAnalyzer(primaryKeyMap, entity.getModifiedPropertyNames()); + + MapAssertUtil.assertColumnExistingInPrimaryKeyMap(primaryKeyMap, "MANUFACTURERS_ID"); + if (analyzer.init("MANUFACTURERS_ID", "manufacturersId", "manufacturersId")) { myEntity.setManufacturersId(analyzer.analyzeNumber(java.math.BigDecimal.class)); }; + MapAssertUtil.assertColumnExistingInPrimaryKeyMap(primaryKeyMap, "LANGUAGES_ID"); + if (analyzer.init("LANGUAGES_ID", "languagesId", "languagesId")) { myEntity.setLanguagesId(analyzer.analyzeNumber(java.math.BigDecimal.class)); }; + + + } + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @param primaryKeyMapString Primary-key map-string. (NotNull and NotEmpty) + */ + public void acceptPrimaryKeyMapString(Entity entity, String primaryKeyMapString) { + MapStringUtil.acceptPrimaryKeyMapString(primaryKeyMapString, entity); + } + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @param columnValueMap Column-value map. (NotNull and NotEmpty) + */ + public void acceptColumnValueMap(Entity entity, java.util.Map columnValueMap) { + final ManufacturersInfo myEntity = (ManufacturersInfo)entity; + MapAssertUtil.assertColumnValueMapNotNullAndNotEmpty(columnValueMap); + final MapStringValueAnalyzer analyzer = new MapStringValueAnalyzer(columnValueMap, entity.getModifiedPropertyNames()); + + if (analyzer.init("MANUFACTURERS_ID", "manufacturersId", "manufacturersId")) { myEntity.setManufacturersId(analyzer.analyzeNumber(java.math.BigDecimal.class)); }; + if (analyzer.init("LANGUAGES_ID", "languagesId", "languagesId")) { myEntity.setLanguagesId(analyzer.analyzeNumber(java.math.BigDecimal.class)); }; + if (analyzer.init("MANUFACTURERS_URL", "manufacturersUrl", "manufacturersUrl")) { myEntity.setManufacturersUrl(analyzer.analyzeString(String.class)); }; + if (analyzer.init("URL_CLICKED", "urlClicked", "urlClicked")) { myEntity.setUrlClicked(analyzer.analyzeNumber(java.math.BigDecimal.class)); }; + if (analyzer.init("DATE_LAST_CLICK", "dateLastClick", "dateLastClick")) { myEntity.setDateLastClick(analyzer.analyzeDate(java.sql.Timestamp.class)); }; + + } + + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @param columnValueMapString Column-value map-string. (NotNull and NotEmpty) + */ + public void acceptColumnValueMapString(Entity entity, String columnValueMapString) { + MapStringUtil.acceptColumnValueMapString(columnValueMapString, entity); + } + + + // ----------------------------------------------------- + // Extract + // ------- + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @return Primary-key map-string. (NotNull) + */ + public String extractPrimaryKeyMapString(Entity entity) { + return MapStringUtil.extractPrimaryKeyMapString(entity); + } + + /** + * Extract primary-key map-string. + * + * @param entity Target entity. (NotNull) + * @param startBrace Start-brace. (NotNull) + * @param endBrace End-brace. (NotNull) + * @param delimiter Delimiter. (NotNull) + * @param equal Equal. (NotNull) + * @return Primary-key map-string. (NotNull) + */ + public String extractPrimaryKeyMapString(Entity entity, String startBrace, String endBrace, String delimiter, String equal) { + final ManufacturersInfo myEntity = (ManufacturersInfo)entity; + final String mapMarkAndStartBrace = MAP_STRING_MAP_MARK + startBrace; + final StringBuffer sb = new StringBuffer(); + helpAppendingColumnValueString(sb, delimiter, equal, "MANUFACTURERS_ID", myEntity.getManufacturersId()); + helpAppendingColumnValueString(sb, delimiter, equal, "LANGUAGES_ID", myEntity.getLanguagesId()); + + sb.delete(0, delimiter.length()).insert(0, mapMarkAndStartBrace).append(endBrace); + return sb.toString(); + + } + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @return Column-value map-string. (NotNull) + */ + public String extractColumnValueMapString(Entity entity) { + return MapStringUtil.extractColumnValueMapString(entity); + } + + /** + * Extract column-value map-string. + * + * @param entity Target entity. (NotNull) + * @param startBrace Start-brace. (NotNull) + * @param endBrace End-brace. (NotNull) + * @param delimiter Delimiter. (NotNull) + * @param equal Equal. (NotNull) + * @return Column-value map-string. (NotNull) + */ + public String extractColumnValueMapString(Entity entity, String startBrace, String endBrace, String delimiter, String equal) { + final ManufacturersInfo myEntity = (ManufacturersInfo)entity; + final String mapMarkAndStartBrace = MAP_STRING_MAP_MARK + startBrace; + final StringBuffer sb = new StringBuffer(); + helpAppendingColumnValueString(sb, delimiter, equal, "MANUFACTURERS_ID", myEntity.getManufacturersId()); + helpAppendingColumnValueString(sb, delimiter, equal, "LANGUAGES_ID", myEntity.getLanguagesId()); + helpAppendingColumnValueString(sb, delimiter, equal, "MANUFACTURERS_URL", myEntity.getManufacturersUrl()); + helpAppendingColumnValueString(sb, delimiter, equal, "URL_CLICKED", myEntity.getUrlClicked()); + helpAppendingColumnValueString(sb, delimiter, equal, "DATE_LAST_CLICK", myEntity.getDateLastClick()); + + sb.delete(0, delimiter.length()).insert(0, mapMarkAndStartBrace).append(endBrace); + return sb.toString(); + } + + private void helpAppendingColumnValueString(StringBuffer sb, String delimiter, String equal, String colName, Object value) { + sb.append(delimiter).append(colName).append(equal); + sb.append(helpGettingColumnStringValue(value)); + } + + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @return Column-value map-string. (NotNull) + */ + public String extractCommonColumnValueMapString(Entity entity) { + return "map:{}"; + } + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @return Column-value map-string. (NotNull) + */ + public String extractCommonColumnValueMapString(Entity entity, String startBrace, String endBrace, String delimiter, String equal) { + return "map:" + startBrace + endBrace; + } + + + // ----------------------------------------------------- + // Convert + // ------- + public java.util.List convertToColumnValueList(Entity entity) { + return new java.util.ArrayList(convertToColumnValueMap(entity).values()); + } + + public java.util.Map convertToColumnValueMap(Entity entity) { + final ManufacturersInfo myEntity = downcast(entity); + final java.util.Map valueMap = new java.util.LinkedHashMap(); + valueMap.put("MANUFACTURERS_ID", myEntity.getManufacturersId()); + valueMap.put("LANGUAGES_ID", myEntity.getLanguagesId()); + valueMap.put("MANUFACTURERS_URL", myEntity.getManufacturersUrl()); + valueMap.put("URL_CLICKED", myEntity.getUrlClicked()); + valueMap.put("DATE_LAST_CLICK", myEntity.getDateLastClick()); + return valueMap; + } + + public java.util.List convertToColumnStringValueList(Entity entity) { + return new java.util.ArrayList(convertToColumnStringValueMap(entity).values()); + } + + public java.util.Map convertToColumnStringValueMap(Entity entity) { + final ManufacturersInfo myEntity = downcast(entity); + final java.util.Map valueMap = new java.util.LinkedHashMap(); + valueMap.put("MANUFACTURERS_ID", helpGettingColumnStringValue(myEntity.getManufacturersId())); + valueMap.put("LANGUAGES_ID", helpGettingColumnStringValue(myEntity.getLanguagesId())); + valueMap.put("MANUFACTURERS_URL", helpGettingColumnStringValue(myEntity.getManufacturersUrl())); + valueMap.put("URL_CLICKED", helpGettingColumnStringValue(myEntity.getUrlClicked())); + valueMap.put("DATE_LAST_CLICK", helpGettingColumnStringValue(myEntity.getDateLastClick())); + return valueMap; + } + + // =================================================================================== + // JDBC Support + // ============ + public String getPreparedInsertClause() { + return "insert into MANUFACTURERS_INFO(MANUFACTURERS_ID, LANGUAGES_ID, MANUFACTURERS_URL, URL_CLICKED, DATE_LAST_CLICK) values(? , ? , ? , ? , ? )"; + } + + public String getPreparedInsertClause(String tablePrefix) { + return "insert into " + tablePrefix + "MANUFACTURERS_INFO(MANUFACTURERS_ID, LANGUAGES_ID, MANUFACTURERS_URL, URL_CLICKED, DATE_LAST_CLICK) values(? , ? , ? , ? , ? )"; + } + + // =================================================================================== + // Helper + // ====== + protected ManufacturersInfo downcast(Entity entity) { + assertObjectNotNull("entity", entity); + try { + return (ManufacturersInfo)entity; + } catch (ClassCastException e) { + String msg = "The entity should be ManufacturersInfo but it was: " + entity.getClass(); + throw new IllegalStateException(msg, e); + } + } + + protected void checkDowncast(Entity entity) { + downcast(entity); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/dbmeta/NewslettersDbm.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/dbmeta/NewslettersDbm.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/dbmeta/NewslettersDbm.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,752 @@ +package jp.sf.pal.pompei.bsentity.dbmeta; + + +import jp.sf.pal.pompei.allcommon.Entity; +import jp.sf.pal.pompei.allcommon.dbmeta.DBMeta; +import jp.sf.pal.pompei.allcommon.dbmeta.AbstractDBMeta; +import jp.sf.pal.pompei.exentity.Newsletters; + +/** + * The dbmeta of NEWSLETTERS. (Singleton) + * + *
+ * [primary-key]
+ *     NEWSLETTERS_ID
+ * 
+ * [column-property]
+ *     NEWSLETTERS_ID, TITLE, CONTENT, MODULE, DATE_ADDED, DATE_SENT, STATUS, LOCKED
+ * 
+ * [foreign-property]
+ *     
+ * 
+ * [refferer-property]
+ *     
+ * 
+ * [sequence]
+ *     
+ * 
+ * [identity]
+ *     
+ * 
+ * [update-date]
+ *     
+ * 
+ * [version-no]
+ *     
+ * 
+ * 
+ * + * @author DBFlute(AutoGenerator) + */ +public class NewslettersDbm extends AbstractDBMeta { + + // =================================================================================== + // Definition + // ========== + /** The type of entity. */ + protected static final Class ENTITY_TYPE = Newsletters.class; + + /** Singleton instance. */ + private static final NewslettersDbm _instance = new NewslettersDbm(); + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + private NewslettersDbm() { + } + + // =================================================================================== + // Singleton + // ========= + /** + * Get instance. + * + * @return Singleton instance. (NotNull) + */ + public static NewslettersDbm getInstance() { + return _instance; + } + + // =================================================================================== + // Name Definition + // =============== + /** Table db name. */ + public static final String TABLE_DB_NAME = "NEWSLETTERS"; + + /** Table cap-prop name. */ + public static final String TABLE_CAP_PROP_NAME = "Newsletters"; + + /** Table uncap-prop name. */ + public static final String TABLE_UNCAP_PROP_NAME = "newsletters"; + + /** Db-name of NewslettersId. */ + public static final String COLUMN_DB_NAME_OF_NewslettersId = "NEWSLETTERS_ID"; + /** Db-name of Title. */ + public static final String COLUMN_DB_NAME_OF_Title = "TITLE"; + /** Db-name of Content. */ + public static final String COLUMN_DB_NAME_OF_Content = "CONTENT"; + /** Db-name of Module. */ + public static final String COLUMN_DB_NAME_OF_Module = "MODULE"; + /** Db-name of DateAdded. */ + public static final String COLUMN_DB_NAME_OF_DateAdded = "DATE_ADDED"; + /** Db-name of DateSent. */ + public static final String COLUMN_DB_NAME_OF_DateSent = "DATE_SENT"; + /** Db-name of Status. */ + public static final String COLUMN_DB_NAME_OF_Status = "STATUS"; + /** Db-name of Locked. */ + public static final String COLUMN_DB_NAME_OF_Locked = "LOCKED"; + + /** Cap-prop-name of NewslettersId. */ + public static final String COLUMN_CAP_PROP_NAME_OF_NewslettersId = "NewslettersId"; + /** Cap-prop-name of Title. */ + public static final String COLUMN_CAP_PROP_NAME_OF_Title = "Title"; + /** Cap-prop-name of Content. */ + public static final String COLUMN_CAP_PROP_NAME_OF_Content = "Content"; + /** Cap-prop-name of Module. */ + public static final String COLUMN_CAP_PROP_NAME_OF_Module = "Module"; + /** Cap-prop-name of DateAdded. */ + public static final String COLUMN_CAP_PROP_NAME_OF_DateAdded = "DateAdded"; + /** Cap-prop-name of DateSent. */ + public static final String COLUMN_CAP_PROP_NAME_OF_DateSent = "DateSent"; + /** Cap-prop-name of Status. */ + public static final String COLUMN_CAP_PROP_NAME_OF_Status = "Status"; + /** Cap-prop-name of Locked. */ + public static final String COLUMN_CAP_PROP_NAME_OF_Locked = "Locked"; + + + + /** Uncap-prop-name of NewslettersId. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_NewslettersId = "newslettersId"; + /** Uncap-prop-name of Title. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_Title = "title"; + /** Uncap-prop-name of Content. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_Content = "content"; + /** Uncap-prop-name of Module. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_Module = "module"; + /** Uncap-prop-name of DateAdded. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_DateAdded = "dateAdded"; + /** Uncap-prop-name of DateSent. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_DateSent = "dateSent"; + /** Uncap-prop-name of Status. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_Status = "status"; + /** Uncap-prop-name of Locked. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_Locked = "locked"; + + + + /** {db-name : cap-prop-name} map. */ + private static java.util.Map _dbNameCapPropNameMap; + protected static java.util.Map createDbNameCapPropNameMap() { + if (_dbNameCapPropNameMap != null) { + return _dbNameCapPropNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_DB_NAME, TABLE_CAP_PROP_NAME); + + map.put(COLUMN_DB_NAME_OF_NewslettersId, COLUMN_CAP_PROP_NAME_OF_NewslettersId); + map.put(COLUMN_DB_NAME_OF_Title, COLUMN_CAP_PROP_NAME_OF_Title); + map.put(COLUMN_DB_NAME_OF_Content, COLUMN_CAP_PROP_NAME_OF_Content); + map.put(COLUMN_DB_NAME_OF_Module, COLUMN_CAP_PROP_NAME_OF_Module); + map.put(COLUMN_DB_NAME_OF_DateAdded, COLUMN_CAP_PROP_NAME_OF_DateAdded); + map.put(COLUMN_DB_NAME_OF_DateSent, COLUMN_CAP_PROP_NAME_OF_DateSent); + map.put(COLUMN_DB_NAME_OF_Status, COLUMN_CAP_PROP_NAME_OF_Status); + map.put(COLUMN_DB_NAME_OF_Locked, COLUMN_CAP_PROP_NAME_OF_Locked); + + _dbNameCapPropNameMap = java.util.Collections.unmodifiableMap(map); + return _dbNameCapPropNameMap; + } + + /** {db-name : uncap-prop-name} map. */ + private static java.util.Map _dbNameUncapPropNameMap; + protected static java.util.Map createDbNameUncapPropNameMap() { + if (_dbNameUncapPropNameMap != null) { + return _dbNameUncapPropNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_DB_NAME, TABLE_UNCAP_PROP_NAME); + + map.put(COLUMN_DB_NAME_OF_NewslettersId, COLUMN_UNCAP_PROP_NAME_OF_NewslettersId); + map.put(COLUMN_DB_NAME_OF_Title, COLUMN_UNCAP_PROP_NAME_OF_Title); + map.put(COLUMN_DB_NAME_OF_Content, COLUMN_UNCAP_PROP_NAME_OF_Content); + map.put(COLUMN_DB_NAME_OF_Module, COLUMN_UNCAP_PROP_NAME_OF_Module); + map.put(COLUMN_DB_NAME_OF_DateAdded, COLUMN_UNCAP_PROP_NAME_OF_DateAdded); + map.put(COLUMN_DB_NAME_OF_DateSent, COLUMN_UNCAP_PROP_NAME_OF_DateSent); + map.put(COLUMN_DB_NAME_OF_Status, COLUMN_UNCAP_PROP_NAME_OF_Status); + map.put(COLUMN_DB_NAME_OF_Locked, COLUMN_UNCAP_PROP_NAME_OF_Locked); + + _dbNameUncapPropNameMap = java.util.Collections.unmodifiableMap(map); + return _dbNameUncapPropNameMap; + } + + /** {cap-prop-name : db-name} map. */ + private static java.util.Map _capPropNameDbNameMap; + protected static java.util.Map createCapPropNameDbNameMap() { + if (_capPropNameDbNameMap != null) { + return _capPropNameDbNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_CAP_PROP_NAME, TABLE_DB_NAME); + + map.put(COLUMN_CAP_PROP_NAME_OF_NewslettersId, COLUMN_DB_NAME_OF_NewslettersId); + map.put(COLUMN_CAP_PROP_NAME_OF_Title, COLUMN_DB_NAME_OF_Title); + map.put(COLUMN_CAP_PROP_NAME_OF_Content, COLUMN_DB_NAME_OF_Content); + map.put(COLUMN_CAP_PROP_NAME_OF_Module, COLUMN_DB_NAME_OF_Module); + map.put(COLUMN_CAP_PROP_NAME_OF_DateAdded, COLUMN_DB_NAME_OF_DateAdded); + map.put(COLUMN_CAP_PROP_NAME_OF_DateSent, COLUMN_DB_NAME_OF_DateSent); + map.put(COLUMN_CAP_PROP_NAME_OF_Status, COLUMN_DB_NAME_OF_Status); + map.put(COLUMN_CAP_PROP_NAME_OF_Locked, COLUMN_DB_NAME_OF_Locked); + + _capPropNameDbNameMap = java.util.Collections.unmodifiableMap(map); + return _capPropNameDbNameMap; + } + + /** {cap-prop-name : uncap-prop-name} map. */ + private static java.util.Map _capPropNameUncapPropNameMap; + protected static java.util.Map createCapPropNameUncapPropNameMap() { + if (_capPropNameUncapPropNameMap != null) { + return _capPropNameUncapPropNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_CAP_PROP_NAME, TABLE_UNCAP_PROP_NAME); + + map.put(COLUMN_CAP_PROP_NAME_OF_NewslettersId, COLUMN_UNCAP_PROP_NAME_OF_NewslettersId); + map.put(COLUMN_CAP_PROP_NAME_OF_Title, COLUMN_UNCAP_PROP_NAME_OF_Title); + map.put(COLUMN_CAP_PROP_NAME_OF_Content, COLUMN_UNCAP_PROP_NAME_OF_Content); + map.put(COLUMN_CAP_PROP_NAME_OF_Module, COLUMN_UNCAP_PROP_NAME_OF_Module); + map.put(COLUMN_CAP_PROP_NAME_OF_DateAdded, COLUMN_UNCAP_PROP_NAME_OF_DateAdded); + map.put(COLUMN_CAP_PROP_NAME_OF_DateSent, COLUMN_UNCAP_PROP_NAME_OF_DateSent); + map.put(COLUMN_CAP_PROP_NAME_OF_Status, COLUMN_UNCAP_PROP_NAME_OF_Status); + map.put(COLUMN_CAP_PROP_NAME_OF_Locked, COLUMN_UNCAP_PROP_NAME_OF_Locked); + + _capPropNameUncapPropNameMap = java.util.Collections.unmodifiableMap(map); + return _capPropNameUncapPropNameMap; + } + + /** {uncap-prop-name : db-name} map. */ + private static java.util.Map _uncapPropNameDbNameMap; + protected static java.util.Map createUncapPropNameDbNameMap() { + if (_uncapPropNameDbNameMap != null) { + return _uncapPropNameDbNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_UNCAP_PROP_NAME, TABLE_DB_NAME); + + map.put(COLUMN_UNCAP_PROP_NAME_OF_NewslettersId, COLUMN_DB_NAME_OF_NewslettersId); + map.put(COLUMN_UNCAP_PROP_NAME_OF_Title, COLUMN_DB_NAME_OF_Title); + map.put(COLUMN_UNCAP_PROP_NAME_OF_Content, COLUMN_DB_NAME_OF_Content); + map.put(COLUMN_UNCAP_PROP_NAME_OF_Module, COLUMN_DB_NAME_OF_Module); + map.put(COLUMN_UNCAP_PROP_NAME_OF_DateAdded, COLUMN_DB_NAME_OF_DateAdded); + map.put(COLUMN_UNCAP_PROP_NAME_OF_DateSent, COLUMN_DB_NAME_OF_DateSent); + map.put(COLUMN_UNCAP_PROP_NAME_OF_Status, COLUMN_DB_NAME_OF_Status); + map.put(COLUMN_UNCAP_PROP_NAME_OF_Locked, COLUMN_DB_NAME_OF_Locked); + + _uncapPropNameDbNameMap = java.util.Collections.unmodifiableMap(map); + return _uncapPropNameDbNameMap; + } + + /** {uncap-prop-name : cap-prop-name} map. */ + private static java.util.Map _uncapPropNameCapPropNameMap; + protected static java.util.Map createUncapPropNameCapPropNameMap() { + if (_uncapPropNameCapPropNameMap != null) { + return _uncapPropNameCapPropNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_UNCAP_PROP_NAME, TABLE_CAP_PROP_NAME); + + map.put(COLUMN_UNCAP_PROP_NAME_OF_NewslettersId, COLUMN_CAP_PROP_NAME_OF_NewslettersId); + map.put(COLUMN_UNCAP_PROP_NAME_OF_Title, COLUMN_CAP_PROP_NAME_OF_Title); + map.put(COLUMN_UNCAP_PROP_NAME_OF_Content, COLUMN_CAP_PROP_NAME_OF_Content); + map.put(COLUMN_UNCAP_PROP_NAME_OF_Module, COLUMN_CAP_PROP_NAME_OF_Module); + map.put(COLUMN_UNCAP_PROP_NAME_OF_DateAdded, COLUMN_CAP_PROP_NAME_OF_DateAdded); + map.put(COLUMN_UNCAP_PROP_NAME_OF_DateSent, COLUMN_CAP_PROP_NAME_OF_DateSent); + map.put(COLUMN_UNCAP_PROP_NAME_OF_Status, COLUMN_CAP_PROP_NAME_OF_Status); + map.put(COLUMN_UNCAP_PROP_NAME_OF_Locked, COLUMN_CAP_PROP_NAME_OF_Locked); + + _uncapPropNameCapPropNameMap = java.util.Collections.unmodifiableMap(map); + return _uncapPropNameCapPropNameMap; + } + + // =================================================================================== + // Name-Map + // ======== + /** + * This method implements the method that is declared at super. + * + * @return {db-name : cap-prop-name} map. + */ + public java.util.Map getDbNameCapPropNameMap() { + return createDbNameCapPropNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {db-name : uncap-prop-name} map. + */ + public java.util.Map getDbNameUncapPropNameMap() { + return createDbNameUncapPropNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {cap-prop-name : db-name} map. + */ + public java.util.Map getCapPropNameDbNameMap() { + return createCapPropNameDbNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {cap-prop-name : uncap-prop-name} map. + */ + public java.util.Map getCapPropNameUncapPropNameMap() { + return createCapPropNameUncapPropNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {uncap-prop-name : db-name} map. + */ + public java.util.Map getUncapPropNameDbNameMap() { + return createUncapPropNameDbNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {uncap-prop-name : cap-prop-name} map. + */ + public java.util.Map getUncapPropNameCapPropNameMap() { + return createUncapPropNameCapPropNameMap(); + } + + // =================================================================================== + // Table Name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + public String getTableDbName() { + return TABLE_DB_NAME; + } + + /** + * This method implements the method that is declared at super. + * + * @return Table cap-prop-name. (NotNull) + */ + public String getTableCapPropName() { + return TABLE_CAP_PROP_NAME; + } + + /** + * This method implements the method that is declared at super. + * + * @return Table property-name. (NotNull) + */ + public String getTableUncapPropName() { + return TABLE_UNCAP_PROP_NAME; + } + + // =================================================================================== + // Column Name + // =========== + public java.util.List getColumnDbNameList() { + final String[] columns = getColumnDbNameCommaString().split(","); + final java.util.List resultList = new java.util.ArrayList(); + for (int i=0; i < columns.length; i++) { + resultList.add(columns[i].trim()); + } + return resultList; + } + + public java.util.List getColumnCapPropNameList() { + final java.util.List columnDbNameList = getColumnDbNameList(); + final java.util.List resultList = new java.util.ArrayList(); + for (final java.util.Iterator ite = columnDbNameList.iterator(); ite.hasNext(); ) { + resultList.add(getDbNameCapPropNameMap().get((String)ite.next())); + } + return resultList; + } + + public java.util.List getColumnUncapPropNameList() { + final java.util.List columnDbNameList = getColumnDbNameList(); + final java.util.List resultList = new java.util.ArrayList(); + for (final java.util.Iterator ite = columnDbNameList.iterator(); ite.hasNext(); ) { + resultList.add(getDbNameUncapPropNameMap().get((String)ite.next())); + } + return resultList; + } + + /** + * This method implements the method that is declared at super. + * + * @return Column-db-name comma-string. (NotNull) + */ + public String getColumnDbNameCommaString() { + return "NEWSLETTERS_ID, TITLE, CONTENT, MODULE, DATE_ADDED, DATE_SENT, STATUS, LOCKED"; + } + + // =================================================================================== + // Type Name + // ========= + /** + * This method implements the method that is declared at super. + * + * @return The type-name of entity. (NotNull) + */ + public String getEntityTypeName() { + return "jp.sf.pal.pompei.exentity.Newsletters"; + } + + /** + * This method implements the method that is declared at super. + * + * @return The type-name of condition-bean. (NotNull) + */ + public String getConditionBeanTypeName() { + return "jp.sf.pal.pompei.cbean.bs.NewslettersCB"; + } + + /** + * This method implements the method that is declared at super. + * + * @return The type-name of dao. (NotNull) + */ + public String getDaoTypeName() { + return "jp.sf.pal.pompei.exdao.NewslettersDao"; + } + + /** + * This method implements the method that is declared at super. + * + * @return The type-name of behavior. (NotNull) + */ + public String getBehaviorTypeName() { + return "jp.sf.pal.pompei.exbhv.NewslettersBhv"; + } + + // =================================================================================== + // Type + // ==== + /** + * This method implements the method that is declared at super. + * + * @return The type of entity. (NotNull) + */ + public Class getEntityType() { + return ENTITY_TYPE; + } + + // =================================================================================== + // Instance + // ======== + /** + * This method implements the method that is declared at super. + * + * @return The type of entity. (NotNull) + */ + public Entity newEntity() { + return newMyEntity(); + } + + /** + * New the instance of my entity. + * + * @return The instance of my entity. (NotNull) + */ + public Newsletters newMyEntity() { + return new Newsletters(); + } + + // =================================================================================== + // Foreign DBMeta + // ============== + /** + * This method implements the method that is declared at super. + * + * @param foreignPropertyName Foreign-property-name(Both OK - InitCap or not). (NotNull) + * @return Foreign DBMeta. (NotNull) + */ + public DBMeta getForeignDBMeta(String foreignPropertyName) { + assertStringNotNullAndNotTrimmedEmpty("foreignPropertyName", foreignPropertyName); + final String methodName = "getForeignDBMeta_" + foreignPropertyName.substring(0, 1) + foreignPropertyName.substring(1); + + java.lang.reflect.Method method = null; + try { + method = this.getClass().getMethod(methodName, new Class[]{}); + } catch (NoSuchMethodException e) { + String msg = "The foreignPropertyName is not found: foreignPropertyName=" + foreignPropertyName; + msg = msg + " tableName=" + TABLE_DB_NAME + " methodName=" + methodName; + throw new RuntimeException(msg, e); + } + try { + return (DBMeta)method.invoke(this, new Object[]{}); + } catch (IllegalAccessException e) { + throw new RuntimeException(e); + } catch (java.lang.reflect.InvocationTargetException e) { + throw new RuntimeException(e.getCause()); + } + } + + // =================================================================================== + // Determination + // ============= + /** + * This method implements the method that is declared at super. + * + * @return Determination. + */ + public boolean hasTwoOrMorePrimaryKeys() { + return false; + } + + /** + * This method implements the method that is declared at super. + * + * @return Determination. + */ + public boolean hasCommonColumn() { + return false; + } + + // =================================================================================== + // Entity Handling + // =============== + // ----------------------------------------------------- + // Accept + // ------ + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @param primaryKeyMap Primary key map. (NotNull and NotEmpty) + */ + public void acceptPrimaryKeyMap(Entity entity, java.util.Map primaryKeyMap) { + final Newsletters myEntity = (Newsletters)entity; + MapAssertUtil.assertPrimaryKeyMapNotNullAndNotEmpty(primaryKeyMap); + final MapStringValueAnalyzer analyzer = new MapStringValueAnalyzer(primaryKeyMap, entity.getModifiedPropertyNames()); + + MapAssertUtil.assertColumnExistingInPrimaryKeyMap(primaryKeyMap, "NEWSLETTERS_ID"); + if (analyzer.init("NEWSLETTERS_ID", "newslettersId", "newslettersId")) { myEntity.setNewslettersId(analyzer.analyzeNumber(java.math.BigDecimal.class)); }; + + + } + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @param primaryKeyMapString Primary-key map-string. (NotNull and NotEmpty) + */ + public void acceptPrimaryKeyMapString(Entity entity, String primaryKeyMapString) { + MapStringUtil.acceptPrimaryKeyMapString(primaryKeyMapString, entity); + } + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @param columnValueMap Column-value map. (NotNull and NotEmpty) + */ + public void acceptColumnValueMap(Entity entity, java.util.Map columnValueMap) { + final Newsletters myEntity = (Newsletters)entity; + MapAssertUtil.assertColumnValueMapNotNullAndNotEmpty(columnValueMap); + final MapStringValueAnalyzer analyzer = new MapStringValueAnalyzer(columnValueMap, entity.getModifiedPropertyNames()); + + if (analyzer.init("NEWSLETTERS_ID", "newslettersId", "newslettersId")) { myEntity.setNewslettersId(analyzer.analyzeNumber(java.math.BigDecimal.class)); }; + if (analyzer.init("TITLE", "title", "title")) { myEntity.setTitle(analyzer.analyzeString(String.class)); }; + if (analyzer.init("CONTENT", "content", "content")) { myEntity.setContent(analyzer.analyzeString(String.class)); }; + if (analyzer.init("MODULE", "module", "module")) { myEntity.setModule(analyzer.analyzeString(String.class)); }; + if (analyzer.init("DATE_ADDED", "dateAdded", "dateAdded")) { myEntity.setDateAdded(analyzer.analyzeDate(java.sql.Timestamp.class)); }; + if (analyzer.init("DATE_SENT", "dateSent", "dateSent")) { myEntity.setDateSent(analyzer.analyzeDate(java.sql.Timestamp.class)); }; + if (analyzer.init("STATUS", "status", "status")) { myEntity.setStatus(analyzer.analyzeNumber(java.math.BigDecimal.class)); }; + if (analyzer.init("LOCKED", "locked", "locked")) { myEntity.setLocked(analyzer.analyzeNumber(java.math.BigDecimal.class)); }; + + } + + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @param columnValueMapString Column-value map-string. (NotNull and NotEmpty) + */ + public void acceptColumnValueMapString(Entity entity, String columnValueMapString) { + MapStringUtil.acceptColumnValueMapString(columnValueMapString, entity); + } + + + // ----------------------------------------------------- + // Extract + // ------- + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @return Primary-key map-string. (NotNull) + */ + public String extractPrimaryKeyMapString(Entity entity) { + return MapStringUtil.extractPrimaryKeyMapString(entity); + } + + /** + * Extract primary-key map-string. + * + * @param entity Target entity. (NotNull) + * @param startBrace Start-brace. (NotNull) + * @param endBrace End-brace. (NotNull) + * @param delimiter Delimiter. (NotNull) + * @param equal Equal. (NotNull) + * @return Primary-key map-string. (NotNull) + */ + public String extractPrimaryKeyMapString(Entity entity, String startBrace, String endBrace, String delimiter, String equal) { + final Newsletters myEntity = (Newsletters)entity; + final String mapMarkAndStartBrace = MAP_STRING_MAP_MARK + startBrace; + final StringBuffer sb = new StringBuffer(); + helpAppendingColumnValueString(sb, delimiter, equal, "NEWSLETTERS_ID", myEntity.getNewslettersId()); + + sb.delete(0, delimiter.length()).insert(0, mapMarkAndStartBrace).append(endBrace); + return sb.toString(); + + } + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @return Column-value map-string. (NotNull) + */ + public String extractColumnValueMapString(Entity entity) { + return MapStringUtil.extractColumnValueMapString(entity); + } + + /** + * Extract column-value map-string. + * + * @param entity Target entity. (NotNull) + * @param startBrace Start-brace. (NotNull) + * @param endBrace End-brace. (NotNull) + * @param delimiter Delimiter. (NotNull) + * @param equal Equal. (NotNull) + * @return Column-value map-string. (NotNull) + */ + public String extractColumnValueMapString(Entity entity, String startBrace, String endBrace, String delimiter, String equal) { + final Newsletters myEntity = (Newsletters)entity; + final String mapMarkAndStartBrace = MAP_STRING_MAP_MARK + startBrace; + final StringBuffer sb = new StringBuffer(); + helpAppendingColumnValueString(sb, delimiter, equal, "NEWSLETTERS_ID", myEntity.getNewslettersId()); + helpAppendingColumnValueString(sb, delimiter, equal, "TITLE", myEntity.getTitle()); + helpAppendingColumnValueString(sb, delimiter, equal, "CONTENT", myEntity.getContent()); + helpAppendingColumnValueString(sb, delimiter, equal, "MODULE", myEntity.getModule()); + helpAppendingColumnValueString(sb, delimiter, equal, "DATE_ADDED", myEntity.getDateAdded()); + helpAppendingColumnValueString(sb, delimiter, equal, "DATE_SENT", myEntity.getDateSent()); + helpAppendingColumnValueString(sb, delimiter, equal, "STATUS", myEntity.getStatus()); + helpAppendingColumnValueString(sb, delimiter, equal, "LOCKED", myEntity.getLocked()); + + sb.delete(0, delimiter.length()).insert(0, mapMarkAndStartBrace).append(endBrace); + return sb.toString(); + } + + private void helpAppendingColumnValueString(StringBuffer sb, String delimiter, String equal, String colName, Object value) { + sb.append(delimiter).append(colName).append(equal); + sb.append(helpGettingColumnStringValue(value)); + } + + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @return Column-value map-string. (NotNull) + */ + public String extractCommonColumnValueMapString(Entity entity) { + return "map:{}"; + } + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @return Column-value map-string. (NotNull) + */ + public String extractCommonColumnValueMapString(Entity entity, String startBrace, String endBrace, String delimiter, String equal) { + return "map:" + startBrace + endBrace; + } + + + // ----------------------------------------------------- + // Convert + // ------- + public java.util.List convertToColumnValueList(Entity entity) { + return new java.util.ArrayList(convertToColumnValueMap(entity).values()); + } + + public java.util.Map convertToColumnValueMap(Entity entity) { + final Newsletters myEntity = downcast(entity); + final java.util.Map valueMap = new java.util.LinkedHashMap(); + valueMap.put("NEWSLETTERS_ID", myEntity.getNewslettersId()); + valueMap.put("TITLE", myEntity.getTitle()); + valueMap.put("CONTENT", myEntity.getContent()); + valueMap.put("MODULE", myEntity.getModule()); + valueMap.put("DATE_ADDED", myEntity.getDateAdded()); + valueMap.put("DATE_SENT", myEntity.getDateSent()); + valueMap.put("STATUS", myEntity.getStatus()); + valueMap.put("LOCKED", myEntity.getLocked()); + return valueMap; + } + + public java.util.List convertToColumnStringValueList(Entity entity) { + return new java.util.ArrayList(convertToColumnStringValueMap(entity).values()); + } + + public java.util.Map convertToColumnStringValueMap(Entity entity) { + final Newsletters myEntity = downcast(entity); + final java.util.Map valueMap = new java.util.LinkedHashMap(); + valueMap.put("NEWSLETTERS_ID", helpGettingColumnStringValue(myEntity.getNewslettersId())); + valueMap.put("TITLE", helpGettingColumnStringValue(myEntity.getTitle())); + valueMap.put("CONTENT", helpGettingColumnStringValue(myEntity.getContent())); + valueMap.put("MODULE", helpGettingColumnStringValue(myEntity.getModule())); + valueMap.put("DATE_ADDED", helpGettingColumnStringValue(myEntity.getDateAdded())); + valueMap.put("DATE_SENT", helpGettingColumnStringValue(myEntity.getDateSent())); + valueMap.put("STATUS", helpGettingColumnStringValue(myEntity.getStatus())); + valueMap.put("LOCKED", helpGettingColumnStringValue(myEntity.getLocked())); + return valueMap; + } + + // =================================================================================== + // JDBC Support + // ============ + public String getPreparedInsertClause() { + return "insert into NEWSLETTERS(NEWSLETTERS_ID, TITLE, CONTENT, MODULE, DATE_ADDED, DATE_SENT, STATUS, LOCKED) values(? , ? , ? , ? , ? , ? , ? , ? )"; + } + + public String getPreparedInsertClause(String tablePrefix) { + return "insert into " + tablePrefix + "NEWSLETTERS(NEWSLETTERS_ID, TITLE, CONTENT, MODULE, DATE_ADDED, DATE_SENT, STATUS, LOCKED) values(? , ? , ? , ? , ? , ? , ? , ? )"; + } + + // =================================================================================== + // Helper + // ====== + protected Newsletters downcast(Entity entity) { + assertObjectNotNull("entity", entity); + try { + return (Newsletters)entity; + } catch (ClassCastException e) { + String msg = "The entity should be Newsletters but it was: " + entity.getClass(); + throw new IllegalStateException(msg, e); + } + } + + protected void checkDowncast(Entity entity) { + downcast(entity); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/dbmeta/OrdersDbm.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/dbmeta/OrdersDbm.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/dbmeta/OrdersDbm.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,1296 @@ +package jp.sf.pal.pompei.bsentity.dbmeta; + + +import jp.sf.pal.pompei.allcommon.Entity; +import jp.sf.pal.pompei.allcommon.dbmeta.DBMeta; +import jp.sf.pal.pompei.allcommon.dbmeta.AbstractDBMeta; +import jp.sf.pal.pompei.exentity.Orders; + +/** + * The dbmeta of ORDERS. (Singleton) + * + *
+ * [primary-key]
+ *     ORDERS_ID
+ * 
+ * [column-property]
+ *     ORDERS_ID, CUSTOMERS_ID, CUSTOMERS_NAME, CUSTOMERS_COMPANY, CUSTOMERS_STREET_ADDRESS, CUSTOMERS_SUBURB, CUSTOMERS_CITY, CUSTOMERS_POSTCODE, CUSTOMERS_STATE, CUSTOMERS_COUNTRY, CUSTOMERS_TELEPHONE, CUSTOMERS_EMAIL_ADDRESS, CUSTOMERS_ADDRESS_FORMAT_ID, DELIVERY_NAME, DELIVERY_COMPANY, DELIVERY_STREET_ADDRESS, DELIVERY_SUBURB, DELIVERY_CITY, DELIVERY_POSTCODE, DELIVERY_STATE, DELIVERY_COUNTRY, DELIVERY_ADDRESS_FORMAT_ID, BILLING_NAME, BILLING_COMPANY, BILLING_STREET_ADDRESS, BILLING_SUBURB, BILLING_CITY, BILLING_POSTCODE, BILLING_STATE, BILLING_COUNTRY, BILLING_ADDRESS_FORMAT_ID, PAYMENT_METHOD, CC_TYPE, CC_OWNER, CC_NUMBER, CC_EXPIRES, LAST_MODIFIED, DATE_PURCHASED, ORDERS_STATUS, ORDERS_DATE_FINISHED, CURRENCY, CURRENCY_VALUE
+ * 
+ * [foreign-property]
+ *     
+ * 
+ * [refferer-property]
+ *     
+ * 
+ * [sequence]
+ *     
+ * 
+ * [identity]
+ *     
+ * 
+ * [update-date]
+ *     
+ * 
+ * [version-no]
+ *     
+ * 
+ * 
+ * + * @author DBFlute(AutoGenerator) + */ +public class OrdersDbm extends AbstractDBMeta { + + // =================================================================================== + // Definition + // ========== + /** The type of entity. */ + protected static final Class ENTITY_TYPE = Orders.class; + + /** Singleton instance. */ + private static final OrdersDbm _instance = new OrdersDbm(); + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + private OrdersDbm() { + } + + // =================================================================================== + // Singleton + // ========= + /** + * Get instance. + * + * @return Singleton instance. (NotNull) + */ + public static OrdersDbm getInstance() { + return _instance; + } + + // =================================================================================== + // Name Definition + // =============== + /** Table db name. */ + public static final String TABLE_DB_NAME = "ORDERS"; + + /** Table cap-prop name. */ + public static final String TABLE_CAP_PROP_NAME = "Orders"; + + /** Table uncap-prop name. */ + public static final String TABLE_UNCAP_PROP_NAME = "orders"; + + /** Db-name of OrdersId. */ + public static final String COLUMN_DB_NAME_OF_OrdersId = "ORDERS_ID"; + /** Db-name of CustomersId. */ + public static final String COLUMN_DB_NAME_OF_CustomersId = "CUSTOMERS_ID"; + /** Db-name of CustomersName. */ + public static final String COLUMN_DB_NAME_OF_CustomersName = "CUSTOMERS_NAME"; + /** Db-name of CustomersCompany. */ + public static final String COLUMN_DB_NAME_OF_CustomersCompany = "CUSTOMERS_COMPANY"; + /** Db-name of CustomersStreetAddress. */ + public static final String COLUMN_DB_NAME_OF_CustomersStreetAddress = "CUSTOMERS_STREET_ADDRESS"; + /** Db-name of CustomersSuburb. */ + public static final String COLUMN_DB_NAME_OF_CustomersSuburb = "CUSTOMERS_SUBURB"; + /** Db-name of CustomersCity. */ + public static final String COLUMN_DB_NAME_OF_CustomersCity = "CUSTOMERS_CITY"; + /** Db-name of CustomersPostcode. */ + public static final String COLUMN_DB_NAME_OF_CustomersPostcode = "CUSTOMERS_POSTCODE"; + /** Db-name of CustomersState. */ + public static final String COLUMN_DB_NAME_OF_CustomersState = "CUSTOMERS_STATE"; + /** Db-name of CustomersCountry. */ + public static final String COLUMN_DB_NAME_OF_CustomersCountry = "CUSTOMERS_COUNTRY"; + /** Db-name of CustomersTelephone. */ + public static final String COLUMN_DB_NAME_OF_CustomersTelephone = "CUSTOMERS_TELEPHONE"; + /** Db-name of CustomersEmailAddress. */ + public static final String COLUMN_DB_NAME_OF_CustomersEmailAddress = "CUSTOMERS_EMAIL_ADDRESS"; + /** Db-name of CustomersAddressFormatId. */ + public static final String COLUMN_DB_NAME_OF_CustomersAddressFormatId = "CUSTOMERS_ADDRESS_FORMAT_ID"; + /** Db-name of DeliveryName. */ + public static final String COLUMN_DB_NAME_OF_DeliveryName = "DELIVERY_NAME"; + /** Db-name of DeliveryCompany. */ + public static final String COLUMN_DB_NAME_OF_DeliveryCompany = "DELIVERY_COMPANY"; + /** Db-name of DeliveryStreetAddress. */ + public static final String COLUMN_DB_NAME_OF_DeliveryStreetAddress = "DELIVERY_STREET_ADDRESS"; + /** Db-name of DeliverySuburb. */ + public static final String COLUMN_DB_NAME_OF_DeliverySuburb = "DELIVERY_SUBURB"; + /** Db-name of DeliveryCity. */ + public static final String COLUMN_DB_NAME_OF_DeliveryCity = "DELIVERY_CITY"; + /** Db-name of DeliveryPostcode. */ + public static final String COLUMN_DB_NAME_OF_DeliveryPostcode = "DELIVERY_POSTCODE"; + /** Db-name of DeliveryState. */ + public static final String COLUMN_DB_NAME_OF_DeliveryState = "DELIVERY_STATE"; + /** Db-name of DeliveryCountry. */ + public static final String COLUMN_DB_NAME_OF_DeliveryCountry = "DELIVERY_COUNTRY"; + /** Db-name of DeliveryAddressFormatId. */ + public static final String COLUMN_DB_NAME_OF_DeliveryAddressFormatId = "DELIVERY_ADDRESS_FORMAT_ID"; + /** Db-name of BillingName. */ + public static final String COLUMN_DB_NAME_OF_BillingName = "BILLING_NAME"; + /** Db-name of BillingCompany. */ + public static final String COLUMN_DB_NAME_OF_BillingCompany = "BILLING_COMPANY"; + /** Db-name of BillingStreetAddress. */ + public static final String COLUMN_DB_NAME_OF_BillingStreetAddress = "BILLING_STREET_ADDRESS"; + /** Db-name of BillingSuburb. */ + public static final String COLUMN_DB_NAME_OF_BillingSuburb = "BILLING_SUBURB"; + /** Db-name of BillingCity. */ + public static final String COLUMN_DB_NAME_OF_BillingCity = "BILLING_CITY"; + /** Db-name of BillingPostcode. */ + public static final String COLUMN_DB_NAME_OF_BillingPostcode = "BILLING_POSTCODE"; + /** Db-name of BillingState. */ + public static final String COLUMN_DB_NAME_OF_BillingState = "BILLING_STATE"; + /** Db-name of BillingCountry. */ + public static final String COLUMN_DB_NAME_OF_BillingCountry = "BILLING_COUNTRY"; + /** Db-name of BillingAddressFormatId. */ + public static final String COLUMN_DB_NAME_OF_BillingAddressFormatId = "BILLING_ADDRESS_FORMAT_ID"; + /** Db-name of PaymentMethod. */ + public static final String COLUMN_DB_NAME_OF_PaymentMethod = "PAYMENT_METHOD"; + /** Db-name of CcType. */ + public static final String COLUMN_DB_NAME_OF_CcType = "CC_TYPE"; + /** Db-name of CcOwner. */ + public static final String COLUMN_DB_NAME_OF_CcOwner = "CC_OWNER"; + /** Db-name of CcNumber. */ + public static final String COLUMN_DB_NAME_OF_CcNumber = "CC_NUMBER"; + /** Db-name of CcExpires. */ + public static final String COLUMN_DB_NAME_OF_CcExpires = "CC_EXPIRES"; + /** Db-name of LastModified. */ + public static final String COLUMN_DB_NAME_OF_LastModified = "LAST_MODIFIED"; + /** Db-name of DatePurchased. */ + public static final String COLUMN_DB_NAME_OF_DatePurchased = "DATE_PURCHASED"; + /** Db-name of OrdersStatus. */ + public static final String COLUMN_DB_NAME_OF_OrdersStatus = "ORDERS_STATUS"; + /** Db-name of OrdersDateFinished. */ + public static final String COLUMN_DB_NAME_OF_OrdersDateFinished = "ORDERS_DATE_FINISHED"; + /** Db-name of Currency. */ + public static final String COLUMN_DB_NAME_OF_Currency = "CURRENCY"; + /** Db-name of CurrencyValue. */ + public static final String COLUMN_DB_NAME_OF_CurrencyValue = "CURRENCY_VALUE"; + + /** Cap-prop-name of OrdersId. */ + public static final String COLUMN_CAP_PROP_NAME_OF_OrdersId = "OrdersId"; + /** Cap-prop-name of CustomersId. */ + public static final String COLUMN_CAP_PROP_NAME_OF_CustomersId = "CustomersId"; + /** Cap-prop-name of CustomersName. */ + public static final String COLUMN_CAP_PROP_NAME_OF_CustomersName = "CustomersName"; + /** Cap-prop-name of CustomersCompany. */ + public static final String COLUMN_CAP_PROP_NAME_OF_CustomersCompany = "CustomersCompany"; + /** Cap-prop-name of CustomersStreetAddress. */ + public static final String COLUMN_CAP_PROP_NAME_OF_CustomersStreetAddress = "CustomersStreetAddress"; + /** Cap-prop-name of CustomersSuburb. */ + public static final String COLUMN_CAP_PROP_NAME_OF_CustomersSuburb = "CustomersSuburb"; + /** Cap-prop-name of CustomersCity. */ + public static final String COLUMN_CAP_PROP_NAME_OF_CustomersCity = "CustomersCity"; + /** Cap-prop-name of CustomersPostcode. */ + public static final String COLUMN_CAP_PROP_NAME_OF_CustomersPostcode = "CustomersPostcode"; + /** Cap-prop-name of CustomersState. */ + public static final String COLUMN_CAP_PROP_NAME_OF_CustomersState = "CustomersState"; + /** Cap-prop-name of CustomersCountry. */ + public static final String COLUMN_CAP_PROP_NAME_OF_CustomersCountry = "CustomersCountry"; + /** Cap-prop-name of CustomersTelephone. */ + public static final String COLUMN_CAP_PROP_NAME_OF_CustomersTelephone = "CustomersTelephone"; + /** Cap-prop-name of CustomersEmailAddress. */ + public static final String COLUMN_CAP_PROP_NAME_OF_CustomersEmailAddress = "CustomersEmailAddress"; + /** Cap-prop-name of CustomersAddressFormatId. */ + public static final String COLUMN_CAP_PROP_NAME_OF_CustomersAddressFormatId = "CustomersAddressFormatId"; + /** Cap-prop-name of DeliveryName. */ + public static final String COLUMN_CAP_PROP_NAME_OF_DeliveryName = "DeliveryName"; + /** Cap-prop-name of DeliveryCompany. */ + public static final String COLUMN_CAP_PROP_NAME_OF_DeliveryCompany = "DeliveryCompany"; + /** Cap-prop-name of DeliveryStreetAddress. */ + public static final String COLUMN_CAP_PROP_NAME_OF_DeliveryStreetAddress = "DeliveryStreetAddress"; + /** Cap-prop-name of DeliverySuburb. */ + public static final String COLUMN_CAP_PROP_NAME_OF_DeliverySuburb = "DeliverySuburb"; + /** Cap-prop-name of DeliveryCity. */ + public static final String COLUMN_CAP_PROP_NAME_OF_DeliveryCity = "DeliveryCity"; + /** Cap-prop-name of DeliveryPostcode. */ + public static final String COLUMN_CAP_PROP_NAME_OF_DeliveryPostcode = "DeliveryPostcode"; + /** Cap-prop-name of DeliveryState. */ + public static final String COLUMN_CAP_PROP_NAME_OF_DeliveryState = "DeliveryState"; + /** Cap-prop-name of DeliveryCountry. */ + public static final String COLUMN_CAP_PROP_NAME_OF_DeliveryCountry = "DeliveryCountry"; + /** Cap-prop-name of DeliveryAddressFormatId. */ + public static final String COLUMN_CAP_PROP_NAME_OF_DeliveryAddressFormatId = "DeliveryAddressFormatId"; + /** Cap-prop-name of BillingName. */ + public static final String COLUMN_CAP_PROP_NAME_OF_BillingName = "BillingName"; + /** Cap-prop-name of BillingCompany. */ + public static final String COLUMN_CAP_PROP_NAME_OF_BillingCompany = "BillingCompany"; + /** Cap-prop-name of BillingStreetAddress. */ + public static final String COLUMN_CAP_PROP_NAME_OF_BillingStreetAddress = "BillingStreetAddress"; + /** Cap-prop-name of BillingSuburb. */ + public static final String COLUMN_CAP_PROP_NAME_OF_BillingSuburb = "BillingSuburb"; + /** Cap-prop-name of BillingCity. */ + public static final String COLUMN_CAP_PROP_NAME_OF_BillingCity = "BillingCity"; + /** Cap-prop-name of BillingPostcode. */ + public static final String COLUMN_CAP_PROP_NAME_OF_BillingPostcode = "BillingPostcode"; + /** Cap-prop-name of BillingState. */ + public static final String COLUMN_CAP_PROP_NAME_OF_BillingState = "BillingState"; + /** Cap-prop-name of BillingCountry. */ + public static final String COLUMN_CAP_PROP_NAME_OF_BillingCountry = "BillingCountry"; + /** Cap-prop-name of BillingAddressFormatId. */ + public static final String COLUMN_CAP_PROP_NAME_OF_BillingAddressFormatId = "BillingAddressFormatId"; + /** Cap-prop-name of PaymentMethod. */ + public static final String COLUMN_CAP_PROP_NAME_OF_PaymentMethod = "PaymentMethod"; + /** Cap-prop-name of CcType. */ + public static final String COLUMN_CAP_PROP_NAME_OF_CcType = "CcType"; + /** Cap-prop-name of CcOwner. */ + public static final String COLUMN_CAP_PROP_NAME_OF_CcOwner = "CcOwner"; + /** Cap-prop-name of CcNumber. */ + public static final String COLUMN_CAP_PROP_NAME_OF_CcNumber = "CcNumber"; + /** Cap-prop-name of CcExpires. */ + public static final String COLUMN_CAP_PROP_NAME_OF_CcExpires = "CcExpires"; + /** Cap-prop-name of LastModified. */ + public static final String COLUMN_CAP_PROP_NAME_OF_LastModified = "LastModified"; + /** Cap-prop-name of DatePurchased. */ + public static final String COLUMN_CAP_PROP_NAME_OF_DatePurchased = "DatePurchased"; + /** Cap-prop-name of OrdersStatus. */ + public static final String COLUMN_CAP_PROP_NAME_OF_OrdersStatus = "OrdersStatus"; + /** Cap-prop-name of OrdersDateFinished. */ + public static final String COLUMN_CAP_PROP_NAME_OF_OrdersDateFinished = "OrdersDateFinished"; + /** Cap-prop-name of Currency. */ + public static final String COLUMN_CAP_PROP_NAME_OF_Currency = "Currency"; + /** Cap-prop-name of CurrencyValue. */ + public static final String COLUMN_CAP_PROP_NAME_OF_CurrencyValue = "CurrencyValue"; + + + + /** Uncap-prop-name of OrdersId. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_OrdersId = "ordersId"; + /** Uncap-prop-name of CustomersId. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_CustomersId = "customersId"; + /** Uncap-prop-name of CustomersName. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_CustomersName = "customersName"; + /** Uncap-prop-name of CustomersCompany. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_CustomersCompany = "customersCompany"; + /** Uncap-prop-name of CustomersStreetAddress. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_CustomersStreetAddress = "customersStreetAddress"; + /** Uncap-prop-name of CustomersSuburb. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_CustomersSuburb = "customersSuburb"; + /** Uncap-prop-name of CustomersCity. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_CustomersCity = "customersCity"; + /** Uncap-prop-name of CustomersPostcode. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_CustomersPostcode = "customersPostcode"; + /** Uncap-prop-name of CustomersState. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_CustomersState = "customersState"; + /** Uncap-prop-name of CustomersCountry. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_CustomersCountry = "customersCountry"; + /** Uncap-prop-name of CustomersTelephone. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_CustomersTelephone = "customersTelephone"; + /** Uncap-prop-name of CustomersEmailAddress. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_CustomersEmailAddress = "customersEmailAddress"; + /** Uncap-prop-name of CustomersAddressFormatId. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_CustomersAddressFormatId = "customersAddressFormatId"; + /** Uncap-prop-name of DeliveryName. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_DeliveryName = "deliveryName"; + /** Uncap-prop-name of DeliveryCompany. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_DeliveryCompany = "deliveryCompany"; + /** Uncap-prop-name of DeliveryStreetAddress. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_DeliveryStreetAddress = "deliveryStreetAddress"; + /** Uncap-prop-name of DeliverySuburb. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_DeliverySuburb = "deliverySuburb"; + /** Uncap-prop-name of DeliveryCity. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_DeliveryCity = "deliveryCity"; + /** Uncap-prop-name of DeliveryPostcode. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_DeliveryPostcode = "deliveryPostcode"; + /** Uncap-prop-name of DeliveryState. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_DeliveryState = "deliveryState"; + /** Uncap-prop-name of DeliveryCountry. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_DeliveryCountry = "deliveryCountry"; + /** Uncap-prop-name of DeliveryAddressFormatId. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_DeliveryAddressFormatId = "deliveryAddressFormatId"; + /** Uncap-prop-name of BillingName. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_BillingName = "billingName"; + /** Uncap-prop-name of BillingCompany. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_BillingCompany = "billingCompany"; + /** Uncap-prop-name of BillingStreetAddress. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_BillingStreetAddress = "billingStreetAddress"; + /** Uncap-prop-name of BillingSuburb. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_BillingSuburb = "billingSuburb"; + /** Uncap-prop-name of BillingCity. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_BillingCity = "billingCity"; + /** Uncap-prop-name of BillingPostcode. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_BillingPostcode = "billingPostcode"; + /** Uncap-prop-name of BillingState. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_BillingState = "billingState"; + /** Uncap-prop-name of BillingCountry. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_BillingCountry = "billingCountry"; + /** Uncap-prop-name of BillingAddressFormatId. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_BillingAddressFormatId = "billingAddressFormatId"; + /** Uncap-prop-name of PaymentMethod. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_PaymentMethod = "paymentMethod"; + /** Uncap-prop-name of CcType. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_CcType = "ccType"; + /** Uncap-prop-name of CcOwner. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_CcOwner = "ccOwner"; + /** Uncap-prop-name of CcNumber. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_CcNumber = "ccNumber"; + /** Uncap-prop-name of CcExpires. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_CcExpires = "ccExpires"; + /** Uncap-prop-name of LastModified. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_LastModified = "lastModified"; + /** Uncap-prop-name of DatePurchased. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_DatePurchased = "datePurchased"; + /** Uncap-prop-name of OrdersStatus. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_OrdersStatus = "ordersStatus"; + /** Uncap-prop-name of OrdersDateFinished. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_OrdersDateFinished = "ordersDateFinished"; + /** Uncap-prop-name of Currency. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_Currency = "currency"; + /** Uncap-prop-name of CurrencyValue. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_CurrencyValue = "currencyValue"; + + + + /** {db-name : cap-prop-name} map. */ + private static java.util.Map _dbNameCapPropNameMap; + protected static java.util.Map createDbNameCapPropNameMap() { + if (_dbNameCapPropNameMap != null) { + return _dbNameCapPropNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_DB_NAME, TABLE_CAP_PROP_NAME); + + map.put(COLUMN_DB_NAME_OF_OrdersId, COLUMN_CAP_PROP_NAME_OF_OrdersId); + map.put(COLUMN_DB_NAME_OF_CustomersId, COLUMN_CAP_PROP_NAME_OF_CustomersId); + map.put(COLUMN_DB_NAME_OF_CustomersName, COLUMN_CAP_PROP_NAME_OF_CustomersName); + map.put(COLUMN_DB_NAME_OF_CustomersCompany, COLUMN_CAP_PROP_NAME_OF_CustomersCompany); + map.put(COLUMN_DB_NAME_OF_CustomersStreetAddress, COLUMN_CAP_PROP_NAME_OF_CustomersStreetAddress); + map.put(COLUMN_DB_NAME_OF_CustomersSuburb, COLUMN_CAP_PROP_NAME_OF_CustomersSuburb); + map.put(COLUMN_DB_NAME_OF_CustomersCity, COLUMN_CAP_PROP_NAME_OF_CustomersCity); + map.put(COLUMN_DB_NAME_OF_CustomersPostcode, COLUMN_CAP_PROP_NAME_OF_CustomersPostcode); + map.put(COLUMN_DB_NAME_OF_CustomersState, COLUMN_CAP_PROP_NAME_OF_CustomersState); + map.put(COLUMN_DB_NAME_OF_CustomersCountry, COLUMN_CAP_PROP_NAME_OF_CustomersCountry); + map.put(COLUMN_DB_NAME_OF_CustomersTelephone, COLUMN_CAP_PROP_NAME_OF_CustomersTelephone); + map.put(COLUMN_DB_NAME_OF_CustomersEmailAddress, COLUMN_CAP_PROP_NAME_OF_CustomersEmailAddress); + map.put(COLUMN_DB_NAME_OF_CustomersAddressFormatId, COLUMN_CAP_PROP_NAME_OF_CustomersAddressFormatId); + map.put(COLUMN_DB_NAME_OF_DeliveryName, COLUMN_CAP_PROP_NAME_OF_DeliveryName); + map.put(COLUMN_DB_NAME_OF_DeliveryCompany, COLUMN_CAP_PROP_NAME_OF_DeliveryCompany); + map.put(COLUMN_DB_NAME_OF_DeliveryStreetAddress, COLUMN_CAP_PROP_NAME_OF_DeliveryStreetAddress); + map.put(COLUMN_DB_NAME_OF_DeliverySuburb, COLUMN_CAP_PROP_NAME_OF_DeliverySuburb); + map.put(COLUMN_DB_NAME_OF_DeliveryCity, COLUMN_CAP_PROP_NAME_OF_DeliveryCity); + map.put(COLUMN_DB_NAME_OF_DeliveryPostcode, COLUMN_CAP_PROP_NAME_OF_DeliveryPostcode); + map.put(COLUMN_DB_NAME_OF_DeliveryState, COLUMN_CAP_PROP_NAME_OF_DeliveryState); + map.put(COLUMN_DB_NAME_OF_DeliveryCountry, COLUMN_CAP_PROP_NAME_OF_DeliveryCountry); + map.put(COLUMN_DB_NAME_OF_DeliveryAddressFormatId, COLUMN_CAP_PROP_NAME_OF_DeliveryAddressFormatId); + map.put(COLUMN_DB_NAME_OF_BillingName, COLUMN_CAP_PROP_NAME_OF_BillingName); + map.put(COLUMN_DB_NAME_OF_BillingCompany, COLUMN_CAP_PROP_NAME_OF_BillingCompany); + map.put(COLUMN_DB_NAME_OF_BillingStreetAddress, COLUMN_CAP_PROP_NAME_OF_BillingStreetAddress); + map.put(COLUMN_DB_NAME_OF_BillingSuburb, COLUMN_CAP_PROP_NAME_OF_BillingSuburb); + map.put(COLUMN_DB_NAME_OF_BillingCity, COLUMN_CAP_PROP_NAME_OF_BillingCity); + map.put(COLUMN_DB_NAME_OF_BillingPostcode, COLUMN_CAP_PROP_NAME_OF_BillingPostcode); + map.put(COLUMN_DB_NAME_OF_BillingState, COLUMN_CAP_PROP_NAME_OF_BillingState); + map.put(COLUMN_DB_NAME_OF_BillingCountry, COLUMN_CAP_PROP_NAME_OF_BillingCountry); + map.put(COLUMN_DB_NAME_OF_BillingAddressFormatId, COLUMN_CAP_PROP_NAME_OF_BillingAddressFormatId); + map.put(COLUMN_DB_NAME_OF_PaymentMethod, COLUMN_CAP_PROP_NAME_OF_PaymentMethod); + map.put(COLUMN_DB_NAME_OF_CcType, COLUMN_CAP_PROP_NAME_OF_CcType); + map.put(COLUMN_DB_NAME_OF_CcOwner, COLUMN_CAP_PROP_NAME_OF_CcOwner); + map.put(COLUMN_DB_NAME_OF_CcNumber, COLUMN_CAP_PROP_NAME_OF_CcNumber); + map.put(COLUMN_DB_NAME_OF_CcExpires, COLUMN_CAP_PROP_NAME_OF_CcExpires); + map.put(COLUMN_DB_NAME_OF_LastModified, COLUMN_CAP_PROP_NAME_OF_LastModified); + map.put(COLUMN_DB_NAME_OF_DatePurchased, COLUMN_CAP_PROP_NAME_OF_DatePurchased); + map.put(COLUMN_DB_NAME_OF_OrdersStatus, COLUMN_CAP_PROP_NAME_OF_OrdersStatus); + map.put(COLUMN_DB_NAME_OF_OrdersDateFinished, COLUMN_CAP_PROP_NAME_OF_OrdersDateFinished); + map.put(COLUMN_DB_NAME_OF_Currency, COLUMN_CAP_PROP_NAME_OF_Currency); + map.put(COLUMN_DB_NAME_OF_CurrencyValue, COLUMN_CAP_PROP_NAME_OF_CurrencyValue); + + _dbNameCapPropNameMap = java.util.Collections.unmodifiableMap(map); + return _dbNameCapPropNameMap; + } + + /** {db-name : uncap-prop-name} map. */ + private static java.util.Map _dbNameUncapPropNameMap; + protected static java.util.Map createDbNameUncapPropNameMap() { + if (_dbNameUncapPropNameMap != null) { + return _dbNameUncapPropNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_DB_NAME, TABLE_UNCAP_PROP_NAME); + + map.put(COLUMN_DB_NAME_OF_OrdersId, COLUMN_UNCAP_PROP_NAME_OF_OrdersId); + map.put(COLUMN_DB_NAME_OF_CustomersId, COLUMN_UNCAP_PROP_NAME_OF_CustomersId); + map.put(COLUMN_DB_NAME_OF_CustomersName, COLUMN_UNCAP_PROP_NAME_OF_CustomersName); + map.put(COLUMN_DB_NAME_OF_CustomersCompany, COLUMN_UNCAP_PROP_NAME_OF_CustomersCompany); + map.put(COLUMN_DB_NAME_OF_CustomersStreetAddress, COLUMN_UNCAP_PROP_NAME_OF_CustomersStreetAddress); + map.put(COLUMN_DB_NAME_OF_CustomersSuburb, COLUMN_UNCAP_PROP_NAME_OF_CustomersSuburb); + map.put(COLUMN_DB_NAME_OF_CustomersCity, COLUMN_UNCAP_PROP_NAME_OF_CustomersCity); + map.put(COLUMN_DB_NAME_OF_CustomersPostcode, COLUMN_UNCAP_PROP_NAME_OF_CustomersPostcode); + map.put(COLUMN_DB_NAME_OF_CustomersState, COLUMN_UNCAP_PROP_NAME_OF_CustomersState); + map.put(COLUMN_DB_NAME_OF_CustomersCountry, COLUMN_UNCAP_PROP_NAME_OF_CustomersCountry); + map.put(COLUMN_DB_NAME_OF_CustomersTelephone, COLUMN_UNCAP_PROP_NAME_OF_CustomersTelephone); + map.put(COLUMN_DB_NAME_OF_CustomersEmailAddress, COLUMN_UNCAP_PROP_NAME_OF_CustomersEmailAddress); + map.put(COLUMN_DB_NAME_OF_CustomersAddressFormatId, COLUMN_UNCAP_PROP_NAME_OF_CustomersAddressFormatId); + map.put(COLUMN_DB_NAME_OF_DeliveryName, COLUMN_UNCAP_PROP_NAME_OF_DeliveryName); + map.put(COLUMN_DB_NAME_OF_DeliveryCompany, COLUMN_UNCAP_PROP_NAME_OF_DeliveryCompany); + map.put(COLUMN_DB_NAME_OF_DeliveryStreetAddress, COLUMN_UNCAP_PROP_NAME_OF_DeliveryStreetAddress); + map.put(COLUMN_DB_NAME_OF_DeliverySuburb, COLUMN_UNCAP_PROP_NAME_OF_DeliverySuburb); + map.put(COLUMN_DB_NAME_OF_DeliveryCity, COLUMN_UNCAP_PROP_NAME_OF_DeliveryCity); + map.put(COLUMN_DB_NAME_OF_DeliveryPostcode, COLUMN_UNCAP_PROP_NAME_OF_DeliveryPostcode); + map.put(COLUMN_DB_NAME_OF_DeliveryState, COLUMN_UNCAP_PROP_NAME_OF_DeliveryState); + map.put(COLUMN_DB_NAME_OF_DeliveryCountry, COLUMN_UNCAP_PROP_NAME_OF_DeliveryCountry); + map.put(COLUMN_DB_NAME_OF_DeliveryAddressFormatId, COLUMN_UNCAP_PROP_NAME_OF_DeliveryAddressFormatId); + map.put(COLUMN_DB_NAME_OF_BillingName, COLUMN_UNCAP_PROP_NAME_OF_BillingName); + map.put(COLUMN_DB_NAME_OF_BillingCompany, COLUMN_UNCAP_PROP_NAME_OF_BillingCompany); + map.put(COLUMN_DB_NAME_OF_BillingStreetAddress, COLUMN_UNCAP_PROP_NAME_OF_BillingStreetAddress); + map.put(COLUMN_DB_NAME_OF_BillingSuburb, COLUMN_UNCAP_PROP_NAME_OF_BillingSuburb); + map.put(COLUMN_DB_NAME_OF_BillingCity, COLUMN_UNCAP_PROP_NAME_OF_BillingCity); + map.put(COLUMN_DB_NAME_OF_BillingPostcode, COLUMN_UNCAP_PROP_NAME_OF_BillingPostcode); + map.put(COLUMN_DB_NAME_OF_BillingState, COLUMN_UNCAP_PROP_NAME_OF_BillingState); + map.put(COLUMN_DB_NAME_OF_BillingCountry, COLUMN_UNCAP_PROP_NAME_OF_BillingCountry); + map.put(COLUMN_DB_NAME_OF_BillingAddressFormatId, COLUMN_UNCAP_PROP_NAME_OF_BillingAddressFormatId); + map.put(COLUMN_DB_NAME_OF_PaymentMethod, COLUMN_UNCAP_PROP_NAME_OF_PaymentMethod); + map.put(COLUMN_DB_NAME_OF_CcType, COLUMN_UNCAP_PROP_NAME_OF_CcType); + map.put(COLUMN_DB_NAME_OF_CcOwner, COLUMN_UNCAP_PROP_NAME_OF_CcOwner); + map.put(COLUMN_DB_NAME_OF_CcNumber, COLUMN_UNCAP_PROP_NAME_OF_CcNumber); + map.put(COLUMN_DB_NAME_OF_CcExpires, COLUMN_UNCAP_PROP_NAME_OF_CcExpires); + map.put(COLUMN_DB_NAME_OF_LastModified, COLUMN_UNCAP_PROP_NAME_OF_LastModified); + map.put(COLUMN_DB_NAME_OF_DatePurchased, COLUMN_UNCAP_PROP_NAME_OF_DatePurchased); + map.put(COLUMN_DB_NAME_OF_OrdersStatus, COLUMN_UNCAP_PROP_NAME_OF_OrdersStatus); + map.put(COLUMN_DB_NAME_OF_OrdersDateFinished, COLUMN_UNCAP_PROP_NAME_OF_OrdersDateFinished); + map.put(COLUMN_DB_NAME_OF_Currency, COLUMN_UNCAP_PROP_NAME_OF_Currency); + map.put(COLUMN_DB_NAME_OF_CurrencyValue, COLUMN_UNCAP_PROP_NAME_OF_CurrencyValue); + + _dbNameUncapPropNameMap = java.util.Collections.unmodifiableMap(map); + return _dbNameUncapPropNameMap; + } + + /** {cap-prop-name : db-name} map. */ + private static java.util.Map _capPropNameDbNameMap; + protected static java.util.Map createCapPropNameDbNameMap() { + if (_capPropNameDbNameMap != null) { + return _capPropNameDbNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_CAP_PROP_NAME, TABLE_DB_NAME); + + map.put(COLUMN_CAP_PROP_NAME_OF_OrdersId, COLUMN_DB_NAME_OF_OrdersId); + map.put(COLUMN_CAP_PROP_NAME_OF_CustomersId, COLUMN_DB_NAME_OF_CustomersId); + map.put(COLUMN_CAP_PROP_NAME_OF_CustomersName, COLUMN_DB_NAME_OF_CustomersName); + map.put(COLUMN_CAP_PROP_NAME_OF_CustomersCompany, COLUMN_DB_NAME_OF_CustomersCompany); + map.put(COLUMN_CAP_PROP_NAME_OF_CustomersStreetAddress, COLUMN_DB_NAME_OF_CustomersStreetAddress); + map.put(COLUMN_CAP_PROP_NAME_OF_CustomersSuburb, COLUMN_DB_NAME_OF_CustomersSuburb); + map.put(COLUMN_CAP_PROP_NAME_OF_CustomersCity, COLUMN_DB_NAME_OF_CustomersCity); + map.put(COLUMN_CAP_PROP_NAME_OF_CustomersPostcode, COLUMN_DB_NAME_OF_CustomersPostcode); + map.put(COLUMN_CAP_PROP_NAME_OF_CustomersState, COLUMN_DB_NAME_OF_CustomersState); + map.put(COLUMN_CAP_PROP_NAME_OF_CustomersCountry, COLUMN_DB_NAME_OF_CustomersCountry); + map.put(COLUMN_CAP_PROP_NAME_OF_CustomersTelephone, COLUMN_DB_NAME_OF_CustomersTelephone); + map.put(COLUMN_CAP_PROP_NAME_OF_CustomersEmailAddress, COLUMN_DB_NAME_OF_CustomersEmailAddress); + map.put(COLUMN_CAP_PROP_NAME_OF_CustomersAddressFormatId, COLUMN_DB_NAME_OF_CustomersAddressFormatId); + map.put(COLUMN_CAP_PROP_NAME_OF_DeliveryName, COLUMN_DB_NAME_OF_DeliveryName); + map.put(COLUMN_CAP_PROP_NAME_OF_DeliveryCompany, COLUMN_DB_NAME_OF_DeliveryCompany); + map.put(COLUMN_CAP_PROP_NAME_OF_DeliveryStreetAddress, COLUMN_DB_NAME_OF_DeliveryStreetAddress); + map.put(COLUMN_CAP_PROP_NAME_OF_DeliverySuburb, COLUMN_DB_NAME_OF_DeliverySuburb); + map.put(COLUMN_CAP_PROP_NAME_OF_DeliveryCity, COLUMN_DB_NAME_OF_DeliveryCity); + map.put(COLUMN_CAP_PROP_NAME_OF_DeliveryPostcode, COLUMN_DB_NAME_OF_DeliveryPostcode); + map.put(COLUMN_CAP_PROP_NAME_OF_DeliveryState, COLUMN_DB_NAME_OF_DeliveryState); + map.put(COLUMN_CAP_PROP_NAME_OF_DeliveryCountry, COLUMN_DB_NAME_OF_DeliveryCountry); + map.put(COLUMN_CAP_PROP_NAME_OF_DeliveryAddressFormatId, COLUMN_DB_NAME_OF_DeliveryAddressFormatId); + map.put(COLUMN_CAP_PROP_NAME_OF_BillingName, COLUMN_DB_NAME_OF_BillingName); + map.put(COLUMN_CAP_PROP_NAME_OF_BillingCompany, COLUMN_DB_NAME_OF_BillingCompany); + map.put(COLUMN_CAP_PROP_NAME_OF_BillingStreetAddress, COLUMN_DB_NAME_OF_BillingStreetAddress); + map.put(COLUMN_CAP_PROP_NAME_OF_BillingSuburb, COLUMN_DB_NAME_OF_BillingSuburb); + map.put(COLUMN_CAP_PROP_NAME_OF_BillingCity, COLUMN_DB_NAME_OF_BillingCity); + map.put(COLUMN_CAP_PROP_NAME_OF_BillingPostcode, COLUMN_DB_NAME_OF_BillingPostcode); + map.put(COLUMN_CAP_PROP_NAME_OF_BillingState, COLUMN_DB_NAME_OF_BillingState); + map.put(COLUMN_CAP_PROP_NAME_OF_BillingCountry, COLUMN_DB_NAME_OF_BillingCountry); + map.put(COLUMN_CAP_PROP_NAME_OF_BillingAddressFormatId, COLUMN_DB_NAME_OF_BillingAddressFormatId); + map.put(COLUMN_CAP_PROP_NAME_OF_PaymentMethod, COLUMN_DB_NAME_OF_PaymentMethod); + map.put(COLUMN_CAP_PROP_NAME_OF_CcType, COLUMN_DB_NAME_OF_CcType); + map.put(COLUMN_CAP_PROP_NAME_OF_CcOwner, COLUMN_DB_NAME_OF_CcOwner); + map.put(COLUMN_CAP_PROP_NAME_OF_CcNumber, COLUMN_DB_NAME_OF_CcNumber); + map.put(COLUMN_CAP_PROP_NAME_OF_CcExpires, COLUMN_DB_NAME_OF_CcExpires); + map.put(COLUMN_CAP_PROP_NAME_OF_LastModified, COLUMN_DB_NAME_OF_LastModified); + map.put(COLUMN_CAP_PROP_NAME_OF_DatePurchased, COLUMN_DB_NAME_OF_DatePurchased); + map.put(COLUMN_CAP_PROP_NAME_OF_OrdersStatus, COLUMN_DB_NAME_OF_OrdersStatus); + map.put(COLUMN_CAP_PROP_NAME_OF_OrdersDateFinished, COLUMN_DB_NAME_OF_OrdersDateFinished); + map.put(COLUMN_CAP_PROP_NAME_OF_Currency, COLUMN_DB_NAME_OF_Currency); + map.put(COLUMN_CAP_PROP_NAME_OF_CurrencyValue, COLUMN_DB_NAME_OF_CurrencyValue); + + _capPropNameDbNameMap = java.util.Collections.unmodifiableMap(map); + return _capPropNameDbNameMap; + } + + /** {cap-prop-name : uncap-prop-name} map. */ + private static java.util.Map _capPropNameUncapPropNameMap; + protected static java.util.Map createCapPropNameUncapPropNameMap() { + if (_capPropNameUncapPropNameMap != null) { + return _capPropNameUncapPropNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_CAP_PROP_NAME, TABLE_UNCAP_PROP_NAME); + + map.put(COLUMN_CAP_PROP_NAME_OF_OrdersId, COLUMN_UNCAP_PROP_NAME_OF_OrdersId); + map.put(COLUMN_CAP_PROP_NAME_OF_CustomersId, COLUMN_UNCAP_PROP_NAME_OF_CustomersId); + map.put(COLUMN_CAP_PROP_NAME_OF_CustomersName, COLUMN_UNCAP_PROP_NAME_OF_CustomersName); + map.put(COLUMN_CAP_PROP_NAME_OF_CustomersCompany, COLUMN_UNCAP_PROP_NAME_OF_CustomersCompany); + map.put(COLUMN_CAP_PROP_NAME_OF_CustomersStreetAddress, COLUMN_UNCAP_PROP_NAME_OF_CustomersStreetAddress); + map.put(COLUMN_CAP_PROP_NAME_OF_CustomersSuburb, COLUMN_UNCAP_PROP_NAME_OF_CustomersSuburb); + map.put(COLUMN_CAP_PROP_NAME_OF_CustomersCity, COLUMN_UNCAP_PROP_NAME_OF_CustomersCity); + map.put(COLUMN_CAP_PROP_NAME_OF_CustomersPostcode, COLUMN_UNCAP_PROP_NAME_OF_CustomersPostcode); + map.put(COLUMN_CAP_PROP_NAME_OF_CustomersState, COLUMN_UNCAP_PROP_NAME_OF_CustomersState); + map.put(COLUMN_CAP_PROP_NAME_OF_CustomersCountry, COLUMN_UNCAP_PROP_NAME_OF_CustomersCountry); + map.put(COLUMN_CAP_PROP_NAME_OF_CustomersTelephone, COLUMN_UNCAP_PROP_NAME_OF_CustomersTelephone); + map.put(COLUMN_CAP_PROP_NAME_OF_CustomersEmailAddress, COLUMN_UNCAP_PROP_NAME_OF_CustomersEmailAddress); + map.put(COLUMN_CAP_PROP_NAME_OF_CustomersAddressFormatId, COLUMN_UNCAP_PROP_NAME_OF_CustomersAddressFormatId); + map.put(COLUMN_CAP_PROP_NAME_OF_DeliveryName, COLUMN_UNCAP_PROP_NAME_OF_DeliveryName); + map.put(COLUMN_CAP_PROP_NAME_OF_DeliveryCompany, COLUMN_UNCAP_PROP_NAME_OF_DeliveryCompany); + map.put(COLUMN_CAP_PROP_NAME_OF_DeliveryStreetAddress, COLUMN_UNCAP_PROP_NAME_OF_DeliveryStreetAddress); + map.put(COLUMN_CAP_PROP_NAME_OF_DeliverySuburb, COLUMN_UNCAP_PROP_NAME_OF_DeliverySuburb); + map.put(COLUMN_CAP_PROP_NAME_OF_DeliveryCity, COLUMN_UNCAP_PROP_NAME_OF_DeliveryCity); + map.put(COLUMN_CAP_PROP_NAME_OF_DeliveryPostcode, COLUMN_UNCAP_PROP_NAME_OF_DeliveryPostcode); + map.put(COLUMN_CAP_PROP_NAME_OF_DeliveryState, COLUMN_UNCAP_PROP_NAME_OF_DeliveryState); + map.put(COLUMN_CAP_PROP_NAME_OF_DeliveryCountry, COLUMN_UNCAP_PROP_NAME_OF_DeliveryCountry); + map.put(COLUMN_CAP_PROP_NAME_OF_DeliveryAddressFormatId, COLUMN_UNCAP_PROP_NAME_OF_DeliveryAddressFormatId); + map.put(COLUMN_CAP_PROP_NAME_OF_BillingName, COLUMN_UNCAP_PROP_NAME_OF_BillingName); + map.put(COLUMN_CAP_PROP_NAME_OF_BillingCompany, COLUMN_UNCAP_PROP_NAME_OF_BillingCompany); + map.put(COLUMN_CAP_PROP_NAME_OF_BillingStreetAddress, COLUMN_UNCAP_PROP_NAME_OF_BillingStreetAddress); + map.put(COLUMN_CAP_PROP_NAME_OF_BillingSuburb, COLUMN_UNCAP_PROP_NAME_OF_BillingSuburb); + map.put(COLUMN_CAP_PROP_NAME_OF_BillingCity, COLUMN_UNCAP_PROP_NAME_OF_BillingCity); + map.put(COLUMN_CAP_PROP_NAME_OF_BillingPostcode, COLUMN_UNCAP_PROP_NAME_OF_BillingPostcode); + map.put(COLUMN_CAP_PROP_NAME_OF_BillingState, COLUMN_UNCAP_PROP_NAME_OF_BillingState); + map.put(COLUMN_CAP_PROP_NAME_OF_BillingCountry, COLUMN_UNCAP_PROP_NAME_OF_BillingCountry); + map.put(COLUMN_CAP_PROP_NAME_OF_BillingAddressFormatId, COLUMN_UNCAP_PROP_NAME_OF_BillingAddressFormatId); + map.put(COLUMN_CAP_PROP_NAME_OF_PaymentMethod, COLUMN_UNCAP_PROP_NAME_OF_PaymentMethod); + map.put(COLUMN_CAP_PROP_NAME_OF_CcType, COLUMN_UNCAP_PROP_NAME_OF_CcType); + map.put(COLUMN_CAP_PROP_NAME_OF_CcOwner, COLUMN_UNCAP_PROP_NAME_OF_CcOwner); + map.put(COLUMN_CAP_PROP_NAME_OF_CcNumber, COLUMN_UNCAP_PROP_NAME_OF_CcNumber); + map.put(COLUMN_CAP_PROP_NAME_OF_CcExpires, COLUMN_UNCAP_PROP_NAME_OF_CcExpires); + map.put(COLUMN_CAP_PROP_NAME_OF_LastModified, COLUMN_UNCAP_PROP_NAME_OF_LastModified); + map.put(COLUMN_CAP_PROP_NAME_OF_DatePurchased, COLUMN_UNCAP_PROP_NAME_OF_DatePurchased); + map.put(COLUMN_CAP_PROP_NAME_OF_OrdersStatus, COLUMN_UNCAP_PROP_NAME_OF_OrdersStatus); + map.put(COLUMN_CAP_PROP_NAME_OF_OrdersDateFinished, COLUMN_UNCAP_PROP_NAME_OF_OrdersDateFinished); + map.put(COLUMN_CAP_PROP_NAME_OF_Currency, COLUMN_UNCAP_PROP_NAME_OF_Currency); + map.put(COLUMN_CAP_PROP_NAME_OF_CurrencyValue, COLUMN_UNCAP_PROP_NAME_OF_CurrencyValue); + + _capPropNameUncapPropNameMap = java.util.Collections.unmodifiableMap(map); + return _capPropNameUncapPropNameMap; + } + + /** {uncap-prop-name : db-name} map. */ + private static java.util.Map _uncapPropNameDbNameMap; + protected static java.util.Map createUncapPropNameDbNameMap() { + if (_uncapPropNameDbNameMap != null) { + return _uncapPropNameDbNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_UNCAP_PROP_NAME, TABLE_DB_NAME); + + map.put(COLUMN_UNCAP_PROP_NAME_OF_OrdersId, COLUMN_DB_NAME_OF_OrdersId); + map.put(COLUMN_UNCAP_PROP_NAME_OF_CustomersId, COLUMN_DB_NAME_OF_CustomersId); + map.put(COLUMN_UNCAP_PROP_NAME_OF_CustomersName, COLUMN_DB_NAME_OF_CustomersName); + map.put(COLUMN_UNCAP_PROP_NAME_OF_CustomersCompany, COLUMN_DB_NAME_OF_CustomersCompany); + map.put(COLUMN_UNCAP_PROP_NAME_OF_CustomersStreetAddress, COLUMN_DB_NAME_OF_CustomersStreetAddress); + map.put(COLUMN_UNCAP_PROP_NAME_OF_CustomersSuburb, COLUMN_DB_NAME_OF_CustomersSuburb); + map.put(COLUMN_UNCAP_PROP_NAME_OF_CustomersCity, COLUMN_DB_NAME_OF_CustomersCity); + map.put(COLUMN_UNCAP_PROP_NAME_OF_CustomersPostcode, COLUMN_DB_NAME_OF_CustomersPostcode); + map.put(COLUMN_UNCAP_PROP_NAME_OF_CustomersState, COLUMN_DB_NAME_OF_CustomersState); + map.put(COLUMN_UNCAP_PROP_NAME_OF_CustomersCountry, COLUMN_DB_NAME_OF_CustomersCountry); + map.put(COLUMN_UNCAP_PROP_NAME_OF_CustomersTelephone, COLUMN_DB_NAME_OF_CustomersTelephone); + map.put(COLUMN_UNCAP_PROP_NAME_OF_CustomersEmailAddress, COLUMN_DB_NAME_OF_CustomersEmailAddress); + map.put(COLUMN_UNCAP_PROP_NAME_OF_CustomersAddressFormatId, COLUMN_DB_NAME_OF_CustomersAddressFormatId); + map.put(COLUMN_UNCAP_PROP_NAME_OF_DeliveryName, COLUMN_DB_NAME_OF_DeliveryName); + map.put(COLUMN_UNCAP_PROP_NAME_OF_DeliveryCompany, COLUMN_DB_NAME_OF_DeliveryCompany); + map.put(COLUMN_UNCAP_PROP_NAME_OF_DeliveryStreetAddress, COLUMN_DB_NAME_OF_DeliveryStreetAddress); + map.put(COLUMN_UNCAP_PROP_NAME_OF_DeliverySuburb, COLUMN_DB_NAME_OF_DeliverySuburb); + map.put(COLUMN_UNCAP_PROP_NAME_OF_DeliveryCity, COLUMN_DB_NAME_OF_DeliveryCity); + map.put(COLUMN_UNCAP_PROP_NAME_OF_DeliveryPostcode, COLUMN_DB_NAME_OF_DeliveryPostcode); + map.put(COLUMN_UNCAP_PROP_NAME_OF_DeliveryState, COLUMN_DB_NAME_OF_DeliveryState); + map.put(COLUMN_UNCAP_PROP_NAME_OF_DeliveryCountry, COLUMN_DB_NAME_OF_DeliveryCountry); + map.put(COLUMN_UNCAP_PROP_NAME_OF_DeliveryAddressFormatId, COLUMN_DB_NAME_OF_DeliveryAddressFormatId); + map.put(COLUMN_UNCAP_PROP_NAME_OF_BillingName, COLUMN_DB_NAME_OF_BillingName); + map.put(COLUMN_UNCAP_PROP_NAME_OF_BillingCompany, COLUMN_DB_NAME_OF_BillingCompany); + map.put(COLUMN_UNCAP_PROP_NAME_OF_BillingStreetAddress, COLUMN_DB_NAME_OF_BillingStreetAddress); + map.put(COLUMN_UNCAP_PROP_NAME_OF_BillingSuburb, COLUMN_DB_NAME_OF_BillingSuburb); + map.put(COLUMN_UNCAP_PROP_NAME_OF_BillingCity, COLUMN_DB_NAME_OF_BillingCity); + map.put(COLUMN_UNCAP_PROP_NAME_OF_BillingPostcode, COLUMN_DB_NAME_OF_BillingPostcode); + map.put(COLUMN_UNCAP_PROP_NAME_OF_BillingState, COLUMN_DB_NAME_OF_BillingState); + map.put(COLUMN_UNCAP_PROP_NAME_OF_BillingCountry, COLUMN_DB_NAME_OF_BillingCountry); + map.put(COLUMN_UNCAP_PROP_NAME_OF_BillingAddressFormatId, COLUMN_DB_NAME_OF_BillingAddressFormatId); + map.put(COLUMN_UNCAP_PROP_NAME_OF_PaymentMethod, COLUMN_DB_NAME_OF_PaymentMethod); + map.put(COLUMN_UNCAP_PROP_NAME_OF_CcType, COLUMN_DB_NAME_OF_CcType); + map.put(COLUMN_UNCAP_PROP_NAME_OF_CcOwner, COLUMN_DB_NAME_OF_CcOwner); + map.put(COLUMN_UNCAP_PROP_NAME_OF_CcNumber, COLUMN_DB_NAME_OF_CcNumber); + map.put(COLUMN_UNCAP_PROP_NAME_OF_CcExpires, COLUMN_DB_NAME_OF_CcExpires); + map.put(COLUMN_UNCAP_PROP_NAME_OF_LastModified, COLUMN_DB_NAME_OF_LastModified); + map.put(COLUMN_UNCAP_PROP_NAME_OF_DatePurchased, COLUMN_DB_NAME_OF_DatePurchased); + map.put(COLUMN_UNCAP_PROP_NAME_OF_OrdersStatus, COLUMN_DB_NAME_OF_OrdersStatus); + map.put(COLUMN_UNCAP_PROP_NAME_OF_OrdersDateFinished, COLUMN_DB_NAME_OF_OrdersDateFinished); + map.put(COLUMN_UNCAP_PROP_NAME_OF_Currency, COLUMN_DB_NAME_OF_Currency); + map.put(COLUMN_UNCAP_PROP_NAME_OF_CurrencyValue, COLUMN_DB_NAME_OF_CurrencyValue); + + _uncapPropNameDbNameMap = java.util.Collections.unmodifiableMap(map); + return _uncapPropNameDbNameMap; + } + + /** {uncap-prop-name : cap-prop-name} map. */ + private static java.util.Map _uncapPropNameCapPropNameMap; + protected static java.util.Map createUncapPropNameCapPropNameMap() { + if (_uncapPropNameCapPropNameMap != null) { + return _uncapPropNameCapPropNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_UNCAP_PROP_NAME, TABLE_CAP_PROP_NAME); + + map.put(COLUMN_UNCAP_PROP_NAME_OF_OrdersId, COLUMN_CAP_PROP_NAME_OF_OrdersId); + map.put(COLUMN_UNCAP_PROP_NAME_OF_CustomersId, COLUMN_CAP_PROP_NAME_OF_CustomersId); + map.put(COLUMN_UNCAP_PROP_NAME_OF_CustomersName, COLUMN_CAP_PROP_NAME_OF_CustomersName); + map.put(COLUMN_UNCAP_PROP_NAME_OF_CustomersCompany, COLUMN_CAP_PROP_NAME_OF_CustomersCompany); + map.put(COLUMN_UNCAP_PROP_NAME_OF_CustomersStreetAddress, COLUMN_CAP_PROP_NAME_OF_CustomersStreetAddress); + map.put(COLUMN_UNCAP_PROP_NAME_OF_CustomersSuburb, COLUMN_CAP_PROP_NAME_OF_CustomersSuburb); + map.put(COLUMN_UNCAP_PROP_NAME_OF_CustomersCity, COLUMN_CAP_PROP_NAME_OF_CustomersCity); + map.put(COLUMN_UNCAP_PROP_NAME_OF_CustomersPostcode, COLUMN_CAP_PROP_NAME_OF_CustomersPostcode); + map.put(COLUMN_UNCAP_PROP_NAME_OF_CustomersState, COLUMN_CAP_PROP_NAME_OF_CustomersState); + map.put(COLUMN_UNCAP_PROP_NAME_OF_CustomersCountry, COLUMN_CAP_PROP_NAME_OF_CustomersCountry); + map.put(COLUMN_UNCAP_PROP_NAME_OF_CustomersTelephone, COLUMN_CAP_PROP_NAME_OF_CustomersTelephone); + map.put(COLUMN_UNCAP_PROP_NAME_OF_CustomersEmailAddress, COLUMN_CAP_PROP_NAME_OF_CustomersEmailAddress); + map.put(COLUMN_UNCAP_PROP_NAME_OF_CustomersAddressFormatId, COLUMN_CAP_PROP_NAME_OF_CustomersAddressFormatId); + map.put(COLUMN_UNCAP_PROP_NAME_OF_DeliveryName, COLUMN_CAP_PROP_NAME_OF_DeliveryName); + map.put(COLUMN_UNCAP_PROP_NAME_OF_DeliveryCompany, COLUMN_CAP_PROP_NAME_OF_DeliveryCompany); + map.put(COLUMN_UNCAP_PROP_NAME_OF_DeliveryStreetAddress, COLUMN_CAP_PROP_NAME_OF_DeliveryStreetAddress); + map.put(COLUMN_UNCAP_PROP_NAME_OF_DeliverySuburb, COLUMN_CAP_PROP_NAME_OF_DeliverySuburb); + map.put(COLUMN_UNCAP_PROP_NAME_OF_DeliveryCity, COLUMN_CAP_PROP_NAME_OF_DeliveryCity); + map.put(COLUMN_UNCAP_PROP_NAME_OF_DeliveryPostcode, COLUMN_CAP_PROP_NAME_OF_DeliveryPostcode); + map.put(COLUMN_UNCAP_PROP_NAME_OF_DeliveryState, COLUMN_CAP_PROP_NAME_OF_DeliveryState); + map.put(COLUMN_UNCAP_PROP_NAME_OF_DeliveryCountry, COLUMN_CAP_PROP_NAME_OF_DeliveryCountry); + map.put(COLUMN_UNCAP_PROP_NAME_OF_DeliveryAddressFormatId, COLUMN_CAP_PROP_NAME_OF_DeliveryAddressFormatId); + map.put(COLUMN_UNCAP_PROP_NAME_OF_BillingName, COLUMN_CAP_PROP_NAME_OF_BillingName); + map.put(COLUMN_UNCAP_PROP_NAME_OF_BillingCompany, COLUMN_CAP_PROP_NAME_OF_BillingCompany); + map.put(COLUMN_UNCAP_PROP_NAME_OF_BillingStreetAddress, COLUMN_CAP_PROP_NAME_OF_BillingStreetAddress); + map.put(COLUMN_UNCAP_PROP_NAME_OF_BillingSuburb, COLUMN_CAP_PROP_NAME_OF_BillingSuburb); + map.put(COLUMN_UNCAP_PROP_NAME_OF_BillingCity, COLUMN_CAP_PROP_NAME_OF_BillingCity); + map.put(COLUMN_UNCAP_PROP_NAME_OF_BillingPostcode, COLUMN_CAP_PROP_NAME_OF_BillingPostcode); + map.put(COLUMN_UNCAP_PROP_NAME_OF_BillingState, COLUMN_CAP_PROP_NAME_OF_BillingState); + map.put(COLUMN_UNCAP_PROP_NAME_OF_BillingCountry, COLUMN_CAP_PROP_NAME_OF_BillingCountry); + map.put(COLUMN_UNCAP_PROP_NAME_OF_BillingAddressFormatId, COLUMN_CAP_PROP_NAME_OF_BillingAddressFormatId); + map.put(COLUMN_UNCAP_PROP_NAME_OF_PaymentMethod, COLUMN_CAP_PROP_NAME_OF_PaymentMethod); + map.put(COLUMN_UNCAP_PROP_NAME_OF_CcType, COLUMN_CAP_PROP_NAME_OF_CcType); + map.put(COLUMN_UNCAP_PROP_NAME_OF_CcOwner, COLUMN_CAP_PROP_NAME_OF_CcOwner); + map.put(COLUMN_UNCAP_PROP_NAME_OF_CcNumber, COLUMN_CAP_PROP_NAME_OF_CcNumber); + map.put(COLUMN_UNCAP_PROP_NAME_OF_CcExpires, COLUMN_CAP_PROP_NAME_OF_CcExpires); + map.put(COLUMN_UNCAP_PROP_NAME_OF_LastModified, COLUMN_CAP_PROP_NAME_OF_LastModified); + map.put(COLUMN_UNCAP_PROP_NAME_OF_DatePurchased, COLUMN_CAP_PROP_NAME_OF_DatePurchased); + map.put(COLUMN_UNCAP_PROP_NAME_OF_OrdersStatus, COLUMN_CAP_PROP_NAME_OF_OrdersStatus); + map.put(COLUMN_UNCAP_PROP_NAME_OF_OrdersDateFinished, COLUMN_CAP_PROP_NAME_OF_OrdersDateFinished); + map.put(COLUMN_UNCAP_PROP_NAME_OF_Currency, COLUMN_CAP_PROP_NAME_OF_Currency); + map.put(COLUMN_UNCAP_PROP_NAME_OF_CurrencyValue, COLUMN_CAP_PROP_NAME_OF_CurrencyValue); + + _uncapPropNameCapPropNameMap = java.util.Collections.unmodifiableMap(map); + return _uncapPropNameCapPropNameMap; + } + + // =================================================================================== + // Name-Map + // ======== + /** + * This method implements the method that is declared at super. + * + * @return {db-name : cap-prop-name} map. + */ + public java.util.Map getDbNameCapPropNameMap() { + return createDbNameCapPropNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {db-name : uncap-prop-name} map. + */ + public java.util.Map getDbNameUncapPropNameMap() { + return createDbNameUncapPropNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {cap-prop-name : db-name} map. + */ + public java.util.Map getCapPropNameDbNameMap() { + return createCapPropNameDbNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {cap-prop-name : uncap-prop-name} map. + */ + public java.util.Map getCapPropNameUncapPropNameMap() { + return createCapPropNameUncapPropNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {uncap-prop-name : db-name} map. + */ + public java.util.Map getUncapPropNameDbNameMap() { + return createUncapPropNameDbNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {uncap-prop-name : cap-prop-name} map. + */ + public java.util.Map getUncapPropNameCapPropNameMap() { + return createUncapPropNameCapPropNameMap(); + } + + // =================================================================================== + // Table Name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + public String getTableDbName() { + return TABLE_DB_NAME; + } + + /** + * This method implements the method that is declared at super. + * + * @return Table cap-prop-name. (NotNull) + */ + public String getTableCapPropName() { + return TABLE_CAP_PROP_NAME; + } + + /** + * This method implements the method that is declared at super. + * + * @return Table property-name. (NotNull) + */ + public String getTableUncapPropName() { + return TABLE_UNCAP_PROP_NAME; + } + + // =================================================================================== + // Column Name + // =========== + public java.util.List getColumnDbNameList() { + final String[] columns = getColumnDbNameCommaString().split(","); + final java.util.List resultList = new java.util.ArrayList(); + for (int i=0; i < columns.length; i++) { + resultList.add(columns[i].trim()); + } + return resultList; + } + + public java.util.List getColumnCapPropNameList() { + final java.util.List columnDbNameList = getColumnDbNameList(); + final java.util.List resultList = new java.util.ArrayList(); + for (final java.util.Iterator ite = columnDbNameList.iterator(); ite.hasNext(); ) { + resultList.add(getDbNameCapPropNameMap().get((String)ite.next())); + } + return resultList; + } + + public java.util.List getColumnUncapPropNameList() { + final java.util.List columnDbNameList = getColumnDbNameList(); + final java.util.List resultList = new java.util.ArrayList(); + for (final java.util.Iterator ite = columnDbNameList.iterator(); ite.hasNext(); ) { + resultList.add(getDbNameUncapPropNameMap().get((String)ite.next())); + } + return resultList; + } + + /** + * This method implements the method that is declared at super. + * + * @return Column-db-name comma-string. (NotNull) + */ + public String getColumnDbNameCommaString() { + return "ORDERS_ID, CUSTOMERS_ID, CUSTOMERS_NAME, CUSTOMERS_COMPANY, CUSTOMERS_STREET_ADDRESS, CUSTOMERS_SUBURB, CUSTOMERS_CITY, CUSTOMERS_POSTCODE, CUSTOMERS_STATE, CUSTOMERS_COUNTRY, CUSTOMERS_TELEPHONE, CUSTOMERS_EMAIL_ADDRESS, CUSTOMERS_ADDRESS_FORMAT_ID, DELIVERY_NAME, DELIVERY_COMPANY, DELIVERY_STREET_ADDRESS, DELIVERY_SUBURB, DELIVERY_CITY, DELIVERY_POSTCODE, DELIVERY_STATE, DELIVERY_COUNTRY, DELIVERY_ADDRESS_FORMAT_ID, BILLING_NAME, BILLING_COMPANY, BILLING_STREET_ADDRESS, BILLING_SUBURB, BILLING_CITY, BILLING_POSTCODE, BILLING_STATE, BILLING_COUNTRY, BILLING_ADDRESS_FORMAT_ID, PAYMENT_METHOD, CC_TYPE, CC_OWNER, CC_NUMBER, CC_EXPIRES, LAST_MODIFIED, DATE_PURCHASED, ORDERS_STATUS, ORDERS_DATE_FINISHED, CURRENCY, CURRENCY_VALUE"; + } + + // =================================================================================== + // Type Name + // ========= + /** + * This method implements the method that is declared at super. + * + * @return The type-name of entity. (NotNull) + */ + public String getEntityTypeName() { + return "jp.sf.pal.pompei.exentity.Orders"; + } + + /** + * This method implements the method that is declared at super. + * + * @return The type-name of condition-bean. (NotNull) + */ + public String getConditionBeanTypeName() { + return "jp.sf.pal.pompei.cbean.bs.OrdersCB"; + } + + /** + * This method implements the method that is declared at super. + * + * @return The type-name of dao. (NotNull) + */ + public String getDaoTypeName() { + return "jp.sf.pal.pompei.exdao.OrdersDao"; + } + + /** + * This method implements the method that is declared at super. + * + * @return The type-name of behavior. (NotNull) + */ + public String getBehaviorTypeName() { + return "jp.sf.pal.pompei.exbhv.OrdersBhv"; + } + + // =================================================================================== + // Type + // ==== + /** + * This method implements the method that is declared at super. + * + * @return The type of entity. (NotNull) + */ + public Class getEntityType() { + return ENTITY_TYPE; + } + + // =================================================================================== + // Instance + // ======== + /** + * This method implements the method that is declared at super. + * + * @return The type of entity. (NotNull) + */ + public Entity newEntity() { + return newMyEntity(); + } + + /** + * New the instance of my entity. + * + * @return The instance of my entity. (NotNull) + */ + public Orders newMyEntity() { + return new Orders(); + } + + // =================================================================================== + // Foreign DBMeta + // ============== + /** + * This method implements the method that is declared at super. + * + * @param foreignPropertyName Foreign-property-name(Both OK - InitCap or not). (NotNull) + * @return Foreign DBMeta. (NotNull) + */ + public DBMeta getForeignDBMeta(String foreignPropertyName) { + assertStringNotNullAndNotTrimmedEmpty("foreignPropertyName", foreignPropertyName); + final String methodName = "getForeignDBMeta_" + foreignPropertyName.substring(0, 1) + foreignPropertyName.substring(1); + + java.lang.reflect.Method method = null; + try { + method = this.getClass().getMethod(methodName, new Class[]{}); + } catch (NoSuchMethodException e) { + String msg = "The foreignPropertyName is not found: foreignPropertyName=" + foreignPropertyName; + msg = msg + " tableName=" + TABLE_DB_NAME + " methodName=" + methodName; + throw new RuntimeException(msg, e); + } + try { + return (DBMeta)method.invoke(this, new Object[]{}); + } catch (IllegalAccessException e) { + throw new RuntimeException(e); + } catch (java.lang.reflect.InvocationTargetException e) { + throw new RuntimeException(e.getCause()); + } + } + + // =================================================================================== + // Determination + // ============= + /** + * This method implements the method that is declared at super. + * + * @return Determination. + */ + public boolean hasTwoOrMorePrimaryKeys() { + return false; + } + + /** + * This method implements the method that is declared at super. + * + * @return Determination. + */ + public boolean hasCommonColumn() { + return false; + } + + // =================================================================================== + // Entity Handling + // =============== + // ----------------------------------------------------- + // Accept + // ------ + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @param primaryKeyMap Primary key map. (NotNull and NotEmpty) + */ + public void acceptPrimaryKeyMap(Entity entity, java.util.Map primaryKeyMap) { + final Orders myEntity = (Orders)entity; + MapAssertUtil.assertPrimaryKeyMapNotNullAndNotEmpty(primaryKeyMap); + final MapStringValueAnalyzer analyzer = new MapStringValueAnalyzer(primaryKeyMap, entity.getModifiedPropertyNames()); + + MapAssertUtil.assertColumnExistingInPrimaryKeyMap(primaryKeyMap, "ORDERS_ID"); + if (analyzer.init("ORDERS_ID", "ordersId", "ordersId")) { myEntity.setOrdersId(analyzer.analyzeNumber(java.math.BigDecimal.class)); }; + + + } + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @param primaryKeyMapString Primary-key map-string. (NotNull and NotEmpty) + */ + public void acceptPrimaryKeyMapString(Entity entity, String primaryKeyMapString) { + MapStringUtil.acceptPrimaryKeyMapString(primaryKeyMapString, entity); + } + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @param columnValueMap Column-value map. (NotNull and NotEmpty) + */ + public void acceptColumnValueMap(Entity entity, java.util.Map columnValueMap) { + final Orders myEntity = (Orders)entity; + MapAssertUtil.assertColumnValueMapNotNullAndNotEmpty(columnValueMap); + final MapStringValueAnalyzer analyzer = new MapStringValueAnalyzer(columnValueMap, entity.getModifiedPropertyNames()); + + if (analyzer.init("ORDERS_ID", "ordersId", "ordersId")) { myEntity.setOrdersId(analyzer.analyzeNumber(java.math.BigDecimal.class)); }; + if (analyzer.init("CUSTOMERS_ID", "customersId", "customersId")) { myEntity.setCustomersId(analyzer.analyzeNumber(java.math.BigDecimal.class)); }; + if (analyzer.init("CUSTOMERS_NAME", "customersName", "customersName")) { myEntity.setCustomersName(analyzer.analyzeString(String.class)); }; + if (analyzer.init("CUSTOMERS_COMPANY", "customersCompany", "customersCompany")) { myEntity.setCustomersCompany(analyzer.analyzeString(String.class)); }; + if (analyzer.init("CUSTOMERS_STREET_ADDRESS", "customersStreetAddress", "customersStreetAddress")) { myEntity.setCustomersStreetAddress(analyzer.analyzeString(String.class)); }; + if (analyzer.init("CUSTOMERS_SUBURB", "customersSuburb", "customersSuburb")) { myEntity.setCustomersSuburb(analyzer.analyzeString(String.class)); }; + if (analyzer.init("CUSTOMERS_CITY", "customersCity", "customersCity")) { myEntity.setCustomersCity(analyzer.analyzeString(String.class)); }; + if (analyzer.init("CUSTOMERS_POSTCODE", "customersPostcode", "customersPostcode")) { myEntity.setCustomersPostcode(analyzer.analyzeString(String.class)); }; + if (analyzer.init("CUSTOMERS_STATE", "customersState", "customersState")) { myEntity.setCustomersState(analyzer.analyzeString(String.class)); }; + if (analyzer.init("CUSTOMERS_COUNTRY", "customersCountry", "customersCountry")) { myEntity.setCustomersCountry(analyzer.analyzeString(String.class)); }; + if (analyzer.init("CUSTOMERS_TELEPHONE", "customersTelephone", "customersTelephone")) { myEntity.setCustomersTelephone(analyzer.analyzeString(String.class)); }; + if (analyzer.init("CUSTOMERS_EMAIL_ADDRESS", "customersEmailAddress", "customersEmailAddress")) { myEntity.setCustomersEmailAddress(analyzer.analyzeString(String.class)); }; + if (analyzer.init("CUSTOMERS_ADDRESS_FORMAT_ID", "customersAddressFormatId", "customersAddressFormatId")) { myEntity.setCustomersAddressFormatId(analyzer.analyzeNumber(java.math.BigDecimal.class)); }; + if (analyzer.init("DELIVERY_NAME", "deliveryName", "deliveryName")) { myEntity.setDeliveryName(analyzer.analyzeString(String.class)); }; + if (analyzer.init("DELIVERY_COMPANY", "deliveryCompany", "deliveryCompany")) { myEntity.setDeliveryCompany(analyzer.analyzeString(String.class)); }; + if (analyzer.init("DELIVERY_STREET_ADDRESS", "deliveryStreetAddress", "deliveryStreetAddress")) { myEntity.setDeliveryStreetAddress(analyzer.analyzeString(String.class)); }; + if (analyzer.init("DELIVERY_SUBURB", "deliverySuburb", "deliverySuburb")) { myEntity.setDeliverySuburb(analyzer.analyzeString(String.class)); }; + if (analyzer.init("DELIVERY_CITY", "deliveryCity", "deliveryCity")) { myEntity.setDeliveryCity(analyzer.analyzeString(String.class)); }; + if (analyzer.init("DELIVERY_POSTCODE", "deliveryPostcode", "deliveryPostcode")) { myEntity.setDeliveryPostcode(analyzer.analyzeString(String.class)); }; + if (analyzer.init("DELIVERY_STATE", "deliveryState", "deliveryState")) { myEntity.setDeliveryState(analyzer.analyzeString(String.class)); }; + if (analyzer.init("DELIVERY_COUNTRY", "deliveryCountry", "deliveryCountry")) { myEntity.setDeliveryCountry(analyzer.analyzeString(String.class)); }; + if (analyzer.init("DELIVERY_ADDRESS_FORMAT_ID", "deliveryAddressFormatId", "deliveryAddressFormatId")) { myEntity.setDeliveryAddressFormatId(analyzer.analyzeNumber(java.math.BigDecimal.class)); }; + if (analyzer.init("BILLING_NAME", "billingName", "billingName")) { myEntity.setBillingName(analyzer.analyzeString(String.class)); }; + if (analyzer.init("BILLING_COMPANY", "billingCompany", "billingCompany")) { myEntity.setBillingCompany(analyzer.analyzeString(String.class)); }; + if (analyzer.init("BILLING_STREET_ADDRESS", "billingStreetAddress", "billingStreetAddress")) { myEntity.setBillingStreetAddress(analyzer.analyzeString(String.class)); }; + if (analyzer.init("BILLING_SUBURB", "billingSuburb", "billingSuburb")) { myEntity.setBillingSuburb(analyzer.analyzeString(String.class)); }; + if (analyzer.init("BILLING_CITY", "billingCity", "billingCity")) { myEntity.setBillingCity(analyzer.analyzeString(String.class)); }; + if (analyzer.init("BILLING_POSTCODE", "billingPostcode", "billingPostcode")) { myEntity.setBillingPostcode(analyzer.analyzeString(String.class)); }; + if (analyzer.init("BILLING_STATE", "billingState", "billingState")) { myEntity.setBillingState(analyzer.analyzeString(String.class)); }; + if (analyzer.init("BILLING_COUNTRY", "billingCountry", "billingCountry")) { myEntity.setBillingCountry(analyzer.analyzeString(String.class)); }; + if (analyzer.init("BILLING_ADDRESS_FORMAT_ID", "billingAddressFormatId", "billingAddressFormatId")) { myEntity.setBillingAddressFormatId(analyzer.analyzeNumber(java.math.BigDecimal.class)); }; + if (analyzer.init("PAYMENT_METHOD", "paymentMethod", "paymentMethod")) { myEntity.setPaymentMethod(analyzer.analyzeString(String.class)); }; + if (analyzer.init("CC_TYPE", "ccType", "ccType")) { myEntity.setCcType(analyzer.analyzeString(String.class)); }; + if (analyzer.init("CC_OWNER", "ccOwner", "ccOwner")) { myEntity.setCcOwner(analyzer.analyzeString(String.class)); }; + if (analyzer.init("CC_NUMBER", "ccNumber", "ccNumber")) { myEntity.setCcNumber(analyzer.analyzeString(String.class)); }; + if (analyzer.init("CC_EXPIRES", "ccExpires", "ccExpires")) { myEntity.setCcExpires(analyzer.analyzeString(String.class)); }; + if (analyzer.init("LAST_MODIFIED", "lastModified", "lastModified")) { myEntity.setLastModified(analyzer.analyzeDate(java.sql.Timestamp.class)); }; + if (analyzer.init("DATE_PURCHASED", "datePurchased", "datePurchased")) { myEntity.setDatePurchased(analyzer.analyzeDate(java.sql.Timestamp.class)); }; + if (analyzer.init("ORDERS_STATUS", "ordersStatus", "ordersStatus")) { myEntity.setOrdersStatus(analyzer.analyzeNumber(java.math.BigDecimal.class)); }; + if (analyzer.init("ORDERS_DATE_FINISHED", "ordersDateFinished", "ordersDateFinished")) { myEntity.setOrdersDateFinished(analyzer.analyzeDate(java.sql.Timestamp.class)); }; + if (analyzer.init("CURRENCY", "currency", "currency")) { myEntity.setCurrency(analyzer.analyzeString(String.class)); }; + if (analyzer.init("CURRENCY_VALUE", "currencyValue", "currencyValue")) { myEntity.setCurrencyValue(analyzer.analyzeNumber(java.math.BigDecimal.class)); }; + + } + + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @param columnValueMapString Column-value map-string. (NotNull and NotEmpty) + */ + public void acceptColumnValueMapString(Entity entity, String columnValueMapString) { + MapStringUtil.acceptColumnValueMapString(columnValueMapString, entity); + } + + + // ----------------------------------------------------- + // Extract + // ------- + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @return Primary-key map-string. (NotNull) + */ + public String extractPrimaryKeyMapString(Entity entity) { + return MapStringUtil.extractPrimaryKeyMapString(entity); + } + + /** + * Extract primary-key map-string. + * + * @param entity Target entity. (NotNull) + * @param startBrace Start-brace. (NotNull) + * @param endBrace End-brace. (NotNull) + * @param delimiter Delimiter. (NotNull) + * @param equal Equal. (NotNull) + * @return Primary-key map-string. (NotNull) + */ + public String extractPrimaryKeyMapString(Entity entity, String startBrace, String endBrace, String delimiter, String equal) { + final Orders myEntity = (Orders)entity; + final String mapMarkAndStartBrace = MAP_STRING_MAP_MARK + startBrace; + final StringBuffer sb = new StringBuffer(); + helpAppendingColumnValueString(sb, delimiter, equal, "ORDERS_ID", myEntity.getOrdersId()); + + sb.delete(0, delimiter.length()).insert(0, mapMarkAndStartBrace).append(endBrace); + return sb.toString(); + + } + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @return Column-value map-string. (NotNull) + */ + public String extractColumnValueMapString(Entity entity) { + return MapStringUtil.extractColumnValueMapString(entity); + } + + /** + * Extract column-value map-string. + * + * @param entity Target entity. (NotNull) + * @param startBrace Start-brace. (NotNull) + * @param endBrace End-brace. (NotNull) + * @param delimiter Delimiter. (NotNull) + * @param equal Equal. (NotNull) + * @return Column-value map-string. (NotNull) + */ + public String extractColumnValueMapString(Entity entity, String startBrace, String endBrace, String delimiter, String equal) { + final Orders myEntity = (Orders)entity; + final String mapMarkAndStartBrace = MAP_STRING_MAP_MARK + startBrace; + final StringBuffer sb = new StringBuffer(); + helpAppendingColumnValueString(sb, delimiter, equal, "ORDERS_ID", myEntity.getOrdersId()); + helpAppendingColumnValueString(sb, delimiter, equal, "CUSTOMERS_ID", myEntity.getCustomersId()); + helpAppendingColumnValueString(sb, delimiter, equal, "CUSTOMERS_NAME", myEntity.getCustomersName()); + helpAppendingColumnValueString(sb, delimiter, equal, "CUSTOMERS_COMPANY", myEntity.getCustomersCompany()); + helpAppendingColumnValueString(sb, delimiter, equal, "CUSTOMERS_STREET_ADDRESS", myEntity.getCustomersStreetAddress()); + helpAppendingColumnValueString(sb, delimiter, equal, "CUSTOMERS_SUBURB", myEntity.getCustomersSuburb()); + helpAppendingColumnValueString(sb, delimiter, equal, "CUSTOMERS_CITY", myEntity.getCustomersCity()); + helpAppendingColumnValueString(sb, delimiter, equal, "CUSTOMERS_POSTCODE", myEntity.getCustomersPostcode()); + helpAppendingColumnValueString(sb, delimiter, equal, "CUSTOMERS_STATE", myEntity.getCustomersState()); + helpAppendingColumnValueString(sb, delimiter, equal, "CUSTOMERS_COUNTRY", myEntity.getCustomersCountry()); + helpAppendingColumnValueString(sb, delimiter, equal, "CUSTOMERS_TELEPHONE", myEntity.getCustomersTelephone()); + helpAppendingColumnValueString(sb, delimiter, equal, "CUSTOMERS_EMAIL_ADDRESS", myEntity.getCustomersEmailAddress()); + helpAppendingColumnValueString(sb, delimiter, equal, "CUSTOMERS_ADDRESS_FORMAT_ID", myEntity.getCustomersAddressFormatId()); + helpAppendingColumnValueString(sb, delimiter, equal, "DELIVERY_NAME", myEntity.getDeliveryName()); + helpAppendingColumnValueString(sb, delimiter, equal, "DELIVERY_COMPANY", myEntity.getDeliveryCompany()); + helpAppendingColumnValueString(sb, delimiter, equal, "DELIVERY_STREET_ADDRESS", myEntity.getDeliveryStreetAddress()); + helpAppendingColumnValueString(sb, delimiter, equal, "DELIVERY_SUBURB", myEntity.getDeliverySuburb()); + helpAppendingColumnValueString(sb, delimiter, equal, "DELIVERY_CITY", myEntity.getDeliveryCity()); + helpAppendingColumnValueString(sb, delimiter, equal, "DELIVERY_POSTCODE", myEntity.getDeliveryPostcode()); + helpAppendingColumnValueString(sb, delimiter, equal, "DELIVERY_STATE", myEntity.getDeliveryState()); + helpAppendingColumnValueString(sb, delimiter, equal, "DELIVERY_COUNTRY", myEntity.getDeliveryCountry()); + helpAppendingColumnValueString(sb, delimiter, equal, "DELIVERY_ADDRESS_FORMAT_ID", myEntity.getDeliveryAddressFormatId()); + helpAppendingColumnValueString(sb, delimiter, equal, "BILLING_NAME", myEntity.getBillingName()); + helpAppendingColumnValueString(sb, delimiter, equal, "BILLING_COMPANY", myEntity.getBillingCompany()); + helpAppendingColumnValueString(sb, delimiter, equal, "BILLING_STREET_ADDRESS", myEntity.getBillingStreetAddress()); + helpAppendingColumnValueString(sb, delimiter, equal, "BILLING_SUBURB", myEntity.getBillingSuburb()); + helpAppendingColumnValueString(sb, delimiter, equal, "BILLING_CITY", myEntity.getBillingCity()); + helpAppendingColumnValueString(sb, delimiter, equal, "BILLING_POSTCODE", myEntity.getBillingPostcode()); + helpAppendingColumnValueString(sb, delimiter, equal, "BILLING_STATE", myEntity.getBillingState()); + helpAppendingColumnValueString(sb, delimiter, equal, "BILLING_COUNTRY", myEntity.getBillingCountry()); + helpAppendingColumnValueString(sb, delimiter, equal, "BILLING_ADDRESS_FORMAT_ID", myEntity.getBillingAddressFormatId()); + helpAppendingColumnValueString(sb, delimiter, equal, "PAYMENT_METHOD", myEntity.getPaymentMethod()); + helpAppendingColumnValueString(sb, delimiter, equal, "CC_TYPE", myEntity.getCcType()); + helpAppendingColumnValueString(sb, delimiter, equal, "CC_OWNER", myEntity.getCcOwner()); + helpAppendingColumnValueString(sb, delimiter, equal, "CC_NUMBER", myEntity.getCcNumber()); + helpAppendingColumnValueString(sb, delimiter, equal, "CC_EXPIRES", myEntity.getCcExpires()); + helpAppendingColumnValueString(sb, delimiter, equal, "LAST_MODIFIED", myEntity.getLastModified()); + helpAppendingColumnValueString(sb, delimiter, equal, "DATE_PURCHASED", myEntity.getDatePurchased()); + helpAppendingColumnValueString(sb, delimiter, equal, "ORDERS_STATUS", myEntity.getOrdersStatus()); + helpAppendingColumnValueString(sb, delimiter, equal, "ORDERS_DATE_FINISHED", myEntity.getOrdersDateFinished()); + helpAppendingColumnValueString(sb, delimiter, equal, "CURRENCY", myEntity.getCurrency()); + helpAppendingColumnValueString(sb, delimiter, equal, "CURRENCY_VALUE", myEntity.getCurrencyValue()); + + sb.delete(0, delimiter.length()).insert(0, mapMarkAndStartBrace).append(endBrace); + return sb.toString(); + } + + private void helpAppendingColumnValueString(StringBuffer sb, String delimiter, String equal, String colName, Object value) { + sb.append(delimiter).append(colName).append(equal); + sb.append(helpGettingColumnStringValue(value)); + } + + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @return Column-value map-string. (NotNull) + */ + public String extractCommonColumnValueMapString(Entity entity) { + return "map:{}"; + } + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @return Column-value map-string. (NotNull) + */ + public String extractCommonColumnValueMapString(Entity entity, String startBrace, String endBrace, String delimiter, String equal) { + return "map:" + startBrace + endBrace; + } + + + // ----------------------------------------------------- + // Convert + // ------- + public java.util.List convertToColumnValueList(Entity entity) { + return new java.util.ArrayList(convertToColumnValueMap(entity).values()); + } + + public java.util.Map convertToColumnValueMap(Entity entity) { + final Orders myEntity = downcast(entity); + final java.util.Map valueMap = new java.util.LinkedHashMap(); + valueMap.put("ORDERS_ID", myEntity.getOrdersId()); + valueMap.put("CUSTOMERS_ID", myEntity.getCustomersId()); + valueMap.put("CUSTOMERS_NAME", myEntity.getCustomersName()); + valueMap.put("CUSTOMERS_COMPANY", myEntity.getCustomersCompany()); + valueMap.put("CUSTOMERS_STREET_ADDRESS", myEntity.getCustomersStreetAddress()); + valueMap.put("CUSTOMERS_SUBURB", myEntity.getCustomersSuburb()); + valueMap.put("CUSTOMERS_CITY", myEntity.getCustomersCity()); + valueMap.put("CUSTOMERS_POSTCODE", myEntity.getCustomersPostcode()); + valueMap.put("CUSTOMERS_STATE", myEntity.getCustomersState()); + valueMap.put("CUSTOMERS_COUNTRY", myEntity.getCustomersCountry()); + valueMap.put("CUSTOMERS_TELEPHONE", myEntity.getCustomersTelephone()); + valueMap.put("CUSTOMERS_EMAIL_ADDRESS", myEntity.getCustomersEmailAddress()); + valueMap.put("CUSTOMERS_ADDRESS_FORMAT_ID", myEntity.getCustomersAddressFormatId()); + valueMap.put("DELIVERY_NAME", myEntity.getDeliveryName()); + valueMap.put("DELIVERY_COMPANY", myEntity.getDeliveryCompany()); + valueMap.put("DELIVERY_STREET_ADDRESS", myEntity.getDeliveryStreetAddress()); + valueMap.put("DELIVERY_SUBURB", myEntity.getDeliverySuburb()); + valueMap.put("DELIVERY_CITY", myEntity.getDeliveryCity()); + valueMap.put("DELIVERY_POSTCODE", myEntity.getDeliveryPostcode()); + valueMap.put("DELIVERY_STATE", myEntity.getDeliveryState()); + valueMap.put("DELIVERY_COUNTRY", myEntity.getDeliveryCountry()); + valueMap.put("DELIVERY_ADDRESS_FORMAT_ID", myEntity.getDeliveryAddressFormatId()); + valueMap.put("BILLING_NAME", myEntity.getBillingName()); + valueMap.put("BILLING_COMPANY", myEntity.getBillingCompany()); + valueMap.put("BILLING_STREET_ADDRESS", myEntity.getBillingStreetAddress()); + valueMap.put("BILLING_SUBURB", myEntity.getBillingSuburb()); + valueMap.put("BILLING_CITY", myEntity.getBillingCity()); + valueMap.put("BILLING_POSTCODE", myEntity.getBillingPostcode()); + valueMap.put("BILLING_STATE", myEntity.getBillingState()); + valueMap.put("BILLING_COUNTRY", myEntity.getBillingCountry()); + valueMap.put("BILLING_ADDRESS_FORMAT_ID", myEntity.getBillingAddressFormatId()); + valueMap.put("PAYMENT_METHOD", myEntity.getPaymentMethod()); + valueMap.put("CC_TYPE", myEntity.getCcType()); + valueMap.put("CC_OWNER", myEntity.getCcOwner()); + valueMap.put("CC_NUMBER", myEntity.getCcNumber()); + valueMap.put("CC_EXPIRES", myEntity.getCcExpires()); + valueMap.put("LAST_MODIFIED", myEntity.getLastModified()); + valueMap.put("DATE_PURCHASED", myEntity.getDatePurchased()); + valueMap.put("ORDERS_STATUS", myEntity.getOrdersStatus()); + valueMap.put("ORDERS_DATE_FINISHED", myEntity.getOrdersDateFinished()); + valueMap.put("CURRENCY", myEntity.getCurrency()); + valueMap.put("CURRENCY_VALUE", myEntity.getCurrencyValue()); + return valueMap; + } + + public java.util.List convertToColumnStringValueList(Entity entity) { + return new java.util.ArrayList(convertToColumnStringValueMap(entity).values()); + } + + public java.util.Map convertToColumnStringValueMap(Entity entity) { + final Orders myEntity = downcast(entity); + final java.util.Map valueMap = new java.util.LinkedHashMap(); + valueMap.put("ORDERS_ID", helpGettingColumnStringValue(myEntity.getOrdersId())); + valueMap.put("CUSTOMERS_ID", helpGettingColumnStringValue(myEntity.getCustomersId())); + valueMap.put("CUSTOMERS_NAME", helpGettingColumnStringValue(myEntity.getCustomersName())); + valueMap.put("CUSTOMERS_COMPANY", helpGettingColumnStringValue(myEntity.getCustomersCompany())); + valueMap.put("CUSTOMERS_STREET_ADDRESS", helpGettingColumnStringValue(myEntity.getCustomersStreetAddress())); + valueMap.put("CUSTOMERS_SUBURB", helpGettingColumnStringValue(myEntity.getCustomersSuburb())); + valueMap.put("CUSTOMERS_CITY", helpGettingColumnStringValue(myEntity.getCustomersCity())); + valueMap.put("CUSTOMERS_POSTCODE", helpGettingColumnStringValue(myEntity.getCustomersPostcode())); + valueMap.put("CUSTOMERS_STATE", helpGettingColumnStringValue(myEntity.getCustomersState())); + valueMap.put("CUSTOMERS_COUNTRY", helpGettingColumnStringValue(myEntity.getCustomersCountry())); + valueMap.put("CUSTOMERS_TELEPHONE", helpGettingColumnStringValue(myEntity.getCustomersTelephone())); + valueMap.put("CUSTOMERS_EMAIL_ADDRESS", helpGettingColumnStringValue(myEntity.getCustomersEmailAddress())); + valueMap.put("CUSTOMERS_ADDRESS_FORMAT_ID", helpGettingColumnStringValue(myEntity.getCustomersAddressFormatId())); + valueMap.put("DELIVERY_NAME", helpGettingColumnStringValue(myEntity.getDeliveryName())); + valueMap.put("DELIVERY_COMPANY", helpGettingColumnStringValue(myEntity.getDeliveryCompany())); + valueMap.put("DELIVERY_STREET_ADDRESS", helpGettingColumnStringValue(myEntity.getDeliveryStreetAddress())); + valueMap.put("DELIVERY_SUBURB", helpGettingColumnStringValue(myEntity.getDeliverySuburb())); + valueMap.put("DELIVERY_CITY", helpGettingColumnStringValue(myEntity.getDeliveryCity())); + valueMap.put("DELIVERY_POSTCODE", helpGettingColumnStringValue(myEntity.getDeliveryPostcode())); + valueMap.put("DELIVERY_STATE", helpGettingColumnStringValue(myEntity.getDeliveryState())); + valueMap.put("DELIVERY_COUNTRY", helpGettingColumnStringValue(myEntity.getDeliveryCountry())); + valueMap.put("DELIVERY_ADDRESS_FORMAT_ID", helpGettingColumnStringValue(myEntity.getDeliveryAddressFormatId())); + valueMap.put("BILLING_NAME", helpGettingColumnStringValue(myEntity.getBillingName())); + valueMap.put("BILLING_COMPANY", helpGettingColumnStringValue(myEntity.getBillingCompany())); + valueMap.put("BILLING_STREET_ADDRESS", helpGettingColumnStringValue(myEntity.getBillingStreetAddress())); + valueMap.put("BILLING_SUBURB", helpGettingColumnStringValue(myEntity.getBillingSuburb())); + valueMap.put("BILLING_CITY", helpGettingColumnStringValue(myEntity.getBillingCity())); + valueMap.put("BILLING_POSTCODE", helpGettingColumnStringValue(myEntity.getBillingPostcode())); + valueMap.put("BILLING_STATE", helpGettingColumnStringValue(myEntity.getBillingState())); + valueMap.put("BILLING_COUNTRY", helpGettingColumnStringValue(myEntity.getBillingCountry())); + valueMap.put("BILLING_ADDRESS_FORMAT_ID", helpGettingColumnStringValue(myEntity.getBillingAddressFormatId())); + valueMap.put("PAYMENT_METHOD", helpGettingColumnStringValue(myEntity.getPaymentMethod())); + valueMap.put("CC_TYPE", helpGettingColumnStringValue(myEntity.getCcType())); + valueMap.put("CC_OWNER", helpGettingColumnStringValue(myEntity.getCcOwner())); + valueMap.put("CC_NUMBER", helpGettingColumnStringValue(myEntity.getCcNumber())); + valueMap.put("CC_EXPIRES", helpGettingColumnStringValue(myEntity.getCcExpires())); + valueMap.put("LAST_MODIFIED", helpGettingColumnStringValue(myEntity.getLastModified())); + valueMap.put("DATE_PURCHASED", helpGettingColumnStringValue(myEntity.getDatePurchased())); + valueMap.put("ORDERS_STATUS", helpGettingColumnStringValue(myEntity.getOrdersStatus())); + valueMap.put("ORDERS_DATE_FINISHED", helpGettingColumnStringValue(myEntity.getOrdersDateFinished())); + valueMap.put("CURRENCY", helpGettingColumnStringValue(myEntity.getCurrency())); + valueMap.put("CURRENCY_VALUE", helpGettingColumnStringValue(myEntity.getCurrencyValue())); + return valueMap; + } + + // =================================================================================== + // JDBC Support + // ============ + public String getPreparedInsertClause() { + return "insert into ORDERS(ORDERS_ID, CUSTOMERS_ID, CUSTOMERS_NAME, CUSTOMERS_COMPANY, CUSTOMERS_STREET_ADDRESS, CUSTOMERS_SUBURB, CUSTOMERS_CITY, CUSTOMERS_POSTCODE, CUSTOMERS_STATE, CUSTOMERS_COUNTRY, CUSTOMERS_TELEPHONE, CUSTOMERS_EMAIL_ADDRESS, CUSTOMERS_ADDRESS_FORMAT_ID, DELIVERY_NAME, DELIVERY_COMPANY, DELIVERY_STREET_ADDRESS, DELIVERY_SUBURB, DELIVERY_CITY, DELIVERY_POSTCODE, DELIVERY_STATE, DELIVERY_COUNTRY, DELIVERY_ADDRESS_FORMAT_ID, BILLING_NAME, BILLING_COMPANY, BILLING_STREET_ADDRESS, BILLING_SUBURB, BILLING_CITY, BILLING_POSTCODE, BILLING_STATE, BILLING_COUNTRY, BILLING_ADDRESS_FORMAT_ID, PAYMENT_METHOD, CC_TYPE, CC_OWNER, CC_NUMBER, CC_EXPIRES, LAST_MODIFIED, DATE_PURCHASED, ORDERS_STATUS, ORDERS_DATE_FINISHED, CURRENCY, CURRENCY_VALUE) values(? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? )"; + } + + public String getPreparedInsertClause(String tablePrefix) { + return "insert into " + tablePrefix + "ORDERS(ORDERS_ID, CUSTOMERS_ID, CUSTOMERS_NAME, CUSTOMERS_COMPANY, CUSTOMERS_STREET_ADDRESS, CUSTOMERS_SUBURB, CUSTOMERS_CITY, CUSTOMERS_POSTCODE, CUSTOMERS_STATE, CUSTOMERS_COUNTRY, CUSTOMERS_TELEPHONE, CUSTOMERS_EMAIL_ADDRESS, CUSTOMERS_ADDRESS_FORMAT_ID, DELIVERY_NAME, DELIVERY_COMPANY, DELIVERY_STREET_ADDRESS, DELIVERY_SUBURB, DELIVERY_CITY, DELIVERY_POSTCODE, DELIVERY_STATE, DELIVERY_COUNTRY, DELIVERY_ADDRESS_FORMAT_ID, BILLING_NAME, BILLING_COMPANY, BILLING_STREET_ADDRESS, BILLING_SUBURB, BILLING_CITY, BILLING_POSTCODE, BILLING_STATE, BILLING_COUNTRY, BILLING_ADDRESS_FORMAT_ID, PAYMENT_METHOD, CC_TYPE, CC_OWNER, CC_NUMBER, CC_EXPIRES, LAST_MODIFIED, DATE_PURCHASED, ORDERS_STATUS, ORDERS_DATE_FINISHED, CURRENCY, CURRENCY_VALUE) values(? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? )"; + } + + // =================================================================================== + // Helper + // ====== + protected Orders downcast(Entity entity) { + assertObjectNotNull("entity", entity); + try { + return (Orders)entity; + } catch (ClassCastException e) { + String msg = "The entity should be Orders but it was: " + entity.getClass(); + throw new IllegalStateException(msg, e); + } + } + + protected void checkDowncast(Entity entity) { + downcast(entity); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/dbmeta/OrdersProductsAttributesDbm.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/dbmeta/OrdersProductsAttributesDbm.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/dbmeta/OrdersProductsAttributesDbm.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,736 @@ +package jp.sf.pal.pompei.bsentity.dbmeta; + + +import jp.sf.pal.pompei.allcommon.Entity; +import jp.sf.pal.pompei.allcommon.dbmeta.DBMeta; +import jp.sf.pal.pompei.allcommon.dbmeta.AbstractDBMeta; +import jp.sf.pal.pompei.exentity.OrdersProductsAttributes; + +/** + * The dbmeta of ORDERS_PRODUCTS_ATTRIBUTES. (Singleton) + * + *
+ * [primary-key]
+ *     ORDERS_PRODUCTS_ATTRIBUTES_ID
+ * 
+ * [column-property]
+ *     ORDERS_PRODUCTS_ATTRIBUTES_ID, ORDERS_ID, ORDERS_PRODUCTS_ID, PRODUCTS_OPTIONS, PRODUCTS_OPTIONS_VALUES, OPTIONS_VALUES_PRICE, PRICE_PREFIX
+ * 
+ * [foreign-property]
+ *     
+ * 
+ * [refferer-property]
+ *     
+ * 
+ * [sequence]
+ *     
+ * 
+ * [identity]
+ *     
+ * 
+ * [update-date]
+ *     
+ * 
+ * [version-no]
+ *     
+ * 
+ * 
+ * + * @author DBFlute(AutoGenerator) + */ +public class OrdersProductsAttributesDbm extends AbstractDBMeta { + + // =================================================================================== + // Definition + // ========== + /** The type of entity. */ + protected static final Class ENTITY_TYPE = OrdersProductsAttributes.class; + + /** Singleton instance. */ + private static final OrdersProductsAttributesDbm _instance = new OrdersProductsAttributesDbm(); + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + private OrdersProductsAttributesDbm() { + } + + // =================================================================================== + // Singleton + // ========= + /** + * Get instance. + * + * @return Singleton instance. (NotNull) + */ + public static OrdersProductsAttributesDbm getInstance() { + return _instance; + } + + // =================================================================================== + // Name Definition + // =============== + /** Table db name. */ + public static final String TABLE_DB_NAME = "ORDERS_PRODUCTS_ATTRIBUTES"; + + /** Table cap-prop name. */ + public static final String TABLE_CAP_PROP_NAME = "OrdersProductsAttributes"; + + /** Table uncap-prop name. */ + public static final String TABLE_UNCAP_PROP_NAME = "ordersProductsAttributes"; + + /** Db-name of OrdersProductsAttributesId. */ + public static final String COLUMN_DB_NAME_OF_OrdersProductsAttributesId = "ORDERS_PRODUCTS_ATTRIBUTES_ID"; + /** Db-name of OrdersId. */ + public static final String COLUMN_DB_NAME_OF_OrdersId = "ORDERS_ID"; + /** Db-name of OrdersProductsId. */ + public static final String COLUMN_DB_NAME_OF_OrdersProductsId = "ORDERS_PRODUCTS_ID"; + /** Db-name of ProductsOptions. */ + public static final String COLUMN_DB_NAME_OF_ProductsOptions = "PRODUCTS_OPTIONS"; + /** Db-name of ProductsOptionsValues. */ + public static final String COLUMN_DB_NAME_OF_ProductsOptionsValues = "PRODUCTS_OPTIONS_VALUES"; + /** Db-name of OptionsValuesPrice. */ + public static final String COLUMN_DB_NAME_OF_OptionsValuesPrice = "OPTIONS_VALUES_PRICE"; + /** Db-name of PricePrefix. */ + public static final String COLUMN_DB_NAME_OF_PricePrefix = "PRICE_PREFIX"; + + /** Cap-prop-name of OrdersProductsAttributesId. */ + public static final String COLUMN_CAP_PROP_NAME_OF_OrdersProductsAttributesId = "OrdersProductsAttributesId"; + /** Cap-prop-name of OrdersId. */ + public static final String COLUMN_CAP_PROP_NAME_OF_OrdersId = "OrdersId"; + /** Cap-prop-name of OrdersProductsId. */ + public static final String COLUMN_CAP_PROP_NAME_OF_OrdersProductsId = "OrdersProductsId"; + /** Cap-prop-name of ProductsOptions. */ + public static final String COLUMN_CAP_PROP_NAME_OF_ProductsOptions = "ProductsOptions"; + /** Cap-prop-name of ProductsOptionsValues. */ + public static final String COLUMN_CAP_PROP_NAME_OF_ProductsOptionsValues = "ProductsOptionsValues"; + /** Cap-prop-name of OptionsValuesPrice. */ + public static final String COLUMN_CAP_PROP_NAME_OF_OptionsValuesPrice = "OptionsValuesPrice"; + /** Cap-prop-name of PricePrefix. */ + public static final String COLUMN_CAP_PROP_NAME_OF_PricePrefix = "PricePrefix"; + + + + /** Uncap-prop-name of OrdersProductsAttributesId. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_OrdersProductsAttributesId = "ordersProductsAttributesId"; + /** Uncap-prop-name of OrdersId. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_OrdersId = "ordersId"; + /** Uncap-prop-name of OrdersProductsId. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_OrdersProductsId = "ordersProductsId"; + /** Uncap-prop-name of ProductsOptions. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_ProductsOptions = "productsOptions"; + /** Uncap-prop-name of ProductsOptionsValues. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_ProductsOptionsValues = "productsOptionsValues"; + /** Uncap-prop-name of OptionsValuesPrice. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_OptionsValuesPrice = "optionsValuesPrice"; + /** Uncap-prop-name of PricePrefix. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_PricePrefix = "pricePrefix"; + + + + /** {db-name : cap-prop-name} map. */ + private static java.util.Map _dbNameCapPropNameMap; + protected static java.util.Map createDbNameCapPropNameMap() { + if (_dbNameCapPropNameMap != null) { + return _dbNameCapPropNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_DB_NAME, TABLE_CAP_PROP_NAME); + + map.put(COLUMN_DB_NAME_OF_OrdersProductsAttributesId, COLUMN_CAP_PROP_NAME_OF_OrdersProductsAttributesId); + map.put(COLUMN_DB_NAME_OF_OrdersId, COLUMN_CAP_PROP_NAME_OF_OrdersId); + map.put(COLUMN_DB_NAME_OF_OrdersProductsId, COLUMN_CAP_PROP_NAME_OF_OrdersProductsId); + map.put(COLUMN_DB_NAME_OF_ProductsOptions, COLUMN_CAP_PROP_NAME_OF_ProductsOptions); + map.put(COLUMN_DB_NAME_OF_ProductsOptionsValues, COLUMN_CAP_PROP_NAME_OF_ProductsOptionsValues); + map.put(COLUMN_DB_NAME_OF_OptionsValuesPrice, COLUMN_CAP_PROP_NAME_OF_OptionsValuesPrice); + map.put(COLUMN_DB_NAME_OF_PricePrefix, COLUMN_CAP_PROP_NAME_OF_PricePrefix); + + _dbNameCapPropNameMap = java.util.Collections.unmodifiableMap(map); + return _dbNameCapPropNameMap; + } + + /** {db-name : uncap-prop-name} map. */ + private static java.util.Map _dbNameUncapPropNameMap; + protected static java.util.Map createDbNameUncapPropNameMap() { + if (_dbNameUncapPropNameMap != null) { + return _dbNameUncapPropNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_DB_NAME, TABLE_UNCAP_PROP_NAME); + + map.put(COLUMN_DB_NAME_OF_OrdersProductsAttributesId, COLUMN_UNCAP_PROP_NAME_OF_OrdersProductsAttributesId); + map.put(COLUMN_DB_NAME_OF_OrdersId, COLUMN_UNCAP_PROP_NAME_OF_OrdersId); + map.put(COLUMN_DB_NAME_OF_OrdersProductsId, COLUMN_UNCAP_PROP_NAME_OF_OrdersProductsId); + map.put(COLUMN_DB_NAME_OF_ProductsOptions, COLUMN_UNCAP_PROP_NAME_OF_ProductsOptions); + map.put(COLUMN_DB_NAME_OF_ProductsOptionsValues, COLUMN_UNCAP_PROP_NAME_OF_ProductsOptionsValues); + map.put(COLUMN_DB_NAME_OF_OptionsValuesPrice, COLUMN_UNCAP_PROP_NAME_OF_OptionsValuesPrice); + map.put(COLUMN_DB_NAME_OF_PricePrefix, COLUMN_UNCAP_PROP_NAME_OF_PricePrefix); + + _dbNameUncapPropNameMap = java.util.Collections.unmodifiableMap(map); + return _dbNameUncapPropNameMap; + } + + /** {cap-prop-name : db-name} map. */ + private static java.util.Map _capPropNameDbNameMap; + protected static java.util.Map createCapPropNameDbNameMap() { + if (_capPropNameDbNameMap != null) { + return _capPropNameDbNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_CAP_PROP_NAME, TABLE_DB_NAME); + + map.put(COLUMN_CAP_PROP_NAME_OF_OrdersProductsAttributesId, COLUMN_DB_NAME_OF_OrdersProductsAttributesId); + map.put(COLUMN_CAP_PROP_NAME_OF_OrdersId, COLUMN_DB_NAME_OF_OrdersId); + map.put(COLUMN_CAP_PROP_NAME_OF_OrdersProductsId, COLUMN_DB_NAME_OF_OrdersProductsId); + map.put(COLUMN_CAP_PROP_NAME_OF_ProductsOptions, COLUMN_DB_NAME_OF_ProductsOptions); + map.put(COLUMN_CAP_PROP_NAME_OF_ProductsOptionsValues, COLUMN_DB_NAME_OF_ProductsOptionsValues); + map.put(COLUMN_CAP_PROP_NAME_OF_OptionsValuesPrice, COLUMN_DB_NAME_OF_OptionsValuesPrice); + map.put(COLUMN_CAP_PROP_NAME_OF_PricePrefix, COLUMN_DB_NAME_OF_PricePrefix); + + _capPropNameDbNameMap = java.util.Collections.unmodifiableMap(map); + return _capPropNameDbNameMap; + } + + /** {cap-prop-name : uncap-prop-name} map. */ + private static java.util.Map _capPropNameUncapPropNameMap; + protected static java.util.Map createCapPropNameUncapPropNameMap() { + if (_capPropNameUncapPropNameMap != null) { + return _capPropNameUncapPropNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_CAP_PROP_NAME, TABLE_UNCAP_PROP_NAME); + + map.put(COLUMN_CAP_PROP_NAME_OF_OrdersProductsAttributesId, COLUMN_UNCAP_PROP_NAME_OF_OrdersProductsAttributesId); + map.put(COLUMN_CAP_PROP_NAME_OF_OrdersId, COLUMN_UNCAP_PROP_NAME_OF_OrdersId); + map.put(COLUMN_CAP_PROP_NAME_OF_OrdersProductsId, COLUMN_UNCAP_PROP_NAME_OF_OrdersProductsId); + map.put(COLUMN_CAP_PROP_NAME_OF_ProductsOptions, COLUMN_UNCAP_PROP_NAME_OF_ProductsOptions); + map.put(COLUMN_CAP_PROP_NAME_OF_ProductsOptionsValues, COLUMN_UNCAP_PROP_NAME_OF_ProductsOptionsValues); + map.put(COLUMN_CAP_PROP_NAME_OF_OptionsValuesPrice, COLUMN_UNCAP_PROP_NAME_OF_OptionsValuesPrice); + map.put(COLUMN_CAP_PROP_NAME_OF_PricePrefix, COLUMN_UNCAP_PROP_NAME_OF_PricePrefix); + + _capPropNameUncapPropNameMap = java.util.Collections.unmodifiableMap(map); + return _capPropNameUncapPropNameMap; + } + + /** {uncap-prop-name : db-name} map. */ + private static java.util.Map _uncapPropNameDbNameMap; + protected static java.util.Map createUncapPropNameDbNameMap() { + if (_uncapPropNameDbNameMap != null) { + return _uncapPropNameDbNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_UNCAP_PROP_NAME, TABLE_DB_NAME); + + map.put(COLUMN_UNCAP_PROP_NAME_OF_OrdersProductsAttributesId, COLUMN_DB_NAME_OF_OrdersProductsAttributesId); + map.put(COLUMN_UNCAP_PROP_NAME_OF_OrdersId, COLUMN_DB_NAME_OF_OrdersId); + map.put(COLUMN_UNCAP_PROP_NAME_OF_OrdersProductsId, COLUMN_DB_NAME_OF_OrdersProductsId); + map.put(COLUMN_UNCAP_PROP_NAME_OF_ProductsOptions, COLUMN_DB_NAME_OF_ProductsOptions); + map.put(COLUMN_UNCAP_PROP_NAME_OF_ProductsOptionsValues, COLUMN_DB_NAME_OF_ProductsOptionsValues); + map.put(COLUMN_UNCAP_PROP_NAME_OF_OptionsValuesPrice, COLUMN_DB_NAME_OF_OptionsValuesPrice); + map.put(COLUMN_UNCAP_PROP_NAME_OF_PricePrefix, COLUMN_DB_NAME_OF_PricePrefix); + + _uncapPropNameDbNameMap = java.util.Collections.unmodifiableMap(map); + return _uncapPropNameDbNameMap; + } + + /** {uncap-prop-name : cap-prop-name} map. */ + private static java.util.Map _uncapPropNameCapPropNameMap; + protected static java.util.Map createUncapPropNameCapPropNameMap() { + if (_uncapPropNameCapPropNameMap != null) { + return _uncapPropNameCapPropNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_UNCAP_PROP_NAME, TABLE_CAP_PROP_NAME); + + map.put(COLUMN_UNCAP_PROP_NAME_OF_OrdersProductsAttributesId, COLUMN_CAP_PROP_NAME_OF_OrdersProductsAttributesId); + map.put(COLUMN_UNCAP_PROP_NAME_OF_OrdersId, COLUMN_CAP_PROP_NAME_OF_OrdersId); + map.put(COLUMN_UNCAP_PROP_NAME_OF_OrdersProductsId, COLUMN_CAP_PROP_NAME_OF_OrdersProductsId); + map.put(COLUMN_UNCAP_PROP_NAME_OF_ProductsOptions, COLUMN_CAP_PROP_NAME_OF_ProductsOptions); + map.put(COLUMN_UNCAP_PROP_NAME_OF_ProductsOptionsValues, COLUMN_CAP_PROP_NAME_OF_ProductsOptionsValues); + map.put(COLUMN_UNCAP_PROP_NAME_OF_OptionsValuesPrice, COLUMN_CAP_PROP_NAME_OF_OptionsValuesPrice); + map.put(COLUMN_UNCAP_PROP_NAME_OF_PricePrefix, COLUMN_CAP_PROP_NAME_OF_PricePrefix); + + _uncapPropNameCapPropNameMap = java.util.Collections.unmodifiableMap(map); + return _uncapPropNameCapPropNameMap; + } + + // =================================================================================== + // Name-Map + // ======== + /** + * This method implements the method that is declared at super. + * + * @return {db-name : cap-prop-name} map. + */ + public java.util.Map getDbNameCapPropNameMap() { + return createDbNameCapPropNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {db-name : uncap-prop-name} map. + */ + public java.util.Map getDbNameUncapPropNameMap() { + return createDbNameUncapPropNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {cap-prop-name : db-name} map. + */ + public java.util.Map getCapPropNameDbNameMap() { + return createCapPropNameDbNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {cap-prop-name : uncap-prop-name} map. + */ + public java.util.Map getCapPropNameUncapPropNameMap() { + return createCapPropNameUncapPropNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {uncap-prop-name : db-name} map. + */ + public java.util.Map getUncapPropNameDbNameMap() { + return createUncapPropNameDbNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {uncap-prop-name : cap-prop-name} map. + */ + public java.util.Map getUncapPropNameCapPropNameMap() { + return createUncapPropNameCapPropNameMap(); + } + + // =================================================================================== + // Table Name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + public String getTableDbName() { + return TABLE_DB_NAME; + } + + /** + * This method implements the method that is declared at super. + * + * @return Table cap-prop-name. (NotNull) + */ + public String getTableCapPropName() { + return TABLE_CAP_PROP_NAME; + } + + /** + * This method implements the method that is declared at super. + * + * @return Table property-name. (NotNull) + */ + public String getTableUncapPropName() { + return TABLE_UNCAP_PROP_NAME; + } + + // =================================================================================== + // Column Name + // =========== + public java.util.List getColumnDbNameList() { + final String[] columns = getColumnDbNameCommaString().split(","); + final java.util.List resultList = new java.util.ArrayList(); + for (int i=0; i < columns.length; i++) { + resultList.add(columns[i].trim()); + } + return resultList; + } + + public java.util.List getColumnCapPropNameList() { + final java.util.List columnDbNameList = getColumnDbNameList(); + final java.util.List resultList = new java.util.ArrayList(); + for (final java.util.Iterator ite = columnDbNameList.iterator(); ite.hasNext(); ) { + resultList.add(getDbNameCapPropNameMap().get((String)ite.next())); + } + return resultList; + } + + public java.util.List getColumnUncapPropNameList() { + final java.util.List columnDbNameList = getColumnDbNameList(); + final java.util.List resultList = new java.util.ArrayList(); + for (final java.util.Iterator ite = columnDbNameList.iterator(); ite.hasNext(); ) { + resultList.add(getDbNameUncapPropNameMap().get((String)ite.next())); + } + return resultList; + } + + /** + * This method implements the method that is declared at super. + * + * @return Column-db-name comma-string. (NotNull) + */ + public String getColumnDbNameCommaString() { + return "ORDERS_PRODUCTS_ATTRIBUTES_ID, ORDERS_ID, ORDERS_PRODUCTS_ID, PRODUCTS_OPTIONS, PRODUCTS_OPTIONS_VALUES, OPTIONS_VALUES_PRICE, PRICE_PREFIX"; + } + + // =================================================================================== + // Type Name + // ========= + /** + * This method implements the method that is declared at super. + * + * @return The type-name of entity. (NotNull) + */ + public String getEntityTypeName() { + return "jp.sf.pal.pompei.exentity.OrdersProductsAttributes"; + } + + /** + * This method implements the method that is declared at super. + * + * @return The type-name of condition-bean. (NotNull) + */ + public String getConditionBeanTypeName() { + return "jp.sf.pal.pompei.cbean.bs.OrdersProductsAttributesCB"; + } + + /** + * This method implements the method that is declared at super. + * + * @return The type-name of dao. (NotNull) + */ + public String getDaoTypeName() { + return "jp.sf.pal.pompei.exdao.OrdersProductsAttributesDao"; + } + + /** + * This method implements the method that is declared at super. + * + * @return The type-name of behavior. (NotNull) + */ + public String getBehaviorTypeName() { + return "jp.sf.pal.pompei.exbhv.OrdersProductsAttributesBhv"; + } + + // =================================================================================== + // Type + // ==== + /** + * This method implements the method that is declared at super. + * + * @return The type of entity. (NotNull) + */ + public Class getEntityType() { + return ENTITY_TYPE; + } + + // =================================================================================== + // Instance + // ======== + /** + * This method implements the method that is declared at super. + * + * @return The type of entity. (NotNull) + */ + public Entity newEntity() { + return newMyEntity(); + } + + /** + * New the instance of my entity. + * + * @return The instance of my entity. (NotNull) + */ + public OrdersProductsAttributes newMyEntity() { + return new OrdersProductsAttributes(); + } + + // =================================================================================== + // Foreign DBMeta + // ============== + /** + * This method implements the method that is declared at super. + * + * @param foreignPropertyName Foreign-property-name(Both OK - InitCap or not). (NotNull) + * @return Foreign DBMeta. (NotNull) + */ + public DBMeta getForeignDBMeta(String foreignPropertyName) { + assertStringNotNullAndNotTrimmedEmpty("foreignPropertyName", foreignPropertyName); + final String methodName = "getForeignDBMeta_" + foreignPropertyName.substring(0, 1) + foreignPropertyName.substring(1); + + java.lang.reflect.Method method = null; + try { + method = this.getClass().getMethod(methodName, new Class[]{}); + } catch (NoSuchMethodException e) { + String msg = "The foreignPropertyName is not found: foreignPropertyName=" + foreignPropertyName; + msg = msg + " tableName=" + TABLE_DB_NAME + " methodName=" + methodName; + throw new RuntimeException(msg, e); + } + try { + return (DBMeta)method.invoke(this, new Object[]{}); + } catch (IllegalAccessException e) { + throw new RuntimeException(e); + } catch (java.lang.reflect.InvocationTargetException e) { + throw new RuntimeException(e.getCause()); + } + } + + // =================================================================================== + // Determination + // ============= + /** + * This method implements the method that is declared at super. + * + * @return Determination. + */ + public boolean hasTwoOrMorePrimaryKeys() { + return false; + } + + /** + * This method implements the method that is declared at super. + * + * @return Determination. + */ + public boolean hasCommonColumn() { + return false; + } + + // =================================================================================== + // Entity Handling + // =============== + // ----------------------------------------------------- + // Accept + // ------ + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @param primaryKeyMap Primary key map. (NotNull and NotEmpty) + */ + public void acceptPrimaryKeyMap(Entity entity, java.util.Map primaryKeyMap) { + final OrdersProductsAttributes myEntity = (OrdersProductsAttributes)entity; + MapAssertUtil.assertPrimaryKeyMapNotNullAndNotEmpty(primaryKeyMap); + final MapStringValueAnalyzer analyzer = new MapStringValueAnalyzer(primaryKeyMap, entity.getModifiedPropertyNames()); + + MapAssertUtil.assertColumnExistingInPrimaryKeyMap(primaryKeyMap, "ORDERS_PRODUCTS_ATTRIBUTES_ID"); + if (analyzer.init("ORDERS_PRODUCTS_ATTRIBUTES_ID", "ordersProductsAttributesId", "ordersProductsAttributesId")) { myEntity.setOrdersProductsAttributesId(analyzer.analyzeNumber(java.math.BigDecimal.class)); }; + + + } + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @param primaryKeyMapString Primary-key map-string. (NotNull and NotEmpty) + */ + public void acceptPrimaryKeyMapString(Entity entity, String primaryKeyMapString) { + MapStringUtil.acceptPrimaryKeyMapString(primaryKeyMapString, entity); + } + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @param columnValueMap Column-value map. (NotNull and NotEmpty) + */ + public void acceptColumnValueMap(Entity entity, java.util.Map columnValueMap) { + final OrdersProductsAttributes myEntity = (OrdersProductsAttributes)entity; + MapAssertUtil.assertColumnValueMapNotNullAndNotEmpty(columnValueMap); + final MapStringValueAnalyzer analyzer = new MapStringValueAnalyzer(columnValueMap, entity.getModifiedPropertyNames()); + + if (analyzer.init("ORDERS_PRODUCTS_ATTRIBUTES_ID", "ordersProductsAttributesId", "ordersProductsAttributesId")) { myEntity.setOrdersProductsAttributesId(analyzer.analyzeNumber(java.math.BigDecimal.class)); }; + if (analyzer.init("ORDERS_ID", "ordersId", "ordersId")) { myEntity.setOrdersId(analyzer.analyzeNumber(java.math.BigDecimal.class)); }; + if (analyzer.init("ORDERS_PRODUCTS_ID", "ordersProductsId", "ordersProductsId")) { myEntity.setOrdersProductsId(analyzer.analyzeNumber(java.math.BigDecimal.class)); }; + if (analyzer.init("PRODUCTS_OPTIONS", "productsOptions", "productsOptions")) { myEntity.setProductsOptions(analyzer.analyzeString(String.class)); }; + if (analyzer.init("PRODUCTS_OPTIONS_VALUES", "productsOptionsValues", "productsOptionsValues")) { myEntity.setProductsOptionsValues(analyzer.analyzeString(String.class)); }; + if (analyzer.init("OPTIONS_VALUES_PRICE", "optionsValuesPrice", "optionsValuesPrice")) { myEntity.setOptionsValuesPrice(analyzer.analyzeNumber(java.math.BigDecimal.class)); }; + if (analyzer.init("PRICE_PREFIX", "pricePrefix", "pricePrefix")) { myEntity.setPricePrefix(analyzer.analyzeString(String.class)); }; + + } + + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @param columnValueMapString Column-value map-string. (NotNull and NotEmpty) + */ + public void acceptColumnValueMapString(Entity entity, String columnValueMapString) { + MapStringUtil.acceptColumnValueMapString(columnValueMapString, entity); + } + + + // ----------------------------------------------------- + // Extract + // ------- + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @return Primary-key map-string. (NotNull) + */ + public String extractPrimaryKeyMapString(Entity entity) { + return MapStringUtil.extractPrimaryKeyMapString(entity); + } + + /** + * Extract primary-key map-string. + * + * @param entity Target entity. (NotNull) + * @param startBrace Start-brace. (NotNull) + * @param endBrace End-brace. (NotNull) + * @param delimiter Delimiter. (NotNull) + * @param equal Equal. (NotNull) + * @return Primary-key map-string. (NotNull) + */ + public String extractPrimaryKeyMapString(Entity entity, String startBrace, String endBrace, String delimiter, String equal) { + final OrdersProductsAttributes myEntity = (OrdersProductsAttributes)entity; + final String mapMarkAndStartBrace = MAP_STRING_MAP_MARK + startBrace; + final StringBuffer sb = new StringBuffer(); + helpAppendingColumnValueString(sb, delimiter, equal, "ORDERS_PRODUCTS_ATTRIBUTES_ID", myEntity.getOrdersProductsAttributesId()); + + sb.delete(0, delimiter.length()).insert(0, mapMarkAndStartBrace).append(endBrace); + return sb.toString(); + + } + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @return Column-value map-string. (NotNull) + */ + public String extractColumnValueMapString(Entity entity) { + return MapStringUtil.extractColumnValueMapString(entity); + } + + /** + * Extract column-value map-string. + * + * @param entity Target entity. (NotNull) + * @param startBrace Start-brace. (NotNull) + * @param endBrace End-brace. (NotNull) + * @param delimiter Delimiter. (NotNull) + * @param equal Equal. (NotNull) + * @return Column-value map-string. (NotNull) + */ + public String extractColumnValueMapString(Entity entity, String startBrace, String endBrace, String delimiter, String equal) { + final OrdersProductsAttributes myEntity = (OrdersProductsAttributes)entity; + final String mapMarkAndStartBrace = MAP_STRING_MAP_MARK + startBrace; + final StringBuffer sb = new StringBuffer(); + helpAppendingColumnValueString(sb, delimiter, equal, "ORDERS_PRODUCTS_ATTRIBUTES_ID", myEntity.getOrdersProductsAttributesId()); + helpAppendingColumnValueString(sb, delimiter, equal, "ORDERS_ID", myEntity.getOrdersId()); + helpAppendingColumnValueString(sb, delimiter, equal, "ORDERS_PRODUCTS_ID", myEntity.getOrdersProductsId()); + helpAppendingColumnValueString(sb, delimiter, equal, "PRODUCTS_OPTIONS", myEntity.getProductsOptions()); + helpAppendingColumnValueString(sb, delimiter, equal, "PRODUCTS_OPTIONS_VALUES", myEntity.getProductsOptionsValues()); + helpAppendingColumnValueString(sb, delimiter, equal, "OPTIONS_VALUES_PRICE", myEntity.getOptionsValuesPrice()); + helpAppendingColumnValueString(sb, delimiter, equal, "PRICE_PREFIX", myEntity.getPricePrefix()); + + sb.delete(0, delimiter.length()).insert(0, mapMarkAndStartBrace).append(endBrace); + return sb.toString(); + } + + private void helpAppendingColumnValueString(StringBuffer sb, String delimiter, String equal, String colName, Object value) { + sb.append(delimiter).append(colName).append(equal); + sb.append(helpGettingColumnStringValue(value)); + } + + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @return Column-value map-string. (NotNull) + */ + public String extractCommonColumnValueMapString(Entity entity) { + return "map:{}"; + } + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @return Column-value map-string. (NotNull) + */ + public String extractCommonColumnValueMapString(Entity entity, String startBrace, String endBrace, String delimiter, String equal) { + return "map:" + startBrace + endBrace; + } + + + // ----------------------------------------------------- + // Convert + // ------- + public java.util.List convertToColumnValueList(Entity entity) { + return new java.util.ArrayList(convertToColumnValueMap(entity).values()); + } + + public java.util.Map convertToColumnValueMap(Entity entity) { + final OrdersProductsAttributes myEntity = downcast(entity); + final java.util.Map valueMap = new java.util.LinkedHashMap(); + valueMap.put("ORDERS_PRODUCTS_ATTRIBUTES_ID", myEntity.getOrdersProductsAttributesId()); + valueMap.put("ORDERS_ID", myEntity.getOrdersId()); + valueMap.put("ORDERS_PRODUCTS_ID", myEntity.getOrdersProductsId()); + valueMap.put("PRODUCTS_OPTIONS", myEntity.getProductsOptions()); + valueMap.put("PRODUCTS_OPTIONS_VALUES", myEntity.getProductsOptionsValues()); + valueMap.put("OPTIONS_VALUES_PRICE", myEntity.getOptionsValuesPrice()); + valueMap.put("PRICE_PREFIX", myEntity.getPricePrefix()); + return valueMap; + } + + public java.util.List convertToColumnStringValueList(Entity entity) { + return new java.util.ArrayList(convertToColumnStringValueMap(entity).values()); + } + + public java.util.Map convertToColumnStringValueMap(Entity entity) { + final OrdersProductsAttributes myEntity = downcast(entity); + final java.util.Map valueMap = new java.util.LinkedHashMap(); + valueMap.put("ORDERS_PRODUCTS_ATTRIBUTES_ID", helpGettingColumnStringValue(myEntity.getOrdersProductsAttributesId())); + valueMap.put("ORDERS_ID", helpGettingColumnStringValue(myEntity.getOrdersId())); + valueMap.put("ORDERS_PRODUCTS_ID", helpGettingColumnStringValue(myEntity.getOrdersProductsId())); + valueMap.put("PRODUCTS_OPTIONS", helpGettingColumnStringValue(myEntity.getProductsOptions())); + valueMap.put("PRODUCTS_OPTIONS_VALUES", helpGettingColumnStringValue(myEntity.getProductsOptionsValues())); + valueMap.put("OPTIONS_VALUES_PRICE", helpGettingColumnStringValue(myEntity.getOptionsValuesPrice())); + valueMap.put("PRICE_PREFIX", helpGettingColumnStringValue(myEntity.getPricePrefix())); + return valueMap; + } + + // =================================================================================== + // JDBC Support + // ============ + public String getPreparedInsertClause() { + return "insert into ORDERS_PRODUCTS_ATTRIBUTES(ORDERS_PRODUCTS_ATTRIBUTES_ID, ORDERS_ID, ORDERS_PRODUCTS_ID, PRODUCTS_OPTIONS, PRODUCTS_OPTIONS_VALUES, OPTIONS_VALUES_PRICE, PRICE_PREFIX) values(? , ? , ? , ? , ? , ? , ? )"; + } + + public String getPreparedInsertClause(String tablePrefix) { + return "insert into " + tablePrefix + "ORDERS_PRODUCTS_ATTRIBUTES(ORDERS_PRODUCTS_ATTRIBUTES_ID, ORDERS_ID, ORDERS_PRODUCTS_ID, PRODUCTS_OPTIONS, PRODUCTS_OPTIONS_VALUES, OPTIONS_VALUES_PRICE, PRICE_PREFIX) values(? , ? , ? , ? , ? , ? , ? )"; + } + + // =================================================================================== + // Helper + // ====== + protected OrdersProductsAttributes downcast(Entity entity) { + assertObjectNotNull("entity", entity); + try { + return (OrdersProductsAttributes)entity; + } catch (ClassCastException e) { + String msg = "The entity should be OrdersProductsAttributes but it was: " + entity.getClass(); + throw new IllegalStateException(msg, e); + } + } + + protected void checkDowncast(Entity entity) { + downcast(entity); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/dbmeta/OrdersProductsDbm.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/dbmeta/OrdersProductsDbm.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/dbmeta/OrdersProductsDbm.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,768 @@ +package jp.sf.pal.pompei.bsentity.dbmeta; + + +import jp.sf.pal.pompei.allcommon.Entity; +import jp.sf.pal.pompei.allcommon.dbmeta.DBMeta; +import jp.sf.pal.pompei.allcommon.dbmeta.AbstractDBMeta; +import jp.sf.pal.pompei.exentity.OrdersProducts; + +/** + * The dbmeta of ORDERS_PRODUCTS. (Singleton) + * + *
+ * [primary-key]
+ *     ORDERS_PRODUCTS_ID
+ * 
+ * [column-property]
+ *     ORDERS_PRODUCTS_ID, ORDERS_ID, PRODUCTS_ID, PRODUCTS_MODEL, PRODUCTS_NAME, PRODUCTS_PRICE, FINAL_PRICE, PRODUCTS_TAX, PRODUCTS_QUANTITY
+ * 
+ * [foreign-property]
+ *     
+ * 
+ * [refferer-property]
+ *     
+ * 
+ * [sequence]
+ *     
+ * 
+ * [identity]
+ *     
+ * 
+ * [update-date]
+ *     
+ * 
+ * [version-no]
+ *     
+ * 
+ * 
+ * + * @author DBFlute(AutoGenerator) + */ +public class OrdersProductsDbm extends AbstractDBMeta { + + // =================================================================================== + // Definition + // ========== + /** The type of entity. */ + protected static final Class ENTITY_TYPE = OrdersProducts.class; + + /** Singleton instance. */ + private static final OrdersProductsDbm _instance = new OrdersProductsDbm(); + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + private OrdersProductsDbm() { + } + + // =================================================================================== + // Singleton + // ========= + /** + * Get instance. + * + * @return Singleton instance. (NotNull) + */ + public static OrdersProductsDbm getInstance() { + return _instance; + } + + // =================================================================================== + // Name Definition + // =============== + /** Table db name. */ + public static final String TABLE_DB_NAME = "ORDERS_PRODUCTS"; + + /** Table cap-prop name. */ + public static final String TABLE_CAP_PROP_NAME = "OrdersProducts"; + + /** Table uncap-prop name. */ + public static final String TABLE_UNCAP_PROP_NAME = "ordersProducts"; + + /** Db-name of OrdersProductsId. */ + public static final String COLUMN_DB_NAME_OF_OrdersProductsId = "ORDERS_PRODUCTS_ID"; + /** Db-name of OrdersId. */ + public static final String COLUMN_DB_NAME_OF_OrdersId = "ORDERS_ID"; + /** Db-name of ProductsId. */ + public static final String COLUMN_DB_NAME_OF_ProductsId = "PRODUCTS_ID"; + /** Db-name of ProductsModel. */ + public static final String COLUMN_DB_NAME_OF_ProductsModel = "PRODUCTS_MODEL"; + /** Db-name of ProductsName. */ + public static final String COLUMN_DB_NAME_OF_ProductsName = "PRODUCTS_NAME"; + /** Db-name of ProductsPrice. */ + public static final String COLUMN_DB_NAME_OF_ProductsPrice = "PRODUCTS_PRICE"; + /** Db-name of FinalPrice. */ + public static final String COLUMN_DB_NAME_OF_FinalPrice = "FINAL_PRICE"; + /** Db-name of ProductsTax. */ + public static final String COLUMN_DB_NAME_OF_ProductsTax = "PRODUCTS_TAX"; + /** Db-name of ProductsQuantity. */ + public static final String COLUMN_DB_NAME_OF_ProductsQuantity = "PRODUCTS_QUANTITY"; + + /** Cap-prop-name of OrdersProductsId. */ + public static final String COLUMN_CAP_PROP_NAME_OF_OrdersProductsId = "OrdersProductsId"; + /** Cap-prop-name of OrdersId. */ + public static final String COLUMN_CAP_PROP_NAME_OF_OrdersId = "OrdersId"; + /** Cap-prop-name of ProductsId. */ + public static final String COLUMN_CAP_PROP_NAME_OF_ProductsId = "ProductsId"; + /** Cap-prop-name of ProductsModel. */ + public static final String COLUMN_CAP_PROP_NAME_OF_ProductsModel = "ProductsModel"; + /** Cap-prop-name of ProductsName. */ + public static final String COLUMN_CAP_PROP_NAME_OF_ProductsName = "ProductsName"; + /** Cap-prop-name of ProductsPrice. */ + public static final String COLUMN_CAP_PROP_NAME_OF_ProductsPrice = "ProductsPrice"; + /** Cap-prop-name of FinalPrice. */ + public static final String COLUMN_CAP_PROP_NAME_OF_FinalPrice = "FinalPrice"; + /** Cap-prop-name of ProductsTax. */ + public static final String COLUMN_CAP_PROP_NAME_OF_ProductsTax = "ProductsTax"; + /** Cap-prop-name of ProductsQuantity. */ + public static final String COLUMN_CAP_PROP_NAME_OF_ProductsQuantity = "ProductsQuantity"; + + + + /** Uncap-prop-name of OrdersProductsId. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_OrdersProductsId = "ordersProductsId"; + /** Uncap-prop-name of OrdersId. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_OrdersId = "ordersId"; + /** Uncap-prop-name of ProductsId. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_ProductsId = "productsId"; + /** Uncap-prop-name of ProductsModel. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_ProductsModel = "productsModel"; + /** Uncap-prop-name of ProductsName. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_ProductsName = "productsName"; + /** Uncap-prop-name of ProductsPrice. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_ProductsPrice = "productsPrice"; + /** Uncap-prop-name of FinalPrice. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_FinalPrice = "finalPrice"; + /** Uncap-prop-name of ProductsTax. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_ProductsTax = "productsTax"; + /** Uncap-prop-name of ProductsQuantity. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_ProductsQuantity = "productsQuantity"; + + + + /** {db-name : cap-prop-name} map. */ + private static java.util.Map _dbNameCapPropNameMap; + protected static java.util.Map createDbNameCapPropNameMap() { + if (_dbNameCapPropNameMap != null) { + return _dbNameCapPropNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_DB_NAME, TABLE_CAP_PROP_NAME); + + map.put(COLUMN_DB_NAME_OF_OrdersProductsId, COLUMN_CAP_PROP_NAME_OF_OrdersProductsId); + map.put(COLUMN_DB_NAME_OF_OrdersId, COLUMN_CAP_PROP_NAME_OF_OrdersId); + map.put(COLUMN_DB_NAME_OF_ProductsId, COLUMN_CAP_PROP_NAME_OF_ProductsId); + map.put(COLUMN_DB_NAME_OF_ProductsModel, COLUMN_CAP_PROP_NAME_OF_ProductsModel); + map.put(COLUMN_DB_NAME_OF_ProductsName, COLUMN_CAP_PROP_NAME_OF_ProductsName); + map.put(COLUMN_DB_NAME_OF_ProductsPrice, COLUMN_CAP_PROP_NAME_OF_ProductsPrice); + map.put(COLUMN_DB_NAME_OF_FinalPrice, COLUMN_CAP_PROP_NAME_OF_FinalPrice); + map.put(COLUMN_DB_NAME_OF_ProductsTax, COLUMN_CAP_PROP_NAME_OF_ProductsTax); + map.put(COLUMN_DB_NAME_OF_ProductsQuantity, COLUMN_CAP_PROP_NAME_OF_ProductsQuantity); + + _dbNameCapPropNameMap = java.util.Collections.unmodifiableMap(map); + return _dbNameCapPropNameMap; + } + + /** {db-name : uncap-prop-name} map. */ + private static java.util.Map _dbNameUncapPropNameMap; + protected static java.util.Map createDbNameUncapPropNameMap() { + if (_dbNameUncapPropNameMap != null) { + return _dbNameUncapPropNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_DB_NAME, TABLE_UNCAP_PROP_NAME); + + map.put(COLUMN_DB_NAME_OF_OrdersProductsId, COLUMN_UNCAP_PROP_NAME_OF_OrdersProductsId); + map.put(COLUMN_DB_NAME_OF_OrdersId, COLUMN_UNCAP_PROP_NAME_OF_OrdersId); + map.put(COLUMN_DB_NAME_OF_ProductsId, COLUMN_UNCAP_PROP_NAME_OF_ProductsId); + map.put(COLUMN_DB_NAME_OF_ProductsModel, COLUMN_UNCAP_PROP_NAME_OF_ProductsModel); + map.put(COLUMN_DB_NAME_OF_ProductsName, COLUMN_UNCAP_PROP_NAME_OF_ProductsName); + map.put(COLUMN_DB_NAME_OF_ProductsPrice, COLUMN_UNCAP_PROP_NAME_OF_ProductsPrice); + map.put(COLUMN_DB_NAME_OF_FinalPrice, COLUMN_UNCAP_PROP_NAME_OF_FinalPrice); + map.put(COLUMN_DB_NAME_OF_ProductsTax, COLUMN_UNCAP_PROP_NAME_OF_ProductsTax); + map.put(COLUMN_DB_NAME_OF_ProductsQuantity, COLUMN_UNCAP_PROP_NAME_OF_ProductsQuantity); + + _dbNameUncapPropNameMap = java.util.Collections.unmodifiableMap(map); + return _dbNameUncapPropNameMap; + } + + /** {cap-prop-name : db-name} map. */ + private static java.util.Map _capPropNameDbNameMap; + protected static java.util.Map createCapPropNameDbNameMap() { + if (_capPropNameDbNameMap != null) { + return _capPropNameDbNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_CAP_PROP_NAME, TABLE_DB_NAME); + + map.put(COLUMN_CAP_PROP_NAME_OF_OrdersProductsId, COLUMN_DB_NAME_OF_OrdersProductsId); + map.put(COLUMN_CAP_PROP_NAME_OF_OrdersId, COLUMN_DB_NAME_OF_OrdersId); + map.put(COLUMN_CAP_PROP_NAME_OF_ProductsId, COLUMN_DB_NAME_OF_ProductsId); + map.put(COLUMN_CAP_PROP_NAME_OF_ProductsModel, COLUMN_DB_NAME_OF_ProductsModel); + map.put(COLUMN_CAP_PROP_NAME_OF_ProductsName, COLUMN_DB_NAME_OF_ProductsName); + map.put(COLUMN_CAP_PROP_NAME_OF_ProductsPrice, COLUMN_DB_NAME_OF_ProductsPrice); + map.put(COLUMN_CAP_PROP_NAME_OF_FinalPrice, COLUMN_DB_NAME_OF_FinalPrice); + map.put(COLUMN_CAP_PROP_NAME_OF_ProductsTax, COLUMN_DB_NAME_OF_ProductsTax); + map.put(COLUMN_CAP_PROP_NAME_OF_ProductsQuantity, COLUMN_DB_NAME_OF_ProductsQuantity); + + _capPropNameDbNameMap = java.util.Collections.unmodifiableMap(map); + return _capPropNameDbNameMap; + } + + /** {cap-prop-name : uncap-prop-name} map. */ + private static java.util.Map _capPropNameUncapPropNameMap; + protected static java.util.Map createCapPropNameUncapPropNameMap() { + if (_capPropNameUncapPropNameMap != null) { + return _capPropNameUncapPropNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_CAP_PROP_NAME, TABLE_UNCAP_PROP_NAME); + + map.put(COLUMN_CAP_PROP_NAME_OF_OrdersProductsId, COLUMN_UNCAP_PROP_NAME_OF_OrdersProductsId); + map.put(COLUMN_CAP_PROP_NAME_OF_OrdersId, COLUMN_UNCAP_PROP_NAME_OF_OrdersId); + map.put(COLUMN_CAP_PROP_NAME_OF_ProductsId, COLUMN_UNCAP_PROP_NAME_OF_ProductsId); + map.put(COLUMN_CAP_PROP_NAME_OF_ProductsModel, COLUMN_UNCAP_PROP_NAME_OF_ProductsModel); + map.put(COLUMN_CAP_PROP_NAME_OF_ProductsName, COLUMN_UNCAP_PROP_NAME_OF_ProductsName); + map.put(COLUMN_CAP_PROP_NAME_OF_ProductsPrice, COLUMN_UNCAP_PROP_NAME_OF_ProductsPrice); + map.put(COLUMN_CAP_PROP_NAME_OF_FinalPrice, COLUMN_UNCAP_PROP_NAME_OF_FinalPrice); + map.put(COLUMN_CAP_PROP_NAME_OF_ProductsTax, COLUMN_UNCAP_PROP_NAME_OF_ProductsTax); + map.put(COLUMN_CAP_PROP_NAME_OF_ProductsQuantity, COLUMN_UNCAP_PROP_NAME_OF_ProductsQuantity); + + _capPropNameUncapPropNameMap = java.util.Collections.unmodifiableMap(map); + return _capPropNameUncapPropNameMap; + } + + /** {uncap-prop-name : db-name} map. */ + private static java.util.Map _uncapPropNameDbNameMap; + protected static java.util.Map createUncapPropNameDbNameMap() { + if (_uncapPropNameDbNameMap != null) { + return _uncapPropNameDbNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_UNCAP_PROP_NAME, TABLE_DB_NAME); + + map.put(COLUMN_UNCAP_PROP_NAME_OF_OrdersProductsId, COLUMN_DB_NAME_OF_OrdersProductsId); + map.put(COLUMN_UNCAP_PROP_NAME_OF_OrdersId, COLUMN_DB_NAME_OF_OrdersId); + map.put(COLUMN_UNCAP_PROP_NAME_OF_ProductsId, COLUMN_DB_NAME_OF_ProductsId); + map.put(COLUMN_UNCAP_PROP_NAME_OF_ProductsModel, COLUMN_DB_NAME_OF_ProductsModel); + map.put(COLUMN_UNCAP_PROP_NAME_OF_ProductsName, COLUMN_DB_NAME_OF_ProductsName); + map.put(COLUMN_UNCAP_PROP_NAME_OF_ProductsPrice, COLUMN_DB_NAME_OF_ProductsPrice); + map.put(COLUMN_UNCAP_PROP_NAME_OF_FinalPrice, COLUMN_DB_NAME_OF_FinalPrice); + map.put(COLUMN_UNCAP_PROP_NAME_OF_ProductsTax, COLUMN_DB_NAME_OF_ProductsTax); + map.put(COLUMN_UNCAP_PROP_NAME_OF_ProductsQuantity, COLUMN_DB_NAME_OF_ProductsQuantity); + + _uncapPropNameDbNameMap = java.util.Collections.unmodifiableMap(map); + return _uncapPropNameDbNameMap; + } + + /** {uncap-prop-name : cap-prop-name} map. */ + private static java.util.Map _uncapPropNameCapPropNameMap; + protected static java.util.Map createUncapPropNameCapPropNameMap() { + if (_uncapPropNameCapPropNameMap != null) { + return _uncapPropNameCapPropNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_UNCAP_PROP_NAME, TABLE_CAP_PROP_NAME); + + map.put(COLUMN_UNCAP_PROP_NAME_OF_OrdersProductsId, COLUMN_CAP_PROP_NAME_OF_OrdersProductsId); + map.put(COLUMN_UNCAP_PROP_NAME_OF_OrdersId, COLUMN_CAP_PROP_NAME_OF_OrdersId); + map.put(COLUMN_UNCAP_PROP_NAME_OF_ProductsId, COLUMN_CAP_PROP_NAME_OF_ProductsId); + map.put(COLUMN_UNCAP_PROP_NAME_OF_ProductsModel, COLUMN_CAP_PROP_NAME_OF_ProductsModel); + map.put(COLUMN_UNCAP_PROP_NAME_OF_ProductsName, COLUMN_CAP_PROP_NAME_OF_ProductsName); + map.put(COLUMN_UNCAP_PROP_NAME_OF_ProductsPrice, COLUMN_CAP_PROP_NAME_OF_ProductsPrice); + map.put(COLUMN_UNCAP_PROP_NAME_OF_FinalPrice, COLUMN_CAP_PROP_NAME_OF_FinalPrice); + map.put(COLUMN_UNCAP_PROP_NAME_OF_ProductsTax, COLUMN_CAP_PROP_NAME_OF_ProductsTax); + map.put(COLUMN_UNCAP_PROP_NAME_OF_ProductsQuantity, COLUMN_CAP_PROP_NAME_OF_ProductsQuantity); + + _uncapPropNameCapPropNameMap = java.util.Collections.unmodifiableMap(map); + return _uncapPropNameCapPropNameMap; + } + + // =================================================================================== + // Name-Map + // ======== + /** + * This method implements the method that is declared at super. + * + * @return {db-name : cap-prop-name} map. + */ + public java.util.Map getDbNameCapPropNameMap() { + return createDbNameCapPropNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {db-name : uncap-prop-name} map. + */ + public java.util.Map getDbNameUncapPropNameMap() { + return createDbNameUncapPropNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {cap-prop-name : db-name} map. + */ + public java.util.Map getCapPropNameDbNameMap() { + return createCapPropNameDbNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {cap-prop-name : uncap-prop-name} map. + */ + public java.util.Map getCapPropNameUncapPropNameMap() { + return createCapPropNameUncapPropNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {uncap-prop-name : db-name} map. + */ + public java.util.Map getUncapPropNameDbNameMap() { + return createUncapPropNameDbNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {uncap-prop-name : cap-prop-name} map. + */ + public java.util.Map getUncapPropNameCapPropNameMap() { + return createUncapPropNameCapPropNameMap(); + } + + // =================================================================================== + // Table Name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + public String getTableDbName() { + return TABLE_DB_NAME; + } + + /** + * This method implements the method that is declared at super. + * + * @return Table cap-prop-name. (NotNull) + */ + public String getTableCapPropName() { + return TABLE_CAP_PROP_NAME; + } + + /** + * This method implements the method that is declared at super. + * + * @return Table property-name. (NotNull) + */ + public String getTableUncapPropName() { + return TABLE_UNCAP_PROP_NAME; + } + + // =================================================================================== + // Column Name + // =========== + public java.util.List getColumnDbNameList() { + final String[] columns = getColumnDbNameCommaString().split(","); + final java.util.List resultList = new java.util.ArrayList(); + for (int i=0; i < columns.length; i++) { + resultList.add(columns[i].trim()); + } + return resultList; + } + + public java.util.List getColumnCapPropNameList() { + final java.util.List columnDbNameList = getColumnDbNameList(); + final java.util.List resultList = new java.util.ArrayList(); + for (final java.util.Iterator ite = columnDbNameList.iterator(); ite.hasNext(); ) { + resultList.add(getDbNameCapPropNameMap().get((String)ite.next())); + } + return resultList; + } + + public java.util.List getColumnUncapPropNameList() { + final java.util.List columnDbNameList = getColumnDbNameList(); + final java.util.List resultList = new java.util.ArrayList(); + for (final java.util.Iterator ite = columnDbNameList.iterator(); ite.hasNext(); ) { + resultList.add(getDbNameUncapPropNameMap().get((String)ite.next())); + } + return resultList; + } + + /** + * This method implements the method that is declared at super. + * + * @return Column-db-name comma-string. (NotNull) + */ + public String getColumnDbNameCommaString() { + return "ORDERS_PRODUCTS_ID, ORDERS_ID, PRODUCTS_ID, PRODUCTS_MODEL, PRODUCTS_NAME, PRODUCTS_PRICE, FINAL_PRICE, PRODUCTS_TAX, PRODUCTS_QUANTITY"; + } + + // =================================================================================== + // Type Name + // ========= + /** + * This method implements the method that is declared at super. + * + * @return The type-name of entity. (NotNull) + */ + public String getEntityTypeName() { + return "jp.sf.pal.pompei.exentity.OrdersProducts"; + } + + /** + * This method implements the method that is declared at super. + * + * @return The type-name of condition-bean. (NotNull) + */ + public String getConditionBeanTypeName() { + return "jp.sf.pal.pompei.cbean.bs.OrdersProductsCB"; + } + + /** + * This method implements the method that is declared at super. + * + * @return The type-name of dao. (NotNull) + */ + public String getDaoTypeName() { + return "jp.sf.pal.pompei.exdao.OrdersProductsDao"; + } + + /** + * This method implements the method that is declared at super. + * + * @return The type-name of behavior. (NotNull) + */ + public String getBehaviorTypeName() { + return "jp.sf.pal.pompei.exbhv.OrdersProductsBhv"; + } + + // =================================================================================== + // Type + // ==== + /** + * This method implements the method that is declared at super. + * + * @return The type of entity. (NotNull) + */ + public Class getEntityType() { + return ENTITY_TYPE; + } + + // =================================================================================== + // Instance + // ======== + /** + * This method implements the method that is declared at super. + * + * @return The type of entity. (NotNull) + */ + public Entity newEntity() { + return newMyEntity(); + } + + /** + * New the instance of my entity. + * + * @return The instance of my entity. (NotNull) + */ + public OrdersProducts newMyEntity() { + return new OrdersProducts(); + } + + // =================================================================================== + // Foreign DBMeta + // ============== + /** + * This method implements the method that is declared at super. + * + * @param foreignPropertyName Foreign-property-name(Both OK - InitCap or not). (NotNull) + * @return Foreign DBMeta. (NotNull) + */ + public DBMeta getForeignDBMeta(String foreignPropertyName) { + assertStringNotNullAndNotTrimmedEmpty("foreignPropertyName", foreignPropertyName); + final String methodName = "getForeignDBMeta_" + foreignPropertyName.substring(0, 1) + foreignPropertyName.substring(1); + + java.lang.reflect.Method method = null; + try { + method = this.getClass().getMethod(methodName, new Class[]{}); + } catch (NoSuchMethodException e) { + String msg = "The foreignPropertyName is not found: foreignPropertyName=" + foreignPropertyName; + msg = msg + " tableName=" + TABLE_DB_NAME + " methodName=" + methodName; + throw new RuntimeException(msg, e); + } + try { + return (DBMeta)method.invoke(this, new Object[]{}); + } catch (IllegalAccessException e) { + throw new RuntimeException(e); + } catch (java.lang.reflect.InvocationTargetException e) { + throw new RuntimeException(e.getCause()); + } + } + + // =================================================================================== + // Determination + // ============= + /** + * This method implements the method that is declared at super. + * + * @return Determination. + */ + public boolean hasTwoOrMorePrimaryKeys() { + return false; + } + + /** + * This method implements the method that is declared at super. + * + * @return Determination. + */ + public boolean hasCommonColumn() { + return false; + } + + // =================================================================================== + // Entity Handling + // =============== + // ----------------------------------------------------- + // Accept + // ------ + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @param primaryKeyMap Primary key map. (NotNull and NotEmpty) + */ + public void acceptPrimaryKeyMap(Entity entity, java.util.Map primaryKeyMap) { + final OrdersProducts myEntity = (OrdersProducts)entity; + MapAssertUtil.assertPrimaryKeyMapNotNullAndNotEmpty(primaryKeyMap); + final MapStringValueAnalyzer analyzer = new MapStringValueAnalyzer(primaryKeyMap, entity.getModifiedPropertyNames()); + + MapAssertUtil.assertColumnExistingInPrimaryKeyMap(primaryKeyMap, "ORDERS_PRODUCTS_ID"); + if (analyzer.init("ORDERS_PRODUCTS_ID", "ordersProductsId", "ordersProductsId")) { myEntity.setOrdersProductsId(analyzer.analyzeNumber(java.math.BigDecimal.class)); }; + + + } + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @param primaryKeyMapString Primary-key map-string. (NotNull and NotEmpty) + */ + public void acceptPrimaryKeyMapString(Entity entity, String primaryKeyMapString) { + MapStringUtil.acceptPrimaryKeyMapString(primaryKeyMapString, entity); + } + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @param columnValueMap Column-value map. (NotNull and NotEmpty) + */ + public void acceptColumnValueMap(Entity entity, java.util.Map columnValueMap) { + final OrdersProducts myEntity = (OrdersProducts)entity; + MapAssertUtil.assertColumnValueMapNotNullAndNotEmpty(columnValueMap); + final MapStringValueAnalyzer analyzer = new MapStringValueAnalyzer(columnValueMap, entity.getModifiedPropertyNames()); + + if (analyzer.init("ORDERS_PRODUCTS_ID", "ordersProductsId", "ordersProductsId")) { myEntity.setOrdersProductsId(analyzer.analyzeNumber(java.math.BigDecimal.class)); }; + if (analyzer.init("ORDERS_ID", "ordersId", "ordersId")) { myEntity.setOrdersId(analyzer.analyzeNumber(java.math.BigDecimal.class)); }; + if (analyzer.init("PRODUCTS_ID", "productsId", "productsId")) { myEntity.setProductsId(analyzer.analyzeNumber(java.math.BigDecimal.class)); }; + if (analyzer.init("PRODUCTS_MODEL", "productsModel", "productsModel")) { myEntity.setProductsModel(analyzer.analyzeString(String.class)); }; + if (analyzer.init("PRODUCTS_NAME", "productsName", "productsName")) { myEntity.setProductsName(analyzer.analyzeString(String.class)); }; + if (analyzer.init("PRODUCTS_PRICE", "productsPrice", "productsPrice")) { myEntity.setProductsPrice(analyzer.analyzeNumber(java.math.BigDecimal.class)); }; + if (analyzer.init("FINAL_PRICE", "finalPrice", "finalPrice")) { myEntity.setFinalPrice(analyzer.analyzeNumber(java.math.BigDecimal.class)); }; + if (analyzer.init("PRODUCTS_TAX", "productsTax", "productsTax")) { myEntity.setProductsTax(analyzer.analyzeNumber(java.math.BigDecimal.class)); }; + if (analyzer.init("PRODUCTS_QUANTITY", "productsQuantity", "productsQuantity")) { myEntity.setProductsQuantity(analyzer.analyzeNumber(java.math.BigDecimal.class)); }; + + } + + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @param columnValueMapString Column-value map-string. (NotNull and NotEmpty) + */ + public void acceptColumnValueMapString(Entity entity, String columnValueMapString) { + MapStringUtil.acceptColumnValueMapString(columnValueMapString, entity); + } + + + // ----------------------------------------------------- + // Extract + // ------- + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @return Primary-key map-string. (NotNull) + */ + public String extractPrimaryKeyMapString(Entity entity) { + return MapStringUtil.extractPrimaryKeyMapString(entity); + } + + /** + * Extract primary-key map-string. + * + * @param entity Target entity. (NotNull) + * @param startBrace Start-brace. (NotNull) + * @param endBrace End-brace. (NotNull) + * @param delimiter Delimiter. (NotNull) + * @param equal Equal. (NotNull) + * @return Primary-key map-string. (NotNull) + */ + public String extractPrimaryKeyMapString(Entity entity, String startBrace, String endBrace, String delimiter, String equal) { + final OrdersProducts myEntity = (OrdersProducts)entity; + final String mapMarkAndStartBrace = MAP_STRING_MAP_MARK + startBrace; + final StringBuffer sb = new StringBuffer(); + helpAppendingColumnValueString(sb, delimiter, equal, "ORDERS_PRODUCTS_ID", myEntity.getOrdersProductsId()); + + sb.delete(0, delimiter.length()).insert(0, mapMarkAndStartBrace).append(endBrace); + return sb.toString(); + + } + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @return Column-value map-string. (NotNull) + */ + public String extractColumnValueMapString(Entity entity) { + return MapStringUtil.extractColumnValueMapString(entity); + } + + /** + * Extract column-value map-string. + * + * @param entity Target entity. (NotNull) + * @param startBrace Start-brace. (NotNull) + * @param endBrace End-brace. (NotNull) + * @param delimiter Delimiter. (NotNull) + * @param equal Equal. (NotNull) + * @return Column-value map-string. (NotNull) + */ + public String extractColumnValueMapString(Entity entity, String startBrace, String endBrace, String delimiter, String equal) { + final OrdersProducts myEntity = (OrdersProducts)entity; + final String mapMarkAndStartBrace = MAP_STRING_MAP_MARK + startBrace; + final StringBuffer sb = new StringBuffer(); + helpAppendingColumnValueString(sb, delimiter, equal, "ORDERS_PRODUCTS_ID", myEntity.getOrdersProductsId()); + helpAppendingColumnValueString(sb, delimiter, equal, "ORDERS_ID", myEntity.getOrdersId()); + helpAppendingColumnValueString(sb, delimiter, equal, "PRODUCTS_ID", myEntity.getProductsId()); + helpAppendingColumnValueString(sb, delimiter, equal, "PRODUCTS_MODEL", myEntity.getProductsModel()); + helpAppendingColumnValueString(sb, delimiter, equal, "PRODUCTS_NAME", myEntity.getProductsName()); + helpAppendingColumnValueString(sb, delimiter, equal, "PRODUCTS_PRICE", myEntity.getProductsPrice()); + helpAppendingColumnValueString(sb, delimiter, equal, "FINAL_PRICE", myEntity.getFinalPrice()); + helpAppendingColumnValueString(sb, delimiter, equal, "PRODUCTS_TAX", myEntity.getProductsTax()); + helpAppendingColumnValueString(sb, delimiter, equal, "PRODUCTS_QUANTITY", myEntity.getProductsQuantity()); + + sb.delete(0, delimiter.length()).insert(0, mapMarkAndStartBrace).append(endBrace); + return sb.toString(); + } + + private void helpAppendingColumnValueString(StringBuffer sb, String delimiter, String equal, String colName, Object value) { + sb.append(delimiter).append(colName).append(equal); + sb.append(helpGettingColumnStringValue(value)); + } + + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @return Column-value map-string. (NotNull) + */ + public String extractCommonColumnValueMapString(Entity entity) { + return "map:{}"; + } + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @return Column-value map-string. (NotNull) + */ + public String extractCommonColumnValueMapString(Entity entity, String startBrace, String endBrace, String delimiter, String equal) { + return "map:" + startBrace + endBrace; + } + + + // ----------------------------------------------------- + // Convert + // ------- + public java.util.List convertToColumnValueList(Entity entity) { + return new java.util.ArrayList(convertToColumnValueMap(entity).values()); + } + + public java.util.Map convertToColumnValueMap(Entity entity) { + final OrdersProducts myEntity = downcast(entity); + final java.util.Map valueMap = new java.util.LinkedHashMap(); + valueMap.put("ORDERS_PRODUCTS_ID", myEntity.getOrdersProductsId()); + valueMap.put("ORDERS_ID", myEntity.getOrdersId()); + valueMap.put("PRODUCTS_ID", myEntity.getProductsId()); + valueMap.put("PRODUCTS_MODEL", myEntity.getProductsModel()); + valueMap.put("PRODUCTS_NAME", myEntity.getProductsName()); + valueMap.put("PRODUCTS_PRICE", myEntity.getProductsPrice()); + valueMap.put("FINAL_PRICE", myEntity.getFinalPrice()); + valueMap.put("PRODUCTS_TAX", myEntity.getProductsTax()); + valueMap.put("PRODUCTS_QUANTITY", myEntity.getProductsQuantity()); + return valueMap; + } + + public java.util.List convertToColumnStringValueList(Entity entity) { + return new java.util.ArrayList(convertToColumnStringValueMap(entity).values()); + } + + public java.util.Map convertToColumnStringValueMap(Entity entity) { + final OrdersProducts myEntity = downcast(entity); + final java.util.Map valueMap = new java.util.LinkedHashMap(); + valueMap.put("ORDERS_PRODUCTS_ID", helpGettingColumnStringValue(myEntity.getOrdersProductsId())); + valueMap.put("ORDERS_ID", helpGettingColumnStringValue(myEntity.getOrdersId())); + valueMap.put("PRODUCTS_ID", helpGettingColumnStringValue(myEntity.getProductsId())); + valueMap.put("PRODUCTS_MODEL", helpGettingColumnStringValue(myEntity.getProductsModel())); + valueMap.put("PRODUCTS_NAME", helpGettingColumnStringValue(myEntity.getProductsName())); + valueMap.put("PRODUCTS_PRICE", helpGettingColumnStringValue(myEntity.getProductsPrice())); + valueMap.put("FINAL_PRICE", helpGettingColumnStringValue(myEntity.getFinalPrice())); + valueMap.put("PRODUCTS_TAX", helpGettingColumnStringValue(myEntity.getProductsTax())); + valueMap.put("PRODUCTS_QUANTITY", helpGettingColumnStringValue(myEntity.getProductsQuantity())); + return valueMap; + } + + // =================================================================================== + // JDBC Support + // ============ + public String getPreparedInsertClause() { + return "insert into ORDERS_PRODUCTS(ORDERS_PRODUCTS_ID, ORDERS_ID, PRODUCTS_ID, PRODUCTS_MODEL, PRODUCTS_NAME, PRODUCTS_PRICE, FINAL_PRICE, PRODUCTS_TAX, PRODUCTS_QUANTITY) values(? , ? , ? , ? , ? , ? , ? , ? , ? )"; + } + + public String getPreparedInsertClause(String tablePrefix) { + return "insert into " + tablePrefix + "ORDERS_PRODUCTS(ORDERS_PRODUCTS_ID, ORDERS_ID, PRODUCTS_ID, PRODUCTS_MODEL, PRODUCTS_NAME, PRODUCTS_PRICE, FINAL_PRICE, PRODUCTS_TAX, PRODUCTS_QUANTITY) values(? , ? , ? , ? , ? , ? , ? , ? , ? )"; + } + + // =================================================================================== + // Helper + // ====== + protected OrdersProducts downcast(Entity entity) { + assertObjectNotNull("entity", entity); + try { + return (OrdersProducts)entity; + } catch (ClassCastException e) { + String msg = "The entity should be OrdersProducts but it was: " + entity.getClass(); + throw new IllegalStateException(msg, e); + } + } + + protected void checkDowncast(Entity entity) { + downcast(entity); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/dbmeta/OrdersProductsDownloadDbm.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/dbmeta/OrdersProductsDownloadDbm.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/dbmeta/OrdersProductsDownloadDbm.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,720 @@ +package jp.sf.pal.pompei.bsentity.dbmeta; + + +import jp.sf.pal.pompei.allcommon.Entity; +import jp.sf.pal.pompei.allcommon.dbmeta.DBMeta; +import jp.sf.pal.pompei.allcommon.dbmeta.AbstractDBMeta; +import jp.sf.pal.pompei.exentity.OrdersProductsDownload; + +/** + * The dbmeta of ORDERS_PRODUCTS_DOWNLOAD. (Singleton) + * + *
+ * [primary-key]
+ *     ORDERS_PRODUCTS_DOWNLOAD_ID
+ * 
+ * [column-property]
+ *     ORDERS_PRODUCTS_DOWNLOAD_ID, ORDERS_ID, ORDERS_PRODUCTS_ID, ORDERS_PRODUCTS_FILENAME, DOWNLOAD_MAXDAYS, DOWNLOAD_COUNT
+ * 
+ * [foreign-property]
+ *     
+ * 
+ * [refferer-property]
+ *     
+ * 
+ * [sequence]
+ *     
+ * 
+ * [identity]
+ *     
+ * 
+ * [update-date]
+ *     
+ * 
+ * [version-no]
+ *     
+ * 
+ * 
+ * + * @author DBFlute(AutoGenerator) + */ +public class OrdersProductsDownloadDbm extends AbstractDBMeta { + + // =================================================================================== + // Definition + // ========== + /** The type of entity. */ + protected static final Class ENTITY_TYPE = OrdersProductsDownload.class; + + /** Singleton instance. */ + private static final OrdersProductsDownloadDbm _instance = new OrdersProductsDownloadDbm(); + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + private OrdersProductsDownloadDbm() { + } + + // =================================================================================== + // Singleton + // ========= + /** + * Get instance. + * + * @return Singleton instance. (NotNull) + */ + public static OrdersProductsDownloadDbm getInstance() { + return _instance; + } + + // =================================================================================== + // Name Definition + // =============== + /** Table db name. */ + public static final String TABLE_DB_NAME = "ORDERS_PRODUCTS_DOWNLOAD"; + + /** Table cap-prop name. */ + public static final String TABLE_CAP_PROP_NAME = "OrdersProductsDownload"; + + /** Table uncap-prop name. */ + public static final String TABLE_UNCAP_PROP_NAME = "ordersProductsDownload"; + + /** Db-name of OrdersProductsDownloadId. */ + public static final String COLUMN_DB_NAME_OF_OrdersProductsDownloadId = "ORDERS_PRODUCTS_DOWNLOAD_ID"; + /** Db-name of OrdersId. */ + public static final String COLUMN_DB_NAME_OF_OrdersId = "ORDERS_ID"; + /** Db-name of OrdersProductsId. */ + public static final String COLUMN_DB_NAME_OF_OrdersProductsId = "ORDERS_PRODUCTS_ID"; + /** Db-name of OrdersProductsFilename. */ + public static final String COLUMN_DB_NAME_OF_OrdersProductsFilename = "ORDERS_PRODUCTS_FILENAME"; + /** Db-name of DownloadMaxdays. */ + public static final String COLUMN_DB_NAME_OF_DownloadMaxdays = "DOWNLOAD_MAXDAYS"; + /** Db-name of DownloadCount. */ + public static final String COLUMN_DB_NAME_OF_DownloadCount = "DOWNLOAD_COUNT"; + + /** Cap-prop-name of OrdersProductsDownloadId. */ + public static final String COLUMN_CAP_PROP_NAME_OF_OrdersProductsDownloadId = "OrdersProductsDownloadId"; + /** Cap-prop-name of OrdersId. */ + public static final String COLUMN_CAP_PROP_NAME_OF_OrdersId = "OrdersId"; + /** Cap-prop-name of OrdersProductsId. */ + public static final String COLUMN_CAP_PROP_NAME_OF_OrdersProductsId = "OrdersProductsId"; + /** Cap-prop-name of OrdersProductsFilename. */ + public static final String COLUMN_CAP_PROP_NAME_OF_OrdersProductsFilename = "OrdersProductsFilename"; + /** Cap-prop-name of DownloadMaxdays. */ + public static final String COLUMN_CAP_PROP_NAME_OF_DownloadMaxdays = "DownloadMaxdays"; + /** Cap-prop-name of DownloadCount. */ + public static final String COLUMN_CAP_PROP_NAME_OF_DownloadCount = "DownloadCount"; + + + + /** Uncap-prop-name of OrdersProductsDownloadId. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_OrdersProductsDownloadId = "ordersProductsDownloadId"; + /** Uncap-prop-name of OrdersId. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_OrdersId = "ordersId"; + /** Uncap-prop-name of OrdersProductsId. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_OrdersProductsId = "ordersProductsId"; + /** Uncap-prop-name of OrdersProductsFilename. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_OrdersProductsFilename = "ordersProductsFilename"; + /** Uncap-prop-name of DownloadMaxdays. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_DownloadMaxdays = "downloadMaxdays"; + /** Uncap-prop-name of DownloadCount. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_DownloadCount = "downloadCount"; + + + + /** {db-name : cap-prop-name} map. */ + private static java.util.Map _dbNameCapPropNameMap; + protected static java.util.Map createDbNameCapPropNameMap() { + if (_dbNameCapPropNameMap != null) { + return _dbNameCapPropNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_DB_NAME, TABLE_CAP_PROP_NAME); + + map.put(COLUMN_DB_NAME_OF_OrdersProductsDownloadId, COLUMN_CAP_PROP_NAME_OF_OrdersProductsDownloadId); + map.put(COLUMN_DB_NAME_OF_OrdersId, COLUMN_CAP_PROP_NAME_OF_OrdersId); + map.put(COLUMN_DB_NAME_OF_OrdersProductsId, COLUMN_CAP_PROP_NAME_OF_OrdersProductsId); + map.put(COLUMN_DB_NAME_OF_OrdersProductsFilename, COLUMN_CAP_PROP_NAME_OF_OrdersProductsFilename); + map.put(COLUMN_DB_NAME_OF_DownloadMaxdays, COLUMN_CAP_PROP_NAME_OF_DownloadMaxdays); + map.put(COLUMN_DB_NAME_OF_DownloadCount, COLUMN_CAP_PROP_NAME_OF_DownloadCount); + + _dbNameCapPropNameMap = java.util.Collections.unmodifiableMap(map); + return _dbNameCapPropNameMap; + } + + /** {db-name : uncap-prop-name} map. */ + private static java.util.Map _dbNameUncapPropNameMap; + protected static java.util.Map createDbNameUncapPropNameMap() { + if (_dbNameUncapPropNameMap != null) { + return _dbNameUncapPropNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_DB_NAME, TABLE_UNCAP_PROP_NAME); + + map.put(COLUMN_DB_NAME_OF_OrdersProductsDownloadId, COLUMN_UNCAP_PROP_NAME_OF_OrdersProductsDownloadId); + map.put(COLUMN_DB_NAME_OF_OrdersId, COLUMN_UNCAP_PROP_NAME_OF_OrdersId); + map.put(COLUMN_DB_NAME_OF_OrdersProductsId, COLUMN_UNCAP_PROP_NAME_OF_OrdersProductsId); + map.put(COLUMN_DB_NAME_OF_OrdersProductsFilename, COLUMN_UNCAP_PROP_NAME_OF_OrdersProductsFilename); + map.put(COLUMN_DB_NAME_OF_DownloadMaxdays, COLUMN_UNCAP_PROP_NAME_OF_DownloadMaxdays); + map.put(COLUMN_DB_NAME_OF_DownloadCount, COLUMN_UNCAP_PROP_NAME_OF_DownloadCount); + + _dbNameUncapPropNameMap = java.util.Collections.unmodifiableMap(map); + return _dbNameUncapPropNameMap; + } + + /** {cap-prop-name : db-name} map. */ + private static java.util.Map _capPropNameDbNameMap; + protected static java.util.Map createCapPropNameDbNameMap() { + if (_capPropNameDbNameMap != null) { + return _capPropNameDbNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_CAP_PROP_NAME, TABLE_DB_NAME); + + map.put(COLUMN_CAP_PROP_NAME_OF_OrdersProductsDownloadId, COLUMN_DB_NAME_OF_OrdersProductsDownloadId); + map.put(COLUMN_CAP_PROP_NAME_OF_OrdersId, COLUMN_DB_NAME_OF_OrdersId); + map.put(COLUMN_CAP_PROP_NAME_OF_OrdersProductsId, COLUMN_DB_NAME_OF_OrdersProductsId); + map.put(COLUMN_CAP_PROP_NAME_OF_OrdersProductsFilename, COLUMN_DB_NAME_OF_OrdersProductsFilename); + map.put(COLUMN_CAP_PROP_NAME_OF_DownloadMaxdays, COLUMN_DB_NAME_OF_DownloadMaxdays); + map.put(COLUMN_CAP_PROP_NAME_OF_DownloadCount, COLUMN_DB_NAME_OF_DownloadCount); + + _capPropNameDbNameMap = java.util.Collections.unmodifiableMap(map); + return _capPropNameDbNameMap; + } + + /** {cap-prop-name : uncap-prop-name} map. */ + private static java.util.Map _capPropNameUncapPropNameMap; + protected static java.util.Map createCapPropNameUncapPropNameMap() { + if (_capPropNameUncapPropNameMap != null) { + return _capPropNameUncapPropNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_CAP_PROP_NAME, TABLE_UNCAP_PROP_NAME); + + map.put(COLUMN_CAP_PROP_NAME_OF_OrdersProductsDownloadId, COLUMN_UNCAP_PROP_NAME_OF_OrdersProductsDownloadId); + map.put(COLUMN_CAP_PROP_NAME_OF_OrdersId, COLUMN_UNCAP_PROP_NAME_OF_OrdersId); + map.put(COLUMN_CAP_PROP_NAME_OF_OrdersProductsId, COLUMN_UNCAP_PROP_NAME_OF_OrdersProductsId); + map.put(COLUMN_CAP_PROP_NAME_OF_OrdersProductsFilename, COLUMN_UNCAP_PROP_NAME_OF_OrdersProductsFilename); + map.put(COLUMN_CAP_PROP_NAME_OF_DownloadMaxdays, COLUMN_UNCAP_PROP_NAME_OF_DownloadMaxdays); + map.put(COLUMN_CAP_PROP_NAME_OF_DownloadCount, COLUMN_UNCAP_PROP_NAME_OF_DownloadCount); + + _capPropNameUncapPropNameMap = java.util.Collections.unmodifiableMap(map); + return _capPropNameUncapPropNameMap; + } + + /** {uncap-prop-name : db-name} map. */ + private static java.util.Map _uncapPropNameDbNameMap; + protected static java.util.Map createUncapPropNameDbNameMap() { + if (_uncapPropNameDbNameMap != null) { + return _uncapPropNameDbNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_UNCAP_PROP_NAME, TABLE_DB_NAME); + + map.put(COLUMN_UNCAP_PROP_NAME_OF_OrdersProductsDownloadId, COLUMN_DB_NAME_OF_OrdersProductsDownloadId); + map.put(COLUMN_UNCAP_PROP_NAME_OF_OrdersId, COLUMN_DB_NAME_OF_OrdersId); + map.put(COLUMN_UNCAP_PROP_NAME_OF_OrdersProductsId, COLUMN_DB_NAME_OF_OrdersProductsId); + map.put(COLUMN_UNCAP_PROP_NAME_OF_OrdersProductsFilename, COLUMN_DB_NAME_OF_OrdersProductsFilename); + map.put(COLUMN_UNCAP_PROP_NAME_OF_DownloadMaxdays, COLUMN_DB_NAME_OF_DownloadMaxdays); + map.put(COLUMN_UNCAP_PROP_NAME_OF_DownloadCount, COLUMN_DB_NAME_OF_DownloadCount); + + _uncapPropNameDbNameMap = java.util.Collections.unmodifiableMap(map); + return _uncapPropNameDbNameMap; + } + + /** {uncap-prop-name : cap-prop-name} map. */ + private static java.util.Map _uncapPropNameCapPropNameMap; + protected static java.util.Map createUncapPropNameCapPropNameMap() { + if (_uncapPropNameCapPropNameMap != null) { + return _uncapPropNameCapPropNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_UNCAP_PROP_NAME, TABLE_CAP_PROP_NAME); + + map.put(COLUMN_UNCAP_PROP_NAME_OF_OrdersProductsDownloadId, COLUMN_CAP_PROP_NAME_OF_OrdersProductsDownloadId); + map.put(COLUMN_UNCAP_PROP_NAME_OF_OrdersId, COLUMN_CAP_PROP_NAME_OF_OrdersId); + map.put(COLUMN_UNCAP_PROP_NAME_OF_OrdersProductsId, COLUMN_CAP_PROP_NAME_OF_OrdersProductsId); + map.put(COLUMN_UNCAP_PROP_NAME_OF_OrdersProductsFilename, COLUMN_CAP_PROP_NAME_OF_OrdersProductsFilename); + map.put(COLUMN_UNCAP_PROP_NAME_OF_DownloadMaxdays, COLUMN_CAP_PROP_NAME_OF_DownloadMaxdays); + map.put(COLUMN_UNCAP_PROP_NAME_OF_DownloadCount, COLUMN_CAP_PROP_NAME_OF_DownloadCount); + + _uncapPropNameCapPropNameMap = java.util.Collections.unmodifiableMap(map); + return _uncapPropNameCapPropNameMap; + } + + // =================================================================================== + // Name-Map + // ======== + /** + * This method implements the method that is declared at super. + * + * @return {db-name : cap-prop-name} map. + */ + public java.util.Map getDbNameCapPropNameMap() { + return createDbNameCapPropNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {db-name : uncap-prop-name} map. + */ + public java.util.Map getDbNameUncapPropNameMap() { + return createDbNameUncapPropNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {cap-prop-name : db-name} map. + */ + public java.util.Map getCapPropNameDbNameMap() { + return createCapPropNameDbNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {cap-prop-name : uncap-prop-name} map. + */ + public java.util.Map getCapPropNameUncapPropNameMap() { + return createCapPropNameUncapPropNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {uncap-prop-name : db-name} map. + */ + public java.util.Map getUncapPropNameDbNameMap() { + return createUncapPropNameDbNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {uncap-prop-name : cap-prop-name} map. + */ + public java.util.Map getUncapPropNameCapPropNameMap() { + return createUncapPropNameCapPropNameMap(); + } + + // =================================================================================== + // Table Name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + public String getTableDbName() { + return TABLE_DB_NAME; + } + + /** + * This method implements the method that is declared at super. + * + * @return Table cap-prop-name. (NotNull) + */ + public String getTableCapPropName() { + return TABLE_CAP_PROP_NAME; + } + + /** + * This method implements the method that is declared at super. + * + * @return Table property-name. (NotNull) + */ + public String getTableUncapPropName() { + return TABLE_UNCAP_PROP_NAME; + } + + // =================================================================================== + // Column Name + // =========== + public java.util.List getColumnDbNameList() { + final String[] columns = getColumnDbNameCommaString().split(","); + final java.util.List resultList = new java.util.ArrayList(); + for (int i=0; i < columns.length; i++) { + resultList.add(columns[i].trim()); + } + return resultList; + } + + public java.util.List getColumnCapPropNameList() { + final java.util.List columnDbNameList = getColumnDbNameList(); + final java.util.List resultList = new java.util.ArrayList(); + for (final java.util.Iterator ite = columnDbNameList.iterator(); ite.hasNext(); ) { + resultList.add(getDbNameCapPropNameMap().get((String)ite.next())); + } + return resultList; + } + + public java.util.List getColumnUncapPropNameList() { + final java.util.List columnDbNameList = getColumnDbNameList(); + final java.util.List resultList = new java.util.ArrayList(); + for (final java.util.Iterator ite = columnDbNameList.iterator(); ite.hasNext(); ) { + resultList.add(getDbNameUncapPropNameMap().get((String)ite.next())); + } + return resultList; + } + + /** + * This method implements the method that is declared at super. + * + * @return Column-db-name comma-string. (NotNull) + */ + public String getColumnDbNameCommaString() { + return "ORDERS_PRODUCTS_DOWNLOAD_ID, ORDERS_ID, ORDERS_PRODUCTS_ID, ORDERS_PRODUCTS_FILENAME, DOWNLOAD_MAXDAYS, DOWNLOAD_COUNT"; + } + + // =================================================================================== + // Type Name + // ========= + /** + * This method implements the method that is declared at super. + * + * @return The type-name of entity. (NotNull) + */ + public String getEntityTypeName() { + return "jp.sf.pal.pompei.exentity.OrdersProductsDownload"; + } + + /** + * This method implements the method that is declared at super. + * + * @return The type-name of condition-bean. (NotNull) + */ + public String getConditionBeanTypeName() { + return "jp.sf.pal.pompei.cbean.bs.OrdersProductsDownloadCB"; + } + + /** + * This method implements the method that is declared at super. + * + * @return The type-name of dao. (NotNull) + */ + public String getDaoTypeName() { + return "jp.sf.pal.pompei.exdao.OrdersProductsDownloadDao"; + } + + /** + * This method implements the method that is declared at super. + * + * @return The type-name of behavior. (NotNull) + */ + public String getBehaviorTypeName() { + return "jp.sf.pal.pompei.exbhv.OrdersProductsDownloadBhv"; + } + + // =================================================================================== + // Type + // ==== + /** + * This method implements the method that is declared at super. + * + * @return The type of entity. (NotNull) + */ + public Class getEntityType() { + return ENTITY_TYPE; + } + + // =================================================================================== + // Instance + // ======== + /** + * This method implements the method that is declared at super. + * + * @return The type of entity. (NotNull) + */ + public Entity newEntity() { + return newMyEntity(); + } + + /** + * New the instance of my entity. + * + * @return The instance of my entity. (NotNull) + */ + public OrdersProductsDownload newMyEntity() { + return new OrdersProductsDownload(); + } + + // =================================================================================== + // Foreign DBMeta + // ============== + /** + * This method implements the method that is declared at super. + * + * @param foreignPropertyName Foreign-property-name(Both OK - InitCap or not). (NotNull) + * @return Foreign DBMeta. (NotNull) + */ + public DBMeta getForeignDBMeta(String foreignPropertyName) { + assertStringNotNullAndNotTrimmedEmpty("foreignPropertyName", foreignPropertyName); + final String methodName = "getForeignDBMeta_" + foreignPropertyName.substring(0, 1) + foreignPropertyName.substring(1); + + java.lang.reflect.Method method = null; + try { + method = this.getClass().getMethod(methodName, new Class[]{}); + } catch (NoSuchMethodException e) { + String msg = "The foreignPropertyName is not found: foreignPropertyName=" + foreignPropertyName; + msg = msg + " tableName=" + TABLE_DB_NAME + " methodName=" + methodName; + throw new RuntimeException(msg, e); + } + try { + return (DBMeta)method.invoke(this, new Object[]{}); + } catch (IllegalAccessException e) { + throw new RuntimeException(e); + } catch (java.lang.reflect.InvocationTargetException e) { + throw new RuntimeException(e.getCause()); + } + } + + // =================================================================================== + // Determination + // ============= + /** + * This method implements the method that is declared at super. + * + * @return Determination. + */ + public boolean hasTwoOrMorePrimaryKeys() { + return false; + } + + /** + * This method implements the method that is declared at super. + * + * @return Determination. + */ + public boolean hasCommonColumn() { + return false; + } + + // =================================================================================== + // Entity Handling + // =============== + // ----------------------------------------------------- + // Accept + // ------ + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @param primaryKeyMap Primary key map. (NotNull and NotEmpty) + */ + public void acceptPrimaryKeyMap(Entity entity, java.util.Map primaryKeyMap) { + final OrdersProductsDownload myEntity = (OrdersProductsDownload)entity; + MapAssertUtil.assertPrimaryKeyMapNotNullAndNotEmpty(primaryKeyMap); + final MapStringValueAnalyzer analyzer = new MapStringValueAnalyzer(primaryKeyMap, entity.getModifiedPropertyNames()); + + MapAssertUtil.assertColumnExistingInPrimaryKeyMap(primaryKeyMap, "ORDERS_PRODUCTS_DOWNLOAD_ID"); + if (analyzer.init("ORDERS_PRODUCTS_DOWNLOAD_ID", "ordersProductsDownloadId", "ordersProductsDownloadId")) { myEntity.setOrdersProductsDownloadId(analyzer.analyzeNumber(java.math.BigDecimal.class)); }; + + + } + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @param primaryKeyMapString Primary-key map-string. (NotNull and NotEmpty) + */ + public void acceptPrimaryKeyMapString(Entity entity, String primaryKeyMapString) { + MapStringUtil.acceptPrimaryKeyMapString(primaryKeyMapString, entity); + } + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @param columnValueMap Column-value map. (NotNull and NotEmpty) + */ + public void acceptColumnValueMap(Entity entity, java.util.Map columnValueMap) { + final OrdersProductsDownload myEntity = (OrdersProductsDownload)entity; + MapAssertUtil.assertColumnValueMapNotNullAndNotEmpty(columnValueMap); + final MapStringValueAnalyzer analyzer = new MapStringValueAnalyzer(columnValueMap, entity.getModifiedPropertyNames()); + + if (analyzer.init("ORDERS_PRODUCTS_DOWNLOAD_ID", "ordersProductsDownloadId", "ordersProductsDownloadId")) { myEntity.setOrdersProductsDownloadId(analyzer.analyzeNumber(java.math.BigDecimal.class)); }; + if (analyzer.init("ORDERS_ID", "ordersId", "ordersId")) { myEntity.setOrdersId(analyzer.analyzeNumber(java.math.BigDecimal.class)); }; + if (analyzer.init("ORDERS_PRODUCTS_ID", "ordersProductsId", "ordersProductsId")) { myEntity.setOrdersProductsId(analyzer.analyzeNumber(java.math.BigDecimal.class)); }; + if (analyzer.init("ORDERS_PRODUCTS_FILENAME", "ordersProductsFilename", "ordersProductsFilename")) { myEntity.setOrdersProductsFilename(analyzer.analyzeString(String.class)); }; + if (analyzer.init("DOWNLOAD_MAXDAYS", "downloadMaxdays", "downloadMaxdays")) { myEntity.setDownloadMaxdays(analyzer.analyzeNumber(java.math.BigDecimal.class)); }; + if (analyzer.init("DOWNLOAD_COUNT", "downloadCount", "downloadCount")) { myEntity.setDownloadCount(analyzer.analyzeNumber(java.math.BigDecimal.class)); }; + + } + + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @param columnValueMapString Column-value map-string. (NotNull and NotEmpty) + */ + public void acceptColumnValueMapString(Entity entity, String columnValueMapString) { + MapStringUtil.acceptColumnValueMapString(columnValueMapString, entity); + } + + + // ----------------------------------------------------- + // Extract + // ------- + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @return Primary-key map-string. (NotNull) + */ + public String extractPrimaryKeyMapString(Entity entity) { + return MapStringUtil.extractPrimaryKeyMapString(entity); + } + + /** + * Extract primary-key map-string. + * + * @param entity Target entity. (NotNull) + * @param startBrace Start-brace. (NotNull) + * @param endBrace End-brace. (NotNull) + * @param delimiter Delimiter. (NotNull) + * @param equal Equal. (NotNull) + * @return Primary-key map-string. (NotNull) + */ + public String extractPrimaryKeyMapString(Entity entity, String startBrace, String endBrace, String delimiter, String equal) { + final OrdersProductsDownload myEntity = (OrdersProductsDownload)entity; + final String mapMarkAndStartBrace = MAP_STRING_MAP_MARK + startBrace; + final StringBuffer sb = new StringBuffer(); + helpAppendingColumnValueString(sb, delimiter, equal, "ORDERS_PRODUCTS_DOWNLOAD_ID", myEntity.getOrdersProductsDownloadId()); + + sb.delete(0, delimiter.length()).insert(0, mapMarkAndStartBrace).append(endBrace); + return sb.toString(); + + } + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @return Column-value map-string. (NotNull) + */ + public String extractColumnValueMapString(Entity entity) { + return MapStringUtil.extractColumnValueMapString(entity); + } + + /** + * Extract column-value map-string. + * + * @param entity Target entity. (NotNull) + * @param startBrace Start-brace. (NotNull) + * @param endBrace End-brace. (NotNull) + * @param delimiter Delimiter. (NotNull) + * @param equal Equal. (NotNull) + * @return Column-value map-string. (NotNull) + */ + public String extractColumnValueMapString(Entity entity, String startBrace, String endBrace, String delimiter, String equal) { + final OrdersProductsDownload myEntity = (OrdersProductsDownload)entity; + final String mapMarkAndStartBrace = MAP_STRING_MAP_MARK + startBrace; + final StringBuffer sb = new StringBuffer(); + helpAppendingColumnValueString(sb, delimiter, equal, "ORDERS_PRODUCTS_DOWNLOAD_ID", myEntity.getOrdersProductsDownloadId()); + helpAppendingColumnValueString(sb, delimiter, equal, "ORDERS_ID", myEntity.getOrdersId()); + helpAppendingColumnValueString(sb, delimiter, equal, "ORDERS_PRODUCTS_ID", myEntity.getOrdersProductsId()); + helpAppendingColumnValueString(sb, delimiter, equal, "ORDERS_PRODUCTS_FILENAME", myEntity.getOrdersProductsFilename()); + helpAppendingColumnValueString(sb, delimiter, equal, "DOWNLOAD_MAXDAYS", myEntity.getDownloadMaxdays()); + helpAppendingColumnValueString(sb, delimiter, equal, "DOWNLOAD_COUNT", myEntity.getDownloadCount()); + + sb.delete(0, delimiter.length()).insert(0, mapMarkAndStartBrace).append(endBrace); + return sb.toString(); + } + + private void helpAppendingColumnValueString(StringBuffer sb, String delimiter, String equal, String colName, Object value) { + sb.append(delimiter).append(colName).append(equal); + sb.append(helpGettingColumnStringValue(value)); + } + + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @return Column-value map-string. (NotNull) + */ + public String extractCommonColumnValueMapString(Entity entity) { + return "map:{}"; + } + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @return Column-value map-string. (NotNull) + */ + public String extractCommonColumnValueMapString(Entity entity, String startBrace, String endBrace, String delimiter, String equal) { + return "map:" + startBrace + endBrace; + } + + + // ----------------------------------------------------- + // Convert + // ------- + public java.util.List convertToColumnValueList(Entity entity) { + return new java.util.ArrayList(convertToColumnValueMap(entity).values()); + } + + public java.util.Map convertToColumnValueMap(Entity entity) { + final OrdersProductsDownload myEntity = downcast(entity); + final java.util.Map valueMap = new java.util.LinkedHashMap(); + valueMap.put("ORDERS_PRODUCTS_DOWNLOAD_ID", myEntity.getOrdersProductsDownloadId()); + valueMap.put("ORDERS_ID", myEntity.getOrdersId()); + valueMap.put("ORDERS_PRODUCTS_ID", myEntity.getOrdersProductsId()); + valueMap.put("ORDERS_PRODUCTS_FILENAME", myEntity.getOrdersProductsFilename()); + valueMap.put("DOWNLOAD_MAXDAYS", myEntity.getDownloadMaxdays()); + valueMap.put("DOWNLOAD_COUNT", myEntity.getDownloadCount()); + return valueMap; + } + + public java.util.List convertToColumnStringValueList(Entity entity) { + return new java.util.ArrayList(convertToColumnStringValueMap(entity).values()); + } + + public java.util.Map convertToColumnStringValueMap(Entity entity) { + final OrdersProductsDownload myEntity = downcast(entity); + final java.util.Map valueMap = new java.util.LinkedHashMap(); + valueMap.put("ORDERS_PRODUCTS_DOWNLOAD_ID", helpGettingColumnStringValue(myEntity.getOrdersProductsDownloadId())); + valueMap.put("ORDERS_ID", helpGettingColumnStringValue(myEntity.getOrdersId())); + valueMap.put("ORDERS_PRODUCTS_ID", helpGettingColumnStringValue(myEntity.getOrdersProductsId())); + valueMap.put("ORDERS_PRODUCTS_FILENAME", helpGettingColumnStringValue(myEntity.getOrdersProductsFilename())); + valueMap.put("DOWNLOAD_MAXDAYS", helpGettingColumnStringValue(myEntity.getDownloadMaxdays())); + valueMap.put("DOWNLOAD_COUNT", helpGettingColumnStringValue(myEntity.getDownloadCount())); + return valueMap; + } + + // =================================================================================== + // JDBC Support + // ============ + public String getPreparedInsertClause() { + return "insert into ORDERS_PRODUCTS_DOWNLOAD(ORDERS_PRODUCTS_DOWNLOAD_ID, ORDERS_ID, ORDERS_PRODUCTS_ID, ORDERS_PRODUCTS_FILENAME, DOWNLOAD_MAXDAYS, DOWNLOAD_COUNT) values(? , ? , ? , ? , ? , ? )"; + } + + public String getPreparedInsertClause(String tablePrefix) { + return "insert into " + tablePrefix + "ORDERS_PRODUCTS_DOWNLOAD(ORDERS_PRODUCTS_DOWNLOAD_ID, ORDERS_ID, ORDERS_PRODUCTS_ID, ORDERS_PRODUCTS_FILENAME, DOWNLOAD_MAXDAYS, DOWNLOAD_COUNT) values(? , ? , ? , ? , ? , ? )"; + } + + // =================================================================================== + // Helper + // ====== + protected OrdersProductsDownload downcast(Entity entity) { + assertObjectNotNull("entity", entity); + try { + return (OrdersProductsDownload)entity; + } catch (ClassCastException e) { + String msg = "The entity should be OrdersProductsDownload but it was: " + entity.getClass(); + throw new IllegalStateException(msg, e); + } + } + + protected void checkDowncast(Entity entity) { + downcast(entity); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/dbmeta/OrdersStatusDbm.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/dbmeta/OrdersStatusDbm.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/dbmeta/OrdersStatusDbm.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,675 @@ +package jp.sf.pal.pompei.bsentity.dbmeta; + + +import jp.sf.pal.pompei.allcommon.Entity; +import jp.sf.pal.pompei.allcommon.dbmeta.DBMeta; +import jp.sf.pal.pompei.allcommon.dbmeta.AbstractDBMeta; +import jp.sf.pal.pompei.exentity.OrdersStatus; + +/** + * The dbmeta of ORDERS_STATUS. (Singleton) + * + *
+ * [primary-key]
+ *     ORDERS_STATUS_ID, LANGUAGE_ID
+ * 
+ * [column-property]
+ *     ORDERS_STATUS_ID, LANGUAGE_ID, ORDERS_STATUS_NAME
+ * 
+ * [foreign-property]
+ *     
+ * 
+ * [refferer-property]
+ *     
+ * 
+ * [sequence]
+ *     
+ * 
+ * [identity]
+ *     
+ * 
+ * [update-date]
+ *     
+ * 
+ * [version-no]
+ *     
+ * 
+ * 
+ * + * @author DBFlute(AutoGenerator) + */ +public class OrdersStatusDbm extends AbstractDBMeta { + + // =================================================================================== + // Definition + // ========== + /** The type of entity. */ + protected static final Class ENTITY_TYPE = OrdersStatus.class; + + /** Singleton instance. */ + private static final OrdersStatusDbm _instance = new OrdersStatusDbm(); + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + private OrdersStatusDbm() { + } + + // =================================================================================== + // Singleton + // ========= + /** + * Get instance. + * + * @return Singleton instance. (NotNull) + */ + public static OrdersStatusDbm getInstance() { + return _instance; + } + + // =================================================================================== + // Name Definition + // =============== + /** Table db name. */ + public static final String TABLE_DB_NAME = "ORDERS_STATUS"; + + /** Table cap-prop name. */ + public static final String TABLE_CAP_PROP_NAME = "OrdersStatus"; + + /** Table uncap-prop name. */ + public static final String TABLE_UNCAP_PROP_NAME = "ordersStatus"; + + /** Db-name of OrdersStatusId. */ + public static final String COLUMN_DB_NAME_OF_OrdersStatusId = "ORDERS_STATUS_ID"; + /** Db-name of LanguageId. */ + public static final String COLUMN_DB_NAME_OF_LanguageId = "LANGUAGE_ID"; + /** Db-name of OrdersStatusName. */ + public static final String COLUMN_DB_NAME_OF_OrdersStatusName = "ORDERS_STATUS_NAME"; + + /** Cap-prop-name of OrdersStatusId. */ + public static final String COLUMN_CAP_PROP_NAME_OF_OrdersStatusId = "OrdersStatusId"; + /** Cap-prop-name of LanguageId. */ + public static final String COLUMN_CAP_PROP_NAME_OF_LanguageId = "LanguageId"; + /** Cap-prop-name of OrdersStatusName. */ + public static final String COLUMN_CAP_PROP_NAME_OF_OrdersStatusName = "OrdersStatusName"; + + + + /** Uncap-prop-name of OrdersStatusId. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_OrdersStatusId = "ordersStatusId"; + /** Uncap-prop-name of LanguageId. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_LanguageId = "languageId"; + /** Uncap-prop-name of OrdersStatusName. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_OrdersStatusName = "ordersStatusName"; + + + + /** {db-name : cap-prop-name} map. */ + private static java.util.Map _dbNameCapPropNameMap; + protected static java.util.Map createDbNameCapPropNameMap() { + if (_dbNameCapPropNameMap != null) { + return _dbNameCapPropNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_DB_NAME, TABLE_CAP_PROP_NAME); + + map.put(COLUMN_DB_NAME_OF_OrdersStatusId, COLUMN_CAP_PROP_NAME_OF_OrdersStatusId); + map.put(COLUMN_DB_NAME_OF_LanguageId, COLUMN_CAP_PROP_NAME_OF_LanguageId); + map.put(COLUMN_DB_NAME_OF_OrdersStatusName, COLUMN_CAP_PROP_NAME_OF_OrdersStatusName); + + _dbNameCapPropNameMap = java.util.Collections.unmodifiableMap(map); + return _dbNameCapPropNameMap; + } + + /** {db-name : uncap-prop-name} map. */ + private static java.util.Map _dbNameUncapPropNameMap; + protected static java.util.Map createDbNameUncapPropNameMap() { + if (_dbNameUncapPropNameMap != null) { + return _dbNameUncapPropNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_DB_NAME, TABLE_UNCAP_PROP_NAME); + + map.put(COLUMN_DB_NAME_OF_OrdersStatusId, COLUMN_UNCAP_PROP_NAME_OF_OrdersStatusId); + map.put(COLUMN_DB_NAME_OF_LanguageId, COLUMN_UNCAP_PROP_NAME_OF_LanguageId); + map.put(COLUMN_DB_NAME_OF_OrdersStatusName, COLUMN_UNCAP_PROP_NAME_OF_OrdersStatusName); + + _dbNameUncapPropNameMap = java.util.Collections.unmodifiableMap(map); + return _dbNameUncapPropNameMap; + } + + /** {cap-prop-name : db-name} map. */ + private static java.util.Map _capPropNameDbNameMap; + protected static java.util.Map createCapPropNameDbNameMap() { + if (_capPropNameDbNameMap != null) { + return _capPropNameDbNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_CAP_PROP_NAME, TABLE_DB_NAME); + + map.put(COLUMN_CAP_PROP_NAME_OF_OrdersStatusId, COLUMN_DB_NAME_OF_OrdersStatusId); + map.put(COLUMN_CAP_PROP_NAME_OF_LanguageId, COLUMN_DB_NAME_OF_LanguageId); + map.put(COLUMN_CAP_PROP_NAME_OF_OrdersStatusName, COLUMN_DB_NAME_OF_OrdersStatusName); + + _capPropNameDbNameMap = java.util.Collections.unmodifiableMap(map); + return _capPropNameDbNameMap; + } + + /** {cap-prop-name : uncap-prop-name} map. */ + private static java.util.Map _capPropNameUncapPropNameMap; + protected static java.util.Map createCapPropNameUncapPropNameMap() { + if (_capPropNameUncapPropNameMap != null) { + return _capPropNameUncapPropNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_CAP_PROP_NAME, TABLE_UNCAP_PROP_NAME); + + map.put(COLUMN_CAP_PROP_NAME_OF_OrdersStatusId, COLUMN_UNCAP_PROP_NAME_OF_OrdersStatusId); + map.put(COLUMN_CAP_PROP_NAME_OF_LanguageId, COLUMN_UNCAP_PROP_NAME_OF_LanguageId); + map.put(COLUMN_CAP_PROP_NAME_OF_OrdersStatusName, COLUMN_UNCAP_PROP_NAME_OF_OrdersStatusName); + + _capPropNameUncapPropNameMap = java.util.Collections.unmodifiableMap(map); + return _capPropNameUncapPropNameMap; + } + + /** {uncap-prop-name : db-name} map. */ + private static java.util.Map _uncapPropNameDbNameMap; + protected static java.util.Map createUncapPropNameDbNameMap() { + if (_uncapPropNameDbNameMap != null) { + return _uncapPropNameDbNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_UNCAP_PROP_NAME, TABLE_DB_NAME); + + map.put(COLUMN_UNCAP_PROP_NAME_OF_OrdersStatusId, COLUMN_DB_NAME_OF_OrdersStatusId); + map.put(COLUMN_UNCAP_PROP_NAME_OF_LanguageId, COLUMN_DB_NAME_OF_LanguageId); + map.put(COLUMN_UNCAP_PROP_NAME_OF_OrdersStatusName, COLUMN_DB_NAME_OF_OrdersStatusName); + + _uncapPropNameDbNameMap = java.util.Collections.unmodifiableMap(map); + return _uncapPropNameDbNameMap; + } + + /** {uncap-prop-name : cap-prop-name} map. */ + private static java.util.Map _uncapPropNameCapPropNameMap; + protected static java.util.Map createUncapPropNameCapPropNameMap() { + if (_uncapPropNameCapPropNameMap != null) { + return _uncapPropNameCapPropNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_UNCAP_PROP_NAME, TABLE_CAP_PROP_NAME); + + map.put(COLUMN_UNCAP_PROP_NAME_OF_OrdersStatusId, COLUMN_CAP_PROP_NAME_OF_OrdersStatusId); + map.put(COLUMN_UNCAP_PROP_NAME_OF_LanguageId, COLUMN_CAP_PROP_NAME_OF_LanguageId); + map.put(COLUMN_UNCAP_PROP_NAME_OF_OrdersStatusName, COLUMN_CAP_PROP_NAME_OF_OrdersStatusName); + + _uncapPropNameCapPropNameMap = java.util.Collections.unmodifiableMap(map); + return _uncapPropNameCapPropNameMap; + } + + // =================================================================================== + // Name-Map + // ======== + /** + * This method implements the method that is declared at super. + * + * @return {db-name : cap-prop-name} map. + */ + public java.util.Map getDbNameCapPropNameMap() { + return createDbNameCapPropNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {db-name : uncap-prop-name} map. + */ + public java.util.Map getDbNameUncapPropNameMap() { + return createDbNameUncapPropNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {cap-prop-name : db-name} map. + */ + public java.util.Map getCapPropNameDbNameMap() { + return createCapPropNameDbNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {cap-prop-name : uncap-prop-name} map. + */ + public java.util.Map getCapPropNameUncapPropNameMap() { + return createCapPropNameUncapPropNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {uncap-prop-name : db-name} map. + */ + public java.util.Map getUncapPropNameDbNameMap() { + return createUncapPropNameDbNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {uncap-prop-name : cap-prop-name} map. + */ + public java.util.Map getUncapPropNameCapPropNameMap() { + return createUncapPropNameCapPropNameMap(); + } + + // =================================================================================== + // Table Name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + public String getTableDbName() { + return TABLE_DB_NAME; + } + + /** + * This method implements the method that is declared at super. + * + * @return Table cap-prop-name. (NotNull) + */ + public String getTableCapPropName() { + return TABLE_CAP_PROP_NAME; + } + + /** + * This method implements the method that is declared at super. + * + * @return Table property-name. (NotNull) + */ + public String getTableUncapPropName() { + return TABLE_UNCAP_PROP_NAME; + } + + // =================================================================================== + // Column Name + // =========== + public java.util.List getColumnDbNameList() { + final String[] columns = getColumnDbNameCommaString().split(","); + final java.util.List resultList = new java.util.ArrayList(); + for (int i=0; i < columns.length; i++) { + resultList.add(columns[i].trim()); + } + return resultList; + } + + public java.util.List getColumnCapPropNameList() { + final java.util.List columnDbNameList = getColumnDbNameList(); + final java.util.List resultList = new java.util.ArrayList(); + for (final java.util.Iterator ite = columnDbNameList.iterator(); ite.hasNext(); ) { + resultList.add(getDbNameCapPropNameMap().get((String)ite.next())); + } + return resultList; + } + + public java.util.List getColumnUncapPropNameList() { + final java.util.List columnDbNameList = getColumnDbNameList(); + final java.util.List resultList = new java.util.ArrayList(); + for (final java.util.Iterator ite = columnDbNameList.iterator(); ite.hasNext(); ) { + resultList.add(getDbNameUncapPropNameMap().get((String)ite.next())); + } + return resultList; + } + + /** + * This method implements the method that is declared at super. + * + * @return Column-db-name comma-string. (NotNull) + */ + public String getColumnDbNameCommaString() { + return "ORDERS_STATUS_ID, LANGUAGE_ID, ORDERS_STATUS_NAME"; + } + + // =================================================================================== + // Type Name + // ========= + /** + * This method implements the method that is declared at super. + * + * @return The type-name of entity. (NotNull) + */ + public String getEntityTypeName() { + return "jp.sf.pal.pompei.exentity.OrdersStatus"; + } + + /** + * This method implements the method that is declared at super. + * + * @return The type-name of condition-bean. (NotNull) + */ + public String getConditionBeanTypeName() { + return "jp.sf.pal.pompei.cbean.bs.OrdersStatusCB"; + } + + /** + * This method implements the method that is declared at super. + * + * @return The type-name of dao. (NotNull) + */ + public String getDaoTypeName() { + return "jp.sf.pal.pompei.exdao.OrdersStatusDao"; + } + + /** + * This method implements the method that is declared at super. + * + * @return The type-name of behavior. (NotNull) + */ + public String getBehaviorTypeName() { + return "jp.sf.pal.pompei.exbhv.OrdersStatusBhv"; + } + + // =================================================================================== + // Type + // ==== + /** + * This method implements the method that is declared at super. + * + * @return The type of entity. (NotNull) + */ + public Class getEntityType() { + return ENTITY_TYPE; + } + + // =================================================================================== + // Instance + // ======== + /** + * This method implements the method that is declared at super. + * + * @return The type of entity. (NotNull) + */ + public Entity newEntity() { + return newMyEntity(); + } + + /** + * New the instance of my entity. + * + * @return The instance of my entity. (NotNull) + */ + public OrdersStatus newMyEntity() { + return new OrdersStatus(); + } + + // =================================================================================== + // Foreign DBMeta + // ============== + /** + * This method implements the method that is declared at super. + * + * @param foreignPropertyName Foreign-property-name(Both OK - InitCap or not). (NotNull) + * @return Foreign DBMeta. (NotNull) + */ + public DBMeta getForeignDBMeta(String foreignPropertyName) { + assertStringNotNullAndNotTrimmedEmpty("foreignPropertyName", foreignPropertyName); + final String methodName = "getForeignDBMeta_" + foreignPropertyName.substring(0, 1) + foreignPropertyName.substring(1); + + java.lang.reflect.Method method = null; + try { + method = this.getClass().getMethod(methodName, new Class[]{}); + } catch (NoSuchMethodException e) { + String msg = "The foreignPropertyName is not found: foreignPropertyName=" + foreignPropertyName; + msg = msg + " tableName=" + TABLE_DB_NAME + " methodName=" + methodName; + throw new RuntimeException(msg, e); + } + try { + return (DBMeta)method.invoke(this, new Object[]{}); + } catch (IllegalAccessException e) { + throw new RuntimeException(e); + } catch (java.lang.reflect.InvocationTargetException e) { + throw new RuntimeException(e.getCause()); + } + } + + // =================================================================================== + // Determination + // ============= + /** + * This method implements the method that is declared at super. + * + * @return Determination. + */ + public boolean hasTwoOrMorePrimaryKeys() { + return true; + } + + /** + * This method implements the method that is declared at super. + * + * @return Determination. + */ + public boolean hasCommonColumn() { + return false; + } + + // =================================================================================== + // Entity Handling + // =============== + // ----------------------------------------------------- + // Accept + // ------ + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @param primaryKeyMap Primary key map. (NotNull and NotEmpty) + */ + public void acceptPrimaryKeyMap(Entity entity, java.util.Map primaryKeyMap) { + final OrdersStatus myEntity = (OrdersStatus)entity; + MapAssertUtil.assertPrimaryKeyMapNotNullAndNotEmpty(primaryKeyMap); + final MapStringValueAnalyzer analyzer = new MapStringValueAnalyzer(primaryKeyMap, entity.getModifiedPropertyNames()); + + MapAssertUtil.assertColumnExistingInPrimaryKeyMap(primaryKeyMap, "ORDERS_STATUS_ID"); + if (analyzer.init("ORDERS_STATUS_ID", "ordersStatusId", "ordersStatusId")) { myEntity.setOrdersStatusId(analyzer.analyzeNumber(java.math.BigDecimal.class)); }; + MapAssertUtil.assertColumnExistingInPrimaryKeyMap(primaryKeyMap, "LANGUAGE_ID"); + if (analyzer.init("LANGUAGE_ID", "languageId", "languageId")) { myEntity.setLanguageId(analyzer.analyzeNumber(java.math.BigDecimal.class)); }; + + + } + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @param primaryKeyMapString Primary-key map-string. (NotNull and NotEmpty) + */ + public void acceptPrimaryKeyMapString(Entity entity, String primaryKeyMapString) { + MapStringUtil.acceptPrimaryKeyMapString(primaryKeyMapString, entity); + } + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @param columnValueMap Column-value map. (NotNull and NotEmpty) + */ + public void acceptColumnValueMap(Entity entity, java.util.Map columnValueMap) { + final OrdersStatus myEntity = (OrdersStatus)entity; + MapAssertUtil.assertColumnValueMapNotNullAndNotEmpty(columnValueMap); + final MapStringValueAnalyzer analyzer = new MapStringValueAnalyzer(columnValueMap, entity.getModifiedPropertyNames()); + + if (analyzer.init("ORDERS_STATUS_ID", "ordersStatusId", "ordersStatusId")) { myEntity.setOrdersStatusId(analyzer.analyzeNumber(java.math.BigDecimal.class)); }; + if (analyzer.init("LANGUAGE_ID", "languageId", "languageId")) { myEntity.setLanguageId(analyzer.analyzeNumber(java.math.BigDecimal.class)); }; + if (analyzer.init("ORDERS_STATUS_NAME", "ordersStatusName", "ordersStatusName")) { myEntity.setOrdersStatusName(analyzer.analyzeString(String.class)); }; + + } + + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @param columnValueMapString Column-value map-string. (NotNull and NotEmpty) + */ + public void acceptColumnValueMapString(Entity entity, String columnValueMapString) { + MapStringUtil.acceptColumnValueMapString(columnValueMapString, entity); + } + + + // ----------------------------------------------------- + // Extract + // ------- + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @return Primary-key map-string. (NotNull) + */ + public String extractPrimaryKeyMapString(Entity entity) { + return MapStringUtil.extractPrimaryKeyMapString(entity); + } + + /** + * Extract primary-key map-string. + * + * @param entity Target entity. (NotNull) + * @param startBrace Start-brace. (NotNull) + * @param endBrace End-brace. (NotNull) + * @param delimiter Delimiter. (NotNull) + * @param equal Equal. (NotNull) + * @return Primary-key map-string. (NotNull) + */ + public String extractPrimaryKeyMapString(Entity entity, String startBrace, String endBrace, String delimiter, String equal) { + final OrdersStatus myEntity = (OrdersStatus)entity; + final String mapMarkAndStartBrace = MAP_STRING_MAP_MARK + startBrace; + final StringBuffer sb = new StringBuffer(); + helpAppendingColumnValueString(sb, delimiter, equal, "ORDERS_STATUS_ID", myEntity.getOrdersStatusId()); + helpAppendingColumnValueString(sb, delimiter, equal, "LANGUAGE_ID", myEntity.getLanguageId()); + + sb.delete(0, delimiter.length()).insert(0, mapMarkAndStartBrace).append(endBrace); + return sb.toString(); + + } + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @return Column-value map-string. (NotNull) + */ + public String extractColumnValueMapString(Entity entity) { + return MapStringUtil.extractColumnValueMapString(entity); + } + + /** + * Extract column-value map-string. + * + * @param entity Target entity. (NotNull) + * @param startBrace Start-brace. (NotNull) + * @param endBrace End-brace. (NotNull) + * @param delimiter Delimiter. (NotNull) + * @param equal Equal. (NotNull) + * @return Column-value map-string. (NotNull) + */ + public String extractColumnValueMapString(Entity entity, String startBrace, String endBrace, String delimiter, String equal) { + final OrdersStatus myEntity = (OrdersStatus)entity; + final String mapMarkAndStartBrace = MAP_STRING_MAP_MARK + startBrace; + final StringBuffer sb = new StringBuffer(); + helpAppendingColumnValueString(sb, delimiter, equal, "ORDERS_STATUS_ID", myEntity.getOrdersStatusId()); + helpAppendingColumnValueString(sb, delimiter, equal, "LANGUAGE_ID", myEntity.getLanguageId()); + helpAppendingColumnValueString(sb, delimiter, equal, "ORDERS_STATUS_NAME", myEntity.getOrdersStatusName()); + + sb.delete(0, delimiter.length()).insert(0, mapMarkAndStartBrace).append(endBrace); + return sb.toString(); + } + + private void helpAppendingColumnValueString(StringBuffer sb, String delimiter, String equal, String colName, Object value) { + sb.append(delimiter).append(colName).append(equal); + sb.append(helpGettingColumnStringValue(value)); + } + + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @return Column-value map-string. (NotNull) + */ + public String extractCommonColumnValueMapString(Entity entity) { + return "map:{}"; + } + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @return Column-value map-string. (NotNull) + */ + public String extractCommonColumnValueMapString(Entity entity, String startBrace, String endBrace, String delimiter, String equal) { + return "map:" + startBrace + endBrace; + } + + + // ----------------------------------------------------- + // Convert + // ------- + public java.util.List convertToColumnValueList(Entity entity) { + return new java.util.ArrayList(convertToColumnValueMap(entity).values()); + } + + public java.util.Map convertToColumnValueMap(Entity entity) { + final OrdersStatus myEntity = downcast(entity); + final java.util.Map valueMap = new java.util.LinkedHashMap(); + valueMap.put("ORDERS_STATUS_ID", myEntity.getOrdersStatusId()); + valueMap.put("LANGUAGE_ID", myEntity.getLanguageId()); + valueMap.put("ORDERS_STATUS_NAME", myEntity.getOrdersStatusName()); + return valueMap; + } + + public java.util.List convertToColumnStringValueList(Entity entity) { + return new java.util.ArrayList(convertToColumnStringValueMap(entity).values()); + } + + public java.util.Map convertToColumnStringValueMap(Entity entity) { + final OrdersStatus myEntity = downcast(entity); + final java.util.Map valueMap = new java.util.LinkedHashMap(); + valueMap.put("ORDERS_STATUS_ID", helpGettingColumnStringValue(myEntity.getOrdersStatusId())); + valueMap.put("LANGUAGE_ID", helpGettingColumnStringValue(myEntity.getLanguageId())); + valueMap.put("ORDERS_STATUS_NAME", helpGettingColumnStringValue(myEntity.getOrdersStatusName())); + return valueMap; + } + + // =================================================================================== + // JDBC Support + // ============ + public String getPreparedInsertClause() { + return "insert into ORDERS_STATUS(ORDERS_STATUS_ID, LANGUAGE_ID, ORDERS_STATUS_NAME) values(? , ? , ? )"; + } + + public String getPreparedInsertClause(String tablePrefix) { + return "insert into " + tablePrefix + "ORDERS_STATUS(ORDERS_STATUS_ID, LANGUAGE_ID, ORDERS_STATUS_NAME) values(? , ? , ? )"; + } + + // =================================================================================== + // Helper + // ====== + protected OrdersStatus downcast(Entity entity) { + assertObjectNotNull("entity", entity); + try { + return (OrdersStatus)entity; + } catch (ClassCastException e) { + String msg = "The entity should be OrdersStatus but it was: " + entity.getClass(); + throw new IllegalStateException(msg, e); + } + } + + protected void checkDowncast(Entity entity) { + downcast(entity); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/dbmeta/OrdersStatusHistoryDbm.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/dbmeta/OrdersStatusHistoryDbm.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/dbmeta/OrdersStatusHistoryDbm.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,720 @@ +package jp.sf.pal.pompei.bsentity.dbmeta; + + +import jp.sf.pal.pompei.allcommon.Entity; +import jp.sf.pal.pompei.allcommon.dbmeta.DBMeta; +import jp.sf.pal.pompei.allcommon.dbmeta.AbstractDBMeta; +import jp.sf.pal.pompei.exentity.OrdersStatusHistory; + +/** + * The dbmeta of ORDERS_STATUS_HISTORY. (Singleton) + * + *
+ * [primary-key]
+ *     ORDERS_STATUS_HISTORY_ID
+ * 
+ * [column-property]
+ *     ORDERS_STATUS_HISTORY_ID, ORDERS_ID, ORDERS_STATUS_ID, DATE_ADDED, CUSTOMER_NOTIFIED, COMMENTS
+ * 
+ * [foreign-property]
+ *     
+ * 
+ * [refferer-property]
+ *     
+ * 
+ * [sequence]
+ *     
+ * 
+ * [identity]
+ *     
+ * 
+ * [update-date]
+ *     
+ * 
+ * [version-no]
+ *     
+ * 
+ * 
+ * + * @author DBFlute(AutoGenerator) + */ +public class OrdersStatusHistoryDbm extends AbstractDBMeta { + + // =================================================================================== + // Definition + // ========== + /** The type of entity. */ + protected static final Class ENTITY_TYPE = OrdersStatusHistory.class; + + /** Singleton instance. */ + private static final OrdersStatusHistoryDbm _instance = new OrdersStatusHistoryDbm(); + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + private OrdersStatusHistoryDbm() { + } + + // =================================================================================== + // Singleton + // ========= + /** + * Get instance. + * + * @return Singleton instance. (NotNull) + */ + public static OrdersStatusHistoryDbm getInstance() { + return _instance; + } + + // =================================================================================== + // Name Definition + // =============== + /** Table db name. */ + public static final String TABLE_DB_NAME = "ORDERS_STATUS_HISTORY"; + + /** Table cap-prop name. */ + public static final String TABLE_CAP_PROP_NAME = "OrdersStatusHistory"; + + /** Table uncap-prop name. */ + public static final String TABLE_UNCAP_PROP_NAME = "ordersStatusHistory"; + + /** Db-name of OrdersStatusHistoryId. */ + public static final String COLUMN_DB_NAME_OF_OrdersStatusHistoryId = "ORDERS_STATUS_HISTORY_ID"; + /** Db-name of OrdersId. */ + public static final String COLUMN_DB_NAME_OF_OrdersId = "ORDERS_ID"; + /** Db-name of OrdersStatusId. */ + public static final String COLUMN_DB_NAME_OF_OrdersStatusId = "ORDERS_STATUS_ID"; + /** Db-name of DateAdded. */ + public static final String COLUMN_DB_NAME_OF_DateAdded = "DATE_ADDED"; + /** Db-name of CustomerNotified. */ + public static final String COLUMN_DB_NAME_OF_CustomerNotified = "CUSTOMER_NOTIFIED"; + /** Db-name of Comments. */ + public static final String COLUMN_DB_NAME_OF_Comments = "COMMENTS"; + + /** Cap-prop-name of OrdersStatusHistoryId. */ + public static final String COLUMN_CAP_PROP_NAME_OF_OrdersStatusHistoryId = "OrdersStatusHistoryId"; + /** Cap-prop-name of OrdersId. */ + public static final String COLUMN_CAP_PROP_NAME_OF_OrdersId = "OrdersId"; + /** Cap-prop-name of OrdersStatusId. */ + public static final String COLUMN_CAP_PROP_NAME_OF_OrdersStatusId = "OrdersStatusId"; + /** Cap-prop-name of DateAdded. */ + public static final String COLUMN_CAP_PROP_NAME_OF_DateAdded = "DateAdded"; + /** Cap-prop-name of CustomerNotified. */ + public static final String COLUMN_CAP_PROP_NAME_OF_CustomerNotified = "CustomerNotified"; + /** Cap-prop-name of Comments. */ + public static final String COLUMN_CAP_PROP_NAME_OF_Comments = "Comments"; + + + + /** Uncap-prop-name of OrdersStatusHistoryId. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_OrdersStatusHistoryId = "ordersStatusHistoryId"; + /** Uncap-prop-name of OrdersId. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_OrdersId = "ordersId"; + /** Uncap-prop-name of OrdersStatusId. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_OrdersStatusId = "ordersStatusId"; + /** Uncap-prop-name of DateAdded. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_DateAdded = "dateAdded"; + /** Uncap-prop-name of CustomerNotified. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_CustomerNotified = "customerNotified"; + /** Uncap-prop-name of Comments. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_Comments = "comments"; + + + + /** {db-name : cap-prop-name} map. */ + private static java.util.Map _dbNameCapPropNameMap; + protected static java.util.Map createDbNameCapPropNameMap() { + if (_dbNameCapPropNameMap != null) { + return _dbNameCapPropNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_DB_NAME, TABLE_CAP_PROP_NAME); + + map.put(COLUMN_DB_NAME_OF_OrdersStatusHistoryId, COLUMN_CAP_PROP_NAME_OF_OrdersStatusHistoryId); + map.put(COLUMN_DB_NAME_OF_OrdersId, COLUMN_CAP_PROP_NAME_OF_OrdersId); + map.put(COLUMN_DB_NAME_OF_OrdersStatusId, COLUMN_CAP_PROP_NAME_OF_OrdersStatusId); + map.put(COLUMN_DB_NAME_OF_DateAdded, COLUMN_CAP_PROP_NAME_OF_DateAdded); + map.put(COLUMN_DB_NAME_OF_CustomerNotified, COLUMN_CAP_PROP_NAME_OF_CustomerNotified); + map.put(COLUMN_DB_NAME_OF_Comments, COLUMN_CAP_PROP_NAME_OF_Comments); + + _dbNameCapPropNameMap = java.util.Collections.unmodifiableMap(map); + return _dbNameCapPropNameMap; + } + + /** {db-name : uncap-prop-name} map. */ + private static java.util.Map _dbNameUncapPropNameMap; + protected static java.util.Map createDbNameUncapPropNameMap() { + if (_dbNameUncapPropNameMap != null) { + return _dbNameUncapPropNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_DB_NAME, TABLE_UNCAP_PROP_NAME); + + map.put(COLUMN_DB_NAME_OF_OrdersStatusHistoryId, COLUMN_UNCAP_PROP_NAME_OF_OrdersStatusHistoryId); + map.put(COLUMN_DB_NAME_OF_OrdersId, COLUMN_UNCAP_PROP_NAME_OF_OrdersId); + map.put(COLUMN_DB_NAME_OF_OrdersStatusId, COLUMN_UNCAP_PROP_NAME_OF_OrdersStatusId); + map.put(COLUMN_DB_NAME_OF_DateAdded, COLUMN_UNCAP_PROP_NAME_OF_DateAdded); + map.put(COLUMN_DB_NAME_OF_CustomerNotified, COLUMN_UNCAP_PROP_NAME_OF_CustomerNotified); + map.put(COLUMN_DB_NAME_OF_Comments, COLUMN_UNCAP_PROP_NAME_OF_Comments); + + _dbNameUncapPropNameMap = java.util.Collections.unmodifiableMap(map); + return _dbNameUncapPropNameMap; + } + + /** {cap-prop-name : db-name} map. */ + private static java.util.Map _capPropNameDbNameMap; + protected static java.util.Map createCapPropNameDbNameMap() { + if (_capPropNameDbNameMap != null) { + return _capPropNameDbNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_CAP_PROP_NAME, TABLE_DB_NAME); + + map.put(COLUMN_CAP_PROP_NAME_OF_OrdersStatusHistoryId, COLUMN_DB_NAME_OF_OrdersStatusHistoryId); + map.put(COLUMN_CAP_PROP_NAME_OF_OrdersId, COLUMN_DB_NAME_OF_OrdersId); + map.put(COLUMN_CAP_PROP_NAME_OF_OrdersStatusId, COLUMN_DB_NAME_OF_OrdersStatusId); + map.put(COLUMN_CAP_PROP_NAME_OF_DateAdded, COLUMN_DB_NAME_OF_DateAdded); + map.put(COLUMN_CAP_PROP_NAME_OF_CustomerNotified, COLUMN_DB_NAME_OF_CustomerNotified); + map.put(COLUMN_CAP_PROP_NAME_OF_Comments, COLUMN_DB_NAME_OF_Comments); + + _capPropNameDbNameMap = java.util.Collections.unmodifiableMap(map); + return _capPropNameDbNameMap; + } + + /** {cap-prop-name : uncap-prop-name} map. */ + private static java.util.Map _capPropNameUncapPropNameMap; + protected static java.util.Map createCapPropNameUncapPropNameMap() { + if (_capPropNameUncapPropNameMap != null) { + return _capPropNameUncapPropNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_CAP_PROP_NAME, TABLE_UNCAP_PROP_NAME); + + map.put(COLUMN_CAP_PROP_NAME_OF_OrdersStatusHistoryId, COLUMN_UNCAP_PROP_NAME_OF_OrdersStatusHistoryId); + map.put(COLUMN_CAP_PROP_NAME_OF_OrdersId, COLUMN_UNCAP_PROP_NAME_OF_OrdersId); + map.put(COLUMN_CAP_PROP_NAME_OF_OrdersStatusId, COLUMN_UNCAP_PROP_NAME_OF_OrdersStatusId); + map.put(COLUMN_CAP_PROP_NAME_OF_DateAdded, COLUMN_UNCAP_PROP_NAME_OF_DateAdded); + map.put(COLUMN_CAP_PROP_NAME_OF_CustomerNotified, COLUMN_UNCAP_PROP_NAME_OF_CustomerNotified); + map.put(COLUMN_CAP_PROP_NAME_OF_Comments, COLUMN_UNCAP_PROP_NAME_OF_Comments); + + _capPropNameUncapPropNameMap = java.util.Collections.unmodifiableMap(map); + return _capPropNameUncapPropNameMap; + } + + /** {uncap-prop-name : db-name} map. */ + private static java.util.Map _uncapPropNameDbNameMap; + protected static java.util.Map createUncapPropNameDbNameMap() { + if (_uncapPropNameDbNameMap != null) { + return _uncapPropNameDbNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_UNCAP_PROP_NAME, TABLE_DB_NAME); + + map.put(COLUMN_UNCAP_PROP_NAME_OF_OrdersStatusHistoryId, COLUMN_DB_NAME_OF_OrdersStatusHistoryId); + map.put(COLUMN_UNCAP_PROP_NAME_OF_OrdersId, COLUMN_DB_NAME_OF_OrdersId); + map.put(COLUMN_UNCAP_PROP_NAME_OF_OrdersStatusId, COLUMN_DB_NAME_OF_OrdersStatusId); + map.put(COLUMN_UNCAP_PROP_NAME_OF_DateAdded, COLUMN_DB_NAME_OF_DateAdded); + map.put(COLUMN_UNCAP_PROP_NAME_OF_CustomerNotified, COLUMN_DB_NAME_OF_CustomerNotified); + map.put(COLUMN_UNCAP_PROP_NAME_OF_Comments, COLUMN_DB_NAME_OF_Comments); + + _uncapPropNameDbNameMap = java.util.Collections.unmodifiableMap(map); + return _uncapPropNameDbNameMap; + } + + /** {uncap-prop-name : cap-prop-name} map. */ + private static java.util.Map _uncapPropNameCapPropNameMap; + protected static java.util.Map createUncapPropNameCapPropNameMap() { + if (_uncapPropNameCapPropNameMap != null) { + return _uncapPropNameCapPropNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_UNCAP_PROP_NAME, TABLE_CAP_PROP_NAME); + + map.put(COLUMN_UNCAP_PROP_NAME_OF_OrdersStatusHistoryId, COLUMN_CAP_PROP_NAME_OF_OrdersStatusHistoryId); + map.put(COLUMN_UNCAP_PROP_NAME_OF_OrdersId, COLUMN_CAP_PROP_NAME_OF_OrdersId); + map.put(COLUMN_UNCAP_PROP_NAME_OF_OrdersStatusId, COLUMN_CAP_PROP_NAME_OF_OrdersStatusId); + map.put(COLUMN_UNCAP_PROP_NAME_OF_DateAdded, COLUMN_CAP_PROP_NAME_OF_DateAdded); + map.put(COLUMN_UNCAP_PROP_NAME_OF_CustomerNotified, COLUMN_CAP_PROP_NAME_OF_CustomerNotified); + map.put(COLUMN_UNCAP_PROP_NAME_OF_Comments, COLUMN_CAP_PROP_NAME_OF_Comments); + + _uncapPropNameCapPropNameMap = java.util.Collections.unmodifiableMap(map); + return _uncapPropNameCapPropNameMap; + } + + // =================================================================================== + // Name-Map + // ======== + /** + * This method implements the method that is declared at super. + * + * @return {db-name : cap-prop-name} map. + */ + public java.util.Map getDbNameCapPropNameMap() { + return createDbNameCapPropNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {db-name : uncap-prop-name} map. + */ + public java.util.Map getDbNameUncapPropNameMap() { + return createDbNameUncapPropNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {cap-prop-name : db-name} map. + */ + public java.util.Map getCapPropNameDbNameMap() { + return createCapPropNameDbNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {cap-prop-name : uncap-prop-name} map. + */ + public java.util.Map getCapPropNameUncapPropNameMap() { + return createCapPropNameUncapPropNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {uncap-prop-name : db-name} map. + */ + public java.util.Map getUncapPropNameDbNameMap() { + return createUncapPropNameDbNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {uncap-prop-name : cap-prop-name} map. + */ + public java.util.Map getUncapPropNameCapPropNameMap() { + return createUncapPropNameCapPropNameMap(); + } + + // =================================================================================== + // Table Name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + public String getTableDbName() { + return TABLE_DB_NAME; + } + + /** + * This method implements the method that is declared at super. + * + * @return Table cap-prop-name. (NotNull) + */ + public String getTableCapPropName() { + return TABLE_CAP_PROP_NAME; + } + + /** + * This method implements the method that is declared at super. + * + * @return Table property-name. (NotNull) + */ + public String getTableUncapPropName() { + return TABLE_UNCAP_PROP_NAME; + } + + // =================================================================================== + // Column Name + // =========== + public java.util.List getColumnDbNameList() { + final String[] columns = getColumnDbNameCommaString().split(","); + final java.util.List resultList = new java.util.ArrayList(); + for (int i=0; i < columns.length; i++) { + resultList.add(columns[i].trim()); + } + return resultList; + } + + public java.util.List getColumnCapPropNameList() { + final java.util.List columnDbNameList = getColumnDbNameList(); + final java.util.List resultList = new java.util.ArrayList(); + for (final java.util.Iterator ite = columnDbNameList.iterator(); ite.hasNext(); ) { + resultList.add(getDbNameCapPropNameMap().get((String)ite.next())); + } + return resultList; + } + + public java.util.List getColumnUncapPropNameList() { + final java.util.List columnDbNameList = getColumnDbNameList(); + final java.util.List resultList = new java.util.ArrayList(); + for (final java.util.Iterator ite = columnDbNameList.iterator(); ite.hasNext(); ) { + resultList.add(getDbNameUncapPropNameMap().get((String)ite.next())); + } + return resultList; + } + + /** + * This method implements the method that is declared at super. + * + * @return Column-db-name comma-string. (NotNull) + */ + public String getColumnDbNameCommaString() { + return "ORDERS_STATUS_HISTORY_ID, ORDERS_ID, ORDERS_STATUS_ID, DATE_ADDED, CUSTOMER_NOTIFIED, COMMENTS"; + } + + // =================================================================================== + // Type Name + // ========= + /** + * This method implements the method that is declared at super. + * + * @return The type-name of entity. (NotNull) + */ + public String getEntityTypeName() { + return "jp.sf.pal.pompei.exentity.OrdersStatusHistory"; + } + + /** + * This method implements the method that is declared at super. + * + * @return The type-name of condition-bean. (NotNull) + */ + public String getConditionBeanTypeName() { + return "jp.sf.pal.pompei.cbean.bs.OrdersStatusHistoryCB"; + } + + /** + * This method implements the method that is declared at super. + * + * @return The type-name of dao. (NotNull) + */ + public String getDaoTypeName() { + return "jp.sf.pal.pompei.exdao.OrdersStatusHistoryDao"; + } + + /** + * This method implements the method that is declared at super. + * + * @return The type-name of behavior. (NotNull) + */ + public String getBehaviorTypeName() { + return "jp.sf.pal.pompei.exbhv.OrdersStatusHistoryBhv"; + } + + // =================================================================================== + // Type + // ==== + /** + * This method implements the method that is declared at super. + * + * @return The type of entity. (NotNull) + */ + public Class getEntityType() { + return ENTITY_TYPE; + } + + // =================================================================================== + // Instance + // ======== + /** + * This method implements the method that is declared at super. + * + * @return The type of entity. (NotNull) + */ + public Entity newEntity() { + return newMyEntity(); + } + + /** + * New the instance of my entity. + * + * @return The instance of my entity. (NotNull) + */ + public OrdersStatusHistory newMyEntity() { + return new OrdersStatusHistory(); + } + + // =================================================================================== + // Foreign DBMeta + // ============== + /** + * This method implements the method that is declared at super. + * + * @param foreignPropertyName Foreign-property-name(Both OK - InitCap or not). (NotNull) + * @return Foreign DBMeta. (NotNull) + */ + public DBMeta getForeignDBMeta(String foreignPropertyName) { + assertStringNotNullAndNotTrimmedEmpty("foreignPropertyName", foreignPropertyName); + final String methodName = "getForeignDBMeta_" + foreignPropertyName.substring(0, 1) + foreignPropertyName.substring(1); + + java.lang.reflect.Method method = null; + try { + method = this.getClass().getMethod(methodName, new Class[]{}); + } catch (NoSuchMethodException e) { + String msg = "The foreignPropertyName is not found: foreignPropertyName=" + foreignPropertyName; + msg = msg + " tableName=" + TABLE_DB_NAME + " methodName=" + methodName; + throw new RuntimeException(msg, e); + } + try { + return (DBMeta)method.invoke(this, new Object[]{}); + } catch (IllegalAccessException e) { + throw new RuntimeException(e); + } catch (java.lang.reflect.InvocationTargetException e) { + throw new RuntimeException(e.getCause()); + } + } + + // =================================================================================== + // Determination + // ============= + /** + * This method implements the method that is declared at super. + * + * @return Determination. + */ + public boolean hasTwoOrMorePrimaryKeys() { + return false; + } + + /** + * This method implements the method that is declared at super. + * + * @return Determination. + */ + public boolean hasCommonColumn() { + return false; + } + + // =================================================================================== + // Entity Handling + // =============== + // ----------------------------------------------------- + // Accept + // ------ + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @param primaryKeyMap Primary key map. (NotNull and NotEmpty) + */ + public void acceptPrimaryKeyMap(Entity entity, java.util.Map primaryKeyMap) { + final OrdersStatusHistory myEntity = (OrdersStatusHistory)entity; + MapAssertUtil.assertPrimaryKeyMapNotNullAndNotEmpty(primaryKeyMap); + final MapStringValueAnalyzer analyzer = new MapStringValueAnalyzer(primaryKeyMap, entity.getModifiedPropertyNames()); + + MapAssertUtil.assertColumnExistingInPrimaryKeyMap(primaryKeyMap, "ORDERS_STATUS_HISTORY_ID"); + if (analyzer.init("ORDERS_STATUS_HISTORY_ID", "ordersStatusHistoryId", "ordersStatusHistoryId")) { myEntity.setOrdersStatusHistoryId(analyzer.analyzeNumber(java.math.BigDecimal.class)); }; + + + } + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @param primaryKeyMapString Primary-key map-string. (NotNull and NotEmpty) + */ + public void acceptPrimaryKeyMapString(Entity entity, String primaryKeyMapString) { + MapStringUtil.acceptPrimaryKeyMapString(primaryKeyMapString, entity); + } + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @param columnValueMap Column-value map. (NotNull and NotEmpty) + */ + public void acceptColumnValueMap(Entity entity, java.util.Map columnValueMap) { + final OrdersStatusHistory myEntity = (OrdersStatusHistory)entity; + MapAssertUtil.assertColumnValueMapNotNullAndNotEmpty(columnValueMap); + final MapStringValueAnalyzer analyzer = new MapStringValueAnalyzer(columnValueMap, entity.getModifiedPropertyNames()); + + if (analyzer.init("ORDERS_STATUS_HISTORY_ID", "ordersStatusHistoryId", "ordersStatusHistoryId")) { myEntity.setOrdersStatusHistoryId(analyzer.analyzeNumber(java.math.BigDecimal.class)); }; + if (analyzer.init("ORDERS_ID", "ordersId", "ordersId")) { myEntity.setOrdersId(analyzer.analyzeNumber(java.math.BigDecimal.class)); }; + if (analyzer.init("ORDERS_STATUS_ID", "ordersStatusId", "ordersStatusId")) { myEntity.setOrdersStatusId(analyzer.analyzeNumber(java.math.BigDecimal.class)); }; + if (analyzer.init("DATE_ADDED", "dateAdded", "dateAdded")) { myEntity.setDateAdded(analyzer.analyzeDate(java.sql.Timestamp.class)); }; + if (analyzer.init("CUSTOMER_NOTIFIED", "customerNotified", "customerNotified")) { myEntity.setCustomerNotified(analyzer.analyzeNumber(java.math.BigDecimal.class)); }; + if (analyzer.init("COMMENTS", "comments", "comments")) { myEntity.setComments(analyzer.analyzeString(String.class)); }; + + } + + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @param columnValueMapString Column-value map-string. (NotNull and NotEmpty) + */ + public void acceptColumnValueMapString(Entity entity, String columnValueMapString) { + MapStringUtil.acceptColumnValueMapString(columnValueMapString, entity); + } + + + // ----------------------------------------------------- + // Extract + // ------- + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @return Primary-key map-string. (NotNull) + */ + public String extractPrimaryKeyMapString(Entity entity) { + return MapStringUtil.extractPrimaryKeyMapString(entity); + } + + /** + * Extract primary-key map-string. + * + * @param entity Target entity. (NotNull) + * @param startBrace Start-brace. (NotNull) + * @param endBrace End-brace. (NotNull) + * @param delimiter Delimiter. (NotNull) + * @param equal Equal. (NotNull) + * @return Primary-key map-string. (NotNull) + */ + public String extractPrimaryKeyMapString(Entity entity, String startBrace, String endBrace, String delimiter, String equal) { + final OrdersStatusHistory myEntity = (OrdersStatusHistory)entity; + final String mapMarkAndStartBrace = MAP_STRING_MAP_MARK + startBrace; + final StringBuffer sb = new StringBuffer(); + helpAppendingColumnValueString(sb, delimiter, equal, "ORDERS_STATUS_HISTORY_ID", myEntity.getOrdersStatusHistoryId()); + + sb.delete(0, delimiter.length()).insert(0, mapMarkAndStartBrace).append(endBrace); + return sb.toString(); + + } + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @return Column-value map-string. (NotNull) + */ + public String extractColumnValueMapString(Entity entity) { + return MapStringUtil.extractColumnValueMapString(entity); + } + + /** + * Extract column-value map-string. + * + * @param entity Target entity. (NotNull) + * @param startBrace Start-brace. (NotNull) + * @param endBrace End-brace. (NotNull) + * @param delimiter Delimiter. (NotNull) + * @param equal Equal. (NotNull) + * @return Column-value map-string. (NotNull) + */ + public String extractColumnValueMapString(Entity entity, String startBrace, String endBrace, String delimiter, String equal) { + final OrdersStatusHistory myEntity = (OrdersStatusHistory)entity; + final String mapMarkAndStartBrace = MAP_STRING_MAP_MARK + startBrace; + final StringBuffer sb = new StringBuffer(); + helpAppendingColumnValueString(sb, delimiter, equal, "ORDERS_STATUS_HISTORY_ID", myEntity.getOrdersStatusHistoryId()); + helpAppendingColumnValueString(sb, delimiter, equal, "ORDERS_ID", myEntity.getOrdersId()); + helpAppendingColumnValueString(sb, delimiter, equal, "ORDERS_STATUS_ID", myEntity.getOrdersStatusId()); + helpAppendingColumnValueString(sb, delimiter, equal, "DATE_ADDED", myEntity.getDateAdded()); + helpAppendingColumnValueString(sb, delimiter, equal, "CUSTOMER_NOTIFIED", myEntity.getCustomerNotified()); + helpAppendingColumnValueString(sb, delimiter, equal, "COMMENTS", myEntity.getComments()); + + sb.delete(0, delimiter.length()).insert(0, mapMarkAndStartBrace).append(endBrace); + return sb.toString(); + } + + private void helpAppendingColumnValueString(StringBuffer sb, String delimiter, String equal, String colName, Object value) { + sb.append(delimiter).append(colName).append(equal); + sb.append(helpGettingColumnStringValue(value)); + } + + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @return Column-value map-string. (NotNull) + */ + public String extractCommonColumnValueMapString(Entity entity) { + return "map:{}"; + } + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @return Column-value map-string. (NotNull) + */ + public String extractCommonColumnValueMapString(Entity entity, String startBrace, String endBrace, String delimiter, String equal) { + return "map:" + startBrace + endBrace; + } + + + // ----------------------------------------------------- + // Convert + // ------- + public java.util.List convertToColumnValueList(Entity entity) { + return new java.util.ArrayList(convertToColumnValueMap(entity).values()); + } + + public java.util.Map convertToColumnValueMap(Entity entity) { + final OrdersStatusHistory myEntity = downcast(entity); + final java.util.Map valueMap = new java.util.LinkedHashMap(); + valueMap.put("ORDERS_STATUS_HISTORY_ID", myEntity.getOrdersStatusHistoryId()); + valueMap.put("ORDERS_ID", myEntity.getOrdersId()); + valueMap.put("ORDERS_STATUS_ID", myEntity.getOrdersStatusId()); + valueMap.put("DATE_ADDED", myEntity.getDateAdded()); + valueMap.put("CUSTOMER_NOTIFIED", myEntity.getCustomerNotified()); + valueMap.put("COMMENTS", myEntity.getComments()); + return valueMap; + } + + public java.util.List convertToColumnStringValueList(Entity entity) { + return new java.util.ArrayList(convertToColumnStringValueMap(entity).values()); + } + + public java.util.Map convertToColumnStringValueMap(Entity entity) { + final OrdersStatusHistory myEntity = downcast(entity); + final java.util.Map valueMap = new java.util.LinkedHashMap(); + valueMap.put("ORDERS_STATUS_HISTORY_ID", helpGettingColumnStringValue(myEntity.getOrdersStatusHistoryId())); + valueMap.put("ORDERS_ID", helpGettingColumnStringValue(myEntity.getOrdersId())); + valueMap.put("ORDERS_STATUS_ID", helpGettingColumnStringValue(myEntity.getOrdersStatusId())); + valueMap.put("DATE_ADDED", helpGettingColumnStringValue(myEntity.getDateAdded())); + valueMap.put("CUSTOMER_NOTIFIED", helpGettingColumnStringValue(myEntity.getCustomerNotified())); + valueMap.put("COMMENTS", helpGettingColumnStringValue(myEntity.getComments())); + return valueMap; + } + + // =================================================================================== + // JDBC Support + // ============ + public String getPreparedInsertClause() { + return "insert into ORDERS_STATUS_HISTORY(ORDERS_STATUS_HISTORY_ID, ORDERS_ID, ORDERS_STATUS_ID, DATE_ADDED, CUSTOMER_NOTIFIED, COMMENTS) values(? , ? , ? , ? , ? , ? )"; + } + + public String getPreparedInsertClause(String tablePrefix) { + return "insert into " + tablePrefix + "ORDERS_STATUS_HISTORY(ORDERS_STATUS_HISTORY_ID, ORDERS_ID, ORDERS_STATUS_ID, DATE_ADDED, CUSTOMER_NOTIFIED, COMMENTS) values(? , ? , ? , ? , ? , ? )"; + } + + // =================================================================================== + // Helper + // ====== + protected OrdersStatusHistory downcast(Entity entity) { + assertObjectNotNull("entity", entity); + try { + return (OrdersStatusHistory)entity; + } catch (ClassCastException e) { + String msg = "The entity should be OrdersStatusHistory but it was: " + entity.getClass(); + throw new IllegalStateException(msg, e); + } + } + + protected void checkDowncast(Entity entity) { + downcast(entity); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/dbmeta/OrdersTotalDbm.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/dbmeta/OrdersTotalDbm.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/dbmeta/OrdersTotalDbm.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,736 @@ +package jp.sf.pal.pompei.bsentity.dbmeta; + + +import jp.sf.pal.pompei.allcommon.Entity; +import jp.sf.pal.pompei.allcommon.dbmeta.DBMeta; +import jp.sf.pal.pompei.allcommon.dbmeta.AbstractDBMeta; +import jp.sf.pal.pompei.exentity.OrdersTotal; + +/** + * The dbmeta of ORDERS_TOTAL. (Singleton) + * + *
+ * [primary-key]
+ *     ORDERS_TOTAL_ID
+ * 
+ * [column-property]
+ *     ORDERS_TOTAL_ID, ORDERS_ID, TITLE, TEXT, VALUE, OT_CLASS, SORT_ORDER
+ * 
+ * [foreign-property]
+ *     
+ * 
+ * [refferer-property]
+ *     
+ * 
+ * [sequence]
+ *     
+ * 
+ * [identity]
+ *     
+ * 
+ * [update-date]
+ *     
+ * 
+ * [version-no]
+ *     
+ * 
+ * 
+ * + * @author DBFlute(AutoGenerator) + */ +public class OrdersTotalDbm extends AbstractDBMeta { + + // =================================================================================== + // Definition + // ========== + /** The type of entity. */ + protected static final Class ENTITY_TYPE = OrdersTotal.class; + + /** Singleton instance. */ + private static final OrdersTotalDbm _instance = new OrdersTotalDbm(); + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + private OrdersTotalDbm() { + } + + // =================================================================================== + // Singleton + // ========= + /** + * Get instance. + * + * @return Singleton instance. (NotNull) + */ + public static OrdersTotalDbm getInstance() { + return _instance; + } + + // =================================================================================== + // Name Definition + // =============== + /** Table db name. */ + public static final String TABLE_DB_NAME = "ORDERS_TOTAL"; + + /** Table cap-prop name. */ + public static final String TABLE_CAP_PROP_NAME = "OrdersTotal"; + + /** Table uncap-prop name. */ + public static final String TABLE_UNCAP_PROP_NAME = "ordersTotal"; + + /** Db-name of OrdersTotalId. */ + public static final String COLUMN_DB_NAME_OF_OrdersTotalId = "ORDERS_TOTAL_ID"; + /** Db-name of OrdersId. */ + public static final String COLUMN_DB_NAME_OF_OrdersId = "ORDERS_ID"; + /** Db-name of Title. */ + public static final String COLUMN_DB_NAME_OF_Title = "TITLE"; + /** Db-name of Text. */ + public static final String COLUMN_DB_NAME_OF_Text = "TEXT"; + /** Db-name of Value. */ + public static final String COLUMN_DB_NAME_OF_Value = "VALUE"; + /** Db-name of OtClass. */ + public static final String COLUMN_DB_NAME_OF_OtClass = "OT_CLASS"; + /** Db-name of SortOrder. */ + public static final String COLUMN_DB_NAME_OF_SortOrder = "SORT_ORDER"; + + /** Cap-prop-name of OrdersTotalId. */ + public static final String COLUMN_CAP_PROP_NAME_OF_OrdersTotalId = "OrdersTotalId"; + /** Cap-prop-name of OrdersId. */ + public static final String COLUMN_CAP_PROP_NAME_OF_OrdersId = "OrdersId"; + /** Cap-prop-name of Title. */ + public static final String COLUMN_CAP_PROP_NAME_OF_Title = "Title"; + /** Cap-prop-name of Text. */ + public static final String COLUMN_CAP_PROP_NAME_OF_Text = "Text"; + /** Cap-prop-name of Value. */ + public static final String COLUMN_CAP_PROP_NAME_OF_Value = "Value"; + /** Cap-prop-name of OtClass. */ + public static final String COLUMN_CAP_PROP_NAME_OF_OtClass = "OtClass"; + /** Cap-prop-name of SortOrder. */ + public static final String COLUMN_CAP_PROP_NAME_OF_SortOrder = "SortOrder"; + + + + /** Uncap-prop-name of OrdersTotalId. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_OrdersTotalId = "ordersTotalId"; + /** Uncap-prop-name of OrdersId. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_OrdersId = "ordersId"; + /** Uncap-prop-name of Title. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_Title = "title"; + /** Uncap-prop-name of Text. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_Text = "text"; + /** Uncap-prop-name of Value. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_Value = "value"; + /** Uncap-prop-name of OtClass. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_OtClass = "otClass"; + /** Uncap-prop-name of SortOrder. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_SortOrder = "sortOrder"; + + + + /** {db-name : cap-prop-name} map. */ + private static java.util.Map _dbNameCapPropNameMap; + protected static java.util.Map createDbNameCapPropNameMap() { + if (_dbNameCapPropNameMap != null) { + return _dbNameCapPropNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_DB_NAME, TABLE_CAP_PROP_NAME); + + map.put(COLUMN_DB_NAME_OF_OrdersTotalId, COLUMN_CAP_PROP_NAME_OF_OrdersTotalId); + map.put(COLUMN_DB_NAME_OF_OrdersId, COLUMN_CAP_PROP_NAME_OF_OrdersId); + map.put(COLUMN_DB_NAME_OF_Title, COLUMN_CAP_PROP_NAME_OF_Title); + map.put(COLUMN_DB_NAME_OF_Text, COLUMN_CAP_PROP_NAME_OF_Text); + map.put(COLUMN_DB_NAME_OF_Value, COLUMN_CAP_PROP_NAME_OF_Value); + map.put(COLUMN_DB_NAME_OF_OtClass, COLUMN_CAP_PROP_NAME_OF_OtClass); + map.put(COLUMN_DB_NAME_OF_SortOrder, COLUMN_CAP_PROP_NAME_OF_SortOrder); + + _dbNameCapPropNameMap = java.util.Collections.unmodifiableMap(map); + return _dbNameCapPropNameMap; + } + + /** {db-name : uncap-prop-name} map. */ + private static java.util.Map _dbNameUncapPropNameMap; + protected static java.util.Map createDbNameUncapPropNameMap() { + if (_dbNameUncapPropNameMap != null) { + return _dbNameUncapPropNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_DB_NAME, TABLE_UNCAP_PROP_NAME); + + map.put(COLUMN_DB_NAME_OF_OrdersTotalId, COLUMN_UNCAP_PROP_NAME_OF_OrdersTotalId); + map.put(COLUMN_DB_NAME_OF_OrdersId, COLUMN_UNCAP_PROP_NAME_OF_OrdersId); + map.put(COLUMN_DB_NAME_OF_Title, COLUMN_UNCAP_PROP_NAME_OF_Title); + map.put(COLUMN_DB_NAME_OF_Text, COLUMN_UNCAP_PROP_NAME_OF_Text); + map.put(COLUMN_DB_NAME_OF_Value, COLUMN_UNCAP_PROP_NAME_OF_Value); + map.put(COLUMN_DB_NAME_OF_OtClass, COLUMN_UNCAP_PROP_NAME_OF_OtClass); + map.put(COLUMN_DB_NAME_OF_SortOrder, COLUMN_UNCAP_PROP_NAME_OF_SortOrder); + + _dbNameUncapPropNameMap = java.util.Collections.unmodifiableMap(map); + return _dbNameUncapPropNameMap; + } + + /** {cap-prop-name : db-name} map. */ + private static java.util.Map _capPropNameDbNameMap; + protected static java.util.Map createCapPropNameDbNameMap() { + if (_capPropNameDbNameMap != null) { + return _capPropNameDbNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_CAP_PROP_NAME, TABLE_DB_NAME); + + map.put(COLUMN_CAP_PROP_NAME_OF_OrdersTotalId, COLUMN_DB_NAME_OF_OrdersTotalId); + map.put(COLUMN_CAP_PROP_NAME_OF_OrdersId, COLUMN_DB_NAME_OF_OrdersId); + map.put(COLUMN_CAP_PROP_NAME_OF_Title, COLUMN_DB_NAME_OF_Title); + map.put(COLUMN_CAP_PROP_NAME_OF_Text, COLUMN_DB_NAME_OF_Text); + map.put(COLUMN_CAP_PROP_NAME_OF_Value, COLUMN_DB_NAME_OF_Value); + map.put(COLUMN_CAP_PROP_NAME_OF_OtClass, COLUMN_DB_NAME_OF_OtClass); + map.put(COLUMN_CAP_PROP_NAME_OF_SortOrder, COLUMN_DB_NAME_OF_SortOrder); + + _capPropNameDbNameMap = java.util.Collections.unmodifiableMap(map); + return _capPropNameDbNameMap; + } + + /** {cap-prop-name : uncap-prop-name} map. */ + private static java.util.Map _capPropNameUncapPropNameMap; + protected static java.util.Map createCapPropNameUncapPropNameMap() { + if (_capPropNameUncapPropNameMap != null) { + return _capPropNameUncapPropNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_CAP_PROP_NAME, TABLE_UNCAP_PROP_NAME); + + map.put(COLUMN_CAP_PROP_NAME_OF_OrdersTotalId, COLUMN_UNCAP_PROP_NAME_OF_OrdersTotalId); + map.put(COLUMN_CAP_PROP_NAME_OF_OrdersId, COLUMN_UNCAP_PROP_NAME_OF_OrdersId); + map.put(COLUMN_CAP_PROP_NAME_OF_Title, COLUMN_UNCAP_PROP_NAME_OF_Title); + map.put(COLUMN_CAP_PROP_NAME_OF_Text, COLUMN_UNCAP_PROP_NAME_OF_Text); + map.put(COLUMN_CAP_PROP_NAME_OF_Value, COLUMN_UNCAP_PROP_NAME_OF_Value); + map.put(COLUMN_CAP_PROP_NAME_OF_OtClass, COLUMN_UNCAP_PROP_NAME_OF_OtClass); + map.put(COLUMN_CAP_PROP_NAME_OF_SortOrder, COLUMN_UNCAP_PROP_NAME_OF_SortOrder); + + _capPropNameUncapPropNameMap = java.util.Collections.unmodifiableMap(map); + return _capPropNameUncapPropNameMap; + } + + /** {uncap-prop-name : db-name} map. */ + private static java.util.Map _uncapPropNameDbNameMap; + protected static java.util.Map createUncapPropNameDbNameMap() { + if (_uncapPropNameDbNameMap != null) { + return _uncapPropNameDbNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_UNCAP_PROP_NAME, TABLE_DB_NAME); + + map.put(COLUMN_UNCAP_PROP_NAME_OF_OrdersTotalId, COLUMN_DB_NAME_OF_OrdersTotalId); + map.put(COLUMN_UNCAP_PROP_NAME_OF_OrdersId, COLUMN_DB_NAME_OF_OrdersId); + map.put(COLUMN_UNCAP_PROP_NAME_OF_Title, COLUMN_DB_NAME_OF_Title); + map.put(COLUMN_UNCAP_PROP_NAME_OF_Text, COLUMN_DB_NAME_OF_Text); + map.put(COLUMN_UNCAP_PROP_NAME_OF_Value, COLUMN_DB_NAME_OF_Value); + map.put(COLUMN_UNCAP_PROP_NAME_OF_OtClass, COLUMN_DB_NAME_OF_OtClass); + map.put(COLUMN_UNCAP_PROP_NAME_OF_SortOrder, COLUMN_DB_NAME_OF_SortOrder); + + _uncapPropNameDbNameMap = java.util.Collections.unmodifiableMap(map); + return _uncapPropNameDbNameMap; + } + + /** {uncap-prop-name : cap-prop-name} map. */ + private static java.util.Map _uncapPropNameCapPropNameMap; + protected static java.util.Map createUncapPropNameCapPropNameMap() { + if (_uncapPropNameCapPropNameMap != null) { + return _uncapPropNameCapPropNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_UNCAP_PROP_NAME, TABLE_CAP_PROP_NAME); + + map.put(COLUMN_UNCAP_PROP_NAME_OF_OrdersTotalId, COLUMN_CAP_PROP_NAME_OF_OrdersTotalId); + map.put(COLUMN_UNCAP_PROP_NAME_OF_OrdersId, COLUMN_CAP_PROP_NAME_OF_OrdersId); + map.put(COLUMN_UNCAP_PROP_NAME_OF_Title, COLUMN_CAP_PROP_NAME_OF_Title); + map.put(COLUMN_UNCAP_PROP_NAME_OF_Text, COLUMN_CAP_PROP_NAME_OF_Text); + map.put(COLUMN_UNCAP_PROP_NAME_OF_Value, COLUMN_CAP_PROP_NAME_OF_Value); + map.put(COLUMN_UNCAP_PROP_NAME_OF_OtClass, COLUMN_CAP_PROP_NAME_OF_OtClass); + map.put(COLUMN_UNCAP_PROP_NAME_OF_SortOrder, COLUMN_CAP_PROP_NAME_OF_SortOrder); + + _uncapPropNameCapPropNameMap = java.util.Collections.unmodifiableMap(map); + return _uncapPropNameCapPropNameMap; + } + + // =================================================================================== + // Name-Map + // ======== + /** + * This method implements the method that is declared at super. + * + * @return {db-name : cap-prop-name} map. + */ + public java.util.Map getDbNameCapPropNameMap() { + return createDbNameCapPropNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {db-name : uncap-prop-name} map. + */ + public java.util.Map getDbNameUncapPropNameMap() { + return createDbNameUncapPropNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {cap-prop-name : db-name} map. + */ + public java.util.Map getCapPropNameDbNameMap() { + return createCapPropNameDbNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {cap-prop-name : uncap-prop-name} map. + */ + public java.util.Map getCapPropNameUncapPropNameMap() { + return createCapPropNameUncapPropNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {uncap-prop-name : db-name} map. + */ + public java.util.Map getUncapPropNameDbNameMap() { + return createUncapPropNameDbNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {uncap-prop-name : cap-prop-name} map. + */ + public java.util.Map getUncapPropNameCapPropNameMap() { + return createUncapPropNameCapPropNameMap(); + } + + // =================================================================================== + // Table Name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + public String getTableDbName() { + return TABLE_DB_NAME; + } + + /** + * This method implements the method that is declared at super. + * + * @return Table cap-prop-name. (NotNull) + */ + public String getTableCapPropName() { + return TABLE_CAP_PROP_NAME; + } + + /** + * This method implements the method that is declared at super. + * + * @return Table property-name. (NotNull) + */ + public String getTableUncapPropName() { + return TABLE_UNCAP_PROP_NAME; + } + + // =================================================================================== + // Column Name + // =========== + public java.util.List getColumnDbNameList() { + final String[] columns = getColumnDbNameCommaString().split(","); + final java.util.List resultList = new java.util.ArrayList(); + for (int i=0; i < columns.length; i++) { + resultList.add(columns[i].trim()); + } + return resultList; + } + + public java.util.List getColumnCapPropNameList() { + final java.util.List columnDbNameList = getColumnDbNameList(); + final java.util.List resultList = new java.util.ArrayList(); + for (final java.util.Iterator ite = columnDbNameList.iterator(); ite.hasNext(); ) { + resultList.add(getDbNameCapPropNameMap().get((String)ite.next())); + } + return resultList; + } + + public java.util.List getColumnUncapPropNameList() { + final java.util.List columnDbNameList = getColumnDbNameList(); + final java.util.List resultList = new java.util.ArrayList(); + for (final java.util.Iterator ite = columnDbNameList.iterator(); ite.hasNext(); ) { + resultList.add(getDbNameUncapPropNameMap().get((String)ite.next())); + } + return resultList; + } + + /** + * This method implements the method that is declared at super. + * + * @return Column-db-name comma-string. (NotNull) + */ + public String getColumnDbNameCommaString() { + return "ORDERS_TOTAL_ID, ORDERS_ID, TITLE, TEXT, VALUE, OT_CLASS, SORT_ORDER"; + } + + // =================================================================================== + // Type Name + // ========= + /** + * This method implements the method that is declared at super. + * + * @return The type-name of entity. (NotNull) + */ + public String getEntityTypeName() { + return "jp.sf.pal.pompei.exentity.OrdersTotal"; + } + + /** + * This method implements the method that is declared at super. + * + * @return The type-name of condition-bean. (NotNull) + */ + public String getConditionBeanTypeName() { + return "jp.sf.pal.pompei.cbean.bs.OrdersTotalCB"; + } + + /** + * This method implements the method that is declared at super. + * + * @return The type-name of dao. (NotNull) + */ + public String getDaoTypeName() { + return "jp.sf.pal.pompei.exdao.OrdersTotalDao"; + } + + /** + * This method implements the method that is declared at super. + * + * @return The type-name of behavior. (NotNull) + */ + public String getBehaviorTypeName() { + return "jp.sf.pal.pompei.exbhv.OrdersTotalBhv"; + } + + // =================================================================================== + // Type + // ==== + /** + * This method implements the method that is declared at super. + * + * @return The type of entity. (NotNull) + */ + public Class getEntityType() { + return ENTITY_TYPE; + } + + // =================================================================================== + // Instance + // ======== + /** + * This method implements the method that is declared at super. + * + * @return The type of entity. (NotNull) + */ + public Entity newEntity() { + return newMyEntity(); + } + + /** + * New the instance of my entity. + * + * @return The instance of my entity. (NotNull) + */ + public OrdersTotal newMyEntity() { + return new OrdersTotal(); + } + + // =================================================================================== + // Foreign DBMeta + // ============== + /** + * This method implements the method that is declared at super. + * + * @param foreignPropertyName Foreign-property-name(Both OK - InitCap or not). (NotNull) + * @return Foreign DBMeta. (NotNull) + */ + public DBMeta getForeignDBMeta(String foreignPropertyName) { + assertStringNotNullAndNotTrimmedEmpty("foreignPropertyName", foreignPropertyName); + final String methodName = "getForeignDBMeta_" + foreignPropertyName.substring(0, 1) + foreignPropertyName.substring(1); + + java.lang.reflect.Method method = null; + try { + method = this.getClass().getMethod(methodName, new Class[]{}); + } catch (NoSuchMethodException e) { + String msg = "The foreignPropertyName is not found: foreignPropertyName=" + foreignPropertyName; + msg = msg + " tableName=" + TABLE_DB_NAME + " methodName=" + methodName; + throw new RuntimeException(msg, e); + } + try { + return (DBMeta)method.invoke(this, new Object[]{}); + } catch (IllegalAccessException e) { + throw new RuntimeException(e); + } catch (java.lang.reflect.InvocationTargetException e) { + throw new RuntimeException(e.getCause()); + } + } + + // =================================================================================== + // Determination + // ============= + /** + * This method implements the method that is declared at super. + * + * @return Determination. + */ + public boolean hasTwoOrMorePrimaryKeys() { + return false; + } + + /** + * This method implements the method that is declared at super. + * + * @return Determination. + */ + public boolean hasCommonColumn() { + return false; + } + + // =================================================================================== + // Entity Handling + // =============== + // ----------------------------------------------------- + // Accept + // ------ + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @param primaryKeyMap Primary key map. (NotNull and NotEmpty) + */ + public void acceptPrimaryKeyMap(Entity entity, java.util.Map primaryKeyMap) { + final OrdersTotal myEntity = (OrdersTotal)entity; + MapAssertUtil.assertPrimaryKeyMapNotNullAndNotEmpty(primaryKeyMap); + final MapStringValueAnalyzer analyzer = new MapStringValueAnalyzer(primaryKeyMap, entity.getModifiedPropertyNames()); + + MapAssertUtil.assertColumnExistingInPrimaryKeyMap(primaryKeyMap, "ORDERS_TOTAL_ID"); + if (analyzer.init("ORDERS_TOTAL_ID", "ordersTotalId", "ordersTotalId")) { myEntity.setOrdersTotalId(analyzer.analyzeNumber(java.math.BigDecimal.class)); }; + + + } + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @param primaryKeyMapString Primary-key map-string. (NotNull and NotEmpty) + */ + public void acceptPrimaryKeyMapString(Entity entity, String primaryKeyMapString) { + MapStringUtil.acceptPrimaryKeyMapString(primaryKeyMapString, entity); + } + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @param columnValueMap Column-value map. (NotNull and NotEmpty) + */ + public void acceptColumnValueMap(Entity entity, java.util.Map columnValueMap) { + final OrdersTotal myEntity = (OrdersTotal)entity; + MapAssertUtil.assertColumnValueMapNotNullAndNotEmpty(columnValueMap); + final MapStringValueAnalyzer analyzer = new MapStringValueAnalyzer(columnValueMap, entity.getModifiedPropertyNames()); + + if (analyzer.init("ORDERS_TOTAL_ID", "ordersTotalId", "ordersTotalId")) { myEntity.setOrdersTotalId(analyzer.analyzeNumber(java.math.BigDecimal.class)); }; + if (analyzer.init("ORDERS_ID", "ordersId", "ordersId")) { myEntity.setOrdersId(analyzer.analyzeNumber(java.math.BigDecimal.class)); }; + if (analyzer.init("TITLE", "title", "title")) { myEntity.setTitle(analyzer.analyzeString(String.class)); }; + if (analyzer.init("TEXT", "text", "text")) { myEntity.setText(analyzer.analyzeString(String.class)); }; + if (analyzer.init("VALUE", "value", "value")) { myEntity.setValue(analyzer.analyzeNumber(java.math.BigDecimal.class)); }; + if (analyzer.init("OT_CLASS", "otClass", "otClass")) { myEntity.setOtClass(analyzer.analyzeString(String.class)); }; + if (analyzer.init("SORT_ORDER", "sortOrder", "sortOrder")) { myEntity.setSortOrder(analyzer.analyzeNumber(java.math.BigDecimal.class)); }; + + } + + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @param columnValueMapString Column-value map-string. (NotNull and NotEmpty) + */ + public void acceptColumnValueMapString(Entity entity, String columnValueMapString) { + MapStringUtil.acceptColumnValueMapString(columnValueMapString, entity); + } + + + // ----------------------------------------------------- + // Extract + // ------- + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @return Primary-key map-string. (NotNull) + */ + public String extractPrimaryKeyMapString(Entity entity) { + return MapStringUtil.extractPrimaryKeyMapString(entity); + } + + /** + * Extract primary-key map-string. + * + * @param entity Target entity. (NotNull) + * @param startBrace Start-brace. (NotNull) + * @param endBrace End-brace. (NotNull) + * @param delimiter Delimiter. (NotNull) + * @param equal Equal. (NotNull) + * @return Primary-key map-string. (NotNull) + */ + public String extractPrimaryKeyMapString(Entity entity, String startBrace, String endBrace, String delimiter, String equal) { + final OrdersTotal myEntity = (OrdersTotal)entity; + final String mapMarkAndStartBrace = MAP_STRING_MAP_MARK + startBrace; + final StringBuffer sb = new StringBuffer(); + helpAppendingColumnValueString(sb, delimiter, equal, "ORDERS_TOTAL_ID", myEntity.getOrdersTotalId()); + + sb.delete(0, delimiter.length()).insert(0, mapMarkAndStartBrace).append(endBrace); + return sb.toString(); + + } + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @return Column-value map-string. (NotNull) + */ + public String extractColumnValueMapString(Entity entity) { + return MapStringUtil.extractColumnValueMapString(entity); + } + + /** + * Extract column-value map-string. + * + * @param entity Target entity. (NotNull) + * @param startBrace Start-brace. (NotNull) + * @param endBrace End-brace. (NotNull) + * @param delimiter Delimiter. (NotNull) + * @param equal Equal. (NotNull) + * @return Column-value map-string. (NotNull) + */ + public String extractColumnValueMapString(Entity entity, String startBrace, String endBrace, String delimiter, String equal) { + final OrdersTotal myEntity = (OrdersTotal)entity; + final String mapMarkAndStartBrace = MAP_STRING_MAP_MARK + startBrace; + final StringBuffer sb = new StringBuffer(); + helpAppendingColumnValueString(sb, delimiter, equal, "ORDERS_TOTAL_ID", myEntity.getOrdersTotalId()); + helpAppendingColumnValueString(sb, delimiter, equal, "ORDERS_ID", myEntity.getOrdersId()); + helpAppendingColumnValueString(sb, delimiter, equal, "TITLE", myEntity.getTitle()); + helpAppendingColumnValueString(sb, delimiter, equal, "TEXT", myEntity.getText()); + helpAppendingColumnValueString(sb, delimiter, equal, "VALUE", myEntity.getValue()); + helpAppendingColumnValueString(sb, delimiter, equal, "OT_CLASS", myEntity.getOtClass()); + helpAppendingColumnValueString(sb, delimiter, equal, "SORT_ORDER", myEntity.getSortOrder()); + + sb.delete(0, delimiter.length()).insert(0, mapMarkAndStartBrace).append(endBrace); + return sb.toString(); + } + + private void helpAppendingColumnValueString(StringBuffer sb, String delimiter, String equal, String colName, Object value) { + sb.append(delimiter).append(colName).append(equal); + sb.append(helpGettingColumnStringValue(value)); + } + + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @return Column-value map-string. (NotNull) + */ + public String extractCommonColumnValueMapString(Entity entity) { + return "map:{}"; + } + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @return Column-value map-string. (NotNull) + */ + public String extractCommonColumnValueMapString(Entity entity, String startBrace, String endBrace, String delimiter, String equal) { + return "map:" + startBrace + endBrace; + } + + + // ----------------------------------------------------- + // Convert + // ------- + public java.util.List convertToColumnValueList(Entity entity) { + return new java.util.ArrayList(convertToColumnValueMap(entity).values()); + } + + public java.util.Map convertToColumnValueMap(Entity entity) { + final OrdersTotal myEntity = downcast(entity); + final java.util.Map valueMap = new java.util.LinkedHashMap(); + valueMap.put("ORDERS_TOTAL_ID", myEntity.getOrdersTotalId()); + valueMap.put("ORDERS_ID", myEntity.getOrdersId()); + valueMap.put("TITLE", myEntity.getTitle()); + valueMap.put("TEXT", myEntity.getText()); + valueMap.put("VALUE", myEntity.getValue()); + valueMap.put("OT_CLASS", myEntity.getOtClass()); + valueMap.put("SORT_ORDER", myEntity.getSortOrder()); + return valueMap; + } + + public java.util.List convertToColumnStringValueList(Entity entity) { + return new java.util.ArrayList(convertToColumnStringValueMap(entity).values()); + } + + public java.util.Map convertToColumnStringValueMap(Entity entity) { + final OrdersTotal myEntity = downcast(entity); + final java.util.Map valueMap = new java.util.LinkedHashMap(); + valueMap.put("ORDERS_TOTAL_ID", helpGettingColumnStringValue(myEntity.getOrdersTotalId())); + valueMap.put("ORDERS_ID", helpGettingColumnStringValue(myEntity.getOrdersId())); + valueMap.put("TITLE", helpGettingColumnStringValue(myEntity.getTitle())); + valueMap.put("TEXT", helpGettingColumnStringValue(myEntity.getText())); + valueMap.put("VALUE", helpGettingColumnStringValue(myEntity.getValue())); + valueMap.put("OT_CLASS", helpGettingColumnStringValue(myEntity.getOtClass())); + valueMap.put("SORT_ORDER", helpGettingColumnStringValue(myEntity.getSortOrder())); + return valueMap; + } + + // =================================================================================== + // JDBC Support + // ============ + public String getPreparedInsertClause() { + return "insert into ORDERS_TOTAL(ORDERS_TOTAL_ID, ORDERS_ID, TITLE, TEXT, VALUE, OT_CLASS, SORT_ORDER) values(? , ? , ? , ? , ? , ? , ? )"; + } + + public String getPreparedInsertClause(String tablePrefix) { + return "insert into " + tablePrefix + "ORDERS_TOTAL(ORDERS_TOTAL_ID, ORDERS_ID, TITLE, TEXT, VALUE, OT_CLASS, SORT_ORDER) values(? , ? , ? , ? , ? , ? , ? )"; + } + + // =================================================================================== + // Helper + // ====== + protected OrdersTotal downcast(Entity entity) { + assertObjectNotNull("entity", entity); + try { + return (OrdersTotal)entity; + } catch (ClassCastException e) { + String msg = "The entity should be OrdersTotal but it was: " + entity.getClass(); + throw new IllegalStateException(msg, e); + } + } + + protected void checkDowncast(Entity entity) { + downcast(entity); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/dbmeta/ProductsAttributesDbm.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/dbmeta/ProductsAttributesDbm.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/dbmeta/ProductsAttributesDbm.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,720 @@ +package jp.sf.pal.pompei.bsentity.dbmeta; + + +import jp.sf.pal.pompei.allcommon.Entity; +import jp.sf.pal.pompei.allcommon.dbmeta.DBMeta; +import jp.sf.pal.pompei.allcommon.dbmeta.AbstractDBMeta; +import jp.sf.pal.pompei.exentity.ProductsAttributes; + +/** + * The dbmeta of PRODUCTS_ATTRIBUTES. (Singleton) + * + *
+ * [primary-key]
+ *     PRODUCTS_ATTRIBUTES_ID
+ * 
+ * [column-property]
+ *     PRODUCTS_ATTRIBUTES_ID, PRODUCTS_ID, OPTIONS_ID, OPTIONS_VALUES_ID, OPTIONS_VALUES_PRICE, PRICE_PREFIX
+ * 
+ * [foreign-property]
+ *     
+ * 
+ * [refferer-property]
+ *     
+ * 
+ * [sequence]
+ *     
+ * 
+ * [identity]
+ *     
+ * 
+ * [update-date]
+ *     
+ * 
+ * [version-no]
+ *     
+ * 
+ * 
+ * + * @author DBFlute(AutoGenerator) + */ +public class ProductsAttributesDbm extends AbstractDBMeta { + + // =================================================================================== + // Definition + // ========== + /** The type of entity. */ + protected static final Class ENTITY_TYPE = ProductsAttributes.class; + + /** Singleton instance. */ + private static final ProductsAttributesDbm _instance = new ProductsAttributesDbm(); + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + private ProductsAttributesDbm() { + } + + // =================================================================================== + // Singleton + // ========= + /** + * Get instance. + * + * @return Singleton instance. (NotNull) + */ + public static ProductsAttributesDbm getInstance() { + return _instance; + } + + // =================================================================================== + // Name Definition + // =============== + /** Table db name. */ + public static final String TABLE_DB_NAME = "PRODUCTS_ATTRIBUTES"; + + /** Table cap-prop name. */ + public static final String TABLE_CAP_PROP_NAME = "ProductsAttributes"; + + /** Table uncap-prop name. */ + public static final String TABLE_UNCAP_PROP_NAME = "productsAttributes"; + + /** Db-name of ProductsAttributesId. */ + public static final String COLUMN_DB_NAME_OF_ProductsAttributesId = "PRODUCTS_ATTRIBUTES_ID"; + /** Db-name of ProductsId. */ + public static final String COLUMN_DB_NAME_OF_ProductsId = "PRODUCTS_ID"; + /** Db-name of OptionsId. */ + public static final String COLUMN_DB_NAME_OF_OptionsId = "OPTIONS_ID"; + /** Db-name of OptionsValuesId. */ + public static final String COLUMN_DB_NAME_OF_OptionsValuesId = "OPTIONS_VALUES_ID"; + /** Db-name of OptionsValuesPrice. */ + public static final String COLUMN_DB_NAME_OF_OptionsValuesPrice = "OPTIONS_VALUES_PRICE"; + /** Db-name of PricePrefix. */ + public static final String COLUMN_DB_NAME_OF_PricePrefix = "PRICE_PREFIX"; + + /** Cap-prop-name of ProductsAttributesId. */ + public static final String COLUMN_CAP_PROP_NAME_OF_ProductsAttributesId = "ProductsAttributesId"; + /** Cap-prop-name of ProductsId. */ + public static final String COLUMN_CAP_PROP_NAME_OF_ProductsId = "ProductsId"; + /** Cap-prop-name of OptionsId. */ + public static final String COLUMN_CAP_PROP_NAME_OF_OptionsId = "OptionsId"; + /** Cap-prop-name of OptionsValuesId. */ + public static final String COLUMN_CAP_PROP_NAME_OF_OptionsValuesId = "OptionsValuesId"; + /** Cap-prop-name of OptionsValuesPrice. */ + public static final String COLUMN_CAP_PROP_NAME_OF_OptionsValuesPrice = "OptionsValuesPrice"; + /** Cap-prop-name of PricePrefix. */ + public static final String COLUMN_CAP_PROP_NAME_OF_PricePrefix = "PricePrefix"; + + + + /** Uncap-prop-name of ProductsAttributesId. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_ProductsAttributesId = "productsAttributesId"; + /** Uncap-prop-name of ProductsId. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_ProductsId = "productsId"; + /** Uncap-prop-name of OptionsId. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_OptionsId = "optionsId"; + /** Uncap-prop-name of OptionsValuesId. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_OptionsValuesId = "optionsValuesId"; + /** Uncap-prop-name of OptionsValuesPrice. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_OptionsValuesPrice = "optionsValuesPrice"; + /** Uncap-prop-name of PricePrefix. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_PricePrefix = "pricePrefix"; + + + + /** {db-name : cap-prop-name} map. */ + private static java.util.Map _dbNameCapPropNameMap; + protected static java.util.Map createDbNameCapPropNameMap() { + if (_dbNameCapPropNameMap != null) { + return _dbNameCapPropNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_DB_NAME, TABLE_CAP_PROP_NAME); + + map.put(COLUMN_DB_NAME_OF_ProductsAttributesId, COLUMN_CAP_PROP_NAME_OF_ProductsAttributesId); + map.put(COLUMN_DB_NAME_OF_ProductsId, COLUMN_CAP_PROP_NAME_OF_ProductsId); + map.put(COLUMN_DB_NAME_OF_OptionsId, COLUMN_CAP_PROP_NAME_OF_OptionsId); + map.put(COLUMN_DB_NAME_OF_OptionsValuesId, COLUMN_CAP_PROP_NAME_OF_OptionsValuesId); + map.put(COLUMN_DB_NAME_OF_OptionsValuesPrice, COLUMN_CAP_PROP_NAME_OF_OptionsValuesPrice); + map.put(COLUMN_DB_NAME_OF_PricePrefix, COLUMN_CAP_PROP_NAME_OF_PricePrefix); + + _dbNameCapPropNameMap = java.util.Collections.unmodifiableMap(map); + return _dbNameCapPropNameMap; + } + + /** {db-name : uncap-prop-name} map. */ + private static java.util.Map _dbNameUncapPropNameMap; + protected static java.util.Map createDbNameUncapPropNameMap() { + if (_dbNameUncapPropNameMap != null) { + return _dbNameUncapPropNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_DB_NAME, TABLE_UNCAP_PROP_NAME); + + map.put(COLUMN_DB_NAME_OF_ProductsAttributesId, COLUMN_UNCAP_PROP_NAME_OF_ProductsAttributesId); + map.put(COLUMN_DB_NAME_OF_ProductsId, COLUMN_UNCAP_PROP_NAME_OF_ProductsId); + map.put(COLUMN_DB_NAME_OF_OptionsId, COLUMN_UNCAP_PROP_NAME_OF_OptionsId); + map.put(COLUMN_DB_NAME_OF_OptionsValuesId, COLUMN_UNCAP_PROP_NAME_OF_OptionsValuesId); + map.put(COLUMN_DB_NAME_OF_OptionsValuesPrice, COLUMN_UNCAP_PROP_NAME_OF_OptionsValuesPrice); + map.put(COLUMN_DB_NAME_OF_PricePrefix, COLUMN_UNCAP_PROP_NAME_OF_PricePrefix); + + _dbNameUncapPropNameMap = java.util.Collections.unmodifiableMap(map); + return _dbNameUncapPropNameMap; + } + + /** {cap-prop-name : db-name} map. */ + private static java.util.Map _capPropNameDbNameMap; + protected static java.util.Map createCapPropNameDbNameMap() { + if (_capPropNameDbNameMap != null) { + return _capPropNameDbNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_CAP_PROP_NAME, TABLE_DB_NAME); + + map.put(COLUMN_CAP_PROP_NAME_OF_ProductsAttributesId, COLUMN_DB_NAME_OF_ProductsAttributesId); + map.put(COLUMN_CAP_PROP_NAME_OF_ProductsId, COLUMN_DB_NAME_OF_ProductsId); + map.put(COLUMN_CAP_PROP_NAME_OF_OptionsId, COLUMN_DB_NAME_OF_OptionsId); + map.put(COLUMN_CAP_PROP_NAME_OF_OptionsValuesId, COLUMN_DB_NAME_OF_OptionsValuesId); + map.put(COLUMN_CAP_PROP_NAME_OF_OptionsValuesPrice, COLUMN_DB_NAME_OF_OptionsValuesPrice); + map.put(COLUMN_CAP_PROP_NAME_OF_PricePrefix, COLUMN_DB_NAME_OF_PricePrefix); + + _capPropNameDbNameMap = java.util.Collections.unmodifiableMap(map); + return _capPropNameDbNameMap; + } + + /** {cap-prop-name : uncap-prop-name} map. */ + private static java.util.Map _capPropNameUncapPropNameMap; + protected static java.util.Map createCapPropNameUncapPropNameMap() { + if (_capPropNameUncapPropNameMap != null) { + return _capPropNameUncapPropNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_CAP_PROP_NAME, TABLE_UNCAP_PROP_NAME); + + map.put(COLUMN_CAP_PROP_NAME_OF_ProductsAttributesId, COLUMN_UNCAP_PROP_NAME_OF_ProductsAttributesId); + map.put(COLUMN_CAP_PROP_NAME_OF_ProductsId, COLUMN_UNCAP_PROP_NAME_OF_ProductsId); + map.put(COLUMN_CAP_PROP_NAME_OF_OptionsId, COLUMN_UNCAP_PROP_NAME_OF_OptionsId); + map.put(COLUMN_CAP_PROP_NAME_OF_OptionsValuesId, COLUMN_UNCAP_PROP_NAME_OF_OptionsValuesId); + map.put(COLUMN_CAP_PROP_NAME_OF_OptionsValuesPrice, COLUMN_UNCAP_PROP_NAME_OF_OptionsValuesPrice); + map.put(COLUMN_CAP_PROP_NAME_OF_PricePrefix, COLUMN_UNCAP_PROP_NAME_OF_PricePrefix); + + _capPropNameUncapPropNameMap = java.util.Collections.unmodifiableMap(map); + return _capPropNameUncapPropNameMap; + } + + /** {uncap-prop-name : db-name} map. */ + private static java.util.Map _uncapPropNameDbNameMap; + protected static java.util.Map createUncapPropNameDbNameMap() { + if (_uncapPropNameDbNameMap != null) { + return _uncapPropNameDbNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_UNCAP_PROP_NAME, TABLE_DB_NAME); + + map.put(COLUMN_UNCAP_PROP_NAME_OF_ProductsAttributesId, COLUMN_DB_NAME_OF_ProductsAttributesId); + map.put(COLUMN_UNCAP_PROP_NAME_OF_ProductsId, COLUMN_DB_NAME_OF_ProductsId); + map.put(COLUMN_UNCAP_PROP_NAME_OF_OptionsId, COLUMN_DB_NAME_OF_OptionsId); + map.put(COLUMN_UNCAP_PROP_NAME_OF_OptionsValuesId, COLUMN_DB_NAME_OF_OptionsValuesId); + map.put(COLUMN_UNCAP_PROP_NAME_OF_OptionsValuesPrice, COLUMN_DB_NAME_OF_OptionsValuesPrice); + map.put(COLUMN_UNCAP_PROP_NAME_OF_PricePrefix, COLUMN_DB_NAME_OF_PricePrefix); + + _uncapPropNameDbNameMap = java.util.Collections.unmodifiableMap(map); + return _uncapPropNameDbNameMap; + } + + /** {uncap-prop-name : cap-prop-name} map. */ + private static java.util.Map _uncapPropNameCapPropNameMap; + protected static java.util.Map createUncapPropNameCapPropNameMap() { + if (_uncapPropNameCapPropNameMap != null) { + return _uncapPropNameCapPropNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_UNCAP_PROP_NAME, TABLE_CAP_PROP_NAME); + + map.put(COLUMN_UNCAP_PROP_NAME_OF_ProductsAttributesId, COLUMN_CAP_PROP_NAME_OF_ProductsAttributesId); + map.put(COLUMN_UNCAP_PROP_NAME_OF_ProductsId, COLUMN_CAP_PROP_NAME_OF_ProductsId); + map.put(COLUMN_UNCAP_PROP_NAME_OF_OptionsId, COLUMN_CAP_PROP_NAME_OF_OptionsId); + map.put(COLUMN_UNCAP_PROP_NAME_OF_OptionsValuesId, COLUMN_CAP_PROP_NAME_OF_OptionsValuesId); + map.put(COLUMN_UNCAP_PROP_NAME_OF_OptionsValuesPrice, COLUMN_CAP_PROP_NAME_OF_OptionsValuesPrice); + map.put(COLUMN_UNCAP_PROP_NAME_OF_PricePrefix, COLUMN_CAP_PROP_NAME_OF_PricePrefix); + + _uncapPropNameCapPropNameMap = java.util.Collections.unmodifiableMap(map); + return _uncapPropNameCapPropNameMap; + } + + // =================================================================================== + // Name-Map + // ======== + /** + * This method implements the method that is declared at super. + * + * @return {db-name : cap-prop-name} map. + */ + public java.util.Map getDbNameCapPropNameMap() { + return createDbNameCapPropNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {db-name : uncap-prop-name} map. + */ + public java.util.Map getDbNameUncapPropNameMap() { + return createDbNameUncapPropNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {cap-prop-name : db-name} map. + */ + public java.util.Map getCapPropNameDbNameMap() { + return createCapPropNameDbNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {cap-prop-name : uncap-prop-name} map. + */ + public java.util.Map getCapPropNameUncapPropNameMap() { + return createCapPropNameUncapPropNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {uncap-prop-name : db-name} map. + */ + public java.util.Map getUncapPropNameDbNameMap() { + return createUncapPropNameDbNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {uncap-prop-name : cap-prop-name} map. + */ + public java.util.Map getUncapPropNameCapPropNameMap() { + return createUncapPropNameCapPropNameMap(); + } + + // =================================================================================== + // Table Name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + public String getTableDbName() { + return TABLE_DB_NAME; + } + + /** + * This method implements the method that is declared at super. + * + * @return Table cap-prop-name. (NotNull) + */ + public String getTableCapPropName() { + return TABLE_CAP_PROP_NAME; + } + + /** + * This method implements the method that is declared at super. + * + * @return Table property-name. (NotNull) + */ + public String getTableUncapPropName() { + return TABLE_UNCAP_PROP_NAME; + } + + // =================================================================================== + // Column Name + // =========== + public java.util.List getColumnDbNameList() { + final String[] columns = getColumnDbNameCommaString().split(","); + final java.util.List resultList = new java.util.ArrayList(); + for (int i=0; i < columns.length; i++) { + resultList.add(columns[i].trim()); + } + return resultList; + } + + public java.util.List getColumnCapPropNameList() { + final java.util.List columnDbNameList = getColumnDbNameList(); + final java.util.List resultList = new java.util.ArrayList(); + for (final java.util.Iterator ite = columnDbNameList.iterator(); ite.hasNext(); ) { + resultList.add(getDbNameCapPropNameMap().get((String)ite.next())); + } + return resultList; + } + + public java.util.List getColumnUncapPropNameList() { + final java.util.List columnDbNameList = getColumnDbNameList(); + final java.util.List resultList = new java.util.ArrayList(); + for (final java.util.Iterator ite = columnDbNameList.iterator(); ite.hasNext(); ) { + resultList.add(getDbNameUncapPropNameMap().get((String)ite.next())); + } + return resultList; + } + + /** + * This method implements the method that is declared at super. + * + * @return Column-db-name comma-string. (NotNull) + */ + public String getColumnDbNameCommaString() { + return "PRODUCTS_ATTRIBUTES_ID, PRODUCTS_ID, OPTIONS_ID, OPTIONS_VALUES_ID, OPTIONS_VALUES_PRICE, PRICE_PREFIX"; + } + + // =================================================================================== + // Type Name + // ========= + /** + * This method implements the method that is declared at super. + * + * @return The type-name of entity. (NotNull) + */ + public String getEntityTypeName() { + return "jp.sf.pal.pompei.exentity.ProductsAttributes"; + } + + /** + * This method implements the method that is declared at super. + * + * @return The type-name of condition-bean. (NotNull) + */ + public String getConditionBeanTypeName() { + return "jp.sf.pal.pompei.cbean.bs.ProductsAttributesCB"; + } + + /** + * This method implements the method that is declared at super. + * + * @return The type-name of dao. (NotNull) + */ + public String getDaoTypeName() { + return "jp.sf.pal.pompei.exdao.ProductsAttributesDao"; + } + + /** + * This method implements the method that is declared at super. + * + * @return The type-name of behavior. (NotNull) + */ + public String getBehaviorTypeName() { + return "jp.sf.pal.pompei.exbhv.ProductsAttributesBhv"; + } + + // =================================================================================== + // Type + // ==== + /** + * This method implements the method that is declared at super. + * + * @return The type of entity. (NotNull) + */ + public Class getEntityType() { + return ENTITY_TYPE; + } + + // =================================================================================== + // Instance + // ======== + /** + * This method implements the method that is declared at super. + * + * @return The type of entity. (NotNull) + */ + public Entity newEntity() { + return newMyEntity(); + } + + /** + * New the instance of my entity. + * + * @return The instance of my entity. (NotNull) + */ + public ProductsAttributes newMyEntity() { + return new ProductsAttributes(); + } + + // =================================================================================== + // Foreign DBMeta + // ============== + /** + * This method implements the method that is declared at super. + * + * @param foreignPropertyName Foreign-property-name(Both OK - InitCap or not). (NotNull) + * @return Foreign DBMeta. (NotNull) + */ + public DBMeta getForeignDBMeta(String foreignPropertyName) { + assertStringNotNullAndNotTrimmedEmpty("foreignPropertyName", foreignPropertyName); + final String methodName = "getForeignDBMeta_" + foreignPropertyName.substring(0, 1) + foreignPropertyName.substring(1); + + java.lang.reflect.Method method = null; + try { + method = this.getClass().getMethod(methodName, new Class[]{}); + } catch (NoSuchMethodException e) { + String msg = "The foreignPropertyName is not found: foreignPropertyName=" + foreignPropertyName; + msg = msg + " tableName=" + TABLE_DB_NAME + " methodName=" + methodName; + throw new RuntimeException(msg, e); + } + try { + return (DBMeta)method.invoke(this, new Object[]{}); + } catch (IllegalAccessException e) { + throw new RuntimeException(e); + } catch (java.lang.reflect.InvocationTargetException e) { + throw new RuntimeException(e.getCause()); + } + } + + // =================================================================================== + // Determination + // ============= + /** + * This method implements the method that is declared at super. + * + * @return Determination. + */ + public boolean hasTwoOrMorePrimaryKeys() { + return false; + } + + /** + * This method implements the method that is declared at super. + * + * @return Determination. + */ + public boolean hasCommonColumn() { + return false; + } + + // =================================================================================== + // Entity Handling + // =============== + // ----------------------------------------------------- + // Accept + // ------ + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @param primaryKeyMap Primary key map. (NotNull and NotEmpty) + */ + public void acceptPrimaryKeyMap(Entity entity, java.util.Map primaryKeyMap) { + final ProductsAttributes myEntity = (ProductsAttributes)entity; + MapAssertUtil.assertPrimaryKeyMapNotNullAndNotEmpty(primaryKeyMap); + final MapStringValueAnalyzer analyzer = new MapStringValueAnalyzer(primaryKeyMap, entity.getModifiedPropertyNames()); + + MapAssertUtil.assertColumnExistingInPrimaryKeyMap(primaryKeyMap, "PRODUCTS_ATTRIBUTES_ID"); + if (analyzer.init("PRODUCTS_ATTRIBUTES_ID", "productsAttributesId", "productsAttributesId")) { myEntity.setProductsAttributesId(analyzer.analyzeNumber(java.math.BigDecimal.class)); }; + + + } + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @param primaryKeyMapString Primary-key map-string. (NotNull and NotEmpty) + */ + public void acceptPrimaryKeyMapString(Entity entity, String primaryKeyMapString) { + MapStringUtil.acceptPrimaryKeyMapString(primaryKeyMapString, entity); + } + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @param columnValueMap Column-value map. (NotNull and NotEmpty) + */ + public void acceptColumnValueMap(Entity entity, java.util.Map columnValueMap) { + final ProductsAttributes myEntity = (ProductsAttributes)entity; + MapAssertUtil.assertColumnValueMapNotNullAndNotEmpty(columnValueMap); + final MapStringValueAnalyzer analyzer = new MapStringValueAnalyzer(columnValueMap, entity.getModifiedPropertyNames()); + + if (analyzer.init("PRODUCTS_ATTRIBUTES_ID", "productsAttributesId", "productsAttributesId")) { myEntity.setProductsAttributesId(analyzer.analyzeNumber(java.math.BigDecimal.class)); }; + if (analyzer.init("PRODUCTS_ID", "productsId", "productsId")) { myEntity.setProductsId(analyzer.analyzeNumber(java.math.BigDecimal.class)); }; + if (analyzer.init("OPTIONS_ID", "optionsId", "optionsId")) { myEntity.setOptionsId(analyzer.analyzeNumber(java.math.BigDecimal.class)); }; + if (analyzer.init("OPTIONS_VALUES_ID", "optionsValuesId", "optionsValuesId")) { myEntity.setOptionsValuesId(analyzer.analyzeNumber(java.math.BigDecimal.class)); }; + if (analyzer.init("OPTIONS_VALUES_PRICE", "optionsValuesPrice", "optionsValuesPrice")) { myEntity.setOptionsValuesPrice(analyzer.analyzeNumber(java.math.BigDecimal.class)); }; + if (analyzer.init("PRICE_PREFIX", "pricePrefix", "pricePrefix")) { myEntity.setPricePrefix(analyzer.analyzeString(String.class)); }; + + } + + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @param columnValueMapString Column-value map-string. (NotNull and NotEmpty) + */ + public void acceptColumnValueMapString(Entity entity, String columnValueMapString) { + MapStringUtil.acceptColumnValueMapString(columnValueMapString, entity); + } + + + // ----------------------------------------------------- + // Extract + // ------- + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @return Primary-key map-string. (NotNull) + */ + public String extractPrimaryKeyMapString(Entity entity) { + return MapStringUtil.extractPrimaryKeyMapString(entity); + } + + /** + * Extract primary-key map-string. + * + * @param entity Target entity. (NotNull) + * @param startBrace Start-brace. (NotNull) + * @param endBrace End-brace. (NotNull) + * @param delimiter Delimiter. (NotNull) + * @param equal Equal. (NotNull) + * @return Primary-key map-string. (NotNull) + */ + public String extractPrimaryKeyMapString(Entity entity, String startBrace, String endBrace, String delimiter, String equal) { + final ProductsAttributes myEntity = (ProductsAttributes)entity; + final String mapMarkAndStartBrace = MAP_STRING_MAP_MARK + startBrace; + final StringBuffer sb = new StringBuffer(); + helpAppendingColumnValueString(sb, delimiter, equal, "PRODUCTS_ATTRIBUTES_ID", myEntity.getProductsAttributesId()); + + sb.delete(0, delimiter.length()).insert(0, mapMarkAndStartBrace).append(endBrace); + return sb.toString(); + + } + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @return Column-value map-string. (NotNull) + */ + public String extractColumnValueMapString(Entity entity) { + return MapStringUtil.extractColumnValueMapString(entity); + } + + /** + * Extract column-value map-string. + * + * @param entity Target entity. (NotNull) + * @param startBrace Start-brace. (NotNull) + * @param endBrace End-brace. (NotNull) + * @param delimiter Delimiter. (NotNull) + * @param equal Equal. (NotNull) + * @return Column-value map-string. (NotNull) + */ + public String extractColumnValueMapString(Entity entity, String startBrace, String endBrace, String delimiter, String equal) { + final ProductsAttributes myEntity = (ProductsAttributes)entity; + final String mapMarkAndStartBrace = MAP_STRING_MAP_MARK + startBrace; + final StringBuffer sb = new StringBuffer(); + helpAppendingColumnValueString(sb, delimiter, equal, "PRODUCTS_ATTRIBUTES_ID", myEntity.getProductsAttributesId()); + helpAppendingColumnValueString(sb, delimiter, equal, "PRODUCTS_ID", myEntity.getProductsId()); + helpAppendingColumnValueString(sb, delimiter, equal, "OPTIONS_ID", myEntity.getOptionsId()); + helpAppendingColumnValueString(sb, delimiter, equal, "OPTIONS_VALUES_ID", myEntity.getOptionsValuesId()); + helpAppendingColumnValueString(sb, delimiter, equal, "OPTIONS_VALUES_PRICE", myEntity.getOptionsValuesPrice()); + helpAppendingColumnValueString(sb, delimiter, equal, "PRICE_PREFIX", myEntity.getPricePrefix()); + + sb.delete(0, delimiter.length()).insert(0, mapMarkAndStartBrace).append(endBrace); + return sb.toString(); + } + + private void helpAppendingColumnValueString(StringBuffer sb, String delimiter, String equal, String colName, Object value) { + sb.append(delimiter).append(colName).append(equal); + sb.append(helpGettingColumnStringValue(value)); + } + + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @return Column-value map-string. (NotNull) + */ + public String extractCommonColumnValueMapString(Entity entity) { + return "map:{}"; + } + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @return Column-value map-string. (NotNull) + */ + public String extractCommonColumnValueMapString(Entity entity, String startBrace, String endBrace, String delimiter, String equal) { + return "map:" + startBrace + endBrace; + } + + + // ----------------------------------------------------- + // Convert + // ------- + public java.util.List convertToColumnValueList(Entity entity) { + return new java.util.ArrayList(convertToColumnValueMap(entity).values()); + } + + public java.util.Map convertToColumnValueMap(Entity entity) { + final ProductsAttributes myEntity = downcast(entity); + final java.util.Map valueMap = new java.util.LinkedHashMap(); + valueMap.put("PRODUCTS_ATTRIBUTES_ID", myEntity.getProductsAttributesId()); + valueMap.put("PRODUCTS_ID", myEntity.getProductsId()); + valueMap.put("OPTIONS_ID", myEntity.getOptionsId()); + valueMap.put("OPTIONS_VALUES_ID", myEntity.getOptionsValuesId()); + valueMap.put("OPTIONS_VALUES_PRICE", myEntity.getOptionsValuesPrice()); + valueMap.put("PRICE_PREFIX", myEntity.getPricePrefix()); + return valueMap; + } + + public java.util.List convertToColumnStringValueList(Entity entity) { + return new java.util.ArrayList(convertToColumnStringValueMap(entity).values()); + } + + public java.util.Map convertToColumnStringValueMap(Entity entity) { + final ProductsAttributes myEntity = downcast(entity); + final java.util.Map valueMap = new java.util.LinkedHashMap(); + valueMap.put("PRODUCTS_ATTRIBUTES_ID", helpGettingColumnStringValue(myEntity.getProductsAttributesId())); + valueMap.put("PRODUCTS_ID", helpGettingColumnStringValue(myEntity.getProductsId())); + valueMap.put("OPTIONS_ID", helpGettingColumnStringValue(myEntity.getOptionsId())); + valueMap.put("OPTIONS_VALUES_ID", helpGettingColumnStringValue(myEntity.getOptionsValuesId())); + valueMap.put("OPTIONS_VALUES_PRICE", helpGettingColumnStringValue(myEntity.getOptionsValuesPrice())); + valueMap.put("PRICE_PREFIX", helpGettingColumnStringValue(myEntity.getPricePrefix())); + return valueMap; + } + + // =================================================================================== + // JDBC Support + // ============ + public String getPreparedInsertClause() { + return "insert into PRODUCTS_ATTRIBUTES(PRODUCTS_ATTRIBUTES_ID, PRODUCTS_ID, OPTIONS_ID, OPTIONS_VALUES_ID, OPTIONS_VALUES_PRICE, PRICE_PREFIX) values(? , ? , ? , ? , ? , ? )"; + } + + public String getPreparedInsertClause(String tablePrefix) { + return "insert into " + tablePrefix + "PRODUCTS_ATTRIBUTES(PRODUCTS_ATTRIBUTES_ID, PRODUCTS_ID, OPTIONS_ID, OPTIONS_VALUES_ID, OPTIONS_VALUES_PRICE, PRICE_PREFIX) values(? , ? , ? , ? , ? , ? )"; + } + + // =================================================================================== + // Helper + // ====== + protected ProductsAttributes downcast(Entity entity) { + assertObjectNotNull("entity", entity); + try { + return (ProductsAttributes)entity; + } catch (ClassCastException e) { + String msg = "The entity should be ProductsAttributes but it was: " + entity.getClass(); + throw new IllegalStateException(msg, e); + } + } + + protected void checkDowncast(Entity entity) { + downcast(entity); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/dbmeta/ProductsAttributesDownloadDbm.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/dbmeta/ProductsAttributesDownloadDbm.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/dbmeta/ProductsAttributesDownloadDbm.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,688 @@ +package jp.sf.pal.pompei.bsentity.dbmeta; + + +import jp.sf.pal.pompei.allcommon.Entity; +import jp.sf.pal.pompei.allcommon.dbmeta.DBMeta; +import jp.sf.pal.pompei.allcommon.dbmeta.AbstractDBMeta; +import jp.sf.pal.pompei.exentity.ProductsAttributesDownload; + +/** + * The dbmeta of PRODUCTS_ATTRIBUTES_DOWNLOAD. (Singleton) + * + *
+ * [primary-key]
+ *     PRODUCTS_ATTRIBUTES_ID
+ * 
+ * [column-property]
+ *     PRODUCTS_ATTRIBUTES_ID, PRODUCTS_ATTRIBUTES_FILENAME, PRODUCTS_ATTRIBUTES_MAXDAYS, PRODUCTS_ATTRIBUTES_MAXCOUNT
+ * 
+ * [foreign-property]
+ *     
+ * 
+ * [refferer-property]
+ *     
+ * 
+ * [sequence]
+ *     
+ * 
+ * [identity]
+ *     
+ * 
+ * [update-date]
+ *     
+ * 
+ * [version-no]
+ *     
+ * 
+ * 
+ * + * @author DBFlute(AutoGenerator) + */ +public class ProductsAttributesDownloadDbm extends AbstractDBMeta { + + // =================================================================================== + // Definition + // ========== + /** The type of entity. */ + protected static final Class ENTITY_TYPE = ProductsAttributesDownload.class; + + /** Singleton instance. */ + private static final ProductsAttributesDownloadDbm _instance = new ProductsAttributesDownloadDbm(); + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + private ProductsAttributesDownloadDbm() { + } + + // =================================================================================== + // Singleton + // ========= + /** + * Get instance. + * + * @return Singleton instance. (NotNull) + */ + public static ProductsAttributesDownloadDbm getInstance() { + return _instance; + } + + // =================================================================================== + // Name Definition + // =============== + /** Table db name. */ + public static final String TABLE_DB_NAME = "PRODUCTS_ATTRIBUTES_DOWNLOAD"; + + /** Table cap-prop name. */ + public static final String TABLE_CAP_PROP_NAME = "ProductsAttributesDownload"; + + /** Table uncap-prop name. */ + public static final String TABLE_UNCAP_PROP_NAME = "productsAttributesDownload"; + + /** Db-name of ProductsAttributesId. */ + public static final String COLUMN_DB_NAME_OF_ProductsAttributesId = "PRODUCTS_ATTRIBUTES_ID"; + /** Db-name of ProductsAttributesFilename. */ + public static final String COLUMN_DB_NAME_OF_ProductsAttributesFilename = "PRODUCTS_ATTRIBUTES_FILENAME"; + /** Db-name of ProductsAttributesMaxdays. */ + public static final String COLUMN_DB_NAME_OF_ProductsAttributesMaxdays = "PRODUCTS_ATTRIBUTES_MAXDAYS"; + /** Db-name of ProductsAttributesMaxcount. */ + public static final String COLUMN_DB_NAME_OF_ProductsAttributesMaxcount = "PRODUCTS_ATTRIBUTES_MAXCOUNT"; + + /** Cap-prop-name of ProductsAttributesId. */ + public static final String COLUMN_CAP_PROP_NAME_OF_ProductsAttributesId = "ProductsAttributesId"; + /** Cap-prop-name of ProductsAttributesFilename. */ + public static final String COLUMN_CAP_PROP_NAME_OF_ProductsAttributesFilename = "ProductsAttributesFilename"; + /** Cap-prop-name of ProductsAttributesMaxdays. */ + public static final String COLUMN_CAP_PROP_NAME_OF_ProductsAttributesMaxdays = "ProductsAttributesMaxdays"; + /** Cap-prop-name of ProductsAttributesMaxcount. */ + public static final String COLUMN_CAP_PROP_NAME_OF_ProductsAttributesMaxcount = "ProductsAttributesMaxcount"; + + + + /** Uncap-prop-name of ProductsAttributesId. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_ProductsAttributesId = "productsAttributesId"; + /** Uncap-prop-name of ProductsAttributesFilename. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_ProductsAttributesFilename = "productsAttributesFilename"; + /** Uncap-prop-name of ProductsAttributesMaxdays. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_ProductsAttributesMaxdays = "productsAttributesMaxdays"; + /** Uncap-prop-name of ProductsAttributesMaxcount. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_ProductsAttributesMaxcount = "productsAttributesMaxcount"; + + + + /** {db-name : cap-prop-name} map. */ + private static java.util.Map _dbNameCapPropNameMap; + protected static java.util.Map createDbNameCapPropNameMap() { + if (_dbNameCapPropNameMap != null) { + return _dbNameCapPropNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_DB_NAME, TABLE_CAP_PROP_NAME); + + map.put(COLUMN_DB_NAME_OF_ProductsAttributesId, COLUMN_CAP_PROP_NAME_OF_ProductsAttributesId); + map.put(COLUMN_DB_NAME_OF_ProductsAttributesFilename, COLUMN_CAP_PROP_NAME_OF_ProductsAttributesFilename); + map.put(COLUMN_DB_NAME_OF_ProductsAttributesMaxdays, COLUMN_CAP_PROP_NAME_OF_ProductsAttributesMaxdays); + map.put(COLUMN_DB_NAME_OF_ProductsAttributesMaxcount, COLUMN_CAP_PROP_NAME_OF_ProductsAttributesMaxcount); + + _dbNameCapPropNameMap = java.util.Collections.unmodifiableMap(map); + return _dbNameCapPropNameMap; + } + + /** {db-name : uncap-prop-name} map. */ + private static java.util.Map _dbNameUncapPropNameMap; + protected static java.util.Map createDbNameUncapPropNameMap() { + if (_dbNameUncapPropNameMap != null) { + return _dbNameUncapPropNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_DB_NAME, TABLE_UNCAP_PROP_NAME); + + map.put(COLUMN_DB_NAME_OF_ProductsAttributesId, COLUMN_UNCAP_PROP_NAME_OF_ProductsAttributesId); + map.put(COLUMN_DB_NAME_OF_ProductsAttributesFilename, COLUMN_UNCAP_PROP_NAME_OF_ProductsAttributesFilename); + map.put(COLUMN_DB_NAME_OF_ProductsAttributesMaxdays, COLUMN_UNCAP_PROP_NAME_OF_ProductsAttributesMaxdays); + map.put(COLUMN_DB_NAME_OF_ProductsAttributesMaxcount, COLUMN_UNCAP_PROP_NAME_OF_ProductsAttributesMaxcount); + + _dbNameUncapPropNameMap = java.util.Collections.unmodifiableMap(map); + return _dbNameUncapPropNameMap; + } + + /** {cap-prop-name : db-name} map. */ + private static java.util.Map _capPropNameDbNameMap; + protected static java.util.Map createCapPropNameDbNameMap() { + if (_capPropNameDbNameMap != null) { + return _capPropNameDbNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_CAP_PROP_NAME, TABLE_DB_NAME); + + map.put(COLUMN_CAP_PROP_NAME_OF_ProductsAttributesId, COLUMN_DB_NAME_OF_ProductsAttributesId); + map.put(COLUMN_CAP_PROP_NAME_OF_ProductsAttributesFilename, COLUMN_DB_NAME_OF_ProductsAttributesFilename); + map.put(COLUMN_CAP_PROP_NAME_OF_ProductsAttributesMaxdays, COLUMN_DB_NAME_OF_ProductsAttributesMaxdays); + map.put(COLUMN_CAP_PROP_NAME_OF_ProductsAttributesMaxcount, COLUMN_DB_NAME_OF_ProductsAttributesMaxcount); + + _capPropNameDbNameMap = java.util.Collections.unmodifiableMap(map); + return _capPropNameDbNameMap; + } + + /** {cap-prop-name : uncap-prop-name} map. */ + private static java.util.Map _capPropNameUncapPropNameMap; + protected static java.util.Map createCapPropNameUncapPropNameMap() { + if (_capPropNameUncapPropNameMap != null) { + return _capPropNameUncapPropNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_CAP_PROP_NAME, TABLE_UNCAP_PROP_NAME); + + map.put(COLUMN_CAP_PROP_NAME_OF_ProductsAttributesId, COLUMN_UNCAP_PROP_NAME_OF_ProductsAttributesId); + map.put(COLUMN_CAP_PROP_NAME_OF_ProductsAttributesFilename, COLUMN_UNCAP_PROP_NAME_OF_ProductsAttributesFilename); + map.put(COLUMN_CAP_PROP_NAME_OF_ProductsAttributesMaxdays, COLUMN_UNCAP_PROP_NAME_OF_ProductsAttributesMaxdays); + map.put(COLUMN_CAP_PROP_NAME_OF_ProductsAttributesMaxcount, COLUMN_UNCAP_PROP_NAME_OF_ProductsAttributesMaxcount); + + _capPropNameUncapPropNameMap = java.util.Collections.unmodifiableMap(map); + return _capPropNameUncapPropNameMap; + } + + /** {uncap-prop-name : db-name} map. */ + private static java.util.Map _uncapPropNameDbNameMap; + protected static java.util.Map createUncapPropNameDbNameMap() { + if (_uncapPropNameDbNameMap != null) { + return _uncapPropNameDbNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_UNCAP_PROP_NAME, TABLE_DB_NAME); + + map.put(COLUMN_UNCAP_PROP_NAME_OF_ProductsAttributesId, COLUMN_DB_NAME_OF_ProductsAttributesId); + map.put(COLUMN_UNCAP_PROP_NAME_OF_ProductsAttributesFilename, COLUMN_DB_NAME_OF_ProductsAttributesFilename); + map.put(COLUMN_UNCAP_PROP_NAME_OF_ProductsAttributesMaxdays, COLUMN_DB_NAME_OF_ProductsAttributesMaxdays); + map.put(COLUMN_UNCAP_PROP_NAME_OF_ProductsAttributesMaxcount, COLUMN_DB_NAME_OF_ProductsAttributesMaxcount); + + _uncapPropNameDbNameMap = java.util.Collections.unmodifiableMap(map); + return _uncapPropNameDbNameMap; + } + + /** {uncap-prop-name : cap-prop-name} map. */ + private static java.util.Map _uncapPropNameCapPropNameMap; + protected static java.util.Map createUncapPropNameCapPropNameMap() { + if (_uncapPropNameCapPropNameMap != null) { + return _uncapPropNameCapPropNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_UNCAP_PROP_NAME, TABLE_CAP_PROP_NAME); + + map.put(COLUMN_UNCAP_PROP_NAME_OF_ProductsAttributesId, COLUMN_CAP_PROP_NAME_OF_ProductsAttributesId); + map.put(COLUMN_UNCAP_PROP_NAME_OF_ProductsAttributesFilename, COLUMN_CAP_PROP_NAME_OF_ProductsAttributesFilename); + map.put(COLUMN_UNCAP_PROP_NAME_OF_ProductsAttributesMaxdays, COLUMN_CAP_PROP_NAME_OF_ProductsAttributesMaxdays); + map.put(COLUMN_UNCAP_PROP_NAME_OF_ProductsAttributesMaxcount, COLUMN_CAP_PROP_NAME_OF_ProductsAttributesMaxcount); + + _uncapPropNameCapPropNameMap = java.util.Collections.unmodifiableMap(map); + return _uncapPropNameCapPropNameMap; + } + + // =================================================================================== + // Name-Map + // ======== + /** + * This method implements the method that is declared at super. + * + * @return {db-name : cap-prop-name} map. + */ + public java.util.Map getDbNameCapPropNameMap() { + return createDbNameCapPropNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {db-name : uncap-prop-name} map. + */ + public java.util.Map getDbNameUncapPropNameMap() { + return createDbNameUncapPropNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {cap-prop-name : db-name} map. + */ + public java.util.Map getCapPropNameDbNameMap() { + return createCapPropNameDbNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {cap-prop-name : uncap-prop-name} map. + */ + public java.util.Map getCapPropNameUncapPropNameMap() { + return createCapPropNameUncapPropNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {uncap-prop-name : db-name} map. + */ + public java.util.Map getUncapPropNameDbNameMap() { + return createUncapPropNameDbNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {uncap-prop-name : cap-prop-name} map. + */ + public java.util.Map getUncapPropNameCapPropNameMap() { + return createUncapPropNameCapPropNameMap(); + } + + // =================================================================================== + // Table Name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + public String getTableDbName() { + return TABLE_DB_NAME; + } + + /** + * This method implements the method that is declared at super. + * + * @return Table cap-prop-name. (NotNull) + */ + public String getTableCapPropName() { + return TABLE_CAP_PROP_NAME; + } + + /** + * This method implements the method that is declared at super. + * + * @return Table property-name. (NotNull) + */ + public String getTableUncapPropName() { + return TABLE_UNCAP_PROP_NAME; + } + + // =================================================================================== + // Column Name + // =========== + public java.util.List getColumnDbNameList() { + final String[] columns = getColumnDbNameCommaString().split(","); + final java.util.List resultList = new java.util.ArrayList(); + for (int i=0; i < columns.length; i++) { + resultList.add(columns[i].trim()); + } + return resultList; + } + + public java.util.List getColumnCapPropNameList() { + final java.util.List columnDbNameList = getColumnDbNameList(); + final java.util.List resultList = new java.util.ArrayList(); + for (final java.util.Iterator ite = columnDbNameList.iterator(); ite.hasNext(); ) { + resultList.add(getDbNameCapPropNameMap().get((String)ite.next())); + } + return resultList; + } + + public java.util.List getColumnUncapPropNameList() { + final java.util.List columnDbNameList = getColumnDbNameList(); + final java.util.List resultList = new java.util.ArrayList(); + for (final java.util.Iterator ite = columnDbNameList.iterator(); ite.hasNext(); ) { + resultList.add(getDbNameUncapPropNameMap().get((String)ite.next())); + } + return resultList; + } + + /** + * This method implements the method that is declared at super. + * + * @return Column-db-name comma-string. (NotNull) + */ + public String getColumnDbNameCommaString() { + return "PRODUCTS_ATTRIBUTES_ID, PRODUCTS_ATTRIBUTES_FILENAME, PRODUCTS_ATTRIBUTES_MAXDAYS, PRODUCTS_ATTRIBUTES_MAXCOUNT"; + } + + // =================================================================================== + // Type Name + // ========= + /** + * This method implements the method that is declared at super. + * + * @return The type-name of entity. (NotNull) + */ + public String getEntityTypeName() { + return "jp.sf.pal.pompei.exentity.ProductsAttributesDownload"; + } + + /** + * This method implements the method that is declared at super. + * + * @return The type-name of condition-bean. (NotNull) + */ + public String getConditionBeanTypeName() { + return "jp.sf.pal.pompei.cbean.bs.ProductsAttributesDownloadCB"; + } + + /** + * This method implements the method that is declared at super. + * + * @return The type-name of dao. (NotNull) + */ + public String getDaoTypeName() { + return "jp.sf.pal.pompei.exdao.ProductsAttributesDownloadDao"; + } + + /** + * This method implements the method that is declared at super. + * + * @return The type-name of behavior. (NotNull) + */ + public String getBehaviorTypeName() { + return "jp.sf.pal.pompei.exbhv.ProductsAttributesDownloadBhv"; + } + + // =================================================================================== + // Type + // ==== + /** + * This method implements the method that is declared at super. + * + * @return The type of entity. (NotNull) + */ + public Class getEntityType() { + return ENTITY_TYPE; + } + + // =================================================================================== + // Instance + // ======== + /** + * This method implements the method that is declared at super. + * + * @return The type of entity. (NotNull) + */ + public Entity newEntity() { + return newMyEntity(); + } + + /** + * New the instance of my entity. + * + * @return The instance of my entity. (NotNull) + */ + public ProductsAttributesDownload newMyEntity() { + return new ProductsAttributesDownload(); + } + + // =================================================================================== + // Foreign DBMeta + // ============== + /** + * This method implements the method that is declared at super. + * + * @param foreignPropertyName Foreign-property-name(Both OK - InitCap or not). (NotNull) + * @return Foreign DBMeta. (NotNull) + */ + public DBMeta getForeignDBMeta(String foreignPropertyName) { + assertStringNotNullAndNotTrimmedEmpty("foreignPropertyName", foreignPropertyName); + final String methodName = "getForeignDBMeta_" + foreignPropertyName.substring(0, 1) + foreignPropertyName.substring(1); + + java.lang.reflect.Method method = null; + try { + method = this.getClass().getMethod(methodName, new Class[]{}); + } catch (NoSuchMethodException e) { + String msg = "The foreignPropertyName is not found: foreignPropertyName=" + foreignPropertyName; + msg = msg + " tableName=" + TABLE_DB_NAME + " methodName=" + methodName; + throw new RuntimeException(msg, e); + } + try { + return (DBMeta)method.invoke(this, new Object[]{}); + } catch (IllegalAccessException e) { + throw new RuntimeException(e); + } catch (java.lang.reflect.InvocationTargetException e) { + throw new RuntimeException(e.getCause()); + } + } + + // =================================================================================== + // Determination + // ============= + /** + * This method implements the method that is declared at super. + * + * @return Determination. + */ + public boolean hasTwoOrMorePrimaryKeys() { + return false; + } + + /** + * This method implements the method that is declared at super. + * + * @return Determination. + */ + public boolean hasCommonColumn() { + return false; + } + + // =================================================================================== + // Entity Handling + // =============== + // ----------------------------------------------------- + // Accept + // ------ + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @param primaryKeyMap Primary key map. (NotNull and NotEmpty) + */ + public void acceptPrimaryKeyMap(Entity entity, java.util.Map primaryKeyMap) { + final ProductsAttributesDownload myEntity = (ProductsAttributesDownload)entity; + MapAssertUtil.assertPrimaryKeyMapNotNullAndNotEmpty(primaryKeyMap); + final MapStringValueAnalyzer analyzer = new MapStringValueAnalyzer(primaryKeyMap, entity.getModifiedPropertyNames()); + + MapAssertUtil.assertColumnExistingInPrimaryKeyMap(primaryKeyMap, "PRODUCTS_ATTRIBUTES_ID"); + if (analyzer.init("PRODUCTS_ATTRIBUTES_ID", "productsAttributesId", "productsAttributesId")) { myEntity.setProductsAttributesId(analyzer.analyzeNumber(java.math.BigDecimal.class)); }; + + + } + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @param primaryKeyMapString Primary-key map-string. (NotNull and NotEmpty) + */ + public void acceptPrimaryKeyMapString(Entity entity, String primaryKeyMapString) { + MapStringUtil.acceptPrimaryKeyMapString(primaryKeyMapString, entity); + } + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @param columnValueMap Column-value map. (NotNull and NotEmpty) + */ + public void acceptColumnValueMap(Entity entity, java.util.Map columnValueMap) { + final ProductsAttributesDownload myEntity = (ProductsAttributesDownload)entity; + MapAssertUtil.assertColumnValueMapNotNullAndNotEmpty(columnValueMap); + final MapStringValueAnalyzer analyzer = new MapStringValueAnalyzer(columnValueMap, entity.getModifiedPropertyNames()); + + if (analyzer.init("PRODUCTS_ATTRIBUTES_ID", "productsAttributesId", "productsAttributesId")) { myEntity.setProductsAttributesId(analyzer.analyzeNumber(java.math.BigDecimal.class)); }; + if (analyzer.init("PRODUCTS_ATTRIBUTES_FILENAME", "productsAttributesFilename", "productsAttributesFilename")) { myEntity.setProductsAttributesFilename(analyzer.analyzeString(String.class)); }; + if (analyzer.init("PRODUCTS_ATTRIBUTES_MAXDAYS", "productsAttributesMaxdays", "productsAttributesMaxdays")) { myEntity.setProductsAttributesMaxdays(analyzer.analyzeNumber(java.math.BigDecimal.class)); }; + if (analyzer.init("PRODUCTS_ATTRIBUTES_MAXCOUNT", "productsAttributesMaxcount", "productsAttributesMaxcount")) { myEntity.setProductsAttributesMaxcount(analyzer.analyzeNumber(java.math.BigDecimal.class)); }; + + } + + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @param columnValueMapString Column-value map-string. (NotNull and NotEmpty) + */ + public void acceptColumnValueMapString(Entity entity, String columnValueMapString) { + MapStringUtil.acceptColumnValueMapString(columnValueMapString, entity); + } + + + // ----------------------------------------------------- + // Extract + // ------- + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @return Primary-key map-string. (NotNull) + */ + public String extractPrimaryKeyMapString(Entity entity) { + return MapStringUtil.extractPrimaryKeyMapString(entity); + } + + /** + * Extract primary-key map-string. + * + * @param entity Target entity. (NotNull) + * @param startBrace Start-brace. (NotNull) + * @param endBrace End-brace. (NotNull) + * @param delimiter Delimiter. (NotNull) + * @param equal Equal. (NotNull) + * @return Primary-key map-string. (NotNull) + */ + public String extractPrimaryKeyMapString(Entity entity, String startBrace, String endBrace, String delimiter, String equal) { + final ProductsAttributesDownload myEntity = (ProductsAttributesDownload)entity; + final String mapMarkAndStartBrace = MAP_STRING_MAP_MARK + startBrace; + final StringBuffer sb = new StringBuffer(); + helpAppendingColumnValueString(sb, delimiter, equal, "PRODUCTS_ATTRIBUTES_ID", myEntity.getProductsAttributesId()); + + sb.delete(0, delimiter.length()).insert(0, mapMarkAndStartBrace).append(endBrace); + return sb.toString(); + + } + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @return Column-value map-string. (NotNull) + */ + public String extractColumnValueMapString(Entity entity) { + return MapStringUtil.extractColumnValueMapString(entity); + } + + /** + * Extract column-value map-string. + * + * @param entity Target entity. (NotNull) + * @param startBrace Start-brace. (NotNull) + * @param endBrace End-brace. (NotNull) + * @param delimiter Delimiter. (NotNull) + * @param equal Equal. (NotNull) + * @return Column-value map-string. (NotNull) + */ + public String extractColumnValueMapString(Entity entity, String startBrace, String endBrace, String delimiter, String equal) { + final ProductsAttributesDownload myEntity = (ProductsAttributesDownload)entity; + final String mapMarkAndStartBrace = MAP_STRING_MAP_MARK + startBrace; + final StringBuffer sb = new StringBuffer(); + helpAppendingColumnValueString(sb, delimiter, equal, "PRODUCTS_ATTRIBUTES_ID", myEntity.getProductsAttributesId()); + helpAppendingColumnValueString(sb, delimiter, equal, "PRODUCTS_ATTRIBUTES_FILENAME", myEntity.getProductsAttributesFilename()); + helpAppendingColumnValueString(sb, delimiter, equal, "PRODUCTS_ATTRIBUTES_MAXDAYS", myEntity.getProductsAttributesMaxdays()); + helpAppendingColumnValueString(sb, delimiter, equal, "PRODUCTS_ATTRIBUTES_MAXCOUNT", myEntity.getProductsAttributesMaxcount()); + + sb.delete(0, delimiter.length()).insert(0, mapMarkAndStartBrace).append(endBrace); + return sb.toString(); + } + + private void helpAppendingColumnValueString(StringBuffer sb, String delimiter, String equal, String colName, Object value) { + sb.append(delimiter).append(colName).append(equal); + sb.append(helpGettingColumnStringValue(value)); + } + + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @return Column-value map-string. (NotNull) + */ + public String extractCommonColumnValueMapString(Entity entity) { + return "map:{}"; + } + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @return Column-value map-string. (NotNull) + */ + public String extractCommonColumnValueMapString(Entity entity, String startBrace, String endBrace, String delimiter, String equal) { + return "map:" + startBrace + endBrace; + } + + + // ----------------------------------------------------- + // Convert + // ------- + public java.util.List convertToColumnValueList(Entity entity) { + return new java.util.ArrayList(convertToColumnValueMap(entity).values()); + } + + public java.util.Map convertToColumnValueMap(Entity entity) { + final ProductsAttributesDownload myEntity = downcast(entity); + final java.util.Map valueMap = new java.util.LinkedHashMap(); + valueMap.put("PRODUCTS_ATTRIBUTES_ID", myEntity.getProductsAttributesId()); + valueMap.put("PRODUCTS_ATTRIBUTES_FILENAME", myEntity.getProductsAttributesFilename()); + valueMap.put("PRODUCTS_ATTRIBUTES_MAXDAYS", myEntity.getProductsAttributesMaxdays()); + valueMap.put("PRODUCTS_ATTRIBUTES_MAXCOUNT", myEntity.getProductsAttributesMaxcount()); + return valueMap; + } + + public java.util.List convertToColumnStringValueList(Entity entity) { + return new java.util.ArrayList(convertToColumnStringValueMap(entity).values()); + } + + public java.util.Map convertToColumnStringValueMap(Entity entity) { + final ProductsAttributesDownload myEntity = downcast(entity); + final java.util.Map valueMap = new java.util.LinkedHashMap(); + valueMap.put("PRODUCTS_ATTRIBUTES_ID", helpGettingColumnStringValue(myEntity.getProductsAttributesId())); + valueMap.put("PRODUCTS_ATTRIBUTES_FILENAME", helpGettingColumnStringValue(myEntity.getProductsAttributesFilename())); + valueMap.put("PRODUCTS_ATTRIBUTES_MAXDAYS", helpGettingColumnStringValue(myEntity.getProductsAttributesMaxdays())); + valueMap.put("PRODUCTS_ATTRIBUTES_MAXCOUNT", helpGettingColumnStringValue(myEntity.getProductsAttributesMaxcount())); + return valueMap; + } + + // =================================================================================== + // JDBC Support + // ============ + public String getPreparedInsertClause() { + return "insert into PRODUCTS_ATTRIBUTES_DOWNLOAD(PRODUCTS_ATTRIBUTES_ID, PRODUCTS_ATTRIBUTES_FILENAME, PRODUCTS_ATTRIBUTES_MAXDAYS, PRODUCTS_ATTRIBUTES_MAXCOUNT) values(? , ? , ? , ? )"; + } + + public String getPreparedInsertClause(String tablePrefix) { + return "insert into " + tablePrefix + "PRODUCTS_ATTRIBUTES_DOWNLOAD(PRODUCTS_ATTRIBUTES_ID, PRODUCTS_ATTRIBUTES_FILENAME, PRODUCTS_ATTRIBUTES_MAXDAYS, PRODUCTS_ATTRIBUTES_MAXCOUNT) values(? , ? , ? , ? )"; + } + + // =================================================================================== + // Helper + // ====== + protected ProductsAttributesDownload downcast(Entity entity) { + assertObjectNotNull("entity", entity); + try { + return (ProductsAttributesDownload)entity; + } catch (ClassCastException e) { + String msg = "The entity should be ProductsAttributesDownload but it was: " + entity.getClass(); + throw new IllegalStateException(msg, e); + } + } + + protected void checkDowncast(Entity entity) { + downcast(entity); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/dbmeta/ProductsDbm.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/dbmeta/ProductsDbm.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/dbmeta/ProductsDbm.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,832 @@ +package jp.sf.pal.pompei.bsentity.dbmeta; + + +import jp.sf.pal.pompei.allcommon.Entity; +import jp.sf.pal.pompei.allcommon.dbmeta.DBMeta; +import jp.sf.pal.pompei.allcommon.dbmeta.AbstractDBMeta; +import jp.sf.pal.pompei.exentity.Products; + +/** + * The dbmeta of PRODUCTS. (Singleton) + * + *
+ * [primary-key]
+ *     PRODUCTS_ID
+ * 
+ * [column-property]
+ *     PRODUCTS_ID, PRODUCTS_QUANTITY, PRODUCTS_MODEL, PRODUCTS_IMAGE, PRODUCTS_PRICE, PRODUCTS_DATE_ADDED, PRODUCTS_LAST_MODIFIED, PRODUCTS_DATE_AVAILABLE, PRODUCTS_WEIGHT, PRODUCTS_STATUS, PRODUCTS_TAX_CLASS_ID, MANUFACTURERS_ID, PRODUCTS_ORDERED
+ * 
+ * [foreign-property]
+ *     
+ * 
+ * [refferer-property]
+ *     
+ * 
+ * [sequence]
+ *     
+ * 
+ * [identity]
+ *     
+ * 
+ * [update-date]
+ *     
+ * 
+ * [version-no]
+ *     
+ * 
+ * 
+ * + * @author DBFlute(AutoGenerator) + */ +public class ProductsDbm extends AbstractDBMeta { + + // =================================================================================== + // Definition + // ========== + /** The type of entity. */ + protected static final Class ENTITY_TYPE = Products.class; + + /** Singleton instance. */ + private static final ProductsDbm _instance = new ProductsDbm(); + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + private ProductsDbm() { + } + + // =================================================================================== + // Singleton + // ========= + /** + * Get instance. + * + * @return Singleton instance. (NotNull) + */ + public static ProductsDbm getInstance() { + return _instance; + } + + // =================================================================================== + // Name Definition + // =============== + /** Table db name. */ + public static final String TABLE_DB_NAME = "PRODUCTS"; + + /** Table cap-prop name. */ + public static final String TABLE_CAP_PROP_NAME = "Products"; + + /** Table uncap-prop name. */ + public static final String TABLE_UNCAP_PROP_NAME = "products"; + + /** Db-name of ProductsId. */ + public static final String COLUMN_DB_NAME_OF_ProductsId = "PRODUCTS_ID"; + /** Db-name of ProductsQuantity. */ + public static final String COLUMN_DB_NAME_OF_ProductsQuantity = "PRODUCTS_QUANTITY"; + /** Db-name of ProductsModel. */ + public static final String COLUMN_DB_NAME_OF_ProductsModel = "PRODUCTS_MODEL"; + /** Db-name of ProductsImage. */ + public static final String COLUMN_DB_NAME_OF_ProductsImage = "PRODUCTS_IMAGE"; + /** Db-name of ProductsPrice. */ + public static final String COLUMN_DB_NAME_OF_ProductsPrice = "PRODUCTS_PRICE"; + /** Db-name of ProductsDateAdded. */ + public static final String COLUMN_DB_NAME_OF_ProductsDateAdded = "PRODUCTS_DATE_ADDED"; + /** Db-name of ProductsLastModified. */ + public static final String COLUMN_DB_NAME_OF_ProductsLastModified = "PRODUCTS_LAST_MODIFIED"; + /** Db-name of ProductsDateAvailable. */ + public static final String COLUMN_DB_NAME_OF_ProductsDateAvailable = "PRODUCTS_DATE_AVAILABLE"; + /** Db-name of ProductsWeight. */ + public static final String COLUMN_DB_NAME_OF_ProductsWeight = "PRODUCTS_WEIGHT"; + /** Db-name of ProductsStatus. */ + public static final String COLUMN_DB_NAME_OF_ProductsStatus = "PRODUCTS_STATUS"; + /** Db-name of ProductsTaxClassId. */ + public static final String COLUMN_DB_NAME_OF_ProductsTaxClassId = "PRODUCTS_TAX_CLASS_ID"; + /** Db-name of ManufacturersId. */ + public static final String COLUMN_DB_NAME_OF_ManufacturersId = "MANUFACTURERS_ID"; + /** Db-name of ProductsOrdered. */ + public static final String COLUMN_DB_NAME_OF_ProductsOrdered = "PRODUCTS_ORDERED"; + + /** Cap-prop-name of ProductsId. */ + public static final String COLUMN_CAP_PROP_NAME_OF_ProductsId = "ProductsId"; + /** Cap-prop-name of ProductsQuantity. */ + public static final String COLUMN_CAP_PROP_NAME_OF_ProductsQuantity = "ProductsQuantity"; + /** Cap-prop-name of ProductsModel. */ + public static final String COLUMN_CAP_PROP_NAME_OF_ProductsModel = "ProductsModel"; + /** Cap-prop-name of ProductsImage. */ + public static final String COLUMN_CAP_PROP_NAME_OF_ProductsImage = "ProductsImage"; + /** Cap-prop-name of ProductsPrice. */ + public static final String COLUMN_CAP_PROP_NAME_OF_ProductsPrice = "ProductsPrice"; + /** Cap-prop-name of ProductsDateAdded. */ + public static final String COLUMN_CAP_PROP_NAME_OF_ProductsDateAdded = "ProductsDateAdded"; + /** Cap-prop-name of ProductsLastModified. */ + public static final String COLUMN_CAP_PROP_NAME_OF_ProductsLastModified = "ProductsLastModified"; + /** Cap-prop-name of ProductsDateAvailable. */ + public static final String COLUMN_CAP_PROP_NAME_OF_ProductsDateAvailable = "ProductsDateAvailable"; + /** Cap-prop-name of ProductsWeight. */ + public static final String COLUMN_CAP_PROP_NAME_OF_ProductsWeight = "ProductsWeight"; + /** Cap-prop-name of ProductsStatus. */ + public static final String COLUMN_CAP_PROP_NAME_OF_ProductsStatus = "ProductsStatus"; + /** Cap-prop-name of ProductsTaxClassId. */ + public static final String COLUMN_CAP_PROP_NAME_OF_ProductsTaxClassId = "ProductsTaxClassId"; + /** Cap-prop-name of ManufacturersId. */ + public static final String COLUMN_CAP_PROP_NAME_OF_ManufacturersId = "ManufacturersId"; + /** Cap-prop-name of ProductsOrdered. */ + public static final String COLUMN_CAP_PROP_NAME_OF_ProductsOrdered = "ProductsOrdered"; + + + + /** Uncap-prop-name of ProductsId. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_ProductsId = "productsId"; + /** Uncap-prop-name of ProductsQuantity. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_ProductsQuantity = "productsQuantity"; + /** Uncap-prop-name of ProductsModel. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_ProductsModel = "productsModel"; + /** Uncap-prop-name of ProductsImage. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_ProductsImage = "productsImage"; + /** Uncap-prop-name of ProductsPrice. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_ProductsPrice = "productsPrice"; + /** Uncap-prop-name of ProductsDateAdded. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_ProductsDateAdded = "productsDateAdded"; + /** Uncap-prop-name of ProductsLastModified. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_ProductsLastModified = "productsLastModified"; + /** Uncap-prop-name of ProductsDateAvailable. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_ProductsDateAvailable = "productsDateAvailable"; + /** Uncap-prop-name of ProductsWeight. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_ProductsWeight = "productsWeight"; + /** Uncap-prop-name of ProductsStatus. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_ProductsStatus = "productsStatus"; + /** Uncap-prop-name of ProductsTaxClassId. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_ProductsTaxClassId = "productsTaxClassId"; + /** Uncap-prop-name of ManufacturersId. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_ManufacturersId = "manufacturersId"; + /** Uncap-prop-name of ProductsOrdered. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_ProductsOrdered = "productsOrdered"; + + + + /** {db-name : cap-prop-name} map. */ + private static java.util.Map _dbNameCapPropNameMap; + protected static java.util.Map createDbNameCapPropNameMap() { + if (_dbNameCapPropNameMap != null) { + return _dbNameCapPropNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_DB_NAME, TABLE_CAP_PROP_NAME); + + map.put(COLUMN_DB_NAME_OF_ProductsId, COLUMN_CAP_PROP_NAME_OF_ProductsId); + map.put(COLUMN_DB_NAME_OF_ProductsQuantity, COLUMN_CAP_PROP_NAME_OF_ProductsQuantity); + map.put(COLUMN_DB_NAME_OF_ProductsModel, COLUMN_CAP_PROP_NAME_OF_ProductsModel); + map.put(COLUMN_DB_NAME_OF_ProductsImage, COLUMN_CAP_PROP_NAME_OF_ProductsImage); + map.put(COLUMN_DB_NAME_OF_ProductsPrice, COLUMN_CAP_PROP_NAME_OF_ProductsPrice); + map.put(COLUMN_DB_NAME_OF_ProductsDateAdded, COLUMN_CAP_PROP_NAME_OF_ProductsDateAdded); + map.put(COLUMN_DB_NAME_OF_ProductsLastModified, COLUMN_CAP_PROP_NAME_OF_ProductsLastModified); + map.put(COLUMN_DB_NAME_OF_ProductsDateAvailable, COLUMN_CAP_PROP_NAME_OF_ProductsDateAvailable); + map.put(COLUMN_DB_NAME_OF_ProductsWeight, COLUMN_CAP_PROP_NAME_OF_ProductsWeight); + map.put(COLUMN_DB_NAME_OF_ProductsStatus, COLUMN_CAP_PROP_NAME_OF_ProductsStatus); + map.put(COLUMN_DB_NAME_OF_ProductsTaxClassId, COLUMN_CAP_PROP_NAME_OF_ProductsTaxClassId); + map.put(COLUMN_DB_NAME_OF_ManufacturersId, COLUMN_CAP_PROP_NAME_OF_ManufacturersId); + map.put(COLUMN_DB_NAME_OF_ProductsOrdered, COLUMN_CAP_PROP_NAME_OF_ProductsOrdered); + + _dbNameCapPropNameMap = java.util.Collections.unmodifiableMap(map); + return _dbNameCapPropNameMap; + } + + /** {db-name : uncap-prop-name} map. */ + private static java.util.Map _dbNameUncapPropNameMap; + protected static java.util.Map createDbNameUncapPropNameMap() { + if (_dbNameUncapPropNameMap != null) { + return _dbNameUncapPropNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_DB_NAME, TABLE_UNCAP_PROP_NAME); + + map.put(COLUMN_DB_NAME_OF_ProductsId, COLUMN_UNCAP_PROP_NAME_OF_ProductsId); + map.put(COLUMN_DB_NAME_OF_ProductsQuantity, COLUMN_UNCAP_PROP_NAME_OF_ProductsQuantity); + map.put(COLUMN_DB_NAME_OF_ProductsModel, COLUMN_UNCAP_PROP_NAME_OF_ProductsModel); + map.put(COLUMN_DB_NAME_OF_ProductsImage, COLUMN_UNCAP_PROP_NAME_OF_ProductsImage); + map.put(COLUMN_DB_NAME_OF_ProductsPrice, COLUMN_UNCAP_PROP_NAME_OF_ProductsPrice); + map.put(COLUMN_DB_NAME_OF_ProductsDateAdded, COLUMN_UNCAP_PROP_NAME_OF_ProductsDateAdded); + map.put(COLUMN_DB_NAME_OF_ProductsLastModified, COLUMN_UNCAP_PROP_NAME_OF_ProductsLastModified); + map.put(COLUMN_DB_NAME_OF_ProductsDateAvailable, COLUMN_UNCAP_PROP_NAME_OF_ProductsDateAvailable); + map.put(COLUMN_DB_NAME_OF_ProductsWeight, COLUMN_UNCAP_PROP_NAME_OF_ProductsWeight); + map.put(COLUMN_DB_NAME_OF_ProductsStatus, COLUMN_UNCAP_PROP_NAME_OF_ProductsStatus); + map.put(COLUMN_DB_NAME_OF_ProductsTaxClassId, COLUMN_UNCAP_PROP_NAME_OF_ProductsTaxClassId); + map.put(COLUMN_DB_NAME_OF_ManufacturersId, COLUMN_UNCAP_PROP_NAME_OF_ManufacturersId); + map.put(COLUMN_DB_NAME_OF_ProductsOrdered, COLUMN_UNCAP_PROP_NAME_OF_ProductsOrdered); + + _dbNameUncapPropNameMap = java.util.Collections.unmodifiableMap(map); + return _dbNameUncapPropNameMap; + } + + /** {cap-prop-name : db-name} map. */ + private static java.util.Map _capPropNameDbNameMap; + protected static java.util.Map createCapPropNameDbNameMap() { + if (_capPropNameDbNameMap != null) { + return _capPropNameDbNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_CAP_PROP_NAME, TABLE_DB_NAME); + + map.put(COLUMN_CAP_PROP_NAME_OF_ProductsId, COLUMN_DB_NAME_OF_ProductsId); + map.put(COLUMN_CAP_PROP_NAME_OF_ProductsQuantity, COLUMN_DB_NAME_OF_ProductsQuantity); + map.put(COLUMN_CAP_PROP_NAME_OF_ProductsModel, COLUMN_DB_NAME_OF_ProductsModel); + map.put(COLUMN_CAP_PROP_NAME_OF_ProductsImage, COLUMN_DB_NAME_OF_ProductsImage); + map.put(COLUMN_CAP_PROP_NAME_OF_ProductsPrice, COLUMN_DB_NAME_OF_ProductsPrice); + map.put(COLUMN_CAP_PROP_NAME_OF_ProductsDateAdded, COLUMN_DB_NAME_OF_ProductsDateAdded); + map.put(COLUMN_CAP_PROP_NAME_OF_ProductsLastModified, COLUMN_DB_NAME_OF_ProductsLastModified); + map.put(COLUMN_CAP_PROP_NAME_OF_ProductsDateAvailable, COLUMN_DB_NAME_OF_ProductsDateAvailable); + map.put(COLUMN_CAP_PROP_NAME_OF_ProductsWeight, COLUMN_DB_NAME_OF_ProductsWeight); + map.put(COLUMN_CAP_PROP_NAME_OF_ProductsStatus, COLUMN_DB_NAME_OF_ProductsStatus); + map.put(COLUMN_CAP_PROP_NAME_OF_ProductsTaxClassId, COLUMN_DB_NAME_OF_ProductsTaxClassId); + map.put(COLUMN_CAP_PROP_NAME_OF_ManufacturersId, COLUMN_DB_NAME_OF_ManufacturersId); + map.put(COLUMN_CAP_PROP_NAME_OF_ProductsOrdered, COLUMN_DB_NAME_OF_ProductsOrdered); + + _capPropNameDbNameMap = java.util.Collections.unmodifiableMap(map); + return _capPropNameDbNameMap; + } + + /** {cap-prop-name : uncap-prop-name} map. */ + private static java.util.Map _capPropNameUncapPropNameMap; + protected static java.util.Map createCapPropNameUncapPropNameMap() { + if (_capPropNameUncapPropNameMap != null) { + return _capPropNameUncapPropNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_CAP_PROP_NAME, TABLE_UNCAP_PROP_NAME); + + map.put(COLUMN_CAP_PROP_NAME_OF_ProductsId, COLUMN_UNCAP_PROP_NAME_OF_ProductsId); + map.put(COLUMN_CAP_PROP_NAME_OF_ProductsQuantity, COLUMN_UNCAP_PROP_NAME_OF_ProductsQuantity); + map.put(COLUMN_CAP_PROP_NAME_OF_ProductsModel, COLUMN_UNCAP_PROP_NAME_OF_ProductsModel); + map.put(COLUMN_CAP_PROP_NAME_OF_ProductsImage, COLUMN_UNCAP_PROP_NAME_OF_ProductsImage); + map.put(COLUMN_CAP_PROP_NAME_OF_ProductsPrice, COLUMN_UNCAP_PROP_NAME_OF_ProductsPrice); + map.put(COLUMN_CAP_PROP_NAME_OF_ProductsDateAdded, COLUMN_UNCAP_PROP_NAME_OF_ProductsDateAdded); + map.put(COLUMN_CAP_PROP_NAME_OF_ProductsLastModified, COLUMN_UNCAP_PROP_NAME_OF_ProductsLastModified); + map.put(COLUMN_CAP_PROP_NAME_OF_ProductsDateAvailable, COLUMN_UNCAP_PROP_NAME_OF_ProductsDateAvailable); + map.put(COLUMN_CAP_PROP_NAME_OF_ProductsWeight, COLUMN_UNCAP_PROP_NAME_OF_ProductsWeight); + map.put(COLUMN_CAP_PROP_NAME_OF_ProductsStatus, COLUMN_UNCAP_PROP_NAME_OF_ProductsStatus); + map.put(COLUMN_CAP_PROP_NAME_OF_ProductsTaxClassId, COLUMN_UNCAP_PROP_NAME_OF_ProductsTaxClassId); + map.put(COLUMN_CAP_PROP_NAME_OF_ManufacturersId, COLUMN_UNCAP_PROP_NAME_OF_ManufacturersId); + map.put(COLUMN_CAP_PROP_NAME_OF_ProductsOrdered, COLUMN_UNCAP_PROP_NAME_OF_ProductsOrdered); + + _capPropNameUncapPropNameMap = java.util.Collections.unmodifiableMap(map); + return _capPropNameUncapPropNameMap; + } + + /** {uncap-prop-name : db-name} map. */ + private static java.util.Map _uncapPropNameDbNameMap; + protected static java.util.Map createUncapPropNameDbNameMap() { + if (_uncapPropNameDbNameMap != null) { + return _uncapPropNameDbNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_UNCAP_PROP_NAME, TABLE_DB_NAME); + + map.put(COLUMN_UNCAP_PROP_NAME_OF_ProductsId, COLUMN_DB_NAME_OF_ProductsId); + map.put(COLUMN_UNCAP_PROP_NAME_OF_ProductsQuantity, COLUMN_DB_NAME_OF_ProductsQuantity); + map.put(COLUMN_UNCAP_PROP_NAME_OF_ProductsModel, COLUMN_DB_NAME_OF_ProductsModel); + map.put(COLUMN_UNCAP_PROP_NAME_OF_ProductsImage, COLUMN_DB_NAME_OF_ProductsImage); + map.put(COLUMN_UNCAP_PROP_NAME_OF_ProductsPrice, COLUMN_DB_NAME_OF_ProductsPrice); + map.put(COLUMN_UNCAP_PROP_NAME_OF_ProductsDateAdded, COLUMN_DB_NAME_OF_ProductsDateAdded); + map.put(COLUMN_UNCAP_PROP_NAME_OF_ProductsLastModified, COLUMN_DB_NAME_OF_ProductsLastModified); + map.put(COLUMN_UNCAP_PROP_NAME_OF_ProductsDateAvailable, COLUMN_DB_NAME_OF_ProductsDateAvailable); + map.put(COLUMN_UNCAP_PROP_NAME_OF_ProductsWeight, COLUMN_DB_NAME_OF_ProductsWeight); + map.put(COLUMN_UNCAP_PROP_NAME_OF_ProductsStatus, COLUMN_DB_NAME_OF_ProductsStatus); + map.put(COLUMN_UNCAP_PROP_NAME_OF_ProductsTaxClassId, COLUMN_DB_NAME_OF_ProductsTaxClassId); + map.put(COLUMN_UNCAP_PROP_NAME_OF_ManufacturersId, COLUMN_DB_NAME_OF_ManufacturersId); + map.put(COLUMN_UNCAP_PROP_NAME_OF_ProductsOrdered, COLUMN_DB_NAME_OF_ProductsOrdered); + + _uncapPropNameDbNameMap = java.util.Collections.unmodifiableMap(map); + return _uncapPropNameDbNameMap; + } + + /** {uncap-prop-name : cap-prop-name} map. */ + private static java.util.Map _uncapPropNameCapPropNameMap; + protected static java.util.Map createUncapPropNameCapPropNameMap() { + if (_uncapPropNameCapPropNameMap != null) { + return _uncapPropNameCapPropNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_UNCAP_PROP_NAME, TABLE_CAP_PROP_NAME); + + map.put(COLUMN_UNCAP_PROP_NAME_OF_ProductsId, COLUMN_CAP_PROP_NAME_OF_ProductsId); + map.put(COLUMN_UNCAP_PROP_NAME_OF_ProductsQuantity, COLUMN_CAP_PROP_NAME_OF_ProductsQuantity); + map.put(COLUMN_UNCAP_PROP_NAME_OF_ProductsModel, COLUMN_CAP_PROP_NAME_OF_ProductsModel); + map.put(COLUMN_UNCAP_PROP_NAME_OF_ProductsImage, COLUMN_CAP_PROP_NAME_OF_ProductsImage); + map.put(COLUMN_UNCAP_PROP_NAME_OF_ProductsPrice, COLUMN_CAP_PROP_NAME_OF_ProductsPrice); + map.put(COLUMN_UNCAP_PROP_NAME_OF_ProductsDateAdded, COLUMN_CAP_PROP_NAME_OF_ProductsDateAdded); + map.put(COLUMN_UNCAP_PROP_NAME_OF_ProductsLastModified, COLUMN_CAP_PROP_NAME_OF_ProductsLastModified); + map.put(COLUMN_UNCAP_PROP_NAME_OF_ProductsDateAvailable, COLUMN_CAP_PROP_NAME_OF_ProductsDateAvailable); + map.put(COLUMN_UNCAP_PROP_NAME_OF_ProductsWeight, COLUMN_CAP_PROP_NAME_OF_ProductsWeight); + map.put(COLUMN_UNCAP_PROP_NAME_OF_ProductsStatus, COLUMN_CAP_PROP_NAME_OF_ProductsStatus); + map.put(COLUMN_UNCAP_PROP_NAME_OF_ProductsTaxClassId, COLUMN_CAP_PROP_NAME_OF_ProductsTaxClassId); + map.put(COLUMN_UNCAP_PROP_NAME_OF_ManufacturersId, COLUMN_CAP_PROP_NAME_OF_ManufacturersId); + map.put(COLUMN_UNCAP_PROP_NAME_OF_ProductsOrdered, COLUMN_CAP_PROP_NAME_OF_ProductsOrdered); + + _uncapPropNameCapPropNameMap = java.util.Collections.unmodifiableMap(map); + return _uncapPropNameCapPropNameMap; + } + + // =================================================================================== + // Name-Map + // ======== + /** + * This method implements the method that is declared at super. + * + * @return {db-name : cap-prop-name} map. + */ + public java.util.Map getDbNameCapPropNameMap() { + return createDbNameCapPropNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {db-name : uncap-prop-name} map. + */ + public java.util.Map getDbNameUncapPropNameMap() { + return createDbNameUncapPropNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {cap-prop-name : db-name} map. + */ + public java.util.Map getCapPropNameDbNameMap() { + return createCapPropNameDbNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {cap-prop-name : uncap-prop-name} map. + */ + public java.util.Map getCapPropNameUncapPropNameMap() { + return createCapPropNameUncapPropNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {uncap-prop-name : db-name} map. + */ + public java.util.Map getUncapPropNameDbNameMap() { + return createUncapPropNameDbNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {uncap-prop-name : cap-prop-name} map. + */ + public java.util.Map getUncapPropNameCapPropNameMap() { + return createUncapPropNameCapPropNameMap(); + } + + // =================================================================================== + // Table Name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + public String getTableDbName() { + return TABLE_DB_NAME; + } + + /** + * This method implements the method that is declared at super. + * + * @return Table cap-prop-name. (NotNull) + */ + public String getTableCapPropName() { + return TABLE_CAP_PROP_NAME; + } + + /** + * This method implements the method that is declared at super. + * + * @return Table property-name. (NotNull) + */ + public String getTableUncapPropName() { + return TABLE_UNCAP_PROP_NAME; + } + + // =================================================================================== + // Column Name + // =========== + public java.util.List getColumnDbNameList() { + final String[] columns = getColumnDbNameCommaString().split(","); + final java.util.List resultList = new java.util.ArrayList(); + for (int i=0; i < columns.length; i++) { + resultList.add(columns[i].trim()); + } + return resultList; + } + + public java.util.List getColumnCapPropNameList() { + final java.util.List columnDbNameList = getColumnDbNameList(); + final java.util.List resultList = new java.util.ArrayList(); + for (final java.util.Iterator ite = columnDbNameList.iterator(); ite.hasNext(); ) { + resultList.add(getDbNameCapPropNameMap().get((String)ite.next())); + } + return resultList; + } + + public java.util.List getColumnUncapPropNameList() { + final java.util.List columnDbNameList = getColumnDbNameList(); + final java.util.List resultList = new java.util.ArrayList(); + for (final java.util.Iterator ite = columnDbNameList.iterator(); ite.hasNext(); ) { + resultList.add(getDbNameUncapPropNameMap().get((String)ite.next())); + } + return resultList; + } + + /** + * This method implements the method that is declared at super. + * + * @return Column-db-name comma-string. (NotNull) + */ + public String getColumnDbNameCommaString() { + return "PRODUCTS_ID, PRODUCTS_QUANTITY, PRODUCTS_MODEL, PRODUCTS_IMAGE, PRODUCTS_PRICE, PRODUCTS_DATE_ADDED, PRODUCTS_LAST_MODIFIED, PRODUCTS_DATE_AVAILABLE, PRODUCTS_WEIGHT, PRODUCTS_STATUS, PRODUCTS_TAX_CLASS_ID, MANUFACTURERS_ID, PRODUCTS_ORDERED"; + } + + // =================================================================================== + // Type Name + // ========= + /** + * This method implements the method that is declared at super. + * + * @return The type-name of entity. (NotNull) + */ + public String getEntityTypeName() { + return "jp.sf.pal.pompei.exentity.Products"; + } + + /** + * This method implements the method that is declared at super. + * + * @return The type-name of condition-bean. (NotNull) + */ + public String getConditionBeanTypeName() { + return "jp.sf.pal.pompei.cbean.bs.ProductsCB"; + } + + /** + * This method implements the method that is declared at super. + * + * @return The type-name of dao. (NotNull) + */ + public String getDaoTypeName() { + return "jp.sf.pal.pompei.exdao.ProductsDao"; + } + + /** + * This method implements the method that is declared at super. + * + * @return The type-name of behavior. (NotNull) + */ + public String getBehaviorTypeName() { + return "jp.sf.pal.pompei.exbhv.ProductsBhv"; + } + + // =================================================================================== + // Type + // ==== + /** + * This method implements the method that is declared at super. + * + * @return The type of entity. (NotNull) + */ + public Class getEntityType() { + return ENTITY_TYPE; + } + + // =================================================================================== + // Instance + // ======== + /** + * This method implements the method that is declared at super. + * + * @return The type of entity. (NotNull) + */ + public Entity newEntity() { + return newMyEntity(); + } + + /** + * New the instance of my entity. + * + * @return The instance of my entity. (NotNull) + */ + public Products newMyEntity() { + return new Products(); + } + + // =================================================================================== + // Foreign DBMeta + // ============== + /** + * This method implements the method that is declared at super. + * + * @param foreignPropertyName Foreign-property-name(Both OK - InitCap or not). (NotNull) + * @return Foreign DBMeta. (NotNull) + */ + public DBMeta getForeignDBMeta(String foreignPropertyName) { + assertStringNotNullAndNotTrimmedEmpty("foreignPropertyName", foreignPropertyName); + final String methodName = "getForeignDBMeta_" + foreignPropertyName.substring(0, 1) + foreignPropertyName.substring(1); + + java.lang.reflect.Method method = null; + try { + method = this.getClass().getMethod(methodName, new Class[]{}); + } catch (NoSuchMethodException e) { + String msg = "The foreignPropertyName is not found: foreignPropertyName=" + foreignPropertyName; + msg = msg + " tableName=" + TABLE_DB_NAME + " methodName=" + methodName; + throw new RuntimeException(msg, e); + } + try { + return (DBMeta)method.invoke(this, new Object[]{}); + } catch (IllegalAccessException e) { + throw new RuntimeException(e); + } catch (java.lang.reflect.InvocationTargetException e) { + throw new RuntimeException(e.getCause()); + } + } + + // =================================================================================== + // Determination + // ============= + /** + * This method implements the method that is declared at super. + * + * @return Determination. + */ + public boolean hasTwoOrMorePrimaryKeys() { + return false; + } + + /** + * This method implements the method that is declared at super. + * + * @return Determination. + */ + public boolean hasCommonColumn() { + return false; + } + + // =================================================================================== + // Entity Handling + // =============== + // ----------------------------------------------------- + // Accept + // ------ + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @param primaryKeyMap Primary key map. (NotNull and NotEmpty) + */ + public void acceptPrimaryKeyMap(Entity entity, java.util.Map primaryKeyMap) { + final Products myEntity = (Products)entity; + MapAssertUtil.assertPrimaryKeyMapNotNullAndNotEmpty(primaryKeyMap); + final MapStringValueAnalyzer analyzer = new MapStringValueAnalyzer(primaryKeyMap, entity.getModifiedPropertyNames()); + + MapAssertUtil.assertColumnExistingInPrimaryKeyMap(primaryKeyMap, "PRODUCTS_ID"); + if (analyzer.init("PRODUCTS_ID", "productsId", "productsId")) { myEntity.setProductsId(analyzer.analyzeNumber(java.math.BigDecimal.class)); }; + + + } + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @param primaryKeyMapString Primary-key map-string. (NotNull and NotEmpty) + */ + public void acceptPrimaryKeyMapString(Entity entity, String primaryKeyMapString) { + MapStringUtil.acceptPrimaryKeyMapString(primaryKeyMapString, entity); + } + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @param columnValueMap Column-value map. (NotNull and NotEmpty) + */ + public void acceptColumnValueMap(Entity entity, java.util.Map columnValueMap) { + final Products myEntity = (Products)entity; + MapAssertUtil.assertColumnValueMapNotNullAndNotEmpty(columnValueMap); + final MapStringValueAnalyzer analyzer = new MapStringValueAnalyzer(columnValueMap, entity.getModifiedPropertyNames()); + + if (analyzer.init("PRODUCTS_ID", "productsId", "productsId")) { myEntity.setProductsId(analyzer.analyzeNumber(java.math.BigDecimal.class)); }; + if (analyzer.init("PRODUCTS_QUANTITY", "productsQuantity", "productsQuantity")) { myEntity.setProductsQuantity(analyzer.analyzeNumber(java.math.BigDecimal.class)); }; + if (analyzer.init("PRODUCTS_MODEL", "productsModel", "productsModel")) { myEntity.setProductsModel(analyzer.analyzeString(String.class)); }; + if (analyzer.init("PRODUCTS_IMAGE", "productsImage", "productsImage")) { myEntity.setProductsImage(analyzer.analyzeString(String.class)); }; + if (analyzer.init("PRODUCTS_PRICE", "productsPrice", "productsPrice")) { myEntity.setProductsPrice(analyzer.analyzeNumber(java.math.BigDecimal.class)); }; + if (analyzer.init("PRODUCTS_DATE_ADDED", "productsDateAdded", "productsDateAdded")) { myEntity.setProductsDateAdded(analyzer.analyzeDate(java.sql.Timestamp.class)); }; + if (analyzer.init("PRODUCTS_LAST_MODIFIED", "productsLastModified", "productsLastModified")) { myEntity.setProductsLastModified(analyzer.analyzeDate(java.sql.Timestamp.class)); }; + if (analyzer.init("PRODUCTS_DATE_AVAILABLE", "productsDateAvailable", "productsDateAvailable")) { myEntity.setProductsDateAvailable(analyzer.analyzeDate(java.sql.Timestamp.class)); }; + if (analyzer.init("PRODUCTS_WEIGHT", "productsWeight", "productsWeight")) { myEntity.setProductsWeight(analyzer.analyzeNumber(java.math.BigDecimal.class)); }; + if (analyzer.init("PRODUCTS_STATUS", "productsStatus", "productsStatus")) { myEntity.setProductsStatus(analyzer.analyzeNumber(java.math.BigDecimal.class)); }; + if (analyzer.init("PRODUCTS_TAX_CLASS_ID", "productsTaxClassId", "productsTaxClassId")) { myEntity.setProductsTaxClassId(analyzer.analyzeNumber(java.math.BigDecimal.class)); }; + if (analyzer.init("MANUFACTURERS_ID", "manufacturersId", "manufacturersId")) { myEntity.setManufacturersId(analyzer.analyzeNumber(java.math.BigDecimal.class)); }; + if (analyzer.init("PRODUCTS_ORDERED", "productsOrdered", "productsOrdered")) { myEntity.setProductsOrdered(analyzer.analyzeNumber(java.math.BigDecimal.class)); }; + + } + + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @param columnValueMapString Column-value map-string. (NotNull and NotEmpty) + */ + public void acceptColumnValueMapString(Entity entity, String columnValueMapString) { + MapStringUtil.acceptColumnValueMapString(columnValueMapString, entity); + } + + + // ----------------------------------------------------- + // Extract + // ------- + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @return Primary-key map-string. (NotNull) + */ + public String extractPrimaryKeyMapString(Entity entity) { + return MapStringUtil.extractPrimaryKeyMapString(entity); + } + + /** + * Extract primary-key map-string. + * + * @param entity Target entity. (NotNull) + * @param startBrace Start-brace. (NotNull) + * @param endBrace End-brace. (NotNull) + * @param delimiter Delimiter. (NotNull) + * @param equal Equal. (NotNull) + * @return Primary-key map-string. (NotNull) + */ + public String extractPrimaryKeyMapString(Entity entity, String startBrace, String endBrace, String delimiter, String equal) { + final Products myEntity = (Products)entity; + final String mapMarkAndStartBrace = MAP_STRING_MAP_MARK + startBrace; + final StringBuffer sb = new StringBuffer(); + helpAppendingColumnValueString(sb, delimiter, equal, "PRODUCTS_ID", myEntity.getProductsId()); + + sb.delete(0, delimiter.length()).insert(0, mapMarkAndStartBrace).append(endBrace); + return sb.toString(); + + } + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @return Column-value map-string. (NotNull) + */ + public String extractColumnValueMapString(Entity entity) { + return MapStringUtil.extractColumnValueMapString(entity); + } + + /** + * Extract column-value map-string. + * + * @param entity Target entity. (NotNull) + * @param startBrace Start-brace. (NotNull) + * @param endBrace End-brace. (NotNull) + * @param delimiter Delimiter. (NotNull) + * @param equal Equal. (NotNull) + * @return Column-value map-string. (NotNull) + */ + public String extractColumnValueMapString(Entity entity, String startBrace, String endBrace, String delimiter, String equal) { + final Products myEntity = (Products)entity; + final String mapMarkAndStartBrace = MAP_STRING_MAP_MARK + startBrace; + final StringBuffer sb = new StringBuffer(); + helpAppendingColumnValueString(sb, delimiter, equal, "PRODUCTS_ID", myEntity.getProductsId()); + helpAppendingColumnValueString(sb, delimiter, equal, "PRODUCTS_QUANTITY", myEntity.getProductsQuantity()); + helpAppendingColumnValueString(sb, delimiter, equal, "PRODUCTS_MODEL", myEntity.getProductsModel()); + helpAppendingColumnValueString(sb, delimiter, equal, "PRODUCTS_IMAGE", myEntity.getProductsImage()); + helpAppendingColumnValueString(sb, delimiter, equal, "PRODUCTS_PRICE", myEntity.getProductsPrice()); + helpAppendingColumnValueString(sb, delimiter, equal, "PRODUCTS_DATE_ADDED", myEntity.getProductsDateAdded()); + helpAppendingColumnValueString(sb, delimiter, equal, "PRODUCTS_LAST_MODIFIED", myEntity.getProductsLastModified()); + helpAppendingColumnValueString(sb, delimiter, equal, "PRODUCTS_DATE_AVAILABLE", myEntity.getProductsDateAvailable()); + helpAppendingColumnValueString(sb, delimiter, equal, "PRODUCTS_WEIGHT", myEntity.getProductsWeight()); + helpAppendingColumnValueString(sb, delimiter, equal, "PRODUCTS_STATUS", myEntity.getProductsStatus()); + helpAppendingColumnValueString(sb, delimiter, equal, "PRODUCTS_TAX_CLASS_ID", myEntity.getProductsTaxClassId()); + helpAppendingColumnValueString(sb, delimiter, equal, "MANUFACTURERS_ID", myEntity.getManufacturersId()); + helpAppendingColumnValueString(sb, delimiter, equal, "PRODUCTS_ORDERED", myEntity.getProductsOrdered()); + + sb.delete(0, delimiter.length()).insert(0, mapMarkAndStartBrace).append(endBrace); + return sb.toString(); + } + + private void helpAppendingColumnValueString(StringBuffer sb, String delimiter, String equal, String colName, Object value) { + sb.append(delimiter).append(colName).append(equal); + sb.append(helpGettingColumnStringValue(value)); + } + + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @return Column-value map-string. (NotNull) + */ + public String extractCommonColumnValueMapString(Entity entity) { + return "map:{}"; + } + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @return Column-value map-string. (NotNull) + */ + public String extractCommonColumnValueMapString(Entity entity, String startBrace, String endBrace, String delimiter, String equal) { + return "map:" + startBrace + endBrace; + } + + + // ----------------------------------------------------- + // Convert + // ------- + public java.util.List convertToColumnValueList(Entity entity) { + return new java.util.ArrayList(convertToColumnValueMap(entity).values()); + } + + public java.util.Map convertToColumnValueMap(Entity entity) { + final Products myEntity = downcast(entity); + final java.util.Map valueMap = new java.util.LinkedHashMap(); + valueMap.put("PRODUCTS_ID", myEntity.getProductsId()); + valueMap.put("PRODUCTS_QUANTITY", myEntity.getProductsQuantity()); + valueMap.put("PRODUCTS_MODEL", myEntity.getProductsModel()); + valueMap.put("PRODUCTS_IMAGE", myEntity.getProductsImage()); + valueMap.put("PRODUCTS_PRICE", myEntity.getProductsPrice()); + valueMap.put("PRODUCTS_DATE_ADDED", myEntity.getProductsDateAdded()); + valueMap.put("PRODUCTS_LAST_MODIFIED", myEntity.getProductsLastModified()); + valueMap.put("PRODUCTS_DATE_AVAILABLE", myEntity.getProductsDateAvailable()); + valueMap.put("PRODUCTS_WEIGHT", myEntity.getProductsWeight()); + valueMap.put("PRODUCTS_STATUS", myEntity.getProductsStatus()); + valueMap.put("PRODUCTS_TAX_CLASS_ID", myEntity.getProductsTaxClassId()); + valueMap.put("MANUFACTURERS_ID", myEntity.getManufacturersId()); + valueMap.put("PRODUCTS_ORDERED", myEntity.getProductsOrdered()); + return valueMap; + } + + public java.util.List convertToColumnStringValueList(Entity entity) { + return new java.util.ArrayList(convertToColumnStringValueMap(entity).values()); + } + + public java.util.Map convertToColumnStringValueMap(Entity entity) { + final Products myEntity = downcast(entity); + final java.util.Map valueMap = new java.util.LinkedHashMap(); + valueMap.put("PRODUCTS_ID", helpGettingColumnStringValue(myEntity.getProductsId())); + valueMap.put("PRODUCTS_QUANTITY", helpGettingColumnStringValue(myEntity.getProductsQuantity())); + valueMap.put("PRODUCTS_MODEL", helpGettingColumnStringValue(myEntity.getProductsModel())); + valueMap.put("PRODUCTS_IMAGE", helpGettingColumnStringValue(myEntity.getProductsImage())); + valueMap.put("PRODUCTS_PRICE", helpGettingColumnStringValue(myEntity.getProductsPrice())); + valueMap.put("PRODUCTS_DATE_ADDED", helpGettingColumnStringValue(myEntity.getProductsDateAdded())); + valueMap.put("PRODUCTS_LAST_MODIFIED", helpGettingColumnStringValue(myEntity.getProductsLastModified())); + valueMap.put("PRODUCTS_DATE_AVAILABLE", helpGettingColumnStringValue(myEntity.getProductsDateAvailable())); + valueMap.put("PRODUCTS_WEIGHT", helpGettingColumnStringValue(myEntity.getProductsWeight())); + valueMap.put("PRODUCTS_STATUS", helpGettingColumnStringValue(myEntity.getProductsStatus())); + valueMap.put("PRODUCTS_TAX_CLASS_ID", helpGettingColumnStringValue(myEntity.getProductsTaxClassId())); + valueMap.put("MANUFACTURERS_ID", helpGettingColumnStringValue(myEntity.getManufacturersId())); + valueMap.put("PRODUCTS_ORDERED", helpGettingColumnStringValue(myEntity.getProductsOrdered())); + return valueMap; + } + + // =================================================================================== + // JDBC Support + // ============ + public String getPreparedInsertClause() { + return "insert into PRODUCTS(PRODUCTS_ID, PRODUCTS_QUANTITY, PRODUCTS_MODEL, PRODUCTS_IMAGE, PRODUCTS_PRICE, PRODUCTS_DATE_ADDED, PRODUCTS_LAST_MODIFIED, PRODUCTS_DATE_AVAILABLE, PRODUCTS_WEIGHT, PRODUCTS_STATUS, PRODUCTS_TAX_CLASS_ID, MANUFACTURERS_ID, PRODUCTS_ORDERED) values(? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? )"; + } + + public String getPreparedInsertClause(String tablePrefix) { + return "insert into " + tablePrefix + "PRODUCTS(PRODUCTS_ID, PRODUCTS_QUANTITY, PRODUCTS_MODEL, PRODUCTS_IMAGE, PRODUCTS_PRICE, PRODUCTS_DATE_ADDED, PRODUCTS_LAST_MODIFIED, PRODUCTS_DATE_AVAILABLE, PRODUCTS_WEIGHT, PRODUCTS_STATUS, PRODUCTS_TAX_CLASS_ID, MANUFACTURERS_ID, PRODUCTS_ORDERED) values(? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? )"; + } + + // =================================================================================== + // Helper + // ====== + protected Products downcast(Entity entity) { + assertObjectNotNull("entity", entity); + try { + return (Products)entity; + } catch (ClassCastException e) { + String msg = "The entity should be Products but it was: " + entity.getClass(); + throw new IllegalStateException(msg, e); + } + } + + protected void checkDowncast(Entity entity) { + downcast(entity); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/dbmeta/ProductsDescriptionDbm.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/dbmeta/ProductsDescriptionDbm.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/dbmeta/ProductsDescriptionDbm.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,723 @@ +package jp.sf.pal.pompei.bsentity.dbmeta; + + +import jp.sf.pal.pompei.allcommon.Entity; +import jp.sf.pal.pompei.allcommon.dbmeta.DBMeta; +import jp.sf.pal.pompei.allcommon.dbmeta.AbstractDBMeta; +import jp.sf.pal.pompei.exentity.ProductsDescription; + +/** + * The dbmeta of PRODUCTS_DESCRIPTION. (Singleton) + * + *
+ * [primary-key]
+ *     PRODUCTS_ID, LANGUAGE_ID
+ * 
+ * [column-property]
+ *     PRODUCTS_ID, LANGUAGE_ID, PRODUCTS_NAME, PRODUCTS_DESCRIPTION, PRODUCTS_URL, PRODUCTS_VIEWED
+ * 
+ * [foreign-property]
+ *     
+ * 
+ * [refferer-property]
+ *     
+ * 
+ * [sequence]
+ *     
+ * 
+ * [identity]
+ *     
+ * 
+ * [update-date]
+ *     
+ * 
+ * [version-no]
+ *     
+ * 
+ * 
+ * + * @author DBFlute(AutoGenerator) + */ +public class ProductsDescriptionDbm extends AbstractDBMeta { + + // =================================================================================== + // Definition + // ========== + /** The type of entity. */ + protected static final Class ENTITY_TYPE = ProductsDescription.class; + + /** Singleton instance. */ + private static final ProductsDescriptionDbm _instance = new ProductsDescriptionDbm(); + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + private ProductsDescriptionDbm() { + } + + // =================================================================================== + // Singleton + // ========= + /** + * Get instance. + * + * @return Singleton instance. (NotNull) + */ + public static ProductsDescriptionDbm getInstance() { + return _instance; + } + + // =================================================================================== + // Name Definition + // =============== + /** Table db name. */ + public static final String TABLE_DB_NAME = "PRODUCTS_DESCRIPTION"; + + /** Table cap-prop name. */ + public static final String TABLE_CAP_PROP_NAME = "ProductsDescription"; + + /** Table uncap-prop name. */ + public static final String TABLE_UNCAP_PROP_NAME = "productsDescription"; + + /** Db-name of ProductsId. */ + public static final String COLUMN_DB_NAME_OF_ProductsId = "PRODUCTS_ID"; + /** Db-name of LanguageId. */ + public static final String COLUMN_DB_NAME_OF_LanguageId = "LANGUAGE_ID"; + /** Db-name of ProductsName. */ + public static final String COLUMN_DB_NAME_OF_ProductsName = "PRODUCTS_NAME"; + /** Db-name of ProductsDescription. */ + public static final String COLUMN_DB_NAME_OF_ProductsDescription = "PRODUCTS_DESCRIPTION"; + /** Db-name of ProductsUrl. */ + public static final String COLUMN_DB_NAME_OF_ProductsUrl = "PRODUCTS_URL"; + /** Db-name of ProductsViewed. */ + public static final String COLUMN_DB_NAME_OF_ProductsViewed = "PRODUCTS_VIEWED"; + + /** Cap-prop-name of ProductsId. */ + public static final String COLUMN_CAP_PROP_NAME_OF_ProductsId = "ProductsId"; + /** Cap-prop-name of LanguageId. */ + public static final String COLUMN_CAP_PROP_NAME_OF_LanguageId = "LanguageId"; + /** Cap-prop-name of ProductsName. */ + public static final String COLUMN_CAP_PROP_NAME_OF_ProductsName = "ProductsName"; + /** Cap-prop-name of ProductsDescription. */ + public static final String COLUMN_CAP_PROP_NAME_OF_ProductsDescription = "ProductsDescription"; + /** Cap-prop-name of ProductsUrl. */ + public static final String COLUMN_CAP_PROP_NAME_OF_ProductsUrl = "ProductsUrl"; + /** Cap-prop-name of ProductsViewed. */ + public static final String COLUMN_CAP_PROP_NAME_OF_ProductsViewed = "ProductsViewed"; + + + + /** Uncap-prop-name of ProductsId. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_ProductsId = "productsId"; + /** Uncap-prop-name of LanguageId. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_LanguageId = "languageId"; + /** Uncap-prop-name of ProductsName. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_ProductsName = "productsName"; + /** Uncap-prop-name of ProductsDescription. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_ProductsDescription = "productsDescription"; + /** Uncap-prop-name of ProductsUrl. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_ProductsUrl = "productsUrl"; + /** Uncap-prop-name of ProductsViewed. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_ProductsViewed = "productsViewed"; + + + + /** {db-name : cap-prop-name} map. */ + private static java.util.Map _dbNameCapPropNameMap; + protected static java.util.Map createDbNameCapPropNameMap() { + if (_dbNameCapPropNameMap != null) { + return _dbNameCapPropNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_DB_NAME, TABLE_CAP_PROP_NAME); + + map.put(COLUMN_DB_NAME_OF_ProductsId, COLUMN_CAP_PROP_NAME_OF_ProductsId); + map.put(COLUMN_DB_NAME_OF_LanguageId, COLUMN_CAP_PROP_NAME_OF_LanguageId); + map.put(COLUMN_DB_NAME_OF_ProductsName, COLUMN_CAP_PROP_NAME_OF_ProductsName); + map.put(COLUMN_DB_NAME_OF_ProductsDescription, COLUMN_CAP_PROP_NAME_OF_ProductsDescription); + map.put(COLUMN_DB_NAME_OF_ProductsUrl, COLUMN_CAP_PROP_NAME_OF_ProductsUrl); + map.put(COLUMN_DB_NAME_OF_ProductsViewed, COLUMN_CAP_PROP_NAME_OF_ProductsViewed); + + _dbNameCapPropNameMap = java.util.Collections.unmodifiableMap(map); + return _dbNameCapPropNameMap; + } + + /** {db-name : uncap-prop-name} map. */ + private static java.util.Map _dbNameUncapPropNameMap; + protected static java.util.Map createDbNameUncapPropNameMap() { + if (_dbNameUncapPropNameMap != null) { + return _dbNameUncapPropNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_DB_NAME, TABLE_UNCAP_PROP_NAME); + + map.put(COLUMN_DB_NAME_OF_ProductsId, COLUMN_UNCAP_PROP_NAME_OF_ProductsId); + map.put(COLUMN_DB_NAME_OF_LanguageId, COLUMN_UNCAP_PROP_NAME_OF_LanguageId); + map.put(COLUMN_DB_NAME_OF_ProductsName, COLUMN_UNCAP_PROP_NAME_OF_ProductsName); + map.put(COLUMN_DB_NAME_OF_ProductsDescription, COLUMN_UNCAP_PROP_NAME_OF_ProductsDescription); + map.put(COLUMN_DB_NAME_OF_ProductsUrl, COLUMN_UNCAP_PROP_NAME_OF_ProductsUrl); + map.put(COLUMN_DB_NAME_OF_ProductsViewed, COLUMN_UNCAP_PROP_NAME_OF_ProductsViewed); + + _dbNameUncapPropNameMap = java.util.Collections.unmodifiableMap(map); + return _dbNameUncapPropNameMap; + } + + /** {cap-prop-name : db-name} map. */ + private static java.util.Map _capPropNameDbNameMap; + protected static java.util.Map createCapPropNameDbNameMap() { + if (_capPropNameDbNameMap != null) { + return _capPropNameDbNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_CAP_PROP_NAME, TABLE_DB_NAME); + + map.put(COLUMN_CAP_PROP_NAME_OF_ProductsId, COLUMN_DB_NAME_OF_ProductsId); + map.put(COLUMN_CAP_PROP_NAME_OF_LanguageId, COLUMN_DB_NAME_OF_LanguageId); + map.put(COLUMN_CAP_PROP_NAME_OF_ProductsName, COLUMN_DB_NAME_OF_ProductsName); + map.put(COLUMN_CAP_PROP_NAME_OF_ProductsDescription, COLUMN_DB_NAME_OF_ProductsDescription); + map.put(COLUMN_CAP_PROP_NAME_OF_ProductsUrl, COLUMN_DB_NAME_OF_ProductsUrl); + map.put(COLUMN_CAP_PROP_NAME_OF_ProductsViewed, COLUMN_DB_NAME_OF_ProductsViewed); + + _capPropNameDbNameMap = java.util.Collections.unmodifiableMap(map); + return _capPropNameDbNameMap; + } + + /** {cap-prop-name : uncap-prop-name} map. */ + private static java.util.Map _capPropNameUncapPropNameMap; + protected static java.util.Map createCapPropNameUncapPropNameMap() { + if (_capPropNameUncapPropNameMap != null) { + return _capPropNameUncapPropNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_CAP_PROP_NAME, TABLE_UNCAP_PROP_NAME); + + map.put(COLUMN_CAP_PROP_NAME_OF_ProductsId, COLUMN_UNCAP_PROP_NAME_OF_ProductsId); + map.put(COLUMN_CAP_PROP_NAME_OF_LanguageId, COLUMN_UNCAP_PROP_NAME_OF_LanguageId); + map.put(COLUMN_CAP_PROP_NAME_OF_ProductsName, COLUMN_UNCAP_PROP_NAME_OF_ProductsName); + map.put(COLUMN_CAP_PROP_NAME_OF_ProductsDescription, COLUMN_UNCAP_PROP_NAME_OF_ProductsDescription); + map.put(COLUMN_CAP_PROP_NAME_OF_ProductsUrl, COLUMN_UNCAP_PROP_NAME_OF_ProductsUrl); + map.put(COLUMN_CAP_PROP_NAME_OF_ProductsViewed, COLUMN_UNCAP_PROP_NAME_OF_ProductsViewed); + + _capPropNameUncapPropNameMap = java.util.Collections.unmodifiableMap(map); + return _capPropNameUncapPropNameMap; + } + + /** {uncap-prop-name : db-name} map. */ + private static java.util.Map _uncapPropNameDbNameMap; + protected static java.util.Map createUncapPropNameDbNameMap() { + if (_uncapPropNameDbNameMap != null) { + return _uncapPropNameDbNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_UNCAP_PROP_NAME, TABLE_DB_NAME); + + map.put(COLUMN_UNCAP_PROP_NAME_OF_ProductsId, COLUMN_DB_NAME_OF_ProductsId); + map.put(COLUMN_UNCAP_PROP_NAME_OF_LanguageId, COLUMN_DB_NAME_OF_LanguageId); + map.put(COLUMN_UNCAP_PROP_NAME_OF_ProductsName, COLUMN_DB_NAME_OF_ProductsName); + map.put(COLUMN_UNCAP_PROP_NAME_OF_ProductsDescription, COLUMN_DB_NAME_OF_ProductsDescription); + map.put(COLUMN_UNCAP_PROP_NAME_OF_ProductsUrl, COLUMN_DB_NAME_OF_ProductsUrl); + map.put(COLUMN_UNCAP_PROP_NAME_OF_ProductsViewed, COLUMN_DB_NAME_OF_ProductsViewed); + + _uncapPropNameDbNameMap = java.util.Collections.unmodifiableMap(map); + return _uncapPropNameDbNameMap; + } + + /** {uncap-prop-name : cap-prop-name} map. */ + private static java.util.Map _uncapPropNameCapPropNameMap; + protected static java.util.Map createUncapPropNameCapPropNameMap() { + if (_uncapPropNameCapPropNameMap != null) { + return _uncapPropNameCapPropNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_UNCAP_PROP_NAME, TABLE_CAP_PROP_NAME); + + map.put(COLUMN_UNCAP_PROP_NAME_OF_ProductsId, COLUMN_CAP_PROP_NAME_OF_ProductsId); + map.put(COLUMN_UNCAP_PROP_NAME_OF_LanguageId, COLUMN_CAP_PROP_NAME_OF_LanguageId); + map.put(COLUMN_UNCAP_PROP_NAME_OF_ProductsName, COLUMN_CAP_PROP_NAME_OF_ProductsName); + map.put(COLUMN_UNCAP_PROP_NAME_OF_ProductsDescription, COLUMN_CAP_PROP_NAME_OF_ProductsDescription); + map.put(COLUMN_UNCAP_PROP_NAME_OF_ProductsUrl, COLUMN_CAP_PROP_NAME_OF_ProductsUrl); + map.put(COLUMN_UNCAP_PROP_NAME_OF_ProductsViewed, COLUMN_CAP_PROP_NAME_OF_ProductsViewed); + + _uncapPropNameCapPropNameMap = java.util.Collections.unmodifiableMap(map); + return _uncapPropNameCapPropNameMap; + } + + // =================================================================================== + // Name-Map + // ======== + /** + * This method implements the method that is declared at super. + * + * @return {db-name : cap-prop-name} map. + */ + public java.util.Map getDbNameCapPropNameMap() { + return createDbNameCapPropNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {db-name : uncap-prop-name} map. + */ + public java.util.Map getDbNameUncapPropNameMap() { + return createDbNameUncapPropNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {cap-prop-name : db-name} map. + */ + public java.util.Map getCapPropNameDbNameMap() { + return createCapPropNameDbNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {cap-prop-name : uncap-prop-name} map. + */ + public java.util.Map getCapPropNameUncapPropNameMap() { + return createCapPropNameUncapPropNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {uncap-prop-name : db-name} map. + */ + public java.util.Map getUncapPropNameDbNameMap() { + return createUncapPropNameDbNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {uncap-prop-name : cap-prop-name} map. + */ + public java.util.Map getUncapPropNameCapPropNameMap() { + return createUncapPropNameCapPropNameMap(); + } + + // =================================================================================== + // Table Name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + public String getTableDbName() { + return TABLE_DB_NAME; + } + + /** + * This method implements the method that is declared at super. + * + * @return Table cap-prop-name. (NotNull) + */ + public String getTableCapPropName() { + return TABLE_CAP_PROP_NAME; + } + + /** + * This method implements the method that is declared at super. + * + * @return Table property-name. (NotNull) + */ + public String getTableUncapPropName() { + return TABLE_UNCAP_PROP_NAME; + } + + // =================================================================================== + // Column Name + // =========== + public java.util.List getColumnDbNameList() { + final String[] columns = getColumnDbNameCommaString().split(","); + final java.util.List resultList = new java.util.ArrayList(); + for (int i=0; i < columns.length; i++) { + resultList.add(columns[i].trim()); + } + return resultList; + } + + public java.util.List getColumnCapPropNameList() { + final java.util.List columnDbNameList = getColumnDbNameList(); + final java.util.List resultList = new java.util.ArrayList(); + for (final java.util.Iterator ite = columnDbNameList.iterator(); ite.hasNext(); ) { + resultList.add(getDbNameCapPropNameMap().get((String)ite.next())); + } + return resultList; + } + + public java.util.List getColumnUncapPropNameList() { + final java.util.List columnDbNameList = getColumnDbNameList(); + final java.util.List resultList = new java.util.ArrayList(); + for (final java.util.Iterator ite = columnDbNameList.iterator(); ite.hasNext(); ) { + resultList.add(getDbNameUncapPropNameMap().get((String)ite.next())); + } + return resultList; + } + + /** + * This method implements the method that is declared at super. + * + * @return Column-db-name comma-string. (NotNull) + */ + public String getColumnDbNameCommaString() { + return "PRODUCTS_ID, LANGUAGE_ID, PRODUCTS_NAME, PRODUCTS_DESCRIPTION, PRODUCTS_URL, PRODUCTS_VIEWED"; + } + + // =================================================================================== + // Type Name + // ========= + /** + * This method implements the method that is declared at super. + * + * @return The type-name of entity. (NotNull) + */ + public String getEntityTypeName() { + return "jp.sf.pal.pompei.exentity.ProductsDescription"; + } + + /** + * This method implements the method that is declared at super. + * + * @return The type-name of condition-bean. (NotNull) + */ + public String getConditionBeanTypeName() { + return "jp.sf.pal.pompei.cbean.bs.ProductsDescriptionCB"; + } + + /** + * This method implements the method that is declared at super. + * + * @return The type-name of dao. (NotNull) + */ + public String getDaoTypeName() { + return "jp.sf.pal.pompei.exdao.ProductsDescriptionDao"; + } + + /** + * This method implements the method that is declared at super. + * + * @return The type-name of behavior. (NotNull) + */ + public String getBehaviorTypeName() { + return "jp.sf.pal.pompei.exbhv.ProductsDescriptionBhv"; + } + + // =================================================================================== + // Type + // ==== + /** + * This method implements the method that is declared at super. + * + * @return The type of entity. (NotNull) + */ + public Class getEntityType() { + return ENTITY_TYPE; + } + + // =================================================================================== + // Instance + // ======== + /** + * This method implements the method that is declared at super. + * + * @return The type of entity. (NotNull) + */ + public Entity newEntity() { + return newMyEntity(); + } + + /** + * New the instance of my entity. + * + * @return The instance of my entity. (NotNull) + */ + public ProductsDescription newMyEntity() { + return new ProductsDescription(); + } + + // =================================================================================== + // Foreign DBMeta + // ============== + /** + * This method implements the method that is declared at super. + * + * @param foreignPropertyName Foreign-property-name(Both OK - InitCap or not). (NotNull) + * @return Foreign DBMeta. (NotNull) + */ + public DBMeta getForeignDBMeta(String foreignPropertyName) { + assertStringNotNullAndNotTrimmedEmpty("foreignPropertyName", foreignPropertyName); + final String methodName = "getForeignDBMeta_" + foreignPropertyName.substring(0, 1) + foreignPropertyName.substring(1); + + java.lang.reflect.Method method = null; + try { + method = this.getClass().getMethod(methodName, new Class[]{}); + } catch (NoSuchMethodException e) { + String msg = "The foreignPropertyName is not found: foreignPropertyName=" + foreignPropertyName; + msg = msg + " tableName=" + TABLE_DB_NAME + " methodName=" + methodName; + throw new RuntimeException(msg, e); + } + try { + return (DBMeta)method.invoke(this, new Object[]{}); + } catch (IllegalAccessException e) { + throw new RuntimeException(e); + } catch (java.lang.reflect.InvocationTargetException e) { + throw new RuntimeException(e.getCause()); + } + } + + // =================================================================================== + // Determination + // ============= + /** + * This method implements the method that is declared at super. + * + * @return Determination. + */ + public boolean hasTwoOrMorePrimaryKeys() { + return true; + } + + /** + * This method implements the method that is declared at super. + * + * @return Determination. + */ + public boolean hasCommonColumn() { + return false; + } + + // =================================================================================== + // Entity Handling + // =============== + // ----------------------------------------------------- + // Accept + // ------ + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @param primaryKeyMap Primary key map. (NotNull and NotEmpty) + */ + public void acceptPrimaryKeyMap(Entity entity, java.util.Map primaryKeyMap) { + final ProductsDescription myEntity = (ProductsDescription)entity; + MapAssertUtil.assertPrimaryKeyMapNotNullAndNotEmpty(primaryKeyMap); + final MapStringValueAnalyzer analyzer = new MapStringValueAnalyzer(primaryKeyMap, entity.getModifiedPropertyNames()); + + MapAssertUtil.assertColumnExistingInPrimaryKeyMap(primaryKeyMap, "PRODUCTS_ID"); + if (analyzer.init("PRODUCTS_ID", "productsId", "productsId")) { myEntity.setProductsId(analyzer.analyzeNumber(java.math.BigDecimal.class)); }; + MapAssertUtil.assertColumnExistingInPrimaryKeyMap(primaryKeyMap, "LANGUAGE_ID"); + if (analyzer.init("LANGUAGE_ID", "languageId", "languageId")) { myEntity.setLanguageId(analyzer.analyzeNumber(java.math.BigDecimal.class)); }; + + + } + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @param primaryKeyMapString Primary-key map-string. (NotNull and NotEmpty) + */ + public void acceptPrimaryKeyMapString(Entity entity, String primaryKeyMapString) { + MapStringUtil.acceptPrimaryKeyMapString(primaryKeyMapString, entity); + } + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @param columnValueMap Column-value map. (NotNull and NotEmpty) + */ + public void acceptColumnValueMap(Entity entity, java.util.Map columnValueMap) { + final ProductsDescription myEntity = (ProductsDescription)entity; + MapAssertUtil.assertColumnValueMapNotNullAndNotEmpty(columnValueMap); + final MapStringValueAnalyzer analyzer = new MapStringValueAnalyzer(columnValueMap, entity.getModifiedPropertyNames()); + + if (analyzer.init("PRODUCTS_ID", "productsId", "productsId")) { myEntity.setProductsId(analyzer.analyzeNumber(java.math.BigDecimal.class)); }; + if (analyzer.init("LANGUAGE_ID", "languageId", "languageId")) { myEntity.setLanguageId(analyzer.analyzeNumber(java.math.BigDecimal.class)); }; + if (analyzer.init("PRODUCTS_NAME", "productsName", "productsName")) { myEntity.setProductsName(analyzer.analyzeString(String.class)); }; + if (analyzer.init("PRODUCTS_DESCRIPTION", "productsDescription", "productsDescription")) { myEntity.setProductsDescription(analyzer.analyzeString(String.class)); }; + if (analyzer.init("PRODUCTS_URL", "productsUrl", "productsUrl")) { myEntity.setProductsUrl(analyzer.analyzeString(String.class)); }; + if (analyzer.init("PRODUCTS_VIEWED", "productsViewed", "productsViewed")) { myEntity.setProductsViewed(analyzer.analyzeNumber(java.math.BigDecimal.class)); }; + + } + + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @param columnValueMapString Column-value map-string. (NotNull and NotEmpty) + */ + public void acceptColumnValueMapString(Entity entity, String columnValueMapString) { + MapStringUtil.acceptColumnValueMapString(columnValueMapString, entity); + } + + + // ----------------------------------------------------- + // Extract + // ------- + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @return Primary-key map-string. (NotNull) + */ + public String extractPrimaryKeyMapString(Entity entity) { + return MapStringUtil.extractPrimaryKeyMapString(entity); + } + + /** + * Extract primary-key map-string. + * + * @param entity Target entity. (NotNull) + * @param startBrace Start-brace. (NotNull) + * @param endBrace End-brace. (NotNull) + * @param delimiter Delimiter. (NotNull) + * @param equal Equal. (NotNull) + * @return Primary-key map-string. (NotNull) + */ + public String extractPrimaryKeyMapString(Entity entity, String startBrace, String endBrace, String delimiter, String equal) { + final ProductsDescription myEntity = (ProductsDescription)entity; + final String mapMarkAndStartBrace = MAP_STRING_MAP_MARK + startBrace; + final StringBuffer sb = new StringBuffer(); + helpAppendingColumnValueString(sb, delimiter, equal, "PRODUCTS_ID", myEntity.getProductsId()); + helpAppendingColumnValueString(sb, delimiter, equal, "LANGUAGE_ID", myEntity.getLanguageId()); + + sb.delete(0, delimiter.length()).insert(0, mapMarkAndStartBrace).append(endBrace); + return sb.toString(); + + } + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @return Column-value map-string. (NotNull) + */ + public String extractColumnValueMapString(Entity entity) { + return MapStringUtil.extractColumnValueMapString(entity); + } + + /** + * Extract column-value map-string. + * + * @param entity Target entity. (NotNull) + * @param startBrace Start-brace. (NotNull) + * @param endBrace End-brace. (NotNull) + * @param delimiter Delimiter. (NotNull) + * @param equal Equal. (NotNull) + * @return Column-value map-string. (NotNull) + */ + public String extractColumnValueMapString(Entity entity, String startBrace, String endBrace, String delimiter, String equal) { + final ProductsDescription myEntity = (ProductsDescription)entity; + final String mapMarkAndStartBrace = MAP_STRING_MAP_MARK + startBrace; + final StringBuffer sb = new StringBuffer(); + helpAppendingColumnValueString(sb, delimiter, equal, "PRODUCTS_ID", myEntity.getProductsId()); + helpAppendingColumnValueString(sb, delimiter, equal, "LANGUAGE_ID", myEntity.getLanguageId()); + helpAppendingColumnValueString(sb, delimiter, equal, "PRODUCTS_NAME", myEntity.getProductsName()); + helpAppendingColumnValueString(sb, delimiter, equal, "PRODUCTS_DESCRIPTION", myEntity.getProductsDescription()); + helpAppendingColumnValueString(sb, delimiter, equal, "PRODUCTS_URL", myEntity.getProductsUrl()); + helpAppendingColumnValueString(sb, delimiter, equal, "PRODUCTS_VIEWED", myEntity.getProductsViewed()); + + sb.delete(0, delimiter.length()).insert(0, mapMarkAndStartBrace).append(endBrace); + return sb.toString(); + } + + private void helpAppendingColumnValueString(StringBuffer sb, String delimiter, String equal, String colName, Object value) { + sb.append(delimiter).append(colName).append(equal); + sb.append(helpGettingColumnStringValue(value)); + } + + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @return Column-value map-string. (NotNull) + */ + public String extractCommonColumnValueMapString(Entity entity) { + return "map:{}"; + } + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @return Column-value map-string. (NotNull) + */ + public String extractCommonColumnValueMapString(Entity entity, String startBrace, String endBrace, String delimiter, String equal) { + return "map:" + startBrace + endBrace; + } + + + // ----------------------------------------------------- + // Convert + // ------- + public java.util.List convertToColumnValueList(Entity entity) { + return new java.util.ArrayList(convertToColumnValueMap(entity).values()); + } + + public java.util.Map convertToColumnValueMap(Entity entity) { + final ProductsDescription myEntity = downcast(entity); + final java.util.Map valueMap = new java.util.LinkedHashMap(); + valueMap.put("PRODUCTS_ID", myEntity.getProductsId()); + valueMap.put("LANGUAGE_ID", myEntity.getLanguageId()); + valueMap.put("PRODUCTS_NAME", myEntity.getProductsName()); + valueMap.put("PRODUCTS_DESCRIPTION", myEntity.getProductsDescription()); + valueMap.put("PRODUCTS_URL", myEntity.getProductsUrl()); + valueMap.put("PRODUCTS_VIEWED", myEntity.getProductsViewed()); + return valueMap; + } + + public java.util.List convertToColumnStringValueList(Entity entity) { + return new java.util.ArrayList(convertToColumnStringValueMap(entity).values()); + } + + public java.util.Map convertToColumnStringValueMap(Entity entity) { + final ProductsDescription myEntity = downcast(entity); + final java.util.Map valueMap = new java.util.LinkedHashMap(); + valueMap.put("PRODUCTS_ID", helpGettingColumnStringValue(myEntity.getProductsId())); + valueMap.put("LANGUAGE_ID", helpGettingColumnStringValue(myEntity.getLanguageId())); + valueMap.put("PRODUCTS_NAME", helpGettingColumnStringValue(myEntity.getProductsName())); + valueMap.put("PRODUCTS_DESCRIPTION", helpGettingColumnStringValue(myEntity.getProductsDescription())); + valueMap.put("PRODUCTS_URL", helpGettingColumnStringValue(myEntity.getProductsUrl())); + valueMap.put("PRODUCTS_VIEWED", helpGettingColumnStringValue(myEntity.getProductsViewed())); + return valueMap; + } + + // =================================================================================== + // JDBC Support + // ============ + public String getPreparedInsertClause() { + return "insert into PRODUCTS_DESCRIPTION(PRODUCTS_ID, LANGUAGE_ID, PRODUCTS_NAME, PRODUCTS_DESCRIPTION, PRODUCTS_URL, PRODUCTS_VIEWED) values(? , ? , ? , ? , ? , ? )"; + } + + public String getPreparedInsertClause(String tablePrefix) { + return "insert into " + tablePrefix + "PRODUCTS_DESCRIPTION(PRODUCTS_ID, LANGUAGE_ID, PRODUCTS_NAME, PRODUCTS_DESCRIPTION, PRODUCTS_URL, PRODUCTS_VIEWED) values(? , ? , ? , ? , ? , ? )"; + } + + // =================================================================================== + // Helper + // ====== + protected ProductsDescription downcast(Entity entity) { + assertObjectNotNull("entity", entity); + try { + return (ProductsDescription)entity; + } catch (ClassCastException e) { + String msg = "The entity should be ProductsDescription but it was: " + entity.getClass(); + throw new IllegalStateException(msg, e); + } + } + + protected void checkDowncast(Entity entity) { + downcast(entity); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/dbmeta/ProductsNotificationsDbm.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/dbmeta/ProductsNotificationsDbm.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/dbmeta/ProductsNotificationsDbm.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,675 @@ +package jp.sf.pal.pompei.bsentity.dbmeta; + + +import jp.sf.pal.pompei.allcommon.Entity; +import jp.sf.pal.pompei.allcommon.dbmeta.DBMeta; +import jp.sf.pal.pompei.allcommon.dbmeta.AbstractDBMeta; +import jp.sf.pal.pompei.exentity.ProductsNotifications; + +/** + * The dbmeta of PRODUCTS_NOTIFICATIONS. (Singleton) + * + *
+ * [primary-key]
+ *     PRODUCTS_ID, CUSTOMERS_ID
+ * 
+ * [column-property]
+ *     PRODUCTS_ID, CUSTOMERS_ID, DATE_ADDED
+ * 
+ * [foreign-property]
+ *     
+ * 
+ * [refferer-property]
+ *     
+ * 
+ * [sequence]
+ *     
+ * 
+ * [identity]
+ *     
+ * 
+ * [update-date]
+ *     
+ * 
+ * [version-no]
+ *     
+ * 
+ * 
+ * + * @author DBFlute(AutoGenerator) + */ +public class ProductsNotificationsDbm extends AbstractDBMeta { + + // =================================================================================== + // Definition + // ========== + /** The type of entity. */ + protected static final Class ENTITY_TYPE = ProductsNotifications.class; + + /** Singleton instance. */ + private static final ProductsNotificationsDbm _instance = new ProductsNotificationsDbm(); + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + private ProductsNotificationsDbm() { + } + + // =================================================================================== + // Singleton + // ========= + /** + * Get instance. + * + * @return Singleton instance. (NotNull) + */ + public static ProductsNotificationsDbm getInstance() { + return _instance; + } + + // =================================================================================== + // Name Definition + // =============== + /** Table db name. */ + public static final String TABLE_DB_NAME = "PRODUCTS_NOTIFICATIONS"; + + /** Table cap-prop name. */ + public static final String TABLE_CAP_PROP_NAME = "ProductsNotifications"; + + /** Table uncap-prop name. */ + public static final String TABLE_UNCAP_PROP_NAME = "productsNotifications"; + + /** Db-name of ProductsId. */ + public static final String COLUMN_DB_NAME_OF_ProductsId = "PRODUCTS_ID"; + /** Db-name of CustomersId. */ + public static final String COLUMN_DB_NAME_OF_CustomersId = "CUSTOMERS_ID"; + /** Db-name of DateAdded. */ + public static final String COLUMN_DB_NAME_OF_DateAdded = "DATE_ADDED"; + + /** Cap-prop-name of ProductsId. */ + public static final String COLUMN_CAP_PROP_NAME_OF_ProductsId = "ProductsId"; + /** Cap-prop-name of CustomersId. */ + public static final String COLUMN_CAP_PROP_NAME_OF_CustomersId = "CustomersId"; + /** Cap-prop-name of DateAdded. */ + public static final String COLUMN_CAP_PROP_NAME_OF_DateAdded = "DateAdded"; + + + + /** Uncap-prop-name of ProductsId. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_ProductsId = "productsId"; + /** Uncap-prop-name of CustomersId. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_CustomersId = "customersId"; + /** Uncap-prop-name of DateAdded. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_DateAdded = "dateAdded"; + + + + /** {db-name : cap-prop-name} map. */ + private static java.util.Map _dbNameCapPropNameMap; + protected static java.util.Map createDbNameCapPropNameMap() { + if (_dbNameCapPropNameMap != null) { + return _dbNameCapPropNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_DB_NAME, TABLE_CAP_PROP_NAME); + + map.put(COLUMN_DB_NAME_OF_ProductsId, COLUMN_CAP_PROP_NAME_OF_ProductsId); + map.put(COLUMN_DB_NAME_OF_CustomersId, COLUMN_CAP_PROP_NAME_OF_CustomersId); + map.put(COLUMN_DB_NAME_OF_DateAdded, COLUMN_CAP_PROP_NAME_OF_DateAdded); + + _dbNameCapPropNameMap = java.util.Collections.unmodifiableMap(map); + return _dbNameCapPropNameMap; + } + + /** {db-name : uncap-prop-name} map. */ + private static java.util.Map _dbNameUncapPropNameMap; + protected static java.util.Map createDbNameUncapPropNameMap() { + if (_dbNameUncapPropNameMap != null) { + return _dbNameUncapPropNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_DB_NAME, TABLE_UNCAP_PROP_NAME); + + map.put(COLUMN_DB_NAME_OF_ProductsId, COLUMN_UNCAP_PROP_NAME_OF_ProductsId); + map.put(COLUMN_DB_NAME_OF_CustomersId, COLUMN_UNCAP_PROP_NAME_OF_CustomersId); + map.put(COLUMN_DB_NAME_OF_DateAdded, COLUMN_UNCAP_PROP_NAME_OF_DateAdded); + + _dbNameUncapPropNameMap = java.util.Collections.unmodifiableMap(map); + return _dbNameUncapPropNameMap; + } + + /** {cap-prop-name : db-name} map. */ + private static java.util.Map _capPropNameDbNameMap; + protected static java.util.Map createCapPropNameDbNameMap() { + if (_capPropNameDbNameMap != null) { + return _capPropNameDbNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_CAP_PROP_NAME, TABLE_DB_NAME); + + map.put(COLUMN_CAP_PROP_NAME_OF_ProductsId, COLUMN_DB_NAME_OF_ProductsId); + map.put(COLUMN_CAP_PROP_NAME_OF_CustomersId, COLUMN_DB_NAME_OF_CustomersId); + map.put(COLUMN_CAP_PROP_NAME_OF_DateAdded, COLUMN_DB_NAME_OF_DateAdded); + + _capPropNameDbNameMap = java.util.Collections.unmodifiableMap(map); + return _capPropNameDbNameMap; + } + + /** {cap-prop-name : uncap-prop-name} map. */ + private static java.util.Map _capPropNameUncapPropNameMap; + protected static java.util.Map createCapPropNameUncapPropNameMap() { + if (_capPropNameUncapPropNameMap != null) { + return _capPropNameUncapPropNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_CAP_PROP_NAME, TABLE_UNCAP_PROP_NAME); + + map.put(COLUMN_CAP_PROP_NAME_OF_ProductsId, COLUMN_UNCAP_PROP_NAME_OF_ProductsId); + map.put(COLUMN_CAP_PROP_NAME_OF_CustomersId, COLUMN_UNCAP_PROP_NAME_OF_CustomersId); + map.put(COLUMN_CAP_PROP_NAME_OF_DateAdded, COLUMN_UNCAP_PROP_NAME_OF_DateAdded); + + _capPropNameUncapPropNameMap = java.util.Collections.unmodifiableMap(map); + return _capPropNameUncapPropNameMap; + } + + /** {uncap-prop-name : db-name} map. */ + private static java.util.Map _uncapPropNameDbNameMap; + protected static java.util.Map createUncapPropNameDbNameMap() { + if (_uncapPropNameDbNameMap != null) { + return _uncapPropNameDbNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_UNCAP_PROP_NAME, TABLE_DB_NAME); + + map.put(COLUMN_UNCAP_PROP_NAME_OF_ProductsId, COLUMN_DB_NAME_OF_ProductsId); + map.put(COLUMN_UNCAP_PROP_NAME_OF_CustomersId, COLUMN_DB_NAME_OF_CustomersId); + map.put(COLUMN_UNCAP_PROP_NAME_OF_DateAdded, COLUMN_DB_NAME_OF_DateAdded); + + _uncapPropNameDbNameMap = java.util.Collections.unmodifiableMap(map); + return _uncapPropNameDbNameMap; + } + + /** {uncap-prop-name : cap-prop-name} map. */ + private static java.util.Map _uncapPropNameCapPropNameMap; + protected static java.util.Map createUncapPropNameCapPropNameMap() { + if (_uncapPropNameCapPropNameMap != null) { + return _uncapPropNameCapPropNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_UNCAP_PROP_NAME, TABLE_CAP_PROP_NAME); + + map.put(COLUMN_UNCAP_PROP_NAME_OF_ProductsId, COLUMN_CAP_PROP_NAME_OF_ProductsId); + map.put(COLUMN_UNCAP_PROP_NAME_OF_CustomersId, COLUMN_CAP_PROP_NAME_OF_CustomersId); + map.put(COLUMN_UNCAP_PROP_NAME_OF_DateAdded, COLUMN_CAP_PROP_NAME_OF_DateAdded); + + _uncapPropNameCapPropNameMap = java.util.Collections.unmodifiableMap(map); + return _uncapPropNameCapPropNameMap; + } + + // =================================================================================== + // Name-Map + // ======== + /** + * This method implements the method that is declared at super. + * + * @return {db-name : cap-prop-name} map. + */ + public java.util.Map getDbNameCapPropNameMap() { + return createDbNameCapPropNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {db-name : uncap-prop-name} map. + */ + public java.util.Map getDbNameUncapPropNameMap() { + return createDbNameUncapPropNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {cap-prop-name : db-name} map. + */ + public java.util.Map getCapPropNameDbNameMap() { + return createCapPropNameDbNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {cap-prop-name : uncap-prop-name} map. + */ + public java.util.Map getCapPropNameUncapPropNameMap() { + return createCapPropNameUncapPropNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {uncap-prop-name : db-name} map. + */ + public java.util.Map getUncapPropNameDbNameMap() { + return createUncapPropNameDbNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {uncap-prop-name : cap-prop-name} map. + */ + public java.util.Map getUncapPropNameCapPropNameMap() { + return createUncapPropNameCapPropNameMap(); + } + + // =================================================================================== + // Table Name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + public String getTableDbName() { + return TABLE_DB_NAME; + } + + /** + * This method implements the method that is declared at super. + * + * @return Table cap-prop-name. (NotNull) + */ + public String getTableCapPropName() { + return TABLE_CAP_PROP_NAME; + } + + /** + * This method implements the method that is declared at super. + * + * @return Table property-name. (NotNull) + */ + public String getTableUncapPropName() { + return TABLE_UNCAP_PROP_NAME; + } + + // =================================================================================== + // Column Name + // =========== + public java.util.List getColumnDbNameList() { + final String[] columns = getColumnDbNameCommaString().split(","); + final java.util.List resultList = new java.util.ArrayList(); + for (int i=0; i < columns.length; i++) { + resultList.add(columns[i].trim()); + } + return resultList; + } + + public java.util.List getColumnCapPropNameList() { + final java.util.List columnDbNameList = getColumnDbNameList(); + final java.util.List resultList = new java.util.ArrayList(); + for (final java.util.Iterator ite = columnDbNameList.iterator(); ite.hasNext(); ) { + resultList.add(getDbNameCapPropNameMap().get((String)ite.next())); + } + return resultList; + } + + public java.util.List getColumnUncapPropNameList() { + final java.util.List columnDbNameList = getColumnDbNameList(); + final java.util.List resultList = new java.util.ArrayList(); + for (final java.util.Iterator ite = columnDbNameList.iterator(); ite.hasNext(); ) { + resultList.add(getDbNameUncapPropNameMap().get((String)ite.next())); + } + return resultList; + } + + /** + * This method implements the method that is declared at super. + * + * @return Column-db-name comma-string. (NotNull) + */ + public String getColumnDbNameCommaString() { + return "PRODUCTS_ID, CUSTOMERS_ID, DATE_ADDED"; + } + + // =================================================================================== + // Type Name + // ========= + /** + * This method implements the method that is declared at super. + * + * @return The type-name of entity. (NotNull) + */ + public String getEntityTypeName() { + return "jp.sf.pal.pompei.exentity.ProductsNotifications"; + } + + /** + * This method implements the method that is declared at super. + * + * @return The type-name of condition-bean. (NotNull) + */ + public String getConditionBeanTypeName() { + return "jp.sf.pal.pompei.cbean.bs.ProductsNotificationsCB"; + } + + /** + * This method implements the method that is declared at super. + * + * @return The type-name of dao. (NotNull) + */ + public String getDaoTypeName() { + return "jp.sf.pal.pompei.exdao.ProductsNotificationsDao"; + } + + /** + * This method implements the method that is declared at super. + * + * @return The type-name of behavior. (NotNull) + */ + public String getBehaviorTypeName() { + return "jp.sf.pal.pompei.exbhv.ProductsNotificationsBhv"; + } + + // =================================================================================== + // Type + // ==== + /** + * This method implements the method that is declared at super. + * + * @return The type of entity. (NotNull) + */ + public Class getEntityType() { + return ENTITY_TYPE; + } + + // =================================================================================== + // Instance + // ======== + /** + * This method implements the method that is declared at super. + * + * @return The type of entity. (NotNull) + */ + public Entity newEntity() { + return newMyEntity(); + } + + /** + * New the instance of my entity. + * + * @return The instance of my entity. (NotNull) + */ + public ProductsNotifications newMyEntity() { + return new ProductsNotifications(); + } + + // =================================================================================== + // Foreign DBMeta + // ============== + /** + * This method implements the method that is declared at super. + * + * @param foreignPropertyName Foreign-property-name(Both OK - InitCap or not). (NotNull) + * @return Foreign DBMeta. (NotNull) + */ + public DBMeta getForeignDBMeta(String foreignPropertyName) { + assertStringNotNullAndNotTrimmedEmpty("foreignPropertyName", foreignPropertyName); + final String methodName = "getForeignDBMeta_" + foreignPropertyName.substring(0, 1) + foreignPropertyName.substring(1); + + java.lang.reflect.Method method = null; + try { + method = this.getClass().getMethod(methodName, new Class[]{}); + } catch (NoSuchMethodException e) { + String msg = "The foreignPropertyName is not found: foreignPropertyName=" + foreignPropertyName; + msg = msg + " tableName=" + TABLE_DB_NAME + " methodName=" + methodName; + throw new RuntimeException(msg, e); + } + try { + return (DBMeta)method.invoke(this, new Object[]{}); + } catch (IllegalAccessException e) { + throw new RuntimeException(e); + } catch (java.lang.reflect.InvocationTargetException e) { + throw new RuntimeException(e.getCause()); + } + } + + // =================================================================================== + // Determination + // ============= + /** + * This method implements the method that is declared at super. + * + * @return Determination. + */ + public boolean hasTwoOrMorePrimaryKeys() { + return true; + } + + /** + * This method implements the method that is declared at super. + * + * @return Determination. + */ + public boolean hasCommonColumn() { + return false; + } + + // =================================================================================== + // Entity Handling + // =============== + // ----------------------------------------------------- + // Accept + // ------ + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @param primaryKeyMap Primary key map. (NotNull and NotEmpty) + */ + public void acceptPrimaryKeyMap(Entity entity, java.util.Map primaryKeyMap) { + final ProductsNotifications myEntity = (ProductsNotifications)entity; + MapAssertUtil.assertPrimaryKeyMapNotNullAndNotEmpty(primaryKeyMap); + final MapStringValueAnalyzer analyzer = new MapStringValueAnalyzer(primaryKeyMap, entity.getModifiedPropertyNames()); + + MapAssertUtil.assertColumnExistingInPrimaryKeyMap(primaryKeyMap, "PRODUCTS_ID"); + if (analyzer.init("PRODUCTS_ID", "productsId", "productsId")) { myEntity.setProductsId(analyzer.analyzeNumber(java.math.BigDecimal.class)); }; + MapAssertUtil.assertColumnExistingInPrimaryKeyMap(primaryKeyMap, "CUSTOMERS_ID"); + if (analyzer.init("CUSTOMERS_ID", "customersId", "customersId")) { myEntity.setCustomersId(analyzer.analyzeNumber(java.math.BigDecimal.class)); }; + + + } + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @param primaryKeyMapString Primary-key map-string. (NotNull and NotEmpty) + */ + public void acceptPrimaryKeyMapString(Entity entity, String primaryKeyMapString) { + MapStringUtil.acceptPrimaryKeyMapString(primaryKeyMapString, entity); + } + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @param columnValueMap Column-value map. (NotNull and NotEmpty) + */ + public void acceptColumnValueMap(Entity entity, java.util.Map columnValueMap) { + final ProductsNotifications myEntity = (ProductsNotifications)entity; + MapAssertUtil.assertColumnValueMapNotNullAndNotEmpty(columnValueMap); + final MapStringValueAnalyzer analyzer = new MapStringValueAnalyzer(columnValueMap, entity.getModifiedPropertyNames()); + + if (analyzer.init("PRODUCTS_ID", "productsId", "productsId")) { myEntity.setProductsId(analyzer.analyzeNumber(java.math.BigDecimal.class)); }; + if (analyzer.init("CUSTOMERS_ID", "customersId", "customersId")) { myEntity.setCustomersId(analyzer.analyzeNumber(java.math.BigDecimal.class)); }; + if (analyzer.init("DATE_ADDED", "dateAdded", "dateAdded")) { myEntity.setDateAdded(analyzer.analyzeDate(java.sql.Timestamp.class)); }; + + } + + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @param columnValueMapString Column-value map-string. (NotNull and NotEmpty) + */ + public void acceptColumnValueMapString(Entity entity, String columnValueMapString) { + MapStringUtil.acceptColumnValueMapString(columnValueMapString, entity); + } + + + // ----------------------------------------------------- + // Extract + // ------- + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @return Primary-key map-string. (NotNull) + */ + public String extractPrimaryKeyMapString(Entity entity) { + return MapStringUtil.extractPrimaryKeyMapString(entity); + } + + /** + * Extract primary-key map-string. + * + * @param entity Target entity. (NotNull) + * @param startBrace Start-brace. (NotNull) + * @param endBrace End-brace. (NotNull) + * @param delimiter Delimiter. (NotNull) + * @param equal Equal. (NotNull) + * @return Primary-key map-string. (NotNull) + */ + public String extractPrimaryKeyMapString(Entity entity, String startBrace, String endBrace, String delimiter, String equal) { + final ProductsNotifications myEntity = (ProductsNotifications)entity; + final String mapMarkAndStartBrace = MAP_STRING_MAP_MARK + startBrace; + final StringBuffer sb = new StringBuffer(); + helpAppendingColumnValueString(sb, delimiter, equal, "PRODUCTS_ID", myEntity.getProductsId()); + helpAppendingColumnValueString(sb, delimiter, equal, "CUSTOMERS_ID", myEntity.getCustomersId()); + + sb.delete(0, delimiter.length()).insert(0, mapMarkAndStartBrace).append(endBrace); + return sb.toString(); + + } + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @return Column-value map-string. (NotNull) + */ + public String extractColumnValueMapString(Entity entity) { + return MapStringUtil.extractColumnValueMapString(entity); + } + + /** + * Extract column-value map-string. + * + * @param entity Target entity. (NotNull) + * @param startBrace Start-brace. (NotNull) + * @param endBrace End-brace. (NotNull) + * @param delimiter Delimiter. (NotNull) + * @param equal Equal. (NotNull) + * @return Column-value map-string. (NotNull) + */ + public String extractColumnValueMapString(Entity entity, String startBrace, String endBrace, String delimiter, String equal) { + final ProductsNotifications myEntity = (ProductsNotifications)entity; + final String mapMarkAndStartBrace = MAP_STRING_MAP_MARK + startBrace; + final StringBuffer sb = new StringBuffer(); + helpAppendingColumnValueString(sb, delimiter, equal, "PRODUCTS_ID", myEntity.getProductsId()); + helpAppendingColumnValueString(sb, delimiter, equal, "CUSTOMERS_ID", myEntity.getCustomersId()); + helpAppendingColumnValueString(sb, delimiter, equal, "DATE_ADDED", myEntity.getDateAdded()); + + sb.delete(0, delimiter.length()).insert(0, mapMarkAndStartBrace).append(endBrace); + return sb.toString(); + } + + private void helpAppendingColumnValueString(StringBuffer sb, String delimiter, String equal, String colName, Object value) { + sb.append(delimiter).append(colName).append(equal); + sb.append(helpGettingColumnStringValue(value)); + } + + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @return Column-value map-string. (NotNull) + */ + public String extractCommonColumnValueMapString(Entity entity) { + return "map:{}"; + } + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @return Column-value map-string. (NotNull) + */ + public String extractCommonColumnValueMapString(Entity entity, String startBrace, String endBrace, String delimiter, String equal) { + return "map:" + startBrace + endBrace; + } + + + // ----------------------------------------------------- + // Convert + // ------- + public java.util.List convertToColumnValueList(Entity entity) { + return new java.util.ArrayList(convertToColumnValueMap(entity).values()); + } + + public java.util.Map convertToColumnValueMap(Entity entity) { + final ProductsNotifications myEntity = downcast(entity); + final java.util.Map valueMap = new java.util.LinkedHashMap(); + valueMap.put("PRODUCTS_ID", myEntity.getProductsId()); + valueMap.put("CUSTOMERS_ID", myEntity.getCustomersId()); + valueMap.put("DATE_ADDED", myEntity.getDateAdded()); + return valueMap; + } + + public java.util.List convertToColumnStringValueList(Entity entity) { + return new java.util.ArrayList(convertToColumnStringValueMap(entity).values()); + } + + public java.util.Map convertToColumnStringValueMap(Entity entity) { + final ProductsNotifications myEntity = downcast(entity); + final java.util.Map valueMap = new java.util.LinkedHashMap(); + valueMap.put("PRODUCTS_ID", helpGettingColumnStringValue(myEntity.getProductsId())); + valueMap.put("CUSTOMERS_ID", helpGettingColumnStringValue(myEntity.getCustomersId())); + valueMap.put("DATE_ADDED", helpGettingColumnStringValue(myEntity.getDateAdded())); + return valueMap; + } + + // =================================================================================== + // JDBC Support + // ============ + public String getPreparedInsertClause() { + return "insert into PRODUCTS_NOTIFICATIONS(PRODUCTS_ID, CUSTOMERS_ID, DATE_ADDED) values(? , ? , ? )"; + } + + public String getPreparedInsertClause(String tablePrefix) { + return "insert into " + tablePrefix + "PRODUCTS_NOTIFICATIONS(PRODUCTS_ID, CUSTOMERS_ID, DATE_ADDED) values(? , ? , ? )"; + } + + // =================================================================================== + // Helper + // ====== + protected ProductsNotifications downcast(Entity entity) { + assertObjectNotNull("entity", entity); + try { + return (ProductsNotifications)entity; + } catch (ClassCastException e) { + String msg = "The entity should be ProductsNotifications but it was: " + entity.getClass(); + throw new IllegalStateException(msg, e); + } + } + + protected void checkDowncast(Entity entity) { + downcast(entity); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/dbmeta/ProductsOptionsDbm.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/dbmeta/ProductsOptionsDbm.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/dbmeta/ProductsOptionsDbm.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,675 @@ +package jp.sf.pal.pompei.bsentity.dbmeta; + + +import jp.sf.pal.pompei.allcommon.Entity; +import jp.sf.pal.pompei.allcommon.dbmeta.DBMeta; +import jp.sf.pal.pompei.allcommon.dbmeta.AbstractDBMeta; +import jp.sf.pal.pompei.exentity.ProductsOptions; + +/** + * The dbmeta of PRODUCTS_OPTIONS. (Singleton) + * + *
+ * [primary-key]
+ *     PRODUCTS_OPTIONS_ID, LANGUAGE_ID
+ * 
+ * [column-property]
+ *     PRODUCTS_OPTIONS_ID, LANGUAGE_ID, PRODUCTS_OPTIONS_NAME
+ * 
+ * [foreign-property]
+ *     
+ * 
+ * [refferer-property]
+ *     
+ * 
+ * [sequence]
+ *     
+ * 
+ * [identity]
+ *     
+ * 
+ * [update-date]
+ *     
+ * 
+ * [version-no]
+ *     
+ * 
+ * 
+ * + * @author DBFlute(AutoGenerator) + */ +public class ProductsOptionsDbm extends AbstractDBMeta { + + // =================================================================================== + // Definition + // ========== + /** The type of entity. */ + protected static final Class ENTITY_TYPE = ProductsOptions.class; + + /** Singleton instance. */ + private static final ProductsOptionsDbm _instance = new ProductsOptionsDbm(); + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + private ProductsOptionsDbm() { + } + + // =================================================================================== + // Singleton + // ========= + /** + * Get instance. + * + * @return Singleton instance. (NotNull) + */ + public static ProductsOptionsDbm getInstance() { + return _instance; + } + + // =================================================================================== + // Name Definition + // =============== + /** Table db name. */ + public static final String TABLE_DB_NAME = "PRODUCTS_OPTIONS"; + + /** Table cap-prop name. */ + public static final String TABLE_CAP_PROP_NAME = "ProductsOptions"; + + /** Table uncap-prop name. */ + public static final String TABLE_UNCAP_PROP_NAME = "productsOptions"; + + /** Db-name of ProductsOptionsId. */ + public static final String COLUMN_DB_NAME_OF_ProductsOptionsId = "PRODUCTS_OPTIONS_ID"; + /** Db-name of LanguageId. */ + public static final String COLUMN_DB_NAME_OF_LanguageId = "LANGUAGE_ID"; + /** Db-name of ProductsOptionsName. */ + public static final String COLUMN_DB_NAME_OF_ProductsOptionsName = "PRODUCTS_OPTIONS_NAME"; + + /** Cap-prop-name of ProductsOptionsId. */ + public static final String COLUMN_CAP_PROP_NAME_OF_ProductsOptionsId = "ProductsOptionsId"; + /** Cap-prop-name of LanguageId. */ + public static final String COLUMN_CAP_PROP_NAME_OF_LanguageId = "LanguageId"; + /** Cap-prop-name of ProductsOptionsName. */ + public static final String COLUMN_CAP_PROP_NAME_OF_ProductsOptionsName = "ProductsOptionsName"; + + + + /** Uncap-prop-name of ProductsOptionsId. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_ProductsOptionsId = "productsOptionsId"; + /** Uncap-prop-name of LanguageId. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_LanguageId = "languageId"; + /** Uncap-prop-name of ProductsOptionsName. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_ProductsOptionsName = "productsOptionsName"; + + + + /** {db-name : cap-prop-name} map. */ + private static java.util.Map _dbNameCapPropNameMap; + protected static java.util.Map createDbNameCapPropNameMap() { + if (_dbNameCapPropNameMap != null) { + return _dbNameCapPropNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_DB_NAME, TABLE_CAP_PROP_NAME); + + map.put(COLUMN_DB_NAME_OF_ProductsOptionsId, COLUMN_CAP_PROP_NAME_OF_ProductsOptionsId); + map.put(COLUMN_DB_NAME_OF_LanguageId, COLUMN_CAP_PROP_NAME_OF_LanguageId); + map.put(COLUMN_DB_NAME_OF_ProductsOptionsName, COLUMN_CAP_PROP_NAME_OF_ProductsOptionsName); + + _dbNameCapPropNameMap = java.util.Collections.unmodifiableMap(map); + return _dbNameCapPropNameMap; + } + + /** {db-name : uncap-prop-name} map. */ + private static java.util.Map _dbNameUncapPropNameMap; + protected static java.util.Map createDbNameUncapPropNameMap() { + if (_dbNameUncapPropNameMap != null) { + return _dbNameUncapPropNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_DB_NAME, TABLE_UNCAP_PROP_NAME); + + map.put(COLUMN_DB_NAME_OF_ProductsOptionsId, COLUMN_UNCAP_PROP_NAME_OF_ProductsOptionsId); + map.put(COLUMN_DB_NAME_OF_LanguageId, COLUMN_UNCAP_PROP_NAME_OF_LanguageId); + map.put(COLUMN_DB_NAME_OF_ProductsOptionsName, COLUMN_UNCAP_PROP_NAME_OF_ProductsOptionsName); + + _dbNameUncapPropNameMap = java.util.Collections.unmodifiableMap(map); + return _dbNameUncapPropNameMap; + } + + /** {cap-prop-name : db-name} map. */ + private static java.util.Map _capPropNameDbNameMap; + protected static java.util.Map createCapPropNameDbNameMap() { + if (_capPropNameDbNameMap != null) { + return _capPropNameDbNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_CAP_PROP_NAME, TABLE_DB_NAME); + + map.put(COLUMN_CAP_PROP_NAME_OF_ProductsOptionsId, COLUMN_DB_NAME_OF_ProductsOptionsId); + map.put(COLUMN_CAP_PROP_NAME_OF_LanguageId, COLUMN_DB_NAME_OF_LanguageId); + map.put(COLUMN_CAP_PROP_NAME_OF_ProductsOptionsName, COLUMN_DB_NAME_OF_ProductsOptionsName); + + _capPropNameDbNameMap = java.util.Collections.unmodifiableMap(map); + return _capPropNameDbNameMap; + } + + /** {cap-prop-name : uncap-prop-name} map. */ + private static java.util.Map _capPropNameUncapPropNameMap; + protected static java.util.Map createCapPropNameUncapPropNameMap() { + if (_capPropNameUncapPropNameMap != null) { + return _capPropNameUncapPropNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_CAP_PROP_NAME, TABLE_UNCAP_PROP_NAME); + + map.put(COLUMN_CAP_PROP_NAME_OF_ProductsOptionsId, COLUMN_UNCAP_PROP_NAME_OF_ProductsOptionsId); + map.put(COLUMN_CAP_PROP_NAME_OF_LanguageId, COLUMN_UNCAP_PROP_NAME_OF_LanguageId); + map.put(COLUMN_CAP_PROP_NAME_OF_ProductsOptionsName, COLUMN_UNCAP_PROP_NAME_OF_ProductsOptionsName); + + _capPropNameUncapPropNameMap = java.util.Collections.unmodifiableMap(map); + return _capPropNameUncapPropNameMap; + } + + /** {uncap-prop-name : db-name} map. */ + private static java.util.Map _uncapPropNameDbNameMap; + protected static java.util.Map createUncapPropNameDbNameMap() { + if (_uncapPropNameDbNameMap != null) { + return _uncapPropNameDbNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_UNCAP_PROP_NAME, TABLE_DB_NAME); + + map.put(COLUMN_UNCAP_PROP_NAME_OF_ProductsOptionsId, COLUMN_DB_NAME_OF_ProductsOptionsId); + map.put(COLUMN_UNCAP_PROP_NAME_OF_LanguageId, COLUMN_DB_NAME_OF_LanguageId); + map.put(COLUMN_UNCAP_PROP_NAME_OF_ProductsOptionsName, COLUMN_DB_NAME_OF_ProductsOptionsName); + + _uncapPropNameDbNameMap = java.util.Collections.unmodifiableMap(map); + return _uncapPropNameDbNameMap; + } + + /** {uncap-prop-name : cap-prop-name} map. */ + private static java.util.Map _uncapPropNameCapPropNameMap; + protected static java.util.Map createUncapPropNameCapPropNameMap() { + if (_uncapPropNameCapPropNameMap != null) { + return _uncapPropNameCapPropNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_UNCAP_PROP_NAME, TABLE_CAP_PROP_NAME); + + map.put(COLUMN_UNCAP_PROP_NAME_OF_ProductsOptionsId, COLUMN_CAP_PROP_NAME_OF_ProductsOptionsId); + map.put(COLUMN_UNCAP_PROP_NAME_OF_LanguageId, COLUMN_CAP_PROP_NAME_OF_LanguageId); + map.put(COLUMN_UNCAP_PROP_NAME_OF_ProductsOptionsName, COLUMN_CAP_PROP_NAME_OF_ProductsOptionsName); + + _uncapPropNameCapPropNameMap = java.util.Collections.unmodifiableMap(map); + return _uncapPropNameCapPropNameMap; + } + + // =================================================================================== + // Name-Map + // ======== + /** + * This method implements the method that is declared at super. + * + * @return {db-name : cap-prop-name} map. + */ + public java.util.Map getDbNameCapPropNameMap() { + return createDbNameCapPropNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {db-name : uncap-prop-name} map. + */ + public java.util.Map getDbNameUncapPropNameMap() { + return createDbNameUncapPropNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {cap-prop-name : db-name} map. + */ + public java.util.Map getCapPropNameDbNameMap() { + return createCapPropNameDbNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {cap-prop-name : uncap-prop-name} map. + */ + public java.util.Map getCapPropNameUncapPropNameMap() { + return createCapPropNameUncapPropNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {uncap-prop-name : db-name} map. + */ + public java.util.Map getUncapPropNameDbNameMap() { + return createUncapPropNameDbNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {uncap-prop-name : cap-prop-name} map. + */ + public java.util.Map getUncapPropNameCapPropNameMap() { + return createUncapPropNameCapPropNameMap(); + } + + // =================================================================================== + // Table Name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + public String getTableDbName() { + return TABLE_DB_NAME; + } + + /** + * This method implements the method that is declared at super. + * + * @return Table cap-prop-name. (NotNull) + */ + public String getTableCapPropName() { + return TABLE_CAP_PROP_NAME; + } + + /** + * This method implements the method that is declared at super. + * + * @return Table property-name. (NotNull) + */ + public String getTableUncapPropName() { + return TABLE_UNCAP_PROP_NAME; + } + + // =================================================================================== + // Column Name + // =========== + public java.util.List getColumnDbNameList() { + final String[] columns = getColumnDbNameCommaString().split(","); + final java.util.List resultList = new java.util.ArrayList(); + for (int i=0; i < columns.length; i++) { + resultList.add(columns[i].trim()); + } + return resultList; + } + + public java.util.List getColumnCapPropNameList() { + final java.util.List columnDbNameList = getColumnDbNameList(); + final java.util.List resultList = new java.util.ArrayList(); + for (final java.util.Iterator ite = columnDbNameList.iterator(); ite.hasNext(); ) { + resultList.add(getDbNameCapPropNameMap().get((String)ite.next())); + } + return resultList; + } + + public java.util.List getColumnUncapPropNameList() { + final java.util.List columnDbNameList = getColumnDbNameList(); + final java.util.List resultList = new java.util.ArrayList(); + for (final java.util.Iterator ite = columnDbNameList.iterator(); ite.hasNext(); ) { + resultList.add(getDbNameUncapPropNameMap().get((String)ite.next())); + } + return resultList; + } + + /** + * This method implements the method that is declared at super. + * + * @return Column-db-name comma-string. (NotNull) + */ + public String getColumnDbNameCommaString() { + return "PRODUCTS_OPTIONS_ID, LANGUAGE_ID, PRODUCTS_OPTIONS_NAME"; + } + + // =================================================================================== + // Type Name + // ========= + /** + * This method implements the method that is declared at super. + * + * @return The type-name of entity. (NotNull) + */ + public String getEntityTypeName() { + return "jp.sf.pal.pompei.exentity.ProductsOptions"; + } + + /** + * This method implements the method that is declared at super. + * + * @return The type-name of condition-bean. (NotNull) + */ + public String getConditionBeanTypeName() { + return "jp.sf.pal.pompei.cbean.bs.ProductsOptionsCB"; + } + + /** + * This method implements the method that is declared at super. + * + * @return The type-name of dao. (NotNull) + */ + public String getDaoTypeName() { + return "jp.sf.pal.pompei.exdao.ProductsOptionsDao"; + } + + /** + * This method implements the method that is declared at super. + * + * @return The type-name of behavior. (NotNull) + */ + public String getBehaviorTypeName() { + return "jp.sf.pal.pompei.exbhv.ProductsOptionsBhv"; + } + + // =================================================================================== + // Type + // ==== + /** + * This method implements the method that is declared at super. + * + * @return The type of entity. (NotNull) + */ + public Class getEntityType() { + return ENTITY_TYPE; + } + + // =================================================================================== + // Instance + // ======== + /** + * This method implements the method that is declared at super. + * + * @return The type of entity. (NotNull) + */ + public Entity newEntity() { + return newMyEntity(); + } + + /** + * New the instance of my entity. + * + * @return The instance of my entity. (NotNull) + */ + public ProductsOptions newMyEntity() { + return new ProductsOptions(); + } + + // =================================================================================== + // Foreign DBMeta + // ============== + /** + * This method implements the method that is declared at super. + * + * @param foreignPropertyName Foreign-property-name(Both OK - InitCap or not). (NotNull) + * @return Foreign DBMeta. (NotNull) + */ + public DBMeta getForeignDBMeta(String foreignPropertyName) { + assertStringNotNullAndNotTrimmedEmpty("foreignPropertyName", foreignPropertyName); + final String methodName = "getForeignDBMeta_" + foreignPropertyName.substring(0, 1) + foreignPropertyName.substring(1); + + java.lang.reflect.Method method = null; + try { + method = this.getClass().getMethod(methodName, new Class[]{}); + } catch (NoSuchMethodException e) { + String msg = "The foreignPropertyName is not found: foreignPropertyName=" + foreignPropertyName; + msg = msg + " tableName=" + TABLE_DB_NAME + " methodName=" + methodName; + throw new RuntimeException(msg, e); + } + try { + return (DBMeta)method.invoke(this, new Object[]{}); + } catch (IllegalAccessException e) { + throw new RuntimeException(e); + } catch (java.lang.reflect.InvocationTargetException e) { + throw new RuntimeException(e.getCause()); + } + } + + // =================================================================================== + // Determination + // ============= + /** + * This method implements the method that is declared at super. + * + * @return Determination. + */ + public boolean hasTwoOrMorePrimaryKeys() { + return true; + } + + /** + * This method implements the method that is declared at super. + * + * @return Determination. + */ + public boolean hasCommonColumn() { + return false; + } + + // =================================================================================== + // Entity Handling + // =============== + // ----------------------------------------------------- + // Accept + // ------ + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @param primaryKeyMap Primary key map. (NotNull and NotEmpty) + */ + public void acceptPrimaryKeyMap(Entity entity, java.util.Map primaryKeyMap) { + final ProductsOptions myEntity = (ProductsOptions)entity; + MapAssertUtil.assertPrimaryKeyMapNotNullAndNotEmpty(primaryKeyMap); + final MapStringValueAnalyzer analyzer = new MapStringValueAnalyzer(primaryKeyMap, entity.getModifiedPropertyNames()); + + MapAssertUtil.assertColumnExistingInPrimaryKeyMap(primaryKeyMap, "PRODUCTS_OPTIONS_ID"); + if (analyzer.init("PRODUCTS_OPTIONS_ID", "productsOptionsId", "productsOptionsId")) { myEntity.setProductsOptionsId(analyzer.analyzeNumber(java.math.BigDecimal.class)); }; + MapAssertUtil.assertColumnExistingInPrimaryKeyMap(primaryKeyMap, "LANGUAGE_ID"); + if (analyzer.init("LANGUAGE_ID", "languageId", "languageId")) { myEntity.setLanguageId(analyzer.analyzeNumber(java.math.BigDecimal.class)); }; + + + } + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @param primaryKeyMapString Primary-key map-string. (NotNull and NotEmpty) + */ + public void acceptPrimaryKeyMapString(Entity entity, String primaryKeyMapString) { + MapStringUtil.acceptPrimaryKeyMapString(primaryKeyMapString, entity); + } + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @param columnValueMap Column-value map. (NotNull and NotEmpty) + */ + public void acceptColumnValueMap(Entity entity, java.util.Map columnValueMap) { + final ProductsOptions myEntity = (ProductsOptions)entity; + MapAssertUtil.assertColumnValueMapNotNullAndNotEmpty(columnValueMap); + final MapStringValueAnalyzer analyzer = new MapStringValueAnalyzer(columnValueMap, entity.getModifiedPropertyNames()); + + if (analyzer.init("PRODUCTS_OPTIONS_ID", "productsOptionsId", "productsOptionsId")) { myEntity.setProductsOptionsId(analyzer.analyzeNumber(java.math.BigDecimal.class)); }; + if (analyzer.init("LANGUAGE_ID", "languageId", "languageId")) { myEntity.setLanguageId(analyzer.analyzeNumber(java.math.BigDecimal.class)); }; + if (analyzer.init("PRODUCTS_OPTIONS_NAME", "productsOptionsName", "productsOptionsName")) { myEntity.setProductsOptionsName(analyzer.analyzeString(String.class)); }; + + } + + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @param columnValueMapString Column-value map-string. (NotNull and NotEmpty) + */ + public void acceptColumnValueMapString(Entity entity, String columnValueMapString) { + MapStringUtil.acceptColumnValueMapString(columnValueMapString, entity); + } + + + // ----------------------------------------------------- + // Extract + // ------- + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @return Primary-key map-string. (NotNull) + */ + public String extractPrimaryKeyMapString(Entity entity) { + return MapStringUtil.extractPrimaryKeyMapString(entity); + } + + /** + * Extract primary-key map-string. + * + * @param entity Target entity. (NotNull) + * @param startBrace Start-brace. (NotNull) + * @param endBrace End-brace. (NotNull) + * @param delimiter Delimiter. (NotNull) + * @param equal Equal. (NotNull) + * @return Primary-key map-string. (NotNull) + */ + public String extractPrimaryKeyMapString(Entity entity, String startBrace, String endBrace, String delimiter, String equal) { + final ProductsOptions myEntity = (ProductsOptions)entity; + final String mapMarkAndStartBrace = MAP_STRING_MAP_MARK + startBrace; + final StringBuffer sb = new StringBuffer(); + helpAppendingColumnValueString(sb, delimiter, equal, "PRODUCTS_OPTIONS_ID", myEntity.getProductsOptionsId()); + helpAppendingColumnValueString(sb, delimiter, equal, "LANGUAGE_ID", myEntity.getLanguageId()); + + sb.delete(0, delimiter.length()).insert(0, mapMarkAndStartBrace).append(endBrace); + return sb.toString(); + + } + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @return Column-value map-string. (NotNull) + */ + public String extractColumnValueMapString(Entity entity) { + return MapStringUtil.extractColumnValueMapString(entity); + } + + /** + * Extract column-value map-string. + * + * @param entity Target entity. (NotNull) + * @param startBrace Start-brace. (NotNull) + * @param endBrace End-brace. (NotNull) + * @param delimiter Delimiter. (NotNull) + * @param equal Equal. (NotNull) + * @return Column-value map-string. (NotNull) + */ + public String extractColumnValueMapString(Entity entity, String startBrace, String endBrace, String delimiter, String equal) { + final ProductsOptions myEntity = (ProductsOptions)entity; + final String mapMarkAndStartBrace = MAP_STRING_MAP_MARK + startBrace; + final StringBuffer sb = new StringBuffer(); + helpAppendingColumnValueString(sb, delimiter, equal, "PRODUCTS_OPTIONS_ID", myEntity.getProductsOptionsId()); + helpAppendingColumnValueString(sb, delimiter, equal, "LANGUAGE_ID", myEntity.getLanguageId()); + helpAppendingColumnValueString(sb, delimiter, equal, "PRODUCTS_OPTIONS_NAME", myEntity.getProductsOptionsName()); + + sb.delete(0, delimiter.length()).insert(0, mapMarkAndStartBrace).append(endBrace); + return sb.toString(); + } + + private void helpAppendingColumnValueString(StringBuffer sb, String delimiter, String equal, String colName, Object value) { + sb.append(delimiter).append(colName).append(equal); + sb.append(helpGettingColumnStringValue(value)); + } + + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @return Column-value map-string. (NotNull) + */ + public String extractCommonColumnValueMapString(Entity entity) { + return "map:{}"; + } + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @return Column-value map-string. (NotNull) + */ + public String extractCommonColumnValueMapString(Entity entity, String startBrace, String endBrace, String delimiter, String equal) { + return "map:" + startBrace + endBrace; + } + + + // ----------------------------------------------------- + // Convert + // ------- + public java.util.List convertToColumnValueList(Entity entity) { + return new java.util.ArrayList(convertToColumnValueMap(entity).values()); + } + + public java.util.Map convertToColumnValueMap(Entity entity) { + final ProductsOptions myEntity = downcast(entity); + final java.util.Map valueMap = new java.util.LinkedHashMap(); + valueMap.put("PRODUCTS_OPTIONS_ID", myEntity.getProductsOptionsId()); + valueMap.put("LANGUAGE_ID", myEntity.getLanguageId()); + valueMap.put("PRODUCTS_OPTIONS_NAME", myEntity.getProductsOptionsName()); + return valueMap; + } + + public java.util.List convertToColumnStringValueList(Entity entity) { + return new java.util.ArrayList(convertToColumnStringValueMap(entity).values()); + } + + public java.util.Map convertToColumnStringValueMap(Entity entity) { + final ProductsOptions myEntity = downcast(entity); + final java.util.Map valueMap = new java.util.LinkedHashMap(); + valueMap.put("PRODUCTS_OPTIONS_ID", helpGettingColumnStringValue(myEntity.getProductsOptionsId())); + valueMap.put("LANGUAGE_ID", helpGettingColumnStringValue(myEntity.getLanguageId())); + valueMap.put("PRODUCTS_OPTIONS_NAME", helpGettingColumnStringValue(myEntity.getProductsOptionsName())); + return valueMap; + } + + // =================================================================================== + // JDBC Support + // ============ + public String getPreparedInsertClause() { + return "insert into PRODUCTS_OPTIONS(PRODUCTS_OPTIONS_ID, LANGUAGE_ID, PRODUCTS_OPTIONS_NAME) values(? , ? , ? )"; + } + + public String getPreparedInsertClause(String tablePrefix) { + return "insert into " + tablePrefix + "PRODUCTS_OPTIONS(PRODUCTS_OPTIONS_ID, LANGUAGE_ID, PRODUCTS_OPTIONS_NAME) values(? , ? , ? )"; + } + + // =================================================================================== + // Helper + // ====== + protected ProductsOptions downcast(Entity entity) { + assertObjectNotNull("entity", entity); + try { + return (ProductsOptions)entity; + } catch (ClassCastException e) { + String msg = "The entity should be ProductsOptions but it was: " + entity.getClass(); + throw new IllegalStateException(msg, e); + } + } + + protected void checkDowncast(Entity entity) { + downcast(entity); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/dbmeta/ProductsOptionsValuesDbm.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/dbmeta/ProductsOptionsValuesDbm.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/dbmeta/ProductsOptionsValuesDbm.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,675 @@ +package jp.sf.pal.pompei.bsentity.dbmeta; + + +import jp.sf.pal.pompei.allcommon.Entity; +import jp.sf.pal.pompei.allcommon.dbmeta.DBMeta; +import jp.sf.pal.pompei.allcommon.dbmeta.AbstractDBMeta; +import jp.sf.pal.pompei.exentity.ProductsOptionsValues; + +/** + * The dbmeta of PRODUCTS_OPTIONS_VALUES. (Singleton) + * + *
+ * [primary-key]
+ *     PRODUCTS_OPTIONS_VALUES_ID, LANGUAGE_ID
+ * 
+ * [column-property]
+ *     PRODUCTS_OPTIONS_VALUES_ID, LANGUAGE_ID, PRODUCTS_OPTIONS_VALUES_NAME
+ * 
+ * [foreign-property]
+ *     
+ * 
+ * [refferer-property]
+ *     
+ * 
+ * [sequence]
+ *     
+ * 
+ * [identity]
+ *     
+ * 
+ * [update-date]
+ *     
+ * 
+ * [version-no]
+ *     
+ * 
+ * 
+ * + * @author DBFlute(AutoGenerator) + */ +public class ProductsOptionsValuesDbm extends AbstractDBMeta { + + // =================================================================================== + // Definition + // ========== + /** The type of entity. */ + protected static final Class ENTITY_TYPE = ProductsOptionsValues.class; + + /** Singleton instance. */ + private static final ProductsOptionsValuesDbm _instance = new ProductsOptionsValuesDbm(); + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + private ProductsOptionsValuesDbm() { + } + + // =================================================================================== + // Singleton + // ========= + /** + * Get instance. + * + * @return Singleton instance. (NotNull) + */ + public static ProductsOptionsValuesDbm getInstance() { + return _instance; + } + + // =================================================================================== + // Name Definition + // =============== + /** Table db name. */ + public static final String TABLE_DB_NAME = "PRODUCTS_OPTIONS_VALUES"; + + /** Table cap-prop name. */ + public static final String TABLE_CAP_PROP_NAME = "ProductsOptionsValues"; + + /** Table uncap-prop name. */ + public static final String TABLE_UNCAP_PROP_NAME = "productsOptionsValues"; + + /** Db-name of ProductsOptionsValuesId. */ + public static final String COLUMN_DB_NAME_OF_ProductsOptionsValuesId = "PRODUCTS_OPTIONS_VALUES_ID"; + /** Db-name of LanguageId. */ + public static final String COLUMN_DB_NAME_OF_LanguageId = "LANGUAGE_ID"; + /** Db-name of ProductsOptionsValuesName. */ + public static final String COLUMN_DB_NAME_OF_ProductsOptionsValuesName = "PRODUCTS_OPTIONS_VALUES_NAME"; + + /** Cap-prop-name of ProductsOptionsValuesId. */ + public static final String COLUMN_CAP_PROP_NAME_OF_ProductsOptionsValuesId = "ProductsOptionsValuesId"; + /** Cap-prop-name of LanguageId. */ + public static final String COLUMN_CAP_PROP_NAME_OF_LanguageId = "LanguageId"; + /** Cap-prop-name of ProductsOptionsValuesName. */ + public static final String COLUMN_CAP_PROP_NAME_OF_ProductsOptionsValuesName = "ProductsOptionsValuesName"; + + + + /** Uncap-prop-name of ProductsOptionsValuesId. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_ProductsOptionsValuesId = "productsOptionsValuesId"; + /** Uncap-prop-name of LanguageId. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_LanguageId = "languageId"; + /** Uncap-prop-name of ProductsOptionsValuesName. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_ProductsOptionsValuesName = "productsOptionsValuesName"; + + + + /** {db-name : cap-prop-name} map. */ + private static java.util.Map _dbNameCapPropNameMap; + protected static java.util.Map createDbNameCapPropNameMap() { + if (_dbNameCapPropNameMap != null) { + return _dbNameCapPropNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_DB_NAME, TABLE_CAP_PROP_NAME); + + map.put(COLUMN_DB_NAME_OF_ProductsOptionsValuesId, COLUMN_CAP_PROP_NAME_OF_ProductsOptionsValuesId); + map.put(COLUMN_DB_NAME_OF_LanguageId, COLUMN_CAP_PROP_NAME_OF_LanguageId); + map.put(COLUMN_DB_NAME_OF_ProductsOptionsValuesName, COLUMN_CAP_PROP_NAME_OF_ProductsOptionsValuesName); + + _dbNameCapPropNameMap = java.util.Collections.unmodifiableMap(map); + return _dbNameCapPropNameMap; + } + + /** {db-name : uncap-prop-name} map. */ + private static java.util.Map _dbNameUncapPropNameMap; + protected static java.util.Map createDbNameUncapPropNameMap() { + if (_dbNameUncapPropNameMap != null) { + return _dbNameUncapPropNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_DB_NAME, TABLE_UNCAP_PROP_NAME); + + map.put(COLUMN_DB_NAME_OF_ProductsOptionsValuesId, COLUMN_UNCAP_PROP_NAME_OF_ProductsOptionsValuesId); + map.put(COLUMN_DB_NAME_OF_LanguageId, COLUMN_UNCAP_PROP_NAME_OF_LanguageId); + map.put(COLUMN_DB_NAME_OF_ProductsOptionsValuesName, COLUMN_UNCAP_PROP_NAME_OF_ProductsOptionsValuesName); + + _dbNameUncapPropNameMap = java.util.Collections.unmodifiableMap(map); + return _dbNameUncapPropNameMap; + } + + /** {cap-prop-name : db-name} map. */ + private static java.util.Map _capPropNameDbNameMap; + protected static java.util.Map createCapPropNameDbNameMap() { + if (_capPropNameDbNameMap != null) { + return _capPropNameDbNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_CAP_PROP_NAME, TABLE_DB_NAME); + + map.put(COLUMN_CAP_PROP_NAME_OF_ProductsOptionsValuesId, COLUMN_DB_NAME_OF_ProductsOptionsValuesId); + map.put(COLUMN_CAP_PROP_NAME_OF_LanguageId, COLUMN_DB_NAME_OF_LanguageId); + map.put(COLUMN_CAP_PROP_NAME_OF_ProductsOptionsValuesName, COLUMN_DB_NAME_OF_ProductsOptionsValuesName); + + _capPropNameDbNameMap = java.util.Collections.unmodifiableMap(map); + return _capPropNameDbNameMap; + } + + /** {cap-prop-name : uncap-prop-name} map. */ + private static java.util.Map _capPropNameUncapPropNameMap; + protected static java.util.Map createCapPropNameUncapPropNameMap() { + if (_capPropNameUncapPropNameMap != null) { + return _capPropNameUncapPropNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_CAP_PROP_NAME, TABLE_UNCAP_PROP_NAME); + + map.put(COLUMN_CAP_PROP_NAME_OF_ProductsOptionsValuesId, COLUMN_UNCAP_PROP_NAME_OF_ProductsOptionsValuesId); + map.put(COLUMN_CAP_PROP_NAME_OF_LanguageId, COLUMN_UNCAP_PROP_NAME_OF_LanguageId); + map.put(COLUMN_CAP_PROP_NAME_OF_ProductsOptionsValuesName, COLUMN_UNCAP_PROP_NAME_OF_ProductsOptionsValuesName); + + _capPropNameUncapPropNameMap = java.util.Collections.unmodifiableMap(map); + return _capPropNameUncapPropNameMap; + } + + /** {uncap-prop-name : db-name} map. */ + private static java.util.Map _uncapPropNameDbNameMap; + protected static java.util.Map createUncapPropNameDbNameMap() { + if (_uncapPropNameDbNameMap != null) { + return _uncapPropNameDbNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_UNCAP_PROP_NAME, TABLE_DB_NAME); + + map.put(COLUMN_UNCAP_PROP_NAME_OF_ProductsOptionsValuesId, COLUMN_DB_NAME_OF_ProductsOptionsValuesId); + map.put(COLUMN_UNCAP_PROP_NAME_OF_LanguageId, COLUMN_DB_NAME_OF_LanguageId); + map.put(COLUMN_UNCAP_PROP_NAME_OF_ProductsOptionsValuesName, COLUMN_DB_NAME_OF_ProductsOptionsValuesName); + + _uncapPropNameDbNameMap = java.util.Collections.unmodifiableMap(map); + return _uncapPropNameDbNameMap; + } + + /** {uncap-prop-name : cap-prop-name} map. */ + private static java.util.Map _uncapPropNameCapPropNameMap; + protected static java.util.Map createUncapPropNameCapPropNameMap() { + if (_uncapPropNameCapPropNameMap != null) { + return _uncapPropNameCapPropNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_UNCAP_PROP_NAME, TABLE_CAP_PROP_NAME); + + map.put(COLUMN_UNCAP_PROP_NAME_OF_ProductsOptionsValuesId, COLUMN_CAP_PROP_NAME_OF_ProductsOptionsValuesId); + map.put(COLUMN_UNCAP_PROP_NAME_OF_LanguageId, COLUMN_CAP_PROP_NAME_OF_LanguageId); + map.put(COLUMN_UNCAP_PROP_NAME_OF_ProductsOptionsValuesName, COLUMN_CAP_PROP_NAME_OF_ProductsOptionsValuesName); + + _uncapPropNameCapPropNameMap = java.util.Collections.unmodifiableMap(map); + return _uncapPropNameCapPropNameMap; + } + + // =================================================================================== + // Name-Map + // ======== + /** + * This method implements the method that is declared at super. + * + * @return {db-name : cap-prop-name} map. + */ + public java.util.Map getDbNameCapPropNameMap() { + return createDbNameCapPropNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {db-name : uncap-prop-name} map. + */ + public java.util.Map getDbNameUncapPropNameMap() { + return createDbNameUncapPropNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {cap-prop-name : db-name} map. + */ + public java.util.Map getCapPropNameDbNameMap() { + return createCapPropNameDbNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {cap-prop-name : uncap-prop-name} map. + */ + public java.util.Map getCapPropNameUncapPropNameMap() { + return createCapPropNameUncapPropNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {uncap-prop-name : db-name} map. + */ + public java.util.Map getUncapPropNameDbNameMap() { + return createUncapPropNameDbNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {uncap-prop-name : cap-prop-name} map. + */ + public java.util.Map getUncapPropNameCapPropNameMap() { + return createUncapPropNameCapPropNameMap(); + } + + // =================================================================================== + // Table Name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + public String getTableDbName() { + return TABLE_DB_NAME; + } + + /** + * This method implements the method that is declared at super. + * + * @return Table cap-prop-name. (NotNull) + */ + public String getTableCapPropName() { + return TABLE_CAP_PROP_NAME; + } + + /** + * This method implements the method that is declared at super. + * + * @return Table property-name. (NotNull) + */ + public String getTableUncapPropName() { + return TABLE_UNCAP_PROP_NAME; + } + + // =================================================================================== + // Column Name + // =========== + public java.util.List getColumnDbNameList() { + final String[] columns = getColumnDbNameCommaString().split(","); + final java.util.List resultList = new java.util.ArrayList(); + for (int i=0; i < columns.length; i++) { + resultList.add(columns[i].trim()); + } + return resultList; + } + + public java.util.List getColumnCapPropNameList() { + final java.util.List columnDbNameList = getColumnDbNameList(); + final java.util.List resultList = new java.util.ArrayList(); + for (final java.util.Iterator ite = columnDbNameList.iterator(); ite.hasNext(); ) { + resultList.add(getDbNameCapPropNameMap().get((String)ite.next())); + } + return resultList; + } + + public java.util.List getColumnUncapPropNameList() { + final java.util.List columnDbNameList = getColumnDbNameList(); + final java.util.List resultList = new java.util.ArrayList(); + for (final java.util.Iterator ite = columnDbNameList.iterator(); ite.hasNext(); ) { + resultList.add(getDbNameUncapPropNameMap().get((String)ite.next())); + } + return resultList; + } + + /** + * This method implements the method that is declared at super. + * + * @return Column-db-name comma-string. (NotNull) + */ + public String getColumnDbNameCommaString() { + return "PRODUCTS_OPTIONS_VALUES_ID, LANGUAGE_ID, PRODUCTS_OPTIONS_VALUES_NAME"; + } + + // =================================================================================== + // Type Name + // ========= + /** + * This method implements the method that is declared at super. + * + * @return The type-name of entity. (NotNull) + */ + public String getEntityTypeName() { + return "jp.sf.pal.pompei.exentity.ProductsOptionsValues"; + } + + /** + * This method implements the method that is declared at super. + * + * @return The type-name of condition-bean. (NotNull) + */ + public String getConditionBeanTypeName() { + return "jp.sf.pal.pompei.cbean.bs.ProductsOptionsValuesCB"; + } + + /** + * This method implements the method that is declared at super. + * + * @return The type-name of dao. (NotNull) + */ + public String getDaoTypeName() { + return "jp.sf.pal.pompei.exdao.ProductsOptionsValuesDao"; + } + + /** + * This method implements the method that is declared at super. + * + * @return The type-name of behavior. (NotNull) + */ + public String getBehaviorTypeName() { + return "jp.sf.pal.pompei.exbhv.ProductsOptionsValuesBhv"; + } + + // =================================================================================== + // Type + // ==== + /** + * This method implements the method that is declared at super. + * + * @return The type of entity. (NotNull) + */ + public Class getEntityType() { + return ENTITY_TYPE; + } + + // =================================================================================== + // Instance + // ======== + /** + * This method implements the method that is declared at super. + * + * @return The type of entity. (NotNull) + */ + public Entity newEntity() { + return newMyEntity(); + } + + /** + * New the instance of my entity. + * + * @return The instance of my entity. (NotNull) + */ + public ProductsOptionsValues newMyEntity() { + return new ProductsOptionsValues(); + } + + // =================================================================================== + // Foreign DBMeta + // ============== + /** + * This method implements the method that is declared at super. + * + * @param foreignPropertyName Foreign-property-name(Both OK - InitCap or not). (NotNull) + * @return Foreign DBMeta. (NotNull) + */ + public DBMeta getForeignDBMeta(String foreignPropertyName) { + assertStringNotNullAndNotTrimmedEmpty("foreignPropertyName", foreignPropertyName); + final String methodName = "getForeignDBMeta_" + foreignPropertyName.substring(0, 1) + foreignPropertyName.substring(1); + + java.lang.reflect.Method method = null; + try { + method = this.getClass().getMethod(methodName, new Class[]{}); + } catch (NoSuchMethodException e) { + String msg = "The foreignPropertyName is not found: foreignPropertyName=" + foreignPropertyName; + msg = msg + " tableName=" + TABLE_DB_NAME + " methodName=" + methodName; + throw new RuntimeException(msg, e); + } + try { + return (DBMeta)method.invoke(this, new Object[]{}); + } catch (IllegalAccessException e) { + throw new RuntimeException(e); + } catch (java.lang.reflect.InvocationTargetException e) { + throw new RuntimeException(e.getCause()); + } + } + + // =================================================================================== + // Determination + // ============= + /** + * This method implements the method that is declared at super. + * + * @return Determination. + */ + public boolean hasTwoOrMorePrimaryKeys() { + return true; + } + + /** + * This method implements the method that is declared at super. + * + * @return Determination. + */ + public boolean hasCommonColumn() { + return false; + } + + // =================================================================================== + // Entity Handling + // =============== + // ----------------------------------------------------- + // Accept + // ------ + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @param primaryKeyMap Primary key map. (NotNull and NotEmpty) + */ + public void acceptPrimaryKeyMap(Entity entity, java.util.Map primaryKeyMap) { + final ProductsOptionsValues myEntity = (ProductsOptionsValues)entity; + MapAssertUtil.assertPrimaryKeyMapNotNullAndNotEmpty(primaryKeyMap); + final MapStringValueAnalyzer analyzer = new MapStringValueAnalyzer(primaryKeyMap, entity.getModifiedPropertyNames()); + + MapAssertUtil.assertColumnExistingInPrimaryKeyMap(primaryKeyMap, "PRODUCTS_OPTIONS_VALUES_ID"); + if (analyzer.init("PRODUCTS_OPTIONS_VALUES_ID", "productsOptionsValuesId", "productsOptionsValuesId")) { myEntity.setProductsOptionsValuesId(analyzer.analyzeNumber(java.math.BigDecimal.class)); }; + MapAssertUtil.assertColumnExistingInPrimaryKeyMap(primaryKeyMap, "LANGUAGE_ID"); + if (analyzer.init("LANGUAGE_ID", "languageId", "languageId")) { myEntity.setLanguageId(analyzer.analyzeNumber(java.math.BigDecimal.class)); }; + + + } + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @param primaryKeyMapString Primary-key map-string. (NotNull and NotEmpty) + */ + public void acceptPrimaryKeyMapString(Entity entity, String primaryKeyMapString) { + MapStringUtil.acceptPrimaryKeyMapString(primaryKeyMapString, entity); + } + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @param columnValueMap Column-value map. (NotNull and NotEmpty) + */ + public void acceptColumnValueMap(Entity entity, java.util.Map columnValueMap) { + final ProductsOptionsValues myEntity = (ProductsOptionsValues)entity; + MapAssertUtil.assertColumnValueMapNotNullAndNotEmpty(columnValueMap); + final MapStringValueAnalyzer analyzer = new MapStringValueAnalyzer(columnValueMap, entity.getModifiedPropertyNames()); + + if (analyzer.init("PRODUCTS_OPTIONS_VALUES_ID", "productsOptionsValuesId", "productsOptionsValuesId")) { myEntity.setProductsOptionsValuesId(analyzer.analyzeNumber(java.math.BigDecimal.class)); }; + if (analyzer.init("LANGUAGE_ID", "languageId", "languageId")) { myEntity.setLanguageId(analyzer.analyzeNumber(java.math.BigDecimal.class)); }; + if (analyzer.init("PRODUCTS_OPTIONS_VALUES_NAME", "productsOptionsValuesName", "productsOptionsValuesName")) { myEntity.setProductsOptionsValuesName(analyzer.analyzeString(String.class)); }; + + } + + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @param columnValueMapString Column-value map-string. (NotNull and NotEmpty) + */ + public void acceptColumnValueMapString(Entity entity, String columnValueMapString) { + MapStringUtil.acceptColumnValueMapString(columnValueMapString, entity); + } + + + // ----------------------------------------------------- + // Extract + // ------- + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @return Primary-key map-string. (NotNull) + */ + public String extractPrimaryKeyMapString(Entity entity) { + return MapStringUtil.extractPrimaryKeyMapString(entity); + } + + /** + * Extract primary-key map-string. + * + * @param entity Target entity. (NotNull) + * @param startBrace Start-brace. (NotNull) + * @param endBrace End-brace. (NotNull) + * @param delimiter Delimiter. (NotNull) + * @param equal Equal. (NotNull) + * @return Primary-key map-string. (NotNull) + */ + public String extractPrimaryKeyMapString(Entity entity, String startBrace, String endBrace, String delimiter, String equal) { + final ProductsOptionsValues myEntity = (ProductsOptionsValues)entity; + final String mapMarkAndStartBrace = MAP_STRING_MAP_MARK + startBrace; + final StringBuffer sb = new StringBuffer(); + helpAppendingColumnValueString(sb, delimiter, equal, "PRODUCTS_OPTIONS_VALUES_ID", myEntity.getProductsOptionsValuesId()); + helpAppendingColumnValueString(sb, delimiter, equal, "LANGUAGE_ID", myEntity.getLanguageId()); + + sb.delete(0, delimiter.length()).insert(0, mapMarkAndStartBrace).append(endBrace); + return sb.toString(); + + } + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @return Column-value map-string. (NotNull) + */ + public String extractColumnValueMapString(Entity entity) { + return MapStringUtil.extractColumnValueMapString(entity); + } + + /** + * Extract column-value map-string. + * + * @param entity Target entity. (NotNull) + * @param startBrace Start-brace. (NotNull) + * @param endBrace End-brace. (NotNull) + * @param delimiter Delimiter. (NotNull) + * @param equal Equal. (NotNull) + * @return Column-value map-string. (NotNull) + */ + public String extractColumnValueMapString(Entity entity, String startBrace, String endBrace, String delimiter, String equal) { + final ProductsOptionsValues myEntity = (ProductsOptionsValues)entity; + final String mapMarkAndStartBrace = MAP_STRING_MAP_MARK + startBrace; + final StringBuffer sb = new StringBuffer(); + helpAppendingColumnValueString(sb, delimiter, equal, "PRODUCTS_OPTIONS_VALUES_ID", myEntity.getProductsOptionsValuesId()); + helpAppendingColumnValueString(sb, delimiter, equal, "LANGUAGE_ID", myEntity.getLanguageId()); + helpAppendingColumnValueString(sb, delimiter, equal, "PRODUCTS_OPTIONS_VALUES_NAME", myEntity.getProductsOptionsValuesName()); + + sb.delete(0, delimiter.length()).insert(0, mapMarkAndStartBrace).append(endBrace); + return sb.toString(); + } + + private void helpAppendingColumnValueString(StringBuffer sb, String delimiter, String equal, String colName, Object value) { + sb.append(delimiter).append(colName).append(equal); + sb.append(helpGettingColumnStringValue(value)); + } + + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @return Column-value map-string. (NotNull) + */ + public String extractCommonColumnValueMapString(Entity entity) { + return "map:{}"; + } + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @return Column-value map-string. (NotNull) + */ + public String extractCommonColumnValueMapString(Entity entity, String startBrace, String endBrace, String delimiter, String equal) { + return "map:" + startBrace + endBrace; + } + + + // ----------------------------------------------------- + // Convert + // ------- + public java.util.List convertToColumnValueList(Entity entity) { + return new java.util.ArrayList(convertToColumnValueMap(entity).values()); + } + + public java.util.Map convertToColumnValueMap(Entity entity) { + final ProductsOptionsValues myEntity = downcast(entity); + final java.util.Map valueMap = new java.util.LinkedHashMap(); + valueMap.put("PRODUCTS_OPTIONS_VALUES_ID", myEntity.getProductsOptionsValuesId()); + valueMap.put("LANGUAGE_ID", myEntity.getLanguageId()); + valueMap.put("PRODUCTS_OPTIONS_VALUES_NAME", myEntity.getProductsOptionsValuesName()); + return valueMap; + } + + public java.util.List convertToColumnStringValueList(Entity entity) { + return new java.util.ArrayList(convertToColumnStringValueMap(entity).values()); + } + + public java.util.Map convertToColumnStringValueMap(Entity entity) { + final ProductsOptionsValues myEntity = downcast(entity); + final java.util.Map valueMap = new java.util.LinkedHashMap(); + valueMap.put("PRODUCTS_OPTIONS_VALUES_ID", helpGettingColumnStringValue(myEntity.getProductsOptionsValuesId())); + valueMap.put("LANGUAGE_ID", helpGettingColumnStringValue(myEntity.getLanguageId())); + valueMap.put("PRODUCTS_OPTIONS_VALUES_NAME", helpGettingColumnStringValue(myEntity.getProductsOptionsValuesName())); + return valueMap; + } + + // =================================================================================== + // JDBC Support + // ============ + public String getPreparedInsertClause() { + return "insert into PRODUCTS_OPTIONS_VALUES(PRODUCTS_OPTIONS_VALUES_ID, LANGUAGE_ID, PRODUCTS_OPTIONS_VALUES_NAME) values(? , ? , ? )"; + } + + public String getPreparedInsertClause(String tablePrefix) { + return "insert into " + tablePrefix + "PRODUCTS_OPTIONS_VALUES(PRODUCTS_OPTIONS_VALUES_ID, LANGUAGE_ID, PRODUCTS_OPTIONS_VALUES_NAME) values(? , ? , ? )"; + } + + // =================================================================================== + // Helper + // ====== + protected ProductsOptionsValues downcast(Entity entity) { + assertObjectNotNull("entity", entity); + try { + return (ProductsOptionsValues)entity; + } catch (ClassCastException e) { + String msg = "The entity should be ProductsOptionsValues but it was: " + entity.getClass(); + throw new IllegalStateException(msg, e); + } + } + + protected void checkDowncast(Entity entity) { + downcast(entity); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/dbmeta/ProductsOptionsValuesToProductsOptionsDbm.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/dbmeta/ProductsOptionsValuesToProductsOptionsDbm.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/dbmeta/ProductsOptionsValuesToProductsOptionsDbm.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,672 @@ +package jp.sf.pal.pompei.bsentity.dbmeta; + + +import jp.sf.pal.pompei.allcommon.Entity; +import jp.sf.pal.pompei.allcommon.dbmeta.DBMeta; +import jp.sf.pal.pompei.allcommon.dbmeta.AbstractDBMeta; +import jp.sf.pal.pompei.exentity.ProductsOptionsValuesToProductsOptions; + +/** + * The dbmeta of PRODUCTS_OPTIONS_VALUES_TO_PRODUCTS_OPTIONS. (Singleton) + * + *
+ * [primary-key]
+ *     PRODUCTS_OPTIONS_VALUES_TO_PRODUCTS_OPTIONS_ID
+ * 
+ * [column-property]
+ *     PRODUCTS_OPTIONS_VALUES_TO_PRODUCTS_OPTIONS_ID, PRODUCTS_OPTIONS_ID, PRODUCTS_OPTIONS_VALUES_ID
+ * 
+ * [foreign-property]
+ *     
+ * 
+ * [refferer-property]
+ *     
+ * 
+ * [sequence]
+ *     
+ * 
+ * [identity]
+ *     
+ * 
+ * [update-date]
+ *     
+ * 
+ * [version-no]
+ *     
+ * 
+ * 
+ * + * @author DBFlute(AutoGenerator) + */ +public class ProductsOptionsValuesToProductsOptionsDbm extends AbstractDBMeta { + + // =================================================================================== + // Definition + // ========== + /** The type of entity. */ + protected static final Class ENTITY_TYPE = ProductsOptionsValuesToProductsOptions.class; + + /** Singleton instance. */ + private static final ProductsOptionsValuesToProductsOptionsDbm _instance = new ProductsOptionsValuesToProductsOptionsDbm(); + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + private ProductsOptionsValuesToProductsOptionsDbm() { + } + + // =================================================================================== + // Singleton + // ========= + /** + * Get instance. + * + * @return Singleton instance. (NotNull) + */ + public static ProductsOptionsValuesToProductsOptionsDbm getInstance() { + return _instance; + } + + // =================================================================================== + // Name Definition + // =============== + /** Table db name. */ + public static final String TABLE_DB_NAME = "PRODUCTS_OPTIONS_VALUES_TO_PRODUCTS_OPTIONS"; + + /** Table cap-prop name. */ + public static final String TABLE_CAP_PROP_NAME = "ProductsOptionsValuesToProductsOptions"; + + /** Table uncap-prop name. */ + public static final String TABLE_UNCAP_PROP_NAME = "productsOptionsValuesToProductsOptions"; + + /** Db-name of ProductsOptionsValuesToProductsOptionsId. */ + public static final String COLUMN_DB_NAME_OF_ProductsOptionsValuesToProductsOptionsId = "PRODUCTS_OPTIONS_VALUES_TO_PRODUCTS_OPTIONS_ID"; + /** Db-name of ProductsOptionsId. */ + public static final String COLUMN_DB_NAME_OF_ProductsOptionsId = "PRODUCTS_OPTIONS_ID"; + /** Db-name of ProductsOptionsValuesId. */ + public static final String COLUMN_DB_NAME_OF_ProductsOptionsValuesId = "PRODUCTS_OPTIONS_VALUES_ID"; + + /** Cap-prop-name of ProductsOptionsValuesToProductsOptionsId. */ + public static final String COLUMN_CAP_PROP_NAME_OF_ProductsOptionsValuesToProductsOptionsId = "ProductsOptionsValuesToProductsOptionsId"; + /** Cap-prop-name of ProductsOptionsId. */ + public static final String COLUMN_CAP_PROP_NAME_OF_ProductsOptionsId = "ProductsOptionsId"; + /** Cap-prop-name of ProductsOptionsValuesId. */ + public static final String COLUMN_CAP_PROP_NAME_OF_ProductsOptionsValuesId = "ProductsOptionsValuesId"; + + + + /** Uncap-prop-name of ProductsOptionsValuesToProductsOptionsId. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_ProductsOptionsValuesToProductsOptionsId = "productsOptionsValuesToProductsOptionsId"; + /** Uncap-prop-name of ProductsOptionsId. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_ProductsOptionsId = "productsOptionsId"; + /** Uncap-prop-name of ProductsOptionsValuesId. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_ProductsOptionsValuesId = "productsOptionsValuesId"; + + + + /** {db-name : cap-prop-name} map. */ + private static java.util.Map _dbNameCapPropNameMap; + protected static java.util.Map createDbNameCapPropNameMap() { + if (_dbNameCapPropNameMap != null) { + return _dbNameCapPropNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_DB_NAME, TABLE_CAP_PROP_NAME); + + map.put(COLUMN_DB_NAME_OF_ProductsOptionsValuesToProductsOptionsId, COLUMN_CAP_PROP_NAME_OF_ProductsOptionsValuesToProductsOptionsId); + map.put(COLUMN_DB_NAME_OF_ProductsOptionsId, COLUMN_CAP_PROP_NAME_OF_ProductsOptionsId); + map.put(COLUMN_DB_NAME_OF_ProductsOptionsValuesId, COLUMN_CAP_PROP_NAME_OF_ProductsOptionsValuesId); + + _dbNameCapPropNameMap = java.util.Collections.unmodifiableMap(map); + return _dbNameCapPropNameMap; + } + + /** {db-name : uncap-prop-name} map. */ + private static java.util.Map _dbNameUncapPropNameMap; + protected static java.util.Map createDbNameUncapPropNameMap() { + if (_dbNameUncapPropNameMap != null) { + return _dbNameUncapPropNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_DB_NAME, TABLE_UNCAP_PROP_NAME); + + map.put(COLUMN_DB_NAME_OF_ProductsOptionsValuesToProductsOptionsId, COLUMN_UNCAP_PROP_NAME_OF_ProductsOptionsValuesToProductsOptionsId); + map.put(COLUMN_DB_NAME_OF_ProductsOptionsId, COLUMN_UNCAP_PROP_NAME_OF_ProductsOptionsId); + map.put(COLUMN_DB_NAME_OF_ProductsOptionsValuesId, COLUMN_UNCAP_PROP_NAME_OF_ProductsOptionsValuesId); + + _dbNameUncapPropNameMap = java.util.Collections.unmodifiableMap(map); + return _dbNameUncapPropNameMap; + } + + /** {cap-prop-name : db-name} map. */ + private static java.util.Map _capPropNameDbNameMap; + protected static java.util.Map createCapPropNameDbNameMap() { + if (_capPropNameDbNameMap != null) { + return _capPropNameDbNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_CAP_PROP_NAME, TABLE_DB_NAME); + + map.put(COLUMN_CAP_PROP_NAME_OF_ProductsOptionsValuesToProductsOptionsId, COLUMN_DB_NAME_OF_ProductsOptionsValuesToProductsOptionsId); + map.put(COLUMN_CAP_PROP_NAME_OF_ProductsOptionsId, COLUMN_DB_NAME_OF_ProductsOptionsId); + map.put(COLUMN_CAP_PROP_NAME_OF_ProductsOptionsValuesId, COLUMN_DB_NAME_OF_ProductsOptionsValuesId); + + _capPropNameDbNameMap = java.util.Collections.unmodifiableMap(map); + return _capPropNameDbNameMap; + } + + /** {cap-prop-name : uncap-prop-name} map. */ + private static java.util.Map _capPropNameUncapPropNameMap; + protected static java.util.Map createCapPropNameUncapPropNameMap() { + if (_capPropNameUncapPropNameMap != null) { + return _capPropNameUncapPropNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_CAP_PROP_NAME, TABLE_UNCAP_PROP_NAME); + + map.put(COLUMN_CAP_PROP_NAME_OF_ProductsOptionsValuesToProductsOptionsId, COLUMN_UNCAP_PROP_NAME_OF_ProductsOptionsValuesToProductsOptionsId); + map.put(COLUMN_CAP_PROP_NAME_OF_ProductsOptionsId, COLUMN_UNCAP_PROP_NAME_OF_ProductsOptionsId); + map.put(COLUMN_CAP_PROP_NAME_OF_ProductsOptionsValuesId, COLUMN_UNCAP_PROP_NAME_OF_ProductsOptionsValuesId); + + _capPropNameUncapPropNameMap = java.util.Collections.unmodifiableMap(map); + return _capPropNameUncapPropNameMap; + } + + /** {uncap-prop-name : db-name} map. */ + private static java.util.Map _uncapPropNameDbNameMap; + protected static java.util.Map createUncapPropNameDbNameMap() { + if (_uncapPropNameDbNameMap != null) { + return _uncapPropNameDbNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_UNCAP_PROP_NAME, TABLE_DB_NAME); + + map.put(COLUMN_UNCAP_PROP_NAME_OF_ProductsOptionsValuesToProductsOptionsId, COLUMN_DB_NAME_OF_ProductsOptionsValuesToProductsOptionsId); + map.put(COLUMN_UNCAP_PROP_NAME_OF_ProductsOptionsId, COLUMN_DB_NAME_OF_ProductsOptionsId); + map.put(COLUMN_UNCAP_PROP_NAME_OF_ProductsOptionsValuesId, COLUMN_DB_NAME_OF_ProductsOptionsValuesId); + + _uncapPropNameDbNameMap = java.util.Collections.unmodifiableMap(map); + return _uncapPropNameDbNameMap; + } + + /** {uncap-prop-name : cap-prop-name} map. */ + private static java.util.Map _uncapPropNameCapPropNameMap; + protected static java.util.Map createUncapPropNameCapPropNameMap() { + if (_uncapPropNameCapPropNameMap != null) { + return _uncapPropNameCapPropNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_UNCAP_PROP_NAME, TABLE_CAP_PROP_NAME); + + map.put(COLUMN_UNCAP_PROP_NAME_OF_ProductsOptionsValuesToProductsOptionsId, COLUMN_CAP_PROP_NAME_OF_ProductsOptionsValuesToProductsOptionsId); + map.put(COLUMN_UNCAP_PROP_NAME_OF_ProductsOptionsId, COLUMN_CAP_PROP_NAME_OF_ProductsOptionsId); + map.put(COLUMN_UNCAP_PROP_NAME_OF_ProductsOptionsValuesId, COLUMN_CAP_PROP_NAME_OF_ProductsOptionsValuesId); + + _uncapPropNameCapPropNameMap = java.util.Collections.unmodifiableMap(map); + return _uncapPropNameCapPropNameMap; + } + + // =================================================================================== + // Name-Map + // ======== + /** + * This method implements the method that is declared at super. + * + * @return {db-name : cap-prop-name} map. + */ + public java.util.Map getDbNameCapPropNameMap() { + return createDbNameCapPropNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {db-name : uncap-prop-name} map. + */ + public java.util.Map getDbNameUncapPropNameMap() { + return createDbNameUncapPropNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {cap-prop-name : db-name} map. + */ + public java.util.Map getCapPropNameDbNameMap() { + return createCapPropNameDbNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {cap-prop-name : uncap-prop-name} map. + */ + public java.util.Map getCapPropNameUncapPropNameMap() { + return createCapPropNameUncapPropNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {uncap-prop-name : db-name} map. + */ + public java.util.Map getUncapPropNameDbNameMap() { + return createUncapPropNameDbNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {uncap-prop-name : cap-prop-name} map. + */ + public java.util.Map getUncapPropNameCapPropNameMap() { + return createUncapPropNameCapPropNameMap(); + } + + // =================================================================================== + // Table Name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + public String getTableDbName() { + return TABLE_DB_NAME; + } + + /** + * This method implements the method that is declared at super. + * + * @return Table cap-prop-name. (NotNull) + */ + public String getTableCapPropName() { + return TABLE_CAP_PROP_NAME; + } + + /** + * This method implements the method that is declared at super. + * + * @return Table property-name. (NotNull) + */ + public String getTableUncapPropName() { + return TABLE_UNCAP_PROP_NAME; + } + + // =================================================================================== + // Column Name + // =========== + public java.util.List getColumnDbNameList() { + final String[] columns = getColumnDbNameCommaString().split(","); + final java.util.List resultList = new java.util.ArrayList(); + for (int i=0; i < columns.length; i++) { + resultList.add(columns[i].trim()); + } + return resultList; + } + + public java.util.List getColumnCapPropNameList() { + final java.util.List columnDbNameList = getColumnDbNameList(); + final java.util.List resultList = new java.util.ArrayList(); + for (final java.util.Iterator ite = columnDbNameList.iterator(); ite.hasNext(); ) { + resultList.add(getDbNameCapPropNameMap().get((String)ite.next())); + } + return resultList; + } + + public java.util.List getColumnUncapPropNameList() { + final java.util.List columnDbNameList = getColumnDbNameList(); + final java.util.List resultList = new java.util.ArrayList(); + for (final java.util.Iterator ite = columnDbNameList.iterator(); ite.hasNext(); ) { + resultList.add(getDbNameUncapPropNameMap().get((String)ite.next())); + } + return resultList; + } + + /** + * This method implements the method that is declared at super. + * + * @return Column-db-name comma-string. (NotNull) + */ + public String getColumnDbNameCommaString() { + return "PRODUCTS_OPTIONS_VALUES_TO_PRODUCTS_OPTIONS_ID, PRODUCTS_OPTIONS_ID, PRODUCTS_OPTIONS_VALUES_ID"; + } + + // =================================================================================== + // Type Name + // ========= + /** + * This method implements the method that is declared at super. + * + * @return The type-name of entity. (NotNull) + */ + public String getEntityTypeName() { + return "jp.sf.pal.pompei.exentity.ProductsOptionsValuesToProductsOptions"; + } + + /** + * This method implements the method that is declared at super. + * + * @return The type-name of condition-bean. (NotNull) + */ + public String getConditionBeanTypeName() { + return "jp.sf.pal.pompei.cbean.bs.ProductsOptionsValuesToProductsOptionsCB"; + } + + /** + * This method implements the method that is declared at super. + * + * @return The type-name of dao. (NotNull) + */ + public String getDaoTypeName() { + return "jp.sf.pal.pompei.exdao.ProductsOptionsValuesToProductsOptionsDao"; + } + + /** + * This method implements the method that is declared at super. + * + * @return The type-name of behavior. (NotNull) + */ + public String getBehaviorTypeName() { + return "jp.sf.pal.pompei.exbhv.ProductsOptionsValuesToProductsOptionsBhv"; + } + + // =================================================================================== + // Type + // ==== + /** + * This method implements the method that is declared at super. + * + * @return The type of entity. (NotNull) + */ + public Class getEntityType() { + return ENTITY_TYPE; + } + + // =================================================================================== + // Instance + // ======== + /** + * This method implements the method that is declared at super. + * + * @return The type of entity. (NotNull) + */ + public Entity newEntity() { + return newMyEntity(); + } + + /** + * New the instance of my entity. + * + * @return The instance of my entity. (NotNull) + */ + public ProductsOptionsValuesToProductsOptions newMyEntity() { + return new ProductsOptionsValuesToProductsOptions(); + } + + // =================================================================================== + // Foreign DBMeta + // ============== + /** + * This method implements the method that is declared at super. + * + * @param foreignPropertyName Foreign-property-name(Both OK - InitCap or not). (NotNull) + * @return Foreign DBMeta. (NotNull) + */ + public DBMeta getForeignDBMeta(String foreignPropertyName) { + assertStringNotNullAndNotTrimmedEmpty("foreignPropertyName", foreignPropertyName); + final String methodName = "getForeignDBMeta_" + foreignPropertyName.substring(0, 1) + foreignPropertyName.substring(1); + + java.lang.reflect.Method method = null; + try { + method = this.getClass().getMethod(methodName, new Class[]{}); + } catch (NoSuchMethodException e) { + String msg = "The foreignPropertyName is not found: foreignPropertyName=" + foreignPropertyName; + msg = msg + " tableName=" + TABLE_DB_NAME + " methodName=" + methodName; + throw new RuntimeException(msg, e); + } + try { + return (DBMeta)method.invoke(this, new Object[]{}); + } catch (IllegalAccessException e) { + throw new RuntimeException(e); + } catch (java.lang.reflect.InvocationTargetException e) { + throw new RuntimeException(e.getCause()); + } + } + + // =================================================================================== + // Determination + // ============= + /** + * This method implements the method that is declared at super. + * + * @return Determination. + */ + public boolean hasTwoOrMorePrimaryKeys() { + return false; + } + + /** + * This method implements the method that is declared at super. + * + * @return Determination. + */ + public boolean hasCommonColumn() { + return false; + } + + // =================================================================================== + // Entity Handling + // =============== + // ----------------------------------------------------- + // Accept + // ------ + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @param primaryKeyMap Primary key map. (NotNull and NotEmpty) + */ + public void acceptPrimaryKeyMap(Entity entity, java.util.Map primaryKeyMap) { + final ProductsOptionsValuesToProductsOptions myEntity = (ProductsOptionsValuesToProductsOptions)entity; + MapAssertUtil.assertPrimaryKeyMapNotNullAndNotEmpty(primaryKeyMap); + final MapStringValueAnalyzer analyzer = new MapStringValueAnalyzer(primaryKeyMap, entity.getModifiedPropertyNames()); + + MapAssertUtil.assertColumnExistingInPrimaryKeyMap(primaryKeyMap, "PRODUCTS_OPTIONS_VALUES_TO_PRODUCTS_OPTIONS_ID"); + if (analyzer.init("PRODUCTS_OPTIONS_VALUES_TO_PRODUCTS_OPTIONS_ID", "productsOptionsValuesToProductsOptionsId", "productsOptionsValuesToProductsOptionsId")) { myEntity.setProductsOptionsValuesToProductsOptionsId(analyzer.analyzeNumber(java.math.BigDecimal.class)); }; + + + } + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @param primaryKeyMapString Primary-key map-string. (NotNull and NotEmpty) + */ + public void acceptPrimaryKeyMapString(Entity entity, String primaryKeyMapString) { + MapStringUtil.acceptPrimaryKeyMapString(primaryKeyMapString, entity); + } + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @param columnValueMap Column-value map. (NotNull and NotEmpty) + */ + public void acceptColumnValueMap(Entity entity, java.util.Map columnValueMap) { + final ProductsOptionsValuesToProductsOptions myEntity = (ProductsOptionsValuesToProductsOptions)entity; + MapAssertUtil.assertColumnValueMapNotNullAndNotEmpty(columnValueMap); + final MapStringValueAnalyzer analyzer = new MapStringValueAnalyzer(columnValueMap, entity.getModifiedPropertyNames()); + + if (analyzer.init("PRODUCTS_OPTIONS_VALUES_TO_PRODUCTS_OPTIONS_ID", "productsOptionsValuesToProductsOptionsId", "productsOptionsValuesToProductsOptionsId")) { myEntity.setProductsOptionsValuesToProductsOptionsId(analyzer.analyzeNumber(java.math.BigDecimal.class)); }; + if (analyzer.init("PRODUCTS_OPTIONS_ID", "productsOptionsId", "productsOptionsId")) { myEntity.setProductsOptionsId(analyzer.analyzeNumber(java.math.BigDecimal.class)); }; + if (analyzer.init("PRODUCTS_OPTIONS_VALUES_ID", "productsOptionsValuesId", "productsOptionsValuesId")) { myEntity.setProductsOptionsValuesId(analyzer.analyzeNumber(java.math.BigDecimal.class)); }; + + } + + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @param columnValueMapString Column-value map-string. (NotNull and NotEmpty) + */ + public void acceptColumnValueMapString(Entity entity, String columnValueMapString) { + MapStringUtil.acceptColumnValueMapString(columnValueMapString, entity); + } + + + // ----------------------------------------------------- + // Extract + // ------- + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @return Primary-key map-string. (NotNull) + */ + public String extractPrimaryKeyMapString(Entity entity) { + return MapStringUtil.extractPrimaryKeyMapString(entity); + } + + /** + * Extract primary-key map-string. + * + * @param entity Target entity. (NotNull) + * @param startBrace Start-brace. (NotNull) + * @param endBrace End-brace. (NotNull) + * @param delimiter Delimiter. (NotNull) + * @param equal Equal. (NotNull) + * @return Primary-key map-string. (NotNull) + */ + public String extractPrimaryKeyMapString(Entity entity, String startBrace, String endBrace, String delimiter, String equal) { + final ProductsOptionsValuesToProductsOptions myEntity = (ProductsOptionsValuesToProductsOptions)entity; + final String mapMarkAndStartBrace = MAP_STRING_MAP_MARK + startBrace; + final StringBuffer sb = new StringBuffer(); + helpAppendingColumnValueString(sb, delimiter, equal, "PRODUCTS_OPTIONS_VALUES_TO_PRODUCTS_OPTIONS_ID", myEntity.getProductsOptionsValuesToProductsOptionsId()); + + sb.delete(0, delimiter.length()).insert(0, mapMarkAndStartBrace).append(endBrace); + return sb.toString(); + + } + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @return Column-value map-string. (NotNull) + */ + public String extractColumnValueMapString(Entity entity) { + return MapStringUtil.extractColumnValueMapString(entity); + } + + /** + * Extract column-value map-string. + * + * @param entity Target entity. (NotNull) + * @param startBrace Start-brace. (NotNull) + * @param endBrace End-brace. (NotNull) + * @param delimiter Delimiter. (NotNull) + * @param equal Equal. (NotNull) + * @return Column-value map-string. (NotNull) + */ + public String extractColumnValueMapString(Entity entity, String startBrace, String endBrace, String delimiter, String equal) { + final ProductsOptionsValuesToProductsOptions myEntity = (ProductsOptionsValuesToProductsOptions)entity; + final String mapMarkAndStartBrace = MAP_STRING_MAP_MARK + startBrace; + final StringBuffer sb = new StringBuffer(); + helpAppendingColumnValueString(sb, delimiter, equal, "PRODUCTS_OPTIONS_VALUES_TO_PRODUCTS_OPTIONS_ID", myEntity.getProductsOptionsValuesToProductsOptionsId()); + helpAppendingColumnValueString(sb, delimiter, equal, "PRODUCTS_OPTIONS_ID", myEntity.getProductsOptionsId()); + helpAppendingColumnValueString(sb, delimiter, equal, "PRODUCTS_OPTIONS_VALUES_ID", myEntity.getProductsOptionsValuesId()); + + sb.delete(0, delimiter.length()).insert(0, mapMarkAndStartBrace).append(endBrace); + return sb.toString(); + } + + private void helpAppendingColumnValueString(StringBuffer sb, String delimiter, String equal, String colName, Object value) { + sb.append(delimiter).append(colName).append(equal); + sb.append(helpGettingColumnStringValue(value)); + } + + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @return Column-value map-string. (NotNull) + */ + public String extractCommonColumnValueMapString(Entity entity) { + return "map:{}"; + } + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @return Column-value map-string. (NotNull) + */ + public String extractCommonColumnValueMapString(Entity entity, String startBrace, String endBrace, String delimiter, String equal) { + return "map:" + startBrace + endBrace; + } + + + // ----------------------------------------------------- + // Convert + // ------- + public java.util.List convertToColumnValueList(Entity entity) { + return new java.util.ArrayList(convertToColumnValueMap(entity).values()); + } + + public java.util.Map convertToColumnValueMap(Entity entity) { + final ProductsOptionsValuesToProductsOptions myEntity = downcast(entity); + final java.util.Map valueMap = new java.util.LinkedHashMap(); + valueMap.put("PRODUCTS_OPTIONS_VALUES_TO_PRODUCTS_OPTIONS_ID", myEntity.getProductsOptionsValuesToProductsOptionsId()); + valueMap.put("PRODUCTS_OPTIONS_ID", myEntity.getProductsOptionsId()); + valueMap.put("PRODUCTS_OPTIONS_VALUES_ID", myEntity.getProductsOptionsValuesId()); + return valueMap; + } + + public java.util.List convertToColumnStringValueList(Entity entity) { + return new java.util.ArrayList(convertToColumnStringValueMap(entity).values()); + } + + public java.util.Map convertToColumnStringValueMap(Entity entity) { + final ProductsOptionsValuesToProductsOptions myEntity = downcast(entity); + final java.util.Map valueMap = new java.util.LinkedHashMap(); + valueMap.put("PRODUCTS_OPTIONS_VALUES_TO_PRODUCTS_OPTIONS_ID", helpGettingColumnStringValue(myEntity.getProductsOptionsValuesToProductsOptionsId())); + valueMap.put("PRODUCTS_OPTIONS_ID", helpGettingColumnStringValue(myEntity.getProductsOptionsId())); + valueMap.put("PRODUCTS_OPTIONS_VALUES_ID", helpGettingColumnStringValue(myEntity.getProductsOptionsValuesId())); + return valueMap; + } + + // =================================================================================== + // JDBC Support + // ============ + public String getPreparedInsertClause() { + return "insert into PRODUCTS_OPTIONS_VALUES_TO_PRODUCTS_OPTIONS(PRODUCTS_OPTIONS_VALUES_TO_PRODUCTS_OPTIONS_ID, PRODUCTS_OPTIONS_ID, PRODUCTS_OPTIONS_VALUES_ID) values(? , ? , ? )"; + } + + public String getPreparedInsertClause(String tablePrefix) { + return "insert into " + tablePrefix + "PRODUCTS_OPTIONS_VALUES_TO_PRODUCTS_OPTIONS(PRODUCTS_OPTIONS_VALUES_TO_PRODUCTS_OPTIONS_ID, PRODUCTS_OPTIONS_ID, PRODUCTS_OPTIONS_VALUES_ID) values(? , ? , ? )"; + } + + // =================================================================================== + // Helper + // ====== + protected ProductsOptionsValuesToProductsOptions downcast(Entity entity) { + assertObjectNotNull("entity", entity); + try { + return (ProductsOptionsValuesToProductsOptions)entity; + } catch (ClassCastException e) { + String msg = "The entity should be ProductsOptionsValuesToProductsOptions but it was: " + entity.getClass(); + throw new IllegalStateException(msg, e); + } + } + + protected void checkDowncast(Entity entity) { + downcast(entity); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/dbmeta/ProductsToCategoriesDbm.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/dbmeta/ProductsToCategoriesDbm.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/dbmeta/ProductsToCategoriesDbm.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,659 @@ +package jp.sf.pal.pompei.bsentity.dbmeta; + + +import jp.sf.pal.pompei.allcommon.Entity; +import jp.sf.pal.pompei.allcommon.dbmeta.DBMeta; +import jp.sf.pal.pompei.allcommon.dbmeta.AbstractDBMeta; +import jp.sf.pal.pompei.exentity.ProductsToCategories; + +/** + * The dbmeta of PRODUCTS_TO_CATEGORIES. (Singleton) + * + *
+ * [primary-key]
+ *     PRODUCTS_ID, CATEGORIES_ID
+ * 
+ * [column-property]
+ *     PRODUCTS_ID, CATEGORIES_ID
+ * 
+ * [foreign-property]
+ *     
+ * 
+ * [refferer-property]
+ *     
+ * 
+ * [sequence]
+ *     
+ * 
+ * [identity]
+ *     
+ * 
+ * [update-date]
+ *     
+ * 
+ * [version-no]
+ *     
+ * 
+ * 
+ * + * @author DBFlute(AutoGenerator) + */ +public class ProductsToCategoriesDbm extends AbstractDBMeta { + + // =================================================================================== + // Definition + // ========== + /** The type of entity. */ + protected static final Class ENTITY_TYPE = ProductsToCategories.class; + + /** Singleton instance. */ + private static final ProductsToCategoriesDbm _instance = new ProductsToCategoriesDbm(); + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + private ProductsToCategoriesDbm() { + } + + // =================================================================================== + // Singleton + // ========= + /** + * Get instance. + * + * @return Singleton instance. (NotNull) + */ + public static ProductsToCategoriesDbm getInstance() { + return _instance; + } + + // =================================================================================== + // Name Definition + // =============== + /** Table db name. */ + public static final String TABLE_DB_NAME = "PRODUCTS_TO_CATEGORIES"; + + /** Table cap-prop name. */ + public static final String TABLE_CAP_PROP_NAME = "ProductsToCategories"; + + /** Table uncap-prop name. */ + public static final String TABLE_UNCAP_PROP_NAME = "productsToCategories"; + + /** Db-name of ProductsId. */ + public static final String COLUMN_DB_NAME_OF_ProductsId = "PRODUCTS_ID"; + /** Db-name of CategoriesId. */ + public static final String COLUMN_DB_NAME_OF_CategoriesId = "CATEGORIES_ID"; + + /** Cap-prop-name of ProductsId. */ + public static final String COLUMN_CAP_PROP_NAME_OF_ProductsId = "ProductsId"; + /** Cap-prop-name of CategoriesId. */ + public static final String COLUMN_CAP_PROP_NAME_OF_CategoriesId = "CategoriesId"; + + + + /** Uncap-prop-name of ProductsId. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_ProductsId = "productsId"; + /** Uncap-prop-name of CategoriesId. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_CategoriesId = "categoriesId"; + + + + /** {db-name : cap-prop-name} map. */ + private static java.util.Map _dbNameCapPropNameMap; + protected static java.util.Map createDbNameCapPropNameMap() { + if (_dbNameCapPropNameMap != null) { + return _dbNameCapPropNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_DB_NAME, TABLE_CAP_PROP_NAME); + + map.put(COLUMN_DB_NAME_OF_ProductsId, COLUMN_CAP_PROP_NAME_OF_ProductsId); + map.put(COLUMN_DB_NAME_OF_CategoriesId, COLUMN_CAP_PROP_NAME_OF_CategoriesId); + + _dbNameCapPropNameMap = java.util.Collections.unmodifiableMap(map); + return _dbNameCapPropNameMap; + } + + /** {db-name : uncap-prop-name} map. */ + private static java.util.Map _dbNameUncapPropNameMap; + protected static java.util.Map createDbNameUncapPropNameMap() { + if (_dbNameUncapPropNameMap != null) { + return _dbNameUncapPropNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_DB_NAME, TABLE_UNCAP_PROP_NAME); + + map.put(COLUMN_DB_NAME_OF_ProductsId, COLUMN_UNCAP_PROP_NAME_OF_ProductsId); + map.put(COLUMN_DB_NAME_OF_CategoriesId, COLUMN_UNCAP_PROP_NAME_OF_CategoriesId); + + _dbNameUncapPropNameMap = java.util.Collections.unmodifiableMap(map); + return _dbNameUncapPropNameMap; + } + + /** {cap-prop-name : db-name} map. */ + private static java.util.Map _capPropNameDbNameMap; + protected static java.util.Map createCapPropNameDbNameMap() { + if (_capPropNameDbNameMap != null) { + return _capPropNameDbNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_CAP_PROP_NAME, TABLE_DB_NAME); + + map.put(COLUMN_CAP_PROP_NAME_OF_ProductsId, COLUMN_DB_NAME_OF_ProductsId); + map.put(COLUMN_CAP_PROP_NAME_OF_CategoriesId, COLUMN_DB_NAME_OF_CategoriesId); + + _capPropNameDbNameMap = java.util.Collections.unmodifiableMap(map); + return _capPropNameDbNameMap; + } + + /** {cap-prop-name : uncap-prop-name} map. */ + private static java.util.Map _capPropNameUncapPropNameMap; + protected static java.util.Map createCapPropNameUncapPropNameMap() { + if (_capPropNameUncapPropNameMap != null) { + return _capPropNameUncapPropNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_CAP_PROP_NAME, TABLE_UNCAP_PROP_NAME); + + map.put(COLUMN_CAP_PROP_NAME_OF_ProductsId, COLUMN_UNCAP_PROP_NAME_OF_ProductsId); + map.put(COLUMN_CAP_PROP_NAME_OF_CategoriesId, COLUMN_UNCAP_PROP_NAME_OF_CategoriesId); + + _capPropNameUncapPropNameMap = java.util.Collections.unmodifiableMap(map); + return _capPropNameUncapPropNameMap; + } + + /** {uncap-prop-name : db-name} map. */ + private static java.util.Map _uncapPropNameDbNameMap; + protected static java.util.Map createUncapPropNameDbNameMap() { + if (_uncapPropNameDbNameMap != null) { + return _uncapPropNameDbNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_UNCAP_PROP_NAME, TABLE_DB_NAME); + + map.put(COLUMN_UNCAP_PROP_NAME_OF_ProductsId, COLUMN_DB_NAME_OF_ProductsId); + map.put(COLUMN_UNCAP_PROP_NAME_OF_CategoriesId, COLUMN_DB_NAME_OF_CategoriesId); + + _uncapPropNameDbNameMap = java.util.Collections.unmodifiableMap(map); + return _uncapPropNameDbNameMap; + } + + /** {uncap-prop-name : cap-prop-name} map. */ + private static java.util.Map _uncapPropNameCapPropNameMap; + protected static java.util.Map createUncapPropNameCapPropNameMap() { + if (_uncapPropNameCapPropNameMap != null) { + return _uncapPropNameCapPropNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_UNCAP_PROP_NAME, TABLE_CAP_PROP_NAME); + + map.put(COLUMN_UNCAP_PROP_NAME_OF_ProductsId, COLUMN_CAP_PROP_NAME_OF_ProductsId); + map.put(COLUMN_UNCAP_PROP_NAME_OF_CategoriesId, COLUMN_CAP_PROP_NAME_OF_CategoriesId); + + _uncapPropNameCapPropNameMap = java.util.Collections.unmodifiableMap(map); + return _uncapPropNameCapPropNameMap; + } + + // =================================================================================== + // Name-Map + // ======== + /** + * This method implements the method that is declared at super. + * + * @return {db-name : cap-prop-name} map. + */ + public java.util.Map getDbNameCapPropNameMap() { + return createDbNameCapPropNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {db-name : uncap-prop-name} map. + */ + public java.util.Map getDbNameUncapPropNameMap() { + return createDbNameUncapPropNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {cap-prop-name : db-name} map. + */ + public java.util.Map getCapPropNameDbNameMap() { + return createCapPropNameDbNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {cap-prop-name : uncap-prop-name} map. + */ + public java.util.Map getCapPropNameUncapPropNameMap() { + return createCapPropNameUncapPropNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {uncap-prop-name : db-name} map. + */ + public java.util.Map getUncapPropNameDbNameMap() { + return createUncapPropNameDbNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {uncap-prop-name : cap-prop-name} map. + */ + public java.util.Map getUncapPropNameCapPropNameMap() { + return createUncapPropNameCapPropNameMap(); + } + + // =================================================================================== + // Table Name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + public String getTableDbName() { + return TABLE_DB_NAME; + } + + /** + * This method implements the method that is declared at super. + * + * @return Table cap-prop-name. (NotNull) + */ + public String getTableCapPropName() { + return TABLE_CAP_PROP_NAME; + } + + /** + * This method implements the method that is declared at super. + * + * @return Table property-name. (NotNull) + */ + public String getTableUncapPropName() { + return TABLE_UNCAP_PROP_NAME; + } + + // =================================================================================== + // Column Name + // =========== + public java.util.List getColumnDbNameList() { + final String[] columns = getColumnDbNameCommaString().split(","); + final java.util.List resultList = new java.util.ArrayList(); + for (int i=0; i < columns.length; i++) { + resultList.add(columns[i].trim()); + } + return resultList; + } + + public java.util.List getColumnCapPropNameList() { + final java.util.List columnDbNameList = getColumnDbNameList(); + final java.util.List resultList = new java.util.ArrayList(); + for (final java.util.Iterator ite = columnDbNameList.iterator(); ite.hasNext(); ) { + resultList.add(getDbNameCapPropNameMap().get((String)ite.next())); + } + return resultList; + } + + public java.util.List getColumnUncapPropNameList() { + final java.util.List columnDbNameList = getColumnDbNameList(); + final java.util.List resultList = new java.util.ArrayList(); + for (final java.util.Iterator ite = columnDbNameList.iterator(); ite.hasNext(); ) { + resultList.add(getDbNameUncapPropNameMap().get((String)ite.next())); + } + return resultList; + } + + /** + * This method implements the method that is declared at super. + * + * @return Column-db-name comma-string. (NotNull) + */ + public String getColumnDbNameCommaString() { + return "PRODUCTS_ID, CATEGORIES_ID"; + } + + // =================================================================================== + // Type Name + // ========= + /** + * This method implements the method that is declared at super. + * + * @return The type-name of entity. (NotNull) + */ + public String getEntityTypeName() { + return "jp.sf.pal.pompei.exentity.ProductsToCategories"; + } + + /** + * This method implements the method that is declared at super. + * + * @return The type-name of condition-bean. (NotNull) + */ + public String getConditionBeanTypeName() { + return "jp.sf.pal.pompei.cbean.bs.ProductsToCategoriesCB"; + } + + /** + * This method implements the method that is declared at super. + * + * @return The type-name of dao. (NotNull) + */ + public String getDaoTypeName() { + return "jp.sf.pal.pompei.exdao.ProductsToCategoriesDao"; + } + + /** + * This method implements the method that is declared at super. + * + * @return The type-name of behavior. (NotNull) + */ + public String getBehaviorTypeName() { + return "jp.sf.pal.pompei.exbhv.ProductsToCategoriesBhv"; + } + + // =================================================================================== + // Type + // ==== + /** + * This method implements the method that is declared at super. + * + * @return The type of entity. (NotNull) + */ + public Class getEntityType() { + return ENTITY_TYPE; + } + + // =================================================================================== + // Instance + // ======== + /** + * This method implements the method that is declared at super. + * + * @return The type of entity. (NotNull) + */ + public Entity newEntity() { + return newMyEntity(); + } + + /** + * New the instance of my entity. + * + * @return The instance of my entity. (NotNull) + */ + public ProductsToCategories newMyEntity() { + return new ProductsToCategories(); + } + + // =================================================================================== + // Foreign DBMeta + // ============== + /** + * This method implements the method that is declared at super. + * + * @param foreignPropertyName Foreign-property-name(Both OK - InitCap or not). (NotNull) + * @return Foreign DBMeta. (NotNull) + */ + public DBMeta getForeignDBMeta(String foreignPropertyName) { + assertStringNotNullAndNotTrimmedEmpty("foreignPropertyName", foreignPropertyName); + final String methodName = "getForeignDBMeta_" + foreignPropertyName.substring(0, 1) + foreignPropertyName.substring(1); + + java.lang.reflect.Method method = null; + try { + method = this.getClass().getMethod(methodName, new Class[]{}); + } catch (NoSuchMethodException e) { + String msg = "The foreignPropertyName is not found: foreignPropertyName=" + foreignPropertyName; + msg = msg + " tableName=" + TABLE_DB_NAME + " methodName=" + methodName; + throw new RuntimeException(msg, e); + } + try { + return (DBMeta)method.invoke(this, new Object[]{}); + } catch (IllegalAccessException e) { + throw new RuntimeException(e); + } catch (java.lang.reflect.InvocationTargetException e) { + throw new RuntimeException(e.getCause()); + } + } + + // =================================================================================== + // Determination + // ============= + /** + * This method implements the method that is declared at super. + * + * @return Determination. + */ + public boolean hasTwoOrMorePrimaryKeys() { + return true; + } + + /** + * This method implements the method that is declared at super. + * + * @return Determination. + */ + public boolean hasCommonColumn() { + return false; + } + + // =================================================================================== + // Entity Handling + // =============== + // ----------------------------------------------------- + // Accept + // ------ + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @param primaryKeyMap Primary key map. (NotNull and NotEmpty) + */ + public void acceptPrimaryKeyMap(Entity entity, java.util.Map primaryKeyMap) { + final ProductsToCategories myEntity = (ProductsToCategories)entity; + MapAssertUtil.assertPrimaryKeyMapNotNullAndNotEmpty(primaryKeyMap); + final MapStringValueAnalyzer analyzer = new MapStringValueAnalyzer(primaryKeyMap, entity.getModifiedPropertyNames()); + + MapAssertUtil.assertColumnExistingInPrimaryKeyMap(primaryKeyMap, "PRODUCTS_ID"); + if (analyzer.init("PRODUCTS_ID", "productsId", "productsId")) { myEntity.setProductsId(analyzer.analyzeNumber(java.math.BigDecimal.class)); }; + MapAssertUtil.assertColumnExistingInPrimaryKeyMap(primaryKeyMap, "CATEGORIES_ID"); + if (analyzer.init("CATEGORIES_ID", "categoriesId", "categoriesId")) { myEntity.setCategoriesId(analyzer.analyzeNumber(java.math.BigDecimal.class)); }; + + + } + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @param primaryKeyMapString Primary-key map-string. (NotNull and NotEmpty) + */ + public void acceptPrimaryKeyMapString(Entity entity, String primaryKeyMapString) { + MapStringUtil.acceptPrimaryKeyMapString(primaryKeyMapString, entity); + } + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @param columnValueMap Column-value map. (NotNull and NotEmpty) + */ + public void acceptColumnValueMap(Entity entity, java.util.Map columnValueMap) { + final ProductsToCategories myEntity = (ProductsToCategories)entity; + MapAssertUtil.assertColumnValueMapNotNullAndNotEmpty(columnValueMap); + final MapStringValueAnalyzer analyzer = new MapStringValueAnalyzer(columnValueMap, entity.getModifiedPropertyNames()); + + if (analyzer.init("PRODUCTS_ID", "productsId", "productsId")) { myEntity.setProductsId(analyzer.analyzeNumber(java.math.BigDecimal.class)); }; + if (analyzer.init("CATEGORIES_ID", "categoriesId", "categoriesId")) { myEntity.setCategoriesId(analyzer.analyzeNumber(java.math.BigDecimal.class)); }; + + } + + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @param columnValueMapString Column-value map-string. (NotNull and NotEmpty) + */ + public void acceptColumnValueMapString(Entity entity, String columnValueMapString) { + MapStringUtil.acceptColumnValueMapString(columnValueMapString, entity); + } + + + // ----------------------------------------------------- + // Extract + // ------- + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @return Primary-key map-string. (NotNull) + */ + public String extractPrimaryKeyMapString(Entity entity) { + return MapStringUtil.extractPrimaryKeyMapString(entity); + } + + /** + * Extract primary-key map-string. + * + * @param entity Target entity. (NotNull) + * @param startBrace Start-brace. (NotNull) + * @param endBrace End-brace. (NotNull) + * @param delimiter Delimiter. (NotNull) + * @param equal Equal. (NotNull) + * @return Primary-key map-string. (NotNull) + */ + public String extractPrimaryKeyMapString(Entity entity, String startBrace, String endBrace, String delimiter, String equal) { + final ProductsToCategories myEntity = (ProductsToCategories)entity; + final String mapMarkAndStartBrace = MAP_STRING_MAP_MARK + startBrace; + final StringBuffer sb = new StringBuffer(); + helpAppendingColumnValueString(sb, delimiter, equal, "PRODUCTS_ID", myEntity.getProductsId()); + helpAppendingColumnValueString(sb, delimiter, equal, "CATEGORIES_ID", myEntity.getCategoriesId()); + + sb.delete(0, delimiter.length()).insert(0, mapMarkAndStartBrace).append(endBrace); + return sb.toString(); + + } + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @return Column-value map-string. (NotNull) + */ + public String extractColumnValueMapString(Entity entity) { + return MapStringUtil.extractColumnValueMapString(entity); + } + + /** + * Extract column-value map-string. + * + * @param entity Target entity. (NotNull) + * @param startBrace Start-brace. (NotNull) + * @param endBrace End-brace. (NotNull) + * @param delimiter Delimiter. (NotNull) + * @param equal Equal. (NotNull) + * @return Column-value map-string. (NotNull) + */ + public String extractColumnValueMapString(Entity entity, String startBrace, String endBrace, String delimiter, String equal) { + final ProductsToCategories myEntity = (ProductsToCategories)entity; + final String mapMarkAndStartBrace = MAP_STRING_MAP_MARK + startBrace; + final StringBuffer sb = new StringBuffer(); + helpAppendingColumnValueString(sb, delimiter, equal, "PRODUCTS_ID", myEntity.getProductsId()); + helpAppendingColumnValueString(sb, delimiter, equal, "CATEGORIES_ID", myEntity.getCategoriesId()); + + sb.delete(0, delimiter.length()).insert(0, mapMarkAndStartBrace).append(endBrace); + return sb.toString(); + } + + private void helpAppendingColumnValueString(StringBuffer sb, String delimiter, String equal, String colName, Object value) { + sb.append(delimiter).append(colName).append(equal); + sb.append(helpGettingColumnStringValue(value)); + } + + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @return Column-value map-string. (NotNull) + */ + public String extractCommonColumnValueMapString(Entity entity) { + return "map:{}"; + } + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @return Column-value map-string. (NotNull) + */ + public String extractCommonColumnValueMapString(Entity entity, String startBrace, String endBrace, String delimiter, String equal) { + return "map:" + startBrace + endBrace; + } + + + // ----------------------------------------------------- + // Convert + // ------- + public java.util.List convertToColumnValueList(Entity entity) { + return new java.util.ArrayList(convertToColumnValueMap(entity).values()); + } + + public java.util.Map convertToColumnValueMap(Entity entity) { + final ProductsToCategories myEntity = downcast(entity); + final java.util.Map valueMap = new java.util.LinkedHashMap(); + valueMap.put("PRODUCTS_ID", myEntity.getProductsId()); + valueMap.put("CATEGORIES_ID", myEntity.getCategoriesId()); + return valueMap; + } + + public java.util.List convertToColumnStringValueList(Entity entity) { + return new java.util.ArrayList(convertToColumnStringValueMap(entity).values()); + } + + public java.util.Map convertToColumnStringValueMap(Entity entity) { + final ProductsToCategories myEntity = downcast(entity); + final java.util.Map valueMap = new java.util.LinkedHashMap(); + valueMap.put("PRODUCTS_ID", helpGettingColumnStringValue(myEntity.getProductsId())); + valueMap.put("CATEGORIES_ID", helpGettingColumnStringValue(myEntity.getCategoriesId())); + return valueMap; + } + + // =================================================================================== + // JDBC Support + // ============ + public String getPreparedInsertClause() { + return "insert into PRODUCTS_TO_CATEGORIES(PRODUCTS_ID, CATEGORIES_ID) values(? , ? )"; + } + + public String getPreparedInsertClause(String tablePrefix) { + return "insert into " + tablePrefix + "PRODUCTS_TO_CATEGORIES(PRODUCTS_ID, CATEGORIES_ID) values(? , ? )"; + } + + // =================================================================================== + // Helper + // ====== + protected ProductsToCategories downcast(Entity entity) { + assertObjectNotNull("entity", entity); + try { + return (ProductsToCategories)entity; + } catch (ClassCastException e) { + String msg = "The entity should be ProductsToCategories but it was: " + entity.getClass(); + throw new IllegalStateException(msg, e); + } + } + + protected void checkDowncast(Entity entity) { + downcast(entity); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/dbmeta/ReviewsDbm.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/dbmeta/ReviewsDbm.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/dbmeta/ReviewsDbm.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,752 @@ +package jp.sf.pal.pompei.bsentity.dbmeta; + + +import jp.sf.pal.pompei.allcommon.Entity; +import jp.sf.pal.pompei.allcommon.dbmeta.DBMeta; +import jp.sf.pal.pompei.allcommon.dbmeta.AbstractDBMeta; +import jp.sf.pal.pompei.exentity.Reviews; + +/** + * The dbmeta of REVIEWS. (Singleton) + * + *
+ * [primary-key]
+ *     REVIEWS_ID
+ * 
+ * [column-property]
+ *     REVIEWS_ID, PRODUCTS_ID, CUSTOMERS_ID, CUSTOMERS_NAME, REVIEWS_RATING, DATE_ADDED, LAST_MODIFIED, REVIEWS_READ
+ * 
+ * [foreign-property]
+ *     
+ * 
+ * [refferer-property]
+ *     
+ * 
+ * [sequence]
+ *     
+ * 
+ * [identity]
+ *     
+ * 
+ * [update-date]
+ *     
+ * 
+ * [version-no]
+ *     
+ * 
+ * 
+ * + * @author DBFlute(AutoGenerator) + */ +public class ReviewsDbm extends AbstractDBMeta { + + // =================================================================================== + // Definition + // ========== + /** The type of entity. */ + protected static final Class ENTITY_TYPE = Reviews.class; + + /** Singleton instance. */ + private static final ReviewsDbm _instance = new ReviewsDbm(); + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + private ReviewsDbm() { + } + + // =================================================================================== + // Singleton + // ========= + /** + * Get instance. + * + * @return Singleton instance. (NotNull) + */ + public static ReviewsDbm getInstance() { + return _instance; + } + + // =================================================================================== + // Name Definition + // =============== + /** Table db name. */ + public static final String TABLE_DB_NAME = "REVIEWS"; + + /** Table cap-prop name. */ + public static final String TABLE_CAP_PROP_NAME = "Reviews"; + + /** Table uncap-prop name. */ + public static final String TABLE_UNCAP_PROP_NAME = "reviews"; + + /** Db-name of ReviewsId. */ + public static final String COLUMN_DB_NAME_OF_ReviewsId = "REVIEWS_ID"; + /** Db-name of ProductsId. */ + public static final String COLUMN_DB_NAME_OF_ProductsId = "PRODUCTS_ID"; + /** Db-name of CustomersId. */ + public static final String COLUMN_DB_NAME_OF_CustomersId = "CUSTOMERS_ID"; + /** Db-name of CustomersName. */ + public static final String COLUMN_DB_NAME_OF_CustomersName = "CUSTOMERS_NAME"; + /** Db-name of ReviewsRating. */ + public static final String COLUMN_DB_NAME_OF_ReviewsRating = "REVIEWS_RATING"; + /** Db-name of DateAdded. */ + public static final String COLUMN_DB_NAME_OF_DateAdded = "DATE_ADDED"; + /** Db-name of LastModified. */ + public static final String COLUMN_DB_NAME_OF_LastModified = "LAST_MODIFIED"; + /** Db-name of ReviewsRead. */ + public static final String COLUMN_DB_NAME_OF_ReviewsRead = "REVIEWS_READ"; + + /** Cap-prop-name of ReviewsId. */ + public static final String COLUMN_CAP_PROP_NAME_OF_ReviewsId = "ReviewsId"; + /** Cap-prop-name of ProductsId. */ + public static final String COLUMN_CAP_PROP_NAME_OF_ProductsId = "ProductsId"; + /** Cap-prop-name of CustomersId. */ + public static final String COLUMN_CAP_PROP_NAME_OF_CustomersId = "CustomersId"; + /** Cap-prop-name of CustomersName. */ + public static final String COLUMN_CAP_PROP_NAME_OF_CustomersName = "CustomersName"; + /** Cap-prop-name of ReviewsRating. */ + public static final String COLUMN_CAP_PROP_NAME_OF_ReviewsRating = "ReviewsRating"; + /** Cap-prop-name of DateAdded. */ + public static final String COLUMN_CAP_PROP_NAME_OF_DateAdded = "DateAdded"; + /** Cap-prop-name of LastModified. */ + public static final String COLUMN_CAP_PROP_NAME_OF_LastModified = "LastModified"; + /** Cap-prop-name of ReviewsRead. */ + public static final String COLUMN_CAP_PROP_NAME_OF_ReviewsRead = "ReviewsRead"; + + + + /** Uncap-prop-name of ReviewsId. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_ReviewsId = "reviewsId"; + /** Uncap-prop-name of ProductsId. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_ProductsId = "productsId"; + /** Uncap-prop-name of CustomersId. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_CustomersId = "customersId"; + /** Uncap-prop-name of CustomersName. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_CustomersName = "customersName"; + /** Uncap-prop-name of ReviewsRating. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_ReviewsRating = "reviewsRating"; + /** Uncap-prop-name of DateAdded. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_DateAdded = "dateAdded"; + /** Uncap-prop-name of LastModified. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_LastModified = "lastModified"; + /** Uncap-prop-name of ReviewsRead. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_ReviewsRead = "reviewsRead"; + + + + /** {db-name : cap-prop-name} map. */ + private static java.util.Map _dbNameCapPropNameMap; + protected static java.util.Map createDbNameCapPropNameMap() { + if (_dbNameCapPropNameMap != null) { + return _dbNameCapPropNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_DB_NAME, TABLE_CAP_PROP_NAME); + + map.put(COLUMN_DB_NAME_OF_ReviewsId, COLUMN_CAP_PROP_NAME_OF_ReviewsId); + map.put(COLUMN_DB_NAME_OF_ProductsId, COLUMN_CAP_PROP_NAME_OF_ProductsId); + map.put(COLUMN_DB_NAME_OF_CustomersId, COLUMN_CAP_PROP_NAME_OF_CustomersId); + map.put(COLUMN_DB_NAME_OF_CustomersName, COLUMN_CAP_PROP_NAME_OF_CustomersName); + map.put(COLUMN_DB_NAME_OF_ReviewsRating, COLUMN_CAP_PROP_NAME_OF_ReviewsRating); + map.put(COLUMN_DB_NAME_OF_DateAdded, COLUMN_CAP_PROP_NAME_OF_DateAdded); + map.put(COLUMN_DB_NAME_OF_LastModified, COLUMN_CAP_PROP_NAME_OF_LastModified); + map.put(COLUMN_DB_NAME_OF_ReviewsRead, COLUMN_CAP_PROP_NAME_OF_ReviewsRead); + + _dbNameCapPropNameMap = java.util.Collections.unmodifiableMap(map); + return _dbNameCapPropNameMap; + } + + /** {db-name : uncap-prop-name} map. */ + private static java.util.Map _dbNameUncapPropNameMap; + protected static java.util.Map createDbNameUncapPropNameMap() { + if (_dbNameUncapPropNameMap != null) { + return _dbNameUncapPropNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_DB_NAME, TABLE_UNCAP_PROP_NAME); + + map.put(COLUMN_DB_NAME_OF_ReviewsId, COLUMN_UNCAP_PROP_NAME_OF_ReviewsId); + map.put(COLUMN_DB_NAME_OF_ProductsId, COLUMN_UNCAP_PROP_NAME_OF_ProductsId); + map.put(COLUMN_DB_NAME_OF_CustomersId, COLUMN_UNCAP_PROP_NAME_OF_CustomersId); + map.put(COLUMN_DB_NAME_OF_CustomersName, COLUMN_UNCAP_PROP_NAME_OF_CustomersName); + map.put(COLUMN_DB_NAME_OF_ReviewsRating, COLUMN_UNCAP_PROP_NAME_OF_ReviewsRating); + map.put(COLUMN_DB_NAME_OF_DateAdded, COLUMN_UNCAP_PROP_NAME_OF_DateAdded); + map.put(COLUMN_DB_NAME_OF_LastModified, COLUMN_UNCAP_PROP_NAME_OF_LastModified); + map.put(COLUMN_DB_NAME_OF_ReviewsRead, COLUMN_UNCAP_PROP_NAME_OF_ReviewsRead); + + _dbNameUncapPropNameMap = java.util.Collections.unmodifiableMap(map); + return _dbNameUncapPropNameMap; + } + + /** {cap-prop-name : db-name} map. */ + private static java.util.Map _capPropNameDbNameMap; + protected static java.util.Map createCapPropNameDbNameMap() { + if (_capPropNameDbNameMap != null) { + return _capPropNameDbNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_CAP_PROP_NAME, TABLE_DB_NAME); + + map.put(COLUMN_CAP_PROP_NAME_OF_ReviewsId, COLUMN_DB_NAME_OF_ReviewsId); + map.put(COLUMN_CAP_PROP_NAME_OF_ProductsId, COLUMN_DB_NAME_OF_ProductsId); + map.put(COLUMN_CAP_PROP_NAME_OF_CustomersId, COLUMN_DB_NAME_OF_CustomersId); + map.put(COLUMN_CAP_PROP_NAME_OF_CustomersName, COLUMN_DB_NAME_OF_CustomersName); + map.put(COLUMN_CAP_PROP_NAME_OF_ReviewsRating, COLUMN_DB_NAME_OF_ReviewsRating); + map.put(COLUMN_CAP_PROP_NAME_OF_DateAdded, COLUMN_DB_NAME_OF_DateAdded); + map.put(COLUMN_CAP_PROP_NAME_OF_LastModified, COLUMN_DB_NAME_OF_LastModified); + map.put(COLUMN_CAP_PROP_NAME_OF_ReviewsRead, COLUMN_DB_NAME_OF_ReviewsRead); + + _capPropNameDbNameMap = java.util.Collections.unmodifiableMap(map); + return _capPropNameDbNameMap; + } + + /** {cap-prop-name : uncap-prop-name} map. */ + private static java.util.Map _capPropNameUncapPropNameMap; + protected static java.util.Map createCapPropNameUncapPropNameMap() { + if (_capPropNameUncapPropNameMap != null) { + return _capPropNameUncapPropNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_CAP_PROP_NAME, TABLE_UNCAP_PROP_NAME); + + map.put(COLUMN_CAP_PROP_NAME_OF_ReviewsId, COLUMN_UNCAP_PROP_NAME_OF_ReviewsId); + map.put(COLUMN_CAP_PROP_NAME_OF_ProductsId, COLUMN_UNCAP_PROP_NAME_OF_ProductsId); + map.put(COLUMN_CAP_PROP_NAME_OF_CustomersId, COLUMN_UNCAP_PROP_NAME_OF_CustomersId); + map.put(COLUMN_CAP_PROP_NAME_OF_CustomersName, COLUMN_UNCAP_PROP_NAME_OF_CustomersName); + map.put(COLUMN_CAP_PROP_NAME_OF_ReviewsRating, COLUMN_UNCAP_PROP_NAME_OF_ReviewsRating); + map.put(COLUMN_CAP_PROP_NAME_OF_DateAdded, COLUMN_UNCAP_PROP_NAME_OF_DateAdded); + map.put(COLUMN_CAP_PROP_NAME_OF_LastModified, COLUMN_UNCAP_PROP_NAME_OF_LastModified); + map.put(COLUMN_CAP_PROP_NAME_OF_ReviewsRead, COLUMN_UNCAP_PROP_NAME_OF_ReviewsRead); + + _capPropNameUncapPropNameMap = java.util.Collections.unmodifiableMap(map); + return _capPropNameUncapPropNameMap; + } + + /** {uncap-prop-name : db-name} map. */ + private static java.util.Map _uncapPropNameDbNameMap; + protected static java.util.Map createUncapPropNameDbNameMap() { + if (_uncapPropNameDbNameMap != null) { + return _uncapPropNameDbNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_UNCAP_PROP_NAME, TABLE_DB_NAME); + + map.put(COLUMN_UNCAP_PROP_NAME_OF_ReviewsId, COLUMN_DB_NAME_OF_ReviewsId); + map.put(COLUMN_UNCAP_PROP_NAME_OF_ProductsId, COLUMN_DB_NAME_OF_ProductsId); + map.put(COLUMN_UNCAP_PROP_NAME_OF_CustomersId, COLUMN_DB_NAME_OF_CustomersId); + map.put(COLUMN_UNCAP_PROP_NAME_OF_CustomersName, COLUMN_DB_NAME_OF_CustomersName); + map.put(COLUMN_UNCAP_PROP_NAME_OF_ReviewsRating, COLUMN_DB_NAME_OF_ReviewsRating); + map.put(COLUMN_UNCAP_PROP_NAME_OF_DateAdded, COLUMN_DB_NAME_OF_DateAdded); + map.put(COLUMN_UNCAP_PROP_NAME_OF_LastModified, COLUMN_DB_NAME_OF_LastModified); + map.put(COLUMN_UNCAP_PROP_NAME_OF_ReviewsRead, COLUMN_DB_NAME_OF_ReviewsRead); + + _uncapPropNameDbNameMap = java.util.Collections.unmodifiableMap(map); + return _uncapPropNameDbNameMap; + } + + /** {uncap-prop-name : cap-prop-name} map. */ + private static java.util.Map _uncapPropNameCapPropNameMap; + protected static java.util.Map createUncapPropNameCapPropNameMap() { + if (_uncapPropNameCapPropNameMap != null) { + return _uncapPropNameCapPropNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_UNCAP_PROP_NAME, TABLE_CAP_PROP_NAME); + + map.put(COLUMN_UNCAP_PROP_NAME_OF_ReviewsId, COLUMN_CAP_PROP_NAME_OF_ReviewsId); + map.put(COLUMN_UNCAP_PROP_NAME_OF_ProductsId, COLUMN_CAP_PROP_NAME_OF_ProductsId); + map.put(COLUMN_UNCAP_PROP_NAME_OF_CustomersId, COLUMN_CAP_PROP_NAME_OF_CustomersId); + map.put(COLUMN_UNCAP_PROP_NAME_OF_CustomersName, COLUMN_CAP_PROP_NAME_OF_CustomersName); + map.put(COLUMN_UNCAP_PROP_NAME_OF_ReviewsRating, COLUMN_CAP_PROP_NAME_OF_ReviewsRating); + map.put(COLUMN_UNCAP_PROP_NAME_OF_DateAdded, COLUMN_CAP_PROP_NAME_OF_DateAdded); + map.put(COLUMN_UNCAP_PROP_NAME_OF_LastModified, COLUMN_CAP_PROP_NAME_OF_LastModified); + map.put(COLUMN_UNCAP_PROP_NAME_OF_ReviewsRead, COLUMN_CAP_PROP_NAME_OF_ReviewsRead); + + _uncapPropNameCapPropNameMap = java.util.Collections.unmodifiableMap(map); + return _uncapPropNameCapPropNameMap; + } + + // =================================================================================== + // Name-Map + // ======== + /** + * This method implements the method that is declared at super. + * + * @return {db-name : cap-prop-name} map. + */ + public java.util.Map getDbNameCapPropNameMap() { + return createDbNameCapPropNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {db-name : uncap-prop-name} map. + */ + public java.util.Map getDbNameUncapPropNameMap() { + return createDbNameUncapPropNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {cap-prop-name : db-name} map. + */ + public java.util.Map getCapPropNameDbNameMap() { + return createCapPropNameDbNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {cap-prop-name : uncap-prop-name} map. + */ + public java.util.Map getCapPropNameUncapPropNameMap() { + return createCapPropNameUncapPropNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {uncap-prop-name : db-name} map. + */ + public java.util.Map getUncapPropNameDbNameMap() { + return createUncapPropNameDbNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {uncap-prop-name : cap-prop-name} map. + */ + public java.util.Map getUncapPropNameCapPropNameMap() { + return createUncapPropNameCapPropNameMap(); + } + + // =================================================================================== + // Table Name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + public String getTableDbName() { + return TABLE_DB_NAME; + } + + /** + * This method implements the method that is declared at super. + * + * @return Table cap-prop-name. (NotNull) + */ + public String getTableCapPropName() { + return TABLE_CAP_PROP_NAME; + } + + /** + * This method implements the method that is declared at super. + * + * @return Table property-name. (NotNull) + */ + public String getTableUncapPropName() { + return TABLE_UNCAP_PROP_NAME; + } + + // =================================================================================== + // Column Name + // =========== + public java.util.List getColumnDbNameList() { + final String[] columns = getColumnDbNameCommaString().split(","); + final java.util.List resultList = new java.util.ArrayList(); + for (int i=0; i < columns.length; i++) { + resultList.add(columns[i].trim()); + } + return resultList; + } + + public java.util.List getColumnCapPropNameList() { + final java.util.List columnDbNameList = getColumnDbNameList(); + final java.util.List resultList = new java.util.ArrayList(); + for (final java.util.Iterator ite = columnDbNameList.iterator(); ite.hasNext(); ) { + resultList.add(getDbNameCapPropNameMap().get((String)ite.next())); + } + return resultList; + } + + public java.util.List getColumnUncapPropNameList() { + final java.util.List columnDbNameList = getColumnDbNameList(); + final java.util.List resultList = new java.util.ArrayList(); + for (final java.util.Iterator ite = columnDbNameList.iterator(); ite.hasNext(); ) { + resultList.add(getDbNameUncapPropNameMap().get((String)ite.next())); + } + return resultList; + } + + /** + * This method implements the method that is declared at super. + * + * @return Column-db-name comma-string. (NotNull) + */ + public String getColumnDbNameCommaString() { + return "REVIEWS_ID, PRODUCTS_ID, CUSTOMERS_ID, CUSTOMERS_NAME, REVIEWS_RATING, DATE_ADDED, LAST_MODIFIED, REVIEWS_READ"; + } + + // =================================================================================== + // Type Name + // ========= + /** + * This method implements the method that is declared at super. + * + * @return The type-name of entity. (NotNull) + */ + public String getEntityTypeName() { + return "jp.sf.pal.pompei.exentity.Reviews"; + } + + /** + * This method implements the method that is declared at super. + * + * @return The type-name of condition-bean. (NotNull) + */ + public String getConditionBeanTypeName() { + return "jp.sf.pal.pompei.cbean.bs.ReviewsCB"; + } + + /** + * This method implements the method that is declared at super. + * + * @return The type-name of dao. (NotNull) + */ + public String getDaoTypeName() { + return "jp.sf.pal.pompei.exdao.ReviewsDao"; + } + + /** + * This method implements the method that is declared at super. + * + * @return The type-name of behavior. (NotNull) + */ + public String getBehaviorTypeName() { + return "jp.sf.pal.pompei.exbhv.ReviewsBhv"; + } + + // =================================================================================== + // Type + // ==== + /** + * This method implements the method that is declared at super. + * + * @return The type of entity. (NotNull) + */ + public Class getEntityType() { + return ENTITY_TYPE; + } + + // =================================================================================== + // Instance + // ======== + /** + * This method implements the method that is declared at super. + * + * @return The type of entity. (NotNull) + */ + public Entity newEntity() { + return newMyEntity(); + } + + /** + * New the instance of my entity. + * + * @return The instance of my entity. (NotNull) + */ + public Reviews newMyEntity() { + return new Reviews(); + } + + // =================================================================================== + // Foreign DBMeta + // ============== + /** + * This method implements the method that is declared at super. + * + * @param foreignPropertyName Foreign-property-name(Both OK - InitCap or not). (NotNull) + * @return Foreign DBMeta. (NotNull) + */ + public DBMeta getForeignDBMeta(String foreignPropertyName) { + assertStringNotNullAndNotTrimmedEmpty("foreignPropertyName", foreignPropertyName); + final String methodName = "getForeignDBMeta_" + foreignPropertyName.substring(0, 1) + foreignPropertyName.substring(1); + + java.lang.reflect.Method method = null; + try { + method = this.getClass().getMethod(methodName, new Class[]{}); + } catch (NoSuchMethodException e) { + String msg = "The foreignPropertyName is not found: foreignPropertyName=" + foreignPropertyName; + msg = msg + " tableName=" + TABLE_DB_NAME + " methodName=" + methodName; + throw new RuntimeException(msg, e); + } + try { + return (DBMeta)method.invoke(this, new Object[]{}); + } catch (IllegalAccessException e) { + throw new RuntimeException(e); + } catch (java.lang.reflect.InvocationTargetException e) { + throw new RuntimeException(e.getCause()); + } + } + + // =================================================================================== + // Determination + // ============= + /** + * This method implements the method that is declared at super. + * + * @return Determination. + */ + public boolean hasTwoOrMorePrimaryKeys() { + return false; + } + + /** + * This method implements the method that is declared at super. + * + * @return Determination. + */ + public boolean hasCommonColumn() { + return false; + } + + // =================================================================================== + // Entity Handling + // =============== + // ----------------------------------------------------- + // Accept + // ------ + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @param primaryKeyMap Primary key map. (NotNull and NotEmpty) + */ + public void acceptPrimaryKeyMap(Entity entity, java.util.Map primaryKeyMap) { + final Reviews myEntity = (Reviews)entity; + MapAssertUtil.assertPrimaryKeyMapNotNullAndNotEmpty(primaryKeyMap); + final MapStringValueAnalyzer analyzer = new MapStringValueAnalyzer(primaryKeyMap, entity.getModifiedPropertyNames()); + + MapAssertUtil.assertColumnExistingInPrimaryKeyMap(primaryKeyMap, "REVIEWS_ID"); + if (analyzer.init("REVIEWS_ID", "reviewsId", "reviewsId")) { myEntity.setReviewsId(analyzer.analyzeNumber(java.math.BigDecimal.class)); }; + + + } + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @param primaryKeyMapString Primary-key map-string. (NotNull and NotEmpty) + */ + public void acceptPrimaryKeyMapString(Entity entity, String primaryKeyMapString) { + MapStringUtil.acceptPrimaryKeyMapString(primaryKeyMapString, entity); + } + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @param columnValueMap Column-value map. (NotNull and NotEmpty) + */ + public void acceptColumnValueMap(Entity entity, java.util.Map columnValueMap) { + final Reviews myEntity = (Reviews)entity; + MapAssertUtil.assertColumnValueMapNotNullAndNotEmpty(columnValueMap); + final MapStringValueAnalyzer analyzer = new MapStringValueAnalyzer(columnValueMap, entity.getModifiedPropertyNames()); + + if (analyzer.init("REVIEWS_ID", "reviewsId", "reviewsId")) { myEntity.setReviewsId(analyzer.analyzeNumber(java.math.BigDecimal.class)); }; + if (analyzer.init("PRODUCTS_ID", "productsId", "productsId")) { myEntity.setProductsId(analyzer.analyzeNumber(java.math.BigDecimal.class)); }; + if (analyzer.init("CUSTOMERS_ID", "customersId", "customersId")) { myEntity.setCustomersId(analyzer.analyzeNumber(java.math.BigDecimal.class)); }; + if (analyzer.init("CUSTOMERS_NAME", "customersName", "customersName")) { myEntity.setCustomersName(analyzer.analyzeString(String.class)); }; + if (analyzer.init("REVIEWS_RATING", "reviewsRating", "reviewsRating")) { myEntity.setReviewsRating(analyzer.analyzeNumber(java.math.BigDecimal.class)); }; + if (analyzer.init("DATE_ADDED", "dateAdded", "dateAdded")) { myEntity.setDateAdded(analyzer.analyzeDate(java.sql.Timestamp.class)); }; + if (analyzer.init("LAST_MODIFIED", "lastModified", "lastModified")) { myEntity.setLastModified(analyzer.analyzeDate(java.sql.Timestamp.class)); }; + if (analyzer.init("REVIEWS_READ", "reviewsRead", "reviewsRead")) { myEntity.setReviewsRead(analyzer.analyzeNumber(java.math.BigDecimal.class)); }; + + } + + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @param columnValueMapString Column-value map-string. (NotNull and NotEmpty) + */ + public void acceptColumnValueMapString(Entity entity, String columnValueMapString) { + MapStringUtil.acceptColumnValueMapString(columnValueMapString, entity); + } + + + // ----------------------------------------------------- + // Extract + // ------- + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @return Primary-key map-string. (NotNull) + */ + public String extractPrimaryKeyMapString(Entity entity) { + return MapStringUtil.extractPrimaryKeyMapString(entity); + } + + /** + * Extract primary-key map-string. + * + * @param entity Target entity. (NotNull) + * @param startBrace Start-brace. (NotNull) + * @param endBrace End-brace. (NotNull) + * @param delimiter Delimiter. (NotNull) + * @param equal Equal. (NotNull) + * @return Primary-key map-string. (NotNull) + */ + public String extractPrimaryKeyMapString(Entity entity, String startBrace, String endBrace, String delimiter, String equal) { + final Reviews myEntity = (Reviews)entity; + final String mapMarkAndStartBrace = MAP_STRING_MAP_MARK + startBrace; + final StringBuffer sb = new StringBuffer(); + helpAppendingColumnValueString(sb, delimiter, equal, "REVIEWS_ID", myEntity.getReviewsId()); + + sb.delete(0, delimiter.length()).insert(0, mapMarkAndStartBrace).append(endBrace); + return sb.toString(); + + } + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @return Column-value map-string. (NotNull) + */ + public String extractColumnValueMapString(Entity entity) { + return MapStringUtil.extractColumnValueMapString(entity); + } + + /** + * Extract column-value map-string. + * + * @param entity Target entity. (NotNull) + * @param startBrace Start-brace. (NotNull) + * @param endBrace End-brace. (NotNull) + * @param delimiter Delimiter. (NotNull) + * @param equal Equal. (NotNull) + * @return Column-value map-string. (NotNull) + */ + public String extractColumnValueMapString(Entity entity, String startBrace, String endBrace, String delimiter, String equal) { + final Reviews myEntity = (Reviews)entity; + final String mapMarkAndStartBrace = MAP_STRING_MAP_MARK + startBrace; + final StringBuffer sb = new StringBuffer(); + helpAppendingColumnValueString(sb, delimiter, equal, "REVIEWS_ID", myEntity.getReviewsId()); + helpAppendingColumnValueString(sb, delimiter, equal, "PRODUCTS_ID", myEntity.getProductsId()); + helpAppendingColumnValueString(sb, delimiter, equal, "CUSTOMERS_ID", myEntity.getCustomersId()); + helpAppendingColumnValueString(sb, delimiter, equal, "CUSTOMERS_NAME", myEntity.getCustomersName()); + helpAppendingColumnValueString(sb, delimiter, equal, "REVIEWS_RATING", myEntity.getReviewsRating()); + helpAppendingColumnValueString(sb, delimiter, equal, "DATE_ADDED", myEntity.getDateAdded()); + helpAppendingColumnValueString(sb, delimiter, equal, "LAST_MODIFIED", myEntity.getLastModified()); + helpAppendingColumnValueString(sb, delimiter, equal, "REVIEWS_READ", myEntity.getReviewsRead()); + + sb.delete(0, delimiter.length()).insert(0, mapMarkAndStartBrace).append(endBrace); + return sb.toString(); + } + + private void helpAppendingColumnValueString(StringBuffer sb, String delimiter, String equal, String colName, Object value) { + sb.append(delimiter).append(colName).append(equal); + sb.append(helpGettingColumnStringValue(value)); + } + + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @return Column-value map-string. (NotNull) + */ + public String extractCommonColumnValueMapString(Entity entity) { + return "map:{}"; + } + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @return Column-value map-string. (NotNull) + */ + public String extractCommonColumnValueMapString(Entity entity, String startBrace, String endBrace, String delimiter, String equal) { + return "map:" + startBrace + endBrace; + } + + + // ----------------------------------------------------- + // Convert + // ------- + public java.util.List convertToColumnValueList(Entity entity) { + return new java.util.ArrayList(convertToColumnValueMap(entity).values()); + } + + public java.util.Map convertToColumnValueMap(Entity entity) { + final Reviews myEntity = downcast(entity); + final java.util.Map valueMap = new java.util.LinkedHashMap(); + valueMap.put("REVIEWS_ID", myEntity.getReviewsId()); + valueMap.put("PRODUCTS_ID", myEntity.getProductsId()); + valueMap.put("CUSTOMERS_ID", myEntity.getCustomersId()); + valueMap.put("CUSTOMERS_NAME", myEntity.getCustomersName()); + valueMap.put("REVIEWS_RATING", myEntity.getReviewsRating()); + valueMap.put("DATE_ADDED", myEntity.getDateAdded()); + valueMap.put("LAST_MODIFIED", myEntity.getLastModified()); + valueMap.put("REVIEWS_READ", myEntity.getReviewsRead()); + return valueMap; + } + + public java.util.List convertToColumnStringValueList(Entity entity) { + return new java.util.ArrayList(convertToColumnStringValueMap(entity).values()); + } + + public java.util.Map convertToColumnStringValueMap(Entity entity) { + final Reviews myEntity = downcast(entity); + final java.util.Map valueMap = new java.util.LinkedHashMap(); + valueMap.put("REVIEWS_ID", helpGettingColumnStringValue(myEntity.getReviewsId())); + valueMap.put("PRODUCTS_ID", helpGettingColumnStringValue(myEntity.getProductsId())); + valueMap.put("CUSTOMERS_ID", helpGettingColumnStringValue(myEntity.getCustomersId())); + valueMap.put("CUSTOMERS_NAME", helpGettingColumnStringValue(myEntity.getCustomersName())); + valueMap.put("REVIEWS_RATING", helpGettingColumnStringValue(myEntity.getReviewsRating())); + valueMap.put("DATE_ADDED", helpGettingColumnStringValue(myEntity.getDateAdded())); + valueMap.put("LAST_MODIFIED", helpGettingColumnStringValue(myEntity.getLastModified())); + valueMap.put("REVIEWS_READ", helpGettingColumnStringValue(myEntity.getReviewsRead())); + return valueMap; + } + + // =================================================================================== + // JDBC Support + // ============ + public String getPreparedInsertClause() { + return "insert into REVIEWS(REVIEWS_ID, PRODUCTS_ID, CUSTOMERS_ID, CUSTOMERS_NAME, REVIEWS_RATING, DATE_ADDED, LAST_MODIFIED, REVIEWS_READ) values(? , ? , ? , ? , ? , ? , ? , ? )"; + } + + public String getPreparedInsertClause(String tablePrefix) { + return "insert into " + tablePrefix + "REVIEWS(REVIEWS_ID, PRODUCTS_ID, CUSTOMERS_ID, CUSTOMERS_NAME, REVIEWS_RATING, DATE_ADDED, LAST_MODIFIED, REVIEWS_READ) values(? , ? , ? , ? , ? , ? , ? , ? )"; + } + + // =================================================================================== + // Helper + // ====== + protected Reviews downcast(Entity entity) { + assertObjectNotNull("entity", entity); + try { + return (Reviews)entity; + } catch (ClassCastException e) { + String msg = "The entity should be Reviews but it was: " + entity.getClass(); + throw new IllegalStateException(msg, e); + } + } + + protected void checkDowncast(Entity entity) { + downcast(entity); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/dbmeta/ReviewsDescriptionDbm.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/dbmeta/ReviewsDescriptionDbm.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/dbmeta/ReviewsDescriptionDbm.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,675 @@ +package jp.sf.pal.pompei.bsentity.dbmeta; + + +import jp.sf.pal.pompei.allcommon.Entity; +import jp.sf.pal.pompei.allcommon.dbmeta.DBMeta; +import jp.sf.pal.pompei.allcommon.dbmeta.AbstractDBMeta; +import jp.sf.pal.pompei.exentity.ReviewsDescription; + +/** + * The dbmeta of REVIEWS_DESCRIPTION. (Singleton) + * + *
+ * [primary-key]
+ *     REVIEWS_ID, LANGUAGES_ID
+ * 
+ * [column-property]
+ *     REVIEWS_ID, LANGUAGES_ID, REVIEWS_TEXT
+ * 
+ * [foreign-property]
+ *     
+ * 
+ * [refferer-property]
+ *     
+ * 
+ * [sequence]
+ *     
+ * 
+ * [identity]
+ *     
+ * 
+ * [update-date]
+ *     
+ * 
+ * [version-no]
+ *     
+ * 
+ * 
+ * + * @author DBFlute(AutoGenerator) + */ +public class ReviewsDescriptionDbm extends AbstractDBMeta { + + // =================================================================================== + // Definition + // ========== + /** The type of entity. */ + protected static final Class ENTITY_TYPE = ReviewsDescription.class; + + /** Singleton instance. */ + private static final ReviewsDescriptionDbm _instance = new ReviewsDescriptionDbm(); + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + private ReviewsDescriptionDbm() { + } + + // =================================================================================== + // Singleton + // ========= + /** + * Get instance. + * + * @return Singleton instance. (NotNull) + */ + public static ReviewsDescriptionDbm getInstance() { + return _instance; + } + + // =================================================================================== + // Name Definition + // =============== + /** Table db name. */ + public static final String TABLE_DB_NAME = "REVIEWS_DESCRIPTION"; + + /** Table cap-prop name. */ + public static final String TABLE_CAP_PROP_NAME = "ReviewsDescription"; + + /** Table uncap-prop name. */ + public static final String TABLE_UNCAP_PROP_NAME = "reviewsDescription"; + + /** Db-name of ReviewsId. */ + public static final String COLUMN_DB_NAME_OF_ReviewsId = "REVIEWS_ID"; + /** Db-name of LanguagesId. */ + public static final String COLUMN_DB_NAME_OF_LanguagesId = "LANGUAGES_ID"; + /** Db-name of ReviewsText. */ + public static final String COLUMN_DB_NAME_OF_ReviewsText = "REVIEWS_TEXT"; + + /** Cap-prop-name of ReviewsId. */ + public static final String COLUMN_CAP_PROP_NAME_OF_ReviewsId = "ReviewsId"; + /** Cap-prop-name of LanguagesId. */ + public static final String COLUMN_CAP_PROP_NAME_OF_LanguagesId = "LanguagesId"; + /** Cap-prop-name of ReviewsText. */ + public static final String COLUMN_CAP_PROP_NAME_OF_ReviewsText = "ReviewsText"; + + + + /** Uncap-prop-name of ReviewsId. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_ReviewsId = "reviewsId"; + /** Uncap-prop-name of LanguagesId. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_LanguagesId = "languagesId"; + /** Uncap-prop-name of ReviewsText. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_ReviewsText = "reviewsText"; + + + + /** {db-name : cap-prop-name} map. */ + private static java.util.Map _dbNameCapPropNameMap; + protected static java.util.Map createDbNameCapPropNameMap() { + if (_dbNameCapPropNameMap != null) { + return _dbNameCapPropNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_DB_NAME, TABLE_CAP_PROP_NAME); + + map.put(COLUMN_DB_NAME_OF_ReviewsId, COLUMN_CAP_PROP_NAME_OF_ReviewsId); + map.put(COLUMN_DB_NAME_OF_LanguagesId, COLUMN_CAP_PROP_NAME_OF_LanguagesId); + map.put(COLUMN_DB_NAME_OF_ReviewsText, COLUMN_CAP_PROP_NAME_OF_ReviewsText); + + _dbNameCapPropNameMap = java.util.Collections.unmodifiableMap(map); + return _dbNameCapPropNameMap; + } + + /** {db-name : uncap-prop-name} map. */ + private static java.util.Map _dbNameUncapPropNameMap; + protected static java.util.Map createDbNameUncapPropNameMap() { + if (_dbNameUncapPropNameMap != null) { + return _dbNameUncapPropNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_DB_NAME, TABLE_UNCAP_PROP_NAME); + + map.put(COLUMN_DB_NAME_OF_ReviewsId, COLUMN_UNCAP_PROP_NAME_OF_ReviewsId); + map.put(COLUMN_DB_NAME_OF_LanguagesId, COLUMN_UNCAP_PROP_NAME_OF_LanguagesId); + map.put(COLUMN_DB_NAME_OF_ReviewsText, COLUMN_UNCAP_PROP_NAME_OF_ReviewsText); + + _dbNameUncapPropNameMap = java.util.Collections.unmodifiableMap(map); + return _dbNameUncapPropNameMap; + } + + /** {cap-prop-name : db-name} map. */ + private static java.util.Map _capPropNameDbNameMap; + protected static java.util.Map createCapPropNameDbNameMap() { + if (_capPropNameDbNameMap != null) { + return _capPropNameDbNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_CAP_PROP_NAME, TABLE_DB_NAME); + + map.put(COLUMN_CAP_PROP_NAME_OF_ReviewsId, COLUMN_DB_NAME_OF_ReviewsId); + map.put(COLUMN_CAP_PROP_NAME_OF_LanguagesId, COLUMN_DB_NAME_OF_LanguagesId); + map.put(COLUMN_CAP_PROP_NAME_OF_ReviewsText, COLUMN_DB_NAME_OF_ReviewsText); + + _capPropNameDbNameMap = java.util.Collections.unmodifiableMap(map); + return _capPropNameDbNameMap; + } + + /** {cap-prop-name : uncap-prop-name} map. */ + private static java.util.Map _capPropNameUncapPropNameMap; + protected static java.util.Map createCapPropNameUncapPropNameMap() { + if (_capPropNameUncapPropNameMap != null) { + return _capPropNameUncapPropNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_CAP_PROP_NAME, TABLE_UNCAP_PROP_NAME); + + map.put(COLUMN_CAP_PROP_NAME_OF_ReviewsId, COLUMN_UNCAP_PROP_NAME_OF_ReviewsId); + map.put(COLUMN_CAP_PROP_NAME_OF_LanguagesId, COLUMN_UNCAP_PROP_NAME_OF_LanguagesId); + map.put(COLUMN_CAP_PROP_NAME_OF_ReviewsText, COLUMN_UNCAP_PROP_NAME_OF_ReviewsText); + + _capPropNameUncapPropNameMap = java.util.Collections.unmodifiableMap(map); + return _capPropNameUncapPropNameMap; + } + + /** {uncap-prop-name : db-name} map. */ + private static java.util.Map _uncapPropNameDbNameMap; + protected static java.util.Map createUncapPropNameDbNameMap() { + if (_uncapPropNameDbNameMap != null) { + return _uncapPropNameDbNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_UNCAP_PROP_NAME, TABLE_DB_NAME); + + map.put(COLUMN_UNCAP_PROP_NAME_OF_ReviewsId, COLUMN_DB_NAME_OF_ReviewsId); + map.put(COLUMN_UNCAP_PROP_NAME_OF_LanguagesId, COLUMN_DB_NAME_OF_LanguagesId); + map.put(COLUMN_UNCAP_PROP_NAME_OF_ReviewsText, COLUMN_DB_NAME_OF_ReviewsText); + + _uncapPropNameDbNameMap = java.util.Collections.unmodifiableMap(map); + return _uncapPropNameDbNameMap; + } + + /** {uncap-prop-name : cap-prop-name} map. */ + private static java.util.Map _uncapPropNameCapPropNameMap; + protected static java.util.Map createUncapPropNameCapPropNameMap() { + if (_uncapPropNameCapPropNameMap != null) { + return _uncapPropNameCapPropNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_UNCAP_PROP_NAME, TABLE_CAP_PROP_NAME); + + map.put(COLUMN_UNCAP_PROP_NAME_OF_ReviewsId, COLUMN_CAP_PROP_NAME_OF_ReviewsId); + map.put(COLUMN_UNCAP_PROP_NAME_OF_LanguagesId, COLUMN_CAP_PROP_NAME_OF_LanguagesId); + map.put(COLUMN_UNCAP_PROP_NAME_OF_ReviewsText, COLUMN_CAP_PROP_NAME_OF_ReviewsText); + + _uncapPropNameCapPropNameMap = java.util.Collections.unmodifiableMap(map); + return _uncapPropNameCapPropNameMap; + } + + // =================================================================================== + // Name-Map + // ======== + /** + * This method implements the method that is declared at super. + * + * @return {db-name : cap-prop-name} map. + */ + public java.util.Map getDbNameCapPropNameMap() { + return createDbNameCapPropNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {db-name : uncap-prop-name} map. + */ + public java.util.Map getDbNameUncapPropNameMap() { + return createDbNameUncapPropNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {cap-prop-name : db-name} map. + */ + public java.util.Map getCapPropNameDbNameMap() { + return createCapPropNameDbNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {cap-prop-name : uncap-prop-name} map. + */ + public java.util.Map getCapPropNameUncapPropNameMap() { + return createCapPropNameUncapPropNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {uncap-prop-name : db-name} map. + */ + public java.util.Map getUncapPropNameDbNameMap() { + return createUncapPropNameDbNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {uncap-prop-name : cap-prop-name} map. + */ + public java.util.Map getUncapPropNameCapPropNameMap() { + return createUncapPropNameCapPropNameMap(); + } + + // =================================================================================== + // Table Name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + public String getTableDbName() { + return TABLE_DB_NAME; + } + + /** + * This method implements the method that is declared at super. + * + * @return Table cap-prop-name. (NotNull) + */ + public String getTableCapPropName() { + return TABLE_CAP_PROP_NAME; + } + + /** + * This method implements the method that is declared at super. + * + * @return Table property-name. (NotNull) + */ + public String getTableUncapPropName() { + return TABLE_UNCAP_PROP_NAME; + } + + // =================================================================================== + // Column Name + // =========== + public java.util.List getColumnDbNameList() { + final String[] columns = getColumnDbNameCommaString().split(","); + final java.util.List resultList = new java.util.ArrayList(); + for (int i=0; i < columns.length; i++) { + resultList.add(columns[i].trim()); + } + return resultList; + } + + public java.util.List getColumnCapPropNameList() { + final java.util.List columnDbNameList = getColumnDbNameList(); + final java.util.List resultList = new java.util.ArrayList(); + for (final java.util.Iterator ite = columnDbNameList.iterator(); ite.hasNext(); ) { + resultList.add(getDbNameCapPropNameMap().get((String)ite.next())); + } + return resultList; + } + + public java.util.List getColumnUncapPropNameList() { + final java.util.List columnDbNameList = getColumnDbNameList(); + final java.util.List resultList = new java.util.ArrayList(); + for (final java.util.Iterator ite = columnDbNameList.iterator(); ite.hasNext(); ) { + resultList.add(getDbNameUncapPropNameMap().get((String)ite.next())); + } + return resultList; + } + + /** + * This method implements the method that is declared at super. + * + * @return Column-db-name comma-string. (NotNull) + */ + public String getColumnDbNameCommaString() { + return "REVIEWS_ID, LANGUAGES_ID, REVIEWS_TEXT"; + } + + // =================================================================================== + // Type Name + // ========= + /** + * This method implements the method that is declared at super. + * + * @return The type-name of entity. (NotNull) + */ + public String getEntityTypeName() { + return "jp.sf.pal.pompei.exentity.ReviewsDescription"; + } + + /** + * This method implements the method that is declared at super. + * + * @return The type-name of condition-bean. (NotNull) + */ + public String getConditionBeanTypeName() { + return "jp.sf.pal.pompei.cbean.bs.ReviewsDescriptionCB"; + } + + /** + * This method implements the method that is declared at super. + * + * @return The type-name of dao. (NotNull) + */ + public String getDaoTypeName() { + return "jp.sf.pal.pompei.exdao.ReviewsDescriptionDao"; + } + + /** + * This method implements the method that is declared at super. + * + * @return The type-name of behavior. (NotNull) + */ + public String getBehaviorTypeName() { + return "jp.sf.pal.pompei.exbhv.ReviewsDescriptionBhv"; + } + + // =================================================================================== + // Type + // ==== + /** + * This method implements the method that is declared at super. + * + * @return The type of entity. (NotNull) + */ + public Class getEntityType() { + return ENTITY_TYPE; + } + + // =================================================================================== + // Instance + // ======== + /** + * This method implements the method that is declared at super. + * + * @return The type of entity. (NotNull) + */ + public Entity newEntity() { + return newMyEntity(); + } + + /** + * New the instance of my entity. + * + * @return The instance of my entity. (NotNull) + */ + public ReviewsDescription newMyEntity() { + return new ReviewsDescription(); + } + + // =================================================================================== + // Foreign DBMeta + // ============== + /** + * This method implements the method that is declared at super. + * + * @param foreignPropertyName Foreign-property-name(Both OK - InitCap or not). (NotNull) + * @return Foreign DBMeta. (NotNull) + */ + public DBMeta getForeignDBMeta(String foreignPropertyName) { + assertStringNotNullAndNotTrimmedEmpty("foreignPropertyName", foreignPropertyName); + final String methodName = "getForeignDBMeta_" + foreignPropertyName.substring(0, 1) + foreignPropertyName.substring(1); + + java.lang.reflect.Method method = null; + try { + method = this.getClass().getMethod(methodName, new Class[]{}); + } catch (NoSuchMethodException e) { + String msg = "The foreignPropertyName is not found: foreignPropertyName=" + foreignPropertyName; + msg = msg + " tableName=" + TABLE_DB_NAME + " methodName=" + methodName; + throw new RuntimeException(msg, e); + } + try { + return (DBMeta)method.invoke(this, new Object[]{}); + } catch (IllegalAccessException e) { + throw new RuntimeException(e); + } catch (java.lang.reflect.InvocationTargetException e) { + throw new RuntimeException(e.getCause()); + } + } + + // =================================================================================== + // Determination + // ============= + /** + * This method implements the method that is declared at super. + * + * @return Determination. + */ + public boolean hasTwoOrMorePrimaryKeys() { + return true; + } + + /** + * This method implements the method that is declared at super. + * + * @return Determination. + */ + public boolean hasCommonColumn() { + return false; + } + + // =================================================================================== + // Entity Handling + // =============== + // ----------------------------------------------------- + // Accept + // ------ + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @param primaryKeyMap Primary key map. (NotNull and NotEmpty) + */ + public void acceptPrimaryKeyMap(Entity entity, java.util.Map primaryKeyMap) { + final ReviewsDescription myEntity = (ReviewsDescription)entity; + MapAssertUtil.assertPrimaryKeyMapNotNullAndNotEmpty(primaryKeyMap); + final MapStringValueAnalyzer analyzer = new MapStringValueAnalyzer(primaryKeyMap, entity.getModifiedPropertyNames()); + + MapAssertUtil.assertColumnExistingInPrimaryKeyMap(primaryKeyMap, "REVIEWS_ID"); + if (analyzer.init("REVIEWS_ID", "reviewsId", "reviewsId")) { myEntity.setReviewsId(analyzer.analyzeNumber(java.math.BigDecimal.class)); }; + MapAssertUtil.assertColumnExistingInPrimaryKeyMap(primaryKeyMap, "LANGUAGES_ID"); + if (analyzer.init("LANGUAGES_ID", "languagesId", "languagesId")) { myEntity.setLanguagesId(analyzer.analyzeNumber(java.math.BigDecimal.class)); }; + + + } + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @param primaryKeyMapString Primary-key map-string. (NotNull and NotEmpty) + */ + public void acceptPrimaryKeyMapString(Entity entity, String primaryKeyMapString) { + MapStringUtil.acceptPrimaryKeyMapString(primaryKeyMapString, entity); + } + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @param columnValueMap Column-value map. (NotNull and NotEmpty) + */ + public void acceptColumnValueMap(Entity entity, java.util.Map columnValueMap) { + final ReviewsDescription myEntity = (ReviewsDescription)entity; + MapAssertUtil.assertColumnValueMapNotNullAndNotEmpty(columnValueMap); + final MapStringValueAnalyzer analyzer = new MapStringValueAnalyzer(columnValueMap, entity.getModifiedPropertyNames()); + + if (analyzer.init("REVIEWS_ID", "reviewsId", "reviewsId")) { myEntity.setReviewsId(analyzer.analyzeNumber(java.math.BigDecimal.class)); }; + if (analyzer.init("LANGUAGES_ID", "languagesId", "languagesId")) { myEntity.setLanguagesId(analyzer.analyzeNumber(java.math.BigDecimal.class)); }; + if (analyzer.init("REVIEWS_TEXT", "reviewsText", "reviewsText")) { myEntity.setReviewsText(analyzer.analyzeString(String.class)); }; + + } + + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @param columnValueMapString Column-value map-string. (NotNull and NotEmpty) + */ + public void acceptColumnValueMapString(Entity entity, String columnValueMapString) { + MapStringUtil.acceptColumnValueMapString(columnValueMapString, entity); + } + + + // ----------------------------------------------------- + // Extract + // ------- + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @return Primary-key map-string. (NotNull) + */ + public String extractPrimaryKeyMapString(Entity entity) { + return MapStringUtil.extractPrimaryKeyMapString(entity); + } + + /** + * Extract primary-key map-string. + * + * @param entity Target entity. (NotNull) + * @param startBrace Start-brace. (NotNull) + * @param endBrace End-brace. (NotNull) + * @param delimiter Delimiter. (NotNull) + * @param equal Equal. (NotNull) + * @return Primary-key map-string. (NotNull) + */ + public String extractPrimaryKeyMapString(Entity entity, String startBrace, String endBrace, String delimiter, String equal) { + final ReviewsDescription myEntity = (ReviewsDescription)entity; + final String mapMarkAndStartBrace = MAP_STRING_MAP_MARK + startBrace; + final StringBuffer sb = new StringBuffer(); + helpAppendingColumnValueString(sb, delimiter, equal, "REVIEWS_ID", myEntity.getReviewsId()); + helpAppendingColumnValueString(sb, delimiter, equal, "LANGUAGES_ID", myEntity.getLanguagesId()); + + sb.delete(0, delimiter.length()).insert(0, mapMarkAndStartBrace).append(endBrace); + return sb.toString(); + + } + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @return Column-value map-string. (NotNull) + */ + public String extractColumnValueMapString(Entity entity) { + return MapStringUtil.extractColumnValueMapString(entity); + } + + /** + * Extract column-value map-string. + * + * @param entity Target entity. (NotNull) + * @param startBrace Start-brace. (NotNull) + * @param endBrace End-brace. (NotNull) + * @param delimiter Delimiter. (NotNull) + * @param equal Equal. (NotNull) + * @return Column-value map-string. (NotNull) + */ + public String extractColumnValueMapString(Entity entity, String startBrace, String endBrace, String delimiter, String equal) { + final ReviewsDescription myEntity = (ReviewsDescription)entity; + final String mapMarkAndStartBrace = MAP_STRING_MAP_MARK + startBrace; + final StringBuffer sb = new StringBuffer(); + helpAppendingColumnValueString(sb, delimiter, equal, "REVIEWS_ID", myEntity.getReviewsId()); + helpAppendingColumnValueString(sb, delimiter, equal, "LANGUAGES_ID", myEntity.getLanguagesId()); + helpAppendingColumnValueString(sb, delimiter, equal, "REVIEWS_TEXT", myEntity.getReviewsText()); + + sb.delete(0, delimiter.length()).insert(0, mapMarkAndStartBrace).append(endBrace); + return sb.toString(); + } + + private void helpAppendingColumnValueString(StringBuffer sb, String delimiter, String equal, String colName, Object value) { + sb.append(delimiter).append(colName).append(equal); + sb.append(helpGettingColumnStringValue(value)); + } + + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @return Column-value map-string. (NotNull) + */ + public String extractCommonColumnValueMapString(Entity entity) { + return "map:{}"; + } + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @return Column-value map-string. (NotNull) + */ + public String extractCommonColumnValueMapString(Entity entity, String startBrace, String endBrace, String delimiter, String equal) { + return "map:" + startBrace + endBrace; + } + + + // ----------------------------------------------------- + // Convert + // ------- + public java.util.List convertToColumnValueList(Entity entity) { + return new java.util.ArrayList(convertToColumnValueMap(entity).values()); + } + + public java.util.Map convertToColumnValueMap(Entity entity) { + final ReviewsDescription myEntity = downcast(entity); + final java.util.Map valueMap = new java.util.LinkedHashMap(); + valueMap.put("REVIEWS_ID", myEntity.getReviewsId()); + valueMap.put("LANGUAGES_ID", myEntity.getLanguagesId()); + valueMap.put("REVIEWS_TEXT", myEntity.getReviewsText()); + return valueMap; + } + + public java.util.List convertToColumnStringValueList(Entity entity) { + return new java.util.ArrayList(convertToColumnStringValueMap(entity).values()); + } + + public java.util.Map convertToColumnStringValueMap(Entity entity) { + final ReviewsDescription myEntity = downcast(entity); + final java.util.Map valueMap = new java.util.LinkedHashMap(); + valueMap.put("REVIEWS_ID", helpGettingColumnStringValue(myEntity.getReviewsId())); + valueMap.put("LANGUAGES_ID", helpGettingColumnStringValue(myEntity.getLanguagesId())); + valueMap.put("REVIEWS_TEXT", helpGettingColumnStringValue(myEntity.getReviewsText())); + return valueMap; + } + + // =================================================================================== + // JDBC Support + // ============ + public String getPreparedInsertClause() { + return "insert into REVIEWS_DESCRIPTION(REVIEWS_ID, LANGUAGES_ID, REVIEWS_TEXT) values(? , ? , ? )"; + } + + public String getPreparedInsertClause(String tablePrefix) { + return "insert into " + tablePrefix + "REVIEWS_DESCRIPTION(REVIEWS_ID, LANGUAGES_ID, REVIEWS_TEXT) values(? , ? , ? )"; + } + + // =================================================================================== + // Helper + // ====== + protected ReviewsDescription downcast(Entity entity) { + assertObjectNotNull("entity", entity); + try { + return (ReviewsDescription)entity; + } catch (ClassCastException e) { + String msg = "The entity should be ReviewsDescription but it was: " + entity.getClass(); + throw new IllegalStateException(msg, e); + } + } + + protected void checkDowncast(Entity entity) { + downcast(entity); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/dbmeta/SessionsDbm.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/dbmeta/SessionsDbm.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/dbmeta/SessionsDbm.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,672 @@ +package jp.sf.pal.pompei.bsentity.dbmeta; + + +import jp.sf.pal.pompei.allcommon.Entity; +import jp.sf.pal.pompei.allcommon.dbmeta.DBMeta; +import jp.sf.pal.pompei.allcommon.dbmeta.AbstractDBMeta; +import jp.sf.pal.pompei.exentity.Sessions; + +/** + * The dbmeta of SESSIONS. (Singleton) + * + *
+ * [primary-key]
+ *     SESSKEY
+ * 
+ * [column-property]
+ *     SESSKEY, EXPIRY, VALUE
+ * 
+ * [foreign-property]
+ *     
+ * 
+ * [refferer-property]
+ *     
+ * 
+ * [sequence]
+ *     
+ * 
+ * [identity]
+ *     
+ * 
+ * [update-date]
+ *     
+ * 
+ * [version-no]
+ *     
+ * 
+ * 
+ * + * @author DBFlute(AutoGenerator) + */ +public class SessionsDbm extends AbstractDBMeta { + + // =================================================================================== + // Definition + // ========== + /** The type of entity. */ + protected static final Class ENTITY_TYPE = Sessions.class; + + /** Singleton instance. */ + private static final SessionsDbm _instance = new SessionsDbm(); + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + private SessionsDbm() { + } + + // =================================================================================== + // Singleton + // ========= + /** + * Get instance. + * + * @return Singleton instance. (NotNull) + */ + public static SessionsDbm getInstance() { + return _instance; + } + + // =================================================================================== + // Name Definition + // =============== + /** Table db name. */ + public static final String TABLE_DB_NAME = "SESSIONS"; + + /** Table cap-prop name. */ + public static final String TABLE_CAP_PROP_NAME = "Sessions"; + + /** Table uncap-prop name. */ + public static final String TABLE_UNCAP_PROP_NAME = "sessions"; + + /** Db-name of Sesskey. */ + public static final String COLUMN_DB_NAME_OF_Sesskey = "SESSKEY"; + /** Db-name of Expiry. */ + public static final String COLUMN_DB_NAME_OF_Expiry = "EXPIRY"; + /** Db-name of Value. */ + public static final String COLUMN_DB_NAME_OF_Value = "VALUE"; + + /** Cap-prop-name of Sesskey. */ + public static final String COLUMN_CAP_PROP_NAME_OF_Sesskey = "Sesskey"; + /** Cap-prop-name of Expiry. */ + public static final String COLUMN_CAP_PROP_NAME_OF_Expiry = "Expiry"; + /** Cap-prop-name of Value. */ + public static final String COLUMN_CAP_PROP_NAME_OF_Value = "Value"; + + + + /** Uncap-prop-name of Sesskey. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_Sesskey = "sesskey"; + /** Uncap-prop-name of Expiry. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_Expiry = "expiry"; + /** Uncap-prop-name of Value. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_Value = "value"; + + + + /** {db-name : cap-prop-name} map. */ + private static java.util.Map _dbNameCapPropNameMap; + protected static java.util.Map createDbNameCapPropNameMap() { + if (_dbNameCapPropNameMap != null) { + return _dbNameCapPropNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_DB_NAME, TABLE_CAP_PROP_NAME); + + map.put(COLUMN_DB_NAME_OF_Sesskey, COLUMN_CAP_PROP_NAME_OF_Sesskey); + map.put(COLUMN_DB_NAME_OF_Expiry, COLUMN_CAP_PROP_NAME_OF_Expiry); + map.put(COLUMN_DB_NAME_OF_Value, COLUMN_CAP_PROP_NAME_OF_Value); + + _dbNameCapPropNameMap = java.util.Collections.unmodifiableMap(map); + return _dbNameCapPropNameMap; + } + + /** {db-name : uncap-prop-name} map. */ + private static java.util.Map _dbNameUncapPropNameMap; + protected static java.util.Map createDbNameUncapPropNameMap() { + if (_dbNameUncapPropNameMap != null) { + return _dbNameUncapPropNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_DB_NAME, TABLE_UNCAP_PROP_NAME); + + map.put(COLUMN_DB_NAME_OF_Sesskey, COLUMN_UNCAP_PROP_NAME_OF_Sesskey); + map.put(COLUMN_DB_NAME_OF_Expiry, COLUMN_UNCAP_PROP_NAME_OF_Expiry); + map.put(COLUMN_DB_NAME_OF_Value, COLUMN_UNCAP_PROP_NAME_OF_Value); + + _dbNameUncapPropNameMap = java.util.Collections.unmodifiableMap(map); + return _dbNameUncapPropNameMap; + } + + /** {cap-prop-name : db-name} map. */ + private static java.util.Map _capPropNameDbNameMap; + protected static java.util.Map createCapPropNameDbNameMap() { + if (_capPropNameDbNameMap != null) { + return _capPropNameDbNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_CAP_PROP_NAME, TABLE_DB_NAME); + + map.put(COLUMN_CAP_PROP_NAME_OF_Sesskey, COLUMN_DB_NAME_OF_Sesskey); + map.put(COLUMN_CAP_PROP_NAME_OF_Expiry, COLUMN_DB_NAME_OF_Expiry); + map.put(COLUMN_CAP_PROP_NAME_OF_Value, COLUMN_DB_NAME_OF_Value); + + _capPropNameDbNameMap = java.util.Collections.unmodifiableMap(map); + return _capPropNameDbNameMap; + } + + /** {cap-prop-name : uncap-prop-name} map. */ + private static java.util.Map _capPropNameUncapPropNameMap; + protected static java.util.Map createCapPropNameUncapPropNameMap() { + if (_capPropNameUncapPropNameMap != null) { + return _capPropNameUncapPropNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_CAP_PROP_NAME, TABLE_UNCAP_PROP_NAME); + + map.put(COLUMN_CAP_PROP_NAME_OF_Sesskey, COLUMN_UNCAP_PROP_NAME_OF_Sesskey); + map.put(COLUMN_CAP_PROP_NAME_OF_Expiry, COLUMN_UNCAP_PROP_NAME_OF_Expiry); + map.put(COLUMN_CAP_PROP_NAME_OF_Value, COLUMN_UNCAP_PROP_NAME_OF_Value); + + _capPropNameUncapPropNameMap = java.util.Collections.unmodifiableMap(map); + return _capPropNameUncapPropNameMap; + } + + /** {uncap-prop-name : db-name} map. */ + private static java.util.Map _uncapPropNameDbNameMap; + protected static java.util.Map createUncapPropNameDbNameMap() { + if (_uncapPropNameDbNameMap != null) { + return _uncapPropNameDbNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_UNCAP_PROP_NAME, TABLE_DB_NAME); + + map.put(COLUMN_UNCAP_PROP_NAME_OF_Sesskey, COLUMN_DB_NAME_OF_Sesskey); + map.put(COLUMN_UNCAP_PROP_NAME_OF_Expiry, COLUMN_DB_NAME_OF_Expiry); + map.put(COLUMN_UNCAP_PROP_NAME_OF_Value, COLUMN_DB_NAME_OF_Value); + + _uncapPropNameDbNameMap = java.util.Collections.unmodifiableMap(map); + return _uncapPropNameDbNameMap; + } + + /** {uncap-prop-name : cap-prop-name} map. */ + private static java.util.Map _uncapPropNameCapPropNameMap; + protected static java.util.Map createUncapPropNameCapPropNameMap() { + if (_uncapPropNameCapPropNameMap != null) { + return _uncapPropNameCapPropNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_UNCAP_PROP_NAME, TABLE_CAP_PROP_NAME); + + map.put(COLUMN_UNCAP_PROP_NAME_OF_Sesskey, COLUMN_CAP_PROP_NAME_OF_Sesskey); + map.put(COLUMN_UNCAP_PROP_NAME_OF_Expiry, COLUMN_CAP_PROP_NAME_OF_Expiry); + map.put(COLUMN_UNCAP_PROP_NAME_OF_Value, COLUMN_CAP_PROP_NAME_OF_Value); + + _uncapPropNameCapPropNameMap = java.util.Collections.unmodifiableMap(map); + return _uncapPropNameCapPropNameMap; + } + + // =================================================================================== + // Name-Map + // ======== + /** + * This method implements the method that is declared at super. + * + * @return {db-name : cap-prop-name} map. + */ + public java.util.Map getDbNameCapPropNameMap() { + return createDbNameCapPropNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {db-name : uncap-prop-name} map. + */ + public java.util.Map getDbNameUncapPropNameMap() { + return createDbNameUncapPropNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {cap-prop-name : db-name} map. + */ + public java.util.Map getCapPropNameDbNameMap() { + return createCapPropNameDbNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {cap-prop-name : uncap-prop-name} map. + */ + public java.util.Map getCapPropNameUncapPropNameMap() { + return createCapPropNameUncapPropNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {uncap-prop-name : db-name} map. + */ + public java.util.Map getUncapPropNameDbNameMap() { + return createUncapPropNameDbNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {uncap-prop-name : cap-prop-name} map. + */ + public java.util.Map getUncapPropNameCapPropNameMap() { + return createUncapPropNameCapPropNameMap(); + } + + // =================================================================================== + // Table Name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + public String getTableDbName() { + return TABLE_DB_NAME; + } + + /** + * This method implements the method that is declared at super. + * + * @return Table cap-prop-name. (NotNull) + */ + public String getTableCapPropName() { + return TABLE_CAP_PROP_NAME; + } + + /** + * This method implements the method that is declared at super. + * + * @return Table property-name. (NotNull) + */ + public String getTableUncapPropName() { + return TABLE_UNCAP_PROP_NAME; + } + + // =================================================================================== + // Column Name + // =========== + public java.util.List getColumnDbNameList() { + final String[] columns = getColumnDbNameCommaString().split(","); + final java.util.List resultList = new java.util.ArrayList(); + for (int i=0; i < columns.length; i++) { + resultList.add(columns[i].trim()); + } + return resultList; + } + + public java.util.List getColumnCapPropNameList() { + final java.util.List columnDbNameList = getColumnDbNameList(); + final java.util.List resultList = new java.util.ArrayList(); + for (final java.util.Iterator ite = columnDbNameList.iterator(); ite.hasNext(); ) { + resultList.add(getDbNameCapPropNameMap().get((String)ite.next())); + } + return resultList; + } + + public java.util.List getColumnUncapPropNameList() { + final java.util.List columnDbNameList = getColumnDbNameList(); + final java.util.List resultList = new java.util.ArrayList(); + for (final java.util.Iterator ite = columnDbNameList.iterator(); ite.hasNext(); ) { + resultList.add(getDbNameUncapPropNameMap().get((String)ite.next())); + } + return resultList; + } + + /** + * This method implements the method that is declared at super. + * + * @return Column-db-name comma-string. (NotNull) + */ + public String getColumnDbNameCommaString() { + return "SESSKEY, EXPIRY, VALUE"; + } + + // =================================================================================== + // Type Name + // ========= + /** + * This method implements the method that is declared at super. + * + * @return The type-name of entity. (NotNull) + */ + public String getEntityTypeName() { + return "jp.sf.pal.pompei.exentity.Sessions"; + } + + /** + * This method implements the method that is declared at super. + * + * @return The type-name of condition-bean. (NotNull) + */ + public String getConditionBeanTypeName() { + return "jp.sf.pal.pompei.cbean.bs.SessionsCB"; + } + + /** + * This method implements the method that is declared at super. + * + * @return The type-name of dao. (NotNull) + */ + public String getDaoTypeName() { + return "jp.sf.pal.pompei.exdao.SessionsDao"; + } + + /** + * This method implements the method that is declared at super. + * + * @return The type-name of behavior. (NotNull) + */ + public String getBehaviorTypeName() { + return "jp.sf.pal.pompei.exbhv.SessionsBhv"; + } + + // =================================================================================== + // Type + // ==== + /** + * This method implements the method that is declared at super. + * + * @return The type of entity. (NotNull) + */ + public Class getEntityType() { + return ENTITY_TYPE; + } + + // =================================================================================== + // Instance + // ======== + /** + * This method implements the method that is declared at super. + * + * @return The type of entity. (NotNull) + */ + public Entity newEntity() { + return newMyEntity(); + } + + /** + * New the instance of my entity. + * + * @return The instance of my entity. (NotNull) + */ + public Sessions newMyEntity() { + return new Sessions(); + } + + // =================================================================================== + // Foreign DBMeta + // ============== + /** + * This method implements the method that is declared at super. + * + * @param foreignPropertyName Foreign-property-name(Both OK - InitCap or not). (NotNull) + * @return Foreign DBMeta. (NotNull) + */ + public DBMeta getForeignDBMeta(String foreignPropertyName) { + assertStringNotNullAndNotTrimmedEmpty("foreignPropertyName", foreignPropertyName); + final String methodName = "getForeignDBMeta_" + foreignPropertyName.substring(0, 1) + foreignPropertyName.substring(1); + + java.lang.reflect.Method method = null; + try { + method = this.getClass().getMethod(methodName, new Class[]{}); + } catch (NoSuchMethodException e) { + String msg = "The foreignPropertyName is not found: foreignPropertyName=" + foreignPropertyName; + msg = msg + " tableName=" + TABLE_DB_NAME + " methodName=" + methodName; + throw new RuntimeException(msg, e); + } + try { + return (DBMeta)method.invoke(this, new Object[]{}); + } catch (IllegalAccessException e) { + throw new RuntimeException(e); + } catch (java.lang.reflect.InvocationTargetException e) { + throw new RuntimeException(e.getCause()); + } + } + + // =================================================================================== + // Determination + // ============= + /** + * This method implements the method that is declared at super. + * + * @return Determination. + */ + public boolean hasTwoOrMorePrimaryKeys() { + return false; + } + + /** + * This method implements the method that is declared at super. + * + * @return Determination. + */ + public boolean hasCommonColumn() { + return false; + } + + // =================================================================================== + // Entity Handling + // =============== + // ----------------------------------------------------- + // Accept + // ------ + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @param primaryKeyMap Primary key map. (NotNull and NotEmpty) + */ + public void acceptPrimaryKeyMap(Entity entity, java.util.Map primaryKeyMap) { + final Sessions myEntity = (Sessions)entity; + MapAssertUtil.assertPrimaryKeyMapNotNullAndNotEmpty(primaryKeyMap); + final MapStringValueAnalyzer analyzer = new MapStringValueAnalyzer(primaryKeyMap, entity.getModifiedPropertyNames()); + + MapAssertUtil.assertColumnExistingInPrimaryKeyMap(primaryKeyMap, "SESSKEY"); + if (analyzer.init("SESSKEY", "sesskey", "sesskey")) { myEntity.setSesskey(analyzer.analyzeString(String.class)); }; + + + } + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @param primaryKeyMapString Primary-key map-string. (NotNull and NotEmpty) + */ + public void acceptPrimaryKeyMapString(Entity entity, String primaryKeyMapString) { + MapStringUtil.acceptPrimaryKeyMapString(primaryKeyMapString, entity); + } + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @param columnValueMap Column-value map. (NotNull and NotEmpty) + */ + public void acceptColumnValueMap(Entity entity, java.util.Map columnValueMap) { + final Sessions myEntity = (Sessions)entity; + MapAssertUtil.assertColumnValueMapNotNullAndNotEmpty(columnValueMap); + final MapStringValueAnalyzer analyzer = new MapStringValueAnalyzer(columnValueMap, entity.getModifiedPropertyNames()); + + if (analyzer.init("SESSKEY", "sesskey", "sesskey")) { myEntity.setSesskey(analyzer.analyzeString(String.class)); }; + if (analyzer.init("EXPIRY", "expiry", "expiry")) { myEntity.setExpiry(analyzer.analyzeNumber(java.math.BigDecimal.class)); }; + if (analyzer.init("VALUE", "value", "value")) { myEntity.setValue(analyzer.analyzeString(String.class)); }; + + } + + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @param columnValueMapString Column-value map-string. (NotNull and NotEmpty) + */ + public void acceptColumnValueMapString(Entity entity, String columnValueMapString) { + MapStringUtil.acceptColumnValueMapString(columnValueMapString, entity); + } + + + // ----------------------------------------------------- + // Extract + // ------- + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @return Primary-key map-string. (NotNull) + */ + public String extractPrimaryKeyMapString(Entity entity) { + return MapStringUtil.extractPrimaryKeyMapString(entity); + } + + /** + * Extract primary-key map-string. + * + * @param entity Target entity. (NotNull) + * @param startBrace Start-brace. (NotNull) + * @param endBrace End-brace. (NotNull) + * @param delimiter Delimiter. (NotNull) + * @param equal Equal. (NotNull) + * @return Primary-key map-string. (NotNull) + */ + public String extractPrimaryKeyMapString(Entity entity, String startBrace, String endBrace, String delimiter, String equal) { + final Sessions myEntity = (Sessions)entity; + final String mapMarkAndStartBrace = MAP_STRING_MAP_MARK + startBrace; + final StringBuffer sb = new StringBuffer(); + helpAppendingColumnValueString(sb, delimiter, equal, "SESSKEY", myEntity.getSesskey()); + + sb.delete(0, delimiter.length()).insert(0, mapMarkAndStartBrace).append(endBrace); + return sb.toString(); + + } + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @return Column-value map-string. (NotNull) + */ + public String extractColumnValueMapString(Entity entity) { + return MapStringUtil.extractColumnValueMapString(entity); + } + + /** + * Extract column-value map-string. + * + * @param entity Target entity. (NotNull) + * @param startBrace Start-brace. (NotNull) + * @param endBrace End-brace. (NotNull) + * @param delimiter Delimiter. (NotNull) + * @param equal Equal. (NotNull) + * @return Column-value map-string. (NotNull) + */ + public String extractColumnValueMapString(Entity entity, String startBrace, String endBrace, String delimiter, String equal) { + final Sessions myEntity = (Sessions)entity; + final String mapMarkAndStartBrace = MAP_STRING_MAP_MARK + startBrace; + final StringBuffer sb = new StringBuffer(); + helpAppendingColumnValueString(sb, delimiter, equal, "SESSKEY", myEntity.getSesskey()); + helpAppendingColumnValueString(sb, delimiter, equal, "EXPIRY", myEntity.getExpiry()); + helpAppendingColumnValueString(sb, delimiter, equal, "VALUE", myEntity.getValue()); + + sb.delete(0, delimiter.length()).insert(0, mapMarkAndStartBrace).append(endBrace); + return sb.toString(); + } + + private void helpAppendingColumnValueString(StringBuffer sb, String delimiter, String equal, String colName, Object value) { + sb.append(delimiter).append(colName).append(equal); + sb.append(helpGettingColumnStringValue(value)); + } + + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @return Column-value map-string. (NotNull) + */ + public String extractCommonColumnValueMapString(Entity entity) { + return "map:{}"; + } + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @return Column-value map-string. (NotNull) + */ + public String extractCommonColumnValueMapString(Entity entity, String startBrace, String endBrace, String delimiter, String equal) { + return "map:" + startBrace + endBrace; + } + + + // ----------------------------------------------------- + // Convert + // ------- + public java.util.List convertToColumnValueList(Entity entity) { + return new java.util.ArrayList(convertToColumnValueMap(entity).values()); + } + + public java.util.Map convertToColumnValueMap(Entity entity) { + final Sessions myEntity = downcast(entity); + final java.util.Map valueMap = new java.util.LinkedHashMap(); + valueMap.put("SESSKEY", myEntity.getSesskey()); + valueMap.put("EXPIRY", myEntity.getExpiry()); + valueMap.put("VALUE", myEntity.getValue()); + return valueMap; + } + + public java.util.List convertToColumnStringValueList(Entity entity) { + return new java.util.ArrayList(convertToColumnStringValueMap(entity).values()); + } + + public java.util.Map convertToColumnStringValueMap(Entity entity) { + final Sessions myEntity = downcast(entity); + final java.util.Map valueMap = new java.util.LinkedHashMap(); + valueMap.put("SESSKEY", helpGettingColumnStringValue(myEntity.getSesskey())); + valueMap.put("EXPIRY", helpGettingColumnStringValue(myEntity.getExpiry())); + valueMap.put("VALUE", helpGettingColumnStringValue(myEntity.getValue())); + return valueMap; + } + + // =================================================================================== + // JDBC Support + // ============ + public String getPreparedInsertClause() { + return "insert into SESSIONS(SESSKEY, EXPIRY, VALUE) values(? , ? , ? )"; + } + + public String getPreparedInsertClause(String tablePrefix) { + return "insert into " + tablePrefix + "SESSIONS(SESSKEY, EXPIRY, VALUE) values(? , ? , ? )"; + } + + // =================================================================================== + // Helper + // ====== + protected Sessions downcast(Entity entity) { + assertObjectNotNull("entity", entity); + try { + return (Sessions)entity; + } catch (ClassCastException e) { + String msg = "The entity should be Sessions but it was: " + entity.getClass(); + throw new IllegalStateException(msg, e); + } + } + + protected void checkDowncast(Entity entity) { + downcast(entity); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/dbmeta/SpecialsDbm.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/dbmeta/SpecialsDbm.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/dbmeta/SpecialsDbm.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,752 @@ +package jp.sf.pal.pompei.bsentity.dbmeta; + + +import jp.sf.pal.pompei.allcommon.Entity; +import jp.sf.pal.pompei.allcommon.dbmeta.DBMeta; +import jp.sf.pal.pompei.allcommon.dbmeta.AbstractDBMeta; +import jp.sf.pal.pompei.exentity.Specials; + +/** + * The dbmeta of SPECIALS. (Singleton) + * + *
+ * [primary-key]
+ *     SPECIALS_ID
+ * 
+ * [column-property]
+ *     SPECIALS_ID, PRODUCTS_ID, SPECIALS_NEW_PRODUCTS_PRICE, SPECIALS_DATE_ADDED, SPECIALS_LAST_MODIFIED, EXPIRES_DATE, DATE_STATUS_CHANGE, STATUS
+ * 
+ * [foreign-property]
+ *     
+ * 
+ * [refferer-property]
+ *     
+ * 
+ * [sequence]
+ *     
+ * 
+ * [identity]
+ *     
+ * 
+ * [update-date]
+ *     
+ * 
+ * [version-no]
+ *     
+ * 
+ * 
+ * + * @author DBFlute(AutoGenerator) + */ +public class SpecialsDbm extends AbstractDBMeta { + + // =================================================================================== + // Definition + // ========== + /** The type of entity. */ + protected static final Class ENTITY_TYPE = Specials.class; + + /** Singleton instance. */ + private static final SpecialsDbm _instance = new SpecialsDbm(); + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + private SpecialsDbm() { + } + + // =================================================================================== + // Singleton + // ========= + /** + * Get instance. + * + * @return Singleton instance. (NotNull) + */ + public static SpecialsDbm getInstance() { + return _instance; + } + + // =================================================================================== + // Name Definition + // =============== + /** Table db name. */ + public static final String TABLE_DB_NAME = "SPECIALS"; + + /** Table cap-prop name. */ + public static final String TABLE_CAP_PROP_NAME = "Specials"; + + /** Table uncap-prop name. */ + public static final String TABLE_UNCAP_PROP_NAME = "specials"; + + /** Db-name of SpecialsId. */ + public static final String COLUMN_DB_NAME_OF_SpecialsId = "SPECIALS_ID"; + /** Db-name of ProductsId. */ + public static final String COLUMN_DB_NAME_OF_ProductsId = "PRODUCTS_ID"; + /** Db-name of SpecialsNewProductsPrice. */ + public static final String COLUMN_DB_NAME_OF_SpecialsNewProductsPrice = "SPECIALS_NEW_PRODUCTS_PRICE"; + /** Db-name of SpecialsDateAdded. */ + public static final String COLUMN_DB_NAME_OF_SpecialsDateAdded = "SPECIALS_DATE_ADDED"; + /** Db-name of SpecialsLastModified. */ + public static final String COLUMN_DB_NAME_OF_SpecialsLastModified = "SPECIALS_LAST_MODIFIED"; + /** Db-name of ExpiresDate. */ + public static final String COLUMN_DB_NAME_OF_ExpiresDate = "EXPIRES_DATE"; + /** Db-name of DateStatusChange. */ + public static final String COLUMN_DB_NAME_OF_DateStatusChange = "DATE_STATUS_CHANGE"; + /** Db-name of Status. */ + public static final String COLUMN_DB_NAME_OF_Status = "STATUS"; + + /** Cap-prop-name of SpecialsId. */ + public static final String COLUMN_CAP_PROP_NAME_OF_SpecialsId = "SpecialsId"; + /** Cap-prop-name of ProductsId. */ + public static final String COLUMN_CAP_PROP_NAME_OF_ProductsId = "ProductsId"; + /** Cap-prop-name of SpecialsNewProductsPrice. */ + public static final String COLUMN_CAP_PROP_NAME_OF_SpecialsNewProductsPrice = "SpecialsNewProductsPrice"; + /** Cap-prop-name of SpecialsDateAdded. */ + public static final String COLUMN_CAP_PROP_NAME_OF_SpecialsDateAdded = "SpecialsDateAdded"; + /** Cap-prop-name of SpecialsLastModified. */ + public static final String COLUMN_CAP_PROP_NAME_OF_SpecialsLastModified = "SpecialsLastModified"; + /** Cap-prop-name of ExpiresDate. */ + public static final String COLUMN_CAP_PROP_NAME_OF_ExpiresDate = "ExpiresDate"; + /** Cap-prop-name of DateStatusChange. */ + public static final String COLUMN_CAP_PROP_NAME_OF_DateStatusChange = "DateStatusChange"; + /** Cap-prop-name of Status. */ + public static final String COLUMN_CAP_PROP_NAME_OF_Status = "Status"; + + + + /** Uncap-prop-name of SpecialsId. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_SpecialsId = "specialsId"; + /** Uncap-prop-name of ProductsId. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_ProductsId = "productsId"; + /** Uncap-prop-name of SpecialsNewProductsPrice. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_SpecialsNewProductsPrice = "specialsNewProductsPrice"; + /** Uncap-prop-name of SpecialsDateAdded. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_SpecialsDateAdded = "specialsDateAdded"; + /** Uncap-prop-name of SpecialsLastModified. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_SpecialsLastModified = "specialsLastModified"; + /** Uncap-prop-name of ExpiresDate. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_ExpiresDate = "expiresDate"; + /** Uncap-prop-name of DateStatusChange. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_DateStatusChange = "dateStatusChange"; + /** Uncap-prop-name of Status. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_Status = "status"; + + + + /** {db-name : cap-prop-name} map. */ + private static java.util.Map _dbNameCapPropNameMap; + protected static java.util.Map createDbNameCapPropNameMap() { + if (_dbNameCapPropNameMap != null) { + return _dbNameCapPropNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_DB_NAME, TABLE_CAP_PROP_NAME); + + map.put(COLUMN_DB_NAME_OF_SpecialsId, COLUMN_CAP_PROP_NAME_OF_SpecialsId); + map.put(COLUMN_DB_NAME_OF_ProductsId, COLUMN_CAP_PROP_NAME_OF_ProductsId); + map.put(COLUMN_DB_NAME_OF_SpecialsNewProductsPrice, COLUMN_CAP_PROP_NAME_OF_SpecialsNewProductsPrice); + map.put(COLUMN_DB_NAME_OF_SpecialsDateAdded, COLUMN_CAP_PROP_NAME_OF_SpecialsDateAdded); + map.put(COLUMN_DB_NAME_OF_SpecialsLastModified, COLUMN_CAP_PROP_NAME_OF_SpecialsLastModified); + map.put(COLUMN_DB_NAME_OF_ExpiresDate, COLUMN_CAP_PROP_NAME_OF_ExpiresDate); + map.put(COLUMN_DB_NAME_OF_DateStatusChange, COLUMN_CAP_PROP_NAME_OF_DateStatusChange); + map.put(COLUMN_DB_NAME_OF_Status, COLUMN_CAP_PROP_NAME_OF_Status); + + _dbNameCapPropNameMap = java.util.Collections.unmodifiableMap(map); + return _dbNameCapPropNameMap; + } + + /** {db-name : uncap-prop-name} map. */ + private static java.util.Map _dbNameUncapPropNameMap; + protected static java.util.Map createDbNameUncapPropNameMap() { + if (_dbNameUncapPropNameMap != null) { + return _dbNameUncapPropNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_DB_NAME, TABLE_UNCAP_PROP_NAME); + + map.put(COLUMN_DB_NAME_OF_SpecialsId, COLUMN_UNCAP_PROP_NAME_OF_SpecialsId); + map.put(COLUMN_DB_NAME_OF_ProductsId, COLUMN_UNCAP_PROP_NAME_OF_ProductsId); + map.put(COLUMN_DB_NAME_OF_SpecialsNewProductsPrice, COLUMN_UNCAP_PROP_NAME_OF_SpecialsNewProductsPrice); + map.put(COLUMN_DB_NAME_OF_SpecialsDateAdded, COLUMN_UNCAP_PROP_NAME_OF_SpecialsDateAdded); + map.put(COLUMN_DB_NAME_OF_SpecialsLastModified, COLUMN_UNCAP_PROP_NAME_OF_SpecialsLastModified); + map.put(COLUMN_DB_NAME_OF_ExpiresDate, COLUMN_UNCAP_PROP_NAME_OF_ExpiresDate); + map.put(COLUMN_DB_NAME_OF_DateStatusChange, COLUMN_UNCAP_PROP_NAME_OF_DateStatusChange); + map.put(COLUMN_DB_NAME_OF_Status, COLUMN_UNCAP_PROP_NAME_OF_Status); + + _dbNameUncapPropNameMap = java.util.Collections.unmodifiableMap(map); + return _dbNameUncapPropNameMap; + } + + /** {cap-prop-name : db-name} map. */ + private static java.util.Map _capPropNameDbNameMap; + protected static java.util.Map createCapPropNameDbNameMap() { + if (_capPropNameDbNameMap != null) { + return _capPropNameDbNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_CAP_PROP_NAME, TABLE_DB_NAME); + + map.put(COLUMN_CAP_PROP_NAME_OF_SpecialsId, COLUMN_DB_NAME_OF_SpecialsId); + map.put(COLUMN_CAP_PROP_NAME_OF_ProductsId, COLUMN_DB_NAME_OF_ProductsId); + map.put(COLUMN_CAP_PROP_NAME_OF_SpecialsNewProductsPrice, COLUMN_DB_NAME_OF_SpecialsNewProductsPrice); + map.put(COLUMN_CAP_PROP_NAME_OF_SpecialsDateAdded, COLUMN_DB_NAME_OF_SpecialsDateAdded); + map.put(COLUMN_CAP_PROP_NAME_OF_SpecialsLastModified, COLUMN_DB_NAME_OF_SpecialsLastModified); + map.put(COLUMN_CAP_PROP_NAME_OF_ExpiresDate, COLUMN_DB_NAME_OF_ExpiresDate); + map.put(COLUMN_CAP_PROP_NAME_OF_DateStatusChange, COLUMN_DB_NAME_OF_DateStatusChange); + map.put(COLUMN_CAP_PROP_NAME_OF_Status, COLUMN_DB_NAME_OF_Status); + + _capPropNameDbNameMap = java.util.Collections.unmodifiableMap(map); + return _capPropNameDbNameMap; + } + + /** {cap-prop-name : uncap-prop-name} map. */ + private static java.util.Map _capPropNameUncapPropNameMap; + protected static java.util.Map createCapPropNameUncapPropNameMap() { + if (_capPropNameUncapPropNameMap != null) { + return _capPropNameUncapPropNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_CAP_PROP_NAME, TABLE_UNCAP_PROP_NAME); + + map.put(COLUMN_CAP_PROP_NAME_OF_SpecialsId, COLUMN_UNCAP_PROP_NAME_OF_SpecialsId); + map.put(COLUMN_CAP_PROP_NAME_OF_ProductsId, COLUMN_UNCAP_PROP_NAME_OF_ProductsId); + map.put(COLUMN_CAP_PROP_NAME_OF_SpecialsNewProductsPrice, COLUMN_UNCAP_PROP_NAME_OF_SpecialsNewProductsPrice); + map.put(COLUMN_CAP_PROP_NAME_OF_SpecialsDateAdded, COLUMN_UNCAP_PROP_NAME_OF_SpecialsDateAdded); + map.put(COLUMN_CAP_PROP_NAME_OF_SpecialsLastModified, COLUMN_UNCAP_PROP_NAME_OF_SpecialsLastModified); + map.put(COLUMN_CAP_PROP_NAME_OF_ExpiresDate, COLUMN_UNCAP_PROP_NAME_OF_ExpiresDate); + map.put(COLUMN_CAP_PROP_NAME_OF_DateStatusChange, COLUMN_UNCAP_PROP_NAME_OF_DateStatusChange); + map.put(COLUMN_CAP_PROP_NAME_OF_Status, COLUMN_UNCAP_PROP_NAME_OF_Status); + + _capPropNameUncapPropNameMap = java.util.Collections.unmodifiableMap(map); + return _capPropNameUncapPropNameMap; + } + + /** {uncap-prop-name : db-name} map. */ + private static java.util.Map _uncapPropNameDbNameMap; + protected static java.util.Map createUncapPropNameDbNameMap() { + if (_uncapPropNameDbNameMap != null) { + return _uncapPropNameDbNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_UNCAP_PROP_NAME, TABLE_DB_NAME); + + map.put(COLUMN_UNCAP_PROP_NAME_OF_SpecialsId, COLUMN_DB_NAME_OF_SpecialsId); + map.put(COLUMN_UNCAP_PROP_NAME_OF_ProductsId, COLUMN_DB_NAME_OF_ProductsId); + map.put(COLUMN_UNCAP_PROP_NAME_OF_SpecialsNewProductsPrice, COLUMN_DB_NAME_OF_SpecialsNewProductsPrice); + map.put(COLUMN_UNCAP_PROP_NAME_OF_SpecialsDateAdded, COLUMN_DB_NAME_OF_SpecialsDateAdded); + map.put(COLUMN_UNCAP_PROP_NAME_OF_SpecialsLastModified, COLUMN_DB_NAME_OF_SpecialsLastModified); + map.put(COLUMN_UNCAP_PROP_NAME_OF_ExpiresDate, COLUMN_DB_NAME_OF_ExpiresDate); + map.put(COLUMN_UNCAP_PROP_NAME_OF_DateStatusChange, COLUMN_DB_NAME_OF_DateStatusChange); + map.put(COLUMN_UNCAP_PROP_NAME_OF_Status, COLUMN_DB_NAME_OF_Status); + + _uncapPropNameDbNameMap = java.util.Collections.unmodifiableMap(map); + return _uncapPropNameDbNameMap; + } + + /** {uncap-prop-name : cap-prop-name} map. */ + private static java.util.Map _uncapPropNameCapPropNameMap; + protected static java.util.Map createUncapPropNameCapPropNameMap() { + if (_uncapPropNameCapPropNameMap != null) { + return _uncapPropNameCapPropNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_UNCAP_PROP_NAME, TABLE_CAP_PROP_NAME); + + map.put(COLUMN_UNCAP_PROP_NAME_OF_SpecialsId, COLUMN_CAP_PROP_NAME_OF_SpecialsId); + map.put(COLUMN_UNCAP_PROP_NAME_OF_ProductsId, COLUMN_CAP_PROP_NAME_OF_ProductsId); + map.put(COLUMN_UNCAP_PROP_NAME_OF_SpecialsNewProductsPrice, COLUMN_CAP_PROP_NAME_OF_SpecialsNewProductsPrice); + map.put(COLUMN_UNCAP_PROP_NAME_OF_SpecialsDateAdded, COLUMN_CAP_PROP_NAME_OF_SpecialsDateAdded); + map.put(COLUMN_UNCAP_PROP_NAME_OF_SpecialsLastModified, COLUMN_CAP_PROP_NAME_OF_SpecialsLastModified); + map.put(COLUMN_UNCAP_PROP_NAME_OF_ExpiresDate, COLUMN_CAP_PROP_NAME_OF_ExpiresDate); + map.put(COLUMN_UNCAP_PROP_NAME_OF_DateStatusChange, COLUMN_CAP_PROP_NAME_OF_DateStatusChange); + map.put(COLUMN_UNCAP_PROP_NAME_OF_Status, COLUMN_CAP_PROP_NAME_OF_Status); + + _uncapPropNameCapPropNameMap = java.util.Collections.unmodifiableMap(map); + return _uncapPropNameCapPropNameMap; + } + + // =================================================================================== + // Name-Map + // ======== + /** + * This method implements the method that is declared at super. + * + * @return {db-name : cap-prop-name} map. + */ + public java.util.Map getDbNameCapPropNameMap() { + return createDbNameCapPropNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {db-name : uncap-prop-name} map. + */ + public java.util.Map getDbNameUncapPropNameMap() { + return createDbNameUncapPropNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {cap-prop-name : db-name} map. + */ + public java.util.Map getCapPropNameDbNameMap() { + return createCapPropNameDbNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {cap-prop-name : uncap-prop-name} map. + */ + public java.util.Map getCapPropNameUncapPropNameMap() { + return createCapPropNameUncapPropNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {uncap-prop-name : db-name} map. + */ + public java.util.Map getUncapPropNameDbNameMap() { + return createUncapPropNameDbNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {uncap-prop-name : cap-prop-name} map. + */ + public java.util.Map getUncapPropNameCapPropNameMap() { + return createUncapPropNameCapPropNameMap(); + } + + // =================================================================================== + // Table Name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + public String getTableDbName() { + return TABLE_DB_NAME; + } + + /** + * This method implements the method that is declared at super. + * + * @return Table cap-prop-name. (NotNull) + */ + public String getTableCapPropName() { + return TABLE_CAP_PROP_NAME; + } + + /** + * This method implements the method that is declared at super. + * + * @return Table property-name. (NotNull) + */ + public String getTableUncapPropName() { + return TABLE_UNCAP_PROP_NAME; + } + + // =================================================================================== + // Column Name + // =========== + public java.util.List getColumnDbNameList() { + final String[] columns = getColumnDbNameCommaString().split(","); + final java.util.List resultList = new java.util.ArrayList(); + for (int i=0; i < columns.length; i++) { + resultList.add(columns[i].trim()); + } + return resultList; + } + + public java.util.List getColumnCapPropNameList() { + final java.util.List columnDbNameList = getColumnDbNameList(); + final java.util.List resultList = new java.util.ArrayList(); + for (final java.util.Iterator ite = columnDbNameList.iterator(); ite.hasNext(); ) { + resultList.add(getDbNameCapPropNameMap().get((String)ite.next())); + } + return resultList; + } + + public java.util.List getColumnUncapPropNameList() { + final java.util.List columnDbNameList = getColumnDbNameList(); + final java.util.List resultList = new java.util.ArrayList(); + for (final java.util.Iterator ite = columnDbNameList.iterator(); ite.hasNext(); ) { + resultList.add(getDbNameUncapPropNameMap().get((String)ite.next())); + } + return resultList; + } + + /** + * This method implements the method that is declared at super. + * + * @return Column-db-name comma-string. (NotNull) + */ + public String getColumnDbNameCommaString() { + return "SPECIALS_ID, PRODUCTS_ID, SPECIALS_NEW_PRODUCTS_PRICE, SPECIALS_DATE_ADDED, SPECIALS_LAST_MODIFIED, EXPIRES_DATE, DATE_STATUS_CHANGE, STATUS"; + } + + // =================================================================================== + // Type Name + // ========= + /** + * This method implements the method that is declared at super. + * + * @return The type-name of entity. (NotNull) + */ + public String getEntityTypeName() { + return "jp.sf.pal.pompei.exentity.Specials"; + } + + /** + * This method implements the method that is declared at super. + * + * @return The type-name of condition-bean. (NotNull) + */ + public String getConditionBeanTypeName() { + return "jp.sf.pal.pompei.cbean.bs.SpecialsCB"; + } + + /** + * This method implements the method that is declared at super. + * + * @return The type-name of dao. (NotNull) + */ + public String getDaoTypeName() { + return "jp.sf.pal.pompei.exdao.SpecialsDao"; + } + + /** + * This method implements the method that is declared at super. + * + * @return The type-name of behavior. (NotNull) + */ + public String getBehaviorTypeName() { + return "jp.sf.pal.pompei.exbhv.SpecialsBhv"; + } + + // =================================================================================== + // Type + // ==== + /** + * This method implements the method that is declared at super. + * + * @return The type of entity. (NotNull) + */ + public Class getEntityType() { + return ENTITY_TYPE; + } + + // =================================================================================== + // Instance + // ======== + /** + * This method implements the method that is declared at super. + * + * @return The type of entity. (NotNull) + */ + public Entity newEntity() { + return newMyEntity(); + } + + /** + * New the instance of my entity. + * + * @return The instance of my entity. (NotNull) + */ + public Specials newMyEntity() { + return new Specials(); + } + + // =================================================================================== + // Foreign DBMeta + // ============== + /** + * This method implements the method that is declared at super. + * + * @param foreignPropertyName Foreign-property-name(Both OK - InitCap or not). (NotNull) + * @return Foreign DBMeta. (NotNull) + */ + public DBMeta getForeignDBMeta(String foreignPropertyName) { + assertStringNotNullAndNotTrimmedEmpty("foreignPropertyName", foreignPropertyName); + final String methodName = "getForeignDBMeta_" + foreignPropertyName.substring(0, 1) + foreignPropertyName.substring(1); + + java.lang.reflect.Method method = null; + try { + method = this.getClass().getMethod(methodName, new Class[]{}); + } catch (NoSuchMethodException e) { + String msg = "The foreignPropertyName is not found: foreignPropertyName=" + foreignPropertyName; + msg = msg + " tableName=" + TABLE_DB_NAME + " methodName=" + methodName; + throw new RuntimeException(msg, e); + } + try { + return (DBMeta)method.invoke(this, new Object[]{}); + } catch (IllegalAccessException e) { + throw new RuntimeException(e); + } catch (java.lang.reflect.InvocationTargetException e) { + throw new RuntimeException(e.getCause()); + } + } + + // =================================================================================== + // Determination + // ============= + /** + * This method implements the method that is declared at super. + * + * @return Determination. + */ + public boolean hasTwoOrMorePrimaryKeys() { + return false; + } + + /** + * This method implements the method that is declared at super. + * + * @return Determination. + */ + public boolean hasCommonColumn() { + return false; + } + + // =================================================================================== + // Entity Handling + // =============== + // ----------------------------------------------------- + // Accept + // ------ + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @param primaryKeyMap Primary key map. (NotNull and NotEmpty) + */ + public void acceptPrimaryKeyMap(Entity entity, java.util.Map primaryKeyMap) { + final Specials myEntity = (Specials)entity; + MapAssertUtil.assertPrimaryKeyMapNotNullAndNotEmpty(primaryKeyMap); + final MapStringValueAnalyzer analyzer = new MapStringValueAnalyzer(primaryKeyMap, entity.getModifiedPropertyNames()); + + MapAssertUtil.assertColumnExistingInPrimaryKeyMap(primaryKeyMap, "SPECIALS_ID"); + if (analyzer.init("SPECIALS_ID", "specialsId", "specialsId")) { myEntity.setSpecialsId(analyzer.analyzeNumber(java.math.BigDecimal.class)); }; + + + } + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @param primaryKeyMapString Primary-key map-string. (NotNull and NotEmpty) + */ + public void acceptPrimaryKeyMapString(Entity entity, String primaryKeyMapString) { + MapStringUtil.acceptPrimaryKeyMapString(primaryKeyMapString, entity); + } + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @param columnValueMap Column-value map. (NotNull and NotEmpty) + */ + public void acceptColumnValueMap(Entity entity, java.util.Map columnValueMap) { + final Specials myEntity = (Specials)entity; + MapAssertUtil.assertColumnValueMapNotNullAndNotEmpty(columnValueMap); + final MapStringValueAnalyzer analyzer = new MapStringValueAnalyzer(columnValueMap, entity.getModifiedPropertyNames()); + + if (analyzer.init("SPECIALS_ID", "specialsId", "specialsId")) { myEntity.setSpecialsId(analyzer.analyzeNumber(java.math.BigDecimal.class)); }; + if (analyzer.init("PRODUCTS_ID", "productsId", "productsId")) { myEntity.setProductsId(analyzer.analyzeNumber(java.math.BigDecimal.class)); }; + if (analyzer.init("SPECIALS_NEW_PRODUCTS_PRICE", "specialsNewProductsPrice", "specialsNewProductsPrice")) { myEntity.setSpecialsNewProductsPrice(analyzer.analyzeNumber(java.math.BigDecimal.class)); }; + if (analyzer.init("SPECIALS_DATE_ADDED", "specialsDateAdded", "specialsDateAdded")) { myEntity.setSpecialsDateAdded(analyzer.analyzeDate(java.sql.Timestamp.class)); }; + if (analyzer.init("SPECIALS_LAST_MODIFIED", "specialsLastModified", "specialsLastModified")) { myEntity.setSpecialsLastModified(analyzer.analyzeDate(java.sql.Timestamp.class)); }; + if (analyzer.init("EXPIRES_DATE", "expiresDate", "expiresDate")) { myEntity.setExpiresDate(analyzer.analyzeDate(java.sql.Timestamp.class)); }; + if (analyzer.init("DATE_STATUS_CHANGE", "dateStatusChange", "dateStatusChange")) { myEntity.setDateStatusChange(analyzer.analyzeDate(java.sql.Timestamp.class)); }; + if (analyzer.init("STATUS", "status", "status")) { myEntity.setStatus(analyzer.analyzeNumber(java.math.BigDecimal.class)); }; + + } + + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @param columnValueMapString Column-value map-string. (NotNull and NotEmpty) + */ + public void acceptColumnValueMapString(Entity entity, String columnValueMapString) { + MapStringUtil.acceptColumnValueMapString(columnValueMapString, entity); + } + + + // ----------------------------------------------------- + // Extract + // ------- + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @return Primary-key map-string. (NotNull) + */ + public String extractPrimaryKeyMapString(Entity entity) { + return MapStringUtil.extractPrimaryKeyMapString(entity); + } + + /** + * Extract primary-key map-string. + * + * @param entity Target entity. (NotNull) + * @param startBrace Start-brace. (NotNull) + * @param endBrace End-brace. (NotNull) + * @param delimiter Delimiter. (NotNull) + * @param equal Equal. (NotNull) + * @return Primary-key map-string. (NotNull) + */ + public String extractPrimaryKeyMapString(Entity entity, String startBrace, String endBrace, String delimiter, String equal) { + final Specials myEntity = (Specials)entity; + final String mapMarkAndStartBrace = MAP_STRING_MAP_MARK + startBrace; + final StringBuffer sb = new StringBuffer(); + helpAppendingColumnValueString(sb, delimiter, equal, "SPECIALS_ID", myEntity.getSpecialsId()); + + sb.delete(0, delimiter.length()).insert(0, mapMarkAndStartBrace).append(endBrace); + return sb.toString(); + + } + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @return Column-value map-string. (NotNull) + */ + public String extractColumnValueMapString(Entity entity) { + return MapStringUtil.extractColumnValueMapString(entity); + } + + /** + * Extract column-value map-string. + * + * @param entity Target entity. (NotNull) + * @param startBrace Start-brace. (NotNull) + * @param endBrace End-brace. (NotNull) + * @param delimiter Delimiter. (NotNull) + * @param equal Equal. (NotNull) + * @return Column-value map-string. (NotNull) + */ + public String extractColumnValueMapString(Entity entity, String startBrace, String endBrace, String delimiter, String equal) { + final Specials myEntity = (Specials)entity; + final String mapMarkAndStartBrace = MAP_STRING_MAP_MARK + startBrace; + final StringBuffer sb = new StringBuffer(); + helpAppendingColumnValueString(sb, delimiter, equal, "SPECIALS_ID", myEntity.getSpecialsId()); + helpAppendingColumnValueString(sb, delimiter, equal, "PRODUCTS_ID", myEntity.getProductsId()); + helpAppendingColumnValueString(sb, delimiter, equal, "SPECIALS_NEW_PRODUCTS_PRICE", myEntity.getSpecialsNewProductsPrice()); + helpAppendingColumnValueString(sb, delimiter, equal, "SPECIALS_DATE_ADDED", myEntity.getSpecialsDateAdded()); + helpAppendingColumnValueString(sb, delimiter, equal, "SPECIALS_LAST_MODIFIED", myEntity.getSpecialsLastModified()); + helpAppendingColumnValueString(sb, delimiter, equal, "EXPIRES_DATE", myEntity.getExpiresDate()); + helpAppendingColumnValueString(sb, delimiter, equal, "DATE_STATUS_CHANGE", myEntity.getDateStatusChange()); + helpAppendingColumnValueString(sb, delimiter, equal, "STATUS", myEntity.getStatus()); + + sb.delete(0, delimiter.length()).insert(0, mapMarkAndStartBrace).append(endBrace); + return sb.toString(); + } + + private void helpAppendingColumnValueString(StringBuffer sb, String delimiter, String equal, String colName, Object value) { + sb.append(delimiter).append(colName).append(equal); + sb.append(helpGettingColumnStringValue(value)); + } + + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @return Column-value map-string. (NotNull) + */ + public String extractCommonColumnValueMapString(Entity entity) { + return "map:{}"; + } + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @return Column-value map-string. (NotNull) + */ + public String extractCommonColumnValueMapString(Entity entity, String startBrace, String endBrace, String delimiter, String equal) { + return "map:" + startBrace + endBrace; + } + + + // ----------------------------------------------------- + // Convert + // ------- + public java.util.List convertToColumnValueList(Entity entity) { + return new java.util.ArrayList(convertToColumnValueMap(entity).values()); + } + + public java.util.Map convertToColumnValueMap(Entity entity) { + final Specials myEntity = downcast(entity); + final java.util.Map valueMap = new java.util.LinkedHashMap(); + valueMap.put("SPECIALS_ID", myEntity.getSpecialsId()); + valueMap.put("PRODUCTS_ID", myEntity.getProductsId()); + valueMap.put("SPECIALS_NEW_PRODUCTS_PRICE", myEntity.getSpecialsNewProductsPrice()); + valueMap.put("SPECIALS_DATE_ADDED", myEntity.getSpecialsDateAdded()); + valueMap.put("SPECIALS_LAST_MODIFIED", myEntity.getSpecialsLastModified()); + valueMap.put("EXPIRES_DATE", myEntity.getExpiresDate()); + valueMap.put("DATE_STATUS_CHANGE", myEntity.getDateStatusChange()); + valueMap.put("STATUS", myEntity.getStatus()); + return valueMap; + } + + public java.util.List convertToColumnStringValueList(Entity entity) { + return new java.util.ArrayList(convertToColumnStringValueMap(entity).values()); + } + + public java.util.Map convertToColumnStringValueMap(Entity entity) { + final Specials myEntity = downcast(entity); + final java.util.Map valueMap = new java.util.LinkedHashMap(); + valueMap.put("SPECIALS_ID", helpGettingColumnStringValue(myEntity.getSpecialsId())); + valueMap.put("PRODUCTS_ID", helpGettingColumnStringValue(myEntity.getProductsId())); + valueMap.put("SPECIALS_NEW_PRODUCTS_PRICE", helpGettingColumnStringValue(myEntity.getSpecialsNewProductsPrice())); + valueMap.put("SPECIALS_DATE_ADDED", helpGettingColumnStringValue(myEntity.getSpecialsDateAdded())); + valueMap.put("SPECIALS_LAST_MODIFIED", helpGettingColumnStringValue(myEntity.getSpecialsLastModified())); + valueMap.put("EXPIRES_DATE", helpGettingColumnStringValue(myEntity.getExpiresDate())); + valueMap.put("DATE_STATUS_CHANGE", helpGettingColumnStringValue(myEntity.getDateStatusChange())); + valueMap.put("STATUS", helpGettingColumnStringValue(myEntity.getStatus())); + return valueMap; + } + + // =================================================================================== + // JDBC Support + // ============ + public String getPreparedInsertClause() { + return "insert into SPECIALS(SPECIALS_ID, PRODUCTS_ID, SPECIALS_NEW_PRODUCTS_PRICE, SPECIALS_DATE_ADDED, SPECIALS_LAST_MODIFIED, EXPIRES_DATE, DATE_STATUS_CHANGE, STATUS) values(? , ? , ? , ? , ? , ? , ? , ? )"; + } + + public String getPreparedInsertClause(String tablePrefix) { + return "insert into " + tablePrefix + "SPECIALS(SPECIALS_ID, PRODUCTS_ID, SPECIALS_NEW_PRODUCTS_PRICE, SPECIALS_DATE_ADDED, SPECIALS_LAST_MODIFIED, EXPIRES_DATE, DATE_STATUS_CHANGE, STATUS) values(? , ? , ? , ? , ? , ? , ? , ? )"; + } + + // =================================================================================== + // Helper + // ====== + protected Specials downcast(Entity entity) { + assertObjectNotNull("entity", entity); + try { + return (Specials)entity; + } catch (ClassCastException e) { + String msg = "The entity should be Specials but it was: " + entity.getClass(); + throw new IllegalStateException(msg, e); + } + } + + protected void checkDowncast(Entity entity) { + downcast(entity); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/dbmeta/TaxClassDbm.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/dbmeta/TaxClassDbm.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/dbmeta/TaxClassDbm.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,704 @@ +package jp.sf.pal.pompei.bsentity.dbmeta; + + +import jp.sf.pal.pompei.allcommon.Entity; +import jp.sf.pal.pompei.allcommon.dbmeta.DBMeta; +import jp.sf.pal.pompei.allcommon.dbmeta.AbstractDBMeta; +import jp.sf.pal.pompei.exentity.TaxClass; + +/** + * The dbmeta of TAX_CLASS. (Singleton) + * + *
+ * [primary-key]
+ *     TAX_CLASS_ID
+ * 
+ * [column-property]
+ *     TAX_CLASS_ID, TAX_CLASS_TITLE, TAX_CLASS_DESCRIPTION, LAST_MODIFIED, DATE_ADDED
+ * 
+ * [foreign-property]
+ *     
+ * 
+ * [refferer-property]
+ *     
+ * 
+ * [sequence]
+ *     
+ * 
+ * [identity]
+ *     
+ * 
+ * [update-date]
+ *     
+ * 
+ * [version-no]
+ *     
+ * 
+ * 
+ * + * @author DBFlute(AutoGenerator) + */ +public class TaxClassDbm extends AbstractDBMeta { + + // =================================================================================== + // Definition + // ========== + /** The type of entity. */ + protected static final Class ENTITY_TYPE = TaxClass.class; + + /** Singleton instance. */ + private static final TaxClassDbm _instance = new TaxClassDbm(); + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + private TaxClassDbm() { + } + + // =================================================================================== + // Singleton + // ========= + /** + * Get instance. + * + * @return Singleton instance. (NotNull) + */ + public static TaxClassDbm getInstance() { + return _instance; + } + + // =================================================================================== + // Name Definition + // =============== + /** Table db name. */ + public static final String TABLE_DB_NAME = "TAX_CLASS"; + + /** Table cap-prop name. */ + public static final String TABLE_CAP_PROP_NAME = "TaxClass"; + + /** Table uncap-prop name. */ + public static final String TABLE_UNCAP_PROP_NAME = "taxClass"; + + /** Db-name of TaxClassId. */ + public static final String COLUMN_DB_NAME_OF_TaxClassId = "TAX_CLASS_ID"; + /** Db-name of TaxClassTitle. */ + public static final String COLUMN_DB_NAME_OF_TaxClassTitle = "TAX_CLASS_TITLE"; + /** Db-name of TaxClassDescription. */ + public static final String COLUMN_DB_NAME_OF_TaxClassDescription = "TAX_CLASS_DESCRIPTION"; + /** Db-name of LastModified. */ + public static final String COLUMN_DB_NAME_OF_LastModified = "LAST_MODIFIED"; + /** Db-name of DateAdded. */ + public static final String COLUMN_DB_NAME_OF_DateAdded = "DATE_ADDED"; + + /** Cap-prop-name of TaxClassId. */ + public static final String COLUMN_CAP_PROP_NAME_OF_TaxClassId = "TaxClassId"; + /** Cap-prop-name of TaxClassTitle. */ + public static final String COLUMN_CAP_PROP_NAME_OF_TaxClassTitle = "TaxClassTitle"; + /** Cap-prop-name of TaxClassDescription. */ + public static final String COLUMN_CAP_PROP_NAME_OF_TaxClassDescription = "TaxClassDescription"; + /** Cap-prop-name of LastModified. */ + public static final String COLUMN_CAP_PROP_NAME_OF_LastModified = "LastModified"; + /** Cap-prop-name of DateAdded. */ + public static final String COLUMN_CAP_PROP_NAME_OF_DateAdded = "DateAdded"; + + + + /** Uncap-prop-name of TaxClassId. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_TaxClassId = "taxClassId"; + /** Uncap-prop-name of TaxClassTitle. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_TaxClassTitle = "taxClassTitle"; + /** Uncap-prop-name of TaxClassDescription. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_TaxClassDescription = "taxClassDescription"; + /** Uncap-prop-name of LastModified. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_LastModified = "lastModified"; + /** Uncap-prop-name of DateAdded. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_DateAdded = "dateAdded"; + + + + /** {db-name : cap-prop-name} map. */ + private static java.util.Map _dbNameCapPropNameMap; + protected static java.util.Map createDbNameCapPropNameMap() { + if (_dbNameCapPropNameMap != null) { + return _dbNameCapPropNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_DB_NAME, TABLE_CAP_PROP_NAME); + + map.put(COLUMN_DB_NAME_OF_TaxClassId, COLUMN_CAP_PROP_NAME_OF_TaxClassId); + map.put(COLUMN_DB_NAME_OF_TaxClassTitle, COLUMN_CAP_PROP_NAME_OF_TaxClassTitle); + map.put(COLUMN_DB_NAME_OF_TaxClassDescription, COLUMN_CAP_PROP_NAME_OF_TaxClassDescription); + map.put(COLUMN_DB_NAME_OF_LastModified, COLUMN_CAP_PROP_NAME_OF_LastModified); + map.put(COLUMN_DB_NAME_OF_DateAdded, COLUMN_CAP_PROP_NAME_OF_DateAdded); + + _dbNameCapPropNameMap = java.util.Collections.unmodifiableMap(map); + return _dbNameCapPropNameMap; + } + + /** {db-name : uncap-prop-name} map. */ + private static java.util.Map _dbNameUncapPropNameMap; + protected static java.util.Map createDbNameUncapPropNameMap() { + if (_dbNameUncapPropNameMap != null) { + return _dbNameUncapPropNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_DB_NAME, TABLE_UNCAP_PROP_NAME); + + map.put(COLUMN_DB_NAME_OF_TaxClassId, COLUMN_UNCAP_PROP_NAME_OF_TaxClassId); + map.put(COLUMN_DB_NAME_OF_TaxClassTitle, COLUMN_UNCAP_PROP_NAME_OF_TaxClassTitle); + map.put(COLUMN_DB_NAME_OF_TaxClassDescription, COLUMN_UNCAP_PROP_NAME_OF_TaxClassDescription); + map.put(COLUMN_DB_NAME_OF_LastModified, COLUMN_UNCAP_PROP_NAME_OF_LastModified); + map.put(COLUMN_DB_NAME_OF_DateAdded, COLUMN_UNCAP_PROP_NAME_OF_DateAdded); + + _dbNameUncapPropNameMap = java.util.Collections.unmodifiableMap(map); + return _dbNameUncapPropNameMap; + } + + /** {cap-prop-name : db-name} map. */ + private static java.util.Map _capPropNameDbNameMap; + protected static java.util.Map createCapPropNameDbNameMap() { + if (_capPropNameDbNameMap != null) { + return _capPropNameDbNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_CAP_PROP_NAME, TABLE_DB_NAME); + + map.put(COLUMN_CAP_PROP_NAME_OF_TaxClassId, COLUMN_DB_NAME_OF_TaxClassId); + map.put(COLUMN_CAP_PROP_NAME_OF_TaxClassTitle, COLUMN_DB_NAME_OF_TaxClassTitle); + map.put(COLUMN_CAP_PROP_NAME_OF_TaxClassDescription, COLUMN_DB_NAME_OF_TaxClassDescription); + map.put(COLUMN_CAP_PROP_NAME_OF_LastModified, COLUMN_DB_NAME_OF_LastModified); + map.put(COLUMN_CAP_PROP_NAME_OF_DateAdded, COLUMN_DB_NAME_OF_DateAdded); + + _capPropNameDbNameMap = java.util.Collections.unmodifiableMap(map); + return _capPropNameDbNameMap; + } + + /** {cap-prop-name : uncap-prop-name} map. */ + private static java.util.Map _capPropNameUncapPropNameMap; + protected static java.util.Map createCapPropNameUncapPropNameMap() { + if (_capPropNameUncapPropNameMap != null) { + return _capPropNameUncapPropNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_CAP_PROP_NAME, TABLE_UNCAP_PROP_NAME); + + map.put(COLUMN_CAP_PROP_NAME_OF_TaxClassId, COLUMN_UNCAP_PROP_NAME_OF_TaxClassId); + map.put(COLUMN_CAP_PROP_NAME_OF_TaxClassTitle, COLUMN_UNCAP_PROP_NAME_OF_TaxClassTitle); + map.put(COLUMN_CAP_PROP_NAME_OF_TaxClassDescription, COLUMN_UNCAP_PROP_NAME_OF_TaxClassDescription); + map.put(COLUMN_CAP_PROP_NAME_OF_LastModified, COLUMN_UNCAP_PROP_NAME_OF_LastModified); + map.put(COLUMN_CAP_PROP_NAME_OF_DateAdded, COLUMN_UNCAP_PROP_NAME_OF_DateAdded); + + _capPropNameUncapPropNameMap = java.util.Collections.unmodifiableMap(map); + return _capPropNameUncapPropNameMap; + } + + /** {uncap-prop-name : db-name} map. */ + private static java.util.Map _uncapPropNameDbNameMap; + protected static java.util.Map createUncapPropNameDbNameMap() { + if (_uncapPropNameDbNameMap != null) { + return _uncapPropNameDbNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_UNCAP_PROP_NAME, TABLE_DB_NAME); + + map.put(COLUMN_UNCAP_PROP_NAME_OF_TaxClassId, COLUMN_DB_NAME_OF_TaxClassId); + map.put(COLUMN_UNCAP_PROP_NAME_OF_TaxClassTitle, COLUMN_DB_NAME_OF_TaxClassTitle); + map.put(COLUMN_UNCAP_PROP_NAME_OF_TaxClassDescription, COLUMN_DB_NAME_OF_TaxClassDescription); + map.put(COLUMN_UNCAP_PROP_NAME_OF_LastModified, COLUMN_DB_NAME_OF_LastModified); + map.put(COLUMN_UNCAP_PROP_NAME_OF_DateAdded, COLUMN_DB_NAME_OF_DateAdded); + + _uncapPropNameDbNameMap = java.util.Collections.unmodifiableMap(map); + return _uncapPropNameDbNameMap; + } + + /** {uncap-prop-name : cap-prop-name} map. */ + private static java.util.Map _uncapPropNameCapPropNameMap; + protected static java.util.Map createUncapPropNameCapPropNameMap() { + if (_uncapPropNameCapPropNameMap != null) { + return _uncapPropNameCapPropNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_UNCAP_PROP_NAME, TABLE_CAP_PROP_NAME); + + map.put(COLUMN_UNCAP_PROP_NAME_OF_TaxClassId, COLUMN_CAP_PROP_NAME_OF_TaxClassId); + map.put(COLUMN_UNCAP_PROP_NAME_OF_TaxClassTitle, COLUMN_CAP_PROP_NAME_OF_TaxClassTitle); + map.put(COLUMN_UNCAP_PROP_NAME_OF_TaxClassDescription, COLUMN_CAP_PROP_NAME_OF_TaxClassDescription); + map.put(COLUMN_UNCAP_PROP_NAME_OF_LastModified, COLUMN_CAP_PROP_NAME_OF_LastModified); + map.put(COLUMN_UNCAP_PROP_NAME_OF_DateAdded, COLUMN_CAP_PROP_NAME_OF_DateAdded); + + _uncapPropNameCapPropNameMap = java.util.Collections.unmodifiableMap(map); + return _uncapPropNameCapPropNameMap; + } + + // =================================================================================== + // Name-Map + // ======== + /** + * This method implements the method that is declared at super. + * + * @return {db-name : cap-prop-name} map. + */ + public java.util.Map getDbNameCapPropNameMap() { + return createDbNameCapPropNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {db-name : uncap-prop-name} map. + */ + public java.util.Map getDbNameUncapPropNameMap() { + return createDbNameUncapPropNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {cap-prop-name : db-name} map. + */ + public java.util.Map getCapPropNameDbNameMap() { + return createCapPropNameDbNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {cap-prop-name : uncap-prop-name} map. + */ + public java.util.Map getCapPropNameUncapPropNameMap() { + return createCapPropNameUncapPropNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {uncap-prop-name : db-name} map. + */ + public java.util.Map getUncapPropNameDbNameMap() { + return createUncapPropNameDbNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {uncap-prop-name : cap-prop-name} map. + */ + public java.util.Map getUncapPropNameCapPropNameMap() { + return createUncapPropNameCapPropNameMap(); + } + + // =================================================================================== + // Table Name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + public String getTableDbName() { + return TABLE_DB_NAME; + } + + /** + * This method implements the method that is declared at super. + * + * @return Table cap-prop-name. (NotNull) + */ + public String getTableCapPropName() { + return TABLE_CAP_PROP_NAME; + } + + /** + * This method implements the method that is declared at super. + * + * @return Table property-name. (NotNull) + */ + public String getTableUncapPropName() { + return TABLE_UNCAP_PROP_NAME; + } + + // =================================================================================== + // Column Name + // =========== + public java.util.List getColumnDbNameList() { + final String[] columns = getColumnDbNameCommaString().split(","); + final java.util.List resultList = new java.util.ArrayList(); + for (int i=0; i < columns.length; i++) { + resultList.add(columns[i].trim()); + } + return resultList; + } + + public java.util.List getColumnCapPropNameList() { + final java.util.List columnDbNameList = getColumnDbNameList(); + final java.util.List resultList = new java.util.ArrayList(); + for (final java.util.Iterator ite = columnDbNameList.iterator(); ite.hasNext(); ) { + resultList.add(getDbNameCapPropNameMap().get((String)ite.next())); + } + return resultList; + } + + public java.util.List getColumnUncapPropNameList() { + final java.util.List columnDbNameList = getColumnDbNameList(); + final java.util.List resultList = new java.util.ArrayList(); + for (final java.util.Iterator ite = columnDbNameList.iterator(); ite.hasNext(); ) { + resultList.add(getDbNameUncapPropNameMap().get((String)ite.next())); + } + return resultList; + } + + /** + * This method implements the method that is declared at super. + * + * @return Column-db-name comma-string. (NotNull) + */ + public String getColumnDbNameCommaString() { + return "TAX_CLASS_ID, TAX_CLASS_TITLE, TAX_CLASS_DESCRIPTION, LAST_MODIFIED, DATE_ADDED"; + } + + // =================================================================================== + // Type Name + // ========= + /** + * This method implements the method that is declared at super. + * + * @return The type-name of entity. (NotNull) + */ + public String getEntityTypeName() { + return "jp.sf.pal.pompei.exentity.TaxClass"; + } + + /** + * This method implements the method that is declared at super. + * + * @return The type-name of condition-bean. (NotNull) + */ + public String getConditionBeanTypeName() { + return "jp.sf.pal.pompei.cbean.bs.TaxClassCB"; + } + + /** + * This method implements the method that is declared at super. + * + * @return The type-name of dao. (NotNull) + */ + public String getDaoTypeName() { + return "jp.sf.pal.pompei.exdao.TaxClassDao"; + } + + /** + * This method implements the method that is declared at super. + * + * @return The type-name of behavior. (NotNull) + */ + public String getBehaviorTypeName() { + return "jp.sf.pal.pompei.exbhv.TaxClassBhv"; + } + + // =================================================================================== + // Type + // ==== + /** + * This method implements the method that is declared at super. + * + * @return The type of entity. (NotNull) + */ + public Class getEntityType() { + return ENTITY_TYPE; + } + + // =================================================================================== + // Instance + // ======== + /** + * This method implements the method that is declared at super. + * + * @return The type of entity. (NotNull) + */ + public Entity newEntity() { + return newMyEntity(); + } + + /** + * New the instance of my entity. + * + * @return The instance of my entity. (NotNull) + */ + public TaxClass newMyEntity() { + return new TaxClass(); + } + + // =================================================================================== + // Foreign DBMeta + // ============== + /** + * This method implements the method that is declared at super. + * + * @param foreignPropertyName Foreign-property-name(Both OK - InitCap or not). (NotNull) + * @return Foreign DBMeta. (NotNull) + */ + public DBMeta getForeignDBMeta(String foreignPropertyName) { + assertStringNotNullAndNotTrimmedEmpty("foreignPropertyName", foreignPropertyName); + final String methodName = "getForeignDBMeta_" + foreignPropertyName.substring(0, 1) + foreignPropertyName.substring(1); + + java.lang.reflect.Method method = null; + try { + method = this.getClass().getMethod(methodName, new Class[]{}); + } catch (NoSuchMethodException e) { + String msg = "The foreignPropertyName is not found: foreignPropertyName=" + foreignPropertyName; + msg = msg + " tableName=" + TABLE_DB_NAME + " methodName=" + methodName; + throw new RuntimeException(msg, e); + } + try { + return (DBMeta)method.invoke(this, new Object[]{}); + } catch (IllegalAccessException e) { + throw new RuntimeException(e); + } catch (java.lang.reflect.InvocationTargetException e) { + throw new RuntimeException(e.getCause()); + } + } + + // =================================================================================== + // Determination + // ============= + /** + * This method implements the method that is declared at super. + * + * @return Determination. + */ + public boolean hasTwoOrMorePrimaryKeys() { + return false; + } + + /** + * This method implements the method that is declared at super. + * + * @return Determination. + */ + public boolean hasCommonColumn() { + return false; + } + + // =================================================================================== + // Entity Handling + // =============== + // ----------------------------------------------------- + // Accept + // ------ + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @param primaryKeyMap Primary key map. (NotNull and NotEmpty) + */ + public void acceptPrimaryKeyMap(Entity entity, java.util.Map primaryKeyMap) { + final TaxClass myEntity = (TaxClass)entity; + MapAssertUtil.assertPrimaryKeyMapNotNullAndNotEmpty(primaryKeyMap); + final MapStringValueAnalyzer analyzer = new MapStringValueAnalyzer(primaryKeyMap, entity.getModifiedPropertyNames()); + + MapAssertUtil.assertColumnExistingInPrimaryKeyMap(primaryKeyMap, "TAX_CLASS_ID"); + if (analyzer.init("TAX_CLASS_ID", "taxClassId", "taxClassId")) { myEntity.setTaxClassId(analyzer.analyzeNumber(java.math.BigDecimal.class)); }; + + + } + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @param primaryKeyMapString Primary-key map-string. (NotNull and NotEmpty) + */ + public void acceptPrimaryKeyMapString(Entity entity, String primaryKeyMapString) { + MapStringUtil.acceptPrimaryKeyMapString(primaryKeyMapString, entity); + } + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @param columnValueMap Column-value map. (NotNull and NotEmpty) + */ + public void acceptColumnValueMap(Entity entity, java.util.Map columnValueMap) { + final TaxClass myEntity = (TaxClass)entity; + MapAssertUtil.assertColumnValueMapNotNullAndNotEmpty(columnValueMap); + final MapStringValueAnalyzer analyzer = new MapStringValueAnalyzer(columnValueMap, entity.getModifiedPropertyNames()); + + if (analyzer.init("TAX_CLASS_ID", "taxClassId", "taxClassId")) { myEntity.setTaxClassId(analyzer.analyzeNumber(java.math.BigDecimal.class)); }; + if (analyzer.init("TAX_CLASS_TITLE", "taxClassTitle", "taxClassTitle")) { myEntity.setTaxClassTitle(analyzer.analyzeString(String.class)); }; + if (analyzer.init("TAX_CLASS_DESCRIPTION", "taxClassDescription", "taxClassDescription")) { myEntity.setTaxClassDescription(analyzer.analyzeString(String.class)); }; + if (analyzer.init("LAST_MODIFIED", "lastModified", "lastModified")) { myEntity.setLastModified(analyzer.analyzeDate(java.sql.Timestamp.class)); }; + if (analyzer.init("DATE_ADDED", "dateAdded", "dateAdded")) { myEntity.setDateAdded(analyzer.analyzeDate(java.sql.Timestamp.class)); }; + + } + + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @param columnValueMapString Column-value map-string. (NotNull and NotEmpty) + */ + public void acceptColumnValueMapString(Entity entity, String columnValueMapString) { + MapStringUtil.acceptColumnValueMapString(columnValueMapString, entity); + } + + + // ----------------------------------------------------- + // Extract + // ------- + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @return Primary-key map-string. (NotNull) + */ + public String extractPrimaryKeyMapString(Entity entity) { + return MapStringUtil.extractPrimaryKeyMapString(entity); + } + + /** + * Extract primary-key map-string. + * + * @param entity Target entity. (NotNull) + * @param startBrace Start-brace. (NotNull) + * @param endBrace End-brace. (NotNull) + * @param delimiter Delimiter. (NotNull) + * @param equal Equal. (NotNull) + * @return Primary-key map-string. (NotNull) + */ + public String extractPrimaryKeyMapString(Entity entity, String startBrace, String endBrace, String delimiter, String equal) { + final TaxClass myEntity = (TaxClass)entity; + final String mapMarkAndStartBrace = MAP_STRING_MAP_MARK + startBrace; + final StringBuffer sb = new StringBuffer(); + helpAppendingColumnValueString(sb, delimiter, equal, "TAX_CLASS_ID", myEntity.getTaxClassId()); + + sb.delete(0, delimiter.length()).insert(0, mapMarkAndStartBrace).append(endBrace); + return sb.toString(); + + } + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @return Column-value map-string. (NotNull) + */ + public String extractColumnValueMapString(Entity entity) { + return MapStringUtil.extractColumnValueMapString(entity); + } + + /** + * Extract column-value map-string. + * + * @param entity Target entity. (NotNull) + * @param startBrace Start-brace. (NotNull) + * @param endBrace End-brace. (NotNull) + * @param delimiter Delimiter. (NotNull) + * @param equal Equal. (NotNull) + * @return Column-value map-string. (NotNull) + */ + public String extractColumnValueMapString(Entity entity, String startBrace, String endBrace, String delimiter, String equal) { + final TaxClass myEntity = (TaxClass)entity; + final String mapMarkAndStartBrace = MAP_STRING_MAP_MARK + startBrace; + final StringBuffer sb = new StringBuffer(); + helpAppendingColumnValueString(sb, delimiter, equal, "TAX_CLASS_ID", myEntity.getTaxClassId()); + helpAppendingColumnValueString(sb, delimiter, equal, "TAX_CLASS_TITLE", myEntity.getTaxClassTitle()); + helpAppendingColumnValueString(sb, delimiter, equal, "TAX_CLASS_DESCRIPTION", myEntity.getTaxClassDescription()); + helpAppendingColumnValueString(sb, delimiter, equal, "LAST_MODIFIED", myEntity.getLastModified()); + helpAppendingColumnValueString(sb, delimiter, equal, "DATE_ADDED", myEntity.getDateAdded()); + + sb.delete(0, delimiter.length()).insert(0, mapMarkAndStartBrace).append(endBrace); + return sb.toString(); + } + + private void helpAppendingColumnValueString(StringBuffer sb, String delimiter, String equal, String colName, Object value) { + sb.append(delimiter).append(colName).append(equal); + sb.append(helpGettingColumnStringValue(value)); + } + + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @return Column-value map-string. (NotNull) + */ + public String extractCommonColumnValueMapString(Entity entity) { + return "map:{}"; + } + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @return Column-value map-string. (NotNull) + */ + public String extractCommonColumnValueMapString(Entity entity, String startBrace, String endBrace, String delimiter, String equal) { + return "map:" + startBrace + endBrace; + } + + + // ----------------------------------------------------- + // Convert + // ------- + public java.util.List convertToColumnValueList(Entity entity) { + return new java.util.ArrayList(convertToColumnValueMap(entity).values()); + } + + public java.util.Map convertToColumnValueMap(Entity entity) { + final TaxClass myEntity = downcast(entity); + final java.util.Map valueMap = new java.util.LinkedHashMap(); + valueMap.put("TAX_CLASS_ID", myEntity.getTaxClassId()); + valueMap.put("TAX_CLASS_TITLE", myEntity.getTaxClassTitle()); + valueMap.put("TAX_CLASS_DESCRIPTION", myEntity.getTaxClassDescription()); + valueMap.put("LAST_MODIFIED", myEntity.getLastModified()); + valueMap.put("DATE_ADDED", myEntity.getDateAdded()); + return valueMap; + } + + public java.util.List convertToColumnStringValueList(Entity entity) { + return new java.util.ArrayList(convertToColumnStringValueMap(entity).values()); + } + + public java.util.Map convertToColumnStringValueMap(Entity entity) { + final TaxClass myEntity = downcast(entity); + final java.util.Map valueMap = new java.util.LinkedHashMap(); + valueMap.put("TAX_CLASS_ID", helpGettingColumnStringValue(myEntity.getTaxClassId())); + valueMap.put("TAX_CLASS_TITLE", helpGettingColumnStringValue(myEntity.getTaxClassTitle())); + valueMap.put("TAX_CLASS_DESCRIPTION", helpGettingColumnStringValue(myEntity.getTaxClassDescription())); + valueMap.put("LAST_MODIFIED", helpGettingColumnStringValue(myEntity.getLastModified())); + valueMap.put("DATE_ADDED", helpGettingColumnStringValue(myEntity.getDateAdded())); + return valueMap; + } + + // =================================================================================== + // JDBC Support + // ============ + public String getPreparedInsertClause() { + return "insert into TAX_CLASS(TAX_CLASS_ID, TAX_CLASS_TITLE, TAX_CLASS_DESCRIPTION, LAST_MODIFIED, DATE_ADDED) values(? , ? , ? , ? , ? )"; + } + + public String getPreparedInsertClause(String tablePrefix) { + return "insert into " + tablePrefix + "TAX_CLASS(TAX_CLASS_ID, TAX_CLASS_TITLE, TAX_CLASS_DESCRIPTION, LAST_MODIFIED, DATE_ADDED) values(? , ? , ? , ? , ? )"; + } + + // =================================================================================== + // Helper + // ====== + protected TaxClass downcast(Entity entity) { + assertObjectNotNull("entity", entity); + try { + return (TaxClass)entity; + } catch (ClassCastException e) { + String msg = "The entity should be TaxClass but it was: " + entity.getClass(); + throw new IllegalStateException(msg, e); + } + } + + protected void checkDowncast(Entity entity) { + downcast(entity); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/dbmeta/TaxRatesDbm.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/dbmeta/TaxRatesDbm.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/dbmeta/TaxRatesDbm.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,752 @@ +package jp.sf.pal.pompei.bsentity.dbmeta; + + +import jp.sf.pal.pompei.allcommon.Entity; +import jp.sf.pal.pompei.allcommon.dbmeta.DBMeta; +import jp.sf.pal.pompei.allcommon.dbmeta.AbstractDBMeta; +import jp.sf.pal.pompei.exentity.TaxRates; + +/** + * The dbmeta of TAX_RATES. (Singleton) + * + *
+ * [primary-key]
+ *     TAX_RATES_ID
+ * 
+ * [column-property]
+ *     TAX_RATES_ID, TAX_ZONE_ID, TAX_CLASS_ID, TAX_PRIORITY, TAX_RATE, TAX_DESCRIPTION, LAST_MODIFIED, DATE_ADDED
+ * 
+ * [foreign-property]
+ *     
+ * 
+ * [refferer-property]
+ *     
+ * 
+ * [sequence]
+ *     
+ * 
+ * [identity]
+ *     
+ * 
+ * [update-date]
+ *     
+ * 
+ * [version-no]
+ *     
+ * 
+ * 
+ * + * @author DBFlute(AutoGenerator) + */ +public class TaxRatesDbm extends AbstractDBMeta { + + // =================================================================================== + // Definition + // ========== + /** The type of entity. */ + protected static final Class ENTITY_TYPE = TaxRates.class; + + /** Singleton instance. */ + private static final TaxRatesDbm _instance = new TaxRatesDbm(); + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + private TaxRatesDbm() { + } + + // =================================================================================== + // Singleton + // ========= + /** + * Get instance. + * + * @return Singleton instance. (NotNull) + */ + public static TaxRatesDbm getInstance() { + return _instance; + } + + // =================================================================================== + // Name Definition + // =============== + /** Table db name. */ + public static final String TABLE_DB_NAME = "TAX_RATES"; + + /** Table cap-prop name. */ + public static final String TABLE_CAP_PROP_NAME = "TaxRates"; + + /** Table uncap-prop name. */ + public static final String TABLE_UNCAP_PROP_NAME = "taxRates"; + + /** Db-name of TaxRatesId. */ + public static final String COLUMN_DB_NAME_OF_TaxRatesId = "TAX_RATES_ID"; + /** Db-name of TaxZoneId. */ + public static final String COLUMN_DB_NAME_OF_TaxZoneId = "TAX_ZONE_ID"; + /** Db-name of TaxClassId. */ + public static final String COLUMN_DB_NAME_OF_TaxClassId = "TAX_CLASS_ID"; + /** Db-name of TaxPriority. */ + public static final String COLUMN_DB_NAME_OF_TaxPriority = "TAX_PRIORITY"; + /** Db-name of TaxRate. */ + public static final String COLUMN_DB_NAME_OF_TaxRate = "TAX_RATE"; + /** Db-name of TaxDescription. */ + public static final String COLUMN_DB_NAME_OF_TaxDescription = "TAX_DESCRIPTION"; + /** Db-name of LastModified. */ + public static final String COLUMN_DB_NAME_OF_LastModified = "LAST_MODIFIED"; + /** Db-name of DateAdded. */ + public static final String COLUMN_DB_NAME_OF_DateAdded = "DATE_ADDED"; + + /** Cap-prop-name of TaxRatesId. */ + public static final String COLUMN_CAP_PROP_NAME_OF_TaxRatesId = "TaxRatesId"; + /** Cap-prop-name of TaxZoneId. */ + public static final String COLUMN_CAP_PROP_NAME_OF_TaxZoneId = "TaxZoneId"; + /** Cap-prop-name of TaxClassId. */ + public static final String COLUMN_CAP_PROP_NAME_OF_TaxClassId = "TaxClassId"; + /** Cap-prop-name of TaxPriority. */ + public static final String COLUMN_CAP_PROP_NAME_OF_TaxPriority = "TaxPriority"; + /** Cap-prop-name of TaxRate. */ + public static final String COLUMN_CAP_PROP_NAME_OF_TaxRate = "TaxRate"; + /** Cap-prop-name of TaxDescription. */ + public static final String COLUMN_CAP_PROP_NAME_OF_TaxDescription = "TaxDescription"; + /** Cap-prop-name of LastModified. */ + public static final String COLUMN_CAP_PROP_NAME_OF_LastModified = "LastModified"; + /** Cap-prop-name of DateAdded. */ + public static final String COLUMN_CAP_PROP_NAME_OF_DateAdded = "DateAdded"; + + + + /** Uncap-prop-name of TaxRatesId. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_TaxRatesId = "taxRatesId"; + /** Uncap-prop-name of TaxZoneId. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_TaxZoneId = "taxZoneId"; + /** Uncap-prop-name of TaxClassId. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_TaxClassId = "taxClassId"; + /** Uncap-prop-name of TaxPriority. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_TaxPriority = "taxPriority"; + /** Uncap-prop-name of TaxRate. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_TaxRate = "taxRate"; + /** Uncap-prop-name of TaxDescription. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_TaxDescription = "taxDescription"; + /** Uncap-prop-name of LastModified. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_LastModified = "lastModified"; + /** Uncap-prop-name of DateAdded. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_DateAdded = "dateAdded"; + + + + /** {db-name : cap-prop-name} map. */ + private static java.util.Map _dbNameCapPropNameMap; + protected static java.util.Map createDbNameCapPropNameMap() { + if (_dbNameCapPropNameMap != null) { + return _dbNameCapPropNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_DB_NAME, TABLE_CAP_PROP_NAME); + + map.put(COLUMN_DB_NAME_OF_TaxRatesId, COLUMN_CAP_PROP_NAME_OF_TaxRatesId); + map.put(COLUMN_DB_NAME_OF_TaxZoneId, COLUMN_CAP_PROP_NAME_OF_TaxZoneId); + map.put(COLUMN_DB_NAME_OF_TaxClassId, COLUMN_CAP_PROP_NAME_OF_TaxClassId); + map.put(COLUMN_DB_NAME_OF_TaxPriority, COLUMN_CAP_PROP_NAME_OF_TaxPriority); + map.put(COLUMN_DB_NAME_OF_TaxRate, COLUMN_CAP_PROP_NAME_OF_TaxRate); + map.put(COLUMN_DB_NAME_OF_TaxDescription, COLUMN_CAP_PROP_NAME_OF_TaxDescription); + map.put(COLUMN_DB_NAME_OF_LastModified, COLUMN_CAP_PROP_NAME_OF_LastModified); + map.put(COLUMN_DB_NAME_OF_DateAdded, COLUMN_CAP_PROP_NAME_OF_DateAdded); + + _dbNameCapPropNameMap = java.util.Collections.unmodifiableMap(map); + return _dbNameCapPropNameMap; + } + + /** {db-name : uncap-prop-name} map. */ + private static java.util.Map _dbNameUncapPropNameMap; + protected static java.util.Map createDbNameUncapPropNameMap() { + if (_dbNameUncapPropNameMap != null) { + return _dbNameUncapPropNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_DB_NAME, TABLE_UNCAP_PROP_NAME); + + map.put(COLUMN_DB_NAME_OF_TaxRatesId, COLUMN_UNCAP_PROP_NAME_OF_TaxRatesId); + map.put(COLUMN_DB_NAME_OF_TaxZoneId, COLUMN_UNCAP_PROP_NAME_OF_TaxZoneId); + map.put(COLUMN_DB_NAME_OF_TaxClassId, COLUMN_UNCAP_PROP_NAME_OF_TaxClassId); + map.put(COLUMN_DB_NAME_OF_TaxPriority, COLUMN_UNCAP_PROP_NAME_OF_TaxPriority); + map.put(COLUMN_DB_NAME_OF_TaxRate, COLUMN_UNCAP_PROP_NAME_OF_TaxRate); + map.put(COLUMN_DB_NAME_OF_TaxDescription, COLUMN_UNCAP_PROP_NAME_OF_TaxDescription); + map.put(COLUMN_DB_NAME_OF_LastModified, COLUMN_UNCAP_PROP_NAME_OF_LastModified); + map.put(COLUMN_DB_NAME_OF_DateAdded, COLUMN_UNCAP_PROP_NAME_OF_DateAdded); + + _dbNameUncapPropNameMap = java.util.Collections.unmodifiableMap(map); + return _dbNameUncapPropNameMap; + } + + /** {cap-prop-name : db-name} map. */ + private static java.util.Map _capPropNameDbNameMap; + protected static java.util.Map createCapPropNameDbNameMap() { + if (_capPropNameDbNameMap != null) { + return _capPropNameDbNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_CAP_PROP_NAME, TABLE_DB_NAME); + + map.put(COLUMN_CAP_PROP_NAME_OF_TaxRatesId, COLUMN_DB_NAME_OF_TaxRatesId); + map.put(COLUMN_CAP_PROP_NAME_OF_TaxZoneId, COLUMN_DB_NAME_OF_TaxZoneId); + map.put(COLUMN_CAP_PROP_NAME_OF_TaxClassId, COLUMN_DB_NAME_OF_TaxClassId); + map.put(COLUMN_CAP_PROP_NAME_OF_TaxPriority, COLUMN_DB_NAME_OF_TaxPriority); + map.put(COLUMN_CAP_PROP_NAME_OF_TaxRate, COLUMN_DB_NAME_OF_TaxRate); + map.put(COLUMN_CAP_PROP_NAME_OF_TaxDescription, COLUMN_DB_NAME_OF_TaxDescription); + map.put(COLUMN_CAP_PROP_NAME_OF_LastModified, COLUMN_DB_NAME_OF_LastModified); + map.put(COLUMN_CAP_PROP_NAME_OF_DateAdded, COLUMN_DB_NAME_OF_DateAdded); + + _capPropNameDbNameMap = java.util.Collections.unmodifiableMap(map); + return _capPropNameDbNameMap; + } + + /** {cap-prop-name : uncap-prop-name} map. */ + private static java.util.Map _capPropNameUncapPropNameMap; + protected static java.util.Map createCapPropNameUncapPropNameMap() { + if (_capPropNameUncapPropNameMap != null) { + return _capPropNameUncapPropNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_CAP_PROP_NAME, TABLE_UNCAP_PROP_NAME); + + map.put(COLUMN_CAP_PROP_NAME_OF_TaxRatesId, COLUMN_UNCAP_PROP_NAME_OF_TaxRatesId); + map.put(COLUMN_CAP_PROP_NAME_OF_TaxZoneId, COLUMN_UNCAP_PROP_NAME_OF_TaxZoneId); + map.put(COLUMN_CAP_PROP_NAME_OF_TaxClassId, COLUMN_UNCAP_PROP_NAME_OF_TaxClassId); + map.put(COLUMN_CAP_PROP_NAME_OF_TaxPriority, COLUMN_UNCAP_PROP_NAME_OF_TaxPriority); + map.put(COLUMN_CAP_PROP_NAME_OF_TaxRate, COLUMN_UNCAP_PROP_NAME_OF_TaxRate); + map.put(COLUMN_CAP_PROP_NAME_OF_TaxDescription, COLUMN_UNCAP_PROP_NAME_OF_TaxDescription); + map.put(COLUMN_CAP_PROP_NAME_OF_LastModified, COLUMN_UNCAP_PROP_NAME_OF_LastModified); + map.put(COLUMN_CAP_PROP_NAME_OF_DateAdded, COLUMN_UNCAP_PROP_NAME_OF_DateAdded); + + _capPropNameUncapPropNameMap = java.util.Collections.unmodifiableMap(map); + return _capPropNameUncapPropNameMap; + } + + /** {uncap-prop-name : db-name} map. */ + private static java.util.Map _uncapPropNameDbNameMap; + protected static java.util.Map createUncapPropNameDbNameMap() { + if (_uncapPropNameDbNameMap != null) { + return _uncapPropNameDbNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_UNCAP_PROP_NAME, TABLE_DB_NAME); + + map.put(COLUMN_UNCAP_PROP_NAME_OF_TaxRatesId, COLUMN_DB_NAME_OF_TaxRatesId); + map.put(COLUMN_UNCAP_PROP_NAME_OF_TaxZoneId, COLUMN_DB_NAME_OF_TaxZoneId); + map.put(COLUMN_UNCAP_PROP_NAME_OF_TaxClassId, COLUMN_DB_NAME_OF_TaxClassId); + map.put(COLUMN_UNCAP_PROP_NAME_OF_TaxPriority, COLUMN_DB_NAME_OF_TaxPriority); + map.put(COLUMN_UNCAP_PROP_NAME_OF_TaxRate, COLUMN_DB_NAME_OF_TaxRate); + map.put(COLUMN_UNCAP_PROP_NAME_OF_TaxDescription, COLUMN_DB_NAME_OF_TaxDescription); + map.put(COLUMN_UNCAP_PROP_NAME_OF_LastModified, COLUMN_DB_NAME_OF_LastModified); + map.put(COLUMN_UNCAP_PROP_NAME_OF_DateAdded, COLUMN_DB_NAME_OF_DateAdded); + + _uncapPropNameDbNameMap = java.util.Collections.unmodifiableMap(map); + return _uncapPropNameDbNameMap; + } + + /** {uncap-prop-name : cap-prop-name} map. */ + private static java.util.Map _uncapPropNameCapPropNameMap; + protected static java.util.Map createUncapPropNameCapPropNameMap() { + if (_uncapPropNameCapPropNameMap != null) { + return _uncapPropNameCapPropNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_UNCAP_PROP_NAME, TABLE_CAP_PROP_NAME); + + map.put(COLUMN_UNCAP_PROP_NAME_OF_TaxRatesId, COLUMN_CAP_PROP_NAME_OF_TaxRatesId); + map.put(COLUMN_UNCAP_PROP_NAME_OF_TaxZoneId, COLUMN_CAP_PROP_NAME_OF_TaxZoneId); + map.put(COLUMN_UNCAP_PROP_NAME_OF_TaxClassId, COLUMN_CAP_PROP_NAME_OF_TaxClassId); + map.put(COLUMN_UNCAP_PROP_NAME_OF_TaxPriority, COLUMN_CAP_PROP_NAME_OF_TaxPriority); + map.put(COLUMN_UNCAP_PROP_NAME_OF_TaxRate, COLUMN_CAP_PROP_NAME_OF_TaxRate); + map.put(COLUMN_UNCAP_PROP_NAME_OF_TaxDescription, COLUMN_CAP_PROP_NAME_OF_TaxDescription); + map.put(COLUMN_UNCAP_PROP_NAME_OF_LastModified, COLUMN_CAP_PROP_NAME_OF_LastModified); + map.put(COLUMN_UNCAP_PROP_NAME_OF_DateAdded, COLUMN_CAP_PROP_NAME_OF_DateAdded); + + _uncapPropNameCapPropNameMap = java.util.Collections.unmodifiableMap(map); + return _uncapPropNameCapPropNameMap; + } + + // =================================================================================== + // Name-Map + // ======== + /** + * This method implements the method that is declared at super. + * + * @return {db-name : cap-prop-name} map. + */ + public java.util.Map getDbNameCapPropNameMap() { + return createDbNameCapPropNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {db-name : uncap-prop-name} map. + */ + public java.util.Map getDbNameUncapPropNameMap() { + return createDbNameUncapPropNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {cap-prop-name : db-name} map. + */ + public java.util.Map getCapPropNameDbNameMap() { + return createCapPropNameDbNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {cap-prop-name : uncap-prop-name} map. + */ + public java.util.Map getCapPropNameUncapPropNameMap() { + return createCapPropNameUncapPropNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {uncap-prop-name : db-name} map. + */ + public java.util.Map getUncapPropNameDbNameMap() { + return createUncapPropNameDbNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {uncap-prop-name : cap-prop-name} map. + */ + public java.util.Map getUncapPropNameCapPropNameMap() { + return createUncapPropNameCapPropNameMap(); + } + + // =================================================================================== + // Table Name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + public String getTableDbName() { + return TABLE_DB_NAME; + } + + /** + * This method implements the method that is declared at super. + * + * @return Table cap-prop-name. (NotNull) + */ + public String getTableCapPropName() { + return TABLE_CAP_PROP_NAME; + } + + /** + * This method implements the method that is declared at super. + * + * @return Table property-name. (NotNull) + */ + public String getTableUncapPropName() { + return TABLE_UNCAP_PROP_NAME; + } + + // =================================================================================== + // Column Name + // =========== + public java.util.List getColumnDbNameList() { + final String[] columns = getColumnDbNameCommaString().split(","); + final java.util.List resultList = new java.util.ArrayList(); + for (int i=0; i < columns.length; i++) { + resultList.add(columns[i].trim()); + } + return resultList; + } + + public java.util.List getColumnCapPropNameList() { + final java.util.List columnDbNameList = getColumnDbNameList(); + final java.util.List resultList = new java.util.ArrayList(); + for (final java.util.Iterator ite = columnDbNameList.iterator(); ite.hasNext(); ) { + resultList.add(getDbNameCapPropNameMap().get((String)ite.next())); + } + return resultList; + } + + public java.util.List getColumnUncapPropNameList() { + final java.util.List columnDbNameList = getColumnDbNameList(); + final java.util.List resultList = new java.util.ArrayList(); + for (final java.util.Iterator ite = columnDbNameList.iterator(); ite.hasNext(); ) { + resultList.add(getDbNameUncapPropNameMap().get((String)ite.next())); + } + return resultList; + } + + /** + * This method implements the method that is declared at super. + * + * @return Column-db-name comma-string. (NotNull) + */ + public String getColumnDbNameCommaString() { + return "TAX_RATES_ID, TAX_ZONE_ID, TAX_CLASS_ID, TAX_PRIORITY, TAX_RATE, TAX_DESCRIPTION, LAST_MODIFIED, DATE_ADDED"; + } + + // =================================================================================== + // Type Name + // ========= + /** + * This method implements the method that is declared at super. + * + * @return The type-name of entity. (NotNull) + */ + public String getEntityTypeName() { + return "jp.sf.pal.pompei.exentity.TaxRates"; + } + + /** + * This method implements the method that is declared at super. + * + * @return The type-name of condition-bean. (NotNull) + */ + public String getConditionBeanTypeName() { + return "jp.sf.pal.pompei.cbean.bs.TaxRatesCB"; + } + + /** + * This method implements the method that is declared at super. + * + * @return The type-name of dao. (NotNull) + */ + public String getDaoTypeName() { + return "jp.sf.pal.pompei.exdao.TaxRatesDao"; + } + + /** + * This method implements the method that is declared at super. + * + * @return The type-name of behavior. (NotNull) + */ + public String getBehaviorTypeName() { + return "jp.sf.pal.pompei.exbhv.TaxRatesBhv"; + } + + // =================================================================================== + // Type + // ==== + /** + * This method implements the method that is declared at super. + * + * @return The type of entity. (NotNull) + */ + public Class getEntityType() { + return ENTITY_TYPE; + } + + // =================================================================================== + // Instance + // ======== + /** + * This method implements the method that is declared at super. + * + * @return The type of entity. (NotNull) + */ + public Entity newEntity() { + return newMyEntity(); + } + + /** + * New the instance of my entity. + * + * @return The instance of my entity. (NotNull) + */ + public TaxRates newMyEntity() { + return new TaxRates(); + } + + // =================================================================================== + // Foreign DBMeta + // ============== + /** + * This method implements the method that is declared at super. + * + * @param foreignPropertyName Foreign-property-name(Both OK - InitCap or not). (NotNull) + * @return Foreign DBMeta. (NotNull) + */ + public DBMeta getForeignDBMeta(String foreignPropertyName) { + assertStringNotNullAndNotTrimmedEmpty("foreignPropertyName", foreignPropertyName); + final String methodName = "getForeignDBMeta_" + foreignPropertyName.substring(0, 1) + foreignPropertyName.substring(1); + + java.lang.reflect.Method method = null; + try { + method = this.getClass().getMethod(methodName, new Class[]{}); + } catch (NoSuchMethodException e) { + String msg = "The foreignPropertyName is not found: foreignPropertyName=" + foreignPropertyName; + msg = msg + " tableName=" + TABLE_DB_NAME + " methodName=" + methodName; + throw new RuntimeException(msg, e); + } + try { + return (DBMeta)method.invoke(this, new Object[]{}); + } catch (IllegalAccessException e) { + throw new RuntimeException(e); + } catch (java.lang.reflect.InvocationTargetException e) { + throw new RuntimeException(e.getCause()); + } + } + + // =================================================================================== + // Determination + // ============= + /** + * This method implements the method that is declared at super. + * + * @return Determination. + */ + public boolean hasTwoOrMorePrimaryKeys() { + return false; + } + + /** + * This method implements the method that is declared at super. + * + * @return Determination. + */ + public boolean hasCommonColumn() { + return false; + } + + // =================================================================================== + // Entity Handling + // =============== + // ----------------------------------------------------- + // Accept + // ------ + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @param primaryKeyMap Primary key map. (NotNull and NotEmpty) + */ + public void acceptPrimaryKeyMap(Entity entity, java.util.Map primaryKeyMap) { + final TaxRates myEntity = (TaxRates)entity; + MapAssertUtil.assertPrimaryKeyMapNotNullAndNotEmpty(primaryKeyMap); + final MapStringValueAnalyzer analyzer = new MapStringValueAnalyzer(primaryKeyMap, entity.getModifiedPropertyNames()); + + MapAssertUtil.assertColumnExistingInPrimaryKeyMap(primaryKeyMap, "TAX_RATES_ID"); + if (analyzer.init("TAX_RATES_ID", "taxRatesId", "taxRatesId")) { myEntity.setTaxRatesId(analyzer.analyzeNumber(java.math.BigDecimal.class)); }; + + + } + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @param primaryKeyMapString Primary-key map-string. (NotNull and NotEmpty) + */ + public void acceptPrimaryKeyMapString(Entity entity, String primaryKeyMapString) { + MapStringUtil.acceptPrimaryKeyMapString(primaryKeyMapString, entity); + } + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @param columnValueMap Column-value map. (NotNull and NotEmpty) + */ + public void acceptColumnValueMap(Entity entity, java.util.Map columnValueMap) { + final TaxRates myEntity = (TaxRates)entity; + MapAssertUtil.assertColumnValueMapNotNullAndNotEmpty(columnValueMap); + final MapStringValueAnalyzer analyzer = new MapStringValueAnalyzer(columnValueMap, entity.getModifiedPropertyNames()); + + if (analyzer.init("TAX_RATES_ID", "taxRatesId", "taxRatesId")) { myEntity.setTaxRatesId(analyzer.analyzeNumber(java.math.BigDecimal.class)); }; + if (analyzer.init("TAX_ZONE_ID", "taxZoneId", "taxZoneId")) { myEntity.setTaxZoneId(analyzer.analyzeNumber(java.math.BigDecimal.class)); }; + if (analyzer.init("TAX_CLASS_ID", "taxClassId", "taxClassId")) { myEntity.setTaxClassId(analyzer.analyzeNumber(java.math.BigDecimal.class)); }; + if (analyzer.init("TAX_PRIORITY", "taxPriority", "taxPriority")) { myEntity.setTaxPriority(analyzer.analyzeNumber(java.math.BigDecimal.class)); }; + if (analyzer.init("TAX_RATE", "taxRate", "taxRate")) { myEntity.setTaxRate(analyzer.analyzeNumber(java.math.BigDecimal.class)); }; + if (analyzer.init("TAX_DESCRIPTION", "taxDescription", "taxDescription")) { myEntity.setTaxDescription(analyzer.analyzeString(String.class)); }; + if (analyzer.init("LAST_MODIFIED", "lastModified", "lastModified")) { myEntity.setLastModified(analyzer.analyzeDate(java.sql.Timestamp.class)); }; + if (analyzer.init("DATE_ADDED", "dateAdded", "dateAdded")) { myEntity.setDateAdded(analyzer.analyzeDate(java.sql.Timestamp.class)); }; + + } + + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @param columnValueMapString Column-value map-string. (NotNull and NotEmpty) + */ + public void acceptColumnValueMapString(Entity entity, String columnValueMapString) { + MapStringUtil.acceptColumnValueMapString(columnValueMapString, entity); + } + + + // ----------------------------------------------------- + // Extract + // ------- + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @return Primary-key map-string. (NotNull) + */ + public String extractPrimaryKeyMapString(Entity entity) { + return MapStringUtil.extractPrimaryKeyMapString(entity); + } + + /** + * Extract primary-key map-string. + * + * @param entity Target entity. (NotNull) + * @param startBrace Start-brace. (NotNull) + * @param endBrace End-brace. (NotNull) + * @param delimiter Delimiter. (NotNull) + * @param equal Equal. (NotNull) + * @return Primary-key map-string. (NotNull) + */ + public String extractPrimaryKeyMapString(Entity entity, String startBrace, String endBrace, String delimiter, String equal) { + final TaxRates myEntity = (TaxRates)entity; + final String mapMarkAndStartBrace = MAP_STRING_MAP_MARK + startBrace; + final StringBuffer sb = new StringBuffer(); + helpAppendingColumnValueString(sb, delimiter, equal, "TAX_RATES_ID", myEntity.getTaxRatesId()); + + sb.delete(0, delimiter.length()).insert(0, mapMarkAndStartBrace).append(endBrace); + return sb.toString(); + + } + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @return Column-value map-string. (NotNull) + */ + public String extractColumnValueMapString(Entity entity) { + return MapStringUtil.extractColumnValueMapString(entity); + } + + /** + * Extract column-value map-string. + * + * @param entity Target entity. (NotNull) + * @param startBrace Start-brace. (NotNull) + * @param endBrace End-brace. (NotNull) + * @param delimiter Delimiter. (NotNull) + * @param equal Equal. (NotNull) + * @return Column-value map-string. (NotNull) + */ + public String extractColumnValueMapString(Entity entity, String startBrace, String endBrace, String delimiter, String equal) { + final TaxRates myEntity = (TaxRates)entity; + final String mapMarkAndStartBrace = MAP_STRING_MAP_MARK + startBrace; + final StringBuffer sb = new StringBuffer(); + helpAppendingColumnValueString(sb, delimiter, equal, "TAX_RATES_ID", myEntity.getTaxRatesId()); + helpAppendingColumnValueString(sb, delimiter, equal, "TAX_ZONE_ID", myEntity.getTaxZoneId()); + helpAppendingColumnValueString(sb, delimiter, equal, "TAX_CLASS_ID", myEntity.getTaxClassId()); + helpAppendingColumnValueString(sb, delimiter, equal, "TAX_PRIORITY", myEntity.getTaxPriority()); + helpAppendingColumnValueString(sb, delimiter, equal, "TAX_RATE", myEntity.getTaxRate()); + helpAppendingColumnValueString(sb, delimiter, equal, "TAX_DESCRIPTION", myEntity.getTaxDescription()); + helpAppendingColumnValueString(sb, delimiter, equal, "LAST_MODIFIED", myEntity.getLastModified()); + helpAppendingColumnValueString(sb, delimiter, equal, "DATE_ADDED", myEntity.getDateAdded()); + + sb.delete(0, delimiter.length()).insert(0, mapMarkAndStartBrace).append(endBrace); + return sb.toString(); + } + + private void helpAppendingColumnValueString(StringBuffer sb, String delimiter, String equal, String colName, Object value) { + sb.append(delimiter).append(colName).append(equal); + sb.append(helpGettingColumnStringValue(value)); + } + + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @return Column-value map-string. (NotNull) + */ + public String extractCommonColumnValueMapString(Entity entity) { + return "map:{}"; + } + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @return Column-value map-string. (NotNull) + */ + public String extractCommonColumnValueMapString(Entity entity, String startBrace, String endBrace, String delimiter, String equal) { + return "map:" + startBrace + endBrace; + } + + + // ----------------------------------------------------- + // Convert + // ------- + public java.util.List convertToColumnValueList(Entity entity) { + return new java.util.ArrayList(convertToColumnValueMap(entity).values()); + } + + public java.util.Map convertToColumnValueMap(Entity entity) { + final TaxRates myEntity = downcast(entity); + final java.util.Map valueMap = new java.util.LinkedHashMap(); + valueMap.put("TAX_RATES_ID", myEntity.getTaxRatesId()); + valueMap.put("TAX_ZONE_ID", myEntity.getTaxZoneId()); + valueMap.put("TAX_CLASS_ID", myEntity.getTaxClassId()); + valueMap.put("TAX_PRIORITY", myEntity.getTaxPriority()); + valueMap.put("TAX_RATE", myEntity.getTaxRate()); + valueMap.put("TAX_DESCRIPTION", myEntity.getTaxDescription()); + valueMap.put("LAST_MODIFIED", myEntity.getLastModified()); + valueMap.put("DATE_ADDED", myEntity.getDateAdded()); + return valueMap; + } + + public java.util.List convertToColumnStringValueList(Entity entity) { + return new java.util.ArrayList(convertToColumnStringValueMap(entity).values()); + } + + public java.util.Map convertToColumnStringValueMap(Entity entity) { + final TaxRates myEntity = downcast(entity); + final java.util.Map valueMap = new java.util.LinkedHashMap(); + valueMap.put("TAX_RATES_ID", helpGettingColumnStringValue(myEntity.getTaxRatesId())); + valueMap.put("TAX_ZONE_ID", helpGettingColumnStringValue(myEntity.getTaxZoneId())); + valueMap.put("TAX_CLASS_ID", helpGettingColumnStringValue(myEntity.getTaxClassId())); + valueMap.put("TAX_PRIORITY", helpGettingColumnStringValue(myEntity.getTaxPriority())); + valueMap.put("TAX_RATE", helpGettingColumnStringValue(myEntity.getTaxRate())); + valueMap.put("TAX_DESCRIPTION", helpGettingColumnStringValue(myEntity.getTaxDescription())); + valueMap.put("LAST_MODIFIED", helpGettingColumnStringValue(myEntity.getLastModified())); + valueMap.put("DATE_ADDED", helpGettingColumnStringValue(myEntity.getDateAdded())); + return valueMap; + } + + // =================================================================================== + // JDBC Support + // ============ + public String getPreparedInsertClause() { + return "insert into TAX_RATES(TAX_RATES_ID, TAX_ZONE_ID, TAX_CLASS_ID, TAX_PRIORITY, TAX_RATE, TAX_DESCRIPTION, LAST_MODIFIED, DATE_ADDED) values(? , ? , ? , ? , ? , ? , ? , ? )"; + } + + public String getPreparedInsertClause(String tablePrefix) { + return "insert into " + tablePrefix + "TAX_RATES(TAX_RATES_ID, TAX_ZONE_ID, TAX_CLASS_ID, TAX_PRIORITY, TAX_RATE, TAX_DESCRIPTION, LAST_MODIFIED, DATE_ADDED) values(? , ? , ? , ? , ? , ? , ? , ? )"; + } + + // =================================================================================== + // Helper + // ====== + protected TaxRates downcast(Entity entity) { + assertObjectNotNull("entity", entity); + try { + return (TaxRates)entity; + } catch (ClassCastException e) { + String msg = "The entity should be TaxRates but it was: " + entity.getClass(); + throw new IllegalStateException(msg, e); + } + } + + protected void checkDowncast(Entity entity) { + downcast(entity); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/dbmeta/WhosOnlineDbm.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/dbmeta/WhosOnlineDbm.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/dbmeta/WhosOnlineDbm.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,727 @@ +package jp.sf.pal.pompei.bsentity.dbmeta; + + +import jp.sf.pal.pompei.allcommon.Entity; +import jp.sf.pal.pompei.allcommon.dbmeta.DBMeta; +import jp.sf.pal.pompei.allcommon.dbmeta.AbstractDBMeta; +import jp.sf.pal.pompei.exentity.WhosOnline; + +/** + * The dbmeta of WHOS_ONLINE. (Singleton) + * + *
+ * [primary-key]
+ *     
+ * 
+ * [column-property]
+ *     CUSTOMER_ID, FULL_NAME, SESSION_ID, IP_ADDRESS, TIME_ENTRY, TIME_LAST_CLICK, LAST_PAGE_URL
+ * 
+ * [foreign-property]
+ *     
+ * 
+ * [refferer-property]
+ *     
+ * 
+ * [sequence]
+ *     
+ * 
+ * [identity]
+ *     
+ * 
+ * [update-date]
+ *     
+ * 
+ * [version-no]
+ *     
+ * 
+ * 
+ * + * @author DBFlute(AutoGenerator) + */ +public class WhosOnlineDbm extends AbstractDBMeta { + + // =================================================================================== + // Definition + // ========== + /** The type of entity. */ + protected static final Class ENTITY_TYPE = WhosOnline.class; + + /** Singleton instance. */ + private static final WhosOnlineDbm _instance = new WhosOnlineDbm(); + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + private WhosOnlineDbm() { + } + + // =================================================================================== + // Singleton + // ========= + /** + * Get instance. + * + * @return Singleton instance. (NotNull) + */ + public static WhosOnlineDbm getInstance() { + return _instance; + } + + // =================================================================================== + // Name Definition + // =============== + /** Table db name. */ + public static final String TABLE_DB_NAME = "WHOS_ONLINE"; + + /** Table cap-prop name. */ + public static final String TABLE_CAP_PROP_NAME = "WhosOnline"; + + /** Table uncap-prop name. */ + public static final String TABLE_UNCAP_PROP_NAME = "whosOnline"; + + /** Db-name of CustomerId. */ + public static final String COLUMN_DB_NAME_OF_CustomerId = "CUSTOMER_ID"; + /** Db-name of FullName. */ + public static final String COLUMN_DB_NAME_OF_FullName = "FULL_NAME"; + /** Db-name of SessionId. */ + public static final String COLUMN_DB_NAME_OF_SessionId = "SESSION_ID"; + /** Db-name of IpAddress. */ + public static final String COLUMN_DB_NAME_OF_IpAddress = "IP_ADDRESS"; + /** Db-name of TimeEntry. */ + public static final String COLUMN_DB_NAME_OF_TimeEntry = "TIME_ENTRY"; + /** Db-name of TimeLastClick. */ + public static final String COLUMN_DB_NAME_OF_TimeLastClick = "TIME_LAST_CLICK"; + /** Db-name of LastPageUrl. */ + public static final String COLUMN_DB_NAME_OF_LastPageUrl = "LAST_PAGE_URL"; + + /** Cap-prop-name of CustomerId. */ + public static final String COLUMN_CAP_PROP_NAME_OF_CustomerId = "CustomerId"; + /** Cap-prop-name of FullName. */ + public static final String COLUMN_CAP_PROP_NAME_OF_FullName = "FullName"; + /** Cap-prop-name of SessionId. */ + public static final String COLUMN_CAP_PROP_NAME_OF_SessionId = "SessionId"; + /** Cap-prop-name of IpAddress. */ + public static final String COLUMN_CAP_PROP_NAME_OF_IpAddress = "IpAddress"; + /** Cap-prop-name of TimeEntry. */ + public static final String COLUMN_CAP_PROP_NAME_OF_TimeEntry = "TimeEntry"; + /** Cap-prop-name of TimeLastClick. */ + public static final String COLUMN_CAP_PROP_NAME_OF_TimeLastClick = "TimeLastClick"; + /** Cap-prop-name of LastPageUrl. */ + public static final String COLUMN_CAP_PROP_NAME_OF_LastPageUrl = "LastPageUrl"; + + + + /** Uncap-prop-name of CustomerId. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_CustomerId = "customerId"; + /** Uncap-prop-name of FullName. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_FullName = "fullName"; + /** Uncap-prop-name of SessionId. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_SessionId = "sessionId"; + /** Uncap-prop-name of IpAddress. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_IpAddress = "ipAddress"; + /** Uncap-prop-name of TimeEntry. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_TimeEntry = "timeEntry"; + /** Uncap-prop-name of TimeLastClick. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_TimeLastClick = "timeLastClick"; + /** Uncap-prop-name of LastPageUrl. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_LastPageUrl = "lastPageUrl"; + + + + /** {db-name : cap-prop-name} map. */ + private static java.util.Map _dbNameCapPropNameMap; + protected static java.util.Map createDbNameCapPropNameMap() { + if (_dbNameCapPropNameMap != null) { + return _dbNameCapPropNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_DB_NAME, TABLE_CAP_PROP_NAME); + + map.put(COLUMN_DB_NAME_OF_CustomerId, COLUMN_CAP_PROP_NAME_OF_CustomerId); + map.put(COLUMN_DB_NAME_OF_FullName, COLUMN_CAP_PROP_NAME_OF_FullName); + map.put(COLUMN_DB_NAME_OF_SessionId, COLUMN_CAP_PROP_NAME_OF_SessionId); + map.put(COLUMN_DB_NAME_OF_IpAddress, COLUMN_CAP_PROP_NAME_OF_IpAddress); + map.put(COLUMN_DB_NAME_OF_TimeEntry, COLUMN_CAP_PROP_NAME_OF_TimeEntry); + map.put(COLUMN_DB_NAME_OF_TimeLastClick, COLUMN_CAP_PROP_NAME_OF_TimeLastClick); + map.put(COLUMN_DB_NAME_OF_LastPageUrl, COLUMN_CAP_PROP_NAME_OF_LastPageUrl); + + _dbNameCapPropNameMap = java.util.Collections.unmodifiableMap(map); + return _dbNameCapPropNameMap; + } + + /** {db-name : uncap-prop-name} map. */ + private static java.util.Map _dbNameUncapPropNameMap; + protected static java.util.Map createDbNameUncapPropNameMap() { + if (_dbNameUncapPropNameMap != null) { + return _dbNameUncapPropNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_DB_NAME, TABLE_UNCAP_PROP_NAME); + + map.put(COLUMN_DB_NAME_OF_CustomerId, COLUMN_UNCAP_PROP_NAME_OF_CustomerId); + map.put(COLUMN_DB_NAME_OF_FullName, COLUMN_UNCAP_PROP_NAME_OF_FullName); + map.put(COLUMN_DB_NAME_OF_SessionId, COLUMN_UNCAP_PROP_NAME_OF_SessionId); + map.put(COLUMN_DB_NAME_OF_IpAddress, COLUMN_UNCAP_PROP_NAME_OF_IpAddress); + map.put(COLUMN_DB_NAME_OF_TimeEntry, COLUMN_UNCAP_PROP_NAME_OF_TimeEntry); + map.put(COLUMN_DB_NAME_OF_TimeLastClick, COLUMN_UNCAP_PROP_NAME_OF_TimeLastClick); + map.put(COLUMN_DB_NAME_OF_LastPageUrl, COLUMN_UNCAP_PROP_NAME_OF_LastPageUrl); + + _dbNameUncapPropNameMap = java.util.Collections.unmodifiableMap(map); + return _dbNameUncapPropNameMap; + } + + /** {cap-prop-name : db-name} map. */ + private static java.util.Map _capPropNameDbNameMap; + protected static java.util.Map createCapPropNameDbNameMap() { + if (_capPropNameDbNameMap != null) { + return _capPropNameDbNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_CAP_PROP_NAME, TABLE_DB_NAME); + + map.put(COLUMN_CAP_PROP_NAME_OF_CustomerId, COLUMN_DB_NAME_OF_CustomerId); + map.put(COLUMN_CAP_PROP_NAME_OF_FullName, COLUMN_DB_NAME_OF_FullName); + map.put(COLUMN_CAP_PROP_NAME_OF_SessionId, COLUMN_DB_NAME_OF_SessionId); + map.put(COLUMN_CAP_PROP_NAME_OF_IpAddress, COLUMN_DB_NAME_OF_IpAddress); + map.put(COLUMN_CAP_PROP_NAME_OF_TimeEntry, COLUMN_DB_NAME_OF_TimeEntry); + map.put(COLUMN_CAP_PROP_NAME_OF_TimeLastClick, COLUMN_DB_NAME_OF_TimeLastClick); + map.put(COLUMN_CAP_PROP_NAME_OF_LastPageUrl, COLUMN_DB_NAME_OF_LastPageUrl); + + _capPropNameDbNameMap = java.util.Collections.unmodifiableMap(map); + return _capPropNameDbNameMap; + } + + /** {cap-prop-name : uncap-prop-name} map. */ + private static java.util.Map _capPropNameUncapPropNameMap; + protected static java.util.Map createCapPropNameUncapPropNameMap() { + if (_capPropNameUncapPropNameMap != null) { + return _capPropNameUncapPropNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_CAP_PROP_NAME, TABLE_UNCAP_PROP_NAME); + + map.put(COLUMN_CAP_PROP_NAME_OF_CustomerId, COLUMN_UNCAP_PROP_NAME_OF_CustomerId); + map.put(COLUMN_CAP_PROP_NAME_OF_FullName, COLUMN_UNCAP_PROP_NAME_OF_FullName); + map.put(COLUMN_CAP_PROP_NAME_OF_SessionId, COLUMN_UNCAP_PROP_NAME_OF_SessionId); + map.put(COLUMN_CAP_PROP_NAME_OF_IpAddress, COLUMN_UNCAP_PROP_NAME_OF_IpAddress); + map.put(COLUMN_CAP_PROP_NAME_OF_TimeEntry, COLUMN_UNCAP_PROP_NAME_OF_TimeEntry); + map.put(COLUMN_CAP_PROP_NAME_OF_TimeLastClick, COLUMN_UNCAP_PROP_NAME_OF_TimeLastClick); + map.put(COLUMN_CAP_PROP_NAME_OF_LastPageUrl, COLUMN_UNCAP_PROP_NAME_OF_LastPageUrl); + + _capPropNameUncapPropNameMap = java.util.Collections.unmodifiableMap(map); + return _capPropNameUncapPropNameMap; + } + + /** {uncap-prop-name : db-name} map. */ + private static java.util.Map _uncapPropNameDbNameMap; + protected static java.util.Map createUncapPropNameDbNameMap() { + if (_uncapPropNameDbNameMap != null) { + return _uncapPropNameDbNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_UNCAP_PROP_NAME, TABLE_DB_NAME); + + map.put(COLUMN_UNCAP_PROP_NAME_OF_CustomerId, COLUMN_DB_NAME_OF_CustomerId); + map.put(COLUMN_UNCAP_PROP_NAME_OF_FullName, COLUMN_DB_NAME_OF_FullName); + map.put(COLUMN_UNCAP_PROP_NAME_OF_SessionId, COLUMN_DB_NAME_OF_SessionId); + map.put(COLUMN_UNCAP_PROP_NAME_OF_IpAddress, COLUMN_DB_NAME_OF_IpAddress); + map.put(COLUMN_UNCAP_PROP_NAME_OF_TimeEntry, COLUMN_DB_NAME_OF_TimeEntry); + map.put(COLUMN_UNCAP_PROP_NAME_OF_TimeLastClick, COLUMN_DB_NAME_OF_TimeLastClick); + map.put(COLUMN_UNCAP_PROP_NAME_OF_LastPageUrl, COLUMN_DB_NAME_OF_LastPageUrl); + + _uncapPropNameDbNameMap = java.util.Collections.unmodifiableMap(map); + return _uncapPropNameDbNameMap; + } + + /** {uncap-prop-name : cap-prop-name} map. */ + private static java.util.Map _uncapPropNameCapPropNameMap; + protected static java.util.Map createUncapPropNameCapPropNameMap() { + if (_uncapPropNameCapPropNameMap != null) { + return _uncapPropNameCapPropNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_UNCAP_PROP_NAME, TABLE_CAP_PROP_NAME); + + map.put(COLUMN_UNCAP_PROP_NAME_OF_CustomerId, COLUMN_CAP_PROP_NAME_OF_CustomerId); + map.put(COLUMN_UNCAP_PROP_NAME_OF_FullName, COLUMN_CAP_PROP_NAME_OF_FullName); + map.put(COLUMN_UNCAP_PROP_NAME_OF_SessionId, COLUMN_CAP_PROP_NAME_OF_SessionId); + map.put(COLUMN_UNCAP_PROP_NAME_OF_IpAddress, COLUMN_CAP_PROP_NAME_OF_IpAddress); + map.put(COLUMN_UNCAP_PROP_NAME_OF_TimeEntry, COLUMN_CAP_PROP_NAME_OF_TimeEntry); + map.put(COLUMN_UNCAP_PROP_NAME_OF_TimeLastClick, COLUMN_CAP_PROP_NAME_OF_TimeLastClick); + map.put(COLUMN_UNCAP_PROP_NAME_OF_LastPageUrl, COLUMN_CAP_PROP_NAME_OF_LastPageUrl); + + _uncapPropNameCapPropNameMap = java.util.Collections.unmodifiableMap(map); + return _uncapPropNameCapPropNameMap; + } + + // =================================================================================== + // Name-Map + // ======== + /** + * This method implements the method that is declared at super. + * + * @return {db-name : cap-prop-name} map. + */ + public java.util.Map getDbNameCapPropNameMap() { + return createDbNameCapPropNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {db-name : uncap-prop-name} map. + */ + public java.util.Map getDbNameUncapPropNameMap() { + return createDbNameUncapPropNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {cap-prop-name : db-name} map. + */ + public java.util.Map getCapPropNameDbNameMap() { + return createCapPropNameDbNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {cap-prop-name : uncap-prop-name} map. + */ + public java.util.Map getCapPropNameUncapPropNameMap() { + return createCapPropNameUncapPropNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {uncap-prop-name : db-name} map. + */ + public java.util.Map getUncapPropNameDbNameMap() { + return createUncapPropNameDbNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {uncap-prop-name : cap-prop-name} map. + */ + public java.util.Map getUncapPropNameCapPropNameMap() { + return createUncapPropNameCapPropNameMap(); + } + + // =================================================================================== + // Table Name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + public String getTableDbName() { + return TABLE_DB_NAME; + } + + /** + * This method implements the method that is declared at super. + * + * @return Table cap-prop-name. (NotNull) + */ + public String getTableCapPropName() { + return TABLE_CAP_PROP_NAME; + } + + /** + * This method implements the method that is declared at super. + * + * @return Table property-name. (NotNull) + */ + public String getTableUncapPropName() { + return TABLE_UNCAP_PROP_NAME; + } + + // =================================================================================== + // Column Name + // =========== + public java.util.List getColumnDbNameList() { + final String[] columns = getColumnDbNameCommaString().split(","); + final java.util.List resultList = new java.util.ArrayList(); + for (int i=0; i < columns.length; i++) { + resultList.add(columns[i].trim()); + } + return resultList; + } + + public java.util.List getColumnCapPropNameList() { + final java.util.List columnDbNameList = getColumnDbNameList(); + final java.util.List resultList = new java.util.ArrayList(); + for (final java.util.Iterator ite = columnDbNameList.iterator(); ite.hasNext(); ) { + resultList.add(getDbNameCapPropNameMap().get((String)ite.next())); + } + return resultList; + } + + public java.util.List getColumnUncapPropNameList() { + final java.util.List columnDbNameList = getColumnDbNameList(); + final java.util.List resultList = new java.util.ArrayList(); + for (final java.util.Iterator ite = columnDbNameList.iterator(); ite.hasNext(); ) { + resultList.add(getDbNameUncapPropNameMap().get((String)ite.next())); + } + return resultList; + } + + /** + * This method implements the method that is declared at super. + * + * @return Column-db-name comma-string. (NotNull) + */ + public String getColumnDbNameCommaString() { + return "CUSTOMER_ID, FULL_NAME, SESSION_ID, IP_ADDRESS, TIME_ENTRY, TIME_LAST_CLICK, LAST_PAGE_URL"; + } + + // =================================================================================== + // Type Name + // ========= + /** + * This method implements the method that is declared at super. + * + * @return The type-name of entity. (NotNull) + */ + public String getEntityTypeName() { + return "jp.sf.pal.pompei.exentity.WhosOnline"; + } + + /** + * This method implements the method that is declared at super. + * + * @return The type-name of condition-bean. (NotNull) + */ + public String getConditionBeanTypeName() { + return "jp.sf.pal.pompei.cbean.bs.WhosOnlineCB"; + } + + /** + * This method implements the method that is declared at super. + * + * @return The type-name of dao. (NotNull) + */ + public String getDaoTypeName() { + return "jp.sf.pal.pompei.exdao.WhosOnlineDao"; + } + + /** + * This method implements the method that is declared at super. + * + * @return The type-name of behavior. (NotNull) + */ + public String getBehaviorTypeName() { + return "jp.sf.pal.pompei.exbhv.WhosOnlineBhv"; + } + + // =================================================================================== + // Type + // ==== + /** + * This method implements the method that is declared at super. + * + * @return The type of entity. (NotNull) + */ + public Class getEntityType() { + return ENTITY_TYPE; + } + + // =================================================================================== + // Instance + // ======== + /** + * This method implements the method that is declared at super. + * + * @return The type of entity. (NotNull) + */ + public Entity newEntity() { + return newMyEntity(); + } + + /** + * New the instance of my entity. + * + * @return The instance of my entity. (NotNull) + */ + public WhosOnline newMyEntity() { + return new WhosOnline(); + } + + // =================================================================================== + // Foreign DBMeta + // ============== + /** + * This method implements the method that is declared at super. + * + * @param foreignPropertyName Foreign-property-name(Both OK - InitCap or not). (NotNull) + * @return Foreign DBMeta. (NotNull) + */ + public DBMeta getForeignDBMeta(String foreignPropertyName) { + assertStringNotNullAndNotTrimmedEmpty("foreignPropertyName", foreignPropertyName); + final String methodName = "getForeignDBMeta_" + foreignPropertyName.substring(0, 1) + foreignPropertyName.substring(1); + + java.lang.reflect.Method method = null; + try { + method = this.getClass().getMethod(methodName, new Class[]{}); + } catch (NoSuchMethodException e) { + String msg = "The foreignPropertyName is not found: foreignPropertyName=" + foreignPropertyName; + msg = msg + " tableName=" + TABLE_DB_NAME + " methodName=" + methodName; + throw new RuntimeException(msg, e); + } + try { + return (DBMeta)method.invoke(this, new Object[]{}); + } catch (IllegalAccessException e) { + throw new RuntimeException(e); + } catch (java.lang.reflect.InvocationTargetException e) { + throw new RuntimeException(e.getCause()); + } + } + + // =================================================================================== + // Determination + // ============= + /** + * This method implements the method that is declared at super. + * + * @return Determination. + */ + public boolean hasTwoOrMorePrimaryKeys() { + return false; + } + + /** + * This method implements the method that is declared at super. + * + * @return Determination. + */ + public boolean hasCommonColumn() { + return false; + } + + // =================================================================================== + // Entity Handling + // =============== + // ----------------------------------------------------- + // Accept + // ------ + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @param primaryKeyMap Primary key map. (NotNull and NotEmpty) + */ + public void acceptPrimaryKeyMap(Entity entity, java.util.Map primaryKeyMap) { + + String msg = "This table has no primary-keys: " + getTableDbName(); + throw new IllegalStateException(msg); + + } + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @param primaryKeyMapString Primary-key map-string. (NotNull and NotEmpty) + */ + public void acceptPrimaryKeyMapString(Entity entity, String primaryKeyMapString) { + MapStringUtil.acceptPrimaryKeyMapString(primaryKeyMapString, entity); + } + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @param columnValueMap Column-value map. (NotNull and NotEmpty) + */ + public void acceptColumnValueMap(Entity entity, java.util.Map columnValueMap) { + final WhosOnline myEntity = (WhosOnline)entity; + MapAssertUtil.assertColumnValueMapNotNullAndNotEmpty(columnValueMap); + final MapStringValueAnalyzer analyzer = new MapStringValueAnalyzer(columnValueMap, entity.getModifiedPropertyNames()); + + if (analyzer.init("CUSTOMER_ID", "customerId", "customerId")) { myEntity.setCustomerId(analyzer.analyzeNumber(java.math.BigDecimal.class)); }; + if (analyzer.init("FULL_NAME", "fullName", "fullName")) { myEntity.setFullName(analyzer.analyzeString(String.class)); }; + if (analyzer.init("SESSION_ID", "sessionId", "sessionId")) { myEntity.setSessionId(analyzer.analyzeString(String.class)); }; + if (analyzer.init("IP_ADDRESS", "ipAddress", "ipAddress")) { myEntity.setIpAddress(analyzer.analyzeString(String.class)); }; + if (analyzer.init("TIME_ENTRY", "timeEntry", "timeEntry")) { myEntity.setTimeEntry(analyzer.analyzeString(String.class)); }; + if (analyzer.init("TIME_LAST_CLICK", "timeLastClick", "timeLastClick")) { myEntity.setTimeLastClick(analyzer.analyzeString(String.class)); }; + if (analyzer.init("LAST_PAGE_URL", "lastPageUrl", "lastPageUrl")) { myEntity.setLastPageUrl(analyzer.analyzeString(String.class)); }; + + } + + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @param columnValueMapString Column-value map-string. (NotNull and NotEmpty) + */ + public void acceptColumnValueMapString(Entity entity, String columnValueMapString) { + MapStringUtil.acceptColumnValueMapString(columnValueMapString, entity); + } + + + // ----------------------------------------------------- + // Extract + // ------- + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @return Primary-key map-string. (NotNull) + */ + public String extractPrimaryKeyMapString(Entity entity) { + return MapStringUtil.extractPrimaryKeyMapString(entity); + } + + /** + * Extract primary-key map-string. + * + * @param entity Target entity. (NotNull) + * @param startBrace Start-brace. (NotNull) + * @param endBrace End-brace. (NotNull) + * @param delimiter Delimiter. (NotNull) + * @param equal Equal. (NotNull) + * @return Primary-key map-string. (NotNull) + */ + public String extractPrimaryKeyMapString(Entity entity, String startBrace, String endBrace, String delimiter, String equal) { + final WhosOnline myEntity = (WhosOnline)entity; + return extractColumnValueMapString(entity, startBrace, endBrace, delimiter, equal); + + } + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @return Column-value map-string. (NotNull) + */ + public String extractColumnValueMapString(Entity entity) { + return MapStringUtil.extractColumnValueMapString(entity); + } + + /** + * Extract column-value map-string. + * + * @param entity Target entity. (NotNull) + * @param startBrace Start-brace. (NotNull) + * @param endBrace End-brace. (NotNull) + * @param delimiter Delimiter. (NotNull) + * @param equal Equal. (NotNull) + * @return Column-value map-string. (NotNull) + */ + public String extractColumnValueMapString(Entity entity, String startBrace, String endBrace, String delimiter, String equal) { + final WhosOnline myEntity = (WhosOnline)entity; + final String mapMarkAndStartBrace = MAP_STRING_MAP_MARK + startBrace; + final StringBuffer sb = new StringBuffer(); + helpAppendingColumnValueString(sb, delimiter, equal, "CUSTOMER_ID", myEntity.getCustomerId()); + helpAppendingColumnValueString(sb, delimiter, equal, "FULL_NAME", myEntity.getFullName()); + helpAppendingColumnValueString(sb, delimiter, equal, "SESSION_ID", myEntity.getSessionId()); + helpAppendingColumnValueString(sb, delimiter, equal, "IP_ADDRESS", myEntity.getIpAddress()); + helpAppendingColumnValueString(sb, delimiter, equal, "TIME_ENTRY", myEntity.getTimeEntry()); + helpAppendingColumnValueString(sb, delimiter, equal, "TIME_LAST_CLICK", myEntity.getTimeLastClick()); + helpAppendingColumnValueString(sb, delimiter, equal, "LAST_PAGE_URL", myEntity.getLastPageUrl()); + + sb.delete(0, delimiter.length()).insert(0, mapMarkAndStartBrace).append(endBrace); + return sb.toString(); + } + + private void helpAppendingColumnValueString(StringBuffer sb, String delimiter, String equal, String colName, Object value) { + sb.append(delimiter).append(colName).append(equal); + sb.append(helpGettingColumnStringValue(value)); + } + + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @return Column-value map-string. (NotNull) + */ + public String extractCommonColumnValueMapString(Entity entity) { + return "map:{}"; + } + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @return Column-value map-string. (NotNull) + */ + public String extractCommonColumnValueMapString(Entity entity, String startBrace, String endBrace, String delimiter, String equal) { + return "map:" + startBrace + endBrace; + } + + + // ----------------------------------------------------- + // Convert + // ------- + public java.util.List convertToColumnValueList(Entity entity) { + return new java.util.ArrayList(convertToColumnValueMap(entity).values()); + } + + public java.util.Map convertToColumnValueMap(Entity entity) { + final WhosOnline myEntity = downcast(entity); + final java.util.Map valueMap = new java.util.LinkedHashMap(); + valueMap.put("CUSTOMER_ID", myEntity.getCustomerId()); + valueMap.put("FULL_NAME", myEntity.getFullName()); + valueMap.put("SESSION_ID", myEntity.getSessionId()); + valueMap.put("IP_ADDRESS", myEntity.getIpAddress()); + valueMap.put("TIME_ENTRY", myEntity.getTimeEntry()); + valueMap.put("TIME_LAST_CLICK", myEntity.getTimeLastClick()); + valueMap.put("LAST_PAGE_URL", myEntity.getLastPageUrl()); + return valueMap; + } + + public java.util.List convertToColumnStringValueList(Entity entity) { + return new java.util.ArrayList(convertToColumnStringValueMap(entity).values()); + } + + public java.util.Map convertToColumnStringValueMap(Entity entity) { + final WhosOnline myEntity = downcast(entity); + final java.util.Map valueMap = new java.util.LinkedHashMap(); + valueMap.put("CUSTOMER_ID", helpGettingColumnStringValue(myEntity.getCustomerId())); + valueMap.put("FULL_NAME", helpGettingColumnStringValue(myEntity.getFullName())); + valueMap.put("SESSION_ID", helpGettingColumnStringValue(myEntity.getSessionId())); + valueMap.put("IP_ADDRESS", helpGettingColumnStringValue(myEntity.getIpAddress())); + valueMap.put("TIME_ENTRY", helpGettingColumnStringValue(myEntity.getTimeEntry())); + valueMap.put("TIME_LAST_CLICK", helpGettingColumnStringValue(myEntity.getTimeLastClick())); + valueMap.put("LAST_PAGE_URL", helpGettingColumnStringValue(myEntity.getLastPageUrl())); + return valueMap; + } + + // =================================================================================== + // JDBC Support + // ============ + public String getPreparedInsertClause() { + return "insert into WHOS_ONLINE(CUSTOMER_ID, FULL_NAME, SESSION_ID, IP_ADDRESS, TIME_ENTRY, TIME_LAST_CLICK, LAST_PAGE_URL) values(? , ? , ? , ? , ? , ? , ? )"; + } + + public String getPreparedInsertClause(String tablePrefix) { + return "insert into " + tablePrefix + "WHOS_ONLINE(CUSTOMER_ID, FULL_NAME, SESSION_ID, IP_ADDRESS, TIME_ENTRY, TIME_LAST_CLICK, LAST_PAGE_URL) values(? , ? , ? , ? , ? , ? , ? )"; + } + + // =================================================================================== + // Helper + // ====== + protected WhosOnline downcast(Entity entity) { + assertObjectNotNull("entity", entity); + try { + return (WhosOnline)entity; + } catch (ClassCastException e) { + String msg = "The entity should be WhosOnline but it was: " + entity.getClass(); + throw new IllegalStateException(msg, e); + } + } + + protected void checkDowncast(Entity entity) { + downcast(entity); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/dbmeta/ZonesDbm.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/dbmeta/ZonesDbm.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/dbmeta/ZonesDbm.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,688 @@ +package jp.sf.pal.pompei.bsentity.dbmeta; + + +import jp.sf.pal.pompei.allcommon.Entity; +import jp.sf.pal.pompei.allcommon.dbmeta.DBMeta; +import jp.sf.pal.pompei.allcommon.dbmeta.AbstractDBMeta; +import jp.sf.pal.pompei.exentity.Zones; + +/** + * The dbmeta of ZONES. (Singleton) + * + *
+ * [primary-key]
+ *     ZONE_ID
+ * 
+ * [column-property]
+ *     ZONE_ID, ZONE_COUNTRY_ID, ZONE_CODE, ZONE_NAME
+ * 
+ * [foreign-property]
+ *     
+ * 
+ * [refferer-property]
+ *     
+ * 
+ * [sequence]
+ *     
+ * 
+ * [identity]
+ *     
+ * 
+ * [update-date]
+ *     
+ * 
+ * [version-no]
+ *     
+ * 
+ * 
+ * + * @author DBFlute(AutoGenerator) + */ +public class ZonesDbm extends AbstractDBMeta { + + // =================================================================================== + // Definition + // ========== + /** The type of entity. */ + protected static final Class ENTITY_TYPE = Zones.class; + + /** Singleton instance. */ + private static final ZonesDbm _instance = new ZonesDbm(); + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + private ZonesDbm() { + } + + // =================================================================================== + // Singleton + // ========= + /** + * Get instance. + * + * @return Singleton instance. (NotNull) + */ + public static ZonesDbm getInstance() { + return _instance; + } + + // =================================================================================== + // Name Definition + // =============== + /** Table db name. */ + public static final String TABLE_DB_NAME = "ZONES"; + + /** Table cap-prop name. */ + public static final String TABLE_CAP_PROP_NAME = "Zones"; + + /** Table uncap-prop name. */ + public static final String TABLE_UNCAP_PROP_NAME = "zones"; + + /** Db-name of ZoneId. */ + public static final String COLUMN_DB_NAME_OF_ZoneId = "ZONE_ID"; + /** Db-name of ZoneCountryId. */ + public static final String COLUMN_DB_NAME_OF_ZoneCountryId = "ZONE_COUNTRY_ID"; + /** Db-name of ZoneCode. */ + public static final String COLUMN_DB_NAME_OF_ZoneCode = "ZONE_CODE"; + /** Db-name of ZoneName. */ + public static final String COLUMN_DB_NAME_OF_ZoneName = "ZONE_NAME"; + + /** Cap-prop-name of ZoneId. */ + public static final String COLUMN_CAP_PROP_NAME_OF_ZoneId = "ZoneId"; + /** Cap-prop-name of ZoneCountryId. */ + public static final String COLUMN_CAP_PROP_NAME_OF_ZoneCountryId = "ZoneCountryId"; + /** Cap-prop-name of ZoneCode. */ + public static final String COLUMN_CAP_PROP_NAME_OF_ZoneCode = "ZoneCode"; + /** Cap-prop-name of ZoneName. */ + public static final String COLUMN_CAP_PROP_NAME_OF_ZoneName = "ZoneName"; + + + + /** Uncap-prop-name of ZoneId. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_ZoneId = "zoneId"; + /** Uncap-prop-name of ZoneCountryId. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_ZoneCountryId = "zoneCountryId"; + /** Uncap-prop-name of ZoneCode. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_ZoneCode = "zoneCode"; + /** Uncap-prop-name of ZoneName. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_ZoneName = "zoneName"; + + + + /** {db-name : cap-prop-name} map. */ + private static java.util.Map _dbNameCapPropNameMap; + protected static java.util.Map createDbNameCapPropNameMap() { + if (_dbNameCapPropNameMap != null) { + return _dbNameCapPropNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_DB_NAME, TABLE_CAP_PROP_NAME); + + map.put(COLUMN_DB_NAME_OF_ZoneId, COLUMN_CAP_PROP_NAME_OF_ZoneId); + map.put(COLUMN_DB_NAME_OF_ZoneCountryId, COLUMN_CAP_PROP_NAME_OF_ZoneCountryId); + map.put(COLUMN_DB_NAME_OF_ZoneCode, COLUMN_CAP_PROP_NAME_OF_ZoneCode); + map.put(COLUMN_DB_NAME_OF_ZoneName, COLUMN_CAP_PROP_NAME_OF_ZoneName); + + _dbNameCapPropNameMap = java.util.Collections.unmodifiableMap(map); + return _dbNameCapPropNameMap; + } + + /** {db-name : uncap-prop-name} map. */ + private static java.util.Map _dbNameUncapPropNameMap; + protected static java.util.Map createDbNameUncapPropNameMap() { + if (_dbNameUncapPropNameMap != null) { + return _dbNameUncapPropNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_DB_NAME, TABLE_UNCAP_PROP_NAME); + + map.put(COLUMN_DB_NAME_OF_ZoneId, COLUMN_UNCAP_PROP_NAME_OF_ZoneId); + map.put(COLUMN_DB_NAME_OF_ZoneCountryId, COLUMN_UNCAP_PROP_NAME_OF_ZoneCountryId); + map.put(COLUMN_DB_NAME_OF_ZoneCode, COLUMN_UNCAP_PROP_NAME_OF_ZoneCode); + map.put(COLUMN_DB_NAME_OF_ZoneName, COLUMN_UNCAP_PROP_NAME_OF_ZoneName); + + _dbNameUncapPropNameMap = java.util.Collections.unmodifiableMap(map); + return _dbNameUncapPropNameMap; + } + + /** {cap-prop-name : db-name} map. */ + private static java.util.Map _capPropNameDbNameMap; + protected static java.util.Map createCapPropNameDbNameMap() { + if (_capPropNameDbNameMap != null) { + return _capPropNameDbNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_CAP_PROP_NAME, TABLE_DB_NAME); + + map.put(COLUMN_CAP_PROP_NAME_OF_ZoneId, COLUMN_DB_NAME_OF_ZoneId); + map.put(COLUMN_CAP_PROP_NAME_OF_ZoneCountryId, COLUMN_DB_NAME_OF_ZoneCountryId); + map.put(COLUMN_CAP_PROP_NAME_OF_ZoneCode, COLUMN_DB_NAME_OF_ZoneCode); + map.put(COLUMN_CAP_PROP_NAME_OF_ZoneName, COLUMN_DB_NAME_OF_ZoneName); + + _capPropNameDbNameMap = java.util.Collections.unmodifiableMap(map); + return _capPropNameDbNameMap; + } + + /** {cap-prop-name : uncap-prop-name} map. */ + private static java.util.Map _capPropNameUncapPropNameMap; + protected static java.util.Map createCapPropNameUncapPropNameMap() { + if (_capPropNameUncapPropNameMap != null) { + return _capPropNameUncapPropNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_CAP_PROP_NAME, TABLE_UNCAP_PROP_NAME); + + map.put(COLUMN_CAP_PROP_NAME_OF_ZoneId, COLUMN_UNCAP_PROP_NAME_OF_ZoneId); + map.put(COLUMN_CAP_PROP_NAME_OF_ZoneCountryId, COLUMN_UNCAP_PROP_NAME_OF_ZoneCountryId); + map.put(COLUMN_CAP_PROP_NAME_OF_ZoneCode, COLUMN_UNCAP_PROP_NAME_OF_ZoneCode); + map.put(COLUMN_CAP_PROP_NAME_OF_ZoneName, COLUMN_UNCAP_PROP_NAME_OF_ZoneName); + + _capPropNameUncapPropNameMap = java.util.Collections.unmodifiableMap(map); + return _capPropNameUncapPropNameMap; + } + + /** {uncap-prop-name : db-name} map. */ + private static java.util.Map _uncapPropNameDbNameMap; + protected static java.util.Map createUncapPropNameDbNameMap() { + if (_uncapPropNameDbNameMap != null) { + return _uncapPropNameDbNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_UNCAP_PROP_NAME, TABLE_DB_NAME); + + map.put(COLUMN_UNCAP_PROP_NAME_OF_ZoneId, COLUMN_DB_NAME_OF_ZoneId); + map.put(COLUMN_UNCAP_PROP_NAME_OF_ZoneCountryId, COLUMN_DB_NAME_OF_ZoneCountryId); + map.put(COLUMN_UNCAP_PROP_NAME_OF_ZoneCode, COLUMN_DB_NAME_OF_ZoneCode); + map.put(COLUMN_UNCAP_PROP_NAME_OF_ZoneName, COLUMN_DB_NAME_OF_ZoneName); + + _uncapPropNameDbNameMap = java.util.Collections.unmodifiableMap(map); + return _uncapPropNameDbNameMap; + } + + /** {uncap-prop-name : cap-prop-name} map. */ + private static java.util.Map _uncapPropNameCapPropNameMap; + protected static java.util.Map createUncapPropNameCapPropNameMap() { + if (_uncapPropNameCapPropNameMap != null) { + return _uncapPropNameCapPropNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_UNCAP_PROP_NAME, TABLE_CAP_PROP_NAME); + + map.put(COLUMN_UNCAP_PROP_NAME_OF_ZoneId, COLUMN_CAP_PROP_NAME_OF_ZoneId); + map.put(COLUMN_UNCAP_PROP_NAME_OF_ZoneCountryId, COLUMN_CAP_PROP_NAME_OF_ZoneCountryId); + map.put(COLUMN_UNCAP_PROP_NAME_OF_ZoneCode, COLUMN_CAP_PROP_NAME_OF_ZoneCode); + map.put(COLUMN_UNCAP_PROP_NAME_OF_ZoneName, COLUMN_CAP_PROP_NAME_OF_ZoneName); + + _uncapPropNameCapPropNameMap = java.util.Collections.unmodifiableMap(map); + return _uncapPropNameCapPropNameMap; + } + + // =================================================================================== + // Name-Map + // ======== + /** + * This method implements the method that is declared at super. + * + * @return {db-name : cap-prop-name} map. + */ + public java.util.Map getDbNameCapPropNameMap() { + return createDbNameCapPropNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {db-name : uncap-prop-name} map. + */ + public java.util.Map getDbNameUncapPropNameMap() { + return createDbNameUncapPropNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {cap-prop-name : db-name} map. + */ + public java.util.Map getCapPropNameDbNameMap() { + return createCapPropNameDbNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {cap-prop-name : uncap-prop-name} map. + */ + public java.util.Map getCapPropNameUncapPropNameMap() { + return createCapPropNameUncapPropNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {uncap-prop-name : db-name} map. + */ + public java.util.Map getUncapPropNameDbNameMap() { + return createUncapPropNameDbNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {uncap-prop-name : cap-prop-name} map. + */ + public java.util.Map getUncapPropNameCapPropNameMap() { + return createUncapPropNameCapPropNameMap(); + } + + // =================================================================================== + // Table Name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + public String getTableDbName() { + return TABLE_DB_NAME; + } + + /** + * This method implements the method that is declared at super. + * + * @return Table cap-prop-name. (NotNull) + */ + public String getTableCapPropName() { + return TABLE_CAP_PROP_NAME; + } + + /** + * This method implements the method that is declared at super. + * + * @return Table property-name. (NotNull) + */ + public String getTableUncapPropName() { + return TABLE_UNCAP_PROP_NAME; + } + + // =================================================================================== + // Column Name + // =========== + public java.util.List getColumnDbNameList() { + final String[] columns = getColumnDbNameCommaString().split(","); + final java.util.List resultList = new java.util.ArrayList(); + for (int i=0; i < columns.length; i++) { + resultList.add(columns[i].trim()); + } + return resultList; + } + + public java.util.List getColumnCapPropNameList() { + final java.util.List columnDbNameList = getColumnDbNameList(); + final java.util.List resultList = new java.util.ArrayList(); + for (final java.util.Iterator ite = columnDbNameList.iterator(); ite.hasNext(); ) { + resultList.add(getDbNameCapPropNameMap().get((String)ite.next())); + } + return resultList; + } + + public java.util.List getColumnUncapPropNameList() { + final java.util.List columnDbNameList = getColumnDbNameList(); + final java.util.List resultList = new java.util.ArrayList(); + for (final java.util.Iterator ite = columnDbNameList.iterator(); ite.hasNext(); ) { + resultList.add(getDbNameUncapPropNameMap().get((String)ite.next())); + } + return resultList; + } + + /** + * This method implements the method that is declared at super. + * + * @return Column-db-name comma-string. (NotNull) + */ + public String getColumnDbNameCommaString() { + return "ZONE_ID, ZONE_COUNTRY_ID, ZONE_CODE, ZONE_NAME"; + } + + // =================================================================================== + // Type Name + // ========= + /** + * This method implements the method that is declared at super. + * + * @return The type-name of entity. (NotNull) + */ + public String getEntityTypeName() { + return "jp.sf.pal.pompei.exentity.Zones"; + } + + /** + * This method implements the method that is declared at super. + * + * @return The type-name of condition-bean. (NotNull) + */ + public String getConditionBeanTypeName() { + return "jp.sf.pal.pompei.cbean.bs.ZonesCB"; + } + + /** + * This method implements the method that is declared at super. + * + * @return The type-name of dao. (NotNull) + */ + public String getDaoTypeName() { + return "jp.sf.pal.pompei.exdao.ZonesDao"; + } + + /** + * This method implements the method that is declared at super. + * + * @return The type-name of behavior. (NotNull) + */ + public String getBehaviorTypeName() { + return "jp.sf.pal.pompei.exbhv.ZonesBhv"; + } + + // =================================================================================== + // Type + // ==== + /** + * This method implements the method that is declared at super. + * + * @return The type of entity. (NotNull) + */ + public Class getEntityType() { + return ENTITY_TYPE; + } + + // =================================================================================== + // Instance + // ======== + /** + * This method implements the method that is declared at super. + * + * @return The type of entity. (NotNull) + */ + public Entity newEntity() { + return newMyEntity(); + } + + /** + * New the instance of my entity. + * + * @return The instance of my entity. (NotNull) + */ + public Zones newMyEntity() { + return new Zones(); + } + + // =================================================================================== + // Foreign DBMeta + // ============== + /** + * This method implements the method that is declared at super. + * + * @param foreignPropertyName Foreign-property-name(Both OK - InitCap or not). (NotNull) + * @return Foreign DBMeta. (NotNull) + */ + public DBMeta getForeignDBMeta(String foreignPropertyName) { + assertStringNotNullAndNotTrimmedEmpty("foreignPropertyName", foreignPropertyName); + final String methodName = "getForeignDBMeta_" + foreignPropertyName.substring(0, 1) + foreignPropertyName.substring(1); + + java.lang.reflect.Method method = null; + try { + method = this.getClass().getMethod(methodName, new Class[]{}); + } catch (NoSuchMethodException e) { + String msg = "The foreignPropertyName is not found: foreignPropertyName=" + foreignPropertyName; + msg = msg + " tableName=" + TABLE_DB_NAME + " methodName=" + methodName; + throw new RuntimeException(msg, e); + } + try { + return (DBMeta)method.invoke(this, new Object[]{}); + } catch (IllegalAccessException e) { + throw new RuntimeException(e); + } catch (java.lang.reflect.InvocationTargetException e) { + throw new RuntimeException(e.getCause()); + } + } + + // =================================================================================== + // Determination + // ============= + /** + * This method implements the method that is declared at super. + * + * @return Determination. + */ + public boolean hasTwoOrMorePrimaryKeys() { + return false; + } + + /** + * This method implements the method that is declared at super. + * + * @return Determination. + */ + public boolean hasCommonColumn() { + return false; + } + + // =================================================================================== + // Entity Handling + // =============== + // ----------------------------------------------------- + // Accept + // ------ + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @param primaryKeyMap Primary key map. (NotNull and NotEmpty) + */ + public void acceptPrimaryKeyMap(Entity entity, java.util.Map primaryKeyMap) { + final Zones myEntity = (Zones)entity; + MapAssertUtil.assertPrimaryKeyMapNotNullAndNotEmpty(primaryKeyMap); + final MapStringValueAnalyzer analyzer = new MapStringValueAnalyzer(primaryKeyMap, entity.getModifiedPropertyNames()); + + MapAssertUtil.assertColumnExistingInPrimaryKeyMap(primaryKeyMap, "ZONE_ID"); + if (analyzer.init("ZONE_ID", "zoneId", "zoneId")) { myEntity.setZoneId(analyzer.analyzeNumber(java.math.BigDecimal.class)); }; + + + } + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @param primaryKeyMapString Primary-key map-string. (NotNull and NotEmpty) + */ + public void acceptPrimaryKeyMapString(Entity entity, String primaryKeyMapString) { + MapStringUtil.acceptPrimaryKeyMapString(primaryKeyMapString, entity); + } + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @param columnValueMap Column-value map. (NotNull and NotEmpty) + */ + public void acceptColumnValueMap(Entity entity, java.util.Map columnValueMap) { + final Zones myEntity = (Zones)entity; + MapAssertUtil.assertColumnValueMapNotNullAndNotEmpty(columnValueMap); + final MapStringValueAnalyzer analyzer = new MapStringValueAnalyzer(columnValueMap, entity.getModifiedPropertyNames()); + + if (analyzer.init("ZONE_ID", "zoneId", "zoneId")) { myEntity.setZoneId(analyzer.analyzeNumber(java.math.BigDecimal.class)); }; + if (analyzer.init("ZONE_COUNTRY_ID", "zoneCountryId", "zoneCountryId")) { myEntity.setZoneCountryId(analyzer.analyzeNumber(java.math.BigDecimal.class)); }; + if (analyzer.init("ZONE_CODE", "zoneCode", "zoneCode")) { myEntity.setZoneCode(analyzer.analyzeString(String.class)); }; + if (analyzer.init("ZONE_NAME", "zoneName", "zoneName")) { myEntity.setZoneName(analyzer.analyzeString(String.class)); }; + + } + + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @param columnValueMapString Column-value map-string. (NotNull and NotEmpty) + */ + public void acceptColumnValueMapString(Entity entity, String columnValueMapString) { + MapStringUtil.acceptColumnValueMapString(columnValueMapString, entity); + } + + + // ----------------------------------------------------- + // Extract + // ------- + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @return Primary-key map-string. (NotNull) + */ + public String extractPrimaryKeyMapString(Entity entity) { + return MapStringUtil.extractPrimaryKeyMapString(entity); + } + + /** + * Extract primary-key map-string. + * + * @param entity Target entity. (NotNull) + * @param startBrace Start-brace. (NotNull) + * @param endBrace End-brace. (NotNull) + * @param delimiter Delimiter. (NotNull) + * @param equal Equal. (NotNull) + * @return Primary-key map-string. (NotNull) + */ + public String extractPrimaryKeyMapString(Entity entity, String startBrace, String endBrace, String delimiter, String equal) { + final Zones myEntity = (Zones)entity; + final String mapMarkAndStartBrace = MAP_STRING_MAP_MARK + startBrace; + final StringBuffer sb = new StringBuffer(); + helpAppendingColumnValueString(sb, delimiter, equal, "ZONE_ID", myEntity.getZoneId()); + + sb.delete(0, delimiter.length()).insert(0, mapMarkAndStartBrace).append(endBrace); + return sb.toString(); + + } + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @return Column-value map-string. (NotNull) + */ + public String extractColumnValueMapString(Entity entity) { + return MapStringUtil.extractColumnValueMapString(entity); + } + + /** + * Extract column-value map-string. + * + * @param entity Target entity. (NotNull) + * @param startBrace Start-brace. (NotNull) + * @param endBrace End-brace. (NotNull) + * @param delimiter Delimiter. (NotNull) + * @param equal Equal. (NotNull) + * @return Column-value map-string. (NotNull) + */ + public String extractColumnValueMapString(Entity entity, String startBrace, String endBrace, String delimiter, String equal) { + final Zones myEntity = (Zones)entity; + final String mapMarkAndStartBrace = MAP_STRING_MAP_MARK + startBrace; + final StringBuffer sb = new StringBuffer(); + helpAppendingColumnValueString(sb, delimiter, equal, "ZONE_ID", myEntity.getZoneId()); + helpAppendingColumnValueString(sb, delimiter, equal, "ZONE_COUNTRY_ID", myEntity.getZoneCountryId()); + helpAppendingColumnValueString(sb, delimiter, equal, "ZONE_CODE", myEntity.getZoneCode()); + helpAppendingColumnValueString(sb, delimiter, equal, "ZONE_NAME", myEntity.getZoneName()); + + sb.delete(0, delimiter.length()).insert(0, mapMarkAndStartBrace).append(endBrace); + return sb.toString(); + } + + private void helpAppendingColumnValueString(StringBuffer sb, String delimiter, String equal, String colName, Object value) { + sb.append(delimiter).append(colName).append(equal); + sb.append(helpGettingColumnStringValue(value)); + } + + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @return Column-value map-string. (NotNull) + */ + public String extractCommonColumnValueMapString(Entity entity) { + return "map:{}"; + } + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @return Column-value map-string. (NotNull) + */ + public String extractCommonColumnValueMapString(Entity entity, String startBrace, String endBrace, String delimiter, String equal) { + return "map:" + startBrace + endBrace; + } + + + // ----------------------------------------------------- + // Convert + // ------- + public java.util.List convertToColumnValueList(Entity entity) { + return new java.util.ArrayList(convertToColumnValueMap(entity).values()); + } + + public java.util.Map convertToColumnValueMap(Entity entity) { + final Zones myEntity = downcast(entity); + final java.util.Map valueMap = new java.util.LinkedHashMap(); + valueMap.put("ZONE_ID", myEntity.getZoneId()); + valueMap.put("ZONE_COUNTRY_ID", myEntity.getZoneCountryId()); + valueMap.put("ZONE_CODE", myEntity.getZoneCode()); + valueMap.put("ZONE_NAME", myEntity.getZoneName()); + return valueMap; + } + + public java.util.List convertToColumnStringValueList(Entity entity) { + return new java.util.ArrayList(convertToColumnStringValueMap(entity).values()); + } + + public java.util.Map convertToColumnStringValueMap(Entity entity) { + final Zones myEntity = downcast(entity); + final java.util.Map valueMap = new java.util.LinkedHashMap(); + valueMap.put("ZONE_ID", helpGettingColumnStringValue(myEntity.getZoneId())); + valueMap.put("ZONE_COUNTRY_ID", helpGettingColumnStringValue(myEntity.getZoneCountryId())); + valueMap.put("ZONE_CODE", helpGettingColumnStringValue(myEntity.getZoneCode())); + valueMap.put("ZONE_NAME", helpGettingColumnStringValue(myEntity.getZoneName())); + return valueMap; + } + + // =================================================================================== + // JDBC Support + // ============ + public String getPreparedInsertClause() { + return "insert into ZONES(ZONE_ID, ZONE_COUNTRY_ID, ZONE_CODE, ZONE_NAME) values(? , ? , ? , ? )"; + } + + public String getPreparedInsertClause(String tablePrefix) { + return "insert into " + tablePrefix + "ZONES(ZONE_ID, ZONE_COUNTRY_ID, ZONE_CODE, ZONE_NAME) values(? , ? , ? , ? )"; + } + + // =================================================================================== + // Helper + // ====== + protected Zones downcast(Entity entity) { + assertObjectNotNull("entity", entity); + try { + return (Zones)entity; + } catch (ClassCastException e) { + String msg = "The entity should be Zones but it was: " + entity.getClass(); + throw new IllegalStateException(msg, e); + } + } + + protected void checkDowncast(Entity entity) { + downcast(entity); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/dbmeta/ZonesToGeoZonesDbm.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/dbmeta/ZonesToGeoZonesDbm.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/bsentity/dbmeta/ZonesToGeoZonesDbm.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,720 @@ +package jp.sf.pal.pompei.bsentity.dbmeta; + + +import jp.sf.pal.pompei.allcommon.Entity; +import jp.sf.pal.pompei.allcommon.dbmeta.DBMeta; +import jp.sf.pal.pompei.allcommon.dbmeta.AbstractDBMeta; +import jp.sf.pal.pompei.exentity.ZonesToGeoZones; + +/** + * The dbmeta of ZONES_TO_GEO_ZONES. (Singleton) + * + *
+ * [primary-key]
+ *     ASSOCIATION_ID
+ * 
+ * [column-property]
+ *     ASSOCIATION_ID, ZONE_COUNTRY_ID, ZONE_ID, GEO_ZONE_ID, LAST_MODIFIED, DATE_ADDED
+ * 
+ * [foreign-property]
+ *     
+ * 
+ * [refferer-property]
+ *     
+ * 
+ * [sequence]
+ *     
+ * 
+ * [identity]
+ *     
+ * 
+ * [update-date]
+ *     
+ * 
+ * [version-no]
+ *     
+ * 
+ * 
+ * + * @author DBFlute(AutoGenerator) + */ +public class ZonesToGeoZonesDbm extends AbstractDBMeta { + + // =================================================================================== + // Definition + // ========== + /** The type of entity. */ + protected static final Class ENTITY_TYPE = ZonesToGeoZones.class; + + /** Singleton instance. */ + private static final ZonesToGeoZonesDbm _instance = new ZonesToGeoZonesDbm(); + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + private ZonesToGeoZonesDbm() { + } + + // =================================================================================== + // Singleton + // ========= + /** + * Get instance. + * + * @return Singleton instance. (NotNull) + */ + public static ZonesToGeoZonesDbm getInstance() { + return _instance; + } + + // =================================================================================== + // Name Definition + // =============== + /** Table db name. */ + public static final String TABLE_DB_NAME = "ZONES_TO_GEO_ZONES"; + + /** Table cap-prop name. */ + public static final String TABLE_CAP_PROP_NAME = "ZonesToGeoZones"; + + /** Table uncap-prop name. */ + public static final String TABLE_UNCAP_PROP_NAME = "zonesToGeoZones"; + + /** Db-name of AssociationId. */ + public static final String COLUMN_DB_NAME_OF_AssociationId = "ASSOCIATION_ID"; + /** Db-name of ZoneCountryId. */ + public static final String COLUMN_DB_NAME_OF_ZoneCountryId = "ZONE_COUNTRY_ID"; + /** Db-name of ZoneId. */ + public static final String COLUMN_DB_NAME_OF_ZoneId = "ZONE_ID"; + /** Db-name of GeoZoneId. */ + public static final String COLUMN_DB_NAME_OF_GeoZoneId = "GEO_ZONE_ID"; + /** Db-name of LastModified. */ + public static final String COLUMN_DB_NAME_OF_LastModified = "LAST_MODIFIED"; + /** Db-name of DateAdded. */ + public static final String COLUMN_DB_NAME_OF_DateAdded = "DATE_ADDED"; + + /** Cap-prop-name of AssociationId. */ + public static final String COLUMN_CAP_PROP_NAME_OF_AssociationId = "AssociationId"; + /** Cap-prop-name of ZoneCountryId. */ + public static final String COLUMN_CAP_PROP_NAME_OF_ZoneCountryId = "ZoneCountryId"; + /** Cap-prop-name of ZoneId. */ + public static final String COLUMN_CAP_PROP_NAME_OF_ZoneId = "ZoneId"; + /** Cap-prop-name of GeoZoneId. */ + public static final String COLUMN_CAP_PROP_NAME_OF_GeoZoneId = "GeoZoneId"; + /** Cap-prop-name of LastModified. */ + public static final String COLUMN_CAP_PROP_NAME_OF_LastModified = "LastModified"; + /** Cap-prop-name of DateAdded. */ + public static final String COLUMN_CAP_PROP_NAME_OF_DateAdded = "DateAdded"; + + + + /** Uncap-prop-name of AssociationId. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_AssociationId = "associationId"; + /** Uncap-prop-name of ZoneCountryId. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_ZoneCountryId = "zoneCountryId"; + /** Uncap-prop-name of ZoneId. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_ZoneId = "zoneId"; + /** Uncap-prop-name of GeoZoneId. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_GeoZoneId = "geoZoneId"; + /** Uncap-prop-name of LastModified. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_LastModified = "lastModified"; + /** Uncap-prop-name of DateAdded. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_DateAdded = "dateAdded"; + + + + /** {db-name : cap-prop-name} map. */ + private static java.util.Map _dbNameCapPropNameMap; + protected static java.util.Map createDbNameCapPropNameMap() { + if (_dbNameCapPropNameMap != null) { + return _dbNameCapPropNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_DB_NAME, TABLE_CAP_PROP_NAME); + + map.put(COLUMN_DB_NAME_OF_AssociationId, COLUMN_CAP_PROP_NAME_OF_AssociationId); + map.put(COLUMN_DB_NAME_OF_ZoneCountryId, COLUMN_CAP_PROP_NAME_OF_ZoneCountryId); + map.put(COLUMN_DB_NAME_OF_ZoneId, COLUMN_CAP_PROP_NAME_OF_ZoneId); + map.put(COLUMN_DB_NAME_OF_GeoZoneId, COLUMN_CAP_PROP_NAME_OF_GeoZoneId); + map.put(COLUMN_DB_NAME_OF_LastModified, COLUMN_CAP_PROP_NAME_OF_LastModified); + map.put(COLUMN_DB_NAME_OF_DateAdded, COLUMN_CAP_PROP_NAME_OF_DateAdded); + + _dbNameCapPropNameMap = java.util.Collections.unmodifiableMap(map); + return _dbNameCapPropNameMap; + } + + /** {db-name : uncap-prop-name} map. */ + private static java.util.Map _dbNameUncapPropNameMap; + protected static java.util.Map createDbNameUncapPropNameMap() { + if (_dbNameUncapPropNameMap != null) { + return _dbNameUncapPropNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_DB_NAME, TABLE_UNCAP_PROP_NAME); + + map.put(COLUMN_DB_NAME_OF_AssociationId, COLUMN_UNCAP_PROP_NAME_OF_AssociationId); + map.put(COLUMN_DB_NAME_OF_ZoneCountryId, COLUMN_UNCAP_PROP_NAME_OF_ZoneCountryId); + map.put(COLUMN_DB_NAME_OF_ZoneId, COLUMN_UNCAP_PROP_NAME_OF_ZoneId); + map.put(COLUMN_DB_NAME_OF_GeoZoneId, COLUMN_UNCAP_PROP_NAME_OF_GeoZoneId); + map.put(COLUMN_DB_NAME_OF_LastModified, COLUMN_UNCAP_PROP_NAME_OF_LastModified); + map.put(COLUMN_DB_NAME_OF_DateAdded, COLUMN_UNCAP_PROP_NAME_OF_DateAdded); + + _dbNameUncapPropNameMap = java.util.Collections.unmodifiableMap(map); + return _dbNameUncapPropNameMap; + } + + /** {cap-prop-name : db-name} map. */ + private static java.util.Map _capPropNameDbNameMap; + protected static java.util.Map createCapPropNameDbNameMap() { + if (_capPropNameDbNameMap != null) { + return _capPropNameDbNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_CAP_PROP_NAME, TABLE_DB_NAME); + + map.put(COLUMN_CAP_PROP_NAME_OF_AssociationId, COLUMN_DB_NAME_OF_AssociationId); + map.put(COLUMN_CAP_PROP_NAME_OF_ZoneCountryId, COLUMN_DB_NAME_OF_ZoneCountryId); + map.put(COLUMN_CAP_PROP_NAME_OF_ZoneId, COLUMN_DB_NAME_OF_ZoneId); + map.put(COLUMN_CAP_PROP_NAME_OF_GeoZoneId, COLUMN_DB_NAME_OF_GeoZoneId); + map.put(COLUMN_CAP_PROP_NAME_OF_LastModified, COLUMN_DB_NAME_OF_LastModified); + map.put(COLUMN_CAP_PROP_NAME_OF_DateAdded, COLUMN_DB_NAME_OF_DateAdded); + + _capPropNameDbNameMap = java.util.Collections.unmodifiableMap(map); + return _capPropNameDbNameMap; + } + + /** {cap-prop-name : uncap-prop-name} map. */ + private static java.util.Map _capPropNameUncapPropNameMap; + protected static java.util.Map createCapPropNameUncapPropNameMap() { + if (_capPropNameUncapPropNameMap != null) { + return _capPropNameUncapPropNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_CAP_PROP_NAME, TABLE_UNCAP_PROP_NAME); + + map.put(COLUMN_CAP_PROP_NAME_OF_AssociationId, COLUMN_UNCAP_PROP_NAME_OF_AssociationId); + map.put(COLUMN_CAP_PROP_NAME_OF_ZoneCountryId, COLUMN_UNCAP_PROP_NAME_OF_ZoneCountryId); + map.put(COLUMN_CAP_PROP_NAME_OF_ZoneId, COLUMN_UNCAP_PROP_NAME_OF_ZoneId); + map.put(COLUMN_CAP_PROP_NAME_OF_GeoZoneId, COLUMN_UNCAP_PROP_NAME_OF_GeoZoneId); + map.put(COLUMN_CAP_PROP_NAME_OF_LastModified, COLUMN_UNCAP_PROP_NAME_OF_LastModified); + map.put(COLUMN_CAP_PROP_NAME_OF_DateAdded, COLUMN_UNCAP_PROP_NAME_OF_DateAdded); + + _capPropNameUncapPropNameMap = java.util.Collections.unmodifiableMap(map); + return _capPropNameUncapPropNameMap; + } + + /** {uncap-prop-name : db-name} map. */ + private static java.util.Map _uncapPropNameDbNameMap; + protected static java.util.Map createUncapPropNameDbNameMap() { + if (_uncapPropNameDbNameMap != null) { + return _uncapPropNameDbNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_UNCAP_PROP_NAME, TABLE_DB_NAME); + + map.put(COLUMN_UNCAP_PROP_NAME_OF_AssociationId, COLUMN_DB_NAME_OF_AssociationId); + map.put(COLUMN_UNCAP_PROP_NAME_OF_ZoneCountryId, COLUMN_DB_NAME_OF_ZoneCountryId); + map.put(COLUMN_UNCAP_PROP_NAME_OF_ZoneId, COLUMN_DB_NAME_OF_ZoneId); + map.put(COLUMN_UNCAP_PROP_NAME_OF_GeoZoneId, COLUMN_DB_NAME_OF_GeoZoneId); + map.put(COLUMN_UNCAP_PROP_NAME_OF_LastModified, COLUMN_DB_NAME_OF_LastModified); + map.put(COLUMN_UNCAP_PROP_NAME_OF_DateAdded, COLUMN_DB_NAME_OF_DateAdded); + + _uncapPropNameDbNameMap = java.util.Collections.unmodifiableMap(map); + return _uncapPropNameDbNameMap; + } + + /** {uncap-prop-name : cap-prop-name} map. */ + private static java.util.Map _uncapPropNameCapPropNameMap; + protected static java.util.Map createUncapPropNameCapPropNameMap() { + if (_uncapPropNameCapPropNameMap != null) { + return _uncapPropNameCapPropNameMap; + } + final java.util.Map map = new java.util.LinkedHashMap(); + map.put(TABLE_UNCAP_PROP_NAME, TABLE_CAP_PROP_NAME); + + map.put(COLUMN_UNCAP_PROP_NAME_OF_AssociationId, COLUMN_CAP_PROP_NAME_OF_AssociationId); + map.put(COLUMN_UNCAP_PROP_NAME_OF_ZoneCountryId, COLUMN_CAP_PROP_NAME_OF_ZoneCountryId); + map.put(COLUMN_UNCAP_PROP_NAME_OF_ZoneId, COLUMN_CAP_PROP_NAME_OF_ZoneId); + map.put(COLUMN_UNCAP_PROP_NAME_OF_GeoZoneId, COLUMN_CAP_PROP_NAME_OF_GeoZoneId); + map.put(COLUMN_UNCAP_PROP_NAME_OF_LastModified, COLUMN_CAP_PROP_NAME_OF_LastModified); + map.put(COLUMN_UNCAP_PROP_NAME_OF_DateAdded, COLUMN_CAP_PROP_NAME_OF_DateAdded); + + _uncapPropNameCapPropNameMap = java.util.Collections.unmodifiableMap(map); + return _uncapPropNameCapPropNameMap; + } + + // =================================================================================== + // Name-Map + // ======== + /** + * This method implements the method that is declared at super. + * + * @return {db-name : cap-prop-name} map. + */ + public java.util.Map getDbNameCapPropNameMap() { + return createDbNameCapPropNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {db-name : uncap-prop-name} map. + */ + public java.util.Map getDbNameUncapPropNameMap() { + return createDbNameUncapPropNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {cap-prop-name : db-name} map. + */ + public java.util.Map getCapPropNameDbNameMap() { + return createCapPropNameDbNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {cap-prop-name : uncap-prop-name} map. + */ + public java.util.Map getCapPropNameUncapPropNameMap() { + return createCapPropNameUncapPropNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {uncap-prop-name : db-name} map. + */ + public java.util.Map getUncapPropNameDbNameMap() { + return createUncapPropNameDbNameMap(); + } + + /** + * This method implements the method that is declared at super. + * + * @return {uncap-prop-name : cap-prop-name} map. + */ + public java.util.Map getUncapPropNameCapPropNameMap() { + return createUncapPropNameCapPropNameMap(); + } + + // =================================================================================== + // Table Name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + public String getTableDbName() { + return TABLE_DB_NAME; + } + + /** + * This method implements the method that is declared at super. + * + * @return Table cap-prop-name. (NotNull) + */ + public String getTableCapPropName() { + return TABLE_CAP_PROP_NAME; + } + + /** + * This method implements the method that is declared at super. + * + * @return Table property-name. (NotNull) + */ + public String getTableUncapPropName() { + return TABLE_UNCAP_PROP_NAME; + } + + // =================================================================================== + // Column Name + // =========== + public java.util.List getColumnDbNameList() { + final String[] columns = getColumnDbNameCommaString().split(","); + final java.util.List resultList = new java.util.ArrayList(); + for (int i=0; i < columns.length; i++) { + resultList.add(columns[i].trim()); + } + return resultList; + } + + public java.util.List getColumnCapPropNameList() { + final java.util.List columnDbNameList = getColumnDbNameList(); + final java.util.List resultList = new java.util.ArrayList(); + for (final java.util.Iterator ite = columnDbNameList.iterator(); ite.hasNext(); ) { + resultList.add(getDbNameCapPropNameMap().get((String)ite.next())); + } + return resultList; + } + + public java.util.List getColumnUncapPropNameList() { + final java.util.List columnDbNameList = getColumnDbNameList(); + final java.util.List resultList = new java.util.ArrayList(); + for (final java.util.Iterator ite = columnDbNameList.iterator(); ite.hasNext(); ) { + resultList.add(getDbNameUncapPropNameMap().get((String)ite.next())); + } + return resultList; + } + + /** + * This method implements the method that is declared at super. + * + * @return Column-db-name comma-string. (NotNull) + */ + public String getColumnDbNameCommaString() { + return "ASSOCIATION_ID, ZONE_COUNTRY_ID, ZONE_ID, GEO_ZONE_ID, LAST_MODIFIED, DATE_ADDED"; + } + + // =================================================================================== + // Type Name + // ========= + /** + * This method implements the method that is declared at super. + * + * @return The type-name of entity. (NotNull) + */ + public String getEntityTypeName() { + return "jp.sf.pal.pompei.exentity.ZonesToGeoZones"; + } + + /** + * This method implements the method that is declared at super. + * + * @return The type-name of condition-bean. (NotNull) + */ + public String getConditionBeanTypeName() { + return "jp.sf.pal.pompei.cbean.bs.ZonesToGeoZonesCB"; + } + + /** + * This method implements the method that is declared at super. + * + * @return The type-name of dao. (NotNull) + */ + public String getDaoTypeName() { + return "jp.sf.pal.pompei.exdao.ZonesToGeoZonesDao"; + } + + /** + * This method implements the method that is declared at super. + * + * @return The type-name of behavior. (NotNull) + */ + public String getBehaviorTypeName() { + return "jp.sf.pal.pompei.exbhv.ZonesToGeoZonesBhv"; + } + + // =================================================================================== + // Type + // ==== + /** + * This method implements the method that is declared at super. + * + * @return The type of entity. (NotNull) + */ + public Class getEntityType() { + return ENTITY_TYPE; + } + + // =================================================================================== + // Instance + // ======== + /** + * This method implements the method that is declared at super. + * + * @return The type of entity. (NotNull) + */ + public Entity newEntity() { + return newMyEntity(); + } + + /** + * New the instance of my entity. + * + * @return The instance of my entity. (NotNull) + */ + public ZonesToGeoZones newMyEntity() { + return new ZonesToGeoZones(); + } + + // =================================================================================== + // Foreign DBMeta + // ============== + /** + * This method implements the method that is declared at super. + * + * @param foreignPropertyName Foreign-property-name(Both OK - InitCap or not). (NotNull) + * @return Foreign DBMeta. (NotNull) + */ + public DBMeta getForeignDBMeta(String foreignPropertyName) { + assertStringNotNullAndNotTrimmedEmpty("foreignPropertyName", foreignPropertyName); + final String methodName = "getForeignDBMeta_" + foreignPropertyName.substring(0, 1) + foreignPropertyName.substring(1); + + java.lang.reflect.Method method = null; + try { + method = this.getClass().getMethod(methodName, new Class[]{}); + } catch (NoSuchMethodException e) { + String msg = "The foreignPropertyName is not found: foreignPropertyName=" + foreignPropertyName; + msg = msg + " tableName=" + TABLE_DB_NAME + " methodName=" + methodName; + throw new RuntimeException(msg, e); + } + try { + return (DBMeta)method.invoke(this, new Object[]{}); + } catch (IllegalAccessException e) { + throw new RuntimeException(e); + } catch (java.lang.reflect.InvocationTargetException e) { + throw new RuntimeException(e.getCause()); + } + } + + // =================================================================================== + // Determination + // ============= + /** + * This method implements the method that is declared at super. + * + * @return Determination. + */ + public boolean hasTwoOrMorePrimaryKeys() { + return false; + } + + /** + * This method implements the method that is declared at super. + * + * @return Determination. + */ + public boolean hasCommonColumn() { + return false; + } + + // =================================================================================== + // Entity Handling + // =============== + // ----------------------------------------------------- + // Accept + // ------ + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @param primaryKeyMap Primary key map. (NotNull and NotEmpty) + */ + public void acceptPrimaryKeyMap(Entity entity, java.util.Map primaryKeyMap) { + final ZonesToGeoZones myEntity = (ZonesToGeoZones)entity; + MapAssertUtil.assertPrimaryKeyMapNotNullAndNotEmpty(primaryKeyMap); + final MapStringValueAnalyzer analyzer = new MapStringValueAnalyzer(primaryKeyMap, entity.getModifiedPropertyNames()); + + MapAssertUtil.assertColumnExistingInPrimaryKeyMap(primaryKeyMap, "ASSOCIATION_ID"); + if (analyzer.init("ASSOCIATION_ID", "associationId", "associationId")) { myEntity.setAssociationId(analyzer.analyzeNumber(java.math.BigDecimal.class)); }; + + + } + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @param primaryKeyMapString Primary-key map-string. (NotNull and NotEmpty) + */ + public void acceptPrimaryKeyMapString(Entity entity, String primaryKeyMapString) { + MapStringUtil.acceptPrimaryKeyMapString(primaryKeyMapString, entity); + } + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @param columnValueMap Column-value map. (NotNull and NotEmpty) + */ + public void acceptColumnValueMap(Entity entity, java.util.Map columnValueMap) { + final ZonesToGeoZones myEntity = (ZonesToGeoZones)entity; + MapAssertUtil.assertColumnValueMapNotNullAndNotEmpty(columnValueMap); + final MapStringValueAnalyzer analyzer = new MapStringValueAnalyzer(columnValueMap, entity.getModifiedPropertyNames()); + + if (analyzer.init("ASSOCIATION_ID", "associationId", "associationId")) { myEntity.setAssociationId(analyzer.analyzeNumber(java.math.BigDecimal.class)); }; + if (analyzer.init("ZONE_COUNTRY_ID", "zoneCountryId", "zoneCountryId")) { myEntity.setZoneCountryId(analyzer.analyzeNumber(java.math.BigDecimal.class)); }; + if (analyzer.init("ZONE_ID", "zoneId", "zoneId")) { myEntity.setZoneId(analyzer.analyzeNumber(java.math.BigDecimal.class)); }; + if (analyzer.init("GEO_ZONE_ID", "geoZoneId", "geoZoneId")) { myEntity.setGeoZoneId(analyzer.analyzeNumber(java.math.BigDecimal.class)); }; + if (analyzer.init("LAST_MODIFIED", "lastModified", "lastModified")) { myEntity.setLastModified(analyzer.analyzeDate(java.sql.Timestamp.class)); }; + if (analyzer.init("DATE_ADDED", "dateAdded", "dateAdded")) { myEntity.setDateAdded(analyzer.analyzeDate(java.sql.Timestamp.class)); }; + + } + + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @param columnValueMapString Column-value map-string. (NotNull and NotEmpty) + */ + public void acceptColumnValueMapString(Entity entity, String columnValueMapString) { + MapStringUtil.acceptColumnValueMapString(columnValueMapString, entity); + } + + + // ----------------------------------------------------- + // Extract + // ------- + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @return Primary-key map-string. (NotNull) + */ + public String extractPrimaryKeyMapString(Entity entity) { + return MapStringUtil.extractPrimaryKeyMapString(entity); + } + + /** + * Extract primary-key map-string. + * + * @param entity Target entity. (NotNull) + * @param startBrace Start-brace. (NotNull) + * @param endBrace End-brace. (NotNull) + * @param delimiter Delimiter. (NotNull) + * @param equal Equal. (NotNull) + * @return Primary-key map-string. (NotNull) + */ + public String extractPrimaryKeyMapString(Entity entity, String startBrace, String endBrace, String delimiter, String equal) { + final ZonesToGeoZones myEntity = (ZonesToGeoZones)entity; + final String mapMarkAndStartBrace = MAP_STRING_MAP_MARK + startBrace; + final StringBuffer sb = new StringBuffer(); + helpAppendingColumnValueString(sb, delimiter, equal, "ASSOCIATION_ID", myEntity.getAssociationId()); + + sb.delete(0, delimiter.length()).insert(0, mapMarkAndStartBrace).append(endBrace); + return sb.toString(); + + } + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @return Column-value map-string. (NotNull) + */ + public String extractColumnValueMapString(Entity entity) { + return MapStringUtil.extractColumnValueMapString(entity); + } + + /** + * Extract column-value map-string. + * + * @param entity Target entity. (NotNull) + * @param startBrace Start-brace. (NotNull) + * @param endBrace End-brace. (NotNull) + * @param delimiter Delimiter. (NotNull) + * @param equal Equal. (NotNull) + * @return Column-value map-string. (NotNull) + */ + public String extractColumnValueMapString(Entity entity, String startBrace, String endBrace, String delimiter, String equal) { + final ZonesToGeoZones myEntity = (ZonesToGeoZones)entity; + final String mapMarkAndStartBrace = MAP_STRING_MAP_MARK + startBrace; + final StringBuffer sb = new StringBuffer(); + helpAppendingColumnValueString(sb, delimiter, equal, "ASSOCIATION_ID", myEntity.getAssociationId()); + helpAppendingColumnValueString(sb, delimiter, equal, "ZONE_COUNTRY_ID", myEntity.getZoneCountryId()); + helpAppendingColumnValueString(sb, delimiter, equal, "ZONE_ID", myEntity.getZoneId()); + helpAppendingColumnValueString(sb, delimiter, equal, "GEO_ZONE_ID", myEntity.getGeoZoneId()); + helpAppendingColumnValueString(sb, delimiter, equal, "LAST_MODIFIED", myEntity.getLastModified()); + helpAppendingColumnValueString(sb, delimiter, equal, "DATE_ADDED", myEntity.getDateAdded()); + + sb.delete(0, delimiter.length()).insert(0, mapMarkAndStartBrace).append(endBrace); + return sb.toString(); + } + + private void helpAppendingColumnValueString(StringBuffer sb, String delimiter, String equal, String colName, Object value) { + sb.append(delimiter).append(colName).append(equal); + sb.append(helpGettingColumnStringValue(value)); + } + + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @return Column-value map-string. (NotNull) + */ + public String extractCommonColumnValueMapString(Entity entity) { + return "map:{}"; + } + + /** + * This method implements the method that is declared at super. + * + * @param entity Target entity. (NotNull) + * @return Column-value map-string. (NotNull) + */ + public String extractCommonColumnValueMapString(Entity entity, String startBrace, String endBrace, String delimiter, String equal) { + return "map:" + startBrace + endBrace; + } + + + // ----------------------------------------------------- + // Convert + // ------- + public java.util.List convertToColumnValueList(Entity entity) { + return new java.util.ArrayList(convertToColumnValueMap(entity).values()); + } + + public java.util.Map convertToColumnValueMap(Entity entity) { + final ZonesToGeoZones myEntity = downcast(entity); + final java.util.Map valueMap = new java.util.LinkedHashMap(); + valueMap.put("ASSOCIATION_ID", myEntity.getAssociationId()); + valueMap.put("ZONE_COUNTRY_ID", myEntity.getZoneCountryId()); + valueMap.put("ZONE_ID", myEntity.getZoneId()); + valueMap.put("GEO_ZONE_ID", myEntity.getGeoZoneId()); + valueMap.put("LAST_MODIFIED", myEntity.getLastModified()); + valueMap.put("DATE_ADDED", myEntity.getDateAdded()); + return valueMap; + } + + public java.util.List convertToColumnStringValueList(Entity entity) { + return new java.util.ArrayList(convertToColumnStringValueMap(entity).values()); + } + + public java.util.Map convertToColumnStringValueMap(Entity entity) { + final ZonesToGeoZones myEntity = downcast(entity); + final java.util.Map valueMap = new java.util.LinkedHashMap(); + valueMap.put("ASSOCIATION_ID", helpGettingColumnStringValue(myEntity.getAssociationId())); + valueMap.put("ZONE_COUNTRY_ID", helpGettingColumnStringValue(myEntity.getZoneCountryId())); + valueMap.put("ZONE_ID", helpGettingColumnStringValue(myEntity.getZoneId())); + valueMap.put("GEO_ZONE_ID", helpGettingColumnStringValue(myEntity.getGeoZoneId())); + valueMap.put("LAST_MODIFIED", helpGettingColumnStringValue(myEntity.getLastModified())); + valueMap.put("DATE_ADDED", helpGettingColumnStringValue(myEntity.getDateAdded())); + return valueMap; + } + + // =================================================================================== + // JDBC Support + // ============ + public String getPreparedInsertClause() { + return "insert into ZONES_TO_GEO_ZONES(ASSOCIATION_ID, ZONE_COUNTRY_ID, ZONE_ID, GEO_ZONE_ID, LAST_MODIFIED, DATE_ADDED) values(? , ? , ? , ? , ? , ? )"; + } + + public String getPreparedInsertClause(String tablePrefix) { + return "insert into " + tablePrefix + "ZONES_TO_GEO_ZONES(ASSOCIATION_ID, ZONE_COUNTRY_ID, ZONE_ID, GEO_ZONE_ID, LAST_MODIFIED, DATE_ADDED) values(? , ? , ? , ? , ? , ? )"; + } + + // =================================================================================== + // Helper + // ====== + protected ZonesToGeoZones downcast(Entity entity) { + assertObjectNotNull("entity", entity); + try { + return (ZonesToGeoZones)entity; + } catch (ClassCastException e) { + String msg = "The entity should be ZonesToGeoZones but it was: " + entity.getClass(); + throw new IllegalStateException(msg, e); + } + } + + protected void checkDowncast(Entity entity) { + downcast(entity); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/AddressBookCB.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/AddressBookCB.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/AddressBookCB.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,10 @@ +package jp.sf.pal.pompei.cbean; + + +/** + * The condition-bean of ADDRESS_BOOK. + * + * @author DBFlute(AutoGenerator) + */ +public class AddressBookCB extends jp.sf.pal.pompei.cbean.bs.BsAddressBookCB { +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/AddressFormatCB.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/AddressFormatCB.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/AddressFormatCB.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,10 @@ +package jp.sf.pal.pompei.cbean; + + +/** + * The condition-bean of ADDRESS_FORMAT. + * + * @author DBFlute(AutoGenerator) + */ +public class AddressFormatCB extends jp.sf.pal.pompei.cbean.bs.BsAddressFormatCB { +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/BannersCB.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/BannersCB.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/BannersCB.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,10 @@ +package jp.sf.pal.pompei.cbean; + + +/** + * The condition-bean of BANNERS. + * + * @author DBFlute(AutoGenerator) + */ +public class BannersCB extends jp.sf.pal.pompei.cbean.bs.BsBannersCB { +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/BannersHistoryCB.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/BannersHistoryCB.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/BannersHistoryCB.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,10 @@ +package jp.sf.pal.pompei.cbean; + + +/** + * The condition-bean of BANNERS_HISTORY. + * + * @author DBFlute(AutoGenerator) + */ +public class BannersHistoryCB extends jp.sf.pal.pompei.cbean.bs.BsBannersHistoryCB { +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/CategoriesCB.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/CategoriesCB.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/CategoriesCB.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,10 @@ +package jp.sf.pal.pompei.cbean; + + +/** + * The condition-bean of CATEGORIES. + * + * @author DBFlute(AutoGenerator) + */ +public class CategoriesCB extends jp.sf.pal.pompei.cbean.bs.BsCategoriesCB { +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/CategoriesDescriptionCB.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/CategoriesDescriptionCB.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/CategoriesDescriptionCB.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,10 @@ +package jp.sf.pal.pompei.cbean; + + +/** + * The condition-bean of CATEGORIES_DESCRIPTION. + * + * @author DBFlute(AutoGenerator) + */ +public class CategoriesDescriptionCB extends jp.sf.pal.pompei.cbean.bs.BsCategoriesDescriptionCB { +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/ConfigurationCB.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/ConfigurationCB.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/ConfigurationCB.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,10 @@ +package jp.sf.pal.pompei.cbean; + + +/** + * The condition-bean of CONFIGURATION. + * + * @author DBFlute(AutoGenerator) + */ +public class ConfigurationCB extends jp.sf.pal.pompei.cbean.bs.BsConfigurationCB { +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/ConfigurationGroupCB.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/ConfigurationGroupCB.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/ConfigurationGroupCB.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,10 @@ +package jp.sf.pal.pompei.cbean; + + +/** + * The condition-bean of CONFIGURATION_GROUP. + * + * @author DBFlute(AutoGenerator) + */ +public class ConfigurationGroupCB extends jp.sf.pal.pompei.cbean.bs.BsConfigurationGroupCB { +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/CounterCB.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/CounterCB.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/CounterCB.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,10 @@ +package jp.sf.pal.pompei.cbean; + + +/** + * The condition-bean of COUNTER. + * + * @author DBFlute(AutoGenerator) + */ +public class CounterCB extends jp.sf.pal.pompei.cbean.bs.BsCounterCB { +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/CounterHistoryCB.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/CounterHistoryCB.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/CounterHistoryCB.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,10 @@ +package jp.sf.pal.pompei.cbean; + + +/** + * The condition-bean of COUNTER_HISTORY. + * + * @author DBFlute(AutoGenerator) + */ +public class CounterHistoryCB extends jp.sf.pal.pompei.cbean.bs.BsCounterHistoryCB { +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/CountriesCB.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/CountriesCB.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/CountriesCB.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,10 @@ +package jp.sf.pal.pompei.cbean; + + +/** + * The condition-bean of COUNTRIES. + * + * @author DBFlute(AutoGenerator) + */ +public class CountriesCB extends jp.sf.pal.pompei.cbean.bs.BsCountriesCB { +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/CurrenciesCB.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/CurrenciesCB.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/CurrenciesCB.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,10 @@ +package jp.sf.pal.pompei.cbean; + + +/** + * The condition-bean of CURRENCIES. + * + * @author DBFlute(AutoGenerator) + */ +public class CurrenciesCB extends jp.sf.pal.pompei.cbean.bs.BsCurrenciesCB { +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/CustomersBasketAttributesCB.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/CustomersBasketAttributesCB.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/CustomersBasketAttributesCB.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,10 @@ +package jp.sf.pal.pompei.cbean; + + +/** + * The condition-bean of CUSTOMERS_BASKET_ATTRIBUTES. + * + * @author DBFlute(AutoGenerator) + */ +public class CustomersBasketAttributesCB extends jp.sf.pal.pompei.cbean.bs.BsCustomersBasketAttributesCB { +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/CustomersBasketCB.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/CustomersBasketCB.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/CustomersBasketCB.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,10 @@ +package jp.sf.pal.pompei.cbean; + + +/** + * The condition-bean of CUSTOMERS_BASKET. + * + * @author DBFlute(AutoGenerator) + */ +public class CustomersBasketCB extends jp.sf.pal.pompei.cbean.bs.BsCustomersBasketCB { +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/CustomersCB.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/CustomersCB.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/CustomersCB.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,10 @@ +package jp.sf.pal.pompei.cbean; + + +/** + * The condition-bean of CUSTOMERS. + * + * @author DBFlute(AutoGenerator) + */ +public class CustomersCB extends jp.sf.pal.pompei.cbean.bs.BsCustomersCB { +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/CustomersInfoCB.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/CustomersInfoCB.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/CustomersInfoCB.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,10 @@ +package jp.sf.pal.pompei.cbean; + + +/** + * The condition-bean of CUSTOMERS_INFO. + * + * @author DBFlute(AutoGenerator) + */ +public class CustomersInfoCB extends jp.sf.pal.pompei.cbean.bs.BsCustomersInfoCB { +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/GeoZonesCB.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/GeoZonesCB.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/GeoZonesCB.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,10 @@ +package jp.sf.pal.pompei.cbean; + + +/** + * The condition-bean of GEO_ZONES. + * + * @author DBFlute(AutoGenerator) + */ +public class GeoZonesCB extends jp.sf.pal.pompei.cbean.bs.BsGeoZonesCB { +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/LanguagesCB.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/LanguagesCB.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/LanguagesCB.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,10 @@ +package jp.sf.pal.pompei.cbean; + + +/** + * The condition-bean of LANGUAGES. + * + * @author DBFlute(AutoGenerator) + */ +public class LanguagesCB extends jp.sf.pal.pompei.cbean.bs.BsLanguagesCB { +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/ManufacturersCB.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/ManufacturersCB.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/ManufacturersCB.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,10 @@ +package jp.sf.pal.pompei.cbean; + + +/** + * The condition-bean of MANUFACTURERS. + * + * @author DBFlute(AutoGenerator) + */ +public class ManufacturersCB extends jp.sf.pal.pompei.cbean.bs.BsManufacturersCB { +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/ManufacturersInfoCB.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/ManufacturersInfoCB.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/ManufacturersInfoCB.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,10 @@ +package jp.sf.pal.pompei.cbean; + + +/** + * The condition-bean of MANUFACTURERS_INFO. + * + * @author DBFlute(AutoGenerator) + */ +public class ManufacturersInfoCB extends jp.sf.pal.pompei.cbean.bs.BsManufacturersInfoCB { +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/NewslettersCB.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/NewslettersCB.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/NewslettersCB.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,10 @@ +package jp.sf.pal.pompei.cbean; + + +/** + * The condition-bean of NEWSLETTERS. + * + * @author DBFlute(AutoGenerator) + */ +public class NewslettersCB extends jp.sf.pal.pompei.cbean.bs.BsNewslettersCB { +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/OrdersCB.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/OrdersCB.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/OrdersCB.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,10 @@ +package jp.sf.pal.pompei.cbean; + + +/** + * The condition-bean of ORDERS. + * + * @author DBFlute(AutoGenerator) + */ +public class OrdersCB extends jp.sf.pal.pompei.cbean.bs.BsOrdersCB { +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/OrdersProductsAttributesCB.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/OrdersProductsAttributesCB.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/OrdersProductsAttributesCB.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,10 @@ +package jp.sf.pal.pompei.cbean; + + +/** + * The condition-bean of ORDERS_PRODUCTS_ATTRIBUTES. + * + * @author DBFlute(AutoGenerator) + */ +public class OrdersProductsAttributesCB extends jp.sf.pal.pompei.cbean.bs.BsOrdersProductsAttributesCB { +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/OrdersProductsCB.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/OrdersProductsCB.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/OrdersProductsCB.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,10 @@ +package jp.sf.pal.pompei.cbean; + + +/** + * The condition-bean of ORDERS_PRODUCTS. + * + * @author DBFlute(AutoGenerator) + */ +public class OrdersProductsCB extends jp.sf.pal.pompei.cbean.bs.BsOrdersProductsCB { +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/OrdersProductsDownloadCB.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/OrdersProductsDownloadCB.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/OrdersProductsDownloadCB.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,10 @@ +package jp.sf.pal.pompei.cbean; + + +/** + * The condition-bean of ORDERS_PRODUCTS_DOWNLOAD. + * + * @author DBFlute(AutoGenerator) + */ +public class OrdersProductsDownloadCB extends jp.sf.pal.pompei.cbean.bs.BsOrdersProductsDownloadCB { +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/OrdersStatusCB.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/OrdersStatusCB.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/OrdersStatusCB.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,10 @@ +package jp.sf.pal.pompei.cbean; + + +/** + * The condition-bean of ORDERS_STATUS. + * + * @author DBFlute(AutoGenerator) + */ +public class OrdersStatusCB extends jp.sf.pal.pompei.cbean.bs.BsOrdersStatusCB { +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/OrdersStatusHistoryCB.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/OrdersStatusHistoryCB.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/OrdersStatusHistoryCB.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,10 @@ +package jp.sf.pal.pompei.cbean; + + +/** + * The condition-bean of ORDERS_STATUS_HISTORY. + * + * @author DBFlute(AutoGenerator) + */ +public class OrdersStatusHistoryCB extends jp.sf.pal.pompei.cbean.bs.BsOrdersStatusHistoryCB { +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/OrdersTotalCB.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/OrdersTotalCB.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/OrdersTotalCB.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,10 @@ +package jp.sf.pal.pompei.cbean; + + +/** + * The condition-bean of ORDERS_TOTAL. + * + * @author DBFlute(AutoGenerator) + */ +public class OrdersTotalCB extends jp.sf.pal.pompei.cbean.bs.BsOrdersTotalCB { +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/ProductsAttributesCB.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/ProductsAttributesCB.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/ProductsAttributesCB.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,10 @@ +package jp.sf.pal.pompei.cbean; + + +/** + * The condition-bean of PRODUCTS_ATTRIBUTES. + * + * @author DBFlute(AutoGenerator) + */ +public class ProductsAttributesCB extends jp.sf.pal.pompei.cbean.bs.BsProductsAttributesCB { +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/ProductsAttributesDownloadCB.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/ProductsAttributesDownloadCB.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/ProductsAttributesDownloadCB.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,10 @@ +package jp.sf.pal.pompei.cbean; + + +/** + * The condition-bean of PRODUCTS_ATTRIBUTES_DOWNLOAD. + * + * @author DBFlute(AutoGenerator) + */ +public class ProductsAttributesDownloadCB extends jp.sf.pal.pompei.cbean.bs.BsProductsAttributesDownloadCB { +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/ProductsCB.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/ProductsCB.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/ProductsCB.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,10 @@ +package jp.sf.pal.pompei.cbean; + + +/** + * The condition-bean of PRODUCTS. + * + * @author DBFlute(AutoGenerator) + */ +public class ProductsCB extends jp.sf.pal.pompei.cbean.bs.BsProductsCB { +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/ProductsDescriptionCB.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/ProductsDescriptionCB.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/ProductsDescriptionCB.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,10 @@ +package jp.sf.pal.pompei.cbean; + + +/** + * The condition-bean of PRODUCTS_DESCRIPTION. + * + * @author DBFlute(AutoGenerator) + */ +public class ProductsDescriptionCB extends jp.sf.pal.pompei.cbean.bs.BsProductsDescriptionCB { +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/ProductsNotificationsCB.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/ProductsNotificationsCB.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/ProductsNotificationsCB.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,10 @@ +package jp.sf.pal.pompei.cbean; + + +/** + * The condition-bean of PRODUCTS_NOTIFICATIONS. + * + * @author DBFlute(AutoGenerator) + */ +public class ProductsNotificationsCB extends jp.sf.pal.pompei.cbean.bs.BsProductsNotificationsCB { +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/ProductsOptionsCB.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/ProductsOptionsCB.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/ProductsOptionsCB.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,10 @@ +package jp.sf.pal.pompei.cbean; + + +/** + * The condition-bean of PRODUCTS_OPTIONS. + * + * @author DBFlute(AutoGenerator) + */ +public class ProductsOptionsCB extends jp.sf.pal.pompei.cbean.bs.BsProductsOptionsCB { +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/ProductsOptionsValuesCB.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/ProductsOptionsValuesCB.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/ProductsOptionsValuesCB.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,10 @@ +package jp.sf.pal.pompei.cbean; + + +/** + * The condition-bean of PRODUCTS_OPTIONS_VALUES. + * + * @author DBFlute(AutoGenerator) + */ +public class ProductsOptionsValuesCB extends jp.sf.pal.pompei.cbean.bs.BsProductsOptionsValuesCB { +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/ProductsOptionsValuesToProductsOptionsCB.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/ProductsOptionsValuesToProductsOptionsCB.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/ProductsOptionsValuesToProductsOptionsCB.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,10 @@ +package jp.sf.pal.pompei.cbean; + + +/** + * The condition-bean of PRODUCTS_OPTIONS_VALUES_TO_PRODUCTS_OPTIONS. + * + * @author DBFlute(AutoGenerator) + */ +public class ProductsOptionsValuesToProductsOptionsCB extends jp.sf.pal.pompei.cbean.bs.BsProductsOptionsValuesToProductsOptionsCB { +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/ProductsToCategoriesCB.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/ProductsToCategoriesCB.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/ProductsToCategoriesCB.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,10 @@ +package jp.sf.pal.pompei.cbean; + + +/** + * The condition-bean of PRODUCTS_TO_CATEGORIES. + * + * @author DBFlute(AutoGenerator) + */ +public class ProductsToCategoriesCB extends jp.sf.pal.pompei.cbean.bs.BsProductsToCategoriesCB { +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/ReviewsCB.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/ReviewsCB.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/ReviewsCB.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,10 @@ +package jp.sf.pal.pompei.cbean; + + +/** + * The condition-bean of REVIEWS. + * + * @author DBFlute(AutoGenerator) + */ +public class ReviewsCB extends jp.sf.pal.pompei.cbean.bs.BsReviewsCB { +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/ReviewsDescriptionCB.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/ReviewsDescriptionCB.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/ReviewsDescriptionCB.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,10 @@ +package jp.sf.pal.pompei.cbean; + + +/** + * The condition-bean of REVIEWS_DESCRIPTION. + * + * @author DBFlute(AutoGenerator) + */ +public class ReviewsDescriptionCB extends jp.sf.pal.pompei.cbean.bs.BsReviewsDescriptionCB { +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/SessionsCB.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/SessionsCB.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/SessionsCB.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,10 @@ +package jp.sf.pal.pompei.cbean; + + +/** + * The condition-bean of SESSIONS. + * + * @author DBFlute(AutoGenerator) + */ +public class SessionsCB extends jp.sf.pal.pompei.cbean.bs.BsSessionsCB { +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/SpecialsCB.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/SpecialsCB.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/SpecialsCB.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,10 @@ +package jp.sf.pal.pompei.cbean; + + +/** + * The condition-bean of SPECIALS. + * + * @author DBFlute(AutoGenerator) + */ +public class SpecialsCB extends jp.sf.pal.pompei.cbean.bs.BsSpecialsCB { +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/TaxClassCB.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/TaxClassCB.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/TaxClassCB.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,10 @@ +package jp.sf.pal.pompei.cbean; + + +/** + * The condition-bean of TAX_CLASS. + * + * @author DBFlute(AutoGenerator) + */ +public class TaxClassCB extends jp.sf.pal.pompei.cbean.bs.BsTaxClassCB { +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/TaxRatesCB.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/TaxRatesCB.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/TaxRatesCB.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,10 @@ +package jp.sf.pal.pompei.cbean; + + +/** + * The condition-bean of TAX_RATES. + * + * @author DBFlute(AutoGenerator) + */ +public class TaxRatesCB extends jp.sf.pal.pompei.cbean.bs.BsTaxRatesCB { +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/WhosOnlineCB.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/WhosOnlineCB.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/WhosOnlineCB.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,10 @@ +package jp.sf.pal.pompei.cbean; + + +/** + * The condition-bean of WHOS_ONLINE. + * + * @author DBFlute(AutoGenerator) + */ +public class WhosOnlineCB extends jp.sf.pal.pompei.cbean.bs.BsWhosOnlineCB { +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/ZonesCB.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/ZonesCB.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/ZonesCB.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,10 @@ +package jp.sf.pal.pompei.cbean; + + +/** + * The condition-bean of ZONES. + * + * @author DBFlute(AutoGenerator) + */ +public class ZonesCB extends jp.sf.pal.pompei.cbean.bs.BsZonesCB { +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/ZonesToGeoZonesCB.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/ZonesToGeoZonesCB.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/ZonesToGeoZonesCB.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,10 @@ +package jp.sf.pal.pompei.cbean; + + +/** + * The condition-bean of ZONES_TO_GEO_ZONES. + * + * @author DBFlute(AutoGenerator) + */ +public class ZonesToGeoZonesCB extends jp.sf.pal.pompei.cbean.bs.BsZonesToGeoZonesCB { +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/bs/BsAddressBookCB.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/bs/BsAddressBookCB.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/bs/BsAddressBookCB.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,204 @@ +package jp.sf.pal.pompei.cbean.bs; + + +import jp.sf.pal.pompei.allcommon.cbean.AbstractConditionBean; +import jp.sf.pal.pompei.allcommon.cbean.ConditionBean; +import jp.sf.pal.pompei.allcommon.cbean.ConditionQuery; + +import jp.sf.pal.pompei.cbean.cq.*; +import jp.sf.pal.pompei.cbean.nss.*; + +/** + * The condition-bean of ADDRESS_BOOK. + * + * @author DBFlute(AutoGenerator) + */ +public class BsAddressBookCB extends AbstractConditionBean { + + // =================================================================================== + // Annotation + // ========== + /** TABLE-Annotation */ + public static final String TABLE = "ADDRESS_BOOK"; + + // =================================================================================== + // Attribute + // ========= + /** Condition query. */ + protected AddressBookCQ _conditionQuery; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + public BsAddressBookCB() { + } + + // /* * * * * * * * * * * * * * * * * * * * * * * + // MyTable = [ADDRESS_BOOK] + // * * * * * * * * */ + + // =================================================================================== + // Table Name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + final public String getTableDbName() { + return "ADDRESS_BOOK"; + } + + // =================================================================================== + // Accept Primary-Key + // ================== + /** + * This method implements the method that is declared at super. + * + * @param primaryKeyMap Primary key map. (NotNull and NotEmpty) + */ + public void acceptPrimaryKeyMap(java.util.Map primaryKeyMap) { + if (primaryKeyMap == null) { + String msg = "The argument[primaryKeyMap] must not be null."; + throw new IllegalArgumentException(msg); + } + if (primaryKeyMap.isEmpty()) { + String msg = "The argument[primaryKeyMap] must not be empty."; + throw new IllegalArgumentException(msg); + } + + if (!primaryKeyMap.containsKey("ADDRESS_BOOK_ID")) { + String msg = "The primaryKeyMap must have the value of ADDRESS_BOOK_ID"; + throw new IllegalStateException(msg + ": primaryKeyMap --> " + primaryKeyMap); + } + { + Object obj = primaryKeyMap.get("ADDRESS_BOOK_ID"); + if (obj instanceof java.math.BigDecimal) { + query().setAddressBookId_Equal((java.math.BigDecimal)obj); + } else { + + if (obj instanceof java.math.BigDecimal) { + query().setAddressBookId_Equal((java.math.BigDecimal)obj); + } else { + try { + query().setAddressBookId_Equal(new java.math.BigDecimal((String)obj)); + } catch (RuntimeException e) { + String msg = "setAddressBookId(new java.math.BigDecimal((String)obj))"; + throw new RuntimeException(msg + " threw the exception: value=[" + obj + "]", e); + } + } + } + } + + } + + // =================================================================================== + // Order-By + // ======== + /** + * This method implements the method that is declared at super. + * + * @return this. (NotNull) + */ + public ConditionBean addOrderBy_PK_Asc() { + + query().addOrderBy_AddressBookId_Asc(); + + return this; + + } + + /** + * This method implements the method that is declared at super. + * + * @return this. (NotNull) + */ + public ConditionBean addOrderBy_PK_Desc() { + + query().addOrderBy_AddressBookId_Desc(); + + return this; + + } + + // =================================================================================== + // Query + // ===== + /** + * Query. + * + * @return Instance of query. (NotNull) + */ + public AddressBookCQ query() { + return getConditionQuery(); + } + + /** + * Get condition query. {Internal method for s2dao} + * + * @return Instance of condition query. (NotNull) + */ + public AddressBookCQ getConditionQuery() { + if (_conditionQuery == null) { + _conditionQuery = new AddressBookCQ(null, getSqlClause(), getTableDbName(), 0); + } + return _conditionQuery; + } + + /** + * This method implements the method that is declared at super. + * + * @return Instance of query as interface. (NotNull) + */ + public ConditionQuery getConditionQueryAsInterface() { + return getConditionQuery(); + } + + // =================================================================================== + // Union + // ===== + /** + * Union. + *
+     * Add union query to condition bean.
+     * 
+ * @param unionQuery Union query. (NotNull) + */ + public void union(AddressBookCQ unionQuery) { + query().xsetUnionQuery(unionQuery); + } + + /** + * Union all. + *
+     * Add union all query to condition bean.
+     * 
+ * @param unionAllQuery Union all query. (NotNull) + */ + public void unionAll(AddressBookCQ unionAllQuery) { + query().xsetUnionAllQuery(unionAllQuery); + } + + public boolean hasUnionQueryOrUnionAllQuery() { + return query().hasUnionQueryOrUnionAllQuery(); + } + + // =================================================================================== + // Setup-Select + // ============ + + // =================================================================================== + // Basic Override + // ============== + /** + * This method overrides the method that is declared at super. + * + * @return Clause string. (NotNull) + */ + public String toString() { + return getSqlClause().getClause(); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/bs/BsAddressFormatCB.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/bs/BsAddressFormatCB.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/bs/BsAddressFormatCB.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,204 @@ +package jp.sf.pal.pompei.cbean.bs; + + +import jp.sf.pal.pompei.allcommon.cbean.AbstractConditionBean; +import jp.sf.pal.pompei.allcommon.cbean.ConditionBean; +import jp.sf.pal.pompei.allcommon.cbean.ConditionQuery; + +import jp.sf.pal.pompei.cbean.cq.*; +import jp.sf.pal.pompei.cbean.nss.*; + +/** + * The condition-bean of ADDRESS_FORMAT. + * + * @author DBFlute(AutoGenerator) + */ +public class BsAddressFormatCB extends AbstractConditionBean { + + // =================================================================================== + // Annotation + // ========== + /** TABLE-Annotation */ + public static final String TABLE = "ADDRESS_FORMAT"; + + // =================================================================================== + // Attribute + // ========= + /** Condition query. */ + protected AddressFormatCQ _conditionQuery; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + public BsAddressFormatCB() { + } + + // /* * * * * * * * * * * * * * * * * * * * * * * + // MyTable = [ADDRESS_FORMAT] + // * * * * * * * * */ + + // =================================================================================== + // Table Name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + final public String getTableDbName() { + return "ADDRESS_FORMAT"; + } + + // =================================================================================== + // Accept Primary-Key + // ================== + /** + * This method implements the method that is declared at super. + * + * @param primaryKeyMap Primary key map. (NotNull and NotEmpty) + */ + public void acceptPrimaryKeyMap(java.util.Map primaryKeyMap) { + if (primaryKeyMap == null) { + String msg = "The argument[primaryKeyMap] must not be null."; + throw new IllegalArgumentException(msg); + } + if (primaryKeyMap.isEmpty()) { + String msg = "The argument[primaryKeyMap] must not be empty."; + throw new IllegalArgumentException(msg); + } + + if (!primaryKeyMap.containsKey("ADDRESS_FORMAT_ID")) { + String msg = "The primaryKeyMap must have the value of ADDRESS_FORMAT_ID"; + throw new IllegalStateException(msg + ": primaryKeyMap --> " + primaryKeyMap); + } + { + Object obj = primaryKeyMap.get("ADDRESS_FORMAT_ID"); + if (obj instanceof java.math.BigDecimal) { + query().setAddressFormatId_Equal((java.math.BigDecimal)obj); + } else { + + if (obj instanceof java.math.BigDecimal) { + query().setAddressFormatId_Equal((java.math.BigDecimal)obj); + } else { + try { + query().setAddressFormatId_Equal(new java.math.BigDecimal((String)obj)); + } catch (RuntimeException e) { + String msg = "setAddressFormatId(new java.math.BigDecimal((String)obj))"; + throw new RuntimeException(msg + " threw the exception: value=[" + obj + "]", e); + } + } + } + } + + } + + // =================================================================================== + // Order-By + // ======== + /** + * This method implements the method that is declared at super. + * + * @return this. (NotNull) + */ + public ConditionBean addOrderBy_PK_Asc() { + + query().addOrderBy_AddressFormatId_Asc(); + + return this; + + } + + /** + * This method implements the method that is declared at super. + * + * @return this. (NotNull) + */ + public ConditionBean addOrderBy_PK_Desc() { + + query().addOrderBy_AddressFormatId_Desc(); + + return this; + + } + + // =================================================================================== + // Query + // ===== + /** + * Query. + * + * @return Instance of query. (NotNull) + */ + public AddressFormatCQ query() { + return getConditionQuery(); + } + + /** + * Get condition query. {Internal method for s2dao} + * + * @return Instance of condition query. (NotNull) + */ + public AddressFormatCQ getConditionQuery() { + if (_conditionQuery == null) { + _conditionQuery = new AddressFormatCQ(null, getSqlClause(), getTableDbName(), 0); + } + return _conditionQuery; + } + + /** + * This method implements the method that is declared at super. + * + * @return Instance of query as interface. (NotNull) + */ + public ConditionQuery getConditionQueryAsInterface() { + return getConditionQuery(); + } + + // =================================================================================== + // Union + // ===== + /** + * Union. + *
+     * Add union query to condition bean.
+     * 
+ * @param unionQuery Union query. (NotNull) + */ + public void union(AddressFormatCQ unionQuery) { + query().xsetUnionQuery(unionQuery); + } + + /** + * Union all. + *
+     * Add union all query to condition bean.
+     * 
+ * @param unionAllQuery Union all query. (NotNull) + */ + public void unionAll(AddressFormatCQ unionAllQuery) { + query().xsetUnionAllQuery(unionAllQuery); + } + + public boolean hasUnionQueryOrUnionAllQuery() { + return query().hasUnionQueryOrUnionAllQuery(); + } + + // =================================================================================== + // Setup-Select + // ============ + + // =================================================================================== + // Basic Override + // ============== + /** + * This method overrides the method that is declared at super. + * + * @return Clause string. (NotNull) + */ + public String toString() { + return getSqlClause().getClause(); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/bs/BsBannersCB.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/bs/BsBannersCB.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/bs/BsBannersCB.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,204 @@ +package jp.sf.pal.pompei.cbean.bs; + + +import jp.sf.pal.pompei.allcommon.cbean.AbstractConditionBean; +import jp.sf.pal.pompei.allcommon.cbean.ConditionBean; +import jp.sf.pal.pompei.allcommon.cbean.ConditionQuery; + +import jp.sf.pal.pompei.cbean.cq.*; +import jp.sf.pal.pompei.cbean.nss.*; + +/** + * The condition-bean of BANNERS. + * + * @author DBFlute(AutoGenerator) + */ +public class BsBannersCB extends AbstractConditionBean { + + // =================================================================================== + // Annotation + // ========== + /** TABLE-Annotation */ + public static final String TABLE = "BANNERS"; + + // =================================================================================== + // Attribute + // ========= + /** Condition query. */ + protected BannersCQ _conditionQuery; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + public BsBannersCB() { + } + + // /* * * * * * * * * * * * * * * * * * * * * * * + // MyTable = [BANNERS] + // * * * * * * * * */ + + // =================================================================================== + // Table Name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + final public String getTableDbName() { + return "BANNERS"; + } + + // =================================================================================== + // Accept Primary-Key + // ================== + /** + * This method implements the method that is declared at super. + * + * @param primaryKeyMap Primary key map. (NotNull and NotEmpty) + */ + public void acceptPrimaryKeyMap(java.util.Map primaryKeyMap) { + if (primaryKeyMap == null) { + String msg = "The argument[primaryKeyMap] must not be null."; + throw new IllegalArgumentException(msg); + } + if (primaryKeyMap.isEmpty()) { + String msg = "The argument[primaryKeyMap] must not be empty."; + throw new IllegalArgumentException(msg); + } + + if (!primaryKeyMap.containsKey("BANNERS_ID")) { + String msg = "The primaryKeyMap must have the value of BANNERS_ID"; + throw new IllegalStateException(msg + ": primaryKeyMap --> " + primaryKeyMap); + } + { + Object obj = primaryKeyMap.get("BANNERS_ID"); + if (obj instanceof java.math.BigDecimal) { + query().setBannersId_Equal((java.math.BigDecimal)obj); + } else { + + if (obj instanceof java.math.BigDecimal) { + query().setBannersId_Equal((java.math.BigDecimal)obj); + } else { + try { + query().setBannersId_Equal(new java.math.BigDecimal((String)obj)); + } catch (RuntimeException e) { + String msg = "setBannersId(new java.math.BigDecimal((String)obj))"; + throw new RuntimeException(msg + " threw the exception: value=[" + obj + "]", e); + } + } + } + } + + } + + // =================================================================================== + // Order-By + // ======== + /** + * This method implements the method that is declared at super. + * + * @return this. (NotNull) + */ + public ConditionBean addOrderBy_PK_Asc() { + + query().addOrderBy_BannersId_Asc(); + + return this; + + } + + /** + * This method implements the method that is declared at super. + * + * @return this. (NotNull) + */ + public ConditionBean addOrderBy_PK_Desc() { + + query().addOrderBy_BannersId_Desc(); + + return this; + + } + + // =================================================================================== + // Query + // ===== + /** + * Query. + * + * @return Instance of query. (NotNull) + */ + public BannersCQ query() { + return getConditionQuery(); + } + + /** + * Get condition query. {Internal method for s2dao} + * + * @return Instance of condition query. (NotNull) + */ + public BannersCQ getConditionQuery() { + if (_conditionQuery == null) { + _conditionQuery = new BannersCQ(null, getSqlClause(), getTableDbName(), 0); + } + return _conditionQuery; + } + + /** + * This method implements the method that is declared at super. + * + * @return Instance of query as interface. (NotNull) + */ + public ConditionQuery getConditionQueryAsInterface() { + return getConditionQuery(); + } + + // =================================================================================== + // Union + // ===== + /** + * Union. + *
+     * Add union query to condition bean.
+     * 
+ * @param unionQuery Union query. (NotNull) + */ + public void union(BannersCQ unionQuery) { + query().xsetUnionQuery(unionQuery); + } + + /** + * Union all. + *
+     * Add union all query to condition bean.
+     * 
+ * @param unionAllQuery Union all query. (NotNull) + */ + public void unionAll(BannersCQ unionAllQuery) { + query().xsetUnionAllQuery(unionAllQuery); + } + + public boolean hasUnionQueryOrUnionAllQuery() { + return query().hasUnionQueryOrUnionAllQuery(); + } + + // =================================================================================== + // Setup-Select + // ============ + + // =================================================================================== + // Basic Override + // ============== + /** + * This method overrides the method that is declared at super. + * + * @return Clause string. (NotNull) + */ + public String toString() { + return getSqlClause().getClause(); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/bs/BsBannersHistoryCB.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/bs/BsBannersHistoryCB.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/bs/BsBannersHistoryCB.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,204 @@ +package jp.sf.pal.pompei.cbean.bs; + + +import jp.sf.pal.pompei.allcommon.cbean.AbstractConditionBean; +import jp.sf.pal.pompei.allcommon.cbean.ConditionBean; +import jp.sf.pal.pompei.allcommon.cbean.ConditionQuery; + +import jp.sf.pal.pompei.cbean.cq.*; +import jp.sf.pal.pompei.cbean.nss.*; + +/** + * The condition-bean of BANNERS_HISTORY. + * + * @author DBFlute(AutoGenerator) + */ +public class BsBannersHistoryCB extends AbstractConditionBean { + + // =================================================================================== + // Annotation + // ========== + /** TABLE-Annotation */ + public static final String TABLE = "BANNERS_HISTORY"; + + // =================================================================================== + // Attribute + // ========= + /** Condition query. */ + protected BannersHistoryCQ _conditionQuery; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + public BsBannersHistoryCB() { + } + + // /* * * * * * * * * * * * * * * * * * * * * * * + // MyTable = [BANNERS_HISTORY] + // * * * * * * * * */ + + // =================================================================================== + // Table Name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + final public String getTableDbName() { + return "BANNERS_HISTORY"; + } + + // =================================================================================== + // Accept Primary-Key + // ================== + /** + * This method implements the method that is declared at super. + * + * @param primaryKeyMap Primary key map. (NotNull and NotEmpty) + */ + public void acceptPrimaryKeyMap(java.util.Map primaryKeyMap) { + if (primaryKeyMap == null) { + String msg = "The argument[primaryKeyMap] must not be null."; + throw new IllegalArgumentException(msg); + } + if (primaryKeyMap.isEmpty()) { + String msg = "The argument[primaryKeyMap] must not be empty."; + throw new IllegalArgumentException(msg); + } + + if (!primaryKeyMap.containsKey("BANNERS_HISTORY_ID")) { + String msg = "The primaryKeyMap must have the value of BANNERS_HISTORY_ID"; + throw new IllegalStateException(msg + ": primaryKeyMap --> " + primaryKeyMap); + } + { + Object obj = primaryKeyMap.get("BANNERS_HISTORY_ID"); + if (obj instanceof java.math.BigDecimal) { + query().setBannersHistoryId_Equal((java.math.BigDecimal)obj); + } else { + + if (obj instanceof java.math.BigDecimal) { + query().setBannersHistoryId_Equal((java.math.BigDecimal)obj); + } else { + try { + query().setBannersHistoryId_Equal(new java.math.BigDecimal((String)obj)); + } catch (RuntimeException e) { + String msg = "setBannersHistoryId(new java.math.BigDecimal((String)obj))"; + throw new RuntimeException(msg + " threw the exception: value=[" + obj + "]", e); + } + } + } + } + + } + + // =================================================================================== + // Order-By + // ======== + /** + * This method implements the method that is declared at super. + * + * @return this. (NotNull) + */ + public ConditionBean addOrderBy_PK_Asc() { + + query().addOrderBy_BannersHistoryId_Asc(); + + return this; + + } + + /** + * This method implements the method that is declared at super. + * + * @return this. (NotNull) + */ + public ConditionBean addOrderBy_PK_Desc() { + + query().addOrderBy_BannersHistoryId_Desc(); + + return this; + + } + + // =================================================================================== + // Query + // ===== + /** + * Query. + * + * @return Instance of query. (NotNull) + */ + public BannersHistoryCQ query() { + return getConditionQuery(); + } + + /** + * Get condition query. {Internal method for s2dao} + * + * @return Instance of condition query. (NotNull) + */ + public BannersHistoryCQ getConditionQuery() { + if (_conditionQuery == null) { + _conditionQuery = new BannersHistoryCQ(null, getSqlClause(), getTableDbName(), 0); + } + return _conditionQuery; + } + + /** + * This method implements the method that is declared at super. + * + * @return Instance of query as interface. (NotNull) + */ + public ConditionQuery getConditionQueryAsInterface() { + return getConditionQuery(); + } + + // =================================================================================== + // Union + // ===== + /** + * Union. + *
+     * Add union query to condition bean.
+     * 
+ * @param unionQuery Union query. (NotNull) + */ + public void union(BannersHistoryCQ unionQuery) { + query().xsetUnionQuery(unionQuery); + } + + /** + * Union all. + *
+     * Add union all query to condition bean.
+     * 
+ * @param unionAllQuery Union all query. (NotNull) + */ + public void unionAll(BannersHistoryCQ unionAllQuery) { + query().xsetUnionAllQuery(unionAllQuery); + } + + public boolean hasUnionQueryOrUnionAllQuery() { + return query().hasUnionQueryOrUnionAllQuery(); + } + + // =================================================================================== + // Setup-Select + // ============ + + // =================================================================================== + // Basic Override + // ============== + /** + * This method overrides the method that is declared at super. + * + * @return Clause string. (NotNull) + */ + public String toString() { + return getSqlClause().getClause(); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/bs/BsCategoriesCB.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/bs/BsCategoriesCB.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/bs/BsCategoriesCB.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,204 @@ +package jp.sf.pal.pompei.cbean.bs; + + +import jp.sf.pal.pompei.allcommon.cbean.AbstractConditionBean; +import jp.sf.pal.pompei.allcommon.cbean.ConditionBean; +import jp.sf.pal.pompei.allcommon.cbean.ConditionQuery; + +import jp.sf.pal.pompei.cbean.cq.*; +import jp.sf.pal.pompei.cbean.nss.*; + +/** + * The condition-bean of CATEGORIES. + * + * @author DBFlute(AutoGenerator) + */ +public class BsCategoriesCB extends AbstractConditionBean { + + // =================================================================================== + // Annotation + // ========== + /** TABLE-Annotation */ + public static final String TABLE = "CATEGORIES"; + + // =================================================================================== + // Attribute + // ========= + /** Condition query. */ + protected CategoriesCQ _conditionQuery; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + public BsCategoriesCB() { + } + + // /* * * * * * * * * * * * * * * * * * * * * * * + // MyTable = [CATEGORIES] + // * * * * * * * * */ + + // =================================================================================== + // Table Name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + final public String getTableDbName() { + return "CATEGORIES"; + } + + // =================================================================================== + // Accept Primary-Key + // ================== + /** + * This method implements the method that is declared at super. + * + * @param primaryKeyMap Primary key map. (NotNull and NotEmpty) + */ + public void acceptPrimaryKeyMap(java.util.Map primaryKeyMap) { + if (primaryKeyMap == null) { + String msg = "The argument[primaryKeyMap] must not be null."; + throw new IllegalArgumentException(msg); + } + if (primaryKeyMap.isEmpty()) { + String msg = "The argument[primaryKeyMap] must not be empty."; + throw new IllegalArgumentException(msg); + } + + if (!primaryKeyMap.containsKey("CATEGORIES_ID")) { + String msg = "The primaryKeyMap must have the value of CATEGORIES_ID"; + throw new IllegalStateException(msg + ": primaryKeyMap --> " + primaryKeyMap); + } + { + Object obj = primaryKeyMap.get("CATEGORIES_ID"); + if (obj instanceof java.math.BigDecimal) { + query().setCategoriesId_Equal((java.math.BigDecimal)obj); + } else { + + if (obj instanceof java.math.BigDecimal) { + query().setCategoriesId_Equal((java.math.BigDecimal)obj); + } else { + try { + query().setCategoriesId_Equal(new java.math.BigDecimal((String)obj)); + } catch (RuntimeException e) { + String msg = "setCategoriesId(new java.math.BigDecimal((String)obj))"; + throw new RuntimeException(msg + " threw the exception: value=[" + obj + "]", e); + } + } + } + } + + } + + // =================================================================================== + // Order-By + // ======== + /** + * This method implements the method that is declared at super. + * + * @return this. (NotNull) + */ + public ConditionBean addOrderBy_PK_Asc() { + + query().addOrderBy_CategoriesId_Asc(); + + return this; + + } + + /** + * This method implements the method that is declared at super. + * + * @return this. (NotNull) + */ + public ConditionBean addOrderBy_PK_Desc() { + + query().addOrderBy_CategoriesId_Desc(); + + return this; + + } + + // =================================================================================== + // Query + // ===== + /** + * Query. + * + * @return Instance of query. (NotNull) + */ + public CategoriesCQ query() { + return getConditionQuery(); + } + + /** + * Get condition query. {Internal method for s2dao} + * + * @return Instance of condition query. (NotNull) + */ + public CategoriesCQ getConditionQuery() { + if (_conditionQuery == null) { + _conditionQuery = new CategoriesCQ(null, getSqlClause(), getTableDbName(), 0); + } + return _conditionQuery; + } + + /** + * This method implements the method that is declared at super. + * + * @return Instance of query as interface. (NotNull) + */ + public ConditionQuery getConditionQueryAsInterface() { + return getConditionQuery(); + } + + // =================================================================================== + // Union + // ===== + /** + * Union. + *
+     * Add union query to condition bean.
+     * 
+ * @param unionQuery Union query. (NotNull) + */ + public void union(CategoriesCQ unionQuery) { + query().xsetUnionQuery(unionQuery); + } + + /** + * Union all. + *
+     * Add union all query to condition bean.
+     * 
+ * @param unionAllQuery Union all query. (NotNull) + */ + public void unionAll(CategoriesCQ unionAllQuery) { + query().xsetUnionAllQuery(unionAllQuery); + } + + public boolean hasUnionQueryOrUnionAllQuery() { + return query().hasUnionQueryOrUnionAllQuery(); + } + + // =================================================================================== + // Setup-Select + // ============ + + // =================================================================================== + // Basic Override + // ============== + /** + * This method overrides the method that is declared at super. + * + * @return Clause string. (NotNull) + */ + public String toString() { + return getSqlClause().getClause(); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/bs/BsCategoriesDescriptionCB.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/bs/BsCategoriesDescriptionCB.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/bs/BsCategoriesDescriptionCB.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,231 @@ +package jp.sf.pal.pompei.cbean.bs; + + +import jp.sf.pal.pompei.allcommon.cbean.AbstractConditionBean; +import jp.sf.pal.pompei.allcommon.cbean.ConditionBean; +import jp.sf.pal.pompei.allcommon.cbean.ConditionQuery; + +import jp.sf.pal.pompei.cbean.cq.*; +import jp.sf.pal.pompei.cbean.nss.*; + +/** + * The condition-bean of CATEGORIES_DESCRIPTION. + * + * @author DBFlute(AutoGenerator) + */ +public class BsCategoriesDescriptionCB extends AbstractConditionBean { + + // =================================================================================== + // Annotation + // ========== + /** TABLE-Annotation */ + public static final String TABLE = "CATEGORIES_DESCRIPTION"; + + // =================================================================================== + // Attribute + // ========= + /** Condition query. */ + protected CategoriesDescriptionCQ _conditionQuery; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + public BsCategoriesDescriptionCB() { + } + + // /* * * * * * * * * * * * * * * * * * * * * * * + // MyTable = [CATEGORIES_DESCRIPTION] + // * * * * * * * * */ + + // =================================================================================== + // Table Name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + final public String getTableDbName() { + return "CATEGORIES_DESCRIPTION"; + } + + // =================================================================================== + // Accept Primary-Key + // ================== + /** + * This method implements the method that is declared at super. + * + * @param primaryKeyMap Primary key map. (NotNull and NotEmpty) + */ + public void acceptPrimaryKeyMap(java.util.Map primaryKeyMap) { + if (primaryKeyMap == null) { + String msg = "The argument[primaryKeyMap] must not be null."; + throw new IllegalArgumentException(msg); + } + if (primaryKeyMap.isEmpty()) { + String msg = "The argument[primaryKeyMap] must not be empty."; + throw new IllegalArgumentException(msg); + } + + if (!primaryKeyMap.containsKey("CATEGORIES_ID")) { + String msg = "The primaryKeyMap must have the value of CATEGORIES_ID"; + throw new IllegalStateException(msg + ": primaryKeyMap --> " + primaryKeyMap); + } + { + Object obj = primaryKeyMap.get("CATEGORIES_ID"); + if (obj instanceof java.math.BigDecimal) { + query().setCategoriesId_Equal((java.math.BigDecimal)obj); + } else { + + if (obj instanceof java.math.BigDecimal) { + query().setCategoriesId_Equal((java.math.BigDecimal)obj); + } else { + try { + query().setCategoriesId_Equal(new java.math.BigDecimal((String)obj)); + } catch (RuntimeException e) { + String msg = "setCategoriesId(new java.math.BigDecimal((String)obj))"; + throw new RuntimeException(msg + " threw the exception: value=[" + obj + "]", e); + } + } + } + } + + if (!primaryKeyMap.containsKey("LANGUAGE_ID")) { + String msg = "The primaryKeyMap must have the value of LANGUAGE_ID"; + throw new IllegalStateException(msg + ": primaryKeyMap --> " + primaryKeyMap); + } + { + Object obj = primaryKeyMap.get("LANGUAGE_ID"); + if (obj instanceof java.math.BigDecimal) { + query().setLanguageId_Equal((java.math.BigDecimal)obj); + } else { + + if (obj instanceof java.math.BigDecimal) { + query().setLanguageId_Equal((java.math.BigDecimal)obj); + } else { + try { + query().setLanguageId_Equal(new java.math.BigDecimal((String)obj)); + } catch (RuntimeException e) { + String msg = "setLanguageId(new java.math.BigDecimal((String)obj))"; + throw new RuntimeException(msg + " threw the exception: value=[" + obj + "]", e); + } + } + } + } + + } + + // =================================================================================== + // Order-By + // ======== + /** + * This method implements the method that is declared at super. + * + * @return this. (NotNull) + */ + public ConditionBean addOrderBy_PK_Asc() { + + query().addOrderBy_CategoriesId_Asc(); + + query().addOrderBy_LanguageId_Asc(); + + return this; + + } + + /** + * This method implements the method that is declared at super. + * + * @return this. (NotNull) + */ + public ConditionBean addOrderBy_PK_Desc() { + + query().addOrderBy_CategoriesId_Desc(); + + query().addOrderBy_LanguageId_Desc(); + + return this; + + } + + // =================================================================================== + // Query + // ===== + /** + * Query. + * + * @return Instance of query. (NotNull) + */ + public CategoriesDescriptionCQ query() { + return getConditionQuery(); + } + + /** + * Get condition query. {Internal method for s2dao} + * + * @return Instance of condition query. (NotNull) + */ + public CategoriesDescriptionCQ getConditionQuery() { + if (_conditionQuery == null) { + _conditionQuery = new CategoriesDescriptionCQ(null, getSqlClause(), getTableDbName(), 0); + } + return _conditionQuery; + } + + /** + * This method implements the method that is declared at super. + * + * @return Instance of query as interface. (NotNull) + */ + public ConditionQuery getConditionQueryAsInterface() { + return getConditionQuery(); + } + + // =================================================================================== + // Union + // ===== + /** + * Union. + *
+     * Add union query to condition bean.
+     * 
+ * @param unionQuery Union query. (NotNull) + */ + public void union(CategoriesDescriptionCQ unionQuery) { + query().xsetUnionQuery(unionQuery); + } + + /** + * Union all. + *
+     * Add union all query to condition bean.
+     * 
+ * @param unionAllQuery Union all query. (NotNull) + */ + public void unionAll(CategoriesDescriptionCQ unionAllQuery) { + query().xsetUnionAllQuery(unionAllQuery); + } + + public boolean hasUnionQueryOrUnionAllQuery() { + return query().hasUnionQueryOrUnionAllQuery(); + } + + // =================================================================================== + // Setup-Select + // ============ + + // =================================================================================== + // Basic Override + // ============== + /** + * This method overrides the method that is declared at super. + * + * @return Clause string. (NotNull) + */ + public String toString() { + return getSqlClause().getClause(); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/bs/BsConfigurationCB.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/bs/BsConfigurationCB.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/bs/BsConfigurationCB.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,204 @@ +package jp.sf.pal.pompei.cbean.bs; + + +import jp.sf.pal.pompei.allcommon.cbean.AbstractConditionBean; +import jp.sf.pal.pompei.allcommon.cbean.ConditionBean; +import jp.sf.pal.pompei.allcommon.cbean.ConditionQuery; + +import jp.sf.pal.pompei.cbean.cq.*; +import jp.sf.pal.pompei.cbean.nss.*; + +/** + * The condition-bean of CONFIGURATION. + * + * @author DBFlute(AutoGenerator) + */ +public class BsConfigurationCB extends AbstractConditionBean { + + // =================================================================================== + // Annotation + // ========== + /** TABLE-Annotation */ + public static final String TABLE = "CONFIGURATION"; + + // =================================================================================== + // Attribute + // ========= + /** Condition query. */ + protected ConfigurationCQ _conditionQuery; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + public BsConfigurationCB() { + } + + // /* * * * * * * * * * * * * * * * * * * * * * * + // MyTable = [CONFIGURATION] + // * * * * * * * * */ + + // =================================================================================== + // Table Name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + final public String getTableDbName() { + return "CONFIGURATION"; + } + + // =================================================================================== + // Accept Primary-Key + // ================== + /** + * This method implements the method that is declared at super. + * + * @param primaryKeyMap Primary key map. (NotNull and NotEmpty) + */ + public void acceptPrimaryKeyMap(java.util.Map primaryKeyMap) { + if (primaryKeyMap == null) { + String msg = "The argument[primaryKeyMap] must not be null."; + throw new IllegalArgumentException(msg); + } + if (primaryKeyMap.isEmpty()) { + String msg = "The argument[primaryKeyMap] must not be empty."; + throw new IllegalArgumentException(msg); + } + + if (!primaryKeyMap.containsKey("CONFIGURATION_ID")) { + String msg = "The primaryKeyMap must have the value of CONFIGURATION_ID"; + throw new IllegalStateException(msg + ": primaryKeyMap --> " + primaryKeyMap); + } + { + Object obj = primaryKeyMap.get("CONFIGURATION_ID"); + if (obj instanceof java.math.BigDecimal) { + query().setConfigurationId_Equal((java.math.BigDecimal)obj); + } else { + + if (obj instanceof java.math.BigDecimal) { + query().setConfigurationId_Equal((java.math.BigDecimal)obj); + } else { + try { + query().setConfigurationId_Equal(new java.math.BigDecimal((String)obj)); + } catch (RuntimeException e) { + String msg = "setConfigurationId(new java.math.BigDecimal((String)obj))"; + throw new RuntimeException(msg + " threw the exception: value=[" + obj + "]", e); + } + } + } + } + + } + + // =================================================================================== + // Order-By + // ======== + /** + * This method implements the method that is declared at super. + * + * @return this. (NotNull) + */ + public ConditionBean addOrderBy_PK_Asc() { + + query().addOrderBy_ConfigurationId_Asc(); + + return this; + + } + + /** + * This method implements the method that is declared at super. + * + * @return this. (NotNull) + */ + public ConditionBean addOrderBy_PK_Desc() { + + query().addOrderBy_ConfigurationId_Desc(); + + return this; + + } + + // =================================================================================== + // Query + // ===== + /** + * Query. + * + * @return Instance of query. (NotNull) + */ + public ConfigurationCQ query() { + return getConditionQuery(); + } + + /** + * Get condition query. {Internal method for s2dao} + * + * @return Instance of condition query. (NotNull) + */ + public ConfigurationCQ getConditionQuery() { + if (_conditionQuery == null) { + _conditionQuery = new ConfigurationCQ(null, getSqlClause(), getTableDbName(), 0); + } + return _conditionQuery; + } + + /** + * This method implements the method that is declared at super. + * + * @return Instance of query as interface. (NotNull) + */ + public ConditionQuery getConditionQueryAsInterface() { + return getConditionQuery(); + } + + // =================================================================================== + // Union + // ===== + /** + * Union. + *
+     * Add union query to condition bean.
+     * 
+ * @param unionQuery Union query. (NotNull) + */ + public void union(ConfigurationCQ unionQuery) { + query().xsetUnionQuery(unionQuery); + } + + /** + * Union all. + *
+     * Add union all query to condition bean.
+     * 
+ * @param unionAllQuery Union all query. (NotNull) + */ + public void unionAll(ConfigurationCQ unionAllQuery) { + query().xsetUnionAllQuery(unionAllQuery); + } + + public boolean hasUnionQueryOrUnionAllQuery() { + return query().hasUnionQueryOrUnionAllQuery(); + } + + // =================================================================================== + // Setup-Select + // ============ + + // =================================================================================== + // Basic Override + // ============== + /** + * This method overrides the method that is declared at super. + * + * @return Clause string. (NotNull) + */ + public String toString() { + return getSqlClause().getClause(); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/bs/BsConfigurationGroupCB.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/bs/BsConfigurationGroupCB.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/bs/BsConfigurationGroupCB.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,204 @@ +package jp.sf.pal.pompei.cbean.bs; + + +import jp.sf.pal.pompei.allcommon.cbean.AbstractConditionBean; +import jp.sf.pal.pompei.allcommon.cbean.ConditionBean; +import jp.sf.pal.pompei.allcommon.cbean.ConditionQuery; + +import jp.sf.pal.pompei.cbean.cq.*; +import jp.sf.pal.pompei.cbean.nss.*; + +/** + * The condition-bean of CONFIGURATION_GROUP. + * + * @author DBFlute(AutoGenerator) + */ +public class BsConfigurationGroupCB extends AbstractConditionBean { + + // =================================================================================== + // Annotation + // ========== + /** TABLE-Annotation */ + public static final String TABLE = "CONFIGURATION_GROUP"; + + // =================================================================================== + // Attribute + // ========= + /** Condition query. */ + protected ConfigurationGroupCQ _conditionQuery; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + public BsConfigurationGroupCB() { + } + + // /* * * * * * * * * * * * * * * * * * * * * * * + // MyTable = [CONFIGURATION_GROUP] + // * * * * * * * * */ + + // =================================================================================== + // Table Name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + final public String getTableDbName() { + return "CONFIGURATION_GROUP"; + } + + // =================================================================================== + // Accept Primary-Key + // ================== + /** + * This method implements the method that is declared at super. + * + * @param primaryKeyMap Primary key map. (NotNull and NotEmpty) + */ + public void acceptPrimaryKeyMap(java.util.Map primaryKeyMap) { + if (primaryKeyMap == null) { + String msg = "The argument[primaryKeyMap] must not be null."; + throw new IllegalArgumentException(msg); + } + if (primaryKeyMap.isEmpty()) { + String msg = "The argument[primaryKeyMap] must not be empty."; + throw new IllegalArgumentException(msg); + } + + if (!primaryKeyMap.containsKey("CONFIGURATION_GROUP_ID")) { + String msg = "The primaryKeyMap must have the value of CONFIGURATION_GROUP_ID"; + throw new IllegalStateException(msg + ": primaryKeyMap --> " + primaryKeyMap); + } + { + Object obj = primaryKeyMap.get("CONFIGURATION_GROUP_ID"); + if (obj instanceof java.math.BigDecimal) { + query().setConfigurationGroupId_Equal((java.math.BigDecimal)obj); + } else { + + if (obj instanceof java.math.BigDecimal) { + query().setConfigurationGroupId_Equal((java.math.BigDecimal)obj); + } else { + try { + query().setConfigurationGroupId_Equal(new java.math.BigDecimal((String)obj)); + } catch (RuntimeException e) { + String msg = "setConfigurationGroupId(new java.math.BigDecimal((String)obj))"; + throw new RuntimeException(msg + " threw the exception: value=[" + obj + "]", e); + } + } + } + } + + } + + // =================================================================================== + // Order-By + // ======== + /** + * This method implements the method that is declared at super. + * + * @return this. (NotNull) + */ + public ConditionBean addOrderBy_PK_Asc() { + + query().addOrderBy_ConfigurationGroupId_Asc(); + + return this; + + } + + /** + * This method implements the method that is declared at super. + * + * @return this. (NotNull) + */ + public ConditionBean addOrderBy_PK_Desc() { + + query().addOrderBy_ConfigurationGroupId_Desc(); + + return this; + + } + + // =================================================================================== + // Query + // ===== + /** + * Query. + * + * @return Instance of query. (NotNull) + */ + public ConfigurationGroupCQ query() { + return getConditionQuery(); + } + + /** + * Get condition query. {Internal method for s2dao} + * + * @return Instance of condition query. (NotNull) + */ + public ConfigurationGroupCQ getConditionQuery() { + if (_conditionQuery == null) { + _conditionQuery = new ConfigurationGroupCQ(null, getSqlClause(), getTableDbName(), 0); + } + return _conditionQuery; + } + + /** + * This method implements the method that is declared at super. + * + * @return Instance of query as interface. (NotNull) + */ + public ConditionQuery getConditionQueryAsInterface() { + return getConditionQuery(); + } + + // =================================================================================== + // Union + // ===== + /** + * Union. + *
+     * Add union query to condition bean.
+     * 
+ * @param unionQuery Union query. (NotNull) + */ + public void union(ConfigurationGroupCQ unionQuery) { + query().xsetUnionQuery(unionQuery); + } + + /** + * Union all. + *
+     * Add union all query to condition bean.
+     * 
+ * @param unionAllQuery Union all query. (NotNull) + */ + public void unionAll(ConfigurationGroupCQ unionAllQuery) { + query().xsetUnionAllQuery(unionAllQuery); + } + + public boolean hasUnionQueryOrUnionAllQuery() { + return query().hasUnionQueryOrUnionAllQuery(); + } + + // =================================================================================== + // Setup-Select + // ============ + + // =================================================================================== + // Basic Override + // ============== + /** + * This method overrides the method that is declared at super. + * + * @return Clause string. (NotNull) + */ + public String toString() { + return getSqlClause().getClause(); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/bs/BsCounterCB.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/bs/BsCounterCB.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/bs/BsCounterCB.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,188 @@ +package jp.sf.pal.pompei.cbean.bs; + + +import jp.sf.pal.pompei.allcommon.cbean.AbstractConditionBean; +import jp.sf.pal.pompei.allcommon.cbean.ConditionBean; +import jp.sf.pal.pompei.allcommon.cbean.ConditionQuery; + +import jp.sf.pal.pompei.cbean.cq.*; +import jp.sf.pal.pompei.cbean.nss.*; + +/** + * The condition-bean of COUNTER. + * + * @author DBFlute(AutoGenerator) + */ +public class BsCounterCB extends AbstractConditionBean { + + // =================================================================================== + // Annotation + // ========== + /** TABLE-Annotation */ + public static final String TABLE = "COUNTER"; + + // =================================================================================== + // Attribute + // ========= + /** Condition query. */ + protected CounterCQ _conditionQuery; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + public BsCounterCB() { + } + + // /* * * * * * * * * * * * * * * * * * * * * * * + // MyTable = [COUNTER] + // * * * * * * * * */ + + // =================================================================================== + // Table Name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + final public String getTableDbName() { + return "COUNTER"; + } + + // =================================================================================== + // Accept Primary-Key + // ================== + /** + * This method implements the method that is declared at super. + * + * @param primaryKeyMap Primary key map. (NotNull and NotEmpty) + */ + public void acceptPrimaryKeyMap(java.util.Map primaryKeyMap) { + if (primaryKeyMap == null) { + String msg = "The argument[primaryKeyMap] must not be null."; + throw new IllegalArgumentException(msg); + } + if (primaryKeyMap.isEmpty()) { + String msg = "The argument[primaryKeyMap] must not be empty."; + throw new IllegalArgumentException(msg); + } + + String msg = "This table has no primary-keys: " + getTableDbName(); + throw new IllegalStateException(msg); + + } + + // =================================================================================== + // Order-By + // ======== + /** + * This method implements the method that is declared at super. + * + * @return this. (NotNull) + */ + public ConditionBean addOrderBy_PK_Asc() { + + query().addOrderBy_Startdate_Asc(); + + query().addOrderBy_Counter_Asc(); + + return this; + + } + + /** + * This method implements the method that is declared at super. + * + * @return this. (NotNull) + */ + public ConditionBean addOrderBy_PK_Desc() { + + query().addOrderBy_Startdate_Desc(); + + query().addOrderBy_Counter_Desc(); + + return this; + + } + + // =================================================================================== + // Query + // ===== + /** + * Query. + * + * @return Instance of query. (NotNull) + */ + public CounterCQ query() { + return getConditionQuery(); + } + + /** + * Get condition query. {Internal method for s2dao} + * + * @return Instance of condition query. (NotNull) + */ + public CounterCQ getConditionQuery() { + if (_conditionQuery == null) { + _conditionQuery = new CounterCQ(null, getSqlClause(), getTableDbName(), 0); + } + return _conditionQuery; + } + + /** + * This method implements the method that is declared at super. + * + * @return Instance of query as interface. (NotNull) + */ + public ConditionQuery getConditionQueryAsInterface() { + return getConditionQuery(); + } + + // =================================================================================== + // Union + // ===== + /** + * Union. + *
+     * Add union query to condition bean.
+     * 
+ * @param unionQuery Union query. (NotNull) + */ + public void union(CounterCQ unionQuery) { + query().xsetUnionQuery(unionQuery); + } + + /** + * Union all. + *
+     * Add union all query to condition bean.
+     * 
+ * @param unionAllQuery Union all query. (NotNull) + */ + public void unionAll(CounterCQ unionAllQuery) { + query().xsetUnionAllQuery(unionAllQuery); + } + + public boolean hasUnionQueryOrUnionAllQuery() { + return query().hasUnionQueryOrUnionAllQuery(); + } + + // =================================================================================== + // Setup-Select + // ============ + + // =================================================================================== + // Basic Override + // ============== + /** + * This method overrides the method that is declared at super. + * + * @return Clause string. (NotNull) + */ + public String toString() { + return getSqlClause().getClause(); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/bs/BsCounterHistoryCB.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/bs/BsCounterHistoryCB.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/bs/BsCounterHistoryCB.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,188 @@ +package jp.sf.pal.pompei.cbean.bs; + + +import jp.sf.pal.pompei.allcommon.cbean.AbstractConditionBean; +import jp.sf.pal.pompei.allcommon.cbean.ConditionBean; +import jp.sf.pal.pompei.allcommon.cbean.ConditionQuery; + +import jp.sf.pal.pompei.cbean.cq.*; +import jp.sf.pal.pompei.cbean.nss.*; + +/** + * The condition-bean of COUNTER_HISTORY. + * + * @author DBFlute(AutoGenerator) + */ +public class BsCounterHistoryCB extends AbstractConditionBean { + + // =================================================================================== + // Annotation + // ========== + /** TABLE-Annotation */ + public static final String TABLE = "COUNTER_HISTORY"; + + // =================================================================================== + // Attribute + // ========= + /** Condition query. */ + protected CounterHistoryCQ _conditionQuery; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + public BsCounterHistoryCB() { + } + + // /* * * * * * * * * * * * * * * * * * * * * * * + // MyTable = [COUNTER_HISTORY] + // * * * * * * * * */ + + // =================================================================================== + // Table Name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + final public String getTableDbName() { + return "COUNTER_HISTORY"; + } + + // =================================================================================== + // Accept Primary-Key + // ================== + /** + * This method implements the method that is declared at super. + * + * @param primaryKeyMap Primary key map. (NotNull and NotEmpty) + */ + public void acceptPrimaryKeyMap(java.util.Map primaryKeyMap) { + if (primaryKeyMap == null) { + String msg = "The argument[primaryKeyMap] must not be null."; + throw new IllegalArgumentException(msg); + } + if (primaryKeyMap.isEmpty()) { + String msg = "The argument[primaryKeyMap] must not be empty."; + throw new IllegalArgumentException(msg); + } + + String msg = "This table has no primary-keys: " + getTableDbName(); + throw new IllegalStateException(msg); + + } + + // =================================================================================== + // Order-By + // ======== + /** + * This method implements the method that is declared at super. + * + * @return this. (NotNull) + */ + public ConditionBean addOrderBy_PK_Asc() { + + query().addOrderBy_Month_Asc(); + + query().addOrderBy_Counter_Asc(); + + return this; + + } + + /** + * This method implements the method that is declared at super. + * + * @return this. (NotNull) + */ + public ConditionBean addOrderBy_PK_Desc() { + + query().addOrderBy_Month_Desc(); + + query().addOrderBy_Counter_Desc(); + + return this; + + } + + // =================================================================================== + // Query + // ===== + /** + * Query. + * + * @return Instance of query. (NotNull) + */ + public CounterHistoryCQ query() { + return getConditionQuery(); + } + + /** + * Get condition query. {Internal method for s2dao} + * + * @return Instance of condition query. (NotNull) + */ + public CounterHistoryCQ getConditionQuery() { + if (_conditionQuery == null) { + _conditionQuery = new CounterHistoryCQ(null, getSqlClause(), getTableDbName(), 0); + } + return _conditionQuery; + } + + /** + * This method implements the method that is declared at super. + * + * @return Instance of query as interface. (NotNull) + */ + public ConditionQuery getConditionQueryAsInterface() { + return getConditionQuery(); + } + + // =================================================================================== + // Union + // ===== + /** + * Union. + *
+     * Add union query to condition bean.
+     * 
+ * @param unionQuery Union query. (NotNull) + */ + public void union(CounterHistoryCQ unionQuery) { + query().xsetUnionQuery(unionQuery); + } + + /** + * Union all. + *
+     * Add union all query to condition bean.
+     * 
+ * @param unionAllQuery Union all query. (NotNull) + */ + public void unionAll(CounterHistoryCQ unionAllQuery) { + query().xsetUnionAllQuery(unionAllQuery); + } + + public boolean hasUnionQueryOrUnionAllQuery() { + return query().hasUnionQueryOrUnionAllQuery(); + } + + // =================================================================================== + // Setup-Select + // ============ + + // =================================================================================== + // Basic Override + // ============== + /** + * This method overrides the method that is declared at super. + * + * @return Clause string. (NotNull) + */ + public String toString() { + return getSqlClause().getClause(); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/bs/BsCountriesCB.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/bs/BsCountriesCB.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/bs/BsCountriesCB.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,204 @@ +package jp.sf.pal.pompei.cbean.bs; + + +import jp.sf.pal.pompei.allcommon.cbean.AbstractConditionBean; +import jp.sf.pal.pompei.allcommon.cbean.ConditionBean; +import jp.sf.pal.pompei.allcommon.cbean.ConditionQuery; + +import jp.sf.pal.pompei.cbean.cq.*; +import jp.sf.pal.pompei.cbean.nss.*; + +/** + * The condition-bean of COUNTRIES. + * + * @author DBFlute(AutoGenerator) + */ +public class BsCountriesCB extends AbstractConditionBean { + + // =================================================================================== + // Annotation + // ========== + /** TABLE-Annotation */ + public static final String TABLE = "COUNTRIES"; + + // =================================================================================== + // Attribute + // ========= + /** Condition query. */ + protected CountriesCQ _conditionQuery; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + public BsCountriesCB() { + } + + // /* * * * * * * * * * * * * * * * * * * * * * * + // MyTable = [COUNTRIES] + // * * * * * * * * */ + + // =================================================================================== + // Table Name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + final public String getTableDbName() { + return "COUNTRIES"; + } + + // =================================================================================== + // Accept Primary-Key + // ================== + /** + * This method implements the method that is declared at super. + * + * @param primaryKeyMap Primary key map. (NotNull and NotEmpty) + */ + public void acceptPrimaryKeyMap(java.util.Map primaryKeyMap) { + if (primaryKeyMap == null) { + String msg = "The argument[primaryKeyMap] must not be null."; + throw new IllegalArgumentException(msg); + } + if (primaryKeyMap.isEmpty()) { + String msg = "The argument[primaryKeyMap] must not be empty."; + throw new IllegalArgumentException(msg); + } + + if (!primaryKeyMap.containsKey("COUNTRIES_ID")) { + String msg = "The primaryKeyMap must have the value of COUNTRIES_ID"; + throw new IllegalStateException(msg + ": primaryKeyMap --> " + primaryKeyMap); + } + { + Object obj = primaryKeyMap.get("COUNTRIES_ID"); + if (obj instanceof java.math.BigDecimal) { + query().setCountriesId_Equal((java.math.BigDecimal)obj); + } else { + + if (obj instanceof java.math.BigDecimal) { + query().setCountriesId_Equal((java.math.BigDecimal)obj); + } else { + try { + query().setCountriesId_Equal(new java.math.BigDecimal((String)obj)); + } catch (RuntimeException e) { + String msg = "setCountriesId(new java.math.BigDecimal((String)obj))"; + throw new RuntimeException(msg + " threw the exception: value=[" + obj + "]", e); + } + } + } + } + + } + + // =================================================================================== + // Order-By + // ======== + /** + * This method implements the method that is declared at super. + * + * @return this. (NotNull) + */ + public ConditionBean addOrderBy_PK_Asc() { + + query().addOrderBy_CountriesId_Asc(); + + return this; + + } + + /** + * This method implements the method that is declared at super. + * + * @return this. (NotNull) + */ + public ConditionBean addOrderBy_PK_Desc() { + + query().addOrderBy_CountriesId_Desc(); + + return this; + + } + + // =================================================================================== + // Query + // ===== + /** + * Query. + * + * @return Instance of query. (NotNull) + */ + public CountriesCQ query() { + return getConditionQuery(); + } + + /** + * Get condition query. {Internal method for s2dao} + * + * @return Instance of condition query. (NotNull) + */ + public CountriesCQ getConditionQuery() { + if (_conditionQuery == null) { + _conditionQuery = new CountriesCQ(null, getSqlClause(), getTableDbName(), 0); + } + return _conditionQuery; + } + + /** + * This method implements the method that is declared at super. + * + * @return Instance of query as interface. (NotNull) + */ + public ConditionQuery getConditionQueryAsInterface() { + return getConditionQuery(); + } + + // =================================================================================== + // Union + // ===== + /** + * Union. + *
+     * Add union query to condition bean.
+     * 
+ * @param unionQuery Union query. (NotNull) + */ + public void union(CountriesCQ unionQuery) { + query().xsetUnionQuery(unionQuery); + } + + /** + * Union all. + *
+     * Add union all query to condition bean.
+     * 
+ * @param unionAllQuery Union all query. (NotNull) + */ + public void unionAll(CountriesCQ unionAllQuery) { + query().xsetUnionAllQuery(unionAllQuery); + } + + public boolean hasUnionQueryOrUnionAllQuery() { + return query().hasUnionQueryOrUnionAllQuery(); + } + + // =================================================================================== + // Setup-Select + // ============ + + // =================================================================================== + // Basic Override + // ============== + /** + * This method overrides the method that is declared at super. + * + * @return Clause string. (NotNull) + */ + public String toString() { + return getSqlClause().getClause(); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/bs/BsCurrenciesCB.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/bs/BsCurrenciesCB.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/bs/BsCurrenciesCB.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,204 @@ +package jp.sf.pal.pompei.cbean.bs; + + +import jp.sf.pal.pompei.allcommon.cbean.AbstractConditionBean; +import jp.sf.pal.pompei.allcommon.cbean.ConditionBean; +import jp.sf.pal.pompei.allcommon.cbean.ConditionQuery; + +import jp.sf.pal.pompei.cbean.cq.*; +import jp.sf.pal.pompei.cbean.nss.*; + +/** + * The condition-bean of CURRENCIES. + * + * @author DBFlute(AutoGenerator) + */ +public class BsCurrenciesCB extends AbstractConditionBean { + + // =================================================================================== + // Annotation + // ========== + /** TABLE-Annotation */ + public static final String TABLE = "CURRENCIES"; + + // =================================================================================== + // Attribute + // ========= + /** Condition query. */ + protected CurrenciesCQ _conditionQuery; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + public BsCurrenciesCB() { + } + + // /* * * * * * * * * * * * * * * * * * * * * * * + // MyTable = [CURRENCIES] + // * * * * * * * * */ + + // =================================================================================== + // Table Name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + final public String getTableDbName() { + return "CURRENCIES"; + } + + // =================================================================================== + // Accept Primary-Key + // ================== + /** + * This method implements the method that is declared at super. + * + * @param primaryKeyMap Primary key map. (NotNull and NotEmpty) + */ + public void acceptPrimaryKeyMap(java.util.Map primaryKeyMap) { + if (primaryKeyMap == null) { + String msg = "The argument[primaryKeyMap] must not be null."; + throw new IllegalArgumentException(msg); + } + if (primaryKeyMap.isEmpty()) { + String msg = "The argument[primaryKeyMap] must not be empty."; + throw new IllegalArgumentException(msg); + } + + if (!primaryKeyMap.containsKey("CURRENCIES_ID")) { + String msg = "The primaryKeyMap must have the value of CURRENCIES_ID"; + throw new IllegalStateException(msg + ": primaryKeyMap --> " + primaryKeyMap); + } + { + Object obj = primaryKeyMap.get("CURRENCIES_ID"); + if (obj instanceof java.math.BigDecimal) { + query().setCurrenciesId_Equal((java.math.BigDecimal)obj); + } else { + + if (obj instanceof java.math.BigDecimal) { + query().setCurrenciesId_Equal((java.math.BigDecimal)obj); + } else { + try { + query().setCurrenciesId_Equal(new java.math.BigDecimal((String)obj)); + } catch (RuntimeException e) { + String msg = "setCurrenciesId(new java.math.BigDecimal((String)obj))"; + throw new RuntimeException(msg + " threw the exception: value=[" + obj + "]", e); + } + } + } + } + + } + + // =================================================================================== + // Order-By + // ======== + /** + * This method implements the method that is declared at super. + * + * @return this. (NotNull) + */ + public ConditionBean addOrderBy_PK_Asc() { + + query().addOrderBy_CurrenciesId_Asc(); + + return this; + + } + + /** + * This method implements the method that is declared at super. + * + * @return this. (NotNull) + */ + public ConditionBean addOrderBy_PK_Desc() { + + query().addOrderBy_CurrenciesId_Desc(); + + return this; + + } + + // =================================================================================== + // Query + // ===== + /** + * Query. + * + * @return Instance of query. (NotNull) + */ + public CurrenciesCQ query() { + return getConditionQuery(); + } + + /** + * Get condition query. {Internal method for s2dao} + * + * @return Instance of condition query. (NotNull) + */ + public CurrenciesCQ getConditionQuery() { + if (_conditionQuery == null) { + _conditionQuery = new CurrenciesCQ(null, getSqlClause(), getTableDbName(), 0); + } + return _conditionQuery; + } + + /** + * This method implements the method that is declared at super. + * + * @return Instance of query as interface. (NotNull) + */ + public ConditionQuery getConditionQueryAsInterface() { + return getConditionQuery(); + } + + // =================================================================================== + // Union + // ===== + /** + * Union. + *
+     * Add union query to condition bean.
+     * 
+ * @param unionQuery Union query. (NotNull) + */ + public void union(CurrenciesCQ unionQuery) { + query().xsetUnionQuery(unionQuery); + } + + /** + * Union all. + *
+     * Add union all query to condition bean.
+     * 
+ * @param unionAllQuery Union all query. (NotNull) + */ + public void unionAll(CurrenciesCQ unionAllQuery) { + query().xsetUnionAllQuery(unionAllQuery); + } + + public boolean hasUnionQueryOrUnionAllQuery() { + return query().hasUnionQueryOrUnionAllQuery(); + } + + // =================================================================================== + // Setup-Select + // ============ + + // =================================================================================== + // Basic Override + // ============== + /** + * This method overrides the method that is declared at super. + * + * @return Clause string. (NotNull) + */ + public String toString() { + return getSqlClause().getClause(); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/bs/BsCustomersBasketAttributesCB.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/bs/BsCustomersBasketAttributesCB.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/bs/BsCustomersBasketAttributesCB.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,204 @@ +package jp.sf.pal.pompei.cbean.bs; + + +import jp.sf.pal.pompei.allcommon.cbean.AbstractConditionBean; +import jp.sf.pal.pompei.allcommon.cbean.ConditionBean; +import jp.sf.pal.pompei.allcommon.cbean.ConditionQuery; + +import jp.sf.pal.pompei.cbean.cq.*; +import jp.sf.pal.pompei.cbean.nss.*; + +/** + * The condition-bean of CUSTOMERS_BASKET_ATTRIBUTES. + * + * @author DBFlute(AutoGenerator) + */ +public class BsCustomersBasketAttributesCB extends AbstractConditionBean { + + // =================================================================================== + // Annotation + // ========== + /** TABLE-Annotation */ + public static final String TABLE = "CUSTOMERS_BASKET_ATTRIBUTES"; + + // =================================================================================== + // Attribute + // ========= + /** Condition query. */ + protected CustomersBasketAttributesCQ _conditionQuery; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + public BsCustomersBasketAttributesCB() { + } + + // /* * * * * * * * * * * * * * * * * * * * * * * + // MyTable = [CUSTOMERS_BASKET_ATTRIBUTES] + // * * * * * * * * */ + + // =================================================================================== + // Table Name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + final public String getTableDbName() { + return "CUSTOMERS_BASKET_ATTRIBUTES"; + } + + // =================================================================================== + // Accept Primary-Key + // ================== + /** + * This method implements the method that is declared at super. + * + * @param primaryKeyMap Primary key map. (NotNull and NotEmpty) + */ + public void acceptPrimaryKeyMap(java.util.Map primaryKeyMap) { + if (primaryKeyMap == null) { + String msg = "The argument[primaryKeyMap] must not be null."; + throw new IllegalArgumentException(msg); + } + if (primaryKeyMap.isEmpty()) { + String msg = "The argument[primaryKeyMap] must not be empty."; + throw new IllegalArgumentException(msg); + } + + if (!primaryKeyMap.containsKey("CUSTOMERS_BASKET_ATTRIBUTES_ID")) { + String msg = "The primaryKeyMap must have the value of CUSTOMERS_BASKET_ATTRIBUTES_ID"; + throw new IllegalStateException(msg + ": primaryKeyMap --> " + primaryKeyMap); + } + { + Object obj = primaryKeyMap.get("CUSTOMERS_BASKET_ATTRIBUTES_ID"); + if (obj instanceof java.math.BigDecimal) { + query().setCustomersBasketAttributesId_Equal((java.math.BigDecimal)obj); + } else { + + if (obj instanceof java.math.BigDecimal) { + query().setCustomersBasketAttributesId_Equal((java.math.BigDecimal)obj); + } else { + try { + query().setCustomersBasketAttributesId_Equal(new java.math.BigDecimal((String)obj)); + } catch (RuntimeException e) { + String msg = "setCustomersBasketAttributesId(new java.math.BigDecimal((String)obj))"; + throw new RuntimeException(msg + " threw the exception: value=[" + obj + "]", e); + } + } + } + } + + } + + // =================================================================================== + // Order-By + // ======== + /** + * This method implements the method that is declared at super. + * + * @return this. (NotNull) + */ + public ConditionBean addOrderBy_PK_Asc() { + + query().addOrderBy_CustomersBasketAttributesId_Asc(); + + return this; + + } + + /** + * This method implements the method that is declared at super. + * + * @return this. (NotNull) + */ + public ConditionBean addOrderBy_PK_Desc() { + + query().addOrderBy_CustomersBasketAttributesId_Desc(); + + return this; + + } + + // =================================================================================== + // Query + // ===== + /** + * Query. + * + * @return Instance of query. (NotNull) + */ + public CustomersBasketAttributesCQ query() { + return getConditionQuery(); + } + + /** + * Get condition query. {Internal method for s2dao} + * + * @return Instance of condition query. (NotNull) + */ + public CustomersBasketAttributesCQ getConditionQuery() { + if (_conditionQuery == null) { + _conditionQuery = new CustomersBasketAttributesCQ(null, getSqlClause(), getTableDbName(), 0); + } + return _conditionQuery; + } + + /** + * This method implements the method that is declared at super. + * + * @return Instance of query as interface. (NotNull) + */ + public ConditionQuery getConditionQueryAsInterface() { + return getConditionQuery(); + } + + // =================================================================================== + // Union + // ===== + /** + * Union. + *
+     * Add union query to condition bean.
+     * 
+ * @param unionQuery Union query. (NotNull) + */ + public void union(CustomersBasketAttributesCQ unionQuery) { + query().xsetUnionQuery(unionQuery); + } + + /** + * Union all. + *
+     * Add union all query to condition bean.
+     * 
+ * @param unionAllQuery Union all query. (NotNull) + */ + public void unionAll(CustomersBasketAttributesCQ unionAllQuery) { + query().xsetUnionAllQuery(unionAllQuery); + } + + public boolean hasUnionQueryOrUnionAllQuery() { + return query().hasUnionQueryOrUnionAllQuery(); + } + + // =================================================================================== + // Setup-Select + // ============ + + // =================================================================================== + // Basic Override + // ============== + /** + * This method overrides the method that is declared at super. + * + * @return Clause string. (NotNull) + */ + public String toString() { + return getSqlClause().getClause(); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/bs/BsCustomersBasketCB.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/bs/BsCustomersBasketCB.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/bs/BsCustomersBasketCB.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,204 @@ +package jp.sf.pal.pompei.cbean.bs; + + +import jp.sf.pal.pompei.allcommon.cbean.AbstractConditionBean; +import jp.sf.pal.pompei.allcommon.cbean.ConditionBean; +import jp.sf.pal.pompei.allcommon.cbean.ConditionQuery; + +import jp.sf.pal.pompei.cbean.cq.*; +import jp.sf.pal.pompei.cbean.nss.*; + +/** + * The condition-bean of CUSTOMERS_BASKET. + * + * @author DBFlute(AutoGenerator) + */ +public class BsCustomersBasketCB extends AbstractConditionBean { + + // =================================================================================== + // Annotation + // ========== + /** TABLE-Annotation */ + public static final String TABLE = "CUSTOMERS_BASKET"; + + // =================================================================================== + // Attribute + // ========= + /** Condition query. */ + protected CustomersBasketCQ _conditionQuery; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + public BsCustomersBasketCB() { + } + + // /* * * * * * * * * * * * * * * * * * * * * * * + // MyTable = [CUSTOMERS_BASKET] + // * * * * * * * * */ + + // =================================================================================== + // Table Name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + final public String getTableDbName() { + return "CUSTOMERS_BASKET"; + } + + // =================================================================================== + // Accept Primary-Key + // ================== + /** + * This method implements the method that is declared at super. + * + * @param primaryKeyMap Primary key map. (NotNull and NotEmpty) + */ + public void acceptPrimaryKeyMap(java.util.Map primaryKeyMap) { + if (primaryKeyMap == null) { + String msg = "The argument[primaryKeyMap] must not be null."; + throw new IllegalArgumentException(msg); + } + if (primaryKeyMap.isEmpty()) { + String msg = "The argument[primaryKeyMap] must not be empty."; + throw new IllegalArgumentException(msg); + } + + if (!primaryKeyMap.containsKey("CUSTOMERS_BASKET_ID")) { + String msg = "The primaryKeyMap must have the value of CUSTOMERS_BASKET_ID"; + throw new IllegalStateException(msg + ": primaryKeyMap --> " + primaryKeyMap); + } + { + Object obj = primaryKeyMap.get("CUSTOMERS_BASKET_ID"); + if (obj instanceof java.math.BigDecimal) { + query().setCustomersBasketId_Equal((java.math.BigDecimal)obj); + } else { + + if (obj instanceof java.math.BigDecimal) { + query().setCustomersBasketId_Equal((java.math.BigDecimal)obj); + } else { + try { + query().setCustomersBasketId_Equal(new java.math.BigDecimal((String)obj)); + } catch (RuntimeException e) { + String msg = "setCustomersBasketId(new java.math.BigDecimal((String)obj))"; + throw new RuntimeException(msg + " threw the exception: value=[" + obj + "]", e); + } + } + } + } + + } + + // =================================================================================== + // Order-By + // ======== + /** + * This method implements the method that is declared at super. + * + * @return this. (NotNull) + */ + public ConditionBean addOrderBy_PK_Asc() { + + query().addOrderBy_CustomersBasketId_Asc(); + + return this; + + } + + /** + * This method implements the method that is declared at super. + * + * @return this. (NotNull) + */ + public ConditionBean addOrderBy_PK_Desc() { + + query().addOrderBy_CustomersBasketId_Desc(); + + return this; + + } + + // =================================================================================== + // Query + // ===== + /** + * Query. + * + * @return Instance of query. (NotNull) + */ + public CustomersBasketCQ query() { + return getConditionQuery(); + } + + /** + * Get condition query. {Internal method for s2dao} + * + * @return Instance of condition query. (NotNull) + */ + public CustomersBasketCQ getConditionQuery() { + if (_conditionQuery == null) { + _conditionQuery = new CustomersBasketCQ(null, getSqlClause(), getTableDbName(), 0); + } + return _conditionQuery; + } + + /** + * This method implements the method that is declared at super. + * + * @return Instance of query as interface. (NotNull) + */ + public ConditionQuery getConditionQueryAsInterface() { + return getConditionQuery(); + } + + // =================================================================================== + // Union + // ===== + /** + * Union. + *
+     * Add union query to condition bean.
+     * 
+ * @param unionQuery Union query. (NotNull) + */ + public void union(CustomersBasketCQ unionQuery) { + query().xsetUnionQuery(unionQuery); + } + + /** + * Union all. + *
+     * Add union all query to condition bean.
+     * 
+ * @param unionAllQuery Union all query. (NotNull) + */ + public void unionAll(CustomersBasketCQ unionAllQuery) { + query().xsetUnionAllQuery(unionAllQuery); + } + + public boolean hasUnionQueryOrUnionAllQuery() { + return query().hasUnionQueryOrUnionAllQuery(); + } + + // =================================================================================== + // Setup-Select + // ============ + + // =================================================================================== + // Basic Override + // ============== + /** + * This method overrides the method that is declared at super. + * + * @return Clause string. (NotNull) + */ + public String toString() { + return getSqlClause().getClause(); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/bs/BsCustomersCB.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/bs/BsCustomersCB.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/bs/BsCustomersCB.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,204 @@ +package jp.sf.pal.pompei.cbean.bs; + + +import jp.sf.pal.pompei.allcommon.cbean.AbstractConditionBean; +import jp.sf.pal.pompei.allcommon.cbean.ConditionBean; +import jp.sf.pal.pompei.allcommon.cbean.ConditionQuery; + +import jp.sf.pal.pompei.cbean.cq.*; +import jp.sf.pal.pompei.cbean.nss.*; + +/** + * The condition-bean of CUSTOMERS. + * + * @author DBFlute(AutoGenerator) + */ +public class BsCustomersCB extends AbstractConditionBean { + + // =================================================================================== + // Annotation + // ========== + /** TABLE-Annotation */ + public static final String TABLE = "CUSTOMERS"; + + // =================================================================================== + // Attribute + // ========= + /** Condition query. */ + protected CustomersCQ _conditionQuery; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + public BsCustomersCB() { + } + + // /* * * * * * * * * * * * * * * * * * * * * * * + // MyTable = [CUSTOMERS] + // * * * * * * * * */ + + // =================================================================================== + // Table Name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + final public String getTableDbName() { + return "CUSTOMERS"; + } + + // =================================================================================== + // Accept Primary-Key + // ================== + /** + * This method implements the method that is declared at super. + * + * @param primaryKeyMap Primary key map. (NotNull and NotEmpty) + */ + public void acceptPrimaryKeyMap(java.util.Map primaryKeyMap) { + if (primaryKeyMap == null) { + String msg = "The argument[primaryKeyMap] must not be null."; + throw new IllegalArgumentException(msg); + } + if (primaryKeyMap.isEmpty()) { + String msg = "The argument[primaryKeyMap] must not be empty."; + throw new IllegalArgumentException(msg); + } + + if (!primaryKeyMap.containsKey("CUSTOMERS_ID")) { + String msg = "The primaryKeyMap must have the value of CUSTOMERS_ID"; + throw new IllegalStateException(msg + ": primaryKeyMap --> " + primaryKeyMap); + } + { + Object obj = primaryKeyMap.get("CUSTOMERS_ID"); + if (obj instanceof java.math.BigDecimal) { + query().setCustomersId_Equal((java.math.BigDecimal)obj); + } else { + + if (obj instanceof java.math.BigDecimal) { + query().setCustomersId_Equal((java.math.BigDecimal)obj); + } else { + try { + query().setCustomersId_Equal(new java.math.BigDecimal((String)obj)); + } catch (RuntimeException e) { + String msg = "setCustomersId(new java.math.BigDecimal((String)obj))"; + throw new RuntimeException(msg + " threw the exception: value=[" + obj + "]", e); + } + } + } + } + + } + + // =================================================================================== + // Order-By + // ======== + /** + * This method implements the method that is declared at super. + * + * @return this. (NotNull) + */ + public ConditionBean addOrderBy_PK_Asc() { + + query().addOrderBy_CustomersId_Asc(); + + return this; + + } + + /** + * This method implements the method that is declared at super. + * + * @return this. (NotNull) + */ + public ConditionBean addOrderBy_PK_Desc() { + + query().addOrderBy_CustomersId_Desc(); + + return this; + + } + + // =================================================================================== + // Query + // ===== + /** + * Query. + * + * @return Instance of query. (NotNull) + */ + public CustomersCQ query() { + return getConditionQuery(); + } + + /** + * Get condition query. {Internal method for s2dao} + * + * @return Instance of condition query. (NotNull) + */ + public CustomersCQ getConditionQuery() { + if (_conditionQuery == null) { + _conditionQuery = new CustomersCQ(null, getSqlClause(), getTableDbName(), 0); + } + return _conditionQuery; + } + + /** + * This method implements the method that is declared at super. + * + * @return Instance of query as interface. (NotNull) + */ + public ConditionQuery getConditionQueryAsInterface() { + return getConditionQuery(); + } + + // =================================================================================== + // Union + // ===== + /** + * Union. + *
+     * Add union query to condition bean.
+     * 
+ * @param unionQuery Union query. (NotNull) + */ + public void union(CustomersCQ unionQuery) { + query().xsetUnionQuery(unionQuery); + } + + /** + * Union all. + *
+     * Add union all query to condition bean.
+     * 
+ * @param unionAllQuery Union all query. (NotNull) + */ + public void unionAll(CustomersCQ unionAllQuery) { + query().xsetUnionAllQuery(unionAllQuery); + } + + public boolean hasUnionQueryOrUnionAllQuery() { + return query().hasUnionQueryOrUnionAllQuery(); + } + + // =================================================================================== + // Setup-Select + // ============ + + // =================================================================================== + // Basic Override + // ============== + /** + * This method overrides the method that is declared at super. + * + * @return Clause string. (NotNull) + */ + public String toString() { + return getSqlClause().getClause(); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/bs/BsCustomersInfoCB.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/bs/BsCustomersInfoCB.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/bs/BsCustomersInfoCB.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,204 @@ +package jp.sf.pal.pompei.cbean.bs; + + +import jp.sf.pal.pompei.allcommon.cbean.AbstractConditionBean; +import jp.sf.pal.pompei.allcommon.cbean.ConditionBean; +import jp.sf.pal.pompei.allcommon.cbean.ConditionQuery; + +import jp.sf.pal.pompei.cbean.cq.*; +import jp.sf.pal.pompei.cbean.nss.*; + +/** + * The condition-bean of CUSTOMERS_INFO. + * + * @author DBFlute(AutoGenerator) + */ +public class BsCustomersInfoCB extends AbstractConditionBean { + + // =================================================================================== + // Annotation + // ========== + /** TABLE-Annotation */ + public static final String TABLE = "CUSTOMERS_INFO"; + + // =================================================================================== + // Attribute + // ========= + /** Condition query. */ + protected CustomersInfoCQ _conditionQuery; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + public BsCustomersInfoCB() { + } + + // /* * * * * * * * * * * * * * * * * * * * * * * + // MyTable = [CUSTOMERS_INFO] + // * * * * * * * * */ + + // =================================================================================== + // Table Name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + final public String getTableDbName() { + return "CUSTOMERS_INFO"; + } + + // =================================================================================== + // Accept Primary-Key + // ================== + /** + * This method implements the method that is declared at super. + * + * @param primaryKeyMap Primary key map. (NotNull and NotEmpty) + */ + public void acceptPrimaryKeyMap(java.util.Map primaryKeyMap) { + if (primaryKeyMap == null) { + String msg = "The argument[primaryKeyMap] must not be null."; + throw new IllegalArgumentException(msg); + } + if (primaryKeyMap.isEmpty()) { + String msg = "The argument[primaryKeyMap] must not be empty."; + throw new IllegalArgumentException(msg); + } + + if (!primaryKeyMap.containsKey("CUSTOMERS_INFO_ID")) { + String msg = "The primaryKeyMap must have the value of CUSTOMERS_INFO_ID"; + throw new IllegalStateException(msg + ": primaryKeyMap --> " + primaryKeyMap); + } + { + Object obj = primaryKeyMap.get("CUSTOMERS_INFO_ID"); + if (obj instanceof java.math.BigDecimal) { + query().setCustomersInfoId_Equal((java.math.BigDecimal)obj); + } else { + + if (obj instanceof java.math.BigDecimal) { + query().setCustomersInfoId_Equal((java.math.BigDecimal)obj); + } else { + try { + query().setCustomersInfoId_Equal(new java.math.BigDecimal((String)obj)); + } catch (RuntimeException e) { + String msg = "setCustomersInfoId(new java.math.BigDecimal((String)obj))"; + throw new RuntimeException(msg + " threw the exception: value=[" + obj + "]", e); + } + } + } + } + + } + + // =================================================================================== + // Order-By + // ======== + /** + * This method implements the method that is declared at super. + * + * @return this. (NotNull) + */ + public ConditionBean addOrderBy_PK_Asc() { + + query().addOrderBy_CustomersInfoId_Asc(); + + return this; + + } + + /** + * This method implements the method that is declared at super. + * + * @return this. (NotNull) + */ + public ConditionBean addOrderBy_PK_Desc() { + + query().addOrderBy_CustomersInfoId_Desc(); + + return this; + + } + + // =================================================================================== + // Query + // ===== + /** + * Query. + * + * @return Instance of query. (NotNull) + */ + public CustomersInfoCQ query() { + return getConditionQuery(); + } + + /** + * Get condition query. {Internal method for s2dao} + * + * @return Instance of condition query. (NotNull) + */ + public CustomersInfoCQ getConditionQuery() { + if (_conditionQuery == null) { + _conditionQuery = new CustomersInfoCQ(null, getSqlClause(), getTableDbName(), 0); + } + return _conditionQuery; + } + + /** + * This method implements the method that is declared at super. + * + * @return Instance of query as interface. (NotNull) + */ + public ConditionQuery getConditionQueryAsInterface() { + return getConditionQuery(); + } + + // =================================================================================== + // Union + // ===== + /** + * Union. + *
+     * Add union query to condition bean.
+     * 
+ * @param unionQuery Union query. (NotNull) + */ + public void union(CustomersInfoCQ unionQuery) { + query().xsetUnionQuery(unionQuery); + } + + /** + * Union all. + *
+     * Add union all query to condition bean.
+     * 
+ * @param unionAllQuery Union all query. (NotNull) + */ + public void unionAll(CustomersInfoCQ unionAllQuery) { + query().xsetUnionAllQuery(unionAllQuery); + } + + public boolean hasUnionQueryOrUnionAllQuery() { + return query().hasUnionQueryOrUnionAllQuery(); + } + + // =================================================================================== + // Setup-Select + // ============ + + // =================================================================================== + // Basic Override + // ============== + /** + * This method overrides the method that is declared at super. + * + * @return Clause string. (NotNull) + */ + public String toString() { + return getSqlClause().getClause(); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/bs/BsGeoZonesCB.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/bs/BsGeoZonesCB.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/bs/BsGeoZonesCB.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,204 @@ +package jp.sf.pal.pompei.cbean.bs; + + +import jp.sf.pal.pompei.allcommon.cbean.AbstractConditionBean; +import jp.sf.pal.pompei.allcommon.cbean.ConditionBean; +import jp.sf.pal.pompei.allcommon.cbean.ConditionQuery; + +import jp.sf.pal.pompei.cbean.cq.*; +import jp.sf.pal.pompei.cbean.nss.*; + +/** + * The condition-bean of GEO_ZONES. + * + * @author DBFlute(AutoGenerator) + */ +public class BsGeoZonesCB extends AbstractConditionBean { + + // =================================================================================== + // Annotation + // ========== + /** TABLE-Annotation */ + public static final String TABLE = "GEO_ZONES"; + + // =================================================================================== + // Attribute + // ========= + /** Condition query. */ + protected GeoZonesCQ _conditionQuery; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + public BsGeoZonesCB() { + } + + // /* * * * * * * * * * * * * * * * * * * * * * * + // MyTable = [GEO_ZONES] + // * * * * * * * * */ + + // =================================================================================== + // Table Name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + final public String getTableDbName() { + return "GEO_ZONES"; + } + + // =================================================================================== + // Accept Primary-Key + // ================== + /** + * This method implements the method that is declared at super. + * + * @param primaryKeyMap Primary key map. (NotNull and NotEmpty) + */ + public void acceptPrimaryKeyMap(java.util.Map primaryKeyMap) { + if (primaryKeyMap == null) { + String msg = "The argument[primaryKeyMap] must not be null."; + throw new IllegalArgumentException(msg); + } + if (primaryKeyMap.isEmpty()) { + String msg = "The argument[primaryKeyMap] must not be empty."; + throw new IllegalArgumentException(msg); + } + + if (!primaryKeyMap.containsKey("GEO_ZONE_ID")) { + String msg = "The primaryKeyMap must have the value of GEO_ZONE_ID"; + throw new IllegalStateException(msg + ": primaryKeyMap --> " + primaryKeyMap); + } + { + Object obj = primaryKeyMap.get("GEO_ZONE_ID"); + if (obj instanceof java.math.BigDecimal) { + query().setGeoZoneId_Equal((java.math.BigDecimal)obj); + } else { + + if (obj instanceof java.math.BigDecimal) { + query().setGeoZoneId_Equal((java.math.BigDecimal)obj); + } else { + try { + query().setGeoZoneId_Equal(new java.math.BigDecimal((String)obj)); + } catch (RuntimeException e) { + String msg = "setGeoZoneId(new java.math.BigDecimal((String)obj))"; + throw new RuntimeException(msg + " threw the exception: value=[" + obj + "]", e); + } + } + } + } + + } + + // =================================================================================== + // Order-By + // ======== + /** + * This method implements the method that is declared at super. + * + * @return this. (NotNull) + */ + public ConditionBean addOrderBy_PK_Asc() { + + query().addOrderBy_GeoZoneId_Asc(); + + return this; + + } + + /** + * This method implements the method that is declared at super. + * + * @return this. (NotNull) + */ + public ConditionBean addOrderBy_PK_Desc() { + + query().addOrderBy_GeoZoneId_Desc(); + + return this; + + } + + // =================================================================================== + // Query + // ===== + /** + * Query. + * + * @return Instance of query. (NotNull) + */ + public GeoZonesCQ query() { + return getConditionQuery(); + } + + /** + * Get condition query. {Internal method for s2dao} + * + * @return Instance of condition query. (NotNull) + */ + public GeoZonesCQ getConditionQuery() { + if (_conditionQuery == null) { + _conditionQuery = new GeoZonesCQ(null, getSqlClause(), getTableDbName(), 0); + } + return _conditionQuery; + } + + /** + * This method implements the method that is declared at super. + * + * @return Instance of query as interface. (NotNull) + */ + public ConditionQuery getConditionQueryAsInterface() { + return getConditionQuery(); + } + + // =================================================================================== + // Union + // ===== + /** + * Union. + *
+     * Add union query to condition bean.
+     * 
+ * @param unionQuery Union query. (NotNull) + */ + public void union(GeoZonesCQ unionQuery) { + query().xsetUnionQuery(unionQuery); + } + + /** + * Union all. + *
+     * Add union all query to condition bean.
+     * 
+ * @param unionAllQuery Union all query. (NotNull) + */ + public void unionAll(GeoZonesCQ unionAllQuery) { + query().xsetUnionAllQuery(unionAllQuery); + } + + public boolean hasUnionQueryOrUnionAllQuery() { + return query().hasUnionQueryOrUnionAllQuery(); + } + + // =================================================================================== + // Setup-Select + // ============ + + // =================================================================================== + // Basic Override + // ============== + /** + * This method overrides the method that is declared at super. + * + * @return Clause string. (NotNull) + */ + public String toString() { + return getSqlClause().getClause(); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/bs/BsLanguagesCB.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/bs/BsLanguagesCB.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/bs/BsLanguagesCB.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,204 @@ +package jp.sf.pal.pompei.cbean.bs; + + +import jp.sf.pal.pompei.allcommon.cbean.AbstractConditionBean; +import jp.sf.pal.pompei.allcommon.cbean.ConditionBean; +import jp.sf.pal.pompei.allcommon.cbean.ConditionQuery; + +import jp.sf.pal.pompei.cbean.cq.*; +import jp.sf.pal.pompei.cbean.nss.*; + +/** + * The condition-bean of LANGUAGES. + * + * @author DBFlute(AutoGenerator) + */ +public class BsLanguagesCB extends AbstractConditionBean { + + // =================================================================================== + // Annotation + // ========== + /** TABLE-Annotation */ + public static final String TABLE = "LANGUAGES"; + + // =================================================================================== + // Attribute + // ========= + /** Condition query. */ + protected LanguagesCQ _conditionQuery; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + public BsLanguagesCB() { + } + + // /* * * * * * * * * * * * * * * * * * * * * * * + // MyTable = [LANGUAGES] + // * * * * * * * * */ + + // =================================================================================== + // Table Name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + final public String getTableDbName() { + return "LANGUAGES"; + } + + // =================================================================================== + // Accept Primary-Key + // ================== + /** + * This method implements the method that is declared at super. + * + * @param primaryKeyMap Primary key map. (NotNull and NotEmpty) + */ + public void acceptPrimaryKeyMap(java.util.Map primaryKeyMap) { + if (primaryKeyMap == null) { + String msg = "The argument[primaryKeyMap] must not be null."; + throw new IllegalArgumentException(msg); + } + if (primaryKeyMap.isEmpty()) { + String msg = "The argument[primaryKeyMap] must not be empty."; + throw new IllegalArgumentException(msg); + } + + if (!primaryKeyMap.containsKey("LANGUAGES_ID")) { + String msg = "The primaryKeyMap must have the value of LANGUAGES_ID"; + throw new IllegalStateException(msg + ": primaryKeyMap --> " + primaryKeyMap); + } + { + Object obj = primaryKeyMap.get("LANGUAGES_ID"); + if (obj instanceof java.math.BigDecimal) { + query().setLanguagesId_Equal((java.math.BigDecimal)obj); + } else { + + if (obj instanceof java.math.BigDecimal) { + query().setLanguagesId_Equal((java.math.BigDecimal)obj); + } else { + try { + query().setLanguagesId_Equal(new java.math.BigDecimal((String)obj)); + } catch (RuntimeException e) { + String msg = "setLanguagesId(new java.math.BigDecimal((String)obj))"; + throw new RuntimeException(msg + " threw the exception: value=[" + obj + "]", e); + } + } + } + } + + } + + // =================================================================================== + // Order-By + // ======== + /** + * This method implements the method that is declared at super. + * + * @return this. (NotNull) + */ + public ConditionBean addOrderBy_PK_Asc() { + + query().addOrderBy_LanguagesId_Asc(); + + return this; + + } + + /** + * This method implements the method that is declared at super. + * + * @return this. (NotNull) + */ + public ConditionBean addOrderBy_PK_Desc() { + + query().addOrderBy_LanguagesId_Desc(); + + return this; + + } + + // =================================================================================== + // Query + // ===== + /** + * Query. + * + * @return Instance of query. (NotNull) + */ + public LanguagesCQ query() { + return getConditionQuery(); + } + + /** + * Get condition query. {Internal method for s2dao} + * + * @return Instance of condition query. (NotNull) + */ + public LanguagesCQ getConditionQuery() { + if (_conditionQuery == null) { + _conditionQuery = new LanguagesCQ(null, getSqlClause(), getTableDbName(), 0); + } + return _conditionQuery; + } + + /** + * This method implements the method that is declared at super. + * + * @return Instance of query as interface. (NotNull) + */ + public ConditionQuery getConditionQueryAsInterface() { + return getConditionQuery(); + } + + // =================================================================================== + // Union + // ===== + /** + * Union. + *
+     * Add union query to condition bean.
+     * 
+ * @param unionQuery Union query. (NotNull) + */ + public void union(LanguagesCQ unionQuery) { + query().xsetUnionQuery(unionQuery); + } + + /** + * Union all. + *
+     * Add union all query to condition bean.
+     * 
+ * @param unionAllQuery Union all query. (NotNull) + */ + public void unionAll(LanguagesCQ unionAllQuery) { + query().xsetUnionAllQuery(unionAllQuery); + } + + public boolean hasUnionQueryOrUnionAllQuery() { + return query().hasUnionQueryOrUnionAllQuery(); + } + + // =================================================================================== + // Setup-Select + // ============ + + // =================================================================================== + // Basic Override + // ============== + /** + * This method overrides the method that is declared at super. + * + * @return Clause string. (NotNull) + */ + public String toString() { + return getSqlClause().getClause(); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/bs/BsManufacturersCB.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/bs/BsManufacturersCB.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/bs/BsManufacturersCB.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,204 @@ +package jp.sf.pal.pompei.cbean.bs; + + +import jp.sf.pal.pompei.allcommon.cbean.AbstractConditionBean; +import jp.sf.pal.pompei.allcommon.cbean.ConditionBean; +import jp.sf.pal.pompei.allcommon.cbean.ConditionQuery; + +import jp.sf.pal.pompei.cbean.cq.*; +import jp.sf.pal.pompei.cbean.nss.*; + +/** + * The condition-bean of MANUFACTURERS. + * + * @author DBFlute(AutoGenerator) + */ +public class BsManufacturersCB extends AbstractConditionBean { + + // =================================================================================== + // Annotation + // ========== + /** TABLE-Annotation */ + public static final String TABLE = "MANUFACTURERS"; + + // =================================================================================== + // Attribute + // ========= + /** Condition query. */ + protected ManufacturersCQ _conditionQuery; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + public BsManufacturersCB() { + } + + // /* * * * * * * * * * * * * * * * * * * * * * * + // MyTable = [MANUFACTURERS] + // * * * * * * * * */ + + // =================================================================================== + // Table Name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + final public String getTableDbName() { + return "MANUFACTURERS"; + } + + // =================================================================================== + // Accept Primary-Key + // ================== + /** + * This method implements the method that is declared at super. + * + * @param primaryKeyMap Primary key map. (NotNull and NotEmpty) + */ + public void acceptPrimaryKeyMap(java.util.Map primaryKeyMap) { + if (primaryKeyMap == null) { + String msg = "The argument[primaryKeyMap] must not be null."; + throw new IllegalArgumentException(msg); + } + if (primaryKeyMap.isEmpty()) { + String msg = "The argument[primaryKeyMap] must not be empty."; + throw new IllegalArgumentException(msg); + } + + if (!primaryKeyMap.containsKey("MANUFACTURERS_ID")) { + String msg = "The primaryKeyMap must have the value of MANUFACTURERS_ID"; + throw new IllegalStateException(msg + ": primaryKeyMap --> " + primaryKeyMap); + } + { + Object obj = primaryKeyMap.get("MANUFACTURERS_ID"); + if (obj instanceof java.math.BigDecimal) { + query().setManufacturersId_Equal((java.math.BigDecimal)obj); + } else { + + if (obj instanceof java.math.BigDecimal) { + query().setManufacturersId_Equal((java.math.BigDecimal)obj); + } else { + try { + query().setManufacturersId_Equal(new java.math.BigDecimal((String)obj)); + } catch (RuntimeException e) { + String msg = "setManufacturersId(new java.math.BigDecimal((String)obj))"; + throw new RuntimeException(msg + " threw the exception: value=[" + obj + "]", e); + } + } + } + } + + } + + // =================================================================================== + // Order-By + // ======== + /** + * This method implements the method that is declared at super. + * + * @return this. (NotNull) + */ + public ConditionBean addOrderBy_PK_Asc() { + + query().addOrderBy_ManufacturersId_Asc(); + + return this; + + } + + /** + * This method implements the method that is declared at super. + * + * @return this. (NotNull) + */ + public ConditionBean addOrderBy_PK_Desc() { + + query().addOrderBy_ManufacturersId_Desc(); + + return this; + + } + + // =================================================================================== + // Query + // ===== + /** + * Query. + * + * @return Instance of query. (NotNull) + */ + public ManufacturersCQ query() { + return getConditionQuery(); + } + + /** + * Get condition query. {Internal method for s2dao} + * + * @return Instance of condition query. (NotNull) + */ + public ManufacturersCQ getConditionQuery() { + if (_conditionQuery == null) { + _conditionQuery = new ManufacturersCQ(null, getSqlClause(), getTableDbName(), 0); + } + return _conditionQuery; + } + + /** + * This method implements the method that is declared at super. + * + * @return Instance of query as interface. (NotNull) + */ + public ConditionQuery getConditionQueryAsInterface() { + return getConditionQuery(); + } + + // =================================================================================== + // Union + // ===== + /** + * Union. + *
+     * Add union query to condition bean.
+     * 
+ * @param unionQuery Union query. (NotNull) + */ + public void union(ManufacturersCQ unionQuery) { + query().xsetUnionQuery(unionQuery); + } + + /** + * Union all. + *
+     * Add union all query to condition bean.
+     * 
+ * @param unionAllQuery Union all query. (NotNull) + */ + public void unionAll(ManufacturersCQ unionAllQuery) { + query().xsetUnionAllQuery(unionAllQuery); + } + + public boolean hasUnionQueryOrUnionAllQuery() { + return query().hasUnionQueryOrUnionAllQuery(); + } + + // =================================================================================== + // Setup-Select + // ============ + + // =================================================================================== + // Basic Override + // ============== + /** + * This method overrides the method that is declared at super. + * + * @return Clause string. (NotNull) + */ + public String toString() { + return getSqlClause().getClause(); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/bs/BsManufacturersInfoCB.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/bs/BsManufacturersInfoCB.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/bs/BsManufacturersInfoCB.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,231 @@ +package jp.sf.pal.pompei.cbean.bs; + + +import jp.sf.pal.pompei.allcommon.cbean.AbstractConditionBean; +import jp.sf.pal.pompei.allcommon.cbean.ConditionBean; +import jp.sf.pal.pompei.allcommon.cbean.ConditionQuery; + +import jp.sf.pal.pompei.cbean.cq.*; +import jp.sf.pal.pompei.cbean.nss.*; + +/** + * The condition-bean of MANUFACTURERS_INFO. + * + * @author DBFlute(AutoGenerator) + */ +public class BsManufacturersInfoCB extends AbstractConditionBean { + + // =================================================================================== + // Annotation + // ========== + /** TABLE-Annotation */ + public static final String TABLE = "MANUFACTURERS_INFO"; + + // =================================================================================== + // Attribute + // ========= + /** Condition query. */ + protected ManufacturersInfoCQ _conditionQuery; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + public BsManufacturersInfoCB() { + } + + // /* * * * * * * * * * * * * * * * * * * * * * * + // MyTable = [MANUFACTURERS_INFO] + // * * * * * * * * */ + + // =================================================================================== + // Table Name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + final public String getTableDbName() { + return "MANUFACTURERS_INFO"; + } + + // =================================================================================== + // Accept Primary-Key + // ================== + /** + * This method implements the method that is declared at super. + * + * @param primaryKeyMap Primary key map. (NotNull and NotEmpty) + */ + public void acceptPrimaryKeyMap(java.util.Map primaryKeyMap) { + if (primaryKeyMap == null) { + String msg = "The argument[primaryKeyMap] must not be null."; + throw new IllegalArgumentException(msg); + } + if (primaryKeyMap.isEmpty()) { + String msg = "The argument[primaryKeyMap] must not be empty."; + throw new IllegalArgumentException(msg); + } + + if (!primaryKeyMap.containsKey("MANUFACTURERS_ID")) { + String msg = "The primaryKeyMap must have the value of MANUFACTURERS_ID"; + throw new IllegalStateException(msg + ": primaryKeyMap --> " + primaryKeyMap); + } + { + Object obj = primaryKeyMap.get("MANUFACTURERS_ID"); + if (obj instanceof java.math.BigDecimal) { + query().setManufacturersId_Equal((java.math.BigDecimal)obj); + } else { + + if (obj instanceof java.math.BigDecimal) { + query().setManufacturersId_Equal((java.math.BigDecimal)obj); + } else { + try { + query().setManufacturersId_Equal(new java.math.BigDecimal((String)obj)); + } catch (RuntimeException e) { + String msg = "setManufacturersId(new java.math.BigDecimal((String)obj))"; + throw new RuntimeException(msg + " threw the exception: value=[" + obj + "]", e); + } + } + } + } + + if (!primaryKeyMap.containsKey("LANGUAGES_ID")) { + String msg = "The primaryKeyMap must have the value of LANGUAGES_ID"; + throw new IllegalStateException(msg + ": primaryKeyMap --> " + primaryKeyMap); + } + { + Object obj = primaryKeyMap.get("LANGUAGES_ID"); + if (obj instanceof java.math.BigDecimal) { + query().setLanguagesId_Equal((java.math.BigDecimal)obj); + } else { + + if (obj instanceof java.math.BigDecimal) { + query().setLanguagesId_Equal((java.math.BigDecimal)obj); + } else { + try { + query().setLanguagesId_Equal(new java.math.BigDecimal((String)obj)); + } catch (RuntimeException e) { + String msg = "setLanguagesId(new java.math.BigDecimal((String)obj))"; + throw new RuntimeException(msg + " threw the exception: value=[" + obj + "]", e); + } + } + } + } + + } + + // =================================================================================== + // Order-By + // ======== + /** + * This method implements the method that is declared at super. + * + * @return this. (NotNull) + */ + public ConditionBean addOrderBy_PK_Asc() { + + query().addOrderBy_ManufacturersId_Asc(); + + query().addOrderBy_LanguagesId_Asc(); + + return this; + + } + + /** + * This method implements the method that is declared at super. + * + * @return this. (NotNull) + */ + public ConditionBean addOrderBy_PK_Desc() { + + query().addOrderBy_ManufacturersId_Desc(); + + query().addOrderBy_LanguagesId_Desc(); + + return this; + + } + + // =================================================================================== + // Query + // ===== + /** + * Query. + * + * @return Instance of query. (NotNull) + */ + public ManufacturersInfoCQ query() { + return getConditionQuery(); + } + + /** + * Get condition query. {Internal method for s2dao} + * + * @return Instance of condition query. (NotNull) + */ + public ManufacturersInfoCQ getConditionQuery() { + if (_conditionQuery == null) { + _conditionQuery = new ManufacturersInfoCQ(null, getSqlClause(), getTableDbName(), 0); + } + return _conditionQuery; + } + + /** + * This method implements the method that is declared at super. + * + * @return Instance of query as interface. (NotNull) + */ + public ConditionQuery getConditionQueryAsInterface() { + return getConditionQuery(); + } + + // =================================================================================== + // Union + // ===== + /** + * Union. + *
+     * Add union query to condition bean.
+     * 
+ * @param unionQuery Union query. (NotNull) + */ + public void union(ManufacturersInfoCQ unionQuery) { + query().xsetUnionQuery(unionQuery); + } + + /** + * Union all. + *
+     * Add union all query to condition bean.
+     * 
+ * @param unionAllQuery Union all query. (NotNull) + */ + public void unionAll(ManufacturersInfoCQ unionAllQuery) { + query().xsetUnionAllQuery(unionAllQuery); + } + + public boolean hasUnionQueryOrUnionAllQuery() { + return query().hasUnionQueryOrUnionAllQuery(); + } + + // =================================================================================== + // Setup-Select + // ============ + + // =================================================================================== + // Basic Override + // ============== + /** + * This method overrides the method that is declared at super. + * + * @return Clause string. (NotNull) + */ + public String toString() { + return getSqlClause().getClause(); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/bs/BsNewslettersCB.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/bs/BsNewslettersCB.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/bs/BsNewslettersCB.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,204 @@ +package jp.sf.pal.pompei.cbean.bs; + + +import jp.sf.pal.pompei.allcommon.cbean.AbstractConditionBean; +import jp.sf.pal.pompei.allcommon.cbean.ConditionBean; +import jp.sf.pal.pompei.allcommon.cbean.ConditionQuery; + +import jp.sf.pal.pompei.cbean.cq.*; +import jp.sf.pal.pompei.cbean.nss.*; + +/** + * The condition-bean of NEWSLETTERS. + * + * @author DBFlute(AutoGenerator) + */ +public class BsNewslettersCB extends AbstractConditionBean { + + // =================================================================================== + // Annotation + // ========== + /** TABLE-Annotation */ + public static final String TABLE = "NEWSLETTERS"; + + // =================================================================================== + // Attribute + // ========= + /** Condition query. */ + protected NewslettersCQ _conditionQuery; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + public BsNewslettersCB() { + } + + // /* * * * * * * * * * * * * * * * * * * * * * * + // MyTable = [NEWSLETTERS] + // * * * * * * * * */ + + // =================================================================================== + // Table Name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + final public String getTableDbName() { + return "NEWSLETTERS"; + } + + // =================================================================================== + // Accept Primary-Key + // ================== + /** + * This method implements the method that is declared at super. + * + * @param primaryKeyMap Primary key map. (NotNull and NotEmpty) + */ + public void acceptPrimaryKeyMap(java.util.Map primaryKeyMap) { + if (primaryKeyMap == null) { + String msg = "The argument[primaryKeyMap] must not be null."; + throw new IllegalArgumentException(msg); + } + if (primaryKeyMap.isEmpty()) { + String msg = "The argument[primaryKeyMap] must not be empty."; + throw new IllegalArgumentException(msg); + } + + if (!primaryKeyMap.containsKey("NEWSLETTERS_ID")) { + String msg = "The primaryKeyMap must have the value of NEWSLETTERS_ID"; + throw new IllegalStateException(msg + ": primaryKeyMap --> " + primaryKeyMap); + } + { + Object obj = primaryKeyMap.get("NEWSLETTERS_ID"); + if (obj instanceof java.math.BigDecimal) { + query().setNewslettersId_Equal((java.math.BigDecimal)obj); + } else { + + if (obj instanceof java.math.BigDecimal) { + query().setNewslettersId_Equal((java.math.BigDecimal)obj); + } else { + try { + query().setNewslettersId_Equal(new java.math.BigDecimal((String)obj)); + } catch (RuntimeException e) { + String msg = "setNewslettersId(new java.math.BigDecimal((String)obj))"; + throw new RuntimeException(msg + " threw the exception: value=[" + obj + "]", e); + } + } + } + } + + } + + // =================================================================================== + // Order-By + // ======== + /** + * This method implements the method that is declared at super. + * + * @return this. (NotNull) + */ + public ConditionBean addOrderBy_PK_Asc() { + + query().addOrderBy_NewslettersId_Asc(); + + return this; + + } + + /** + * This method implements the method that is declared at super. + * + * @return this. (NotNull) + */ + public ConditionBean addOrderBy_PK_Desc() { + + query().addOrderBy_NewslettersId_Desc(); + + return this; + + } + + // =================================================================================== + // Query + // ===== + /** + * Query. + * + * @return Instance of query. (NotNull) + */ + public NewslettersCQ query() { + return getConditionQuery(); + } + + /** + * Get condition query. {Internal method for s2dao} + * + * @return Instance of condition query. (NotNull) + */ + public NewslettersCQ getConditionQuery() { + if (_conditionQuery == null) { + _conditionQuery = new NewslettersCQ(null, getSqlClause(), getTableDbName(), 0); + } + return _conditionQuery; + } + + /** + * This method implements the method that is declared at super. + * + * @return Instance of query as interface. (NotNull) + */ + public ConditionQuery getConditionQueryAsInterface() { + return getConditionQuery(); + } + + // =================================================================================== + // Union + // ===== + /** + * Union. + *
+     * Add union query to condition bean.
+     * 
+ * @param unionQuery Union query. (NotNull) + */ + public void union(NewslettersCQ unionQuery) { + query().xsetUnionQuery(unionQuery); + } + + /** + * Union all. + *
+     * Add union all query to condition bean.
+     * 
+ * @param unionAllQuery Union all query. (NotNull) + */ + public void unionAll(NewslettersCQ unionAllQuery) { + query().xsetUnionAllQuery(unionAllQuery); + } + + public boolean hasUnionQueryOrUnionAllQuery() { + return query().hasUnionQueryOrUnionAllQuery(); + } + + // =================================================================================== + // Setup-Select + // ============ + + // =================================================================================== + // Basic Override + // ============== + /** + * This method overrides the method that is declared at super. + * + * @return Clause string. (NotNull) + */ + public String toString() { + return getSqlClause().getClause(); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/bs/BsOrdersCB.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/bs/BsOrdersCB.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/bs/BsOrdersCB.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,204 @@ +package jp.sf.pal.pompei.cbean.bs; + + +import jp.sf.pal.pompei.allcommon.cbean.AbstractConditionBean; +import jp.sf.pal.pompei.allcommon.cbean.ConditionBean; +import jp.sf.pal.pompei.allcommon.cbean.ConditionQuery; + +import jp.sf.pal.pompei.cbean.cq.*; +import jp.sf.pal.pompei.cbean.nss.*; + +/** + * The condition-bean of ORDERS. + * + * @author DBFlute(AutoGenerator) + */ +public class BsOrdersCB extends AbstractConditionBean { + + // =================================================================================== + // Annotation + // ========== + /** TABLE-Annotation */ + public static final String TABLE = "ORDERS"; + + // =================================================================================== + // Attribute + // ========= + /** Condition query. */ + protected OrdersCQ _conditionQuery; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + public BsOrdersCB() { + } + + // /* * * * * * * * * * * * * * * * * * * * * * * + // MyTable = [ORDERS] + // * * * * * * * * */ + + // =================================================================================== + // Table Name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + final public String getTableDbName() { + return "ORDERS"; + } + + // =================================================================================== + // Accept Primary-Key + // ================== + /** + * This method implements the method that is declared at super. + * + * @param primaryKeyMap Primary key map. (NotNull and NotEmpty) + */ + public void acceptPrimaryKeyMap(java.util.Map primaryKeyMap) { + if (primaryKeyMap == null) { + String msg = "The argument[primaryKeyMap] must not be null."; + throw new IllegalArgumentException(msg); + } + if (primaryKeyMap.isEmpty()) { + String msg = "The argument[primaryKeyMap] must not be empty."; + throw new IllegalArgumentException(msg); + } + + if (!primaryKeyMap.containsKey("ORDERS_ID")) { + String msg = "The primaryKeyMap must have the value of ORDERS_ID"; + throw new IllegalStateException(msg + ": primaryKeyMap --> " + primaryKeyMap); + } + { + Object obj = primaryKeyMap.get("ORDERS_ID"); + if (obj instanceof java.math.BigDecimal) { + query().setOrdersId_Equal((java.math.BigDecimal)obj); + } else { + + if (obj instanceof java.math.BigDecimal) { + query().setOrdersId_Equal((java.math.BigDecimal)obj); + } else { + try { + query().setOrdersId_Equal(new java.math.BigDecimal((String)obj)); + } catch (RuntimeException e) { + String msg = "setOrdersId(new java.math.BigDecimal((String)obj))"; + throw new RuntimeException(msg + " threw the exception: value=[" + obj + "]", e); + } + } + } + } + + } + + // =================================================================================== + // Order-By + // ======== + /** + * This method implements the method that is declared at super. + * + * @return this. (NotNull) + */ + public ConditionBean addOrderBy_PK_Asc() { + + query().addOrderBy_OrdersId_Asc(); + + return this; + + } + + /** + * This method implements the method that is declared at super. + * + * @return this. (NotNull) + */ + public ConditionBean addOrderBy_PK_Desc() { + + query().addOrderBy_OrdersId_Desc(); + + return this; + + } + + // =================================================================================== + // Query + // ===== + /** + * Query. + * + * @return Instance of query. (NotNull) + */ + public OrdersCQ query() { + return getConditionQuery(); + } + + /** + * Get condition query. {Internal method for s2dao} + * + * @return Instance of condition query. (NotNull) + */ + public OrdersCQ getConditionQuery() { + if (_conditionQuery == null) { + _conditionQuery = new OrdersCQ(null, getSqlClause(), getTableDbName(), 0); + } + return _conditionQuery; + } + + /** + * This method implements the method that is declared at super. + * + * @return Instance of query as interface. (NotNull) + */ + public ConditionQuery getConditionQueryAsInterface() { + return getConditionQuery(); + } + + // =================================================================================== + // Union + // ===== + /** + * Union. + *
+     * Add union query to condition bean.
+     * 
+ * @param unionQuery Union query. (NotNull) + */ + public void union(OrdersCQ unionQuery) { + query().xsetUnionQuery(unionQuery); + } + + /** + * Union all. + *
+     * Add union all query to condition bean.
+     * 
+ * @param unionAllQuery Union all query. (NotNull) + */ + public void unionAll(OrdersCQ unionAllQuery) { + query().xsetUnionAllQuery(unionAllQuery); + } + + public boolean hasUnionQueryOrUnionAllQuery() { + return query().hasUnionQueryOrUnionAllQuery(); + } + + // =================================================================================== + // Setup-Select + // ============ + + // =================================================================================== + // Basic Override + // ============== + /** + * This method overrides the method that is declared at super. + * + * @return Clause string. (NotNull) + */ + public String toString() { + return getSqlClause().getClause(); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/bs/BsOrdersProductsAttributesCB.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/bs/BsOrdersProductsAttributesCB.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/bs/BsOrdersProductsAttributesCB.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,204 @@ +package jp.sf.pal.pompei.cbean.bs; + + +import jp.sf.pal.pompei.allcommon.cbean.AbstractConditionBean; +import jp.sf.pal.pompei.allcommon.cbean.ConditionBean; +import jp.sf.pal.pompei.allcommon.cbean.ConditionQuery; + +import jp.sf.pal.pompei.cbean.cq.*; +import jp.sf.pal.pompei.cbean.nss.*; + +/** + * The condition-bean of ORDERS_PRODUCTS_ATTRIBUTES. + * + * @author DBFlute(AutoGenerator) + */ +public class BsOrdersProductsAttributesCB extends AbstractConditionBean { + + // =================================================================================== + // Annotation + // ========== + /** TABLE-Annotation */ + public static final String TABLE = "ORDERS_PRODUCTS_ATTRIBUTES"; + + // =================================================================================== + // Attribute + // ========= + /** Condition query. */ + protected OrdersProductsAttributesCQ _conditionQuery; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + public BsOrdersProductsAttributesCB() { + } + + // /* * * * * * * * * * * * * * * * * * * * * * * + // MyTable = [ORDERS_PRODUCTS_ATTRIBUTES] + // * * * * * * * * */ + + // =================================================================================== + // Table Name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + final public String getTableDbName() { + return "ORDERS_PRODUCTS_ATTRIBUTES"; + } + + // =================================================================================== + // Accept Primary-Key + // ================== + /** + * This method implements the method that is declared at super. + * + * @param primaryKeyMap Primary key map. (NotNull and NotEmpty) + */ + public void acceptPrimaryKeyMap(java.util.Map primaryKeyMap) { + if (primaryKeyMap == null) { + String msg = "The argument[primaryKeyMap] must not be null."; + throw new IllegalArgumentException(msg); + } + if (primaryKeyMap.isEmpty()) { + String msg = "The argument[primaryKeyMap] must not be empty."; + throw new IllegalArgumentException(msg); + } + + if (!primaryKeyMap.containsKey("ORDERS_PRODUCTS_ATTRIBUTES_ID")) { + String msg = "The primaryKeyMap must have the value of ORDERS_PRODUCTS_ATTRIBUTES_ID"; + throw new IllegalStateException(msg + ": primaryKeyMap --> " + primaryKeyMap); + } + { + Object obj = primaryKeyMap.get("ORDERS_PRODUCTS_ATTRIBUTES_ID"); + if (obj instanceof java.math.BigDecimal) { + query().setOrdersProductsAttributesId_Equal((java.math.BigDecimal)obj); + } else { + + if (obj instanceof java.math.BigDecimal) { + query().setOrdersProductsAttributesId_Equal((java.math.BigDecimal)obj); + } else { + try { + query().setOrdersProductsAttributesId_Equal(new java.math.BigDecimal((String)obj)); + } catch (RuntimeException e) { + String msg = "setOrdersProductsAttributesId(new java.math.BigDecimal((String)obj))"; + throw new RuntimeException(msg + " threw the exception: value=[" + obj + "]", e); + } + } + } + } + + } + + // =================================================================================== + // Order-By + // ======== + /** + * This method implements the method that is declared at super. + * + * @return this. (NotNull) + */ + public ConditionBean addOrderBy_PK_Asc() { + + query().addOrderBy_OrdersProductsAttributesId_Asc(); + + return this; + + } + + /** + * This method implements the method that is declared at super. + * + * @return this. (NotNull) + */ + public ConditionBean addOrderBy_PK_Desc() { + + query().addOrderBy_OrdersProductsAttributesId_Desc(); + + return this; + + } + + // =================================================================================== + // Query + // ===== + /** + * Query. + * + * @return Instance of query. (NotNull) + */ + public OrdersProductsAttributesCQ query() { + return getConditionQuery(); + } + + /** + * Get condition query. {Internal method for s2dao} + * + * @return Instance of condition query. (NotNull) + */ + public OrdersProductsAttributesCQ getConditionQuery() { + if (_conditionQuery == null) { + _conditionQuery = new OrdersProductsAttributesCQ(null, getSqlClause(), getTableDbName(), 0); + } + return _conditionQuery; + } + + /** + * This method implements the method that is declared at super. + * + * @return Instance of query as interface. (NotNull) + */ + public ConditionQuery getConditionQueryAsInterface() { + return getConditionQuery(); + } + + // =================================================================================== + // Union + // ===== + /** + * Union. + *
+     * Add union query to condition bean.
+     * 
+ * @param unionQuery Union query. (NotNull) + */ + public void union(OrdersProductsAttributesCQ unionQuery) { + query().xsetUnionQuery(unionQuery); + } + + /** + * Union all. + *
+     * Add union all query to condition bean.
+     * 
+ * @param unionAllQuery Union all query. (NotNull) + */ + public void unionAll(OrdersProductsAttributesCQ unionAllQuery) { + query().xsetUnionAllQuery(unionAllQuery); + } + + public boolean hasUnionQueryOrUnionAllQuery() { + return query().hasUnionQueryOrUnionAllQuery(); + } + + // =================================================================================== + // Setup-Select + // ============ + + // =================================================================================== + // Basic Override + // ============== + /** + * This method overrides the method that is declared at super. + * + * @return Clause string. (NotNull) + */ + public String toString() { + return getSqlClause().getClause(); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/bs/BsOrdersProductsCB.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/bs/BsOrdersProductsCB.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/bs/BsOrdersProductsCB.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,204 @@ +package jp.sf.pal.pompei.cbean.bs; + + +import jp.sf.pal.pompei.allcommon.cbean.AbstractConditionBean; +import jp.sf.pal.pompei.allcommon.cbean.ConditionBean; +import jp.sf.pal.pompei.allcommon.cbean.ConditionQuery; + +import jp.sf.pal.pompei.cbean.cq.*; +import jp.sf.pal.pompei.cbean.nss.*; + +/** + * The condition-bean of ORDERS_PRODUCTS. + * + * @author DBFlute(AutoGenerator) + */ +public class BsOrdersProductsCB extends AbstractConditionBean { + + // =================================================================================== + // Annotation + // ========== + /** TABLE-Annotation */ + public static final String TABLE = "ORDERS_PRODUCTS"; + + // =================================================================================== + // Attribute + // ========= + /** Condition query. */ + protected OrdersProductsCQ _conditionQuery; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + public BsOrdersProductsCB() { + } + + // /* * * * * * * * * * * * * * * * * * * * * * * + // MyTable = [ORDERS_PRODUCTS] + // * * * * * * * * */ + + // =================================================================================== + // Table Name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + final public String getTableDbName() { + return "ORDERS_PRODUCTS"; + } + + // =================================================================================== + // Accept Primary-Key + // ================== + /** + * This method implements the method that is declared at super. + * + * @param primaryKeyMap Primary key map. (NotNull and NotEmpty) + */ + public void acceptPrimaryKeyMap(java.util.Map primaryKeyMap) { + if (primaryKeyMap == null) { + String msg = "The argument[primaryKeyMap] must not be null."; + throw new IllegalArgumentException(msg); + } + if (primaryKeyMap.isEmpty()) { + String msg = "The argument[primaryKeyMap] must not be empty."; + throw new IllegalArgumentException(msg); + } + + if (!primaryKeyMap.containsKey("ORDERS_PRODUCTS_ID")) { + String msg = "The primaryKeyMap must have the value of ORDERS_PRODUCTS_ID"; + throw new IllegalStateException(msg + ": primaryKeyMap --> " + primaryKeyMap); + } + { + Object obj = primaryKeyMap.get("ORDERS_PRODUCTS_ID"); + if (obj instanceof java.math.BigDecimal) { + query().setOrdersProductsId_Equal((java.math.BigDecimal)obj); + } else { + + if (obj instanceof java.math.BigDecimal) { + query().setOrdersProductsId_Equal((java.math.BigDecimal)obj); + } else { + try { + query().setOrdersProductsId_Equal(new java.math.BigDecimal((String)obj)); + } catch (RuntimeException e) { + String msg = "setOrdersProductsId(new java.math.BigDecimal((String)obj))"; + throw new RuntimeException(msg + " threw the exception: value=[" + obj + "]", e); + } + } + } + } + + } + + // =================================================================================== + // Order-By + // ======== + /** + * This method implements the method that is declared at super. + * + * @return this. (NotNull) + */ + public ConditionBean addOrderBy_PK_Asc() { + + query().addOrderBy_OrdersProductsId_Asc(); + + return this; + + } + + /** + * This method implements the method that is declared at super. + * + * @return this. (NotNull) + */ + public ConditionBean addOrderBy_PK_Desc() { + + query().addOrderBy_OrdersProductsId_Desc(); + + return this; + + } + + // =================================================================================== + // Query + // ===== + /** + * Query. + * + * @return Instance of query. (NotNull) + */ + public OrdersProductsCQ query() { + return getConditionQuery(); + } + + /** + * Get condition query. {Internal method for s2dao} + * + * @return Instance of condition query. (NotNull) + */ + public OrdersProductsCQ getConditionQuery() { + if (_conditionQuery == null) { + _conditionQuery = new OrdersProductsCQ(null, getSqlClause(), getTableDbName(), 0); + } + return _conditionQuery; + } + + /** + * This method implements the method that is declared at super. + * + * @return Instance of query as interface. (NotNull) + */ + public ConditionQuery getConditionQueryAsInterface() { + return getConditionQuery(); + } + + // =================================================================================== + // Union + // ===== + /** + * Union. + *
+     * Add union query to condition bean.
+     * 
+ * @param unionQuery Union query. (NotNull) + */ + public void union(OrdersProductsCQ unionQuery) { + query().xsetUnionQuery(unionQuery); + } + + /** + * Union all. + *
+     * Add union all query to condition bean.
+     * 
+ * @param unionAllQuery Union all query. (NotNull) + */ + public void unionAll(OrdersProductsCQ unionAllQuery) { + query().xsetUnionAllQuery(unionAllQuery); + } + + public boolean hasUnionQueryOrUnionAllQuery() { + return query().hasUnionQueryOrUnionAllQuery(); + } + + // =================================================================================== + // Setup-Select + // ============ + + // =================================================================================== + // Basic Override + // ============== + /** + * This method overrides the method that is declared at super. + * + * @return Clause string. (NotNull) + */ + public String toString() { + return getSqlClause().getClause(); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/bs/BsOrdersProductsDownloadCB.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/bs/BsOrdersProductsDownloadCB.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/bs/BsOrdersProductsDownloadCB.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,204 @@ +package jp.sf.pal.pompei.cbean.bs; + + +import jp.sf.pal.pompei.allcommon.cbean.AbstractConditionBean; +import jp.sf.pal.pompei.allcommon.cbean.ConditionBean; +import jp.sf.pal.pompei.allcommon.cbean.ConditionQuery; + +import jp.sf.pal.pompei.cbean.cq.*; +import jp.sf.pal.pompei.cbean.nss.*; + +/** + * The condition-bean of ORDERS_PRODUCTS_DOWNLOAD. + * + * @author DBFlute(AutoGenerator) + */ +public class BsOrdersProductsDownloadCB extends AbstractConditionBean { + + // =================================================================================== + // Annotation + // ========== + /** TABLE-Annotation */ + public static final String TABLE = "ORDERS_PRODUCTS_DOWNLOAD"; + + // =================================================================================== + // Attribute + // ========= + /** Condition query. */ + protected OrdersProductsDownloadCQ _conditionQuery; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + public BsOrdersProductsDownloadCB() { + } + + // /* * * * * * * * * * * * * * * * * * * * * * * + // MyTable = [ORDERS_PRODUCTS_DOWNLOAD] + // * * * * * * * * */ + + // =================================================================================== + // Table Name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + final public String getTableDbName() { + return "ORDERS_PRODUCTS_DOWNLOAD"; + } + + // =================================================================================== + // Accept Primary-Key + // ================== + /** + * This method implements the method that is declared at super. + * + * @param primaryKeyMap Primary key map. (NotNull and NotEmpty) + */ + public void acceptPrimaryKeyMap(java.util.Map primaryKeyMap) { + if (primaryKeyMap == null) { + String msg = "The argument[primaryKeyMap] must not be null."; + throw new IllegalArgumentException(msg); + } + if (primaryKeyMap.isEmpty()) { + String msg = "The argument[primaryKeyMap] must not be empty."; + throw new IllegalArgumentException(msg); + } + + if (!primaryKeyMap.containsKey("ORDERS_PRODUCTS_DOWNLOAD_ID")) { + String msg = "The primaryKeyMap must have the value of ORDERS_PRODUCTS_DOWNLOAD_ID"; + throw new IllegalStateException(msg + ": primaryKeyMap --> " + primaryKeyMap); + } + { + Object obj = primaryKeyMap.get("ORDERS_PRODUCTS_DOWNLOAD_ID"); + if (obj instanceof java.math.BigDecimal) { + query().setOrdersProductsDownloadId_Equal((java.math.BigDecimal)obj); + } else { + + if (obj instanceof java.math.BigDecimal) { + query().setOrdersProductsDownloadId_Equal((java.math.BigDecimal)obj); + } else { + try { + query().setOrdersProductsDownloadId_Equal(new java.math.BigDecimal((String)obj)); + } catch (RuntimeException e) { + String msg = "setOrdersProductsDownloadId(new java.math.BigDecimal((String)obj))"; + throw new RuntimeException(msg + " threw the exception: value=[" + obj + "]", e); + } + } + } + } + + } + + // =================================================================================== + // Order-By + // ======== + /** + * This method implements the method that is declared at super. + * + * @return this. (NotNull) + */ + public ConditionBean addOrderBy_PK_Asc() { + + query().addOrderBy_OrdersProductsDownloadId_Asc(); + + return this; + + } + + /** + * This method implements the method that is declared at super. + * + * @return this. (NotNull) + */ + public ConditionBean addOrderBy_PK_Desc() { + + query().addOrderBy_OrdersProductsDownloadId_Desc(); + + return this; + + } + + // =================================================================================== + // Query + // ===== + /** + * Query. + * + * @return Instance of query. (NotNull) + */ + public OrdersProductsDownloadCQ query() { + return getConditionQuery(); + } + + /** + * Get condition query. {Internal method for s2dao} + * + * @return Instance of condition query. (NotNull) + */ + public OrdersProductsDownloadCQ getConditionQuery() { + if (_conditionQuery == null) { + _conditionQuery = new OrdersProductsDownloadCQ(null, getSqlClause(), getTableDbName(), 0); + } + return _conditionQuery; + } + + /** + * This method implements the method that is declared at super. + * + * @return Instance of query as interface. (NotNull) + */ + public ConditionQuery getConditionQueryAsInterface() { + return getConditionQuery(); + } + + // =================================================================================== + // Union + // ===== + /** + * Union. + *
+     * Add union query to condition bean.
+     * 
+ * @param unionQuery Union query. (NotNull) + */ + public void union(OrdersProductsDownloadCQ unionQuery) { + query().xsetUnionQuery(unionQuery); + } + + /** + * Union all. + *
+     * Add union all query to condition bean.
+     * 
+ * @param unionAllQuery Union all query. (NotNull) + */ + public void unionAll(OrdersProductsDownloadCQ unionAllQuery) { + query().xsetUnionAllQuery(unionAllQuery); + } + + public boolean hasUnionQueryOrUnionAllQuery() { + return query().hasUnionQueryOrUnionAllQuery(); + } + + // =================================================================================== + // Setup-Select + // ============ + + // =================================================================================== + // Basic Override + // ============== + /** + * This method overrides the method that is declared at super. + * + * @return Clause string. (NotNull) + */ + public String toString() { + return getSqlClause().getClause(); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/bs/BsOrdersStatusCB.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/bs/BsOrdersStatusCB.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/bs/BsOrdersStatusCB.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,231 @@ +package jp.sf.pal.pompei.cbean.bs; + + +import jp.sf.pal.pompei.allcommon.cbean.AbstractConditionBean; +import jp.sf.pal.pompei.allcommon.cbean.ConditionBean; +import jp.sf.pal.pompei.allcommon.cbean.ConditionQuery; + +import jp.sf.pal.pompei.cbean.cq.*; +import jp.sf.pal.pompei.cbean.nss.*; + +/** + * The condition-bean of ORDERS_STATUS. + * + * @author DBFlute(AutoGenerator) + */ +public class BsOrdersStatusCB extends AbstractConditionBean { + + // =================================================================================== + // Annotation + // ========== + /** TABLE-Annotation */ + public static final String TABLE = "ORDERS_STATUS"; + + // =================================================================================== + // Attribute + // ========= + /** Condition query. */ + protected OrdersStatusCQ _conditionQuery; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + public BsOrdersStatusCB() { + } + + // /* * * * * * * * * * * * * * * * * * * * * * * + // MyTable = [ORDERS_STATUS] + // * * * * * * * * */ + + // =================================================================================== + // Table Name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + final public String getTableDbName() { + return "ORDERS_STATUS"; + } + + // =================================================================================== + // Accept Primary-Key + // ================== + /** + * This method implements the method that is declared at super. + * + * @param primaryKeyMap Primary key map. (NotNull and NotEmpty) + */ + public void acceptPrimaryKeyMap(java.util.Map primaryKeyMap) { + if (primaryKeyMap == null) { + String msg = "The argument[primaryKeyMap] must not be null."; + throw new IllegalArgumentException(msg); + } + if (primaryKeyMap.isEmpty()) { + String msg = "The argument[primaryKeyMap] must not be empty."; + throw new IllegalArgumentException(msg); + } + + if (!primaryKeyMap.containsKey("ORDERS_STATUS_ID")) { + String msg = "The primaryKeyMap must have the value of ORDERS_STATUS_ID"; + throw new IllegalStateException(msg + ": primaryKeyMap --> " + primaryKeyMap); + } + { + Object obj = primaryKeyMap.get("ORDERS_STATUS_ID"); + if (obj instanceof java.math.BigDecimal) { + query().setOrdersStatusId_Equal((java.math.BigDecimal)obj); + } else { + + if (obj instanceof java.math.BigDecimal) { + query().setOrdersStatusId_Equal((java.math.BigDecimal)obj); + } else { + try { + query().setOrdersStatusId_Equal(new java.math.BigDecimal((String)obj)); + } catch (RuntimeException e) { + String msg = "setOrdersStatusId(new java.math.BigDecimal((String)obj))"; + throw new RuntimeException(msg + " threw the exception: value=[" + obj + "]", e); + } + } + } + } + + if (!primaryKeyMap.containsKey("LANGUAGE_ID")) { + String msg = "The primaryKeyMap must have the value of LANGUAGE_ID"; + throw new IllegalStateException(msg + ": primaryKeyMap --> " + primaryKeyMap); + } + { + Object obj = primaryKeyMap.get("LANGUAGE_ID"); + if (obj instanceof java.math.BigDecimal) { + query().setLanguageId_Equal((java.math.BigDecimal)obj); + } else { + + if (obj instanceof java.math.BigDecimal) { + query().setLanguageId_Equal((java.math.BigDecimal)obj); + } else { + try { + query().setLanguageId_Equal(new java.math.BigDecimal((String)obj)); + } catch (RuntimeException e) { + String msg = "setLanguageId(new java.math.BigDecimal((String)obj))"; + throw new RuntimeException(msg + " threw the exception: value=[" + obj + "]", e); + } + } + } + } + + } + + // =================================================================================== + // Order-By + // ======== + /** + * This method implements the method that is declared at super. + * + * @return this. (NotNull) + */ + public ConditionBean addOrderBy_PK_Asc() { + + query().addOrderBy_OrdersStatusId_Asc(); + + query().addOrderBy_LanguageId_Asc(); + + return this; + + } + + /** + * This method implements the method that is declared at super. + * + * @return this. (NotNull) + */ + public ConditionBean addOrderBy_PK_Desc() { + + query().addOrderBy_OrdersStatusId_Desc(); + + query().addOrderBy_LanguageId_Desc(); + + return this; + + } + + // =================================================================================== + // Query + // ===== + /** + * Query. + * + * @return Instance of query. (NotNull) + */ + public OrdersStatusCQ query() { + return getConditionQuery(); + } + + /** + * Get condition query. {Internal method for s2dao} + * + * @return Instance of condition query. (NotNull) + */ + public OrdersStatusCQ getConditionQuery() { + if (_conditionQuery == null) { + _conditionQuery = new OrdersStatusCQ(null, getSqlClause(), getTableDbName(), 0); + } + return _conditionQuery; + } + + /** + * This method implements the method that is declared at super. + * + * @return Instance of query as interface. (NotNull) + */ + public ConditionQuery getConditionQueryAsInterface() { + return getConditionQuery(); + } + + // =================================================================================== + // Union + // ===== + /** + * Union. + *
+     * Add union query to condition bean.
+     * 
+ * @param unionQuery Union query. (NotNull) + */ + public void union(OrdersStatusCQ unionQuery) { + query().xsetUnionQuery(unionQuery); + } + + /** + * Union all. + *
+     * Add union all query to condition bean.
+     * 
+ * @param unionAllQuery Union all query. (NotNull) + */ + public void unionAll(OrdersStatusCQ unionAllQuery) { + query().xsetUnionAllQuery(unionAllQuery); + } + + public boolean hasUnionQueryOrUnionAllQuery() { + return query().hasUnionQueryOrUnionAllQuery(); + } + + // =================================================================================== + // Setup-Select + // ============ + + // =================================================================================== + // Basic Override + // ============== + /** + * This method overrides the method that is declared at super. + * + * @return Clause string. (NotNull) + */ + public String toString() { + return getSqlClause().getClause(); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/bs/BsOrdersStatusHistoryCB.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/bs/BsOrdersStatusHistoryCB.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/bs/BsOrdersStatusHistoryCB.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,204 @@ +package jp.sf.pal.pompei.cbean.bs; + + +import jp.sf.pal.pompei.allcommon.cbean.AbstractConditionBean; +import jp.sf.pal.pompei.allcommon.cbean.ConditionBean; +import jp.sf.pal.pompei.allcommon.cbean.ConditionQuery; + +import jp.sf.pal.pompei.cbean.cq.*; +import jp.sf.pal.pompei.cbean.nss.*; + +/** + * The condition-bean of ORDERS_STATUS_HISTORY. + * + * @author DBFlute(AutoGenerator) + */ +public class BsOrdersStatusHistoryCB extends AbstractConditionBean { + + // =================================================================================== + // Annotation + // ========== + /** TABLE-Annotation */ + public static final String TABLE = "ORDERS_STATUS_HISTORY"; + + // =================================================================================== + // Attribute + // ========= + /** Condition query. */ + protected OrdersStatusHistoryCQ _conditionQuery; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + public BsOrdersStatusHistoryCB() { + } + + // /* * * * * * * * * * * * * * * * * * * * * * * + // MyTable = [ORDERS_STATUS_HISTORY] + // * * * * * * * * */ + + // =================================================================================== + // Table Name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + final public String getTableDbName() { + return "ORDERS_STATUS_HISTORY"; + } + + // =================================================================================== + // Accept Primary-Key + // ================== + /** + * This method implements the method that is declared at super. + * + * @param primaryKeyMap Primary key map. (NotNull and NotEmpty) + */ + public void acceptPrimaryKeyMap(java.util.Map primaryKeyMap) { + if (primaryKeyMap == null) { + String msg = "The argument[primaryKeyMap] must not be null."; + throw new IllegalArgumentException(msg); + } + if (primaryKeyMap.isEmpty()) { + String msg = "The argument[primaryKeyMap] must not be empty."; + throw new IllegalArgumentException(msg); + } + + if (!primaryKeyMap.containsKey("ORDERS_STATUS_HISTORY_ID")) { + String msg = "The primaryKeyMap must have the value of ORDERS_STATUS_HISTORY_ID"; + throw new IllegalStateException(msg + ": primaryKeyMap --> " + primaryKeyMap); + } + { + Object obj = primaryKeyMap.get("ORDERS_STATUS_HISTORY_ID"); + if (obj instanceof java.math.BigDecimal) { + query().setOrdersStatusHistoryId_Equal((java.math.BigDecimal)obj); + } else { + + if (obj instanceof java.math.BigDecimal) { + query().setOrdersStatusHistoryId_Equal((java.math.BigDecimal)obj); + } else { + try { + query().setOrdersStatusHistoryId_Equal(new java.math.BigDecimal((String)obj)); + } catch (RuntimeException e) { + String msg = "setOrdersStatusHistoryId(new java.math.BigDecimal((String)obj))"; + throw new RuntimeException(msg + " threw the exception: value=[" + obj + "]", e); + } + } + } + } + + } + + // =================================================================================== + // Order-By + // ======== + /** + * This method implements the method that is declared at super. + * + * @return this. (NotNull) + */ + public ConditionBean addOrderBy_PK_Asc() { + + query().addOrderBy_OrdersStatusHistoryId_Asc(); + + return this; + + } + + /** + * This method implements the method that is declared at super. + * + * @return this. (NotNull) + */ + public ConditionBean addOrderBy_PK_Desc() { + + query().addOrderBy_OrdersStatusHistoryId_Desc(); + + return this; + + } + + // =================================================================================== + // Query + // ===== + /** + * Query. + * + * @return Instance of query. (NotNull) + */ + public OrdersStatusHistoryCQ query() { + return getConditionQuery(); + } + + /** + * Get condition query. {Internal method for s2dao} + * + * @return Instance of condition query. (NotNull) + */ + public OrdersStatusHistoryCQ getConditionQuery() { + if (_conditionQuery == null) { + _conditionQuery = new OrdersStatusHistoryCQ(null, getSqlClause(), getTableDbName(), 0); + } + return _conditionQuery; + } + + /** + * This method implements the method that is declared at super. + * + * @return Instance of query as interface. (NotNull) + */ + public ConditionQuery getConditionQueryAsInterface() { + return getConditionQuery(); + } + + // =================================================================================== + // Union + // ===== + /** + * Union. + *
+     * Add union query to condition bean.
+     * 
+ * @param unionQuery Union query. (NotNull) + */ + public void union(OrdersStatusHistoryCQ unionQuery) { + query().xsetUnionQuery(unionQuery); + } + + /** + * Union all. + *
+     * Add union all query to condition bean.
+     * 
+ * @param unionAllQuery Union all query. (NotNull) + */ + public void unionAll(OrdersStatusHistoryCQ unionAllQuery) { + query().xsetUnionAllQuery(unionAllQuery); + } + + public boolean hasUnionQueryOrUnionAllQuery() { + return query().hasUnionQueryOrUnionAllQuery(); + } + + // =================================================================================== + // Setup-Select + // ============ + + // =================================================================================== + // Basic Override + // ============== + /** + * This method overrides the method that is declared at super. + * + * @return Clause string. (NotNull) + */ + public String toString() { + return getSqlClause().getClause(); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/bs/BsOrdersTotalCB.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/bs/BsOrdersTotalCB.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/bs/BsOrdersTotalCB.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,204 @@ +package jp.sf.pal.pompei.cbean.bs; + + +import jp.sf.pal.pompei.allcommon.cbean.AbstractConditionBean; +import jp.sf.pal.pompei.allcommon.cbean.ConditionBean; +import jp.sf.pal.pompei.allcommon.cbean.ConditionQuery; + +import jp.sf.pal.pompei.cbean.cq.*; +import jp.sf.pal.pompei.cbean.nss.*; + +/** + * The condition-bean of ORDERS_TOTAL. + * + * @author DBFlute(AutoGenerator) + */ +public class BsOrdersTotalCB extends AbstractConditionBean { + + // =================================================================================== + // Annotation + // ========== + /** TABLE-Annotation */ + public static final String TABLE = "ORDERS_TOTAL"; + + // =================================================================================== + // Attribute + // ========= + /** Condition query. */ + protected OrdersTotalCQ _conditionQuery; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + public BsOrdersTotalCB() { + } + + // /* * * * * * * * * * * * * * * * * * * * * * * + // MyTable = [ORDERS_TOTAL] + // * * * * * * * * */ + + // =================================================================================== + // Table Name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + final public String getTableDbName() { + return "ORDERS_TOTAL"; + } + + // =================================================================================== + // Accept Primary-Key + // ================== + /** + * This method implements the method that is declared at super. + * + * @param primaryKeyMap Primary key map. (NotNull and NotEmpty) + */ + public void acceptPrimaryKeyMap(java.util.Map primaryKeyMap) { + if (primaryKeyMap == null) { + String msg = "The argument[primaryKeyMap] must not be null."; + throw new IllegalArgumentException(msg); + } + if (primaryKeyMap.isEmpty()) { + String msg = "The argument[primaryKeyMap] must not be empty."; + throw new IllegalArgumentException(msg); + } + + if (!primaryKeyMap.containsKey("ORDERS_TOTAL_ID")) { + String msg = "The primaryKeyMap must have the value of ORDERS_TOTAL_ID"; + throw new IllegalStateException(msg + ": primaryKeyMap --> " + primaryKeyMap); + } + { + Object obj = primaryKeyMap.get("ORDERS_TOTAL_ID"); + if (obj instanceof java.math.BigDecimal) { + query().setOrdersTotalId_Equal((java.math.BigDecimal)obj); + } else { + + if (obj instanceof java.math.BigDecimal) { + query().setOrdersTotalId_Equal((java.math.BigDecimal)obj); + } else { + try { + query().setOrdersTotalId_Equal(new java.math.BigDecimal((String)obj)); + } catch (RuntimeException e) { + String msg = "setOrdersTotalId(new java.math.BigDecimal((String)obj))"; + throw new RuntimeException(msg + " threw the exception: value=[" + obj + "]", e); + } + } + } + } + + } + + // =================================================================================== + // Order-By + // ======== + /** + * This method implements the method that is declared at super. + * + * @return this. (NotNull) + */ + public ConditionBean addOrderBy_PK_Asc() { + + query().addOrderBy_OrdersTotalId_Asc(); + + return this; + + } + + /** + * This method implements the method that is declared at super. + * + * @return this. (NotNull) + */ + public ConditionBean addOrderBy_PK_Desc() { + + query().addOrderBy_OrdersTotalId_Desc(); + + return this; + + } + + // =================================================================================== + // Query + // ===== + /** + * Query. + * + * @return Instance of query. (NotNull) + */ + public OrdersTotalCQ query() { + return getConditionQuery(); + } + + /** + * Get condition query. {Internal method for s2dao} + * + * @return Instance of condition query. (NotNull) + */ + public OrdersTotalCQ getConditionQuery() { + if (_conditionQuery == null) { + _conditionQuery = new OrdersTotalCQ(null, getSqlClause(), getTableDbName(), 0); + } + return _conditionQuery; + } + + /** + * This method implements the method that is declared at super. + * + * @return Instance of query as interface. (NotNull) + */ + public ConditionQuery getConditionQueryAsInterface() { + return getConditionQuery(); + } + + // =================================================================================== + // Union + // ===== + /** + * Union. + *
+     * Add union query to condition bean.
+     * 
+ * @param unionQuery Union query. (NotNull) + */ + public void union(OrdersTotalCQ unionQuery) { + query().xsetUnionQuery(unionQuery); + } + + /** + * Union all. + *
+     * Add union all query to condition bean.
+     * 
+ * @param unionAllQuery Union all query. (NotNull) + */ + public void unionAll(OrdersTotalCQ unionAllQuery) { + query().xsetUnionAllQuery(unionAllQuery); + } + + public boolean hasUnionQueryOrUnionAllQuery() { + return query().hasUnionQueryOrUnionAllQuery(); + } + + // =================================================================================== + // Setup-Select + // ============ + + // =================================================================================== + // Basic Override + // ============== + /** + * This method overrides the method that is declared at super. + * + * @return Clause string. (NotNull) + */ + public String toString() { + return getSqlClause().getClause(); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/bs/BsProductsAttributesCB.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/bs/BsProductsAttributesCB.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/bs/BsProductsAttributesCB.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,204 @@ +package jp.sf.pal.pompei.cbean.bs; + + +import jp.sf.pal.pompei.allcommon.cbean.AbstractConditionBean; +import jp.sf.pal.pompei.allcommon.cbean.ConditionBean; +import jp.sf.pal.pompei.allcommon.cbean.ConditionQuery; + +import jp.sf.pal.pompei.cbean.cq.*; +import jp.sf.pal.pompei.cbean.nss.*; + +/** + * The condition-bean of PRODUCTS_ATTRIBUTES. + * + * @author DBFlute(AutoGenerator) + */ +public class BsProductsAttributesCB extends AbstractConditionBean { + + // =================================================================================== + // Annotation + // ========== + /** TABLE-Annotation */ + public static final String TABLE = "PRODUCTS_ATTRIBUTES"; + + // =================================================================================== + // Attribute + // ========= + /** Condition query. */ + protected ProductsAttributesCQ _conditionQuery; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + public BsProductsAttributesCB() { + } + + // /* * * * * * * * * * * * * * * * * * * * * * * + // MyTable = [PRODUCTS_ATTRIBUTES] + // * * * * * * * * */ + + // =================================================================================== + // Table Name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + final public String getTableDbName() { + return "PRODUCTS_ATTRIBUTES"; + } + + // =================================================================================== + // Accept Primary-Key + // ================== + /** + * This method implements the method that is declared at super. + * + * @param primaryKeyMap Primary key map. (NotNull and NotEmpty) + */ + public void acceptPrimaryKeyMap(java.util.Map primaryKeyMap) { + if (primaryKeyMap == null) { + String msg = "The argument[primaryKeyMap] must not be null."; + throw new IllegalArgumentException(msg); + } + if (primaryKeyMap.isEmpty()) { + String msg = "The argument[primaryKeyMap] must not be empty."; + throw new IllegalArgumentException(msg); + } + + if (!primaryKeyMap.containsKey("PRODUCTS_ATTRIBUTES_ID")) { + String msg = "The primaryKeyMap must have the value of PRODUCTS_ATTRIBUTES_ID"; + throw new IllegalStateException(msg + ": primaryKeyMap --> " + primaryKeyMap); + } + { + Object obj = primaryKeyMap.get("PRODUCTS_ATTRIBUTES_ID"); + if (obj instanceof java.math.BigDecimal) { + query().setProductsAttributesId_Equal((java.math.BigDecimal)obj); + } else { + + if (obj instanceof java.math.BigDecimal) { + query().setProductsAttributesId_Equal((java.math.BigDecimal)obj); + } else { + try { + query().setProductsAttributesId_Equal(new java.math.BigDecimal((String)obj)); + } catch (RuntimeException e) { + String msg = "setProductsAttributesId(new java.math.BigDecimal((String)obj))"; + throw new RuntimeException(msg + " threw the exception: value=[" + obj + "]", e); + } + } + } + } + + } + + // =================================================================================== + // Order-By + // ======== + /** + * This method implements the method that is declared at super. + * + * @return this. (NotNull) + */ + public ConditionBean addOrderBy_PK_Asc() { + + query().addOrderBy_ProductsAttributesId_Asc(); + + return this; + + } + + /** + * This method implements the method that is declared at super. + * + * @return this. (NotNull) + */ + public ConditionBean addOrderBy_PK_Desc() { + + query().addOrderBy_ProductsAttributesId_Desc(); + + return this; + + } + + // =================================================================================== + // Query + // ===== + /** + * Query. + * + * @return Instance of query. (NotNull) + */ + public ProductsAttributesCQ query() { + return getConditionQuery(); + } + + /** + * Get condition query. {Internal method for s2dao} + * + * @return Instance of condition query. (NotNull) + */ + public ProductsAttributesCQ getConditionQuery() { + if (_conditionQuery == null) { + _conditionQuery = new ProductsAttributesCQ(null, getSqlClause(), getTableDbName(), 0); + } + return _conditionQuery; + } + + /** + * This method implements the method that is declared at super. + * + * @return Instance of query as interface. (NotNull) + */ + public ConditionQuery getConditionQueryAsInterface() { + return getConditionQuery(); + } + + // =================================================================================== + // Union + // ===== + /** + * Union. + *
+     * Add union query to condition bean.
+     * 
+ * @param unionQuery Union query. (NotNull) + */ + public void union(ProductsAttributesCQ unionQuery) { + query().xsetUnionQuery(unionQuery); + } + + /** + * Union all. + *
+     * Add union all query to condition bean.
+     * 
+ * @param unionAllQuery Union all query. (NotNull) + */ + public void unionAll(ProductsAttributesCQ unionAllQuery) { + query().xsetUnionAllQuery(unionAllQuery); + } + + public boolean hasUnionQueryOrUnionAllQuery() { + return query().hasUnionQueryOrUnionAllQuery(); + } + + // =================================================================================== + // Setup-Select + // ============ + + // =================================================================================== + // Basic Override + // ============== + /** + * This method overrides the method that is declared at super. + * + * @return Clause string. (NotNull) + */ + public String toString() { + return getSqlClause().getClause(); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/bs/BsProductsAttributesDownloadCB.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/bs/BsProductsAttributesDownloadCB.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/bs/BsProductsAttributesDownloadCB.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,204 @@ +package jp.sf.pal.pompei.cbean.bs; + + +import jp.sf.pal.pompei.allcommon.cbean.AbstractConditionBean; +import jp.sf.pal.pompei.allcommon.cbean.ConditionBean; +import jp.sf.pal.pompei.allcommon.cbean.ConditionQuery; + +import jp.sf.pal.pompei.cbean.cq.*; +import jp.sf.pal.pompei.cbean.nss.*; + +/** + * The condition-bean of PRODUCTS_ATTRIBUTES_DOWNLOAD. + * + * @author DBFlute(AutoGenerator) + */ +public class BsProductsAttributesDownloadCB extends AbstractConditionBean { + + // =================================================================================== + // Annotation + // ========== + /** TABLE-Annotation */ + public static final String TABLE = "PRODUCTS_ATTRIBUTES_DOWNLOAD"; + + // =================================================================================== + // Attribute + // ========= + /** Condition query. */ + protected ProductsAttributesDownloadCQ _conditionQuery; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + public BsProductsAttributesDownloadCB() { + } + + // /* * * * * * * * * * * * * * * * * * * * * * * + // MyTable = [PRODUCTS_ATTRIBUTES_DOWNLOAD] + // * * * * * * * * */ + + // =================================================================================== + // Table Name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + final public String getTableDbName() { + return "PRODUCTS_ATTRIBUTES_DOWNLOAD"; + } + + // =================================================================================== + // Accept Primary-Key + // ================== + /** + * This method implements the method that is declared at super. + * + * @param primaryKeyMap Primary key map. (NotNull and NotEmpty) + */ + public void acceptPrimaryKeyMap(java.util.Map primaryKeyMap) { + if (primaryKeyMap == null) { + String msg = "The argument[primaryKeyMap] must not be null."; + throw new IllegalArgumentException(msg); + } + if (primaryKeyMap.isEmpty()) { + String msg = "The argument[primaryKeyMap] must not be empty."; + throw new IllegalArgumentException(msg); + } + + if (!primaryKeyMap.containsKey("PRODUCTS_ATTRIBUTES_ID")) { + String msg = "The primaryKeyMap must have the value of PRODUCTS_ATTRIBUTES_ID"; + throw new IllegalStateException(msg + ": primaryKeyMap --> " + primaryKeyMap); + } + { + Object obj = primaryKeyMap.get("PRODUCTS_ATTRIBUTES_ID"); + if (obj instanceof java.math.BigDecimal) { + query().setProductsAttributesId_Equal((java.math.BigDecimal)obj); + } else { + + if (obj instanceof java.math.BigDecimal) { + query().setProductsAttributesId_Equal((java.math.BigDecimal)obj); + } else { + try { + query().setProductsAttributesId_Equal(new java.math.BigDecimal((String)obj)); + } catch (RuntimeException e) { + String msg = "setProductsAttributesId(new java.math.BigDecimal((String)obj))"; + throw new RuntimeException(msg + " threw the exception: value=[" + obj + "]", e); + } + } + } + } + + } + + // =================================================================================== + // Order-By + // ======== + /** + * This method implements the method that is declared at super. + * + * @return this. (NotNull) + */ + public ConditionBean addOrderBy_PK_Asc() { + + query().addOrderBy_ProductsAttributesId_Asc(); + + return this; + + } + + /** + * This method implements the method that is declared at super. + * + * @return this. (NotNull) + */ + public ConditionBean addOrderBy_PK_Desc() { + + query().addOrderBy_ProductsAttributesId_Desc(); + + return this; + + } + + // =================================================================================== + // Query + // ===== + /** + * Query. + * + * @return Instance of query. (NotNull) + */ + public ProductsAttributesDownloadCQ query() { + return getConditionQuery(); + } + + /** + * Get condition query. {Internal method for s2dao} + * + * @return Instance of condition query. (NotNull) + */ + public ProductsAttributesDownloadCQ getConditionQuery() { + if (_conditionQuery == null) { + _conditionQuery = new ProductsAttributesDownloadCQ(null, getSqlClause(), getTableDbName(), 0); + } + return _conditionQuery; + } + + /** + * This method implements the method that is declared at super. + * + * @return Instance of query as interface. (NotNull) + */ + public ConditionQuery getConditionQueryAsInterface() { + return getConditionQuery(); + } + + // =================================================================================== + // Union + // ===== + /** + * Union. + *
+     * Add union query to condition bean.
+     * 
+ * @param unionQuery Union query. (NotNull) + */ + public void union(ProductsAttributesDownloadCQ unionQuery) { + query().xsetUnionQuery(unionQuery); + } + + /** + * Union all. + *
+     * Add union all query to condition bean.
+     * 
+ * @param unionAllQuery Union all query. (NotNull) + */ + public void unionAll(ProductsAttributesDownloadCQ unionAllQuery) { + query().xsetUnionAllQuery(unionAllQuery); + } + + public boolean hasUnionQueryOrUnionAllQuery() { + return query().hasUnionQueryOrUnionAllQuery(); + } + + // =================================================================================== + // Setup-Select + // ============ + + // =================================================================================== + // Basic Override + // ============== + /** + * This method overrides the method that is declared at super. + * + * @return Clause string. (NotNull) + */ + public String toString() { + return getSqlClause().getClause(); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/bs/BsProductsCB.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/bs/BsProductsCB.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/bs/BsProductsCB.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,204 @@ +package jp.sf.pal.pompei.cbean.bs; + + +import jp.sf.pal.pompei.allcommon.cbean.AbstractConditionBean; +import jp.sf.pal.pompei.allcommon.cbean.ConditionBean; +import jp.sf.pal.pompei.allcommon.cbean.ConditionQuery; + +import jp.sf.pal.pompei.cbean.cq.*; +import jp.sf.pal.pompei.cbean.nss.*; + +/** + * The condition-bean of PRODUCTS. + * + * @author DBFlute(AutoGenerator) + */ +public class BsProductsCB extends AbstractConditionBean { + + // =================================================================================== + // Annotation + // ========== + /** TABLE-Annotation */ + public static final String TABLE = "PRODUCTS"; + + // =================================================================================== + // Attribute + // ========= + /** Condition query. */ + protected ProductsCQ _conditionQuery; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + public BsProductsCB() { + } + + // /* * * * * * * * * * * * * * * * * * * * * * * + // MyTable = [PRODUCTS] + // * * * * * * * * */ + + // =================================================================================== + // Table Name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + final public String getTableDbName() { + return "PRODUCTS"; + } + + // =================================================================================== + // Accept Primary-Key + // ================== + /** + * This method implements the method that is declared at super. + * + * @param primaryKeyMap Primary key map. (NotNull and NotEmpty) + */ + public void acceptPrimaryKeyMap(java.util.Map primaryKeyMap) { + if (primaryKeyMap == null) { + String msg = "The argument[primaryKeyMap] must not be null."; + throw new IllegalArgumentException(msg); + } + if (primaryKeyMap.isEmpty()) { + String msg = "The argument[primaryKeyMap] must not be empty."; + throw new IllegalArgumentException(msg); + } + + if (!primaryKeyMap.containsKey("PRODUCTS_ID")) { + String msg = "The primaryKeyMap must have the value of PRODUCTS_ID"; + throw new IllegalStateException(msg + ": primaryKeyMap --> " + primaryKeyMap); + } + { + Object obj = primaryKeyMap.get("PRODUCTS_ID"); + if (obj instanceof java.math.BigDecimal) { + query().setProductsId_Equal((java.math.BigDecimal)obj); + } else { + + if (obj instanceof java.math.BigDecimal) { + query().setProductsId_Equal((java.math.BigDecimal)obj); + } else { + try { + query().setProductsId_Equal(new java.math.BigDecimal((String)obj)); + } catch (RuntimeException e) { + String msg = "setProductsId(new java.math.BigDecimal((String)obj))"; + throw new RuntimeException(msg + " threw the exception: value=[" + obj + "]", e); + } + } + } + } + + } + + // =================================================================================== + // Order-By + // ======== + /** + * This method implements the method that is declared at super. + * + * @return this. (NotNull) + */ + public ConditionBean addOrderBy_PK_Asc() { + + query().addOrderBy_ProductsId_Asc(); + + return this; + + } + + /** + * This method implements the method that is declared at super. + * + * @return this. (NotNull) + */ + public ConditionBean addOrderBy_PK_Desc() { + + query().addOrderBy_ProductsId_Desc(); + + return this; + + } + + // =================================================================================== + // Query + // ===== + /** + * Query. + * + * @return Instance of query. (NotNull) + */ + public ProductsCQ query() { + return getConditionQuery(); + } + + /** + * Get condition query. {Internal method for s2dao} + * + * @return Instance of condition query. (NotNull) + */ + public ProductsCQ getConditionQuery() { + if (_conditionQuery == null) { + _conditionQuery = new ProductsCQ(null, getSqlClause(), getTableDbName(), 0); + } + return _conditionQuery; + } + + /** + * This method implements the method that is declared at super. + * + * @return Instance of query as interface. (NotNull) + */ + public ConditionQuery getConditionQueryAsInterface() { + return getConditionQuery(); + } + + // =================================================================================== + // Union + // ===== + /** + * Union. + *
+     * Add union query to condition bean.
+     * 
+ * @param unionQuery Union query. (NotNull) + */ + public void union(ProductsCQ unionQuery) { + query().xsetUnionQuery(unionQuery); + } + + /** + * Union all. + *
+     * Add union all query to condition bean.
+     * 
+ * @param unionAllQuery Union all query. (NotNull) + */ + public void unionAll(ProductsCQ unionAllQuery) { + query().xsetUnionAllQuery(unionAllQuery); + } + + public boolean hasUnionQueryOrUnionAllQuery() { + return query().hasUnionQueryOrUnionAllQuery(); + } + + // =================================================================================== + // Setup-Select + // ============ + + // =================================================================================== + // Basic Override + // ============== + /** + * This method overrides the method that is declared at super. + * + * @return Clause string. (NotNull) + */ + public String toString() { + return getSqlClause().getClause(); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/bs/BsProductsDescriptionCB.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/bs/BsProductsDescriptionCB.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/bs/BsProductsDescriptionCB.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,231 @@ +package jp.sf.pal.pompei.cbean.bs; + + +import jp.sf.pal.pompei.allcommon.cbean.AbstractConditionBean; +import jp.sf.pal.pompei.allcommon.cbean.ConditionBean; +import jp.sf.pal.pompei.allcommon.cbean.ConditionQuery; + +import jp.sf.pal.pompei.cbean.cq.*; +import jp.sf.pal.pompei.cbean.nss.*; + +/** + * The condition-bean of PRODUCTS_DESCRIPTION. + * + * @author DBFlute(AutoGenerator) + */ +public class BsProductsDescriptionCB extends AbstractConditionBean { + + // =================================================================================== + // Annotation + // ========== + /** TABLE-Annotation */ + public static final String TABLE = "PRODUCTS_DESCRIPTION"; + + // =================================================================================== + // Attribute + // ========= + /** Condition query. */ + protected ProductsDescriptionCQ _conditionQuery; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + public BsProductsDescriptionCB() { + } + + // /* * * * * * * * * * * * * * * * * * * * * * * + // MyTable = [PRODUCTS_DESCRIPTION] + // * * * * * * * * */ + + // =================================================================================== + // Table Name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + final public String getTableDbName() { + return "PRODUCTS_DESCRIPTION"; + } + + // =================================================================================== + // Accept Primary-Key + // ================== + /** + * This method implements the method that is declared at super. + * + * @param primaryKeyMap Primary key map. (NotNull and NotEmpty) + */ + public void acceptPrimaryKeyMap(java.util.Map primaryKeyMap) { + if (primaryKeyMap == null) { + String msg = "The argument[primaryKeyMap] must not be null."; + throw new IllegalArgumentException(msg); + } + if (primaryKeyMap.isEmpty()) { + String msg = "The argument[primaryKeyMap] must not be empty."; + throw new IllegalArgumentException(msg); + } + + if (!primaryKeyMap.containsKey("PRODUCTS_ID")) { + String msg = "The primaryKeyMap must have the value of PRODUCTS_ID"; + throw new IllegalStateException(msg + ": primaryKeyMap --> " + primaryKeyMap); + } + { + Object obj = primaryKeyMap.get("PRODUCTS_ID"); + if (obj instanceof java.math.BigDecimal) { + query().setProductsId_Equal((java.math.BigDecimal)obj); + } else { + + if (obj instanceof java.math.BigDecimal) { + query().setProductsId_Equal((java.math.BigDecimal)obj); + } else { + try { + query().setProductsId_Equal(new java.math.BigDecimal((String)obj)); + } catch (RuntimeException e) { + String msg = "setProductsId(new java.math.BigDecimal((String)obj))"; + throw new RuntimeException(msg + " threw the exception: value=[" + obj + "]", e); + } + } + } + } + + if (!primaryKeyMap.containsKey("LANGUAGE_ID")) { + String msg = "The primaryKeyMap must have the value of LANGUAGE_ID"; + throw new IllegalStateException(msg + ": primaryKeyMap --> " + primaryKeyMap); + } + { + Object obj = primaryKeyMap.get("LANGUAGE_ID"); + if (obj instanceof java.math.BigDecimal) { + query().setLanguageId_Equal((java.math.BigDecimal)obj); + } else { + + if (obj instanceof java.math.BigDecimal) { + query().setLanguageId_Equal((java.math.BigDecimal)obj); + } else { + try { + query().setLanguageId_Equal(new java.math.BigDecimal((String)obj)); + } catch (RuntimeException e) { + String msg = "setLanguageId(new java.math.BigDecimal((String)obj))"; + throw new RuntimeException(msg + " threw the exception: value=[" + obj + "]", e); + } + } + } + } + + } + + // =================================================================================== + // Order-By + // ======== + /** + * This method implements the method that is declared at super. + * + * @return this. (NotNull) + */ + public ConditionBean addOrderBy_PK_Asc() { + + query().addOrderBy_ProductsId_Asc(); + + query().addOrderBy_LanguageId_Asc(); + + return this; + + } + + /** + * This method implements the method that is declared at super. + * + * @return this. (NotNull) + */ + public ConditionBean addOrderBy_PK_Desc() { + + query().addOrderBy_ProductsId_Desc(); + + query().addOrderBy_LanguageId_Desc(); + + return this; + + } + + // =================================================================================== + // Query + // ===== + /** + * Query. + * + * @return Instance of query. (NotNull) + */ + public ProductsDescriptionCQ query() { + return getConditionQuery(); + } + + /** + * Get condition query. {Internal method for s2dao} + * + * @return Instance of condition query. (NotNull) + */ + public ProductsDescriptionCQ getConditionQuery() { + if (_conditionQuery == null) { + _conditionQuery = new ProductsDescriptionCQ(null, getSqlClause(), getTableDbName(), 0); + } + return _conditionQuery; + } + + /** + * This method implements the method that is declared at super. + * + * @return Instance of query as interface. (NotNull) + */ + public ConditionQuery getConditionQueryAsInterface() { + return getConditionQuery(); + } + + // =================================================================================== + // Union + // ===== + /** + * Union. + *
+     * Add union query to condition bean.
+     * 
+ * @param unionQuery Union query. (NotNull) + */ + public void union(ProductsDescriptionCQ unionQuery) { + query().xsetUnionQuery(unionQuery); + } + + /** + * Union all. + *
+     * Add union all query to condition bean.
+     * 
+ * @param unionAllQuery Union all query. (NotNull) + */ + public void unionAll(ProductsDescriptionCQ unionAllQuery) { + query().xsetUnionAllQuery(unionAllQuery); + } + + public boolean hasUnionQueryOrUnionAllQuery() { + return query().hasUnionQueryOrUnionAllQuery(); + } + + // =================================================================================== + // Setup-Select + // ============ + + // =================================================================================== + // Basic Override + // ============== + /** + * This method overrides the method that is declared at super. + * + * @return Clause string. (NotNull) + */ + public String toString() { + return getSqlClause().getClause(); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/bs/BsProductsNotificationsCB.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/bs/BsProductsNotificationsCB.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/bs/BsProductsNotificationsCB.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,231 @@ +package jp.sf.pal.pompei.cbean.bs; + + +import jp.sf.pal.pompei.allcommon.cbean.AbstractConditionBean; +import jp.sf.pal.pompei.allcommon.cbean.ConditionBean; +import jp.sf.pal.pompei.allcommon.cbean.ConditionQuery; + +import jp.sf.pal.pompei.cbean.cq.*; +import jp.sf.pal.pompei.cbean.nss.*; + +/** + * The condition-bean of PRODUCTS_NOTIFICATIONS. + * + * @author DBFlute(AutoGenerator) + */ +public class BsProductsNotificationsCB extends AbstractConditionBean { + + // =================================================================================== + // Annotation + // ========== + /** TABLE-Annotation */ + public static final String TABLE = "PRODUCTS_NOTIFICATIONS"; + + // =================================================================================== + // Attribute + // ========= + /** Condition query. */ + protected ProductsNotificationsCQ _conditionQuery; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + public BsProductsNotificationsCB() { + } + + // /* * * * * * * * * * * * * * * * * * * * * * * + // MyTable = [PRODUCTS_NOTIFICATIONS] + // * * * * * * * * */ + + // =================================================================================== + // Table Name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + final public String getTableDbName() { + return "PRODUCTS_NOTIFICATIONS"; + } + + // =================================================================================== + // Accept Primary-Key + // ================== + /** + * This method implements the method that is declared at super. + * + * @param primaryKeyMap Primary key map. (NotNull and NotEmpty) + */ + public void acceptPrimaryKeyMap(java.util.Map primaryKeyMap) { + if (primaryKeyMap == null) { + String msg = "The argument[primaryKeyMap] must not be null."; + throw new IllegalArgumentException(msg); + } + if (primaryKeyMap.isEmpty()) { + String msg = "The argument[primaryKeyMap] must not be empty."; + throw new IllegalArgumentException(msg); + } + + if (!primaryKeyMap.containsKey("PRODUCTS_ID")) { + String msg = "The primaryKeyMap must have the value of PRODUCTS_ID"; + throw new IllegalStateException(msg + ": primaryKeyMap --> " + primaryKeyMap); + } + { + Object obj = primaryKeyMap.get("PRODUCTS_ID"); + if (obj instanceof java.math.BigDecimal) { + query().setProductsId_Equal((java.math.BigDecimal)obj); + } else { + + if (obj instanceof java.math.BigDecimal) { + query().setProductsId_Equal((java.math.BigDecimal)obj); + } else { + try { + query().setProductsId_Equal(new java.math.BigDecimal((String)obj)); + } catch (RuntimeException e) { + String msg = "setProductsId(new java.math.BigDecimal((String)obj))"; + throw new RuntimeException(msg + " threw the exception: value=[" + obj + "]", e); + } + } + } + } + + if (!primaryKeyMap.containsKey("CUSTOMERS_ID")) { + String msg = "The primaryKeyMap must have the value of CUSTOMERS_ID"; + throw new IllegalStateException(msg + ": primaryKeyMap --> " + primaryKeyMap); + } + { + Object obj = primaryKeyMap.get("CUSTOMERS_ID"); + if (obj instanceof java.math.BigDecimal) { + query().setCustomersId_Equal((java.math.BigDecimal)obj); + } else { + + if (obj instanceof java.math.BigDecimal) { + query().setCustomersId_Equal((java.math.BigDecimal)obj); + } else { + try { + query().setCustomersId_Equal(new java.math.BigDecimal((String)obj)); + } catch (RuntimeException e) { + String msg = "setCustomersId(new java.math.BigDecimal((String)obj))"; + throw new RuntimeException(msg + " threw the exception: value=[" + obj + "]", e); + } + } + } + } + + } + + // =================================================================================== + // Order-By + // ======== + /** + * This method implements the method that is declared at super. + * + * @return this. (NotNull) + */ + public ConditionBean addOrderBy_PK_Asc() { + + query().addOrderBy_ProductsId_Asc(); + + query().addOrderBy_CustomersId_Asc(); + + return this; + + } + + /** + * This method implements the method that is declared at super. + * + * @return this. (NotNull) + */ + public ConditionBean addOrderBy_PK_Desc() { + + query().addOrderBy_ProductsId_Desc(); + + query().addOrderBy_CustomersId_Desc(); + + return this; + + } + + // =================================================================================== + // Query + // ===== + /** + * Query. + * + * @return Instance of query. (NotNull) + */ + public ProductsNotificationsCQ query() { + return getConditionQuery(); + } + + /** + * Get condition query. {Internal method for s2dao} + * + * @return Instance of condition query. (NotNull) + */ + public ProductsNotificationsCQ getConditionQuery() { + if (_conditionQuery == null) { + _conditionQuery = new ProductsNotificationsCQ(null, getSqlClause(), getTableDbName(), 0); + } + return _conditionQuery; + } + + /** + * This method implements the method that is declared at super. + * + * @return Instance of query as interface. (NotNull) + */ + public ConditionQuery getConditionQueryAsInterface() { + return getConditionQuery(); + } + + // =================================================================================== + // Union + // ===== + /** + * Union. + *
+     * Add union query to condition bean.
+     * 
+ * @param unionQuery Union query. (NotNull) + */ + public void union(ProductsNotificationsCQ unionQuery) { + query().xsetUnionQuery(unionQuery); + } + + /** + * Union all. + *
+     * Add union all query to condition bean.
+     * 
+ * @param unionAllQuery Union all query. (NotNull) + */ + public void unionAll(ProductsNotificationsCQ unionAllQuery) { + query().xsetUnionAllQuery(unionAllQuery); + } + + public boolean hasUnionQueryOrUnionAllQuery() { + return query().hasUnionQueryOrUnionAllQuery(); + } + + // =================================================================================== + // Setup-Select + // ============ + + // =================================================================================== + // Basic Override + // ============== + /** + * This method overrides the method that is declared at super. + * + * @return Clause string. (NotNull) + */ + public String toString() { + return getSqlClause().getClause(); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/bs/BsProductsOptionsCB.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/bs/BsProductsOptionsCB.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/bs/BsProductsOptionsCB.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,231 @@ +package jp.sf.pal.pompei.cbean.bs; + + +import jp.sf.pal.pompei.allcommon.cbean.AbstractConditionBean; +import jp.sf.pal.pompei.allcommon.cbean.ConditionBean; +import jp.sf.pal.pompei.allcommon.cbean.ConditionQuery; + +import jp.sf.pal.pompei.cbean.cq.*; +import jp.sf.pal.pompei.cbean.nss.*; + +/** + * The condition-bean of PRODUCTS_OPTIONS. + * + * @author DBFlute(AutoGenerator) + */ +public class BsProductsOptionsCB extends AbstractConditionBean { + + // =================================================================================== + // Annotation + // ========== + /** TABLE-Annotation */ + public static final String TABLE = "PRODUCTS_OPTIONS"; + + // =================================================================================== + // Attribute + // ========= + /** Condition query. */ + protected ProductsOptionsCQ _conditionQuery; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + public BsProductsOptionsCB() { + } + + // /* * * * * * * * * * * * * * * * * * * * * * * + // MyTable = [PRODUCTS_OPTIONS] + // * * * * * * * * */ + + // =================================================================================== + // Table Name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + final public String getTableDbName() { + return "PRODUCTS_OPTIONS"; + } + + // =================================================================================== + // Accept Primary-Key + // ================== + /** + * This method implements the method that is declared at super. + * + * @param primaryKeyMap Primary key map. (NotNull and NotEmpty) + */ + public void acceptPrimaryKeyMap(java.util.Map primaryKeyMap) { + if (primaryKeyMap == null) { + String msg = "The argument[primaryKeyMap] must not be null."; + throw new IllegalArgumentException(msg); + } + if (primaryKeyMap.isEmpty()) { + String msg = "The argument[primaryKeyMap] must not be empty."; + throw new IllegalArgumentException(msg); + } + + if (!primaryKeyMap.containsKey("PRODUCTS_OPTIONS_ID")) { + String msg = "The primaryKeyMap must have the value of PRODUCTS_OPTIONS_ID"; + throw new IllegalStateException(msg + ": primaryKeyMap --> " + primaryKeyMap); + } + { + Object obj = primaryKeyMap.get("PRODUCTS_OPTIONS_ID"); + if (obj instanceof java.math.BigDecimal) { + query().setProductsOptionsId_Equal((java.math.BigDecimal)obj); + } else { + + if (obj instanceof java.math.BigDecimal) { + query().setProductsOptionsId_Equal((java.math.BigDecimal)obj); + } else { + try { + query().setProductsOptionsId_Equal(new java.math.BigDecimal((String)obj)); + } catch (RuntimeException e) { + String msg = "setProductsOptionsId(new java.math.BigDecimal((String)obj))"; + throw new RuntimeException(msg + " threw the exception: value=[" + obj + "]", e); + } + } + } + } + + if (!primaryKeyMap.containsKey("LANGUAGE_ID")) { + String msg = "The primaryKeyMap must have the value of LANGUAGE_ID"; + throw new IllegalStateException(msg + ": primaryKeyMap --> " + primaryKeyMap); + } + { + Object obj = primaryKeyMap.get("LANGUAGE_ID"); + if (obj instanceof java.math.BigDecimal) { + query().setLanguageId_Equal((java.math.BigDecimal)obj); + } else { + + if (obj instanceof java.math.BigDecimal) { + query().setLanguageId_Equal((java.math.BigDecimal)obj); + } else { + try { + query().setLanguageId_Equal(new java.math.BigDecimal((String)obj)); + } catch (RuntimeException e) { + String msg = "setLanguageId(new java.math.BigDecimal((String)obj))"; + throw new RuntimeException(msg + " threw the exception: value=[" + obj + "]", e); + } + } + } + } + + } + + // =================================================================================== + // Order-By + // ======== + /** + * This method implements the method that is declared at super. + * + * @return this. (NotNull) + */ + public ConditionBean addOrderBy_PK_Asc() { + + query().addOrderBy_ProductsOptionsId_Asc(); + + query().addOrderBy_LanguageId_Asc(); + + return this; + + } + + /** + * This method implements the method that is declared at super. + * + * @return this. (NotNull) + */ + public ConditionBean addOrderBy_PK_Desc() { + + query().addOrderBy_ProductsOptionsId_Desc(); + + query().addOrderBy_LanguageId_Desc(); + + return this; + + } + + // =================================================================================== + // Query + // ===== + /** + * Query. + * + * @return Instance of query. (NotNull) + */ + public ProductsOptionsCQ query() { + return getConditionQuery(); + } + + /** + * Get condition query. {Internal method for s2dao} + * + * @return Instance of condition query. (NotNull) + */ + public ProductsOptionsCQ getConditionQuery() { + if (_conditionQuery == null) { + _conditionQuery = new ProductsOptionsCQ(null, getSqlClause(), getTableDbName(), 0); + } + return _conditionQuery; + } + + /** + * This method implements the method that is declared at super. + * + * @return Instance of query as interface. (NotNull) + */ + public ConditionQuery getConditionQueryAsInterface() { + return getConditionQuery(); + } + + // =================================================================================== + // Union + // ===== + /** + * Union. + *
+     * Add union query to condition bean.
+     * 
+ * @param unionQuery Union query. (NotNull) + */ + public void union(ProductsOptionsCQ unionQuery) { + query().xsetUnionQuery(unionQuery); + } + + /** + * Union all. + *
+     * Add union all query to condition bean.
+     * 
+ * @param unionAllQuery Union all query. (NotNull) + */ + public void unionAll(ProductsOptionsCQ unionAllQuery) { + query().xsetUnionAllQuery(unionAllQuery); + } + + public boolean hasUnionQueryOrUnionAllQuery() { + return query().hasUnionQueryOrUnionAllQuery(); + } + + // =================================================================================== + // Setup-Select + // ============ + + // =================================================================================== + // Basic Override + // ============== + /** + * This method overrides the method that is declared at super. + * + * @return Clause string. (NotNull) + */ + public String toString() { + return getSqlClause().getClause(); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/bs/BsProductsOptionsValuesCB.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/bs/BsProductsOptionsValuesCB.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/bs/BsProductsOptionsValuesCB.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,231 @@ +package jp.sf.pal.pompei.cbean.bs; + + +import jp.sf.pal.pompei.allcommon.cbean.AbstractConditionBean; +import jp.sf.pal.pompei.allcommon.cbean.ConditionBean; +import jp.sf.pal.pompei.allcommon.cbean.ConditionQuery; + +import jp.sf.pal.pompei.cbean.cq.*; +import jp.sf.pal.pompei.cbean.nss.*; + +/** + * The condition-bean of PRODUCTS_OPTIONS_VALUES. + * + * @author DBFlute(AutoGenerator) + */ +public class BsProductsOptionsValuesCB extends AbstractConditionBean { + + // =================================================================================== + // Annotation + // ========== + /** TABLE-Annotation */ + public static final String TABLE = "PRODUCTS_OPTIONS_VALUES"; + + // =================================================================================== + // Attribute + // ========= + /** Condition query. */ + protected ProductsOptionsValuesCQ _conditionQuery; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + public BsProductsOptionsValuesCB() { + } + + // /* * * * * * * * * * * * * * * * * * * * * * * + // MyTable = [PRODUCTS_OPTIONS_VALUES] + // * * * * * * * * */ + + // =================================================================================== + // Table Name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + final public String getTableDbName() { + return "PRODUCTS_OPTIONS_VALUES"; + } + + // =================================================================================== + // Accept Primary-Key + // ================== + /** + * This method implements the method that is declared at super. + * + * @param primaryKeyMap Primary key map. (NotNull and NotEmpty) + */ + public void acceptPrimaryKeyMap(java.util.Map primaryKeyMap) { + if (primaryKeyMap == null) { + String msg = "The argument[primaryKeyMap] must not be null."; + throw new IllegalArgumentException(msg); + } + if (primaryKeyMap.isEmpty()) { + String msg = "The argument[primaryKeyMap] must not be empty."; + throw new IllegalArgumentException(msg); + } + + if (!primaryKeyMap.containsKey("PRODUCTS_OPTIONS_VALUES_ID")) { + String msg = "The primaryKeyMap must have the value of PRODUCTS_OPTIONS_VALUES_ID"; + throw new IllegalStateException(msg + ": primaryKeyMap --> " + primaryKeyMap); + } + { + Object obj = primaryKeyMap.get("PRODUCTS_OPTIONS_VALUES_ID"); + if (obj instanceof java.math.BigDecimal) { + query().setProductsOptionsValuesId_Equal((java.math.BigDecimal)obj); + } else { + + if (obj instanceof java.math.BigDecimal) { + query().setProductsOptionsValuesId_Equal((java.math.BigDecimal)obj); + } else { + try { + query().setProductsOptionsValuesId_Equal(new java.math.BigDecimal((String)obj)); + } catch (RuntimeException e) { + String msg = "setProductsOptionsValuesId(new java.math.BigDecimal((String)obj))"; + throw new RuntimeException(msg + " threw the exception: value=[" + obj + "]", e); + } + } + } + } + + if (!primaryKeyMap.containsKey("LANGUAGE_ID")) { + String msg = "The primaryKeyMap must have the value of LANGUAGE_ID"; + throw new IllegalStateException(msg + ": primaryKeyMap --> " + primaryKeyMap); + } + { + Object obj = primaryKeyMap.get("LANGUAGE_ID"); + if (obj instanceof java.math.BigDecimal) { + query().setLanguageId_Equal((java.math.BigDecimal)obj); + } else { + + if (obj instanceof java.math.BigDecimal) { + query().setLanguageId_Equal((java.math.BigDecimal)obj); + } else { + try { + query().setLanguageId_Equal(new java.math.BigDecimal((String)obj)); + } catch (RuntimeException e) { + String msg = "setLanguageId(new java.math.BigDecimal((String)obj))"; + throw new RuntimeException(msg + " threw the exception: value=[" + obj + "]", e); + } + } + } + } + + } + + // =================================================================================== + // Order-By + // ======== + /** + * This method implements the method that is declared at super. + * + * @return this. (NotNull) + */ + public ConditionBean addOrderBy_PK_Asc() { + + query().addOrderBy_ProductsOptionsValuesId_Asc(); + + query().addOrderBy_LanguageId_Asc(); + + return this; + + } + + /** + * This method implements the method that is declared at super. + * + * @return this. (NotNull) + */ + public ConditionBean addOrderBy_PK_Desc() { + + query().addOrderBy_ProductsOptionsValuesId_Desc(); + + query().addOrderBy_LanguageId_Desc(); + + return this; + + } + + // =================================================================================== + // Query + // ===== + /** + * Query. + * + * @return Instance of query. (NotNull) + */ + public ProductsOptionsValuesCQ query() { + return getConditionQuery(); + } + + /** + * Get condition query. {Internal method for s2dao} + * + * @return Instance of condition query. (NotNull) + */ + public ProductsOptionsValuesCQ getConditionQuery() { + if (_conditionQuery == null) { + _conditionQuery = new ProductsOptionsValuesCQ(null, getSqlClause(), getTableDbName(), 0); + } + return _conditionQuery; + } + + /** + * This method implements the method that is declared at super. + * + * @return Instance of query as interface. (NotNull) + */ + public ConditionQuery getConditionQueryAsInterface() { + return getConditionQuery(); + } + + // =================================================================================== + // Union + // ===== + /** + * Union. + *
+     * Add union query to condition bean.
+     * 
+ * @param unionQuery Union query. (NotNull) + */ + public void union(ProductsOptionsValuesCQ unionQuery) { + query().xsetUnionQuery(unionQuery); + } + + /** + * Union all. + *
+     * Add union all query to condition bean.
+     * 
+ * @param unionAllQuery Union all query. (NotNull) + */ + public void unionAll(ProductsOptionsValuesCQ unionAllQuery) { + query().xsetUnionAllQuery(unionAllQuery); + } + + public boolean hasUnionQueryOrUnionAllQuery() { + return query().hasUnionQueryOrUnionAllQuery(); + } + + // =================================================================================== + // Setup-Select + // ============ + + // =================================================================================== + // Basic Override + // ============== + /** + * This method overrides the method that is declared at super. + * + * @return Clause string. (NotNull) + */ + public String toString() { + return getSqlClause().getClause(); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/bs/BsProductsOptionsValuesToProductsOptionsCB.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/bs/BsProductsOptionsValuesToProductsOptionsCB.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/bs/BsProductsOptionsValuesToProductsOptionsCB.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,204 @@ +package jp.sf.pal.pompei.cbean.bs; + + +import jp.sf.pal.pompei.allcommon.cbean.AbstractConditionBean; +import jp.sf.pal.pompei.allcommon.cbean.ConditionBean; +import jp.sf.pal.pompei.allcommon.cbean.ConditionQuery; + +import jp.sf.pal.pompei.cbean.cq.*; +import jp.sf.pal.pompei.cbean.nss.*; + +/** + * The condition-bean of PRODUCTS_OPTIONS_VALUES_TO_PRODUCTS_OPTIONS. + * + * @author DBFlute(AutoGenerator) + */ +public class BsProductsOptionsValuesToProductsOptionsCB extends AbstractConditionBean { + + // =================================================================================== + // Annotation + // ========== + /** TABLE-Annotation */ + public static final String TABLE = "PRODUCTS_OPTIONS_VALUES_TO_PRODUCTS_OPTIONS"; + + // =================================================================================== + // Attribute + // ========= + /** Condition query. */ + protected ProductsOptionsValuesToProductsOptionsCQ _conditionQuery; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + public BsProductsOptionsValuesToProductsOptionsCB() { + } + + // /* * * * * * * * * * * * * * * * * * * * * * * + // MyTable = [PRODUCTS_OPTIONS_VALUES_TO_PRODUCTS_OPTIONS] + // * * * * * * * * */ + + // =================================================================================== + // Table Name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + final public String getTableDbName() { + return "PRODUCTS_OPTIONS_VALUES_TO_PRODUCTS_OPTIONS"; + } + + // =================================================================================== + // Accept Primary-Key + // ================== + /** + * This method implements the method that is declared at super. + * + * @param primaryKeyMap Primary key map. (NotNull and NotEmpty) + */ + public void acceptPrimaryKeyMap(java.util.Map primaryKeyMap) { + if (primaryKeyMap == null) { + String msg = "The argument[primaryKeyMap] must not be null."; + throw new IllegalArgumentException(msg); + } + if (primaryKeyMap.isEmpty()) { + String msg = "The argument[primaryKeyMap] must not be empty."; + throw new IllegalArgumentException(msg); + } + + if (!primaryKeyMap.containsKey("PRODUCTS_OPTIONS_VALUES_TO_PRODUCTS_OPTIONS_ID")) { + String msg = "The primaryKeyMap must have the value of PRODUCTS_OPTIONS_VALUES_TO_PRODUCTS_OPTIONS_ID"; + throw new IllegalStateException(msg + ": primaryKeyMap --> " + primaryKeyMap); + } + { + Object obj = primaryKeyMap.get("PRODUCTS_OPTIONS_VALUES_TO_PRODUCTS_OPTIONS_ID"); + if (obj instanceof java.math.BigDecimal) { + query().setProductsOptionsValuesToProductsOptionsId_Equal((java.math.BigDecimal)obj); + } else { + + if (obj instanceof java.math.BigDecimal) { + query().setProductsOptionsValuesToProductsOptionsId_Equal((java.math.BigDecimal)obj); + } else { + try { + query().setProductsOptionsValuesToProductsOptionsId_Equal(new java.math.BigDecimal((String)obj)); + } catch (RuntimeException e) { + String msg = "setProductsOptionsValuesToProductsOptionsId(new java.math.BigDecimal((String)obj))"; + throw new RuntimeException(msg + " threw the exception: value=[" + obj + "]", e); + } + } + } + } + + } + + // =================================================================================== + // Order-By + // ======== + /** + * This method implements the method that is declared at super. + * + * @return this. (NotNull) + */ + public ConditionBean addOrderBy_PK_Asc() { + + query().addOrderBy_ProductsOptionsValuesToProductsOptionsId_Asc(); + + return this; + + } + + /** + * This method implements the method that is declared at super. + * + * @return this. (NotNull) + */ + public ConditionBean addOrderBy_PK_Desc() { + + query().addOrderBy_ProductsOptionsValuesToProductsOptionsId_Desc(); + + return this; + + } + + // =================================================================================== + // Query + // ===== + /** + * Query. + * + * @return Instance of query. (NotNull) + */ + public ProductsOptionsValuesToProductsOptionsCQ query() { + return getConditionQuery(); + } + + /** + * Get condition query. {Internal method for s2dao} + * + * @return Instance of condition query. (NotNull) + */ + public ProductsOptionsValuesToProductsOptionsCQ getConditionQuery() { + if (_conditionQuery == null) { + _conditionQuery = new ProductsOptionsValuesToProductsOptionsCQ(null, getSqlClause(), getTableDbName(), 0); + } + return _conditionQuery; + } + + /** + * This method implements the method that is declared at super. + * + * @return Instance of query as interface. (NotNull) + */ + public ConditionQuery getConditionQueryAsInterface() { + return getConditionQuery(); + } + + // =================================================================================== + // Union + // ===== + /** + * Union. + *
+     * Add union query to condition bean.
+     * 
+ * @param unionQuery Union query. (NotNull) + */ + public void union(ProductsOptionsValuesToProductsOptionsCQ unionQuery) { + query().xsetUnionQuery(unionQuery); + } + + /** + * Union all. + *
+     * Add union all query to condition bean.
+     * 
+ * @param unionAllQuery Union all query. (NotNull) + */ + public void unionAll(ProductsOptionsValuesToProductsOptionsCQ unionAllQuery) { + query().xsetUnionAllQuery(unionAllQuery); + } + + public boolean hasUnionQueryOrUnionAllQuery() { + return query().hasUnionQueryOrUnionAllQuery(); + } + + // =================================================================================== + // Setup-Select + // ============ + + // =================================================================================== + // Basic Override + // ============== + /** + * This method overrides the method that is declared at super. + * + * @return Clause string. (NotNull) + */ + public String toString() { + return getSqlClause().getClause(); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/bs/BsProductsToCategoriesCB.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/bs/BsProductsToCategoriesCB.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/bs/BsProductsToCategoriesCB.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,231 @@ +package jp.sf.pal.pompei.cbean.bs; + + +import jp.sf.pal.pompei.allcommon.cbean.AbstractConditionBean; +import jp.sf.pal.pompei.allcommon.cbean.ConditionBean; +import jp.sf.pal.pompei.allcommon.cbean.ConditionQuery; + +import jp.sf.pal.pompei.cbean.cq.*; +import jp.sf.pal.pompei.cbean.nss.*; + +/** + * The condition-bean of PRODUCTS_TO_CATEGORIES. + * + * @author DBFlute(AutoGenerator) + */ +public class BsProductsToCategoriesCB extends AbstractConditionBean { + + // =================================================================================== + // Annotation + // ========== + /** TABLE-Annotation */ + public static final String TABLE = "PRODUCTS_TO_CATEGORIES"; + + // =================================================================================== + // Attribute + // ========= + /** Condition query. */ + protected ProductsToCategoriesCQ _conditionQuery; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + public BsProductsToCategoriesCB() { + } + + // /* * * * * * * * * * * * * * * * * * * * * * * + // MyTable = [PRODUCTS_TO_CATEGORIES] + // * * * * * * * * */ + + // =================================================================================== + // Table Name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + final public String getTableDbName() { + return "PRODUCTS_TO_CATEGORIES"; + } + + // =================================================================================== + // Accept Primary-Key + // ================== + /** + * This method implements the method that is declared at super. + * + * @param primaryKeyMap Primary key map. (NotNull and NotEmpty) + */ + public void acceptPrimaryKeyMap(java.util.Map primaryKeyMap) { + if (primaryKeyMap == null) { + String msg = "The argument[primaryKeyMap] must not be null."; + throw new IllegalArgumentException(msg); + } + if (primaryKeyMap.isEmpty()) { + String msg = "The argument[primaryKeyMap] must not be empty."; + throw new IllegalArgumentException(msg); + } + + if (!primaryKeyMap.containsKey("PRODUCTS_ID")) { + String msg = "The primaryKeyMap must have the value of PRODUCTS_ID"; + throw new IllegalStateException(msg + ": primaryKeyMap --> " + primaryKeyMap); + } + { + Object obj = primaryKeyMap.get("PRODUCTS_ID"); + if (obj instanceof java.math.BigDecimal) { + query().setProductsId_Equal((java.math.BigDecimal)obj); + } else { + + if (obj instanceof java.math.BigDecimal) { + query().setProductsId_Equal((java.math.BigDecimal)obj); + } else { + try { + query().setProductsId_Equal(new java.math.BigDecimal((String)obj)); + } catch (RuntimeException e) { + String msg = "setProductsId(new java.math.BigDecimal((String)obj))"; + throw new RuntimeException(msg + " threw the exception: value=[" + obj + "]", e); + } + } + } + } + + if (!primaryKeyMap.containsKey("CATEGORIES_ID")) { + String msg = "The primaryKeyMap must have the value of CATEGORIES_ID"; + throw new IllegalStateException(msg + ": primaryKeyMap --> " + primaryKeyMap); + } + { + Object obj = primaryKeyMap.get("CATEGORIES_ID"); + if (obj instanceof java.math.BigDecimal) { + query().setCategoriesId_Equal((java.math.BigDecimal)obj); + } else { + + if (obj instanceof java.math.BigDecimal) { + query().setCategoriesId_Equal((java.math.BigDecimal)obj); + } else { + try { + query().setCategoriesId_Equal(new java.math.BigDecimal((String)obj)); + } catch (RuntimeException e) { + String msg = "setCategoriesId(new java.math.BigDecimal((String)obj))"; + throw new RuntimeException(msg + " threw the exception: value=[" + obj + "]", e); + } + } + } + } + + } + + // =================================================================================== + // Order-By + // ======== + /** + * This method implements the method that is declared at super. + * + * @return this. (NotNull) + */ + public ConditionBean addOrderBy_PK_Asc() { + + query().addOrderBy_ProductsId_Asc(); + + query().addOrderBy_CategoriesId_Asc(); + + return this; + + } + + /** + * This method implements the method that is declared at super. + * + * @return this. (NotNull) + */ + public ConditionBean addOrderBy_PK_Desc() { + + query().addOrderBy_ProductsId_Desc(); + + query().addOrderBy_CategoriesId_Desc(); + + return this; + + } + + // =================================================================================== + // Query + // ===== + /** + * Query. + * + * @return Instance of query. (NotNull) + */ + public ProductsToCategoriesCQ query() { + return getConditionQuery(); + } + + /** + * Get condition query. {Internal method for s2dao} + * + * @return Instance of condition query. (NotNull) + */ + public ProductsToCategoriesCQ getConditionQuery() { + if (_conditionQuery == null) { + _conditionQuery = new ProductsToCategoriesCQ(null, getSqlClause(), getTableDbName(), 0); + } + return _conditionQuery; + } + + /** + * This method implements the method that is declared at super. + * + * @return Instance of query as interface. (NotNull) + */ + public ConditionQuery getConditionQueryAsInterface() { + return getConditionQuery(); + } + + // =================================================================================== + // Union + // ===== + /** + * Union. + *
+     * Add union query to condition bean.
+     * 
+ * @param unionQuery Union query. (NotNull) + */ + public void union(ProductsToCategoriesCQ unionQuery) { + query().xsetUnionQuery(unionQuery); + } + + /** + * Union all. + *
+     * Add union all query to condition bean.
+     * 
+ * @param unionAllQuery Union all query. (NotNull) + */ + public void unionAll(ProductsToCategoriesCQ unionAllQuery) { + query().xsetUnionAllQuery(unionAllQuery); + } + + public boolean hasUnionQueryOrUnionAllQuery() { + return query().hasUnionQueryOrUnionAllQuery(); + } + + // =================================================================================== + // Setup-Select + // ============ + + // =================================================================================== + // Basic Override + // ============== + /** + * This method overrides the method that is declared at super. + * + * @return Clause string. (NotNull) + */ + public String toString() { + return getSqlClause().getClause(); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/bs/BsReviewsCB.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/bs/BsReviewsCB.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/bs/BsReviewsCB.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,204 @@ +package jp.sf.pal.pompei.cbean.bs; + + +import jp.sf.pal.pompei.allcommon.cbean.AbstractConditionBean; +import jp.sf.pal.pompei.allcommon.cbean.ConditionBean; +import jp.sf.pal.pompei.allcommon.cbean.ConditionQuery; + +import jp.sf.pal.pompei.cbean.cq.*; +import jp.sf.pal.pompei.cbean.nss.*; + +/** + * The condition-bean of REVIEWS. + * + * @author DBFlute(AutoGenerator) + */ +public class BsReviewsCB extends AbstractConditionBean { + + // =================================================================================== + // Annotation + // ========== + /** TABLE-Annotation */ + public static final String TABLE = "REVIEWS"; + + // =================================================================================== + // Attribute + // ========= + /** Condition query. */ + protected ReviewsCQ _conditionQuery; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + public BsReviewsCB() { + } + + // /* * * * * * * * * * * * * * * * * * * * * * * + // MyTable = [REVIEWS] + // * * * * * * * * */ + + // =================================================================================== + // Table Name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + final public String getTableDbName() { + return "REVIEWS"; + } + + // =================================================================================== + // Accept Primary-Key + // ================== + /** + * This method implements the method that is declared at super. + * + * @param primaryKeyMap Primary key map. (NotNull and NotEmpty) + */ + public void acceptPrimaryKeyMap(java.util.Map primaryKeyMap) { + if (primaryKeyMap == null) { + String msg = "The argument[primaryKeyMap] must not be null."; + throw new IllegalArgumentException(msg); + } + if (primaryKeyMap.isEmpty()) { + String msg = "The argument[primaryKeyMap] must not be empty."; + throw new IllegalArgumentException(msg); + } + + if (!primaryKeyMap.containsKey("REVIEWS_ID")) { + String msg = "The primaryKeyMap must have the value of REVIEWS_ID"; + throw new IllegalStateException(msg + ": primaryKeyMap --> " + primaryKeyMap); + } + { + Object obj = primaryKeyMap.get("REVIEWS_ID"); + if (obj instanceof java.math.BigDecimal) { + query().setReviewsId_Equal((java.math.BigDecimal)obj); + } else { + + if (obj instanceof java.math.BigDecimal) { + query().setReviewsId_Equal((java.math.BigDecimal)obj); + } else { + try { + query().setReviewsId_Equal(new java.math.BigDecimal((String)obj)); + } catch (RuntimeException e) { + String msg = "setReviewsId(new java.math.BigDecimal((String)obj))"; + throw new RuntimeException(msg + " threw the exception: value=[" + obj + "]", e); + } + } + } + } + + } + + // =================================================================================== + // Order-By + // ======== + /** + * This method implements the method that is declared at super. + * + * @return this. (NotNull) + */ + public ConditionBean addOrderBy_PK_Asc() { + + query().addOrderBy_ReviewsId_Asc(); + + return this; + + } + + /** + * This method implements the method that is declared at super. + * + * @return this. (NotNull) + */ + public ConditionBean addOrderBy_PK_Desc() { + + query().addOrderBy_ReviewsId_Desc(); + + return this; + + } + + // =================================================================================== + // Query + // ===== + /** + * Query. + * + * @return Instance of query. (NotNull) + */ + public ReviewsCQ query() { + return getConditionQuery(); + } + + /** + * Get condition query. {Internal method for s2dao} + * + * @return Instance of condition query. (NotNull) + */ + public ReviewsCQ getConditionQuery() { + if (_conditionQuery == null) { + _conditionQuery = new ReviewsCQ(null, getSqlClause(), getTableDbName(), 0); + } + return _conditionQuery; + } + + /** + * This method implements the method that is declared at super. + * + * @return Instance of query as interface. (NotNull) + */ + public ConditionQuery getConditionQueryAsInterface() { + return getConditionQuery(); + } + + // =================================================================================== + // Union + // ===== + /** + * Union. + *
+     * Add union query to condition bean.
+     * 
+ * @param unionQuery Union query. (NotNull) + */ + public void union(ReviewsCQ unionQuery) { + query().xsetUnionQuery(unionQuery); + } + + /** + * Union all. + *
+     * Add union all query to condition bean.
+     * 
+ * @param unionAllQuery Union all query. (NotNull) + */ + public void unionAll(ReviewsCQ unionAllQuery) { + query().xsetUnionAllQuery(unionAllQuery); + } + + public boolean hasUnionQueryOrUnionAllQuery() { + return query().hasUnionQueryOrUnionAllQuery(); + } + + // =================================================================================== + // Setup-Select + // ============ + + // =================================================================================== + // Basic Override + // ============== + /** + * This method overrides the method that is declared at super. + * + * @return Clause string. (NotNull) + */ + public String toString() { + return getSqlClause().getClause(); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/bs/BsReviewsDescriptionCB.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/bs/BsReviewsDescriptionCB.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/bs/BsReviewsDescriptionCB.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,231 @@ +package jp.sf.pal.pompei.cbean.bs; + + +import jp.sf.pal.pompei.allcommon.cbean.AbstractConditionBean; +import jp.sf.pal.pompei.allcommon.cbean.ConditionBean; +import jp.sf.pal.pompei.allcommon.cbean.ConditionQuery; + +import jp.sf.pal.pompei.cbean.cq.*; +import jp.sf.pal.pompei.cbean.nss.*; + +/** + * The condition-bean of REVIEWS_DESCRIPTION. + * + * @author DBFlute(AutoGenerator) + */ +public class BsReviewsDescriptionCB extends AbstractConditionBean { + + // =================================================================================== + // Annotation + // ========== + /** TABLE-Annotation */ + public static final String TABLE = "REVIEWS_DESCRIPTION"; + + // =================================================================================== + // Attribute + // ========= + /** Condition query. */ + protected ReviewsDescriptionCQ _conditionQuery; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + public BsReviewsDescriptionCB() { + } + + // /* * * * * * * * * * * * * * * * * * * * * * * + // MyTable = [REVIEWS_DESCRIPTION] + // * * * * * * * * */ + + // =================================================================================== + // Table Name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + final public String getTableDbName() { + return "REVIEWS_DESCRIPTION"; + } + + // =================================================================================== + // Accept Primary-Key + // ================== + /** + * This method implements the method that is declared at super. + * + * @param primaryKeyMap Primary key map. (NotNull and NotEmpty) + */ + public void acceptPrimaryKeyMap(java.util.Map primaryKeyMap) { + if (primaryKeyMap == null) { + String msg = "The argument[primaryKeyMap] must not be null."; + throw new IllegalArgumentException(msg); + } + if (primaryKeyMap.isEmpty()) { + String msg = "The argument[primaryKeyMap] must not be empty."; + throw new IllegalArgumentException(msg); + } + + if (!primaryKeyMap.containsKey("REVIEWS_ID")) { + String msg = "The primaryKeyMap must have the value of REVIEWS_ID"; + throw new IllegalStateException(msg + ": primaryKeyMap --> " + primaryKeyMap); + } + { + Object obj = primaryKeyMap.get("REVIEWS_ID"); + if (obj instanceof java.math.BigDecimal) { + query().setReviewsId_Equal((java.math.BigDecimal)obj); + } else { + + if (obj instanceof java.math.BigDecimal) { + query().setReviewsId_Equal((java.math.BigDecimal)obj); + } else { + try { + query().setReviewsId_Equal(new java.math.BigDecimal((String)obj)); + } catch (RuntimeException e) { + String msg = "setReviewsId(new java.math.BigDecimal((String)obj))"; + throw new RuntimeException(msg + " threw the exception: value=[" + obj + "]", e); + } + } + } + } + + if (!primaryKeyMap.containsKey("LANGUAGES_ID")) { + String msg = "The primaryKeyMap must have the value of LANGUAGES_ID"; + throw new IllegalStateException(msg + ": primaryKeyMap --> " + primaryKeyMap); + } + { + Object obj = primaryKeyMap.get("LANGUAGES_ID"); + if (obj instanceof java.math.BigDecimal) { + query().setLanguagesId_Equal((java.math.BigDecimal)obj); + } else { + + if (obj instanceof java.math.BigDecimal) { + query().setLanguagesId_Equal((java.math.BigDecimal)obj); + } else { + try { + query().setLanguagesId_Equal(new java.math.BigDecimal((String)obj)); + } catch (RuntimeException e) { + String msg = "setLanguagesId(new java.math.BigDecimal((String)obj))"; + throw new RuntimeException(msg + " threw the exception: value=[" + obj + "]", e); + } + } + } + } + + } + + // =================================================================================== + // Order-By + // ======== + /** + * This method implements the method that is declared at super. + * + * @return this. (NotNull) + */ + public ConditionBean addOrderBy_PK_Asc() { + + query().addOrderBy_ReviewsId_Asc(); + + query().addOrderBy_LanguagesId_Asc(); + + return this; + + } + + /** + * This method implements the method that is declared at super. + * + * @return this. (NotNull) + */ + public ConditionBean addOrderBy_PK_Desc() { + + query().addOrderBy_ReviewsId_Desc(); + + query().addOrderBy_LanguagesId_Desc(); + + return this; + + } + + // =================================================================================== + // Query + // ===== + /** + * Query. + * + * @return Instance of query. (NotNull) + */ + public ReviewsDescriptionCQ query() { + return getConditionQuery(); + } + + /** + * Get condition query. {Internal method for s2dao} + * + * @return Instance of condition query. (NotNull) + */ + public ReviewsDescriptionCQ getConditionQuery() { + if (_conditionQuery == null) { + _conditionQuery = new ReviewsDescriptionCQ(null, getSqlClause(), getTableDbName(), 0); + } + return _conditionQuery; + } + + /** + * This method implements the method that is declared at super. + * + * @return Instance of query as interface. (NotNull) + */ + public ConditionQuery getConditionQueryAsInterface() { + return getConditionQuery(); + } + + // =================================================================================== + // Union + // ===== + /** + * Union. + *
+     * Add union query to condition bean.
+     * 
+ * @param unionQuery Union query. (NotNull) + */ + public void union(ReviewsDescriptionCQ unionQuery) { + query().xsetUnionQuery(unionQuery); + } + + /** + * Union all. + *
+     * Add union all query to condition bean.
+     * 
+ * @param unionAllQuery Union all query. (NotNull) + */ + public void unionAll(ReviewsDescriptionCQ unionAllQuery) { + query().xsetUnionAllQuery(unionAllQuery); + } + + public boolean hasUnionQueryOrUnionAllQuery() { + return query().hasUnionQueryOrUnionAllQuery(); + } + + // =================================================================================== + // Setup-Select + // ============ + + // =================================================================================== + // Basic Override + // ============== + /** + * This method overrides the method that is declared at super. + * + * @return Clause string. (NotNull) + */ + public String toString() { + return getSqlClause().getClause(); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/bs/BsSessionsCB.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/bs/BsSessionsCB.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/bs/BsSessionsCB.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,196 @@ +package jp.sf.pal.pompei.cbean.bs; + + +import jp.sf.pal.pompei.allcommon.cbean.AbstractConditionBean; +import jp.sf.pal.pompei.allcommon.cbean.ConditionBean; +import jp.sf.pal.pompei.allcommon.cbean.ConditionQuery; + +import jp.sf.pal.pompei.cbean.cq.*; +import jp.sf.pal.pompei.cbean.nss.*; + +/** + * The condition-bean of SESSIONS. + * + * @author DBFlute(AutoGenerator) + */ +public class BsSessionsCB extends AbstractConditionBean { + + // =================================================================================== + // Annotation + // ========== + /** TABLE-Annotation */ + public static final String TABLE = "SESSIONS"; + + // =================================================================================== + // Attribute + // ========= + /** Condition query. */ + protected SessionsCQ _conditionQuery; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + public BsSessionsCB() { + } + + // /* * * * * * * * * * * * * * * * * * * * * * * + // MyTable = [SESSIONS] + // * * * * * * * * */ + + // =================================================================================== + // Table Name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + final public String getTableDbName() { + return "SESSIONS"; + } + + // =================================================================================== + // Accept Primary-Key + // ================== + /** + * This method implements the method that is declared at super. + * + * @param primaryKeyMap Primary key map. (NotNull and NotEmpty) + */ + public void acceptPrimaryKeyMap(java.util.Map primaryKeyMap) { + if (primaryKeyMap == null) { + String msg = "The argument[primaryKeyMap] must not be null."; + throw new IllegalArgumentException(msg); + } + if (primaryKeyMap.isEmpty()) { + String msg = "The argument[primaryKeyMap] must not be empty."; + throw new IllegalArgumentException(msg); + } + + if (!primaryKeyMap.containsKey("SESSKEY")) { + String msg = "The primaryKeyMap must have the value of SESSKEY"; + throw new IllegalStateException(msg + ": primaryKeyMap --> " + primaryKeyMap); + } + { + Object obj = primaryKeyMap.get("SESSKEY"); + if (obj instanceof String) { + query().setSesskey_Equal((String)obj); + } else { + + checkTypeString(obj, "sesskey", "String"); + query().setSesskey_Equal((String)obj); + } + } + + } + + // =================================================================================== + // Order-By + // ======== + /** + * This method implements the method that is declared at super. + * + * @return this. (NotNull) + */ + public ConditionBean addOrderBy_PK_Asc() { + + query().addOrderBy_Sesskey_Asc(); + + return this; + + } + + /** + * This method implements the method that is declared at super. + * + * @return this. (NotNull) + */ + public ConditionBean addOrderBy_PK_Desc() { + + query().addOrderBy_Sesskey_Desc(); + + return this; + + } + + // =================================================================================== + // Query + // ===== + /** + * Query. + * + * @return Instance of query. (NotNull) + */ + public SessionsCQ query() { + return getConditionQuery(); + } + + /** + * Get condition query. {Internal method for s2dao} + * + * @return Instance of condition query. (NotNull) + */ + public SessionsCQ getConditionQuery() { + if (_conditionQuery == null) { + _conditionQuery = new SessionsCQ(null, getSqlClause(), getTableDbName(), 0); + } + return _conditionQuery; + } + + /** + * This method implements the method that is declared at super. + * + * @return Instance of query as interface. (NotNull) + */ + public ConditionQuery getConditionQueryAsInterface() { + return getConditionQuery(); + } + + // =================================================================================== + // Union + // ===== + /** + * Union. + *
+     * Add union query to condition bean.
+     * 
+ * @param unionQuery Union query. (NotNull) + */ + public void union(SessionsCQ unionQuery) { + query().xsetUnionQuery(unionQuery); + } + + /** + * Union all. + *
+     * Add union all query to condition bean.
+     * 
+ * @param unionAllQuery Union all query. (NotNull) + */ + public void unionAll(SessionsCQ unionAllQuery) { + query().xsetUnionAllQuery(unionAllQuery); + } + + public boolean hasUnionQueryOrUnionAllQuery() { + return query().hasUnionQueryOrUnionAllQuery(); + } + + // =================================================================================== + // Setup-Select + // ============ + + // =================================================================================== + // Basic Override + // ============== + /** + * This method overrides the method that is declared at super. + * + * @return Clause string. (NotNull) + */ + public String toString() { + return getSqlClause().getClause(); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/bs/BsSpecialsCB.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/bs/BsSpecialsCB.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/bs/BsSpecialsCB.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,204 @@ +package jp.sf.pal.pompei.cbean.bs; + + +import jp.sf.pal.pompei.allcommon.cbean.AbstractConditionBean; +import jp.sf.pal.pompei.allcommon.cbean.ConditionBean; +import jp.sf.pal.pompei.allcommon.cbean.ConditionQuery; + +import jp.sf.pal.pompei.cbean.cq.*; +import jp.sf.pal.pompei.cbean.nss.*; + +/** + * The condition-bean of SPECIALS. + * + * @author DBFlute(AutoGenerator) + */ +public class BsSpecialsCB extends AbstractConditionBean { + + // =================================================================================== + // Annotation + // ========== + /** TABLE-Annotation */ + public static final String TABLE = "SPECIALS"; + + // =================================================================================== + // Attribute + // ========= + /** Condition query. */ + protected SpecialsCQ _conditionQuery; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + public BsSpecialsCB() { + } + + // /* * * * * * * * * * * * * * * * * * * * * * * + // MyTable = [SPECIALS] + // * * * * * * * * */ + + // =================================================================================== + // Table Name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + final public String getTableDbName() { + return "SPECIALS"; + } + + // =================================================================================== + // Accept Primary-Key + // ================== + /** + * This method implements the method that is declared at super. + * + * @param primaryKeyMap Primary key map. (NotNull and NotEmpty) + */ + public void acceptPrimaryKeyMap(java.util.Map primaryKeyMap) { + if (primaryKeyMap == null) { + String msg = "The argument[primaryKeyMap] must not be null."; + throw new IllegalArgumentException(msg); + } + if (primaryKeyMap.isEmpty()) { + String msg = "The argument[primaryKeyMap] must not be empty."; + throw new IllegalArgumentException(msg); + } + + if (!primaryKeyMap.containsKey("SPECIALS_ID")) { + String msg = "The primaryKeyMap must have the value of SPECIALS_ID"; + throw new IllegalStateException(msg + ": primaryKeyMap --> " + primaryKeyMap); + } + { + Object obj = primaryKeyMap.get("SPECIALS_ID"); + if (obj instanceof java.math.BigDecimal) { + query().setSpecialsId_Equal((java.math.BigDecimal)obj); + } else { + + if (obj instanceof java.math.BigDecimal) { + query().setSpecialsId_Equal((java.math.BigDecimal)obj); + } else { + try { + query().setSpecialsId_Equal(new java.math.BigDecimal((String)obj)); + } catch (RuntimeException e) { + String msg = "setSpecialsId(new java.math.BigDecimal((String)obj))"; + throw new RuntimeException(msg + " threw the exception: value=[" + obj + "]", e); + } + } + } + } + + } + + // =================================================================================== + // Order-By + // ======== + /** + * This method implements the method that is declared at super. + * + * @return this. (NotNull) + */ + public ConditionBean addOrderBy_PK_Asc() { + + query().addOrderBy_SpecialsId_Asc(); + + return this; + + } + + /** + * This method implements the method that is declared at super. + * + * @return this. (NotNull) + */ + public ConditionBean addOrderBy_PK_Desc() { + + query().addOrderBy_SpecialsId_Desc(); + + return this; + + } + + // =================================================================================== + // Query + // ===== + /** + * Query. + * + * @return Instance of query. (NotNull) + */ + public SpecialsCQ query() { + return getConditionQuery(); + } + + /** + * Get condition query. {Internal method for s2dao} + * + * @return Instance of condition query. (NotNull) + */ + public SpecialsCQ getConditionQuery() { + if (_conditionQuery == null) { + _conditionQuery = new SpecialsCQ(null, getSqlClause(), getTableDbName(), 0); + } + return _conditionQuery; + } + + /** + * This method implements the method that is declared at super. + * + * @return Instance of query as interface. (NotNull) + */ + public ConditionQuery getConditionQueryAsInterface() { + return getConditionQuery(); + } + + // =================================================================================== + // Union + // ===== + /** + * Union. + *
+     * Add union query to condition bean.
+     * 
+ * @param unionQuery Union query. (NotNull) + */ + public void union(SpecialsCQ unionQuery) { + query().xsetUnionQuery(unionQuery); + } + + /** + * Union all. + *
+     * Add union all query to condition bean.
+     * 
+ * @param unionAllQuery Union all query. (NotNull) + */ + public void unionAll(SpecialsCQ unionAllQuery) { + query().xsetUnionAllQuery(unionAllQuery); + } + + public boolean hasUnionQueryOrUnionAllQuery() { + return query().hasUnionQueryOrUnionAllQuery(); + } + + // =================================================================================== + // Setup-Select + // ============ + + // =================================================================================== + // Basic Override + // ============== + /** + * This method overrides the method that is declared at super. + * + * @return Clause string. (NotNull) + */ + public String toString() { + return getSqlClause().getClause(); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/bs/BsTaxClassCB.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/bs/BsTaxClassCB.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/bs/BsTaxClassCB.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,204 @@ +package jp.sf.pal.pompei.cbean.bs; + + +import jp.sf.pal.pompei.allcommon.cbean.AbstractConditionBean; +import jp.sf.pal.pompei.allcommon.cbean.ConditionBean; +import jp.sf.pal.pompei.allcommon.cbean.ConditionQuery; + +import jp.sf.pal.pompei.cbean.cq.*; +import jp.sf.pal.pompei.cbean.nss.*; + +/** + * The condition-bean of TAX_CLASS. + * + * @author DBFlute(AutoGenerator) + */ +public class BsTaxClassCB extends AbstractConditionBean { + + // =================================================================================== + // Annotation + // ========== + /** TABLE-Annotation */ + public static final String TABLE = "TAX_CLASS"; + + // =================================================================================== + // Attribute + // ========= + /** Condition query. */ + protected TaxClassCQ _conditionQuery; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + public BsTaxClassCB() { + } + + // /* * * * * * * * * * * * * * * * * * * * * * * + // MyTable = [TAX_CLASS] + // * * * * * * * * */ + + // =================================================================================== + // Table Name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + final public String getTableDbName() { + return "TAX_CLASS"; + } + + // =================================================================================== + // Accept Primary-Key + // ================== + /** + * This method implements the method that is declared at super. + * + * @param primaryKeyMap Primary key map. (NotNull and NotEmpty) + */ + public void acceptPrimaryKeyMap(java.util.Map primaryKeyMap) { + if (primaryKeyMap == null) { + String msg = "The argument[primaryKeyMap] must not be null."; + throw new IllegalArgumentException(msg); + } + if (primaryKeyMap.isEmpty()) { + String msg = "The argument[primaryKeyMap] must not be empty."; + throw new IllegalArgumentException(msg); + } + + if (!primaryKeyMap.containsKey("TAX_CLASS_ID")) { + String msg = "The primaryKeyMap must have the value of TAX_CLASS_ID"; + throw new IllegalStateException(msg + ": primaryKeyMap --> " + primaryKeyMap); + } + { + Object obj = primaryKeyMap.get("TAX_CLASS_ID"); + if (obj instanceof java.math.BigDecimal) { + query().setTaxClassId_Equal((java.math.BigDecimal)obj); + } else { + + if (obj instanceof java.math.BigDecimal) { + query().setTaxClassId_Equal((java.math.BigDecimal)obj); + } else { + try { + query().setTaxClassId_Equal(new java.math.BigDecimal((String)obj)); + } catch (RuntimeException e) { + String msg = "setTaxClassId(new java.math.BigDecimal((String)obj))"; + throw new RuntimeException(msg + " threw the exception: value=[" + obj + "]", e); + } + } + } + } + + } + + // =================================================================================== + // Order-By + // ======== + /** + * This method implements the method that is declared at super. + * + * @return this. (NotNull) + */ + public ConditionBean addOrderBy_PK_Asc() { + + query().addOrderBy_TaxClassId_Asc(); + + return this; + + } + + /** + * This method implements the method that is declared at super. + * + * @return this. (NotNull) + */ + public ConditionBean addOrderBy_PK_Desc() { + + query().addOrderBy_TaxClassId_Desc(); + + return this; + + } + + // =================================================================================== + // Query + // ===== + /** + * Query. + * + * @return Instance of query. (NotNull) + */ + public TaxClassCQ query() { + return getConditionQuery(); + } + + /** + * Get condition query. {Internal method for s2dao} + * + * @return Instance of condition query. (NotNull) + */ + public TaxClassCQ getConditionQuery() { + if (_conditionQuery == null) { + _conditionQuery = new TaxClassCQ(null, getSqlClause(), getTableDbName(), 0); + } + return _conditionQuery; + } + + /** + * This method implements the method that is declared at super. + * + * @return Instance of query as interface. (NotNull) + */ + public ConditionQuery getConditionQueryAsInterface() { + return getConditionQuery(); + } + + // =================================================================================== + // Union + // ===== + /** + * Union. + *
+     * Add union query to condition bean.
+     * 
+ * @param unionQuery Union query. (NotNull) + */ + public void union(TaxClassCQ unionQuery) { + query().xsetUnionQuery(unionQuery); + } + + /** + * Union all. + *
+     * Add union all query to condition bean.
+     * 
+ * @param unionAllQuery Union all query. (NotNull) + */ + public void unionAll(TaxClassCQ unionAllQuery) { + query().xsetUnionAllQuery(unionAllQuery); + } + + public boolean hasUnionQueryOrUnionAllQuery() { + return query().hasUnionQueryOrUnionAllQuery(); + } + + // =================================================================================== + // Setup-Select + // ============ + + // =================================================================================== + // Basic Override + // ============== + /** + * This method overrides the method that is declared at super. + * + * @return Clause string. (NotNull) + */ + public String toString() { + return getSqlClause().getClause(); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/bs/BsTaxRatesCB.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/bs/BsTaxRatesCB.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/bs/BsTaxRatesCB.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,204 @@ +package jp.sf.pal.pompei.cbean.bs; + + +import jp.sf.pal.pompei.allcommon.cbean.AbstractConditionBean; +import jp.sf.pal.pompei.allcommon.cbean.ConditionBean; +import jp.sf.pal.pompei.allcommon.cbean.ConditionQuery; + +import jp.sf.pal.pompei.cbean.cq.*; +import jp.sf.pal.pompei.cbean.nss.*; + +/** + * The condition-bean of TAX_RATES. + * + * @author DBFlute(AutoGenerator) + */ +public class BsTaxRatesCB extends AbstractConditionBean { + + // =================================================================================== + // Annotation + // ========== + /** TABLE-Annotation */ + public static final String TABLE = "TAX_RATES"; + + // =================================================================================== + // Attribute + // ========= + /** Condition query. */ + protected TaxRatesCQ _conditionQuery; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + public BsTaxRatesCB() { + } + + // /* * * * * * * * * * * * * * * * * * * * * * * + // MyTable = [TAX_RATES] + // * * * * * * * * */ + + // =================================================================================== + // Table Name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + final public String getTableDbName() { + return "TAX_RATES"; + } + + // =================================================================================== + // Accept Primary-Key + // ================== + /** + * This method implements the method that is declared at super. + * + * @param primaryKeyMap Primary key map. (NotNull and NotEmpty) + */ + public void acceptPrimaryKeyMap(java.util.Map primaryKeyMap) { + if (primaryKeyMap == null) { + String msg = "The argument[primaryKeyMap] must not be null."; + throw new IllegalArgumentException(msg); + } + if (primaryKeyMap.isEmpty()) { + String msg = "The argument[primaryKeyMap] must not be empty."; + throw new IllegalArgumentException(msg); + } + + if (!primaryKeyMap.containsKey("TAX_RATES_ID")) { + String msg = "The primaryKeyMap must have the value of TAX_RATES_ID"; + throw new IllegalStateException(msg + ": primaryKeyMap --> " + primaryKeyMap); + } + { + Object obj = primaryKeyMap.get("TAX_RATES_ID"); + if (obj instanceof java.math.BigDecimal) { + query().setTaxRatesId_Equal((java.math.BigDecimal)obj); + } else { + + if (obj instanceof java.math.BigDecimal) { + query().setTaxRatesId_Equal((java.math.BigDecimal)obj); + } else { + try { + query().setTaxRatesId_Equal(new java.math.BigDecimal((String)obj)); + } catch (RuntimeException e) { + String msg = "setTaxRatesId(new java.math.BigDecimal((String)obj))"; + throw new RuntimeException(msg + " threw the exception: value=[" + obj + "]", e); + } + } + } + } + + } + + // =================================================================================== + // Order-By + // ======== + /** + * This method implements the method that is declared at super. + * + * @return this. (NotNull) + */ + public ConditionBean addOrderBy_PK_Asc() { + + query().addOrderBy_TaxRatesId_Asc(); + + return this; + + } + + /** + * This method implements the method that is declared at super. + * + * @return this. (NotNull) + */ + public ConditionBean addOrderBy_PK_Desc() { + + query().addOrderBy_TaxRatesId_Desc(); + + return this; + + } + + // =================================================================================== + // Query + // ===== + /** + * Query. + * + * @return Instance of query. (NotNull) + */ + public TaxRatesCQ query() { + return getConditionQuery(); + } + + /** + * Get condition query. {Internal method for s2dao} + * + * @return Instance of condition query. (NotNull) + */ + public TaxRatesCQ getConditionQuery() { + if (_conditionQuery == null) { + _conditionQuery = new TaxRatesCQ(null, getSqlClause(), getTableDbName(), 0); + } + return _conditionQuery; + } + + /** + * This method implements the method that is declared at super. + * + * @return Instance of query as interface. (NotNull) + */ + public ConditionQuery getConditionQueryAsInterface() { + return getConditionQuery(); + } + + // =================================================================================== + // Union + // ===== + /** + * Union. + *
+     * Add union query to condition bean.
+     * 
+ * @param unionQuery Union query. (NotNull) + */ + public void union(TaxRatesCQ unionQuery) { + query().xsetUnionQuery(unionQuery); + } + + /** + * Union all. + *
+     * Add union all query to condition bean.
+     * 
+ * @param unionAllQuery Union all query. (NotNull) + */ + public void unionAll(TaxRatesCQ unionAllQuery) { + query().xsetUnionAllQuery(unionAllQuery); + } + + public boolean hasUnionQueryOrUnionAllQuery() { + return query().hasUnionQueryOrUnionAllQuery(); + } + + // =================================================================================== + // Setup-Select + // ============ + + // =================================================================================== + // Basic Override + // ============== + /** + * This method overrides the method that is declared at super. + * + * @return Clause string. (NotNull) + */ + public String toString() { + return getSqlClause().getClause(); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/bs/BsWhosOnlineCB.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/bs/BsWhosOnlineCB.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/bs/BsWhosOnlineCB.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,208 @@ +package jp.sf.pal.pompei.cbean.bs; + + +import jp.sf.pal.pompei.allcommon.cbean.AbstractConditionBean; +import jp.sf.pal.pompei.allcommon.cbean.ConditionBean; +import jp.sf.pal.pompei.allcommon.cbean.ConditionQuery; + +import jp.sf.pal.pompei.cbean.cq.*; +import jp.sf.pal.pompei.cbean.nss.*; + +/** + * The condition-bean of WHOS_ONLINE. + * + * @author DBFlute(AutoGenerator) + */ +public class BsWhosOnlineCB extends AbstractConditionBean { + + // =================================================================================== + // Annotation + // ========== + /** TABLE-Annotation */ + public static final String TABLE = "WHOS_ONLINE"; + + // =================================================================================== + // Attribute + // ========= + /** Condition query. */ + protected WhosOnlineCQ _conditionQuery; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + public BsWhosOnlineCB() { + } + + // /* * * * * * * * * * * * * * * * * * * * * * * + // MyTable = [WHOS_ONLINE] + // * * * * * * * * */ + + // =================================================================================== + // Table Name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + final public String getTableDbName() { + return "WHOS_ONLINE"; + } + + // =================================================================================== + // Accept Primary-Key + // ================== + /** + * This method implements the method that is declared at super. + * + * @param primaryKeyMap Primary key map. (NotNull and NotEmpty) + */ + public void acceptPrimaryKeyMap(java.util.Map primaryKeyMap) { + if (primaryKeyMap == null) { + String msg = "The argument[primaryKeyMap] must not be null."; + throw new IllegalArgumentException(msg); + } + if (primaryKeyMap.isEmpty()) { + String msg = "The argument[primaryKeyMap] must not be empty."; + throw new IllegalArgumentException(msg); + } + + String msg = "This table has no primary-keys: " + getTableDbName(); + throw new IllegalStateException(msg); + + } + + // =================================================================================== + // Order-By + // ======== + /** + * This method implements the method that is declared at super. + * + * @return this. (NotNull) + */ + public ConditionBean addOrderBy_PK_Asc() { + + query().addOrderBy_CustomerId_Asc(); + + query().addOrderBy_FullName_Asc(); + + query().addOrderBy_SessionId_Asc(); + + query().addOrderBy_IpAddress_Asc(); + + query().addOrderBy_TimeEntry_Asc(); + + query().addOrderBy_TimeLastClick_Asc(); + + query().addOrderBy_LastPageUrl_Asc(); + + return this; + + } + + /** + * This method implements the method that is declared at super. + * + * @return this. (NotNull) + */ + public ConditionBean addOrderBy_PK_Desc() { + + query().addOrderBy_CustomerId_Desc(); + + query().addOrderBy_FullName_Desc(); + + query().addOrderBy_SessionId_Desc(); + + query().addOrderBy_IpAddress_Desc(); + + query().addOrderBy_TimeEntry_Desc(); + + query().addOrderBy_TimeLastClick_Desc(); + + query().addOrderBy_LastPageUrl_Desc(); + + return this; + + } + + // =================================================================================== + // Query + // ===== + /** + * Query. + * + * @return Instance of query. (NotNull) + */ + public WhosOnlineCQ query() { + return getConditionQuery(); + } + + /** + * Get condition query. {Internal method for s2dao} + * + * @return Instance of condition query. (NotNull) + */ + public WhosOnlineCQ getConditionQuery() { + if (_conditionQuery == null) { + _conditionQuery = new WhosOnlineCQ(null, getSqlClause(), getTableDbName(), 0); + } + return _conditionQuery; + } + + /** + * This method implements the method that is declared at super. + * + * @return Instance of query as interface. (NotNull) + */ + public ConditionQuery getConditionQueryAsInterface() { + return getConditionQuery(); + } + + // =================================================================================== + // Union + // ===== + /** + * Union. + *
+     * Add union query to condition bean.
+     * 
+ * @param unionQuery Union query. (NotNull) + */ + public void union(WhosOnlineCQ unionQuery) { + query().xsetUnionQuery(unionQuery); + } + + /** + * Union all. + *
+     * Add union all query to condition bean.
+     * 
+ * @param unionAllQuery Union all query. (NotNull) + */ + public void unionAll(WhosOnlineCQ unionAllQuery) { + query().xsetUnionAllQuery(unionAllQuery); + } + + public boolean hasUnionQueryOrUnionAllQuery() { + return query().hasUnionQueryOrUnionAllQuery(); + } + + // =================================================================================== + // Setup-Select + // ============ + + // =================================================================================== + // Basic Override + // ============== + /** + * This method overrides the method that is declared at super. + * + * @return Clause string. (NotNull) + */ + public String toString() { + return getSqlClause().getClause(); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/bs/BsZonesCB.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/bs/BsZonesCB.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/bs/BsZonesCB.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,204 @@ +package jp.sf.pal.pompei.cbean.bs; + + +import jp.sf.pal.pompei.allcommon.cbean.AbstractConditionBean; +import jp.sf.pal.pompei.allcommon.cbean.ConditionBean; +import jp.sf.pal.pompei.allcommon.cbean.ConditionQuery; + +import jp.sf.pal.pompei.cbean.cq.*; +import jp.sf.pal.pompei.cbean.nss.*; + +/** + * The condition-bean of ZONES. + * + * @author DBFlute(AutoGenerator) + */ +public class BsZonesCB extends AbstractConditionBean { + + // =================================================================================== + // Annotation + // ========== + /** TABLE-Annotation */ + public static final String TABLE = "ZONES"; + + // =================================================================================== + // Attribute + // ========= + /** Condition query. */ + protected ZonesCQ _conditionQuery; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + public BsZonesCB() { + } + + // /* * * * * * * * * * * * * * * * * * * * * * * + // MyTable = [ZONES] + // * * * * * * * * */ + + // =================================================================================== + // Table Name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + final public String getTableDbName() { + return "ZONES"; + } + + // =================================================================================== + // Accept Primary-Key + // ================== + /** + * This method implements the method that is declared at super. + * + * @param primaryKeyMap Primary key map. (NotNull and NotEmpty) + */ + public void acceptPrimaryKeyMap(java.util.Map primaryKeyMap) { + if (primaryKeyMap == null) { + String msg = "The argument[primaryKeyMap] must not be null."; + throw new IllegalArgumentException(msg); + } + if (primaryKeyMap.isEmpty()) { + String msg = "The argument[primaryKeyMap] must not be empty."; + throw new IllegalArgumentException(msg); + } + + if (!primaryKeyMap.containsKey("ZONE_ID")) { + String msg = "The primaryKeyMap must have the value of ZONE_ID"; + throw new IllegalStateException(msg + ": primaryKeyMap --> " + primaryKeyMap); + } + { + Object obj = primaryKeyMap.get("ZONE_ID"); + if (obj instanceof java.math.BigDecimal) { + query().setZoneId_Equal((java.math.BigDecimal)obj); + } else { + + if (obj instanceof java.math.BigDecimal) { + query().setZoneId_Equal((java.math.BigDecimal)obj); + } else { + try { + query().setZoneId_Equal(new java.math.BigDecimal((String)obj)); + } catch (RuntimeException e) { + String msg = "setZoneId(new java.math.BigDecimal((String)obj))"; + throw new RuntimeException(msg + " threw the exception: value=[" + obj + "]", e); + } + } + } + } + + } + + // =================================================================================== + // Order-By + // ======== + /** + * This method implements the method that is declared at super. + * + * @return this. (NotNull) + */ + public ConditionBean addOrderBy_PK_Asc() { + + query().addOrderBy_ZoneId_Asc(); + + return this; + + } + + /** + * This method implements the method that is declared at super. + * + * @return this. (NotNull) + */ + public ConditionBean addOrderBy_PK_Desc() { + + query().addOrderBy_ZoneId_Desc(); + + return this; + + } + + // =================================================================================== + // Query + // ===== + /** + * Query. + * + * @return Instance of query. (NotNull) + */ + public ZonesCQ query() { + return getConditionQuery(); + } + + /** + * Get condition query. {Internal method for s2dao} + * + * @return Instance of condition query. (NotNull) + */ + public ZonesCQ getConditionQuery() { + if (_conditionQuery == null) { + _conditionQuery = new ZonesCQ(null, getSqlClause(), getTableDbName(), 0); + } + return _conditionQuery; + } + + /** + * This method implements the method that is declared at super. + * + * @return Instance of query as interface. (NotNull) + */ + public ConditionQuery getConditionQueryAsInterface() { + return getConditionQuery(); + } + + // =================================================================================== + // Union + // ===== + /** + * Union. + *
+     * Add union query to condition bean.
+     * 
+ * @param unionQuery Union query. (NotNull) + */ + public void union(ZonesCQ unionQuery) { + query().xsetUnionQuery(unionQuery); + } + + /** + * Union all. + *
+     * Add union all query to condition bean.
+     * 
+ * @param unionAllQuery Union all query. (NotNull) + */ + public void unionAll(ZonesCQ unionAllQuery) { + query().xsetUnionAllQuery(unionAllQuery); + } + + public boolean hasUnionQueryOrUnionAllQuery() { + return query().hasUnionQueryOrUnionAllQuery(); + } + + // =================================================================================== + // Setup-Select + // ============ + + // =================================================================================== + // Basic Override + // ============== + /** + * This method overrides the method that is declared at super. + * + * @return Clause string. (NotNull) + */ + public String toString() { + return getSqlClause().getClause(); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/bs/BsZonesToGeoZonesCB.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/bs/BsZonesToGeoZonesCB.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/bs/BsZonesToGeoZonesCB.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,204 @@ +package jp.sf.pal.pompei.cbean.bs; + + +import jp.sf.pal.pompei.allcommon.cbean.AbstractConditionBean; +import jp.sf.pal.pompei.allcommon.cbean.ConditionBean; +import jp.sf.pal.pompei.allcommon.cbean.ConditionQuery; + +import jp.sf.pal.pompei.cbean.cq.*; +import jp.sf.pal.pompei.cbean.nss.*; + +/** + * The condition-bean of ZONES_TO_GEO_ZONES. + * + * @author DBFlute(AutoGenerator) + */ +public class BsZonesToGeoZonesCB extends AbstractConditionBean { + + // =================================================================================== + // Annotation + // ========== + /** TABLE-Annotation */ + public static final String TABLE = "ZONES_TO_GEO_ZONES"; + + // =================================================================================== + // Attribute + // ========= + /** Condition query. */ + protected ZonesToGeoZonesCQ _conditionQuery; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + public BsZonesToGeoZonesCB() { + } + + // /* * * * * * * * * * * * * * * * * * * * * * * + // MyTable = [ZONES_TO_GEO_ZONES] + // * * * * * * * * */ + + // =================================================================================== + // Table Name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + final public String getTableDbName() { + return "ZONES_TO_GEO_ZONES"; + } + + // =================================================================================== + // Accept Primary-Key + // ================== + /** + * This method implements the method that is declared at super. + * + * @param primaryKeyMap Primary key map. (NotNull and NotEmpty) + */ + public void acceptPrimaryKeyMap(java.util.Map primaryKeyMap) { + if (primaryKeyMap == null) { + String msg = "The argument[primaryKeyMap] must not be null."; + throw new IllegalArgumentException(msg); + } + if (primaryKeyMap.isEmpty()) { + String msg = "The argument[primaryKeyMap] must not be empty."; + throw new IllegalArgumentException(msg); + } + + if (!primaryKeyMap.containsKey("ASSOCIATION_ID")) { + String msg = "The primaryKeyMap must have the value of ASSOCIATION_ID"; + throw new IllegalStateException(msg + ": primaryKeyMap --> " + primaryKeyMap); + } + { + Object obj = primaryKeyMap.get("ASSOCIATION_ID"); + if (obj instanceof java.math.BigDecimal) { + query().setAssociationId_Equal((java.math.BigDecimal)obj); + } else { + + if (obj instanceof java.math.BigDecimal) { + query().setAssociationId_Equal((java.math.BigDecimal)obj); + } else { + try { + query().setAssociationId_Equal(new java.math.BigDecimal((String)obj)); + } catch (RuntimeException e) { + String msg = "setAssociationId(new java.math.BigDecimal((String)obj))"; + throw new RuntimeException(msg + " threw the exception: value=[" + obj + "]", e); + } + } + } + } + + } + + // =================================================================================== + // Order-By + // ======== + /** + * This method implements the method that is declared at super. + * + * @return this. (NotNull) + */ + public ConditionBean addOrderBy_PK_Asc() { + + query().addOrderBy_AssociationId_Asc(); + + return this; + + } + + /** + * This method implements the method that is declared at super. + * + * @return this. (NotNull) + */ + public ConditionBean addOrderBy_PK_Desc() { + + query().addOrderBy_AssociationId_Desc(); + + return this; + + } + + // =================================================================================== + // Query + // ===== + /** + * Query. + * + * @return Instance of query. (NotNull) + */ + public ZonesToGeoZonesCQ query() { + return getConditionQuery(); + } + + /** + * Get condition query. {Internal method for s2dao} + * + * @return Instance of condition query. (NotNull) + */ + public ZonesToGeoZonesCQ getConditionQuery() { + if (_conditionQuery == null) { + _conditionQuery = new ZonesToGeoZonesCQ(null, getSqlClause(), getTableDbName(), 0); + } + return _conditionQuery; + } + + /** + * This method implements the method that is declared at super. + * + * @return Instance of query as interface. (NotNull) + */ + public ConditionQuery getConditionQueryAsInterface() { + return getConditionQuery(); + } + + // =================================================================================== + // Union + // ===== + /** + * Union. + *
+     * Add union query to condition bean.
+     * 
+ * @param unionQuery Union query. (NotNull) + */ + public void union(ZonesToGeoZonesCQ unionQuery) { + query().xsetUnionQuery(unionQuery); + } + + /** + * Union all. + *
+     * Add union all query to condition bean.
+     * 
+ * @param unionAllQuery Union all query. (NotNull) + */ + public void unionAll(ZonesToGeoZonesCQ unionAllQuery) { + query().xsetUnionAllQuery(unionAllQuery); + } + + public boolean hasUnionQueryOrUnionAllQuery() { + return query().hasUnionQueryOrUnionAllQuery(); + } + + // =================================================================================== + // Setup-Select + // ============ + + // =================================================================================== + // Basic Override + // ============== + /** + * This method overrides the method that is declared at super. + * + * @return Clause string. (NotNull) + */ + public String toString() { + return getSqlClause().getClause(); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/AddressBookCQ.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/AddressBookCQ.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/AddressBookCQ.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,29 @@ +package jp.sf.pal.pompei.cbean.cq; + + +import jp.sf.pal.pompei.allcommon.cbean.ConditionQuery; +import jp.sf.pal.pompei.allcommon.cbean.sqlclause.SqlClause; +import jp.sf.pal.pompei.cbean.cq.bs.BsAddressBookCQ; + +/** + * The condition-query of ADDRESS_BOOK. + * + * @author DBFlute(AutoGenerator) + */ +public class AddressBookCQ extends BsAddressBookCQ { + + // ===================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param childQuery Child query as abstract class. (Nullable: If null, this is base instance.) + * @param sqlClause SQL clause instance. (NotNull) + * @param aliasName My alias name. (NotNull) + * @param nestLevel Nest level. + */ + public AddressBookCQ(ConditionQuery childQuery, SqlClause sqlClause, String aliasName, int nestLevel) { + super(childQuery, sqlClause, aliasName, nestLevel); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/AddressFormatCQ.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/AddressFormatCQ.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/AddressFormatCQ.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,29 @@ +package jp.sf.pal.pompei.cbean.cq; + + +import jp.sf.pal.pompei.allcommon.cbean.ConditionQuery; +import jp.sf.pal.pompei.allcommon.cbean.sqlclause.SqlClause; +import jp.sf.pal.pompei.cbean.cq.bs.BsAddressFormatCQ; + +/** + * The condition-query of ADDRESS_FORMAT. + * + * @author DBFlute(AutoGenerator) + */ +public class AddressFormatCQ extends BsAddressFormatCQ { + + // ===================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param childQuery Child query as abstract class. (Nullable: If null, this is base instance.) + * @param sqlClause SQL clause instance. (NotNull) + * @param aliasName My alias name. (NotNull) + * @param nestLevel Nest level. + */ + public AddressFormatCQ(ConditionQuery childQuery, SqlClause sqlClause, String aliasName, int nestLevel) { + super(childQuery, sqlClause, aliasName, nestLevel); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/BannersCQ.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/BannersCQ.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/BannersCQ.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,29 @@ +package jp.sf.pal.pompei.cbean.cq; + + +import jp.sf.pal.pompei.allcommon.cbean.ConditionQuery; +import jp.sf.pal.pompei.allcommon.cbean.sqlclause.SqlClause; +import jp.sf.pal.pompei.cbean.cq.bs.BsBannersCQ; + +/** + * The condition-query of BANNERS. + * + * @author DBFlute(AutoGenerator) + */ +public class BannersCQ extends BsBannersCQ { + + // ===================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param childQuery Child query as abstract class. (Nullable: If null, this is base instance.) + * @param sqlClause SQL clause instance. (NotNull) + * @param aliasName My alias name. (NotNull) + * @param nestLevel Nest level. + */ + public BannersCQ(ConditionQuery childQuery, SqlClause sqlClause, String aliasName, int nestLevel) { + super(childQuery, sqlClause, aliasName, nestLevel); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/BannersHistoryCQ.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/BannersHistoryCQ.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/BannersHistoryCQ.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,29 @@ +package jp.sf.pal.pompei.cbean.cq; + + +import jp.sf.pal.pompei.allcommon.cbean.ConditionQuery; +import jp.sf.pal.pompei.allcommon.cbean.sqlclause.SqlClause; +import jp.sf.pal.pompei.cbean.cq.bs.BsBannersHistoryCQ; + +/** + * The condition-query of BANNERS_HISTORY. + * + * @author DBFlute(AutoGenerator) + */ +public class BannersHistoryCQ extends BsBannersHistoryCQ { + + // ===================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param childQuery Child query as abstract class. (Nullable: If null, this is base instance.) + * @param sqlClause SQL clause instance. (NotNull) + * @param aliasName My alias name. (NotNull) + * @param nestLevel Nest level. + */ + public BannersHistoryCQ(ConditionQuery childQuery, SqlClause sqlClause, String aliasName, int nestLevel) { + super(childQuery, sqlClause, aliasName, nestLevel); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/CategoriesCQ.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/CategoriesCQ.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/CategoriesCQ.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,29 @@ +package jp.sf.pal.pompei.cbean.cq; + + +import jp.sf.pal.pompei.allcommon.cbean.ConditionQuery; +import jp.sf.pal.pompei.allcommon.cbean.sqlclause.SqlClause; +import jp.sf.pal.pompei.cbean.cq.bs.BsCategoriesCQ; + +/** + * The condition-query of CATEGORIES. + * + * @author DBFlute(AutoGenerator) + */ +public class CategoriesCQ extends BsCategoriesCQ { + + // ===================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param childQuery Child query as abstract class. (Nullable: If null, this is base instance.) + * @param sqlClause SQL clause instance. (NotNull) + * @param aliasName My alias name. (NotNull) + * @param nestLevel Nest level. + */ + public CategoriesCQ(ConditionQuery childQuery, SqlClause sqlClause, String aliasName, int nestLevel) { + super(childQuery, sqlClause, aliasName, nestLevel); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/CategoriesDescriptionCQ.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/CategoriesDescriptionCQ.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/CategoriesDescriptionCQ.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,29 @@ +package jp.sf.pal.pompei.cbean.cq; + + +import jp.sf.pal.pompei.allcommon.cbean.ConditionQuery; +import jp.sf.pal.pompei.allcommon.cbean.sqlclause.SqlClause; +import jp.sf.pal.pompei.cbean.cq.bs.BsCategoriesDescriptionCQ; + +/** + * The condition-query of CATEGORIES_DESCRIPTION. + * + * @author DBFlute(AutoGenerator) + */ +public class CategoriesDescriptionCQ extends BsCategoriesDescriptionCQ { + + // ===================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param childQuery Child query as abstract class. (Nullable: If null, this is base instance.) + * @param sqlClause SQL clause instance. (NotNull) + * @param aliasName My alias name. (NotNull) + * @param nestLevel Nest level. + */ + public CategoriesDescriptionCQ(ConditionQuery childQuery, SqlClause sqlClause, String aliasName, int nestLevel) { + super(childQuery, sqlClause, aliasName, nestLevel); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ConfigurationCQ.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ConfigurationCQ.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ConfigurationCQ.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,29 @@ +package jp.sf.pal.pompei.cbean.cq; + + +import jp.sf.pal.pompei.allcommon.cbean.ConditionQuery; +import jp.sf.pal.pompei.allcommon.cbean.sqlclause.SqlClause; +import jp.sf.pal.pompei.cbean.cq.bs.BsConfigurationCQ; + +/** + * The condition-query of CONFIGURATION. + * + * @author DBFlute(AutoGenerator) + */ +public class ConfigurationCQ extends BsConfigurationCQ { + + // ===================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param childQuery Child query as abstract class. (Nullable: If null, this is base instance.) + * @param sqlClause SQL clause instance. (NotNull) + * @param aliasName My alias name. (NotNull) + * @param nestLevel Nest level. + */ + public ConfigurationCQ(ConditionQuery childQuery, SqlClause sqlClause, String aliasName, int nestLevel) { + super(childQuery, sqlClause, aliasName, nestLevel); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ConfigurationGroupCQ.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ConfigurationGroupCQ.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ConfigurationGroupCQ.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,29 @@ +package jp.sf.pal.pompei.cbean.cq; + + +import jp.sf.pal.pompei.allcommon.cbean.ConditionQuery; +import jp.sf.pal.pompei.allcommon.cbean.sqlclause.SqlClause; +import jp.sf.pal.pompei.cbean.cq.bs.BsConfigurationGroupCQ; + +/** + * The condition-query of CONFIGURATION_GROUP. + * + * @author DBFlute(AutoGenerator) + */ +public class ConfigurationGroupCQ extends BsConfigurationGroupCQ { + + // ===================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param childQuery Child query as abstract class. (Nullable: If null, this is base instance.) + * @param sqlClause SQL clause instance. (NotNull) + * @param aliasName My alias name. (NotNull) + * @param nestLevel Nest level. + */ + public ConfigurationGroupCQ(ConditionQuery childQuery, SqlClause sqlClause, String aliasName, int nestLevel) { + super(childQuery, sqlClause, aliasName, nestLevel); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/CounterCQ.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/CounterCQ.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/CounterCQ.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,29 @@ +package jp.sf.pal.pompei.cbean.cq; + + +import jp.sf.pal.pompei.allcommon.cbean.ConditionQuery; +import jp.sf.pal.pompei.allcommon.cbean.sqlclause.SqlClause; +import jp.sf.pal.pompei.cbean.cq.bs.BsCounterCQ; + +/** + * The condition-query of COUNTER. + * + * @author DBFlute(AutoGenerator) + */ +public class CounterCQ extends BsCounterCQ { + + // ===================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param childQuery Child query as abstract class. (Nullable: If null, this is base instance.) + * @param sqlClause SQL clause instance. (NotNull) + * @param aliasName My alias name. (NotNull) + * @param nestLevel Nest level. + */ + public CounterCQ(ConditionQuery childQuery, SqlClause sqlClause, String aliasName, int nestLevel) { + super(childQuery, sqlClause, aliasName, nestLevel); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/CounterHistoryCQ.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/CounterHistoryCQ.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/CounterHistoryCQ.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,29 @@ +package jp.sf.pal.pompei.cbean.cq; + + +import jp.sf.pal.pompei.allcommon.cbean.ConditionQuery; +import jp.sf.pal.pompei.allcommon.cbean.sqlclause.SqlClause; +import jp.sf.pal.pompei.cbean.cq.bs.BsCounterHistoryCQ; + +/** + * The condition-query of COUNTER_HISTORY. + * + * @author DBFlute(AutoGenerator) + */ +public class CounterHistoryCQ extends BsCounterHistoryCQ { + + // ===================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param childQuery Child query as abstract class. (Nullable: If null, this is base instance.) + * @param sqlClause SQL clause instance. (NotNull) + * @param aliasName My alias name. (NotNull) + * @param nestLevel Nest level. + */ + public CounterHistoryCQ(ConditionQuery childQuery, SqlClause sqlClause, String aliasName, int nestLevel) { + super(childQuery, sqlClause, aliasName, nestLevel); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/CountriesCQ.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/CountriesCQ.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/CountriesCQ.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,29 @@ +package jp.sf.pal.pompei.cbean.cq; + + +import jp.sf.pal.pompei.allcommon.cbean.ConditionQuery; +import jp.sf.pal.pompei.allcommon.cbean.sqlclause.SqlClause; +import jp.sf.pal.pompei.cbean.cq.bs.BsCountriesCQ; + +/** + * The condition-query of COUNTRIES. + * + * @author DBFlute(AutoGenerator) + */ +public class CountriesCQ extends BsCountriesCQ { + + // ===================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param childQuery Child query as abstract class. (Nullable: If null, this is base instance.) + * @param sqlClause SQL clause instance. (NotNull) + * @param aliasName My alias name. (NotNull) + * @param nestLevel Nest level. + */ + public CountriesCQ(ConditionQuery childQuery, SqlClause sqlClause, String aliasName, int nestLevel) { + super(childQuery, sqlClause, aliasName, nestLevel); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/CurrenciesCQ.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/CurrenciesCQ.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/CurrenciesCQ.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,29 @@ +package jp.sf.pal.pompei.cbean.cq; + + +import jp.sf.pal.pompei.allcommon.cbean.ConditionQuery; +import jp.sf.pal.pompei.allcommon.cbean.sqlclause.SqlClause; +import jp.sf.pal.pompei.cbean.cq.bs.BsCurrenciesCQ; + +/** + * The condition-query of CURRENCIES. + * + * @author DBFlute(AutoGenerator) + */ +public class CurrenciesCQ extends BsCurrenciesCQ { + + // ===================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param childQuery Child query as abstract class. (Nullable: If null, this is base instance.) + * @param sqlClause SQL clause instance. (NotNull) + * @param aliasName My alias name. (NotNull) + * @param nestLevel Nest level. + */ + public CurrenciesCQ(ConditionQuery childQuery, SqlClause sqlClause, String aliasName, int nestLevel) { + super(childQuery, sqlClause, aliasName, nestLevel); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/CustomersBasketAttributesCQ.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/CustomersBasketAttributesCQ.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/CustomersBasketAttributesCQ.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,29 @@ +package jp.sf.pal.pompei.cbean.cq; + + +import jp.sf.pal.pompei.allcommon.cbean.ConditionQuery; +import jp.sf.pal.pompei.allcommon.cbean.sqlclause.SqlClause; +import jp.sf.pal.pompei.cbean.cq.bs.BsCustomersBasketAttributesCQ; + +/** + * The condition-query of CUSTOMERS_BASKET_ATTRIBUTES. + * + * @author DBFlute(AutoGenerator) + */ +public class CustomersBasketAttributesCQ extends BsCustomersBasketAttributesCQ { + + // ===================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param childQuery Child query as abstract class. (Nullable: If null, this is base instance.) + * @param sqlClause SQL clause instance. (NotNull) + * @param aliasName My alias name. (NotNull) + * @param nestLevel Nest level. + */ + public CustomersBasketAttributesCQ(ConditionQuery childQuery, SqlClause sqlClause, String aliasName, int nestLevel) { + super(childQuery, sqlClause, aliasName, nestLevel); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/CustomersBasketCQ.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/CustomersBasketCQ.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/CustomersBasketCQ.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,29 @@ +package jp.sf.pal.pompei.cbean.cq; + + +import jp.sf.pal.pompei.allcommon.cbean.ConditionQuery; +import jp.sf.pal.pompei.allcommon.cbean.sqlclause.SqlClause; +import jp.sf.pal.pompei.cbean.cq.bs.BsCustomersBasketCQ; + +/** + * The condition-query of CUSTOMERS_BASKET. + * + * @author DBFlute(AutoGenerator) + */ +public class CustomersBasketCQ extends BsCustomersBasketCQ { + + // ===================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param childQuery Child query as abstract class. (Nullable: If null, this is base instance.) + * @param sqlClause SQL clause instance. (NotNull) + * @param aliasName My alias name. (NotNull) + * @param nestLevel Nest level. + */ + public CustomersBasketCQ(ConditionQuery childQuery, SqlClause sqlClause, String aliasName, int nestLevel) { + super(childQuery, sqlClause, aliasName, nestLevel); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/CustomersCQ.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/CustomersCQ.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/CustomersCQ.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,29 @@ +package jp.sf.pal.pompei.cbean.cq; + + +import jp.sf.pal.pompei.allcommon.cbean.ConditionQuery; +import jp.sf.pal.pompei.allcommon.cbean.sqlclause.SqlClause; +import jp.sf.pal.pompei.cbean.cq.bs.BsCustomersCQ; + +/** + * The condition-query of CUSTOMERS. + * + * @author DBFlute(AutoGenerator) + */ +public class CustomersCQ extends BsCustomersCQ { + + // ===================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param childQuery Child query as abstract class. (Nullable: If null, this is base instance.) + * @param sqlClause SQL clause instance. (NotNull) + * @param aliasName My alias name. (NotNull) + * @param nestLevel Nest level. + */ + public CustomersCQ(ConditionQuery childQuery, SqlClause sqlClause, String aliasName, int nestLevel) { + super(childQuery, sqlClause, aliasName, nestLevel); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/CustomersInfoCQ.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/CustomersInfoCQ.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/CustomersInfoCQ.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,29 @@ +package jp.sf.pal.pompei.cbean.cq; + + +import jp.sf.pal.pompei.allcommon.cbean.ConditionQuery; +import jp.sf.pal.pompei.allcommon.cbean.sqlclause.SqlClause; +import jp.sf.pal.pompei.cbean.cq.bs.BsCustomersInfoCQ; + +/** + * The condition-query of CUSTOMERS_INFO. + * + * @author DBFlute(AutoGenerator) + */ +public class CustomersInfoCQ extends BsCustomersInfoCQ { + + // ===================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param childQuery Child query as abstract class. (Nullable: If null, this is base instance.) + * @param sqlClause SQL clause instance. (NotNull) + * @param aliasName My alias name. (NotNull) + * @param nestLevel Nest level. + */ + public CustomersInfoCQ(ConditionQuery childQuery, SqlClause sqlClause, String aliasName, int nestLevel) { + super(childQuery, sqlClause, aliasName, nestLevel); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/GeoZonesCQ.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/GeoZonesCQ.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/GeoZonesCQ.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,29 @@ +package jp.sf.pal.pompei.cbean.cq; + + +import jp.sf.pal.pompei.allcommon.cbean.ConditionQuery; +import jp.sf.pal.pompei.allcommon.cbean.sqlclause.SqlClause; +import jp.sf.pal.pompei.cbean.cq.bs.BsGeoZonesCQ; + +/** + * The condition-query of GEO_ZONES. + * + * @author DBFlute(AutoGenerator) + */ +public class GeoZonesCQ extends BsGeoZonesCQ { + + // ===================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param childQuery Child query as abstract class. (Nullable: If null, this is base instance.) + * @param sqlClause SQL clause instance. (NotNull) + * @param aliasName My alias name. (NotNull) + * @param nestLevel Nest level. + */ + public GeoZonesCQ(ConditionQuery childQuery, SqlClause sqlClause, String aliasName, int nestLevel) { + super(childQuery, sqlClause, aliasName, nestLevel); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/LanguagesCQ.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/LanguagesCQ.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/LanguagesCQ.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,29 @@ +package jp.sf.pal.pompei.cbean.cq; + + +import jp.sf.pal.pompei.allcommon.cbean.ConditionQuery; +import jp.sf.pal.pompei.allcommon.cbean.sqlclause.SqlClause; +import jp.sf.pal.pompei.cbean.cq.bs.BsLanguagesCQ; + +/** + * The condition-query of LANGUAGES. + * + * @author DBFlute(AutoGenerator) + */ +public class LanguagesCQ extends BsLanguagesCQ { + + // ===================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param childQuery Child query as abstract class. (Nullable: If null, this is base instance.) + * @param sqlClause SQL clause instance. (NotNull) + * @param aliasName My alias name. (NotNull) + * @param nestLevel Nest level. + */ + public LanguagesCQ(ConditionQuery childQuery, SqlClause sqlClause, String aliasName, int nestLevel) { + super(childQuery, sqlClause, aliasName, nestLevel); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ManufacturersCQ.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ManufacturersCQ.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ManufacturersCQ.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,29 @@ +package jp.sf.pal.pompei.cbean.cq; + + +import jp.sf.pal.pompei.allcommon.cbean.ConditionQuery; +import jp.sf.pal.pompei.allcommon.cbean.sqlclause.SqlClause; +import jp.sf.pal.pompei.cbean.cq.bs.BsManufacturersCQ; + +/** + * The condition-query of MANUFACTURERS. + * + * @author DBFlute(AutoGenerator) + */ +public class ManufacturersCQ extends BsManufacturersCQ { + + // ===================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param childQuery Child query as abstract class. (Nullable: If null, this is base instance.) + * @param sqlClause SQL clause instance. (NotNull) + * @param aliasName My alias name. (NotNull) + * @param nestLevel Nest level. + */ + public ManufacturersCQ(ConditionQuery childQuery, SqlClause sqlClause, String aliasName, int nestLevel) { + super(childQuery, sqlClause, aliasName, nestLevel); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ManufacturersInfoCQ.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ManufacturersInfoCQ.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ManufacturersInfoCQ.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,29 @@ +package jp.sf.pal.pompei.cbean.cq; + + +import jp.sf.pal.pompei.allcommon.cbean.ConditionQuery; +import jp.sf.pal.pompei.allcommon.cbean.sqlclause.SqlClause; +import jp.sf.pal.pompei.cbean.cq.bs.BsManufacturersInfoCQ; + +/** + * The condition-query of MANUFACTURERS_INFO. + * + * @author DBFlute(AutoGenerator) + */ +public class ManufacturersInfoCQ extends BsManufacturersInfoCQ { + + // ===================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param childQuery Child query as abstract class. (Nullable: If null, this is base instance.) + * @param sqlClause SQL clause instance. (NotNull) + * @param aliasName My alias name. (NotNull) + * @param nestLevel Nest level. + */ + public ManufacturersInfoCQ(ConditionQuery childQuery, SqlClause sqlClause, String aliasName, int nestLevel) { + super(childQuery, sqlClause, aliasName, nestLevel); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/NewslettersCQ.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/NewslettersCQ.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/NewslettersCQ.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,29 @@ +package jp.sf.pal.pompei.cbean.cq; + + +import jp.sf.pal.pompei.allcommon.cbean.ConditionQuery; +import jp.sf.pal.pompei.allcommon.cbean.sqlclause.SqlClause; +import jp.sf.pal.pompei.cbean.cq.bs.BsNewslettersCQ; + +/** + * The condition-query of NEWSLETTERS. + * + * @author DBFlute(AutoGenerator) + */ +public class NewslettersCQ extends BsNewslettersCQ { + + // ===================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param childQuery Child query as abstract class. (Nullable: If null, this is base instance.) + * @param sqlClause SQL clause instance. (NotNull) + * @param aliasName My alias name. (NotNull) + * @param nestLevel Nest level. + */ + public NewslettersCQ(ConditionQuery childQuery, SqlClause sqlClause, String aliasName, int nestLevel) { + super(childQuery, sqlClause, aliasName, nestLevel); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/OrdersCQ.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/OrdersCQ.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/OrdersCQ.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,29 @@ +package jp.sf.pal.pompei.cbean.cq; + + +import jp.sf.pal.pompei.allcommon.cbean.ConditionQuery; +import jp.sf.pal.pompei.allcommon.cbean.sqlclause.SqlClause; +import jp.sf.pal.pompei.cbean.cq.bs.BsOrdersCQ; + +/** + * The condition-query of ORDERS. + * + * @author DBFlute(AutoGenerator) + */ +public class OrdersCQ extends BsOrdersCQ { + + // ===================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param childQuery Child query as abstract class. (Nullable: If null, this is base instance.) + * @param sqlClause SQL clause instance. (NotNull) + * @param aliasName My alias name. (NotNull) + * @param nestLevel Nest level. + */ + public OrdersCQ(ConditionQuery childQuery, SqlClause sqlClause, String aliasName, int nestLevel) { + super(childQuery, sqlClause, aliasName, nestLevel); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/OrdersProductsAttributesCQ.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/OrdersProductsAttributesCQ.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/OrdersProductsAttributesCQ.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,29 @@ +package jp.sf.pal.pompei.cbean.cq; + + +import jp.sf.pal.pompei.allcommon.cbean.ConditionQuery; +import jp.sf.pal.pompei.allcommon.cbean.sqlclause.SqlClause; +import jp.sf.pal.pompei.cbean.cq.bs.BsOrdersProductsAttributesCQ; + +/** + * The condition-query of ORDERS_PRODUCTS_ATTRIBUTES. + * + * @author DBFlute(AutoGenerator) + */ +public class OrdersProductsAttributesCQ extends BsOrdersProductsAttributesCQ { + + // ===================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param childQuery Child query as abstract class. (Nullable: If null, this is base instance.) + * @param sqlClause SQL clause instance. (NotNull) + * @param aliasName My alias name. (NotNull) + * @param nestLevel Nest level. + */ + public OrdersProductsAttributesCQ(ConditionQuery childQuery, SqlClause sqlClause, String aliasName, int nestLevel) { + super(childQuery, sqlClause, aliasName, nestLevel); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/OrdersProductsCQ.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/OrdersProductsCQ.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/OrdersProductsCQ.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,29 @@ +package jp.sf.pal.pompei.cbean.cq; + + +import jp.sf.pal.pompei.allcommon.cbean.ConditionQuery; +import jp.sf.pal.pompei.allcommon.cbean.sqlclause.SqlClause; +import jp.sf.pal.pompei.cbean.cq.bs.BsOrdersProductsCQ; + +/** + * The condition-query of ORDERS_PRODUCTS. + * + * @author DBFlute(AutoGenerator) + */ +public class OrdersProductsCQ extends BsOrdersProductsCQ { + + // ===================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param childQuery Child query as abstract class. (Nullable: If null, this is base instance.) + * @param sqlClause SQL clause instance. (NotNull) + * @param aliasName My alias name. (NotNull) + * @param nestLevel Nest level. + */ + public OrdersProductsCQ(ConditionQuery childQuery, SqlClause sqlClause, String aliasName, int nestLevel) { + super(childQuery, sqlClause, aliasName, nestLevel); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/OrdersProductsDownloadCQ.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/OrdersProductsDownloadCQ.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/OrdersProductsDownloadCQ.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,29 @@ +package jp.sf.pal.pompei.cbean.cq; + + +import jp.sf.pal.pompei.allcommon.cbean.ConditionQuery; +import jp.sf.pal.pompei.allcommon.cbean.sqlclause.SqlClause; +import jp.sf.pal.pompei.cbean.cq.bs.BsOrdersProductsDownloadCQ; + +/** + * The condition-query of ORDERS_PRODUCTS_DOWNLOAD. + * + * @author DBFlute(AutoGenerator) + */ +public class OrdersProductsDownloadCQ extends BsOrdersProductsDownloadCQ { + + // ===================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param childQuery Child query as abstract class. (Nullable: If null, this is base instance.) + * @param sqlClause SQL clause instance. (NotNull) + * @param aliasName My alias name. (NotNull) + * @param nestLevel Nest level. + */ + public OrdersProductsDownloadCQ(ConditionQuery childQuery, SqlClause sqlClause, String aliasName, int nestLevel) { + super(childQuery, sqlClause, aliasName, nestLevel); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/OrdersStatusCQ.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/OrdersStatusCQ.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/OrdersStatusCQ.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,29 @@ +package jp.sf.pal.pompei.cbean.cq; + + +import jp.sf.pal.pompei.allcommon.cbean.ConditionQuery; +import jp.sf.pal.pompei.allcommon.cbean.sqlclause.SqlClause; +import jp.sf.pal.pompei.cbean.cq.bs.BsOrdersStatusCQ; + +/** + * The condition-query of ORDERS_STATUS. + * + * @author DBFlute(AutoGenerator) + */ +public class OrdersStatusCQ extends BsOrdersStatusCQ { + + // ===================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param childQuery Child query as abstract class. (Nullable: If null, this is base instance.) + * @param sqlClause SQL clause instance. (NotNull) + * @param aliasName My alias name. (NotNull) + * @param nestLevel Nest level. + */ + public OrdersStatusCQ(ConditionQuery childQuery, SqlClause sqlClause, String aliasName, int nestLevel) { + super(childQuery, sqlClause, aliasName, nestLevel); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/OrdersStatusHistoryCQ.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/OrdersStatusHistoryCQ.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/OrdersStatusHistoryCQ.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,29 @@ +package jp.sf.pal.pompei.cbean.cq; + + +import jp.sf.pal.pompei.allcommon.cbean.ConditionQuery; +import jp.sf.pal.pompei.allcommon.cbean.sqlclause.SqlClause; +import jp.sf.pal.pompei.cbean.cq.bs.BsOrdersStatusHistoryCQ; + +/** + * The condition-query of ORDERS_STATUS_HISTORY. + * + * @author DBFlute(AutoGenerator) + */ +public class OrdersStatusHistoryCQ extends BsOrdersStatusHistoryCQ { + + // ===================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param childQuery Child query as abstract class. (Nullable: If null, this is base instance.) + * @param sqlClause SQL clause instance. (NotNull) + * @param aliasName My alias name. (NotNull) + * @param nestLevel Nest level. + */ + public OrdersStatusHistoryCQ(ConditionQuery childQuery, SqlClause sqlClause, String aliasName, int nestLevel) { + super(childQuery, sqlClause, aliasName, nestLevel); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/OrdersTotalCQ.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/OrdersTotalCQ.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/OrdersTotalCQ.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,29 @@ +package jp.sf.pal.pompei.cbean.cq; + + +import jp.sf.pal.pompei.allcommon.cbean.ConditionQuery; +import jp.sf.pal.pompei.allcommon.cbean.sqlclause.SqlClause; +import jp.sf.pal.pompei.cbean.cq.bs.BsOrdersTotalCQ; + +/** + * The condition-query of ORDERS_TOTAL. + * + * @author DBFlute(AutoGenerator) + */ +public class OrdersTotalCQ extends BsOrdersTotalCQ { + + // ===================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param childQuery Child query as abstract class. (Nullable: If null, this is base instance.) + * @param sqlClause SQL clause instance. (NotNull) + * @param aliasName My alias name. (NotNull) + * @param nestLevel Nest level. + */ + public OrdersTotalCQ(ConditionQuery childQuery, SqlClause sqlClause, String aliasName, int nestLevel) { + super(childQuery, sqlClause, aliasName, nestLevel); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ProductsAttributesCQ.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ProductsAttributesCQ.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ProductsAttributesCQ.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,29 @@ +package jp.sf.pal.pompei.cbean.cq; + + +import jp.sf.pal.pompei.allcommon.cbean.ConditionQuery; +import jp.sf.pal.pompei.allcommon.cbean.sqlclause.SqlClause; +import jp.sf.pal.pompei.cbean.cq.bs.BsProductsAttributesCQ; + +/** + * The condition-query of PRODUCTS_ATTRIBUTES. + * + * @author DBFlute(AutoGenerator) + */ +public class ProductsAttributesCQ extends BsProductsAttributesCQ { + + // ===================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param childQuery Child query as abstract class. (Nullable: If null, this is base instance.) + * @param sqlClause SQL clause instance. (NotNull) + * @param aliasName My alias name. (NotNull) + * @param nestLevel Nest level. + */ + public ProductsAttributesCQ(ConditionQuery childQuery, SqlClause sqlClause, String aliasName, int nestLevel) { + super(childQuery, sqlClause, aliasName, nestLevel); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ProductsAttributesDownloadCQ.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ProductsAttributesDownloadCQ.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ProductsAttributesDownloadCQ.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,29 @@ +package jp.sf.pal.pompei.cbean.cq; + + +import jp.sf.pal.pompei.allcommon.cbean.ConditionQuery; +import jp.sf.pal.pompei.allcommon.cbean.sqlclause.SqlClause; +import jp.sf.pal.pompei.cbean.cq.bs.BsProductsAttributesDownloadCQ; + +/** + * The condition-query of PRODUCTS_ATTRIBUTES_DOWNLOAD. + * + * @author DBFlute(AutoGenerator) + */ +public class ProductsAttributesDownloadCQ extends BsProductsAttributesDownloadCQ { + + // ===================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param childQuery Child query as abstract class. (Nullable: If null, this is base instance.) + * @param sqlClause SQL clause instance. (NotNull) + * @param aliasName My alias name. (NotNull) + * @param nestLevel Nest level. + */ + public ProductsAttributesDownloadCQ(ConditionQuery childQuery, SqlClause sqlClause, String aliasName, int nestLevel) { + super(childQuery, sqlClause, aliasName, nestLevel); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ProductsCQ.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ProductsCQ.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ProductsCQ.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,29 @@ +package jp.sf.pal.pompei.cbean.cq; + + +import jp.sf.pal.pompei.allcommon.cbean.ConditionQuery; +import jp.sf.pal.pompei.allcommon.cbean.sqlclause.SqlClause; +import jp.sf.pal.pompei.cbean.cq.bs.BsProductsCQ; + +/** + * The condition-query of PRODUCTS. + * + * @author DBFlute(AutoGenerator) + */ +public class ProductsCQ extends BsProductsCQ { + + // ===================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param childQuery Child query as abstract class. (Nullable: If null, this is base instance.) + * @param sqlClause SQL clause instance. (NotNull) + * @param aliasName My alias name. (NotNull) + * @param nestLevel Nest level. + */ + public ProductsCQ(ConditionQuery childQuery, SqlClause sqlClause, String aliasName, int nestLevel) { + super(childQuery, sqlClause, aliasName, nestLevel); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ProductsDescriptionCQ.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ProductsDescriptionCQ.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ProductsDescriptionCQ.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,29 @@ +package jp.sf.pal.pompei.cbean.cq; + + +import jp.sf.pal.pompei.allcommon.cbean.ConditionQuery; +import jp.sf.pal.pompei.allcommon.cbean.sqlclause.SqlClause; +import jp.sf.pal.pompei.cbean.cq.bs.BsProductsDescriptionCQ; + +/** + * The condition-query of PRODUCTS_DESCRIPTION. + * + * @author DBFlute(AutoGenerator) + */ +public class ProductsDescriptionCQ extends BsProductsDescriptionCQ { + + // ===================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param childQuery Child query as abstract class. (Nullable: If null, this is base instance.) + * @param sqlClause SQL clause instance. (NotNull) + * @param aliasName My alias name. (NotNull) + * @param nestLevel Nest level. + */ + public ProductsDescriptionCQ(ConditionQuery childQuery, SqlClause sqlClause, String aliasName, int nestLevel) { + super(childQuery, sqlClause, aliasName, nestLevel); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ProductsNotificationsCQ.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ProductsNotificationsCQ.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ProductsNotificationsCQ.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,29 @@ +package jp.sf.pal.pompei.cbean.cq; + + +import jp.sf.pal.pompei.allcommon.cbean.ConditionQuery; +import jp.sf.pal.pompei.allcommon.cbean.sqlclause.SqlClause; +import jp.sf.pal.pompei.cbean.cq.bs.BsProductsNotificationsCQ; + +/** + * The condition-query of PRODUCTS_NOTIFICATIONS. + * + * @author DBFlute(AutoGenerator) + */ +public class ProductsNotificationsCQ extends BsProductsNotificationsCQ { + + // ===================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param childQuery Child query as abstract class. (Nullable: If null, this is base instance.) + * @param sqlClause SQL clause instance. (NotNull) + * @param aliasName My alias name. (NotNull) + * @param nestLevel Nest level. + */ + public ProductsNotificationsCQ(ConditionQuery childQuery, SqlClause sqlClause, String aliasName, int nestLevel) { + super(childQuery, sqlClause, aliasName, nestLevel); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ProductsOptionsCQ.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ProductsOptionsCQ.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ProductsOptionsCQ.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,29 @@ +package jp.sf.pal.pompei.cbean.cq; + + +import jp.sf.pal.pompei.allcommon.cbean.ConditionQuery; +import jp.sf.pal.pompei.allcommon.cbean.sqlclause.SqlClause; +import jp.sf.pal.pompei.cbean.cq.bs.BsProductsOptionsCQ; + +/** + * The condition-query of PRODUCTS_OPTIONS. + * + * @author DBFlute(AutoGenerator) + */ +public class ProductsOptionsCQ extends BsProductsOptionsCQ { + + // ===================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param childQuery Child query as abstract class. (Nullable: If null, this is base instance.) + * @param sqlClause SQL clause instance. (NotNull) + * @param aliasName My alias name. (NotNull) + * @param nestLevel Nest level. + */ + public ProductsOptionsCQ(ConditionQuery childQuery, SqlClause sqlClause, String aliasName, int nestLevel) { + super(childQuery, sqlClause, aliasName, nestLevel); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ProductsOptionsValuesCQ.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ProductsOptionsValuesCQ.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ProductsOptionsValuesCQ.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,29 @@ +package jp.sf.pal.pompei.cbean.cq; + + +import jp.sf.pal.pompei.allcommon.cbean.ConditionQuery; +import jp.sf.pal.pompei.allcommon.cbean.sqlclause.SqlClause; +import jp.sf.pal.pompei.cbean.cq.bs.BsProductsOptionsValuesCQ; + +/** + * The condition-query of PRODUCTS_OPTIONS_VALUES. + * + * @author DBFlute(AutoGenerator) + */ +public class ProductsOptionsValuesCQ extends BsProductsOptionsValuesCQ { + + // ===================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param childQuery Child query as abstract class. (Nullable: If null, this is base instance.) + * @param sqlClause SQL clause instance. (NotNull) + * @param aliasName My alias name. (NotNull) + * @param nestLevel Nest level. + */ + public ProductsOptionsValuesCQ(ConditionQuery childQuery, SqlClause sqlClause, String aliasName, int nestLevel) { + super(childQuery, sqlClause, aliasName, nestLevel); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ProductsOptionsValuesToProductsOptionsCQ.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ProductsOptionsValuesToProductsOptionsCQ.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ProductsOptionsValuesToProductsOptionsCQ.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,29 @@ +package jp.sf.pal.pompei.cbean.cq; + + +import jp.sf.pal.pompei.allcommon.cbean.ConditionQuery; +import jp.sf.pal.pompei.allcommon.cbean.sqlclause.SqlClause; +import jp.sf.pal.pompei.cbean.cq.bs.BsProductsOptionsValuesToProductsOptionsCQ; + +/** + * The condition-query of PRODUCTS_OPTIONS_VALUES_TO_PRODUCTS_OPTIONS. + * + * @author DBFlute(AutoGenerator) + */ +public class ProductsOptionsValuesToProductsOptionsCQ extends BsProductsOptionsValuesToProductsOptionsCQ { + + // ===================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param childQuery Child query as abstract class. (Nullable: If null, this is base instance.) + * @param sqlClause SQL clause instance. (NotNull) + * @param aliasName My alias name. (NotNull) + * @param nestLevel Nest level. + */ + public ProductsOptionsValuesToProductsOptionsCQ(ConditionQuery childQuery, SqlClause sqlClause, String aliasName, int nestLevel) { + super(childQuery, sqlClause, aliasName, nestLevel); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ProductsToCategoriesCQ.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ProductsToCategoriesCQ.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ProductsToCategoriesCQ.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,29 @@ +package jp.sf.pal.pompei.cbean.cq; + + +import jp.sf.pal.pompei.allcommon.cbean.ConditionQuery; +import jp.sf.pal.pompei.allcommon.cbean.sqlclause.SqlClause; +import jp.sf.pal.pompei.cbean.cq.bs.BsProductsToCategoriesCQ; + +/** + * The condition-query of PRODUCTS_TO_CATEGORIES. + * + * @author DBFlute(AutoGenerator) + */ +public class ProductsToCategoriesCQ extends BsProductsToCategoriesCQ { + + // ===================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param childQuery Child query as abstract class. (Nullable: If null, this is base instance.) + * @param sqlClause SQL clause instance. (NotNull) + * @param aliasName My alias name. (NotNull) + * @param nestLevel Nest level. + */ + public ProductsToCategoriesCQ(ConditionQuery childQuery, SqlClause sqlClause, String aliasName, int nestLevel) { + super(childQuery, sqlClause, aliasName, nestLevel); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ReviewsCQ.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ReviewsCQ.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ReviewsCQ.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,29 @@ +package jp.sf.pal.pompei.cbean.cq; + + +import jp.sf.pal.pompei.allcommon.cbean.ConditionQuery; +import jp.sf.pal.pompei.allcommon.cbean.sqlclause.SqlClause; +import jp.sf.pal.pompei.cbean.cq.bs.BsReviewsCQ; + +/** + * The condition-query of REVIEWS. + * + * @author DBFlute(AutoGenerator) + */ +public class ReviewsCQ extends BsReviewsCQ { + + // ===================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param childQuery Child query as abstract class. (Nullable: If null, this is base instance.) + * @param sqlClause SQL clause instance. (NotNull) + * @param aliasName My alias name. (NotNull) + * @param nestLevel Nest level. + */ + public ReviewsCQ(ConditionQuery childQuery, SqlClause sqlClause, String aliasName, int nestLevel) { + super(childQuery, sqlClause, aliasName, nestLevel); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ReviewsDescriptionCQ.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ReviewsDescriptionCQ.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ReviewsDescriptionCQ.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,29 @@ +package jp.sf.pal.pompei.cbean.cq; + + +import jp.sf.pal.pompei.allcommon.cbean.ConditionQuery; +import jp.sf.pal.pompei.allcommon.cbean.sqlclause.SqlClause; +import jp.sf.pal.pompei.cbean.cq.bs.BsReviewsDescriptionCQ; + +/** + * The condition-query of REVIEWS_DESCRIPTION. + * + * @author DBFlute(AutoGenerator) + */ +public class ReviewsDescriptionCQ extends BsReviewsDescriptionCQ { + + // ===================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param childQuery Child query as abstract class. (Nullable: If null, this is base instance.) + * @param sqlClause SQL clause instance. (NotNull) + * @param aliasName My alias name. (NotNull) + * @param nestLevel Nest level. + */ + public ReviewsDescriptionCQ(ConditionQuery childQuery, SqlClause sqlClause, String aliasName, int nestLevel) { + super(childQuery, sqlClause, aliasName, nestLevel); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/SessionsCQ.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/SessionsCQ.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/SessionsCQ.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,29 @@ +package jp.sf.pal.pompei.cbean.cq; + + +import jp.sf.pal.pompei.allcommon.cbean.ConditionQuery; +import jp.sf.pal.pompei.allcommon.cbean.sqlclause.SqlClause; +import jp.sf.pal.pompei.cbean.cq.bs.BsSessionsCQ; + +/** + * The condition-query of SESSIONS. + * + * @author DBFlute(AutoGenerator) + */ +public class SessionsCQ extends BsSessionsCQ { + + // ===================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param childQuery Child query as abstract class. (Nullable: If null, this is base instance.) + * @param sqlClause SQL clause instance. (NotNull) + * @param aliasName My alias name. (NotNull) + * @param nestLevel Nest level. + */ + public SessionsCQ(ConditionQuery childQuery, SqlClause sqlClause, String aliasName, int nestLevel) { + super(childQuery, sqlClause, aliasName, nestLevel); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/SpecialsCQ.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/SpecialsCQ.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/SpecialsCQ.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,29 @@ +package jp.sf.pal.pompei.cbean.cq; + + +import jp.sf.pal.pompei.allcommon.cbean.ConditionQuery; +import jp.sf.pal.pompei.allcommon.cbean.sqlclause.SqlClause; +import jp.sf.pal.pompei.cbean.cq.bs.BsSpecialsCQ; + +/** + * The condition-query of SPECIALS. + * + * @author DBFlute(AutoGenerator) + */ +public class SpecialsCQ extends BsSpecialsCQ { + + // ===================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param childQuery Child query as abstract class. (Nullable: If null, this is base instance.) + * @param sqlClause SQL clause instance. (NotNull) + * @param aliasName My alias name. (NotNull) + * @param nestLevel Nest level. + */ + public SpecialsCQ(ConditionQuery childQuery, SqlClause sqlClause, String aliasName, int nestLevel) { + super(childQuery, sqlClause, aliasName, nestLevel); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/TaxClassCQ.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/TaxClassCQ.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/TaxClassCQ.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,29 @@ +package jp.sf.pal.pompei.cbean.cq; + + +import jp.sf.pal.pompei.allcommon.cbean.ConditionQuery; +import jp.sf.pal.pompei.allcommon.cbean.sqlclause.SqlClause; +import jp.sf.pal.pompei.cbean.cq.bs.BsTaxClassCQ; + +/** + * The condition-query of TAX_CLASS. + * + * @author DBFlute(AutoGenerator) + */ +public class TaxClassCQ extends BsTaxClassCQ { + + // ===================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param childQuery Child query as abstract class. (Nullable: If null, this is base instance.) + * @param sqlClause SQL clause instance. (NotNull) + * @param aliasName My alias name. (NotNull) + * @param nestLevel Nest level. + */ + public TaxClassCQ(ConditionQuery childQuery, SqlClause sqlClause, String aliasName, int nestLevel) { + super(childQuery, sqlClause, aliasName, nestLevel); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/TaxRatesCQ.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/TaxRatesCQ.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/TaxRatesCQ.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,29 @@ +package jp.sf.pal.pompei.cbean.cq; + + +import jp.sf.pal.pompei.allcommon.cbean.ConditionQuery; +import jp.sf.pal.pompei.allcommon.cbean.sqlclause.SqlClause; +import jp.sf.pal.pompei.cbean.cq.bs.BsTaxRatesCQ; + +/** + * The condition-query of TAX_RATES. + * + * @author DBFlute(AutoGenerator) + */ +public class TaxRatesCQ extends BsTaxRatesCQ { + + // ===================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param childQuery Child query as abstract class. (Nullable: If null, this is base instance.) + * @param sqlClause SQL clause instance. (NotNull) + * @param aliasName My alias name. (NotNull) + * @param nestLevel Nest level. + */ + public TaxRatesCQ(ConditionQuery childQuery, SqlClause sqlClause, String aliasName, int nestLevel) { + super(childQuery, sqlClause, aliasName, nestLevel); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/WhosOnlineCQ.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/WhosOnlineCQ.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/WhosOnlineCQ.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,29 @@ +package jp.sf.pal.pompei.cbean.cq; + + +import jp.sf.pal.pompei.allcommon.cbean.ConditionQuery; +import jp.sf.pal.pompei.allcommon.cbean.sqlclause.SqlClause; +import jp.sf.pal.pompei.cbean.cq.bs.BsWhosOnlineCQ; + +/** + * The condition-query of WHOS_ONLINE. + * + * @author DBFlute(AutoGenerator) + */ +public class WhosOnlineCQ extends BsWhosOnlineCQ { + + // ===================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param childQuery Child query as abstract class. (Nullable: If null, this is base instance.) + * @param sqlClause SQL clause instance. (NotNull) + * @param aliasName My alias name. (NotNull) + * @param nestLevel Nest level. + */ + public WhosOnlineCQ(ConditionQuery childQuery, SqlClause sqlClause, String aliasName, int nestLevel) { + super(childQuery, sqlClause, aliasName, nestLevel); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ZonesCQ.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ZonesCQ.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ZonesCQ.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,29 @@ +package jp.sf.pal.pompei.cbean.cq; + + +import jp.sf.pal.pompei.allcommon.cbean.ConditionQuery; +import jp.sf.pal.pompei.allcommon.cbean.sqlclause.SqlClause; +import jp.sf.pal.pompei.cbean.cq.bs.BsZonesCQ; + +/** + * The condition-query of ZONES. + * + * @author DBFlute(AutoGenerator) + */ +public class ZonesCQ extends BsZonesCQ { + + // ===================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param childQuery Child query as abstract class. (Nullable: If null, this is base instance.) + * @param sqlClause SQL clause instance. (NotNull) + * @param aliasName My alias name. (NotNull) + * @param nestLevel Nest level. + */ + public ZonesCQ(ConditionQuery childQuery, SqlClause sqlClause, String aliasName, int nestLevel) { + super(childQuery, sqlClause, aliasName, nestLevel); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ZonesToGeoZonesCQ.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ZonesToGeoZonesCQ.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ZonesToGeoZonesCQ.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,29 @@ +package jp.sf.pal.pompei.cbean.cq; + + +import jp.sf.pal.pompei.allcommon.cbean.ConditionQuery; +import jp.sf.pal.pompei.allcommon.cbean.sqlclause.SqlClause; +import jp.sf.pal.pompei.cbean.cq.bs.BsZonesToGeoZonesCQ; + +/** + * The condition-query of ZONES_TO_GEO_ZONES. + * + * @author DBFlute(AutoGenerator) + */ +public class ZonesToGeoZonesCQ extends BsZonesToGeoZonesCQ { + + // ===================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param childQuery Child query as abstract class. (Nullable: If null, this is base instance.) + * @param sqlClause SQL clause instance. (NotNull) + * @param aliasName My alias name. (NotNull) + * @param nestLevel Nest level. + */ + public ZonesToGeoZonesCQ(ConditionQuery childQuery, SqlClause sqlClause, String aliasName, int nestLevel) { + super(childQuery, sqlClause, aliasName, nestLevel); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/AbstractBsAddressBookCQ.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/AbstractBsAddressBookCQ.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/AbstractBsAddressBookCQ.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,1815 @@ + +package jp.sf.pal.pompei.cbean.cq.bs; + + + +import jp.sf.pal.pompei.allcommon.cbean.*; +import jp.sf.pal.pompei.allcommon.cbean.ckey.*; +import jp.sf.pal.pompei.allcommon.cbean.cvalue.ConditionValue; +import jp.sf.pal.pompei.allcommon.cbean.sqlclause.SqlClause; +import jp.sf.pal.pompei.cbean.cq.*; + +/** + * The condition-query of ADDRESS_BOOK. + * + * @author DBFlute(AutoGenerator) + */ +public abstract class AbstractBsAddressBookCQ extends AbstractConditionQuery { + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param childQuery Child query as abstract class. (Nullable: If null, this is base instance.) + * @param sqlClause SQL clause instance. (NotNull) + * @param aliasName My alias name. (NotNull) + * @param nestLevel Nest level. + */ + public AbstractBsAddressBookCQ(ConditionQuery childQuery, SqlClause sqlClause, String aliasName, int nestLevel) { + super(childQuery, sqlClause, aliasName, nestLevel); + } + + // =================================================================================== + // Table Name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + final public String getTableDbName() { + return "ADDRESS_BOOK"; + } + + // =================================================================================== + // Query + // ===== + + // /* * * * * * * * * * * * * * * * * * * * * * * + // MyTable = [ADDRESS_BOOK] + // * * * * * * * * */ + + + /** Column db name of addressBookId. */ + protected static final String COL_ADDRESS_BOOK_ID = "ADDRESS_BOOK_ID"; + + /** Column java name of addressBookId. */ + protected static final String J_AddressBookId = "AddressBookId"; + + /** Column uncapitalised java name of addressBookId. */ + protected static final String UJ_addressBookId = "addressBookId"; + + /** + * Set the value of addressBookId using equal. { = } + * + * @param addressBookId The value of addressBookId as equal. + */ + public void setAddressBookId_Equal(java.math.BigDecimal addressBookId) { + registerAddressBookId(ConditionKey.CK_EQUAL, addressBookId); + } + + /** + * Set the value of addressBookId using notEqual. { != } + * + * @param addressBookId The value of addressBookId as notEqual. + */ + public void setAddressBookId_NotEqual(java.math.BigDecimal addressBookId) { + registerAddressBookId(ConditionKey.CK_NOT_EQUAL, addressBookId); + } + + /** + * Set the value of addressBookId using greaterThan. { > } + * + * @param addressBookId The value of addressBookId as greaterThan. + */ + public void setAddressBookId_GreaterThan(java.math.BigDecimal addressBookId) { + registerAddressBookId(ConditionKey.CK_GREATER_THAN, addressBookId); + } + + /** + * Set the value of addressBookId using lessThan. { < } + * + * @param addressBookId The value of addressBookId as lessThan. + */ + public void setAddressBookId_LessThan(java.math.BigDecimal addressBookId) { + registerAddressBookId(ConditionKey.CK_LESS_THAN, addressBookId); + } + + /** + * Set the value of addressBookId using greaterEqual. { >= } + * + * @param addressBookId The value of addressBookId as greaterEqual. + */ + public void setAddressBookId_GreaterEqual(java.math.BigDecimal addressBookId) { + registerAddressBookId(ConditionKey.CK_GREATER_EQUAL, addressBookId); + } + + /** + * Set the value of addressBookId using lessEqual. { <= } + * + * @param addressBookId The value of addressBookId as lessEqual. + */ + public void setAddressBookId_LessEqual(java.math.BigDecimal addressBookId) { + registerAddressBookId(ConditionKey.CK_LESS_EQUAL, addressBookId); + } + + /** + * Set the value of addressBookId using inScope. { in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param addressBookIdList The value of addressBookId as inScope. + */ + public void setAddressBookId_InScope(java.util.List addressBookIdList) { + registerAddressBookId(ConditionKey.CK_IN_SCOPE, addressBookIdList); + } + + /** + * Set the value of addressBookId using notInScope. { not in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param addressBookIdList The value of addressBookId as notInScope. + */ + public void setAddressBookId_NotInScope(java.util.List addressBookIdList) { + registerAddressBookId(ConditionKey.CK_NOT_IN_SCOPE, addressBookIdList); + } + + /** + * Register condition of addressBookId. + * + * @param key Condition key. (NotNull) + * @param value The value of addressBookId. (Nullable) + */ + protected void registerAddressBookId(ConditionKey key, Object value) { + registerQuery(key, value, getCValueAddressBookId(), COL_ADDRESS_BOOK_ID, J_AddressBookId, UJ_addressBookId); + } + + /** + * Register inline condition of addressBookId. + * + * @param key Condition key. (NotNull) + * @param value The value of addressBookId. (Nullable) + */ + protected void registerInlineAddressBookId(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueAddressBookId(), COL_ADDRESS_BOOK_ID, J_AddressBookId, UJ_addressBookId); + } + + abstract protected ConditionValue getCValueAddressBookId(); + + /** Column db name of customersId. */ + protected static final String COL_CUSTOMERS_ID = "CUSTOMERS_ID"; + + /** Column java name of customersId. */ + protected static final String J_CustomersId = "CustomersId"; + + /** Column uncapitalised java name of customersId. */ + protected static final String UJ_customersId = "customersId"; + + /** + * Set the value of customersId using equal. { = } + * + * @param customersId The value of customersId as equal. + */ + public void setCustomersId_Equal(java.math.BigDecimal customersId) { + registerCustomersId(ConditionKey.CK_EQUAL, customersId); + } + + /** + * Set the value of customersId using notEqual. { != } + * + * @param customersId The value of customersId as notEqual. + */ + public void setCustomersId_NotEqual(java.math.BigDecimal customersId) { + registerCustomersId(ConditionKey.CK_NOT_EQUAL, customersId); + } + + /** + * Set the value of customersId using greaterThan. { > } + * + * @param customersId The value of customersId as greaterThan. + */ + public void setCustomersId_GreaterThan(java.math.BigDecimal customersId) { + registerCustomersId(ConditionKey.CK_GREATER_THAN, customersId); + } + + /** + * Set the value of customersId using lessThan. { < } + * + * @param customersId The value of customersId as lessThan. + */ + public void setCustomersId_LessThan(java.math.BigDecimal customersId) { + registerCustomersId(ConditionKey.CK_LESS_THAN, customersId); + } + + /** + * Set the value of customersId using greaterEqual. { >= } + * + * @param customersId The value of customersId as greaterEqual. + */ + public void setCustomersId_GreaterEqual(java.math.BigDecimal customersId) { + registerCustomersId(ConditionKey.CK_GREATER_EQUAL, customersId); + } + + /** + * Set the value of customersId using lessEqual. { <= } + * + * @param customersId The value of customersId as lessEqual. + */ + public void setCustomersId_LessEqual(java.math.BigDecimal customersId) { + registerCustomersId(ConditionKey.CK_LESS_EQUAL, customersId); + } + + /** + * Set the value of customersId using inScope. { in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param customersIdList The value of customersId as inScope. + */ + public void setCustomersId_InScope(java.util.List customersIdList) { + registerCustomersId(ConditionKey.CK_IN_SCOPE, customersIdList); + } + + /** + * Set the value of customersId using notInScope. { not in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param customersIdList The value of customersId as notInScope. + */ + public void setCustomersId_NotInScope(java.util.List customersIdList) { + registerCustomersId(ConditionKey.CK_NOT_IN_SCOPE, customersIdList); + } + + /** + * Register condition of customersId. + * + * @param key Condition key. (NotNull) + * @param value The value of customersId. (Nullable) + */ + protected void registerCustomersId(ConditionKey key, Object value) { + registerQuery(key, value, getCValueCustomersId(), COL_CUSTOMERS_ID, J_CustomersId, UJ_customersId); + } + + /** + * Register inline condition of customersId. + * + * @param key Condition key. (NotNull) + * @param value The value of customersId. (Nullable) + */ + protected void registerInlineCustomersId(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueCustomersId(), COL_CUSTOMERS_ID, J_CustomersId, UJ_customersId); + } + + abstract protected ConditionValue getCValueCustomersId(); + + /** Column db name of entryGender. */ + protected static final String COL_ENTRY_GENDER = "ENTRY_GENDER"; + + /** Column java name of entryGender. */ + protected static final String J_EntryGender = "EntryGender"; + + /** Column uncapitalised java name of entryGender. */ + protected static final String UJ_entryGender = "entryGender"; + + /** + * Set the value of entryGender using equal. { = } + * If the value is null or empty-string, this condition is ignored. + * + * @param entryGender The value of entryGender as equal. + */ + public void setEntryGender_Equal(String entryGender) { + registerEntryGender(ConditionKey.CK_EQUAL, filterRemoveEmptyString(entryGender)); + } + + /** + * Set the value of entryGender using notEqual. { != } + * If the value is null or empty-string, this condition is ignored. + * + * @param entryGender The value of entryGender as notEqual. + */ + public void setEntryGender_NotEqual(String entryGender) { + registerEntryGender(ConditionKey.CK_NOT_EQUAL, filterRemoveEmptyString(entryGender)); + } + + /** + * Set the value of entryGender using greaterThan. { > } + * If the value is null or empty-string, this condition is ignored. + * + * @param entryGender The value of entryGender as greaterThan. + */ + public void setEntryGender_GreaterThan(String entryGender) { + registerEntryGender(ConditionKey.CK_GREATER_THAN, filterRemoveEmptyString(entryGender)); + } + + /** + * Set the value of entryGender using lessThan. { < } + * If the value is null or empty-string, this condition is ignored. + * + * @param entryGender The value of entryGender as lessThan. + */ + public void setEntryGender_LessThan(String entryGender) { + registerEntryGender(ConditionKey.CK_LESS_THAN, filterRemoveEmptyString(entryGender)); + } + + /** + * Set the value of entryGender using greaterEqual. { >= } + * If the value is null or empty-string, this condition is ignored. + * + * @param entryGender The value of entryGender as greaterEqual. + */ + public void setEntryGender_GreaterEqual(String entryGender) { + registerEntryGender(ConditionKey.CK_GREATER_EQUAL, filterRemoveEmptyString(entryGender)); + } + + /** + * Set the value of entryGender using lessEqual. { <= } + * If the value is null or empty-string, this condition is ignored. + * + * @param entryGender The value of entryGender as lessEqual. + */ + public void setEntryGender_LessEqual(String entryGender) { + registerEntryGender(ConditionKey.CK_LESS_EQUAL, filterRemoveEmptyString(entryGender)); + } + + /** + * Set the value of entryGender using prefixSearch. { like 'xxx%' } + * If the value is null or empty-string, this condition is ignored. + * + * @param entryGender The value of entryGender as prefixSearch. + */ + public void setEntryGender_PrefixSearch(String entryGender) { + registerEntryGender(ConditionKey.CK_PREFIX_SEARCH, filterRemoveEmptyString(entryGender)); + } + + /** + * Set the value of entryGender using likeSearch. { like '%xxx%' } + * If the value is null or empty-string, this condition is ignored. + * You can invoke this method several times and the conditions are set up. + * + * @param entryGender The value of entryGender as likeSearch. + * @param likeSearchOption Like search option. (NotNull) + */ + public void setEntryGender_LikeSearch(String entryGender, jp.sf.pal.pompei.allcommon.cbean.coption.LikeSearchOption likeSearchOption) { + registerLikeSearchQuery(ConditionKey.CK_LIKE_SEARCH, filterRemoveEmptyString(entryGender), getCValueEntryGender(), COL_ENTRY_GENDER, J_EntryGender, UJ_entryGender, likeSearchOption); + } + + /** + * Set the value of entryGender using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param entryGenderList The value of entryGender as inScope. + */ + public void setEntryGender_InScope(java.util.List entryGenderList) { + registerEntryGender(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyStringFromList(entryGenderList)); + } + + /** + * Set the value of entryGender using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param entryGender The value of entryGender as inScope. + */ + public void setEntryGender_InScope(String entryGender, jp.sf.pal.pompei.allcommon.cbean.coption.InScopeOption option) { + registerInScopeQuery(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyString(entryGender), getCValueEntryGender(), COL_ENTRY_GENDER, J_EntryGender, UJ_entryGender, option); + } + + /** + * Set the value of entryGender using notInScope. { not in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param entryGenderList The value of entryGender as notInScope. + */ + public void setEntryGender_NotInScope(java.util.List entryGenderList) { + registerEntryGender(ConditionKey.CK_NOT_IN_SCOPE, filterRemoveEmptyStringFromList(entryGenderList)); + } + + /** + * Register condition of entryGender. + * + * @param key Condition key. (NotNull) + * @param value The value of entryGender. (Nullable) + */ + protected void registerEntryGender(ConditionKey key, Object value) { + registerQuery(key, value, getCValueEntryGender(), COL_ENTRY_GENDER, J_EntryGender, UJ_entryGender); + } + + /** + * Register inline condition of entryGender. + * + * @param key Condition key. (NotNull) + * @param value The value of entryGender. (Nullable) + */ + protected void registerInlineEntryGender(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueEntryGender(), COL_ENTRY_GENDER, J_EntryGender, UJ_entryGender); + } + + abstract protected ConditionValue getCValueEntryGender(); + + /** Column db name of entryCompany. */ + protected static final String COL_ENTRY_COMPANY = "ENTRY_COMPANY"; + + /** Column java name of entryCompany. */ + protected static final String J_EntryCompany = "EntryCompany"; + + /** Column uncapitalised java name of entryCompany. */ + protected static final String UJ_entryCompany = "entryCompany"; + + /** + * Set the value of entryCompany using equal. { = } + * If the value is null or empty-string, this condition is ignored. + * + * @param entryCompany The value of entryCompany as equal. + */ + public void setEntryCompany_Equal(String entryCompany) { + registerEntryCompany(ConditionKey.CK_EQUAL, filterRemoveEmptyString(entryCompany)); + } + + /** + * Set the value of entryCompany using notEqual. { != } + * If the value is null or empty-string, this condition is ignored. + * + * @param entryCompany The value of entryCompany as notEqual. + */ + public void setEntryCompany_NotEqual(String entryCompany) { + registerEntryCompany(ConditionKey.CK_NOT_EQUAL, filterRemoveEmptyString(entryCompany)); + } + + /** + * Set the value of entryCompany using greaterThan. { > } + * If the value is null or empty-string, this condition is ignored. + * + * @param entryCompany The value of entryCompany as greaterThan. + */ + public void setEntryCompany_GreaterThan(String entryCompany) { + registerEntryCompany(ConditionKey.CK_GREATER_THAN, filterRemoveEmptyString(entryCompany)); + } + + /** + * Set the value of entryCompany using lessThan. { < } + * If the value is null or empty-string, this condition is ignored. + * + * @param entryCompany The value of entryCompany as lessThan. + */ + public void setEntryCompany_LessThan(String entryCompany) { + registerEntryCompany(ConditionKey.CK_LESS_THAN, filterRemoveEmptyString(entryCompany)); + } + + /** + * Set the value of entryCompany using greaterEqual. { >= } + * If the value is null or empty-string, this condition is ignored. + * + * @param entryCompany The value of entryCompany as greaterEqual. + */ + public void setEntryCompany_GreaterEqual(String entryCompany) { + registerEntryCompany(ConditionKey.CK_GREATER_EQUAL, filterRemoveEmptyString(entryCompany)); + } + + /** + * Set the value of entryCompany using lessEqual. { <= } + * If the value is null or empty-string, this condition is ignored. + * + * @param entryCompany The value of entryCompany as lessEqual. + */ + public void setEntryCompany_LessEqual(String entryCompany) { + registerEntryCompany(ConditionKey.CK_LESS_EQUAL, filterRemoveEmptyString(entryCompany)); + } + + /** + * Set the value of entryCompany using prefixSearch. { like 'xxx%' } + * If the value is null or empty-string, this condition is ignored. + * + * @param entryCompany The value of entryCompany as prefixSearch. + */ + public void setEntryCompany_PrefixSearch(String entryCompany) { + registerEntryCompany(ConditionKey.CK_PREFIX_SEARCH, filterRemoveEmptyString(entryCompany)); + } + + /** + * Set the value of entryCompany using likeSearch. { like '%xxx%' } + * If the value is null or empty-string, this condition is ignored. + * You can invoke this method several times and the conditions are set up. + * + * @param entryCompany The value of entryCompany as likeSearch. + * @param likeSearchOption Like search option. (NotNull) + */ + public void setEntryCompany_LikeSearch(String entryCompany, jp.sf.pal.pompei.allcommon.cbean.coption.LikeSearchOption likeSearchOption) { + registerLikeSearchQuery(ConditionKey.CK_LIKE_SEARCH, filterRemoveEmptyString(entryCompany), getCValueEntryCompany(), COL_ENTRY_COMPANY, J_EntryCompany, UJ_entryCompany, likeSearchOption); + } + + /** + * Set the value of entryCompany using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param entryCompanyList The value of entryCompany as inScope. + */ + public void setEntryCompany_InScope(java.util.List entryCompanyList) { + registerEntryCompany(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyStringFromList(entryCompanyList)); + } + + /** + * Set the value of entryCompany using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param entryCompany The value of entryCompany as inScope. + */ + public void setEntryCompany_InScope(String entryCompany, jp.sf.pal.pompei.allcommon.cbean.coption.InScopeOption option) { + registerInScopeQuery(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyString(entryCompany), getCValueEntryCompany(), COL_ENTRY_COMPANY, J_EntryCompany, UJ_entryCompany, option); + } + + /** + * Set the value of entryCompany using notInScope. { not in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param entryCompanyList The value of entryCompany as notInScope. + */ + public void setEntryCompany_NotInScope(java.util.List entryCompanyList) { + registerEntryCompany(ConditionKey.CK_NOT_IN_SCOPE, filterRemoveEmptyStringFromList(entryCompanyList)); + } + + /** + * Set the value of entryCompany using isNull. { is null } + */ + public void setEntryCompany_IsNull() { + registerEntryCompany(ConditionKey.CK_IS_NULL, DUMMY_OBJECT); + } + + /** + * Set the value of entryCompany using isNotNull. { is not null } + */ + public void setEntryCompany_IsNotNull() { + registerEntryCompany(ConditionKey.CK_IS_NOT_NULL, DUMMY_OBJECT); + } + + /** + * Register condition of entryCompany. + * + * @param key Condition key. (NotNull) + * @param value The value of entryCompany. (Nullable) + */ + protected void registerEntryCompany(ConditionKey key, Object value) { + registerQuery(key, value, getCValueEntryCompany(), COL_ENTRY_COMPANY, J_EntryCompany, UJ_entryCompany); + } + + /** + * Register inline condition of entryCompany. + * + * @param key Condition key. (NotNull) + * @param value The value of entryCompany. (Nullable) + */ + protected void registerInlineEntryCompany(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueEntryCompany(), COL_ENTRY_COMPANY, J_EntryCompany, UJ_entryCompany); + } + + abstract protected ConditionValue getCValueEntryCompany(); + + /** Column db name of entryFirstname. */ + protected static final String COL_ENTRY_FIRSTNAME = "ENTRY_FIRSTNAME"; + + /** Column java name of entryFirstname. */ + protected static final String J_EntryFirstname = "EntryFirstname"; + + /** Column uncapitalised java name of entryFirstname. */ + protected static final String UJ_entryFirstname = "entryFirstname"; + + /** + * Set the value of entryFirstname using equal. { = } + * If the value is null or empty-string, this condition is ignored. + * + * @param entryFirstname The value of entryFirstname as equal. + */ + public void setEntryFirstname_Equal(String entryFirstname) { + registerEntryFirstname(ConditionKey.CK_EQUAL, filterRemoveEmptyString(entryFirstname)); + } + + /** + * Set the value of entryFirstname using notEqual. { != } + * If the value is null or empty-string, this condition is ignored. + * + * @param entryFirstname The value of entryFirstname as notEqual. + */ + public void setEntryFirstname_NotEqual(String entryFirstname) { + registerEntryFirstname(ConditionKey.CK_NOT_EQUAL, filterRemoveEmptyString(entryFirstname)); + } + + /** + * Set the value of entryFirstname using greaterThan. { > } + * If the value is null or empty-string, this condition is ignored. + * + * @param entryFirstname The value of entryFirstname as greaterThan. + */ + public void setEntryFirstname_GreaterThan(String entryFirstname) { + registerEntryFirstname(ConditionKey.CK_GREATER_THAN, filterRemoveEmptyString(entryFirstname)); + } + + /** + * Set the value of entryFirstname using lessThan. { < } + * If the value is null or empty-string, this condition is ignored. + * + * @param entryFirstname The value of entryFirstname as lessThan. + */ + public void setEntryFirstname_LessThan(String entryFirstname) { + registerEntryFirstname(ConditionKey.CK_LESS_THAN, filterRemoveEmptyString(entryFirstname)); + } + + /** + * Set the value of entryFirstname using greaterEqual. { >= } + * If the value is null or empty-string, this condition is ignored. + * + * @param entryFirstname The value of entryFirstname as greaterEqual. + */ + public void setEntryFirstname_GreaterEqual(String entryFirstname) { + registerEntryFirstname(ConditionKey.CK_GREATER_EQUAL, filterRemoveEmptyString(entryFirstname)); + } + + /** + * Set the value of entryFirstname using lessEqual. { <= } + * If the value is null or empty-string, this condition is ignored. + * + * @param entryFirstname The value of entryFirstname as lessEqual. + */ + public void setEntryFirstname_LessEqual(String entryFirstname) { + registerEntryFirstname(ConditionKey.CK_LESS_EQUAL, filterRemoveEmptyString(entryFirstname)); + } + + /** + * Set the value of entryFirstname using prefixSearch. { like 'xxx%' } + * If the value is null or empty-string, this condition is ignored. + * + * @param entryFirstname The value of entryFirstname as prefixSearch. + */ + public void setEntryFirstname_PrefixSearch(String entryFirstname) { + registerEntryFirstname(ConditionKey.CK_PREFIX_SEARCH, filterRemoveEmptyString(entryFirstname)); + } + + /** + * Set the value of entryFirstname using likeSearch. { like '%xxx%' } + * If the value is null or empty-string, this condition is ignored. + * You can invoke this method several times and the conditions are set up. + * + * @param entryFirstname The value of entryFirstname as likeSearch. + * @param likeSearchOption Like search option. (NotNull) + */ + public void setEntryFirstname_LikeSearch(String entryFirstname, jp.sf.pal.pompei.allcommon.cbean.coption.LikeSearchOption likeSearchOption) { + registerLikeSearchQuery(ConditionKey.CK_LIKE_SEARCH, filterRemoveEmptyString(entryFirstname), getCValueEntryFirstname(), COL_ENTRY_FIRSTNAME, J_EntryFirstname, UJ_entryFirstname, likeSearchOption); + } + + /** + * Set the value of entryFirstname using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param entryFirstnameList The value of entryFirstname as inScope. + */ + public void setEntryFirstname_InScope(java.util.List entryFirstnameList) { + registerEntryFirstname(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyStringFromList(entryFirstnameList)); + } + + /** + * Set the value of entryFirstname using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param entryFirstname The value of entryFirstname as inScope. + */ + public void setEntryFirstname_InScope(String entryFirstname, jp.sf.pal.pompei.allcommon.cbean.coption.InScopeOption option) { + registerInScopeQuery(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyString(entryFirstname), getCValueEntryFirstname(), COL_ENTRY_FIRSTNAME, J_EntryFirstname, UJ_entryFirstname, option); + } + + /** + * Set the value of entryFirstname using notInScope. { not in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param entryFirstnameList The value of entryFirstname as notInScope. + */ + public void setEntryFirstname_NotInScope(java.util.List entryFirstnameList) { + registerEntryFirstname(ConditionKey.CK_NOT_IN_SCOPE, filterRemoveEmptyStringFromList(entryFirstnameList)); + } + + /** + * Register condition of entryFirstname. + * + * @param key Condition key. (NotNull) + * @param value The value of entryFirstname. (Nullable) + */ + protected void registerEntryFirstname(ConditionKey key, Object value) { + registerQuery(key, value, getCValueEntryFirstname(), COL_ENTRY_FIRSTNAME, J_EntryFirstname, UJ_entryFirstname); + } + + /** + * Register inline condition of entryFirstname. + * + * @param key Condition key. (NotNull) + * @param value The value of entryFirstname. (Nullable) + */ + protected void registerInlineEntryFirstname(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueEntryFirstname(), COL_ENTRY_FIRSTNAME, J_EntryFirstname, UJ_entryFirstname); + } + + abstract protected ConditionValue getCValueEntryFirstname(); + + /** Column db name of entryLastname. */ + protected static final String COL_ENTRY_LASTNAME = "ENTRY_LASTNAME"; + + /** Column java name of entryLastname. */ + protected static final String J_EntryLastname = "EntryLastname"; + + /** Column uncapitalised java name of entryLastname. */ + protected static final String UJ_entryLastname = "entryLastname"; + + /** + * Set the value of entryLastname using equal. { = } + * If the value is null or empty-string, this condition is ignored. + * + * @param entryLastname The value of entryLastname as equal. + */ + public void setEntryLastname_Equal(String entryLastname) { + registerEntryLastname(ConditionKey.CK_EQUAL, filterRemoveEmptyString(entryLastname)); + } + + /** + * Set the value of entryLastname using notEqual. { != } + * If the value is null or empty-string, this condition is ignored. + * + * @param entryLastname The value of entryLastname as notEqual. + */ + public void setEntryLastname_NotEqual(String entryLastname) { + registerEntryLastname(ConditionKey.CK_NOT_EQUAL, filterRemoveEmptyString(entryLastname)); + } + + /** + * Set the value of entryLastname using greaterThan. { > } + * If the value is null or empty-string, this condition is ignored. + * + * @param entryLastname The value of entryLastname as greaterThan. + */ + public void setEntryLastname_GreaterThan(String entryLastname) { + registerEntryLastname(ConditionKey.CK_GREATER_THAN, filterRemoveEmptyString(entryLastname)); + } + + /** + * Set the value of entryLastname using lessThan. { < } + * If the value is null or empty-string, this condition is ignored. + * + * @param entryLastname The value of entryLastname as lessThan. + */ + public void setEntryLastname_LessThan(String entryLastname) { + registerEntryLastname(ConditionKey.CK_LESS_THAN, filterRemoveEmptyString(entryLastname)); + } + + /** + * Set the value of entryLastname using greaterEqual. { >= } + * If the value is null or empty-string, this condition is ignored. + * + * @param entryLastname The value of entryLastname as greaterEqual. + */ + public void setEntryLastname_GreaterEqual(String entryLastname) { + registerEntryLastname(ConditionKey.CK_GREATER_EQUAL, filterRemoveEmptyString(entryLastname)); + } + + /** + * Set the value of entryLastname using lessEqual. { <= } + * If the value is null or empty-string, this condition is ignored. + * + * @param entryLastname The value of entryLastname as lessEqual. + */ + public void setEntryLastname_LessEqual(String entryLastname) { + registerEntryLastname(ConditionKey.CK_LESS_EQUAL, filterRemoveEmptyString(entryLastname)); + } + + /** + * Set the value of entryLastname using prefixSearch. { like 'xxx%' } + * If the value is null or empty-string, this condition is ignored. + * + * @param entryLastname The value of entryLastname as prefixSearch. + */ + public void setEntryLastname_PrefixSearch(String entryLastname) { + registerEntryLastname(ConditionKey.CK_PREFIX_SEARCH, filterRemoveEmptyString(entryLastname)); + } + + /** + * Set the value of entryLastname using likeSearch. { like '%xxx%' } + * If the value is null or empty-string, this condition is ignored. + * You can invoke this method several times and the conditions are set up. + * + * @param entryLastname The value of entryLastname as likeSearch. + * @param likeSearchOption Like search option. (NotNull) + */ + public void setEntryLastname_LikeSearch(String entryLastname, jp.sf.pal.pompei.allcommon.cbean.coption.LikeSearchOption likeSearchOption) { + registerLikeSearchQuery(ConditionKey.CK_LIKE_SEARCH, filterRemoveEmptyString(entryLastname), getCValueEntryLastname(), COL_ENTRY_LASTNAME, J_EntryLastname, UJ_entryLastname, likeSearchOption); + } + + /** + * Set the value of entryLastname using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param entryLastnameList The value of entryLastname as inScope. + */ + public void setEntryLastname_InScope(java.util.List entryLastnameList) { + registerEntryLastname(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyStringFromList(entryLastnameList)); + } + + /** + * Set the value of entryLastname using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param entryLastname The value of entryLastname as inScope. + */ + public void setEntryLastname_InScope(String entryLastname, jp.sf.pal.pompei.allcommon.cbean.coption.InScopeOption option) { + registerInScopeQuery(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyString(entryLastname), getCValueEntryLastname(), COL_ENTRY_LASTNAME, J_EntryLastname, UJ_entryLastname, option); + } + + /** + * Set the value of entryLastname using notInScope. { not in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param entryLastnameList The value of entryLastname as notInScope. + */ + public void setEntryLastname_NotInScope(java.util.List entryLastnameList) { + registerEntryLastname(ConditionKey.CK_NOT_IN_SCOPE, filterRemoveEmptyStringFromList(entryLastnameList)); + } + + /** + * Register condition of entryLastname. + * + * @param key Condition key. (NotNull) + * @param value The value of entryLastname. (Nullable) + */ + protected void registerEntryLastname(ConditionKey key, Object value) { + registerQuery(key, value, getCValueEntryLastname(), COL_ENTRY_LASTNAME, J_EntryLastname, UJ_entryLastname); + } + + /** + * Register inline condition of entryLastname. + * + * @param key Condition key. (NotNull) + * @param value The value of entryLastname. (Nullable) + */ + protected void registerInlineEntryLastname(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueEntryLastname(), COL_ENTRY_LASTNAME, J_EntryLastname, UJ_entryLastname); + } + + abstract protected ConditionValue getCValueEntryLastname(); + + /** Column db name of entryStreetAddress. */ + protected static final String COL_ENTRY_STREET_ADDRESS = "ENTRY_STREET_ADDRESS"; + + /** Column java name of entryStreetAddress. */ + protected static final String J_EntryStreetAddress = "EntryStreetAddress"; + + /** Column uncapitalised java name of entryStreetAddress. */ + protected static final String UJ_entryStreetAddress = "entryStreetAddress"; + + /** + * Set the value of entryStreetAddress using equal. { = } + * If the value is null or empty-string, this condition is ignored. + * + * @param entryStreetAddress The value of entryStreetAddress as equal. + */ + public void setEntryStreetAddress_Equal(String entryStreetAddress) { + registerEntryStreetAddress(ConditionKey.CK_EQUAL, filterRemoveEmptyString(entryStreetAddress)); + } + + /** + * Set the value of entryStreetAddress using notEqual. { != } + * If the value is null or empty-string, this condition is ignored. + * + * @param entryStreetAddress The value of entryStreetAddress as notEqual. + */ + public void setEntryStreetAddress_NotEqual(String entryStreetAddress) { + registerEntryStreetAddress(ConditionKey.CK_NOT_EQUAL, filterRemoveEmptyString(entryStreetAddress)); + } + + /** + * Set the value of entryStreetAddress using greaterThan. { > } + * If the value is null or empty-string, this condition is ignored. + * + * @param entryStreetAddress The value of entryStreetAddress as greaterThan. + */ + public void setEntryStreetAddress_GreaterThan(String entryStreetAddress) { + registerEntryStreetAddress(ConditionKey.CK_GREATER_THAN, filterRemoveEmptyString(entryStreetAddress)); + } + + /** + * Set the value of entryStreetAddress using lessThan. { < } + * If the value is null or empty-string, this condition is ignored. + * + * @param entryStreetAddress The value of entryStreetAddress as lessThan. + */ + public void setEntryStreetAddress_LessThan(String entryStreetAddress) { + registerEntryStreetAddress(ConditionKey.CK_LESS_THAN, filterRemoveEmptyString(entryStreetAddress)); + } + + /** + * Set the value of entryStreetAddress using greaterEqual. { >= } + * If the value is null or empty-string, this condition is ignored. + * + * @param entryStreetAddress The value of entryStreetAddress as greaterEqual. + */ + public void setEntryStreetAddress_GreaterEqual(String entryStreetAddress) { + registerEntryStreetAddress(ConditionKey.CK_GREATER_EQUAL, filterRemoveEmptyString(entryStreetAddress)); + } + + /** + * Set the value of entryStreetAddress using lessEqual. { <= } + * If the value is null or empty-string, this condition is ignored. + * + * @param entryStreetAddress The value of entryStreetAddress as lessEqual. + */ + public void setEntryStreetAddress_LessEqual(String entryStreetAddress) { + registerEntryStreetAddress(ConditionKey.CK_LESS_EQUAL, filterRemoveEmptyString(entryStreetAddress)); + } + + /** + * Set the value of entryStreetAddress using prefixSearch. { like 'xxx%' } + * If the value is null or empty-string, this condition is ignored. + * + * @param entryStreetAddress The value of entryStreetAddress as prefixSearch. + */ + public void setEntryStreetAddress_PrefixSearch(String entryStreetAddress) { + registerEntryStreetAddress(ConditionKey.CK_PREFIX_SEARCH, filterRemoveEmptyString(entryStreetAddress)); + } + + /** + * Set the value of entryStreetAddress using likeSearch. { like '%xxx%' } + * If the value is null or empty-string, this condition is ignored. + * You can invoke this method several times and the conditions are set up. + * + * @param entryStreetAddress The value of entryStreetAddress as likeSearch. + * @param likeSearchOption Like search option. (NotNull) + */ + public void setEntryStreetAddress_LikeSearch(String entryStreetAddress, jp.sf.pal.pompei.allcommon.cbean.coption.LikeSearchOption likeSearchOption) { + registerLikeSearchQuery(ConditionKey.CK_LIKE_SEARCH, filterRemoveEmptyString(entryStreetAddress), getCValueEntryStreetAddress(), COL_ENTRY_STREET_ADDRESS, J_EntryStreetAddress, UJ_entryStreetAddress, likeSearchOption); + } + + /** + * Set the value of entryStreetAddress using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param entryStreetAddressList The value of entryStreetAddress as inScope. + */ + public void setEntryStreetAddress_InScope(java.util.List entryStreetAddressList) { + registerEntryStreetAddress(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyStringFromList(entryStreetAddressList)); + } + + /** + * Set the value of entryStreetAddress using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param entryStreetAddress The value of entryStreetAddress as inScope. + */ + public void setEntryStreetAddress_InScope(String entryStreetAddress, jp.sf.pal.pompei.allcommon.cbean.coption.InScopeOption option) { + registerInScopeQuery(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyString(entryStreetAddress), getCValueEntryStreetAddress(), COL_ENTRY_STREET_ADDRESS, J_EntryStreetAddress, UJ_entryStreetAddress, option); + } + + /** + * Set the value of entryStreetAddress using notInScope. { not in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param entryStreetAddressList The value of entryStreetAddress as notInScope. + */ + public void setEntryStreetAddress_NotInScope(java.util.List entryStreetAddressList) { + registerEntryStreetAddress(ConditionKey.CK_NOT_IN_SCOPE, filterRemoveEmptyStringFromList(entryStreetAddressList)); + } + + /** + * Register condition of entryStreetAddress. + * + * @param key Condition key. (NotNull) + * @param value The value of entryStreetAddress. (Nullable) + */ + protected void registerEntryStreetAddress(ConditionKey key, Object value) { + registerQuery(key, value, getCValueEntryStreetAddress(), COL_ENTRY_STREET_ADDRESS, J_EntryStreetAddress, UJ_entryStreetAddress); + } + + /** + * Register inline condition of entryStreetAddress. + * + * @param key Condition key. (NotNull) + * @param value The value of entryStreetAddress. (Nullable) + */ + protected void registerInlineEntryStreetAddress(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueEntryStreetAddress(), COL_ENTRY_STREET_ADDRESS, J_EntryStreetAddress, UJ_entryStreetAddress); + } + + abstract protected ConditionValue getCValueEntryStreetAddress(); + + /** Column db name of entrySuburb. */ + protected static final String COL_ENTRY_SUBURB = "ENTRY_SUBURB"; + + /** Column java name of entrySuburb. */ + protected static final String J_EntrySuburb = "EntrySuburb"; + + /** Column uncapitalised java name of entrySuburb. */ + protected static final String UJ_entrySuburb = "entrySuburb"; + + /** + * Set the value of entrySuburb using equal. { = } + * If the value is null or empty-string, this condition is ignored. + * + * @param entrySuburb The value of entrySuburb as equal. + */ + public void setEntrySuburb_Equal(String entrySuburb) { + registerEntrySuburb(ConditionKey.CK_EQUAL, filterRemoveEmptyString(entrySuburb)); + } + + /** + * Set the value of entrySuburb using notEqual. { != } + * If the value is null or empty-string, this condition is ignored. + * + * @param entrySuburb The value of entrySuburb as notEqual. + */ + public void setEntrySuburb_NotEqual(String entrySuburb) { + registerEntrySuburb(ConditionKey.CK_NOT_EQUAL, filterRemoveEmptyString(entrySuburb)); + } + + /** + * Set the value of entrySuburb using greaterThan. { > } + * If the value is null or empty-string, this condition is ignored. + * + * @param entrySuburb The value of entrySuburb as greaterThan. + */ + public void setEntrySuburb_GreaterThan(String entrySuburb) { + registerEntrySuburb(ConditionKey.CK_GREATER_THAN, filterRemoveEmptyString(entrySuburb)); + } + + /** + * Set the value of entrySuburb using lessThan. { < } + * If the value is null or empty-string, this condition is ignored. + * + * @param entrySuburb The value of entrySuburb as lessThan. + */ + public void setEntrySuburb_LessThan(String entrySuburb) { + registerEntrySuburb(ConditionKey.CK_LESS_THAN, filterRemoveEmptyString(entrySuburb)); + } + + /** + * Set the value of entrySuburb using greaterEqual. { >= } + * If the value is null or empty-string, this condition is ignored. + * + * @param entrySuburb The value of entrySuburb as greaterEqual. + */ + public void setEntrySuburb_GreaterEqual(String entrySuburb) { + registerEntrySuburb(ConditionKey.CK_GREATER_EQUAL, filterRemoveEmptyString(entrySuburb)); + } + + /** + * Set the value of entrySuburb using lessEqual. { <= } + * If the value is null or empty-string, this condition is ignored. + * + * @param entrySuburb The value of entrySuburb as lessEqual. + */ + public void setEntrySuburb_LessEqual(String entrySuburb) { + registerEntrySuburb(ConditionKey.CK_LESS_EQUAL, filterRemoveEmptyString(entrySuburb)); + } + + /** + * Set the value of entrySuburb using prefixSearch. { like 'xxx%' } + * If the value is null or empty-string, this condition is ignored. + * + * @param entrySuburb The value of entrySuburb as prefixSearch. + */ + public void setEntrySuburb_PrefixSearch(String entrySuburb) { + registerEntrySuburb(ConditionKey.CK_PREFIX_SEARCH, filterRemoveEmptyString(entrySuburb)); + } + + /** + * Set the value of entrySuburb using likeSearch. { like '%xxx%' } + * If the value is null or empty-string, this condition is ignored. + * You can invoke this method several times and the conditions are set up. + * + * @param entrySuburb The value of entrySuburb as likeSearch. + * @param likeSearchOption Like search option. (NotNull) + */ + public void setEntrySuburb_LikeSearch(String entrySuburb, jp.sf.pal.pompei.allcommon.cbean.coption.LikeSearchOption likeSearchOption) { + registerLikeSearchQuery(ConditionKey.CK_LIKE_SEARCH, filterRemoveEmptyString(entrySuburb), getCValueEntrySuburb(), COL_ENTRY_SUBURB, J_EntrySuburb, UJ_entrySuburb, likeSearchOption); + } + + /** + * Set the value of entrySuburb using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param entrySuburbList The value of entrySuburb as inScope. + */ + public void setEntrySuburb_InScope(java.util.List entrySuburbList) { + registerEntrySuburb(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyStringFromList(entrySuburbList)); + } + + /** + * Set the value of entrySuburb using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param entrySuburb The value of entrySuburb as inScope. + */ + public void setEntrySuburb_InScope(String entrySuburb, jp.sf.pal.pompei.allcommon.cbean.coption.InScopeOption option) { + registerInScopeQuery(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyString(entrySuburb), getCValueEntrySuburb(), COL_ENTRY_SUBURB, J_EntrySuburb, UJ_entrySuburb, option); + } + + /** + * Set the value of entrySuburb using notInScope. { not in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param entrySuburbList The value of entrySuburb as notInScope. + */ + public void setEntrySuburb_NotInScope(java.util.List entrySuburbList) { + registerEntrySuburb(ConditionKey.CK_NOT_IN_SCOPE, filterRemoveEmptyStringFromList(entrySuburbList)); + } + + /** + * Set the value of entrySuburb using isNull. { is null } + */ + public void setEntrySuburb_IsNull() { + registerEntrySuburb(ConditionKey.CK_IS_NULL, DUMMY_OBJECT); + } + + /** + * Set the value of entrySuburb using isNotNull. { is not null } + */ + public void setEntrySuburb_IsNotNull() { + registerEntrySuburb(ConditionKey.CK_IS_NOT_NULL, DUMMY_OBJECT); + } + + /** + * Register condition of entrySuburb. + * + * @param key Condition key. (NotNull) + * @param value The value of entrySuburb. (Nullable) + */ + protected void registerEntrySuburb(ConditionKey key, Object value) { + registerQuery(key, value, getCValueEntrySuburb(), COL_ENTRY_SUBURB, J_EntrySuburb, UJ_entrySuburb); + } + + /** + * Register inline condition of entrySuburb. + * + * @param key Condition key. (NotNull) + * @param value The value of entrySuburb. (Nullable) + */ + protected void registerInlineEntrySuburb(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueEntrySuburb(), COL_ENTRY_SUBURB, J_EntrySuburb, UJ_entrySuburb); + } + + abstract protected ConditionValue getCValueEntrySuburb(); + + /** Column db name of entryPostcode. */ + protected static final String COL_ENTRY_POSTCODE = "ENTRY_POSTCODE"; + + /** Column java name of entryPostcode. */ + protected static final String J_EntryPostcode = "EntryPostcode"; + + /** Column uncapitalised java name of entryPostcode. */ + protected static final String UJ_entryPostcode = "entryPostcode"; + + /** + * Set the value of entryPostcode using equal. { = } + * If the value is null or empty-string, this condition is ignored. + * + * @param entryPostcode The value of entryPostcode as equal. + */ + public void setEntryPostcode_Equal(String entryPostcode) { + registerEntryPostcode(ConditionKey.CK_EQUAL, filterRemoveEmptyString(entryPostcode)); + } + + /** + * Set the value of entryPostcode using notEqual. { != } + * If the value is null or empty-string, this condition is ignored. + * + * @param entryPostcode The value of entryPostcode as notEqual. + */ + public void setEntryPostcode_NotEqual(String entryPostcode) { + registerEntryPostcode(ConditionKey.CK_NOT_EQUAL, filterRemoveEmptyString(entryPostcode)); + } + + /** + * Set the value of entryPostcode using greaterThan. { > } + * If the value is null or empty-string, this condition is ignored. + * + * @param entryPostcode The value of entryPostcode as greaterThan. + */ + public void setEntryPostcode_GreaterThan(String entryPostcode) { + registerEntryPostcode(ConditionKey.CK_GREATER_THAN, filterRemoveEmptyString(entryPostcode)); + } + + /** + * Set the value of entryPostcode using lessThan. { < } + * If the value is null or empty-string, this condition is ignored. + * + * @param entryPostcode The value of entryPostcode as lessThan. + */ + public void setEntryPostcode_LessThan(String entryPostcode) { + registerEntryPostcode(ConditionKey.CK_LESS_THAN, filterRemoveEmptyString(entryPostcode)); + } + + /** + * Set the value of entryPostcode using greaterEqual. { >= } + * If the value is null or empty-string, this condition is ignored. + * + * @param entryPostcode The value of entryPostcode as greaterEqual. + */ + public void setEntryPostcode_GreaterEqual(String entryPostcode) { + registerEntryPostcode(ConditionKey.CK_GREATER_EQUAL, filterRemoveEmptyString(entryPostcode)); + } + + /** + * Set the value of entryPostcode using lessEqual. { <= } + * If the value is null or empty-string, this condition is ignored. + * + * @param entryPostcode The value of entryPostcode as lessEqual. + */ + public void setEntryPostcode_LessEqual(String entryPostcode) { + registerEntryPostcode(ConditionKey.CK_LESS_EQUAL, filterRemoveEmptyString(entryPostcode)); + } + + /** + * Set the value of entryPostcode using prefixSearch. { like 'xxx%' } + * If the value is null or empty-string, this condition is ignored. + * + * @param entryPostcode The value of entryPostcode as prefixSearch. + */ + public void setEntryPostcode_PrefixSearch(String entryPostcode) { + registerEntryPostcode(ConditionKey.CK_PREFIX_SEARCH, filterRemoveEmptyString(entryPostcode)); + } + + /** + * Set the value of entryPostcode using likeSearch. { like '%xxx%' } + * If the value is null or empty-string, this condition is ignored. + * You can invoke this method several times and the conditions are set up. + * + * @param entryPostcode The value of entryPostcode as likeSearch. + * @param likeSearchOption Like search option. (NotNull) + */ + public void setEntryPostcode_LikeSearch(String entryPostcode, jp.sf.pal.pompei.allcommon.cbean.coption.LikeSearchOption likeSearchOption) { + registerLikeSearchQuery(ConditionKey.CK_LIKE_SEARCH, filterRemoveEmptyString(entryPostcode), getCValueEntryPostcode(), COL_ENTRY_POSTCODE, J_EntryPostcode, UJ_entryPostcode, likeSearchOption); + } + + /** + * Set the value of entryPostcode using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param entryPostcodeList The value of entryPostcode as inScope. + */ + public void setEntryPostcode_InScope(java.util.List entryPostcodeList) { + registerEntryPostcode(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyStringFromList(entryPostcodeList)); + } + + /** + * Set the value of entryPostcode using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param entryPostcode The value of entryPostcode as inScope. + */ + public void setEntryPostcode_InScope(String entryPostcode, jp.sf.pal.pompei.allcommon.cbean.coption.InScopeOption option) { + registerInScopeQuery(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyString(entryPostcode), getCValueEntryPostcode(), COL_ENTRY_POSTCODE, J_EntryPostcode, UJ_entryPostcode, option); + } + + /** + * Set the value of entryPostcode using notInScope. { not in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param entryPostcodeList The value of entryPostcode as notInScope. + */ + public void setEntryPostcode_NotInScope(java.util.List entryPostcodeList) { + registerEntryPostcode(ConditionKey.CK_NOT_IN_SCOPE, filterRemoveEmptyStringFromList(entryPostcodeList)); + } + + /** + * Register condition of entryPostcode. + * + * @param key Condition key. (NotNull) + * @param value The value of entryPostcode. (Nullable) + */ + protected void registerEntryPostcode(ConditionKey key, Object value) { + registerQuery(key, value, getCValueEntryPostcode(), COL_ENTRY_POSTCODE, J_EntryPostcode, UJ_entryPostcode); + } + + /** + * Register inline condition of entryPostcode. + * + * @param key Condition key. (NotNull) + * @param value The value of entryPostcode. (Nullable) + */ + protected void registerInlineEntryPostcode(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueEntryPostcode(), COL_ENTRY_POSTCODE, J_EntryPostcode, UJ_entryPostcode); + } + + abstract protected ConditionValue getCValueEntryPostcode(); + + /** Column db name of entryCity. */ + protected static final String COL_ENTRY_CITY = "ENTRY_CITY"; + + /** Column java name of entryCity. */ + protected static final String J_EntryCity = "EntryCity"; + + /** Column uncapitalised java name of entryCity. */ + protected static final String UJ_entryCity = "entryCity"; + + /** + * Set the value of entryCity using equal. { = } + * If the value is null or empty-string, this condition is ignored. + * + * @param entryCity The value of entryCity as equal. + */ + public void setEntryCity_Equal(String entryCity) { + registerEntryCity(ConditionKey.CK_EQUAL, filterRemoveEmptyString(entryCity)); + } + + /** + * Set the value of entryCity using notEqual. { != } + * If the value is null or empty-string, this condition is ignored. + * + * @param entryCity The value of entryCity as notEqual. + */ + public void setEntryCity_NotEqual(String entryCity) { + registerEntryCity(ConditionKey.CK_NOT_EQUAL, filterRemoveEmptyString(entryCity)); + } + + /** + * Set the value of entryCity using greaterThan. { > } + * If the value is null or empty-string, this condition is ignored. + * + * @param entryCity The value of entryCity as greaterThan. + */ + public void setEntryCity_GreaterThan(String entryCity) { + registerEntryCity(ConditionKey.CK_GREATER_THAN, filterRemoveEmptyString(entryCity)); + } + + /** + * Set the value of entryCity using lessThan. { < } + * If the value is null or empty-string, this condition is ignored. + * + * @param entryCity The value of entryCity as lessThan. + */ + public void setEntryCity_LessThan(String entryCity) { + registerEntryCity(ConditionKey.CK_LESS_THAN, filterRemoveEmptyString(entryCity)); + } + + /** + * Set the value of entryCity using greaterEqual. { >= } + * If the value is null or empty-string, this condition is ignored. + * + * @param entryCity The value of entryCity as greaterEqual. + */ + public void setEntryCity_GreaterEqual(String entryCity) { + registerEntryCity(ConditionKey.CK_GREATER_EQUAL, filterRemoveEmptyString(entryCity)); + } + + /** + * Set the value of entryCity using lessEqual. { <= } + * If the value is null or empty-string, this condition is ignored. + * + * @param entryCity The value of entryCity as lessEqual. + */ + public void setEntryCity_LessEqual(String entryCity) { + registerEntryCity(ConditionKey.CK_LESS_EQUAL, filterRemoveEmptyString(entryCity)); + } + + /** + * Set the value of entryCity using prefixSearch. { like 'xxx%' } + * If the value is null or empty-string, this condition is ignored. + * + * @param entryCity The value of entryCity as prefixSearch. + */ + public void setEntryCity_PrefixSearch(String entryCity) { + registerEntryCity(ConditionKey.CK_PREFIX_SEARCH, filterRemoveEmptyString(entryCity)); + } + + /** + * Set the value of entryCity using likeSearch. { like '%xxx%' } + * If the value is null or empty-string, this condition is ignored. + * You can invoke this method several times and the conditions are set up. + * + * @param entryCity The value of entryCity as likeSearch. + * @param likeSearchOption Like search option. (NotNull) + */ + public void setEntryCity_LikeSearch(String entryCity, jp.sf.pal.pompei.allcommon.cbean.coption.LikeSearchOption likeSearchOption) { + registerLikeSearchQuery(ConditionKey.CK_LIKE_SEARCH, filterRemoveEmptyString(entryCity), getCValueEntryCity(), COL_ENTRY_CITY, J_EntryCity, UJ_entryCity, likeSearchOption); + } + + /** + * Set the value of entryCity using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param entryCityList The value of entryCity as inScope. + */ + public void setEntryCity_InScope(java.util.List entryCityList) { + registerEntryCity(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyStringFromList(entryCityList)); + } + + /** + * Set the value of entryCity using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param entryCity The value of entryCity as inScope. + */ + public void setEntryCity_InScope(String entryCity, jp.sf.pal.pompei.allcommon.cbean.coption.InScopeOption option) { + registerInScopeQuery(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyString(entryCity), getCValueEntryCity(), COL_ENTRY_CITY, J_EntryCity, UJ_entryCity, option); + } + + /** + * Set the value of entryCity using notInScope. { not in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param entryCityList The value of entryCity as notInScope. + */ + public void setEntryCity_NotInScope(java.util.List entryCityList) { + registerEntryCity(ConditionKey.CK_NOT_IN_SCOPE, filterRemoveEmptyStringFromList(entryCityList)); + } + + /** + * Register condition of entryCity. + * + * @param key Condition key. (NotNull) + * @param value The value of entryCity. (Nullable) + */ + protected void registerEntryCity(ConditionKey key, Object value) { + registerQuery(key, value, getCValueEntryCity(), COL_ENTRY_CITY, J_EntryCity, UJ_entryCity); + } + + /** + * Register inline condition of entryCity. + * + * @param key Condition key. (NotNull) + * @param value The value of entryCity. (Nullable) + */ + protected void registerInlineEntryCity(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueEntryCity(), COL_ENTRY_CITY, J_EntryCity, UJ_entryCity); + } + + abstract protected ConditionValue getCValueEntryCity(); + + /** Column db name of entryState. */ + protected static final String COL_ENTRY_STATE = "ENTRY_STATE"; + + /** Column java name of entryState. */ + protected static final String J_EntryState = "EntryState"; + + /** Column uncapitalised java name of entryState. */ + protected static final String UJ_entryState = "entryState"; + + /** + * Set the value of entryState using equal. { = } + * If the value is null or empty-string, this condition is ignored. + * + * @param entryState The value of entryState as equal. + */ + public void setEntryState_Equal(String entryState) { + registerEntryState(ConditionKey.CK_EQUAL, filterRemoveEmptyString(entryState)); + } + + /** + * Set the value of entryState using notEqual. { != } + * If the value is null or empty-string, this condition is ignored. + * + * @param entryState The value of entryState as notEqual. + */ + public void setEntryState_NotEqual(String entryState) { + registerEntryState(ConditionKey.CK_NOT_EQUAL, filterRemoveEmptyString(entryState)); + } + + /** + * Set the value of entryState using greaterThan. { > } + * If the value is null or empty-string, this condition is ignored. + * + * @param entryState The value of entryState as greaterThan. + */ + public void setEntryState_GreaterThan(String entryState) { + registerEntryState(ConditionKey.CK_GREATER_THAN, filterRemoveEmptyString(entryState)); + } + + /** + * Set the value of entryState using lessThan. { < } + * If the value is null or empty-string, this condition is ignored. + * + * @param entryState The value of entryState as lessThan. + */ + public void setEntryState_LessThan(String entryState) { + registerEntryState(ConditionKey.CK_LESS_THAN, filterRemoveEmptyString(entryState)); + } + + /** + * Set the value of entryState using greaterEqual. { >= } + * If the value is null or empty-string, this condition is ignored. + * + * @param entryState The value of entryState as greaterEqual. + */ + public void setEntryState_GreaterEqual(String entryState) { + registerEntryState(ConditionKey.CK_GREATER_EQUAL, filterRemoveEmptyString(entryState)); + } + + /** + * Set the value of entryState using lessEqual. { <= } + * If the value is null or empty-string, this condition is ignored. + * + * @param entryState The value of entryState as lessEqual. + */ + public void setEntryState_LessEqual(String entryState) { + registerEntryState(ConditionKey.CK_LESS_EQUAL, filterRemoveEmptyString(entryState)); + } + + /** + * Set the value of entryState using prefixSearch. { like 'xxx%' } + * If the value is null or empty-string, this condition is ignored. + * + * @param entryState The value of entryState as prefixSearch. + */ + public void setEntryState_PrefixSearch(String entryState) { + registerEntryState(ConditionKey.CK_PREFIX_SEARCH, filterRemoveEmptyString(entryState)); + } + + /** + * Set the value of entryState using likeSearch. { like '%xxx%' } + * If the value is null or empty-string, this condition is ignored. + * You can invoke this method several times and the conditions are set up. + * + * @param entryState The value of entryState as likeSearch. + * @param likeSearchOption Like search option. (NotNull) + */ + public void setEntryState_LikeSearch(String entryState, jp.sf.pal.pompei.allcommon.cbean.coption.LikeSearchOption likeSearchOption) { + registerLikeSearchQuery(ConditionKey.CK_LIKE_SEARCH, filterRemoveEmptyString(entryState), getCValueEntryState(), COL_ENTRY_STATE, J_EntryState, UJ_entryState, likeSearchOption); + } + + /** + * Set the value of entryState using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param entryStateList The value of entryState as inScope. + */ + public void setEntryState_InScope(java.util.List entryStateList) { + registerEntryState(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyStringFromList(entryStateList)); + } + + /** + * Set the value of entryState using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param entryState The value of entryState as inScope. + */ + public void setEntryState_InScope(String entryState, jp.sf.pal.pompei.allcommon.cbean.coption.InScopeOption option) { + registerInScopeQuery(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyString(entryState), getCValueEntryState(), COL_ENTRY_STATE, J_EntryState, UJ_entryState, option); + } + + /** + * Set the value of entryState using notInScope. { not in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param entryStateList The value of entryState as notInScope. + */ + public void setEntryState_NotInScope(java.util.List entryStateList) { + registerEntryState(ConditionKey.CK_NOT_IN_SCOPE, filterRemoveEmptyStringFromList(entryStateList)); + } + + /** + * Set the value of entryState using isNull. { is null } + */ + public void setEntryState_IsNull() { + registerEntryState(ConditionKey.CK_IS_NULL, DUMMY_OBJECT); + } + + /** + * Set the value of entryState using isNotNull. { is not null } + */ + public void setEntryState_IsNotNull() { + registerEntryState(ConditionKey.CK_IS_NOT_NULL, DUMMY_OBJECT); + } + + /** + * Register condition of entryState. + * + * @param key Condition key. (NotNull) + * @param value The value of entryState. (Nullable) + */ + protected void registerEntryState(ConditionKey key, Object value) { + registerQuery(key, value, getCValueEntryState(), COL_ENTRY_STATE, J_EntryState, UJ_entryState); + } + + /** + * Register inline condition of entryState. + * + * @param key Condition key. (NotNull) + * @param value The value of entryState. (Nullable) + */ + protected void registerInlineEntryState(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueEntryState(), COL_ENTRY_STATE, J_EntryState, UJ_entryState); + } + + abstract protected ConditionValue getCValueEntryState(); + + /** Column db name of entryCountryId. */ + protected static final String COL_ENTRY_COUNTRY_ID = "ENTRY_COUNTRY_ID"; + + /** Column java name of entryCountryId. */ + protected static final String J_EntryCountryId = "EntryCountryId"; + + /** Column uncapitalised java name of entryCountryId. */ + protected static final String UJ_entryCountryId = "entryCountryId"; + + /** + * Set the value of entryCountryId using equal. { = } + * + * @param entryCountryId The value of entryCountryId as equal. + */ + public void setEntryCountryId_Equal(java.math.BigDecimal entryCountryId) { + registerEntryCountryId(ConditionKey.CK_EQUAL, entryCountryId); + } + + /** + * Set the value of entryCountryId using notEqual. { != } + * + * @param entryCountryId The value of entryCountryId as notEqual. + */ + public void setEntryCountryId_NotEqual(java.math.BigDecimal entryCountryId) { + registerEntryCountryId(ConditionKey.CK_NOT_EQUAL, entryCountryId); + } + + /** + * Set the value of entryCountryId using greaterThan. { > } + * + * @param entryCountryId The value of entryCountryId as greaterThan. + */ + public void setEntryCountryId_GreaterThan(java.math.BigDecimal entryCountryId) { + registerEntryCountryId(ConditionKey.CK_GREATER_THAN, entryCountryId); + } + + /** + * Set the value of entryCountryId using lessThan. { < } + * + * @param entryCountryId The value of entryCountryId as lessThan. + */ + public void setEntryCountryId_LessThan(java.math.BigDecimal entryCountryId) { + registerEntryCountryId(ConditionKey.CK_LESS_THAN, entryCountryId); + } + + /** + * Set the value of entryCountryId using greaterEqual. { >= } + * + * @param entryCountryId The value of entryCountryId as greaterEqual. + */ + public void setEntryCountryId_GreaterEqual(java.math.BigDecimal entryCountryId) { + registerEntryCountryId(ConditionKey.CK_GREATER_EQUAL, entryCountryId); + } + + /** + * Set the value of entryCountryId using lessEqual. { <= } + * + * @param entryCountryId The value of entryCountryId as lessEqual. + */ + public void setEntryCountryId_LessEqual(java.math.BigDecimal entryCountryId) { + registerEntryCountryId(ConditionKey.CK_LESS_EQUAL, entryCountryId); + } + + /** + * Set the value of entryCountryId using inScope. { in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param entryCountryIdList The value of entryCountryId as inScope. + */ + public void setEntryCountryId_InScope(java.util.List entryCountryIdList) { + registerEntryCountryId(ConditionKey.CK_IN_SCOPE, entryCountryIdList); + } + + /** + * Set the value of entryCountryId using notInScope. { not in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param entryCountryIdList The value of entryCountryId as notInScope. + */ + public void setEntryCountryId_NotInScope(java.util.List entryCountryIdList) { + registerEntryCountryId(ConditionKey.CK_NOT_IN_SCOPE, entryCountryIdList); + } + + /** + * Register condition of entryCountryId. + * + * @param key Condition key. (NotNull) + * @param value The value of entryCountryId. (Nullable) + */ + protected void registerEntryCountryId(ConditionKey key, Object value) { + registerQuery(key, value, getCValueEntryCountryId(), COL_ENTRY_COUNTRY_ID, J_EntryCountryId, UJ_entryCountryId); + } + + /** + * Register inline condition of entryCountryId. + * + * @param key Condition key. (NotNull) + * @param value The value of entryCountryId. (Nullable) + */ + protected void registerInlineEntryCountryId(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueEntryCountryId(), COL_ENTRY_COUNTRY_ID, J_EntryCountryId, UJ_entryCountryId); + } + + abstract protected ConditionValue getCValueEntryCountryId(); + + /** Column db name of entryZoneId. */ + protected static final String COL_ENTRY_ZONE_ID = "ENTRY_ZONE_ID"; + + /** Column java name of entryZoneId. */ + protected static final String J_EntryZoneId = "EntryZoneId"; + + /** Column uncapitalised java name of entryZoneId. */ + protected static final String UJ_entryZoneId = "entryZoneId"; + + /** + * Set the value of entryZoneId using equal. { = } + * + * @param entryZoneId The value of entryZoneId as equal. + */ + public void setEntryZoneId_Equal(java.math.BigDecimal entryZoneId) { + registerEntryZoneId(ConditionKey.CK_EQUAL, entryZoneId); + } + + /** + * Set the value of entryZoneId using notEqual. { != } + * + * @param entryZoneId The value of entryZoneId as notEqual. + */ + public void setEntryZoneId_NotEqual(java.math.BigDecimal entryZoneId) { + registerEntryZoneId(ConditionKey.CK_NOT_EQUAL, entryZoneId); + } + + /** + * Set the value of entryZoneId using greaterThan. { > } + * + * @param entryZoneId The value of entryZoneId as greaterThan. + */ + public void setEntryZoneId_GreaterThan(java.math.BigDecimal entryZoneId) { + registerEntryZoneId(ConditionKey.CK_GREATER_THAN, entryZoneId); + } + + /** + * Set the value of entryZoneId using lessThan. { < } + * + * @param entryZoneId The value of entryZoneId as lessThan. + */ + public void setEntryZoneId_LessThan(java.math.BigDecimal entryZoneId) { + registerEntryZoneId(ConditionKey.CK_LESS_THAN, entryZoneId); + } + + /** + * Set the value of entryZoneId using greaterEqual. { >= } + * + * @param entryZoneId The value of entryZoneId as greaterEqual. + */ + public void setEntryZoneId_GreaterEqual(java.math.BigDecimal entryZoneId) { + registerEntryZoneId(ConditionKey.CK_GREATER_EQUAL, entryZoneId); + } + + /** + * Set the value of entryZoneId using lessEqual. { <= } + * + * @param entryZoneId The value of entryZoneId as lessEqual. + */ + public void setEntryZoneId_LessEqual(java.math.BigDecimal entryZoneId) { + registerEntryZoneId(ConditionKey.CK_LESS_EQUAL, entryZoneId); + } + + /** + * Set the value of entryZoneId using inScope. { in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param entryZoneIdList The value of entryZoneId as inScope. + */ + public void setEntryZoneId_InScope(java.util.List entryZoneIdList) { + registerEntryZoneId(ConditionKey.CK_IN_SCOPE, entryZoneIdList); + } + + /** + * Set the value of entryZoneId using notInScope. { not in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param entryZoneIdList The value of entryZoneId as notInScope. + */ + public void setEntryZoneId_NotInScope(java.util.List entryZoneIdList) { + registerEntryZoneId(ConditionKey.CK_NOT_IN_SCOPE, entryZoneIdList); + } + + /** + * Register condition of entryZoneId. + * + * @param key Condition key. (NotNull) + * @param value The value of entryZoneId. (Nullable) + */ + protected void registerEntryZoneId(ConditionKey key, Object value) { + registerQuery(key, value, getCValueEntryZoneId(), COL_ENTRY_ZONE_ID, J_EntryZoneId, UJ_entryZoneId); + } + + /** + * Register inline condition of entryZoneId. + * + * @param key Condition key. (NotNull) + * @param value The value of entryZoneId. (Nullable) + */ + protected void registerInlineEntryZoneId(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueEntryZoneId(), COL_ENTRY_ZONE_ID, J_EntryZoneId, UJ_entryZoneId); + } + + abstract protected ConditionValue getCValueEntryZoneId(); + + // =================================================================================== + // Basic Override + // ============== + /** + * This method overrides the method that is declared at super. + * + * @return Clause string. (NotNull) + */ + public String toString() { + return getSqlClause().getClause(); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/AbstractBsAddressFormatCQ.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/AbstractBsAddressFormatCQ.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/AbstractBsAddressFormatCQ.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,457 @@ + +package jp.sf.pal.pompei.cbean.cq.bs; + + + +import jp.sf.pal.pompei.allcommon.cbean.*; +import jp.sf.pal.pompei.allcommon.cbean.ckey.*; +import jp.sf.pal.pompei.allcommon.cbean.cvalue.ConditionValue; +import jp.sf.pal.pompei.allcommon.cbean.sqlclause.SqlClause; +import jp.sf.pal.pompei.cbean.cq.*; + +/** + * The condition-query of ADDRESS_FORMAT. + * + * @author DBFlute(AutoGenerator) + */ +public abstract class AbstractBsAddressFormatCQ extends AbstractConditionQuery { + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param childQuery Child query as abstract class. (Nullable: If null, this is base instance.) + * @param sqlClause SQL clause instance. (NotNull) + * @param aliasName My alias name. (NotNull) + * @param nestLevel Nest level. + */ + public AbstractBsAddressFormatCQ(ConditionQuery childQuery, SqlClause sqlClause, String aliasName, int nestLevel) { + super(childQuery, sqlClause, aliasName, nestLevel); + } + + // =================================================================================== + // Table Name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + final public String getTableDbName() { + return "ADDRESS_FORMAT"; + } + + // =================================================================================== + // Query + // ===== + + // /* * * * * * * * * * * * * * * * * * * * * * * + // MyTable = [ADDRESS_FORMAT] + // * * * * * * * * */ + + + /** Column db name of addressFormatId. */ + protected static final String COL_ADDRESS_FORMAT_ID = "ADDRESS_FORMAT_ID"; + + /** Column java name of addressFormatId. */ + protected static final String J_AddressFormatId = "AddressFormatId"; + + /** Column uncapitalised java name of addressFormatId. */ + protected static final String UJ_addressFormatId = "addressFormatId"; + + /** + * Set the value of addressFormatId using equal. { = } + * + * @param addressFormatId The value of addressFormatId as equal. + */ + public void setAddressFormatId_Equal(java.math.BigDecimal addressFormatId) { + registerAddressFormatId(ConditionKey.CK_EQUAL, addressFormatId); + } + + /** + * Set the value of addressFormatId using notEqual. { != } + * + * @param addressFormatId The value of addressFormatId as notEqual. + */ + public void setAddressFormatId_NotEqual(java.math.BigDecimal addressFormatId) { + registerAddressFormatId(ConditionKey.CK_NOT_EQUAL, addressFormatId); + } + + /** + * Set the value of addressFormatId using greaterThan. { > } + * + * @param addressFormatId The value of addressFormatId as greaterThan. + */ + public void setAddressFormatId_GreaterThan(java.math.BigDecimal addressFormatId) { + registerAddressFormatId(ConditionKey.CK_GREATER_THAN, addressFormatId); + } + + /** + * Set the value of addressFormatId using lessThan. { < } + * + * @param addressFormatId The value of addressFormatId as lessThan. + */ + public void setAddressFormatId_LessThan(java.math.BigDecimal addressFormatId) { + registerAddressFormatId(ConditionKey.CK_LESS_THAN, addressFormatId); + } + + /** + * Set the value of addressFormatId using greaterEqual. { >= } + * + * @param addressFormatId The value of addressFormatId as greaterEqual. + */ + public void setAddressFormatId_GreaterEqual(java.math.BigDecimal addressFormatId) { + registerAddressFormatId(ConditionKey.CK_GREATER_EQUAL, addressFormatId); + } + + /** + * Set the value of addressFormatId using lessEqual. { <= } + * + * @param addressFormatId The value of addressFormatId as lessEqual. + */ + public void setAddressFormatId_LessEqual(java.math.BigDecimal addressFormatId) { + registerAddressFormatId(ConditionKey.CK_LESS_EQUAL, addressFormatId); + } + + /** + * Set the value of addressFormatId using inScope. { in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param addressFormatIdList The value of addressFormatId as inScope. + */ + public void setAddressFormatId_InScope(java.util.List addressFormatIdList) { + registerAddressFormatId(ConditionKey.CK_IN_SCOPE, addressFormatIdList); + } + + /** + * Set the value of addressFormatId using notInScope. { not in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param addressFormatIdList The value of addressFormatId as notInScope. + */ + public void setAddressFormatId_NotInScope(java.util.List addressFormatIdList) { + registerAddressFormatId(ConditionKey.CK_NOT_IN_SCOPE, addressFormatIdList); + } + + /** + * Register condition of addressFormatId. + * + * @param key Condition key. (NotNull) + * @param value The value of addressFormatId. (Nullable) + */ + protected void registerAddressFormatId(ConditionKey key, Object value) { + registerQuery(key, value, getCValueAddressFormatId(), COL_ADDRESS_FORMAT_ID, J_AddressFormatId, UJ_addressFormatId); + } + + /** + * Register inline condition of addressFormatId. + * + * @param key Condition key. (NotNull) + * @param value The value of addressFormatId. (Nullable) + */ + protected void registerInlineAddressFormatId(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueAddressFormatId(), COL_ADDRESS_FORMAT_ID, J_AddressFormatId, UJ_addressFormatId); + } + + abstract protected ConditionValue getCValueAddressFormatId(); + + /** Column db name of addressFormat. */ + protected static final String COL_ADDRESS_FORMAT = "ADDRESS_FORMAT"; + + /** Column java name of addressFormat. */ + protected static final String J_AddressFormat = "AddressFormat"; + + /** Column uncapitalised java name of addressFormat. */ + protected static final String UJ_addressFormat = "addressFormat"; + + /** + * Set the value of addressFormat using equal. { = } + * If the value is null or empty-string, this condition is ignored. + * + * @param addressFormat The value of addressFormat as equal. + */ + public void setAddressFormat_Equal(String addressFormat) { + registerAddressFormat(ConditionKey.CK_EQUAL, filterRemoveEmptyString(addressFormat)); + } + + /** + * Set the value of addressFormat using notEqual. { != } + * If the value is null or empty-string, this condition is ignored. + * + * @param addressFormat The value of addressFormat as notEqual. + */ + public void setAddressFormat_NotEqual(String addressFormat) { + registerAddressFormat(ConditionKey.CK_NOT_EQUAL, filterRemoveEmptyString(addressFormat)); + } + + /** + * Set the value of addressFormat using greaterThan. { > } + * If the value is null or empty-string, this condition is ignored. + * + * @param addressFormat The value of addressFormat as greaterThan. + */ + public void setAddressFormat_GreaterThan(String addressFormat) { + registerAddressFormat(ConditionKey.CK_GREATER_THAN, filterRemoveEmptyString(addressFormat)); + } + + /** + * Set the value of addressFormat using lessThan. { < } + * If the value is null or empty-string, this condition is ignored. + * + * @param addressFormat The value of addressFormat as lessThan. + */ + public void setAddressFormat_LessThan(String addressFormat) { + registerAddressFormat(ConditionKey.CK_LESS_THAN, filterRemoveEmptyString(addressFormat)); + } + + /** + * Set the value of addressFormat using greaterEqual. { >= } + * If the value is null or empty-string, this condition is ignored. + * + * @param addressFormat The value of addressFormat as greaterEqual. + */ + public void setAddressFormat_GreaterEqual(String addressFormat) { + registerAddressFormat(ConditionKey.CK_GREATER_EQUAL, filterRemoveEmptyString(addressFormat)); + } + + /** + * Set the value of addressFormat using lessEqual. { <= } + * If the value is null or empty-string, this condition is ignored. + * + * @param addressFormat The value of addressFormat as lessEqual. + */ + public void setAddressFormat_LessEqual(String addressFormat) { + registerAddressFormat(ConditionKey.CK_LESS_EQUAL, filterRemoveEmptyString(addressFormat)); + } + + /** + * Set the value of addressFormat using prefixSearch. { like 'xxx%' } + * If the value is null or empty-string, this condition is ignored. + * + * @param addressFormat The value of addressFormat as prefixSearch. + */ + public void setAddressFormat_PrefixSearch(String addressFormat) { + registerAddressFormat(ConditionKey.CK_PREFIX_SEARCH, filterRemoveEmptyString(addressFormat)); + } + + /** + * Set the value of addressFormat using likeSearch. { like '%xxx%' } + * If the value is null or empty-string, this condition is ignored. + * You can invoke this method several times and the conditions are set up. + * + * @param addressFormat The value of addressFormat as likeSearch. + * @param likeSearchOption Like search option. (NotNull) + */ + public void setAddressFormat_LikeSearch(String addressFormat, jp.sf.pal.pompei.allcommon.cbean.coption.LikeSearchOption likeSearchOption) { + registerLikeSearchQuery(ConditionKey.CK_LIKE_SEARCH, filterRemoveEmptyString(addressFormat), getCValueAddressFormat(), COL_ADDRESS_FORMAT, J_AddressFormat, UJ_addressFormat, likeSearchOption); + } + + /** + * Set the value of addressFormat using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param addressFormatList The value of addressFormat as inScope. + */ + public void setAddressFormat_InScope(java.util.List addressFormatList) { + registerAddressFormat(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyStringFromList(addressFormatList)); + } + + /** + * Set the value of addressFormat using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param addressFormat The value of addressFormat as inScope. + */ + public void setAddressFormat_InScope(String addressFormat, jp.sf.pal.pompei.allcommon.cbean.coption.InScopeOption option) { + registerInScopeQuery(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyString(addressFormat), getCValueAddressFormat(), COL_ADDRESS_FORMAT, J_AddressFormat, UJ_addressFormat, option); + } + + /** + * Set the value of addressFormat using notInScope. { not in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param addressFormatList The value of addressFormat as notInScope. + */ + public void setAddressFormat_NotInScope(java.util.List addressFormatList) { + registerAddressFormat(ConditionKey.CK_NOT_IN_SCOPE, filterRemoveEmptyStringFromList(addressFormatList)); + } + + /** + * Register condition of addressFormat. + * + * @param key Condition key. (NotNull) + * @param value The value of addressFormat. (Nullable) + */ + protected void registerAddressFormat(ConditionKey key, Object value) { + registerQuery(key, value, getCValueAddressFormat(), COL_ADDRESS_FORMAT, J_AddressFormat, UJ_addressFormat); + } + + /** + * Register inline condition of addressFormat. + * + * @param key Condition key. (NotNull) + * @param value The value of addressFormat. (Nullable) + */ + protected void registerInlineAddressFormat(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueAddressFormat(), COL_ADDRESS_FORMAT, J_AddressFormat, UJ_addressFormat); + } + + abstract protected ConditionValue getCValueAddressFormat(); + + /** Column db name of addressSummary. */ + protected static final String COL_ADDRESS_SUMMARY = "ADDRESS_SUMMARY"; + + /** Column java name of addressSummary. */ + protected static final String J_AddressSummary = "AddressSummary"; + + /** Column uncapitalised java name of addressSummary. */ + protected static final String UJ_addressSummary = "addressSummary"; + + /** + * Set the value of addressSummary using equal. { = } + * If the value is null or empty-string, this condition is ignored. + * + * @param addressSummary The value of addressSummary as equal. + */ + public void setAddressSummary_Equal(String addressSummary) { + registerAddressSummary(ConditionKey.CK_EQUAL, filterRemoveEmptyString(addressSummary)); + } + + /** + * Set the value of addressSummary using notEqual. { != } + * If the value is null or empty-string, this condition is ignored. + * + * @param addressSummary The value of addressSummary as notEqual. + */ + public void setAddressSummary_NotEqual(String addressSummary) { + registerAddressSummary(ConditionKey.CK_NOT_EQUAL, filterRemoveEmptyString(addressSummary)); + } + + /** + * Set the value of addressSummary using greaterThan. { > } + * If the value is null or empty-string, this condition is ignored. + * + * @param addressSummary The value of addressSummary as greaterThan. + */ + public void setAddressSummary_GreaterThan(String addressSummary) { + registerAddressSummary(ConditionKey.CK_GREATER_THAN, filterRemoveEmptyString(addressSummary)); + } + + /** + * Set the value of addressSummary using lessThan. { < } + * If the value is null or empty-string, this condition is ignored. + * + * @param addressSummary The value of addressSummary as lessThan. + */ + public void setAddressSummary_LessThan(String addressSummary) { + registerAddressSummary(ConditionKey.CK_LESS_THAN, filterRemoveEmptyString(addressSummary)); + } + + /** + * Set the value of addressSummary using greaterEqual. { >= } + * If the value is null or empty-string, this condition is ignored. + * + * @param addressSummary The value of addressSummary as greaterEqual. + */ + public void setAddressSummary_GreaterEqual(String addressSummary) { + registerAddressSummary(ConditionKey.CK_GREATER_EQUAL, filterRemoveEmptyString(addressSummary)); + } + + /** + * Set the value of addressSummary using lessEqual. { <= } + * If the value is null or empty-string, this condition is ignored. + * + * @param addressSummary The value of addressSummary as lessEqual. + */ + public void setAddressSummary_LessEqual(String addressSummary) { + registerAddressSummary(ConditionKey.CK_LESS_EQUAL, filterRemoveEmptyString(addressSummary)); + } + + /** + * Set the value of addressSummary using prefixSearch. { like 'xxx%' } + * If the value is null or empty-string, this condition is ignored. + * + * @param addressSummary The value of addressSummary as prefixSearch. + */ + public void setAddressSummary_PrefixSearch(String addressSummary) { + registerAddressSummary(ConditionKey.CK_PREFIX_SEARCH, filterRemoveEmptyString(addressSummary)); + } + + /** + * Set the value of addressSummary using likeSearch. { like '%xxx%' } + * If the value is null or empty-string, this condition is ignored. + * You can invoke this method several times and the conditions are set up. + * + * @param addressSummary The value of addressSummary as likeSearch. + * @param likeSearchOption Like search option. (NotNull) + */ + public void setAddressSummary_LikeSearch(String addressSummary, jp.sf.pal.pompei.allcommon.cbean.coption.LikeSearchOption likeSearchOption) { + registerLikeSearchQuery(ConditionKey.CK_LIKE_SEARCH, filterRemoveEmptyString(addressSummary), getCValueAddressSummary(), COL_ADDRESS_SUMMARY, J_AddressSummary, UJ_addressSummary, likeSearchOption); + } + + /** + * Set the value of addressSummary using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param addressSummaryList The value of addressSummary as inScope. + */ + public void setAddressSummary_InScope(java.util.List addressSummaryList) { + registerAddressSummary(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyStringFromList(addressSummaryList)); + } + + /** + * Set the value of addressSummary using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param addressSummary The value of addressSummary as inScope. + */ + public void setAddressSummary_InScope(String addressSummary, jp.sf.pal.pompei.allcommon.cbean.coption.InScopeOption option) { + registerInScopeQuery(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyString(addressSummary), getCValueAddressSummary(), COL_ADDRESS_SUMMARY, J_AddressSummary, UJ_addressSummary, option); + } + + /** + * Set the value of addressSummary using notInScope. { not in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param addressSummaryList The value of addressSummary as notInScope. + */ + public void setAddressSummary_NotInScope(java.util.List addressSummaryList) { + registerAddressSummary(ConditionKey.CK_NOT_IN_SCOPE, filterRemoveEmptyStringFromList(addressSummaryList)); + } + + /** + * Register condition of addressSummary. + * + * @param key Condition key. (NotNull) + * @param value The value of addressSummary. (Nullable) + */ + protected void registerAddressSummary(ConditionKey key, Object value) { + registerQuery(key, value, getCValueAddressSummary(), COL_ADDRESS_SUMMARY, J_AddressSummary, UJ_addressSummary); + } + + /** + * Register inline condition of addressSummary. + * + * @param key Condition key. (NotNull) + * @param value The value of addressSummary. (Nullable) + */ + protected void registerInlineAddressSummary(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueAddressSummary(), COL_ADDRESS_SUMMARY, J_AddressSummary, UJ_addressSummary); + } + + abstract protected ConditionValue getCValueAddressSummary(); + + // =================================================================================== + // Basic Override + // ============== + /** + * This method overrides the method that is declared at super. + * + * @return Clause string. (NotNull) + */ + public String toString() { + return getSqlClause().getClause(); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/AbstractBsBannersCQ.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/AbstractBsBannersCQ.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/AbstractBsBannersCQ.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,1546 @@ + +package jp.sf.pal.pompei.cbean.cq.bs; + + + +import jp.sf.pal.pompei.allcommon.cbean.*; +import jp.sf.pal.pompei.allcommon.cbean.ckey.*; +import jp.sf.pal.pompei.allcommon.cbean.cvalue.ConditionValue; +import jp.sf.pal.pompei.allcommon.cbean.sqlclause.SqlClause; +import jp.sf.pal.pompei.cbean.cq.*; + +/** + * The condition-query of BANNERS. + * + * @author DBFlute(AutoGenerator) + */ +public abstract class AbstractBsBannersCQ extends AbstractConditionQuery { + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param childQuery Child query as abstract class. (Nullable: If null, this is base instance.) + * @param sqlClause SQL clause instance. (NotNull) + * @param aliasName My alias name. (NotNull) + * @param nestLevel Nest level. + */ + public AbstractBsBannersCQ(ConditionQuery childQuery, SqlClause sqlClause, String aliasName, int nestLevel) { + super(childQuery, sqlClause, aliasName, nestLevel); + } + + // =================================================================================== + // Table Name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + final public String getTableDbName() { + return "BANNERS"; + } + + // =================================================================================== + // Query + // ===== + + // /* * * * * * * * * * * * * * * * * * * * * * * + // MyTable = [BANNERS] + // * * * * * * * * */ + + + /** Column db name of bannersId. */ + protected static final String COL_BANNERS_ID = "BANNERS_ID"; + + /** Column java name of bannersId. */ + protected static final String J_BannersId = "BannersId"; + + /** Column uncapitalised java name of bannersId. */ + protected static final String UJ_bannersId = "bannersId"; + + /** + * Set the value of bannersId using equal. { = } + * + * @param bannersId The value of bannersId as equal. + */ + public void setBannersId_Equal(java.math.BigDecimal bannersId) { + registerBannersId(ConditionKey.CK_EQUAL, bannersId); + } + + /** + * Set the value of bannersId using notEqual. { != } + * + * @param bannersId The value of bannersId as notEqual. + */ + public void setBannersId_NotEqual(java.math.BigDecimal bannersId) { + registerBannersId(ConditionKey.CK_NOT_EQUAL, bannersId); + } + + /** + * Set the value of bannersId using greaterThan. { > } + * + * @param bannersId The value of bannersId as greaterThan. + */ + public void setBannersId_GreaterThan(java.math.BigDecimal bannersId) { + registerBannersId(ConditionKey.CK_GREATER_THAN, bannersId); + } + + /** + * Set the value of bannersId using lessThan. { < } + * + * @param bannersId The value of bannersId as lessThan. + */ + public void setBannersId_LessThan(java.math.BigDecimal bannersId) { + registerBannersId(ConditionKey.CK_LESS_THAN, bannersId); + } + + /** + * Set the value of bannersId using greaterEqual. { >= } + * + * @param bannersId The value of bannersId as greaterEqual. + */ + public void setBannersId_GreaterEqual(java.math.BigDecimal bannersId) { + registerBannersId(ConditionKey.CK_GREATER_EQUAL, bannersId); + } + + /** + * Set the value of bannersId using lessEqual. { <= } + * + * @param bannersId The value of bannersId as lessEqual. + */ + public void setBannersId_LessEqual(java.math.BigDecimal bannersId) { + registerBannersId(ConditionKey.CK_LESS_EQUAL, bannersId); + } + + /** + * Set the value of bannersId using inScope. { in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param bannersIdList The value of bannersId as inScope. + */ + public void setBannersId_InScope(java.util.List bannersIdList) { + registerBannersId(ConditionKey.CK_IN_SCOPE, bannersIdList); + } + + /** + * Set the value of bannersId using notInScope. { not in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param bannersIdList The value of bannersId as notInScope. + */ + public void setBannersId_NotInScope(java.util.List bannersIdList) { + registerBannersId(ConditionKey.CK_NOT_IN_SCOPE, bannersIdList); + } + + /** + * Register condition of bannersId. + * + * @param key Condition key. (NotNull) + * @param value The value of bannersId. (Nullable) + */ + protected void registerBannersId(ConditionKey key, Object value) { + registerQuery(key, value, getCValueBannersId(), COL_BANNERS_ID, J_BannersId, UJ_bannersId); + } + + /** + * Register inline condition of bannersId. + * + * @param key Condition key. (NotNull) + * @param value The value of bannersId. (Nullable) + */ + protected void registerInlineBannersId(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueBannersId(), COL_BANNERS_ID, J_BannersId, UJ_bannersId); + } + + abstract protected ConditionValue getCValueBannersId(); + + /** Column db name of bannersTitle. */ + protected static final String COL_BANNERS_TITLE = "BANNERS_TITLE"; + + /** Column java name of bannersTitle. */ + protected static final String J_BannersTitle = "BannersTitle"; + + /** Column uncapitalised java name of bannersTitle. */ + protected static final String UJ_bannersTitle = "bannersTitle"; + + /** + * Set the value of bannersTitle using equal. { = } + * If the value is null or empty-string, this condition is ignored. + * + * @param bannersTitle The value of bannersTitle as equal. + */ + public void setBannersTitle_Equal(String bannersTitle) { + registerBannersTitle(ConditionKey.CK_EQUAL, filterRemoveEmptyString(bannersTitle)); + } + + /** + * Set the value of bannersTitle using notEqual. { != } + * If the value is null or empty-string, this condition is ignored. + * + * @param bannersTitle The value of bannersTitle as notEqual. + */ + public void setBannersTitle_NotEqual(String bannersTitle) { + registerBannersTitle(ConditionKey.CK_NOT_EQUAL, filterRemoveEmptyString(bannersTitle)); + } + + /** + * Set the value of bannersTitle using greaterThan. { > } + * If the value is null or empty-string, this condition is ignored. + * + * @param bannersTitle The value of bannersTitle as greaterThan. + */ + public void setBannersTitle_GreaterThan(String bannersTitle) { + registerBannersTitle(ConditionKey.CK_GREATER_THAN, filterRemoveEmptyString(bannersTitle)); + } + + /** + * Set the value of bannersTitle using lessThan. { < } + * If the value is null or empty-string, this condition is ignored. + * + * @param bannersTitle The value of bannersTitle as lessThan. + */ + public void setBannersTitle_LessThan(String bannersTitle) { + registerBannersTitle(ConditionKey.CK_LESS_THAN, filterRemoveEmptyString(bannersTitle)); + } + + /** + * Set the value of bannersTitle using greaterEqual. { >= } + * If the value is null or empty-string, this condition is ignored. + * + * @param bannersTitle The value of bannersTitle as greaterEqual. + */ + public void setBannersTitle_GreaterEqual(String bannersTitle) { + registerBannersTitle(ConditionKey.CK_GREATER_EQUAL, filterRemoveEmptyString(bannersTitle)); + } + + /** + * Set the value of bannersTitle using lessEqual. { <= } + * If the value is null or empty-string, this condition is ignored. + * + * @param bannersTitle The value of bannersTitle as lessEqual. + */ + public void setBannersTitle_LessEqual(String bannersTitle) { + registerBannersTitle(ConditionKey.CK_LESS_EQUAL, filterRemoveEmptyString(bannersTitle)); + } + + /** + * Set the value of bannersTitle using prefixSearch. { like 'xxx%' } + * If the value is null or empty-string, this condition is ignored. + * + * @param bannersTitle The value of bannersTitle as prefixSearch. + */ + public void setBannersTitle_PrefixSearch(String bannersTitle) { + registerBannersTitle(ConditionKey.CK_PREFIX_SEARCH, filterRemoveEmptyString(bannersTitle)); + } + + /** + * Set the value of bannersTitle using likeSearch. { like '%xxx%' } + * If the value is null or empty-string, this condition is ignored. + * You can invoke this method several times and the conditions are set up. + * + * @param bannersTitle The value of bannersTitle as likeSearch. + * @param likeSearchOption Like search option. (NotNull) + */ + public void setBannersTitle_LikeSearch(String bannersTitle, jp.sf.pal.pompei.allcommon.cbean.coption.LikeSearchOption likeSearchOption) { + registerLikeSearchQuery(ConditionKey.CK_LIKE_SEARCH, filterRemoveEmptyString(bannersTitle), getCValueBannersTitle(), COL_BANNERS_TITLE, J_BannersTitle, UJ_bannersTitle, likeSearchOption); + } + + /** + * Set the value of bannersTitle using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param bannersTitleList The value of bannersTitle as inScope. + */ + public void setBannersTitle_InScope(java.util.List bannersTitleList) { + registerBannersTitle(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyStringFromList(bannersTitleList)); + } + + /** + * Set the value of bannersTitle using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param bannersTitle The value of bannersTitle as inScope. + */ + public void setBannersTitle_InScope(String bannersTitle, jp.sf.pal.pompei.allcommon.cbean.coption.InScopeOption option) { + registerInScopeQuery(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyString(bannersTitle), getCValueBannersTitle(), COL_BANNERS_TITLE, J_BannersTitle, UJ_bannersTitle, option); + } + + /** + * Set the value of bannersTitle using notInScope. { not in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param bannersTitleList The value of bannersTitle as notInScope. + */ + public void setBannersTitle_NotInScope(java.util.List bannersTitleList) { + registerBannersTitle(ConditionKey.CK_NOT_IN_SCOPE, filterRemoveEmptyStringFromList(bannersTitleList)); + } + + /** + * Register condition of bannersTitle. + * + * @param key Condition key. (NotNull) + * @param value The value of bannersTitle. (Nullable) + */ + protected void registerBannersTitle(ConditionKey key, Object value) { + registerQuery(key, value, getCValueBannersTitle(), COL_BANNERS_TITLE, J_BannersTitle, UJ_bannersTitle); + } + + /** + * Register inline condition of bannersTitle. + * + * @param key Condition key. (NotNull) + * @param value The value of bannersTitle. (Nullable) + */ + protected void registerInlineBannersTitle(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueBannersTitle(), COL_BANNERS_TITLE, J_BannersTitle, UJ_bannersTitle); + } + + abstract protected ConditionValue getCValueBannersTitle(); + + /** Column db name of bannersUrl. */ + protected static final String COL_BANNERS_URL = "BANNERS_URL"; + + /** Column java name of bannersUrl. */ + protected static final String J_BannersUrl = "BannersUrl"; + + /** Column uncapitalised java name of bannersUrl. */ + protected static final String UJ_bannersUrl = "bannersUrl"; + + /** + * Set the value of bannersUrl using equal. { = } + * If the value is null or empty-string, this condition is ignored. + * + * @param bannersUrl The value of bannersUrl as equal. + */ + public void setBannersUrl_Equal(String bannersUrl) { + registerBannersUrl(ConditionKey.CK_EQUAL, filterRemoveEmptyString(bannersUrl)); + } + + /** + * Set the value of bannersUrl using notEqual. { != } + * If the value is null or empty-string, this condition is ignored. + * + * @param bannersUrl The value of bannersUrl as notEqual. + */ + public void setBannersUrl_NotEqual(String bannersUrl) { + registerBannersUrl(ConditionKey.CK_NOT_EQUAL, filterRemoveEmptyString(bannersUrl)); + } + + /** + * Set the value of bannersUrl using greaterThan. { > } + * If the value is null or empty-string, this condition is ignored. + * + * @param bannersUrl The value of bannersUrl as greaterThan. + */ + public void setBannersUrl_GreaterThan(String bannersUrl) { + registerBannersUrl(ConditionKey.CK_GREATER_THAN, filterRemoveEmptyString(bannersUrl)); + } + + /** + * Set the value of bannersUrl using lessThan. { < } + * If the value is null or empty-string, this condition is ignored. + * + * @param bannersUrl The value of bannersUrl as lessThan. + */ + public void setBannersUrl_LessThan(String bannersUrl) { + registerBannersUrl(ConditionKey.CK_LESS_THAN, filterRemoveEmptyString(bannersUrl)); + } + + /** + * Set the value of bannersUrl using greaterEqual. { >= } + * If the value is null or empty-string, this condition is ignored. + * + * @param bannersUrl The value of bannersUrl as greaterEqual. + */ + public void setBannersUrl_GreaterEqual(String bannersUrl) { + registerBannersUrl(ConditionKey.CK_GREATER_EQUAL, filterRemoveEmptyString(bannersUrl)); + } + + /** + * Set the value of bannersUrl using lessEqual. { <= } + * If the value is null or empty-string, this condition is ignored. + * + * @param bannersUrl The value of bannersUrl as lessEqual. + */ + public void setBannersUrl_LessEqual(String bannersUrl) { + registerBannersUrl(ConditionKey.CK_LESS_EQUAL, filterRemoveEmptyString(bannersUrl)); + } + + /** + * Set the value of bannersUrl using prefixSearch. { like 'xxx%' } + * If the value is null or empty-string, this condition is ignored. + * + * @param bannersUrl The value of bannersUrl as prefixSearch. + */ + public void setBannersUrl_PrefixSearch(String bannersUrl) { + registerBannersUrl(ConditionKey.CK_PREFIX_SEARCH, filterRemoveEmptyString(bannersUrl)); + } + + /** + * Set the value of bannersUrl using likeSearch. { like '%xxx%' } + * If the value is null or empty-string, this condition is ignored. + * You can invoke this method several times and the conditions are set up. + * + * @param bannersUrl The value of bannersUrl as likeSearch. + * @param likeSearchOption Like search option. (NotNull) + */ + public void setBannersUrl_LikeSearch(String bannersUrl, jp.sf.pal.pompei.allcommon.cbean.coption.LikeSearchOption likeSearchOption) { + registerLikeSearchQuery(ConditionKey.CK_LIKE_SEARCH, filterRemoveEmptyString(bannersUrl), getCValueBannersUrl(), COL_BANNERS_URL, J_BannersUrl, UJ_bannersUrl, likeSearchOption); + } + + /** + * Set the value of bannersUrl using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param bannersUrlList The value of bannersUrl as inScope. + */ + public void setBannersUrl_InScope(java.util.List bannersUrlList) { + registerBannersUrl(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyStringFromList(bannersUrlList)); + } + + /** + * Set the value of bannersUrl using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param bannersUrl The value of bannersUrl as inScope. + */ + public void setBannersUrl_InScope(String bannersUrl, jp.sf.pal.pompei.allcommon.cbean.coption.InScopeOption option) { + registerInScopeQuery(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyString(bannersUrl), getCValueBannersUrl(), COL_BANNERS_URL, J_BannersUrl, UJ_bannersUrl, option); + } + + /** + * Set the value of bannersUrl using notInScope. { not in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param bannersUrlList The value of bannersUrl as notInScope. + */ + public void setBannersUrl_NotInScope(java.util.List bannersUrlList) { + registerBannersUrl(ConditionKey.CK_NOT_IN_SCOPE, filterRemoveEmptyStringFromList(bannersUrlList)); + } + + /** + * Register condition of bannersUrl. + * + * @param key Condition key. (NotNull) + * @param value The value of bannersUrl. (Nullable) + */ + protected void registerBannersUrl(ConditionKey key, Object value) { + registerQuery(key, value, getCValueBannersUrl(), COL_BANNERS_URL, J_BannersUrl, UJ_bannersUrl); + } + + /** + * Register inline condition of bannersUrl. + * + * @param key Condition key. (NotNull) + * @param value The value of bannersUrl. (Nullable) + */ + protected void registerInlineBannersUrl(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueBannersUrl(), COL_BANNERS_URL, J_BannersUrl, UJ_bannersUrl); + } + + abstract protected ConditionValue getCValueBannersUrl(); + + /** Column db name of bannersImage. */ + protected static final String COL_BANNERS_IMAGE = "BANNERS_IMAGE"; + + /** Column java name of bannersImage. */ + protected static final String J_BannersImage = "BannersImage"; + + /** Column uncapitalised java name of bannersImage. */ + protected static final String UJ_bannersImage = "bannersImage"; + + /** + * Set the value of bannersImage using equal. { = } + * If the value is null or empty-string, this condition is ignored. + * + * @param bannersImage The value of bannersImage as equal. + */ + public void setBannersImage_Equal(String bannersImage) { + registerBannersImage(ConditionKey.CK_EQUAL, filterRemoveEmptyString(bannersImage)); + } + + /** + * Set the value of bannersImage using notEqual. { != } + * If the value is null or empty-string, this condition is ignored. + * + * @param bannersImage The value of bannersImage as notEqual. + */ + public void setBannersImage_NotEqual(String bannersImage) { + registerBannersImage(ConditionKey.CK_NOT_EQUAL, filterRemoveEmptyString(bannersImage)); + } + + /** + * Set the value of bannersImage using greaterThan. { > } + * If the value is null or empty-string, this condition is ignored. + * + * @param bannersImage The value of bannersImage as greaterThan. + */ + public void setBannersImage_GreaterThan(String bannersImage) { + registerBannersImage(ConditionKey.CK_GREATER_THAN, filterRemoveEmptyString(bannersImage)); + } + + /** + * Set the value of bannersImage using lessThan. { < } + * If the value is null or empty-string, this condition is ignored. + * + * @param bannersImage The value of bannersImage as lessThan. + */ + public void setBannersImage_LessThan(String bannersImage) { + registerBannersImage(ConditionKey.CK_LESS_THAN, filterRemoveEmptyString(bannersImage)); + } + + /** + * Set the value of bannersImage using greaterEqual. { >= } + * If the value is null or empty-string, this condition is ignored. + * + * @param bannersImage The value of bannersImage as greaterEqual. + */ + public void setBannersImage_GreaterEqual(String bannersImage) { + registerBannersImage(ConditionKey.CK_GREATER_EQUAL, filterRemoveEmptyString(bannersImage)); + } + + /** + * Set the value of bannersImage using lessEqual. { <= } + * If the value is null or empty-string, this condition is ignored. + * + * @param bannersImage The value of bannersImage as lessEqual. + */ + public void setBannersImage_LessEqual(String bannersImage) { + registerBannersImage(ConditionKey.CK_LESS_EQUAL, filterRemoveEmptyString(bannersImage)); + } + + /** + * Set the value of bannersImage using prefixSearch. { like 'xxx%' } + * If the value is null or empty-string, this condition is ignored. + * + * @param bannersImage The value of bannersImage as prefixSearch. + */ + public void setBannersImage_PrefixSearch(String bannersImage) { + registerBannersImage(ConditionKey.CK_PREFIX_SEARCH, filterRemoveEmptyString(bannersImage)); + } + + /** + * Set the value of bannersImage using likeSearch. { like '%xxx%' } + * If the value is null or empty-string, this condition is ignored. + * You can invoke this method several times and the conditions are set up. + * + * @param bannersImage The value of bannersImage as likeSearch. + * @param likeSearchOption Like search option. (NotNull) + */ + public void setBannersImage_LikeSearch(String bannersImage, jp.sf.pal.pompei.allcommon.cbean.coption.LikeSearchOption likeSearchOption) { + registerLikeSearchQuery(ConditionKey.CK_LIKE_SEARCH, filterRemoveEmptyString(bannersImage), getCValueBannersImage(), COL_BANNERS_IMAGE, J_BannersImage, UJ_bannersImage, likeSearchOption); + } + + /** + * Set the value of bannersImage using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param bannersImageList The value of bannersImage as inScope. + */ + public void setBannersImage_InScope(java.util.List bannersImageList) { + registerBannersImage(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyStringFromList(bannersImageList)); + } + + /** + * Set the value of bannersImage using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param bannersImage The value of bannersImage as inScope. + */ + public void setBannersImage_InScope(String bannersImage, jp.sf.pal.pompei.allcommon.cbean.coption.InScopeOption option) { + registerInScopeQuery(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyString(bannersImage), getCValueBannersImage(), COL_BANNERS_IMAGE, J_BannersImage, UJ_bannersImage, option); + } + + /** + * Set the value of bannersImage using notInScope. { not in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param bannersImageList The value of bannersImage as notInScope. + */ + public void setBannersImage_NotInScope(java.util.List bannersImageList) { + registerBannersImage(ConditionKey.CK_NOT_IN_SCOPE, filterRemoveEmptyStringFromList(bannersImageList)); + } + + /** + * Register condition of bannersImage. + * + * @param key Condition key. (NotNull) + * @param value The value of bannersImage. (Nullable) + */ + protected void registerBannersImage(ConditionKey key, Object value) { + registerQuery(key, value, getCValueBannersImage(), COL_BANNERS_IMAGE, J_BannersImage, UJ_bannersImage); + } + + /** + * Register inline condition of bannersImage. + * + * @param key Condition key. (NotNull) + * @param value The value of bannersImage. (Nullable) + */ + protected void registerInlineBannersImage(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueBannersImage(), COL_BANNERS_IMAGE, J_BannersImage, UJ_bannersImage); + } + + abstract protected ConditionValue getCValueBannersImage(); + + /** Column db name of bannersGroup. */ + protected static final String COL_BANNERS_GROUP = "BANNERS_GROUP"; + + /** Column java name of bannersGroup. */ + protected static final String J_BannersGroup = "BannersGroup"; + + /** Column uncapitalised java name of bannersGroup. */ + protected static final String UJ_bannersGroup = "bannersGroup"; + + /** + * Set the value of bannersGroup using equal. { = } + * If the value is null or empty-string, this condition is ignored. + * + * @param bannersGroup The value of bannersGroup as equal. + */ + public void setBannersGroup_Equal(String bannersGroup) { + registerBannersGroup(ConditionKey.CK_EQUAL, filterRemoveEmptyString(bannersGroup)); + } + + /** + * Set the value of bannersGroup using notEqual. { != } + * If the value is null or empty-string, this condition is ignored. + * + * @param bannersGroup The value of bannersGroup as notEqual. + */ + public void setBannersGroup_NotEqual(String bannersGroup) { + registerBannersGroup(ConditionKey.CK_NOT_EQUAL, filterRemoveEmptyString(bannersGroup)); + } + + /** + * Set the value of bannersGroup using greaterThan. { > } + * If the value is null or empty-string, this condition is ignored. + * + * @param bannersGroup The value of bannersGroup as greaterThan. + */ + public void setBannersGroup_GreaterThan(String bannersGroup) { + registerBannersGroup(ConditionKey.CK_GREATER_THAN, filterRemoveEmptyString(bannersGroup)); + } + + /** + * Set the value of bannersGroup using lessThan. { < } + * If the value is null or empty-string, this condition is ignored. + * + * @param bannersGroup The value of bannersGroup as lessThan. + */ + public void setBannersGroup_LessThan(String bannersGroup) { + registerBannersGroup(ConditionKey.CK_LESS_THAN, filterRemoveEmptyString(bannersGroup)); + } + + /** + * Set the value of bannersGroup using greaterEqual. { >= } + * If the value is null or empty-string, this condition is ignored. + * + * @param bannersGroup The value of bannersGroup as greaterEqual. + */ + public void setBannersGroup_GreaterEqual(String bannersGroup) { + registerBannersGroup(ConditionKey.CK_GREATER_EQUAL, filterRemoveEmptyString(bannersGroup)); + } + + /** + * Set the value of bannersGroup using lessEqual. { <= } + * If the value is null or empty-string, this condition is ignored. + * + * @param bannersGroup The value of bannersGroup as lessEqual. + */ + public void setBannersGroup_LessEqual(String bannersGroup) { + registerBannersGroup(ConditionKey.CK_LESS_EQUAL, filterRemoveEmptyString(bannersGroup)); + } + + /** + * Set the value of bannersGroup using prefixSearch. { like 'xxx%' } + * If the value is null or empty-string, this condition is ignored. + * + * @param bannersGroup The value of bannersGroup as prefixSearch. + */ + public void setBannersGroup_PrefixSearch(String bannersGroup) { + registerBannersGroup(ConditionKey.CK_PREFIX_SEARCH, filterRemoveEmptyString(bannersGroup)); + } + + /** + * Set the value of bannersGroup using likeSearch. { like '%xxx%' } + * If the value is null or empty-string, this condition is ignored. + * You can invoke this method several times and the conditions are set up. + * + * @param bannersGroup The value of bannersGroup as likeSearch. + * @param likeSearchOption Like search option. (NotNull) + */ + public void setBannersGroup_LikeSearch(String bannersGroup, jp.sf.pal.pompei.allcommon.cbean.coption.LikeSearchOption likeSearchOption) { + registerLikeSearchQuery(ConditionKey.CK_LIKE_SEARCH, filterRemoveEmptyString(bannersGroup), getCValueBannersGroup(), COL_BANNERS_GROUP, J_BannersGroup, UJ_bannersGroup, likeSearchOption); + } + + /** + * Set the value of bannersGroup using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param bannersGroupList The value of bannersGroup as inScope. + */ + public void setBannersGroup_InScope(java.util.List bannersGroupList) { + registerBannersGroup(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyStringFromList(bannersGroupList)); + } + + /** + * Set the value of bannersGroup using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param bannersGroup The value of bannersGroup as inScope. + */ + public void setBannersGroup_InScope(String bannersGroup, jp.sf.pal.pompei.allcommon.cbean.coption.InScopeOption option) { + registerInScopeQuery(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyString(bannersGroup), getCValueBannersGroup(), COL_BANNERS_GROUP, J_BannersGroup, UJ_bannersGroup, option); + } + + /** + * Set the value of bannersGroup using notInScope. { not in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param bannersGroupList The value of bannersGroup as notInScope. + */ + public void setBannersGroup_NotInScope(java.util.List bannersGroupList) { + registerBannersGroup(ConditionKey.CK_NOT_IN_SCOPE, filterRemoveEmptyStringFromList(bannersGroupList)); + } + + /** + * Register condition of bannersGroup. + * + * @param key Condition key. (NotNull) + * @param value The value of bannersGroup. (Nullable) + */ + protected void registerBannersGroup(ConditionKey key, Object value) { + registerQuery(key, value, getCValueBannersGroup(), COL_BANNERS_GROUP, J_BannersGroup, UJ_bannersGroup); + } + + /** + * Register inline condition of bannersGroup. + * + * @param key Condition key. (NotNull) + * @param value The value of bannersGroup. (Nullable) + */ + protected void registerInlineBannersGroup(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueBannersGroup(), COL_BANNERS_GROUP, J_BannersGroup, UJ_bannersGroup); + } + + abstract protected ConditionValue getCValueBannersGroup(); + + /** Column db name of bannersHtmlText. */ + protected static final String COL_BANNERS_HTML_TEXT = "BANNERS_HTML_TEXT"; + + /** Column java name of bannersHtmlText. */ + protected static final String J_BannersHtmlText = "BannersHtmlText"; + + /** Column uncapitalised java name of bannersHtmlText. */ + protected static final String UJ_bannersHtmlText = "bannersHtmlText"; + + /** + * Set the value of bannersHtmlText using equal. { = } + * If the value is null or empty-string, this condition is ignored. + * + * @param bannersHtmlText The value of bannersHtmlText as equal. + */ + public void setBannersHtmlText_Equal(String bannersHtmlText) { + registerBannersHtmlText(ConditionKey.CK_EQUAL, filterRemoveEmptyString(bannersHtmlText)); + } + + /** + * Set the value of bannersHtmlText using notEqual. { != } + * If the value is null or empty-string, this condition is ignored. + * + * @param bannersHtmlText The value of bannersHtmlText as notEqual. + */ + public void setBannersHtmlText_NotEqual(String bannersHtmlText) { + registerBannersHtmlText(ConditionKey.CK_NOT_EQUAL, filterRemoveEmptyString(bannersHtmlText)); + } + + /** + * Set the value of bannersHtmlText using greaterThan. { > } + * If the value is null or empty-string, this condition is ignored. + * + * @param bannersHtmlText The value of bannersHtmlText as greaterThan. + */ + public void setBannersHtmlText_GreaterThan(String bannersHtmlText) { + registerBannersHtmlText(ConditionKey.CK_GREATER_THAN, filterRemoveEmptyString(bannersHtmlText)); + } + + /** + * Set the value of bannersHtmlText using lessThan. { < } + * If the value is null or empty-string, this condition is ignored. + * + * @param bannersHtmlText The value of bannersHtmlText as lessThan. + */ + public void setBannersHtmlText_LessThan(String bannersHtmlText) { + registerBannersHtmlText(ConditionKey.CK_LESS_THAN, filterRemoveEmptyString(bannersHtmlText)); + } + + /** + * Set the value of bannersHtmlText using greaterEqual. { >= } + * If the value is null or empty-string, this condition is ignored. + * + * @param bannersHtmlText The value of bannersHtmlText as greaterEqual. + */ + public void setBannersHtmlText_GreaterEqual(String bannersHtmlText) { + registerBannersHtmlText(ConditionKey.CK_GREATER_EQUAL, filterRemoveEmptyString(bannersHtmlText)); + } + + /** + * Set the value of bannersHtmlText using lessEqual. { <= } + * If the value is null or empty-string, this condition is ignored. + * + * @param bannersHtmlText The value of bannersHtmlText as lessEqual. + */ + public void setBannersHtmlText_LessEqual(String bannersHtmlText) { + registerBannersHtmlText(ConditionKey.CK_LESS_EQUAL, filterRemoveEmptyString(bannersHtmlText)); + } + + /** + * Set the value of bannersHtmlText using prefixSearch. { like 'xxx%' } + * If the value is null or empty-string, this condition is ignored. + * + * @param bannersHtmlText The value of bannersHtmlText as prefixSearch. + */ + public void setBannersHtmlText_PrefixSearch(String bannersHtmlText) { + registerBannersHtmlText(ConditionKey.CK_PREFIX_SEARCH, filterRemoveEmptyString(bannersHtmlText)); + } + + /** + * Set the value of bannersHtmlText using likeSearch. { like '%xxx%' } + * If the value is null or empty-string, this condition is ignored. + * You can invoke this method several times and the conditions are set up. + * + * @param bannersHtmlText The value of bannersHtmlText as likeSearch. + * @param likeSearchOption Like search option. (NotNull) + */ + public void setBannersHtmlText_LikeSearch(String bannersHtmlText, jp.sf.pal.pompei.allcommon.cbean.coption.LikeSearchOption likeSearchOption) { + registerLikeSearchQuery(ConditionKey.CK_LIKE_SEARCH, filterRemoveEmptyString(bannersHtmlText), getCValueBannersHtmlText(), COL_BANNERS_HTML_TEXT, J_BannersHtmlText, UJ_bannersHtmlText, likeSearchOption); + } + + /** + * Set the value of bannersHtmlText using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param bannersHtmlTextList The value of bannersHtmlText as inScope. + */ + public void setBannersHtmlText_InScope(java.util.List bannersHtmlTextList) { + registerBannersHtmlText(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyStringFromList(bannersHtmlTextList)); + } + + /** + * Set the value of bannersHtmlText using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param bannersHtmlText The value of bannersHtmlText as inScope. + */ + public void setBannersHtmlText_InScope(String bannersHtmlText, jp.sf.pal.pompei.allcommon.cbean.coption.InScopeOption option) { + registerInScopeQuery(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyString(bannersHtmlText), getCValueBannersHtmlText(), COL_BANNERS_HTML_TEXT, J_BannersHtmlText, UJ_bannersHtmlText, option); + } + + /** + * Set the value of bannersHtmlText using notInScope. { not in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param bannersHtmlTextList The value of bannersHtmlText as notInScope. + */ + public void setBannersHtmlText_NotInScope(java.util.List bannersHtmlTextList) { + registerBannersHtmlText(ConditionKey.CK_NOT_IN_SCOPE, filterRemoveEmptyStringFromList(bannersHtmlTextList)); + } + + /** + * Set the value of bannersHtmlText using isNull. { is null } + */ + public void setBannersHtmlText_IsNull() { + registerBannersHtmlText(ConditionKey.CK_IS_NULL, DUMMY_OBJECT); + } + + /** + * Set the value of bannersHtmlText using isNotNull. { is not null } + */ + public void setBannersHtmlText_IsNotNull() { + registerBannersHtmlText(ConditionKey.CK_IS_NOT_NULL, DUMMY_OBJECT); + } + + /** + * Register condition of bannersHtmlText. + * + * @param key Condition key. (NotNull) + * @param value The value of bannersHtmlText. (Nullable) + */ + protected void registerBannersHtmlText(ConditionKey key, Object value) { + registerQuery(key, value, getCValueBannersHtmlText(), COL_BANNERS_HTML_TEXT, J_BannersHtmlText, UJ_bannersHtmlText); + } + + /** + * Register inline condition of bannersHtmlText. + * + * @param key Condition key. (NotNull) + * @param value The value of bannersHtmlText. (Nullable) + */ + protected void registerInlineBannersHtmlText(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueBannersHtmlText(), COL_BANNERS_HTML_TEXT, J_BannersHtmlText, UJ_bannersHtmlText); + } + + abstract protected ConditionValue getCValueBannersHtmlText(); + + /** Column db name of expiresImpressions. */ + protected static final String COL_EXPIRES_IMPRESSIONS = "EXPIRES_IMPRESSIONS"; + + /** Column java name of expiresImpressions. */ + protected static final String J_ExpiresImpressions = "ExpiresImpressions"; + + /** Column uncapitalised java name of expiresImpressions. */ + protected static final String UJ_expiresImpressions = "expiresImpressions"; + + /** + * Set the value of expiresImpressions using equal. { = } + * + * @param expiresImpressions The value of expiresImpressions as equal. + */ + public void setExpiresImpressions_Equal(java.math.BigDecimal expiresImpressions) { + registerExpiresImpressions(ConditionKey.CK_EQUAL, expiresImpressions); + } + + /** + * Set the value of expiresImpressions using notEqual. { != } + * + * @param expiresImpressions The value of expiresImpressions as notEqual. + */ + public void setExpiresImpressions_NotEqual(java.math.BigDecimal expiresImpressions) { + registerExpiresImpressions(ConditionKey.CK_NOT_EQUAL, expiresImpressions); + } + + /** + * Set the value of expiresImpressions using greaterThan. { > } + * + * @param expiresImpressions The value of expiresImpressions as greaterThan. + */ + public void setExpiresImpressions_GreaterThan(java.math.BigDecimal expiresImpressions) { + registerExpiresImpressions(ConditionKey.CK_GREATER_THAN, expiresImpressions); + } + + /** + * Set the value of expiresImpressions using lessThan. { < } + * + * @param expiresImpressions The value of expiresImpressions as lessThan. + */ + public void setExpiresImpressions_LessThan(java.math.BigDecimal expiresImpressions) { + registerExpiresImpressions(ConditionKey.CK_LESS_THAN, expiresImpressions); + } + + /** + * Set the value of expiresImpressions using greaterEqual. { >= } + * + * @param expiresImpressions The value of expiresImpressions as greaterEqual. + */ + public void setExpiresImpressions_GreaterEqual(java.math.BigDecimal expiresImpressions) { + registerExpiresImpressions(ConditionKey.CK_GREATER_EQUAL, expiresImpressions); + } + + /** + * Set the value of expiresImpressions using lessEqual. { <= } + * + * @param expiresImpressions The value of expiresImpressions as lessEqual. + */ + public void setExpiresImpressions_LessEqual(java.math.BigDecimal expiresImpressions) { + registerExpiresImpressions(ConditionKey.CK_LESS_EQUAL, expiresImpressions); + } + + /** + * Set the value of expiresImpressions using inScope. { in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param expiresImpressionsList The value of expiresImpressions as inScope. + */ + public void setExpiresImpressions_InScope(java.util.List expiresImpressionsList) { + registerExpiresImpressions(ConditionKey.CK_IN_SCOPE, expiresImpressionsList); + } + + /** + * Set the value of expiresImpressions using notInScope. { not in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param expiresImpressionsList The value of expiresImpressions as notInScope. + */ + public void setExpiresImpressions_NotInScope(java.util.List expiresImpressionsList) { + registerExpiresImpressions(ConditionKey.CK_NOT_IN_SCOPE, expiresImpressionsList); + } + + /** + * Set the value of expiresImpressions using isNull. { is null } + */ + public void setExpiresImpressions_IsNull() { + registerExpiresImpressions(ConditionKey.CK_IS_NULL, DUMMY_OBJECT); + } + + /** + * Set the value of expiresImpressions using isNotNull. { is not null } + */ + public void setExpiresImpressions_IsNotNull() { + registerExpiresImpressions(ConditionKey.CK_IS_NOT_NULL, DUMMY_OBJECT); + } + + /** + * Register condition of expiresImpressions. + * + * @param key Condition key. (NotNull) + * @param value The value of expiresImpressions. (Nullable) + */ + protected void registerExpiresImpressions(ConditionKey key, Object value) { + registerQuery(key, value, getCValueExpiresImpressions(), COL_EXPIRES_IMPRESSIONS, J_ExpiresImpressions, UJ_expiresImpressions); + } + + /** + * Register inline condition of expiresImpressions. + * + * @param key Condition key. (NotNull) + * @param value The value of expiresImpressions. (Nullable) + */ + protected void registerInlineExpiresImpressions(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueExpiresImpressions(), COL_EXPIRES_IMPRESSIONS, J_ExpiresImpressions, UJ_expiresImpressions); + } + + abstract protected ConditionValue getCValueExpiresImpressions(); + + /** Column db name of expiresDate. */ + protected static final String COL_EXPIRES_DATE = "EXPIRES_DATE"; + + /** Column java name of expiresDate. */ + protected static final String J_ExpiresDate = "ExpiresDate"; + + /** Column uncapitalised java name of expiresDate. */ + protected static final String UJ_expiresDate = "expiresDate"; + + /** + * Set the value of expiresDate using equal. { = } + * + * @param expiresDate The value of expiresDate as equal. + */ + public void setExpiresDate_Equal(java.sql.Timestamp expiresDate) { + registerExpiresDate(ConditionKey.CK_EQUAL, expiresDate); + } + + /** + * Set the value of expiresDate using notEqual. { != } + * + * @param expiresDate The value of expiresDate as notEqual. + */ + public void setExpiresDate_NotEqual(java.sql.Timestamp expiresDate) { + registerExpiresDate(ConditionKey.CK_NOT_EQUAL, expiresDate); + } + + /** + * Set the value of expiresDate using greaterThan. { > } + * + * @param expiresDate The value of expiresDate as greaterThan. + */ + public void setExpiresDate_GreaterThan(java.sql.Timestamp expiresDate) { + registerExpiresDate(ConditionKey.CK_GREATER_THAN, expiresDate); + } + + /** + * Set the value of expiresDate using lessThan. { < } + * + * @param expiresDate The value of expiresDate as lessThan. + */ + public void setExpiresDate_LessThan(java.sql.Timestamp expiresDate) { + registerExpiresDate(ConditionKey.CK_LESS_THAN, expiresDate); + } + + /** + * Set the value of expiresDate using greaterEqual. { >= } + * + * @param expiresDate The value of expiresDate as greaterEqual. + */ + public void setExpiresDate_GreaterEqual(java.sql.Timestamp expiresDate) { + registerExpiresDate(ConditionKey.CK_GREATER_EQUAL, expiresDate); + } + + /** + * Set the value of expiresDate using lessEqual. { <= } + * + * @param expiresDate The value of expiresDate as lessEqual. + */ + public void setExpiresDate_LessEqual(java.sql.Timestamp expiresDate) { + registerExpiresDate(ConditionKey.CK_LESS_EQUAL, expiresDate); + } + + /** + * Set the value of expiresDate using from-to. { $fromDate <= COLUMN_NAME <= $toDate } + * + * @param expiresDate The value of expiresDate as from-to. + * @param fromToOption From-To option. (NotNull) + */ + public void setExpiresDate_FromTo(java.sql.Timestamp fromDate, java.sql.Timestamp toDate, jp.sf.pal.pompei.allcommon.cbean.coption.FromToOption fromToOption) { + registerFromToQuery(fromDate, toDate, getCValueExpiresDate(), COL_EXPIRES_DATE, J_ExpiresDate, UJ_expiresDate, fromToOption); + } + + /** + * Set the value of expiresDate using isNull. { is null } + */ + public void setExpiresDate_IsNull() { + registerExpiresDate(ConditionKey.CK_IS_NULL, DUMMY_OBJECT); + } + + /** + * Set the value of expiresDate using isNotNull. { is not null } + */ + public void setExpiresDate_IsNotNull() { + registerExpiresDate(ConditionKey.CK_IS_NOT_NULL, DUMMY_OBJECT); + } + + /** + * Register condition of expiresDate. + * + * @param key Condition key. (NotNull) + * @param value The value of expiresDate. (Nullable) + */ + protected void registerExpiresDate(ConditionKey key, Object value) { + registerQuery(key, value, getCValueExpiresDate(), COL_EXPIRES_DATE, J_ExpiresDate, UJ_expiresDate); + } + + /** + * Register inline condition of expiresDate. + * + * @param key Condition key. (NotNull) + * @param value The value of expiresDate. (Nullable) + */ + protected void registerInlineExpiresDate(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueExpiresDate(), COL_EXPIRES_DATE, J_ExpiresDate, UJ_expiresDate); + } + + abstract protected ConditionValue getCValueExpiresDate(); + + /** Column db name of dateScheduled. */ + protected static final String COL_DATE_SCHEDULED = "DATE_SCHEDULED"; + + /** Column java name of dateScheduled. */ + protected static final String J_DateScheduled = "DateScheduled"; + + /** Column uncapitalised java name of dateScheduled. */ + protected static final String UJ_dateScheduled = "dateScheduled"; + + /** + * Set the value of dateScheduled using equal. { = } + * + * @param dateScheduled The value of dateScheduled as equal. + */ + public void setDateScheduled_Equal(java.sql.Timestamp dateScheduled) { + registerDateScheduled(ConditionKey.CK_EQUAL, dateScheduled); + } + + /** + * Set the value of dateScheduled using notEqual. { != } + * + * @param dateScheduled The value of dateScheduled as notEqual. + */ + public void setDateScheduled_NotEqual(java.sql.Timestamp dateScheduled) { + registerDateScheduled(ConditionKey.CK_NOT_EQUAL, dateScheduled); + } + + /** + * Set the value of dateScheduled using greaterThan. { > } + * + * @param dateScheduled The value of dateScheduled as greaterThan. + */ + public void setDateScheduled_GreaterThan(java.sql.Timestamp dateScheduled) { + registerDateScheduled(ConditionKey.CK_GREATER_THAN, dateScheduled); + } + + /** + * Set the value of dateScheduled using lessThan. { < } + * + * @param dateScheduled The value of dateScheduled as lessThan. + */ + public void setDateScheduled_LessThan(java.sql.Timestamp dateScheduled) { + registerDateScheduled(ConditionKey.CK_LESS_THAN, dateScheduled); + } + + /** + * Set the value of dateScheduled using greaterEqual. { >= } + * + * @param dateScheduled The value of dateScheduled as greaterEqual. + */ + public void setDateScheduled_GreaterEqual(java.sql.Timestamp dateScheduled) { + registerDateScheduled(ConditionKey.CK_GREATER_EQUAL, dateScheduled); + } + + /** + * Set the value of dateScheduled using lessEqual. { <= } + * + * @param dateScheduled The value of dateScheduled as lessEqual. + */ + public void setDateScheduled_LessEqual(java.sql.Timestamp dateScheduled) { + registerDateScheduled(ConditionKey.CK_LESS_EQUAL, dateScheduled); + } + + /** + * Set the value of dateScheduled using from-to. { $fromDate <= COLUMN_NAME <= $toDate } + * + * @param dateScheduled The value of dateScheduled as from-to. + * @param fromToOption From-To option. (NotNull) + */ + public void setDateScheduled_FromTo(java.sql.Timestamp fromDate, java.sql.Timestamp toDate, jp.sf.pal.pompei.allcommon.cbean.coption.FromToOption fromToOption) { + registerFromToQuery(fromDate, toDate, getCValueDateScheduled(), COL_DATE_SCHEDULED, J_DateScheduled, UJ_dateScheduled, fromToOption); + } + + /** + * Set the value of dateScheduled using isNull. { is null } + */ + public void setDateScheduled_IsNull() { + registerDateScheduled(ConditionKey.CK_IS_NULL, DUMMY_OBJECT); + } + + /** + * Set the value of dateScheduled using isNotNull. { is not null } + */ + public void setDateScheduled_IsNotNull() { + registerDateScheduled(ConditionKey.CK_IS_NOT_NULL, DUMMY_OBJECT); + } + + /** + * Register condition of dateScheduled. + * + * @param key Condition key. (NotNull) + * @param value The value of dateScheduled. (Nullable) + */ + protected void registerDateScheduled(ConditionKey key, Object value) { + registerQuery(key, value, getCValueDateScheduled(), COL_DATE_SCHEDULED, J_DateScheduled, UJ_dateScheduled); + } + + /** + * Register inline condition of dateScheduled. + * + * @param key Condition key. (NotNull) + * @param value The value of dateScheduled. (Nullable) + */ + protected void registerInlineDateScheduled(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueDateScheduled(), COL_DATE_SCHEDULED, J_DateScheduled, UJ_dateScheduled); + } + + abstract protected ConditionValue getCValueDateScheduled(); + + /** Column db name of dateAdded. */ + protected static final String COL_DATE_ADDED = "DATE_ADDED"; + + /** Column java name of dateAdded. */ + protected static final String J_DateAdded = "DateAdded"; + + /** Column uncapitalised java name of dateAdded. */ + protected static final String UJ_dateAdded = "dateAdded"; + + /** + * Set the value of dateAdded using equal. { = } + * + * @param dateAdded The value of dateAdded as equal. + */ + public void setDateAdded_Equal(java.sql.Timestamp dateAdded) { + registerDateAdded(ConditionKey.CK_EQUAL, dateAdded); + } + + /** + * Set the value of dateAdded using notEqual. { != } + * + * @param dateAdded The value of dateAdded as notEqual. + */ + public void setDateAdded_NotEqual(java.sql.Timestamp dateAdded) { + registerDateAdded(ConditionKey.CK_NOT_EQUAL, dateAdded); + } + + /** + * Set the value of dateAdded using greaterThan. { > } + * + * @param dateAdded The value of dateAdded as greaterThan. + */ + public void setDateAdded_GreaterThan(java.sql.Timestamp dateAdded) { + registerDateAdded(ConditionKey.CK_GREATER_THAN, dateAdded); + } + + /** + * Set the value of dateAdded using lessThan. { < } + * + * @param dateAdded The value of dateAdded as lessThan. + */ + public void setDateAdded_LessThan(java.sql.Timestamp dateAdded) { + registerDateAdded(ConditionKey.CK_LESS_THAN, dateAdded); + } + + /** + * Set the value of dateAdded using greaterEqual. { >= } + * + * @param dateAdded The value of dateAdded as greaterEqual. + */ + public void setDateAdded_GreaterEqual(java.sql.Timestamp dateAdded) { + registerDateAdded(ConditionKey.CK_GREATER_EQUAL, dateAdded); + } + + /** + * Set the value of dateAdded using lessEqual. { <= } + * + * @param dateAdded The value of dateAdded as lessEqual. + */ + public void setDateAdded_LessEqual(java.sql.Timestamp dateAdded) { + registerDateAdded(ConditionKey.CK_LESS_EQUAL, dateAdded); + } + + /** + * Set the value of dateAdded using from-to. { $fromDate <= COLUMN_NAME <= $toDate } + * + * @param dateAdded The value of dateAdded as from-to. + * @param fromToOption From-To option. (NotNull) + */ + public void setDateAdded_FromTo(java.sql.Timestamp fromDate, java.sql.Timestamp toDate, jp.sf.pal.pompei.allcommon.cbean.coption.FromToOption fromToOption) { + registerFromToQuery(fromDate, toDate, getCValueDateAdded(), COL_DATE_ADDED, J_DateAdded, UJ_dateAdded, fromToOption); + } + + /** + * Register condition of dateAdded. + * + * @param key Condition key. (NotNull) + * @param value The value of dateAdded. (Nullable) + */ + protected void registerDateAdded(ConditionKey key, Object value) { + registerQuery(key, value, getCValueDateAdded(), COL_DATE_ADDED, J_DateAdded, UJ_dateAdded); + } + + /** + * Register inline condition of dateAdded. + * + * @param key Condition key. (NotNull) + * @param value The value of dateAdded. (Nullable) + */ + protected void registerInlineDateAdded(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueDateAdded(), COL_DATE_ADDED, J_DateAdded, UJ_dateAdded); + } + + abstract protected ConditionValue getCValueDateAdded(); + + /** Column db name of dateStatusChange. */ + protected static final String COL_DATE_STATUS_CHANGE = "DATE_STATUS_CHANGE"; + + /** Column java name of dateStatusChange. */ + protected static final String J_DateStatusChange = "DateStatusChange"; + + /** Column uncapitalised java name of dateStatusChange. */ + protected static final String UJ_dateStatusChange = "dateStatusChange"; + + /** + * Set the value of dateStatusChange using equal. { = } + * + * @param dateStatusChange The value of dateStatusChange as equal. + */ + public void setDateStatusChange_Equal(java.sql.Timestamp dateStatusChange) { + registerDateStatusChange(ConditionKey.CK_EQUAL, dateStatusChange); + } + + /** + * Set the value of dateStatusChange using notEqual. { != } + * + * @param dateStatusChange The value of dateStatusChange as notEqual. + */ + public void setDateStatusChange_NotEqual(java.sql.Timestamp dateStatusChange) { + registerDateStatusChange(ConditionKey.CK_NOT_EQUAL, dateStatusChange); + } + + /** + * Set the value of dateStatusChange using greaterThan. { > } + * + * @param dateStatusChange The value of dateStatusChange as greaterThan. + */ + public void setDateStatusChange_GreaterThan(java.sql.Timestamp dateStatusChange) { + registerDateStatusChange(ConditionKey.CK_GREATER_THAN, dateStatusChange); + } + + /** + * Set the value of dateStatusChange using lessThan. { < } + * + * @param dateStatusChange The value of dateStatusChange as lessThan. + */ + public void setDateStatusChange_LessThan(java.sql.Timestamp dateStatusChange) { + registerDateStatusChange(ConditionKey.CK_LESS_THAN, dateStatusChange); + } + + /** + * Set the value of dateStatusChange using greaterEqual. { >= } + * + * @param dateStatusChange The value of dateStatusChange as greaterEqual. + */ + public void setDateStatusChange_GreaterEqual(java.sql.Timestamp dateStatusChange) { + registerDateStatusChange(ConditionKey.CK_GREATER_EQUAL, dateStatusChange); + } + + /** + * Set the value of dateStatusChange using lessEqual. { <= } + * + * @param dateStatusChange The value of dateStatusChange as lessEqual. + */ + public void setDateStatusChange_LessEqual(java.sql.Timestamp dateStatusChange) { + registerDateStatusChange(ConditionKey.CK_LESS_EQUAL, dateStatusChange); + } + + /** + * Set the value of dateStatusChange using from-to. { $fromDate <= COLUMN_NAME <= $toDate } + * + * @param dateStatusChange The value of dateStatusChange as from-to. + * @param fromToOption From-To option. (NotNull) + */ + public void setDateStatusChange_FromTo(java.sql.Timestamp fromDate, java.sql.Timestamp toDate, jp.sf.pal.pompei.allcommon.cbean.coption.FromToOption fromToOption) { + registerFromToQuery(fromDate, toDate, getCValueDateStatusChange(), COL_DATE_STATUS_CHANGE, J_DateStatusChange, UJ_dateStatusChange, fromToOption); + } + + /** + * Set the value of dateStatusChange using isNull. { is null } + */ + public void setDateStatusChange_IsNull() { + registerDateStatusChange(ConditionKey.CK_IS_NULL, DUMMY_OBJECT); + } + + /** + * Set the value of dateStatusChange using isNotNull. { is not null } + */ + public void setDateStatusChange_IsNotNull() { + registerDateStatusChange(ConditionKey.CK_IS_NOT_NULL, DUMMY_OBJECT); + } + + /** + * Register condition of dateStatusChange. + * + * @param key Condition key. (NotNull) + * @param value The value of dateStatusChange. (Nullable) + */ + protected void registerDateStatusChange(ConditionKey key, Object value) { + registerQuery(key, value, getCValueDateStatusChange(), COL_DATE_STATUS_CHANGE, J_DateStatusChange, UJ_dateStatusChange); + } + + /** + * Register inline condition of dateStatusChange. + * + * @param key Condition key. (NotNull) + * @param value The value of dateStatusChange. (Nullable) + */ + protected void registerInlineDateStatusChange(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueDateStatusChange(), COL_DATE_STATUS_CHANGE, J_DateStatusChange, UJ_dateStatusChange); + } + + abstract protected ConditionValue getCValueDateStatusChange(); + + /** Column db name of status. */ + protected static final String COL_STATUS = "STATUS"; + + /** Column java name of status. */ + protected static final String J_Status = "Status"; + + /** Column uncapitalised java name of status. */ + protected static final String UJ_status = "status"; + + /** + * Set the value of status using equal. { = } + * + * @param status The value of status as equal. + */ + public void setStatus_Equal(java.math.BigDecimal status) { + registerStatus(ConditionKey.CK_EQUAL, status); + } + + /** + * Set the value of status using notEqual. { != } + * + * @param status The value of status as notEqual. + */ + public void setStatus_NotEqual(java.math.BigDecimal status) { + registerStatus(ConditionKey.CK_NOT_EQUAL, status); + } + + /** + * Set the value of status using greaterThan. { > } + * + * @param status The value of status as greaterThan. + */ + public void setStatus_GreaterThan(java.math.BigDecimal status) { + registerStatus(ConditionKey.CK_GREATER_THAN, status); + } + + /** + * Set the value of status using lessThan. { < } + * + * @param status The value of status as lessThan. + */ + public void setStatus_LessThan(java.math.BigDecimal status) { + registerStatus(ConditionKey.CK_LESS_THAN, status); + } + + /** + * Set the value of status using greaterEqual. { >= } + * + * @param status The value of status as greaterEqual. + */ + public void setStatus_GreaterEqual(java.math.BigDecimal status) { + registerStatus(ConditionKey.CK_GREATER_EQUAL, status); + } + + /** + * Set the value of status using lessEqual. { <= } + * + * @param status The value of status as lessEqual. + */ + public void setStatus_LessEqual(java.math.BigDecimal status) { + registerStatus(ConditionKey.CK_LESS_EQUAL, status); + } + + /** + * Set the value of status using inScope. { in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param statusList The value of status as inScope. + */ + public void setStatus_InScope(java.util.List statusList) { + registerStatus(ConditionKey.CK_IN_SCOPE, statusList); + } + + /** + * Set the value of status using notInScope. { not in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param statusList The value of status as notInScope. + */ + public void setStatus_NotInScope(java.util.List statusList) { + registerStatus(ConditionKey.CK_NOT_IN_SCOPE, statusList); + } + + /** + * Register condition of status. + * + * @param key Condition key. (NotNull) + * @param value The value of status. (Nullable) + */ + protected void registerStatus(ConditionKey key, Object value) { + registerQuery(key, value, getCValueStatus(), COL_STATUS, J_Status, UJ_status); + } + + /** + * Register inline condition of status. + * + * @param key Condition key. (NotNull) + * @param value The value of status. (Nullable) + */ + protected void registerInlineStatus(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueStatus(), COL_STATUS, J_Status, UJ_status); + } + + abstract protected ConditionValue getCValueStatus(); + + // =================================================================================== + // Basic Override + // ============== + /** + * This method overrides the method that is declared at super. + * + * @return Clause string. (NotNull) + */ + public String toString() { + return getSqlClause().getClause(); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/AbstractBsBannersHistoryCQ.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/AbstractBsBannersHistoryCQ.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/AbstractBsBannersHistoryCQ.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,581 @@ + +package jp.sf.pal.pompei.cbean.cq.bs; + + + +import jp.sf.pal.pompei.allcommon.cbean.*; +import jp.sf.pal.pompei.allcommon.cbean.ckey.*; +import jp.sf.pal.pompei.allcommon.cbean.cvalue.ConditionValue; +import jp.sf.pal.pompei.allcommon.cbean.sqlclause.SqlClause; +import jp.sf.pal.pompei.cbean.cq.*; + +/** + * The condition-query of BANNERS_HISTORY. + * + * @author DBFlute(AutoGenerator) + */ +public abstract class AbstractBsBannersHistoryCQ extends AbstractConditionQuery { + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param childQuery Child query as abstract class. (Nullable: If null, this is base instance.) + * @param sqlClause SQL clause instance. (NotNull) + * @param aliasName My alias name. (NotNull) + * @param nestLevel Nest level. + */ + public AbstractBsBannersHistoryCQ(ConditionQuery childQuery, SqlClause sqlClause, String aliasName, int nestLevel) { + super(childQuery, sqlClause, aliasName, nestLevel); + } + + // =================================================================================== + // Table Name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + final public String getTableDbName() { + return "BANNERS_HISTORY"; + } + + // =================================================================================== + // Query + // ===== + + // /* * * * * * * * * * * * * * * * * * * * * * * + // MyTable = [BANNERS_HISTORY] + // * * * * * * * * */ + + + /** Column db name of bannersHistoryId. */ + protected static final String COL_BANNERS_HISTORY_ID = "BANNERS_HISTORY_ID"; + + /** Column java name of bannersHistoryId. */ + protected static final String J_BannersHistoryId = "BannersHistoryId"; + + /** Column uncapitalised java name of bannersHistoryId. */ + protected static final String UJ_bannersHistoryId = "bannersHistoryId"; + + /** + * Set the value of bannersHistoryId using equal. { = } + * + * @param bannersHistoryId The value of bannersHistoryId as equal. + */ + public void setBannersHistoryId_Equal(java.math.BigDecimal bannersHistoryId) { + registerBannersHistoryId(ConditionKey.CK_EQUAL, bannersHistoryId); + } + + /** + * Set the value of bannersHistoryId using notEqual. { != } + * + * @param bannersHistoryId The value of bannersHistoryId as notEqual. + */ + public void setBannersHistoryId_NotEqual(java.math.BigDecimal bannersHistoryId) { + registerBannersHistoryId(ConditionKey.CK_NOT_EQUAL, bannersHistoryId); + } + + /** + * Set the value of bannersHistoryId using greaterThan. { > } + * + * @param bannersHistoryId The value of bannersHistoryId as greaterThan. + */ + public void setBannersHistoryId_GreaterThan(java.math.BigDecimal bannersHistoryId) { + registerBannersHistoryId(ConditionKey.CK_GREATER_THAN, bannersHistoryId); + } + + /** + * Set the value of bannersHistoryId using lessThan. { < } + * + * @param bannersHistoryId The value of bannersHistoryId as lessThan. + */ + public void setBannersHistoryId_LessThan(java.math.BigDecimal bannersHistoryId) { + registerBannersHistoryId(ConditionKey.CK_LESS_THAN, bannersHistoryId); + } + + /** + * Set the value of bannersHistoryId using greaterEqual. { >= } + * + * @param bannersHistoryId The value of bannersHistoryId as greaterEqual. + */ + public void setBannersHistoryId_GreaterEqual(java.math.BigDecimal bannersHistoryId) { + registerBannersHistoryId(ConditionKey.CK_GREATER_EQUAL, bannersHistoryId); + } + + /** + * Set the value of bannersHistoryId using lessEqual. { <= } + * + * @param bannersHistoryId The value of bannersHistoryId as lessEqual. + */ + public void setBannersHistoryId_LessEqual(java.math.BigDecimal bannersHistoryId) { + registerBannersHistoryId(ConditionKey.CK_LESS_EQUAL, bannersHistoryId); + } + + /** + * Set the value of bannersHistoryId using inScope. { in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param bannersHistoryIdList The value of bannersHistoryId as inScope. + */ + public void setBannersHistoryId_InScope(java.util.List bannersHistoryIdList) { + registerBannersHistoryId(ConditionKey.CK_IN_SCOPE, bannersHistoryIdList); + } + + /** + * Set the value of bannersHistoryId using notInScope. { not in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param bannersHistoryIdList The value of bannersHistoryId as notInScope. + */ + public void setBannersHistoryId_NotInScope(java.util.List bannersHistoryIdList) { + registerBannersHistoryId(ConditionKey.CK_NOT_IN_SCOPE, bannersHistoryIdList); + } + + /** + * Register condition of bannersHistoryId. + * + * @param key Condition key. (NotNull) + * @param value The value of bannersHistoryId. (Nullable) + */ + protected void registerBannersHistoryId(ConditionKey key, Object value) { + registerQuery(key, value, getCValueBannersHistoryId(), COL_BANNERS_HISTORY_ID, J_BannersHistoryId, UJ_bannersHistoryId); + } + + /** + * Register inline condition of bannersHistoryId. + * + * @param key Condition key. (NotNull) + * @param value The value of bannersHistoryId. (Nullable) + */ + protected void registerInlineBannersHistoryId(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueBannersHistoryId(), COL_BANNERS_HISTORY_ID, J_BannersHistoryId, UJ_bannersHistoryId); + } + + abstract protected ConditionValue getCValueBannersHistoryId(); + + /** Column db name of bannersId. */ + protected static final String COL_BANNERS_ID = "BANNERS_ID"; + + /** Column java name of bannersId. */ + protected static final String J_BannersId = "BannersId"; + + /** Column uncapitalised java name of bannersId. */ + protected static final String UJ_bannersId = "bannersId"; + + /** + * Set the value of bannersId using equal. { = } + * + * @param bannersId The value of bannersId as equal. + */ + public void setBannersId_Equal(java.math.BigDecimal bannersId) { + registerBannersId(ConditionKey.CK_EQUAL, bannersId); + } + + /** + * Set the value of bannersId using notEqual. { != } + * + * @param bannersId The value of bannersId as notEqual. + */ + public void setBannersId_NotEqual(java.math.BigDecimal bannersId) { + registerBannersId(ConditionKey.CK_NOT_EQUAL, bannersId); + } + + /** + * Set the value of bannersId using greaterThan. { > } + * + * @param bannersId The value of bannersId as greaterThan. + */ + public void setBannersId_GreaterThan(java.math.BigDecimal bannersId) { + registerBannersId(ConditionKey.CK_GREATER_THAN, bannersId); + } + + /** + * Set the value of bannersId using lessThan. { < } + * + * @param bannersId The value of bannersId as lessThan. + */ + public void setBannersId_LessThan(java.math.BigDecimal bannersId) { + registerBannersId(ConditionKey.CK_LESS_THAN, bannersId); + } + + /** + * Set the value of bannersId using greaterEqual. { >= } + * + * @param bannersId The value of bannersId as greaterEqual. + */ + public void setBannersId_GreaterEqual(java.math.BigDecimal bannersId) { + registerBannersId(ConditionKey.CK_GREATER_EQUAL, bannersId); + } + + /** + * Set the value of bannersId using lessEqual. { <= } + * + * @param bannersId The value of bannersId as lessEqual. + */ + public void setBannersId_LessEqual(java.math.BigDecimal bannersId) { + registerBannersId(ConditionKey.CK_LESS_EQUAL, bannersId); + } + + /** + * Set the value of bannersId using inScope. { in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param bannersIdList The value of bannersId as inScope. + */ + public void setBannersId_InScope(java.util.List bannersIdList) { + registerBannersId(ConditionKey.CK_IN_SCOPE, bannersIdList); + } + + /** + * Set the value of bannersId using notInScope. { not in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param bannersIdList The value of bannersId as notInScope. + */ + public void setBannersId_NotInScope(java.util.List bannersIdList) { + registerBannersId(ConditionKey.CK_NOT_IN_SCOPE, bannersIdList); + } + + /** + * Register condition of bannersId. + * + * @param key Condition key. (NotNull) + * @param value The value of bannersId. (Nullable) + */ + protected void registerBannersId(ConditionKey key, Object value) { + registerQuery(key, value, getCValueBannersId(), COL_BANNERS_ID, J_BannersId, UJ_bannersId); + } + + /** + * Register inline condition of bannersId. + * + * @param key Condition key. (NotNull) + * @param value The value of bannersId. (Nullable) + */ + protected void registerInlineBannersId(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueBannersId(), COL_BANNERS_ID, J_BannersId, UJ_bannersId); + } + + abstract protected ConditionValue getCValueBannersId(); + + /** Column db name of bannersShown. */ + protected static final String COL_BANNERS_SHOWN = "BANNERS_SHOWN"; + + /** Column java name of bannersShown. */ + protected static final String J_BannersShown = "BannersShown"; + + /** Column uncapitalised java name of bannersShown. */ + protected static final String UJ_bannersShown = "bannersShown"; + + /** + * Set the value of bannersShown using equal. { = } + * + * @param bannersShown The value of bannersShown as equal. + */ + public void setBannersShown_Equal(java.math.BigDecimal bannersShown) { + registerBannersShown(ConditionKey.CK_EQUAL, bannersShown); + } + + /** + * Set the value of bannersShown using notEqual. { != } + * + * @param bannersShown The value of bannersShown as notEqual. + */ + public void setBannersShown_NotEqual(java.math.BigDecimal bannersShown) { + registerBannersShown(ConditionKey.CK_NOT_EQUAL, bannersShown); + } + + /** + * Set the value of bannersShown using greaterThan. { > } + * + * @param bannersShown The value of bannersShown as greaterThan. + */ + public void setBannersShown_GreaterThan(java.math.BigDecimal bannersShown) { + registerBannersShown(ConditionKey.CK_GREATER_THAN, bannersShown); + } + + /** + * Set the value of bannersShown using lessThan. { < } + * + * @param bannersShown The value of bannersShown as lessThan. + */ + public void setBannersShown_LessThan(java.math.BigDecimal bannersShown) { + registerBannersShown(ConditionKey.CK_LESS_THAN, bannersShown); + } + + /** + * Set the value of bannersShown using greaterEqual. { >= } + * + * @param bannersShown The value of bannersShown as greaterEqual. + */ + public void setBannersShown_GreaterEqual(java.math.BigDecimal bannersShown) { + registerBannersShown(ConditionKey.CK_GREATER_EQUAL, bannersShown); + } + + /** + * Set the value of bannersShown using lessEqual. { <= } + * + * @param bannersShown The value of bannersShown as lessEqual. + */ + public void setBannersShown_LessEqual(java.math.BigDecimal bannersShown) { + registerBannersShown(ConditionKey.CK_LESS_EQUAL, bannersShown); + } + + /** + * Set the value of bannersShown using inScope. { in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param bannersShownList The value of bannersShown as inScope. + */ + public void setBannersShown_InScope(java.util.List bannersShownList) { + registerBannersShown(ConditionKey.CK_IN_SCOPE, bannersShownList); + } + + /** + * Set the value of bannersShown using notInScope. { not in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param bannersShownList The value of bannersShown as notInScope. + */ + public void setBannersShown_NotInScope(java.util.List bannersShownList) { + registerBannersShown(ConditionKey.CK_NOT_IN_SCOPE, bannersShownList); + } + + /** + * Register condition of bannersShown. + * + * @param key Condition key. (NotNull) + * @param value The value of bannersShown. (Nullable) + */ + protected void registerBannersShown(ConditionKey key, Object value) { + registerQuery(key, value, getCValueBannersShown(), COL_BANNERS_SHOWN, J_BannersShown, UJ_bannersShown); + } + + /** + * Register inline condition of bannersShown. + * + * @param key Condition key. (NotNull) + * @param value The value of bannersShown. (Nullable) + */ + protected void registerInlineBannersShown(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueBannersShown(), COL_BANNERS_SHOWN, J_BannersShown, UJ_bannersShown); + } + + abstract protected ConditionValue getCValueBannersShown(); + + /** Column db name of bannersClicked. */ + protected static final String COL_BANNERS_CLICKED = "BANNERS_CLICKED"; + + /** Column java name of bannersClicked. */ + protected static final String J_BannersClicked = "BannersClicked"; + + /** Column uncapitalised java name of bannersClicked. */ + protected static final String UJ_bannersClicked = "bannersClicked"; + + /** + * Set the value of bannersClicked using equal. { = } + * + * @param bannersClicked The value of bannersClicked as equal. + */ + public void setBannersClicked_Equal(java.math.BigDecimal bannersClicked) { + registerBannersClicked(ConditionKey.CK_EQUAL, bannersClicked); + } + + /** + * Set the value of bannersClicked using notEqual. { != } + * + * @param bannersClicked The value of bannersClicked as notEqual. + */ + public void setBannersClicked_NotEqual(java.math.BigDecimal bannersClicked) { + registerBannersClicked(ConditionKey.CK_NOT_EQUAL, bannersClicked); + } + + /** + * Set the value of bannersClicked using greaterThan. { > } + * + * @param bannersClicked The value of bannersClicked as greaterThan. + */ + public void setBannersClicked_GreaterThan(java.math.BigDecimal bannersClicked) { + registerBannersClicked(ConditionKey.CK_GREATER_THAN, bannersClicked); + } + + /** + * Set the value of bannersClicked using lessThan. { < } + * + * @param bannersClicked The value of bannersClicked as lessThan. + */ + public void setBannersClicked_LessThan(java.math.BigDecimal bannersClicked) { + registerBannersClicked(ConditionKey.CK_LESS_THAN, bannersClicked); + } + + /** + * Set the value of bannersClicked using greaterEqual. { >= } + * + * @param bannersClicked The value of bannersClicked as greaterEqual. + */ + public void setBannersClicked_GreaterEqual(java.math.BigDecimal bannersClicked) { + registerBannersClicked(ConditionKey.CK_GREATER_EQUAL, bannersClicked); + } + + /** + * Set the value of bannersClicked using lessEqual. { <= } + * + * @param bannersClicked The value of bannersClicked as lessEqual. + */ + public void setBannersClicked_LessEqual(java.math.BigDecimal bannersClicked) { + registerBannersClicked(ConditionKey.CK_LESS_EQUAL, bannersClicked); + } + + /** + * Set the value of bannersClicked using inScope. { in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param bannersClickedList The value of bannersClicked as inScope. + */ + public void setBannersClicked_InScope(java.util.List bannersClickedList) { + registerBannersClicked(ConditionKey.CK_IN_SCOPE, bannersClickedList); + } + + /** + * Set the value of bannersClicked using notInScope. { not in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param bannersClickedList The value of bannersClicked as notInScope. + */ + public void setBannersClicked_NotInScope(java.util.List bannersClickedList) { + registerBannersClicked(ConditionKey.CK_NOT_IN_SCOPE, bannersClickedList); + } + + /** + * Register condition of bannersClicked. + * + * @param key Condition key. (NotNull) + * @param value The value of bannersClicked. (Nullable) + */ + protected void registerBannersClicked(ConditionKey key, Object value) { + registerQuery(key, value, getCValueBannersClicked(), COL_BANNERS_CLICKED, J_BannersClicked, UJ_bannersClicked); + } + + /** + * Register inline condition of bannersClicked. + * + * @param key Condition key. (NotNull) + * @param value The value of bannersClicked. (Nullable) + */ + protected void registerInlineBannersClicked(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueBannersClicked(), COL_BANNERS_CLICKED, J_BannersClicked, UJ_bannersClicked); + } + + abstract protected ConditionValue getCValueBannersClicked(); + + /** Column db name of bannersHistoryDate. */ + protected static final String COL_BANNERS_HISTORY_DATE = "BANNERS_HISTORY_DATE"; + + /** Column java name of bannersHistoryDate. */ + protected static final String J_BannersHistoryDate = "BannersHistoryDate"; + + /** Column uncapitalised java name of bannersHistoryDate. */ + protected static final String UJ_bannersHistoryDate = "bannersHistoryDate"; + + /** + * Set the value of bannersHistoryDate using equal. { = } + * + * @param bannersHistoryDate The value of bannersHistoryDate as equal. + */ + public void setBannersHistoryDate_Equal(java.sql.Timestamp bannersHistoryDate) { + registerBannersHistoryDate(ConditionKey.CK_EQUAL, bannersHistoryDate); + } + + /** + * Set the value of bannersHistoryDate using notEqual. { != } + * + * @param bannersHistoryDate The value of bannersHistoryDate as notEqual. + */ + public void setBannersHistoryDate_NotEqual(java.sql.Timestamp bannersHistoryDate) { + registerBannersHistoryDate(ConditionKey.CK_NOT_EQUAL, bannersHistoryDate); + } + + /** + * Set the value of bannersHistoryDate using greaterThan. { > } + * + * @param bannersHistoryDate The value of bannersHistoryDate as greaterThan. + */ + public void setBannersHistoryDate_GreaterThan(java.sql.Timestamp bannersHistoryDate) { + registerBannersHistoryDate(ConditionKey.CK_GREATER_THAN, bannersHistoryDate); + } + + /** + * Set the value of bannersHistoryDate using lessThan. { < } + * + * @param bannersHistoryDate The value of bannersHistoryDate as lessThan. + */ + public void setBannersHistoryDate_LessThan(java.sql.Timestamp bannersHistoryDate) { + registerBannersHistoryDate(ConditionKey.CK_LESS_THAN, bannersHistoryDate); + } + + /** + * Set the value of bannersHistoryDate using greaterEqual. { >= } + * + * @param bannersHistoryDate The value of bannersHistoryDate as greaterEqual. + */ + public void setBannersHistoryDate_GreaterEqual(java.sql.Timestamp bannersHistoryDate) { + registerBannersHistoryDate(ConditionKey.CK_GREATER_EQUAL, bannersHistoryDate); + } + + /** + * Set the value of bannersHistoryDate using lessEqual. { <= } + * + * @param bannersHistoryDate The value of bannersHistoryDate as lessEqual. + */ + public void setBannersHistoryDate_LessEqual(java.sql.Timestamp bannersHistoryDate) { + registerBannersHistoryDate(ConditionKey.CK_LESS_EQUAL, bannersHistoryDate); + } + + /** + * Set the value of bannersHistoryDate using from-to. { $fromDate <= COLUMN_NAME <= $toDate } + * + * @param bannersHistoryDate The value of bannersHistoryDate as from-to. + * @param fromToOption From-To option. (NotNull) + */ + public void setBannersHistoryDate_FromTo(java.sql.Timestamp fromDate, java.sql.Timestamp toDate, jp.sf.pal.pompei.allcommon.cbean.coption.FromToOption fromToOption) { + registerFromToQuery(fromDate, toDate, getCValueBannersHistoryDate(), COL_BANNERS_HISTORY_DATE, J_BannersHistoryDate, UJ_bannersHistoryDate, fromToOption); + } + + /** + * Register condition of bannersHistoryDate. + * + * @param key Condition key. (NotNull) + * @param value The value of bannersHistoryDate. (Nullable) + */ + protected void registerBannersHistoryDate(ConditionKey key, Object value) { + registerQuery(key, value, getCValueBannersHistoryDate(), COL_BANNERS_HISTORY_DATE, J_BannersHistoryDate, UJ_bannersHistoryDate); + } + + /** + * Register inline condition of bannersHistoryDate. + * + * @param key Condition key. (NotNull) + * @param value The value of bannersHistoryDate. (Nullable) + */ + protected void registerInlineBannersHistoryDate(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueBannersHistoryDate(), COL_BANNERS_HISTORY_DATE, J_BannersHistoryDate, UJ_bannersHistoryDate); + } + + abstract protected ConditionValue getCValueBannersHistoryDate(); + + // =================================================================================== + // Basic Override + // ============== + /** + * This method overrides the method that is declared at super. + * + * @return Clause string. (NotNull) + */ + public String toString() { + return getSqlClause().getClause(); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/AbstractBsCategoriesCQ.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/AbstractBsCategoriesCQ.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/AbstractBsCategoriesCQ.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,770 @@ + +package jp.sf.pal.pompei.cbean.cq.bs; + + + +import jp.sf.pal.pompei.allcommon.cbean.*; +import jp.sf.pal.pompei.allcommon.cbean.ckey.*; +import jp.sf.pal.pompei.allcommon.cbean.cvalue.ConditionValue; +import jp.sf.pal.pompei.allcommon.cbean.sqlclause.SqlClause; +import jp.sf.pal.pompei.cbean.cq.*; + +/** + * The condition-query of CATEGORIES. + * + * @author DBFlute(AutoGenerator) + */ +public abstract class AbstractBsCategoriesCQ extends AbstractConditionQuery { + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param childQuery Child query as abstract class. (Nullable: If null, this is base instance.) + * @param sqlClause SQL clause instance. (NotNull) + * @param aliasName My alias name. (NotNull) + * @param nestLevel Nest level. + */ + public AbstractBsCategoriesCQ(ConditionQuery childQuery, SqlClause sqlClause, String aliasName, int nestLevel) { + super(childQuery, sqlClause, aliasName, nestLevel); + } + + // =================================================================================== + // Table Name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + final public String getTableDbName() { + return "CATEGORIES"; + } + + // =================================================================================== + // Query + // ===== + + // /* * * * * * * * * * * * * * * * * * * * * * * + // MyTable = [CATEGORIES] + // * * * * * * * * */ + + + /** Column db name of categoriesId. */ + protected static final String COL_CATEGORIES_ID = "CATEGORIES_ID"; + + /** Column java name of categoriesId. */ + protected static final String J_CategoriesId = "CategoriesId"; + + /** Column uncapitalised java name of categoriesId. */ + protected static final String UJ_categoriesId = "categoriesId"; + + /** + * Set the value of categoriesId using equal. { = } + * + * @param categoriesId The value of categoriesId as equal. + */ + public void setCategoriesId_Equal(java.math.BigDecimal categoriesId) { + registerCategoriesId(ConditionKey.CK_EQUAL, categoriesId); + } + + /** + * Set the value of categoriesId using notEqual. { != } + * + * @param categoriesId The value of categoriesId as notEqual. + */ + public void setCategoriesId_NotEqual(java.math.BigDecimal categoriesId) { + registerCategoriesId(ConditionKey.CK_NOT_EQUAL, categoriesId); + } + + /** + * Set the value of categoriesId using greaterThan. { > } + * + * @param categoriesId The value of categoriesId as greaterThan. + */ + public void setCategoriesId_GreaterThan(java.math.BigDecimal categoriesId) { + registerCategoriesId(ConditionKey.CK_GREATER_THAN, categoriesId); + } + + /** + * Set the value of categoriesId using lessThan. { < } + * + * @param categoriesId The value of categoriesId as lessThan. + */ + public void setCategoriesId_LessThan(java.math.BigDecimal categoriesId) { + registerCategoriesId(ConditionKey.CK_LESS_THAN, categoriesId); + } + + /** + * Set the value of categoriesId using greaterEqual. { >= } + * + * @param categoriesId The value of categoriesId as greaterEqual. + */ + public void setCategoriesId_GreaterEqual(java.math.BigDecimal categoriesId) { + registerCategoriesId(ConditionKey.CK_GREATER_EQUAL, categoriesId); + } + + /** + * Set the value of categoriesId using lessEqual. { <= } + * + * @param categoriesId The value of categoriesId as lessEqual. + */ + public void setCategoriesId_LessEqual(java.math.BigDecimal categoriesId) { + registerCategoriesId(ConditionKey.CK_LESS_EQUAL, categoriesId); + } + + /** + * Set the value of categoriesId using inScope. { in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param categoriesIdList The value of categoriesId as inScope. + */ + public void setCategoriesId_InScope(java.util.List categoriesIdList) { + registerCategoriesId(ConditionKey.CK_IN_SCOPE, categoriesIdList); + } + + /** + * Set the value of categoriesId using notInScope. { not in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param categoriesIdList The value of categoriesId as notInScope. + */ + public void setCategoriesId_NotInScope(java.util.List categoriesIdList) { + registerCategoriesId(ConditionKey.CK_NOT_IN_SCOPE, categoriesIdList); + } + + /** + * Register condition of categoriesId. + * + * @param key Condition key. (NotNull) + * @param value The value of categoriesId. (Nullable) + */ + protected void registerCategoriesId(ConditionKey key, Object value) { + registerQuery(key, value, getCValueCategoriesId(), COL_CATEGORIES_ID, J_CategoriesId, UJ_categoriesId); + } + + /** + * Register inline condition of categoriesId. + * + * @param key Condition key. (NotNull) + * @param value The value of categoriesId. (Nullable) + */ + protected void registerInlineCategoriesId(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueCategoriesId(), COL_CATEGORIES_ID, J_CategoriesId, UJ_categoriesId); + } + + abstract protected ConditionValue getCValueCategoriesId(); + + /** Column db name of categoriesImage. */ + protected static final String COL_CATEGORIES_IMAGE = "CATEGORIES_IMAGE"; + + /** Column java name of categoriesImage. */ + protected static final String J_CategoriesImage = "CategoriesImage"; + + /** Column uncapitalised java name of categoriesImage. */ + protected static final String UJ_categoriesImage = "categoriesImage"; + + /** + * Set the value of categoriesImage using equal. { = } + * If the value is null or empty-string, this condition is ignored. + * + * @param categoriesImage The value of categoriesImage as equal. + */ + public void setCategoriesImage_Equal(String categoriesImage) { + registerCategoriesImage(ConditionKey.CK_EQUAL, filterRemoveEmptyString(categoriesImage)); + } + + /** + * Set the value of categoriesImage using notEqual. { != } + * If the value is null or empty-string, this condition is ignored. + * + * @param categoriesImage The value of categoriesImage as notEqual. + */ + public void setCategoriesImage_NotEqual(String categoriesImage) { + registerCategoriesImage(ConditionKey.CK_NOT_EQUAL, filterRemoveEmptyString(categoriesImage)); + } + + /** + * Set the value of categoriesImage using greaterThan. { > } + * If the value is null or empty-string, this condition is ignored. + * + * @param categoriesImage The value of categoriesImage as greaterThan. + */ + public void setCategoriesImage_GreaterThan(String categoriesImage) { + registerCategoriesImage(ConditionKey.CK_GREATER_THAN, filterRemoveEmptyString(categoriesImage)); + } + + /** + * Set the value of categoriesImage using lessThan. { < } + * If the value is null or empty-string, this condition is ignored. + * + * @param categoriesImage The value of categoriesImage as lessThan. + */ + public void setCategoriesImage_LessThan(String categoriesImage) { + registerCategoriesImage(ConditionKey.CK_LESS_THAN, filterRemoveEmptyString(categoriesImage)); + } + + /** + * Set the value of categoriesImage using greaterEqual. { >= } + * If the value is null or empty-string, this condition is ignored. + * + * @param categoriesImage The value of categoriesImage as greaterEqual. + */ + public void setCategoriesImage_GreaterEqual(String categoriesImage) { + registerCategoriesImage(ConditionKey.CK_GREATER_EQUAL, filterRemoveEmptyString(categoriesImage)); + } + + /** + * Set the value of categoriesImage using lessEqual. { <= } + * If the value is null or empty-string, this condition is ignored. + * + * @param categoriesImage The value of categoriesImage as lessEqual. + */ + public void setCategoriesImage_LessEqual(String categoriesImage) { + registerCategoriesImage(ConditionKey.CK_LESS_EQUAL, filterRemoveEmptyString(categoriesImage)); + } + + /** + * Set the value of categoriesImage using prefixSearch. { like 'xxx%' } + * If the value is null or empty-string, this condition is ignored. + * + * @param categoriesImage The value of categoriesImage as prefixSearch. + */ + public void setCategoriesImage_PrefixSearch(String categoriesImage) { + registerCategoriesImage(ConditionKey.CK_PREFIX_SEARCH, filterRemoveEmptyString(categoriesImage)); + } + + /** + * Set the value of categoriesImage using likeSearch. { like '%xxx%' } + * If the value is null or empty-string, this condition is ignored. + * You can invoke this method several times and the conditions are set up. + * + * @param categoriesImage The value of categoriesImage as likeSearch. + * @param likeSearchOption Like search option. (NotNull) + */ + public void setCategoriesImage_LikeSearch(String categoriesImage, jp.sf.pal.pompei.allcommon.cbean.coption.LikeSearchOption likeSearchOption) { + registerLikeSearchQuery(ConditionKey.CK_LIKE_SEARCH, filterRemoveEmptyString(categoriesImage), getCValueCategoriesImage(), COL_CATEGORIES_IMAGE, J_CategoriesImage, UJ_categoriesImage, likeSearchOption); + } + + /** + * Set the value of categoriesImage using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param categoriesImageList The value of categoriesImage as inScope. + */ + public void setCategoriesImage_InScope(java.util.List categoriesImageList) { + registerCategoriesImage(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyStringFromList(categoriesImageList)); + } + + /** + * Set the value of categoriesImage using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param categoriesImage The value of categoriesImage as inScope. + */ + public void setCategoriesImage_InScope(String categoriesImage, jp.sf.pal.pompei.allcommon.cbean.coption.InScopeOption option) { + registerInScopeQuery(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyString(categoriesImage), getCValueCategoriesImage(), COL_CATEGORIES_IMAGE, J_CategoriesImage, UJ_categoriesImage, option); + } + + /** + * Set the value of categoriesImage using notInScope. { not in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param categoriesImageList The value of categoriesImage as notInScope. + */ + public void setCategoriesImage_NotInScope(java.util.List categoriesImageList) { + registerCategoriesImage(ConditionKey.CK_NOT_IN_SCOPE, filterRemoveEmptyStringFromList(categoriesImageList)); + } + + /** + * Set the value of categoriesImage using isNull. { is null } + */ + public void setCategoriesImage_IsNull() { + registerCategoriesImage(ConditionKey.CK_IS_NULL, DUMMY_OBJECT); + } + + /** + * Set the value of categoriesImage using isNotNull. { is not null } + */ + public void setCategoriesImage_IsNotNull() { + registerCategoriesImage(ConditionKey.CK_IS_NOT_NULL, DUMMY_OBJECT); + } + + /** + * Register condition of categoriesImage. + * + * @param key Condition key. (NotNull) + * @param value The value of categoriesImage. (Nullable) + */ + protected void registerCategoriesImage(ConditionKey key, Object value) { + registerQuery(key, value, getCValueCategoriesImage(), COL_CATEGORIES_IMAGE, J_CategoriesImage, UJ_categoriesImage); + } + + /** + * Register inline condition of categoriesImage. + * + * @param key Condition key. (NotNull) + * @param value The value of categoriesImage. (Nullable) + */ + protected void registerInlineCategoriesImage(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueCategoriesImage(), COL_CATEGORIES_IMAGE, J_CategoriesImage, UJ_categoriesImage); + } + + abstract protected ConditionValue getCValueCategoriesImage(); + + /** Column db name of parentId. */ + protected static final String COL_PARENT_ID = "PARENT_ID"; + + /** Column java name of parentId. */ + protected static final String J_ParentId = "ParentId"; + + /** Column uncapitalised java name of parentId. */ + protected static final String UJ_parentId = "parentId"; + + /** + * Set the value of parentId using equal. { = } + * + * @param parentId The value of parentId as equal. + */ + public void setParentId_Equal(java.math.BigDecimal parentId) { + registerParentId(ConditionKey.CK_EQUAL, parentId); + } + + /** + * Set the value of parentId using notEqual. { != } + * + * @param parentId The value of parentId as notEqual. + */ + public void setParentId_NotEqual(java.math.BigDecimal parentId) { + registerParentId(ConditionKey.CK_NOT_EQUAL, parentId); + } + + /** + * Set the value of parentId using greaterThan. { > } + * + * @param parentId The value of parentId as greaterThan. + */ + public void setParentId_GreaterThan(java.math.BigDecimal parentId) { + registerParentId(ConditionKey.CK_GREATER_THAN, parentId); + } + + /** + * Set the value of parentId using lessThan. { < } + * + * @param parentId The value of parentId as lessThan. + */ + public void setParentId_LessThan(java.math.BigDecimal parentId) { + registerParentId(ConditionKey.CK_LESS_THAN, parentId); + } + + /** + * Set the value of parentId using greaterEqual. { >= } + * + * @param parentId The value of parentId as greaterEqual. + */ + public void setParentId_GreaterEqual(java.math.BigDecimal parentId) { + registerParentId(ConditionKey.CK_GREATER_EQUAL, parentId); + } + + /** + * Set the value of parentId using lessEqual. { <= } + * + * @param parentId The value of parentId as lessEqual. + */ + public void setParentId_LessEqual(java.math.BigDecimal parentId) { + registerParentId(ConditionKey.CK_LESS_EQUAL, parentId); + } + + /** + * Set the value of parentId using inScope. { in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param parentIdList The value of parentId as inScope. + */ + public void setParentId_InScope(java.util.List parentIdList) { + registerParentId(ConditionKey.CK_IN_SCOPE, parentIdList); + } + + /** + * Set the value of parentId using notInScope. { not in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param parentIdList The value of parentId as notInScope. + */ + public void setParentId_NotInScope(java.util.List parentIdList) { + registerParentId(ConditionKey.CK_NOT_IN_SCOPE, parentIdList); + } + + /** + * Register condition of parentId. + * + * @param key Condition key. (NotNull) + * @param value The value of parentId. (Nullable) + */ + protected void registerParentId(ConditionKey key, Object value) { + registerQuery(key, value, getCValueParentId(), COL_PARENT_ID, J_ParentId, UJ_parentId); + } + + /** + * Register inline condition of parentId. + * + * @param key Condition key. (NotNull) + * @param value The value of parentId. (Nullable) + */ + protected void registerInlineParentId(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueParentId(), COL_PARENT_ID, J_ParentId, UJ_parentId); + } + + abstract protected ConditionValue getCValueParentId(); + + /** Column db name of sortOrder. */ + protected static final String COL_SORT_ORDER = "SORT_ORDER"; + + /** Column java name of sortOrder. */ + protected static final String J_SortOrder = "SortOrder"; + + /** Column uncapitalised java name of sortOrder. */ + protected static final String UJ_sortOrder = "sortOrder"; + + /** + * Set the value of sortOrder using equal. { = } + * + * @param sortOrder The value of sortOrder as equal. + */ + public void setSortOrder_Equal(java.math.BigDecimal sortOrder) { + registerSortOrder(ConditionKey.CK_EQUAL, sortOrder); + } + + /** + * Set the value of sortOrder using notEqual. { != } + * + * @param sortOrder The value of sortOrder as notEqual. + */ + public void setSortOrder_NotEqual(java.math.BigDecimal sortOrder) { + registerSortOrder(ConditionKey.CK_NOT_EQUAL, sortOrder); + } + + /** + * Set the value of sortOrder using greaterThan. { > } + * + * @param sortOrder The value of sortOrder as greaterThan. + */ + public void setSortOrder_GreaterThan(java.math.BigDecimal sortOrder) { + registerSortOrder(ConditionKey.CK_GREATER_THAN, sortOrder); + } + + /** + * Set the value of sortOrder using lessThan. { < } + * + * @param sortOrder The value of sortOrder as lessThan. + */ + public void setSortOrder_LessThan(java.math.BigDecimal sortOrder) { + registerSortOrder(ConditionKey.CK_LESS_THAN, sortOrder); + } + + /** + * Set the value of sortOrder using greaterEqual. { >= } + * + * @param sortOrder The value of sortOrder as greaterEqual. + */ + public void setSortOrder_GreaterEqual(java.math.BigDecimal sortOrder) { + registerSortOrder(ConditionKey.CK_GREATER_EQUAL, sortOrder); + } + + /** + * Set the value of sortOrder using lessEqual. { <= } + * + * @param sortOrder The value of sortOrder as lessEqual. + */ + public void setSortOrder_LessEqual(java.math.BigDecimal sortOrder) { + registerSortOrder(ConditionKey.CK_LESS_EQUAL, sortOrder); + } + + /** + * Set the value of sortOrder using inScope. { in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param sortOrderList The value of sortOrder as inScope. + */ + public void setSortOrder_InScope(java.util.List sortOrderList) { + registerSortOrder(ConditionKey.CK_IN_SCOPE, sortOrderList); + } + + /** + * Set the value of sortOrder using notInScope. { not in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param sortOrderList The value of sortOrder as notInScope. + */ + public void setSortOrder_NotInScope(java.util.List sortOrderList) { + registerSortOrder(ConditionKey.CK_NOT_IN_SCOPE, sortOrderList); + } + + /** + * Set the value of sortOrder using isNull. { is null } + */ + public void setSortOrder_IsNull() { + registerSortOrder(ConditionKey.CK_IS_NULL, DUMMY_OBJECT); + } + + /** + * Set the value of sortOrder using isNotNull. { is not null } + */ + public void setSortOrder_IsNotNull() { + registerSortOrder(ConditionKey.CK_IS_NOT_NULL, DUMMY_OBJECT); + } + + /** + * Register condition of sortOrder. + * + * @param key Condition key. (NotNull) + * @param value The value of sortOrder. (Nullable) + */ + protected void registerSortOrder(ConditionKey key, Object value) { + registerQuery(key, value, getCValueSortOrder(), COL_SORT_ORDER, J_SortOrder, UJ_sortOrder); + } + + /** + * Register inline condition of sortOrder. + * + * @param key Condition key. (NotNull) + * @param value The value of sortOrder. (Nullable) + */ + protected void registerInlineSortOrder(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueSortOrder(), COL_SORT_ORDER, J_SortOrder, UJ_sortOrder); + } + + abstract protected ConditionValue getCValueSortOrder(); + + /** Column db name of dateAdded. */ + protected static final String COL_DATE_ADDED = "DATE_ADDED"; + + /** Column java name of dateAdded. */ + protected static final String J_DateAdded = "DateAdded"; + + /** Column uncapitalised java name of dateAdded. */ + protected static final String UJ_dateAdded = "dateAdded"; + + /** + * Set the value of dateAdded using equal. { = } + * + * @param dateAdded The value of dateAdded as equal. + */ + public void setDateAdded_Equal(java.sql.Timestamp dateAdded) { + registerDateAdded(ConditionKey.CK_EQUAL, dateAdded); + } + + /** + * Set the value of dateAdded using notEqual. { != } + * + * @param dateAdded The value of dateAdded as notEqual. + */ + public void setDateAdded_NotEqual(java.sql.Timestamp dateAdded) { + registerDateAdded(ConditionKey.CK_NOT_EQUAL, dateAdded); + } + + /** + * Set the value of dateAdded using greaterThan. { > } + * + * @param dateAdded The value of dateAdded as greaterThan. + */ + public void setDateAdded_GreaterThan(java.sql.Timestamp dateAdded) { + registerDateAdded(ConditionKey.CK_GREATER_THAN, dateAdded); + } + + /** + * Set the value of dateAdded using lessThan. { < } + * + * @param dateAdded The value of dateAdded as lessThan. + */ + public void setDateAdded_LessThan(java.sql.Timestamp dateAdded) { + registerDateAdded(ConditionKey.CK_LESS_THAN, dateAdded); + } + + /** + * Set the value of dateAdded using greaterEqual. { >= } + * + * @param dateAdded The value of dateAdded as greaterEqual. + */ + public void setDateAdded_GreaterEqual(java.sql.Timestamp dateAdded) { + registerDateAdded(ConditionKey.CK_GREATER_EQUAL, dateAdded); + } + + /** + * Set the value of dateAdded using lessEqual. { <= } + * + * @param dateAdded The value of dateAdded as lessEqual. + */ + public void setDateAdded_LessEqual(java.sql.Timestamp dateAdded) { + registerDateAdded(ConditionKey.CK_LESS_EQUAL, dateAdded); + } + + /** + * Set the value of dateAdded using from-to. { $fromDate <= COLUMN_NAME <= $toDate } + * + * @param dateAdded The value of dateAdded as from-to. + * @param fromToOption From-To option. (NotNull) + */ + public void setDateAdded_FromTo(java.sql.Timestamp fromDate, java.sql.Timestamp toDate, jp.sf.pal.pompei.allcommon.cbean.coption.FromToOption fromToOption) { + registerFromToQuery(fromDate, toDate, getCValueDateAdded(), COL_DATE_ADDED, J_DateAdded, UJ_dateAdded, fromToOption); + } + + /** + * Set the value of dateAdded using isNull. { is null } + */ + public void setDateAdded_IsNull() { + registerDateAdded(ConditionKey.CK_IS_NULL, DUMMY_OBJECT); + } + + /** + * Set the value of dateAdded using isNotNull. { is not null } + */ + public void setDateAdded_IsNotNull() { + registerDateAdded(ConditionKey.CK_IS_NOT_NULL, DUMMY_OBJECT); + } + + /** + * Register condition of dateAdded. + * + * @param key Condition key. (NotNull) + * @param value The value of dateAdded. (Nullable) + */ + protected void registerDateAdded(ConditionKey key, Object value) { + registerQuery(key, value, getCValueDateAdded(), COL_DATE_ADDED, J_DateAdded, UJ_dateAdded); + } + + /** + * Register inline condition of dateAdded. + * + * @param key Condition key. (NotNull) + * @param value The value of dateAdded. (Nullable) + */ + protected void registerInlineDateAdded(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueDateAdded(), COL_DATE_ADDED, J_DateAdded, UJ_dateAdded); + } + + abstract protected ConditionValue getCValueDateAdded(); + + /** Column db name of lastModified. */ + protected static final String COL_LAST_MODIFIED = "LAST_MODIFIED"; + + /** Column java name of lastModified. */ + protected static final String J_LastModified = "LastModified"; + + /** Column uncapitalised java name of lastModified. */ + protected static final String UJ_lastModified = "lastModified"; + + /** + * Set the value of lastModified using equal. { = } + * + * @param lastModified The value of lastModified as equal. + */ + public void setLastModified_Equal(java.sql.Timestamp lastModified) { + registerLastModified(ConditionKey.CK_EQUAL, lastModified); + } + + /** + * Set the value of lastModified using notEqual. { != } + * + * @param lastModified The value of lastModified as notEqual. + */ + public void setLastModified_NotEqual(java.sql.Timestamp lastModified) { + registerLastModified(ConditionKey.CK_NOT_EQUAL, lastModified); + } + + /** + * Set the value of lastModified using greaterThan. { > } + * + * @param lastModified The value of lastModified as greaterThan. + */ + public void setLastModified_GreaterThan(java.sql.Timestamp lastModified) { + registerLastModified(ConditionKey.CK_GREATER_THAN, lastModified); + } + + /** + * Set the value of lastModified using lessThan. { < } + * + * @param lastModified The value of lastModified as lessThan. + */ + public void setLastModified_LessThan(java.sql.Timestamp lastModified) { + registerLastModified(ConditionKey.CK_LESS_THAN, lastModified); + } + + /** + * Set the value of lastModified using greaterEqual. { >= } + * + * @param lastModified The value of lastModified as greaterEqual. + */ + public void setLastModified_GreaterEqual(java.sql.Timestamp lastModified) { + registerLastModified(ConditionKey.CK_GREATER_EQUAL, lastModified); + } + + /** + * Set the value of lastModified using lessEqual. { <= } + * + * @param lastModified The value of lastModified as lessEqual. + */ + public void setLastModified_LessEqual(java.sql.Timestamp lastModified) { + registerLastModified(ConditionKey.CK_LESS_EQUAL, lastModified); + } + + /** + * Set the value of lastModified using from-to. { $fromDate <= COLUMN_NAME <= $toDate } + * + * @param lastModified The value of lastModified as from-to. + * @param fromToOption From-To option. (NotNull) + */ + public void setLastModified_FromTo(java.sql.Timestamp fromDate, java.sql.Timestamp toDate, jp.sf.pal.pompei.allcommon.cbean.coption.FromToOption fromToOption) { + registerFromToQuery(fromDate, toDate, getCValueLastModified(), COL_LAST_MODIFIED, J_LastModified, UJ_lastModified, fromToOption); + } + + /** + * Set the value of lastModified using isNull. { is null } + */ + public void setLastModified_IsNull() { + registerLastModified(ConditionKey.CK_IS_NULL, DUMMY_OBJECT); + } + + /** + * Set the value of lastModified using isNotNull. { is not null } + */ + public void setLastModified_IsNotNull() { + registerLastModified(ConditionKey.CK_IS_NOT_NULL, DUMMY_OBJECT); + } + + /** + * Register condition of lastModified. + * + * @param key Condition key. (NotNull) + * @param value The value of lastModified. (Nullable) + */ + protected void registerLastModified(ConditionKey key, Object value) { + registerQuery(key, value, getCValueLastModified(), COL_LAST_MODIFIED, J_LastModified, UJ_lastModified); + } + + /** + * Register inline condition of lastModified. + * + * @param key Condition key. (NotNull) + * @param value The value of lastModified. (Nullable) + */ + protected void registerInlineLastModified(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueLastModified(), COL_LAST_MODIFIED, J_LastModified, UJ_lastModified); + } + + abstract protected ConditionValue getCValueLastModified(); + + // =================================================================================== + // Basic Override + // ============== + /** + * This method overrides the method that is declared at super. + * + * @return Clause string. (NotNull) + */ + public String toString() { + return getSqlClause().getClause(); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/AbstractBsCategoriesDescriptionCQ.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/AbstractBsCategoriesDescriptionCQ.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/AbstractBsCategoriesDescriptionCQ.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,419 @@ + +package jp.sf.pal.pompei.cbean.cq.bs; + + + +import jp.sf.pal.pompei.allcommon.cbean.*; +import jp.sf.pal.pompei.allcommon.cbean.ckey.*; +import jp.sf.pal.pompei.allcommon.cbean.cvalue.ConditionValue; +import jp.sf.pal.pompei.allcommon.cbean.sqlclause.SqlClause; +import jp.sf.pal.pompei.cbean.cq.*; + +/** + * The condition-query of CATEGORIES_DESCRIPTION. + * + * @author DBFlute(AutoGenerator) + */ +public abstract class AbstractBsCategoriesDescriptionCQ extends AbstractConditionQuery { + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param childQuery Child query as abstract class. (Nullable: If null, this is base instance.) + * @param sqlClause SQL clause instance. (NotNull) + * @param aliasName My alias name. (NotNull) + * @param nestLevel Nest level. + */ + public AbstractBsCategoriesDescriptionCQ(ConditionQuery childQuery, SqlClause sqlClause, String aliasName, int nestLevel) { + super(childQuery, sqlClause, aliasName, nestLevel); + } + + // =================================================================================== + // Table Name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + final public String getTableDbName() { + return "CATEGORIES_DESCRIPTION"; + } + + // =================================================================================== + // Query + // ===== + + // /* * * * * * * * * * * * * * * * * * * * * * * + // MyTable = [CATEGORIES_DESCRIPTION] + // * * * * * * * * */ + + + /** Column db name of categoriesId. */ + protected static final String COL_CATEGORIES_ID = "CATEGORIES_ID"; + + /** Column java name of categoriesId. */ + protected static final String J_CategoriesId = "CategoriesId"; + + /** Column uncapitalised java name of categoriesId. */ + protected static final String UJ_categoriesId = "categoriesId"; + + /** + * Set the value of categoriesId using equal. { = } + * + * @param categoriesId The value of categoriesId as equal. + */ + public void setCategoriesId_Equal(java.math.BigDecimal categoriesId) { + registerCategoriesId(ConditionKey.CK_EQUAL, categoriesId); + } + + /** + * Set the value of categoriesId using notEqual. { != } + * + * @param categoriesId The value of categoriesId as notEqual. + */ + public void setCategoriesId_NotEqual(java.math.BigDecimal categoriesId) { + registerCategoriesId(ConditionKey.CK_NOT_EQUAL, categoriesId); + } + + /** + * Set the value of categoriesId using greaterThan. { > } + * + * @param categoriesId The value of categoriesId as greaterThan. + */ + public void setCategoriesId_GreaterThan(java.math.BigDecimal categoriesId) { + registerCategoriesId(ConditionKey.CK_GREATER_THAN, categoriesId); + } + + /** + * Set the value of categoriesId using lessThan. { < } + * + * @param categoriesId The value of categoriesId as lessThan. + */ + public void setCategoriesId_LessThan(java.math.BigDecimal categoriesId) { + registerCategoriesId(ConditionKey.CK_LESS_THAN, categoriesId); + } + + /** + * Set the value of categoriesId using greaterEqual. { >= } + * + * @param categoriesId The value of categoriesId as greaterEqual. + */ + public void setCategoriesId_GreaterEqual(java.math.BigDecimal categoriesId) { + registerCategoriesId(ConditionKey.CK_GREATER_EQUAL, categoriesId); + } + + /** + * Set the value of categoriesId using lessEqual. { <= } + * + * @param categoriesId The value of categoriesId as lessEqual. + */ + public void setCategoriesId_LessEqual(java.math.BigDecimal categoriesId) { + registerCategoriesId(ConditionKey.CK_LESS_EQUAL, categoriesId); + } + + /** + * Set the value of categoriesId using inScope. { in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param categoriesIdList The value of categoriesId as inScope. + */ + public void setCategoriesId_InScope(java.util.List categoriesIdList) { + registerCategoriesId(ConditionKey.CK_IN_SCOPE, categoriesIdList); + } + + /** + * Set the value of categoriesId using notInScope. { not in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param categoriesIdList The value of categoriesId as notInScope. + */ + public void setCategoriesId_NotInScope(java.util.List categoriesIdList) { + registerCategoriesId(ConditionKey.CK_NOT_IN_SCOPE, categoriesIdList); + } + + /** + * Register condition of categoriesId. + * + * @param key Condition key. (NotNull) + * @param value The value of categoriesId. (Nullable) + */ + protected void registerCategoriesId(ConditionKey key, Object value) { + registerQuery(key, value, getCValueCategoriesId(), COL_CATEGORIES_ID, J_CategoriesId, UJ_categoriesId); + } + + /** + * Register inline condition of categoriesId. + * + * @param key Condition key. (NotNull) + * @param value The value of categoriesId. (Nullable) + */ + protected void registerInlineCategoriesId(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueCategoriesId(), COL_CATEGORIES_ID, J_CategoriesId, UJ_categoriesId); + } + + abstract protected ConditionValue getCValueCategoriesId(); + + /** Column db name of languageId. */ + protected static final String COL_LANGUAGE_ID = "LANGUAGE_ID"; + + /** Column java name of languageId. */ + protected static final String J_LanguageId = "LanguageId"; + + /** Column uncapitalised java name of languageId. */ + protected static final String UJ_languageId = "languageId"; + + /** + * Set the value of languageId using equal. { = } + * + * @param languageId The value of languageId as equal. + */ + public void setLanguageId_Equal(java.math.BigDecimal languageId) { + registerLanguageId(ConditionKey.CK_EQUAL, languageId); + } + + /** + * Set the value of languageId using notEqual. { != } + * + * @param languageId The value of languageId as notEqual. + */ + public void setLanguageId_NotEqual(java.math.BigDecimal languageId) { + registerLanguageId(ConditionKey.CK_NOT_EQUAL, languageId); + } + + /** + * Set the value of languageId using greaterThan. { > } + * + * @param languageId The value of languageId as greaterThan. + */ + public void setLanguageId_GreaterThan(java.math.BigDecimal languageId) { + registerLanguageId(ConditionKey.CK_GREATER_THAN, languageId); + } + + /** + * Set the value of languageId using lessThan. { < } + * + * @param languageId The value of languageId as lessThan. + */ + public void setLanguageId_LessThan(java.math.BigDecimal languageId) { + registerLanguageId(ConditionKey.CK_LESS_THAN, languageId); + } + + /** + * Set the value of languageId using greaterEqual. { >= } + * + * @param languageId The value of languageId as greaterEqual. + */ + public void setLanguageId_GreaterEqual(java.math.BigDecimal languageId) { + registerLanguageId(ConditionKey.CK_GREATER_EQUAL, languageId); + } + + /** + * Set the value of languageId using lessEqual. { <= } + * + * @param languageId The value of languageId as lessEqual. + */ + public void setLanguageId_LessEqual(java.math.BigDecimal languageId) { + registerLanguageId(ConditionKey.CK_LESS_EQUAL, languageId); + } + + /** + * Set the value of languageId using inScope. { in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param languageIdList The value of languageId as inScope. + */ + public void setLanguageId_InScope(java.util.List languageIdList) { + registerLanguageId(ConditionKey.CK_IN_SCOPE, languageIdList); + } + + /** + * Set the value of languageId using notInScope. { not in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param languageIdList The value of languageId as notInScope. + */ + public void setLanguageId_NotInScope(java.util.List languageIdList) { + registerLanguageId(ConditionKey.CK_NOT_IN_SCOPE, languageIdList); + } + + /** + * Register condition of languageId. + * + * @param key Condition key. (NotNull) + * @param value The value of languageId. (Nullable) + */ + protected void registerLanguageId(ConditionKey key, Object value) { + registerQuery(key, value, getCValueLanguageId(), COL_LANGUAGE_ID, J_LanguageId, UJ_languageId); + } + + /** + * Register inline condition of languageId. + * + * @param key Condition key. (NotNull) + * @param value The value of languageId. (Nullable) + */ + protected void registerInlineLanguageId(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueLanguageId(), COL_LANGUAGE_ID, J_LanguageId, UJ_languageId); + } + + abstract protected ConditionValue getCValueLanguageId(); + + /** Column db name of categoriesName. */ + protected static final String COL_CATEGORIES_NAME = "CATEGORIES_NAME"; + + /** Column java name of categoriesName. */ + protected static final String J_CategoriesName = "CategoriesName"; + + /** Column uncapitalised java name of categoriesName. */ + protected static final String UJ_categoriesName = "categoriesName"; + + /** + * Set the value of categoriesName using equal. { = } + * If the value is null or empty-string, this condition is ignored. + * + * @param categoriesName The value of categoriesName as equal. + */ + public void setCategoriesName_Equal(String categoriesName) { + registerCategoriesName(ConditionKey.CK_EQUAL, filterRemoveEmptyString(categoriesName)); + } + + /** + * Set the value of categoriesName using notEqual. { != } + * If the value is null or empty-string, this condition is ignored. + * + * @param categoriesName The value of categoriesName as notEqual. + */ + public void setCategoriesName_NotEqual(String categoriesName) { + registerCategoriesName(ConditionKey.CK_NOT_EQUAL, filterRemoveEmptyString(categoriesName)); + } + + /** + * Set the value of categoriesName using greaterThan. { > } + * If the value is null or empty-string, this condition is ignored. + * + * @param categoriesName The value of categoriesName as greaterThan. + */ + public void setCategoriesName_GreaterThan(String categoriesName) { + registerCategoriesName(ConditionKey.CK_GREATER_THAN, filterRemoveEmptyString(categoriesName)); + } + + /** + * Set the value of categoriesName using lessThan. { < } + * If the value is null or empty-string, this condition is ignored. + * + * @param categoriesName The value of categoriesName as lessThan. + */ + public void setCategoriesName_LessThan(String categoriesName) { + registerCategoriesName(ConditionKey.CK_LESS_THAN, filterRemoveEmptyString(categoriesName)); + } + + /** + * Set the value of categoriesName using greaterEqual. { >= } + * If the value is null or empty-string, this condition is ignored. + * + * @param categoriesName The value of categoriesName as greaterEqual. + */ + public void setCategoriesName_GreaterEqual(String categoriesName) { + registerCategoriesName(ConditionKey.CK_GREATER_EQUAL, filterRemoveEmptyString(categoriesName)); + } + + /** + * Set the value of categoriesName using lessEqual. { <= } + * If the value is null or empty-string, this condition is ignored. + * + * @param categoriesName The value of categoriesName as lessEqual. + */ + public void setCategoriesName_LessEqual(String categoriesName) { + registerCategoriesName(ConditionKey.CK_LESS_EQUAL, filterRemoveEmptyString(categoriesName)); + } + + /** + * Set the value of categoriesName using prefixSearch. { like 'xxx%' } + * If the value is null or empty-string, this condition is ignored. + * + * @param categoriesName The value of categoriesName as prefixSearch. + */ + public void setCategoriesName_PrefixSearch(String categoriesName) { + registerCategoriesName(ConditionKey.CK_PREFIX_SEARCH, filterRemoveEmptyString(categoriesName)); + } + + /** + * Set the value of categoriesName using likeSearch. { like '%xxx%' } + * If the value is null or empty-string, this condition is ignored. + * You can invoke this method several times and the conditions are set up. + * + * @param categoriesName The value of categoriesName as likeSearch. + * @param likeSearchOption Like search option. (NotNull) + */ + public void setCategoriesName_LikeSearch(String categoriesName, jp.sf.pal.pompei.allcommon.cbean.coption.LikeSearchOption likeSearchOption) { + registerLikeSearchQuery(ConditionKey.CK_LIKE_SEARCH, filterRemoveEmptyString(categoriesName), getCValueCategoriesName(), COL_CATEGORIES_NAME, J_CategoriesName, UJ_categoriesName, likeSearchOption); + } + + /** + * Set the value of categoriesName using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param categoriesNameList The value of categoriesName as inScope. + */ + public void setCategoriesName_InScope(java.util.List categoriesNameList) { + registerCategoriesName(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyStringFromList(categoriesNameList)); + } + + /** + * Set the value of categoriesName using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param categoriesName The value of categoriesName as inScope. + */ + public void setCategoriesName_InScope(String categoriesName, jp.sf.pal.pompei.allcommon.cbean.coption.InScopeOption option) { + registerInScopeQuery(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyString(categoriesName), getCValueCategoriesName(), COL_CATEGORIES_NAME, J_CategoriesName, UJ_categoriesName, option); + } + + /** + * Set the value of categoriesName using notInScope. { not in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param categoriesNameList The value of categoriesName as notInScope. + */ + public void setCategoriesName_NotInScope(java.util.List categoriesNameList) { + registerCategoriesName(ConditionKey.CK_NOT_IN_SCOPE, filterRemoveEmptyStringFromList(categoriesNameList)); + } + + /** + * Register condition of categoriesName. + * + * @param key Condition key. (NotNull) + * @param value The value of categoriesName. (Nullable) + */ + protected void registerCategoriesName(ConditionKey key, Object value) { + registerQuery(key, value, getCValueCategoriesName(), COL_CATEGORIES_NAME, J_CategoriesName, UJ_categoriesName); + } + + /** + * Register inline condition of categoriesName. + * + * @param key Condition key. (NotNull) + * @param value The value of categoriesName. (Nullable) + */ + protected void registerInlineCategoriesName(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueCategoriesName(), COL_CATEGORIES_NAME, J_CategoriesName, UJ_categoriesName); + } + + abstract protected ConditionValue getCValueCategoriesName(); + + // =================================================================================== + // Basic Override + // ============== + /** + * This method overrides the method that is declared at super. + * + * @return Clause string. (NotNull) + */ + public String toString() { + return getSqlClause().getClause(); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/AbstractBsConfigurationCQ.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/AbstractBsConfigurationCQ.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/AbstractBsConfigurationCQ.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,1485 @@ + +package jp.sf.pal.pompei.cbean.cq.bs; + + + +import jp.sf.pal.pompei.allcommon.cbean.*; +import jp.sf.pal.pompei.allcommon.cbean.ckey.*; +import jp.sf.pal.pompei.allcommon.cbean.cvalue.ConditionValue; +import jp.sf.pal.pompei.allcommon.cbean.sqlclause.SqlClause; +import jp.sf.pal.pompei.cbean.cq.*; + +/** + * The condition-query of CONFIGURATION. + * + * @author DBFlute(AutoGenerator) + */ +public abstract class AbstractBsConfigurationCQ extends AbstractConditionQuery { + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param childQuery Child query as abstract class. (Nullable: If null, this is base instance.) + * @param sqlClause SQL clause instance. (NotNull) + * @param aliasName My alias name. (NotNull) + * @param nestLevel Nest level. + */ + public AbstractBsConfigurationCQ(ConditionQuery childQuery, SqlClause sqlClause, String aliasName, int nestLevel) { + super(childQuery, sqlClause, aliasName, nestLevel); + } + + // =================================================================================== + // Table Name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + final public String getTableDbName() { + return "CONFIGURATION"; + } + + // =================================================================================== + // Query + // ===== + + // /* * * * * * * * * * * * * * * * * * * * * * * + // MyTable = [CONFIGURATION] + // * * * * * * * * */ + + + /** Column db name of configurationId. */ + protected static final String COL_CONFIGURATION_ID = "CONFIGURATION_ID"; + + /** Column java name of configurationId. */ + protected static final String J_ConfigurationId = "ConfigurationId"; + + /** Column uncapitalised java name of configurationId. */ + protected static final String UJ_configurationId = "configurationId"; + + /** + * Set the value of configurationId using equal. { = } + * + * @param configurationId The value of configurationId as equal. + */ + public void setConfigurationId_Equal(java.math.BigDecimal configurationId) { + registerConfigurationId(ConditionKey.CK_EQUAL, configurationId); + } + + /** + * Set the value of configurationId using notEqual. { != } + * + * @param configurationId The value of configurationId as notEqual. + */ + public void setConfigurationId_NotEqual(java.math.BigDecimal configurationId) { + registerConfigurationId(ConditionKey.CK_NOT_EQUAL, configurationId); + } + + /** + * Set the value of configurationId using greaterThan. { > } + * + * @param configurationId The value of configurationId as greaterThan. + */ + public void setConfigurationId_GreaterThan(java.math.BigDecimal configurationId) { + registerConfigurationId(ConditionKey.CK_GREATER_THAN, configurationId); + } + + /** + * Set the value of configurationId using lessThan. { < } + * + * @param configurationId The value of configurationId as lessThan. + */ + public void setConfigurationId_LessThan(java.math.BigDecimal configurationId) { + registerConfigurationId(ConditionKey.CK_LESS_THAN, configurationId); + } + + /** + * Set the value of configurationId using greaterEqual. { >= } + * + * @param configurationId The value of configurationId as greaterEqual. + */ + public void setConfigurationId_GreaterEqual(java.math.BigDecimal configurationId) { + registerConfigurationId(ConditionKey.CK_GREATER_EQUAL, configurationId); + } + + /** + * Set the value of configurationId using lessEqual. { <= } + * + * @param configurationId The value of configurationId as lessEqual. + */ + public void setConfigurationId_LessEqual(java.math.BigDecimal configurationId) { + registerConfigurationId(ConditionKey.CK_LESS_EQUAL, configurationId); + } + + /** + * Set the value of configurationId using inScope. { in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param configurationIdList The value of configurationId as inScope. + */ + public void setConfigurationId_InScope(java.util.List configurationIdList) { + registerConfigurationId(ConditionKey.CK_IN_SCOPE, configurationIdList); + } + + /** + * Set the value of configurationId using notInScope. { not in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param configurationIdList The value of configurationId as notInScope. + */ + public void setConfigurationId_NotInScope(java.util.List configurationIdList) { + registerConfigurationId(ConditionKey.CK_NOT_IN_SCOPE, configurationIdList); + } + + /** + * Register condition of configurationId. + * + * @param key Condition key. (NotNull) + * @param value The value of configurationId. (Nullable) + */ + protected void registerConfigurationId(ConditionKey key, Object value) { + registerQuery(key, value, getCValueConfigurationId(), COL_CONFIGURATION_ID, J_ConfigurationId, UJ_configurationId); + } + + /** + * Register inline condition of configurationId. + * + * @param key Condition key. (NotNull) + * @param value The value of configurationId. (Nullable) + */ + protected void registerInlineConfigurationId(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueConfigurationId(), COL_CONFIGURATION_ID, J_ConfigurationId, UJ_configurationId); + } + + abstract protected ConditionValue getCValueConfigurationId(); + + /** Column db name of configurationTitle. */ + protected static final String COL_CONFIGURATION_TITLE = "CONFIGURATION_TITLE"; + + /** Column java name of configurationTitle. */ + protected static final String J_ConfigurationTitle = "ConfigurationTitle"; + + /** Column uncapitalised java name of configurationTitle. */ + protected static final String UJ_configurationTitle = "configurationTitle"; + + /** + * Set the value of configurationTitle using equal. { = } + * If the value is null or empty-string, this condition is ignored. + * + * @param configurationTitle The value of configurationTitle as equal. + */ + public void setConfigurationTitle_Equal(String configurationTitle) { + registerConfigurationTitle(ConditionKey.CK_EQUAL, filterRemoveEmptyString(configurationTitle)); + } + + /** + * Set the value of configurationTitle using notEqual. { != } + * If the value is null or empty-string, this condition is ignored. + * + * @param configurationTitle The value of configurationTitle as notEqual. + */ + public void setConfigurationTitle_NotEqual(String configurationTitle) { + registerConfigurationTitle(ConditionKey.CK_NOT_EQUAL, filterRemoveEmptyString(configurationTitle)); + } + + /** + * Set the value of configurationTitle using greaterThan. { > } + * If the value is null or empty-string, this condition is ignored. + * + * @param configurationTitle The value of configurationTitle as greaterThan. + */ + public void setConfigurationTitle_GreaterThan(String configurationTitle) { + registerConfigurationTitle(ConditionKey.CK_GREATER_THAN, filterRemoveEmptyString(configurationTitle)); + } + + /** + * Set the value of configurationTitle using lessThan. { < } + * If the value is null or empty-string, this condition is ignored. + * + * @param configurationTitle The value of configurationTitle as lessThan. + */ + public void setConfigurationTitle_LessThan(String configurationTitle) { + registerConfigurationTitle(ConditionKey.CK_LESS_THAN, filterRemoveEmptyString(configurationTitle)); + } + + /** + * Set the value of configurationTitle using greaterEqual. { >= } + * If the value is null or empty-string, this condition is ignored. + * + * @param configurationTitle The value of configurationTitle as greaterEqual. + */ + public void setConfigurationTitle_GreaterEqual(String configurationTitle) { + registerConfigurationTitle(ConditionKey.CK_GREATER_EQUAL, filterRemoveEmptyString(configurationTitle)); + } + + /** + * Set the value of configurationTitle using lessEqual. { <= } + * If the value is null or empty-string, this condition is ignored. + * + * @param configurationTitle The value of configurationTitle as lessEqual. + */ + public void setConfigurationTitle_LessEqual(String configurationTitle) { + registerConfigurationTitle(ConditionKey.CK_LESS_EQUAL, filterRemoveEmptyString(configurationTitle)); + } + + /** + * Set the value of configurationTitle using prefixSearch. { like 'xxx%' } + * If the value is null or empty-string, this condition is ignored. + * + * @param configurationTitle The value of configurationTitle as prefixSearch. + */ + public void setConfigurationTitle_PrefixSearch(String configurationTitle) { + registerConfigurationTitle(ConditionKey.CK_PREFIX_SEARCH, filterRemoveEmptyString(configurationTitle)); + } + + /** + * Set the value of configurationTitle using likeSearch. { like '%xxx%' } + * If the value is null or empty-string, this condition is ignored. + * You can invoke this method several times and the conditions are set up. + * + * @param configurationTitle The value of configurationTitle as likeSearch. + * @param likeSearchOption Like search option. (NotNull) + */ + public void setConfigurationTitle_LikeSearch(String configurationTitle, jp.sf.pal.pompei.allcommon.cbean.coption.LikeSearchOption likeSearchOption) { + registerLikeSearchQuery(ConditionKey.CK_LIKE_SEARCH, filterRemoveEmptyString(configurationTitle), getCValueConfigurationTitle(), COL_CONFIGURATION_TITLE, J_ConfigurationTitle, UJ_configurationTitle, likeSearchOption); + } + + /** + * Set the value of configurationTitle using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param configurationTitleList The value of configurationTitle as inScope. + */ + public void setConfigurationTitle_InScope(java.util.List configurationTitleList) { + registerConfigurationTitle(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyStringFromList(configurationTitleList)); + } + + /** + * Set the value of configurationTitle using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param configurationTitle The value of configurationTitle as inScope. + */ + public void setConfigurationTitle_InScope(String configurationTitle, jp.sf.pal.pompei.allcommon.cbean.coption.InScopeOption option) { + registerInScopeQuery(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyString(configurationTitle), getCValueConfigurationTitle(), COL_CONFIGURATION_TITLE, J_ConfigurationTitle, UJ_configurationTitle, option); + } + + /** + * Set the value of configurationTitle using notInScope. { not in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param configurationTitleList The value of configurationTitle as notInScope. + */ + public void setConfigurationTitle_NotInScope(java.util.List configurationTitleList) { + registerConfigurationTitle(ConditionKey.CK_NOT_IN_SCOPE, filterRemoveEmptyStringFromList(configurationTitleList)); + } + + /** + * Register condition of configurationTitle. + * + * @param key Condition key. (NotNull) + * @param value The value of configurationTitle. (Nullable) + */ + protected void registerConfigurationTitle(ConditionKey key, Object value) { + registerQuery(key, value, getCValueConfigurationTitle(), COL_CONFIGURATION_TITLE, J_ConfigurationTitle, UJ_configurationTitle); + } + + /** + * Register inline condition of configurationTitle. + * + * @param key Condition key. (NotNull) + * @param value The value of configurationTitle. (Nullable) + */ + protected void registerInlineConfigurationTitle(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueConfigurationTitle(), COL_CONFIGURATION_TITLE, J_ConfigurationTitle, UJ_configurationTitle); + } + + abstract protected ConditionValue getCValueConfigurationTitle(); + + /** Column db name of configurationKey. */ + protected static final String COL_CONFIGURATION_KEY = "CONFIGURATION_KEY"; + + /** Column java name of configurationKey. */ + protected static final String J_ConfigurationKey = "ConfigurationKey"; + + /** Column uncapitalised java name of configurationKey. */ + protected static final String UJ_configurationKey = "configurationKey"; + + /** + * Set the value of configurationKey using equal. { = } + * If the value is null or empty-string, this condition is ignored. + * + * @param configurationKey The value of configurationKey as equal. + */ + public void setConfigurationKey_Equal(String configurationKey) { + registerConfigurationKey(ConditionKey.CK_EQUAL, filterRemoveEmptyString(configurationKey)); + } + + /** + * Set the value of configurationKey using notEqual. { != } + * If the value is null or empty-string, this condition is ignored. + * + * @param configurationKey The value of configurationKey as notEqual. + */ + public void setConfigurationKey_NotEqual(String configurationKey) { + registerConfigurationKey(ConditionKey.CK_NOT_EQUAL, filterRemoveEmptyString(configurationKey)); + } + + /** + * Set the value of configurationKey using greaterThan. { > } + * If the value is null or empty-string, this condition is ignored. + * + * @param configurationKey The value of configurationKey as greaterThan. + */ + public void setConfigurationKey_GreaterThan(String configurationKey) { + registerConfigurationKey(ConditionKey.CK_GREATER_THAN, filterRemoveEmptyString(configurationKey)); + } + + /** + * Set the value of configurationKey using lessThan. { < } + * If the value is null or empty-string, this condition is ignored. + * + * @param configurationKey The value of configurationKey as lessThan. + */ + public void setConfigurationKey_LessThan(String configurationKey) { + registerConfigurationKey(ConditionKey.CK_LESS_THAN, filterRemoveEmptyString(configurationKey)); + } + + /** + * Set the value of configurationKey using greaterEqual. { >= } + * If the value is null or empty-string, this condition is ignored. + * + * @param configurationKey The value of configurationKey as greaterEqual. + */ + public void setConfigurationKey_GreaterEqual(String configurationKey) { + registerConfigurationKey(ConditionKey.CK_GREATER_EQUAL, filterRemoveEmptyString(configurationKey)); + } + + /** + * Set the value of configurationKey using lessEqual. { <= } + * If the value is null or empty-string, this condition is ignored. + * + * @param configurationKey The value of configurationKey as lessEqual. + */ + public void setConfigurationKey_LessEqual(String configurationKey) { + registerConfigurationKey(ConditionKey.CK_LESS_EQUAL, filterRemoveEmptyString(configurationKey)); + } + + /** + * Set the value of configurationKey using prefixSearch. { like 'xxx%' } + * If the value is null or empty-string, this condition is ignored. + * + * @param configurationKey The value of configurationKey as prefixSearch. + */ + public void setConfigurationKey_PrefixSearch(String configurationKey) { + registerConfigurationKey(ConditionKey.CK_PREFIX_SEARCH, filterRemoveEmptyString(configurationKey)); + } + + /** + * Set the value of configurationKey using likeSearch. { like '%xxx%' } + * If the value is null or empty-string, this condition is ignored. + * You can invoke this method several times and the conditions are set up. + * + * @param configurationKey The value of configurationKey as likeSearch. + * @param likeSearchOption Like search option. (NotNull) + */ + public void setConfigurationKey_LikeSearch(String configurationKey, jp.sf.pal.pompei.allcommon.cbean.coption.LikeSearchOption likeSearchOption) { + registerLikeSearchQuery(ConditionKey.CK_LIKE_SEARCH, filterRemoveEmptyString(configurationKey), getCValueConfigurationKey(), COL_CONFIGURATION_KEY, J_ConfigurationKey, UJ_configurationKey, likeSearchOption); + } + + /** + * Set the value of configurationKey using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param configurationKeyList The value of configurationKey as inScope. + */ + public void setConfigurationKey_InScope(java.util.List configurationKeyList) { + registerConfigurationKey(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyStringFromList(configurationKeyList)); + } + + /** + * Set the value of configurationKey using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param configurationKey The value of configurationKey as inScope. + */ + public void setConfigurationKey_InScope(String configurationKey, jp.sf.pal.pompei.allcommon.cbean.coption.InScopeOption option) { + registerInScopeQuery(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyString(configurationKey), getCValueConfigurationKey(), COL_CONFIGURATION_KEY, J_ConfigurationKey, UJ_configurationKey, option); + } + + /** + * Set the value of configurationKey using notInScope. { not in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param configurationKeyList The value of configurationKey as notInScope. + */ + public void setConfigurationKey_NotInScope(java.util.List configurationKeyList) { + registerConfigurationKey(ConditionKey.CK_NOT_IN_SCOPE, filterRemoveEmptyStringFromList(configurationKeyList)); + } + + /** + * Register condition of configurationKey. + * + * @param key Condition key. (NotNull) + * @param value The value of configurationKey. (Nullable) + */ + protected void registerConfigurationKey(ConditionKey key, Object value) { + registerQuery(key, value, getCValueConfigurationKey(), COL_CONFIGURATION_KEY, J_ConfigurationKey, UJ_configurationKey); + } + + /** + * Register inline condition of configurationKey. + * + * @param key Condition key. (NotNull) + * @param value The value of configurationKey. (Nullable) + */ + protected void registerInlineConfigurationKey(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueConfigurationKey(), COL_CONFIGURATION_KEY, J_ConfigurationKey, UJ_configurationKey); + } + + abstract protected ConditionValue getCValueConfigurationKey(); + + /** Column db name of configurationValue. */ + protected static final String COL_CONFIGURATION_VALUE = "CONFIGURATION_VALUE"; + + /** Column java name of configurationValue. */ + protected static final String J_ConfigurationValue = "ConfigurationValue"; + + /** Column uncapitalised java name of configurationValue. */ + protected static final String UJ_configurationValue = "configurationValue"; + + /** + * Set the value of configurationValue using equal. { = } + * If the value is null or empty-string, this condition is ignored. + * + * @param configurationValue The value of configurationValue as equal. + */ + public void setConfigurationValue_Equal(String configurationValue) { + registerConfigurationValue(ConditionKey.CK_EQUAL, filterRemoveEmptyString(configurationValue)); + } + + /** + * Set the value of configurationValue using notEqual. { != } + * If the value is null or empty-string, this condition is ignored. + * + * @param configurationValue The value of configurationValue as notEqual. + */ + public void setConfigurationValue_NotEqual(String configurationValue) { + registerConfigurationValue(ConditionKey.CK_NOT_EQUAL, filterRemoveEmptyString(configurationValue)); + } + + /** + * Set the value of configurationValue using greaterThan. { > } + * If the value is null or empty-string, this condition is ignored. + * + * @param configurationValue The value of configurationValue as greaterThan. + */ + public void setConfigurationValue_GreaterThan(String configurationValue) { + registerConfigurationValue(ConditionKey.CK_GREATER_THAN, filterRemoveEmptyString(configurationValue)); + } + + /** + * Set the value of configurationValue using lessThan. { < } + * If the value is null or empty-string, this condition is ignored. + * + * @param configurationValue The value of configurationValue as lessThan. + */ + public void setConfigurationValue_LessThan(String configurationValue) { + registerConfigurationValue(ConditionKey.CK_LESS_THAN, filterRemoveEmptyString(configurationValue)); + } + + /** + * Set the value of configurationValue using greaterEqual. { >= } + * If the value is null or empty-string, this condition is ignored. + * + * @param configurationValue The value of configurationValue as greaterEqual. + */ + public void setConfigurationValue_GreaterEqual(String configurationValue) { + registerConfigurationValue(ConditionKey.CK_GREATER_EQUAL, filterRemoveEmptyString(configurationValue)); + } + + /** + * Set the value of configurationValue using lessEqual. { <= } + * If the value is null or empty-string, this condition is ignored. + * + * @param configurationValue The value of configurationValue as lessEqual. + */ + public void setConfigurationValue_LessEqual(String configurationValue) { + registerConfigurationValue(ConditionKey.CK_LESS_EQUAL, filterRemoveEmptyString(configurationValue)); + } + + /** + * Set the value of configurationValue using prefixSearch. { like 'xxx%' } + * If the value is null or empty-string, this condition is ignored. + * + * @param configurationValue The value of configurationValue as prefixSearch. + */ + public void setConfigurationValue_PrefixSearch(String configurationValue) { + registerConfigurationValue(ConditionKey.CK_PREFIX_SEARCH, filterRemoveEmptyString(configurationValue)); + } + + /** + * Set the value of configurationValue using likeSearch. { like '%xxx%' } + * If the value is null or empty-string, this condition is ignored. + * You can invoke this method several times and the conditions are set up. + * + * @param configurationValue The value of configurationValue as likeSearch. + * @param likeSearchOption Like search option. (NotNull) + */ + public void setConfigurationValue_LikeSearch(String configurationValue, jp.sf.pal.pompei.allcommon.cbean.coption.LikeSearchOption likeSearchOption) { + registerLikeSearchQuery(ConditionKey.CK_LIKE_SEARCH, filterRemoveEmptyString(configurationValue), getCValueConfigurationValue(), COL_CONFIGURATION_VALUE, J_ConfigurationValue, UJ_configurationValue, likeSearchOption); + } + + /** + * Set the value of configurationValue using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param configurationValueList The value of configurationValue as inScope. + */ + public void setConfigurationValue_InScope(java.util.List configurationValueList) { + registerConfigurationValue(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyStringFromList(configurationValueList)); + } + + /** + * Set the value of configurationValue using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param configurationValue The value of configurationValue as inScope. + */ + public void setConfigurationValue_InScope(String configurationValue, jp.sf.pal.pompei.allcommon.cbean.coption.InScopeOption option) { + registerInScopeQuery(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyString(configurationValue), getCValueConfigurationValue(), COL_CONFIGURATION_VALUE, J_ConfigurationValue, UJ_configurationValue, option); + } + + /** + * Set the value of configurationValue using notInScope. { not in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param configurationValueList The value of configurationValue as notInScope. + */ + public void setConfigurationValue_NotInScope(java.util.List configurationValueList) { + registerConfigurationValue(ConditionKey.CK_NOT_IN_SCOPE, filterRemoveEmptyStringFromList(configurationValueList)); + } + + /** + * Register condition of configurationValue. + * + * @param key Condition key. (NotNull) + * @param value The value of configurationValue. (Nullable) + */ + protected void registerConfigurationValue(ConditionKey key, Object value) { + registerQuery(key, value, getCValueConfigurationValue(), COL_CONFIGURATION_VALUE, J_ConfigurationValue, UJ_configurationValue); + } + + /** + * Register inline condition of configurationValue. + * + * @param key Condition key. (NotNull) + * @param value The value of configurationValue. (Nullable) + */ + protected void registerInlineConfigurationValue(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueConfigurationValue(), COL_CONFIGURATION_VALUE, J_ConfigurationValue, UJ_configurationValue); + } + + abstract protected ConditionValue getCValueConfigurationValue(); + + /** Column db name of configurationDescription. */ + protected static final String COL_CONFIGURATION_DESCRIPTION = "CONFIGURATION_DESCRIPTION"; + + /** Column java name of configurationDescription. */ + protected static final String J_ConfigurationDescription = "ConfigurationDescription"; + + /** Column uncapitalised java name of configurationDescription. */ + protected static final String UJ_configurationDescription = "configurationDescription"; + + /** + * Set the value of configurationDescription using equal. { = } + * If the value is null or empty-string, this condition is ignored. + * + * @param configurationDescription The value of configurationDescription as equal. + */ + public void setConfigurationDescription_Equal(String configurationDescription) { + registerConfigurationDescription(ConditionKey.CK_EQUAL, filterRemoveEmptyString(configurationDescription)); + } + + /** + * Set the value of configurationDescription using notEqual. { != } + * If the value is null or empty-string, this condition is ignored. + * + * @param configurationDescription The value of configurationDescription as notEqual. + */ + public void setConfigurationDescription_NotEqual(String configurationDescription) { + registerConfigurationDescription(ConditionKey.CK_NOT_EQUAL, filterRemoveEmptyString(configurationDescription)); + } + + /** + * Set the value of configurationDescription using greaterThan. { > } + * If the value is null or empty-string, this condition is ignored. + * + * @param configurationDescription The value of configurationDescription as greaterThan. + */ + public void setConfigurationDescription_GreaterThan(String configurationDescription) { + registerConfigurationDescription(ConditionKey.CK_GREATER_THAN, filterRemoveEmptyString(configurationDescription)); + } + + /** + * Set the value of configurationDescription using lessThan. { < } + * If the value is null or empty-string, this condition is ignored. + * + * @param configurationDescription The value of configurationDescription as lessThan. + */ + public void setConfigurationDescription_LessThan(String configurationDescription) { + registerConfigurationDescription(ConditionKey.CK_LESS_THAN, filterRemoveEmptyString(configurationDescription)); + } + + /** + * Set the value of configurationDescription using greaterEqual. { >= } + * If the value is null or empty-string, this condition is ignored. + * + * @param configurationDescription The value of configurationDescription as greaterEqual. + */ + public void setConfigurationDescription_GreaterEqual(String configurationDescription) { + registerConfigurationDescription(ConditionKey.CK_GREATER_EQUAL, filterRemoveEmptyString(configurationDescription)); + } + + /** + * Set the value of configurationDescription using lessEqual. { <= } + * If the value is null or empty-string, this condition is ignored. + * + * @param configurationDescription The value of configurationDescription as lessEqual. + */ + public void setConfigurationDescription_LessEqual(String configurationDescription) { + registerConfigurationDescription(ConditionKey.CK_LESS_EQUAL, filterRemoveEmptyString(configurationDescription)); + } + + /** + * Set the value of configurationDescription using prefixSearch. { like 'xxx%' } + * If the value is null or empty-string, this condition is ignored. + * + * @param configurationDescription The value of configurationDescription as prefixSearch. + */ + public void setConfigurationDescription_PrefixSearch(String configurationDescription) { + registerConfigurationDescription(ConditionKey.CK_PREFIX_SEARCH, filterRemoveEmptyString(configurationDescription)); + } + + /** + * Set the value of configurationDescription using likeSearch. { like '%xxx%' } + * If the value is null or empty-string, this condition is ignored. + * You can invoke this method several times and the conditions are set up. + * + * @param configurationDescription The value of configurationDescription as likeSearch. + * @param likeSearchOption Like search option. (NotNull) + */ + public void setConfigurationDescription_LikeSearch(String configurationDescription, jp.sf.pal.pompei.allcommon.cbean.coption.LikeSearchOption likeSearchOption) { + registerLikeSearchQuery(ConditionKey.CK_LIKE_SEARCH, filterRemoveEmptyString(configurationDescription), getCValueConfigurationDescription(), COL_CONFIGURATION_DESCRIPTION, J_ConfigurationDescription, UJ_configurationDescription, likeSearchOption); + } + + /** + * Set the value of configurationDescription using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param configurationDescriptionList The value of configurationDescription as inScope. + */ + public void setConfigurationDescription_InScope(java.util.List configurationDescriptionList) { + registerConfigurationDescription(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyStringFromList(configurationDescriptionList)); + } + + /** + * Set the value of configurationDescription using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param configurationDescription The value of configurationDescription as inScope. + */ + public void setConfigurationDescription_InScope(String configurationDescription, jp.sf.pal.pompei.allcommon.cbean.coption.InScopeOption option) { + registerInScopeQuery(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyString(configurationDescription), getCValueConfigurationDescription(), COL_CONFIGURATION_DESCRIPTION, J_ConfigurationDescription, UJ_configurationDescription, option); + } + + /** + * Set the value of configurationDescription using notInScope. { not in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param configurationDescriptionList The value of configurationDescription as notInScope. + */ + public void setConfigurationDescription_NotInScope(java.util.List configurationDescriptionList) { + registerConfigurationDescription(ConditionKey.CK_NOT_IN_SCOPE, filterRemoveEmptyStringFromList(configurationDescriptionList)); + } + + /** + * Register condition of configurationDescription. + * + * @param key Condition key. (NotNull) + * @param value The value of configurationDescription. (Nullable) + */ + protected void registerConfigurationDescription(ConditionKey key, Object value) { + registerQuery(key, value, getCValueConfigurationDescription(), COL_CONFIGURATION_DESCRIPTION, J_ConfigurationDescription, UJ_configurationDescription); + } + + /** + * Register inline condition of configurationDescription. + * + * @param key Condition key. (NotNull) + * @param value The value of configurationDescription. (Nullable) + */ + protected void registerInlineConfigurationDescription(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueConfigurationDescription(), COL_CONFIGURATION_DESCRIPTION, J_ConfigurationDescription, UJ_configurationDescription); + } + + abstract protected ConditionValue getCValueConfigurationDescription(); + + /** Column db name of configurationGroupId. */ + protected static final String COL_CONFIGURATION_GROUP_ID = "CONFIGURATION_GROUP_ID"; + + /** Column java name of configurationGroupId. */ + protected static final String J_ConfigurationGroupId = "ConfigurationGroupId"; + + /** Column uncapitalised java name of configurationGroupId. */ + protected static final String UJ_configurationGroupId = "configurationGroupId"; + + /** + * Set the value of configurationGroupId using equal. { = } + * + * @param configurationGroupId The value of configurationGroupId as equal. + */ + public void setConfigurationGroupId_Equal(java.math.BigDecimal configurationGroupId) { + registerConfigurationGroupId(ConditionKey.CK_EQUAL, configurationGroupId); + } + + /** + * Set the value of configurationGroupId using notEqual. { != } + * + * @param configurationGroupId The value of configurationGroupId as notEqual. + */ + public void setConfigurationGroupId_NotEqual(java.math.BigDecimal configurationGroupId) { + registerConfigurationGroupId(ConditionKey.CK_NOT_EQUAL, configurationGroupId); + } + + /** + * Set the value of configurationGroupId using greaterThan. { > } + * + * @param configurationGroupId The value of configurationGroupId as greaterThan. + */ + public void setConfigurationGroupId_GreaterThan(java.math.BigDecimal configurationGroupId) { + registerConfigurationGroupId(ConditionKey.CK_GREATER_THAN, configurationGroupId); + } + + /** + * Set the value of configurationGroupId using lessThan. { < } + * + * @param configurationGroupId The value of configurationGroupId as lessThan. + */ + public void setConfigurationGroupId_LessThan(java.math.BigDecimal configurationGroupId) { + registerConfigurationGroupId(ConditionKey.CK_LESS_THAN, configurationGroupId); + } + + /** + * Set the value of configurationGroupId using greaterEqual. { >= } + * + * @param configurationGroupId The value of configurationGroupId as greaterEqual. + */ + public void setConfigurationGroupId_GreaterEqual(java.math.BigDecimal configurationGroupId) { + registerConfigurationGroupId(ConditionKey.CK_GREATER_EQUAL, configurationGroupId); + } + + /** + * Set the value of configurationGroupId using lessEqual. { <= } + * + * @param configurationGroupId The value of configurationGroupId as lessEqual. + */ + public void setConfigurationGroupId_LessEqual(java.math.BigDecimal configurationGroupId) { + registerConfigurationGroupId(ConditionKey.CK_LESS_EQUAL, configurationGroupId); + } + + /** + * Set the value of configurationGroupId using inScope. { in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param configurationGroupIdList The value of configurationGroupId as inScope. + */ + public void setConfigurationGroupId_InScope(java.util.List configurationGroupIdList) { + registerConfigurationGroupId(ConditionKey.CK_IN_SCOPE, configurationGroupIdList); + } + + /** + * Set the value of configurationGroupId using notInScope. { not in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param configurationGroupIdList The value of configurationGroupId as notInScope. + */ + public void setConfigurationGroupId_NotInScope(java.util.List configurationGroupIdList) { + registerConfigurationGroupId(ConditionKey.CK_NOT_IN_SCOPE, configurationGroupIdList); + } + + /** + * Register condition of configurationGroupId. + * + * @param key Condition key. (NotNull) + * @param value The value of configurationGroupId. (Nullable) + */ + protected void registerConfigurationGroupId(ConditionKey key, Object value) { + registerQuery(key, value, getCValueConfigurationGroupId(), COL_CONFIGURATION_GROUP_ID, J_ConfigurationGroupId, UJ_configurationGroupId); + } + + /** + * Register inline condition of configurationGroupId. + * + * @param key Condition key. (NotNull) + * @param value The value of configurationGroupId. (Nullable) + */ + protected void registerInlineConfigurationGroupId(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueConfigurationGroupId(), COL_CONFIGURATION_GROUP_ID, J_ConfigurationGroupId, UJ_configurationGroupId); + } + + abstract protected ConditionValue getCValueConfigurationGroupId(); + + /** Column db name of sortOrder. */ + protected static final String COL_SORT_ORDER = "SORT_ORDER"; + + /** Column java name of sortOrder. */ + protected static final String J_SortOrder = "SortOrder"; + + /** Column uncapitalised java name of sortOrder. */ + protected static final String UJ_sortOrder = "sortOrder"; + + /** + * Set the value of sortOrder using equal. { = } + * + * @param sortOrder The value of sortOrder as equal. + */ + public void setSortOrder_Equal(java.math.BigDecimal sortOrder) { + registerSortOrder(ConditionKey.CK_EQUAL, sortOrder); + } + + /** + * Set the value of sortOrder using notEqual. { != } + * + * @param sortOrder The value of sortOrder as notEqual. + */ + public void setSortOrder_NotEqual(java.math.BigDecimal sortOrder) { + registerSortOrder(ConditionKey.CK_NOT_EQUAL, sortOrder); + } + + /** + * Set the value of sortOrder using greaterThan. { > } + * + * @param sortOrder The value of sortOrder as greaterThan. + */ + public void setSortOrder_GreaterThan(java.math.BigDecimal sortOrder) { + registerSortOrder(ConditionKey.CK_GREATER_THAN, sortOrder); + } + + /** + * Set the value of sortOrder using lessThan. { < } + * + * @param sortOrder The value of sortOrder as lessThan. + */ + public void setSortOrder_LessThan(java.math.BigDecimal sortOrder) { + registerSortOrder(ConditionKey.CK_LESS_THAN, sortOrder); + } + + /** + * Set the value of sortOrder using greaterEqual. { >= } + * + * @param sortOrder The value of sortOrder as greaterEqual. + */ + public void setSortOrder_GreaterEqual(java.math.BigDecimal sortOrder) { + registerSortOrder(ConditionKey.CK_GREATER_EQUAL, sortOrder); + } + + /** + * Set the value of sortOrder using lessEqual. { <= } + * + * @param sortOrder The value of sortOrder as lessEqual. + */ + public void setSortOrder_LessEqual(java.math.BigDecimal sortOrder) { + registerSortOrder(ConditionKey.CK_LESS_EQUAL, sortOrder); + } + + /** + * Set the value of sortOrder using inScope. { in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param sortOrderList The value of sortOrder as inScope. + */ + public void setSortOrder_InScope(java.util.List sortOrderList) { + registerSortOrder(ConditionKey.CK_IN_SCOPE, sortOrderList); + } + + /** + * Set the value of sortOrder using notInScope. { not in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param sortOrderList The value of sortOrder as notInScope. + */ + public void setSortOrder_NotInScope(java.util.List sortOrderList) { + registerSortOrder(ConditionKey.CK_NOT_IN_SCOPE, sortOrderList); + } + + /** + * Set the value of sortOrder using isNull. { is null } + */ + public void setSortOrder_IsNull() { + registerSortOrder(ConditionKey.CK_IS_NULL, DUMMY_OBJECT); + } + + /** + * Set the value of sortOrder using isNotNull. { is not null } + */ + public void setSortOrder_IsNotNull() { + registerSortOrder(ConditionKey.CK_IS_NOT_NULL, DUMMY_OBJECT); + } + + /** + * Register condition of sortOrder. + * + * @param key Condition key. (NotNull) + * @param value The value of sortOrder. (Nullable) + */ + protected void registerSortOrder(ConditionKey key, Object value) { + registerQuery(key, value, getCValueSortOrder(), COL_SORT_ORDER, J_SortOrder, UJ_sortOrder); + } + + /** + * Register inline condition of sortOrder. + * + * @param key Condition key. (NotNull) + * @param value The value of sortOrder. (Nullable) + */ + protected void registerInlineSortOrder(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueSortOrder(), COL_SORT_ORDER, J_SortOrder, UJ_sortOrder); + } + + abstract protected ConditionValue getCValueSortOrder(); + + /** Column db name of lastModified. */ + protected static final String COL_LAST_MODIFIED = "LAST_MODIFIED"; + + /** Column java name of lastModified. */ + protected static final String J_LastModified = "LastModified"; + + /** Column uncapitalised java name of lastModified. */ + protected static final String UJ_lastModified = "lastModified"; + + /** + * Set the value of lastModified using equal. { = } + * + * @param lastModified The value of lastModified as equal. + */ + public void setLastModified_Equal(java.sql.Timestamp lastModified) { + registerLastModified(ConditionKey.CK_EQUAL, lastModified); + } + + /** + * Set the value of lastModified using notEqual. { != } + * + * @param lastModified The value of lastModified as notEqual. + */ + public void setLastModified_NotEqual(java.sql.Timestamp lastModified) { + registerLastModified(ConditionKey.CK_NOT_EQUAL, lastModified); + } + + /** + * Set the value of lastModified using greaterThan. { > } + * + * @param lastModified The value of lastModified as greaterThan. + */ + public void setLastModified_GreaterThan(java.sql.Timestamp lastModified) { + registerLastModified(ConditionKey.CK_GREATER_THAN, lastModified); + } + + /** + * Set the value of lastModified using lessThan. { < } + * + * @param lastModified The value of lastModified as lessThan. + */ + public void setLastModified_LessThan(java.sql.Timestamp lastModified) { + registerLastModified(ConditionKey.CK_LESS_THAN, lastModified); + } + + /** + * Set the value of lastModified using greaterEqual. { >= } + * + * @param lastModified The value of lastModified as greaterEqual. + */ + public void setLastModified_GreaterEqual(java.sql.Timestamp lastModified) { + registerLastModified(ConditionKey.CK_GREATER_EQUAL, lastModified); + } + + /** + * Set the value of lastModified using lessEqual. { <= } + * + * @param lastModified The value of lastModified as lessEqual. + */ + public void setLastModified_LessEqual(java.sql.Timestamp lastModified) { + registerLastModified(ConditionKey.CK_LESS_EQUAL, lastModified); + } + + /** + * Set the value of lastModified using from-to. { $fromDate <= COLUMN_NAME <= $toDate } + * + * @param lastModified The value of lastModified as from-to. + * @param fromToOption From-To option. (NotNull) + */ + public void setLastModified_FromTo(java.sql.Timestamp fromDate, java.sql.Timestamp toDate, jp.sf.pal.pompei.allcommon.cbean.coption.FromToOption fromToOption) { + registerFromToQuery(fromDate, toDate, getCValueLastModified(), COL_LAST_MODIFIED, J_LastModified, UJ_lastModified, fromToOption); + } + + /** + * Set the value of lastModified using isNull. { is null } + */ + public void setLastModified_IsNull() { + registerLastModified(ConditionKey.CK_IS_NULL, DUMMY_OBJECT); + } + + /** + * Set the value of lastModified using isNotNull. { is not null } + */ + public void setLastModified_IsNotNull() { + registerLastModified(ConditionKey.CK_IS_NOT_NULL, DUMMY_OBJECT); + } + + /** + * Register condition of lastModified. + * + * @param key Condition key. (NotNull) + * @param value The value of lastModified. (Nullable) + */ + protected void registerLastModified(ConditionKey key, Object value) { + registerQuery(key, value, getCValueLastModified(), COL_LAST_MODIFIED, J_LastModified, UJ_lastModified); + } + + /** + * Register inline condition of lastModified. + * + * @param key Condition key. (NotNull) + * @param value The value of lastModified. (Nullable) + */ + protected void registerInlineLastModified(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueLastModified(), COL_LAST_MODIFIED, J_LastModified, UJ_lastModified); + } + + abstract protected ConditionValue getCValueLastModified(); + + /** Column db name of dateAdded. */ + protected static final String COL_DATE_ADDED = "DATE_ADDED"; + + /** Column java name of dateAdded. */ + protected static final String J_DateAdded = "DateAdded"; + + /** Column uncapitalised java name of dateAdded. */ + protected static final String UJ_dateAdded = "dateAdded"; + + /** + * Set the value of dateAdded using equal. { = } + * + * @param dateAdded The value of dateAdded as equal. + */ + public void setDateAdded_Equal(java.sql.Timestamp dateAdded) { + registerDateAdded(ConditionKey.CK_EQUAL, dateAdded); + } + + /** + * Set the value of dateAdded using notEqual. { != } + * + * @param dateAdded The value of dateAdded as notEqual. + */ + public void setDateAdded_NotEqual(java.sql.Timestamp dateAdded) { + registerDateAdded(ConditionKey.CK_NOT_EQUAL, dateAdded); + } + + /** + * Set the value of dateAdded using greaterThan. { > } + * + * @param dateAdded The value of dateAdded as greaterThan. + */ + public void setDateAdded_GreaterThan(java.sql.Timestamp dateAdded) { + registerDateAdded(ConditionKey.CK_GREATER_THAN, dateAdded); + } + + /** + * Set the value of dateAdded using lessThan. { < } + * + * @param dateAdded The value of dateAdded as lessThan. + */ + public void setDateAdded_LessThan(java.sql.Timestamp dateAdded) { + registerDateAdded(ConditionKey.CK_LESS_THAN, dateAdded); + } + + /** + * Set the value of dateAdded using greaterEqual. { >= } + * + * @param dateAdded The value of dateAdded as greaterEqual. + */ + public void setDateAdded_GreaterEqual(java.sql.Timestamp dateAdded) { + registerDateAdded(ConditionKey.CK_GREATER_EQUAL, dateAdded); + } + + /** + * Set the value of dateAdded using lessEqual. { <= } + * + * @param dateAdded The value of dateAdded as lessEqual. + */ + public void setDateAdded_LessEqual(java.sql.Timestamp dateAdded) { + registerDateAdded(ConditionKey.CK_LESS_EQUAL, dateAdded); + } + + /** + * Set the value of dateAdded using from-to. { $fromDate <= COLUMN_NAME <= $toDate } + * + * @param dateAdded The value of dateAdded as from-to. + * @param fromToOption From-To option. (NotNull) + */ + public void setDateAdded_FromTo(java.sql.Timestamp fromDate, java.sql.Timestamp toDate, jp.sf.pal.pompei.allcommon.cbean.coption.FromToOption fromToOption) { + registerFromToQuery(fromDate, toDate, getCValueDateAdded(), COL_DATE_ADDED, J_DateAdded, UJ_dateAdded, fromToOption); + } + + /** + * Register condition of dateAdded. + * + * @param key Condition key. (NotNull) + * @param value The value of dateAdded. (Nullable) + */ + protected void registerDateAdded(ConditionKey key, Object value) { + registerQuery(key, value, getCValueDateAdded(), COL_DATE_ADDED, J_DateAdded, UJ_dateAdded); + } + + /** + * Register inline condition of dateAdded. + * + * @param key Condition key. (NotNull) + * @param value The value of dateAdded. (Nullable) + */ + protected void registerInlineDateAdded(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueDateAdded(), COL_DATE_ADDED, J_DateAdded, UJ_dateAdded); + } + + abstract protected ConditionValue getCValueDateAdded(); + + /** Column db name of useFunction. */ + protected static final String COL_USE_FUNCTION = "USE_FUNCTION"; + + /** Column java name of useFunction. */ + protected static final String J_UseFunction = "UseFunction"; + + /** Column uncapitalised java name of useFunction. */ + protected static final String UJ_useFunction = "useFunction"; + + /** + * Set the value of useFunction using equal. { = } + * If the value is null or empty-string, this condition is ignored. + * + * @param useFunction The value of useFunction as equal. + */ + public void setUseFunction_Equal(String useFunction) { + registerUseFunction(ConditionKey.CK_EQUAL, filterRemoveEmptyString(useFunction)); + } + + /** + * Set the value of useFunction using notEqual. { != } + * If the value is null or empty-string, this condition is ignored. + * + * @param useFunction The value of useFunction as notEqual. + */ + public void setUseFunction_NotEqual(String useFunction) { + registerUseFunction(ConditionKey.CK_NOT_EQUAL, filterRemoveEmptyString(useFunction)); + } + + /** + * Set the value of useFunction using greaterThan. { > } + * If the value is null or empty-string, this condition is ignored. + * + * @param useFunction The value of useFunction as greaterThan. + */ + public void setUseFunction_GreaterThan(String useFunction) { + registerUseFunction(ConditionKey.CK_GREATER_THAN, filterRemoveEmptyString(useFunction)); + } + + /** + * Set the value of useFunction using lessThan. { < } + * If the value is null or empty-string, this condition is ignored. + * + * @param useFunction The value of useFunction as lessThan. + */ + public void setUseFunction_LessThan(String useFunction) { + registerUseFunction(ConditionKey.CK_LESS_THAN, filterRemoveEmptyString(useFunction)); + } + + /** + * Set the value of useFunction using greaterEqual. { >= } + * If the value is null or empty-string, this condition is ignored. + * + * @param useFunction The value of useFunction as greaterEqual. + */ + public void setUseFunction_GreaterEqual(String useFunction) { + registerUseFunction(ConditionKey.CK_GREATER_EQUAL, filterRemoveEmptyString(useFunction)); + } + + /** + * Set the value of useFunction using lessEqual. { <= } + * If the value is null or empty-string, this condition is ignored. + * + * @param useFunction The value of useFunction as lessEqual. + */ + public void setUseFunction_LessEqual(String useFunction) { + registerUseFunction(ConditionKey.CK_LESS_EQUAL, filterRemoveEmptyString(useFunction)); + } + + /** + * Set the value of useFunction using prefixSearch. { like 'xxx%' } + * If the value is null or empty-string, this condition is ignored. + * + * @param useFunction The value of useFunction as prefixSearch. + */ + public void setUseFunction_PrefixSearch(String useFunction) { + registerUseFunction(ConditionKey.CK_PREFIX_SEARCH, filterRemoveEmptyString(useFunction)); + } + + /** + * Set the value of useFunction using likeSearch. { like '%xxx%' } + * If the value is null or empty-string, this condition is ignored. + * You can invoke this method several times and the conditions are set up. + * + * @param useFunction The value of useFunction as likeSearch. + * @param likeSearchOption Like search option. (NotNull) + */ + public void setUseFunction_LikeSearch(String useFunction, jp.sf.pal.pompei.allcommon.cbean.coption.LikeSearchOption likeSearchOption) { + registerLikeSearchQuery(ConditionKey.CK_LIKE_SEARCH, filterRemoveEmptyString(useFunction), getCValueUseFunction(), COL_USE_FUNCTION, J_UseFunction, UJ_useFunction, likeSearchOption); + } + + /** + * Set the value of useFunction using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param useFunctionList The value of useFunction as inScope. + */ + public void setUseFunction_InScope(java.util.List useFunctionList) { + registerUseFunction(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyStringFromList(useFunctionList)); + } + + /** + * Set the value of useFunction using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param useFunction The value of useFunction as inScope. + */ + public void setUseFunction_InScope(String useFunction, jp.sf.pal.pompei.allcommon.cbean.coption.InScopeOption option) { + registerInScopeQuery(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyString(useFunction), getCValueUseFunction(), COL_USE_FUNCTION, J_UseFunction, UJ_useFunction, option); + } + + /** + * Set the value of useFunction using notInScope. { not in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param useFunctionList The value of useFunction as notInScope. + */ + public void setUseFunction_NotInScope(java.util.List useFunctionList) { + registerUseFunction(ConditionKey.CK_NOT_IN_SCOPE, filterRemoveEmptyStringFromList(useFunctionList)); + } + + /** + * Set the value of useFunction using isNull. { is null } + */ + public void setUseFunction_IsNull() { + registerUseFunction(ConditionKey.CK_IS_NULL, DUMMY_OBJECT); + } + + /** + * Set the value of useFunction using isNotNull. { is not null } + */ + public void setUseFunction_IsNotNull() { + registerUseFunction(ConditionKey.CK_IS_NOT_NULL, DUMMY_OBJECT); + } + + /** + * Register condition of useFunction. + * + * @param key Condition key. (NotNull) + * @param value The value of useFunction. (Nullable) + */ + protected void registerUseFunction(ConditionKey key, Object value) { + registerQuery(key, value, getCValueUseFunction(), COL_USE_FUNCTION, J_UseFunction, UJ_useFunction); + } + + /** + * Register inline condition of useFunction. + * + * @param key Condition key. (NotNull) + * @param value The value of useFunction. (Nullable) + */ + protected void registerInlineUseFunction(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueUseFunction(), COL_USE_FUNCTION, J_UseFunction, UJ_useFunction); + } + + abstract protected ConditionValue getCValueUseFunction(); + + /** Column db name of setFunction. */ + protected static final String COL_SET_FUNCTION = "SET_FUNCTION"; + + /** Column java name of setFunction. */ + protected static final String J_SetFunction = "SetFunction"; + + /** Column uncapitalised java name of setFunction. */ + protected static final String UJ_setFunction = "setFunction"; + + /** + * Set the value of setFunction using equal. { = } + * If the value is null or empty-string, this condition is ignored. + * + * @param setFunction The value of setFunction as equal. + */ + public void setSetFunction_Equal(String setFunction) { + registerSetFunction(ConditionKey.CK_EQUAL, filterRemoveEmptyString(setFunction)); + } + + /** + * Set the value of setFunction using notEqual. { != } + * If the value is null or empty-string, this condition is ignored. + * + * @param setFunction The value of setFunction as notEqual. + */ + public void setSetFunction_NotEqual(String setFunction) { + registerSetFunction(ConditionKey.CK_NOT_EQUAL, filterRemoveEmptyString(setFunction)); + } + + /** + * Set the value of setFunction using greaterThan. { > } + * If the value is null or empty-string, this condition is ignored. + * + * @param setFunction The value of setFunction as greaterThan. + */ + public void setSetFunction_GreaterThan(String setFunction) { + registerSetFunction(ConditionKey.CK_GREATER_THAN, filterRemoveEmptyString(setFunction)); + } + + /** + * Set the value of setFunction using lessThan. { < } + * If the value is null or empty-string, this condition is ignored. + * + * @param setFunction The value of setFunction as lessThan. + */ + public void setSetFunction_LessThan(String setFunction) { + registerSetFunction(ConditionKey.CK_LESS_THAN, filterRemoveEmptyString(setFunction)); + } + + /** + * Set the value of setFunction using greaterEqual. { >= } + * If the value is null or empty-string, this condition is ignored. + * + * @param setFunction The value of setFunction as greaterEqual. + */ + public void setSetFunction_GreaterEqual(String setFunction) { + registerSetFunction(ConditionKey.CK_GREATER_EQUAL, filterRemoveEmptyString(setFunction)); + } + + /** + * Set the value of setFunction using lessEqual. { <= } + * If the value is null or empty-string, this condition is ignored. + * + * @param setFunction The value of setFunction as lessEqual. + */ + public void setSetFunction_LessEqual(String setFunction) { + registerSetFunction(ConditionKey.CK_LESS_EQUAL, filterRemoveEmptyString(setFunction)); + } + + /** + * Set the value of setFunction using prefixSearch. { like 'xxx%' } + * If the value is null or empty-string, this condition is ignored. + * + * @param setFunction The value of setFunction as prefixSearch. + */ + public void setSetFunction_PrefixSearch(String setFunction) { + registerSetFunction(ConditionKey.CK_PREFIX_SEARCH, filterRemoveEmptyString(setFunction)); + } + + /** + * Set the value of setFunction using likeSearch. { like '%xxx%' } + * If the value is null or empty-string, this condition is ignored. + * You can invoke this method several times and the conditions are set up. + * + * @param setFunction The value of setFunction as likeSearch. + * @param likeSearchOption Like search option. (NotNull) + */ + public void setSetFunction_LikeSearch(String setFunction, jp.sf.pal.pompei.allcommon.cbean.coption.LikeSearchOption likeSearchOption) { + registerLikeSearchQuery(ConditionKey.CK_LIKE_SEARCH, filterRemoveEmptyString(setFunction), getCValueSetFunction(), COL_SET_FUNCTION, J_SetFunction, UJ_setFunction, likeSearchOption); + } + + /** + * Set the value of setFunction using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param setFunctionList The value of setFunction as inScope. + */ + public void setSetFunction_InScope(java.util.List setFunctionList) { + registerSetFunction(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyStringFromList(setFunctionList)); + } + + /** + * Set the value of setFunction using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param setFunction The value of setFunction as inScope. + */ + public void setSetFunction_InScope(String setFunction, jp.sf.pal.pompei.allcommon.cbean.coption.InScopeOption option) { + registerInScopeQuery(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyString(setFunction), getCValueSetFunction(), COL_SET_FUNCTION, J_SetFunction, UJ_setFunction, option); + } + + /** + * Set the value of setFunction using notInScope. { not in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param setFunctionList The value of setFunction as notInScope. + */ + public void setSetFunction_NotInScope(java.util.List setFunctionList) { + registerSetFunction(ConditionKey.CK_NOT_IN_SCOPE, filterRemoveEmptyStringFromList(setFunctionList)); + } + + /** + * Set the value of setFunction using isNull. { is null } + */ + public void setSetFunction_IsNull() { + registerSetFunction(ConditionKey.CK_IS_NULL, DUMMY_OBJECT); + } + + /** + * Set the value of setFunction using isNotNull. { is not null } + */ + public void setSetFunction_IsNotNull() { + registerSetFunction(ConditionKey.CK_IS_NOT_NULL, DUMMY_OBJECT); + } + + /** + * Register condition of setFunction. + * + * @param key Condition key. (NotNull) + * @param value The value of setFunction. (Nullable) + */ + protected void registerSetFunction(ConditionKey key, Object value) { + registerQuery(key, value, getCValueSetFunction(), COL_SET_FUNCTION, J_SetFunction, UJ_setFunction); + } + + /** + * Register inline condition of setFunction. + * + * @param key Condition key. (NotNull) + * @param value The value of setFunction. (Nullable) + */ + protected void registerInlineSetFunction(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueSetFunction(), COL_SET_FUNCTION, J_SetFunction, UJ_setFunction); + } + + abstract protected ConditionValue getCValueSetFunction(); + + // =================================================================================== + // Basic Override + // ============== + /** + * This method overrides the method that is declared at super. + * + * @return Clause string. (NotNull) + */ + public String toString() { + return getSqlClause().getClause(); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/AbstractBsConfigurationGroupCQ.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/AbstractBsConfigurationGroupCQ.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/AbstractBsConfigurationGroupCQ.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,695 @@ + +package jp.sf.pal.pompei.cbean.cq.bs; + + + +import jp.sf.pal.pompei.allcommon.cbean.*; +import jp.sf.pal.pompei.allcommon.cbean.ckey.*; +import jp.sf.pal.pompei.allcommon.cbean.cvalue.ConditionValue; +import jp.sf.pal.pompei.allcommon.cbean.sqlclause.SqlClause; +import jp.sf.pal.pompei.cbean.cq.*; + +/** + * The condition-query of CONFIGURATION_GROUP. + * + * @author DBFlute(AutoGenerator) + */ +public abstract class AbstractBsConfigurationGroupCQ extends AbstractConditionQuery { + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param childQuery Child query as abstract class. (Nullable: If null, this is base instance.) + * @param sqlClause SQL clause instance. (NotNull) + * @param aliasName My alias name. (NotNull) + * @param nestLevel Nest level. + */ + public AbstractBsConfigurationGroupCQ(ConditionQuery childQuery, SqlClause sqlClause, String aliasName, int nestLevel) { + super(childQuery, sqlClause, aliasName, nestLevel); + } + + // =================================================================================== + // Table Name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + final public String getTableDbName() { + return "CONFIGURATION_GROUP"; + } + + // =================================================================================== + // Query + // ===== + + // /* * * * * * * * * * * * * * * * * * * * * * * + // MyTable = [CONFIGURATION_GROUP] + // * * * * * * * * */ + + + /** Column db name of configurationGroupId. */ + protected static final String COL_CONFIGURATION_GROUP_ID = "CONFIGURATION_GROUP_ID"; + + /** Column java name of configurationGroupId. */ + protected static final String J_ConfigurationGroupId = "ConfigurationGroupId"; + + /** Column uncapitalised java name of configurationGroupId. */ + protected static final String UJ_configurationGroupId = "configurationGroupId"; + + /** + * Set the value of configurationGroupId using equal. { = } + * + * @param configurationGroupId The value of configurationGroupId as equal. + */ + public void setConfigurationGroupId_Equal(java.math.BigDecimal configurationGroupId) { + registerConfigurationGroupId(ConditionKey.CK_EQUAL, configurationGroupId); + } + + /** + * Set the value of configurationGroupId using notEqual. { != } + * + * @param configurationGroupId The value of configurationGroupId as notEqual. + */ + public void setConfigurationGroupId_NotEqual(java.math.BigDecimal configurationGroupId) { + registerConfigurationGroupId(ConditionKey.CK_NOT_EQUAL, configurationGroupId); + } + + /** + * Set the value of configurationGroupId using greaterThan. { > } + * + * @param configurationGroupId The value of configurationGroupId as greaterThan. + */ + public void setConfigurationGroupId_GreaterThan(java.math.BigDecimal configurationGroupId) { + registerConfigurationGroupId(ConditionKey.CK_GREATER_THAN, configurationGroupId); + } + + /** + * Set the value of configurationGroupId using lessThan. { < } + * + * @param configurationGroupId The value of configurationGroupId as lessThan. + */ + public void setConfigurationGroupId_LessThan(java.math.BigDecimal configurationGroupId) { + registerConfigurationGroupId(ConditionKey.CK_LESS_THAN, configurationGroupId); + } + + /** + * Set the value of configurationGroupId using greaterEqual. { >= } + * + * @param configurationGroupId The value of configurationGroupId as greaterEqual. + */ + public void setConfigurationGroupId_GreaterEqual(java.math.BigDecimal configurationGroupId) { + registerConfigurationGroupId(ConditionKey.CK_GREATER_EQUAL, configurationGroupId); + } + + /** + * Set the value of configurationGroupId using lessEqual. { <= } + * + * @param configurationGroupId The value of configurationGroupId as lessEqual. + */ + public void setConfigurationGroupId_LessEqual(java.math.BigDecimal configurationGroupId) { + registerConfigurationGroupId(ConditionKey.CK_LESS_EQUAL, configurationGroupId); + } + + /** + * Set the value of configurationGroupId using inScope. { in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param configurationGroupIdList The value of configurationGroupId as inScope. + */ + public void setConfigurationGroupId_InScope(java.util.List configurationGroupIdList) { + registerConfigurationGroupId(ConditionKey.CK_IN_SCOPE, configurationGroupIdList); + } + + /** + * Set the value of configurationGroupId using notInScope. { not in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param configurationGroupIdList The value of configurationGroupId as notInScope. + */ + public void setConfigurationGroupId_NotInScope(java.util.List configurationGroupIdList) { + registerConfigurationGroupId(ConditionKey.CK_NOT_IN_SCOPE, configurationGroupIdList); + } + + /** + * Register condition of configurationGroupId. + * + * @param key Condition key. (NotNull) + * @param value The value of configurationGroupId. (Nullable) + */ + protected void registerConfigurationGroupId(ConditionKey key, Object value) { + registerQuery(key, value, getCValueConfigurationGroupId(), COL_CONFIGURATION_GROUP_ID, J_ConfigurationGroupId, UJ_configurationGroupId); + } + + /** + * Register inline condition of configurationGroupId. + * + * @param key Condition key. (NotNull) + * @param value The value of configurationGroupId. (Nullable) + */ + protected void registerInlineConfigurationGroupId(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueConfigurationGroupId(), COL_CONFIGURATION_GROUP_ID, J_ConfigurationGroupId, UJ_configurationGroupId); + } + + abstract protected ConditionValue getCValueConfigurationGroupId(); + + /** Column db name of configurationGroupTitle. */ + protected static final String COL_CONFIGURATION_GROUP_TITLE = "CONFIGURATION_GROUP_TITLE"; + + /** Column java name of configurationGroupTitle. */ + protected static final String J_ConfigurationGroupTitle = "ConfigurationGroupTitle"; + + /** Column uncapitalised java name of configurationGroupTitle. */ + protected static final String UJ_configurationGroupTitle = "configurationGroupTitle"; + + /** + * Set the value of configurationGroupTitle using equal. { = } + * If the value is null or empty-string, this condition is ignored. + * + * @param configurationGroupTitle The value of configurationGroupTitle as equal. + */ + public void setConfigurationGroupTitle_Equal(String configurationGroupTitle) { + registerConfigurationGroupTitle(ConditionKey.CK_EQUAL, filterRemoveEmptyString(configurationGroupTitle)); + } + + /** + * Set the value of configurationGroupTitle using notEqual. { != } + * If the value is null or empty-string, this condition is ignored. + * + * @param configurationGroupTitle The value of configurationGroupTitle as notEqual. + */ + public void setConfigurationGroupTitle_NotEqual(String configurationGroupTitle) { + registerConfigurationGroupTitle(ConditionKey.CK_NOT_EQUAL, filterRemoveEmptyString(configurationGroupTitle)); + } + + /** + * Set the value of configurationGroupTitle using greaterThan. { > } + * If the value is null or empty-string, this condition is ignored. + * + * @param configurationGroupTitle The value of configurationGroupTitle as greaterThan. + */ + public void setConfigurationGroupTitle_GreaterThan(String configurationGroupTitle) { + registerConfigurationGroupTitle(ConditionKey.CK_GREATER_THAN, filterRemoveEmptyString(configurationGroupTitle)); + } + + /** + * Set the value of configurationGroupTitle using lessThan. { < } + * If the value is null or empty-string, this condition is ignored. + * + * @param configurationGroupTitle The value of configurationGroupTitle as lessThan. + */ + public void setConfigurationGroupTitle_LessThan(String configurationGroupTitle) { + registerConfigurationGroupTitle(ConditionKey.CK_LESS_THAN, filterRemoveEmptyString(configurationGroupTitle)); + } + + /** + * Set the value of configurationGroupTitle using greaterEqual. { >= } + * If the value is null or empty-string, this condition is ignored. + * + * @param configurationGroupTitle The value of configurationGroupTitle as greaterEqual. + */ + public void setConfigurationGroupTitle_GreaterEqual(String configurationGroupTitle) { + registerConfigurationGroupTitle(ConditionKey.CK_GREATER_EQUAL, filterRemoveEmptyString(configurationGroupTitle)); + } + + /** + * Set the value of configurationGroupTitle using lessEqual. { <= } + * If the value is null or empty-string, this condition is ignored. + * + * @param configurationGroupTitle The value of configurationGroupTitle as lessEqual. + */ + public void setConfigurationGroupTitle_LessEqual(String configurationGroupTitle) { + registerConfigurationGroupTitle(ConditionKey.CK_LESS_EQUAL, filterRemoveEmptyString(configurationGroupTitle)); + } + + /** + * Set the value of configurationGroupTitle using prefixSearch. { like 'xxx%' } + * If the value is null or empty-string, this condition is ignored. + * + * @param configurationGroupTitle The value of configurationGroupTitle as prefixSearch. + */ + public void setConfigurationGroupTitle_PrefixSearch(String configurationGroupTitle) { + registerConfigurationGroupTitle(ConditionKey.CK_PREFIX_SEARCH, filterRemoveEmptyString(configurationGroupTitle)); + } + + /** + * Set the value of configurationGroupTitle using likeSearch. { like '%xxx%' } + * If the value is null or empty-string, this condition is ignored. + * You can invoke this method several times and the conditions are set up. + * + * @param configurationGroupTitle The value of configurationGroupTitle as likeSearch. + * @param likeSearchOption Like search option. (NotNull) + */ + public void setConfigurationGroupTitle_LikeSearch(String configurationGroupTitle, jp.sf.pal.pompei.allcommon.cbean.coption.LikeSearchOption likeSearchOption) { + registerLikeSearchQuery(ConditionKey.CK_LIKE_SEARCH, filterRemoveEmptyString(configurationGroupTitle), getCValueConfigurationGroupTitle(), COL_CONFIGURATION_GROUP_TITLE, J_ConfigurationGroupTitle, UJ_configurationGroupTitle, likeSearchOption); + } + + /** + * Set the value of configurationGroupTitle using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param configurationGroupTitleList The value of configurationGroupTitle as inScope. + */ + public void setConfigurationGroupTitle_InScope(java.util.List configurationGroupTitleList) { + registerConfigurationGroupTitle(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyStringFromList(configurationGroupTitleList)); + } + + /** + * Set the value of configurationGroupTitle using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param configurationGroupTitle The value of configurationGroupTitle as inScope. + */ + public void setConfigurationGroupTitle_InScope(String configurationGroupTitle, jp.sf.pal.pompei.allcommon.cbean.coption.InScopeOption option) { + registerInScopeQuery(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyString(configurationGroupTitle), getCValueConfigurationGroupTitle(), COL_CONFIGURATION_GROUP_TITLE, J_ConfigurationGroupTitle, UJ_configurationGroupTitle, option); + } + + /** + * Set the value of configurationGroupTitle using notInScope. { not in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param configurationGroupTitleList The value of configurationGroupTitle as notInScope. + */ + public void setConfigurationGroupTitle_NotInScope(java.util.List configurationGroupTitleList) { + registerConfigurationGroupTitle(ConditionKey.CK_NOT_IN_SCOPE, filterRemoveEmptyStringFromList(configurationGroupTitleList)); + } + + /** + * Register condition of configurationGroupTitle. + * + * @param key Condition key. (NotNull) + * @param value The value of configurationGroupTitle. (Nullable) + */ + protected void registerConfigurationGroupTitle(ConditionKey key, Object value) { + registerQuery(key, value, getCValueConfigurationGroupTitle(), COL_CONFIGURATION_GROUP_TITLE, J_ConfigurationGroupTitle, UJ_configurationGroupTitle); + } + + /** + * Register inline condition of configurationGroupTitle. + * + * @param key Condition key. (NotNull) + * @param value The value of configurationGroupTitle. (Nullable) + */ + protected void registerInlineConfigurationGroupTitle(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueConfigurationGroupTitle(), COL_CONFIGURATION_GROUP_TITLE, J_ConfigurationGroupTitle, UJ_configurationGroupTitle); + } + + abstract protected ConditionValue getCValueConfigurationGroupTitle(); + + /** Column db name of configurationGroupDescription. */ + protected static final String COL_CONFIGURATION_GROUP_DESCRIPTION = "CONFIGURATION_GROUP_DESCRIPTION"; + + /** Column java name of configurationGroupDescription. */ + protected static final String J_ConfigurationGroupDescription = "ConfigurationGroupDescription"; + + /** Column uncapitalised java name of configurationGroupDescription. */ + protected static final String UJ_configurationGroupDescription = "configurationGroupDescription"; + + /** + * Set the value of configurationGroupDescription using equal. { = } + * If the value is null or empty-string, this condition is ignored. + * + * @param configurationGroupDescription The value of configurationGroupDescription as equal. + */ + public void setConfigurationGroupDescription_Equal(String configurationGroupDescription) { + registerConfigurationGroupDescription(ConditionKey.CK_EQUAL, filterRemoveEmptyString(configurationGroupDescription)); + } + + /** + * Set the value of configurationGroupDescription using notEqual. { != } + * If the value is null or empty-string, this condition is ignored. + * + * @param configurationGroupDescription The value of configurationGroupDescription as notEqual. + */ + public void setConfigurationGroupDescription_NotEqual(String configurationGroupDescription) { + registerConfigurationGroupDescription(ConditionKey.CK_NOT_EQUAL, filterRemoveEmptyString(configurationGroupDescription)); + } + + /** + * Set the value of configurationGroupDescription using greaterThan. { > } + * If the value is null or empty-string, this condition is ignored. + * + * @param configurationGroupDescription The value of configurationGroupDescription as greaterThan. + */ + public void setConfigurationGroupDescription_GreaterThan(String configurationGroupDescription) { + registerConfigurationGroupDescription(ConditionKey.CK_GREATER_THAN, filterRemoveEmptyString(configurationGroupDescription)); + } + + /** + * Set the value of configurationGroupDescription using lessThan. { < } + * If the value is null or empty-string, this condition is ignored. + * + * @param configurationGroupDescription The value of configurationGroupDescription as lessThan. + */ + public void setConfigurationGroupDescription_LessThan(String configurationGroupDescription) { + registerConfigurationGroupDescription(ConditionKey.CK_LESS_THAN, filterRemoveEmptyString(configurationGroupDescription)); + } + + /** + * Set the value of configurationGroupDescription using greaterEqual. { >= } + * If the value is null or empty-string, this condition is ignored. + * + * @param configurationGroupDescription The value of configurationGroupDescription as greaterEqual. + */ + public void setConfigurationGroupDescription_GreaterEqual(String configurationGroupDescription) { + registerConfigurationGroupDescription(ConditionKey.CK_GREATER_EQUAL, filterRemoveEmptyString(configurationGroupDescription)); + } + + /** + * Set the value of configurationGroupDescription using lessEqual. { <= } + * If the value is null or empty-string, this condition is ignored. + * + * @param configurationGroupDescription The value of configurationGroupDescription as lessEqual. + */ + public void setConfigurationGroupDescription_LessEqual(String configurationGroupDescription) { + registerConfigurationGroupDescription(ConditionKey.CK_LESS_EQUAL, filterRemoveEmptyString(configurationGroupDescription)); + } + + /** + * Set the value of configurationGroupDescription using prefixSearch. { like 'xxx%' } + * If the value is null or empty-string, this condition is ignored. + * + * @param configurationGroupDescription The value of configurationGroupDescription as prefixSearch. + */ + public void setConfigurationGroupDescription_PrefixSearch(String configurationGroupDescription) { + registerConfigurationGroupDescription(ConditionKey.CK_PREFIX_SEARCH, filterRemoveEmptyString(configurationGroupDescription)); + } + + /** + * Set the value of configurationGroupDescription using likeSearch. { like '%xxx%' } + * If the value is null or empty-string, this condition is ignored. + * You can invoke this method several times and the conditions are set up. + * + * @param configurationGroupDescription The value of configurationGroupDescription as likeSearch. + * @param likeSearchOption Like search option. (NotNull) + */ + public void setConfigurationGroupDescription_LikeSearch(String configurationGroupDescription, jp.sf.pal.pompei.allcommon.cbean.coption.LikeSearchOption likeSearchOption) { + registerLikeSearchQuery(ConditionKey.CK_LIKE_SEARCH, filterRemoveEmptyString(configurationGroupDescription), getCValueConfigurationGroupDescription(), COL_CONFIGURATION_GROUP_DESCRIPTION, J_ConfigurationGroupDescription, UJ_configurationGroupDescription, likeSearchOption); + } + + /** + * Set the value of configurationGroupDescription using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param configurationGroupDescriptionList The value of configurationGroupDescription as inScope. + */ + public void setConfigurationGroupDescription_InScope(java.util.List configurationGroupDescriptionList) { + registerConfigurationGroupDescription(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyStringFromList(configurationGroupDescriptionList)); + } + + /** + * Set the value of configurationGroupDescription using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param configurationGroupDescription The value of configurationGroupDescription as inScope. + */ + public void setConfigurationGroupDescription_InScope(String configurationGroupDescription, jp.sf.pal.pompei.allcommon.cbean.coption.InScopeOption option) { + registerInScopeQuery(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyString(configurationGroupDescription), getCValueConfigurationGroupDescription(), COL_CONFIGURATION_GROUP_DESCRIPTION, J_ConfigurationGroupDescription, UJ_configurationGroupDescription, option); + } + + /** + * Set the value of configurationGroupDescription using notInScope. { not in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param configurationGroupDescriptionList The value of configurationGroupDescription as notInScope. + */ + public void setConfigurationGroupDescription_NotInScope(java.util.List configurationGroupDescriptionList) { + registerConfigurationGroupDescription(ConditionKey.CK_NOT_IN_SCOPE, filterRemoveEmptyStringFromList(configurationGroupDescriptionList)); + } + + /** + * Register condition of configurationGroupDescription. + * + * @param key Condition key. (NotNull) + * @param value The value of configurationGroupDescription. (Nullable) + */ + protected void registerConfigurationGroupDescription(ConditionKey key, Object value) { + registerQuery(key, value, getCValueConfigurationGroupDescription(), COL_CONFIGURATION_GROUP_DESCRIPTION, J_ConfigurationGroupDescription, UJ_configurationGroupDescription); + } + + /** + * Register inline condition of configurationGroupDescription. + * + * @param key Condition key. (NotNull) + * @param value The value of configurationGroupDescription. (Nullable) + */ + protected void registerInlineConfigurationGroupDescription(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueConfigurationGroupDescription(), COL_CONFIGURATION_GROUP_DESCRIPTION, J_ConfigurationGroupDescription, UJ_configurationGroupDescription); + } + + abstract protected ConditionValue getCValueConfigurationGroupDescription(); + + /** Column db name of sortOrder. */ + protected static final String COL_SORT_ORDER = "SORT_ORDER"; + + /** Column java name of sortOrder. */ + protected static final String J_SortOrder = "SortOrder"; + + /** Column uncapitalised java name of sortOrder. */ + protected static final String UJ_sortOrder = "sortOrder"; + + /** + * Set the value of sortOrder using equal. { = } + * + * @param sortOrder The value of sortOrder as equal. + */ + public void setSortOrder_Equal(java.math.BigDecimal sortOrder) { + registerSortOrder(ConditionKey.CK_EQUAL, sortOrder); + } + + /** + * Set the value of sortOrder using notEqual. { != } + * + * @param sortOrder The value of sortOrder as notEqual. + */ + public void setSortOrder_NotEqual(java.math.BigDecimal sortOrder) { + registerSortOrder(ConditionKey.CK_NOT_EQUAL, sortOrder); + } + + /** + * Set the value of sortOrder using greaterThan. { > } + * + * @param sortOrder The value of sortOrder as greaterThan. + */ + public void setSortOrder_GreaterThan(java.math.BigDecimal sortOrder) { + registerSortOrder(ConditionKey.CK_GREATER_THAN, sortOrder); + } + + /** + * Set the value of sortOrder using lessThan. { < } + * + * @param sortOrder The value of sortOrder as lessThan. + */ + public void setSortOrder_LessThan(java.math.BigDecimal sortOrder) { + registerSortOrder(ConditionKey.CK_LESS_THAN, sortOrder); + } + + /** + * Set the value of sortOrder using greaterEqual. { >= } + * + * @param sortOrder The value of sortOrder as greaterEqual. + */ + public void setSortOrder_GreaterEqual(java.math.BigDecimal sortOrder) { + registerSortOrder(ConditionKey.CK_GREATER_EQUAL, sortOrder); + } + + /** + * Set the value of sortOrder using lessEqual. { <= } + * + * @param sortOrder The value of sortOrder as lessEqual. + */ + public void setSortOrder_LessEqual(java.math.BigDecimal sortOrder) { + registerSortOrder(ConditionKey.CK_LESS_EQUAL, sortOrder); + } + + /** + * Set the value of sortOrder using inScope. { in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param sortOrderList The value of sortOrder as inScope. + */ + public void setSortOrder_InScope(java.util.List sortOrderList) { + registerSortOrder(ConditionKey.CK_IN_SCOPE, sortOrderList); + } + + /** + * Set the value of sortOrder using notInScope. { not in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param sortOrderList The value of sortOrder as notInScope. + */ + public void setSortOrder_NotInScope(java.util.List sortOrderList) { + registerSortOrder(ConditionKey.CK_NOT_IN_SCOPE, sortOrderList); + } + + /** + * Set the value of sortOrder using isNull. { is null } + */ + public void setSortOrder_IsNull() { + registerSortOrder(ConditionKey.CK_IS_NULL, DUMMY_OBJECT); + } + + /** + * Set the value of sortOrder using isNotNull. { is not null } + */ + public void setSortOrder_IsNotNull() { + registerSortOrder(ConditionKey.CK_IS_NOT_NULL, DUMMY_OBJECT); + } + + /** + * Register condition of sortOrder. + * + * @param key Condition key. (NotNull) + * @param value The value of sortOrder. (Nullable) + */ + protected void registerSortOrder(ConditionKey key, Object value) { + registerQuery(key, value, getCValueSortOrder(), COL_SORT_ORDER, J_SortOrder, UJ_sortOrder); + } + + /** + * Register inline condition of sortOrder. + * + * @param key Condition key. (NotNull) + * @param value The value of sortOrder. (Nullable) + */ + protected void registerInlineSortOrder(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueSortOrder(), COL_SORT_ORDER, J_SortOrder, UJ_sortOrder); + } + + abstract protected ConditionValue getCValueSortOrder(); + + /** Column db name of visible. */ + protected static final String COL_VISIBLE = "VISIBLE"; + + /** Column java name of visible. */ + protected static final String J_Visible = "Visible"; + + /** Column uncapitalised java name of visible. */ + protected static final String UJ_visible = "visible"; + + /** + * Set the value of visible using equal. { = } + * + * @param visible The value of visible as equal. + */ + public void setVisible_Equal(java.math.BigDecimal visible) { + registerVisible(ConditionKey.CK_EQUAL, visible); + } + + /** + * Set the value of visible using notEqual. { != } + * + * @param visible The value of visible as notEqual. + */ + public void setVisible_NotEqual(java.math.BigDecimal visible) { + registerVisible(ConditionKey.CK_NOT_EQUAL, visible); + } + + /** + * Set the value of visible using greaterThan. { > } + * + * @param visible The value of visible as greaterThan. + */ + public void setVisible_GreaterThan(java.math.BigDecimal visible) { + registerVisible(ConditionKey.CK_GREATER_THAN, visible); + } + + /** + * Set the value of visible using lessThan. { < } + * + * @param visible The value of visible as lessThan. + */ + public void setVisible_LessThan(java.math.BigDecimal visible) { + registerVisible(ConditionKey.CK_LESS_THAN, visible); + } + + /** + * Set the value of visible using greaterEqual. { >= } + * + * @param visible The value of visible as greaterEqual. + */ + public void setVisible_GreaterEqual(java.math.BigDecimal visible) { + registerVisible(ConditionKey.CK_GREATER_EQUAL, visible); + } + + /** + * Set the value of visible using lessEqual. { <= } + * + * @param visible The value of visible as lessEqual. + */ + public void setVisible_LessEqual(java.math.BigDecimal visible) { + registerVisible(ConditionKey.CK_LESS_EQUAL, visible); + } + + /** + * Set the value of visible using inScope. { in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param visibleList The value of visible as inScope. + */ + public void setVisible_InScope(java.util.List visibleList) { + registerVisible(ConditionKey.CK_IN_SCOPE, visibleList); + } + + /** + * Set the value of visible using notInScope. { not in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param visibleList The value of visible as notInScope. + */ + public void setVisible_NotInScope(java.util.List visibleList) { + registerVisible(ConditionKey.CK_NOT_IN_SCOPE, visibleList); + } + + /** + * Set the value of visible using isNull. { is null } + */ + public void setVisible_IsNull() { + registerVisible(ConditionKey.CK_IS_NULL, DUMMY_OBJECT); + } + + /** + * Set the value of visible using isNotNull. { is not null } + */ + public void setVisible_IsNotNull() { + registerVisible(ConditionKey.CK_IS_NOT_NULL, DUMMY_OBJECT); + } + + /** + * Register condition of visible. + * + * @param key Condition key. (NotNull) + * @param value The value of visible. (Nullable) + */ + protected void registerVisible(ConditionKey key, Object value) { + registerQuery(key, value, getCValueVisible(), COL_VISIBLE, J_Visible, UJ_visible); + } + + /** + * Register inline condition of visible. + * + * @param key Condition key. (NotNull) + * @param value The value of visible. (Nullable) + */ + protected void registerInlineVisible(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueVisible(), COL_VISIBLE, J_Visible, UJ_visible); + } + + abstract protected ConditionValue getCValueVisible(); + + // =================================================================================== + // Basic Override + // ============== + /** + * This method overrides the method that is declared at super. + * + * @return Clause string. (NotNull) + */ + public String toString() { + return getSqlClause().getClause(); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/AbstractBsCounterCQ.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/AbstractBsCounterCQ.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/AbstractBsCounterCQ.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,342 @@ + +package jp.sf.pal.pompei.cbean.cq.bs; + + + +import jp.sf.pal.pompei.allcommon.cbean.*; +import jp.sf.pal.pompei.allcommon.cbean.ckey.*; +import jp.sf.pal.pompei.allcommon.cbean.cvalue.ConditionValue; +import jp.sf.pal.pompei.allcommon.cbean.sqlclause.SqlClause; +import jp.sf.pal.pompei.cbean.cq.*; + +/** + * The condition-query of COUNTER. + * + * @author DBFlute(AutoGenerator) + */ +public abstract class AbstractBsCounterCQ extends AbstractConditionQuery { + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param childQuery Child query as abstract class. (Nullable: If null, this is base instance.) + * @param sqlClause SQL clause instance. (NotNull) + * @param aliasName My alias name. (NotNull) + * @param nestLevel Nest level. + */ + public AbstractBsCounterCQ(ConditionQuery childQuery, SqlClause sqlClause, String aliasName, int nestLevel) { + super(childQuery, sqlClause, aliasName, nestLevel); + } + + // =================================================================================== + // Table Name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + final public String getTableDbName() { + return "COUNTER"; + } + + // =================================================================================== + // Query + // ===== + + // /* * * * * * * * * * * * * * * * * * * * * * * + // MyTable = [COUNTER] + // * * * * * * * * */ + + + /** Column db name of startdate. */ + protected static final String COL_STARTDATE = "STARTDATE"; + + /** Column java name of startdate. */ + protected static final String J_Startdate = "Startdate"; + + /** Column uncapitalised java name of startdate. */ + protected static final String UJ_startdate = "startdate"; + + /** + * Set the value of startdate using equal. { = } + * If the value is null or empty-string, this condition is ignored. + * + * @param startdate The value of startdate as equal. + */ + public void setStartdate_Equal(String startdate) { + registerStartdate(ConditionKey.CK_EQUAL, filterRemoveEmptyString(startdate)); + } + + /** + * Set the value of startdate using notEqual. { != } + * If the value is null or empty-string, this condition is ignored. + * + * @param startdate The value of startdate as notEqual. + */ + public void setStartdate_NotEqual(String startdate) { + registerStartdate(ConditionKey.CK_NOT_EQUAL, filterRemoveEmptyString(startdate)); + } + + /** + * Set the value of startdate using greaterThan. { > } + * If the value is null or empty-string, this condition is ignored. + * + * @param startdate The value of startdate as greaterThan. + */ + public void setStartdate_GreaterThan(String startdate) { + registerStartdate(ConditionKey.CK_GREATER_THAN, filterRemoveEmptyString(startdate)); + } + + /** + * Set the value of startdate using lessThan. { < } + * If the value is null or empty-string, this condition is ignored. + * + * @param startdate The value of startdate as lessThan. + */ + public void setStartdate_LessThan(String startdate) { + registerStartdate(ConditionKey.CK_LESS_THAN, filterRemoveEmptyString(startdate)); + } + + /** + * Set the value of startdate using greaterEqual. { >= } + * If the value is null or empty-string, this condition is ignored. + * + * @param startdate The value of startdate as greaterEqual. + */ + public void setStartdate_GreaterEqual(String startdate) { + registerStartdate(ConditionKey.CK_GREATER_EQUAL, filterRemoveEmptyString(startdate)); + } + + /** + * Set the value of startdate using lessEqual. { <= } + * If the value is null or empty-string, this condition is ignored. + * + * @param startdate The value of startdate as lessEqual. + */ + public void setStartdate_LessEqual(String startdate) { + registerStartdate(ConditionKey.CK_LESS_EQUAL, filterRemoveEmptyString(startdate)); + } + + /** + * Set the value of startdate using prefixSearch. { like 'xxx%' } + * If the value is null or empty-string, this condition is ignored. + * + * @param startdate The value of startdate as prefixSearch. + */ + public void setStartdate_PrefixSearch(String startdate) { + registerStartdate(ConditionKey.CK_PREFIX_SEARCH, filterRemoveEmptyString(startdate)); + } + + /** + * Set the value of startdate using likeSearch. { like '%xxx%' } + * If the value is null or empty-string, this condition is ignored. + * You can invoke this method several times and the conditions are set up. + * + * @param startdate The value of startdate as likeSearch. + * @param likeSearchOption Like search option. (NotNull) + */ + public void setStartdate_LikeSearch(String startdate, jp.sf.pal.pompei.allcommon.cbean.coption.LikeSearchOption likeSearchOption) { + registerLikeSearchQuery(ConditionKey.CK_LIKE_SEARCH, filterRemoveEmptyString(startdate), getCValueStartdate(), COL_STARTDATE, J_Startdate, UJ_startdate, likeSearchOption); + } + + /** + * Set the value of startdate using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param startdateList The value of startdate as inScope. + */ + public void setStartdate_InScope(java.util.List startdateList) { + registerStartdate(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyStringFromList(startdateList)); + } + + /** + * Set the value of startdate using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param startdate The value of startdate as inScope. + */ + public void setStartdate_InScope(String startdate, jp.sf.pal.pompei.allcommon.cbean.coption.InScopeOption option) { + registerInScopeQuery(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyString(startdate), getCValueStartdate(), COL_STARTDATE, J_Startdate, UJ_startdate, option); + } + + /** + * Set the value of startdate using notInScope. { not in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param startdateList The value of startdate as notInScope. + */ + public void setStartdate_NotInScope(java.util.List startdateList) { + registerStartdate(ConditionKey.CK_NOT_IN_SCOPE, filterRemoveEmptyStringFromList(startdateList)); + } + + /** + * Set the value of startdate using isNull. { is null } + */ + public void setStartdate_IsNull() { + registerStartdate(ConditionKey.CK_IS_NULL, DUMMY_OBJECT); + } + + /** + * Set the value of startdate using isNotNull. { is not null } + */ + public void setStartdate_IsNotNull() { + registerStartdate(ConditionKey.CK_IS_NOT_NULL, DUMMY_OBJECT); + } + + /** + * Register condition of startdate. + * + * @param key Condition key. (NotNull) + * @param value The value of startdate. (Nullable) + */ + protected void registerStartdate(ConditionKey key, Object value) { + registerQuery(key, value, getCValueStartdate(), COL_STARTDATE, J_Startdate, UJ_startdate); + } + + /** + * Register inline condition of startdate. + * + * @param key Condition key. (NotNull) + * @param value The value of startdate. (Nullable) + */ + protected void registerInlineStartdate(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueStartdate(), COL_STARTDATE, J_Startdate, UJ_startdate); + } + + abstract protected ConditionValue getCValueStartdate(); + + /** Column db name of counter. */ + protected static final String COL_COUNTER = "COUNTER"; + + /** Column java name of counter. */ + protected static final String J_Counter = "Counter"; + + /** Column uncapitalised java name of counter. */ + protected static final String UJ_counter = "counter"; + + /** + * Set the value of counter using equal. { = } + * + * @param counter The value of counter as equal. + */ + public void setCounter_Equal(java.math.BigDecimal counter) { + registerCounter(ConditionKey.CK_EQUAL, counter); + } + + /** + * Set the value of counter using notEqual. { != } + * + * @param counter The value of counter as notEqual. + */ + public void setCounter_NotEqual(java.math.BigDecimal counter) { + registerCounter(ConditionKey.CK_NOT_EQUAL, counter); + } + + /** + * Set the value of counter using greaterThan. { > } + * + * @param counter The value of counter as greaterThan. + */ + public void setCounter_GreaterThan(java.math.BigDecimal counter) { + registerCounter(ConditionKey.CK_GREATER_THAN, counter); + } + + /** + * Set the value of counter using lessThan. { < } + * + * @param counter The value of counter as lessThan. + */ + public void setCounter_LessThan(java.math.BigDecimal counter) { + registerCounter(ConditionKey.CK_LESS_THAN, counter); + } + + /** + * Set the value of counter using greaterEqual. { >= } + * + * @param counter The value of counter as greaterEqual. + */ + public void setCounter_GreaterEqual(java.math.BigDecimal counter) { + registerCounter(ConditionKey.CK_GREATER_EQUAL, counter); + } + + /** + * Set the value of counter using lessEqual. { <= } + * + * @param counter The value of counter as lessEqual. + */ + public void setCounter_LessEqual(java.math.BigDecimal counter) { + registerCounter(ConditionKey.CK_LESS_EQUAL, counter); + } + + /** + * Set the value of counter using inScope. { in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param counterList The value of counter as inScope. + */ + public void setCounter_InScope(java.util.List counterList) { + registerCounter(ConditionKey.CK_IN_SCOPE, counterList); + } + + /** + * Set the value of counter using notInScope. { not in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param counterList The value of counter as notInScope. + */ + public void setCounter_NotInScope(java.util.List counterList) { + registerCounter(ConditionKey.CK_NOT_IN_SCOPE, counterList); + } + + /** + * Set the value of counter using isNull. { is null } + */ + public void setCounter_IsNull() { + registerCounter(ConditionKey.CK_IS_NULL, DUMMY_OBJECT); + } + + /** + * Set the value of counter using isNotNull. { is not null } + */ + public void setCounter_IsNotNull() { + registerCounter(ConditionKey.CK_IS_NOT_NULL, DUMMY_OBJECT); + } + + /** + * Register condition of counter. + * + * @param key Condition key. (NotNull) + * @param value The value of counter. (Nullable) + */ + protected void registerCounter(ConditionKey key, Object value) { + registerQuery(key, value, getCValueCounter(), COL_COUNTER, J_Counter, UJ_counter); + } + + /** + * Register inline condition of counter. + * + * @param key Condition key. (NotNull) + * @param value The value of counter. (Nullable) + */ + protected void registerInlineCounter(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueCounter(), COL_COUNTER, J_Counter, UJ_counter); + } + + abstract protected ConditionValue getCValueCounter(); + + // =================================================================================== + // Basic Override + // ============== + /** + * This method overrides the method that is declared at super. + * + * @return Clause string. (NotNull) + */ + public String toString() { + return getSqlClause().getClause(); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/AbstractBsCounterHistoryCQ.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/AbstractBsCounterHistoryCQ.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/AbstractBsCounterHistoryCQ.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,342 @@ + +package jp.sf.pal.pompei.cbean.cq.bs; + + + +import jp.sf.pal.pompei.allcommon.cbean.*; +import jp.sf.pal.pompei.allcommon.cbean.ckey.*; +import jp.sf.pal.pompei.allcommon.cbean.cvalue.ConditionValue; +import jp.sf.pal.pompei.allcommon.cbean.sqlclause.SqlClause; +import jp.sf.pal.pompei.cbean.cq.*; + +/** + * The condition-query of COUNTER_HISTORY. + * + * @author DBFlute(AutoGenerator) + */ +public abstract class AbstractBsCounterHistoryCQ extends AbstractConditionQuery { + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param childQuery Child query as abstract class. (Nullable: If null, this is base instance.) + * @param sqlClause SQL clause instance. (NotNull) + * @param aliasName My alias name. (NotNull) + * @param nestLevel Nest level. + */ + public AbstractBsCounterHistoryCQ(ConditionQuery childQuery, SqlClause sqlClause, String aliasName, int nestLevel) { + super(childQuery, sqlClause, aliasName, nestLevel); + } + + // =================================================================================== + // Table Name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + final public String getTableDbName() { + return "COUNTER_HISTORY"; + } + + // =================================================================================== + // Query + // ===== + + // /* * * * * * * * * * * * * * * * * * * * * * * + // MyTable = [COUNTER_HISTORY] + // * * * * * * * * */ + + + /** Column db name of month. */ + protected static final String COL_MONTH = "MONTH"; + + /** Column java name of month. */ + protected static final String J_Month = "Month"; + + /** Column uncapitalised java name of month. */ + protected static final String UJ_month = "month"; + + /** + * Set the value of month using equal. { = } + * If the value is null or empty-string, this condition is ignored. + * + * @param month The value of month as equal. + */ + public void setMonth_Equal(String month) { + registerMonth(ConditionKey.CK_EQUAL, filterRemoveEmptyString(month)); + } + + /** + * Set the value of month using notEqual. { != } + * If the value is null or empty-string, this condition is ignored. + * + * @param month The value of month as notEqual. + */ + public void setMonth_NotEqual(String month) { + registerMonth(ConditionKey.CK_NOT_EQUAL, filterRemoveEmptyString(month)); + } + + /** + * Set the value of month using greaterThan. { > } + * If the value is null or empty-string, this condition is ignored. + * + * @param month The value of month as greaterThan. + */ + public void setMonth_GreaterThan(String month) { + registerMonth(ConditionKey.CK_GREATER_THAN, filterRemoveEmptyString(month)); + } + + /** + * Set the value of month using lessThan. { < } + * If the value is null or empty-string, this condition is ignored. + * + * @param month The value of month as lessThan. + */ + public void setMonth_LessThan(String month) { + registerMonth(ConditionKey.CK_LESS_THAN, filterRemoveEmptyString(month)); + } + + /** + * Set the value of month using greaterEqual. { >= } + * If the value is null or empty-string, this condition is ignored. + * + * @param month The value of month as greaterEqual. + */ + public void setMonth_GreaterEqual(String month) { + registerMonth(ConditionKey.CK_GREATER_EQUAL, filterRemoveEmptyString(month)); + } + + /** + * Set the value of month using lessEqual. { <= } + * If the value is null or empty-string, this condition is ignored. + * + * @param month The value of month as lessEqual. + */ + public void setMonth_LessEqual(String month) { + registerMonth(ConditionKey.CK_LESS_EQUAL, filterRemoveEmptyString(month)); + } + + /** + * Set the value of month using prefixSearch. { like 'xxx%' } + * If the value is null or empty-string, this condition is ignored. + * + * @param month The value of month as prefixSearch. + */ + public void setMonth_PrefixSearch(String month) { + registerMonth(ConditionKey.CK_PREFIX_SEARCH, filterRemoveEmptyString(month)); + } + + /** + * Set the value of month using likeSearch. { like '%xxx%' } + * If the value is null or empty-string, this condition is ignored. + * You can invoke this method several times and the conditions are set up. + * + * @param month The value of month as likeSearch. + * @param likeSearchOption Like search option. (NotNull) + */ + public void setMonth_LikeSearch(String month, jp.sf.pal.pompei.allcommon.cbean.coption.LikeSearchOption likeSearchOption) { + registerLikeSearchQuery(ConditionKey.CK_LIKE_SEARCH, filterRemoveEmptyString(month), getCValueMonth(), COL_MONTH, J_Month, UJ_month, likeSearchOption); + } + + /** + * Set the value of month using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param monthList The value of month as inScope. + */ + public void setMonth_InScope(java.util.List monthList) { + registerMonth(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyStringFromList(monthList)); + } + + /** + * Set the value of month using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param month The value of month as inScope. + */ + public void setMonth_InScope(String month, jp.sf.pal.pompei.allcommon.cbean.coption.InScopeOption option) { + registerInScopeQuery(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyString(month), getCValueMonth(), COL_MONTH, J_Month, UJ_month, option); + } + + /** + * Set the value of month using notInScope. { not in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param monthList The value of month as notInScope. + */ + public void setMonth_NotInScope(java.util.List monthList) { + registerMonth(ConditionKey.CK_NOT_IN_SCOPE, filterRemoveEmptyStringFromList(monthList)); + } + + /** + * Set the value of month using isNull. { is null } + */ + public void setMonth_IsNull() { + registerMonth(ConditionKey.CK_IS_NULL, DUMMY_OBJECT); + } + + /** + * Set the value of month using isNotNull. { is not null } + */ + public void setMonth_IsNotNull() { + registerMonth(ConditionKey.CK_IS_NOT_NULL, DUMMY_OBJECT); + } + + /** + * Register condition of month. + * + * @param key Condition key. (NotNull) + * @param value The value of month. (Nullable) + */ + protected void registerMonth(ConditionKey key, Object value) { + registerQuery(key, value, getCValueMonth(), COL_MONTH, J_Month, UJ_month); + } + + /** + * Register inline condition of month. + * + * @param key Condition key. (NotNull) + * @param value The value of month. (Nullable) + */ + protected void registerInlineMonth(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueMonth(), COL_MONTH, J_Month, UJ_month); + } + + abstract protected ConditionValue getCValueMonth(); + + /** Column db name of counter. */ + protected static final String COL_COUNTER = "COUNTER"; + + /** Column java name of counter. */ + protected static final String J_Counter = "Counter"; + + /** Column uncapitalised java name of counter. */ + protected static final String UJ_counter = "counter"; + + /** + * Set the value of counter using equal. { = } + * + * @param counter The value of counter as equal. + */ + public void setCounter_Equal(java.math.BigDecimal counter) { + registerCounter(ConditionKey.CK_EQUAL, counter); + } + + /** + * Set the value of counter using notEqual. { != } + * + * @param counter The value of counter as notEqual. + */ + public void setCounter_NotEqual(java.math.BigDecimal counter) { + registerCounter(ConditionKey.CK_NOT_EQUAL, counter); + } + + /** + * Set the value of counter using greaterThan. { > } + * + * @param counter The value of counter as greaterThan. + */ + public void setCounter_GreaterThan(java.math.BigDecimal counter) { + registerCounter(ConditionKey.CK_GREATER_THAN, counter); + } + + /** + * Set the value of counter using lessThan. { < } + * + * @param counter The value of counter as lessThan. + */ + public void setCounter_LessThan(java.math.BigDecimal counter) { + registerCounter(ConditionKey.CK_LESS_THAN, counter); + } + + /** + * Set the value of counter using greaterEqual. { >= } + * + * @param counter The value of counter as greaterEqual. + */ + public void setCounter_GreaterEqual(java.math.BigDecimal counter) { + registerCounter(ConditionKey.CK_GREATER_EQUAL, counter); + } + + /** + * Set the value of counter using lessEqual. { <= } + * + * @param counter The value of counter as lessEqual. + */ + public void setCounter_LessEqual(java.math.BigDecimal counter) { + registerCounter(ConditionKey.CK_LESS_EQUAL, counter); + } + + /** + * Set the value of counter using inScope. { in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param counterList The value of counter as inScope. + */ + public void setCounter_InScope(java.util.List counterList) { + registerCounter(ConditionKey.CK_IN_SCOPE, counterList); + } + + /** + * Set the value of counter using notInScope. { not in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param counterList The value of counter as notInScope. + */ + public void setCounter_NotInScope(java.util.List counterList) { + registerCounter(ConditionKey.CK_NOT_IN_SCOPE, counterList); + } + + /** + * Set the value of counter using isNull. { is null } + */ + public void setCounter_IsNull() { + registerCounter(ConditionKey.CK_IS_NULL, DUMMY_OBJECT); + } + + /** + * Set the value of counter using isNotNull. { is not null } + */ + public void setCounter_IsNotNull() { + registerCounter(ConditionKey.CK_IS_NOT_NULL, DUMMY_OBJECT); + } + + /** + * Register condition of counter. + * + * @param key Condition key. (NotNull) + * @param value The value of counter. (Nullable) + */ + protected void registerCounter(ConditionKey key, Object value) { + registerQuery(key, value, getCValueCounter(), COL_COUNTER, J_Counter, UJ_counter); + } + + /** + * Register inline condition of counter. + * + * @param key Condition key. (NotNull) + * @param value The value of counter. (Nullable) + */ + protected void registerInlineCounter(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueCounter(), COL_COUNTER, J_Counter, UJ_counter); + } + + abstract protected ConditionValue getCValueCounter(); + + // =================================================================================== + // Basic Override + // ============== + /** + * This method overrides the method that is declared at super. + * + * @return Clause string. (NotNull) + */ + public String toString() { + return getSqlClause().getClause(); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/AbstractBsCountriesCQ.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/AbstractBsCountriesCQ.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/AbstractBsCountriesCQ.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,705 @@ + +package jp.sf.pal.pompei.cbean.cq.bs; + + + +import jp.sf.pal.pompei.allcommon.cbean.*; +import jp.sf.pal.pompei.allcommon.cbean.ckey.*; +import jp.sf.pal.pompei.allcommon.cbean.cvalue.ConditionValue; +import jp.sf.pal.pompei.allcommon.cbean.sqlclause.SqlClause; +import jp.sf.pal.pompei.cbean.cq.*; + +/** + * The condition-query of COUNTRIES. + * + * @author DBFlute(AutoGenerator) + */ +public abstract class AbstractBsCountriesCQ extends AbstractConditionQuery { + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param childQuery Child query as abstract class. (Nullable: If null, this is base instance.) + * @param sqlClause SQL clause instance. (NotNull) + * @param aliasName My alias name. (NotNull) + * @param nestLevel Nest level. + */ + public AbstractBsCountriesCQ(ConditionQuery childQuery, SqlClause sqlClause, String aliasName, int nestLevel) { + super(childQuery, sqlClause, aliasName, nestLevel); + } + + // =================================================================================== + // Table Name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + final public String getTableDbName() { + return "COUNTRIES"; + } + + // =================================================================================== + // Query + // ===== + + // /* * * * * * * * * * * * * * * * * * * * * * * + // MyTable = [COUNTRIES] + // * * * * * * * * */ + + + /** Column db name of countriesId. */ + protected static final String COL_COUNTRIES_ID = "COUNTRIES_ID"; + + /** Column java name of countriesId. */ + protected static final String J_CountriesId = "CountriesId"; + + /** Column uncapitalised java name of countriesId. */ + protected static final String UJ_countriesId = "countriesId"; + + /** + * Set the value of countriesId using equal. { = } + * + * @param countriesId The value of countriesId as equal. + */ + public void setCountriesId_Equal(java.math.BigDecimal countriesId) { + registerCountriesId(ConditionKey.CK_EQUAL, countriesId); + } + + /** + * Set the value of countriesId using notEqual. { != } + * + * @param countriesId The value of countriesId as notEqual. + */ + public void setCountriesId_NotEqual(java.math.BigDecimal countriesId) { + registerCountriesId(ConditionKey.CK_NOT_EQUAL, countriesId); + } + + /** + * Set the value of countriesId using greaterThan. { > } + * + * @param countriesId The value of countriesId as greaterThan. + */ + public void setCountriesId_GreaterThan(java.math.BigDecimal countriesId) { + registerCountriesId(ConditionKey.CK_GREATER_THAN, countriesId); + } + + /** + * Set the value of countriesId using lessThan. { < } + * + * @param countriesId The value of countriesId as lessThan. + */ + public void setCountriesId_LessThan(java.math.BigDecimal countriesId) { + registerCountriesId(ConditionKey.CK_LESS_THAN, countriesId); + } + + /** + * Set the value of countriesId using greaterEqual. { >= } + * + * @param countriesId The value of countriesId as greaterEqual. + */ + public void setCountriesId_GreaterEqual(java.math.BigDecimal countriesId) { + registerCountriesId(ConditionKey.CK_GREATER_EQUAL, countriesId); + } + + /** + * Set the value of countriesId using lessEqual. { <= } + * + * @param countriesId The value of countriesId as lessEqual. + */ + public void setCountriesId_LessEqual(java.math.BigDecimal countriesId) { + registerCountriesId(ConditionKey.CK_LESS_EQUAL, countriesId); + } + + /** + * Set the value of countriesId using inScope. { in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param countriesIdList The value of countriesId as inScope. + */ + public void setCountriesId_InScope(java.util.List countriesIdList) { + registerCountriesId(ConditionKey.CK_IN_SCOPE, countriesIdList); + } + + /** + * Set the value of countriesId using notInScope. { not in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param countriesIdList The value of countriesId as notInScope. + */ + public void setCountriesId_NotInScope(java.util.List countriesIdList) { + registerCountriesId(ConditionKey.CK_NOT_IN_SCOPE, countriesIdList); + } + + /** + * Register condition of countriesId. + * + * @param key Condition key. (NotNull) + * @param value The value of countriesId. (Nullable) + */ + protected void registerCountriesId(ConditionKey key, Object value) { + registerQuery(key, value, getCValueCountriesId(), COL_COUNTRIES_ID, J_CountriesId, UJ_countriesId); + } + + /** + * Register inline condition of countriesId. + * + * @param key Condition key. (NotNull) + * @param value The value of countriesId. (Nullable) + */ + protected void registerInlineCountriesId(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueCountriesId(), COL_COUNTRIES_ID, J_CountriesId, UJ_countriesId); + } + + abstract protected ConditionValue getCValueCountriesId(); + + /** Column db name of countriesName. */ + protected static final String COL_COUNTRIES_NAME = "COUNTRIES_NAME"; + + /** Column java name of countriesName. */ + protected static final String J_CountriesName = "CountriesName"; + + /** Column uncapitalised java name of countriesName. */ + protected static final String UJ_countriesName = "countriesName"; + + /** + * Set the value of countriesName using equal. { = } + * If the value is null or empty-string, this condition is ignored. + * + * @param countriesName The value of countriesName as equal. + */ + public void setCountriesName_Equal(String countriesName) { + registerCountriesName(ConditionKey.CK_EQUAL, filterRemoveEmptyString(countriesName)); + } + + /** + * Set the value of countriesName using notEqual. { != } + * If the value is null or empty-string, this condition is ignored. + * + * @param countriesName The value of countriesName as notEqual. + */ + public void setCountriesName_NotEqual(String countriesName) { + registerCountriesName(ConditionKey.CK_NOT_EQUAL, filterRemoveEmptyString(countriesName)); + } + + /** + * Set the value of countriesName using greaterThan. { > } + * If the value is null or empty-string, this condition is ignored. + * + * @param countriesName The value of countriesName as greaterThan. + */ + public void setCountriesName_GreaterThan(String countriesName) { + registerCountriesName(ConditionKey.CK_GREATER_THAN, filterRemoveEmptyString(countriesName)); + } + + /** + * Set the value of countriesName using lessThan. { < } + * If the value is null or empty-string, this condition is ignored. + * + * @param countriesName The value of countriesName as lessThan. + */ + public void setCountriesName_LessThan(String countriesName) { + registerCountriesName(ConditionKey.CK_LESS_THAN, filterRemoveEmptyString(countriesName)); + } + + /** + * Set the value of countriesName using greaterEqual. { >= } + * If the value is null or empty-string, this condition is ignored. + * + * @param countriesName The value of countriesName as greaterEqual. + */ + public void setCountriesName_GreaterEqual(String countriesName) { + registerCountriesName(ConditionKey.CK_GREATER_EQUAL, filterRemoveEmptyString(countriesName)); + } + + /** + * Set the value of countriesName using lessEqual. { <= } + * If the value is null or empty-string, this condition is ignored. + * + * @param countriesName The value of countriesName as lessEqual. + */ + public void setCountriesName_LessEqual(String countriesName) { + registerCountriesName(ConditionKey.CK_LESS_EQUAL, filterRemoveEmptyString(countriesName)); + } + + /** + * Set the value of countriesName using prefixSearch. { like 'xxx%' } + * If the value is null or empty-string, this condition is ignored. + * + * @param countriesName The value of countriesName as prefixSearch. + */ + public void setCountriesName_PrefixSearch(String countriesName) { + registerCountriesName(ConditionKey.CK_PREFIX_SEARCH, filterRemoveEmptyString(countriesName)); + } + + /** + * Set the value of countriesName using likeSearch. { like '%xxx%' } + * If the value is null or empty-string, this condition is ignored. + * You can invoke this method several times and the conditions are set up. + * + * @param countriesName The value of countriesName as likeSearch. + * @param likeSearchOption Like search option. (NotNull) + */ + public void setCountriesName_LikeSearch(String countriesName, jp.sf.pal.pompei.allcommon.cbean.coption.LikeSearchOption likeSearchOption) { + registerLikeSearchQuery(ConditionKey.CK_LIKE_SEARCH, filterRemoveEmptyString(countriesName), getCValueCountriesName(), COL_COUNTRIES_NAME, J_CountriesName, UJ_countriesName, likeSearchOption); + } + + /** + * Set the value of countriesName using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param countriesNameList The value of countriesName as inScope. + */ + public void setCountriesName_InScope(java.util.List countriesNameList) { + registerCountriesName(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyStringFromList(countriesNameList)); + } + + /** + * Set the value of countriesName using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param countriesName The value of countriesName as inScope. + */ + public void setCountriesName_InScope(String countriesName, jp.sf.pal.pompei.allcommon.cbean.coption.InScopeOption option) { + registerInScopeQuery(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyString(countriesName), getCValueCountriesName(), COL_COUNTRIES_NAME, J_CountriesName, UJ_countriesName, option); + } + + /** + * Set the value of countriesName using notInScope. { not in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param countriesNameList The value of countriesName as notInScope. + */ + public void setCountriesName_NotInScope(java.util.List countriesNameList) { + registerCountriesName(ConditionKey.CK_NOT_IN_SCOPE, filterRemoveEmptyStringFromList(countriesNameList)); + } + + /** + * Register condition of countriesName. + * + * @param key Condition key. (NotNull) + * @param value The value of countriesName. (Nullable) + */ + protected void registerCountriesName(ConditionKey key, Object value) { + registerQuery(key, value, getCValueCountriesName(), COL_COUNTRIES_NAME, J_CountriesName, UJ_countriesName); + } + + /** + * Register inline condition of countriesName. + * + * @param key Condition key. (NotNull) + * @param value The value of countriesName. (Nullable) + */ + protected void registerInlineCountriesName(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueCountriesName(), COL_COUNTRIES_NAME, J_CountriesName, UJ_countriesName); + } + + abstract protected ConditionValue getCValueCountriesName(); + + /** Column db name of countriesIsoCode2. */ + protected static final String COL_COUNTRIES_ISO_CODE_2 = "COUNTRIES_ISO_CODE_2"; + + /** Column java name of countriesIsoCode2. */ + protected static final String J_CountriesIsoCode2 = "CountriesIsoCode2"; + + /** Column uncapitalised java name of countriesIsoCode2. */ + protected static final String UJ_countriesIsoCode2 = "countriesIsoCode2"; + + /** + * Set the value of countriesIsoCode2 using equal. { = } + * If the value is null or empty-string, this condition is ignored. + * + * @param countriesIsoCode2 The value of countriesIsoCode2 as equal. + */ + public void setCountriesIsoCode2_Equal(String countriesIsoCode2) { + registerCountriesIsoCode2(ConditionKey.CK_EQUAL, filterRemoveEmptyString(countriesIsoCode2)); + } + + /** + * Set the value of countriesIsoCode2 using notEqual. { != } + * If the value is null or empty-string, this condition is ignored. + * + * @param countriesIsoCode2 The value of countriesIsoCode2 as notEqual. + */ + public void setCountriesIsoCode2_NotEqual(String countriesIsoCode2) { + registerCountriesIsoCode2(ConditionKey.CK_NOT_EQUAL, filterRemoveEmptyString(countriesIsoCode2)); + } + + /** + * Set the value of countriesIsoCode2 using greaterThan. { > } + * If the value is null or empty-string, this condition is ignored. + * + * @param countriesIsoCode2 The value of countriesIsoCode2 as greaterThan. + */ + public void setCountriesIsoCode2_GreaterThan(String countriesIsoCode2) { + registerCountriesIsoCode2(ConditionKey.CK_GREATER_THAN, filterRemoveEmptyString(countriesIsoCode2)); + } + + /** + * Set the value of countriesIsoCode2 using lessThan. { < } + * If the value is null or empty-string, this condition is ignored. + * + * @param countriesIsoCode2 The value of countriesIsoCode2 as lessThan. + */ + public void setCountriesIsoCode2_LessThan(String countriesIsoCode2) { + registerCountriesIsoCode2(ConditionKey.CK_LESS_THAN, filterRemoveEmptyString(countriesIsoCode2)); + } + + /** + * Set the value of countriesIsoCode2 using greaterEqual. { >= } + * If the value is null or empty-string, this condition is ignored. + * + * @param countriesIsoCode2 The value of countriesIsoCode2 as greaterEqual. + */ + public void setCountriesIsoCode2_GreaterEqual(String countriesIsoCode2) { + registerCountriesIsoCode2(ConditionKey.CK_GREATER_EQUAL, filterRemoveEmptyString(countriesIsoCode2)); + } + + /** + * Set the value of countriesIsoCode2 using lessEqual. { <= } + * If the value is null or empty-string, this condition is ignored. + * + * @param countriesIsoCode2 The value of countriesIsoCode2 as lessEqual. + */ + public void setCountriesIsoCode2_LessEqual(String countriesIsoCode2) { + registerCountriesIsoCode2(ConditionKey.CK_LESS_EQUAL, filterRemoveEmptyString(countriesIsoCode2)); + } + + /** + * Set the value of countriesIsoCode2 using prefixSearch. { like 'xxx%' } + * If the value is null or empty-string, this condition is ignored. + * + * @param countriesIsoCode2 The value of countriesIsoCode2 as prefixSearch. + */ + public void setCountriesIsoCode2_PrefixSearch(String countriesIsoCode2) { + registerCountriesIsoCode2(ConditionKey.CK_PREFIX_SEARCH, filterRemoveEmptyString(countriesIsoCode2)); + } + + /** + * Set the value of countriesIsoCode2 using likeSearch. { like '%xxx%' } + * If the value is null or empty-string, this condition is ignored. + * You can invoke this method several times and the conditions are set up. + * + * @param countriesIsoCode2 The value of countriesIsoCode2 as likeSearch. + * @param likeSearchOption Like search option. (NotNull) + */ + public void setCountriesIsoCode2_LikeSearch(String countriesIsoCode2, jp.sf.pal.pompei.allcommon.cbean.coption.LikeSearchOption likeSearchOption) { + registerLikeSearchQuery(ConditionKey.CK_LIKE_SEARCH, filterRemoveEmptyString(countriesIsoCode2), getCValueCountriesIsoCode2(), COL_COUNTRIES_ISO_CODE_2, J_CountriesIsoCode2, UJ_countriesIsoCode2, likeSearchOption); + } + + /** + * Set the value of countriesIsoCode2 using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param countriesIsoCode2List The value of countriesIsoCode2 as inScope. + */ + public void setCountriesIsoCode2_InScope(java.util.List countriesIsoCode2List) { + registerCountriesIsoCode2(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyStringFromList(countriesIsoCode2List)); + } + + /** + * Set the value of countriesIsoCode2 using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param countriesIsoCode2 The value of countriesIsoCode2 as inScope. + */ + public void setCountriesIsoCode2_InScope(String countriesIsoCode2, jp.sf.pal.pompei.allcommon.cbean.coption.InScopeOption option) { + registerInScopeQuery(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyString(countriesIsoCode2), getCValueCountriesIsoCode2(), COL_COUNTRIES_ISO_CODE_2, J_CountriesIsoCode2, UJ_countriesIsoCode2, option); + } + + /** + * Set the value of countriesIsoCode2 using notInScope. { not in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param countriesIsoCode2List The value of countriesIsoCode2 as notInScope. + */ + public void setCountriesIsoCode2_NotInScope(java.util.List countriesIsoCode2List) { + registerCountriesIsoCode2(ConditionKey.CK_NOT_IN_SCOPE, filterRemoveEmptyStringFromList(countriesIsoCode2List)); + } + + /** + * Register condition of countriesIsoCode2. + * + * @param key Condition key. (NotNull) + * @param value The value of countriesIsoCode2. (Nullable) + */ + protected void registerCountriesIsoCode2(ConditionKey key, Object value) { + registerQuery(key, value, getCValueCountriesIsoCode2(), COL_COUNTRIES_ISO_CODE_2, J_CountriesIsoCode2, UJ_countriesIsoCode2); + } + + /** + * Register inline condition of countriesIsoCode2. + * + * @param key Condition key. (NotNull) + * @param value The value of countriesIsoCode2. (Nullable) + */ + protected void registerInlineCountriesIsoCode2(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueCountriesIsoCode2(), COL_COUNTRIES_ISO_CODE_2, J_CountriesIsoCode2, UJ_countriesIsoCode2); + } + + abstract protected ConditionValue getCValueCountriesIsoCode2(); + + /** Column db name of countriesIsoCode3. */ + protected static final String COL_COUNTRIES_ISO_CODE_3 = "COUNTRIES_ISO_CODE_3"; + + /** Column java name of countriesIsoCode3. */ + protected static final String J_CountriesIsoCode3 = "CountriesIsoCode3"; + + /** Column uncapitalised java name of countriesIsoCode3. */ + protected static final String UJ_countriesIsoCode3 = "countriesIsoCode3"; + + /** + * Set the value of countriesIsoCode3 using equal. { = } + * If the value is null or empty-string, this condition is ignored. + * + * @param countriesIsoCode3 The value of countriesIsoCode3 as equal. + */ + public void setCountriesIsoCode3_Equal(String countriesIsoCode3) { + registerCountriesIsoCode3(ConditionKey.CK_EQUAL, filterRemoveEmptyString(countriesIsoCode3)); + } + + /** + * Set the value of countriesIsoCode3 using notEqual. { != } + * If the value is null or empty-string, this condition is ignored. + * + * @param countriesIsoCode3 The value of countriesIsoCode3 as notEqual. + */ + public void setCountriesIsoCode3_NotEqual(String countriesIsoCode3) { + registerCountriesIsoCode3(ConditionKey.CK_NOT_EQUAL, filterRemoveEmptyString(countriesIsoCode3)); + } + + /** + * Set the value of countriesIsoCode3 using greaterThan. { > } + * If the value is null or empty-string, this condition is ignored. + * + * @param countriesIsoCode3 The value of countriesIsoCode3 as greaterThan. + */ + public void setCountriesIsoCode3_GreaterThan(String countriesIsoCode3) { + registerCountriesIsoCode3(ConditionKey.CK_GREATER_THAN, filterRemoveEmptyString(countriesIsoCode3)); + } + + /** + * Set the value of countriesIsoCode3 using lessThan. { < } + * If the value is null or empty-string, this condition is ignored. + * + * @param countriesIsoCode3 The value of countriesIsoCode3 as lessThan. + */ + public void setCountriesIsoCode3_LessThan(String countriesIsoCode3) { + registerCountriesIsoCode3(ConditionKey.CK_LESS_THAN, filterRemoveEmptyString(countriesIsoCode3)); + } + + /** + * Set the value of countriesIsoCode3 using greaterEqual. { >= } + * If the value is null or empty-string, this condition is ignored. + * + * @param countriesIsoCode3 The value of countriesIsoCode3 as greaterEqual. + */ + public void setCountriesIsoCode3_GreaterEqual(String countriesIsoCode3) { + registerCountriesIsoCode3(ConditionKey.CK_GREATER_EQUAL, filterRemoveEmptyString(countriesIsoCode3)); + } + + /** + * Set the value of countriesIsoCode3 using lessEqual. { <= } + * If the value is null or empty-string, this condition is ignored. + * + * @param countriesIsoCode3 The value of countriesIsoCode3 as lessEqual. + */ + public void setCountriesIsoCode3_LessEqual(String countriesIsoCode3) { + registerCountriesIsoCode3(ConditionKey.CK_LESS_EQUAL, filterRemoveEmptyString(countriesIsoCode3)); + } + + /** + * Set the value of countriesIsoCode3 using prefixSearch. { like 'xxx%' } + * If the value is null or empty-string, this condition is ignored. + * + * @param countriesIsoCode3 The value of countriesIsoCode3 as prefixSearch. + */ + public void setCountriesIsoCode3_PrefixSearch(String countriesIsoCode3) { + registerCountriesIsoCode3(ConditionKey.CK_PREFIX_SEARCH, filterRemoveEmptyString(countriesIsoCode3)); + } + + /** + * Set the value of countriesIsoCode3 using likeSearch. { like '%xxx%' } + * If the value is null or empty-string, this condition is ignored. + * You can invoke this method several times and the conditions are set up. + * + * @param countriesIsoCode3 The value of countriesIsoCode3 as likeSearch. + * @param likeSearchOption Like search option. (NotNull) + */ + public void setCountriesIsoCode3_LikeSearch(String countriesIsoCode3, jp.sf.pal.pompei.allcommon.cbean.coption.LikeSearchOption likeSearchOption) { + registerLikeSearchQuery(ConditionKey.CK_LIKE_SEARCH, filterRemoveEmptyString(countriesIsoCode3), getCValueCountriesIsoCode3(), COL_COUNTRIES_ISO_CODE_3, J_CountriesIsoCode3, UJ_countriesIsoCode3, likeSearchOption); + } + + /** + * Set the value of countriesIsoCode3 using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param countriesIsoCode3List The value of countriesIsoCode3 as inScope. + */ + public void setCountriesIsoCode3_InScope(java.util.List countriesIsoCode3List) { + registerCountriesIsoCode3(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyStringFromList(countriesIsoCode3List)); + } + + /** + * Set the value of countriesIsoCode3 using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param countriesIsoCode3 The value of countriesIsoCode3 as inScope. + */ + public void setCountriesIsoCode3_InScope(String countriesIsoCode3, jp.sf.pal.pompei.allcommon.cbean.coption.InScopeOption option) { + registerInScopeQuery(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyString(countriesIsoCode3), getCValueCountriesIsoCode3(), COL_COUNTRIES_ISO_CODE_3, J_CountriesIsoCode3, UJ_countriesIsoCode3, option); + } + + /** + * Set the value of countriesIsoCode3 using notInScope. { not in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param countriesIsoCode3List The value of countriesIsoCode3 as notInScope. + */ + public void setCountriesIsoCode3_NotInScope(java.util.List countriesIsoCode3List) { + registerCountriesIsoCode3(ConditionKey.CK_NOT_IN_SCOPE, filterRemoveEmptyStringFromList(countriesIsoCode3List)); + } + + /** + * Register condition of countriesIsoCode3. + * + * @param key Condition key. (NotNull) + * @param value The value of countriesIsoCode3. (Nullable) + */ + protected void registerCountriesIsoCode3(ConditionKey key, Object value) { + registerQuery(key, value, getCValueCountriesIsoCode3(), COL_COUNTRIES_ISO_CODE_3, J_CountriesIsoCode3, UJ_countriesIsoCode3); + } + + /** + * Register inline condition of countriesIsoCode3. + * + * @param key Condition key. (NotNull) + * @param value The value of countriesIsoCode3. (Nullable) + */ + protected void registerInlineCountriesIsoCode3(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueCountriesIsoCode3(), COL_COUNTRIES_ISO_CODE_3, J_CountriesIsoCode3, UJ_countriesIsoCode3); + } + + abstract protected ConditionValue getCValueCountriesIsoCode3(); + + /** Column db name of addressFormatId. */ + protected static final String COL_ADDRESS_FORMAT_ID = "ADDRESS_FORMAT_ID"; + + /** Column java name of addressFormatId. */ + protected static final String J_AddressFormatId = "AddressFormatId"; + + /** Column uncapitalised java name of addressFormatId. */ + protected static final String UJ_addressFormatId = "addressFormatId"; + + /** + * Set the value of addressFormatId using equal. { = } + * + * @param addressFormatId The value of addressFormatId as equal. + */ + public void setAddressFormatId_Equal(java.math.BigDecimal addressFormatId) { + registerAddressFormatId(ConditionKey.CK_EQUAL, addressFormatId); + } + + /** + * Set the value of addressFormatId using notEqual. { != } + * + * @param addressFormatId The value of addressFormatId as notEqual. + */ + public void setAddressFormatId_NotEqual(java.math.BigDecimal addressFormatId) { + registerAddressFormatId(ConditionKey.CK_NOT_EQUAL, addressFormatId); + } + + /** + * Set the value of addressFormatId using greaterThan. { > } + * + * @param addressFormatId The value of addressFormatId as greaterThan. + */ + public void setAddressFormatId_GreaterThan(java.math.BigDecimal addressFormatId) { + registerAddressFormatId(ConditionKey.CK_GREATER_THAN, addressFormatId); + } + + /** + * Set the value of addressFormatId using lessThan. { < } + * + * @param addressFormatId The value of addressFormatId as lessThan. + */ + public void setAddressFormatId_LessThan(java.math.BigDecimal addressFormatId) { + registerAddressFormatId(ConditionKey.CK_LESS_THAN, addressFormatId); + } + + /** + * Set the value of addressFormatId using greaterEqual. { >= } + * + * @param addressFormatId The value of addressFormatId as greaterEqual. + */ + public void setAddressFormatId_GreaterEqual(java.math.BigDecimal addressFormatId) { + registerAddressFormatId(ConditionKey.CK_GREATER_EQUAL, addressFormatId); + } + + /** + * Set the value of addressFormatId using lessEqual. { <= } + * + * @param addressFormatId The value of addressFormatId as lessEqual. + */ + public void setAddressFormatId_LessEqual(java.math.BigDecimal addressFormatId) { + registerAddressFormatId(ConditionKey.CK_LESS_EQUAL, addressFormatId); + } + + /** + * Set the value of addressFormatId using inScope. { in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param addressFormatIdList The value of addressFormatId as inScope. + */ + public void setAddressFormatId_InScope(java.util.List addressFormatIdList) { + registerAddressFormatId(ConditionKey.CK_IN_SCOPE, addressFormatIdList); + } + + /** + * Set the value of addressFormatId using notInScope. { not in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param addressFormatIdList The value of addressFormatId as notInScope. + */ + public void setAddressFormatId_NotInScope(java.util.List addressFormatIdList) { + registerAddressFormatId(ConditionKey.CK_NOT_IN_SCOPE, addressFormatIdList); + } + + /** + * Register condition of addressFormatId. + * + * @param key Condition key. (NotNull) + * @param value The value of addressFormatId. (Nullable) + */ + protected void registerAddressFormatId(ConditionKey key, Object value) { + registerQuery(key, value, getCValueAddressFormatId(), COL_ADDRESS_FORMAT_ID, J_AddressFormatId, UJ_addressFormatId); + } + + /** + * Register inline condition of addressFormatId. + * + * @param key Condition key. (NotNull) + * @param value The value of addressFormatId. (Nullable) + */ + protected void registerInlineAddressFormatId(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueAddressFormatId(), COL_ADDRESS_FORMAT_ID, J_AddressFormatId, UJ_addressFormatId); + } + + abstract protected ConditionValue getCValueAddressFormatId(); + + // =================================================================================== + // Basic Override + // ============== + /** + * This method overrides the method that is declared at super. + * + * @return Clause string. (NotNull) + */ + public String toString() { + return getSqlClause().getClause(); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/AbstractBsCurrenciesCQ.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/AbstractBsCurrenciesCQ.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/AbstractBsCurrenciesCQ.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,1470 @@ + +package jp.sf.pal.pompei.cbean.cq.bs; + + + +import jp.sf.pal.pompei.allcommon.cbean.*; +import jp.sf.pal.pompei.allcommon.cbean.ckey.*; +import jp.sf.pal.pompei.allcommon.cbean.cvalue.ConditionValue; +import jp.sf.pal.pompei.allcommon.cbean.sqlclause.SqlClause; +import jp.sf.pal.pompei.cbean.cq.*; + +/** + * The condition-query of CURRENCIES. + * + * @author DBFlute(AutoGenerator) + */ +public abstract class AbstractBsCurrenciesCQ extends AbstractConditionQuery { + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param childQuery Child query as abstract class. (Nullable: If null, this is base instance.) + * @param sqlClause SQL clause instance. (NotNull) + * @param aliasName My alias name. (NotNull) + * @param nestLevel Nest level. + */ + public AbstractBsCurrenciesCQ(ConditionQuery childQuery, SqlClause sqlClause, String aliasName, int nestLevel) { + super(childQuery, sqlClause, aliasName, nestLevel); + } + + // =================================================================================== + // Table Name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + final public String getTableDbName() { + return "CURRENCIES"; + } + + // =================================================================================== + // Query + // ===== + + // /* * * * * * * * * * * * * * * * * * * * * * * + // MyTable = [CURRENCIES] + // * * * * * * * * */ + + + /** Column db name of currenciesId. */ + protected static final String COL_CURRENCIES_ID = "CURRENCIES_ID"; + + /** Column java name of currenciesId. */ + protected static final String J_CurrenciesId = "CurrenciesId"; + + /** Column uncapitalised java name of currenciesId. */ + protected static final String UJ_currenciesId = "currenciesId"; + + /** + * Set the value of currenciesId using equal. { = } + * + * @param currenciesId The value of currenciesId as equal. + */ + public void setCurrenciesId_Equal(java.math.BigDecimal currenciesId) { + registerCurrenciesId(ConditionKey.CK_EQUAL, currenciesId); + } + + /** + * Set the value of currenciesId using notEqual. { != } + * + * @param currenciesId The value of currenciesId as notEqual. + */ + public void setCurrenciesId_NotEqual(java.math.BigDecimal currenciesId) { + registerCurrenciesId(ConditionKey.CK_NOT_EQUAL, currenciesId); + } + + /** + * Set the value of currenciesId using greaterThan. { > } + * + * @param currenciesId The value of currenciesId as greaterThan. + */ + public void setCurrenciesId_GreaterThan(java.math.BigDecimal currenciesId) { + registerCurrenciesId(ConditionKey.CK_GREATER_THAN, currenciesId); + } + + /** + * Set the value of currenciesId using lessThan. { < } + * + * @param currenciesId The value of currenciesId as lessThan. + */ + public void setCurrenciesId_LessThan(java.math.BigDecimal currenciesId) { + registerCurrenciesId(ConditionKey.CK_LESS_THAN, currenciesId); + } + + /** + * Set the value of currenciesId using greaterEqual. { >= } + * + * @param currenciesId The value of currenciesId as greaterEqual. + */ + public void setCurrenciesId_GreaterEqual(java.math.BigDecimal currenciesId) { + registerCurrenciesId(ConditionKey.CK_GREATER_EQUAL, currenciesId); + } + + /** + * Set the value of currenciesId using lessEqual. { <= } + * + * @param currenciesId The value of currenciesId as lessEqual. + */ + public void setCurrenciesId_LessEqual(java.math.BigDecimal currenciesId) { + registerCurrenciesId(ConditionKey.CK_LESS_EQUAL, currenciesId); + } + + /** + * Set the value of currenciesId using inScope. { in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param currenciesIdList The value of currenciesId as inScope. + */ + public void setCurrenciesId_InScope(java.util.List currenciesIdList) { + registerCurrenciesId(ConditionKey.CK_IN_SCOPE, currenciesIdList); + } + + /** + * Set the value of currenciesId using notInScope. { not in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param currenciesIdList The value of currenciesId as notInScope. + */ + public void setCurrenciesId_NotInScope(java.util.List currenciesIdList) { + registerCurrenciesId(ConditionKey.CK_NOT_IN_SCOPE, currenciesIdList); + } + + /** + * Register condition of currenciesId. + * + * @param key Condition key. (NotNull) + * @param value The value of currenciesId. (Nullable) + */ + protected void registerCurrenciesId(ConditionKey key, Object value) { + registerQuery(key, value, getCValueCurrenciesId(), COL_CURRENCIES_ID, J_CurrenciesId, UJ_currenciesId); + } + + /** + * Register inline condition of currenciesId. + * + * @param key Condition key. (NotNull) + * @param value The value of currenciesId. (Nullable) + */ + protected void registerInlineCurrenciesId(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueCurrenciesId(), COL_CURRENCIES_ID, J_CurrenciesId, UJ_currenciesId); + } + + abstract protected ConditionValue getCValueCurrenciesId(); + + /** Column db name of title. */ + protected static final String COL_TITLE = "TITLE"; + + /** Column java name of title. */ + protected static final String J_Title = "Title"; + + /** Column uncapitalised java name of title. */ + protected static final String UJ_title = "title"; + + /** + * Set the value of title using equal. { = } + * If the value is null or empty-string, this condition is ignored. + * + * @param title The value of title as equal. + */ + public void setTitle_Equal(String title) { + registerTitle(ConditionKey.CK_EQUAL, filterRemoveEmptyString(title)); + } + + /** + * Set the value of title using notEqual. { != } + * If the value is null or empty-string, this condition is ignored. + * + * @param title The value of title as notEqual. + */ + public void setTitle_NotEqual(String title) { + registerTitle(ConditionKey.CK_NOT_EQUAL, filterRemoveEmptyString(title)); + } + + /** + * Set the value of title using greaterThan. { > } + * If the value is null or empty-string, this condition is ignored. + * + * @param title The value of title as greaterThan. + */ + public void setTitle_GreaterThan(String title) { + registerTitle(ConditionKey.CK_GREATER_THAN, filterRemoveEmptyString(title)); + } + + /** + * Set the value of title using lessThan. { < } + * If the value is null or empty-string, this condition is ignored. + * + * @param title The value of title as lessThan. + */ + public void setTitle_LessThan(String title) { + registerTitle(ConditionKey.CK_LESS_THAN, filterRemoveEmptyString(title)); + } + + /** + * Set the value of title using greaterEqual. { >= } + * If the value is null or empty-string, this condition is ignored. + * + * @param title The value of title as greaterEqual. + */ + public void setTitle_GreaterEqual(String title) { + registerTitle(ConditionKey.CK_GREATER_EQUAL, filterRemoveEmptyString(title)); + } + + /** + * Set the value of title using lessEqual. { <= } + * If the value is null or empty-string, this condition is ignored. + * + * @param title The value of title as lessEqual. + */ + public void setTitle_LessEqual(String title) { + registerTitle(ConditionKey.CK_LESS_EQUAL, filterRemoveEmptyString(title)); + } + + /** + * Set the value of title using prefixSearch. { like 'xxx%' } + * If the value is null or empty-string, this condition is ignored. + * + * @param title The value of title as prefixSearch. + */ + public void setTitle_PrefixSearch(String title) { + registerTitle(ConditionKey.CK_PREFIX_SEARCH, filterRemoveEmptyString(title)); + } + + /** + * Set the value of title using likeSearch. { like '%xxx%' } + * If the value is null or empty-string, this condition is ignored. + * You can invoke this method several times and the conditions are set up. + * + * @param title The value of title as likeSearch. + * @param likeSearchOption Like search option. (NotNull) + */ + public void setTitle_LikeSearch(String title, jp.sf.pal.pompei.allcommon.cbean.coption.LikeSearchOption likeSearchOption) { + registerLikeSearchQuery(ConditionKey.CK_LIKE_SEARCH, filterRemoveEmptyString(title), getCValueTitle(), COL_TITLE, J_Title, UJ_title, likeSearchOption); + } + + /** + * Set the value of title using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param titleList The value of title as inScope. + */ + public void setTitle_InScope(java.util.List titleList) { + registerTitle(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyStringFromList(titleList)); + } + + /** + * Set the value of title using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param title The value of title as inScope. + */ + public void setTitle_InScope(String title, jp.sf.pal.pompei.allcommon.cbean.coption.InScopeOption option) { + registerInScopeQuery(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyString(title), getCValueTitle(), COL_TITLE, J_Title, UJ_title, option); + } + + /** + * Set the value of title using notInScope. { not in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param titleList The value of title as notInScope. + */ + public void setTitle_NotInScope(java.util.List titleList) { + registerTitle(ConditionKey.CK_NOT_IN_SCOPE, filterRemoveEmptyStringFromList(titleList)); + } + + /** + * Register condition of title. + * + * @param key Condition key. (NotNull) + * @param value The value of title. (Nullable) + */ + protected void registerTitle(ConditionKey key, Object value) { + registerQuery(key, value, getCValueTitle(), COL_TITLE, J_Title, UJ_title); + } + + /** + * Register inline condition of title. + * + * @param key Condition key. (NotNull) + * @param value The value of title. (Nullable) + */ + protected void registerInlineTitle(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueTitle(), COL_TITLE, J_Title, UJ_title); + } + + abstract protected ConditionValue getCValueTitle(); + + /** Column db name of code. */ + protected static final String COL_CODE = "CODE"; + + /** Column java name of code. */ + protected static final String J_Code = "Code"; + + /** Column uncapitalised java name of code. */ + protected static final String UJ_code = "code"; + + /** + * Set the value of code using equal. { = } + * If the value is null or empty-string, this condition is ignored. + * + * @param code The value of code as equal. + */ + public void setCode_Equal(String code) { + registerCode(ConditionKey.CK_EQUAL, filterRemoveEmptyString(code)); + } + + /** + * Set the value of code using notEqual. { != } + * If the value is null or empty-string, this condition is ignored. + * + * @param code The value of code as notEqual. + */ + public void setCode_NotEqual(String code) { + registerCode(ConditionKey.CK_NOT_EQUAL, filterRemoveEmptyString(code)); + } + + /** + * Set the value of code using greaterThan. { > } + * If the value is null or empty-string, this condition is ignored. + * + * @param code The value of code as greaterThan. + */ + public void setCode_GreaterThan(String code) { + registerCode(ConditionKey.CK_GREATER_THAN, filterRemoveEmptyString(code)); + } + + /** + * Set the value of code using lessThan. { < } + * If the value is null or empty-string, this condition is ignored. + * + * @param code The value of code as lessThan. + */ + public void setCode_LessThan(String code) { + registerCode(ConditionKey.CK_LESS_THAN, filterRemoveEmptyString(code)); + } + + /** + * Set the value of code using greaterEqual. { >= } + * If the value is null or empty-string, this condition is ignored. + * + * @param code The value of code as greaterEqual. + */ + public void setCode_GreaterEqual(String code) { + registerCode(ConditionKey.CK_GREATER_EQUAL, filterRemoveEmptyString(code)); + } + + /** + * Set the value of code using lessEqual. { <= } + * If the value is null or empty-string, this condition is ignored. + * + * @param code The value of code as lessEqual. + */ + public void setCode_LessEqual(String code) { + registerCode(ConditionKey.CK_LESS_EQUAL, filterRemoveEmptyString(code)); + } + + /** + * Set the value of code using prefixSearch. { like 'xxx%' } + * If the value is null or empty-string, this condition is ignored. + * + * @param code The value of code as prefixSearch. + */ + public void setCode_PrefixSearch(String code) { + registerCode(ConditionKey.CK_PREFIX_SEARCH, filterRemoveEmptyString(code)); + } + + /** + * Set the value of code using likeSearch. { like '%xxx%' } + * If the value is null or empty-string, this condition is ignored. + * You can invoke this method several times and the conditions are set up. + * + * @param code The value of code as likeSearch. + * @param likeSearchOption Like search option. (NotNull) + */ + public void setCode_LikeSearch(String code, jp.sf.pal.pompei.allcommon.cbean.coption.LikeSearchOption likeSearchOption) { + registerLikeSearchQuery(ConditionKey.CK_LIKE_SEARCH, filterRemoveEmptyString(code), getCValueCode(), COL_CODE, J_Code, UJ_code, likeSearchOption); + } + + /** + * Set the value of code using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param codeList The value of code as inScope. + */ + public void setCode_InScope(java.util.List codeList) { + registerCode(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyStringFromList(codeList)); + } + + /** + * Set the value of code using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param code The value of code as inScope. + */ + public void setCode_InScope(String code, jp.sf.pal.pompei.allcommon.cbean.coption.InScopeOption option) { + registerInScopeQuery(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyString(code), getCValueCode(), COL_CODE, J_Code, UJ_code, option); + } + + /** + * Set the value of code using notInScope. { not in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param codeList The value of code as notInScope. + */ + public void setCode_NotInScope(java.util.List codeList) { + registerCode(ConditionKey.CK_NOT_IN_SCOPE, filterRemoveEmptyStringFromList(codeList)); + } + + /** + * Register condition of code. + * + * @param key Condition key. (NotNull) + * @param value The value of code. (Nullable) + */ + protected void registerCode(ConditionKey key, Object value) { + registerQuery(key, value, getCValueCode(), COL_CODE, J_Code, UJ_code); + } + + /** + * Register inline condition of code. + * + * @param key Condition key. (NotNull) + * @param value The value of code. (Nullable) + */ + protected void registerInlineCode(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueCode(), COL_CODE, J_Code, UJ_code); + } + + abstract protected ConditionValue getCValueCode(); + + /** Column db name of symbolLeft. */ + protected static final String COL_SYMBOL_LEFT = "SYMBOL_LEFT"; + + /** Column java name of symbolLeft. */ + protected static final String J_SymbolLeft = "SymbolLeft"; + + /** Column uncapitalised java name of symbolLeft. */ + protected static final String UJ_symbolLeft = "symbolLeft"; + + /** + * Set the value of symbolLeft using equal. { = } + * If the value is null or empty-string, this condition is ignored. + * + * @param symbolLeft The value of symbolLeft as equal. + */ + public void setSymbolLeft_Equal(String symbolLeft) { + registerSymbolLeft(ConditionKey.CK_EQUAL, filterRemoveEmptyString(symbolLeft)); + } + + /** + * Set the value of symbolLeft using notEqual. { != } + * If the value is null or empty-string, this condition is ignored. + * + * @param symbolLeft The value of symbolLeft as notEqual. + */ + public void setSymbolLeft_NotEqual(String symbolLeft) { + registerSymbolLeft(ConditionKey.CK_NOT_EQUAL, filterRemoveEmptyString(symbolLeft)); + } + + /** + * Set the value of symbolLeft using greaterThan. { > } + * If the value is null or empty-string, this condition is ignored. + * + * @param symbolLeft The value of symbolLeft as greaterThan. + */ + public void setSymbolLeft_GreaterThan(String symbolLeft) { + registerSymbolLeft(ConditionKey.CK_GREATER_THAN, filterRemoveEmptyString(symbolLeft)); + } + + /** + * Set the value of symbolLeft using lessThan. { < } + * If the value is null or empty-string, this condition is ignored. + * + * @param symbolLeft The value of symbolLeft as lessThan. + */ + public void setSymbolLeft_LessThan(String symbolLeft) { + registerSymbolLeft(ConditionKey.CK_LESS_THAN, filterRemoveEmptyString(symbolLeft)); + } + + /** + * Set the value of symbolLeft using greaterEqual. { >= } + * If the value is null or empty-string, this condition is ignored. + * + * @param symbolLeft The value of symbolLeft as greaterEqual. + */ + public void setSymbolLeft_GreaterEqual(String symbolLeft) { + registerSymbolLeft(ConditionKey.CK_GREATER_EQUAL, filterRemoveEmptyString(symbolLeft)); + } + + /** + * Set the value of symbolLeft using lessEqual. { <= } + * If the value is null or empty-string, this condition is ignored. + * + * @param symbolLeft The value of symbolLeft as lessEqual. + */ + public void setSymbolLeft_LessEqual(String symbolLeft) { + registerSymbolLeft(ConditionKey.CK_LESS_EQUAL, filterRemoveEmptyString(symbolLeft)); + } + + /** + * Set the value of symbolLeft using prefixSearch. { like 'xxx%' } + * If the value is null or empty-string, this condition is ignored. + * + * @param symbolLeft The value of symbolLeft as prefixSearch. + */ + public void setSymbolLeft_PrefixSearch(String symbolLeft) { + registerSymbolLeft(ConditionKey.CK_PREFIX_SEARCH, filterRemoveEmptyString(symbolLeft)); + } + + /** + * Set the value of symbolLeft using likeSearch. { like '%xxx%' } + * If the value is null or empty-string, this condition is ignored. + * You can invoke this method several times and the conditions are set up. + * + * @param symbolLeft The value of symbolLeft as likeSearch. + * @param likeSearchOption Like search option. (NotNull) + */ + public void setSymbolLeft_LikeSearch(String symbolLeft, jp.sf.pal.pompei.allcommon.cbean.coption.LikeSearchOption likeSearchOption) { + registerLikeSearchQuery(ConditionKey.CK_LIKE_SEARCH, filterRemoveEmptyString(symbolLeft), getCValueSymbolLeft(), COL_SYMBOL_LEFT, J_SymbolLeft, UJ_symbolLeft, likeSearchOption); + } + + /** + * Set the value of symbolLeft using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param symbolLeftList The value of symbolLeft as inScope. + */ + public void setSymbolLeft_InScope(java.util.List symbolLeftList) { + registerSymbolLeft(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyStringFromList(symbolLeftList)); + } + + /** + * Set the value of symbolLeft using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param symbolLeft The value of symbolLeft as inScope. + */ + public void setSymbolLeft_InScope(String symbolLeft, jp.sf.pal.pompei.allcommon.cbean.coption.InScopeOption option) { + registerInScopeQuery(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyString(symbolLeft), getCValueSymbolLeft(), COL_SYMBOL_LEFT, J_SymbolLeft, UJ_symbolLeft, option); + } + + /** + * Set the value of symbolLeft using notInScope. { not in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param symbolLeftList The value of symbolLeft as notInScope. + */ + public void setSymbolLeft_NotInScope(java.util.List symbolLeftList) { + registerSymbolLeft(ConditionKey.CK_NOT_IN_SCOPE, filterRemoveEmptyStringFromList(symbolLeftList)); + } + + /** + * Set the value of symbolLeft using isNull. { is null } + */ + public void setSymbolLeft_IsNull() { + registerSymbolLeft(ConditionKey.CK_IS_NULL, DUMMY_OBJECT); + } + + /** + * Set the value of symbolLeft using isNotNull. { is not null } + */ + public void setSymbolLeft_IsNotNull() { + registerSymbolLeft(ConditionKey.CK_IS_NOT_NULL, DUMMY_OBJECT); + } + + /** + * Register condition of symbolLeft. + * + * @param key Condition key. (NotNull) + * @param value The value of symbolLeft. (Nullable) + */ + protected void registerSymbolLeft(ConditionKey key, Object value) { + registerQuery(key, value, getCValueSymbolLeft(), COL_SYMBOL_LEFT, J_SymbolLeft, UJ_symbolLeft); + } + + /** + * Register inline condition of symbolLeft. + * + * @param key Condition key. (NotNull) + * @param value The value of symbolLeft. (Nullable) + */ + protected void registerInlineSymbolLeft(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueSymbolLeft(), COL_SYMBOL_LEFT, J_SymbolLeft, UJ_symbolLeft); + } + + abstract protected ConditionValue getCValueSymbolLeft(); + + /** Column db name of symbolRight. */ + protected static final String COL_SYMBOL_RIGHT = "SYMBOL_RIGHT"; + + /** Column java name of symbolRight. */ + protected static final String J_SymbolRight = "SymbolRight"; + + /** Column uncapitalised java name of symbolRight. */ + protected static final String UJ_symbolRight = "symbolRight"; + + /** + * Set the value of symbolRight using equal. { = } + * If the value is null or empty-string, this condition is ignored. + * + * @param symbolRight The value of symbolRight as equal. + */ + public void setSymbolRight_Equal(String symbolRight) { + registerSymbolRight(ConditionKey.CK_EQUAL, filterRemoveEmptyString(symbolRight)); + } + + /** + * Set the value of symbolRight using notEqual. { != } + * If the value is null or empty-string, this condition is ignored. + * + * @param symbolRight The value of symbolRight as notEqual. + */ + public void setSymbolRight_NotEqual(String symbolRight) { + registerSymbolRight(ConditionKey.CK_NOT_EQUAL, filterRemoveEmptyString(symbolRight)); + } + + /** + * Set the value of symbolRight using greaterThan. { > } + * If the value is null or empty-string, this condition is ignored. + * + * @param symbolRight The value of symbolRight as greaterThan. + */ + public void setSymbolRight_GreaterThan(String symbolRight) { + registerSymbolRight(ConditionKey.CK_GREATER_THAN, filterRemoveEmptyString(symbolRight)); + } + + /** + * Set the value of symbolRight using lessThan. { < } + * If the value is null or empty-string, this condition is ignored. + * + * @param symbolRight The value of symbolRight as lessThan. + */ + public void setSymbolRight_LessThan(String symbolRight) { + registerSymbolRight(ConditionKey.CK_LESS_THAN, filterRemoveEmptyString(symbolRight)); + } + + /** + * Set the value of symbolRight using greaterEqual. { >= } + * If the value is null or empty-string, this condition is ignored. + * + * @param symbolRight The value of symbolRight as greaterEqual. + */ + public void setSymbolRight_GreaterEqual(String symbolRight) { + registerSymbolRight(ConditionKey.CK_GREATER_EQUAL, filterRemoveEmptyString(symbolRight)); + } + + /** + * Set the value of symbolRight using lessEqual. { <= } + * If the value is null or empty-string, this condition is ignored. + * + * @param symbolRight The value of symbolRight as lessEqual. + */ + public void setSymbolRight_LessEqual(String symbolRight) { + registerSymbolRight(ConditionKey.CK_LESS_EQUAL, filterRemoveEmptyString(symbolRight)); + } + + /** + * Set the value of symbolRight using prefixSearch. { like 'xxx%' } + * If the value is null or empty-string, this condition is ignored. + * + * @param symbolRight The value of symbolRight as prefixSearch. + */ + public void setSymbolRight_PrefixSearch(String symbolRight) { + registerSymbolRight(ConditionKey.CK_PREFIX_SEARCH, filterRemoveEmptyString(symbolRight)); + } + + /** + * Set the value of symbolRight using likeSearch. { like '%xxx%' } + * If the value is null or empty-string, this condition is ignored. + * You can invoke this method several times and the conditions are set up. + * + * @param symbolRight The value of symbolRight as likeSearch. + * @param likeSearchOption Like search option. (NotNull) + */ + public void setSymbolRight_LikeSearch(String symbolRight, jp.sf.pal.pompei.allcommon.cbean.coption.LikeSearchOption likeSearchOption) { + registerLikeSearchQuery(ConditionKey.CK_LIKE_SEARCH, filterRemoveEmptyString(symbolRight), getCValueSymbolRight(), COL_SYMBOL_RIGHT, J_SymbolRight, UJ_symbolRight, likeSearchOption); + } + + /** + * Set the value of symbolRight using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param symbolRightList The value of symbolRight as inScope. + */ + public void setSymbolRight_InScope(java.util.List symbolRightList) { + registerSymbolRight(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyStringFromList(symbolRightList)); + } + + /** + * Set the value of symbolRight using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param symbolRight The value of symbolRight as inScope. + */ + public void setSymbolRight_InScope(String symbolRight, jp.sf.pal.pompei.allcommon.cbean.coption.InScopeOption option) { + registerInScopeQuery(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyString(symbolRight), getCValueSymbolRight(), COL_SYMBOL_RIGHT, J_SymbolRight, UJ_symbolRight, option); + } + + /** + * Set the value of symbolRight using notInScope. { not in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param symbolRightList The value of symbolRight as notInScope. + */ + public void setSymbolRight_NotInScope(java.util.List symbolRightList) { + registerSymbolRight(ConditionKey.CK_NOT_IN_SCOPE, filterRemoveEmptyStringFromList(symbolRightList)); + } + + /** + * Set the value of symbolRight using isNull. { is null } + */ + public void setSymbolRight_IsNull() { + registerSymbolRight(ConditionKey.CK_IS_NULL, DUMMY_OBJECT); + } + + /** + * Set the value of symbolRight using isNotNull. { is not null } + */ + public void setSymbolRight_IsNotNull() { + registerSymbolRight(ConditionKey.CK_IS_NOT_NULL, DUMMY_OBJECT); + } + + /** + * Register condition of symbolRight. + * + * @param key Condition key. (NotNull) + * @param value The value of symbolRight. (Nullable) + */ + protected void registerSymbolRight(ConditionKey key, Object value) { + registerQuery(key, value, getCValueSymbolRight(), COL_SYMBOL_RIGHT, J_SymbolRight, UJ_symbolRight); + } + + /** + * Register inline condition of symbolRight. + * + * @param key Condition key. (NotNull) + * @param value The value of symbolRight. (Nullable) + */ + protected void registerInlineSymbolRight(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueSymbolRight(), COL_SYMBOL_RIGHT, J_SymbolRight, UJ_symbolRight); + } + + abstract protected ConditionValue getCValueSymbolRight(); + + /** Column db name of decimalPoint. */ + protected static final String COL_DECIMAL_POINT = "DECIMAL_POINT"; + + /** Column java name of decimalPoint. */ + protected static final String J_DecimalPoint = "DecimalPoint"; + + /** Column uncapitalised java name of decimalPoint. */ + protected static final String UJ_decimalPoint = "decimalPoint"; + + /** + * Set the value of decimalPoint using equal. { = } + * If the value is null or empty-string, this condition is ignored. + * + * @param decimalPoint The value of decimalPoint as equal. + */ + public void setDecimalPoint_Equal(String decimalPoint) { + registerDecimalPoint(ConditionKey.CK_EQUAL, filterRemoveEmptyString(decimalPoint)); + } + + /** + * Set the value of decimalPoint using notEqual. { != } + * If the value is null or empty-string, this condition is ignored. + * + * @param decimalPoint The value of decimalPoint as notEqual. + */ + public void setDecimalPoint_NotEqual(String decimalPoint) { + registerDecimalPoint(ConditionKey.CK_NOT_EQUAL, filterRemoveEmptyString(decimalPoint)); + } + + /** + * Set the value of decimalPoint using greaterThan. { > } + * If the value is null or empty-string, this condition is ignored. + * + * @param decimalPoint The value of decimalPoint as greaterThan. + */ + public void setDecimalPoint_GreaterThan(String decimalPoint) { + registerDecimalPoint(ConditionKey.CK_GREATER_THAN, filterRemoveEmptyString(decimalPoint)); + } + + /** + * Set the value of decimalPoint using lessThan. { < } + * If the value is null or empty-string, this condition is ignored. + * + * @param decimalPoint The value of decimalPoint as lessThan. + */ + public void setDecimalPoint_LessThan(String decimalPoint) { + registerDecimalPoint(ConditionKey.CK_LESS_THAN, filterRemoveEmptyString(decimalPoint)); + } + + /** + * Set the value of decimalPoint using greaterEqual. { >= } + * If the value is null or empty-string, this condition is ignored. + * + * @param decimalPoint The value of decimalPoint as greaterEqual. + */ + public void setDecimalPoint_GreaterEqual(String decimalPoint) { + registerDecimalPoint(ConditionKey.CK_GREATER_EQUAL, filterRemoveEmptyString(decimalPoint)); + } + + /** + * Set the value of decimalPoint using lessEqual. { <= } + * If the value is null or empty-string, this condition is ignored. + * + * @param decimalPoint The value of decimalPoint as lessEqual. + */ + public void setDecimalPoint_LessEqual(String decimalPoint) { + registerDecimalPoint(ConditionKey.CK_LESS_EQUAL, filterRemoveEmptyString(decimalPoint)); + } + + /** + * Set the value of decimalPoint using prefixSearch. { like 'xxx%' } + * If the value is null or empty-string, this condition is ignored. + * + * @param decimalPoint The value of decimalPoint as prefixSearch. + */ + public void setDecimalPoint_PrefixSearch(String decimalPoint) { + registerDecimalPoint(ConditionKey.CK_PREFIX_SEARCH, filterRemoveEmptyString(decimalPoint)); + } + + /** + * Set the value of decimalPoint using likeSearch. { like '%xxx%' } + * If the value is null or empty-string, this condition is ignored. + * You can invoke this method several times and the conditions are set up. + * + * @param decimalPoint The value of decimalPoint as likeSearch. + * @param likeSearchOption Like search option. (NotNull) + */ + public void setDecimalPoint_LikeSearch(String decimalPoint, jp.sf.pal.pompei.allcommon.cbean.coption.LikeSearchOption likeSearchOption) { + registerLikeSearchQuery(ConditionKey.CK_LIKE_SEARCH, filterRemoveEmptyString(decimalPoint), getCValueDecimalPoint(), COL_DECIMAL_POINT, J_DecimalPoint, UJ_decimalPoint, likeSearchOption); + } + + /** + * Set the value of decimalPoint using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param decimalPointList The value of decimalPoint as inScope. + */ + public void setDecimalPoint_InScope(java.util.List decimalPointList) { + registerDecimalPoint(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyStringFromList(decimalPointList)); + } + + /** + * Set the value of decimalPoint using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param decimalPoint The value of decimalPoint as inScope. + */ + public void setDecimalPoint_InScope(String decimalPoint, jp.sf.pal.pompei.allcommon.cbean.coption.InScopeOption option) { + registerInScopeQuery(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyString(decimalPoint), getCValueDecimalPoint(), COL_DECIMAL_POINT, J_DecimalPoint, UJ_decimalPoint, option); + } + + /** + * Set the value of decimalPoint using notInScope. { not in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param decimalPointList The value of decimalPoint as notInScope. + */ + public void setDecimalPoint_NotInScope(java.util.List decimalPointList) { + registerDecimalPoint(ConditionKey.CK_NOT_IN_SCOPE, filterRemoveEmptyStringFromList(decimalPointList)); + } + + /** + * Set the value of decimalPoint using isNull. { is null } + */ + public void setDecimalPoint_IsNull() { + registerDecimalPoint(ConditionKey.CK_IS_NULL, DUMMY_OBJECT); + } + + /** + * Set the value of decimalPoint using isNotNull. { is not null } + */ + public void setDecimalPoint_IsNotNull() { + registerDecimalPoint(ConditionKey.CK_IS_NOT_NULL, DUMMY_OBJECT); + } + + /** + * Register condition of decimalPoint. + * + * @param key Condition key. (NotNull) + * @param value The value of decimalPoint. (Nullable) + */ + protected void registerDecimalPoint(ConditionKey key, Object value) { + registerQuery(key, value, getCValueDecimalPoint(), COL_DECIMAL_POINT, J_DecimalPoint, UJ_decimalPoint); + } + + /** + * Register inline condition of decimalPoint. + * + * @param key Condition key. (NotNull) + * @param value The value of decimalPoint. (Nullable) + */ + protected void registerInlineDecimalPoint(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueDecimalPoint(), COL_DECIMAL_POINT, J_DecimalPoint, UJ_decimalPoint); + } + + abstract protected ConditionValue getCValueDecimalPoint(); + + /** Column db name of thousandsPoint. */ + protected static final String COL_THOUSANDS_POINT = "THOUSANDS_POINT"; + + /** Column java name of thousandsPoint. */ + protected static final String J_ThousandsPoint = "ThousandsPoint"; + + /** Column uncapitalised java name of thousandsPoint. */ + protected static final String UJ_thousandsPoint = "thousandsPoint"; + + /** + * Set the value of thousandsPoint using equal. { = } + * If the value is null or empty-string, this condition is ignored. + * + * @param thousandsPoint The value of thousandsPoint as equal. + */ + public void setThousandsPoint_Equal(String thousandsPoint) { + registerThousandsPoint(ConditionKey.CK_EQUAL, filterRemoveEmptyString(thousandsPoint)); + } + + /** + * Set the value of thousandsPoint using notEqual. { != } + * If the value is null or empty-string, this condition is ignored. + * + * @param thousandsPoint The value of thousandsPoint as notEqual. + */ + public void setThousandsPoint_NotEqual(String thousandsPoint) { + registerThousandsPoint(ConditionKey.CK_NOT_EQUAL, filterRemoveEmptyString(thousandsPoint)); + } + + /** + * Set the value of thousandsPoint using greaterThan. { > } + * If the value is null or empty-string, this condition is ignored. + * + * @param thousandsPoint The value of thousandsPoint as greaterThan. + */ + public void setThousandsPoint_GreaterThan(String thousandsPoint) { + registerThousandsPoint(ConditionKey.CK_GREATER_THAN, filterRemoveEmptyString(thousandsPoint)); + } + + /** + * Set the value of thousandsPoint using lessThan. { < } + * If the value is null or empty-string, this condition is ignored. + * + * @param thousandsPoint The value of thousandsPoint as lessThan. + */ + public void setThousandsPoint_LessThan(String thousandsPoint) { + registerThousandsPoint(ConditionKey.CK_LESS_THAN, filterRemoveEmptyString(thousandsPoint)); + } + + /** + * Set the value of thousandsPoint using greaterEqual. { >= } + * If the value is null or empty-string, this condition is ignored. + * + * @param thousandsPoint The value of thousandsPoint as greaterEqual. + */ + public void setThousandsPoint_GreaterEqual(String thousandsPoint) { + registerThousandsPoint(ConditionKey.CK_GREATER_EQUAL, filterRemoveEmptyString(thousandsPoint)); + } + + /** + * Set the value of thousandsPoint using lessEqual. { <= } + * If the value is null or empty-string, this condition is ignored. + * + * @param thousandsPoint The value of thousandsPoint as lessEqual. + */ + public void setThousandsPoint_LessEqual(String thousandsPoint) { + registerThousandsPoint(ConditionKey.CK_LESS_EQUAL, filterRemoveEmptyString(thousandsPoint)); + } + + /** + * Set the value of thousandsPoint using prefixSearch. { like 'xxx%' } + * If the value is null or empty-string, this condition is ignored. + * + * @param thousandsPoint The value of thousandsPoint as prefixSearch. + */ + public void setThousandsPoint_PrefixSearch(String thousandsPoint) { + registerThousandsPoint(ConditionKey.CK_PREFIX_SEARCH, filterRemoveEmptyString(thousandsPoint)); + } + + /** + * Set the value of thousandsPoint using likeSearch. { like '%xxx%' } + * If the value is null or empty-string, this condition is ignored. + * You can invoke this method several times and the conditions are set up. + * + * @param thousandsPoint The value of thousandsPoint as likeSearch. + * @param likeSearchOption Like search option. (NotNull) + */ + public void setThousandsPoint_LikeSearch(String thousandsPoint, jp.sf.pal.pompei.allcommon.cbean.coption.LikeSearchOption likeSearchOption) { + registerLikeSearchQuery(ConditionKey.CK_LIKE_SEARCH, filterRemoveEmptyString(thousandsPoint), getCValueThousandsPoint(), COL_THOUSANDS_POINT, J_ThousandsPoint, UJ_thousandsPoint, likeSearchOption); + } + + /** + * Set the value of thousandsPoint using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param thousandsPointList The value of thousandsPoint as inScope. + */ + public void setThousandsPoint_InScope(java.util.List thousandsPointList) { + registerThousandsPoint(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyStringFromList(thousandsPointList)); + } + + /** + * Set the value of thousandsPoint using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param thousandsPoint The value of thousandsPoint as inScope. + */ + public void setThousandsPoint_InScope(String thousandsPoint, jp.sf.pal.pompei.allcommon.cbean.coption.InScopeOption option) { + registerInScopeQuery(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyString(thousandsPoint), getCValueThousandsPoint(), COL_THOUSANDS_POINT, J_ThousandsPoint, UJ_thousandsPoint, option); + } + + /** + * Set the value of thousandsPoint using notInScope. { not in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param thousandsPointList The value of thousandsPoint as notInScope. + */ + public void setThousandsPoint_NotInScope(java.util.List thousandsPointList) { + registerThousandsPoint(ConditionKey.CK_NOT_IN_SCOPE, filterRemoveEmptyStringFromList(thousandsPointList)); + } + + /** + * Set the value of thousandsPoint using isNull. { is null } + */ + public void setThousandsPoint_IsNull() { + registerThousandsPoint(ConditionKey.CK_IS_NULL, DUMMY_OBJECT); + } + + /** + * Set the value of thousandsPoint using isNotNull. { is not null } + */ + public void setThousandsPoint_IsNotNull() { + registerThousandsPoint(ConditionKey.CK_IS_NOT_NULL, DUMMY_OBJECT); + } + + /** + * Register condition of thousandsPoint. + * + * @param key Condition key. (NotNull) + * @param value The value of thousandsPoint. (Nullable) + */ + protected void registerThousandsPoint(ConditionKey key, Object value) { + registerQuery(key, value, getCValueThousandsPoint(), COL_THOUSANDS_POINT, J_ThousandsPoint, UJ_thousandsPoint); + } + + /** + * Register inline condition of thousandsPoint. + * + * @param key Condition key. (NotNull) + * @param value The value of thousandsPoint. (Nullable) + */ + protected void registerInlineThousandsPoint(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueThousandsPoint(), COL_THOUSANDS_POINT, J_ThousandsPoint, UJ_thousandsPoint); + } + + abstract protected ConditionValue getCValueThousandsPoint(); + + /** Column db name of decimalPlaces. */ + protected static final String COL_DECIMAL_PLACES = "DECIMAL_PLACES"; + + /** Column java name of decimalPlaces. */ + protected static final String J_DecimalPlaces = "DecimalPlaces"; + + /** Column uncapitalised java name of decimalPlaces. */ + protected static final String UJ_decimalPlaces = "decimalPlaces"; + + /** + * Set the value of decimalPlaces using equal. { = } + * If the value is null or empty-string, this condition is ignored. + * + * @param decimalPlaces The value of decimalPlaces as equal. + */ + public void setDecimalPlaces_Equal(String decimalPlaces) { + registerDecimalPlaces(ConditionKey.CK_EQUAL, filterRemoveEmptyString(decimalPlaces)); + } + + /** + * Set the value of decimalPlaces using notEqual. { != } + * If the value is null or empty-string, this condition is ignored. + * + * @param decimalPlaces The value of decimalPlaces as notEqual. + */ + public void setDecimalPlaces_NotEqual(String decimalPlaces) { + registerDecimalPlaces(ConditionKey.CK_NOT_EQUAL, filterRemoveEmptyString(decimalPlaces)); + } + + /** + * Set the value of decimalPlaces using greaterThan. { > } + * If the value is null or empty-string, this condition is ignored. + * + * @param decimalPlaces The value of decimalPlaces as greaterThan. + */ + public void setDecimalPlaces_GreaterThan(String decimalPlaces) { + registerDecimalPlaces(ConditionKey.CK_GREATER_THAN, filterRemoveEmptyString(decimalPlaces)); + } + + /** + * Set the value of decimalPlaces using lessThan. { < } + * If the value is null or empty-string, this condition is ignored. + * + * @param decimalPlaces The value of decimalPlaces as lessThan. + */ + public void setDecimalPlaces_LessThan(String decimalPlaces) { + registerDecimalPlaces(ConditionKey.CK_LESS_THAN, filterRemoveEmptyString(decimalPlaces)); + } + + /** + * Set the value of decimalPlaces using greaterEqual. { >= } + * If the value is null or empty-string, this condition is ignored. + * + * @param decimalPlaces The value of decimalPlaces as greaterEqual. + */ + public void setDecimalPlaces_GreaterEqual(String decimalPlaces) { + registerDecimalPlaces(ConditionKey.CK_GREATER_EQUAL, filterRemoveEmptyString(decimalPlaces)); + } + + /** + * Set the value of decimalPlaces using lessEqual. { <= } + * If the value is null or empty-string, this condition is ignored. + * + * @param decimalPlaces The value of decimalPlaces as lessEqual. + */ + public void setDecimalPlaces_LessEqual(String decimalPlaces) { + registerDecimalPlaces(ConditionKey.CK_LESS_EQUAL, filterRemoveEmptyString(decimalPlaces)); + } + + /** + * Set the value of decimalPlaces using prefixSearch. { like 'xxx%' } + * If the value is null or empty-string, this condition is ignored. + * + * @param decimalPlaces The value of decimalPlaces as prefixSearch. + */ + public void setDecimalPlaces_PrefixSearch(String decimalPlaces) { + registerDecimalPlaces(ConditionKey.CK_PREFIX_SEARCH, filterRemoveEmptyString(decimalPlaces)); + } + + /** + * Set the value of decimalPlaces using likeSearch. { like '%xxx%' } + * If the value is null or empty-string, this condition is ignored. + * You can invoke this method several times and the conditions are set up. + * + * @param decimalPlaces The value of decimalPlaces as likeSearch. + * @param likeSearchOption Like search option. (NotNull) + */ + public void setDecimalPlaces_LikeSearch(String decimalPlaces, jp.sf.pal.pompei.allcommon.cbean.coption.LikeSearchOption likeSearchOption) { + registerLikeSearchQuery(ConditionKey.CK_LIKE_SEARCH, filterRemoveEmptyString(decimalPlaces), getCValueDecimalPlaces(), COL_DECIMAL_PLACES, J_DecimalPlaces, UJ_decimalPlaces, likeSearchOption); + } + + /** + * Set the value of decimalPlaces using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param decimalPlacesList The value of decimalPlaces as inScope. + */ + public void setDecimalPlaces_InScope(java.util.List decimalPlacesList) { + registerDecimalPlaces(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyStringFromList(decimalPlacesList)); + } + + /** + * Set the value of decimalPlaces using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param decimalPlaces The value of decimalPlaces as inScope. + */ + public void setDecimalPlaces_InScope(String decimalPlaces, jp.sf.pal.pompei.allcommon.cbean.coption.InScopeOption option) { + registerInScopeQuery(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyString(decimalPlaces), getCValueDecimalPlaces(), COL_DECIMAL_PLACES, J_DecimalPlaces, UJ_decimalPlaces, option); + } + + /** + * Set the value of decimalPlaces using notInScope. { not in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param decimalPlacesList The value of decimalPlaces as notInScope. + */ + public void setDecimalPlaces_NotInScope(java.util.List decimalPlacesList) { + registerDecimalPlaces(ConditionKey.CK_NOT_IN_SCOPE, filterRemoveEmptyStringFromList(decimalPlacesList)); + } + + /** + * Set the value of decimalPlaces using isNull. { is null } + */ + public void setDecimalPlaces_IsNull() { + registerDecimalPlaces(ConditionKey.CK_IS_NULL, DUMMY_OBJECT); + } + + /** + * Set the value of decimalPlaces using isNotNull. { is not null } + */ + public void setDecimalPlaces_IsNotNull() { + registerDecimalPlaces(ConditionKey.CK_IS_NOT_NULL, DUMMY_OBJECT); + } + + /** + * Register condition of decimalPlaces. + * + * @param key Condition key. (NotNull) + * @param value The value of decimalPlaces. (Nullable) + */ + protected void registerDecimalPlaces(ConditionKey key, Object value) { + registerQuery(key, value, getCValueDecimalPlaces(), COL_DECIMAL_PLACES, J_DecimalPlaces, UJ_decimalPlaces); + } + + /** + * Register inline condition of decimalPlaces. + * + * @param key Condition key. (NotNull) + * @param value The value of decimalPlaces. (Nullable) + */ + protected void registerInlineDecimalPlaces(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueDecimalPlaces(), COL_DECIMAL_PLACES, J_DecimalPlaces, UJ_decimalPlaces); + } + + abstract protected ConditionValue getCValueDecimalPlaces(); + + /** Column db name of value. */ + protected static final String COL_VALUE = "VALUE"; + + /** Column java name of value. */ + protected static final String J_Value = "Value"; + + /** Column uncapitalised java name of value. */ + protected static final String UJ_value = "value"; + + /** + * Set the value of value using equal. { = } + * + * @param value The value of value as equal. + */ + public void setValue_Equal(java.math.BigDecimal value) { + registerValue(ConditionKey.CK_EQUAL, value); + } + + /** + * Set the value of value using notEqual. { != } + * + * @param value The value of value as notEqual. + */ + public void setValue_NotEqual(java.math.BigDecimal value) { + registerValue(ConditionKey.CK_NOT_EQUAL, value); + } + + /** + * Set the value of value using greaterThan. { > } + * + * @param value The value of value as greaterThan. + */ + public void setValue_GreaterThan(java.math.BigDecimal value) { + registerValue(ConditionKey.CK_GREATER_THAN, value); + } + + /** + * Set the value of value using lessThan. { < } + * + * @param value The value of value as lessThan. + */ + public void setValue_LessThan(java.math.BigDecimal value) { + registerValue(ConditionKey.CK_LESS_THAN, value); + } + + /** + * Set the value of value using greaterEqual. { >= } + * + * @param value The value of value as greaterEqual. + */ + public void setValue_GreaterEqual(java.math.BigDecimal value) { + registerValue(ConditionKey.CK_GREATER_EQUAL, value); + } + + /** + * Set the value of value using lessEqual. { <= } + * + * @param value The value of value as lessEqual. + */ + public void setValue_LessEqual(java.math.BigDecimal value) { + registerValue(ConditionKey.CK_LESS_EQUAL, value); + } + + /** + * Set the value of value using inScope. { in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param valueList The value of value as inScope. + */ + public void setValue_InScope(java.util.List valueList) { + registerValue(ConditionKey.CK_IN_SCOPE, valueList); + } + + /** + * Set the value of value using notInScope. { not in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param valueList The value of value as notInScope. + */ + public void setValue_NotInScope(java.util.List valueList) { + registerValue(ConditionKey.CK_NOT_IN_SCOPE, valueList); + } + + /** + * Set the value of value using isNull. { is null } + */ + public void setValue_IsNull() { + registerValue(ConditionKey.CK_IS_NULL, DUMMY_OBJECT); + } + + /** + * Set the value of value using isNotNull. { is not null } + */ + public void setValue_IsNotNull() { + registerValue(ConditionKey.CK_IS_NOT_NULL, DUMMY_OBJECT); + } + + /** + * Register condition of value. + * + * @param key Condition key. (NotNull) + * @param value The value of value. (Nullable) + */ + protected void registerValue(ConditionKey key, Object value) { + registerQuery(key, value, getCValueValue(), COL_VALUE, J_Value, UJ_value); + } + + /** + * Register inline condition of value. + * + * @param key Condition key. (NotNull) + * @param value The value of value. (Nullable) + */ + protected void registerInlineValue(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueValue(), COL_VALUE, J_Value, UJ_value); + } + + abstract protected ConditionValue getCValueValue(); + + /** Column db name of lastUpdated. */ + protected static final String COL_LAST_UPDATED = "LAST_UPDATED"; + + /** Column java name of lastUpdated. */ + protected static final String J_LastUpdated = "LastUpdated"; + + /** Column uncapitalised java name of lastUpdated. */ + protected static final String UJ_lastUpdated = "lastUpdated"; + + /** + * Set the value of lastUpdated using equal. { = } + * + * @param lastUpdated The value of lastUpdated as equal. + */ + public void setLastUpdated_Equal(java.sql.Timestamp lastUpdated) { + registerLastUpdated(ConditionKey.CK_EQUAL, lastUpdated); + } + + /** + * Set the value of lastUpdated using notEqual. { != } + * + * @param lastUpdated The value of lastUpdated as notEqual. + */ + public void setLastUpdated_NotEqual(java.sql.Timestamp lastUpdated) { + registerLastUpdated(ConditionKey.CK_NOT_EQUAL, lastUpdated); + } + + /** + * Set the value of lastUpdated using greaterThan. { > } + * + * @param lastUpdated The value of lastUpdated as greaterThan. + */ + public void setLastUpdated_GreaterThan(java.sql.Timestamp lastUpdated) { + registerLastUpdated(ConditionKey.CK_GREATER_THAN, lastUpdated); + } + + /** + * Set the value of lastUpdated using lessThan. { < } + * + * @param lastUpdated The value of lastUpdated as lessThan. + */ + public void setLastUpdated_LessThan(java.sql.Timestamp lastUpdated) { + registerLastUpdated(ConditionKey.CK_LESS_THAN, lastUpdated); + } + + /** + * Set the value of lastUpdated using greaterEqual. { >= } + * + * @param lastUpdated The value of lastUpdated as greaterEqual. + */ + public void setLastUpdated_GreaterEqual(java.sql.Timestamp lastUpdated) { + registerLastUpdated(ConditionKey.CK_GREATER_EQUAL, lastUpdated); + } + + /** + * Set the value of lastUpdated using lessEqual. { <= } + * + * @param lastUpdated The value of lastUpdated as lessEqual. + */ + public void setLastUpdated_LessEqual(java.sql.Timestamp lastUpdated) { + registerLastUpdated(ConditionKey.CK_LESS_EQUAL, lastUpdated); + } + + /** + * Set the value of lastUpdated using from-to. { $fromDate <= COLUMN_NAME <= $toDate } + * + * @param lastUpdated The value of lastUpdated as from-to. + * @param fromToOption From-To option. (NotNull) + */ + public void setLastUpdated_FromTo(java.sql.Timestamp fromDate, java.sql.Timestamp toDate, jp.sf.pal.pompei.allcommon.cbean.coption.FromToOption fromToOption) { + registerFromToQuery(fromDate, toDate, getCValueLastUpdated(), COL_LAST_UPDATED, J_LastUpdated, UJ_lastUpdated, fromToOption); + } + + /** + * Set the value of lastUpdated using isNull. { is null } + */ + public void setLastUpdated_IsNull() { + registerLastUpdated(ConditionKey.CK_IS_NULL, DUMMY_OBJECT); + } + + /** + * Set the value of lastUpdated using isNotNull. { is not null } + */ + public void setLastUpdated_IsNotNull() { + registerLastUpdated(ConditionKey.CK_IS_NOT_NULL, DUMMY_OBJECT); + } + + /** + * Register condition of lastUpdated. + * + * @param key Condition key. (NotNull) + * @param value The value of lastUpdated. (Nullable) + */ + protected void registerLastUpdated(ConditionKey key, Object value) { + registerQuery(key, value, getCValueLastUpdated(), COL_LAST_UPDATED, J_LastUpdated, UJ_lastUpdated); + } + + /** + * Register inline condition of lastUpdated. + * + * @param key Condition key. (NotNull) + * @param value The value of lastUpdated. (Nullable) + */ + protected void registerInlineLastUpdated(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueLastUpdated(), COL_LAST_UPDATED, J_LastUpdated, UJ_lastUpdated); + } + + abstract protected ConditionValue getCValueLastUpdated(); + + // =================================================================================== + // Basic Override + // ============== + /** + * This method overrides the method that is declared at super. + * + * @return Clause string. (NotNull) + */ + public String toString() { + return getSqlClause().getClause(); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/AbstractBsCustomersBasketAttributesCQ.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/AbstractBsCustomersBasketAttributesCQ.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/AbstractBsCustomersBasketAttributesCQ.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,629 @@ + +package jp.sf.pal.pompei.cbean.cq.bs; + + + +import jp.sf.pal.pompei.allcommon.cbean.*; +import jp.sf.pal.pompei.allcommon.cbean.ckey.*; +import jp.sf.pal.pompei.allcommon.cbean.cvalue.ConditionValue; +import jp.sf.pal.pompei.allcommon.cbean.sqlclause.SqlClause; +import jp.sf.pal.pompei.cbean.cq.*; + +/** + * The condition-query of CUSTOMERS_BASKET_ATTRIBUTES. + * + * @author DBFlute(AutoGenerator) + */ +public abstract class AbstractBsCustomersBasketAttributesCQ extends AbstractConditionQuery { + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param childQuery Child query as abstract class. (Nullable: If null, this is base instance.) + * @param sqlClause SQL clause instance. (NotNull) + * @param aliasName My alias name. (NotNull) + * @param nestLevel Nest level. + */ + public AbstractBsCustomersBasketAttributesCQ(ConditionQuery childQuery, SqlClause sqlClause, String aliasName, int nestLevel) { + super(childQuery, sqlClause, aliasName, nestLevel); + } + + // =================================================================================== + // Table Name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + final public String getTableDbName() { + return "CUSTOMERS_BASKET_ATTRIBUTES"; + } + + // =================================================================================== + // Query + // ===== + + // /* * * * * * * * * * * * * * * * * * * * * * * + // MyTable = [CUSTOMERS_BASKET_ATTRIBUTES] + // * * * * * * * * */ + + + /** Column db name of customersBasketAttributesId. */ + protected static final String COL_CUSTOMERS_BASKET_ATTRIBUTES_ID = "CUSTOMERS_BASKET_ATTRIBUTES_ID"; + + /** Column java name of customersBasketAttributesId. */ + protected static final String J_CustomersBasketAttributesId = "CustomersBasketAttributesId"; + + /** Column uncapitalised java name of customersBasketAttributesId. */ + protected static final String UJ_customersBasketAttributesId = "customersBasketAttributesId"; + + /** + * Set the value of customersBasketAttributesId using equal. { = } + * + * @param customersBasketAttributesId The value of customersBasketAttributesId as equal. + */ + public void setCustomersBasketAttributesId_Equal(java.math.BigDecimal customersBasketAttributesId) { + registerCustomersBasketAttributesId(ConditionKey.CK_EQUAL, customersBasketAttributesId); + } + + /** + * Set the value of customersBasketAttributesId using notEqual. { != } + * + * @param customersBasketAttributesId The value of customersBasketAttributesId as notEqual. + */ + public void setCustomersBasketAttributesId_NotEqual(java.math.BigDecimal customersBasketAttributesId) { + registerCustomersBasketAttributesId(ConditionKey.CK_NOT_EQUAL, customersBasketAttributesId); + } + + /** + * Set the value of customersBasketAttributesId using greaterThan. { > } + * + * @param customersBasketAttributesId The value of customersBasketAttributesId as greaterThan. + */ + public void setCustomersBasketAttributesId_GreaterThan(java.math.BigDecimal customersBasketAttributesId) { + registerCustomersBasketAttributesId(ConditionKey.CK_GREATER_THAN, customersBasketAttributesId); + } + + /** + * Set the value of customersBasketAttributesId using lessThan. { < } + * + * @param customersBasketAttributesId The value of customersBasketAttributesId as lessThan. + */ + public void setCustomersBasketAttributesId_LessThan(java.math.BigDecimal customersBasketAttributesId) { + registerCustomersBasketAttributesId(ConditionKey.CK_LESS_THAN, customersBasketAttributesId); + } + + /** + * Set the value of customersBasketAttributesId using greaterEqual. { >= } + * + * @param customersBasketAttributesId The value of customersBasketAttributesId as greaterEqual. + */ + public void setCustomersBasketAttributesId_GreaterEqual(java.math.BigDecimal customersBasketAttributesId) { + registerCustomersBasketAttributesId(ConditionKey.CK_GREATER_EQUAL, customersBasketAttributesId); + } + + /** + * Set the value of customersBasketAttributesId using lessEqual. { <= } + * + * @param customersBasketAttributesId The value of customersBasketAttributesId as lessEqual. + */ + public void setCustomersBasketAttributesId_LessEqual(java.math.BigDecimal customersBasketAttributesId) { + registerCustomersBasketAttributesId(ConditionKey.CK_LESS_EQUAL, customersBasketAttributesId); + } + + /** + * Set the value of customersBasketAttributesId using inScope. { in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param customersBasketAttributesIdList The value of customersBasketAttributesId as inScope. + */ + public void setCustomersBasketAttributesId_InScope(java.util.List customersBasketAttributesIdList) { + registerCustomersBasketAttributesId(ConditionKey.CK_IN_SCOPE, customersBasketAttributesIdList); + } + + /** + * Set the value of customersBasketAttributesId using notInScope. { not in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param customersBasketAttributesIdList The value of customersBasketAttributesId as notInScope. + */ + public void setCustomersBasketAttributesId_NotInScope(java.util.List customersBasketAttributesIdList) { + registerCustomersBasketAttributesId(ConditionKey.CK_NOT_IN_SCOPE, customersBasketAttributesIdList); + } + + /** + * Register condition of customersBasketAttributesId. + * + * @param key Condition key. (NotNull) + * @param value The value of customersBasketAttributesId. (Nullable) + */ + protected void registerCustomersBasketAttributesId(ConditionKey key, Object value) { + registerQuery(key, value, getCValueCustomersBasketAttributesId(), COL_CUSTOMERS_BASKET_ATTRIBUTES_ID, J_CustomersBasketAttributesId, UJ_customersBasketAttributesId); + } + + /** + * Register inline condition of customersBasketAttributesId. + * + * @param key Condition key. (NotNull) + * @param value The value of customersBasketAttributesId. (Nullable) + */ + protected void registerInlineCustomersBasketAttributesId(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueCustomersBasketAttributesId(), COL_CUSTOMERS_BASKET_ATTRIBUTES_ID, J_CustomersBasketAttributesId, UJ_customersBasketAttributesId); + } + + abstract protected ConditionValue getCValueCustomersBasketAttributesId(); + + /** Column db name of customersId. */ + protected static final String COL_CUSTOMERS_ID = "CUSTOMERS_ID"; + + /** Column java name of customersId. */ + protected static final String J_CustomersId = "CustomersId"; + + /** Column uncapitalised java name of customersId. */ + protected static final String UJ_customersId = "customersId"; + + /** + * Set the value of customersId using equal. { = } + * + * @param customersId The value of customersId as equal. + */ + public void setCustomersId_Equal(java.math.BigDecimal customersId) { + registerCustomersId(ConditionKey.CK_EQUAL, customersId); + } + + /** + * Set the value of customersId using notEqual. { != } + * + * @param customersId The value of customersId as notEqual. + */ + public void setCustomersId_NotEqual(java.math.BigDecimal customersId) { + registerCustomersId(ConditionKey.CK_NOT_EQUAL, customersId); + } + + /** + * Set the value of customersId using greaterThan. { > } + * + * @param customersId The value of customersId as greaterThan. + */ + public void setCustomersId_GreaterThan(java.math.BigDecimal customersId) { + registerCustomersId(ConditionKey.CK_GREATER_THAN, customersId); + } + + /** + * Set the value of customersId using lessThan. { < } + * + * @param customersId The value of customersId as lessThan. + */ + public void setCustomersId_LessThan(java.math.BigDecimal customersId) { + registerCustomersId(ConditionKey.CK_LESS_THAN, customersId); + } + + /** + * Set the value of customersId using greaterEqual. { >= } + * + * @param customersId The value of customersId as greaterEqual. + */ + public void setCustomersId_GreaterEqual(java.math.BigDecimal customersId) { + registerCustomersId(ConditionKey.CK_GREATER_EQUAL, customersId); + } + + /** + * Set the value of customersId using lessEqual. { <= } + * + * @param customersId The value of customersId as lessEqual. + */ + public void setCustomersId_LessEqual(java.math.BigDecimal customersId) { + registerCustomersId(ConditionKey.CK_LESS_EQUAL, customersId); + } + + /** + * Set the value of customersId using inScope. { in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param customersIdList The value of customersId as inScope. + */ + public void setCustomersId_InScope(java.util.List customersIdList) { + registerCustomersId(ConditionKey.CK_IN_SCOPE, customersIdList); + } + + /** + * Set the value of customersId using notInScope. { not in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param customersIdList The value of customersId as notInScope. + */ + public void setCustomersId_NotInScope(java.util.List customersIdList) { + registerCustomersId(ConditionKey.CK_NOT_IN_SCOPE, customersIdList); + } + + /** + * Register condition of customersId. + * + * @param key Condition key. (NotNull) + * @param value The value of customersId. (Nullable) + */ + protected void registerCustomersId(ConditionKey key, Object value) { + registerQuery(key, value, getCValueCustomersId(), COL_CUSTOMERS_ID, J_CustomersId, UJ_customersId); + } + + /** + * Register inline condition of customersId. + * + * @param key Condition key. (NotNull) + * @param value The value of customersId. (Nullable) + */ + protected void registerInlineCustomersId(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueCustomersId(), COL_CUSTOMERS_ID, J_CustomersId, UJ_customersId); + } + + abstract protected ConditionValue getCValueCustomersId(); + + /** Column db name of productsId. */ + protected static final String COL_PRODUCTS_ID = "PRODUCTS_ID"; + + /** Column java name of productsId. */ + protected static final String J_ProductsId = "ProductsId"; + + /** Column uncapitalised java name of productsId. */ + protected static final String UJ_productsId = "productsId"; + + /** + * Set the value of productsId using equal. { = } + * If the value is null or empty-string, this condition is ignored. + * + * @param productsId The value of productsId as equal. + */ + public void setProductsId_Equal(String productsId) { + registerProductsId(ConditionKey.CK_EQUAL, filterRemoveEmptyString(productsId)); + } + + /** + * Set the value of productsId using notEqual. { != } + * If the value is null or empty-string, this condition is ignored. + * + * @param productsId The value of productsId as notEqual. + */ + public void setProductsId_NotEqual(String productsId) { + registerProductsId(ConditionKey.CK_NOT_EQUAL, filterRemoveEmptyString(productsId)); + } + + /** + * Set the value of productsId using greaterThan. { > } + * If the value is null or empty-string, this condition is ignored. + * + * @param productsId The value of productsId as greaterThan. + */ + public void setProductsId_GreaterThan(String productsId) { + registerProductsId(ConditionKey.CK_GREATER_THAN, filterRemoveEmptyString(productsId)); + } + + /** + * Set the value of productsId using lessThan. { < } + * If the value is null or empty-string, this condition is ignored. + * + * @param productsId The value of productsId as lessThan. + */ + public void setProductsId_LessThan(String productsId) { + registerProductsId(ConditionKey.CK_LESS_THAN, filterRemoveEmptyString(productsId)); + } + + /** + * Set the value of productsId using greaterEqual. { >= } + * If the value is null or empty-string, this condition is ignored. + * + * @param productsId The value of productsId as greaterEqual. + */ + public void setProductsId_GreaterEqual(String productsId) { + registerProductsId(ConditionKey.CK_GREATER_EQUAL, filterRemoveEmptyString(productsId)); + } + + /** + * Set the value of productsId using lessEqual. { <= } + * If the value is null or empty-string, this condition is ignored. + * + * @param productsId The value of productsId as lessEqual. + */ + public void setProductsId_LessEqual(String productsId) { + registerProductsId(ConditionKey.CK_LESS_EQUAL, filterRemoveEmptyString(productsId)); + } + + /** + * Set the value of productsId using prefixSearch. { like 'xxx%' } + * If the value is null or empty-string, this condition is ignored. + * + * @param productsId The value of productsId as prefixSearch. + */ + public void setProductsId_PrefixSearch(String productsId) { + registerProductsId(ConditionKey.CK_PREFIX_SEARCH, filterRemoveEmptyString(productsId)); + } + + /** + * Set the value of productsId using likeSearch. { like '%xxx%' } + * If the value is null or empty-string, this condition is ignored. + * You can invoke this method several times and the conditions are set up. + * + * @param productsId The value of productsId as likeSearch. + * @param likeSearchOption Like search option. (NotNull) + */ + public void setProductsId_LikeSearch(String productsId, jp.sf.pal.pompei.allcommon.cbean.coption.LikeSearchOption likeSearchOption) { + registerLikeSearchQuery(ConditionKey.CK_LIKE_SEARCH, filterRemoveEmptyString(productsId), getCValueProductsId(), COL_PRODUCTS_ID, J_ProductsId, UJ_productsId, likeSearchOption); + } + + /** + * Set the value of productsId using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param productsIdList The value of productsId as inScope. + */ + public void setProductsId_InScope(java.util.List productsIdList) { + registerProductsId(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyStringFromList(productsIdList)); + } + + /** + * Set the value of productsId using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param productsId The value of productsId as inScope. + */ + public void setProductsId_InScope(String productsId, jp.sf.pal.pompei.allcommon.cbean.coption.InScopeOption option) { + registerInScopeQuery(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyString(productsId), getCValueProductsId(), COL_PRODUCTS_ID, J_ProductsId, UJ_productsId, option); + } + + /** + * Set the value of productsId using notInScope. { not in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param productsIdList The value of productsId as notInScope. + */ + public void setProductsId_NotInScope(java.util.List productsIdList) { + registerProductsId(ConditionKey.CK_NOT_IN_SCOPE, filterRemoveEmptyStringFromList(productsIdList)); + } + + /** + * Register condition of productsId. + * + * @param key Condition key. (NotNull) + * @param value The value of productsId. (Nullable) + */ + protected void registerProductsId(ConditionKey key, Object value) { + registerQuery(key, value, getCValueProductsId(), COL_PRODUCTS_ID, J_ProductsId, UJ_productsId); + } + + /** + * Register inline condition of productsId. + * + * @param key Condition key. (NotNull) + * @param value The value of productsId. (Nullable) + */ + protected void registerInlineProductsId(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueProductsId(), COL_PRODUCTS_ID, J_ProductsId, UJ_productsId); + } + + abstract protected ConditionValue getCValueProductsId(); + + /** Column db name of productsOptionsId. */ + protected static final String COL_PRODUCTS_OPTIONS_ID = "PRODUCTS_OPTIONS_ID"; + + /** Column java name of productsOptionsId. */ + protected static final String J_ProductsOptionsId = "ProductsOptionsId"; + + /** Column uncapitalised java name of productsOptionsId. */ + protected static final String UJ_productsOptionsId = "productsOptionsId"; + + /** + * Set the value of productsOptionsId using equal. { = } + * + * @param productsOptionsId The value of productsOptionsId as equal. + */ + public void setProductsOptionsId_Equal(java.math.BigDecimal productsOptionsId) { + registerProductsOptionsId(ConditionKey.CK_EQUAL, productsOptionsId); + } + + /** + * Set the value of productsOptionsId using notEqual. { != } + * + * @param productsOptionsId The value of productsOptionsId as notEqual. + */ + public void setProductsOptionsId_NotEqual(java.math.BigDecimal productsOptionsId) { + registerProductsOptionsId(ConditionKey.CK_NOT_EQUAL, productsOptionsId); + } + + /** + * Set the value of productsOptionsId using greaterThan. { > } + * + * @param productsOptionsId The value of productsOptionsId as greaterThan. + */ + public void setProductsOptionsId_GreaterThan(java.math.BigDecimal productsOptionsId) { + registerProductsOptionsId(ConditionKey.CK_GREATER_THAN, productsOptionsId); + } + + /** + * Set the value of productsOptionsId using lessThan. { < } + * + * @param productsOptionsId The value of productsOptionsId as lessThan. + */ + public void setProductsOptionsId_LessThan(java.math.BigDecimal productsOptionsId) { + registerProductsOptionsId(ConditionKey.CK_LESS_THAN, productsOptionsId); + } + + /** + * Set the value of productsOptionsId using greaterEqual. { >= } + * + * @param productsOptionsId The value of productsOptionsId as greaterEqual. + */ + public void setProductsOptionsId_GreaterEqual(java.math.BigDecimal productsOptionsId) { + registerProductsOptionsId(ConditionKey.CK_GREATER_EQUAL, productsOptionsId); + } + + /** + * Set the value of productsOptionsId using lessEqual. { <= } + * + * @param productsOptionsId The value of productsOptionsId as lessEqual. + */ + public void setProductsOptionsId_LessEqual(java.math.BigDecimal productsOptionsId) { + registerProductsOptionsId(ConditionKey.CK_LESS_EQUAL, productsOptionsId); + } + + /** + * Set the value of productsOptionsId using inScope. { in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param productsOptionsIdList The value of productsOptionsId as inScope. + */ + public void setProductsOptionsId_InScope(java.util.List productsOptionsIdList) { + registerProductsOptionsId(ConditionKey.CK_IN_SCOPE, productsOptionsIdList); + } + + /** + * Set the value of productsOptionsId using notInScope. { not in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param productsOptionsIdList The value of productsOptionsId as notInScope. + */ + public void setProductsOptionsId_NotInScope(java.util.List productsOptionsIdList) { + registerProductsOptionsId(ConditionKey.CK_NOT_IN_SCOPE, productsOptionsIdList); + } + + /** + * Register condition of productsOptionsId. + * + * @param key Condition key. (NotNull) + * @param value The value of productsOptionsId. (Nullable) + */ + protected void registerProductsOptionsId(ConditionKey key, Object value) { + registerQuery(key, value, getCValueProductsOptionsId(), COL_PRODUCTS_OPTIONS_ID, J_ProductsOptionsId, UJ_productsOptionsId); + } + + /** + * Register inline condition of productsOptionsId. + * + * @param key Condition key. (NotNull) + * @param value The value of productsOptionsId. (Nullable) + */ + protected void registerInlineProductsOptionsId(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueProductsOptionsId(), COL_PRODUCTS_OPTIONS_ID, J_ProductsOptionsId, UJ_productsOptionsId); + } + + abstract protected ConditionValue getCValueProductsOptionsId(); + + /** Column db name of productsOptionsValueId. */ + protected static final String COL_PRODUCTS_OPTIONS_VALUE_ID = "PRODUCTS_OPTIONS_VALUE_ID"; + + /** Column java name of productsOptionsValueId. */ + protected static final String J_ProductsOptionsValueId = "ProductsOptionsValueId"; + + /** Column uncapitalised java name of productsOptionsValueId. */ + protected static final String UJ_productsOptionsValueId = "productsOptionsValueId"; + + /** + * Set the value of productsOptionsValueId using equal. { = } + * + * @param productsOptionsValueId The value of productsOptionsValueId as equal. + */ + public void setProductsOptionsValueId_Equal(java.math.BigDecimal productsOptionsValueId) { + registerProductsOptionsValueId(ConditionKey.CK_EQUAL, productsOptionsValueId); + } + + /** + * Set the value of productsOptionsValueId using notEqual. { != } + * + * @param productsOptionsValueId The value of productsOptionsValueId as notEqual. + */ + public void setProductsOptionsValueId_NotEqual(java.math.BigDecimal productsOptionsValueId) { + registerProductsOptionsValueId(ConditionKey.CK_NOT_EQUAL, productsOptionsValueId); + } + + /** + * Set the value of productsOptionsValueId using greaterThan. { > } + * + * @param productsOptionsValueId The value of productsOptionsValueId as greaterThan. + */ + public void setProductsOptionsValueId_GreaterThan(java.math.BigDecimal productsOptionsValueId) { + registerProductsOptionsValueId(ConditionKey.CK_GREATER_THAN, productsOptionsValueId); + } + + /** + * Set the value of productsOptionsValueId using lessThan. { < } + * + * @param productsOptionsValueId The value of productsOptionsValueId as lessThan. + */ + public void setProductsOptionsValueId_LessThan(java.math.BigDecimal productsOptionsValueId) { + registerProductsOptionsValueId(ConditionKey.CK_LESS_THAN, productsOptionsValueId); + } + + /** + * Set the value of productsOptionsValueId using greaterEqual. { >= } + * + * @param productsOptionsValueId The value of productsOptionsValueId as greaterEqual. + */ + public void setProductsOptionsValueId_GreaterEqual(java.math.BigDecimal productsOptionsValueId) { + registerProductsOptionsValueId(ConditionKey.CK_GREATER_EQUAL, productsOptionsValueId); + } + + /** + * Set the value of productsOptionsValueId using lessEqual. { <= } + * + * @param productsOptionsValueId The value of productsOptionsValueId as lessEqual. + */ + public void setProductsOptionsValueId_LessEqual(java.math.BigDecimal productsOptionsValueId) { + registerProductsOptionsValueId(ConditionKey.CK_LESS_EQUAL, productsOptionsValueId); + } + + /** + * Set the value of productsOptionsValueId using inScope. { in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param productsOptionsValueIdList The value of productsOptionsValueId as inScope. + */ + public void setProductsOptionsValueId_InScope(java.util.List productsOptionsValueIdList) { + registerProductsOptionsValueId(ConditionKey.CK_IN_SCOPE, productsOptionsValueIdList); + } + + /** + * Set the value of productsOptionsValueId using notInScope. { not in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param productsOptionsValueIdList The value of productsOptionsValueId as notInScope. + */ + public void setProductsOptionsValueId_NotInScope(java.util.List productsOptionsValueIdList) { + registerProductsOptionsValueId(ConditionKey.CK_NOT_IN_SCOPE, productsOptionsValueIdList); + } + + /** + * Register condition of productsOptionsValueId. + * + * @param key Condition key. (NotNull) + * @param value The value of productsOptionsValueId. (Nullable) + */ + protected void registerProductsOptionsValueId(ConditionKey key, Object value) { + registerQuery(key, value, getCValueProductsOptionsValueId(), COL_PRODUCTS_OPTIONS_VALUE_ID, J_ProductsOptionsValueId, UJ_productsOptionsValueId); + } + + /** + * Register inline condition of productsOptionsValueId. + * + * @param key Condition key. (NotNull) + * @param value The value of productsOptionsValueId. (Nullable) + */ + protected void registerInlineProductsOptionsValueId(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueProductsOptionsValueId(), COL_PRODUCTS_OPTIONS_VALUE_ID, J_ProductsOptionsValueId, UJ_productsOptionsValueId); + } + + abstract protected ConditionValue getCValueProductsOptionsValueId(); + + // =================================================================================== + // Basic Override + // ============== + /** + * This method overrides the method that is declared at super. + * + * @return Clause string. (NotNull) + */ + public String toString() { + return getSqlClause().getClause(); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/AbstractBsCustomersBasketCQ.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/AbstractBsCustomersBasketCQ.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/AbstractBsCustomersBasketCQ.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,800 @@ + +package jp.sf.pal.pompei.cbean.cq.bs; + + + +import jp.sf.pal.pompei.allcommon.cbean.*; +import jp.sf.pal.pompei.allcommon.cbean.ckey.*; +import jp.sf.pal.pompei.allcommon.cbean.cvalue.ConditionValue; +import jp.sf.pal.pompei.allcommon.cbean.sqlclause.SqlClause; +import jp.sf.pal.pompei.cbean.cq.*; + +/** + * The condition-query of CUSTOMERS_BASKET. + * + * @author DBFlute(AutoGenerator) + */ +public abstract class AbstractBsCustomersBasketCQ extends AbstractConditionQuery { + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param childQuery Child query as abstract class. (Nullable: If null, this is base instance.) + * @param sqlClause SQL clause instance. (NotNull) + * @param aliasName My alias name. (NotNull) + * @param nestLevel Nest level. + */ + public AbstractBsCustomersBasketCQ(ConditionQuery childQuery, SqlClause sqlClause, String aliasName, int nestLevel) { + super(childQuery, sqlClause, aliasName, nestLevel); + } + + // =================================================================================== + // Table Name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + final public String getTableDbName() { + return "CUSTOMERS_BASKET"; + } + + // =================================================================================== + // Query + // ===== + + // /* * * * * * * * * * * * * * * * * * * * * * * + // MyTable = [CUSTOMERS_BASKET] + // * * * * * * * * */ + + + /** Column db name of customersBasketId. */ + protected static final String COL_CUSTOMERS_BASKET_ID = "CUSTOMERS_BASKET_ID"; + + /** Column java name of customersBasketId. */ + protected static final String J_CustomersBasketId = "CustomersBasketId"; + + /** Column uncapitalised java name of customersBasketId. */ + protected static final String UJ_customersBasketId = "customersBasketId"; + + /** + * Set the value of customersBasketId using equal. { = } + * + * @param customersBasketId The value of customersBasketId as equal. + */ + public void setCustomersBasketId_Equal(java.math.BigDecimal customersBasketId) { + registerCustomersBasketId(ConditionKey.CK_EQUAL, customersBasketId); + } + + /** + * Set the value of customersBasketId using notEqual. { != } + * + * @param customersBasketId The value of customersBasketId as notEqual. + */ + public void setCustomersBasketId_NotEqual(java.math.BigDecimal customersBasketId) { + registerCustomersBasketId(ConditionKey.CK_NOT_EQUAL, customersBasketId); + } + + /** + * Set the value of customersBasketId using greaterThan. { > } + * + * @param customersBasketId The value of customersBasketId as greaterThan. + */ + public void setCustomersBasketId_GreaterThan(java.math.BigDecimal customersBasketId) { + registerCustomersBasketId(ConditionKey.CK_GREATER_THAN, customersBasketId); + } + + /** + * Set the value of customersBasketId using lessThan. { < } + * + * @param customersBasketId The value of customersBasketId as lessThan. + */ + public void setCustomersBasketId_LessThan(java.math.BigDecimal customersBasketId) { + registerCustomersBasketId(ConditionKey.CK_LESS_THAN, customersBasketId); + } + + /** + * Set the value of customersBasketId using greaterEqual. { >= } + * + * @param customersBasketId The value of customersBasketId as greaterEqual. + */ + public void setCustomersBasketId_GreaterEqual(java.math.BigDecimal customersBasketId) { + registerCustomersBasketId(ConditionKey.CK_GREATER_EQUAL, customersBasketId); + } + + /** + * Set the value of customersBasketId using lessEqual. { <= } + * + * @param customersBasketId The value of customersBasketId as lessEqual. + */ + public void setCustomersBasketId_LessEqual(java.math.BigDecimal customersBasketId) { + registerCustomersBasketId(ConditionKey.CK_LESS_EQUAL, customersBasketId); + } + + /** + * Set the value of customersBasketId using inScope. { in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param customersBasketIdList The value of customersBasketId as inScope. + */ + public void setCustomersBasketId_InScope(java.util.List customersBasketIdList) { + registerCustomersBasketId(ConditionKey.CK_IN_SCOPE, customersBasketIdList); + } + + /** + * Set the value of customersBasketId using notInScope. { not in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param customersBasketIdList The value of customersBasketId as notInScope. + */ + public void setCustomersBasketId_NotInScope(java.util.List customersBasketIdList) { + registerCustomersBasketId(ConditionKey.CK_NOT_IN_SCOPE, customersBasketIdList); + } + + /** + * Register condition of customersBasketId. + * + * @param key Condition key. (NotNull) + * @param value The value of customersBasketId. (Nullable) + */ + protected void registerCustomersBasketId(ConditionKey key, Object value) { + registerQuery(key, value, getCValueCustomersBasketId(), COL_CUSTOMERS_BASKET_ID, J_CustomersBasketId, UJ_customersBasketId); + } + + /** + * Register inline condition of customersBasketId. + * + * @param key Condition key. (NotNull) + * @param value The value of customersBasketId. (Nullable) + */ + protected void registerInlineCustomersBasketId(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueCustomersBasketId(), COL_CUSTOMERS_BASKET_ID, J_CustomersBasketId, UJ_customersBasketId); + } + + abstract protected ConditionValue getCValueCustomersBasketId(); + + /** Column db name of customersId. */ + protected static final String COL_CUSTOMERS_ID = "CUSTOMERS_ID"; + + /** Column java name of customersId. */ + protected static final String J_CustomersId = "CustomersId"; + + /** Column uncapitalised java name of customersId. */ + protected static final String UJ_customersId = "customersId"; + + /** + * Set the value of customersId using equal. { = } + * + * @param customersId The value of customersId as equal. + */ + public void setCustomersId_Equal(java.math.BigDecimal customersId) { + registerCustomersId(ConditionKey.CK_EQUAL, customersId); + } + + /** + * Set the value of customersId using notEqual. { != } + * + * @param customersId The value of customersId as notEqual. + */ + public void setCustomersId_NotEqual(java.math.BigDecimal customersId) { + registerCustomersId(ConditionKey.CK_NOT_EQUAL, customersId); + } + + /** + * Set the value of customersId using greaterThan. { > } + * + * @param customersId The value of customersId as greaterThan. + */ + public void setCustomersId_GreaterThan(java.math.BigDecimal customersId) { + registerCustomersId(ConditionKey.CK_GREATER_THAN, customersId); + } + + /** + * Set the value of customersId using lessThan. { < } + * + * @param customersId The value of customersId as lessThan. + */ + public void setCustomersId_LessThan(java.math.BigDecimal customersId) { + registerCustomersId(ConditionKey.CK_LESS_THAN, customersId); + } + + /** + * Set the value of customersId using greaterEqual. { >= } + * + * @param customersId The value of customersId as greaterEqual. + */ + public void setCustomersId_GreaterEqual(java.math.BigDecimal customersId) { + registerCustomersId(ConditionKey.CK_GREATER_EQUAL, customersId); + } + + /** + * Set the value of customersId using lessEqual. { <= } + * + * @param customersId The value of customersId as lessEqual. + */ + public void setCustomersId_LessEqual(java.math.BigDecimal customersId) { + registerCustomersId(ConditionKey.CK_LESS_EQUAL, customersId); + } + + /** + * Set the value of customersId using inScope. { in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param customersIdList The value of customersId as inScope. + */ + public void setCustomersId_InScope(java.util.List customersIdList) { + registerCustomersId(ConditionKey.CK_IN_SCOPE, customersIdList); + } + + /** + * Set the value of customersId using notInScope. { not in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param customersIdList The value of customersId as notInScope. + */ + public void setCustomersId_NotInScope(java.util.List customersIdList) { + registerCustomersId(ConditionKey.CK_NOT_IN_SCOPE, customersIdList); + } + + /** + * Register condition of customersId. + * + * @param key Condition key. (NotNull) + * @param value The value of customersId. (Nullable) + */ + protected void registerCustomersId(ConditionKey key, Object value) { + registerQuery(key, value, getCValueCustomersId(), COL_CUSTOMERS_ID, J_CustomersId, UJ_customersId); + } + + /** + * Register inline condition of customersId. + * + * @param key Condition key. (NotNull) + * @param value The value of customersId. (Nullable) + */ + protected void registerInlineCustomersId(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueCustomersId(), COL_CUSTOMERS_ID, J_CustomersId, UJ_customersId); + } + + abstract protected ConditionValue getCValueCustomersId(); + + /** Column db name of productsId. */ + protected static final String COL_PRODUCTS_ID = "PRODUCTS_ID"; + + /** Column java name of productsId. */ + protected static final String J_ProductsId = "ProductsId"; + + /** Column uncapitalised java name of productsId. */ + protected static final String UJ_productsId = "productsId"; + + /** + * Set the value of productsId using equal. { = } + * If the value is null or empty-string, this condition is ignored. + * + * @param productsId The value of productsId as equal. + */ + public void setProductsId_Equal(String productsId) { + registerProductsId(ConditionKey.CK_EQUAL, filterRemoveEmptyString(productsId)); + } + + /** + * Set the value of productsId using notEqual. { != } + * If the value is null or empty-string, this condition is ignored. + * + * @param productsId The value of productsId as notEqual. + */ + public void setProductsId_NotEqual(String productsId) { + registerProductsId(ConditionKey.CK_NOT_EQUAL, filterRemoveEmptyString(productsId)); + } + + /** + * Set the value of productsId using greaterThan. { > } + * If the value is null or empty-string, this condition is ignored. + * + * @param productsId The value of productsId as greaterThan. + */ + public void setProductsId_GreaterThan(String productsId) { + registerProductsId(ConditionKey.CK_GREATER_THAN, filterRemoveEmptyString(productsId)); + } + + /** + * Set the value of productsId using lessThan. { < } + * If the value is null or empty-string, this condition is ignored. + * + * @param productsId The value of productsId as lessThan. + */ + public void setProductsId_LessThan(String productsId) { + registerProductsId(ConditionKey.CK_LESS_THAN, filterRemoveEmptyString(productsId)); + } + + /** + * Set the value of productsId using greaterEqual. { >= } + * If the value is null or empty-string, this condition is ignored. + * + * @param productsId The value of productsId as greaterEqual. + */ + public void setProductsId_GreaterEqual(String productsId) { + registerProductsId(ConditionKey.CK_GREATER_EQUAL, filterRemoveEmptyString(productsId)); + } + + /** + * Set the value of productsId using lessEqual. { <= } + * If the value is null or empty-string, this condition is ignored. + * + * @param productsId The value of productsId as lessEqual. + */ + public void setProductsId_LessEqual(String productsId) { + registerProductsId(ConditionKey.CK_LESS_EQUAL, filterRemoveEmptyString(productsId)); + } + + /** + * Set the value of productsId using prefixSearch. { like 'xxx%' } + * If the value is null or empty-string, this condition is ignored. + * + * @param productsId The value of productsId as prefixSearch. + */ + public void setProductsId_PrefixSearch(String productsId) { + registerProductsId(ConditionKey.CK_PREFIX_SEARCH, filterRemoveEmptyString(productsId)); + } + + /** + * Set the value of productsId using likeSearch. { like '%xxx%' } + * If the value is null or empty-string, this condition is ignored. + * You can invoke this method several times and the conditions are set up. + * + * @param productsId The value of productsId as likeSearch. + * @param likeSearchOption Like search option. (NotNull) + */ + public void setProductsId_LikeSearch(String productsId, jp.sf.pal.pompei.allcommon.cbean.coption.LikeSearchOption likeSearchOption) { + registerLikeSearchQuery(ConditionKey.CK_LIKE_SEARCH, filterRemoveEmptyString(productsId), getCValueProductsId(), COL_PRODUCTS_ID, J_ProductsId, UJ_productsId, likeSearchOption); + } + + /** + * Set the value of productsId using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param productsIdList The value of productsId as inScope. + */ + public void setProductsId_InScope(java.util.List productsIdList) { + registerProductsId(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyStringFromList(productsIdList)); + } + + /** + * Set the value of productsId using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param productsId The value of productsId as inScope. + */ + public void setProductsId_InScope(String productsId, jp.sf.pal.pompei.allcommon.cbean.coption.InScopeOption option) { + registerInScopeQuery(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyString(productsId), getCValueProductsId(), COL_PRODUCTS_ID, J_ProductsId, UJ_productsId, option); + } + + /** + * Set the value of productsId using notInScope. { not in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param productsIdList The value of productsId as notInScope. + */ + public void setProductsId_NotInScope(java.util.List productsIdList) { + registerProductsId(ConditionKey.CK_NOT_IN_SCOPE, filterRemoveEmptyStringFromList(productsIdList)); + } + + /** + * Register condition of productsId. + * + * @param key Condition key. (NotNull) + * @param value The value of productsId. (Nullable) + */ + protected void registerProductsId(ConditionKey key, Object value) { + registerQuery(key, value, getCValueProductsId(), COL_PRODUCTS_ID, J_ProductsId, UJ_productsId); + } + + /** + * Register inline condition of productsId. + * + * @param key Condition key. (NotNull) + * @param value The value of productsId. (Nullable) + */ + protected void registerInlineProductsId(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueProductsId(), COL_PRODUCTS_ID, J_ProductsId, UJ_productsId); + } + + abstract protected ConditionValue getCValueProductsId(); + + /** Column db name of customersBasketQuantity. */ + protected static final String COL_CUSTOMERS_BASKET_QUANTITY = "CUSTOMERS_BASKET_QUANTITY"; + + /** Column java name of customersBasketQuantity. */ + protected static final String J_CustomersBasketQuantity = "CustomersBasketQuantity"; + + /** Column uncapitalised java name of customersBasketQuantity. */ + protected static final String UJ_customersBasketQuantity = "customersBasketQuantity"; + + /** + * Set the value of customersBasketQuantity using equal. { = } + * + * @param customersBasketQuantity The value of customersBasketQuantity as equal. + */ + public void setCustomersBasketQuantity_Equal(java.math.BigDecimal customersBasketQuantity) { + registerCustomersBasketQuantity(ConditionKey.CK_EQUAL, customersBasketQuantity); + } + + /** + * Set the value of customersBasketQuantity using notEqual. { != } + * + * @param customersBasketQuantity The value of customersBasketQuantity as notEqual. + */ + public void setCustomersBasketQuantity_NotEqual(java.math.BigDecimal customersBasketQuantity) { + registerCustomersBasketQuantity(ConditionKey.CK_NOT_EQUAL, customersBasketQuantity); + } + + /** + * Set the value of customersBasketQuantity using greaterThan. { > } + * + * @param customersBasketQuantity The value of customersBasketQuantity as greaterThan. + */ + public void setCustomersBasketQuantity_GreaterThan(java.math.BigDecimal customersBasketQuantity) { + registerCustomersBasketQuantity(ConditionKey.CK_GREATER_THAN, customersBasketQuantity); + } + + /** + * Set the value of customersBasketQuantity using lessThan. { < } + * + * @param customersBasketQuantity The value of customersBasketQuantity as lessThan. + */ + public void setCustomersBasketQuantity_LessThan(java.math.BigDecimal customersBasketQuantity) { + registerCustomersBasketQuantity(ConditionKey.CK_LESS_THAN, customersBasketQuantity); + } + + /** + * Set the value of customersBasketQuantity using greaterEqual. { >= } + * + * @param customersBasketQuantity The value of customersBasketQuantity as greaterEqual. + */ + public void setCustomersBasketQuantity_GreaterEqual(java.math.BigDecimal customersBasketQuantity) { + registerCustomersBasketQuantity(ConditionKey.CK_GREATER_EQUAL, customersBasketQuantity); + } + + /** + * Set the value of customersBasketQuantity using lessEqual. { <= } + * + * @param customersBasketQuantity The value of customersBasketQuantity as lessEqual. + */ + public void setCustomersBasketQuantity_LessEqual(java.math.BigDecimal customersBasketQuantity) { + registerCustomersBasketQuantity(ConditionKey.CK_LESS_EQUAL, customersBasketQuantity); + } + + /** + * Set the value of customersBasketQuantity using inScope. { in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param customersBasketQuantityList The value of customersBasketQuantity as inScope. + */ + public void setCustomersBasketQuantity_InScope(java.util.List customersBasketQuantityList) { + registerCustomersBasketQuantity(ConditionKey.CK_IN_SCOPE, customersBasketQuantityList); + } + + /** + * Set the value of customersBasketQuantity using notInScope. { not in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param customersBasketQuantityList The value of customersBasketQuantity as notInScope. + */ + public void setCustomersBasketQuantity_NotInScope(java.util.List customersBasketQuantityList) { + registerCustomersBasketQuantity(ConditionKey.CK_NOT_IN_SCOPE, customersBasketQuantityList); + } + + /** + * Register condition of customersBasketQuantity. + * + * @param key Condition key. (NotNull) + * @param value The value of customersBasketQuantity. (Nullable) + */ + protected void registerCustomersBasketQuantity(ConditionKey key, Object value) { + registerQuery(key, value, getCValueCustomersBasketQuantity(), COL_CUSTOMERS_BASKET_QUANTITY, J_CustomersBasketQuantity, UJ_customersBasketQuantity); + } + + /** + * Register inline condition of customersBasketQuantity. + * + * @param key Condition key. (NotNull) + * @param value The value of customersBasketQuantity. (Nullable) + */ + protected void registerInlineCustomersBasketQuantity(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueCustomersBasketQuantity(), COL_CUSTOMERS_BASKET_QUANTITY, J_CustomersBasketQuantity, UJ_customersBasketQuantity); + } + + abstract protected ConditionValue getCValueCustomersBasketQuantity(); + + /** Column db name of finalPrice. */ + protected static final String COL_FINAL_PRICE = "FINAL_PRICE"; + + /** Column java name of finalPrice. */ + protected static final String J_FinalPrice = "FinalPrice"; + + /** Column uncapitalised java name of finalPrice. */ + protected static final String UJ_finalPrice = "finalPrice"; + + /** + * Set the value of finalPrice using equal. { = } + * + * @param finalPrice The value of finalPrice as equal. + */ + public void setFinalPrice_Equal(java.math.BigDecimal finalPrice) { + registerFinalPrice(ConditionKey.CK_EQUAL, finalPrice); + } + + /** + * Set the value of finalPrice using notEqual. { != } + * + * @param finalPrice The value of finalPrice as notEqual. + */ + public void setFinalPrice_NotEqual(java.math.BigDecimal finalPrice) { + registerFinalPrice(ConditionKey.CK_NOT_EQUAL, finalPrice); + } + + /** + * Set the value of finalPrice using greaterThan. { > } + * + * @param finalPrice The value of finalPrice as greaterThan. + */ + public void setFinalPrice_GreaterThan(java.math.BigDecimal finalPrice) { + registerFinalPrice(ConditionKey.CK_GREATER_THAN, finalPrice); + } + + /** + * Set the value of finalPrice using lessThan. { < } + * + * @param finalPrice The value of finalPrice as lessThan. + */ + public void setFinalPrice_LessThan(java.math.BigDecimal finalPrice) { + registerFinalPrice(ConditionKey.CK_LESS_THAN, finalPrice); + } + + /** + * Set the value of finalPrice using greaterEqual. { >= } + * + * @param finalPrice The value of finalPrice as greaterEqual. + */ + public void setFinalPrice_GreaterEqual(java.math.BigDecimal finalPrice) { + registerFinalPrice(ConditionKey.CK_GREATER_EQUAL, finalPrice); + } + + /** + * Set the value of finalPrice using lessEqual. { <= } + * + * @param finalPrice The value of finalPrice as lessEqual. + */ + public void setFinalPrice_LessEqual(java.math.BigDecimal finalPrice) { + registerFinalPrice(ConditionKey.CK_LESS_EQUAL, finalPrice); + } + + /** + * Set the value of finalPrice using inScope. { in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param finalPriceList The value of finalPrice as inScope. + */ + public void setFinalPrice_InScope(java.util.List finalPriceList) { + registerFinalPrice(ConditionKey.CK_IN_SCOPE, finalPriceList); + } + + /** + * Set the value of finalPrice using notInScope. { not in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param finalPriceList The value of finalPrice as notInScope. + */ + public void setFinalPrice_NotInScope(java.util.List finalPriceList) { + registerFinalPrice(ConditionKey.CK_NOT_IN_SCOPE, finalPriceList); + } + + /** + * Set the value of finalPrice using isNull. { is null } + */ + public void setFinalPrice_IsNull() { + registerFinalPrice(ConditionKey.CK_IS_NULL, DUMMY_OBJECT); + } + + /** + * Set the value of finalPrice using isNotNull. { is not null } + */ + public void setFinalPrice_IsNotNull() { + registerFinalPrice(ConditionKey.CK_IS_NOT_NULL, DUMMY_OBJECT); + } + + /** + * Register condition of finalPrice. + * + * @param key Condition key. (NotNull) + * @param value The value of finalPrice. (Nullable) + */ + protected void registerFinalPrice(ConditionKey key, Object value) { + registerQuery(key, value, getCValueFinalPrice(), COL_FINAL_PRICE, J_FinalPrice, UJ_finalPrice); + } + + /** + * Register inline condition of finalPrice. + * + * @param key Condition key. (NotNull) + * @param value The value of finalPrice. (Nullable) + */ + protected void registerInlineFinalPrice(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueFinalPrice(), COL_FINAL_PRICE, J_FinalPrice, UJ_finalPrice); + } + + abstract protected ConditionValue getCValueFinalPrice(); + + /** Column db name of customersBasketDateAdded. */ + protected static final String COL_CUSTOMERS_BASKET_DATE_ADDED = "CUSTOMERS_BASKET_DATE_ADDED"; + + /** Column java name of customersBasketDateAdded. */ + protected static final String J_CustomersBasketDateAdded = "CustomersBasketDateAdded"; + + /** Column uncapitalised java name of customersBasketDateAdded. */ + protected static final String UJ_customersBasketDateAdded = "customersBasketDateAdded"; + + /** + * Set the value of customersBasketDateAdded using equal. { = } + * If the value is null or empty-string, this condition is ignored. + * + * @param customersBasketDateAdded The value of customersBasketDateAdded as equal. + */ + public void setCustomersBasketDateAdded_Equal(String customersBasketDateAdded) { + registerCustomersBasketDateAdded(ConditionKey.CK_EQUAL, filterRemoveEmptyString(customersBasketDateAdded)); + } + + /** + * Set the value of customersBasketDateAdded using notEqual. { != } + * If the value is null or empty-string, this condition is ignored. + * + * @param customersBasketDateAdded The value of customersBasketDateAdded as notEqual. + */ + public void setCustomersBasketDateAdded_NotEqual(String customersBasketDateAdded) { + registerCustomersBasketDateAdded(ConditionKey.CK_NOT_EQUAL, filterRemoveEmptyString(customersBasketDateAdded)); + } + + /** + * Set the value of customersBasketDateAdded using greaterThan. { > } + * If the value is null or empty-string, this condition is ignored. + * + * @param customersBasketDateAdded The value of customersBasketDateAdded as greaterThan. + */ + public void setCustomersBasketDateAdded_GreaterThan(String customersBasketDateAdded) { + registerCustomersBasketDateAdded(ConditionKey.CK_GREATER_THAN, filterRemoveEmptyString(customersBasketDateAdded)); + } + + /** + * Set the value of customersBasketDateAdded using lessThan. { < } + * If the value is null or empty-string, this condition is ignored. + * + * @param customersBasketDateAdded The value of customersBasketDateAdded as lessThan. + */ + public void setCustomersBasketDateAdded_LessThan(String customersBasketDateAdded) { + registerCustomersBasketDateAdded(ConditionKey.CK_LESS_THAN, filterRemoveEmptyString(customersBasketDateAdded)); + } + + /** + * Set the value of customersBasketDateAdded using greaterEqual. { >= } + * If the value is null or empty-string, this condition is ignored. + * + * @param customersBasketDateAdded The value of customersBasketDateAdded as greaterEqual. + */ + public void setCustomersBasketDateAdded_GreaterEqual(String customersBasketDateAdded) { + registerCustomersBasketDateAdded(ConditionKey.CK_GREATER_EQUAL, filterRemoveEmptyString(customersBasketDateAdded)); + } + + /** + * Set the value of customersBasketDateAdded using lessEqual. { <= } + * If the value is null or empty-string, this condition is ignored. + * + * @param customersBasketDateAdded The value of customersBasketDateAdded as lessEqual. + */ + public void setCustomersBasketDateAdded_LessEqual(String customersBasketDateAdded) { + registerCustomersBasketDateAdded(ConditionKey.CK_LESS_EQUAL, filterRemoveEmptyString(customersBasketDateAdded)); + } + + /** + * Set the value of customersBasketDateAdded using prefixSearch. { like 'xxx%' } + * If the value is null or empty-string, this condition is ignored. + * + * @param customersBasketDateAdded The value of customersBasketDateAdded as prefixSearch. + */ + public void setCustomersBasketDateAdded_PrefixSearch(String customersBasketDateAdded) { + registerCustomersBasketDateAdded(ConditionKey.CK_PREFIX_SEARCH, filterRemoveEmptyString(customersBasketDateAdded)); + } + + /** + * Set the value of customersBasketDateAdded using likeSearch. { like '%xxx%' } + * If the value is null or empty-string, this condition is ignored. + * You can invoke this method several times and the conditions are set up. + * + * @param customersBasketDateAdded The value of customersBasketDateAdded as likeSearch. + * @param likeSearchOption Like search option. (NotNull) + */ + public void setCustomersBasketDateAdded_LikeSearch(String customersBasketDateAdded, jp.sf.pal.pompei.allcommon.cbean.coption.LikeSearchOption likeSearchOption) { + registerLikeSearchQuery(ConditionKey.CK_LIKE_SEARCH, filterRemoveEmptyString(customersBasketDateAdded), getCValueCustomersBasketDateAdded(), COL_CUSTOMERS_BASKET_DATE_ADDED, J_CustomersBasketDateAdded, UJ_customersBasketDateAdded, likeSearchOption); + } + + /** + * Set the value of customersBasketDateAdded using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param customersBasketDateAddedList The value of customersBasketDateAdded as inScope. + */ + public void setCustomersBasketDateAdded_InScope(java.util.List customersBasketDateAddedList) { + registerCustomersBasketDateAdded(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyStringFromList(customersBasketDateAddedList)); + } + + /** + * Set the value of customersBasketDateAdded using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param customersBasketDateAdded The value of customersBasketDateAdded as inScope. + */ + public void setCustomersBasketDateAdded_InScope(String customersBasketDateAdded, jp.sf.pal.pompei.allcommon.cbean.coption.InScopeOption option) { + registerInScopeQuery(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyString(customersBasketDateAdded), getCValueCustomersBasketDateAdded(), COL_CUSTOMERS_BASKET_DATE_ADDED, J_CustomersBasketDateAdded, UJ_customersBasketDateAdded, option); + } + + /** + * Set the value of customersBasketDateAdded using notInScope. { not in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param customersBasketDateAddedList The value of customersBasketDateAdded as notInScope. + */ + public void setCustomersBasketDateAdded_NotInScope(java.util.List customersBasketDateAddedList) { + registerCustomersBasketDateAdded(ConditionKey.CK_NOT_IN_SCOPE, filterRemoveEmptyStringFromList(customersBasketDateAddedList)); + } + + /** + * Set the value of customersBasketDateAdded using isNull. { is null } + */ + public void setCustomersBasketDateAdded_IsNull() { + registerCustomersBasketDateAdded(ConditionKey.CK_IS_NULL, DUMMY_OBJECT); + } + + /** + * Set the value of customersBasketDateAdded using isNotNull. { is not null } + */ + public void setCustomersBasketDateAdded_IsNotNull() { + registerCustomersBasketDateAdded(ConditionKey.CK_IS_NOT_NULL, DUMMY_OBJECT); + } + + /** + * Register condition of customersBasketDateAdded. + * + * @param key Condition key. (NotNull) + * @param value The value of customersBasketDateAdded. (Nullable) + */ + protected void registerCustomersBasketDateAdded(ConditionKey key, Object value) { + registerQuery(key, value, getCValueCustomersBasketDateAdded(), COL_CUSTOMERS_BASKET_DATE_ADDED, J_CustomersBasketDateAdded, UJ_customersBasketDateAdded); + } + + /** + * Register inline condition of customersBasketDateAdded. + * + * @param key Condition key. (NotNull) + * @param value The value of customersBasketDateAdded. (Nullable) + */ + protected void registerInlineCustomersBasketDateAdded(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueCustomersBasketDateAdded(), COL_CUSTOMERS_BASKET_DATE_ADDED, J_CustomersBasketDateAdded, UJ_customersBasketDateAdded); + } + + abstract protected ConditionValue getCValueCustomersBasketDateAdded(); + + // =================================================================================== + // Basic Override + // ============== + /** + * This method overrides the method that is declared at super. + * + * @return Clause string. (NotNull) + */ + public String toString() { + return getSqlClause().getClause(); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/AbstractBsCustomersCQ.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/AbstractBsCustomersCQ.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/AbstractBsCustomersCQ.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,1557 @@ + +package jp.sf.pal.pompei.cbean.cq.bs; + + + +import jp.sf.pal.pompei.allcommon.cbean.*; +import jp.sf.pal.pompei.allcommon.cbean.ckey.*; +import jp.sf.pal.pompei.allcommon.cbean.cvalue.ConditionValue; +import jp.sf.pal.pompei.allcommon.cbean.sqlclause.SqlClause; +import jp.sf.pal.pompei.cbean.cq.*; + +/** + * The condition-query of CUSTOMERS. + * + * @author DBFlute(AutoGenerator) + */ +public abstract class AbstractBsCustomersCQ extends AbstractConditionQuery { + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param childQuery Child query as abstract class. (Nullable: If null, this is base instance.) + * @param sqlClause SQL clause instance. (NotNull) + * @param aliasName My alias name. (NotNull) + * @param nestLevel Nest level. + */ + public AbstractBsCustomersCQ(ConditionQuery childQuery, SqlClause sqlClause, String aliasName, int nestLevel) { + super(childQuery, sqlClause, aliasName, nestLevel); + } + + // =================================================================================== + // Table Name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + final public String getTableDbName() { + return "CUSTOMERS"; + } + + // =================================================================================== + // Query + // ===== + + // /* * * * * * * * * * * * * * * * * * * * * * * + // MyTable = [CUSTOMERS] + // * * * * * * * * */ + + + /** Column db name of customersId. */ + protected static final String COL_CUSTOMERS_ID = "CUSTOMERS_ID"; + + /** Column java name of customersId. */ + protected static final String J_CustomersId = "CustomersId"; + + /** Column uncapitalised java name of customersId. */ + protected static final String UJ_customersId = "customersId"; + + /** + * Set the value of customersId using equal. { = } + * + * @param customersId The value of customersId as equal. + */ + public void setCustomersId_Equal(java.math.BigDecimal customersId) { + registerCustomersId(ConditionKey.CK_EQUAL, customersId); + } + + /** + * Set the value of customersId using notEqual. { != } + * + * @param customersId The value of customersId as notEqual. + */ + public void setCustomersId_NotEqual(java.math.BigDecimal customersId) { + registerCustomersId(ConditionKey.CK_NOT_EQUAL, customersId); + } + + /** + * Set the value of customersId using greaterThan. { > } + * + * @param customersId The value of customersId as greaterThan. + */ + public void setCustomersId_GreaterThan(java.math.BigDecimal customersId) { + registerCustomersId(ConditionKey.CK_GREATER_THAN, customersId); + } + + /** + * Set the value of customersId using lessThan. { < } + * + * @param customersId The value of customersId as lessThan. + */ + public void setCustomersId_LessThan(java.math.BigDecimal customersId) { + registerCustomersId(ConditionKey.CK_LESS_THAN, customersId); + } + + /** + * Set the value of customersId using greaterEqual. { >= } + * + * @param customersId The value of customersId as greaterEqual. + */ + public void setCustomersId_GreaterEqual(java.math.BigDecimal customersId) { + registerCustomersId(ConditionKey.CK_GREATER_EQUAL, customersId); + } + + /** + * Set the value of customersId using lessEqual. { <= } + * + * @param customersId The value of customersId as lessEqual. + */ + public void setCustomersId_LessEqual(java.math.BigDecimal customersId) { + registerCustomersId(ConditionKey.CK_LESS_EQUAL, customersId); + } + + /** + * Set the value of customersId using inScope. { in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param customersIdList The value of customersId as inScope. + */ + public void setCustomersId_InScope(java.util.List customersIdList) { + registerCustomersId(ConditionKey.CK_IN_SCOPE, customersIdList); + } + + /** + * Set the value of customersId using notInScope. { not in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param customersIdList The value of customersId as notInScope. + */ + public void setCustomersId_NotInScope(java.util.List customersIdList) { + registerCustomersId(ConditionKey.CK_NOT_IN_SCOPE, customersIdList); + } + + /** + * Register condition of customersId. + * + * @param key Condition key. (NotNull) + * @param value The value of customersId. (Nullable) + */ + protected void registerCustomersId(ConditionKey key, Object value) { + registerQuery(key, value, getCValueCustomersId(), COL_CUSTOMERS_ID, J_CustomersId, UJ_customersId); + } + + /** + * Register inline condition of customersId. + * + * @param key Condition key. (NotNull) + * @param value The value of customersId. (Nullable) + */ + protected void registerInlineCustomersId(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueCustomersId(), COL_CUSTOMERS_ID, J_CustomersId, UJ_customersId); + } + + abstract protected ConditionValue getCValueCustomersId(); + + /** Column db name of customersGender. */ + protected static final String COL_CUSTOMERS_GENDER = "CUSTOMERS_GENDER"; + + /** Column java name of customersGender. */ + protected static final String J_CustomersGender = "CustomersGender"; + + /** Column uncapitalised java name of customersGender. */ + protected static final String UJ_customersGender = "customersGender"; + + /** + * Set the value of customersGender using equal. { = } + * If the value is null or empty-string, this condition is ignored. + * + * @param customersGender The value of customersGender as equal. + */ + public void setCustomersGender_Equal(String customersGender) { + registerCustomersGender(ConditionKey.CK_EQUAL, filterRemoveEmptyString(customersGender)); + } + + /** + * Set the value of customersGender using notEqual. { != } + * If the value is null or empty-string, this condition is ignored. + * + * @param customersGender The value of customersGender as notEqual. + */ + public void setCustomersGender_NotEqual(String customersGender) { + registerCustomersGender(ConditionKey.CK_NOT_EQUAL, filterRemoveEmptyString(customersGender)); + } + + /** + * Set the value of customersGender using greaterThan. { > } + * If the value is null or empty-string, this condition is ignored. + * + * @param customersGender The value of customersGender as greaterThan. + */ + public void setCustomersGender_GreaterThan(String customersGender) { + registerCustomersGender(ConditionKey.CK_GREATER_THAN, filterRemoveEmptyString(customersGender)); + } + + /** + * Set the value of customersGender using lessThan. { < } + * If the value is null or empty-string, this condition is ignored. + * + * @param customersGender The value of customersGender as lessThan. + */ + public void setCustomersGender_LessThan(String customersGender) { + registerCustomersGender(ConditionKey.CK_LESS_THAN, filterRemoveEmptyString(customersGender)); + } + + /** + * Set the value of customersGender using greaterEqual. { >= } + * If the value is null or empty-string, this condition is ignored. + * + * @param customersGender The value of customersGender as greaterEqual. + */ + public void setCustomersGender_GreaterEqual(String customersGender) { + registerCustomersGender(ConditionKey.CK_GREATER_EQUAL, filterRemoveEmptyString(customersGender)); + } + + /** + * Set the value of customersGender using lessEqual. { <= } + * If the value is null or empty-string, this condition is ignored. + * + * @param customersGender The value of customersGender as lessEqual. + */ + public void setCustomersGender_LessEqual(String customersGender) { + registerCustomersGender(ConditionKey.CK_LESS_EQUAL, filterRemoveEmptyString(customersGender)); + } + + /** + * Set the value of customersGender using prefixSearch. { like 'xxx%' } + * If the value is null or empty-string, this condition is ignored. + * + * @param customersGender The value of customersGender as prefixSearch. + */ + public void setCustomersGender_PrefixSearch(String customersGender) { + registerCustomersGender(ConditionKey.CK_PREFIX_SEARCH, filterRemoveEmptyString(customersGender)); + } + + /** + * Set the value of customersGender using likeSearch. { like '%xxx%' } + * If the value is null or empty-string, this condition is ignored. + * You can invoke this method several times and the conditions are set up. + * + * @param customersGender The value of customersGender as likeSearch. + * @param likeSearchOption Like search option. (NotNull) + */ + public void setCustomersGender_LikeSearch(String customersGender, jp.sf.pal.pompei.allcommon.cbean.coption.LikeSearchOption likeSearchOption) { + registerLikeSearchQuery(ConditionKey.CK_LIKE_SEARCH, filterRemoveEmptyString(customersGender), getCValueCustomersGender(), COL_CUSTOMERS_GENDER, J_CustomersGender, UJ_customersGender, likeSearchOption); + } + + /** + * Set the value of customersGender using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param customersGenderList The value of customersGender as inScope. + */ + public void setCustomersGender_InScope(java.util.List customersGenderList) { + registerCustomersGender(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyStringFromList(customersGenderList)); + } + + /** + * Set the value of customersGender using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param customersGender The value of customersGender as inScope. + */ + public void setCustomersGender_InScope(String customersGender, jp.sf.pal.pompei.allcommon.cbean.coption.InScopeOption option) { + registerInScopeQuery(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyString(customersGender), getCValueCustomersGender(), COL_CUSTOMERS_GENDER, J_CustomersGender, UJ_customersGender, option); + } + + /** + * Set the value of customersGender using notInScope. { not in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param customersGenderList The value of customersGender as notInScope. + */ + public void setCustomersGender_NotInScope(java.util.List customersGenderList) { + registerCustomersGender(ConditionKey.CK_NOT_IN_SCOPE, filterRemoveEmptyStringFromList(customersGenderList)); + } + + /** + * Register condition of customersGender. + * + * @param key Condition key. (NotNull) + * @param value The value of customersGender. (Nullable) + */ + protected void registerCustomersGender(ConditionKey key, Object value) { + registerQuery(key, value, getCValueCustomersGender(), COL_CUSTOMERS_GENDER, J_CustomersGender, UJ_customersGender); + } + + /** + * Register inline condition of customersGender. + * + * @param key Condition key. (NotNull) + * @param value The value of customersGender. (Nullable) + */ + protected void registerInlineCustomersGender(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueCustomersGender(), COL_CUSTOMERS_GENDER, J_CustomersGender, UJ_customersGender); + } + + abstract protected ConditionValue getCValueCustomersGender(); + + /** Column db name of customersFirstname. */ + protected static final String COL_CUSTOMERS_FIRSTNAME = "CUSTOMERS_FIRSTNAME"; + + /** Column java name of customersFirstname. */ + protected static final String J_CustomersFirstname = "CustomersFirstname"; + + /** Column uncapitalised java name of customersFirstname. */ + protected static final String UJ_customersFirstname = "customersFirstname"; + + /** + * Set the value of customersFirstname using equal. { = } + * If the value is null or empty-string, this condition is ignored. + * + * @param customersFirstname The value of customersFirstname as equal. + */ + public void setCustomersFirstname_Equal(String customersFirstname) { + registerCustomersFirstname(ConditionKey.CK_EQUAL, filterRemoveEmptyString(customersFirstname)); + } + + /** + * Set the value of customersFirstname using notEqual. { != } + * If the value is null or empty-string, this condition is ignored. + * + * @param customersFirstname The value of customersFirstname as notEqual. + */ + public void setCustomersFirstname_NotEqual(String customersFirstname) { + registerCustomersFirstname(ConditionKey.CK_NOT_EQUAL, filterRemoveEmptyString(customersFirstname)); + } + + /** + * Set the value of customersFirstname using greaterThan. { > } + * If the value is null or empty-string, this condition is ignored. + * + * @param customersFirstname The value of customersFirstname as greaterThan. + */ + public void setCustomersFirstname_GreaterThan(String customersFirstname) { + registerCustomersFirstname(ConditionKey.CK_GREATER_THAN, filterRemoveEmptyString(customersFirstname)); + } + + /** + * Set the value of customersFirstname using lessThan. { < } + * If the value is null or empty-string, this condition is ignored. + * + * @param customersFirstname The value of customersFirstname as lessThan. + */ + public void setCustomersFirstname_LessThan(String customersFirstname) { + registerCustomersFirstname(ConditionKey.CK_LESS_THAN, filterRemoveEmptyString(customersFirstname)); + } + + /** + * Set the value of customersFirstname using greaterEqual. { >= } + * If the value is null or empty-string, this condition is ignored. + * + * @param customersFirstname The value of customersFirstname as greaterEqual. + */ + public void setCustomersFirstname_GreaterEqual(String customersFirstname) { + registerCustomersFirstname(ConditionKey.CK_GREATER_EQUAL, filterRemoveEmptyString(customersFirstname)); + } + + /** + * Set the value of customersFirstname using lessEqual. { <= } + * If the value is null or empty-string, this condition is ignored. + * + * @param customersFirstname The value of customersFirstname as lessEqual. + */ + public void setCustomersFirstname_LessEqual(String customersFirstname) { + registerCustomersFirstname(ConditionKey.CK_LESS_EQUAL, filterRemoveEmptyString(customersFirstname)); + } + + /** + * Set the value of customersFirstname using prefixSearch. { like 'xxx%' } + * If the value is null or empty-string, this condition is ignored. + * + * @param customersFirstname The value of customersFirstname as prefixSearch. + */ + public void setCustomersFirstname_PrefixSearch(String customersFirstname) { + registerCustomersFirstname(ConditionKey.CK_PREFIX_SEARCH, filterRemoveEmptyString(customersFirstname)); + } + + /** + * Set the value of customersFirstname using likeSearch. { like '%xxx%' } + * If the value is null or empty-string, this condition is ignored. + * You can invoke this method several times and the conditions are set up. + * + * @param customersFirstname The value of customersFirstname as likeSearch. + * @param likeSearchOption Like search option. (NotNull) + */ + public void setCustomersFirstname_LikeSearch(String customersFirstname, jp.sf.pal.pompei.allcommon.cbean.coption.LikeSearchOption likeSearchOption) { + registerLikeSearchQuery(ConditionKey.CK_LIKE_SEARCH, filterRemoveEmptyString(customersFirstname), getCValueCustomersFirstname(), COL_CUSTOMERS_FIRSTNAME, J_CustomersFirstname, UJ_customersFirstname, likeSearchOption); + } + + /** + * Set the value of customersFirstname using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param customersFirstnameList The value of customersFirstname as inScope. + */ + public void setCustomersFirstname_InScope(java.util.List customersFirstnameList) { + registerCustomersFirstname(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyStringFromList(customersFirstnameList)); + } + + /** + * Set the value of customersFirstname using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param customersFirstname The value of customersFirstname as inScope. + */ + public void setCustomersFirstname_InScope(String customersFirstname, jp.sf.pal.pompei.allcommon.cbean.coption.InScopeOption option) { + registerInScopeQuery(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyString(customersFirstname), getCValueCustomersFirstname(), COL_CUSTOMERS_FIRSTNAME, J_CustomersFirstname, UJ_customersFirstname, option); + } + + /** + * Set the value of customersFirstname using notInScope. { not in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param customersFirstnameList The value of customersFirstname as notInScope. + */ + public void setCustomersFirstname_NotInScope(java.util.List customersFirstnameList) { + registerCustomersFirstname(ConditionKey.CK_NOT_IN_SCOPE, filterRemoveEmptyStringFromList(customersFirstnameList)); + } + + /** + * Register condition of customersFirstname. + * + * @param key Condition key. (NotNull) + * @param value The value of customersFirstname. (Nullable) + */ + protected void registerCustomersFirstname(ConditionKey key, Object value) { + registerQuery(key, value, getCValueCustomersFirstname(), COL_CUSTOMERS_FIRSTNAME, J_CustomersFirstname, UJ_customersFirstname); + } + + /** + * Register inline condition of customersFirstname. + * + * @param key Condition key. (NotNull) + * @param value The value of customersFirstname. (Nullable) + */ + protected void registerInlineCustomersFirstname(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueCustomersFirstname(), COL_CUSTOMERS_FIRSTNAME, J_CustomersFirstname, UJ_customersFirstname); + } + + abstract protected ConditionValue getCValueCustomersFirstname(); + + /** Column db name of customersLastname. */ + protected static final String COL_CUSTOMERS_LASTNAME = "CUSTOMERS_LASTNAME"; + + /** Column java name of customersLastname. */ + protected static final String J_CustomersLastname = "CustomersLastname"; + + /** Column uncapitalised java name of customersLastname. */ + protected static final String UJ_customersLastname = "customersLastname"; + + /** + * Set the value of customersLastname using equal. { = } + * If the value is null or empty-string, this condition is ignored. + * + * @param customersLastname The value of customersLastname as equal. + */ + public void setCustomersLastname_Equal(String customersLastname) { + registerCustomersLastname(ConditionKey.CK_EQUAL, filterRemoveEmptyString(customersLastname)); + } + + /** + * Set the value of customersLastname using notEqual. { != } + * If the value is null or empty-string, this condition is ignored. + * + * @param customersLastname The value of customersLastname as notEqual. + */ + public void setCustomersLastname_NotEqual(String customersLastname) { + registerCustomersLastname(ConditionKey.CK_NOT_EQUAL, filterRemoveEmptyString(customersLastname)); + } + + /** + * Set the value of customersLastname using greaterThan. { > } + * If the value is null or empty-string, this condition is ignored. + * + * @param customersLastname The value of customersLastname as greaterThan. + */ + public void setCustomersLastname_GreaterThan(String customersLastname) { + registerCustomersLastname(ConditionKey.CK_GREATER_THAN, filterRemoveEmptyString(customersLastname)); + } + + /** + * Set the value of customersLastname using lessThan. { < } + * If the value is null or empty-string, this condition is ignored. + * + * @param customersLastname The value of customersLastname as lessThan. + */ + public void setCustomersLastname_LessThan(String customersLastname) { + registerCustomersLastname(ConditionKey.CK_LESS_THAN, filterRemoveEmptyString(customersLastname)); + } + + /** + * Set the value of customersLastname using greaterEqual. { >= } + * If the value is null or empty-string, this condition is ignored. + * + * @param customersLastname The value of customersLastname as greaterEqual. + */ + public void setCustomersLastname_GreaterEqual(String customersLastname) { + registerCustomersLastname(ConditionKey.CK_GREATER_EQUAL, filterRemoveEmptyString(customersLastname)); + } + + /** + * Set the value of customersLastname using lessEqual. { <= } + * If the value is null or empty-string, this condition is ignored. + * + * @param customersLastname The value of customersLastname as lessEqual. + */ + public void setCustomersLastname_LessEqual(String customersLastname) { + registerCustomersLastname(ConditionKey.CK_LESS_EQUAL, filterRemoveEmptyString(customersLastname)); + } + + /** + * Set the value of customersLastname using prefixSearch. { like 'xxx%' } + * If the value is null or empty-string, this condition is ignored. + * + * @param customersLastname The value of customersLastname as prefixSearch. + */ + public void setCustomersLastname_PrefixSearch(String customersLastname) { + registerCustomersLastname(ConditionKey.CK_PREFIX_SEARCH, filterRemoveEmptyString(customersLastname)); + } + + /** + * Set the value of customersLastname using likeSearch. { like '%xxx%' } + * If the value is null or empty-string, this condition is ignored. + * You can invoke this method several times and the conditions are set up. + * + * @param customersLastname The value of customersLastname as likeSearch. + * @param likeSearchOption Like search option. (NotNull) + */ + public void setCustomersLastname_LikeSearch(String customersLastname, jp.sf.pal.pompei.allcommon.cbean.coption.LikeSearchOption likeSearchOption) { + registerLikeSearchQuery(ConditionKey.CK_LIKE_SEARCH, filterRemoveEmptyString(customersLastname), getCValueCustomersLastname(), COL_CUSTOMERS_LASTNAME, J_CustomersLastname, UJ_customersLastname, likeSearchOption); + } + + /** + * Set the value of customersLastname using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param customersLastnameList The value of customersLastname as inScope. + */ + public void setCustomersLastname_InScope(java.util.List customersLastnameList) { + registerCustomersLastname(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyStringFromList(customersLastnameList)); + } + + /** + * Set the value of customersLastname using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param customersLastname The value of customersLastname as inScope. + */ + public void setCustomersLastname_InScope(String customersLastname, jp.sf.pal.pompei.allcommon.cbean.coption.InScopeOption option) { + registerInScopeQuery(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyString(customersLastname), getCValueCustomersLastname(), COL_CUSTOMERS_LASTNAME, J_CustomersLastname, UJ_customersLastname, option); + } + + /** + * Set the value of customersLastname using notInScope. { not in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param customersLastnameList The value of customersLastname as notInScope. + */ + public void setCustomersLastname_NotInScope(java.util.List customersLastnameList) { + registerCustomersLastname(ConditionKey.CK_NOT_IN_SCOPE, filterRemoveEmptyStringFromList(customersLastnameList)); + } + + /** + * Register condition of customersLastname. + * + * @param key Condition key. (NotNull) + * @param value The value of customersLastname. (Nullable) + */ + protected void registerCustomersLastname(ConditionKey key, Object value) { + registerQuery(key, value, getCValueCustomersLastname(), COL_CUSTOMERS_LASTNAME, J_CustomersLastname, UJ_customersLastname); + } + + /** + * Register inline condition of customersLastname. + * + * @param key Condition key. (NotNull) + * @param value The value of customersLastname. (Nullable) + */ + protected void registerInlineCustomersLastname(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueCustomersLastname(), COL_CUSTOMERS_LASTNAME, J_CustomersLastname, UJ_customersLastname); + } + + abstract protected ConditionValue getCValueCustomersLastname(); + + /** Column db name of customersDob. */ + protected static final String COL_CUSTOMERS_DOB = "CUSTOMERS_DOB"; + + /** Column java name of customersDob. */ + protected static final String J_CustomersDob = "CustomersDob"; + + /** Column uncapitalised java name of customersDob. */ + protected static final String UJ_customersDob = "customersDob"; + + /** + * Set the value of customersDob using equal. { = } + * + * @param customersDob The value of customersDob as equal. + */ + public void setCustomersDob_Equal(java.sql.Timestamp customersDob) { + registerCustomersDob(ConditionKey.CK_EQUAL, customersDob); + } + + /** + * Set the value of customersDob using notEqual. { != } + * + * @param customersDob The value of customersDob as notEqual. + */ + public void setCustomersDob_NotEqual(java.sql.Timestamp customersDob) { + registerCustomersDob(ConditionKey.CK_NOT_EQUAL, customersDob); + } + + /** + * Set the value of customersDob using greaterThan. { > } + * + * @param customersDob The value of customersDob as greaterThan. + */ + public void setCustomersDob_GreaterThan(java.sql.Timestamp customersDob) { + registerCustomersDob(ConditionKey.CK_GREATER_THAN, customersDob); + } + + /** + * Set the value of customersDob using lessThan. { < } + * + * @param customersDob The value of customersDob as lessThan. + */ + public void setCustomersDob_LessThan(java.sql.Timestamp customersDob) { + registerCustomersDob(ConditionKey.CK_LESS_THAN, customersDob); + } + + /** + * Set the value of customersDob using greaterEqual. { >= } + * + * @param customersDob The value of customersDob as greaterEqual. + */ + public void setCustomersDob_GreaterEqual(java.sql.Timestamp customersDob) { + registerCustomersDob(ConditionKey.CK_GREATER_EQUAL, customersDob); + } + + /** + * Set the value of customersDob using lessEqual. { <= } + * + * @param customersDob The value of customersDob as lessEqual. + */ + public void setCustomersDob_LessEqual(java.sql.Timestamp customersDob) { + registerCustomersDob(ConditionKey.CK_LESS_EQUAL, customersDob); + } + + /** + * Set the value of customersDob using from-to. { $fromDate <= COLUMN_NAME <= $toDate } + * + * @param customersDob The value of customersDob as from-to. + * @param fromToOption From-To option. (NotNull) + */ + public void setCustomersDob_FromTo(java.sql.Timestamp fromDate, java.sql.Timestamp toDate, jp.sf.pal.pompei.allcommon.cbean.coption.FromToOption fromToOption) { + registerFromToQuery(fromDate, toDate, getCValueCustomersDob(), COL_CUSTOMERS_DOB, J_CustomersDob, UJ_customersDob, fromToOption); + } + + /** + * Register condition of customersDob. + * + * @param key Condition key. (NotNull) + * @param value The value of customersDob. (Nullable) + */ + protected void registerCustomersDob(ConditionKey key, Object value) { + registerQuery(key, value, getCValueCustomersDob(), COL_CUSTOMERS_DOB, J_CustomersDob, UJ_customersDob); + } + + /** + * Register inline condition of customersDob. + * + * @param key Condition key. (NotNull) + * @param value The value of customersDob. (Nullable) + */ + protected void registerInlineCustomersDob(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueCustomersDob(), COL_CUSTOMERS_DOB, J_CustomersDob, UJ_customersDob); + } + + abstract protected ConditionValue getCValueCustomersDob(); + + /** Column db name of customersEmailAddress. */ + protected static final String COL_CUSTOMERS_EMAIL_ADDRESS = "CUSTOMERS_EMAIL_ADDRESS"; + + /** Column java name of customersEmailAddress. */ + protected static final String J_CustomersEmailAddress = "CustomersEmailAddress"; + + /** Column uncapitalised java name of customersEmailAddress. */ + protected static final String UJ_customersEmailAddress = "customersEmailAddress"; + + /** + * Set the value of customersEmailAddress using equal. { = } + * If the value is null or empty-string, this condition is ignored. + * + * @param customersEmailAddress The value of customersEmailAddress as equal. + */ + public void setCustomersEmailAddress_Equal(String customersEmailAddress) { + registerCustomersEmailAddress(ConditionKey.CK_EQUAL, filterRemoveEmptyString(customersEmailAddress)); + } + + /** + * Set the value of customersEmailAddress using notEqual. { != } + * If the value is null or empty-string, this condition is ignored. + * + * @param customersEmailAddress The value of customersEmailAddress as notEqual. + */ + public void setCustomersEmailAddress_NotEqual(String customersEmailAddress) { + registerCustomersEmailAddress(ConditionKey.CK_NOT_EQUAL, filterRemoveEmptyString(customersEmailAddress)); + } + + /** + * Set the value of customersEmailAddress using greaterThan. { > } + * If the value is null or empty-string, this condition is ignored. + * + * @param customersEmailAddress The value of customersEmailAddress as greaterThan. + */ + public void setCustomersEmailAddress_GreaterThan(String customersEmailAddress) { + registerCustomersEmailAddress(ConditionKey.CK_GREATER_THAN, filterRemoveEmptyString(customersEmailAddress)); + } + + /** + * Set the value of customersEmailAddress using lessThan. { < } + * If the value is null or empty-string, this condition is ignored. + * + * @param customersEmailAddress The value of customersEmailAddress as lessThan. + */ + public void setCustomersEmailAddress_LessThan(String customersEmailAddress) { + registerCustomersEmailAddress(ConditionKey.CK_LESS_THAN, filterRemoveEmptyString(customersEmailAddress)); + } + + /** + * Set the value of customersEmailAddress using greaterEqual. { >= } + * If the value is null or empty-string, this condition is ignored. + * + * @param customersEmailAddress The value of customersEmailAddress as greaterEqual. + */ + public void setCustomersEmailAddress_GreaterEqual(String customersEmailAddress) { + registerCustomersEmailAddress(ConditionKey.CK_GREATER_EQUAL, filterRemoveEmptyString(customersEmailAddress)); + } + + /** + * Set the value of customersEmailAddress using lessEqual. { <= } + * If the value is null or empty-string, this condition is ignored. + * + * @param customersEmailAddress The value of customersEmailAddress as lessEqual. + */ + public void setCustomersEmailAddress_LessEqual(String customersEmailAddress) { + registerCustomersEmailAddress(ConditionKey.CK_LESS_EQUAL, filterRemoveEmptyString(customersEmailAddress)); + } + + /** + * Set the value of customersEmailAddress using prefixSearch. { like 'xxx%' } + * If the value is null or empty-string, this condition is ignored. + * + * @param customersEmailAddress The value of customersEmailAddress as prefixSearch. + */ + public void setCustomersEmailAddress_PrefixSearch(String customersEmailAddress) { + registerCustomersEmailAddress(ConditionKey.CK_PREFIX_SEARCH, filterRemoveEmptyString(customersEmailAddress)); + } + + /** + * Set the value of customersEmailAddress using likeSearch. { like '%xxx%' } + * If the value is null or empty-string, this condition is ignored. + * You can invoke this method several times and the conditions are set up. + * + * @param customersEmailAddress The value of customersEmailAddress as likeSearch. + * @param likeSearchOption Like search option. (NotNull) + */ + public void setCustomersEmailAddress_LikeSearch(String customersEmailAddress, jp.sf.pal.pompei.allcommon.cbean.coption.LikeSearchOption likeSearchOption) { + registerLikeSearchQuery(ConditionKey.CK_LIKE_SEARCH, filterRemoveEmptyString(customersEmailAddress), getCValueCustomersEmailAddress(), COL_CUSTOMERS_EMAIL_ADDRESS, J_CustomersEmailAddress, UJ_customersEmailAddress, likeSearchOption); + } + + /** + * Set the value of customersEmailAddress using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param customersEmailAddressList The value of customersEmailAddress as inScope. + */ + public void setCustomersEmailAddress_InScope(java.util.List customersEmailAddressList) { + registerCustomersEmailAddress(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyStringFromList(customersEmailAddressList)); + } + + /** + * Set the value of customersEmailAddress using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param customersEmailAddress The value of customersEmailAddress as inScope. + */ + public void setCustomersEmailAddress_InScope(String customersEmailAddress, jp.sf.pal.pompei.allcommon.cbean.coption.InScopeOption option) { + registerInScopeQuery(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyString(customersEmailAddress), getCValueCustomersEmailAddress(), COL_CUSTOMERS_EMAIL_ADDRESS, J_CustomersEmailAddress, UJ_customersEmailAddress, option); + } + + /** + * Set the value of customersEmailAddress using notInScope. { not in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param customersEmailAddressList The value of customersEmailAddress as notInScope. + */ + public void setCustomersEmailAddress_NotInScope(java.util.List customersEmailAddressList) { + registerCustomersEmailAddress(ConditionKey.CK_NOT_IN_SCOPE, filterRemoveEmptyStringFromList(customersEmailAddressList)); + } + + /** + * Register condition of customersEmailAddress. + * + * @param key Condition key. (NotNull) + * @param value The value of customersEmailAddress. (Nullable) + */ + protected void registerCustomersEmailAddress(ConditionKey key, Object value) { + registerQuery(key, value, getCValueCustomersEmailAddress(), COL_CUSTOMERS_EMAIL_ADDRESS, J_CustomersEmailAddress, UJ_customersEmailAddress); + } + + /** + * Register inline condition of customersEmailAddress. + * + * @param key Condition key. (NotNull) + * @param value The value of customersEmailAddress. (Nullable) + */ + protected void registerInlineCustomersEmailAddress(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueCustomersEmailAddress(), COL_CUSTOMERS_EMAIL_ADDRESS, J_CustomersEmailAddress, UJ_customersEmailAddress); + } + + abstract protected ConditionValue getCValueCustomersEmailAddress(); + + /** Column db name of customersDefaultAddressId. */ + protected static final String COL_CUSTOMERS_DEFAULT_ADDRESS_ID = "CUSTOMERS_DEFAULT_ADDRESS_ID"; + + /** Column java name of customersDefaultAddressId. */ + protected static final String J_CustomersDefaultAddressId = "CustomersDefaultAddressId"; + + /** Column uncapitalised java name of customersDefaultAddressId. */ + protected static final String UJ_customersDefaultAddressId = "customersDefaultAddressId"; + + /** + * Set the value of customersDefaultAddressId using equal. { = } + * + * @param customersDefaultAddressId The value of customersDefaultAddressId as equal. + */ + public void setCustomersDefaultAddressId_Equal(java.math.BigDecimal customersDefaultAddressId) { + registerCustomersDefaultAddressId(ConditionKey.CK_EQUAL, customersDefaultAddressId); + } + + /** + * Set the value of customersDefaultAddressId using notEqual. { != } + * + * @param customersDefaultAddressId The value of customersDefaultAddressId as notEqual. + */ + public void setCustomersDefaultAddressId_NotEqual(java.math.BigDecimal customersDefaultAddressId) { + registerCustomersDefaultAddressId(ConditionKey.CK_NOT_EQUAL, customersDefaultAddressId); + } + + /** + * Set the value of customersDefaultAddressId using greaterThan. { > } + * + * @param customersDefaultAddressId The value of customersDefaultAddressId as greaterThan. + */ + public void setCustomersDefaultAddressId_GreaterThan(java.math.BigDecimal customersDefaultAddressId) { + registerCustomersDefaultAddressId(ConditionKey.CK_GREATER_THAN, customersDefaultAddressId); + } + + /** + * Set the value of customersDefaultAddressId using lessThan. { < } + * + * @param customersDefaultAddressId The value of customersDefaultAddressId as lessThan. + */ + public void setCustomersDefaultAddressId_LessThan(java.math.BigDecimal customersDefaultAddressId) { + registerCustomersDefaultAddressId(ConditionKey.CK_LESS_THAN, customersDefaultAddressId); + } + + /** + * Set the value of customersDefaultAddressId using greaterEqual. { >= } + * + * @param customersDefaultAddressId The value of customersDefaultAddressId as greaterEqual. + */ + public void setCustomersDefaultAddressId_GreaterEqual(java.math.BigDecimal customersDefaultAddressId) { + registerCustomersDefaultAddressId(ConditionKey.CK_GREATER_EQUAL, customersDefaultAddressId); + } + + /** + * Set the value of customersDefaultAddressId using lessEqual. { <= } + * + * @param customersDefaultAddressId The value of customersDefaultAddressId as lessEqual. + */ + public void setCustomersDefaultAddressId_LessEqual(java.math.BigDecimal customersDefaultAddressId) { + registerCustomersDefaultAddressId(ConditionKey.CK_LESS_EQUAL, customersDefaultAddressId); + } + + /** + * Set the value of customersDefaultAddressId using inScope. { in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param customersDefaultAddressIdList The value of customersDefaultAddressId as inScope. + */ + public void setCustomersDefaultAddressId_InScope(java.util.List customersDefaultAddressIdList) { + registerCustomersDefaultAddressId(ConditionKey.CK_IN_SCOPE, customersDefaultAddressIdList); + } + + /** + * Set the value of customersDefaultAddressId using notInScope. { not in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param customersDefaultAddressIdList The value of customersDefaultAddressId as notInScope. + */ + public void setCustomersDefaultAddressId_NotInScope(java.util.List customersDefaultAddressIdList) { + registerCustomersDefaultAddressId(ConditionKey.CK_NOT_IN_SCOPE, customersDefaultAddressIdList); + } + + /** + * Set the value of customersDefaultAddressId using isNull. { is null } + */ + public void setCustomersDefaultAddressId_IsNull() { + registerCustomersDefaultAddressId(ConditionKey.CK_IS_NULL, DUMMY_OBJECT); + } + + /** + * Set the value of customersDefaultAddressId using isNotNull. { is not null } + */ + public void setCustomersDefaultAddressId_IsNotNull() { + registerCustomersDefaultAddressId(ConditionKey.CK_IS_NOT_NULL, DUMMY_OBJECT); + } + + /** + * Register condition of customersDefaultAddressId. + * + * @param key Condition key. (NotNull) + * @param value The value of customersDefaultAddressId. (Nullable) + */ + protected void registerCustomersDefaultAddressId(ConditionKey key, Object value) { + registerQuery(key, value, getCValueCustomersDefaultAddressId(), COL_CUSTOMERS_DEFAULT_ADDRESS_ID, J_CustomersDefaultAddressId, UJ_customersDefaultAddressId); + } + + /** + * Register inline condition of customersDefaultAddressId. + * + * @param key Condition key. (NotNull) + * @param value The value of customersDefaultAddressId. (Nullable) + */ + protected void registerInlineCustomersDefaultAddressId(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueCustomersDefaultAddressId(), COL_CUSTOMERS_DEFAULT_ADDRESS_ID, J_CustomersDefaultAddressId, UJ_customersDefaultAddressId); + } + + abstract protected ConditionValue getCValueCustomersDefaultAddressId(); + + /** Column db name of customersTelephone. */ + protected static final String COL_CUSTOMERS_TELEPHONE = "CUSTOMERS_TELEPHONE"; + + /** Column java name of customersTelephone. */ + protected static final String J_CustomersTelephone = "CustomersTelephone"; + + /** Column uncapitalised java name of customersTelephone. */ + protected static final String UJ_customersTelephone = "customersTelephone"; + + /** + * Set the value of customersTelephone using equal. { = } + * If the value is null or empty-string, this condition is ignored. + * + * @param customersTelephone The value of customersTelephone as equal. + */ + public void setCustomersTelephone_Equal(String customersTelephone) { + registerCustomersTelephone(ConditionKey.CK_EQUAL, filterRemoveEmptyString(customersTelephone)); + } + + /** + * Set the value of customersTelephone using notEqual. { != } + * If the value is null or empty-string, this condition is ignored. + * + * @param customersTelephone The value of customersTelephone as notEqual. + */ + public void setCustomersTelephone_NotEqual(String customersTelephone) { + registerCustomersTelephone(ConditionKey.CK_NOT_EQUAL, filterRemoveEmptyString(customersTelephone)); + } + + /** + * Set the value of customersTelephone using greaterThan. { > } + * If the value is null or empty-string, this condition is ignored. + * + * @param customersTelephone The value of customersTelephone as greaterThan. + */ + public void setCustomersTelephone_GreaterThan(String customersTelephone) { + registerCustomersTelephone(ConditionKey.CK_GREATER_THAN, filterRemoveEmptyString(customersTelephone)); + } + + /** + * Set the value of customersTelephone using lessThan. { < } + * If the value is null or empty-string, this condition is ignored. + * + * @param customersTelephone The value of customersTelephone as lessThan. + */ + public void setCustomersTelephone_LessThan(String customersTelephone) { + registerCustomersTelephone(ConditionKey.CK_LESS_THAN, filterRemoveEmptyString(customersTelephone)); + } + + /** + * Set the value of customersTelephone using greaterEqual. { >= } + * If the value is null or empty-string, this condition is ignored. + * + * @param customersTelephone The value of customersTelephone as greaterEqual. + */ + public void setCustomersTelephone_GreaterEqual(String customersTelephone) { + registerCustomersTelephone(ConditionKey.CK_GREATER_EQUAL, filterRemoveEmptyString(customersTelephone)); + } + + /** + * Set the value of customersTelephone using lessEqual. { <= } + * If the value is null or empty-string, this condition is ignored. + * + * @param customersTelephone The value of customersTelephone as lessEqual. + */ + public void setCustomersTelephone_LessEqual(String customersTelephone) { + registerCustomersTelephone(ConditionKey.CK_LESS_EQUAL, filterRemoveEmptyString(customersTelephone)); + } + + /** + * Set the value of customersTelephone using prefixSearch. { like 'xxx%' } + * If the value is null or empty-string, this condition is ignored. + * + * @param customersTelephone The value of customersTelephone as prefixSearch. + */ + public void setCustomersTelephone_PrefixSearch(String customersTelephone) { + registerCustomersTelephone(ConditionKey.CK_PREFIX_SEARCH, filterRemoveEmptyString(customersTelephone)); + } + + /** + * Set the value of customersTelephone using likeSearch. { like '%xxx%' } + * If the value is null or empty-string, this condition is ignored. + * You can invoke this method several times and the conditions are set up. + * + * @param customersTelephone The value of customersTelephone as likeSearch. + * @param likeSearchOption Like search option. (NotNull) + */ + public void setCustomersTelephone_LikeSearch(String customersTelephone, jp.sf.pal.pompei.allcommon.cbean.coption.LikeSearchOption likeSearchOption) { + registerLikeSearchQuery(ConditionKey.CK_LIKE_SEARCH, filterRemoveEmptyString(customersTelephone), getCValueCustomersTelephone(), COL_CUSTOMERS_TELEPHONE, J_CustomersTelephone, UJ_customersTelephone, likeSearchOption); + } + + /** + * Set the value of customersTelephone using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param customersTelephoneList The value of customersTelephone as inScope. + */ + public void setCustomersTelephone_InScope(java.util.List customersTelephoneList) { + registerCustomersTelephone(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyStringFromList(customersTelephoneList)); + } + + /** + * Set the value of customersTelephone using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param customersTelephone The value of customersTelephone as inScope. + */ + public void setCustomersTelephone_InScope(String customersTelephone, jp.sf.pal.pompei.allcommon.cbean.coption.InScopeOption option) { + registerInScopeQuery(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyString(customersTelephone), getCValueCustomersTelephone(), COL_CUSTOMERS_TELEPHONE, J_CustomersTelephone, UJ_customersTelephone, option); + } + + /** + * Set the value of customersTelephone using notInScope. { not in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param customersTelephoneList The value of customersTelephone as notInScope. + */ + public void setCustomersTelephone_NotInScope(java.util.List customersTelephoneList) { + registerCustomersTelephone(ConditionKey.CK_NOT_IN_SCOPE, filterRemoveEmptyStringFromList(customersTelephoneList)); + } + + /** + * Register condition of customersTelephone. + * + * @param key Condition key. (NotNull) + * @param value The value of customersTelephone. (Nullable) + */ + protected void registerCustomersTelephone(ConditionKey key, Object value) { + registerQuery(key, value, getCValueCustomersTelephone(), COL_CUSTOMERS_TELEPHONE, J_CustomersTelephone, UJ_customersTelephone); + } + + /** + * Register inline condition of customersTelephone. + * + * @param key Condition key. (NotNull) + * @param value The value of customersTelephone. (Nullable) + */ + protected void registerInlineCustomersTelephone(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueCustomersTelephone(), COL_CUSTOMERS_TELEPHONE, J_CustomersTelephone, UJ_customersTelephone); + } + + abstract protected ConditionValue getCValueCustomersTelephone(); + + /** Column db name of customersFax. */ + protected static final String COL_CUSTOMERS_FAX = "CUSTOMERS_FAX"; + + /** Column java name of customersFax. */ + protected static final String J_CustomersFax = "CustomersFax"; + + /** Column uncapitalised java name of customersFax. */ + protected static final String UJ_customersFax = "customersFax"; + + /** + * Set the value of customersFax using equal. { = } + * If the value is null or empty-string, this condition is ignored. + * + * @param customersFax The value of customersFax as equal. + */ + public void setCustomersFax_Equal(String customersFax) { + registerCustomersFax(ConditionKey.CK_EQUAL, filterRemoveEmptyString(customersFax)); + } + + /** + * Set the value of customersFax using notEqual. { != } + * If the value is null or empty-string, this condition is ignored. + * + * @param customersFax The value of customersFax as notEqual. + */ + public void setCustomersFax_NotEqual(String customersFax) { + registerCustomersFax(ConditionKey.CK_NOT_EQUAL, filterRemoveEmptyString(customersFax)); + } + + /** + * Set the value of customersFax using greaterThan. { > } + * If the value is null or empty-string, this condition is ignored. + * + * @param customersFax The value of customersFax as greaterThan. + */ + public void setCustomersFax_GreaterThan(String customersFax) { + registerCustomersFax(ConditionKey.CK_GREATER_THAN, filterRemoveEmptyString(customersFax)); + } + + /** + * Set the value of customersFax using lessThan. { < } + * If the value is null or empty-string, this condition is ignored. + * + * @param customersFax The value of customersFax as lessThan. + */ + public void setCustomersFax_LessThan(String customersFax) { + registerCustomersFax(ConditionKey.CK_LESS_THAN, filterRemoveEmptyString(customersFax)); + } + + /** + * Set the value of customersFax using greaterEqual. { >= } + * If the value is null or empty-string, this condition is ignored. + * + * @param customersFax The value of customersFax as greaterEqual. + */ + public void setCustomersFax_GreaterEqual(String customersFax) { + registerCustomersFax(ConditionKey.CK_GREATER_EQUAL, filterRemoveEmptyString(customersFax)); + } + + /** + * Set the value of customersFax using lessEqual. { <= } + * If the value is null or empty-string, this condition is ignored. + * + * @param customersFax The value of customersFax as lessEqual. + */ + public void setCustomersFax_LessEqual(String customersFax) { + registerCustomersFax(ConditionKey.CK_LESS_EQUAL, filterRemoveEmptyString(customersFax)); + } + + /** + * Set the value of customersFax using prefixSearch. { like 'xxx%' } + * If the value is null or empty-string, this condition is ignored. + * + * @param customersFax The value of customersFax as prefixSearch. + */ + public void setCustomersFax_PrefixSearch(String customersFax) { + registerCustomersFax(ConditionKey.CK_PREFIX_SEARCH, filterRemoveEmptyString(customersFax)); + } + + /** + * Set the value of customersFax using likeSearch. { like '%xxx%' } + * If the value is null or empty-string, this condition is ignored. + * You can invoke this method several times and the conditions are set up. + * + * @param customersFax The value of customersFax as likeSearch. + * @param likeSearchOption Like search option. (NotNull) + */ + public void setCustomersFax_LikeSearch(String customersFax, jp.sf.pal.pompei.allcommon.cbean.coption.LikeSearchOption likeSearchOption) { + registerLikeSearchQuery(ConditionKey.CK_LIKE_SEARCH, filterRemoveEmptyString(customersFax), getCValueCustomersFax(), COL_CUSTOMERS_FAX, J_CustomersFax, UJ_customersFax, likeSearchOption); + } + + /** + * Set the value of customersFax using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param customersFaxList The value of customersFax as inScope. + */ + public void setCustomersFax_InScope(java.util.List customersFaxList) { + registerCustomersFax(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyStringFromList(customersFaxList)); + } + + /** + * Set the value of customersFax using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param customersFax The value of customersFax as inScope. + */ + public void setCustomersFax_InScope(String customersFax, jp.sf.pal.pompei.allcommon.cbean.coption.InScopeOption option) { + registerInScopeQuery(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyString(customersFax), getCValueCustomersFax(), COL_CUSTOMERS_FAX, J_CustomersFax, UJ_customersFax, option); + } + + /** + * Set the value of customersFax using notInScope. { not in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param customersFaxList The value of customersFax as notInScope. + */ + public void setCustomersFax_NotInScope(java.util.List customersFaxList) { + registerCustomersFax(ConditionKey.CK_NOT_IN_SCOPE, filterRemoveEmptyStringFromList(customersFaxList)); + } + + /** + * Set the value of customersFax using isNull. { is null } + */ + public void setCustomersFax_IsNull() { + registerCustomersFax(ConditionKey.CK_IS_NULL, DUMMY_OBJECT); + } + + /** + * Set the value of customersFax using isNotNull. { is not null } + */ + public void setCustomersFax_IsNotNull() { + registerCustomersFax(ConditionKey.CK_IS_NOT_NULL, DUMMY_OBJECT); + } + + /** + * Register condition of customersFax. + * + * @param key Condition key. (NotNull) + * @param value The value of customersFax. (Nullable) + */ + protected void registerCustomersFax(ConditionKey key, Object value) { + registerQuery(key, value, getCValueCustomersFax(), COL_CUSTOMERS_FAX, J_CustomersFax, UJ_customersFax); + } + + /** + * Register inline condition of customersFax. + * + * @param key Condition key. (NotNull) + * @param value The value of customersFax. (Nullable) + */ + protected void registerInlineCustomersFax(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueCustomersFax(), COL_CUSTOMERS_FAX, J_CustomersFax, UJ_customersFax); + } + + abstract protected ConditionValue getCValueCustomersFax(); + + /** Column db name of customersPassword. */ + protected static final String COL_CUSTOMERS_PASSWORD = "CUSTOMERS_PASSWORD"; + + /** Column java name of customersPassword. */ + protected static final String J_CustomersPassword = "CustomersPassword"; + + /** Column uncapitalised java name of customersPassword. */ + protected static final String UJ_customersPassword = "customersPassword"; + + /** + * Set the value of customersPassword using equal. { = } + * If the value is null or empty-string, this condition is ignored. + * + * @param customersPassword The value of customersPassword as equal. + */ + public void setCustomersPassword_Equal(String customersPassword) { + registerCustomersPassword(ConditionKey.CK_EQUAL, filterRemoveEmptyString(customersPassword)); + } + + /** + * Set the value of customersPassword using notEqual. { != } + * If the value is null or empty-string, this condition is ignored. + * + * @param customersPassword The value of customersPassword as notEqual. + */ + public void setCustomersPassword_NotEqual(String customersPassword) { + registerCustomersPassword(ConditionKey.CK_NOT_EQUAL, filterRemoveEmptyString(customersPassword)); + } + + /** + * Set the value of customersPassword using greaterThan. { > } + * If the value is null or empty-string, this condition is ignored. + * + * @param customersPassword The value of customersPassword as greaterThan. + */ + public void setCustomersPassword_GreaterThan(String customersPassword) { + registerCustomersPassword(ConditionKey.CK_GREATER_THAN, filterRemoveEmptyString(customersPassword)); + } + + /** + * Set the value of customersPassword using lessThan. { < } + * If the value is null or empty-string, this condition is ignored. + * + * @param customersPassword The value of customersPassword as lessThan. + */ + public void setCustomersPassword_LessThan(String customersPassword) { + registerCustomersPassword(ConditionKey.CK_LESS_THAN, filterRemoveEmptyString(customersPassword)); + } + + /** + * Set the value of customersPassword using greaterEqual. { >= } + * If the value is null or empty-string, this condition is ignored. + * + * @param customersPassword The value of customersPassword as greaterEqual. + */ + public void setCustomersPassword_GreaterEqual(String customersPassword) { + registerCustomersPassword(ConditionKey.CK_GREATER_EQUAL, filterRemoveEmptyString(customersPassword)); + } + + /** + * Set the value of customersPassword using lessEqual. { <= } + * If the value is null or empty-string, this condition is ignored. + * + * @param customersPassword The value of customersPassword as lessEqual. + */ + public void setCustomersPassword_LessEqual(String customersPassword) { + registerCustomersPassword(ConditionKey.CK_LESS_EQUAL, filterRemoveEmptyString(customersPassword)); + } + + /** + * Set the value of customersPassword using prefixSearch. { like 'xxx%' } + * If the value is null or empty-string, this condition is ignored. + * + * @param customersPassword The value of customersPassword as prefixSearch. + */ + public void setCustomersPassword_PrefixSearch(String customersPassword) { + registerCustomersPassword(ConditionKey.CK_PREFIX_SEARCH, filterRemoveEmptyString(customersPassword)); + } + + /** + * Set the value of customersPassword using likeSearch. { like '%xxx%' } + * If the value is null or empty-string, this condition is ignored. + * You can invoke this method several times and the conditions are set up. + * + * @param customersPassword The value of customersPassword as likeSearch. + * @param likeSearchOption Like search option. (NotNull) + */ + public void setCustomersPassword_LikeSearch(String customersPassword, jp.sf.pal.pompei.allcommon.cbean.coption.LikeSearchOption likeSearchOption) { + registerLikeSearchQuery(ConditionKey.CK_LIKE_SEARCH, filterRemoveEmptyString(customersPassword), getCValueCustomersPassword(), COL_CUSTOMERS_PASSWORD, J_CustomersPassword, UJ_customersPassword, likeSearchOption); + } + + /** + * Set the value of customersPassword using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param customersPasswordList The value of customersPassword as inScope. + */ + public void setCustomersPassword_InScope(java.util.List customersPasswordList) { + registerCustomersPassword(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyStringFromList(customersPasswordList)); + } + + /** + * Set the value of customersPassword using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param customersPassword The value of customersPassword as inScope. + */ + public void setCustomersPassword_InScope(String customersPassword, jp.sf.pal.pompei.allcommon.cbean.coption.InScopeOption option) { + registerInScopeQuery(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyString(customersPassword), getCValueCustomersPassword(), COL_CUSTOMERS_PASSWORD, J_CustomersPassword, UJ_customersPassword, option); + } + + /** + * Set the value of customersPassword using notInScope. { not in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param customersPasswordList The value of customersPassword as notInScope. + */ + public void setCustomersPassword_NotInScope(java.util.List customersPasswordList) { + registerCustomersPassword(ConditionKey.CK_NOT_IN_SCOPE, filterRemoveEmptyStringFromList(customersPasswordList)); + } + + /** + * Register condition of customersPassword. + * + * @param key Condition key. (NotNull) + * @param value The value of customersPassword. (Nullable) + */ + protected void registerCustomersPassword(ConditionKey key, Object value) { + registerQuery(key, value, getCValueCustomersPassword(), COL_CUSTOMERS_PASSWORD, J_CustomersPassword, UJ_customersPassword); + } + + /** + * Register inline condition of customersPassword. + * + * @param key Condition key. (NotNull) + * @param value The value of customersPassword. (Nullable) + */ + protected void registerInlineCustomersPassword(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueCustomersPassword(), COL_CUSTOMERS_PASSWORD, J_CustomersPassword, UJ_customersPassword); + } + + abstract protected ConditionValue getCValueCustomersPassword(); + + /** Column db name of customersNewsletter. */ + protected static final String COL_CUSTOMERS_NEWSLETTER = "CUSTOMERS_NEWSLETTER"; + + /** Column java name of customersNewsletter. */ + protected static final String J_CustomersNewsletter = "CustomersNewsletter"; + + /** Column uncapitalised java name of customersNewsletter. */ + protected static final String UJ_customersNewsletter = "customersNewsletter"; + + /** + * Set the value of customersNewsletter using equal. { = } + * If the value is null or empty-string, this condition is ignored. + * + * @param customersNewsletter The value of customersNewsletter as equal. + */ + public void setCustomersNewsletter_Equal(String customersNewsletter) { + registerCustomersNewsletter(ConditionKey.CK_EQUAL, filterRemoveEmptyString(customersNewsletter)); + } + + /** + * Set the value of customersNewsletter using notEqual. { != } + * If the value is null or empty-string, this condition is ignored. + * + * @param customersNewsletter The value of customersNewsletter as notEqual. + */ + public void setCustomersNewsletter_NotEqual(String customersNewsletter) { + registerCustomersNewsletter(ConditionKey.CK_NOT_EQUAL, filterRemoveEmptyString(customersNewsletter)); + } + + /** + * Set the value of customersNewsletter using greaterThan. { > } + * If the value is null or empty-string, this condition is ignored. + * + * @param customersNewsletter The value of customersNewsletter as greaterThan. + */ + public void setCustomersNewsletter_GreaterThan(String customersNewsletter) { + registerCustomersNewsletter(ConditionKey.CK_GREATER_THAN, filterRemoveEmptyString(customersNewsletter)); + } + + /** + * Set the value of customersNewsletter using lessThan. { < } + * If the value is null or empty-string, this condition is ignored. + * + * @param customersNewsletter The value of customersNewsletter as lessThan. + */ + public void setCustomersNewsletter_LessThan(String customersNewsletter) { + registerCustomersNewsletter(ConditionKey.CK_LESS_THAN, filterRemoveEmptyString(customersNewsletter)); + } + + /** + * Set the value of customersNewsletter using greaterEqual. { >= } + * If the value is null or empty-string, this condition is ignored. + * + * @param customersNewsletter The value of customersNewsletter as greaterEqual. + */ + public void setCustomersNewsletter_GreaterEqual(String customersNewsletter) { + registerCustomersNewsletter(ConditionKey.CK_GREATER_EQUAL, filterRemoveEmptyString(customersNewsletter)); + } + + /** + * Set the value of customersNewsletter using lessEqual. { <= } + * If the value is null or empty-string, this condition is ignored. + * + * @param customersNewsletter The value of customersNewsletter as lessEqual. + */ + public void setCustomersNewsletter_LessEqual(String customersNewsletter) { + registerCustomersNewsletter(ConditionKey.CK_LESS_EQUAL, filterRemoveEmptyString(customersNewsletter)); + } + + /** + * Set the value of customersNewsletter using prefixSearch. { like 'xxx%' } + * If the value is null or empty-string, this condition is ignored. + * + * @param customersNewsletter The value of customersNewsletter as prefixSearch. + */ + public void setCustomersNewsletter_PrefixSearch(String customersNewsletter) { + registerCustomersNewsletter(ConditionKey.CK_PREFIX_SEARCH, filterRemoveEmptyString(customersNewsletter)); + } + + /** + * Set the value of customersNewsletter using likeSearch. { like '%xxx%' } + * If the value is null or empty-string, this condition is ignored. + * You can invoke this method several times and the conditions are set up. + * + * @param customersNewsletter The value of customersNewsletter as likeSearch. + * @param likeSearchOption Like search option. (NotNull) + */ + public void setCustomersNewsletter_LikeSearch(String customersNewsletter, jp.sf.pal.pompei.allcommon.cbean.coption.LikeSearchOption likeSearchOption) { + registerLikeSearchQuery(ConditionKey.CK_LIKE_SEARCH, filterRemoveEmptyString(customersNewsletter), getCValueCustomersNewsletter(), COL_CUSTOMERS_NEWSLETTER, J_CustomersNewsletter, UJ_customersNewsletter, likeSearchOption); + } + + /** + * Set the value of customersNewsletter using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param customersNewsletterList The value of customersNewsletter as inScope. + */ + public void setCustomersNewsletter_InScope(java.util.List customersNewsletterList) { + registerCustomersNewsletter(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyStringFromList(customersNewsletterList)); + } + + /** + * Set the value of customersNewsletter using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param customersNewsletter The value of customersNewsletter as inScope. + */ + public void setCustomersNewsletter_InScope(String customersNewsletter, jp.sf.pal.pompei.allcommon.cbean.coption.InScopeOption option) { + registerInScopeQuery(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyString(customersNewsletter), getCValueCustomersNewsletter(), COL_CUSTOMERS_NEWSLETTER, J_CustomersNewsletter, UJ_customersNewsletter, option); + } + + /** + * Set the value of customersNewsletter using notInScope. { not in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param customersNewsletterList The value of customersNewsletter as notInScope. + */ + public void setCustomersNewsletter_NotInScope(java.util.List customersNewsletterList) { + registerCustomersNewsletter(ConditionKey.CK_NOT_IN_SCOPE, filterRemoveEmptyStringFromList(customersNewsletterList)); + } + + /** + * Set the value of customersNewsletter using isNull. { is null } + */ + public void setCustomersNewsletter_IsNull() { + registerCustomersNewsletter(ConditionKey.CK_IS_NULL, DUMMY_OBJECT); + } + + /** + * Set the value of customersNewsletter using isNotNull. { is not null } + */ + public void setCustomersNewsletter_IsNotNull() { + registerCustomersNewsletter(ConditionKey.CK_IS_NOT_NULL, DUMMY_OBJECT); + } + + /** + * Register condition of customersNewsletter. + * + * @param key Condition key. (NotNull) + * @param value The value of customersNewsletter. (Nullable) + */ + protected void registerCustomersNewsletter(ConditionKey key, Object value) { + registerQuery(key, value, getCValueCustomersNewsletter(), COL_CUSTOMERS_NEWSLETTER, J_CustomersNewsletter, UJ_customersNewsletter); + } + + /** + * Register inline condition of customersNewsletter. + * + * @param key Condition key. (NotNull) + * @param value The value of customersNewsletter. (Nullable) + */ + protected void registerInlineCustomersNewsletter(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueCustomersNewsletter(), COL_CUSTOMERS_NEWSLETTER, J_CustomersNewsletter, UJ_customersNewsletter); + } + + abstract protected ConditionValue getCValueCustomersNewsletter(); + + // =================================================================================== + // Basic Override + // ============== + /** + * This method overrides the method that is declared at super. + * + * @return Clause string. (NotNull) + */ + public String toString() { + return getSqlClause().getClause(); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/AbstractBsCustomersInfoCQ.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/AbstractBsCustomersInfoCQ.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/AbstractBsCustomersInfoCQ.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,736 @@ + +package jp.sf.pal.pompei.cbean.cq.bs; + + + +import jp.sf.pal.pompei.allcommon.cbean.*; +import jp.sf.pal.pompei.allcommon.cbean.ckey.*; +import jp.sf.pal.pompei.allcommon.cbean.cvalue.ConditionValue; +import jp.sf.pal.pompei.allcommon.cbean.sqlclause.SqlClause; +import jp.sf.pal.pompei.cbean.cq.*; + +/** + * The condition-query of CUSTOMERS_INFO. + * + * @author DBFlute(AutoGenerator) + */ +public abstract class AbstractBsCustomersInfoCQ extends AbstractConditionQuery { + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param childQuery Child query as abstract class. (Nullable: If null, this is base instance.) + * @param sqlClause SQL clause instance. (NotNull) + * @param aliasName My alias name. (NotNull) + * @param nestLevel Nest level. + */ + public AbstractBsCustomersInfoCQ(ConditionQuery childQuery, SqlClause sqlClause, String aliasName, int nestLevel) { + super(childQuery, sqlClause, aliasName, nestLevel); + } + + // =================================================================================== + // Table Name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + final public String getTableDbName() { + return "CUSTOMERS_INFO"; + } + + // =================================================================================== + // Query + // ===== + + // /* * * * * * * * * * * * * * * * * * * * * * * + // MyTable = [CUSTOMERS_INFO] + // * * * * * * * * */ + + + /** Column db name of customersInfoId. */ + protected static final String COL_CUSTOMERS_INFO_ID = "CUSTOMERS_INFO_ID"; + + /** Column java name of customersInfoId. */ + protected static final String J_CustomersInfoId = "CustomersInfoId"; + + /** Column uncapitalised java name of customersInfoId. */ + protected static final String UJ_customersInfoId = "customersInfoId"; + + /** + * Set the value of customersInfoId using equal. { = } + * + * @param customersInfoId The value of customersInfoId as equal. + */ + public void setCustomersInfoId_Equal(java.math.BigDecimal customersInfoId) { + registerCustomersInfoId(ConditionKey.CK_EQUAL, customersInfoId); + } + + /** + * Set the value of customersInfoId using notEqual. { != } + * + * @param customersInfoId The value of customersInfoId as notEqual. + */ + public void setCustomersInfoId_NotEqual(java.math.BigDecimal customersInfoId) { + registerCustomersInfoId(ConditionKey.CK_NOT_EQUAL, customersInfoId); + } + + /** + * Set the value of customersInfoId using greaterThan. { > } + * + * @param customersInfoId The value of customersInfoId as greaterThan. + */ + public void setCustomersInfoId_GreaterThan(java.math.BigDecimal customersInfoId) { + registerCustomersInfoId(ConditionKey.CK_GREATER_THAN, customersInfoId); + } + + /** + * Set the value of customersInfoId using lessThan. { < } + * + * @param customersInfoId The value of customersInfoId as lessThan. + */ + public void setCustomersInfoId_LessThan(java.math.BigDecimal customersInfoId) { + registerCustomersInfoId(ConditionKey.CK_LESS_THAN, customersInfoId); + } + + /** + * Set the value of customersInfoId using greaterEqual. { >= } + * + * @param customersInfoId The value of customersInfoId as greaterEqual. + */ + public void setCustomersInfoId_GreaterEqual(java.math.BigDecimal customersInfoId) { + registerCustomersInfoId(ConditionKey.CK_GREATER_EQUAL, customersInfoId); + } + + /** + * Set the value of customersInfoId using lessEqual. { <= } + * + * @param customersInfoId The value of customersInfoId as lessEqual. + */ + public void setCustomersInfoId_LessEqual(java.math.BigDecimal customersInfoId) { + registerCustomersInfoId(ConditionKey.CK_LESS_EQUAL, customersInfoId); + } + + /** + * Set the value of customersInfoId using inScope. { in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param customersInfoIdList The value of customersInfoId as inScope. + */ + public void setCustomersInfoId_InScope(java.util.List customersInfoIdList) { + registerCustomersInfoId(ConditionKey.CK_IN_SCOPE, customersInfoIdList); + } + + /** + * Set the value of customersInfoId using notInScope. { not in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param customersInfoIdList The value of customersInfoId as notInScope. + */ + public void setCustomersInfoId_NotInScope(java.util.List customersInfoIdList) { + registerCustomersInfoId(ConditionKey.CK_NOT_IN_SCOPE, customersInfoIdList); + } + + /** + * Register condition of customersInfoId. + * + * @param key Condition key. (NotNull) + * @param value The value of customersInfoId. (Nullable) + */ + protected void registerCustomersInfoId(ConditionKey key, Object value) { + registerQuery(key, value, getCValueCustomersInfoId(), COL_CUSTOMERS_INFO_ID, J_CustomersInfoId, UJ_customersInfoId); + } + + /** + * Register inline condition of customersInfoId. + * + * @param key Condition key. (NotNull) + * @param value The value of customersInfoId. (Nullable) + */ + protected void registerInlineCustomersInfoId(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueCustomersInfoId(), COL_CUSTOMERS_INFO_ID, J_CustomersInfoId, UJ_customersInfoId); + } + + abstract protected ConditionValue getCValueCustomersInfoId(); + + /** Column db name of customersInfoDateOfLastLogon. */ + protected static final String COL_CUSTOMERS_INFO_DATE_OF_LAST_LOGON = "CUSTOMERS_INFO_DATE_OF_LAST_LOGON"; + + /** Column java name of customersInfoDateOfLastLogon. */ + protected static final String J_CustomersInfoDateOfLastLogon = "CustomersInfoDateOfLastLogon"; + + /** Column uncapitalised java name of customersInfoDateOfLastLogon. */ + protected static final String UJ_customersInfoDateOfLastLogon = "customersInfoDateOfLastLogon"; + + /** + * Set the value of customersInfoDateOfLastLogon using equal. { = } + * + * @param customersInfoDateOfLastLogon The value of customersInfoDateOfLastLogon as equal. + */ + public void setCustomersInfoDateOfLastLogon_Equal(java.sql.Timestamp customersInfoDateOfLastLogon) { + registerCustomersInfoDateOfLastLogon(ConditionKey.CK_EQUAL, customersInfoDateOfLastLogon); + } + + /** + * Set the value of customersInfoDateOfLastLogon using notEqual. { != } + * + * @param customersInfoDateOfLastLogon The value of customersInfoDateOfLastLogon as notEqual. + */ + public void setCustomersInfoDateOfLastLogon_NotEqual(java.sql.Timestamp customersInfoDateOfLastLogon) { + registerCustomersInfoDateOfLastLogon(ConditionKey.CK_NOT_EQUAL, customersInfoDateOfLastLogon); + } + + /** + * Set the value of customersInfoDateOfLastLogon using greaterThan. { > } + * + * @param customersInfoDateOfLastLogon The value of customersInfoDateOfLastLogon as greaterThan. + */ + public void setCustomersInfoDateOfLastLogon_GreaterThan(java.sql.Timestamp customersInfoDateOfLastLogon) { + registerCustomersInfoDateOfLastLogon(ConditionKey.CK_GREATER_THAN, customersInfoDateOfLastLogon); + } + + /** + * Set the value of customersInfoDateOfLastLogon using lessThan. { < } + * + * @param customersInfoDateOfLastLogon The value of customersInfoDateOfLastLogon as lessThan. + */ + public void setCustomersInfoDateOfLastLogon_LessThan(java.sql.Timestamp customersInfoDateOfLastLogon) { + registerCustomersInfoDateOfLastLogon(ConditionKey.CK_LESS_THAN, customersInfoDateOfLastLogon); + } + + /** + * Set the value of customersInfoDateOfLastLogon using greaterEqual. { >= } + * + * @param customersInfoDateOfLastLogon The value of customersInfoDateOfLastLogon as greaterEqual. + */ + public void setCustomersInfoDateOfLastLogon_GreaterEqual(java.sql.Timestamp customersInfoDateOfLastLogon) { + registerCustomersInfoDateOfLastLogon(ConditionKey.CK_GREATER_EQUAL, customersInfoDateOfLastLogon); + } + + /** + * Set the value of customersInfoDateOfLastLogon using lessEqual. { <= } + * + * @param customersInfoDateOfLastLogon The value of customersInfoDateOfLastLogon as lessEqual. + */ + public void setCustomersInfoDateOfLastLogon_LessEqual(java.sql.Timestamp customersInfoDateOfLastLogon) { + registerCustomersInfoDateOfLastLogon(ConditionKey.CK_LESS_EQUAL, customersInfoDateOfLastLogon); + } + + /** + * Set the value of customersInfoDateOfLastLogon using from-to. { $fromDate <= COLUMN_NAME <= $toDate } + * + * @param customersInfoDateOfLastLogon The value of customersInfoDateOfLastLogon as from-to. + * @param fromToOption From-To option. (NotNull) + */ + public void setCustomersInfoDateOfLastLogon_FromTo(java.sql.Timestamp fromDate, java.sql.Timestamp toDate, jp.sf.pal.pompei.allcommon.cbean.coption.FromToOption fromToOption) { + registerFromToQuery(fromDate, toDate, getCValueCustomersInfoDateOfLastLogon(), COL_CUSTOMERS_INFO_DATE_OF_LAST_LOGON, J_CustomersInfoDateOfLastLogon, UJ_customersInfoDateOfLastLogon, fromToOption); + } + + /** + * Set the value of customersInfoDateOfLastLogon using isNull. { is null } + */ + public void setCustomersInfoDateOfLastLogon_IsNull() { + registerCustomersInfoDateOfLastLogon(ConditionKey.CK_IS_NULL, DUMMY_OBJECT); + } + + /** + * Set the value of customersInfoDateOfLastLogon using isNotNull. { is not null } + */ + public void setCustomersInfoDateOfLastLogon_IsNotNull() { + registerCustomersInfoDateOfLastLogon(ConditionKey.CK_IS_NOT_NULL, DUMMY_OBJECT); + } + + /** + * Register condition of customersInfoDateOfLastLogon. + * + * @param key Condition key. (NotNull) + * @param value The value of customersInfoDateOfLastLogon. (Nullable) + */ + protected void registerCustomersInfoDateOfLastLogon(ConditionKey key, Object value) { + registerQuery(key, value, getCValueCustomersInfoDateOfLastLogon(), COL_CUSTOMERS_INFO_DATE_OF_LAST_LOGON, J_CustomersInfoDateOfLastLogon, UJ_customersInfoDateOfLastLogon); + } + + /** + * Register inline condition of customersInfoDateOfLastLogon. + * + * @param key Condition key. (NotNull) + * @param value The value of customersInfoDateOfLastLogon. (Nullable) + */ + protected void registerInlineCustomersInfoDateOfLastLogon(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueCustomersInfoDateOfLastLogon(), COL_CUSTOMERS_INFO_DATE_OF_LAST_LOGON, J_CustomersInfoDateOfLastLogon, UJ_customersInfoDateOfLastLogon); + } + + abstract protected ConditionValue getCValueCustomersInfoDateOfLastLogon(); + + /** Column db name of customersInfoNumberOfLogons. */ + protected static final String COL_CUSTOMERS_INFO_NUMBER_OF_LOGONS = "CUSTOMERS_INFO_NUMBER_OF_LOGONS"; + + /** Column java name of customersInfoNumberOfLogons. */ + protected static final String J_CustomersInfoNumberOfLogons = "CustomersInfoNumberOfLogons"; + + /** Column uncapitalised java name of customersInfoNumberOfLogons. */ + protected static final String UJ_customersInfoNumberOfLogons = "customersInfoNumberOfLogons"; + + /** + * Set the value of customersInfoNumberOfLogons using equal. { = } + * + * @param customersInfoNumberOfLogons The value of customersInfoNumberOfLogons as equal. + */ + public void setCustomersInfoNumberOfLogons_Equal(java.math.BigDecimal customersInfoNumberOfLogons) { + registerCustomersInfoNumberOfLogons(ConditionKey.CK_EQUAL, customersInfoNumberOfLogons); + } + + /** + * Set the value of customersInfoNumberOfLogons using notEqual. { != } + * + * @param customersInfoNumberOfLogons The value of customersInfoNumberOfLogons as notEqual. + */ + public void setCustomersInfoNumberOfLogons_NotEqual(java.math.BigDecimal customersInfoNumberOfLogons) { + registerCustomersInfoNumberOfLogons(ConditionKey.CK_NOT_EQUAL, customersInfoNumberOfLogons); + } + + /** + * Set the value of customersInfoNumberOfLogons using greaterThan. { > } + * + * @param customersInfoNumberOfLogons The value of customersInfoNumberOfLogons as greaterThan. + */ + public void setCustomersInfoNumberOfLogons_GreaterThan(java.math.BigDecimal customersInfoNumberOfLogons) { + registerCustomersInfoNumberOfLogons(ConditionKey.CK_GREATER_THAN, customersInfoNumberOfLogons); + } + + /** + * Set the value of customersInfoNumberOfLogons using lessThan. { < } + * + * @param customersInfoNumberOfLogons The value of customersInfoNumberOfLogons as lessThan. + */ + public void setCustomersInfoNumberOfLogons_LessThan(java.math.BigDecimal customersInfoNumberOfLogons) { + registerCustomersInfoNumberOfLogons(ConditionKey.CK_LESS_THAN, customersInfoNumberOfLogons); + } + + /** + * Set the value of customersInfoNumberOfLogons using greaterEqual. { >= } + * + * @param customersInfoNumberOfLogons The value of customersInfoNumberOfLogons as greaterEqual. + */ + public void setCustomersInfoNumberOfLogons_GreaterEqual(java.math.BigDecimal customersInfoNumberOfLogons) { + registerCustomersInfoNumberOfLogons(ConditionKey.CK_GREATER_EQUAL, customersInfoNumberOfLogons); + } + + /** + * Set the value of customersInfoNumberOfLogons using lessEqual. { <= } + * + * @param customersInfoNumberOfLogons The value of customersInfoNumberOfLogons as lessEqual. + */ + public void setCustomersInfoNumberOfLogons_LessEqual(java.math.BigDecimal customersInfoNumberOfLogons) { + registerCustomersInfoNumberOfLogons(ConditionKey.CK_LESS_EQUAL, customersInfoNumberOfLogons); + } + + /** + * Set the value of customersInfoNumberOfLogons using inScope. { in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param customersInfoNumberOfLogonsList The value of customersInfoNumberOfLogons as inScope. + */ + public void setCustomersInfoNumberOfLogons_InScope(java.util.List customersInfoNumberOfLogonsList) { + registerCustomersInfoNumberOfLogons(ConditionKey.CK_IN_SCOPE, customersInfoNumberOfLogonsList); + } + + /** + * Set the value of customersInfoNumberOfLogons using notInScope. { not in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param customersInfoNumberOfLogonsList The value of customersInfoNumberOfLogons as notInScope. + */ + public void setCustomersInfoNumberOfLogons_NotInScope(java.util.List customersInfoNumberOfLogonsList) { + registerCustomersInfoNumberOfLogons(ConditionKey.CK_NOT_IN_SCOPE, customersInfoNumberOfLogonsList); + } + + /** + * Set the value of customersInfoNumberOfLogons using isNull. { is null } + */ + public void setCustomersInfoNumberOfLogons_IsNull() { + registerCustomersInfoNumberOfLogons(ConditionKey.CK_IS_NULL, DUMMY_OBJECT); + } + + /** + * Set the value of customersInfoNumberOfLogons using isNotNull. { is not null } + */ + public void setCustomersInfoNumberOfLogons_IsNotNull() { + registerCustomersInfoNumberOfLogons(ConditionKey.CK_IS_NOT_NULL, DUMMY_OBJECT); + } + + /** + * Register condition of customersInfoNumberOfLogons. + * + * @param key Condition key. (NotNull) + * @param value The value of customersInfoNumberOfLogons. (Nullable) + */ + protected void registerCustomersInfoNumberOfLogons(ConditionKey key, Object value) { + registerQuery(key, value, getCValueCustomersInfoNumberOfLogons(), COL_CUSTOMERS_INFO_NUMBER_OF_LOGONS, J_CustomersInfoNumberOfLogons, UJ_customersInfoNumberOfLogons); + } + + /** + * Register inline condition of customersInfoNumberOfLogons. + * + * @param key Condition key. (NotNull) + * @param value The value of customersInfoNumberOfLogons. (Nullable) + */ + protected void registerInlineCustomersInfoNumberOfLogons(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueCustomersInfoNumberOfLogons(), COL_CUSTOMERS_INFO_NUMBER_OF_LOGONS, J_CustomersInfoNumberOfLogons, UJ_customersInfoNumberOfLogons); + } + + abstract protected ConditionValue getCValueCustomersInfoNumberOfLogons(); + + /** Column db name of customersInfoDateAccountCreated. */ + protected static final String COL_CUSTOMERS_INFO_DATE_ACCOUNT_CREATED = "CUSTOMERS_INFO_DATE_ACCOUNT_CREATED"; + + /** Column java name of customersInfoDateAccountCreated. */ + protected static final String J_CustomersInfoDateAccountCreated = "CustomersInfoDateAccountCreated"; + + /** Column uncapitalised java name of customersInfoDateAccountCreated. */ + protected static final String UJ_customersInfoDateAccountCreated = "customersInfoDateAccountCreated"; + + /** + * Set the value of customersInfoDateAccountCreated using equal. { = } + * + * @param customersInfoDateAccountCreated The value of customersInfoDateAccountCreated as equal. + */ + public void setCustomersInfoDateAccountCreated_Equal(java.sql.Timestamp customersInfoDateAccountCreated) { + registerCustomersInfoDateAccountCreated(ConditionKey.CK_EQUAL, customersInfoDateAccountCreated); + } + + /** + * Set the value of customersInfoDateAccountCreated using notEqual. { != } + * + * @param customersInfoDateAccountCreated The value of customersInfoDateAccountCreated as notEqual. + */ + public void setCustomersInfoDateAccountCreated_NotEqual(java.sql.Timestamp customersInfoDateAccountCreated) { + registerCustomersInfoDateAccountCreated(ConditionKey.CK_NOT_EQUAL, customersInfoDateAccountCreated); + } + + /** + * Set the value of customersInfoDateAccountCreated using greaterThan. { > } + * + * @param customersInfoDateAccountCreated The value of customersInfoDateAccountCreated as greaterThan. + */ + public void setCustomersInfoDateAccountCreated_GreaterThan(java.sql.Timestamp customersInfoDateAccountCreated) { + registerCustomersInfoDateAccountCreated(ConditionKey.CK_GREATER_THAN, customersInfoDateAccountCreated); + } + + /** + * Set the value of customersInfoDateAccountCreated using lessThan. { < } + * + * @param customersInfoDateAccountCreated The value of customersInfoDateAccountCreated as lessThan. + */ + public void setCustomersInfoDateAccountCreated_LessThan(java.sql.Timestamp customersInfoDateAccountCreated) { + registerCustomersInfoDateAccountCreated(ConditionKey.CK_LESS_THAN, customersInfoDateAccountCreated); + } + + /** + * Set the value of customersInfoDateAccountCreated using greaterEqual. { >= } + * + * @param customersInfoDateAccountCreated The value of customersInfoDateAccountCreated as greaterEqual. + */ + public void setCustomersInfoDateAccountCreated_GreaterEqual(java.sql.Timestamp customersInfoDateAccountCreated) { + registerCustomersInfoDateAccountCreated(ConditionKey.CK_GREATER_EQUAL, customersInfoDateAccountCreated); + } + + /** + * Set the value of customersInfoDateAccountCreated using lessEqual. { <= } + * + * @param customersInfoDateAccountCreated The value of customersInfoDateAccountCreated as lessEqual. + */ + public void setCustomersInfoDateAccountCreated_LessEqual(java.sql.Timestamp customersInfoDateAccountCreated) { + registerCustomersInfoDateAccountCreated(ConditionKey.CK_LESS_EQUAL, customersInfoDateAccountCreated); + } + + /** + * Set the value of customersInfoDateAccountCreated using from-to. { $fromDate <= COLUMN_NAME <= $toDate } + * + * @param customersInfoDateAccountCreated The value of customersInfoDateAccountCreated as from-to. + * @param fromToOption From-To option. (NotNull) + */ + public void setCustomersInfoDateAccountCreated_FromTo(java.sql.Timestamp fromDate, java.sql.Timestamp toDate, jp.sf.pal.pompei.allcommon.cbean.coption.FromToOption fromToOption) { + registerFromToQuery(fromDate, toDate, getCValueCustomersInfoDateAccountCreated(), COL_CUSTOMERS_INFO_DATE_ACCOUNT_CREATED, J_CustomersInfoDateAccountCreated, UJ_customersInfoDateAccountCreated, fromToOption); + } + + /** + * Set the value of customersInfoDateAccountCreated using isNull. { is null } + */ + public void setCustomersInfoDateAccountCreated_IsNull() { + registerCustomersInfoDateAccountCreated(ConditionKey.CK_IS_NULL, DUMMY_OBJECT); + } + + /** + * Set the value of customersInfoDateAccountCreated using isNotNull. { is not null } + */ + public void setCustomersInfoDateAccountCreated_IsNotNull() { + registerCustomersInfoDateAccountCreated(ConditionKey.CK_IS_NOT_NULL, DUMMY_OBJECT); + } + + /** + * Register condition of customersInfoDateAccountCreated. + * + * @param key Condition key. (NotNull) + * @param value The value of customersInfoDateAccountCreated. (Nullable) + */ + protected void registerCustomersInfoDateAccountCreated(ConditionKey key, Object value) { + registerQuery(key, value, getCValueCustomersInfoDateAccountCreated(), COL_CUSTOMERS_INFO_DATE_ACCOUNT_CREATED, J_CustomersInfoDateAccountCreated, UJ_customersInfoDateAccountCreated); + } + + /** + * Register inline condition of customersInfoDateAccountCreated. + * + * @param key Condition key. (NotNull) + * @param value The value of customersInfoDateAccountCreated. (Nullable) + */ + protected void registerInlineCustomersInfoDateAccountCreated(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueCustomersInfoDateAccountCreated(), COL_CUSTOMERS_INFO_DATE_ACCOUNT_CREATED, J_CustomersInfoDateAccountCreated, UJ_customersInfoDateAccountCreated); + } + + abstract protected ConditionValue getCValueCustomersInfoDateAccountCreated(); + + /** Column db name of customersInfoDateAccountLastModified. */ + protected static final String COL_CUSTOMERS_INFO_DATE_ACCOUNT_LAST_MODIFIED = "CUSTOMERS_INFO_DATE_ACCOUNT_LAST_MODIFIED"; + + /** Column java name of customersInfoDateAccountLastModified. */ + protected static final String J_CustomersInfoDateAccountLastModified = "CustomersInfoDateAccountLastModified"; + + /** Column uncapitalised java name of customersInfoDateAccountLastModified. */ + protected static final String UJ_customersInfoDateAccountLastModified = "customersInfoDateAccountLastModified"; + + /** + * Set the value of customersInfoDateAccountLastModified using equal. { = } + * + * @param customersInfoDateAccountLastModified The value of customersInfoDateAccountLastModified as equal. + */ + public void setCustomersInfoDateAccountLastModified_Equal(java.sql.Timestamp customersInfoDateAccountLastModified) { + registerCustomersInfoDateAccountLastModified(ConditionKey.CK_EQUAL, customersInfoDateAccountLastModified); + } + + /** + * Set the value of customersInfoDateAccountLastModified using notEqual. { != } + * + * @param customersInfoDateAccountLastModified The value of customersInfoDateAccountLastModified as notEqual. + */ + public void setCustomersInfoDateAccountLastModified_NotEqual(java.sql.Timestamp customersInfoDateAccountLastModified) { + registerCustomersInfoDateAccountLastModified(ConditionKey.CK_NOT_EQUAL, customersInfoDateAccountLastModified); + } + + /** + * Set the value of customersInfoDateAccountLastModified using greaterThan. { > } + * + * @param customersInfoDateAccountLastModified The value of customersInfoDateAccountLastModified as greaterThan. + */ + public void setCustomersInfoDateAccountLastModified_GreaterThan(java.sql.Timestamp customersInfoDateAccountLastModified) { + registerCustomersInfoDateAccountLastModified(ConditionKey.CK_GREATER_THAN, customersInfoDateAccountLastModified); + } + + /** + * Set the value of customersInfoDateAccountLastModified using lessThan. { < } + * + * @param customersInfoDateAccountLastModified The value of customersInfoDateAccountLastModified as lessThan. + */ + public void setCustomersInfoDateAccountLastModified_LessThan(java.sql.Timestamp customersInfoDateAccountLastModified) { + registerCustomersInfoDateAccountLastModified(ConditionKey.CK_LESS_THAN, customersInfoDateAccountLastModified); + } + + /** + * Set the value of customersInfoDateAccountLastModified using greaterEqual. { >= } + * + * @param customersInfoDateAccountLastModified The value of customersInfoDateAccountLastModified as greaterEqual. + */ + public void setCustomersInfoDateAccountLastModified_GreaterEqual(java.sql.Timestamp customersInfoDateAccountLastModified) { + registerCustomersInfoDateAccountLastModified(ConditionKey.CK_GREATER_EQUAL, customersInfoDateAccountLastModified); + } + + /** + * Set the value of customersInfoDateAccountLastModified using lessEqual. { <= } + * + * @param customersInfoDateAccountLastModified The value of customersInfoDateAccountLastModified as lessEqual. + */ + public void setCustomersInfoDateAccountLastModified_LessEqual(java.sql.Timestamp customersInfoDateAccountLastModified) { + registerCustomersInfoDateAccountLastModified(ConditionKey.CK_LESS_EQUAL, customersInfoDateAccountLastModified); + } + + /** + * Set the value of customersInfoDateAccountLastModified using from-to. { $fromDate <= COLUMN_NAME <= $toDate } + * + * @param customersInfoDateAccountLastModified The value of customersInfoDateAccountLastModified as from-to. + * @param fromToOption From-To option. (NotNull) + */ + public void setCustomersInfoDateAccountLastModified_FromTo(java.sql.Timestamp fromDate, java.sql.Timestamp toDate, jp.sf.pal.pompei.allcommon.cbean.coption.FromToOption fromToOption) { + registerFromToQuery(fromDate, toDate, getCValueCustomersInfoDateAccountLastModified(), COL_CUSTOMERS_INFO_DATE_ACCOUNT_LAST_MODIFIED, J_CustomersInfoDateAccountLastModified, UJ_customersInfoDateAccountLastModified, fromToOption); + } + + /** + * Set the value of customersInfoDateAccountLastModified using isNull. { is null } + */ + public void setCustomersInfoDateAccountLastModified_IsNull() { + registerCustomersInfoDateAccountLastModified(ConditionKey.CK_IS_NULL, DUMMY_OBJECT); + } + + /** + * Set the value of customersInfoDateAccountLastModified using isNotNull. { is not null } + */ + public void setCustomersInfoDateAccountLastModified_IsNotNull() { + registerCustomersInfoDateAccountLastModified(ConditionKey.CK_IS_NOT_NULL, DUMMY_OBJECT); + } + + /** + * Register condition of customersInfoDateAccountLastModified. + * + * @param key Condition key. (NotNull) + * @param value The value of customersInfoDateAccountLastModified. (Nullable) + */ + protected void registerCustomersInfoDateAccountLastModified(ConditionKey key, Object value) { + registerQuery(key, value, getCValueCustomersInfoDateAccountLastModified(), COL_CUSTOMERS_INFO_DATE_ACCOUNT_LAST_MODIFIED, J_CustomersInfoDateAccountLastModified, UJ_customersInfoDateAccountLastModified); + } + + /** + * Register inline condition of customersInfoDateAccountLastModified. + * + * @param key Condition key. (NotNull) + * @param value The value of customersInfoDateAccountLastModified. (Nullable) + */ + protected void registerInlineCustomersInfoDateAccountLastModified(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueCustomersInfoDateAccountLastModified(), COL_CUSTOMERS_INFO_DATE_ACCOUNT_LAST_MODIFIED, J_CustomersInfoDateAccountLastModified, UJ_customersInfoDateAccountLastModified); + } + + abstract protected ConditionValue getCValueCustomersInfoDateAccountLastModified(); + + /** Column db name of globalProductNotifications. */ + protected static final String COL_GLOBAL_PRODUCT_NOTIFICATIONS = "GLOBAL_PRODUCT_NOTIFICATIONS"; + + /** Column java name of globalProductNotifications. */ + protected static final String J_GlobalProductNotifications = "GlobalProductNotifications"; + + /** Column uncapitalised java name of globalProductNotifications. */ + protected static final String UJ_globalProductNotifications = "globalProductNotifications"; + + /** + * Set the value of globalProductNotifications using equal. { = } + * + * @param globalProductNotifications The value of globalProductNotifications as equal. + */ + public void setGlobalProductNotifications_Equal(java.math.BigDecimal globalProductNotifications) { + registerGlobalProductNotifications(ConditionKey.CK_EQUAL, globalProductNotifications); + } + + /** + * Set the value of globalProductNotifications using notEqual. { != } + * + * @param globalProductNotifications The value of globalProductNotifications as notEqual. + */ + public void setGlobalProductNotifications_NotEqual(java.math.BigDecimal globalProductNotifications) { + registerGlobalProductNotifications(ConditionKey.CK_NOT_EQUAL, globalProductNotifications); + } + + /** + * Set the value of globalProductNotifications using greaterThan. { > } + * + * @param globalProductNotifications The value of globalProductNotifications as greaterThan. + */ + public void setGlobalProductNotifications_GreaterThan(java.math.BigDecimal globalProductNotifications) { + registerGlobalProductNotifications(ConditionKey.CK_GREATER_THAN, globalProductNotifications); + } + + /** + * Set the value of globalProductNotifications using lessThan. { < } + * + * @param globalProductNotifications The value of globalProductNotifications as lessThan. + */ + public void setGlobalProductNotifications_LessThan(java.math.BigDecimal globalProductNotifications) { + registerGlobalProductNotifications(ConditionKey.CK_LESS_THAN, globalProductNotifications); + } + + /** + * Set the value of globalProductNotifications using greaterEqual. { >= } + * + * @param globalProductNotifications The value of globalProductNotifications as greaterEqual. + */ + public void setGlobalProductNotifications_GreaterEqual(java.math.BigDecimal globalProductNotifications) { + registerGlobalProductNotifications(ConditionKey.CK_GREATER_EQUAL, globalProductNotifications); + } + + /** + * Set the value of globalProductNotifications using lessEqual. { <= } + * + * @param globalProductNotifications The value of globalProductNotifications as lessEqual. + */ + public void setGlobalProductNotifications_LessEqual(java.math.BigDecimal globalProductNotifications) { + registerGlobalProductNotifications(ConditionKey.CK_LESS_EQUAL, globalProductNotifications); + } + + /** + * Set the value of globalProductNotifications using inScope. { in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param globalProductNotificationsList The value of globalProductNotifications as inScope. + */ + public void setGlobalProductNotifications_InScope(java.util.List globalProductNotificationsList) { + registerGlobalProductNotifications(ConditionKey.CK_IN_SCOPE, globalProductNotificationsList); + } + + /** + * Set the value of globalProductNotifications using notInScope. { not in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param globalProductNotificationsList The value of globalProductNotifications as notInScope. + */ + public void setGlobalProductNotifications_NotInScope(java.util.List globalProductNotificationsList) { + registerGlobalProductNotifications(ConditionKey.CK_NOT_IN_SCOPE, globalProductNotificationsList); + } + + /** + * Set the value of globalProductNotifications using isNull. { is null } + */ + public void setGlobalProductNotifications_IsNull() { + registerGlobalProductNotifications(ConditionKey.CK_IS_NULL, DUMMY_OBJECT); + } + + /** + * Set the value of globalProductNotifications using isNotNull. { is not null } + */ + public void setGlobalProductNotifications_IsNotNull() { + registerGlobalProductNotifications(ConditionKey.CK_IS_NOT_NULL, DUMMY_OBJECT); + } + + /** + * Register condition of globalProductNotifications. + * + * @param key Condition key. (NotNull) + * @param value The value of globalProductNotifications. (Nullable) + */ + protected void registerGlobalProductNotifications(ConditionKey key, Object value) { + registerQuery(key, value, getCValueGlobalProductNotifications(), COL_GLOBAL_PRODUCT_NOTIFICATIONS, J_GlobalProductNotifications, UJ_globalProductNotifications); + } + + /** + * Register inline condition of globalProductNotifications. + * + * @param key Condition key. (NotNull) + * @param value The value of globalProductNotifications. (Nullable) + */ + protected void registerInlineGlobalProductNotifications(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueGlobalProductNotifications(), COL_GLOBAL_PRODUCT_NOTIFICATIONS, J_GlobalProductNotifications, UJ_globalProductNotifications); + } + + abstract protected ConditionValue getCValueGlobalProductNotifications(); + + // =================================================================================== + // Basic Override + // ============== + /** + * This method overrides the method that is declared at super. + * + * @return Clause string. (NotNull) + */ + public String toString() { + return getSqlClause().getClause(); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/AbstractBsGeoZonesCQ.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/AbstractBsGeoZonesCQ.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/AbstractBsGeoZonesCQ.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,661 @@ + +package jp.sf.pal.pompei.cbean.cq.bs; + + + +import jp.sf.pal.pompei.allcommon.cbean.*; +import jp.sf.pal.pompei.allcommon.cbean.ckey.*; +import jp.sf.pal.pompei.allcommon.cbean.cvalue.ConditionValue; +import jp.sf.pal.pompei.allcommon.cbean.sqlclause.SqlClause; +import jp.sf.pal.pompei.cbean.cq.*; + +/** + * The condition-query of GEO_ZONES. + * + * @author DBFlute(AutoGenerator) + */ +public abstract class AbstractBsGeoZonesCQ extends AbstractConditionQuery { + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param childQuery Child query as abstract class. (Nullable: If null, this is base instance.) + * @param sqlClause SQL clause instance. (NotNull) + * @param aliasName My alias name. (NotNull) + * @param nestLevel Nest level. + */ + public AbstractBsGeoZonesCQ(ConditionQuery childQuery, SqlClause sqlClause, String aliasName, int nestLevel) { + super(childQuery, sqlClause, aliasName, nestLevel); + } + + // =================================================================================== + // Table Name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + final public String getTableDbName() { + return "GEO_ZONES"; + } + + // =================================================================================== + // Query + // ===== + + // /* * * * * * * * * * * * * * * * * * * * * * * + // MyTable = [GEO_ZONES] + // * * * * * * * * */ + + + /** Column db name of geoZoneId. */ + protected static final String COL_GEO_ZONE_ID = "GEO_ZONE_ID"; + + /** Column java name of geoZoneId. */ + protected static final String J_GeoZoneId = "GeoZoneId"; + + /** Column uncapitalised java name of geoZoneId. */ + protected static final String UJ_geoZoneId = "geoZoneId"; + + /** + * Set the value of geoZoneId using equal. { = } + * + * @param geoZoneId The value of geoZoneId as equal. + */ + public void setGeoZoneId_Equal(java.math.BigDecimal geoZoneId) { + registerGeoZoneId(ConditionKey.CK_EQUAL, geoZoneId); + } + + /** + * Set the value of geoZoneId using notEqual. { != } + * + * @param geoZoneId The value of geoZoneId as notEqual. + */ + public void setGeoZoneId_NotEqual(java.math.BigDecimal geoZoneId) { + registerGeoZoneId(ConditionKey.CK_NOT_EQUAL, geoZoneId); + } + + /** + * Set the value of geoZoneId using greaterThan. { > } + * + * @param geoZoneId The value of geoZoneId as greaterThan. + */ + public void setGeoZoneId_GreaterThan(java.math.BigDecimal geoZoneId) { + registerGeoZoneId(ConditionKey.CK_GREATER_THAN, geoZoneId); + } + + /** + * Set the value of geoZoneId using lessThan. { < } + * + * @param geoZoneId The value of geoZoneId as lessThan. + */ + public void setGeoZoneId_LessThan(java.math.BigDecimal geoZoneId) { + registerGeoZoneId(ConditionKey.CK_LESS_THAN, geoZoneId); + } + + /** + * Set the value of geoZoneId using greaterEqual. { >= } + * + * @param geoZoneId The value of geoZoneId as greaterEqual. + */ + public void setGeoZoneId_GreaterEqual(java.math.BigDecimal geoZoneId) { + registerGeoZoneId(ConditionKey.CK_GREATER_EQUAL, geoZoneId); + } + + /** + * Set the value of geoZoneId using lessEqual. { <= } + * + * @param geoZoneId The value of geoZoneId as lessEqual. + */ + public void setGeoZoneId_LessEqual(java.math.BigDecimal geoZoneId) { + registerGeoZoneId(ConditionKey.CK_LESS_EQUAL, geoZoneId); + } + + /** + * Set the value of geoZoneId using inScope. { in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param geoZoneIdList The value of geoZoneId as inScope. + */ + public void setGeoZoneId_InScope(java.util.List geoZoneIdList) { + registerGeoZoneId(ConditionKey.CK_IN_SCOPE, geoZoneIdList); + } + + /** + * Set the value of geoZoneId using notInScope. { not in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param geoZoneIdList The value of geoZoneId as notInScope. + */ + public void setGeoZoneId_NotInScope(java.util.List geoZoneIdList) { + registerGeoZoneId(ConditionKey.CK_NOT_IN_SCOPE, geoZoneIdList); + } + + /** + * Register condition of geoZoneId. + * + * @param key Condition key. (NotNull) + * @param value The value of geoZoneId. (Nullable) + */ + protected void registerGeoZoneId(ConditionKey key, Object value) { + registerQuery(key, value, getCValueGeoZoneId(), COL_GEO_ZONE_ID, J_GeoZoneId, UJ_geoZoneId); + } + + /** + * Register inline condition of geoZoneId. + * + * @param key Condition key. (NotNull) + * @param value The value of geoZoneId. (Nullable) + */ + protected void registerInlineGeoZoneId(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueGeoZoneId(), COL_GEO_ZONE_ID, J_GeoZoneId, UJ_geoZoneId); + } + + abstract protected ConditionValue getCValueGeoZoneId(); + + /** Column db name of geoZoneName. */ + protected static final String COL_GEO_ZONE_NAME = "GEO_ZONE_NAME"; + + /** Column java name of geoZoneName. */ + protected static final String J_GeoZoneName = "GeoZoneName"; + + /** Column uncapitalised java name of geoZoneName. */ + protected static final String UJ_geoZoneName = "geoZoneName"; + + /** + * Set the value of geoZoneName using equal. { = } + * If the value is null or empty-string, this condition is ignored. + * + * @param geoZoneName The value of geoZoneName as equal. + */ + public void setGeoZoneName_Equal(String geoZoneName) { + registerGeoZoneName(ConditionKey.CK_EQUAL, filterRemoveEmptyString(geoZoneName)); + } + + /** + * Set the value of geoZoneName using notEqual. { != } + * If the value is null or empty-string, this condition is ignored. + * + * @param geoZoneName The value of geoZoneName as notEqual. + */ + public void setGeoZoneName_NotEqual(String geoZoneName) { + registerGeoZoneName(ConditionKey.CK_NOT_EQUAL, filterRemoveEmptyString(geoZoneName)); + } + + /** + * Set the value of geoZoneName using greaterThan. { > } + * If the value is null or empty-string, this condition is ignored. + * + * @param geoZoneName The value of geoZoneName as greaterThan. + */ + public void setGeoZoneName_GreaterThan(String geoZoneName) { + registerGeoZoneName(ConditionKey.CK_GREATER_THAN, filterRemoveEmptyString(geoZoneName)); + } + + /** + * Set the value of geoZoneName using lessThan. { < } + * If the value is null or empty-string, this condition is ignored. + * + * @param geoZoneName The value of geoZoneName as lessThan. + */ + public void setGeoZoneName_LessThan(String geoZoneName) { + registerGeoZoneName(ConditionKey.CK_LESS_THAN, filterRemoveEmptyString(geoZoneName)); + } + + /** + * Set the value of geoZoneName using greaterEqual. { >= } + * If the value is null or empty-string, this condition is ignored. + * + * @param geoZoneName The value of geoZoneName as greaterEqual. + */ + public void setGeoZoneName_GreaterEqual(String geoZoneName) { + registerGeoZoneName(ConditionKey.CK_GREATER_EQUAL, filterRemoveEmptyString(geoZoneName)); + } + + /** + * Set the value of geoZoneName using lessEqual. { <= } + * If the value is null or empty-string, this condition is ignored. + * + * @param geoZoneName The value of geoZoneName as lessEqual. + */ + public void setGeoZoneName_LessEqual(String geoZoneName) { + registerGeoZoneName(ConditionKey.CK_LESS_EQUAL, filterRemoveEmptyString(geoZoneName)); + } + + /** + * Set the value of geoZoneName using prefixSearch. { like 'xxx%' } + * If the value is null or empty-string, this condition is ignored. + * + * @param geoZoneName The value of geoZoneName as prefixSearch. + */ + public void setGeoZoneName_PrefixSearch(String geoZoneName) { + registerGeoZoneName(ConditionKey.CK_PREFIX_SEARCH, filterRemoveEmptyString(geoZoneName)); + } + + /** + * Set the value of geoZoneName using likeSearch. { like '%xxx%' } + * If the value is null or empty-string, this condition is ignored. + * You can invoke this method several times and the conditions are set up. + * + * @param geoZoneName The value of geoZoneName as likeSearch. + * @param likeSearchOption Like search option. (NotNull) + */ + public void setGeoZoneName_LikeSearch(String geoZoneName, jp.sf.pal.pompei.allcommon.cbean.coption.LikeSearchOption likeSearchOption) { + registerLikeSearchQuery(ConditionKey.CK_LIKE_SEARCH, filterRemoveEmptyString(geoZoneName), getCValueGeoZoneName(), COL_GEO_ZONE_NAME, J_GeoZoneName, UJ_geoZoneName, likeSearchOption); + } + + /** + * Set the value of geoZoneName using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param geoZoneNameList The value of geoZoneName as inScope. + */ + public void setGeoZoneName_InScope(java.util.List geoZoneNameList) { + registerGeoZoneName(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyStringFromList(geoZoneNameList)); + } + + /** + * Set the value of geoZoneName using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param geoZoneName The value of geoZoneName as inScope. + */ + public void setGeoZoneName_InScope(String geoZoneName, jp.sf.pal.pompei.allcommon.cbean.coption.InScopeOption option) { + registerInScopeQuery(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyString(geoZoneName), getCValueGeoZoneName(), COL_GEO_ZONE_NAME, J_GeoZoneName, UJ_geoZoneName, option); + } + + /** + * Set the value of geoZoneName using notInScope. { not in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param geoZoneNameList The value of geoZoneName as notInScope. + */ + public void setGeoZoneName_NotInScope(java.util.List geoZoneNameList) { + registerGeoZoneName(ConditionKey.CK_NOT_IN_SCOPE, filterRemoveEmptyStringFromList(geoZoneNameList)); + } + + /** + * Register condition of geoZoneName. + * + * @param key Condition key. (NotNull) + * @param value The value of geoZoneName. (Nullable) + */ + protected void registerGeoZoneName(ConditionKey key, Object value) { + registerQuery(key, value, getCValueGeoZoneName(), COL_GEO_ZONE_NAME, J_GeoZoneName, UJ_geoZoneName); + } + + /** + * Register inline condition of geoZoneName. + * + * @param key Condition key. (NotNull) + * @param value The value of geoZoneName. (Nullable) + */ + protected void registerInlineGeoZoneName(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueGeoZoneName(), COL_GEO_ZONE_NAME, J_GeoZoneName, UJ_geoZoneName); + } + + abstract protected ConditionValue getCValueGeoZoneName(); + + /** Column db name of geoZoneDescription. */ + protected static final String COL_GEO_ZONE_DESCRIPTION = "GEO_ZONE_DESCRIPTION"; + + /** Column java name of geoZoneDescription. */ + protected static final String J_GeoZoneDescription = "GeoZoneDescription"; + + /** Column uncapitalised java name of geoZoneDescription. */ + protected static final String UJ_geoZoneDescription = "geoZoneDescription"; + + /** + * Set the value of geoZoneDescription using equal. { = } + * If the value is null or empty-string, this condition is ignored. + * + * @param geoZoneDescription The value of geoZoneDescription as equal. + */ + public void setGeoZoneDescription_Equal(String geoZoneDescription) { + registerGeoZoneDescription(ConditionKey.CK_EQUAL, filterRemoveEmptyString(geoZoneDescription)); + } + + /** + * Set the value of geoZoneDescription using notEqual. { != } + * If the value is null or empty-string, this condition is ignored. + * + * @param geoZoneDescription The value of geoZoneDescription as notEqual. + */ + public void setGeoZoneDescription_NotEqual(String geoZoneDescription) { + registerGeoZoneDescription(ConditionKey.CK_NOT_EQUAL, filterRemoveEmptyString(geoZoneDescription)); + } + + /** + * Set the value of geoZoneDescription using greaterThan. { > } + * If the value is null or empty-string, this condition is ignored. + * + * @param geoZoneDescription The value of geoZoneDescription as greaterThan. + */ + public void setGeoZoneDescription_GreaterThan(String geoZoneDescription) { + registerGeoZoneDescription(ConditionKey.CK_GREATER_THAN, filterRemoveEmptyString(geoZoneDescription)); + } + + /** + * Set the value of geoZoneDescription using lessThan. { < } + * If the value is null or empty-string, this condition is ignored. + * + * @param geoZoneDescription The value of geoZoneDescription as lessThan. + */ + public void setGeoZoneDescription_LessThan(String geoZoneDescription) { + registerGeoZoneDescription(ConditionKey.CK_LESS_THAN, filterRemoveEmptyString(geoZoneDescription)); + } + + /** + * Set the value of geoZoneDescription using greaterEqual. { >= } + * If the value is null or empty-string, this condition is ignored. + * + * @param geoZoneDescription The value of geoZoneDescription as greaterEqual. + */ + public void setGeoZoneDescription_GreaterEqual(String geoZoneDescription) { + registerGeoZoneDescription(ConditionKey.CK_GREATER_EQUAL, filterRemoveEmptyString(geoZoneDescription)); + } + + /** + * Set the value of geoZoneDescription using lessEqual. { <= } + * If the value is null or empty-string, this condition is ignored. + * + * @param geoZoneDescription The value of geoZoneDescription as lessEqual. + */ + public void setGeoZoneDescription_LessEqual(String geoZoneDescription) { + registerGeoZoneDescription(ConditionKey.CK_LESS_EQUAL, filterRemoveEmptyString(geoZoneDescription)); + } + + /** + * Set the value of geoZoneDescription using prefixSearch. { like 'xxx%' } + * If the value is null or empty-string, this condition is ignored. + * + * @param geoZoneDescription The value of geoZoneDescription as prefixSearch. + */ + public void setGeoZoneDescription_PrefixSearch(String geoZoneDescription) { + registerGeoZoneDescription(ConditionKey.CK_PREFIX_SEARCH, filterRemoveEmptyString(geoZoneDescription)); + } + + /** + * Set the value of geoZoneDescription using likeSearch. { like '%xxx%' } + * If the value is null or empty-string, this condition is ignored. + * You can invoke this method several times and the conditions are set up. + * + * @param geoZoneDescription The value of geoZoneDescription as likeSearch. + * @param likeSearchOption Like search option. (NotNull) + */ + public void setGeoZoneDescription_LikeSearch(String geoZoneDescription, jp.sf.pal.pompei.allcommon.cbean.coption.LikeSearchOption likeSearchOption) { + registerLikeSearchQuery(ConditionKey.CK_LIKE_SEARCH, filterRemoveEmptyString(geoZoneDescription), getCValueGeoZoneDescription(), COL_GEO_ZONE_DESCRIPTION, J_GeoZoneDescription, UJ_geoZoneDescription, likeSearchOption); + } + + /** + * Set the value of geoZoneDescription using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param geoZoneDescriptionList The value of geoZoneDescription as inScope. + */ + public void setGeoZoneDescription_InScope(java.util.List geoZoneDescriptionList) { + registerGeoZoneDescription(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyStringFromList(geoZoneDescriptionList)); + } + + /** + * Set the value of geoZoneDescription using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param geoZoneDescription The value of geoZoneDescription as inScope. + */ + public void setGeoZoneDescription_InScope(String geoZoneDescription, jp.sf.pal.pompei.allcommon.cbean.coption.InScopeOption option) { + registerInScopeQuery(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyString(geoZoneDescription), getCValueGeoZoneDescription(), COL_GEO_ZONE_DESCRIPTION, J_GeoZoneDescription, UJ_geoZoneDescription, option); + } + + /** + * Set the value of geoZoneDescription using notInScope. { not in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param geoZoneDescriptionList The value of geoZoneDescription as notInScope. + */ + public void setGeoZoneDescription_NotInScope(java.util.List geoZoneDescriptionList) { + registerGeoZoneDescription(ConditionKey.CK_NOT_IN_SCOPE, filterRemoveEmptyStringFromList(geoZoneDescriptionList)); + } + + /** + * Register condition of geoZoneDescription. + * + * @param key Condition key. (NotNull) + * @param value The value of geoZoneDescription. (Nullable) + */ + protected void registerGeoZoneDescription(ConditionKey key, Object value) { + registerQuery(key, value, getCValueGeoZoneDescription(), COL_GEO_ZONE_DESCRIPTION, J_GeoZoneDescription, UJ_geoZoneDescription); + } + + /** + * Register inline condition of geoZoneDescription. + * + * @param key Condition key. (NotNull) + * @param value The value of geoZoneDescription. (Nullable) + */ + protected void registerInlineGeoZoneDescription(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueGeoZoneDescription(), COL_GEO_ZONE_DESCRIPTION, J_GeoZoneDescription, UJ_geoZoneDescription); + } + + abstract protected ConditionValue getCValueGeoZoneDescription(); + + /** Column db name of lastModified. */ + protected static final String COL_LAST_MODIFIED = "LAST_MODIFIED"; + + /** Column java name of lastModified. */ + protected static final String J_LastModified = "LastModified"; + + /** Column uncapitalised java name of lastModified. */ + protected static final String UJ_lastModified = "lastModified"; + + /** + * Set the value of lastModified using equal. { = } + * + * @param lastModified The value of lastModified as equal. + */ + public void setLastModified_Equal(java.sql.Timestamp lastModified) { + registerLastModified(ConditionKey.CK_EQUAL, lastModified); + } + + /** + * Set the value of lastModified using notEqual. { != } + * + * @param lastModified The value of lastModified as notEqual. + */ + public void setLastModified_NotEqual(java.sql.Timestamp lastModified) { + registerLastModified(ConditionKey.CK_NOT_EQUAL, lastModified); + } + + /** + * Set the value of lastModified using greaterThan. { > } + * + * @param lastModified The value of lastModified as greaterThan. + */ + public void setLastModified_GreaterThan(java.sql.Timestamp lastModified) { + registerLastModified(ConditionKey.CK_GREATER_THAN, lastModified); + } + + /** + * Set the value of lastModified using lessThan. { < } + * + * @param lastModified The value of lastModified as lessThan. + */ + public void setLastModified_LessThan(java.sql.Timestamp lastModified) { + registerLastModified(ConditionKey.CK_LESS_THAN, lastModified); + } + + /** + * Set the value of lastModified using greaterEqual. { >= } + * + * @param lastModified The value of lastModified as greaterEqual. + */ + public void setLastModified_GreaterEqual(java.sql.Timestamp lastModified) { + registerLastModified(ConditionKey.CK_GREATER_EQUAL, lastModified); + } + + /** + * Set the value of lastModified using lessEqual. { <= } + * + * @param lastModified The value of lastModified as lessEqual. + */ + public void setLastModified_LessEqual(java.sql.Timestamp lastModified) { + registerLastModified(ConditionKey.CK_LESS_EQUAL, lastModified); + } + + /** + * Set the value of lastModified using from-to. { $fromDate <= COLUMN_NAME <= $toDate } + * + * @param lastModified The value of lastModified as from-to. + * @param fromToOption From-To option. (NotNull) + */ + public void setLastModified_FromTo(java.sql.Timestamp fromDate, java.sql.Timestamp toDate, jp.sf.pal.pompei.allcommon.cbean.coption.FromToOption fromToOption) { + registerFromToQuery(fromDate, toDate, getCValueLastModified(), COL_LAST_MODIFIED, J_LastModified, UJ_lastModified, fromToOption); + } + + /** + * Set the value of lastModified using isNull. { is null } + */ + public void setLastModified_IsNull() { + registerLastModified(ConditionKey.CK_IS_NULL, DUMMY_OBJECT); + } + + /** + * Set the value of lastModified using isNotNull. { is not null } + */ + public void setLastModified_IsNotNull() { + registerLastModified(ConditionKey.CK_IS_NOT_NULL, DUMMY_OBJECT); + } + + /** + * Register condition of lastModified. + * + * @param key Condition key. (NotNull) + * @param value The value of lastModified. (Nullable) + */ + protected void registerLastModified(ConditionKey key, Object value) { + registerQuery(key, value, getCValueLastModified(), COL_LAST_MODIFIED, J_LastModified, UJ_lastModified); + } + + /** + * Register inline condition of lastModified. + * + * @param key Condition key. (NotNull) + * @param value The value of lastModified. (Nullable) + */ + protected void registerInlineLastModified(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueLastModified(), COL_LAST_MODIFIED, J_LastModified, UJ_lastModified); + } + + abstract protected ConditionValue getCValueLastModified(); + + /** Column db name of dateAdded. */ + protected static final String COL_DATE_ADDED = "DATE_ADDED"; + + /** Column java name of dateAdded. */ + protected static final String J_DateAdded = "DateAdded"; + + /** Column uncapitalised java name of dateAdded. */ + protected static final String UJ_dateAdded = "dateAdded"; + + /** + * Set the value of dateAdded using equal. { = } + * + * @param dateAdded The value of dateAdded as equal. + */ + public void setDateAdded_Equal(java.sql.Timestamp dateAdded) { + registerDateAdded(ConditionKey.CK_EQUAL, dateAdded); + } + + /** + * Set the value of dateAdded using notEqual. { != } + * + * @param dateAdded The value of dateAdded as notEqual. + */ + public void setDateAdded_NotEqual(java.sql.Timestamp dateAdded) { + registerDateAdded(ConditionKey.CK_NOT_EQUAL, dateAdded); + } + + /** + * Set the value of dateAdded using greaterThan. { > } + * + * @param dateAdded The value of dateAdded as greaterThan. + */ + public void setDateAdded_GreaterThan(java.sql.Timestamp dateAdded) { + registerDateAdded(ConditionKey.CK_GREATER_THAN, dateAdded); + } + + /** + * Set the value of dateAdded using lessThan. { < } + * + * @param dateAdded The value of dateAdded as lessThan. + */ + public void setDateAdded_LessThan(java.sql.Timestamp dateAdded) { + registerDateAdded(ConditionKey.CK_LESS_THAN, dateAdded); + } + + /** + * Set the value of dateAdded using greaterEqual. { >= } + * + * @param dateAdded The value of dateAdded as greaterEqual. + */ + public void setDateAdded_GreaterEqual(java.sql.Timestamp dateAdded) { + registerDateAdded(ConditionKey.CK_GREATER_EQUAL, dateAdded); + } + + /** + * Set the value of dateAdded using lessEqual. { <= } + * + * @param dateAdded The value of dateAdded as lessEqual. + */ + public void setDateAdded_LessEqual(java.sql.Timestamp dateAdded) { + registerDateAdded(ConditionKey.CK_LESS_EQUAL, dateAdded); + } + + /** + * Set the value of dateAdded using from-to. { $fromDate <= COLUMN_NAME <= $toDate } + * + * @param dateAdded The value of dateAdded as from-to. + * @param fromToOption From-To option. (NotNull) + */ + public void setDateAdded_FromTo(java.sql.Timestamp fromDate, java.sql.Timestamp toDate, jp.sf.pal.pompei.allcommon.cbean.coption.FromToOption fromToOption) { + registerFromToQuery(fromDate, toDate, getCValueDateAdded(), COL_DATE_ADDED, J_DateAdded, UJ_dateAdded, fromToOption); + } + + /** + * Register condition of dateAdded. + * + * @param key Condition key. (NotNull) + * @param value The value of dateAdded. (Nullable) + */ + protected void registerDateAdded(ConditionKey key, Object value) { + registerQuery(key, value, getCValueDateAdded(), COL_DATE_ADDED, J_DateAdded, UJ_dateAdded); + } + + /** + * Register inline condition of dateAdded. + * + * @param key Condition key. (NotNull) + * @param value The value of dateAdded. (Nullable) + */ + protected void registerInlineDateAdded(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueDateAdded(), COL_DATE_ADDED, J_DateAdded, UJ_dateAdded); + } + + abstract protected ConditionValue getCValueDateAdded(); + + // =================================================================================== + // Basic Override + // ============== + /** + * This method overrides the method that is declared at super. + * + * @return Clause string. (NotNull) + */ + public String toString() { + return getSqlClause().getClause(); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/AbstractBsLanguagesCQ.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/AbstractBsLanguagesCQ.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/AbstractBsLanguagesCQ.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,890 @@ + +package jp.sf.pal.pompei.cbean.cq.bs; + + + +import jp.sf.pal.pompei.allcommon.cbean.*; +import jp.sf.pal.pompei.allcommon.cbean.ckey.*; +import jp.sf.pal.pompei.allcommon.cbean.cvalue.ConditionValue; +import jp.sf.pal.pompei.allcommon.cbean.sqlclause.SqlClause; +import jp.sf.pal.pompei.cbean.cq.*; + +/** + * The condition-query of LANGUAGES. + * + * @author DBFlute(AutoGenerator) + */ +public abstract class AbstractBsLanguagesCQ extends AbstractConditionQuery { + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param childQuery Child query as abstract class. (Nullable: If null, this is base instance.) + * @param sqlClause SQL clause instance. (NotNull) + * @param aliasName My alias name. (NotNull) + * @param nestLevel Nest level. + */ + public AbstractBsLanguagesCQ(ConditionQuery childQuery, SqlClause sqlClause, String aliasName, int nestLevel) { + super(childQuery, sqlClause, aliasName, nestLevel); + } + + // =================================================================================== + // Table Name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + final public String getTableDbName() { + return "LANGUAGES"; + } + + // =================================================================================== + // Query + // ===== + + // /* * * * * * * * * * * * * * * * * * * * * * * + // MyTable = [LANGUAGES] + // * * * * * * * * */ + + + /** Column db name of languagesId. */ + protected static final String COL_LANGUAGES_ID = "LANGUAGES_ID"; + + /** Column java name of languagesId. */ + protected static final String J_LanguagesId = "LanguagesId"; + + /** Column uncapitalised java name of languagesId. */ + protected static final String UJ_languagesId = "languagesId"; + + /** + * Set the value of languagesId using equal. { = } + * + * @param languagesId The value of languagesId as equal. + */ + public void setLanguagesId_Equal(java.math.BigDecimal languagesId) { + registerLanguagesId(ConditionKey.CK_EQUAL, languagesId); + } + + /** + * Set the value of languagesId using notEqual. { != } + * + * @param languagesId The value of languagesId as notEqual. + */ + public void setLanguagesId_NotEqual(java.math.BigDecimal languagesId) { + registerLanguagesId(ConditionKey.CK_NOT_EQUAL, languagesId); + } + + /** + * Set the value of languagesId using greaterThan. { > } + * + * @param languagesId The value of languagesId as greaterThan. + */ + public void setLanguagesId_GreaterThan(java.math.BigDecimal languagesId) { + registerLanguagesId(ConditionKey.CK_GREATER_THAN, languagesId); + } + + /** + * Set the value of languagesId using lessThan. { < } + * + * @param languagesId The value of languagesId as lessThan. + */ + public void setLanguagesId_LessThan(java.math.BigDecimal languagesId) { + registerLanguagesId(ConditionKey.CK_LESS_THAN, languagesId); + } + + /** + * Set the value of languagesId using greaterEqual. { >= } + * + * @param languagesId The value of languagesId as greaterEqual. + */ + public void setLanguagesId_GreaterEqual(java.math.BigDecimal languagesId) { + registerLanguagesId(ConditionKey.CK_GREATER_EQUAL, languagesId); + } + + /** + * Set the value of languagesId using lessEqual. { <= } + * + * @param languagesId The value of languagesId as lessEqual. + */ + public void setLanguagesId_LessEqual(java.math.BigDecimal languagesId) { + registerLanguagesId(ConditionKey.CK_LESS_EQUAL, languagesId); + } + + /** + * Set the value of languagesId using inScope. { in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param languagesIdList The value of languagesId as inScope. + */ + public void setLanguagesId_InScope(java.util.List languagesIdList) { + registerLanguagesId(ConditionKey.CK_IN_SCOPE, languagesIdList); + } + + /** + * Set the value of languagesId using notInScope. { not in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param languagesIdList The value of languagesId as notInScope. + */ + public void setLanguagesId_NotInScope(java.util.List languagesIdList) { + registerLanguagesId(ConditionKey.CK_NOT_IN_SCOPE, languagesIdList); + } + + /** + * Register condition of languagesId. + * + * @param key Condition key. (NotNull) + * @param value The value of languagesId. (Nullable) + */ + protected void registerLanguagesId(ConditionKey key, Object value) { + registerQuery(key, value, getCValueLanguagesId(), COL_LANGUAGES_ID, J_LanguagesId, UJ_languagesId); + } + + /** + * Register inline condition of languagesId. + * + * @param key Condition key. (NotNull) + * @param value The value of languagesId. (Nullable) + */ + protected void registerInlineLanguagesId(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueLanguagesId(), COL_LANGUAGES_ID, J_LanguagesId, UJ_languagesId); + } + + abstract protected ConditionValue getCValueLanguagesId(); + + /** Column db name of name. */ + protected static final String COL_NAME = "NAME"; + + /** Column java name of name. */ + protected static final String J_Name = "Name"; + + /** Column uncapitalised java name of name. */ + protected static final String UJ_name = "name"; + + /** + * Set the value of name using equal. { = } + * If the value is null or empty-string, this condition is ignored. + * + * @param name The value of name as equal. + */ + public void setName_Equal(String name) { + registerName(ConditionKey.CK_EQUAL, filterRemoveEmptyString(name)); + } + + /** + * Set the value of name using notEqual. { != } + * If the value is null or empty-string, this condition is ignored. + * + * @param name The value of name as notEqual. + */ + public void setName_NotEqual(String name) { + registerName(ConditionKey.CK_NOT_EQUAL, filterRemoveEmptyString(name)); + } + + /** + * Set the value of name using greaterThan. { > } + * If the value is null or empty-string, this condition is ignored. + * + * @param name The value of name as greaterThan. + */ + public void setName_GreaterThan(String name) { + registerName(ConditionKey.CK_GREATER_THAN, filterRemoveEmptyString(name)); + } + + /** + * Set the value of name using lessThan. { < } + * If the value is null or empty-string, this condition is ignored. + * + * @param name The value of name as lessThan. + */ + public void setName_LessThan(String name) { + registerName(ConditionKey.CK_LESS_THAN, filterRemoveEmptyString(name)); + } + + /** + * Set the value of name using greaterEqual. { >= } + * If the value is null or empty-string, this condition is ignored. + * + * @param name The value of name as greaterEqual. + */ + public void setName_GreaterEqual(String name) { + registerName(ConditionKey.CK_GREATER_EQUAL, filterRemoveEmptyString(name)); + } + + /** + * Set the value of name using lessEqual. { <= } + * If the value is null or empty-string, this condition is ignored. + * + * @param name The value of name as lessEqual. + */ + public void setName_LessEqual(String name) { + registerName(ConditionKey.CK_LESS_EQUAL, filterRemoveEmptyString(name)); + } + + /** + * Set the value of name using prefixSearch. { like 'xxx%' } + * If the value is null or empty-string, this condition is ignored. + * + * @param name The value of name as prefixSearch. + */ + public void setName_PrefixSearch(String name) { + registerName(ConditionKey.CK_PREFIX_SEARCH, filterRemoveEmptyString(name)); + } + + /** + * Set the value of name using likeSearch. { like '%xxx%' } + * If the value is null or empty-string, this condition is ignored. + * You can invoke this method several times and the conditions are set up. + * + * @param name The value of name as likeSearch. + * @param likeSearchOption Like search option. (NotNull) + */ + public void setName_LikeSearch(String name, jp.sf.pal.pompei.allcommon.cbean.coption.LikeSearchOption likeSearchOption) { + registerLikeSearchQuery(ConditionKey.CK_LIKE_SEARCH, filterRemoveEmptyString(name), getCValueName(), COL_NAME, J_Name, UJ_name, likeSearchOption); + } + + /** + * Set the value of name using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param nameList The value of name as inScope. + */ + public void setName_InScope(java.util.List nameList) { + registerName(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyStringFromList(nameList)); + } + + /** + * Set the value of name using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param name The value of name as inScope. + */ + public void setName_InScope(String name, jp.sf.pal.pompei.allcommon.cbean.coption.InScopeOption option) { + registerInScopeQuery(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyString(name), getCValueName(), COL_NAME, J_Name, UJ_name, option); + } + + /** + * Set the value of name using notInScope. { not in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param nameList The value of name as notInScope. + */ + public void setName_NotInScope(java.util.List nameList) { + registerName(ConditionKey.CK_NOT_IN_SCOPE, filterRemoveEmptyStringFromList(nameList)); + } + + /** + * Register condition of name. + * + * @param key Condition key. (NotNull) + * @param value The value of name. (Nullable) + */ + protected void registerName(ConditionKey key, Object value) { + registerQuery(key, value, getCValueName(), COL_NAME, J_Name, UJ_name); + } + + /** + * Register inline condition of name. + * + * @param key Condition key. (NotNull) + * @param value The value of name. (Nullable) + */ + protected void registerInlineName(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueName(), COL_NAME, J_Name, UJ_name); + } + + abstract protected ConditionValue getCValueName(); + + /** Column db name of code. */ + protected static final String COL_CODE = "CODE"; + + /** Column java name of code. */ + protected static final String J_Code = "Code"; + + /** Column uncapitalised java name of code. */ + protected static final String UJ_code = "code"; + + /** + * Set the value of code using equal. { = } + * If the value is null or empty-string, this condition is ignored. + * + * @param code The value of code as equal. + */ + public void setCode_Equal(String code) { + registerCode(ConditionKey.CK_EQUAL, filterRemoveEmptyString(code)); + } + + /** + * Set the value of code using notEqual. { != } + * If the value is null or empty-string, this condition is ignored. + * + * @param code The value of code as notEqual. + */ + public void setCode_NotEqual(String code) { + registerCode(ConditionKey.CK_NOT_EQUAL, filterRemoveEmptyString(code)); + } + + /** + * Set the value of code using greaterThan. { > } + * If the value is null or empty-string, this condition is ignored. + * + * @param code The value of code as greaterThan. + */ + public void setCode_GreaterThan(String code) { + registerCode(ConditionKey.CK_GREATER_THAN, filterRemoveEmptyString(code)); + } + + /** + * Set the value of code using lessThan. { < } + * If the value is null or empty-string, this condition is ignored. + * + * @param code The value of code as lessThan. + */ + public void setCode_LessThan(String code) { + registerCode(ConditionKey.CK_LESS_THAN, filterRemoveEmptyString(code)); + } + + /** + * Set the value of code using greaterEqual. { >= } + * If the value is null or empty-string, this condition is ignored. + * + * @param code The value of code as greaterEqual. + */ + public void setCode_GreaterEqual(String code) { + registerCode(ConditionKey.CK_GREATER_EQUAL, filterRemoveEmptyString(code)); + } + + /** + * Set the value of code using lessEqual. { <= } + * If the value is null or empty-string, this condition is ignored. + * + * @param code The value of code as lessEqual. + */ + public void setCode_LessEqual(String code) { + registerCode(ConditionKey.CK_LESS_EQUAL, filterRemoveEmptyString(code)); + } + + /** + * Set the value of code using prefixSearch. { like 'xxx%' } + * If the value is null or empty-string, this condition is ignored. + * + * @param code The value of code as prefixSearch. + */ + public void setCode_PrefixSearch(String code) { + registerCode(ConditionKey.CK_PREFIX_SEARCH, filterRemoveEmptyString(code)); + } + + /** + * Set the value of code using likeSearch. { like '%xxx%' } + * If the value is null or empty-string, this condition is ignored. + * You can invoke this method several times and the conditions are set up. + * + * @param code The value of code as likeSearch. + * @param likeSearchOption Like search option. (NotNull) + */ + public void setCode_LikeSearch(String code, jp.sf.pal.pompei.allcommon.cbean.coption.LikeSearchOption likeSearchOption) { + registerLikeSearchQuery(ConditionKey.CK_LIKE_SEARCH, filterRemoveEmptyString(code), getCValueCode(), COL_CODE, J_Code, UJ_code, likeSearchOption); + } + + /** + * Set the value of code using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param codeList The value of code as inScope. + */ + public void setCode_InScope(java.util.List codeList) { + registerCode(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyStringFromList(codeList)); + } + + /** + * Set the value of code using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param code The value of code as inScope. + */ + public void setCode_InScope(String code, jp.sf.pal.pompei.allcommon.cbean.coption.InScopeOption option) { + registerInScopeQuery(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyString(code), getCValueCode(), COL_CODE, J_Code, UJ_code, option); + } + + /** + * Set the value of code using notInScope. { not in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param codeList The value of code as notInScope. + */ + public void setCode_NotInScope(java.util.List codeList) { + registerCode(ConditionKey.CK_NOT_IN_SCOPE, filterRemoveEmptyStringFromList(codeList)); + } + + /** + * Register condition of code. + * + * @param key Condition key. (NotNull) + * @param value The value of code. (Nullable) + */ + protected void registerCode(ConditionKey key, Object value) { + registerQuery(key, value, getCValueCode(), COL_CODE, J_Code, UJ_code); + } + + /** + * Register inline condition of code. + * + * @param key Condition key. (NotNull) + * @param value The value of code. (Nullable) + */ + protected void registerInlineCode(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueCode(), COL_CODE, J_Code, UJ_code); + } + + abstract protected ConditionValue getCValueCode(); + + /** Column db name of image. */ + protected static final String COL_IMAGE = "IMAGE"; + + /** Column java name of image. */ + protected static final String J_Image = "Image"; + + /** Column uncapitalised java name of image. */ + protected static final String UJ_image = "image"; + + /** + * Set the value of image using equal. { = } + * If the value is null or empty-string, this condition is ignored. + * + * @param image The value of image as equal. + */ + public void setImage_Equal(String image) { + registerImage(ConditionKey.CK_EQUAL, filterRemoveEmptyString(image)); + } + + /** + * Set the value of image using notEqual. { != } + * If the value is null or empty-string, this condition is ignored. + * + * @param image The value of image as notEqual. + */ + public void setImage_NotEqual(String image) { + registerImage(ConditionKey.CK_NOT_EQUAL, filterRemoveEmptyString(image)); + } + + /** + * Set the value of image using greaterThan. { > } + * If the value is null or empty-string, this condition is ignored. + * + * @param image The value of image as greaterThan. + */ + public void setImage_GreaterThan(String image) { + registerImage(ConditionKey.CK_GREATER_THAN, filterRemoveEmptyString(image)); + } + + /** + * Set the value of image using lessThan. { < } + * If the value is null or empty-string, this condition is ignored. + * + * @param image The value of image as lessThan. + */ + public void setImage_LessThan(String image) { + registerImage(ConditionKey.CK_LESS_THAN, filterRemoveEmptyString(image)); + } + + /** + * Set the value of image using greaterEqual. { >= } + * If the value is null or empty-string, this condition is ignored. + * + * @param image The value of image as greaterEqual. + */ + public void setImage_GreaterEqual(String image) { + registerImage(ConditionKey.CK_GREATER_EQUAL, filterRemoveEmptyString(image)); + } + + /** + * Set the value of image using lessEqual. { <= } + * If the value is null or empty-string, this condition is ignored. + * + * @param image The value of image as lessEqual. + */ + public void setImage_LessEqual(String image) { + registerImage(ConditionKey.CK_LESS_EQUAL, filterRemoveEmptyString(image)); + } + + /** + * Set the value of image using prefixSearch. { like 'xxx%' } + * If the value is null or empty-string, this condition is ignored. + * + * @param image The value of image as prefixSearch. + */ + public void setImage_PrefixSearch(String image) { + registerImage(ConditionKey.CK_PREFIX_SEARCH, filterRemoveEmptyString(image)); + } + + /** + * Set the value of image using likeSearch. { like '%xxx%' } + * If the value is null or empty-string, this condition is ignored. + * You can invoke this method several times and the conditions are set up. + * + * @param image The value of image as likeSearch. + * @param likeSearchOption Like search option. (NotNull) + */ + public void setImage_LikeSearch(String image, jp.sf.pal.pompei.allcommon.cbean.coption.LikeSearchOption likeSearchOption) { + registerLikeSearchQuery(ConditionKey.CK_LIKE_SEARCH, filterRemoveEmptyString(image), getCValueImage(), COL_IMAGE, J_Image, UJ_image, likeSearchOption); + } + + /** + * Set the value of image using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param imageList The value of image as inScope. + */ + public void setImage_InScope(java.util.List imageList) { + registerImage(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyStringFromList(imageList)); + } + + /** + * Set the value of image using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param image The value of image as inScope. + */ + public void setImage_InScope(String image, jp.sf.pal.pompei.allcommon.cbean.coption.InScopeOption option) { + registerInScopeQuery(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyString(image), getCValueImage(), COL_IMAGE, J_Image, UJ_image, option); + } + + /** + * Set the value of image using notInScope. { not in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param imageList The value of image as notInScope. + */ + public void setImage_NotInScope(java.util.List imageList) { + registerImage(ConditionKey.CK_NOT_IN_SCOPE, filterRemoveEmptyStringFromList(imageList)); + } + + /** + * Set the value of image using isNull. { is null } + */ + public void setImage_IsNull() { + registerImage(ConditionKey.CK_IS_NULL, DUMMY_OBJECT); + } + + /** + * Set the value of image using isNotNull. { is not null } + */ + public void setImage_IsNotNull() { + registerImage(ConditionKey.CK_IS_NOT_NULL, DUMMY_OBJECT); + } + + /** + * Register condition of image. + * + * @param key Condition key. (NotNull) + * @param value The value of image. (Nullable) + */ + protected void registerImage(ConditionKey key, Object value) { + registerQuery(key, value, getCValueImage(), COL_IMAGE, J_Image, UJ_image); + } + + /** + * Register inline condition of image. + * + * @param key Condition key. (NotNull) + * @param value The value of image. (Nullable) + */ + protected void registerInlineImage(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueImage(), COL_IMAGE, J_Image, UJ_image); + } + + abstract protected ConditionValue getCValueImage(); + + /** Column db name of directory. */ + protected static final String COL_DIRECTORY = "DIRECTORY"; + + /** Column java name of directory. */ + protected static final String J_Directory = "Directory"; + + /** Column uncapitalised java name of directory. */ + protected static final String UJ_directory = "directory"; + + /** + * Set the value of directory using equal. { = } + * If the value is null or empty-string, this condition is ignored. + * + * @param directory The value of directory as equal. + */ + public void setDirectory_Equal(String directory) { + registerDirectory(ConditionKey.CK_EQUAL, filterRemoveEmptyString(directory)); + } + + /** + * Set the value of directory using notEqual. { != } + * If the value is null or empty-string, this condition is ignored. + * + * @param directory The value of directory as notEqual. + */ + public void setDirectory_NotEqual(String directory) { + registerDirectory(ConditionKey.CK_NOT_EQUAL, filterRemoveEmptyString(directory)); + } + + /** + * Set the value of directory using greaterThan. { > } + * If the value is null or empty-string, this condition is ignored. + * + * @param directory The value of directory as greaterThan. + */ + public void setDirectory_GreaterThan(String directory) { + registerDirectory(ConditionKey.CK_GREATER_THAN, filterRemoveEmptyString(directory)); + } + + /** + * Set the value of directory using lessThan. { < } + * If the value is null or empty-string, this condition is ignored. + * + * @param directory The value of directory as lessThan. + */ + public void setDirectory_LessThan(String directory) { + registerDirectory(ConditionKey.CK_LESS_THAN, filterRemoveEmptyString(directory)); + } + + /** + * Set the value of directory using greaterEqual. { >= } + * If the value is null or empty-string, this condition is ignored. + * + * @param directory The value of directory as greaterEqual. + */ + public void setDirectory_GreaterEqual(String directory) { + registerDirectory(ConditionKey.CK_GREATER_EQUAL, filterRemoveEmptyString(directory)); + } + + /** + * Set the value of directory using lessEqual. { <= } + * If the value is null or empty-string, this condition is ignored. + * + * @param directory The value of directory as lessEqual. + */ + public void setDirectory_LessEqual(String directory) { + registerDirectory(ConditionKey.CK_LESS_EQUAL, filterRemoveEmptyString(directory)); + } + + /** + * Set the value of directory using prefixSearch. { like 'xxx%' } + * If the value is null or empty-string, this condition is ignored. + * + * @param directory The value of directory as prefixSearch. + */ + public void setDirectory_PrefixSearch(String directory) { + registerDirectory(ConditionKey.CK_PREFIX_SEARCH, filterRemoveEmptyString(directory)); + } + + /** + * Set the value of directory using likeSearch. { like '%xxx%' } + * If the value is null or empty-string, this condition is ignored. + * You can invoke this method several times and the conditions are set up. + * + * @param directory The value of directory as likeSearch. + * @param likeSearchOption Like search option. (NotNull) + */ + public void setDirectory_LikeSearch(String directory, jp.sf.pal.pompei.allcommon.cbean.coption.LikeSearchOption likeSearchOption) { + registerLikeSearchQuery(ConditionKey.CK_LIKE_SEARCH, filterRemoveEmptyString(directory), getCValueDirectory(), COL_DIRECTORY, J_Directory, UJ_directory, likeSearchOption); + } + + /** + * Set the value of directory using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param directoryList The value of directory as inScope. + */ + public void setDirectory_InScope(java.util.List directoryList) { + registerDirectory(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyStringFromList(directoryList)); + } + + /** + * Set the value of directory using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param directory The value of directory as inScope. + */ + public void setDirectory_InScope(String directory, jp.sf.pal.pompei.allcommon.cbean.coption.InScopeOption option) { + registerInScopeQuery(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyString(directory), getCValueDirectory(), COL_DIRECTORY, J_Directory, UJ_directory, option); + } + + /** + * Set the value of directory using notInScope. { not in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param directoryList The value of directory as notInScope. + */ + public void setDirectory_NotInScope(java.util.List directoryList) { + registerDirectory(ConditionKey.CK_NOT_IN_SCOPE, filterRemoveEmptyStringFromList(directoryList)); + } + + /** + * Set the value of directory using isNull. { is null } + */ + public void setDirectory_IsNull() { + registerDirectory(ConditionKey.CK_IS_NULL, DUMMY_OBJECT); + } + + /** + * Set the value of directory using isNotNull. { is not null } + */ + public void setDirectory_IsNotNull() { + registerDirectory(ConditionKey.CK_IS_NOT_NULL, DUMMY_OBJECT); + } + + /** + * Register condition of directory. + * + * @param key Condition key. (NotNull) + * @param value The value of directory. (Nullable) + */ + protected void registerDirectory(ConditionKey key, Object value) { + registerQuery(key, value, getCValueDirectory(), COL_DIRECTORY, J_Directory, UJ_directory); + } + + /** + * Register inline condition of directory. + * + * @param key Condition key. (NotNull) + * @param value The value of directory. (Nullable) + */ + protected void registerInlineDirectory(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueDirectory(), COL_DIRECTORY, J_Directory, UJ_directory); + } + + abstract protected ConditionValue getCValueDirectory(); + + /** Column db name of sortOrder. */ + protected static final String COL_SORT_ORDER = "SORT_ORDER"; + + /** Column java name of sortOrder. */ + protected static final String J_SortOrder = "SortOrder"; + + /** Column uncapitalised java name of sortOrder. */ + protected static final String UJ_sortOrder = "sortOrder"; + + /** + * Set the value of sortOrder using equal. { = } + * + * @param sortOrder The value of sortOrder as equal. + */ + public void setSortOrder_Equal(java.math.BigDecimal sortOrder) { + registerSortOrder(ConditionKey.CK_EQUAL, sortOrder); + } + + /** + * Set the value of sortOrder using notEqual. { != } + * + * @param sortOrder The value of sortOrder as notEqual. + */ + public void setSortOrder_NotEqual(java.math.BigDecimal sortOrder) { + registerSortOrder(ConditionKey.CK_NOT_EQUAL, sortOrder); + } + + /** + * Set the value of sortOrder using greaterThan. { > } + * + * @param sortOrder The value of sortOrder as greaterThan. + */ + public void setSortOrder_GreaterThan(java.math.BigDecimal sortOrder) { + registerSortOrder(ConditionKey.CK_GREATER_THAN, sortOrder); + } + + /** + * Set the value of sortOrder using lessThan. { < } + * + * @param sortOrder The value of sortOrder as lessThan. + */ + public void setSortOrder_LessThan(java.math.BigDecimal sortOrder) { + registerSortOrder(ConditionKey.CK_LESS_THAN, sortOrder); + } + + /** + * Set the value of sortOrder using greaterEqual. { >= } + * + * @param sortOrder The value of sortOrder as greaterEqual. + */ + public void setSortOrder_GreaterEqual(java.math.BigDecimal sortOrder) { + registerSortOrder(ConditionKey.CK_GREATER_EQUAL, sortOrder); + } + + /** + * Set the value of sortOrder using lessEqual. { <= } + * + * @param sortOrder The value of sortOrder as lessEqual. + */ + public void setSortOrder_LessEqual(java.math.BigDecimal sortOrder) { + registerSortOrder(ConditionKey.CK_LESS_EQUAL, sortOrder); + } + + /** + * Set the value of sortOrder using inScope. { in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param sortOrderList The value of sortOrder as inScope. + */ + public void setSortOrder_InScope(java.util.List sortOrderList) { + registerSortOrder(ConditionKey.CK_IN_SCOPE, sortOrderList); + } + + /** + * Set the value of sortOrder using notInScope. { not in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param sortOrderList The value of sortOrder as notInScope. + */ + public void setSortOrder_NotInScope(java.util.List sortOrderList) { + registerSortOrder(ConditionKey.CK_NOT_IN_SCOPE, sortOrderList); + } + + /** + * Set the value of sortOrder using isNull. { is null } + */ + public void setSortOrder_IsNull() { + registerSortOrder(ConditionKey.CK_IS_NULL, DUMMY_OBJECT); + } + + /** + * Set the value of sortOrder using isNotNull. { is not null } + */ + public void setSortOrder_IsNotNull() { + registerSortOrder(ConditionKey.CK_IS_NOT_NULL, DUMMY_OBJECT); + } + + /** + * Register condition of sortOrder. + * + * @param key Condition key. (NotNull) + * @param value The value of sortOrder. (Nullable) + */ + protected void registerSortOrder(ConditionKey key, Object value) { + registerQuery(key, value, getCValueSortOrder(), COL_SORT_ORDER, J_SortOrder, UJ_sortOrder); + } + + /** + * Register inline condition of sortOrder. + * + * @param key Condition key. (NotNull) + * @param value The value of sortOrder. (Nullable) + */ + protected void registerInlineSortOrder(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueSortOrder(), COL_SORT_ORDER, J_SortOrder, UJ_sortOrder); + } + + abstract protected ConditionValue getCValueSortOrder(); + + // =================================================================================== + // Basic Override + // ============== + /** + * This method overrides the method that is declared at super. + * + * @return Clause string. (NotNull) + */ + public String toString() { + return getSqlClause().getClause(); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/AbstractBsManufacturersCQ.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/AbstractBsManufacturersCQ.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/AbstractBsManufacturersCQ.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,689 @@ + +package jp.sf.pal.pompei.cbean.cq.bs; + + + +import jp.sf.pal.pompei.allcommon.cbean.*; +import jp.sf.pal.pompei.allcommon.cbean.ckey.*; +import jp.sf.pal.pompei.allcommon.cbean.cvalue.ConditionValue; +import jp.sf.pal.pompei.allcommon.cbean.sqlclause.SqlClause; +import jp.sf.pal.pompei.cbean.cq.*; + +/** + * The condition-query of MANUFACTURERS. + * + * @author DBFlute(AutoGenerator) + */ +public abstract class AbstractBsManufacturersCQ extends AbstractConditionQuery { + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param childQuery Child query as abstract class. (Nullable: If null, this is base instance.) + * @param sqlClause SQL clause instance. (NotNull) + * @param aliasName My alias name. (NotNull) + * @param nestLevel Nest level. + */ + public AbstractBsManufacturersCQ(ConditionQuery childQuery, SqlClause sqlClause, String aliasName, int nestLevel) { + super(childQuery, sqlClause, aliasName, nestLevel); + } + + // =================================================================================== + // Table Name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + final public String getTableDbName() { + return "MANUFACTURERS"; + } + + // =================================================================================== + // Query + // ===== + + // /* * * * * * * * * * * * * * * * * * * * * * * + // MyTable = [MANUFACTURERS] + // * * * * * * * * */ + + + /** Column db name of manufacturersId. */ + protected static final String COL_MANUFACTURERS_ID = "MANUFACTURERS_ID"; + + /** Column java name of manufacturersId. */ + protected static final String J_ManufacturersId = "ManufacturersId"; + + /** Column uncapitalised java name of manufacturersId. */ + protected static final String UJ_manufacturersId = "manufacturersId"; + + /** + * Set the value of manufacturersId using equal. { = } + * + * @param manufacturersId The value of manufacturersId as equal. + */ + public void setManufacturersId_Equal(java.math.BigDecimal manufacturersId) { + registerManufacturersId(ConditionKey.CK_EQUAL, manufacturersId); + } + + /** + * Set the value of manufacturersId using notEqual. { != } + * + * @param manufacturersId The value of manufacturersId as notEqual. + */ + public void setManufacturersId_NotEqual(java.math.BigDecimal manufacturersId) { + registerManufacturersId(ConditionKey.CK_NOT_EQUAL, manufacturersId); + } + + /** + * Set the value of manufacturersId using greaterThan. { > } + * + * @param manufacturersId The value of manufacturersId as greaterThan. + */ + public void setManufacturersId_GreaterThan(java.math.BigDecimal manufacturersId) { + registerManufacturersId(ConditionKey.CK_GREATER_THAN, manufacturersId); + } + + /** + * Set the value of manufacturersId using lessThan. { < } + * + * @param manufacturersId The value of manufacturersId as lessThan. + */ + public void setManufacturersId_LessThan(java.math.BigDecimal manufacturersId) { + registerManufacturersId(ConditionKey.CK_LESS_THAN, manufacturersId); + } + + /** + * Set the value of manufacturersId using greaterEqual. { >= } + * + * @param manufacturersId The value of manufacturersId as greaterEqual. + */ + public void setManufacturersId_GreaterEqual(java.math.BigDecimal manufacturersId) { + registerManufacturersId(ConditionKey.CK_GREATER_EQUAL, manufacturersId); + } + + /** + * Set the value of manufacturersId using lessEqual. { <= } + * + * @param manufacturersId The value of manufacturersId as lessEqual. + */ + public void setManufacturersId_LessEqual(java.math.BigDecimal manufacturersId) { + registerManufacturersId(ConditionKey.CK_LESS_EQUAL, manufacturersId); + } + + /** + * Set the value of manufacturersId using inScope. { in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param manufacturersIdList The value of manufacturersId as inScope. + */ + public void setManufacturersId_InScope(java.util.List manufacturersIdList) { + registerManufacturersId(ConditionKey.CK_IN_SCOPE, manufacturersIdList); + } + + /** + * Set the value of manufacturersId using notInScope. { not in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param manufacturersIdList The value of manufacturersId as notInScope. + */ + public void setManufacturersId_NotInScope(java.util.List manufacturersIdList) { + registerManufacturersId(ConditionKey.CK_NOT_IN_SCOPE, manufacturersIdList); + } + + /** + * Register condition of manufacturersId. + * + * @param key Condition key. (NotNull) + * @param value The value of manufacturersId. (Nullable) + */ + protected void registerManufacturersId(ConditionKey key, Object value) { + registerQuery(key, value, getCValueManufacturersId(), COL_MANUFACTURERS_ID, J_ManufacturersId, UJ_manufacturersId); + } + + /** + * Register inline condition of manufacturersId. + * + * @param key Condition key. (NotNull) + * @param value The value of manufacturersId. (Nullable) + */ + protected void registerInlineManufacturersId(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueManufacturersId(), COL_MANUFACTURERS_ID, J_ManufacturersId, UJ_manufacturersId); + } + + abstract protected ConditionValue getCValueManufacturersId(); + + /** Column db name of manufacturersName. */ + protected static final String COL_MANUFACTURERS_NAME = "MANUFACTURERS_NAME"; + + /** Column java name of manufacturersName. */ + protected static final String J_ManufacturersName = "ManufacturersName"; + + /** Column uncapitalised java name of manufacturersName. */ + protected static final String UJ_manufacturersName = "manufacturersName"; + + /** + * Set the value of manufacturersName using equal. { = } + * If the value is null or empty-string, this condition is ignored. + * + * @param manufacturersName The value of manufacturersName as equal. + */ + public void setManufacturersName_Equal(String manufacturersName) { + registerManufacturersName(ConditionKey.CK_EQUAL, filterRemoveEmptyString(manufacturersName)); + } + + /** + * Set the value of manufacturersName using notEqual. { != } + * If the value is null or empty-string, this condition is ignored. + * + * @param manufacturersName The value of manufacturersName as notEqual. + */ + public void setManufacturersName_NotEqual(String manufacturersName) { + registerManufacturersName(ConditionKey.CK_NOT_EQUAL, filterRemoveEmptyString(manufacturersName)); + } + + /** + * Set the value of manufacturersName using greaterThan. { > } + * If the value is null or empty-string, this condition is ignored. + * + * @param manufacturersName The value of manufacturersName as greaterThan. + */ + public void setManufacturersName_GreaterThan(String manufacturersName) { + registerManufacturersName(ConditionKey.CK_GREATER_THAN, filterRemoveEmptyString(manufacturersName)); + } + + /** + * Set the value of manufacturersName using lessThan. { < } + * If the value is null or empty-string, this condition is ignored. + * + * @param manufacturersName The value of manufacturersName as lessThan. + */ + public void setManufacturersName_LessThan(String manufacturersName) { + registerManufacturersName(ConditionKey.CK_LESS_THAN, filterRemoveEmptyString(manufacturersName)); + } + + /** + * Set the value of manufacturersName using greaterEqual. { >= } + * If the value is null or empty-string, this condition is ignored. + * + * @param manufacturersName The value of manufacturersName as greaterEqual. + */ + public void setManufacturersName_GreaterEqual(String manufacturersName) { + registerManufacturersName(ConditionKey.CK_GREATER_EQUAL, filterRemoveEmptyString(manufacturersName)); + } + + /** + * Set the value of manufacturersName using lessEqual. { <= } + * If the value is null or empty-string, this condition is ignored. + * + * @param manufacturersName The value of manufacturersName as lessEqual. + */ + public void setManufacturersName_LessEqual(String manufacturersName) { + registerManufacturersName(ConditionKey.CK_LESS_EQUAL, filterRemoveEmptyString(manufacturersName)); + } + + /** + * Set the value of manufacturersName using prefixSearch. { like 'xxx%' } + * If the value is null or empty-string, this condition is ignored. + * + * @param manufacturersName The value of manufacturersName as prefixSearch. + */ + public void setManufacturersName_PrefixSearch(String manufacturersName) { + registerManufacturersName(ConditionKey.CK_PREFIX_SEARCH, filterRemoveEmptyString(manufacturersName)); + } + + /** + * Set the value of manufacturersName using likeSearch. { like '%xxx%' } + * If the value is null or empty-string, this condition is ignored. + * You can invoke this method several times and the conditions are set up. + * + * @param manufacturersName The value of manufacturersName as likeSearch. + * @param likeSearchOption Like search option. (NotNull) + */ + public void setManufacturersName_LikeSearch(String manufacturersName, jp.sf.pal.pompei.allcommon.cbean.coption.LikeSearchOption likeSearchOption) { + registerLikeSearchQuery(ConditionKey.CK_LIKE_SEARCH, filterRemoveEmptyString(manufacturersName), getCValueManufacturersName(), COL_MANUFACTURERS_NAME, J_ManufacturersName, UJ_manufacturersName, likeSearchOption); + } + + /** + * Set the value of manufacturersName using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param manufacturersNameList The value of manufacturersName as inScope. + */ + public void setManufacturersName_InScope(java.util.List manufacturersNameList) { + registerManufacturersName(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyStringFromList(manufacturersNameList)); + } + + /** + * Set the value of manufacturersName using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param manufacturersName The value of manufacturersName as inScope. + */ + public void setManufacturersName_InScope(String manufacturersName, jp.sf.pal.pompei.allcommon.cbean.coption.InScopeOption option) { + registerInScopeQuery(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyString(manufacturersName), getCValueManufacturersName(), COL_MANUFACTURERS_NAME, J_ManufacturersName, UJ_manufacturersName, option); + } + + /** + * Set the value of manufacturersName using notInScope. { not in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param manufacturersNameList The value of manufacturersName as notInScope. + */ + public void setManufacturersName_NotInScope(java.util.List manufacturersNameList) { + registerManufacturersName(ConditionKey.CK_NOT_IN_SCOPE, filterRemoveEmptyStringFromList(manufacturersNameList)); + } + + /** + * Register condition of manufacturersName. + * + * @param key Condition key. (NotNull) + * @param value The value of manufacturersName. (Nullable) + */ + protected void registerManufacturersName(ConditionKey key, Object value) { + registerQuery(key, value, getCValueManufacturersName(), COL_MANUFACTURERS_NAME, J_ManufacturersName, UJ_manufacturersName); + } + + /** + * Register inline condition of manufacturersName. + * + * @param key Condition key. (NotNull) + * @param value The value of manufacturersName. (Nullable) + */ + protected void registerInlineManufacturersName(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueManufacturersName(), COL_MANUFACTURERS_NAME, J_ManufacturersName, UJ_manufacturersName); + } + + abstract protected ConditionValue getCValueManufacturersName(); + + /** Column db name of manufacturersImage. */ + protected static final String COL_MANUFACTURERS_IMAGE = "MANUFACTURERS_IMAGE"; + + /** Column java name of manufacturersImage. */ + protected static final String J_ManufacturersImage = "ManufacturersImage"; + + /** Column uncapitalised java name of manufacturersImage. */ + protected static final String UJ_manufacturersImage = "manufacturersImage"; + + /** + * Set the value of manufacturersImage using equal. { = } + * If the value is null or empty-string, this condition is ignored. + * + * @param manufacturersImage The value of manufacturersImage as equal. + */ + public void setManufacturersImage_Equal(String manufacturersImage) { + registerManufacturersImage(ConditionKey.CK_EQUAL, filterRemoveEmptyString(manufacturersImage)); + } + + /** + * Set the value of manufacturersImage using notEqual. { != } + * If the value is null or empty-string, this condition is ignored. + * + * @param manufacturersImage The value of manufacturersImage as notEqual. + */ + public void setManufacturersImage_NotEqual(String manufacturersImage) { + registerManufacturersImage(ConditionKey.CK_NOT_EQUAL, filterRemoveEmptyString(manufacturersImage)); + } + + /** + * Set the value of manufacturersImage using greaterThan. { > } + * If the value is null or empty-string, this condition is ignored. + * + * @param manufacturersImage The value of manufacturersImage as greaterThan. + */ + public void setManufacturersImage_GreaterThan(String manufacturersImage) { + registerManufacturersImage(ConditionKey.CK_GREATER_THAN, filterRemoveEmptyString(manufacturersImage)); + } + + /** + * Set the value of manufacturersImage using lessThan. { < } + * If the value is null or empty-string, this condition is ignored. + * + * @param manufacturersImage The value of manufacturersImage as lessThan. + */ + public void setManufacturersImage_LessThan(String manufacturersImage) { + registerManufacturersImage(ConditionKey.CK_LESS_THAN, filterRemoveEmptyString(manufacturersImage)); + } + + /** + * Set the value of manufacturersImage using greaterEqual. { >= } + * If the value is null or empty-string, this condition is ignored. + * + * @param manufacturersImage The value of manufacturersImage as greaterEqual. + */ + public void setManufacturersImage_GreaterEqual(String manufacturersImage) { + registerManufacturersImage(ConditionKey.CK_GREATER_EQUAL, filterRemoveEmptyString(manufacturersImage)); + } + + /** + * Set the value of manufacturersImage using lessEqual. { <= } + * If the value is null or empty-string, this condition is ignored. + * + * @param manufacturersImage The value of manufacturersImage as lessEqual. + */ + public void setManufacturersImage_LessEqual(String manufacturersImage) { + registerManufacturersImage(ConditionKey.CK_LESS_EQUAL, filterRemoveEmptyString(manufacturersImage)); + } + + /** + * Set the value of manufacturersImage using prefixSearch. { like 'xxx%' } + * If the value is null or empty-string, this condition is ignored. + * + * @param manufacturersImage The value of manufacturersImage as prefixSearch. + */ + public void setManufacturersImage_PrefixSearch(String manufacturersImage) { + registerManufacturersImage(ConditionKey.CK_PREFIX_SEARCH, filterRemoveEmptyString(manufacturersImage)); + } + + /** + * Set the value of manufacturersImage using likeSearch. { like '%xxx%' } + * If the value is null or empty-string, this condition is ignored. + * You can invoke this method several times and the conditions are set up. + * + * @param manufacturersImage The value of manufacturersImage as likeSearch. + * @param likeSearchOption Like search option. (NotNull) + */ + public void setManufacturersImage_LikeSearch(String manufacturersImage, jp.sf.pal.pompei.allcommon.cbean.coption.LikeSearchOption likeSearchOption) { + registerLikeSearchQuery(ConditionKey.CK_LIKE_SEARCH, filterRemoveEmptyString(manufacturersImage), getCValueManufacturersImage(), COL_MANUFACTURERS_IMAGE, J_ManufacturersImage, UJ_manufacturersImage, likeSearchOption); + } + + /** + * Set the value of manufacturersImage using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param manufacturersImageList The value of manufacturersImage as inScope. + */ + public void setManufacturersImage_InScope(java.util.List manufacturersImageList) { + registerManufacturersImage(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyStringFromList(manufacturersImageList)); + } + + /** + * Set the value of manufacturersImage using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param manufacturersImage The value of manufacturersImage as inScope. + */ + public void setManufacturersImage_InScope(String manufacturersImage, jp.sf.pal.pompei.allcommon.cbean.coption.InScopeOption option) { + registerInScopeQuery(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyString(manufacturersImage), getCValueManufacturersImage(), COL_MANUFACTURERS_IMAGE, J_ManufacturersImage, UJ_manufacturersImage, option); + } + + /** + * Set the value of manufacturersImage using notInScope. { not in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param manufacturersImageList The value of manufacturersImage as notInScope. + */ + public void setManufacturersImage_NotInScope(java.util.List manufacturersImageList) { + registerManufacturersImage(ConditionKey.CK_NOT_IN_SCOPE, filterRemoveEmptyStringFromList(manufacturersImageList)); + } + + /** + * Set the value of manufacturersImage using isNull. { is null } + */ + public void setManufacturersImage_IsNull() { + registerManufacturersImage(ConditionKey.CK_IS_NULL, DUMMY_OBJECT); + } + + /** + * Set the value of manufacturersImage using isNotNull. { is not null } + */ + public void setManufacturersImage_IsNotNull() { + registerManufacturersImage(ConditionKey.CK_IS_NOT_NULL, DUMMY_OBJECT); + } + + /** + * Register condition of manufacturersImage. + * + * @param key Condition key. (NotNull) + * @param value The value of manufacturersImage. (Nullable) + */ + protected void registerManufacturersImage(ConditionKey key, Object value) { + registerQuery(key, value, getCValueManufacturersImage(), COL_MANUFACTURERS_IMAGE, J_ManufacturersImage, UJ_manufacturersImage); + } + + /** + * Register inline condition of manufacturersImage. + * + * @param key Condition key. (NotNull) + * @param value The value of manufacturersImage. (Nullable) + */ + protected void registerInlineManufacturersImage(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueManufacturersImage(), COL_MANUFACTURERS_IMAGE, J_ManufacturersImage, UJ_manufacturersImage); + } + + abstract protected ConditionValue getCValueManufacturersImage(); + + /** Column db name of dateAdded. */ + protected static final String COL_DATE_ADDED = "DATE_ADDED"; + + /** Column java name of dateAdded. */ + protected static final String J_DateAdded = "DateAdded"; + + /** Column uncapitalised java name of dateAdded. */ + protected static final String UJ_dateAdded = "dateAdded"; + + /** + * Set the value of dateAdded using equal. { = } + * + * @param dateAdded The value of dateAdded as equal. + */ + public void setDateAdded_Equal(java.sql.Timestamp dateAdded) { + registerDateAdded(ConditionKey.CK_EQUAL, dateAdded); + } + + /** + * Set the value of dateAdded using notEqual. { != } + * + * @param dateAdded The value of dateAdded as notEqual. + */ + public void setDateAdded_NotEqual(java.sql.Timestamp dateAdded) { + registerDateAdded(ConditionKey.CK_NOT_EQUAL, dateAdded); + } + + /** + * Set the value of dateAdded using greaterThan. { > } + * + * @param dateAdded The value of dateAdded as greaterThan. + */ + public void setDateAdded_GreaterThan(java.sql.Timestamp dateAdded) { + registerDateAdded(ConditionKey.CK_GREATER_THAN, dateAdded); + } + + /** + * Set the value of dateAdded using lessThan. { < } + * + * @param dateAdded The value of dateAdded as lessThan. + */ + public void setDateAdded_LessThan(java.sql.Timestamp dateAdded) { + registerDateAdded(ConditionKey.CK_LESS_THAN, dateAdded); + } + + /** + * Set the value of dateAdded using greaterEqual. { >= } + * + * @param dateAdded The value of dateAdded as greaterEqual. + */ + public void setDateAdded_GreaterEqual(java.sql.Timestamp dateAdded) { + registerDateAdded(ConditionKey.CK_GREATER_EQUAL, dateAdded); + } + + /** + * Set the value of dateAdded using lessEqual. { <= } + * + * @param dateAdded The value of dateAdded as lessEqual. + */ + public void setDateAdded_LessEqual(java.sql.Timestamp dateAdded) { + registerDateAdded(ConditionKey.CK_LESS_EQUAL, dateAdded); + } + + /** + * Set the value of dateAdded using from-to. { $fromDate <= COLUMN_NAME <= $toDate } + * + * @param dateAdded The value of dateAdded as from-to. + * @param fromToOption From-To option. (NotNull) + */ + public void setDateAdded_FromTo(java.sql.Timestamp fromDate, java.sql.Timestamp toDate, jp.sf.pal.pompei.allcommon.cbean.coption.FromToOption fromToOption) { + registerFromToQuery(fromDate, toDate, getCValueDateAdded(), COL_DATE_ADDED, J_DateAdded, UJ_dateAdded, fromToOption); + } + + /** + * Set the value of dateAdded using isNull. { is null } + */ + public void setDateAdded_IsNull() { + registerDateAdded(ConditionKey.CK_IS_NULL, DUMMY_OBJECT); + } + + /** + * Set the value of dateAdded using isNotNull. { is not null } + */ + public void setDateAdded_IsNotNull() { + registerDateAdded(ConditionKey.CK_IS_NOT_NULL, DUMMY_OBJECT); + } + + /** + * Register condition of dateAdded. + * + * @param key Condition key. (NotNull) + * @param value The value of dateAdded. (Nullable) + */ + protected void registerDateAdded(ConditionKey key, Object value) { + registerQuery(key, value, getCValueDateAdded(), COL_DATE_ADDED, J_DateAdded, UJ_dateAdded); + } + + /** + * Register inline condition of dateAdded. + * + * @param key Condition key. (NotNull) + * @param value The value of dateAdded. (Nullable) + */ + protected void registerInlineDateAdded(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueDateAdded(), COL_DATE_ADDED, J_DateAdded, UJ_dateAdded); + } + + abstract protected ConditionValue getCValueDateAdded(); + + /** Column db name of lastModified. */ + protected static final String COL_LAST_MODIFIED = "LAST_MODIFIED"; + + /** Column java name of lastModified. */ + protected static final String J_LastModified = "LastModified"; + + /** Column uncapitalised java name of lastModified. */ + protected static final String UJ_lastModified = "lastModified"; + + /** + * Set the value of lastModified using equal. { = } + * + * @param lastModified The value of lastModified as equal. + */ + public void setLastModified_Equal(java.sql.Timestamp lastModified) { + registerLastModified(ConditionKey.CK_EQUAL, lastModified); + } + + /** + * Set the value of lastModified using notEqual. { != } + * + * @param lastModified The value of lastModified as notEqual. + */ + public void setLastModified_NotEqual(java.sql.Timestamp lastModified) { + registerLastModified(ConditionKey.CK_NOT_EQUAL, lastModified); + } + + /** + * Set the value of lastModified using greaterThan. { > } + * + * @param lastModified The value of lastModified as greaterThan. + */ + public void setLastModified_GreaterThan(java.sql.Timestamp lastModified) { + registerLastModified(ConditionKey.CK_GREATER_THAN, lastModified); + } + + /** + * Set the value of lastModified using lessThan. { < } + * + * @param lastModified The value of lastModified as lessThan. + */ + public void setLastModified_LessThan(java.sql.Timestamp lastModified) { + registerLastModified(ConditionKey.CK_LESS_THAN, lastModified); + } + + /** + * Set the value of lastModified using greaterEqual. { >= } + * + * @param lastModified The value of lastModified as greaterEqual. + */ + public void setLastModified_GreaterEqual(java.sql.Timestamp lastModified) { + registerLastModified(ConditionKey.CK_GREATER_EQUAL, lastModified); + } + + /** + * Set the value of lastModified using lessEqual. { <= } + * + * @param lastModified The value of lastModified as lessEqual. + */ + public void setLastModified_LessEqual(java.sql.Timestamp lastModified) { + registerLastModified(ConditionKey.CK_LESS_EQUAL, lastModified); + } + + /** + * Set the value of lastModified using from-to. { $fromDate <= COLUMN_NAME <= $toDate } + * + * @param lastModified The value of lastModified as from-to. + * @param fromToOption From-To option. (NotNull) + */ + public void setLastModified_FromTo(java.sql.Timestamp fromDate, java.sql.Timestamp toDate, jp.sf.pal.pompei.allcommon.cbean.coption.FromToOption fromToOption) { + registerFromToQuery(fromDate, toDate, getCValueLastModified(), COL_LAST_MODIFIED, J_LastModified, UJ_lastModified, fromToOption); + } + + /** + * Set the value of lastModified using isNull. { is null } + */ + public void setLastModified_IsNull() { + registerLastModified(ConditionKey.CK_IS_NULL, DUMMY_OBJECT); + } + + /** + * Set the value of lastModified using isNotNull. { is not null } + */ + public void setLastModified_IsNotNull() { + registerLastModified(ConditionKey.CK_IS_NOT_NULL, DUMMY_OBJECT); + } + + /** + * Register condition of lastModified. + * + * @param key Condition key. (NotNull) + * @param value The value of lastModified. (Nullable) + */ + protected void registerLastModified(ConditionKey key, Object value) { + registerQuery(key, value, getCValueLastModified(), COL_LAST_MODIFIED, J_LastModified, UJ_lastModified); + } + + /** + * Register inline condition of lastModified. + * + * @param key Condition key. (NotNull) + * @param value The value of lastModified. (Nullable) + */ + protected void registerInlineLastModified(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueLastModified(), COL_LAST_MODIFIED, J_LastModified, UJ_lastModified); + } + + abstract protected ConditionValue getCValueLastModified(); + + // =================================================================================== + // Basic Override + // ============== + /** + * This method overrides the method that is declared at super. + * + * @return Clause string. (NotNull) + */ + public String toString() { + return getSqlClause().getClause(); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/AbstractBsManufacturersInfoCQ.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/AbstractBsManufacturersInfoCQ.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/AbstractBsManufacturersInfoCQ.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,633 @@ + +package jp.sf.pal.pompei.cbean.cq.bs; + + + +import jp.sf.pal.pompei.allcommon.cbean.*; +import jp.sf.pal.pompei.allcommon.cbean.ckey.*; +import jp.sf.pal.pompei.allcommon.cbean.cvalue.ConditionValue; +import jp.sf.pal.pompei.allcommon.cbean.sqlclause.SqlClause; +import jp.sf.pal.pompei.cbean.cq.*; + +/** + * The condition-query of MANUFACTURERS_INFO. + * + * @author DBFlute(AutoGenerator) + */ +public abstract class AbstractBsManufacturersInfoCQ extends AbstractConditionQuery { + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param childQuery Child query as abstract class. (Nullable: If null, this is base instance.) + * @param sqlClause SQL clause instance. (NotNull) + * @param aliasName My alias name. (NotNull) + * @param nestLevel Nest level. + */ + public AbstractBsManufacturersInfoCQ(ConditionQuery childQuery, SqlClause sqlClause, String aliasName, int nestLevel) { + super(childQuery, sqlClause, aliasName, nestLevel); + } + + // =================================================================================== + // Table Name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + final public String getTableDbName() { + return "MANUFACTURERS_INFO"; + } + + // =================================================================================== + // Query + // ===== + + // /* * * * * * * * * * * * * * * * * * * * * * * + // MyTable = [MANUFACTURERS_INFO] + // * * * * * * * * */ + + + /** Column db name of manufacturersId. */ + protected static final String COL_MANUFACTURERS_ID = "MANUFACTURERS_ID"; + + /** Column java name of manufacturersId. */ + protected static final String J_ManufacturersId = "ManufacturersId"; + + /** Column uncapitalised java name of manufacturersId. */ + protected static final String UJ_manufacturersId = "manufacturersId"; + + /** + * Set the value of manufacturersId using equal. { = } + * + * @param manufacturersId The value of manufacturersId as equal. + */ + public void setManufacturersId_Equal(java.math.BigDecimal manufacturersId) { + registerManufacturersId(ConditionKey.CK_EQUAL, manufacturersId); + } + + /** + * Set the value of manufacturersId using notEqual. { != } + * + * @param manufacturersId The value of manufacturersId as notEqual. + */ + public void setManufacturersId_NotEqual(java.math.BigDecimal manufacturersId) { + registerManufacturersId(ConditionKey.CK_NOT_EQUAL, manufacturersId); + } + + /** + * Set the value of manufacturersId using greaterThan. { > } + * + * @param manufacturersId The value of manufacturersId as greaterThan. + */ + public void setManufacturersId_GreaterThan(java.math.BigDecimal manufacturersId) { + registerManufacturersId(ConditionKey.CK_GREATER_THAN, manufacturersId); + } + + /** + * Set the value of manufacturersId using lessThan. { < } + * + * @param manufacturersId The value of manufacturersId as lessThan. + */ + public void setManufacturersId_LessThan(java.math.BigDecimal manufacturersId) { + registerManufacturersId(ConditionKey.CK_LESS_THAN, manufacturersId); + } + + /** + * Set the value of manufacturersId using greaterEqual. { >= } + * + * @param manufacturersId The value of manufacturersId as greaterEqual. + */ + public void setManufacturersId_GreaterEqual(java.math.BigDecimal manufacturersId) { + registerManufacturersId(ConditionKey.CK_GREATER_EQUAL, manufacturersId); + } + + /** + * Set the value of manufacturersId using lessEqual. { <= } + * + * @param manufacturersId The value of manufacturersId as lessEqual. + */ + public void setManufacturersId_LessEqual(java.math.BigDecimal manufacturersId) { + registerManufacturersId(ConditionKey.CK_LESS_EQUAL, manufacturersId); + } + + /** + * Set the value of manufacturersId using inScope. { in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param manufacturersIdList The value of manufacturersId as inScope. + */ + public void setManufacturersId_InScope(java.util.List manufacturersIdList) { + registerManufacturersId(ConditionKey.CK_IN_SCOPE, manufacturersIdList); + } + + /** + * Set the value of manufacturersId using notInScope. { not in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param manufacturersIdList The value of manufacturersId as notInScope. + */ + public void setManufacturersId_NotInScope(java.util.List manufacturersIdList) { + registerManufacturersId(ConditionKey.CK_NOT_IN_SCOPE, manufacturersIdList); + } + + /** + * Register condition of manufacturersId. + * + * @param key Condition key. (NotNull) + * @param value The value of manufacturersId. (Nullable) + */ + protected void registerManufacturersId(ConditionKey key, Object value) { + registerQuery(key, value, getCValueManufacturersId(), COL_MANUFACTURERS_ID, J_ManufacturersId, UJ_manufacturersId); + } + + /** + * Register inline condition of manufacturersId. + * + * @param key Condition key. (NotNull) + * @param value The value of manufacturersId. (Nullable) + */ + protected void registerInlineManufacturersId(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueManufacturersId(), COL_MANUFACTURERS_ID, J_ManufacturersId, UJ_manufacturersId); + } + + abstract protected ConditionValue getCValueManufacturersId(); + + /** Column db name of languagesId. */ + protected static final String COL_LANGUAGES_ID = "LANGUAGES_ID"; + + /** Column java name of languagesId. */ + protected static final String J_LanguagesId = "LanguagesId"; + + /** Column uncapitalised java name of languagesId. */ + protected static final String UJ_languagesId = "languagesId"; + + /** + * Set the value of languagesId using equal. { = } + * + * @param languagesId The value of languagesId as equal. + */ + public void setLanguagesId_Equal(java.math.BigDecimal languagesId) { + registerLanguagesId(ConditionKey.CK_EQUAL, languagesId); + } + + /** + * Set the value of languagesId using notEqual. { != } + * + * @param languagesId The value of languagesId as notEqual. + */ + public void setLanguagesId_NotEqual(java.math.BigDecimal languagesId) { + registerLanguagesId(ConditionKey.CK_NOT_EQUAL, languagesId); + } + + /** + * Set the value of languagesId using greaterThan. { > } + * + * @param languagesId The value of languagesId as greaterThan. + */ + public void setLanguagesId_GreaterThan(java.math.BigDecimal languagesId) { + registerLanguagesId(ConditionKey.CK_GREATER_THAN, languagesId); + } + + /** + * Set the value of languagesId using lessThan. { < } + * + * @param languagesId The value of languagesId as lessThan. + */ + public void setLanguagesId_LessThan(java.math.BigDecimal languagesId) { + registerLanguagesId(ConditionKey.CK_LESS_THAN, languagesId); + } + + /** + * Set the value of languagesId using greaterEqual. { >= } + * + * @param languagesId The value of languagesId as greaterEqual. + */ + public void setLanguagesId_GreaterEqual(java.math.BigDecimal languagesId) { + registerLanguagesId(ConditionKey.CK_GREATER_EQUAL, languagesId); + } + + /** + * Set the value of languagesId using lessEqual. { <= } + * + * @param languagesId The value of languagesId as lessEqual. + */ + public void setLanguagesId_LessEqual(java.math.BigDecimal languagesId) { + registerLanguagesId(ConditionKey.CK_LESS_EQUAL, languagesId); + } + + /** + * Set the value of languagesId using inScope. { in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param languagesIdList The value of languagesId as inScope. + */ + public void setLanguagesId_InScope(java.util.List languagesIdList) { + registerLanguagesId(ConditionKey.CK_IN_SCOPE, languagesIdList); + } + + /** + * Set the value of languagesId using notInScope. { not in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param languagesIdList The value of languagesId as notInScope. + */ + public void setLanguagesId_NotInScope(java.util.List languagesIdList) { + registerLanguagesId(ConditionKey.CK_NOT_IN_SCOPE, languagesIdList); + } + + /** + * Register condition of languagesId. + * + * @param key Condition key. (NotNull) + * @param value The value of languagesId. (Nullable) + */ + protected void registerLanguagesId(ConditionKey key, Object value) { + registerQuery(key, value, getCValueLanguagesId(), COL_LANGUAGES_ID, J_LanguagesId, UJ_languagesId); + } + + /** + * Register inline condition of languagesId. + * + * @param key Condition key. (NotNull) + * @param value The value of languagesId. (Nullable) + */ + protected void registerInlineLanguagesId(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueLanguagesId(), COL_LANGUAGES_ID, J_LanguagesId, UJ_languagesId); + } + + abstract protected ConditionValue getCValueLanguagesId(); + + /** Column db name of manufacturersUrl. */ + protected static final String COL_MANUFACTURERS_URL = "MANUFACTURERS_URL"; + + /** Column java name of manufacturersUrl. */ + protected static final String J_ManufacturersUrl = "ManufacturersUrl"; + + /** Column uncapitalised java name of manufacturersUrl. */ + protected static final String UJ_manufacturersUrl = "manufacturersUrl"; + + /** + * Set the value of manufacturersUrl using equal. { = } + * If the value is null or empty-string, this condition is ignored. + * + * @param manufacturersUrl The value of manufacturersUrl as equal. + */ + public void setManufacturersUrl_Equal(String manufacturersUrl) { + registerManufacturersUrl(ConditionKey.CK_EQUAL, filterRemoveEmptyString(manufacturersUrl)); + } + + /** + * Set the value of manufacturersUrl using notEqual. { != } + * If the value is null or empty-string, this condition is ignored. + * + * @param manufacturersUrl The value of manufacturersUrl as notEqual. + */ + public void setManufacturersUrl_NotEqual(String manufacturersUrl) { + registerManufacturersUrl(ConditionKey.CK_NOT_EQUAL, filterRemoveEmptyString(manufacturersUrl)); + } + + /** + * Set the value of manufacturersUrl using greaterThan. { > } + * If the value is null or empty-string, this condition is ignored. + * + * @param manufacturersUrl The value of manufacturersUrl as greaterThan. + */ + public void setManufacturersUrl_GreaterThan(String manufacturersUrl) { + registerManufacturersUrl(ConditionKey.CK_GREATER_THAN, filterRemoveEmptyString(manufacturersUrl)); + } + + /** + * Set the value of manufacturersUrl using lessThan. { < } + * If the value is null or empty-string, this condition is ignored. + * + * @param manufacturersUrl The value of manufacturersUrl as lessThan. + */ + public void setManufacturersUrl_LessThan(String manufacturersUrl) { + registerManufacturersUrl(ConditionKey.CK_LESS_THAN, filterRemoveEmptyString(manufacturersUrl)); + } + + /** + * Set the value of manufacturersUrl using greaterEqual. { >= } + * If the value is null or empty-string, this condition is ignored. + * + * @param manufacturersUrl The value of manufacturersUrl as greaterEqual. + */ + public void setManufacturersUrl_GreaterEqual(String manufacturersUrl) { + registerManufacturersUrl(ConditionKey.CK_GREATER_EQUAL, filterRemoveEmptyString(manufacturersUrl)); + } + + /** + * Set the value of manufacturersUrl using lessEqual. { <= } + * If the value is null or empty-string, this condition is ignored. + * + * @param manufacturersUrl The value of manufacturersUrl as lessEqual. + */ + public void setManufacturersUrl_LessEqual(String manufacturersUrl) { + registerManufacturersUrl(ConditionKey.CK_LESS_EQUAL, filterRemoveEmptyString(manufacturersUrl)); + } + + /** + * Set the value of manufacturersUrl using prefixSearch. { like 'xxx%' } + * If the value is null or empty-string, this condition is ignored. + * + * @param manufacturersUrl The value of manufacturersUrl as prefixSearch. + */ + public void setManufacturersUrl_PrefixSearch(String manufacturersUrl) { + registerManufacturersUrl(ConditionKey.CK_PREFIX_SEARCH, filterRemoveEmptyString(manufacturersUrl)); + } + + /** + * Set the value of manufacturersUrl using likeSearch. { like '%xxx%' } + * If the value is null or empty-string, this condition is ignored. + * You can invoke this method several times and the conditions are set up. + * + * @param manufacturersUrl The value of manufacturersUrl as likeSearch. + * @param likeSearchOption Like search option. (NotNull) + */ + public void setManufacturersUrl_LikeSearch(String manufacturersUrl, jp.sf.pal.pompei.allcommon.cbean.coption.LikeSearchOption likeSearchOption) { + registerLikeSearchQuery(ConditionKey.CK_LIKE_SEARCH, filterRemoveEmptyString(manufacturersUrl), getCValueManufacturersUrl(), COL_MANUFACTURERS_URL, J_ManufacturersUrl, UJ_manufacturersUrl, likeSearchOption); + } + + /** + * Set the value of manufacturersUrl using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param manufacturersUrlList The value of manufacturersUrl as inScope. + */ + public void setManufacturersUrl_InScope(java.util.List manufacturersUrlList) { + registerManufacturersUrl(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyStringFromList(manufacturersUrlList)); + } + + /** + * Set the value of manufacturersUrl using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param manufacturersUrl The value of manufacturersUrl as inScope. + */ + public void setManufacturersUrl_InScope(String manufacturersUrl, jp.sf.pal.pompei.allcommon.cbean.coption.InScopeOption option) { + registerInScopeQuery(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyString(manufacturersUrl), getCValueManufacturersUrl(), COL_MANUFACTURERS_URL, J_ManufacturersUrl, UJ_manufacturersUrl, option); + } + + /** + * Set the value of manufacturersUrl using notInScope. { not in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param manufacturersUrlList The value of manufacturersUrl as notInScope. + */ + public void setManufacturersUrl_NotInScope(java.util.List manufacturersUrlList) { + registerManufacturersUrl(ConditionKey.CK_NOT_IN_SCOPE, filterRemoveEmptyStringFromList(manufacturersUrlList)); + } + + /** + * Register condition of manufacturersUrl. + * + * @param key Condition key. (NotNull) + * @param value The value of manufacturersUrl. (Nullable) + */ + protected void registerManufacturersUrl(ConditionKey key, Object value) { + registerQuery(key, value, getCValueManufacturersUrl(), COL_MANUFACTURERS_URL, J_ManufacturersUrl, UJ_manufacturersUrl); + } + + /** + * Register inline condition of manufacturersUrl. + * + * @param key Condition key. (NotNull) + * @param value The value of manufacturersUrl. (Nullable) + */ + protected void registerInlineManufacturersUrl(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueManufacturersUrl(), COL_MANUFACTURERS_URL, J_ManufacturersUrl, UJ_manufacturersUrl); + } + + abstract protected ConditionValue getCValueManufacturersUrl(); + + /** Column db name of urlClicked. */ + protected static final String COL_URL_CLICKED = "URL_CLICKED"; + + /** Column java name of urlClicked. */ + protected static final String J_UrlClicked = "UrlClicked"; + + /** Column uncapitalised java name of urlClicked. */ + protected static final String UJ_urlClicked = "urlClicked"; + + /** + * Set the value of urlClicked using equal. { = } + * + * @param urlClicked The value of urlClicked as equal. + */ + public void setUrlClicked_Equal(java.math.BigDecimal urlClicked) { + registerUrlClicked(ConditionKey.CK_EQUAL, urlClicked); + } + + /** + * Set the value of urlClicked using notEqual. { != } + * + * @param urlClicked The value of urlClicked as notEqual. + */ + public void setUrlClicked_NotEqual(java.math.BigDecimal urlClicked) { + registerUrlClicked(ConditionKey.CK_NOT_EQUAL, urlClicked); + } + + /** + * Set the value of urlClicked using greaterThan. { > } + * + * @param urlClicked The value of urlClicked as greaterThan. + */ + public void setUrlClicked_GreaterThan(java.math.BigDecimal urlClicked) { + registerUrlClicked(ConditionKey.CK_GREATER_THAN, urlClicked); + } + + /** + * Set the value of urlClicked using lessThan. { < } + * + * @param urlClicked The value of urlClicked as lessThan. + */ + public void setUrlClicked_LessThan(java.math.BigDecimal urlClicked) { + registerUrlClicked(ConditionKey.CK_LESS_THAN, urlClicked); + } + + /** + * Set the value of urlClicked using greaterEqual. { >= } + * + * @param urlClicked The value of urlClicked as greaterEqual. + */ + public void setUrlClicked_GreaterEqual(java.math.BigDecimal urlClicked) { + registerUrlClicked(ConditionKey.CK_GREATER_EQUAL, urlClicked); + } + + /** + * Set the value of urlClicked using lessEqual. { <= } + * + * @param urlClicked The value of urlClicked as lessEqual. + */ + public void setUrlClicked_LessEqual(java.math.BigDecimal urlClicked) { + registerUrlClicked(ConditionKey.CK_LESS_EQUAL, urlClicked); + } + + /** + * Set the value of urlClicked using inScope. { in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param urlClickedList The value of urlClicked as inScope. + */ + public void setUrlClicked_InScope(java.util.List urlClickedList) { + registerUrlClicked(ConditionKey.CK_IN_SCOPE, urlClickedList); + } + + /** + * Set the value of urlClicked using notInScope. { not in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param urlClickedList The value of urlClicked as notInScope. + */ + public void setUrlClicked_NotInScope(java.util.List urlClickedList) { + registerUrlClicked(ConditionKey.CK_NOT_IN_SCOPE, urlClickedList); + } + + /** + * Register condition of urlClicked. + * + * @param key Condition key. (NotNull) + * @param value The value of urlClicked. (Nullable) + */ + protected void registerUrlClicked(ConditionKey key, Object value) { + registerQuery(key, value, getCValueUrlClicked(), COL_URL_CLICKED, J_UrlClicked, UJ_urlClicked); + } + + /** + * Register inline condition of urlClicked. + * + * @param key Condition key. (NotNull) + * @param value The value of urlClicked. (Nullable) + */ + protected void registerInlineUrlClicked(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueUrlClicked(), COL_URL_CLICKED, J_UrlClicked, UJ_urlClicked); + } + + abstract protected ConditionValue getCValueUrlClicked(); + + /** Column db name of dateLastClick. */ + protected static final String COL_DATE_LAST_CLICK = "DATE_LAST_CLICK"; + + /** Column java name of dateLastClick. */ + protected static final String J_DateLastClick = "DateLastClick"; + + /** Column uncapitalised java name of dateLastClick. */ + protected static final String UJ_dateLastClick = "dateLastClick"; + + /** + * Set the value of dateLastClick using equal. { = } + * + * @param dateLastClick The value of dateLastClick as equal. + */ + public void setDateLastClick_Equal(java.sql.Timestamp dateLastClick) { + registerDateLastClick(ConditionKey.CK_EQUAL, dateLastClick); + } + + /** + * Set the value of dateLastClick using notEqual. { != } + * + * @param dateLastClick The value of dateLastClick as notEqual. + */ + public void setDateLastClick_NotEqual(java.sql.Timestamp dateLastClick) { + registerDateLastClick(ConditionKey.CK_NOT_EQUAL, dateLastClick); + } + + /** + * Set the value of dateLastClick using greaterThan. { > } + * + * @param dateLastClick The value of dateLastClick as greaterThan. + */ + public void setDateLastClick_GreaterThan(java.sql.Timestamp dateLastClick) { + registerDateLastClick(ConditionKey.CK_GREATER_THAN, dateLastClick); + } + + /** + * Set the value of dateLastClick using lessThan. { < } + * + * @param dateLastClick The value of dateLastClick as lessThan. + */ + public void setDateLastClick_LessThan(java.sql.Timestamp dateLastClick) { + registerDateLastClick(ConditionKey.CK_LESS_THAN, dateLastClick); + } + + /** + * Set the value of dateLastClick using greaterEqual. { >= } + * + * @param dateLastClick The value of dateLastClick as greaterEqual. + */ + public void setDateLastClick_GreaterEqual(java.sql.Timestamp dateLastClick) { + registerDateLastClick(ConditionKey.CK_GREATER_EQUAL, dateLastClick); + } + + /** + * Set the value of dateLastClick using lessEqual. { <= } + * + * @param dateLastClick The value of dateLastClick as lessEqual. + */ + public void setDateLastClick_LessEqual(java.sql.Timestamp dateLastClick) { + registerDateLastClick(ConditionKey.CK_LESS_EQUAL, dateLastClick); + } + + /** + * Set the value of dateLastClick using from-to. { $fromDate <= COLUMN_NAME <= $toDate } + * + * @param dateLastClick The value of dateLastClick as from-to. + * @param fromToOption From-To option. (NotNull) + */ + public void setDateLastClick_FromTo(java.sql.Timestamp fromDate, java.sql.Timestamp toDate, jp.sf.pal.pompei.allcommon.cbean.coption.FromToOption fromToOption) { + registerFromToQuery(fromDate, toDate, getCValueDateLastClick(), COL_DATE_LAST_CLICK, J_DateLastClick, UJ_dateLastClick, fromToOption); + } + + /** + * Set the value of dateLastClick using isNull. { is null } + */ + public void setDateLastClick_IsNull() { + registerDateLastClick(ConditionKey.CK_IS_NULL, DUMMY_OBJECT); + } + + /** + * Set the value of dateLastClick using isNotNull. { is not null } + */ + public void setDateLastClick_IsNotNull() { + registerDateLastClick(ConditionKey.CK_IS_NOT_NULL, DUMMY_OBJECT); + } + + /** + * Register condition of dateLastClick. + * + * @param key Condition key. (NotNull) + * @param value The value of dateLastClick. (Nullable) + */ + protected void registerDateLastClick(ConditionKey key, Object value) { + registerQuery(key, value, getCValueDateLastClick(), COL_DATE_LAST_CLICK, J_DateLastClick, UJ_dateLastClick); + } + + /** + * Register inline condition of dateLastClick. + * + * @param key Condition key. (NotNull) + * @param value The value of dateLastClick. (Nullable) + */ + protected void registerInlineDateLastClick(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueDateLastClick(), COL_DATE_LAST_CLICK, J_DateLastClick, UJ_dateLastClick); + } + + abstract protected ConditionValue getCValueDateLastClick(); + + // =================================================================================== + // Basic Override + // ============== + /** + * This method overrides the method that is declared at super. + * + * @return Clause string. (NotNull) + */ + public String toString() { + return getSqlClause().getClause(); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/AbstractBsNewslettersCQ.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/AbstractBsNewslettersCQ.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/AbstractBsNewslettersCQ.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,1042 @@ + +package jp.sf.pal.pompei.cbean.cq.bs; + + + +import jp.sf.pal.pompei.allcommon.cbean.*; +import jp.sf.pal.pompei.allcommon.cbean.ckey.*; +import jp.sf.pal.pompei.allcommon.cbean.cvalue.ConditionValue; +import jp.sf.pal.pompei.allcommon.cbean.sqlclause.SqlClause; +import jp.sf.pal.pompei.cbean.cq.*; + +/** + * The condition-query of NEWSLETTERS. + * + * @author DBFlute(AutoGenerator) + */ +public abstract class AbstractBsNewslettersCQ extends AbstractConditionQuery { + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param childQuery Child query as abstract class. (Nullable: If null, this is base instance.) + * @param sqlClause SQL clause instance. (NotNull) + * @param aliasName My alias name. (NotNull) + * @param nestLevel Nest level. + */ + public AbstractBsNewslettersCQ(ConditionQuery childQuery, SqlClause sqlClause, String aliasName, int nestLevel) { + super(childQuery, sqlClause, aliasName, nestLevel); + } + + // =================================================================================== + // Table Name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + final public String getTableDbName() { + return "NEWSLETTERS"; + } + + // =================================================================================== + // Query + // ===== + + // /* * * * * * * * * * * * * * * * * * * * * * * + // MyTable = [NEWSLETTERS] + // * * * * * * * * */ + + + /** Column db name of newslettersId. */ + protected static final String COL_NEWSLETTERS_ID = "NEWSLETTERS_ID"; + + /** Column java name of newslettersId. */ + protected static final String J_NewslettersId = "NewslettersId"; + + /** Column uncapitalised java name of newslettersId. */ + protected static final String UJ_newslettersId = "newslettersId"; + + /** + * Set the value of newslettersId using equal. { = } + * + * @param newslettersId The value of newslettersId as equal. + */ + public void setNewslettersId_Equal(java.math.BigDecimal newslettersId) { + registerNewslettersId(ConditionKey.CK_EQUAL, newslettersId); + } + + /** + * Set the value of newslettersId using notEqual. { != } + * + * @param newslettersId The value of newslettersId as notEqual. + */ + public void setNewslettersId_NotEqual(java.math.BigDecimal newslettersId) { + registerNewslettersId(ConditionKey.CK_NOT_EQUAL, newslettersId); + } + + /** + * Set the value of newslettersId using greaterThan. { > } + * + * @param newslettersId The value of newslettersId as greaterThan. + */ + public void setNewslettersId_GreaterThan(java.math.BigDecimal newslettersId) { + registerNewslettersId(ConditionKey.CK_GREATER_THAN, newslettersId); + } + + /** + * Set the value of newslettersId using lessThan. { < } + * + * @param newslettersId The value of newslettersId as lessThan. + */ + public void setNewslettersId_LessThan(java.math.BigDecimal newslettersId) { + registerNewslettersId(ConditionKey.CK_LESS_THAN, newslettersId); + } + + /** + * Set the value of newslettersId using greaterEqual. { >= } + * + * @param newslettersId The value of newslettersId as greaterEqual. + */ + public void setNewslettersId_GreaterEqual(java.math.BigDecimal newslettersId) { + registerNewslettersId(ConditionKey.CK_GREATER_EQUAL, newslettersId); + } + + /** + * Set the value of newslettersId using lessEqual. { <= } + * + * @param newslettersId The value of newslettersId as lessEqual. + */ + public void setNewslettersId_LessEqual(java.math.BigDecimal newslettersId) { + registerNewslettersId(ConditionKey.CK_LESS_EQUAL, newslettersId); + } + + /** + * Set the value of newslettersId using inScope. { in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param newslettersIdList The value of newslettersId as inScope. + */ + public void setNewslettersId_InScope(java.util.List newslettersIdList) { + registerNewslettersId(ConditionKey.CK_IN_SCOPE, newslettersIdList); + } + + /** + * Set the value of newslettersId using notInScope. { not in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param newslettersIdList The value of newslettersId as notInScope. + */ + public void setNewslettersId_NotInScope(java.util.List newslettersIdList) { + registerNewslettersId(ConditionKey.CK_NOT_IN_SCOPE, newslettersIdList); + } + + /** + * Register condition of newslettersId. + * + * @param key Condition key. (NotNull) + * @param value The value of newslettersId. (Nullable) + */ + protected void registerNewslettersId(ConditionKey key, Object value) { + registerQuery(key, value, getCValueNewslettersId(), COL_NEWSLETTERS_ID, J_NewslettersId, UJ_newslettersId); + } + + /** + * Register inline condition of newslettersId. + * + * @param key Condition key. (NotNull) + * @param value The value of newslettersId. (Nullable) + */ + protected void registerInlineNewslettersId(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueNewslettersId(), COL_NEWSLETTERS_ID, J_NewslettersId, UJ_newslettersId); + } + + abstract protected ConditionValue getCValueNewslettersId(); + + /** Column db name of title. */ + protected static final String COL_TITLE = "TITLE"; + + /** Column java name of title. */ + protected static final String J_Title = "Title"; + + /** Column uncapitalised java name of title. */ + protected static final String UJ_title = "title"; + + /** + * Set the value of title using equal. { = } + * If the value is null or empty-string, this condition is ignored. + * + * @param title The value of title as equal. + */ + public void setTitle_Equal(String title) { + registerTitle(ConditionKey.CK_EQUAL, filterRemoveEmptyString(title)); + } + + /** + * Set the value of title using notEqual. { != } + * If the value is null or empty-string, this condition is ignored. + * + * @param title The value of title as notEqual. + */ + public void setTitle_NotEqual(String title) { + registerTitle(ConditionKey.CK_NOT_EQUAL, filterRemoveEmptyString(title)); + } + + /** + * Set the value of title using greaterThan. { > } + * If the value is null or empty-string, this condition is ignored. + * + * @param title The value of title as greaterThan. + */ + public void setTitle_GreaterThan(String title) { + registerTitle(ConditionKey.CK_GREATER_THAN, filterRemoveEmptyString(title)); + } + + /** + * Set the value of title using lessThan. { < } + * If the value is null or empty-string, this condition is ignored. + * + * @param title The value of title as lessThan. + */ + public void setTitle_LessThan(String title) { + registerTitle(ConditionKey.CK_LESS_THAN, filterRemoveEmptyString(title)); + } + + /** + * Set the value of title using greaterEqual. { >= } + * If the value is null or empty-string, this condition is ignored. + * + * @param title The value of title as greaterEqual. + */ + public void setTitle_GreaterEqual(String title) { + registerTitle(ConditionKey.CK_GREATER_EQUAL, filterRemoveEmptyString(title)); + } + + /** + * Set the value of title using lessEqual. { <= } + * If the value is null or empty-string, this condition is ignored. + * + * @param title The value of title as lessEqual. + */ + public void setTitle_LessEqual(String title) { + registerTitle(ConditionKey.CK_LESS_EQUAL, filterRemoveEmptyString(title)); + } + + /** + * Set the value of title using prefixSearch. { like 'xxx%' } + * If the value is null or empty-string, this condition is ignored. + * + * @param title The value of title as prefixSearch. + */ + public void setTitle_PrefixSearch(String title) { + registerTitle(ConditionKey.CK_PREFIX_SEARCH, filterRemoveEmptyString(title)); + } + + /** + * Set the value of title using likeSearch. { like '%xxx%' } + * If the value is null or empty-string, this condition is ignored. + * You can invoke this method several times and the conditions are set up. + * + * @param title The value of title as likeSearch. + * @param likeSearchOption Like search option. (NotNull) + */ + public void setTitle_LikeSearch(String title, jp.sf.pal.pompei.allcommon.cbean.coption.LikeSearchOption likeSearchOption) { + registerLikeSearchQuery(ConditionKey.CK_LIKE_SEARCH, filterRemoveEmptyString(title), getCValueTitle(), COL_TITLE, J_Title, UJ_title, likeSearchOption); + } + + /** + * Set the value of title using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param titleList The value of title as inScope. + */ + public void setTitle_InScope(java.util.List titleList) { + registerTitle(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyStringFromList(titleList)); + } + + /** + * Set the value of title using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param title The value of title as inScope. + */ + public void setTitle_InScope(String title, jp.sf.pal.pompei.allcommon.cbean.coption.InScopeOption option) { + registerInScopeQuery(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyString(title), getCValueTitle(), COL_TITLE, J_Title, UJ_title, option); + } + + /** + * Set the value of title using notInScope. { not in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param titleList The value of title as notInScope. + */ + public void setTitle_NotInScope(java.util.List titleList) { + registerTitle(ConditionKey.CK_NOT_IN_SCOPE, filterRemoveEmptyStringFromList(titleList)); + } + + /** + * Register condition of title. + * + * @param key Condition key. (NotNull) + * @param value The value of title. (Nullable) + */ + protected void registerTitle(ConditionKey key, Object value) { + registerQuery(key, value, getCValueTitle(), COL_TITLE, J_Title, UJ_title); + } + + /** + * Register inline condition of title. + * + * @param key Condition key. (NotNull) + * @param value The value of title. (Nullable) + */ + protected void registerInlineTitle(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueTitle(), COL_TITLE, J_Title, UJ_title); + } + + abstract protected ConditionValue getCValueTitle(); + + /** Column db name of content. */ + protected static final String COL_CONTENT = "CONTENT"; + + /** Column java name of content. */ + protected static final String J_Content = "Content"; + + /** Column uncapitalised java name of content. */ + protected static final String UJ_content = "content"; + + /** + * Set the value of content using equal. { = } + * If the value is null or empty-string, this condition is ignored. + * + * @param content The value of content as equal. + */ + public void setContent_Equal(String content) { + registerContent(ConditionKey.CK_EQUAL, filterRemoveEmptyString(content)); + } + + /** + * Set the value of content using notEqual. { != } + * If the value is null or empty-string, this condition is ignored. + * + * @param content The value of content as notEqual. + */ + public void setContent_NotEqual(String content) { + registerContent(ConditionKey.CK_NOT_EQUAL, filterRemoveEmptyString(content)); + } + + /** + * Set the value of content using greaterThan. { > } + * If the value is null or empty-string, this condition is ignored. + * + * @param content The value of content as greaterThan. + */ + public void setContent_GreaterThan(String content) { + registerContent(ConditionKey.CK_GREATER_THAN, filterRemoveEmptyString(content)); + } + + /** + * Set the value of content using lessThan. { < } + * If the value is null or empty-string, this condition is ignored. + * + * @param content The value of content as lessThan. + */ + public void setContent_LessThan(String content) { + registerContent(ConditionKey.CK_LESS_THAN, filterRemoveEmptyString(content)); + } + + /** + * Set the value of content using greaterEqual. { >= } + * If the value is null or empty-string, this condition is ignored. + * + * @param content The value of content as greaterEqual. + */ + public void setContent_GreaterEqual(String content) { + registerContent(ConditionKey.CK_GREATER_EQUAL, filterRemoveEmptyString(content)); + } + + /** + * Set the value of content using lessEqual. { <= } + * If the value is null or empty-string, this condition is ignored. + * + * @param content The value of content as lessEqual. + */ + public void setContent_LessEqual(String content) { + registerContent(ConditionKey.CK_LESS_EQUAL, filterRemoveEmptyString(content)); + } + + /** + * Set the value of content using prefixSearch. { like 'xxx%' } + * If the value is null or empty-string, this condition is ignored. + * + * @param content The value of content as prefixSearch. + */ + public void setContent_PrefixSearch(String content) { + registerContent(ConditionKey.CK_PREFIX_SEARCH, filterRemoveEmptyString(content)); + } + + /** + * Set the value of content using likeSearch. { like '%xxx%' } + * If the value is null or empty-string, this condition is ignored. + * You can invoke this method several times and the conditions are set up. + * + * @param content The value of content as likeSearch. + * @param likeSearchOption Like search option. (NotNull) + */ + public void setContent_LikeSearch(String content, jp.sf.pal.pompei.allcommon.cbean.coption.LikeSearchOption likeSearchOption) { + registerLikeSearchQuery(ConditionKey.CK_LIKE_SEARCH, filterRemoveEmptyString(content), getCValueContent(), COL_CONTENT, J_Content, UJ_content, likeSearchOption); + } + + /** + * Set the value of content using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param contentList The value of content as inScope. + */ + public void setContent_InScope(java.util.List contentList) { + registerContent(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyStringFromList(contentList)); + } + + /** + * Set the value of content using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param content The value of content as inScope. + */ + public void setContent_InScope(String content, jp.sf.pal.pompei.allcommon.cbean.coption.InScopeOption option) { + registerInScopeQuery(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyString(content), getCValueContent(), COL_CONTENT, J_Content, UJ_content, option); + } + + /** + * Set the value of content using notInScope. { not in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param contentList The value of content as notInScope. + */ + public void setContent_NotInScope(java.util.List contentList) { + registerContent(ConditionKey.CK_NOT_IN_SCOPE, filterRemoveEmptyStringFromList(contentList)); + } + + /** + * Register condition of content. + * + * @param key Condition key. (NotNull) + * @param value The value of content. (Nullable) + */ + protected void registerContent(ConditionKey key, Object value) { + registerQuery(key, value, getCValueContent(), COL_CONTENT, J_Content, UJ_content); + } + + /** + * Register inline condition of content. + * + * @param key Condition key. (NotNull) + * @param value The value of content. (Nullable) + */ + protected void registerInlineContent(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueContent(), COL_CONTENT, J_Content, UJ_content); + } + + abstract protected ConditionValue getCValueContent(); + + /** Column db name of module. */ + protected static final String COL_MODULE = "MODULE"; + + /** Column java name of module. */ + protected static final String J_Module = "Module"; + + /** Column uncapitalised java name of module. */ + protected static final String UJ_module = "module"; + + /** + * Set the value of module using equal. { = } + * If the value is null or empty-string, this condition is ignored. + * + * @param module The value of module as equal. + */ + public void setModule_Equal(String module) { + registerModule(ConditionKey.CK_EQUAL, filterRemoveEmptyString(module)); + } + + /** + * Set the value of module using notEqual. { != } + * If the value is null or empty-string, this condition is ignored. + * + * @param module The value of module as notEqual. + */ + public void setModule_NotEqual(String module) { + registerModule(ConditionKey.CK_NOT_EQUAL, filterRemoveEmptyString(module)); + } + + /** + * Set the value of module using greaterThan. { > } + * If the value is null or empty-string, this condition is ignored. + * + * @param module The value of module as greaterThan. + */ + public void setModule_GreaterThan(String module) { + registerModule(ConditionKey.CK_GREATER_THAN, filterRemoveEmptyString(module)); + } + + /** + * Set the value of module using lessThan. { < } + * If the value is null or empty-string, this condition is ignored. + * + * @param module The value of module as lessThan. + */ + public void setModule_LessThan(String module) { + registerModule(ConditionKey.CK_LESS_THAN, filterRemoveEmptyString(module)); + } + + /** + * Set the value of module using greaterEqual. { >= } + * If the value is null or empty-string, this condition is ignored. + * + * @param module The value of module as greaterEqual. + */ + public void setModule_GreaterEqual(String module) { + registerModule(ConditionKey.CK_GREATER_EQUAL, filterRemoveEmptyString(module)); + } + + /** + * Set the value of module using lessEqual. { <= } + * If the value is null or empty-string, this condition is ignored. + * + * @param module The value of module as lessEqual. + */ + public void setModule_LessEqual(String module) { + registerModule(ConditionKey.CK_LESS_EQUAL, filterRemoveEmptyString(module)); + } + + /** + * Set the value of module using prefixSearch. { like 'xxx%' } + * If the value is null or empty-string, this condition is ignored. + * + * @param module The value of module as prefixSearch. + */ + public void setModule_PrefixSearch(String module) { + registerModule(ConditionKey.CK_PREFIX_SEARCH, filterRemoveEmptyString(module)); + } + + /** + * Set the value of module using likeSearch. { like '%xxx%' } + * If the value is null or empty-string, this condition is ignored. + * You can invoke this method several times and the conditions are set up. + * + * @param module The value of module as likeSearch. + * @param likeSearchOption Like search option. (NotNull) + */ + public void setModule_LikeSearch(String module, jp.sf.pal.pompei.allcommon.cbean.coption.LikeSearchOption likeSearchOption) { + registerLikeSearchQuery(ConditionKey.CK_LIKE_SEARCH, filterRemoveEmptyString(module), getCValueModule(), COL_MODULE, J_Module, UJ_module, likeSearchOption); + } + + /** + * Set the value of module using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param moduleList The value of module as inScope. + */ + public void setModule_InScope(java.util.List moduleList) { + registerModule(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyStringFromList(moduleList)); + } + + /** + * Set the value of module using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param module The value of module as inScope. + */ + public void setModule_InScope(String module, jp.sf.pal.pompei.allcommon.cbean.coption.InScopeOption option) { + registerInScopeQuery(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyString(module), getCValueModule(), COL_MODULE, J_Module, UJ_module, option); + } + + /** + * Set the value of module using notInScope. { not in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param moduleList The value of module as notInScope. + */ + public void setModule_NotInScope(java.util.List moduleList) { + registerModule(ConditionKey.CK_NOT_IN_SCOPE, filterRemoveEmptyStringFromList(moduleList)); + } + + /** + * Register condition of module. + * + * @param key Condition key. (NotNull) + * @param value The value of module. (Nullable) + */ + protected void registerModule(ConditionKey key, Object value) { + registerQuery(key, value, getCValueModule(), COL_MODULE, J_Module, UJ_module); + } + + /** + * Register inline condition of module. + * + * @param key Condition key. (NotNull) + * @param value The value of module. (Nullable) + */ + protected void registerInlineModule(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueModule(), COL_MODULE, J_Module, UJ_module); + } + + abstract protected ConditionValue getCValueModule(); + + /** Column db name of dateAdded. */ + protected static final String COL_DATE_ADDED = "DATE_ADDED"; + + /** Column java name of dateAdded. */ + protected static final String J_DateAdded = "DateAdded"; + + /** Column uncapitalised java name of dateAdded. */ + protected static final String UJ_dateAdded = "dateAdded"; + + /** + * Set the value of dateAdded using equal. { = } + * + * @param dateAdded The value of dateAdded as equal. + */ + public void setDateAdded_Equal(java.sql.Timestamp dateAdded) { + registerDateAdded(ConditionKey.CK_EQUAL, dateAdded); + } + + /** + * Set the value of dateAdded using notEqual. { != } + * + * @param dateAdded The value of dateAdded as notEqual. + */ + public void setDateAdded_NotEqual(java.sql.Timestamp dateAdded) { + registerDateAdded(ConditionKey.CK_NOT_EQUAL, dateAdded); + } + + /** + * Set the value of dateAdded using greaterThan. { > } + * + * @param dateAdded The value of dateAdded as greaterThan. + */ + public void setDateAdded_GreaterThan(java.sql.Timestamp dateAdded) { + registerDateAdded(ConditionKey.CK_GREATER_THAN, dateAdded); + } + + /** + * Set the value of dateAdded using lessThan. { < } + * + * @param dateAdded The value of dateAdded as lessThan. + */ + public void setDateAdded_LessThan(java.sql.Timestamp dateAdded) { + registerDateAdded(ConditionKey.CK_LESS_THAN, dateAdded); + } + + /** + * Set the value of dateAdded using greaterEqual. { >= } + * + * @param dateAdded The value of dateAdded as greaterEqual. + */ + public void setDateAdded_GreaterEqual(java.sql.Timestamp dateAdded) { + registerDateAdded(ConditionKey.CK_GREATER_EQUAL, dateAdded); + } + + /** + * Set the value of dateAdded using lessEqual. { <= } + * + * @param dateAdded The value of dateAdded as lessEqual. + */ + public void setDateAdded_LessEqual(java.sql.Timestamp dateAdded) { + registerDateAdded(ConditionKey.CK_LESS_EQUAL, dateAdded); + } + + /** + * Set the value of dateAdded using from-to. { $fromDate <= COLUMN_NAME <= $toDate } + * + * @param dateAdded The value of dateAdded as from-to. + * @param fromToOption From-To option. (NotNull) + */ + public void setDateAdded_FromTo(java.sql.Timestamp fromDate, java.sql.Timestamp toDate, jp.sf.pal.pompei.allcommon.cbean.coption.FromToOption fromToOption) { + registerFromToQuery(fromDate, toDate, getCValueDateAdded(), COL_DATE_ADDED, J_DateAdded, UJ_dateAdded, fromToOption); + } + + /** + * Register condition of dateAdded. + * + * @param key Condition key. (NotNull) + * @param value The value of dateAdded. (Nullable) + */ + protected void registerDateAdded(ConditionKey key, Object value) { + registerQuery(key, value, getCValueDateAdded(), COL_DATE_ADDED, J_DateAdded, UJ_dateAdded); + } + + /** + * Register inline condition of dateAdded. + * + * @param key Condition key. (NotNull) + * @param value The value of dateAdded. (Nullable) + */ + protected void registerInlineDateAdded(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueDateAdded(), COL_DATE_ADDED, J_DateAdded, UJ_dateAdded); + } + + abstract protected ConditionValue getCValueDateAdded(); + + /** Column db name of dateSent. */ + protected static final String COL_DATE_SENT = "DATE_SENT"; + + /** Column java name of dateSent. */ + protected static final String J_DateSent = "DateSent"; + + /** Column uncapitalised java name of dateSent. */ + protected static final String UJ_dateSent = "dateSent"; + + /** + * Set the value of dateSent using equal. { = } + * + * @param dateSent The value of dateSent as equal. + */ + public void setDateSent_Equal(java.sql.Timestamp dateSent) { + registerDateSent(ConditionKey.CK_EQUAL, dateSent); + } + + /** + * Set the value of dateSent using notEqual. { != } + * + * @param dateSent The value of dateSent as notEqual. + */ + public void setDateSent_NotEqual(java.sql.Timestamp dateSent) { + registerDateSent(ConditionKey.CK_NOT_EQUAL, dateSent); + } + + /** + * Set the value of dateSent using greaterThan. { > } + * + * @param dateSent The value of dateSent as greaterThan. + */ + public void setDateSent_GreaterThan(java.sql.Timestamp dateSent) { + registerDateSent(ConditionKey.CK_GREATER_THAN, dateSent); + } + + /** + * Set the value of dateSent using lessThan. { < } + * + * @param dateSent The value of dateSent as lessThan. + */ + public void setDateSent_LessThan(java.sql.Timestamp dateSent) { + registerDateSent(ConditionKey.CK_LESS_THAN, dateSent); + } + + /** + * Set the value of dateSent using greaterEqual. { >= } + * + * @param dateSent The value of dateSent as greaterEqual. + */ + public void setDateSent_GreaterEqual(java.sql.Timestamp dateSent) { + registerDateSent(ConditionKey.CK_GREATER_EQUAL, dateSent); + } + + /** + * Set the value of dateSent using lessEqual. { <= } + * + * @param dateSent The value of dateSent as lessEqual. + */ + public void setDateSent_LessEqual(java.sql.Timestamp dateSent) { + registerDateSent(ConditionKey.CK_LESS_EQUAL, dateSent); + } + + /** + * Set the value of dateSent using from-to. { $fromDate <= COLUMN_NAME <= $toDate } + * + * @param dateSent The value of dateSent as from-to. + * @param fromToOption From-To option. (NotNull) + */ + public void setDateSent_FromTo(java.sql.Timestamp fromDate, java.sql.Timestamp toDate, jp.sf.pal.pompei.allcommon.cbean.coption.FromToOption fromToOption) { + registerFromToQuery(fromDate, toDate, getCValueDateSent(), COL_DATE_SENT, J_DateSent, UJ_dateSent, fromToOption); + } + + /** + * Set the value of dateSent using isNull. { is null } + */ + public void setDateSent_IsNull() { + registerDateSent(ConditionKey.CK_IS_NULL, DUMMY_OBJECT); + } + + /** + * Set the value of dateSent using isNotNull. { is not null } + */ + public void setDateSent_IsNotNull() { + registerDateSent(ConditionKey.CK_IS_NOT_NULL, DUMMY_OBJECT); + } + + /** + * Register condition of dateSent. + * + * @param key Condition key. (NotNull) + * @param value The value of dateSent. (Nullable) + */ + protected void registerDateSent(ConditionKey key, Object value) { + registerQuery(key, value, getCValueDateSent(), COL_DATE_SENT, J_DateSent, UJ_dateSent); + } + + /** + * Register inline condition of dateSent. + * + * @param key Condition key. (NotNull) + * @param value The value of dateSent. (Nullable) + */ + protected void registerInlineDateSent(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueDateSent(), COL_DATE_SENT, J_DateSent, UJ_dateSent); + } + + abstract protected ConditionValue getCValueDateSent(); + + /** Column db name of status. */ + protected static final String COL_STATUS = "STATUS"; + + /** Column java name of status. */ + protected static final String J_Status = "Status"; + + /** Column uncapitalised java name of status. */ + protected static final String UJ_status = "status"; + + /** + * Set the value of status using equal. { = } + * + * @param status The value of status as equal. + */ + public void setStatus_Equal(java.math.BigDecimal status) { + registerStatus(ConditionKey.CK_EQUAL, status); + } + + /** + * Set the value of status using notEqual. { != } + * + * @param status The value of status as notEqual. + */ + public void setStatus_NotEqual(java.math.BigDecimal status) { + registerStatus(ConditionKey.CK_NOT_EQUAL, status); + } + + /** + * Set the value of status using greaterThan. { > } + * + * @param status The value of status as greaterThan. + */ + public void setStatus_GreaterThan(java.math.BigDecimal status) { + registerStatus(ConditionKey.CK_GREATER_THAN, status); + } + + /** + * Set the value of status using lessThan. { < } + * + * @param status The value of status as lessThan. + */ + public void setStatus_LessThan(java.math.BigDecimal status) { + registerStatus(ConditionKey.CK_LESS_THAN, status); + } + + /** + * Set the value of status using greaterEqual. { >= } + * + * @param status The value of status as greaterEqual. + */ + public void setStatus_GreaterEqual(java.math.BigDecimal status) { + registerStatus(ConditionKey.CK_GREATER_EQUAL, status); + } + + /** + * Set the value of status using lessEqual. { <= } + * + * @param status The value of status as lessEqual. + */ + public void setStatus_LessEqual(java.math.BigDecimal status) { + registerStatus(ConditionKey.CK_LESS_EQUAL, status); + } + + /** + * Set the value of status using inScope. { in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param statusList The value of status as inScope. + */ + public void setStatus_InScope(java.util.List statusList) { + registerStatus(ConditionKey.CK_IN_SCOPE, statusList); + } + + /** + * Set the value of status using notInScope. { not in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param statusList The value of status as notInScope. + */ + public void setStatus_NotInScope(java.util.List statusList) { + registerStatus(ConditionKey.CK_NOT_IN_SCOPE, statusList); + } + + /** + * Set the value of status using isNull. { is null } + */ + public void setStatus_IsNull() { + registerStatus(ConditionKey.CK_IS_NULL, DUMMY_OBJECT); + } + + /** + * Set the value of status using isNotNull. { is not null } + */ + public void setStatus_IsNotNull() { + registerStatus(ConditionKey.CK_IS_NOT_NULL, DUMMY_OBJECT); + } + + /** + * Register condition of status. + * + * @param key Condition key. (NotNull) + * @param value The value of status. (Nullable) + */ + protected void registerStatus(ConditionKey key, Object value) { + registerQuery(key, value, getCValueStatus(), COL_STATUS, J_Status, UJ_status); + } + + /** + * Register inline condition of status. + * + * @param key Condition key. (NotNull) + * @param value The value of status. (Nullable) + */ + protected void registerInlineStatus(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueStatus(), COL_STATUS, J_Status, UJ_status); + } + + abstract protected ConditionValue getCValueStatus(); + + /** Column db name of locked. */ + protected static final String COL_LOCKED = "LOCKED"; + + /** Column java name of locked. */ + protected static final String J_Locked = "Locked"; + + /** Column uncapitalised java name of locked. */ + protected static final String UJ_locked = "locked"; + + /** + * Set the value of locked using equal. { = } + * + * @param locked The value of locked as equal. + */ + public void setLocked_Equal(java.math.BigDecimal locked) { + registerLocked(ConditionKey.CK_EQUAL, locked); + } + + /** + * Set the value of locked using notEqual. { != } + * + * @param locked The value of locked as notEqual. + */ + public void setLocked_NotEqual(java.math.BigDecimal locked) { + registerLocked(ConditionKey.CK_NOT_EQUAL, locked); + } + + /** + * Set the value of locked using greaterThan. { > } + * + * @param locked The value of locked as greaterThan. + */ + public void setLocked_GreaterThan(java.math.BigDecimal locked) { + registerLocked(ConditionKey.CK_GREATER_THAN, locked); + } + + /** + * Set the value of locked using lessThan. { < } + * + * @param locked The value of locked as lessThan. + */ + public void setLocked_LessThan(java.math.BigDecimal locked) { + registerLocked(ConditionKey.CK_LESS_THAN, locked); + } + + /** + * Set the value of locked using greaterEqual. { >= } + * + * @param locked The value of locked as greaterEqual. + */ + public void setLocked_GreaterEqual(java.math.BigDecimal locked) { + registerLocked(ConditionKey.CK_GREATER_EQUAL, locked); + } + + /** + * Set the value of locked using lessEqual. { <= } + * + * @param locked The value of locked as lessEqual. + */ + public void setLocked_LessEqual(java.math.BigDecimal locked) { + registerLocked(ConditionKey.CK_LESS_EQUAL, locked); + } + + /** + * Set the value of locked using inScope. { in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param lockedList The value of locked as inScope. + */ + public void setLocked_InScope(java.util.List lockedList) { + registerLocked(ConditionKey.CK_IN_SCOPE, lockedList); + } + + /** + * Set the value of locked using notInScope. { not in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param lockedList The value of locked as notInScope. + */ + public void setLocked_NotInScope(java.util.List lockedList) { + registerLocked(ConditionKey.CK_NOT_IN_SCOPE, lockedList); + } + + /** + * Set the value of locked using isNull. { is null } + */ + public void setLocked_IsNull() { + registerLocked(ConditionKey.CK_IS_NULL, DUMMY_OBJECT); + } + + /** + * Set the value of locked using isNotNull. { is not null } + */ + public void setLocked_IsNotNull() { + registerLocked(ConditionKey.CK_IS_NOT_NULL, DUMMY_OBJECT); + } + + /** + * Register condition of locked. + * + * @param key Condition key. (NotNull) + * @param value The value of locked. (Nullable) + */ + protected void registerLocked(ConditionKey key, Object value) { + registerQuery(key, value, getCValueLocked(), COL_LOCKED, J_Locked, UJ_locked); + } + + /** + * Register inline condition of locked. + * + * @param key Condition key. (NotNull) + * @param value The value of locked. (Nullable) + */ + protected void registerInlineLocked(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueLocked(), COL_LOCKED, J_Locked, UJ_locked); + } + + abstract protected ConditionValue getCValueLocked(); + + // =================================================================================== + // Basic Override + // ============== + /** + * This method overrides the method that is declared at super. + * + * @return Clause string. (NotNull) + */ + public String toString() { + return getSqlClause().getClause(); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/AbstractBsOrdersCQ.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/AbstractBsOrdersCQ.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/AbstractBsOrdersCQ.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,5914 @@ + +package jp.sf.pal.pompei.cbean.cq.bs; + + + +import jp.sf.pal.pompei.allcommon.cbean.*; +import jp.sf.pal.pompei.allcommon.cbean.ckey.*; +import jp.sf.pal.pompei.allcommon.cbean.cvalue.ConditionValue; +import jp.sf.pal.pompei.allcommon.cbean.sqlclause.SqlClause; +import jp.sf.pal.pompei.cbean.cq.*; + +/** + * The condition-query of ORDERS. + * + * @author DBFlute(AutoGenerator) + */ +public abstract class AbstractBsOrdersCQ extends AbstractConditionQuery { + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param childQuery Child query as abstract class. (Nullable: If null, this is base instance.) + * @param sqlClause SQL clause instance. (NotNull) + * @param aliasName My alias name. (NotNull) + * @param nestLevel Nest level. + */ + public AbstractBsOrdersCQ(ConditionQuery childQuery, SqlClause sqlClause, String aliasName, int nestLevel) { + super(childQuery, sqlClause, aliasName, nestLevel); + } + + // =================================================================================== + // Table Name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + final public String getTableDbName() { + return "ORDERS"; + } + + // =================================================================================== + // Query + // ===== + + // /* * * * * * * * * * * * * * * * * * * * * * * + // MyTable = [ORDERS] + // * * * * * * * * */ + + + /** Column db name of ordersId. */ + protected static final String COL_ORDERS_ID = "ORDERS_ID"; + + /** Column java name of ordersId. */ + protected static final String J_OrdersId = "OrdersId"; + + /** Column uncapitalised java name of ordersId. */ + protected static final String UJ_ordersId = "ordersId"; + + /** + * Set the value of ordersId using equal. { = } + * + * @param ordersId The value of ordersId as equal. + */ + public void setOrdersId_Equal(java.math.BigDecimal ordersId) { + registerOrdersId(ConditionKey.CK_EQUAL, ordersId); + } + + /** + * Set the value of ordersId using notEqual. { != } + * + * @param ordersId The value of ordersId as notEqual. + */ + public void setOrdersId_NotEqual(java.math.BigDecimal ordersId) { + registerOrdersId(ConditionKey.CK_NOT_EQUAL, ordersId); + } + + /** + * Set the value of ordersId using greaterThan. { > } + * + * @param ordersId The value of ordersId as greaterThan. + */ + public void setOrdersId_GreaterThan(java.math.BigDecimal ordersId) { + registerOrdersId(ConditionKey.CK_GREATER_THAN, ordersId); + } + + /** + * Set the value of ordersId using lessThan. { < } + * + * @param ordersId The value of ordersId as lessThan. + */ + public void setOrdersId_LessThan(java.math.BigDecimal ordersId) { + registerOrdersId(ConditionKey.CK_LESS_THAN, ordersId); + } + + /** + * Set the value of ordersId using greaterEqual. { >= } + * + * @param ordersId The value of ordersId as greaterEqual. + */ + public void setOrdersId_GreaterEqual(java.math.BigDecimal ordersId) { + registerOrdersId(ConditionKey.CK_GREATER_EQUAL, ordersId); + } + + /** + * Set the value of ordersId using lessEqual. { <= } + * + * @param ordersId The value of ordersId as lessEqual. + */ + public void setOrdersId_LessEqual(java.math.BigDecimal ordersId) { + registerOrdersId(ConditionKey.CK_LESS_EQUAL, ordersId); + } + + /** + * Set the value of ordersId using inScope. { in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param ordersIdList The value of ordersId as inScope. + */ + public void setOrdersId_InScope(java.util.List ordersIdList) { + registerOrdersId(ConditionKey.CK_IN_SCOPE, ordersIdList); + } + + /** + * Set the value of ordersId using notInScope. { not in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param ordersIdList The value of ordersId as notInScope. + */ + public void setOrdersId_NotInScope(java.util.List ordersIdList) { + registerOrdersId(ConditionKey.CK_NOT_IN_SCOPE, ordersIdList); + } + + /** + * Register condition of ordersId. + * + * @param key Condition key. (NotNull) + * @param value The value of ordersId. (Nullable) + */ + protected void registerOrdersId(ConditionKey key, Object value) { + registerQuery(key, value, getCValueOrdersId(), COL_ORDERS_ID, J_OrdersId, UJ_ordersId); + } + + /** + * Register inline condition of ordersId. + * + * @param key Condition key. (NotNull) + * @param value The value of ordersId. (Nullable) + */ + protected void registerInlineOrdersId(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueOrdersId(), COL_ORDERS_ID, J_OrdersId, UJ_ordersId); + } + + abstract protected ConditionValue getCValueOrdersId(); + + /** Column db name of customersId. */ + protected static final String COL_CUSTOMERS_ID = "CUSTOMERS_ID"; + + /** Column java name of customersId. */ + protected static final String J_CustomersId = "CustomersId"; + + /** Column uncapitalised java name of customersId. */ + protected static final String UJ_customersId = "customersId"; + + /** + * Set the value of customersId using equal. { = } + * + * @param customersId The value of customersId as equal. + */ + public void setCustomersId_Equal(java.math.BigDecimal customersId) { + registerCustomersId(ConditionKey.CK_EQUAL, customersId); + } + + /** + * Set the value of customersId using notEqual. { != } + * + * @param customersId The value of customersId as notEqual. + */ + public void setCustomersId_NotEqual(java.math.BigDecimal customersId) { + registerCustomersId(ConditionKey.CK_NOT_EQUAL, customersId); + } + + /** + * Set the value of customersId using greaterThan. { > } + * + * @param customersId The value of customersId as greaterThan. + */ + public void setCustomersId_GreaterThan(java.math.BigDecimal customersId) { + registerCustomersId(ConditionKey.CK_GREATER_THAN, customersId); + } + + /** + * Set the value of customersId using lessThan. { < } + * + * @param customersId The value of customersId as lessThan. + */ + public void setCustomersId_LessThan(java.math.BigDecimal customersId) { + registerCustomersId(ConditionKey.CK_LESS_THAN, customersId); + } + + /** + * Set the value of customersId using greaterEqual. { >= } + * + * @param customersId The value of customersId as greaterEqual. + */ + public void setCustomersId_GreaterEqual(java.math.BigDecimal customersId) { + registerCustomersId(ConditionKey.CK_GREATER_EQUAL, customersId); + } + + /** + * Set the value of customersId using lessEqual. { <= } + * + * @param customersId The value of customersId as lessEqual. + */ + public void setCustomersId_LessEqual(java.math.BigDecimal customersId) { + registerCustomersId(ConditionKey.CK_LESS_EQUAL, customersId); + } + + /** + * Set the value of customersId using inScope. { in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param customersIdList The value of customersId as inScope. + */ + public void setCustomersId_InScope(java.util.List customersIdList) { + registerCustomersId(ConditionKey.CK_IN_SCOPE, customersIdList); + } + + /** + * Set the value of customersId using notInScope. { not in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param customersIdList The value of customersId as notInScope. + */ + public void setCustomersId_NotInScope(java.util.List customersIdList) { + registerCustomersId(ConditionKey.CK_NOT_IN_SCOPE, customersIdList); + } + + /** + * Register condition of customersId. + * + * @param key Condition key. (NotNull) + * @param value The value of customersId. (Nullable) + */ + protected void registerCustomersId(ConditionKey key, Object value) { + registerQuery(key, value, getCValueCustomersId(), COL_CUSTOMERS_ID, J_CustomersId, UJ_customersId); + } + + /** + * Register inline condition of customersId. + * + * @param key Condition key. (NotNull) + * @param value The value of customersId. (Nullable) + */ + protected void registerInlineCustomersId(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueCustomersId(), COL_CUSTOMERS_ID, J_CustomersId, UJ_customersId); + } + + abstract protected ConditionValue getCValueCustomersId(); + + /** Column db name of customersName. */ + protected static final String COL_CUSTOMERS_NAME = "CUSTOMERS_NAME"; + + /** Column java name of customersName. */ + protected static final String J_CustomersName = "CustomersName"; + + /** Column uncapitalised java name of customersName. */ + protected static final String UJ_customersName = "customersName"; + + /** + * Set the value of customersName using equal. { = } + * If the value is null or empty-string, this condition is ignored. + * + * @param customersName The value of customersName as equal. + */ + public void setCustomersName_Equal(String customersName) { + registerCustomersName(ConditionKey.CK_EQUAL, filterRemoveEmptyString(customersName)); + } + + /** + * Set the value of customersName using notEqual. { != } + * If the value is null or empty-string, this condition is ignored. + * + * @param customersName The value of customersName as notEqual. + */ + public void setCustomersName_NotEqual(String customersName) { + registerCustomersName(ConditionKey.CK_NOT_EQUAL, filterRemoveEmptyString(customersName)); + } + + /** + * Set the value of customersName using greaterThan. { > } + * If the value is null or empty-string, this condition is ignored. + * + * @param customersName The value of customersName as greaterThan. + */ + public void setCustomersName_GreaterThan(String customersName) { + registerCustomersName(ConditionKey.CK_GREATER_THAN, filterRemoveEmptyString(customersName)); + } + + /** + * Set the value of customersName using lessThan. { < } + * If the value is null or empty-string, this condition is ignored. + * + * @param customersName The value of customersName as lessThan. + */ + public void setCustomersName_LessThan(String customersName) { + registerCustomersName(ConditionKey.CK_LESS_THAN, filterRemoveEmptyString(customersName)); + } + + /** + * Set the value of customersName using greaterEqual. { >= } + * If the value is null or empty-string, this condition is ignored. + * + * @param customersName The value of customersName as greaterEqual. + */ + public void setCustomersName_GreaterEqual(String customersName) { + registerCustomersName(ConditionKey.CK_GREATER_EQUAL, filterRemoveEmptyString(customersName)); + } + + /** + * Set the value of customersName using lessEqual. { <= } + * If the value is null or empty-string, this condition is ignored. + * + * @param customersName The value of customersName as lessEqual. + */ + public void setCustomersName_LessEqual(String customersName) { + registerCustomersName(ConditionKey.CK_LESS_EQUAL, filterRemoveEmptyString(customersName)); + } + + /** + * Set the value of customersName using prefixSearch. { like 'xxx%' } + * If the value is null or empty-string, this condition is ignored. + * + * @param customersName The value of customersName as prefixSearch. + */ + public void setCustomersName_PrefixSearch(String customersName) { + registerCustomersName(ConditionKey.CK_PREFIX_SEARCH, filterRemoveEmptyString(customersName)); + } + + /** + * Set the value of customersName using likeSearch. { like '%xxx%' } + * If the value is null or empty-string, this condition is ignored. + * You can invoke this method several times and the conditions are set up. + * + * @param customersName The value of customersName as likeSearch. + * @param likeSearchOption Like search option. (NotNull) + */ + public void setCustomersName_LikeSearch(String customersName, jp.sf.pal.pompei.allcommon.cbean.coption.LikeSearchOption likeSearchOption) { + registerLikeSearchQuery(ConditionKey.CK_LIKE_SEARCH, filterRemoveEmptyString(customersName), getCValueCustomersName(), COL_CUSTOMERS_NAME, J_CustomersName, UJ_customersName, likeSearchOption); + } + + /** + * Set the value of customersName using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param customersNameList The value of customersName as inScope. + */ + public void setCustomersName_InScope(java.util.List customersNameList) { + registerCustomersName(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyStringFromList(customersNameList)); + } + + /** + * Set the value of customersName using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param customersName The value of customersName as inScope. + */ + public void setCustomersName_InScope(String customersName, jp.sf.pal.pompei.allcommon.cbean.coption.InScopeOption option) { + registerInScopeQuery(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyString(customersName), getCValueCustomersName(), COL_CUSTOMERS_NAME, J_CustomersName, UJ_customersName, option); + } + + /** + * Set the value of customersName using notInScope. { not in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param customersNameList The value of customersName as notInScope. + */ + public void setCustomersName_NotInScope(java.util.List customersNameList) { + registerCustomersName(ConditionKey.CK_NOT_IN_SCOPE, filterRemoveEmptyStringFromList(customersNameList)); + } + + /** + * Register condition of customersName. + * + * @param key Condition key. (NotNull) + * @param value The value of customersName. (Nullable) + */ + protected void registerCustomersName(ConditionKey key, Object value) { + registerQuery(key, value, getCValueCustomersName(), COL_CUSTOMERS_NAME, J_CustomersName, UJ_customersName); + } + + /** + * Register inline condition of customersName. + * + * @param key Condition key. (NotNull) + * @param value The value of customersName. (Nullable) + */ + protected void registerInlineCustomersName(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueCustomersName(), COL_CUSTOMERS_NAME, J_CustomersName, UJ_customersName); + } + + abstract protected ConditionValue getCValueCustomersName(); + + /** Column db name of customersCompany. */ + protected static final String COL_CUSTOMERS_COMPANY = "CUSTOMERS_COMPANY"; + + /** Column java name of customersCompany. */ + protected static final String J_CustomersCompany = "CustomersCompany"; + + /** Column uncapitalised java name of customersCompany. */ + protected static final String UJ_customersCompany = "customersCompany"; + + /** + * Set the value of customersCompany using equal. { = } + * If the value is null or empty-string, this condition is ignored. + * + * @param customersCompany The value of customersCompany as equal. + */ + public void setCustomersCompany_Equal(String customersCompany) { + registerCustomersCompany(ConditionKey.CK_EQUAL, filterRemoveEmptyString(customersCompany)); + } + + /** + * Set the value of customersCompany using notEqual. { != } + * If the value is null or empty-string, this condition is ignored. + * + * @param customersCompany The value of customersCompany as notEqual. + */ + public void setCustomersCompany_NotEqual(String customersCompany) { + registerCustomersCompany(ConditionKey.CK_NOT_EQUAL, filterRemoveEmptyString(customersCompany)); + } + + /** + * Set the value of customersCompany using greaterThan. { > } + * If the value is null or empty-string, this condition is ignored. + * + * @param customersCompany The value of customersCompany as greaterThan. + */ + public void setCustomersCompany_GreaterThan(String customersCompany) { + registerCustomersCompany(ConditionKey.CK_GREATER_THAN, filterRemoveEmptyString(customersCompany)); + } + + /** + * Set the value of customersCompany using lessThan. { < } + * If the value is null or empty-string, this condition is ignored. + * + * @param customersCompany The value of customersCompany as lessThan. + */ + public void setCustomersCompany_LessThan(String customersCompany) { + registerCustomersCompany(ConditionKey.CK_LESS_THAN, filterRemoveEmptyString(customersCompany)); + } + + /** + * Set the value of customersCompany using greaterEqual. { >= } + * If the value is null or empty-string, this condition is ignored. + * + * @param customersCompany The value of customersCompany as greaterEqual. + */ + public void setCustomersCompany_GreaterEqual(String customersCompany) { + registerCustomersCompany(ConditionKey.CK_GREATER_EQUAL, filterRemoveEmptyString(customersCompany)); + } + + /** + * Set the value of customersCompany using lessEqual. { <= } + * If the value is null or empty-string, this condition is ignored. + * + * @param customersCompany The value of customersCompany as lessEqual. + */ + public void setCustomersCompany_LessEqual(String customersCompany) { + registerCustomersCompany(ConditionKey.CK_LESS_EQUAL, filterRemoveEmptyString(customersCompany)); + } + + /** + * Set the value of customersCompany using prefixSearch. { like 'xxx%' } + * If the value is null or empty-string, this condition is ignored. + * + * @param customersCompany The value of customersCompany as prefixSearch. + */ + public void setCustomersCompany_PrefixSearch(String customersCompany) { + registerCustomersCompany(ConditionKey.CK_PREFIX_SEARCH, filterRemoveEmptyString(customersCompany)); + } + + /** + * Set the value of customersCompany using likeSearch. { like '%xxx%' } + * If the value is null or empty-string, this condition is ignored. + * You can invoke this method several times and the conditions are set up. + * + * @param customersCompany The value of customersCompany as likeSearch. + * @param likeSearchOption Like search option. (NotNull) + */ + public void setCustomersCompany_LikeSearch(String customersCompany, jp.sf.pal.pompei.allcommon.cbean.coption.LikeSearchOption likeSearchOption) { + registerLikeSearchQuery(ConditionKey.CK_LIKE_SEARCH, filterRemoveEmptyString(customersCompany), getCValueCustomersCompany(), COL_CUSTOMERS_COMPANY, J_CustomersCompany, UJ_customersCompany, likeSearchOption); + } + + /** + * Set the value of customersCompany using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param customersCompanyList The value of customersCompany as inScope. + */ + public void setCustomersCompany_InScope(java.util.List customersCompanyList) { + registerCustomersCompany(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyStringFromList(customersCompanyList)); + } + + /** + * Set the value of customersCompany using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param customersCompany The value of customersCompany as inScope. + */ + public void setCustomersCompany_InScope(String customersCompany, jp.sf.pal.pompei.allcommon.cbean.coption.InScopeOption option) { + registerInScopeQuery(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyString(customersCompany), getCValueCustomersCompany(), COL_CUSTOMERS_COMPANY, J_CustomersCompany, UJ_customersCompany, option); + } + + /** + * Set the value of customersCompany using notInScope. { not in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param customersCompanyList The value of customersCompany as notInScope. + */ + public void setCustomersCompany_NotInScope(java.util.List customersCompanyList) { + registerCustomersCompany(ConditionKey.CK_NOT_IN_SCOPE, filterRemoveEmptyStringFromList(customersCompanyList)); + } + + /** + * Set the value of customersCompany using isNull. { is null } + */ + public void setCustomersCompany_IsNull() { + registerCustomersCompany(ConditionKey.CK_IS_NULL, DUMMY_OBJECT); + } + + /** + * Set the value of customersCompany using isNotNull. { is not null } + */ + public void setCustomersCompany_IsNotNull() { + registerCustomersCompany(ConditionKey.CK_IS_NOT_NULL, DUMMY_OBJECT); + } + + /** + * Register condition of customersCompany. + * + * @param key Condition key. (NotNull) + * @param value The value of customersCompany. (Nullable) + */ + protected void registerCustomersCompany(ConditionKey key, Object value) { + registerQuery(key, value, getCValueCustomersCompany(), COL_CUSTOMERS_COMPANY, J_CustomersCompany, UJ_customersCompany); + } + + /** + * Register inline condition of customersCompany. + * + * @param key Condition key. (NotNull) + * @param value The value of customersCompany. (Nullable) + */ + protected void registerInlineCustomersCompany(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueCustomersCompany(), COL_CUSTOMERS_COMPANY, J_CustomersCompany, UJ_customersCompany); + } + + abstract protected ConditionValue getCValueCustomersCompany(); + + /** Column db name of customersStreetAddress. */ + protected static final String COL_CUSTOMERS_STREET_ADDRESS = "CUSTOMERS_STREET_ADDRESS"; + + /** Column java name of customersStreetAddress. */ + protected static final String J_CustomersStreetAddress = "CustomersStreetAddress"; + + /** Column uncapitalised java name of customersStreetAddress. */ + protected static final String UJ_customersStreetAddress = "customersStreetAddress"; + + /** + * Set the value of customersStreetAddress using equal. { = } + * If the value is null or empty-string, this condition is ignored. + * + * @param customersStreetAddress The value of customersStreetAddress as equal. + */ + public void setCustomersStreetAddress_Equal(String customersStreetAddress) { + registerCustomersStreetAddress(ConditionKey.CK_EQUAL, filterRemoveEmptyString(customersStreetAddress)); + } + + /** + * Set the value of customersStreetAddress using notEqual. { != } + * If the value is null or empty-string, this condition is ignored. + * + * @param customersStreetAddress The value of customersStreetAddress as notEqual. + */ + public void setCustomersStreetAddress_NotEqual(String customersStreetAddress) { + registerCustomersStreetAddress(ConditionKey.CK_NOT_EQUAL, filterRemoveEmptyString(customersStreetAddress)); + } + + /** + * Set the value of customersStreetAddress using greaterThan. { > } + * If the value is null or empty-string, this condition is ignored. + * + * @param customersStreetAddress The value of customersStreetAddress as greaterThan. + */ + public void setCustomersStreetAddress_GreaterThan(String customersStreetAddress) { + registerCustomersStreetAddress(ConditionKey.CK_GREATER_THAN, filterRemoveEmptyString(customersStreetAddress)); + } + + /** + * Set the value of customersStreetAddress using lessThan. { < } + * If the value is null or empty-string, this condition is ignored. + * + * @param customersStreetAddress The value of customersStreetAddress as lessThan. + */ + public void setCustomersStreetAddress_LessThan(String customersStreetAddress) { + registerCustomersStreetAddress(ConditionKey.CK_LESS_THAN, filterRemoveEmptyString(customersStreetAddress)); + } + + /** + * Set the value of customersStreetAddress using greaterEqual. { >= } + * If the value is null or empty-string, this condition is ignored. + * + * @param customersStreetAddress The value of customersStreetAddress as greaterEqual. + */ + public void setCustomersStreetAddress_GreaterEqual(String customersStreetAddress) { + registerCustomersStreetAddress(ConditionKey.CK_GREATER_EQUAL, filterRemoveEmptyString(customersStreetAddress)); + } + + /** + * Set the value of customersStreetAddress using lessEqual. { <= } + * If the value is null or empty-string, this condition is ignored. + * + * @param customersStreetAddress The value of customersStreetAddress as lessEqual. + */ + public void setCustomersStreetAddress_LessEqual(String customersStreetAddress) { + registerCustomersStreetAddress(ConditionKey.CK_LESS_EQUAL, filterRemoveEmptyString(customersStreetAddress)); + } + + /** + * Set the value of customersStreetAddress using prefixSearch. { like 'xxx%' } + * If the value is null or empty-string, this condition is ignored. + * + * @param customersStreetAddress The value of customersStreetAddress as prefixSearch. + */ + public void setCustomersStreetAddress_PrefixSearch(String customersStreetAddress) { + registerCustomersStreetAddress(ConditionKey.CK_PREFIX_SEARCH, filterRemoveEmptyString(customersStreetAddress)); + } + + /** + * Set the value of customersStreetAddress using likeSearch. { like '%xxx%' } + * If the value is null or empty-string, this condition is ignored. + * You can invoke this method several times and the conditions are set up. + * + * @param customersStreetAddress The value of customersStreetAddress as likeSearch. + * @param likeSearchOption Like search option. (NotNull) + */ + public void setCustomersStreetAddress_LikeSearch(String customersStreetAddress, jp.sf.pal.pompei.allcommon.cbean.coption.LikeSearchOption likeSearchOption) { + registerLikeSearchQuery(ConditionKey.CK_LIKE_SEARCH, filterRemoveEmptyString(customersStreetAddress), getCValueCustomersStreetAddress(), COL_CUSTOMERS_STREET_ADDRESS, J_CustomersStreetAddress, UJ_customersStreetAddress, likeSearchOption); + } + + /** + * Set the value of customersStreetAddress using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param customersStreetAddressList The value of customersStreetAddress as inScope. + */ + public void setCustomersStreetAddress_InScope(java.util.List customersStreetAddressList) { + registerCustomersStreetAddress(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyStringFromList(customersStreetAddressList)); + } + + /** + * Set the value of customersStreetAddress using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param customersStreetAddress The value of customersStreetAddress as inScope. + */ + public void setCustomersStreetAddress_InScope(String customersStreetAddress, jp.sf.pal.pompei.allcommon.cbean.coption.InScopeOption option) { + registerInScopeQuery(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyString(customersStreetAddress), getCValueCustomersStreetAddress(), COL_CUSTOMERS_STREET_ADDRESS, J_CustomersStreetAddress, UJ_customersStreetAddress, option); + } + + /** + * Set the value of customersStreetAddress using notInScope. { not in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param customersStreetAddressList The value of customersStreetAddress as notInScope. + */ + public void setCustomersStreetAddress_NotInScope(java.util.List customersStreetAddressList) { + registerCustomersStreetAddress(ConditionKey.CK_NOT_IN_SCOPE, filterRemoveEmptyStringFromList(customersStreetAddressList)); + } + + /** + * Register condition of customersStreetAddress. + * + * @param key Condition key. (NotNull) + * @param value The value of customersStreetAddress. (Nullable) + */ + protected void registerCustomersStreetAddress(ConditionKey key, Object value) { + registerQuery(key, value, getCValueCustomersStreetAddress(), COL_CUSTOMERS_STREET_ADDRESS, J_CustomersStreetAddress, UJ_customersStreetAddress); + } + + /** + * Register inline condition of customersStreetAddress. + * + * @param key Condition key. (NotNull) + * @param value The value of customersStreetAddress. (Nullable) + */ + protected void registerInlineCustomersStreetAddress(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueCustomersStreetAddress(), COL_CUSTOMERS_STREET_ADDRESS, J_CustomersStreetAddress, UJ_customersStreetAddress); + } + + abstract protected ConditionValue getCValueCustomersStreetAddress(); + + /** Column db name of customersSuburb. */ + protected static final String COL_CUSTOMERS_SUBURB = "CUSTOMERS_SUBURB"; + + /** Column java name of customersSuburb. */ + protected static final String J_CustomersSuburb = "CustomersSuburb"; + + /** Column uncapitalised java name of customersSuburb. */ + protected static final String UJ_customersSuburb = "customersSuburb"; + + /** + * Set the value of customersSuburb using equal. { = } + * If the value is null or empty-string, this condition is ignored. + * + * @param customersSuburb The value of customersSuburb as equal. + */ + public void setCustomersSuburb_Equal(String customersSuburb) { + registerCustomersSuburb(ConditionKey.CK_EQUAL, filterRemoveEmptyString(customersSuburb)); + } + + /** + * Set the value of customersSuburb using notEqual. { != } + * If the value is null or empty-string, this condition is ignored. + * + * @param customersSuburb The value of customersSuburb as notEqual. + */ + public void setCustomersSuburb_NotEqual(String customersSuburb) { + registerCustomersSuburb(ConditionKey.CK_NOT_EQUAL, filterRemoveEmptyString(customersSuburb)); + } + + /** + * Set the value of customersSuburb using greaterThan. { > } + * If the value is null or empty-string, this condition is ignored. + * + * @param customersSuburb The value of customersSuburb as greaterThan. + */ + public void setCustomersSuburb_GreaterThan(String customersSuburb) { + registerCustomersSuburb(ConditionKey.CK_GREATER_THAN, filterRemoveEmptyString(customersSuburb)); + } + + /** + * Set the value of customersSuburb using lessThan. { < } + * If the value is null or empty-string, this condition is ignored. + * + * @param customersSuburb The value of customersSuburb as lessThan. + */ + public void setCustomersSuburb_LessThan(String customersSuburb) { + registerCustomersSuburb(ConditionKey.CK_LESS_THAN, filterRemoveEmptyString(customersSuburb)); + } + + /** + * Set the value of customersSuburb using greaterEqual. { >= } + * If the value is null or empty-string, this condition is ignored. + * + * @param customersSuburb The value of customersSuburb as greaterEqual. + */ + public void setCustomersSuburb_GreaterEqual(String customersSuburb) { + registerCustomersSuburb(ConditionKey.CK_GREATER_EQUAL, filterRemoveEmptyString(customersSuburb)); + } + + /** + * Set the value of customersSuburb using lessEqual. { <= } + * If the value is null or empty-string, this condition is ignored. + * + * @param customersSuburb The value of customersSuburb as lessEqual. + */ + public void setCustomersSuburb_LessEqual(String customersSuburb) { + registerCustomersSuburb(ConditionKey.CK_LESS_EQUAL, filterRemoveEmptyString(customersSuburb)); + } + + /** + * Set the value of customersSuburb using prefixSearch. { like 'xxx%' } + * If the value is null or empty-string, this condition is ignored. + * + * @param customersSuburb The value of customersSuburb as prefixSearch. + */ + public void setCustomersSuburb_PrefixSearch(String customersSuburb) { + registerCustomersSuburb(ConditionKey.CK_PREFIX_SEARCH, filterRemoveEmptyString(customersSuburb)); + } + + /** + * Set the value of customersSuburb using likeSearch. { like '%xxx%' } + * If the value is null or empty-string, this condition is ignored. + * You can invoke this method several times and the conditions are set up. + * + * @param customersSuburb The value of customersSuburb as likeSearch. + * @param likeSearchOption Like search option. (NotNull) + */ + public void setCustomersSuburb_LikeSearch(String customersSuburb, jp.sf.pal.pompei.allcommon.cbean.coption.LikeSearchOption likeSearchOption) { + registerLikeSearchQuery(ConditionKey.CK_LIKE_SEARCH, filterRemoveEmptyString(customersSuburb), getCValueCustomersSuburb(), COL_CUSTOMERS_SUBURB, J_CustomersSuburb, UJ_customersSuburb, likeSearchOption); + } + + /** + * Set the value of customersSuburb using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param customersSuburbList The value of customersSuburb as inScope. + */ + public void setCustomersSuburb_InScope(java.util.List customersSuburbList) { + registerCustomersSuburb(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyStringFromList(customersSuburbList)); + } + + /** + * Set the value of customersSuburb using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param customersSuburb The value of customersSuburb as inScope. + */ + public void setCustomersSuburb_InScope(String customersSuburb, jp.sf.pal.pompei.allcommon.cbean.coption.InScopeOption option) { + registerInScopeQuery(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyString(customersSuburb), getCValueCustomersSuburb(), COL_CUSTOMERS_SUBURB, J_CustomersSuburb, UJ_customersSuburb, option); + } + + /** + * Set the value of customersSuburb using notInScope. { not in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param customersSuburbList The value of customersSuburb as notInScope. + */ + public void setCustomersSuburb_NotInScope(java.util.List customersSuburbList) { + registerCustomersSuburb(ConditionKey.CK_NOT_IN_SCOPE, filterRemoveEmptyStringFromList(customersSuburbList)); + } + + /** + * Set the value of customersSuburb using isNull. { is null } + */ + public void setCustomersSuburb_IsNull() { + registerCustomersSuburb(ConditionKey.CK_IS_NULL, DUMMY_OBJECT); + } + + /** + * Set the value of customersSuburb using isNotNull. { is not null } + */ + public void setCustomersSuburb_IsNotNull() { + registerCustomersSuburb(ConditionKey.CK_IS_NOT_NULL, DUMMY_OBJECT); + } + + /** + * Register condition of customersSuburb. + * + * @param key Condition key. (NotNull) + * @param value The value of customersSuburb. (Nullable) + */ + protected void registerCustomersSuburb(ConditionKey key, Object value) { + registerQuery(key, value, getCValueCustomersSuburb(), COL_CUSTOMERS_SUBURB, J_CustomersSuburb, UJ_customersSuburb); + } + + /** + * Register inline condition of customersSuburb. + * + * @param key Condition key. (NotNull) + * @param value The value of customersSuburb. (Nullable) + */ + protected void registerInlineCustomersSuburb(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueCustomersSuburb(), COL_CUSTOMERS_SUBURB, J_CustomersSuburb, UJ_customersSuburb); + } + + abstract protected ConditionValue getCValueCustomersSuburb(); + + /** Column db name of customersCity. */ + protected static final String COL_CUSTOMERS_CITY = "CUSTOMERS_CITY"; + + /** Column java name of customersCity. */ + protected static final String J_CustomersCity = "CustomersCity"; + + /** Column uncapitalised java name of customersCity. */ + protected static final String UJ_customersCity = "customersCity"; + + /** + * Set the value of customersCity using equal. { = } + * If the value is null or empty-string, this condition is ignored. + * + * @param customersCity The value of customersCity as equal. + */ + public void setCustomersCity_Equal(String customersCity) { + registerCustomersCity(ConditionKey.CK_EQUAL, filterRemoveEmptyString(customersCity)); + } + + /** + * Set the value of customersCity using notEqual. { != } + * If the value is null or empty-string, this condition is ignored. + * + * @param customersCity The value of customersCity as notEqual. + */ + public void setCustomersCity_NotEqual(String customersCity) { + registerCustomersCity(ConditionKey.CK_NOT_EQUAL, filterRemoveEmptyString(customersCity)); + } + + /** + * Set the value of customersCity using greaterThan. { > } + * If the value is null or empty-string, this condition is ignored. + * + * @param customersCity The value of customersCity as greaterThan. + */ + public void setCustomersCity_GreaterThan(String customersCity) { + registerCustomersCity(ConditionKey.CK_GREATER_THAN, filterRemoveEmptyString(customersCity)); + } + + /** + * Set the value of customersCity using lessThan. { < } + * If the value is null or empty-string, this condition is ignored. + * + * @param customersCity The value of customersCity as lessThan. + */ + public void setCustomersCity_LessThan(String customersCity) { + registerCustomersCity(ConditionKey.CK_LESS_THAN, filterRemoveEmptyString(customersCity)); + } + + /** + * Set the value of customersCity using greaterEqual. { >= } + * If the value is null or empty-string, this condition is ignored. + * + * @param customersCity The value of customersCity as greaterEqual. + */ + public void setCustomersCity_GreaterEqual(String customersCity) { + registerCustomersCity(ConditionKey.CK_GREATER_EQUAL, filterRemoveEmptyString(customersCity)); + } + + /** + * Set the value of customersCity using lessEqual. { <= } + * If the value is null or empty-string, this condition is ignored. + * + * @param customersCity The value of customersCity as lessEqual. + */ + public void setCustomersCity_LessEqual(String customersCity) { + registerCustomersCity(ConditionKey.CK_LESS_EQUAL, filterRemoveEmptyString(customersCity)); + } + + /** + * Set the value of customersCity using prefixSearch. { like 'xxx%' } + * If the value is null or empty-string, this condition is ignored. + * + * @param customersCity The value of customersCity as prefixSearch. + */ + public void setCustomersCity_PrefixSearch(String customersCity) { + registerCustomersCity(ConditionKey.CK_PREFIX_SEARCH, filterRemoveEmptyString(customersCity)); + } + + /** + * Set the value of customersCity using likeSearch. { like '%xxx%' } + * If the value is null or empty-string, this condition is ignored. + * You can invoke this method several times and the conditions are set up. + * + * @param customersCity The value of customersCity as likeSearch. + * @param likeSearchOption Like search option. (NotNull) + */ + public void setCustomersCity_LikeSearch(String customersCity, jp.sf.pal.pompei.allcommon.cbean.coption.LikeSearchOption likeSearchOption) { + registerLikeSearchQuery(ConditionKey.CK_LIKE_SEARCH, filterRemoveEmptyString(customersCity), getCValueCustomersCity(), COL_CUSTOMERS_CITY, J_CustomersCity, UJ_customersCity, likeSearchOption); + } + + /** + * Set the value of customersCity using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param customersCityList The value of customersCity as inScope. + */ + public void setCustomersCity_InScope(java.util.List customersCityList) { + registerCustomersCity(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyStringFromList(customersCityList)); + } + + /** + * Set the value of customersCity using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param customersCity The value of customersCity as inScope. + */ + public void setCustomersCity_InScope(String customersCity, jp.sf.pal.pompei.allcommon.cbean.coption.InScopeOption option) { + registerInScopeQuery(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyString(customersCity), getCValueCustomersCity(), COL_CUSTOMERS_CITY, J_CustomersCity, UJ_customersCity, option); + } + + /** + * Set the value of customersCity using notInScope. { not in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param customersCityList The value of customersCity as notInScope. + */ + public void setCustomersCity_NotInScope(java.util.List customersCityList) { + registerCustomersCity(ConditionKey.CK_NOT_IN_SCOPE, filterRemoveEmptyStringFromList(customersCityList)); + } + + /** + * Register condition of customersCity. + * + * @param key Condition key. (NotNull) + * @param value The value of customersCity. (Nullable) + */ + protected void registerCustomersCity(ConditionKey key, Object value) { + registerQuery(key, value, getCValueCustomersCity(), COL_CUSTOMERS_CITY, J_CustomersCity, UJ_customersCity); + } + + /** + * Register inline condition of customersCity. + * + * @param key Condition key. (NotNull) + * @param value The value of customersCity. (Nullable) + */ + protected void registerInlineCustomersCity(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueCustomersCity(), COL_CUSTOMERS_CITY, J_CustomersCity, UJ_customersCity); + } + + abstract protected ConditionValue getCValueCustomersCity(); + + /** Column db name of customersPostcode. */ + protected static final String COL_CUSTOMERS_POSTCODE = "CUSTOMERS_POSTCODE"; + + /** Column java name of customersPostcode. */ + protected static final String J_CustomersPostcode = "CustomersPostcode"; + + /** Column uncapitalised java name of customersPostcode. */ + protected static final String UJ_customersPostcode = "customersPostcode"; + + /** + * Set the value of customersPostcode using equal. { = } + * If the value is null or empty-string, this condition is ignored. + * + * @param customersPostcode The value of customersPostcode as equal. + */ + public void setCustomersPostcode_Equal(String customersPostcode) { + registerCustomersPostcode(ConditionKey.CK_EQUAL, filterRemoveEmptyString(customersPostcode)); + } + + /** + * Set the value of customersPostcode using notEqual. { != } + * If the value is null or empty-string, this condition is ignored. + * + * @param customersPostcode The value of customersPostcode as notEqual. + */ + public void setCustomersPostcode_NotEqual(String customersPostcode) { + registerCustomersPostcode(ConditionKey.CK_NOT_EQUAL, filterRemoveEmptyString(customersPostcode)); + } + + /** + * Set the value of customersPostcode using greaterThan. { > } + * If the value is null or empty-string, this condition is ignored. + * + * @param customersPostcode The value of customersPostcode as greaterThan. + */ + public void setCustomersPostcode_GreaterThan(String customersPostcode) { + registerCustomersPostcode(ConditionKey.CK_GREATER_THAN, filterRemoveEmptyString(customersPostcode)); + } + + /** + * Set the value of customersPostcode using lessThan. { < } + * If the value is null or empty-string, this condition is ignored. + * + * @param customersPostcode The value of customersPostcode as lessThan. + */ + public void setCustomersPostcode_LessThan(String customersPostcode) { + registerCustomersPostcode(ConditionKey.CK_LESS_THAN, filterRemoveEmptyString(customersPostcode)); + } + + /** + * Set the value of customersPostcode using greaterEqual. { >= } + * If the value is null or empty-string, this condition is ignored. + * + * @param customersPostcode The value of customersPostcode as greaterEqual. + */ + public void setCustomersPostcode_GreaterEqual(String customersPostcode) { + registerCustomersPostcode(ConditionKey.CK_GREATER_EQUAL, filterRemoveEmptyString(customersPostcode)); + } + + /** + * Set the value of customersPostcode using lessEqual. { <= } + * If the value is null or empty-string, this condition is ignored. + * + * @param customersPostcode The value of customersPostcode as lessEqual. + */ + public void setCustomersPostcode_LessEqual(String customersPostcode) { + registerCustomersPostcode(ConditionKey.CK_LESS_EQUAL, filterRemoveEmptyString(customersPostcode)); + } + + /** + * Set the value of customersPostcode using prefixSearch. { like 'xxx%' } + * If the value is null or empty-string, this condition is ignored. + * + * @param customersPostcode The value of customersPostcode as prefixSearch. + */ + public void setCustomersPostcode_PrefixSearch(String customersPostcode) { + registerCustomersPostcode(ConditionKey.CK_PREFIX_SEARCH, filterRemoveEmptyString(customersPostcode)); + } + + /** + * Set the value of customersPostcode using likeSearch. { like '%xxx%' } + * If the value is null or empty-string, this condition is ignored. + * You can invoke this method several times and the conditions are set up. + * + * @param customersPostcode The value of customersPostcode as likeSearch. + * @param likeSearchOption Like search option. (NotNull) + */ + public void setCustomersPostcode_LikeSearch(String customersPostcode, jp.sf.pal.pompei.allcommon.cbean.coption.LikeSearchOption likeSearchOption) { + registerLikeSearchQuery(ConditionKey.CK_LIKE_SEARCH, filterRemoveEmptyString(customersPostcode), getCValueCustomersPostcode(), COL_CUSTOMERS_POSTCODE, J_CustomersPostcode, UJ_customersPostcode, likeSearchOption); + } + + /** + * Set the value of customersPostcode using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param customersPostcodeList The value of customersPostcode as inScope. + */ + public void setCustomersPostcode_InScope(java.util.List customersPostcodeList) { + registerCustomersPostcode(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyStringFromList(customersPostcodeList)); + } + + /** + * Set the value of customersPostcode using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param customersPostcode The value of customersPostcode as inScope. + */ + public void setCustomersPostcode_InScope(String customersPostcode, jp.sf.pal.pompei.allcommon.cbean.coption.InScopeOption option) { + registerInScopeQuery(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyString(customersPostcode), getCValueCustomersPostcode(), COL_CUSTOMERS_POSTCODE, J_CustomersPostcode, UJ_customersPostcode, option); + } + + /** + * Set the value of customersPostcode using notInScope. { not in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param customersPostcodeList The value of customersPostcode as notInScope. + */ + public void setCustomersPostcode_NotInScope(java.util.List customersPostcodeList) { + registerCustomersPostcode(ConditionKey.CK_NOT_IN_SCOPE, filterRemoveEmptyStringFromList(customersPostcodeList)); + } + + /** + * Register condition of customersPostcode. + * + * @param key Condition key. (NotNull) + * @param value The value of customersPostcode. (Nullable) + */ + protected void registerCustomersPostcode(ConditionKey key, Object value) { + registerQuery(key, value, getCValueCustomersPostcode(), COL_CUSTOMERS_POSTCODE, J_CustomersPostcode, UJ_customersPostcode); + } + + /** + * Register inline condition of customersPostcode. + * + * @param key Condition key. (NotNull) + * @param value The value of customersPostcode. (Nullable) + */ + protected void registerInlineCustomersPostcode(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueCustomersPostcode(), COL_CUSTOMERS_POSTCODE, J_CustomersPostcode, UJ_customersPostcode); + } + + abstract protected ConditionValue getCValueCustomersPostcode(); + + /** Column db name of customersState. */ + protected static final String COL_CUSTOMERS_STATE = "CUSTOMERS_STATE"; + + /** Column java name of customersState. */ + protected static final String J_CustomersState = "CustomersState"; + + /** Column uncapitalised java name of customersState. */ + protected static final String UJ_customersState = "customersState"; + + /** + * Set the value of customersState using equal. { = } + * If the value is null or empty-string, this condition is ignored. + * + * @param customersState The value of customersState as equal. + */ + public void setCustomersState_Equal(String customersState) { + registerCustomersState(ConditionKey.CK_EQUAL, filterRemoveEmptyString(customersState)); + } + + /** + * Set the value of customersState using notEqual. { != } + * If the value is null or empty-string, this condition is ignored. + * + * @param customersState The value of customersState as notEqual. + */ + public void setCustomersState_NotEqual(String customersState) { + registerCustomersState(ConditionKey.CK_NOT_EQUAL, filterRemoveEmptyString(customersState)); + } + + /** + * Set the value of customersState using greaterThan. { > } + * If the value is null or empty-string, this condition is ignored. + * + * @param customersState The value of customersState as greaterThan. + */ + public void setCustomersState_GreaterThan(String customersState) { + registerCustomersState(ConditionKey.CK_GREATER_THAN, filterRemoveEmptyString(customersState)); + } + + /** + * Set the value of customersState using lessThan. { < } + * If the value is null or empty-string, this condition is ignored. + * + * @param customersState The value of customersState as lessThan. + */ + public void setCustomersState_LessThan(String customersState) { + registerCustomersState(ConditionKey.CK_LESS_THAN, filterRemoveEmptyString(customersState)); + } + + /** + * Set the value of customersState using greaterEqual. { >= } + * If the value is null or empty-string, this condition is ignored. + * + * @param customersState The value of customersState as greaterEqual. + */ + public void setCustomersState_GreaterEqual(String customersState) { + registerCustomersState(ConditionKey.CK_GREATER_EQUAL, filterRemoveEmptyString(customersState)); + } + + /** + * Set the value of customersState using lessEqual. { <= } + * If the value is null or empty-string, this condition is ignored. + * + * @param customersState The value of customersState as lessEqual. + */ + public void setCustomersState_LessEqual(String customersState) { + registerCustomersState(ConditionKey.CK_LESS_EQUAL, filterRemoveEmptyString(customersState)); + } + + /** + * Set the value of customersState using prefixSearch. { like 'xxx%' } + * If the value is null or empty-string, this condition is ignored. + * + * @param customersState The value of customersState as prefixSearch. + */ + public void setCustomersState_PrefixSearch(String customersState) { + registerCustomersState(ConditionKey.CK_PREFIX_SEARCH, filterRemoveEmptyString(customersState)); + } + + /** + * Set the value of customersState using likeSearch. { like '%xxx%' } + * If the value is null or empty-string, this condition is ignored. + * You can invoke this method several times and the conditions are set up. + * + * @param customersState The value of customersState as likeSearch. + * @param likeSearchOption Like search option. (NotNull) + */ + public void setCustomersState_LikeSearch(String customersState, jp.sf.pal.pompei.allcommon.cbean.coption.LikeSearchOption likeSearchOption) { + registerLikeSearchQuery(ConditionKey.CK_LIKE_SEARCH, filterRemoveEmptyString(customersState), getCValueCustomersState(), COL_CUSTOMERS_STATE, J_CustomersState, UJ_customersState, likeSearchOption); + } + + /** + * Set the value of customersState using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param customersStateList The value of customersState as inScope. + */ + public void setCustomersState_InScope(java.util.List customersStateList) { + registerCustomersState(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyStringFromList(customersStateList)); + } + + /** + * Set the value of customersState using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param customersState The value of customersState as inScope. + */ + public void setCustomersState_InScope(String customersState, jp.sf.pal.pompei.allcommon.cbean.coption.InScopeOption option) { + registerInScopeQuery(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyString(customersState), getCValueCustomersState(), COL_CUSTOMERS_STATE, J_CustomersState, UJ_customersState, option); + } + + /** + * Set the value of customersState using notInScope. { not in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param customersStateList The value of customersState as notInScope. + */ + public void setCustomersState_NotInScope(java.util.List customersStateList) { + registerCustomersState(ConditionKey.CK_NOT_IN_SCOPE, filterRemoveEmptyStringFromList(customersStateList)); + } + + /** + * Set the value of customersState using isNull. { is null } + */ + public void setCustomersState_IsNull() { + registerCustomersState(ConditionKey.CK_IS_NULL, DUMMY_OBJECT); + } + + /** + * Set the value of customersState using isNotNull. { is not null } + */ + public void setCustomersState_IsNotNull() { + registerCustomersState(ConditionKey.CK_IS_NOT_NULL, DUMMY_OBJECT); + } + + /** + * Register condition of customersState. + * + * @param key Condition key. (NotNull) + * @param value The value of customersState. (Nullable) + */ + protected void registerCustomersState(ConditionKey key, Object value) { + registerQuery(key, value, getCValueCustomersState(), COL_CUSTOMERS_STATE, J_CustomersState, UJ_customersState); + } + + /** + * Register inline condition of customersState. + * + * @param key Condition key. (NotNull) + * @param value The value of customersState. (Nullable) + */ + protected void registerInlineCustomersState(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueCustomersState(), COL_CUSTOMERS_STATE, J_CustomersState, UJ_customersState); + } + + abstract protected ConditionValue getCValueCustomersState(); + + /** Column db name of customersCountry. */ + protected static final String COL_CUSTOMERS_COUNTRY = "CUSTOMERS_COUNTRY"; + + /** Column java name of customersCountry. */ + protected static final String J_CustomersCountry = "CustomersCountry"; + + /** Column uncapitalised java name of customersCountry. */ + protected static final String UJ_customersCountry = "customersCountry"; + + /** + * Set the value of customersCountry using equal. { = } + * If the value is null or empty-string, this condition is ignored. + * + * @param customersCountry The value of customersCountry as equal. + */ + public void setCustomersCountry_Equal(String customersCountry) { + registerCustomersCountry(ConditionKey.CK_EQUAL, filterRemoveEmptyString(customersCountry)); + } + + /** + * Set the value of customersCountry using notEqual. { != } + * If the value is null or empty-string, this condition is ignored. + * + * @param customersCountry The value of customersCountry as notEqual. + */ + public void setCustomersCountry_NotEqual(String customersCountry) { + registerCustomersCountry(ConditionKey.CK_NOT_EQUAL, filterRemoveEmptyString(customersCountry)); + } + + /** + * Set the value of customersCountry using greaterThan. { > } + * If the value is null or empty-string, this condition is ignored. + * + * @param customersCountry The value of customersCountry as greaterThan. + */ + public void setCustomersCountry_GreaterThan(String customersCountry) { + registerCustomersCountry(ConditionKey.CK_GREATER_THAN, filterRemoveEmptyString(customersCountry)); + } + + /** + * Set the value of customersCountry using lessThan. { < } + * If the value is null or empty-string, this condition is ignored. + * + * @param customersCountry The value of customersCountry as lessThan. + */ + public void setCustomersCountry_LessThan(String customersCountry) { + registerCustomersCountry(ConditionKey.CK_LESS_THAN, filterRemoveEmptyString(customersCountry)); + } + + /** + * Set the value of customersCountry using greaterEqual. { >= } + * If the value is null or empty-string, this condition is ignored. + * + * @param customersCountry The value of customersCountry as greaterEqual. + */ + public void setCustomersCountry_GreaterEqual(String customersCountry) { + registerCustomersCountry(ConditionKey.CK_GREATER_EQUAL, filterRemoveEmptyString(customersCountry)); + } + + /** + * Set the value of customersCountry using lessEqual. { <= } + * If the value is null or empty-string, this condition is ignored. + * + * @param customersCountry The value of customersCountry as lessEqual. + */ + public void setCustomersCountry_LessEqual(String customersCountry) { + registerCustomersCountry(ConditionKey.CK_LESS_EQUAL, filterRemoveEmptyString(customersCountry)); + } + + /** + * Set the value of customersCountry using prefixSearch. { like 'xxx%' } + * If the value is null or empty-string, this condition is ignored. + * + * @param customersCountry The value of customersCountry as prefixSearch. + */ + public void setCustomersCountry_PrefixSearch(String customersCountry) { + registerCustomersCountry(ConditionKey.CK_PREFIX_SEARCH, filterRemoveEmptyString(customersCountry)); + } + + /** + * Set the value of customersCountry using likeSearch. { like '%xxx%' } + * If the value is null or empty-string, this condition is ignored. + * You can invoke this method several times and the conditions are set up. + * + * @param customersCountry The value of customersCountry as likeSearch. + * @param likeSearchOption Like search option. (NotNull) + */ + public void setCustomersCountry_LikeSearch(String customersCountry, jp.sf.pal.pompei.allcommon.cbean.coption.LikeSearchOption likeSearchOption) { + registerLikeSearchQuery(ConditionKey.CK_LIKE_SEARCH, filterRemoveEmptyString(customersCountry), getCValueCustomersCountry(), COL_CUSTOMERS_COUNTRY, J_CustomersCountry, UJ_customersCountry, likeSearchOption); + } + + /** + * Set the value of customersCountry using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param customersCountryList The value of customersCountry as inScope. + */ + public void setCustomersCountry_InScope(java.util.List customersCountryList) { + registerCustomersCountry(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyStringFromList(customersCountryList)); + } + + /** + * Set the value of customersCountry using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param customersCountry The value of customersCountry as inScope. + */ + public void setCustomersCountry_InScope(String customersCountry, jp.sf.pal.pompei.allcommon.cbean.coption.InScopeOption option) { + registerInScopeQuery(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyString(customersCountry), getCValueCustomersCountry(), COL_CUSTOMERS_COUNTRY, J_CustomersCountry, UJ_customersCountry, option); + } + + /** + * Set the value of customersCountry using notInScope. { not in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param customersCountryList The value of customersCountry as notInScope. + */ + public void setCustomersCountry_NotInScope(java.util.List customersCountryList) { + registerCustomersCountry(ConditionKey.CK_NOT_IN_SCOPE, filterRemoveEmptyStringFromList(customersCountryList)); + } + + /** + * Register condition of customersCountry. + * + * @param key Condition key. (NotNull) + * @param value The value of customersCountry. (Nullable) + */ + protected void registerCustomersCountry(ConditionKey key, Object value) { + registerQuery(key, value, getCValueCustomersCountry(), COL_CUSTOMERS_COUNTRY, J_CustomersCountry, UJ_customersCountry); + } + + /** + * Register inline condition of customersCountry. + * + * @param key Condition key. (NotNull) + * @param value The value of customersCountry. (Nullable) + */ + protected void registerInlineCustomersCountry(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueCustomersCountry(), COL_CUSTOMERS_COUNTRY, J_CustomersCountry, UJ_customersCountry); + } + + abstract protected ConditionValue getCValueCustomersCountry(); + + /** Column db name of customersTelephone. */ + protected static final String COL_CUSTOMERS_TELEPHONE = "CUSTOMERS_TELEPHONE"; + + /** Column java name of customersTelephone. */ + protected static final String J_CustomersTelephone = "CustomersTelephone"; + + /** Column uncapitalised java name of customersTelephone. */ + protected static final String UJ_customersTelephone = "customersTelephone"; + + /** + * Set the value of customersTelephone using equal. { = } + * If the value is null or empty-string, this condition is ignored. + * + * @param customersTelephone The value of customersTelephone as equal. + */ + public void setCustomersTelephone_Equal(String customersTelephone) { + registerCustomersTelephone(ConditionKey.CK_EQUAL, filterRemoveEmptyString(customersTelephone)); + } + + /** + * Set the value of customersTelephone using notEqual. { != } + * If the value is null or empty-string, this condition is ignored. + * + * @param customersTelephone The value of customersTelephone as notEqual. + */ + public void setCustomersTelephone_NotEqual(String customersTelephone) { + registerCustomersTelephone(ConditionKey.CK_NOT_EQUAL, filterRemoveEmptyString(customersTelephone)); + } + + /** + * Set the value of customersTelephone using greaterThan. { > } + * If the value is null or empty-string, this condition is ignored. + * + * @param customersTelephone The value of customersTelephone as greaterThan. + */ + public void setCustomersTelephone_GreaterThan(String customersTelephone) { + registerCustomersTelephone(ConditionKey.CK_GREATER_THAN, filterRemoveEmptyString(customersTelephone)); + } + + /** + * Set the value of customersTelephone using lessThan. { < } + * If the value is null or empty-string, this condition is ignored. + * + * @param customersTelephone The value of customersTelephone as lessThan. + */ + public void setCustomersTelephone_LessThan(String customersTelephone) { + registerCustomersTelephone(ConditionKey.CK_LESS_THAN, filterRemoveEmptyString(customersTelephone)); + } + + /** + * Set the value of customersTelephone using greaterEqual. { >= } + * If the value is null or empty-string, this condition is ignored. + * + * @param customersTelephone The value of customersTelephone as greaterEqual. + */ + public void setCustomersTelephone_GreaterEqual(String customersTelephone) { + registerCustomersTelephone(ConditionKey.CK_GREATER_EQUAL, filterRemoveEmptyString(customersTelephone)); + } + + /** + * Set the value of customersTelephone using lessEqual. { <= } + * If the value is null or empty-string, this condition is ignored. + * + * @param customersTelephone The value of customersTelephone as lessEqual. + */ + public void setCustomersTelephone_LessEqual(String customersTelephone) { + registerCustomersTelephone(ConditionKey.CK_LESS_EQUAL, filterRemoveEmptyString(customersTelephone)); + } + + /** + * Set the value of customersTelephone using prefixSearch. { like 'xxx%' } + * If the value is null or empty-string, this condition is ignored. + * + * @param customersTelephone The value of customersTelephone as prefixSearch. + */ + public void setCustomersTelephone_PrefixSearch(String customersTelephone) { + registerCustomersTelephone(ConditionKey.CK_PREFIX_SEARCH, filterRemoveEmptyString(customersTelephone)); + } + + /** + * Set the value of customersTelephone using likeSearch. { like '%xxx%' } + * If the value is null or empty-string, this condition is ignored. + * You can invoke this method several times and the conditions are set up. + * + * @param customersTelephone The value of customersTelephone as likeSearch. + * @param likeSearchOption Like search option. (NotNull) + */ + public void setCustomersTelephone_LikeSearch(String customersTelephone, jp.sf.pal.pompei.allcommon.cbean.coption.LikeSearchOption likeSearchOption) { + registerLikeSearchQuery(ConditionKey.CK_LIKE_SEARCH, filterRemoveEmptyString(customersTelephone), getCValueCustomersTelephone(), COL_CUSTOMERS_TELEPHONE, J_CustomersTelephone, UJ_customersTelephone, likeSearchOption); + } + + /** + * Set the value of customersTelephone using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param customersTelephoneList The value of customersTelephone as inScope. + */ + public void setCustomersTelephone_InScope(java.util.List customersTelephoneList) { + registerCustomersTelephone(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyStringFromList(customersTelephoneList)); + } + + /** + * Set the value of customersTelephone using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param customersTelephone The value of customersTelephone as inScope. + */ + public void setCustomersTelephone_InScope(String customersTelephone, jp.sf.pal.pompei.allcommon.cbean.coption.InScopeOption option) { + registerInScopeQuery(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyString(customersTelephone), getCValueCustomersTelephone(), COL_CUSTOMERS_TELEPHONE, J_CustomersTelephone, UJ_customersTelephone, option); + } + + /** + * Set the value of customersTelephone using notInScope. { not in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param customersTelephoneList The value of customersTelephone as notInScope. + */ + public void setCustomersTelephone_NotInScope(java.util.List customersTelephoneList) { + registerCustomersTelephone(ConditionKey.CK_NOT_IN_SCOPE, filterRemoveEmptyStringFromList(customersTelephoneList)); + } + + /** + * Register condition of customersTelephone. + * + * @param key Condition key. (NotNull) + * @param value The value of customersTelephone. (Nullable) + */ + protected void registerCustomersTelephone(ConditionKey key, Object value) { + registerQuery(key, value, getCValueCustomersTelephone(), COL_CUSTOMERS_TELEPHONE, J_CustomersTelephone, UJ_customersTelephone); + } + + /** + * Register inline condition of customersTelephone. + * + * @param key Condition key. (NotNull) + * @param value The value of customersTelephone. (Nullable) + */ + protected void registerInlineCustomersTelephone(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueCustomersTelephone(), COL_CUSTOMERS_TELEPHONE, J_CustomersTelephone, UJ_customersTelephone); + } + + abstract protected ConditionValue getCValueCustomersTelephone(); + + /** Column db name of customersEmailAddress. */ + protected static final String COL_CUSTOMERS_EMAIL_ADDRESS = "CUSTOMERS_EMAIL_ADDRESS"; + + /** Column java name of customersEmailAddress. */ + protected static final String J_CustomersEmailAddress = "CustomersEmailAddress"; + + /** Column uncapitalised java name of customersEmailAddress. */ + protected static final String UJ_customersEmailAddress = "customersEmailAddress"; + + /** + * Set the value of customersEmailAddress using equal. { = } + * If the value is null or empty-string, this condition is ignored. + * + * @param customersEmailAddress The value of customersEmailAddress as equal. + */ + public void setCustomersEmailAddress_Equal(String customersEmailAddress) { + registerCustomersEmailAddress(ConditionKey.CK_EQUAL, filterRemoveEmptyString(customersEmailAddress)); + } + + /** + * Set the value of customersEmailAddress using notEqual. { != } + * If the value is null or empty-string, this condition is ignored. + * + * @param customersEmailAddress The value of customersEmailAddress as notEqual. + */ + public void setCustomersEmailAddress_NotEqual(String customersEmailAddress) { + registerCustomersEmailAddress(ConditionKey.CK_NOT_EQUAL, filterRemoveEmptyString(customersEmailAddress)); + } + + /** + * Set the value of customersEmailAddress using greaterThan. { > } + * If the value is null or empty-string, this condition is ignored. + * + * @param customersEmailAddress The value of customersEmailAddress as greaterThan. + */ + public void setCustomersEmailAddress_GreaterThan(String customersEmailAddress) { + registerCustomersEmailAddress(ConditionKey.CK_GREATER_THAN, filterRemoveEmptyString(customersEmailAddress)); + } + + /** + * Set the value of customersEmailAddress using lessThan. { < } + * If the value is null or empty-string, this condition is ignored. + * + * @param customersEmailAddress The value of customersEmailAddress as lessThan. + */ + public void setCustomersEmailAddress_LessThan(String customersEmailAddress) { + registerCustomersEmailAddress(ConditionKey.CK_LESS_THAN, filterRemoveEmptyString(customersEmailAddress)); + } + + /** + * Set the value of customersEmailAddress using greaterEqual. { >= } + * If the value is null or empty-string, this condition is ignored. + * + * @param customersEmailAddress The value of customersEmailAddress as greaterEqual. + */ + public void setCustomersEmailAddress_GreaterEqual(String customersEmailAddress) { + registerCustomersEmailAddress(ConditionKey.CK_GREATER_EQUAL, filterRemoveEmptyString(customersEmailAddress)); + } + + /** + * Set the value of customersEmailAddress using lessEqual. { <= } + * If the value is null or empty-string, this condition is ignored. + * + * @param customersEmailAddress The value of customersEmailAddress as lessEqual. + */ + public void setCustomersEmailAddress_LessEqual(String customersEmailAddress) { + registerCustomersEmailAddress(ConditionKey.CK_LESS_EQUAL, filterRemoveEmptyString(customersEmailAddress)); + } + + /** + * Set the value of customersEmailAddress using prefixSearch. { like 'xxx%' } + * If the value is null or empty-string, this condition is ignored. + * + * @param customersEmailAddress The value of customersEmailAddress as prefixSearch. + */ + public void setCustomersEmailAddress_PrefixSearch(String customersEmailAddress) { + registerCustomersEmailAddress(ConditionKey.CK_PREFIX_SEARCH, filterRemoveEmptyString(customersEmailAddress)); + } + + /** + * Set the value of customersEmailAddress using likeSearch. { like '%xxx%' } + * If the value is null or empty-string, this condition is ignored. + * You can invoke this method several times and the conditions are set up. + * + * @param customersEmailAddress The value of customersEmailAddress as likeSearch. + * @param likeSearchOption Like search option. (NotNull) + */ + public void setCustomersEmailAddress_LikeSearch(String customersEmailAddress, jp.sf.pal.pompei.allcommon.cbean.coption.LikeSearchOption likeSearchOption) { + registerLikeSearchQuery(ConditionKey.CK_LIKE_SEARCH, filterRemoveEmptyString(customersEmailAddress), getCValueCustomersEmailAddress(), COL_CUSTOMERS_EMAIL_ADDRESS, J_CustomersEmailAddress, UJ_customersEmailAddress, likeSearchOption); + } + + /** + * Set the value of customersEmailAddress using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param customersEmailAddressList The value of customersEmailAddress as inScope. + */ + public void setCustomersEmailAddress_InScope(java.util.List customersEmailAddressList) { + registerCustomersEmailAddress(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyStringFromList(customersEmailAddressList)); + } + + /** + * Set the value of customersEmailAddress using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param customersEmailAddress The value of customersEmailAddress as inScope. + */ + public void setCustomersEmailAddress_InScope(String customersEmailAddress, jp.sf.pal.pompei.allcommon.cbean.coption.InScopeOption option) { + registerInScopeQuery(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyString(customersEmailAddress), getCValueCustomersEmailAddress(), COL_CUSTOMERS_EMAIL_ADDRESS, J_CustomersEmailAddress, UJ_customersEmailAddress, option); + } + + /** + * Set the value of customersEmailAddress using notInScope. { not in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param customersEmailAddressList The value of customersEmailAddress as notInScope. + */ + public void setCustomersEmailAddress_NotInScope(java.util.List customersEmailAddressList) { + registerCustomersEmailAddress(ConditionKey.CK_NOT_IN_SCOPE, filterRemoveEmptyStringFromList(customersEmailAddressList)); + } + + /** + * Register condition of customersEmailAddress. + * + * @param key Condition key. (NotNull) + * @param value The value of customersEmailAddress. (Nullable) + */ + protected void registerCustomersEmailAddress(ConditionKey key, Object value) { + registerQuery(key, value, getCValueCustomersEmailAddress(), COL_CUSTOMERS_EMAIL_ADDRESS, J_CustomersEmailAddress, UJ_customersEmailAddress); + } + + /** + * Register inline condition of customersEmailAddress. + * + * @param key Condition key. (NotNull) + * @param value The value of customersEmailAddress. (Nullable) + */ + protected void registerInlineCustomersEmailAddress(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueCustomersEmailAddress(), COL_CUSTOMERS_EMAIL_ADDRESS, J_CustomersEmailAddress, UJ_customersEmailAddress); + } + + abstract protected ConditionValue getCValueCustomersEmailAddress(); + + /** Column db name of customersAddressFormatId. */ + protected static final String COL_CUSTOMERS_ADDRESS_FORMAT_ID = "CUSTOMERS_ADDRESS_FORMAT_ID"; + + /** Column java name of customersAddressFormatId. */ + protected static final String J_CustomersAddressFormatId = "CustomersAddressFormatId"; + + /** Column uncapitalised java name of customersAddressFormatId. */ + protected static final String UJ_customersAddressFormatId = "customersAddressFormatId"; + + /** + * Set the value of customersAddressFormatId using equal. { = } + * + * @param customersAddressFormatId The value of customersAddressFormatId as equal. + */ + public void setCustomersAddressFormatId_Equal(java.math.BigDecimal customersAddressFormatId) { + registerCustomersAddressFormatId(ConditionKey.CK_EQUAL, customersAddressFormatId); + } + + /** + * Set the value of customersAddressFormatId using notEqual. { != } + * + * @param customersAddressFormatId The value of customersAddressFormatId as notEqual. + */ + public void setCustomersAddressFormatId_NotEqual(java.math.BigDecimal customersAddressFormatId) { + registerCustomersAddressFormatId(ConditionKey.CK_NOT_EQUAL, customersAddressFormatId); + } + + /** + * Set the value of customersAddressFormatId using greaterThan. { > } + * + * @param customersAddressFormatId The value of customersAddressFormatId as greaterThan. + */ + public void setCustomersAddressFormatId_GreaterThan(java.math.BigDecimal customersAddressFormatId) { + registerCustomersAddressFormatId(ConditionKey.CK_GREATER_THAN, customersAddressFormatId); + } + + /** + * Set the value of customersAddressFormatId using lessThan. { < } + * + * @param customersAddressFormatId The value of customersAddressFormatId as lessThan. + */ + public void setCustomersAddressFormatId_LessThan(java.math.BigDecimal customersAddressFormatId) { + registerCustomersAddressFormatId(ConditionKey.CK_LESS_THAN, customersAddressFormatId); + } + + /** + * Set the value of customersAddressFormatId using greaterEqual. { >= } + * + * @param customersAddressFormatId The value of customersAddressFormatId as greaterEqual. + */ + public void setCustomersAddressFormatId_GreaterEqual(java.math.BigDecimal customersAddressFormatId) { + registerCustomersAddressFormatId(ConditionKey.CK_GREATER_EQUAL, customersAddressFormatId); + } + + /** + * Set the value of customersAddressFormatId using lessEqual. { <= } + * + * @param customersAddressFormatId The value of customersAddressFormatId as lessEqual. + */ + public void setCustomersAddressFormatId_LessEqual(java.math.BigDecimal customersAddressFormatId) { + registerCustomersAddressFormatId(ConditionKey.CK_LESS_EQUAL, customersAddressFormatId); + } + + /** + * Set the value of customersAddressFormatId using inScope. { in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param customersAddressFormatIdList The value of customersAddressFormatId as inScope. + */ + public void setCustomersAddressFormatId_InScope(java.util.List customersAddressFormatIdList) { + registerCustomersAddressFormatId(ConditionKey.CK_IN_SCOPE, customersAddressFormatIdList); + } + + /** + * Set the value of customersAddressFormatId using notInScope. { not in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param customersAddressFormatIdList The value of customersAddressFormatId as notInScope. + */ + public void setCustomersAddressFormatId_NotInScope(java.util.List customersAddressFormatIdList) { + registerCustomersAddressFormatId(ConditionKey.CK_NOT_IN_SCOPE, customersAddressFormatIdList); + } + + /** + * Register condition of customersAddressFormatId. + * + * @param key Condition key. (NotNull) + * @param value The value of customersAddressFormatId. (Nullable) + */ + protected void registerCustomersAddressFormatId(ConditionKey key, Object value) { + registerQuery(key, value, getCValueCustomersAddressFormatId(), COL_CUSTOMERS_ADDRESS_FORMAT_ID, J_CustomersAddressFormatId, UJ_customersAddressFormatId); + } + + /** + * Register inline condition of customersAddressFormatId. + * + * @param key Condition key. (NotNull) + * @param value The value of customersAddressFormatId. (Nullable) + */ + protected void registerInlineCustomersAddressFormatId(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueCustomersAddressFormatId(), COL_CUSTOMERS_ADDRESS_FORMAT_ID, J_CustomersAddressFormatId, UJ_customersAddressFormatId); + } + + abstract protected ConditionValue getCValueCustomersAddressFormatId(); + + /** Column db name of deliveryName. */ + protected static final String COL_DELIVERY_NAME = "DELIVERY_NAME"; + + /** Column java name of deliveryName. */ + protected static final String J_DeliveryName = "DeliveryName"; + + /** Column uncapitalised java name of deliveryName. */ + protected static final String UJ_deliveryName = "deliveryName"; + + /** + * Set the value of deliveryName using equal. { = } + * If the value is null or empty-string, this condition is ignored. + * + * @param deliveryName The value of deliveryName as equal. + */ + public void setDeliveryName_Equal(String deliveryName) { + registerDeliveryName(ConditionKey.CK_EQUAL, filterRemoveEmptyString(deliveryName)); + } + + /** + * Set the value of deliveryName using notEqual. { != } + * If the value is null or empty-string, this condition is ignored. + * + * @param deliveryName The value of deliveryName as notEqual. + */ + public void setDeliveryName_NotEqual(String deliveryName) { + registerDeliveryName(ConditionKey.CK_NOT_EQUAL, filterRemoveEmptyString(deliveryName)); + } + + /** + * Set the value of deliveryName using greaterThan. { > } + * If the value is null or empty-string, this condition is ignored. + * + * @param deliveryName The value of deliveryName as greaterThan. + */ + public void setDeliveryName_GreaterThan(String deliveryName) { + registerDeliveryName(ConditionKey.CK_GREATER_THAN, filterRemoveEmptyString(deliveryName)); + } + + /** + * Set the value of deliveryName using lessThan. { < } + * If the value is null or empty-string, this condition is ignored. + * + * @param deliveryName The value of deliveryName as lessThan. + */ + public void setDeliveryName_LessThan(String deliveryName) { + registerDeliveryName(ConditionKey.CK_LESS_THAN, filterRemoveEmptyString(deliveryName)); + } + + /** + * Set the value of deliveryName using greaterEqual. { >= } + * If the value is null or empty-string, this condition is ignored. + * + * @param deliveryName The value of deliveryName as greaterEqual. + */ + public void setDeliveryName_GreaterEqual(String deliveryName) { + registerDeliveryName(ConditionKey.CK_GREATER_EQUAL, filterRemoveEmptyString(deliveryName)); + } + + /** + * Set the value of deliveryName using lessEqual. { <= } + * If the value is null or empty-string, this condition is ignored. + * + * @param deliveryName The value of deliveryName as lessEqual. + */ + public void setDeliveryName_LessEqual(String deliveryName) { + registerDeliveryName(ConditionKey.CK_LESS_EQUAL, filterRemoveEmptyString(deliveryName)); + } + + /** + * Set the value of deliveryName using prefixSearch. { like 'xxx%' } + * If the value is null or empty-string, this condition is ignored. + * + * @param deliveryName The value of deliveryName as prefixSearch. + */ + public void setDeliveryName_PrefixSearch(String deliveryName) { + registerDeliveryName(ConditionKey.CK_PREFIX_SEARCH, filterRemoveEmptyString(deliveryName)); + } + + /** + * Set the value of deliveryName using likeSearch. { like '%xxx%' } + * If the value is null or empty-string, this condition is ignored. + * You can invoke this method several times and the conditions are set up. + * + * @param deliveryName The value of deliveryName as likeSearch. + * @param likeSearchOption Like search option. (NotNull) + */ + public void setDeliveryName_LikeSearch(String deliveryName, jp.sf.pal.pompei.allcommon.cbean.coption.LikeSearchOption likeSearchOption) { + registerLikeSearchQuery(ConditionKey.CK_LIKE_SEARCH, filterRemoveEmptyString(deliveryName), getCValueDeliveryName(), COL_DELIVERY_NAME, J_DeliveryName, UJ_deliveryName, likeSearchOption); + } + + /** + * Set the value of deliveryName using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param deliveryNameList The value of deliveryName as inScope. + */ + public void setDeliveryName_InScope(java.util.List deliveryNameList) { + registerDeliveryName(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyStringFromList(deliveryNameList)); + } + + /** + * Set the value of deliveryName using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param deliveryName The value of deliveryName as inScope. + */ + public void setDeliveryName_InScope(String deliveryName, jp.sf.pal.pompei.allcommon.cbean.coption.InScopeOption option) { + registerInScopeQuery(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyString(deliveryName), getCValueDeliveryName(), COL_DELIVERY_NAME, J_DeliveryName, UJ_deliveryName, option); + } + + /** + * Set the value of deliveryName using notInScope. { not in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param deliveryNameList The value of deliveryName as notInScope. + */ + public void setDeliveryName_NotInScope(java.util.List deliveryNameList) { + registerDeliveryName(ConditionKey.CK_NOT_IN_SCOPE, filterRemoveEmptyStringFromList(deliveryNameList)); + } + + /** + * Register condition of deliveryName. + * + * @param key Condition key. (NotNull) + * @param value The value of deliveryName. (Nullable) + */ + protected void registerDeliveryName(ConditionKey key, Object value) { + registerQuery(key, value, getCValueDeliveryName(), COL_DELIVERY_NAME, J_DeliveryName, UJ_deliveryName); + } + + /** + * Register inline condition of deliveryName. + * + * @param key Condition key. (NotNull) + * @param value The value of deliveryName. (Nullable) + */ + protected void registerInlineDeliveryName(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueDeliveryName(), COL_DELIVERY_NAME, J_DeliveryName, UJ_deliveryName); + } + + abstract protected ConditionValue getCValueDeliveryName(); + + /** Column db name of deliveryCompany. */ + protected static final String COL_DELIVERY_COMPANY = "DELIVERY_COMPANY"; + + /** Column java name of deliveryCompany. */ + protected static final String J_DeliveryCompany = "DeliveryCompany"; + + /** Column uncapitalised java name of deliveryCompany. */ + protected static final String UJ_deliveryCompany = "deliveryCompany"; + + /** + * Set the value of deliveryCompany using equal. { = } + * If the value is null or empty-string, this condition is ignored. + * + * @param deliveryCompany The value of deliveryCompany as equal. + */ + public void setDeliveryCompany_Equal(String deliveryCompany) { + registerDeliveryCompany(ConditionKey.CK_EQUAL, filterRemoveEmptyString(deliveryCompany)); + } + + /** + * Set the value of deliveryCompany using notEqual. { != } + * If the value is null or empty-string, this condition is ignored. + * + * @param deliveryCompany The value of deliveryCompany as notEqual. + */ + public void setDeliveryCompany_NotEqual(String deliveryCompany) { + registerDeliveryCompany(ConditionKey.CK_NOT_EQUAL, filterRemoveEmptyString(deliveryCompany)); + } + + /** + * Set the value of deliveryCompany using greaterThan. { > } + * If the value is null or empty-string, this condition is ignored. + * + * @param deliveryCompany The value of deliveryCompany as greaterThan. + */ + public void setDeliveryCompany_GreaterThan(String deliveryCompany) { + registerDeliveryCompany(ConditionKey.CK_GREATER_THAN, filterRemoveEmptyString(deliveryCompany)); + } + + /** + * Set the value of deliveryCompany using lessThan. { < } + * If the value is null or empty-string, this condition is ignored. + * + * @param deliveryCompany The value of deliveryCompany as lessThan. + */ + public void setDeliveryCompany_LessThan(String deliveryCompany) { + registerDeliveryCompany(ConditionKey.CK_LESS_THAN, filterRemoveEmptyString(deliveryCompany)); + } + + /** + * Set the value of deliveryCompany using greaterEqual. { >= } + * If the value is null or empty-string, this condition is ignored. + * + * @param deliveryCompany The value of deliveryCompany as greaterEqual. + */ + public void setDeliveryCompany_GreaterEqual(String deliveryCompany) { + registerDeliveryCompany(ConditionKey.CK_GREATER_EQUAL, filterRemoveEmptyString(deliveryCompany)); + } + + /** + * Set the value of deliveryCompany using lessEqual. { <= } + * If the value is null or empty-string, this condition is ignored. + * + * @param deliveryCompany The value of deliveryCompany as lessEqual. + */ + public void setDeliveryCompany_LessEqual(String deliveryCompany) { + registerDeliveryCompany(ConditionKey.CK_LESS_EQUAL, filterRemoveEmptyString(deliveryCompany)); + } + + /** + * Set the value of deliveryCompany using prefixSearch. { like 'xxx%' } + * If the value is null or empty-string, this condition is ignored. + * + * @param deliveryCompany The value of deliveryCompany as prefixSearch. + */ + public void setDeliveryCompany_PrefixSearch(String deliveryCompany) { + registerDeliveryCompany(ConditionKey.CK_PREFIX_SEARCH, filterRemoveEmptyString(deliveryCompany)); + } + + /** + * Set the value of deliveryCompany using likeSearch. { like '%xxx%' } + * If the value is null or empty-string, this condition is ignored. + * You can invoke this method several times and the conditions are set up. + * + * @param deliveryCompany The value of deliveryCompany as likeSearch. + * @param likeSearchOption Like search option. (NotNull) + */ + public void setDeliveryCompany_LikeSearch(String deliveryCompany, jp.sf.pal.pompei.allcommon.cbean.coption.LikeSearchOption likeSearchOption) { + registerLikeSearchQuery(ConditionKey.CK_LIKE_SEARCH, filterRemoveEmptyString(deliveryCompany), getCValueDeliveryCompany(), COL_DELIVERY_COMPANY, J_DeliveryCompany, UJ_deliveryCompany, likeSearchOption); + } + + /** + * Set the value of deliveryCompany using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param deliveryCompanyList The value of deliveryCompany as inScope. + */ + public void setDeliveryCompany_InScope(java.util.List deliveryCompanyList) { + registerDeliveryCompany(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyStringFromList(deliveryCompanyList)); + } + + /** + * Set the value of deliveryCompany using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param deliveryCompany The value of deliveryCompany as inScope. + */ + public void setDeliveryCompany_InScope(String deliveryCompany, jp.sf.pal.pompei.allcommon.cbean.coption.InScopeOption option) { + registerInScopeQuery(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyString(deliveryCompany), getCValueDeliveryCompany(), COL_DELIVERY_COMPANY, J_DeliveryCompany, UJ_deliveryCompany, option); + } + + /** + * Set the value of deliveryCompany using notInScope. { not in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param deliveryCompanyList The value of deliveryCompany as notInScope. + */ + public void setDeliveryCompany_NotInScope(java.util.List deliveryCompanyList) { + registerDeliveryCompany(ConditionKey.CK_NOT_IN_SCOPE, filterRemoveEmptyStringFromList(deliveryCompanyList)); + } + + /** + * Set the value of deliveryCompany using isNull. { is null } + */ + public void setDeliveryCompany_IsNull() { + registerDeliveryCompany(ConditionKey.CK_IS_NULL, DUMMY_OBJECT); + } + + /** + * Set the value of deliveryCompany using isNotNull. { is not null } + */ + public void setDeliveryCompany_IsNotNull() { + registerDeliveryCompany(ConditionKey.CK_IS_NOT_NULL, DUMMY_OBJECT); + } + + /** + * Register condition of deliveryCompany. + * + * @param key Condition key. (NotNull) + * @param value The value of deliveryCompany. (Nullable) + */ + protected void registerDeliveryCompany(ConditionKey key, Object value) { + registerQuery(key, value, getCValueDeliveryCompany(), COL_DELIVERY_COMPANY, J_DeliveryCompany, UJ_deliveryCompany); + } + + /** + * Register inline condition of deliveryCompany. + * + * @param key Condition key. (NotNull) + * @param value The value of deliveryCompany. (Nullable) + */ + protected void registerInlineDeliveryCompany(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueDeliveryCompany(), COL_DELIVERY_COMPANY, J_DeliveryCompany, UJ_deliveryCompany); + } + + abstract protected ConditionValue getCValueDeliveryCompany(); + + /** Column db name of deliveryStreetAddress. */ + protected static final String COL_DELIVERY_STREET_ADDRESS = "DELIVERY_STREET_ADDRESS"; + + /** Column java name of deliveryStreetAddress. */ + protected static final String J_DeliveryStreetAddress = "DeliveryStreetAddress"; + + /** Column uncapitalised java name of deliveryStreetAddress. */ + protected static final String UJ_deliveryStreetAddress = "deliveryStreetAddress"; + + /** + * Set the value of deliveryStreetAddress using equal. { = } + * If the value is null or empty-string, this condition is ignored. + * + * @param deliveryStreetAddress The value of deliveryStreetAddress as equal. + */ + public void setDeliveryStreetAddress_Equal(String deliveryStreetAddress) { + registerDeliveryStreetAddress(ConditionKey.CK_EQUAL, filterRemoveEmptyString(deliveryStreetAddress)); + } + + /** + * Set the value of deliveryStreetAddress using notEqual. { != } + * If the value is null or empty-string, this condition is ignored. + * + * @param deliveryStreetAddress The value of deliveryStreetAddress as notEqual. + */ + public void setDeliveryStreetAddress_NotEqual(String deliveryStreetAddress) { + registerDeliveryStreetAddress(ConditionKey.CK_NOT_EQUAL, filterRemoveEmptyString(deliveryStreetAddress)); + } + + /** + * Set the value of deliveryStreetAddress using greaterThan. { > } + * If the value is null or empty-string, this condition is ignored. + * + * @param deliveryStreetAddress The value of deliveryStreetAddress as greaterThan. + */ + public void setDeliveryStreetAddress_GreaterThan(String deliveryStreetAddress) { + registerDeliveryStreetAddress(ConditionKey.CK_GREATER_THAN, filterRemoveEmptyString(deliveryStreetAddress)); + } + + /** + * Set the value of deliveryStreetAddress using lessThan. { < } + * If the value is null or empty-string, this condition is ignored. + * + * @param deliveryStreetAddress The value of deliveryStreetAddress as lessThan. + */ + public void setDeliveryStreetAddress_LessThan(String deliveryStreetAddress) { + registerDeliveryStreetAddress(ConditionKey.CK_LESS_THAN, filterRemoveEmptyString(deliveryStreetAddress)); + } + + /** + * Set the value of deliveryStreetAddress using greaterEqual. { >= } + * If the value is null or empty-string, this condition is ignored. + * + * @param deliveryStreetAddress The value of deliveryStreetAddress as greaterEqual. + */ + public void setDeliveryStreetAddress_GreaterEqual(String deliveryStreetAddress) { + registerDeliveryStreetAddress(ConditionKey.CK_GREATER_EQUAL, filterRemoveEmptyString(deliveryStreetAddress)); + } + + /** + * Set the value of deliveryStreetAddress using lessEqual. { <= } + * If the value is null or empty-string, this condition is ignored. + * + * @param deliveryStreetAddress The value of deliveryStreetAddress as lessEqual. + */ + public void setDeliveryStreetAddress_LessEqual(String deliveryStreetAddress) { + registerDeliveryStreetAddress(ConditionKey.CK_LESS_EQUAL, filterRemoveEmptyString(deliveryStreetAddress)); + } + + /** + * Set the value of deliveryStreetAddress using prefixSearch. { like 'xxx%' } + * If the value is null or empty-string, this condition is ignored. + * + * @param deliveryStreetAddress The value of deliveryStreetAddress as prefixSearch. + */ + public void setDeliveryStreetAddress_PrefixSearch(String deliveryStreetAddress) { + registerDeliveryStreetAddress(ConditionKey.CK_PREFIX_SEARCH, filterRemoveEmptyString(deliveryStreetAddress)); + } + + /** + * Set the value of deliveryStreetAddress using likeSearch. { like '%xxx%' } + * If the value is null or empty-string, this condition is ignored. + * You can invoke this method several times and the conditions are set up. + * + * @param deliveryStreetAddress The value of deliveryStreetAddress as likeSearch. + * @param likeSearchOption Like search option. (NotNull) + */ + public void setDeliveryStreetAddress_LikeSearch(String deliveryStreetAddress, jp.sf.pal.pompei.allcommon.cbean.coption.LikeSearchOption likeSearchOption) { + registerLikeSearchQuery(ConditionKey.CK_LIKE_SEARCH, filterRemoveEmptyString(deliveryStreetAddress), getCValueDeliveryStreetAddress(), COL_DELIVERY_STREET_ADDRESS, J_DeliveryStreetAddress, UJ_deliveryStreetAddress, likeSearchOption); + } + + /** + * Set the value of deliveryStreetAddress using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param deliveryStreetAddressList The value of deliveryStreetAddress as inScope. + */ + public void setDeliveryStreetAddress_InScope(java.util.List deliveryStreetAddressList) { + registerDeliveryStreetAddress(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyStringFromList(deliveryStreetAddressList)); + } + + /** + * Set the value of deliveryStreetAddress using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param deliveryStreetAddress The value of deliveryStreetAddress as inScope. + */ + public void setDeliveryStreetAddress_InScope(String deliveryStreetAddress, jp.sf.pal.pompei.allcommon.cbean.coption.InScopeOption option) { + registerInScopeQuery(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyString(deliveryStreetAddress), getCValueDeliveryStreetAddress(), COL_DELIVERY_STREET_ADDRESS, J_DeliveryStreetAddress, UJ_deliveryStreetAddress, option); + } + + /** + * Set the value of deliveryStreetAddress using notInScope. { not in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param deliveryStreetAddressList The value of deliveryStreetAddress as notInScope. + */ + public void setDeliveryStreetAddress_NotInScope(java.util.List deliveryStreetAddressList) { + registerDeliveryStreetAddress(ConditionKey.CK_NOT_IN_SCOPE, filterRemoveEmptyStringFromList(deliveryStreetAddressList)); + } + + /** + * Register condition of deliveryStreetAddress. + * + * @param key Condition key. (NotNull) + * @param value The value of deliveryStreetAddress. (Nullable) + */ + protected void registerDeliveryStreetAddress(ConditionKey key, Object value) { + registerQuery(key, value, getCValueDeliveryStreetAddress(), COL_DELIVERY_STREET_ADDRESS, J_DeliveryStreetAddress, UJ_deliveryStreetAddress); + } + + /** + * Register inline condition of deliveryStreetAddress. + * + * @param key Condition key. (NotNull) + * @param value The value of deliveryStreetAddress. (Nullable) + */ + protected void registerInlineDeliveryStreetAddress(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueDeliveryStreetAddress(), COL_DELIVERY_STREET_ADDRESS, J_DeliveryStreetAddress, UJ_deliveryStreetAddress); + } + + abstract protected ConditionValue getCValueDeliveryStreetAddress(); + + /** Column db name of deliverySuburb. */ + protected static final String COL_DELIVERY_SUBURB = "DELIVERY_SUBURB"; + + /** Column java name of deliverySuburb. */ + protected static final String J_DeliverySuburb = "DeliverySuburb"; + + /** Column uncapitalised java name of deliverySuburb. */ + protected static final String UJ_deliverySuburb = "deliverySuburb"; + + /** + * Set the value of deliverySuburb using equal. { = } + * If the value is null or empty-string, this condition is ignored. + * + * @param deliverySuburb The value of deliverySuburb as equal. + */ + public void setDeliverySuburb_Equal(String deliverySuburb) { + registerDeliverySuburb(ConditionKey.CK_EQUAL, filterRemoveEmptyString(deliverySuburb)); + } + + /** + * Set the value of deliverySuburb using notEqual. { != } + * If the value is null or empty-string, this condition is ignored. + * + * @param deliverySuburb The value of deliverySuburb as notEqual. + */ + public void setDeliverySuburb_NotEqual(String deliverySuburb) { + registerDeliverySuburb(ConditionKey.CK_NOT_EQUAL, filterRemoveEmptyString(deliverySuburb)); + } + + /** + * Set the value of deliverySuburb using greaterThan. { > } + * If the value is null or empty-string, this condition is ignored. + * + * @param deliverySuburb The value of deliverySuburb as greaterThan. + */ + public void setDeliverySuburb_GreaterThan(String deliverySuburb) { + registerDeliverySuburb(ConditionKey.CK_GREATER_THAN, filterRemoveEmptyString(deliverySuburb)); + } + + /** + * Set the value of deliverySuburb using lessThan. { < } + * If the value is null or empty-string, this condition is ignored. + * + * @param deliverySuburb The value of deliverySuburb as lessThan. + */ + public void setDeliverySuburb_LessThan(String deliverySuburb) { + registerDeliverySuburb(ConditionKey.CK_LESS_THAN, filterRemoveEmptyString(deliverySuburb)); + } + + /** + * Set the value of deliverySuburb using greaterEqual. { >= } + * If the value is null or empty-string, this condition is ignored. + * + * @param deliverySuburb The value of deliverySuburb as greaterEqual. + */ + public void setDeliverySuburb_GreaterEqual(String deliverySuburb) { + registerDeliverySuburb(ConditionKey.CK_GREATER_EQUAL, filterRemoveEmptyString(deliverySuburb)); + } + + /** + * Set the value of deliverySuburb using lessEqual. { <= } + * If the value is null or empty-string, this condition is ignored. + * + * @param deliverySuburb The value of deliverySuburb as lessEqual. + */ + public void setDeliverySuburb_LessEqual(String deliverySuburb) { + registerDeliverySuburb(ConditionKey.CK_LESS_EQUAL, filterRemoveEmptyString(deliverySuburb)); + } + + /** + * Set the value of deliverySuburb using prefixSearch. { like 'xxx%' } + * If the value is null or empty-string, this condition is ignored. + * + * @param deliverySuburb The value of deliverySuburb as prefixSearch. + */ + public void setDeliverySuburb_PrefixSearch(String deliverySuburb) { + registerDeliverySuburb(ConditionKey.CK_PREFIX_SEARCH, filterRemoveEmptyString(deliverySuburb)); + } + + /** + * Set the value of deliverySuburb using likeSearch. { like '%xxx%' } + * If the value is null or empty-string, this condition is ignored. + * You can invoke this method several times and the conditions are set up. + * + * @param deliverySuburb The value of deliverySuburb as likeSearch. + * @param likeSearchOption Like search option. (NotNull) + */ + public void setDeliverySuburb_LikeSearch(String deliverySuburb, jp.sf.pal.pompei.allcommon.cbean.coption.LikeSearchOption likeSearchOption) { + registerLikeSearchQuery(ConditionKey.CK_LIKE_SEARCH, filterRemoveEmptyString(deliverySuburb), getCValueDeliverySuburb(), COL_DELIVERY_SUBURB, J_DeliverySuburb, UJ_deliverySuburb, likeSearchOption); + } + + /** + * Set the value of deliverySuburb using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param deliverySuburbList The value of deliverySuburb as inScope. + */ + public void setDeliverySuburb_InScope(java.util.List deliverySuburbList) { + registerDeliverySuburb(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyStringFromList(deliverySuburbList)); + } + + /** + * Set the value of deliverySuburb using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param deliverySuburb The value of deliverySuburb as inScope. + */ + public void setDeliverySuburb_InScope(String deliverySuburb, jp.sf.pal.pompei.allcommon.cbean.coption.InScopeOption option) { + registerInScopeQuery(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyString(deliverySuburb), getCValueDeliverySuburb(), COL_DELIVERY_SUBURB, J_DeliverySuburb, UJ_deliverySuburb, option); + } + + /** + * Set the value of deliverySuburb using notInScope. { not in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param deliverySuburbList The value of deliverySuburb as notInScope. + */ + public void setDeliverySuburb_NotInScope(java.util.List deliverySuburbList) { + registerDeliverySuburb(ConditionKey.CK_NOT_IN_SCOPE, filterRemoveEmptyStringFromList(deliverySuburbList)); + } + + /** + * Set the value of deliverySuburb using isNull. { is null } + */ + public void setDeliverySuburb_IsNull() { + registerDeliverySuburb(ConditionKey.CK_IS_NULL, DUMMY_OBJECT); + } + + /** + * Set the value of deliverySuburb using isNotNull. { is not null } + */ + public void setDeliverySuburb_IsNotNull() { + registerDeliverySuburb(ConditionKey.CK_IS_NOT_NULL, DUMMY_OBJECT); + } + + /** + * Register condition of deliverySuburb. + * + * @param key Condition key. (NotNull) + * @param value The value of deliverySuburb. (Nullable) + */ + protected void registerDeliverySuburb(ConditionKey key, Object value) { + registerQuery(key, value, getCValueDeliverySuburb(), COL_DELIVERY_SUBURB, J_DeliverySuburb, UJ_deliverySuburb); + } + + /** + * Register inline condition of deliverySuburb. + * + * @param key Condition key. (NotNull) + * @param value The value of deliverySuburb. (Nullable) + */ + protected void registerInlineDeliverySuburb(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueDeliverySuburb(), COL_DELIVERY_SUBURB, J_DeliverySuburb, UJ_deliverySuburb); + } + + abstract protected ConditionValue getCValueDeliverySuburb(); + + /** Column db name of deliveryCity. */ + protected static final String COL_DELIVERY_CITY = "DELIVERY_CITY"; + + /** Column java name of deliveryCity. */ + protected static final String J_DeliveryCity = "DeliveryCity"; + + /** Column uncapitalised java name of deliveryCity. */ + protected static final String UJ_deliveryCity = "deliveryCity"; + + /** + * Set the value of deliveryCity using equal. { = } + * If the value is null or empty-string, this condition is ignored. + * + * @param deliveryCity The value of deliveryCity as equal. + */ + public void setDeliveryCity_Equal(String deliveryCity) { + registerDeliveryCity(ConditionKey.CK_EQUAL, filterRemoveEmptyString(deliveryCity)); + } + + /** + * Set the value of deliveryCity using notEqual. { != } + * If the value is null or empty-string, this condition is ignored. + * + * @param deliveryCity The value of deliveryCity as notEqual. + */ + public void setDeliveryCity_NotEqual(String deliveryCity) { + registerDeliveryCity(ConditionKey.CK_NOT_EQUAL, filterRemoveEmptyString(deliveryCity)); + } + + /** + * Set the value of deliveryCity using greaterThan. { > } + * If the value is null or empty-string, this condition is ignored. + * + * @param deliveryCity The value of deliveryCity as greaterThan. + */ + public void setDeliveryCity_GreaterThan(String deliveryCity) { + registerDeliveryCity(ConditionKey.CK_GREATER_THAN, filterRemoveEmptyString(deliveryCity)); + } + + /** + * Set the value of deliveryCity using lessThan. { < } + * If the value is null or empty-string, this condition is ignored. + * + * @param deliveryCity The value of deliveryCity as lessThan. + */ + public void setDeliveryCity_LessThan(String deliveryCity) { + registerDeliveryCity(ConditionKey.CK_LESS_THAN, filterRemoveEmptyString(deliveryCity)); + } + + /** + * Set the value of deliveryCity using greaterEqual. { >= } + * If the value is null or empty-string, this condition is ignored. + * + * @param deliveryCity The value of deliveryCity as greaterEqual. + */ + public void setDeliveryCity_GreaterEqual(String deliveryCity) { + registerDeliveryCity(ConditionKey.CK_GREATER_EQUAL, filterRemoveEmptyString(deliveryCity)); + } + + /** + * Set the value of deliveryCity using lessEqual. { <= } + * If the value is null or empty-string, this condition is ignored. + * + * @param deliveryCity The value of deliveryCity as lessEqual. + */ + public void setDeliveryCity_LessEqual(String deliveryCity) { + registerDeliveryCity(ConditionKey.CK_LESS_EQUAL, filterRemoveEmptyString(deliveryCity)); + } + + /** + * Set the value of deliveryCity using prefixSearch. { like 'xxx%' } + * If the value is null or empty-string, this condition is ignored. + * + * @param deliveryCity The value of deliveryCity as prefixSearch. + */ + public void setDeliveryCity_PrefixSearch(String deliveryCity) { + registerDeliveryCity(ConditionKey.CK_PREFIX_SEARCH, filterRemoveEmptyString(deliveryCity)); + } + + /** + * Set the value of deliveryCity using likeSearch. { like '%xxx%' } + * If the value is null or empty-string, this condition is ignored. + * You can invoke this method several times and the conditions are set up. + * + * @param deliveryCity The value of deliveryCity as likeSearch. + * @param likeSearchOption Like search option. (NotNull) + */ + public void setDeliveryCity_LikeSearch(String deliveryCity, jp.sf.pal.pompei.allcommon.cbean.coption.LikeSearchOption likeSearchOption) { + registerLikeSearchQuery(ConditionKey.CK_LIKE_SEARCH, filterRemoveEmptyString(deliveryCity), getCValueDeliveryCity(), COL_DELIVERY_CITY, J_DeliveryCity, UJ_deliveryCity, likeSearchOption); + } + + /** + * Set the value of deliveryCity using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param deliveryCityList The value of deliveryCity as inScope. + */ + public void setDeliveryCity_InScope(java.util.List deliveryCityList) { + registerDeliveryCity(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyStringFromList(deliveryCityList)); + } + + /** + * Set the value of deliveryCity using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param deliveryCity The value of deliveryCity as inScope. + */ + public void setDeliveryCity_InScope(String deliveryCity, jp.sf.pal.pompei.allcommon.cbean.coption.InScopeOption option) { + registerInScopeQuery(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyString(deliveryCity), getCValueDeliveryCity(), COL_DELIVERY_CITY, J_DeliveryCity, UJ_deliveryCity, option); + } + + /** + * Set the value of deliveryCity using notInScope. { not in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param deliveryCityList The value of deliveryCity as notInScope. + */ + public void setDeliveryCity_NotInScope(java.util.List deliveryCityList) { + registerDeliveryCity(ConditionKey.CK_NOT_IN_SCOPE, filterRemoveEmptyStringFromList(deliveryCityList)); + } + + /** + * Register condition of deliveryCity. + * + * @param key Condition key. (NotNull) + * @param value The value of deliveryCity. (Nullable) + */ + protected void registerDeliveryCity(ConditionKey key, Object value) { + registerQuery(key, value, getCValueDeliveryCity(), COL_DELIVERY_CITY, J_DeliveryCity, UJ_deliveryCity); + } + + /** + * Register inline condition of deliveryCity. + * + * @param key Condition key. (NotNull) + * @param value The value of deliveryCity. (Nullable) + */ + protected void registerInlineDeliveryCity(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueDeliveryCity(), COL_DELIVERY_CITY, J_DeliveryCity, UJ_deliveryCity); + } + + abstract protected ConditionValue getCValueDeliveryCity(); + + /** Column db name of deliveryPostcode. */ + protected static final String COL_DELIVERY_POSTCODE = "DELIVERY_POSTCODE"; + + /** Column java name of deliveryPostcode. */ + protected static final String J_DeliveryPostcode = "DeliveryPostcode"; + + /** Column uncapitalised java name of deliveryPostcode. */ + protected static final String UJ_deliveryPostcode = "deliveryPostcode"; + + /** + * Set the value of deliveryPostcode using equal. { = } + * If the value is null or empty-string, this condition is ignored. + * + * @param deliveryPostcode The value of deliveryPostcode as equal. + */ + public void setDeliveryPostcode_Equal(String deliveryPostcode) { + registerDeliveryPostcode(ConditionKey.CK_EQUAL, filterRemoveEmptyString(deliveryPostcode)); + } + + /** + * Set the value of deliveryPostcode using notEqual. { != } + * If the value is null or empty-string, this condition is ignored. + * + * @param deliveryPostcode The value of deliveryPostcode as notEqual. + */ + public void setDeliveryPostcode_NotEqual(String deliveryPostcode) { + registerDeliveryPostcode(ConditionKey.CK_NOT_EQUAL, filterRemoveEmptyString(deliveryPostcode)); + } + + /** + * Set the value of deliveryPostcode using greaterThan. { > } + * If the value is null or empty-string, this condition is ignored. + * + * @param deliveryPostcode The value of deliveryPostcode as greaterThan. + */ + public void setDeliveryPostcode_GreaterThan(String deliveryPostcode) { + registerDeliveryPostcode(ConditionKey.CK_GREATER_THAN, filterRemoveEmptyString(deliveryPostcode)); + } + + /** + * Set the value of deliveryPostcode using lessThan. { < } + * If the value is null or empty-string, this condition is ignored. + * + * @param deliveryPostcode The value of deliveryPostcode as lessThan. + */ + public void setDeliveryPostcode_LessThan(String deliveryPostcode) { + registerDeliveryPostcode(ConditionKey.CK_LESS_THAN, filterRemoveEmptyString(deliveryPostcode)); + } + + /** + * Set the value of deliveryPostcode using greaterEqual. { >= } + * If the value is null or empty-string, this condition is ignored. + * + * @param deliveryPostcode The value of deliveryPostcode as greaterEqual. + */ + public void setDeliveryPostcode_GreaterEqual(String deliveryPostcode) { + registerDeliveryPostcode(ConditionKey.CK_GREATER_EQUAL, filterRemoveEmptyString(deliveryPostcode)); + } + + /** + * Set the value of deliveryPostcode using lessEqual. { <= } + * If the value is null or empty-string, this condition is ignored. + * + * @param deliveryPostcode The value of deliveryPostcode as lessEqual. + */ + public void setDeliveryPostcode_LessEqual(String deliveryPostcode) { + registerDeliveryPostcode(ConditionKey.CK_LESS_EQUAL, filterRemoveEmptyString(deliveryPostcode)); + } + + /** + * Set the value of deliveryPostcode using prefixSearch. { like 'xxx%' } + * If the value is null or empty-string, this condition is ignored. + * + * @param deliveryPostcode The value of deliveryPostcode as prefixSearch. + */ + public void setDeliveryPostcode_PrefixSearch(String deliveryPostcode) { + registerDeliveryPostcode(ConditionKey.CK_PREFIX_SEARCH, filterRemoveEmptyString(deliveryPostcode)); + } + + /** + * Set the value of deliveryPostcode using likeSearch. { like '%xxx%' } + * If the value is null or empty-string, this condition is ignored. + * You can invoke this method several times and the conditions are set up. + * + * @param deliveryPostcode The value of deliveryPostcode as likeSearch. + * @param likeSearchOption Like search option. (NotNull) + */ + public void setDeliveryPostcode_LikeSearch(String deliveryPostcode, jp.sf.pal.pompei.allcommon.cbean.coption.LikeSearchOption likeSearchOption) { + registerLikeSearchQuery(ConditionKey.CK_LIKE_SEARCH, filterRemoveEmptyString(deliveryPostcode), getCValueDeliveryPostcode(), COL_DELIVERY_POSTCODE, J_DeliveryPostcode, UJ_deliveryPostcode, likeSearchOption); + } + + /** + * Set the value of deliveryPostcode using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param deliveryPostcodeList The value of deliveryPostcode as inScope. + */ + public void setDeliveryPostcode_InScope(java.util.List deliveryPostcodeList) { + registerDeliveryPostcode(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyStringFromList(deliveryPostcodeList)); + } + + /** + * Set the value of deliveryPostcode using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param deliveryPostcode The value of deliveryPostcode as inScope. + */ + public void setDeliveryPostcode_InScope(String deliveryPostcode, jp.sf.pal.pompei.allcommon.cbean.coption.InScopeOption option) { + registerInScopeQuery(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyString(deliveryPostcode), getCValueDeliveryPostcode(), COL_DELIVERY_POSTCODE, J_DeliveryPostcode, UJ_deliveryPostcode, option); + } + + /** + * Set the value of deliveryPostcode using notInScope. { not in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param deliveryPostcodeList The value of deliveryPostcode as notInScope. + */ + public void setDeliveryPostcode_NotInScope(java.util.List deliveryPostcodeList) { + registerDeliveryPostcode(ConditionKey.CK_NOT_IN_SCOPE, filterRemoveEmptyStringFromList(deliveryPostcodeList)); + } + + /** + * Register condition of deliveryPostcode. + * + * @param key Condition key. (NotNull) + * @param value The value of deliveryPostcode. (Nullable) + */ + protected void registerDeliveryPostcode(ConditionKey key, Object value) { + registerQuery(key, value, getCValueDeliveryPostcode(), COL_DELIVERY_POSTCODE, J_DeliveryPostcode, UJ_deliveryPostcode); + } + + /** + * Register inline condition of deliveryPostcode. + * + * @param key Condition key. (NotNull) + * @param value The value of deliveryPostcode. (Nullable) + */ + protected void registerInlineDeliveryPostcode(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueDeliveryPostcode(), COL_DELIVERY_POSTCODE, J_DeliveryPostcode, UJ_deliveryPostcode); + } + + abstract protected ConditionValue getCValueDeliveryPostcode(); + + /** Column db name of deliveryState. */ + protected static final String COL_DELIVERY_STATE = "DELIVERY_STATE"; + + /** Column java name of deliveryState. */ + protected static final String J_DeliveryState = "DeliveryState"; + + /** Column uncapitalised java name of deliveryState. */ + protected static final String UJ_deliveryState = "deliveryState"; + + /** + * Set the value of deliveryState using equal. { = } + * If the value is null or empty-string, this condition is ignored. + * + * @param deliveryState The value of deliveryState as equal. + */ + public void setDeliveryState_Equal(String deliveryState) { + registerDeliveryState(ConditionKey.CK_EQUAL, filterRemoveEmptyString(deliveryState)); + } + + /** + * Set the value of deliveryState using notEqual. { != } + * If the value is null or empty-string, this condition is ignored. + * + * @param deliveryState The value of deliveryState as notEqual. + */ + public void setDeliveryState_NotEqual(String deliveryState) { + registerDeliveryState(ConditionKey.CK_NOT_EQUAL, filterRemoveEmptyString(deliveryState)); + } + + /** + * Set the value of deliveryState using greaterThan. { > } + * If the value is null or empty-string, this condition is ignored. + * + * @param deliveryState The value of deliveryState as greaterThan. + */ + public void setDeliveryState_GreaterThan(String deliveryState) { + registerDeliveryState(ConditionKey.CK_GREATER_THAN, filterRemoveEmptyString(deliveryState)); + } + + /** + * Set the value of deliveryState using lessThan. { < } + * If the value is null or empty-string, this condition is ignored. + * + * @param deliveryState The value of deliveryState as lessThan. + */ + public void setDeliveryState_LessThan(String deliveryState) { + registerDeliveryState(ConditionKey.CK_LESS_THAN, filterRemoveEmptyString(deliveryState)); + } + + /** + * Set the value of deliveryState using greaterEqual. { >= } + * If the value is null or empty-string, this condition is ignored. + * + * @param deliveryState The value of deliveryState as greaterEqual. + */ + public void setDeliveryState_GreaterEqual(String deliveryState) { + registerDeliveryState(ConditionKey.CK_GREATER_EQUAL, filterRemoveEmptyString(deliveryState)); + } + + /** + * Set the value of deliveryState using lessEqual. { <= } + * If the value is null or empty-string, this condition is ignored. + * + * @param deliveryState The value of deliveryState as lessEqual. + */ + public void setDeliveryState_LessEqual(String deliveryState) { + registerDeliveryState(ConditionKey.CK_LESS_EQUAL, filterRemoveEmptyString(deliveryState)); + } + + /** + * Set the value of deliveryState using prefixSearch. { like 'xxx%' } + * If the value is null or empty-string, this condition is ignored. + * + * @param deliveryState The value of deliveryState as prefixSearch. + */ + public void setDeliveryState_PrefixSearch(String deliveryState) { + registerDeliveryState(ConditionKey.CK_PREFIX_SEARCH, filterRemoveEmptyString(deliveryState)); + } + + /** + * Set the value of deliveryState using likeSearch. { like '%xxx%' } + * If the value is null or empty-string, this condition is ignored. + * You can invoke this method several times and the conditions are set up. + * + * @param deliveryState The value of deliveryState as likeSearch. + * @param likeSearchOption Like search option. (NotNull) + */ + public void setDeliveryState_LikeSearch(String deliveryState, jp.sf.pal.pompei.allcommon.cbean.coption.LikeSearchOption likeSearchOption) { + registerLikeSearchQuery(ConditionKey.CK_LIKE_SEARCH, filterRemoveEmptyString(deliveryState), getCValueDeliveryState(), COL_DELIVERY_STATE, J_DeliveryState, UJ_deliveryState, likeSearchOption); + } + + /** + * Set the value of deliveryState using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param deliveryStateList The value of deliveryState as inScope. + */ + public void setDeliveryState_InScope(java.util.List deliveryStateList) { + registerDeliveryState(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyStringFromList(deliveryStateList)); + } + + /** + * Set the value of deliveryState using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param deliveryState The value of deliveryState as inScope. + */ + public void setDeliveryState_InScope(String deliveryState, jp.sf.pal.pompei.allcommon.cbean.coption.InScopeOption option) { + registerInScopeQuery(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyString(deliveryState), getCValueDeliveryState(), COL_DELIVERY_STATE, J_DeliveryState, UJ_deliveryState, option); + } + + /** + * Set the value of deliveryState using notInScope. { not in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param deliveryStateList The value of deliveryState as notInScope. + */ + public void setDeliveryState_NotInScope(java.util.List deliveryStateList) { + registerDeliveryState(ConditionKey.CK_NOT_IN_SCOPE, filterRemoveEmptyStringFromList(deliveryStateList)); + } + + /** + * Set the value of deliveryState using isNull. { is null } + */ + public void setDeliveryState_IsNull() { + registerDeliveryState(ConditionKey.CK_IS_NULL, DUMMY_OBJECT); + } + + /** + * Set the value of deliveryState using isNotNull. { is not null } + */ + public void setDeliveryState_IsNotNull() { + registerDeliveryState(ConditionKey.CK_IS_NOT_NULL, DUMMY_OBJECT); + } + + /** + * Register condition of deliveryState. + * + * @param key Condition key. (NotNull) + * @param value The value of deliveryState. (Nullable) + */ + protected void registerDeliveryState(ConditionKey key, Object value) { + registerQuery(key, value, getCValueDeliveryState(), COL_DELIVERY_STATE, J_DeliveryState, UJ_deliveryState); + } + + /** + * Register inline condition of deliveryState. + * + * @param key Condition key. (NotNull) + * @param value The value of deliveryState. (Nullable) + */ + protected void registerInlineDeliveryState(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueDeliveryState(), COL_DELIVERY_STATE, J_DeliveryState, UJ_deliveryState); + } + + abstract protected ConditionValue getCValueDeliveryState(); + + /** Column db name of deliveryCountry. */ + protected static final String COL_DELIVERY_COUNTRY = "DELIVERY_COUNTRY"; + + /** Column java name of deliveryCountry. */ + protected static final String J_DeliveryCountry = "DeliveryCountry"; + + /** Column uncapitalised java name of deliveryCountry. */ + protected static final String UJ_deliveryCountry = "deliveryCountry"; + + /** + * Set the value of deliveryCountry using equal. { = } + * If the value is null or empty-string, this condition is ignored. + * + * @param deliveryCountry The value of deliveryCountry as equal. + */ + public void setDeliveryCountry_Equal(String deliveryCountry) { + registerDeliveryCountry(ConditionKey.CK_EQUAL, filterRemoveEmptyString(deliveryCountry)); + } + + /** + * Set the value of deliveryCountry using notEqual. { != } + * If the value is null or empty-string, this condition is ignored. + * + * @param deliveryCountry The value of deliveryCountry as notEqual. + */ + public void setDeliveryCountry_NotEqual(String deliveryCountry) { + registerDeliveryCountry(ConditionKey.CK_NOT_EQUAL, filterRemoveEmptyString(deliveryCountry)); + } + + /** + * Set the value of deliveryCountry using greaterThan. { > } + * If the value is null or empty-string, this condition is ignored. + * + * @param deliveryCountry The value of deliveryCountry as greaterThan. + */ + public void setDeliveryCountry_GreaterThan(String deliveryCountry) { + registerDeliveryCountry(ConditionKey.CK_GREATER_THAN, filterRemoveEmptyString(deliveryCountry)); + } + + /** + * Set the value of deliveryCountry using lessThan. { < } + * If the value is null or empty-string, this condition is ignored. + * + * @param deliveryCountry The value of deliveryCountry as lessThan. + */ + public void setDeliveryCountry_LessThan(String deliveryCountry) { + registerDeliveryCountry(ConditionKey.CK_LESS_THAN, filterRemoveEmptyString(deliveryCountry)); + } + + /** + * Set the value of deliveryCountry using greaterEqual. { >= } + * If the value is null or empty-string, this condition is ignored. + * + * @param deliveryCountry The value of deliveryCountry as greaterEqual. + */ + public void setDeliveryCountry_GreaterEqual(String deliveryCountry) { + registerDeliveryCountry(ConditionKey.CK_GREATER_EQUAL, filterRemoveEmptyString(deliveryCountry)); + } + + /** + * Set the value of deliveryCountry using lessEqual. { <= } + * If the value is null or empty-string, this condition is ignored. + * + * @param deliveryCountry The value of deliveryCountry as lessEqual. + */ + public void setDeliveryCountry_LessEqual(String deliveryCountry) { + registerDeliveryCountry(ConditionKey.CK_LESS_EQUAL, filterRemoveEmptyString(deliveryCountry)); + } + + /** + * Set the value of deliveryCountry using prefixSearch. { like 'xxx%' } + * If the value is null or empty-string, this condition is ignored. + * + * @param deliveryCountry The value of deliveryCountry as prefixSearch. + */ + public void setDeliveryCountry_PrefixSearch(String deliveryCountry) { + registerDeliveryCountry(ConditionKey.CK_PREFIX_SEARCH, filterRemoveEmptyString(deliveryCountry)); + } + + /** + * Set the value of deliveryCountry using likeSearch. { like '%xxx%' } + * If the value is null or empty-string, this condition is ignored. + * You can invoke this method several times and the conditions are set up. + * + * @param deliveryCountry The value of deliveryCountry as likeSearch. + * @param likeSearchOption Like search option. (NotNull) + */ + public void setDeliveryCountry_LikeSearch(String deliveryCountry, jp.sf.pal.pompei.allcommon.cbean.coption.LikeSearchOption likeSearchOption) { + registerLikeSearchQuery(ConditionKey.CK_LIKE_SEARCH, filterRemoveEmptyString(deliveryCountry), getCValueDeliveryCountry(), COL_DELIVERY_COUNTRY, J_DeliveryCountry, UJ_deliveryCountry, likeSearchOption); + } + + /** + * Set the value of deliveryCountry using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param deliveryCountryList The value of deliveryCountry as inScope. + */ + public void setDeliveryCountry_InScope(java.util.List deliveryCountryList) { + registerDeliveryCountry(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyStringFromList(deliveryCountryList)); + } + + /** + * Set the value of deliveryCountry using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param deliveryCountry The value of deliveryCountry as inScope. + */ + public void setDeliveryCountry_InScope(String deliveryCountry, jp.sf.pal.pompei.allcommon.cbean.coption.InScopeOption option) { + registerInScopeQuery(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyString(deliveryCountry), getCValueDeliveryCountry(), COL_DELIVERY_COUNTRY, J_DeliveryCountry, UJ_deliveryCountry, option); + } + + /** + * Set the value of deliveryCountry using notInScope. { not in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param deliveryCountryList The value of deliveryCountry as notInScope. + */ + public void setDeliveryCountry_NotInScope(java.util.List deliveryCountryList) { + registerDeliveryCountry(ConditionKey.CK_NOT_IN_SCOPE, filterRemoveEmptyStringFromList(deliveryCountryList)); + } + + /** + * Register condition of deliveryCountry. + * + * @param key Condition key. (NotNull) + * @param value The value of deliveryCountry. (Nullable) + */ + protected void registerDeliveryCountry(ConditionKey key, Object value) { + registerQuery(key, value, getCValueDeliveryCountry(), COL_DELIVERY_COUNTRY, J_DeliveryCountry, UJ_deliveryCountry); + } + + /** + * Register inline condition of deliveryCountry. + * + * @param key Condition key. (NotNull) + * @param value The value of deliveryCountry. (Nullable) + */ + protected void registerInlineDeliveryCountry(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueDeliveryCountry(), COL_DELIVERY_COUNTRY, J_DeliveryCountry, UJ_deliveryCountry); + } + + abstract protected ConditionValue getCValueDeliveryCountry(); + + /** Column db name of deliveryAddressFormatId. */ + protected static final String COL_DELIVERY_ADDRESS_FORMAT_ID = "DELIVERY_ADDRESS_FORMAT_ID"; + + /** Column java name of deliveryAddressFormatId. */ + protected static final String J_DeliveryAddressFormatId = "DeliveryAddressFormatId"; + + /** Column uncapitalised java name of deliveryAddressFormatId. */ + protected static final String UJ_deliveryAddressFormatId = "deliveryAddressFormatId"; + + /** + * Set the value of deliveryAddressFormatId using equal. { = } + * + * @param deliveryAddressFormatId The value of deliveryAddressFormatId as equal. + */ + public void setDeliveryAddressFormatId_Equal(java.math.BigDecimal deliveryAddressFormatId) { + registerDeliveryAddressFormatId(ConditionKey.CK_EQUAL, deliveryAddressFormatId); + } + + /** + * Set the value of deliveryAddressFormatId using notEqual. { != } + * + * @param deliveryAddressFormatId The value of deliveryAddressFormatId as notEqual. + */ + public void setDeliveryAddressFormatId_NotEqual(java.math.BigDecimal deliveryAddressFormatId) { + registerDeliveryAddressFormatId(ConditionKey.CK_NOT_EQUAL, deliveryAddressFormatId); + } + + /** + * Set the value of deliveryAddressFormatId using greaterThan. { > } + * + * @param deliveryAddressFormatId The value of deliveryAddressFormatId as greaterThan. + */ + public void setDeliveryAddressFormatId_GreaterThan(java.math.BigDecimal deliveryAddressFormatId) { + registerDeliveryAddressFormatId(ConditionKey.CK_GREATER_THAN, deliveryAddressFormatId); + } + + /** + * Set the value of deliveryAddressFormatId using lessThan. { < } + * + * @param deliveryAddressFormatId The value of deliveryAddressFormatId as lessThan. + */ + public void setDeliveryAddressFormatId_LessThan(java.math.BigDecimal deliveryAddressFormatId) { + registerDeliveryAddressFormatId(ConditionKey.CK_LESS_THAN, deliveryAddressFormatId); + } + + /** + * Set the value of deliveryAddressFormatId using greaterEqual. { >= } + * + * @param deliveryAddressFormatId The value of deliveryAddressFormatId as greaterEqual. + */ + public void setDeliveryAddressFormatId_GreaterEqual(java.math.BigDecimal deliveryAddressFormatId) { + registerDeliveryAddressFormatId(ConditionKey.CK_GREATER_EQUAL, deliveryAddressFormatId); + } + + /** + * Set the value of deliveryAddressFormatId using lessEqual. { <= } + * + * @param deliveryAddressFormatId The value of deliveryAddressFormatId as lessEqual. + */ + public void setDeliveryAddressFormatId_LessEqual(java.math.BigDecimal deliveryAddressFormatId) { + registerDeliveryAddressFormatId(ConditionKey.CK_LESS_EQUAL, deliveryAddressFormatId); + } + + /** + * Set the value of deliveryAddressFormatId using inScope. { in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param deliveryAddressFormatIdList The value of deliveryAddressFormatId as inScope. + */ + public void setDeliveryAddressFormatId_InScope(java.util.List deliveryAddressFormatIdList) { + registerDeliveryAddressFormatId(ConditionKey.CK_IN_SCOPE, deliveryAddressFormatIdList); + } + + /** + * Set the value of deliveryAddressFormatId using notInScope. { not in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param deliveryAddressFormatIdList The value of deliveryAddressFormatId as notInScope. + */ + public void setDeliveryAddressFormatId_NotInScope(java.util.List deliveryAddressFormatIdList) { + registerDeliveryAddressFormatId(ConditionKey.CK_NOT_IN_SCOPE, deliveryAddressFormatIdList); + } + + /** + * Register condition of deliveryAddressFormatId. + * + * @param key Condition key. (NotNull) + * @param value The value of deliveryAddressFormatId. (Nullable) + */ + protected void registerDeliveryAddressFormatId(ConditionKey key, Object value) { + registerQuery(key, value, getCValueDeliveryAddressFormatId(), COL_DELIVERY_ADDRESS_FORMAT_ID, J_DeliveryAddressFormatId, UJ_deliveryAddressFormatId); + } + + /** + * Register inline condition of deliveryAddressFormatId. + * + * @param key Condition key. (NotNull) + * @param value The value of deliveryAddressFormatId. (Nullable) + */ + protected void registerInlineDeliveryAddressFormatId(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueDeliveryAddressFormatId(), COL_DELIVERY_ADDRESS_FORMAT_ID, J_DeliveryAddressFormatId, UJ_deliveryAddressFormatId); + } + + abstract protected ConditionValue getCValueDeliveryAddressFormatId(); + + /** Column db name of billingName. */ + protected static final String COL_BILLING_NAME = "BILLING_NAME"; + + /** Column java name of billingName. */ + protected static final String J_BillingName = "BillingName"; + + /** Column uncapitalised java name of billingName. */ + protected static final String UJ_billingName = "billingName"; + + /** + * Set the value of billingName using equal. { = } + * If the value is null or empty-string, this condition is ignored. + * + * @param billingName The value of billingName as equal. + */ + public void setBillingName_Equal(String billingName) { + registerBillingName(ConditionKey.CK_EQUAL, filterRemoveEmptyString(billingName)); + } + + /** + * Set the value of billingName using notEqual. { != } + * If the value is null or empty-string, this condition is ignored. + * + * @param billingName The value of billingName as notEqual. + */ + public void setBillingName_NotEqual(String billingName) { + registerBillingName(ConditionKey.CK_NOT_EQUAL, filterRemoveEmptyString(billingName)); + } + + /** + * Set the value of billingName using greaterThan. { > } + * If the value is null or empty-string, this condition is ignored. + * + * @param billingName The value of billingName as greaterThan. + */ + public void setBillingName_GreaterThan(String billingName) { + registerBillingName(ConditionKey.CK_GREATER_THAN, filterRemoveEmptyString(billingName)); + } + + /** + * Set the value of billingName using lessThan. { < } + * If the value is null or empty-string, this condition is ignored. + * + * @param billingName The value of billingName as lessThan. + */ + public void setBillingName_LessThan(String billingName) { + registerBillingName(ConditionKey.CK_LESS_THAN, filterRemoveEmptyString(billingName)); + } + + /** + * Set the value of billingName using greaterEqual. { >= } + * If the value is null or empty-string, this condition is ignored. + * + * @param billingName The value of billingName as greaterEqual. + */ + public void setBillingName_GreaterEqual(String billingName) { + registerBillingName(ConditionKey.CK_GREATER_EQUAL, filterRemoveEmptyString(billingName)); + } + + /** + * Set the value of billingName using lessEqual. { <= } + * If the value is null or empty-string, this condition is ignored. + * + * @param billingName The value of billingName as lessEqual. + */ + public void setBillingName_LessEqual(String billingName) { + registerBillingName(ConditionKey.CK_LESS_EQUAL, filterRemoveEmptyString(billingName)); + } + + /** + * Set the value of billingName using prefixSearch. { like 'xxx%' } + * If the value is null or empty-string, this condition is ignored. + * + * @param billingName The value of billingName as prefixSearch. + */ + public void setBillingName_PrefixSearch(String billingName) { + registerBillingName(ConditionKey.CK_PREFIX_SEARCH, filterRemoveEmptyString(billingName)); + } + + /** + * Set the value of billingName using likeSearch. { like '%xxx%' } + * If the value is null or empty-string, this condition is ignored. + * You can invoke this method several times and the conditions are set up. + * + * @param billingName The value of billingName as likeSearch. + * @param likeSearchOption Like search option. (NotNull) + */ + public void setBillingName_LikeSearch(String billingName, jp.sf.pal.pompei.allcommon.cbean.coption.LikeSearchOption likeSearchOption) { + registerLikeSearchQuery(ConditionKey.CK_LIKE_SEARCH, filterRemoveEmptyString(billingName), getCValueBillingName(), COL_BILLING_NAME, J_BillingName, UJ_billingName, likeSearchOption); + } + + /** + * Set the value of billingName using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param billingNameList The value of billingName as inScope. + */ + public void setBillingName_InScope(java.util.List billingNameList) { + registerBillingName(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyStringFromList(billingNameList)); + } + + /** + * Set the value of billingName using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param billingName The value of billingName as inScope. + */ + public void setBillingName_InScope(String billingName, jp.sf.pal.pompei.allcommon.cbean.coption.InScopeOption option) { + registerInScopeQuery(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyString(billingName), getCValueBillingName(), COL_BILLING_NAME, J_BillingName, UJ_billingName, option); + } + + /** + * Set the value of billingName using notInScope. { not in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param billingNameList The value of billingName as notInScope. + */ + public void setBillingName_NotInScope(java.util.List billingNameList) { + registerBillingName(ConditionKey.CK_NOT_IN_SCOPE, filterRemoveEmptyStringFromList(billingNameList)); + } + + /** + * Register condition of billingName. + * + * @param key Condition key. (NotNull) + * @param value The value of billingName. (Nullable) + */ + protected void registerBillingName(ConditionKey key, Object value) { + registerQuery(key, value, getCValueBillingName(), COL_BILLING_NAME, J_BillingName, UJ_billingName); + } + + /** + * Register inline condition of billingName. + * + * @param key Condition key. (NotNull) + * @param value The value of billingName. (Nullable) + */ + protected void registerInlineBillingName(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueBillingName(), COL_BILLING_NAME, J_BillingName, UJ_billingName); + } + + abstract protected ConditionValue getCValueBillingName(); + + /** Column db name of billingCompany. */ + protected static final String COL_BILLING_COMPANY = "BILLING_COMPANY"; + + /** Column java name of billingCompany. */ + protected static final String J_BillingCompany = "BillingCompany"; + + /** Column uncapitalised java name of billingCompany. */ + protected static final String UJ_billingCompany = "billingCompany"; + + /** + * Set the value of billingCompany using equal. { = } + * If the value is null or empty-string, this condition is ignored. + * + * @param billingCompany The value of billingCompany as equal. + */ + public void setBillingCompany_Equal(String billingCompany) { + registerBillingCompany(ConditionKey.CK_EQUAL, filterRemoveEmptyString(billingCompany)); + } + + /** + * Set the value of billingCompany using notEqual. { != } + * If the value is null or empty-string, this condition is ignored. + * + * @param billingCompany The value of billingCompany as notEqual. + */ + public void setBillingCompany_NotEqual(String billingCompany) { + registerBillingCompany(ConditionKey.CK_NOT_EQUAL, filterRemoveEmptyString(billingCompany)); + } + + /** + * Set the value of billingCompany using greaterThan. { > } + * If the value is null or empty-string, this condition is ignored. + * + * @param billingCompany The value of billingCompany as greaterThan. + */ + public void setBillingCompany_GreaterThan(String billingCompany) { + registerBillingCompany(ConditionKey.CK_GREATER_THAN, filterRemoveEmptyString(billingCompany)); + } + + /** + * Set the value of billingCompany using lessThan. { < } + * If the value is null or empty-string, this condition is ignored. + * + * @param billingCompany The value of billingCompany as lessThan. + */ + public void setBillingCompany_LessThan(String billingCompany) { + registerBillingCompany(ConditionKey.CK_LESS_THAN, filterRemoveEmptyString(billingCompany)); + } + + /** + * Set the value of billingCompany using greaterEqual. { >= } + * If the value is null or empty-string, this condition is ignored. + * + * @param billingCompany The value of billingCompany as greaterEqual. + */ + public void setBillingCompany_GreaterEqual(String billingCompany) { + registerBillingCompany(ConditionKey.CK_GREATER_EQUAL, filterRemoveEmptyString(billingCompany)); + } + + /** + * Set the value of billingCompany using lessEqual. { <= } + * If the value is null or empty-string, this condition is ignored. + * + * @param billingCompany The value of billingCompany as lessEqual. + */ + public void setBillingCompany_LessEqual(String billingCompany) { + registerBillingCompany(ConditionKey.CK_LESS_EQUAL, filterRemoveEmptyString(billingCompany)); + } + + /** + * Set the value of billingCompany using prefixSearch. { like 'xxx%' } + * If the value is null or empty-string, this condition is ignored. + * + * @param billingCompany The value of billingCompany as prefixSearch. + */ + public void setBillingCompany_PrefixSearch(String billingCompany) { + registerBillingCompany(ConditionKey.CK_PREFIX_SEARCH, filterRemoveEmptyString(billingCompany)); + } + + /** + * Set the value of billingCompany using likeSearch. { like '%xxx%' } + * If the value is null or empty-string, this condition is ignored. + * You can invoke this method several times and the conditions are set up. + * + * @param billingCompany The value of billingCompany as likeSearch. + * @param likeSearchOption Like search option. (NotNull) + */ + public void setBillingCompany_LikeSearch(String billingCompany, jp.sf.pal.pompei.allcommon.cbean.coption.LikeSearchOption likeSearchOption) { + registerLikeSearchQuery(ConditionKey.CK_LIKE_SEARCH, filterRemoveEmptyString(billingCompany), getCValueBillingCompany(), COL_BILLING_COMPANY, J_BillingCompany, UJ_billingCompany, likeSearchOption); + } + + /** + * Set the value of billingCompany using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param billingCompanyList The value of billingCompany as inScope. + */ + public void setBillingCompany_InScope(java.util.List billingCompanyList) { + registerBillingCompany(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyStringFromList(billingCompanyList)); + } + + /** + * Set the value of billingCompany using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param billingCompany The value of billingCompany as inScope. + */ + public void setBillingCompany_InScope(String billingCompany, jp.sf.pal.pompei.allcommon.cbean.coption.InScopeOption option) { + registerInScopeQuery(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyString(billingCompany), getCValueBillingCompany(), COL_BILLING_COMPANY, J_BillingCompany, UJ_billingCompany, option); + } + + /** + * Set the value of billingCompany using notInScope. { not in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param billingCompanyList The value of billingCompany as notInScope. + */ + public void setBillingCompany_NotInScope(java.util.List billingCompanyList) { + registerBillingCompany(ConditionKey.CK_NOT_IN_SCOPE, filterRemoveEmptyStringFromList(billingCompanyList)); + } + + /** + * Set the value of billingCompany using isNull. { is null } + */ + public void setBillingCompany_IsNull() { + registerBillingCompany(ConditionKey.CK_IS_NULL, DUMMY_OBJECT); + } + + /** + * Set the value of billingCompany using isNotNull. { is not null } + */ + public void setBillingCompany_IsNotNull() { + registerBillingCompany(ConditionKey.CK_IS_NOT_NULL, DUMMY_OBJECT); + } + + /** + * Register condition of billingCompany. + * + * @param key Condition key. (NotNull) + * @param value The value of billingCompany. (Nullable) + */ + protected void registerBillingCompany(ConditionKey key, Object value) { + registerQuery(key, value, getCValueBillingCompany(), COL_BILLING_COMPANY, J_BillingCompany, UJ_billingCompany); + } + + /** + * Register inline condition of billingCompany. + * + * @param key Condition key. (NotNull) + * @param value The value of billingCompany. (Nullable) + */ + protected void registerInlineBillingCompany(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueBillingCompany(), COL_BILLING_COMPANY, J_BillingCompany, UJ_billingCompany); + } + + abstract protected ConditionValue getCValueBillingCompany(); + + /** Column db name of billingStreetAddress. */ + protected static final String COL_BILLING_STREET_ADDRESS = "BILLING_STREET_ADDRESS"; + + /** Column java name of billingStreetAddress. */ + protected static final String J_BillingStreetAddress = "BillingStreetAddress"; + + /** Column uncapitalised java name of billingStreetAddress. */ + protected static final String UJ_billingStreetAddress = "billingStreetAddress"; + + /** + * Set the value of billingStreetAddress using equal. { = } + * If the value is null or empty-string, this condition is ignored. + * + * @param billingStreetAddress The value of billingStreetAddress as equal. + */ + public void setBillingStreetAddress_Equal(String billingStreetAddress) { + registerBillingStreetAddress(ConditionKey.CK_EQUAL, filterRemoveEmptyString(billingStreetAddress)); + } + + /** + * Set the value of billingStreetAddress using notEqual. { != } + * If the value is null or empty-string, this condition is ignored. + * + * @param billingStreetAddress The value of billingStreetAddress as notEqual. + */ + public void setBillingStreetAddress_NotEqual(String billingStreetAddress) { + registerBillingStreetAddress(ConditionKey.CK_NOT_EQUAL, filterRemoveEmptyString(billingStreetAddress)); + } + + /** + * Set the value of billingStreetAddress using greaterThan. { > } + * If the value is null or empty-string, this condition is ignored. + * + * @param billingStreetAddress The value of billingStreetAddress as greaterThan. + */ + public void setBillingStreetAddress_GreaterThan(String billingStreetAddress) { + registerBillingStreetAddress(ConditionKey.CK_GREATER_THAN, filterRemoveEmptyString(billingStreetAddress)); + } + + /** + * Set the value of billingStreetAddress using lessThan. { < } + * If the value is null or empty-string, this condition is ignored. + * + * @param billingStreetAddress The value of billingStreetAddress as lessThan. + */ + public void setBillingStreetAddress_LessThan(String billingStreetAddress) { + registerBillingStreetAddress(ConditionKey.CK_LESS_THAN, filterRemoveEmptyString(billingStreetAddress)); + } + + /** + * Set the value of billingStreetAddress using greaterEqual. { >= } + * If the value is null or empty-string, this condition is ignored. + * + * @param billingStreetAddress The value of billingStreetAddress as greaterEqual. + */ + public void setBillingStreetAddress_GreaterEqual(String billingStreetAddress) { + registerBillingStreetAddress(ConditionKey.CK_GREATER_EQUAL, filterRemoveEmptyString(billingStreetAddress)); + } + + /** + * Set the value of billingStreetAddress using lessEqual. { <= } + * If the value is null or empty-string, this condition is ignored. + * + * @param billingStreetAddress The value of billingStreetAddress as lessEqual. + */ + public void setBillingStreetAddress_LessEqual(String billingStreetAddress) { + registerBillingStreetAddress(ConditionKey.CK_LESS_EQUAL, filterRemoveEmptyString(billingStreetAddress)); + } + + /** + * Set the value of billingStreetAddress using prefixSearch. { like 'xxx%' } + * If the value is null or empty-string, this condition is ignored. + * + * @param billingStreetAddress The value of billingStreetAddress as prefixSearch. + */ + public void setBillingStreetAddress_PrefixSearch(String billingStreetAddress) { + registerBillingStreetAddress(ConditionKey.CK_PREFIX_SEARCH, filterRemoveEmptyString(billingStreetAddress)); + } + + /** + * Set the value of billingStreetAddress using likeSearch. { like '%xxx%' } + * If the value is null or empty-string, this condition is ignored. + * You can invoke this method several times and the conditions are set up. + * + * @param billingStreetAddress The value of billingStreetAddress as likeSearch. + * @param likeSearchOption Like search option. (NotNull) + */ + public void setBillingStreetAddress_LikeSearch(String billingStreetAddress, jp.sf.pal.pompei.allcommon.cbean.coption.LikeSearchOption likeSearchOption) { + registerLikeSearchQuery(ConditionKey.CK_LIKE_SEARCH, filterRemoveEmptyString(billingStreetAddress), getCValueBillingStreetAddress(), COL_BILLING_STREET_ADDRESS, J_BillingStreetAddress, UJ_billingStreetAddress, likeSearchOption); + } + + /** + * Set the value of billingStreetAddress using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param billingStreetAddressList The value of billingStreetAddress as inScope. + */ + public void setBillingStreetAddress_InScope(java.util.List billingStreetAddressList) { + registerBillingStreetAddress(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyStringFromList(billingStreetAddressList)); + } + + /** + * Set the value of billingStreetAddress using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param billingStreetAddress The value of billingStreetAddress as inScope. + */ + public void setBillingStreetAddress_InScope(String billingStreetAddress, jp.sf.pal.pompei.allcommon.cbean.coption.InScopeOption option) { + registerInScopeQuery(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyString(billingStreetAddress), getCValueBillingStreetAddress(), COL_BILLING_STREET_ADDRESS, J_BillingStreetAddress, UJ_billingStreetAddress, option); + } + + /** + * Set the value of billingStreetAddress using notInScope. { not in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param billingStreetAddressList The value of billingStreetAddress as notInScope. + */ + public void setBillingStreetAddress_NotInScope(java.util.List billingStreetAddressList) { + registerBillingStreetAddress(ConditionKey.CK_NOT_IN_SCOPE, filterRemoveEmptyStringFromList(billingStreetAddressList)); + } + + /** + * Register condition of billingStreetAddress. + * + * @param key Condition key. (NotNull) + * @param value The value of billingStreetAddress. (Nullable) + */ + protected void registerBillingStreetAddress(ConditionKey key, Object value) { + registerQuery(key, value, getCValueBillingStreetAddress(), COL_BILLING_STREET_ADDRESS, J_BillingStreetAddress, UJ_billingStreetAddress); + } + + /** + * Register inline condition of billingStreetAddress. + * + * @param key Condition key. (NotNull) + * @param value The value of billingStreetAddress. (Nullable) + */ + protected void registerInlineBillingStreetAddress(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueBillingStreetAddress(), COL_BILLING_STREET_ADDRESS, J_BillingStreetAddress, UJ_billingStreetAddress); + } + + abstract protected ConditionValue getCValueBillingStreetAddress(); + + /** Column db name of billingSuburb. */ + protected static final String COL_BILLING_SUBURB = "BILLING_SUBURB"; + + /** Column java name of billingSuburb. */ + protected static final String J_BillingSuburb = "BillingSuburb"; + + /** Column uncapitalised java name of billingSuburb. */ + protected static final String UJ_billingSuburb = "billingSuburb"; + + /** + * Set the value of billingSuburb using equal. { = } + * If the value is null or empty-string, this condition is ignored. + * + * @param billingSuburb The value of billingSuburb as equal. + */ + public void setBillingSuburb_Equal(String billingSuburb) { + registerBillingSuburb(ConditionKey.CK_EQUAL, filterRemoveEmptyString(billingSuburb)); + } + + /** + * Set the value of billingSuburb using notEqual. { != } + * If the value is null or empty-string, this condition is ignored. + * + * @param billingSuburb The value of billingSuburb as notEqual. + */ + public void setBillingSuburb_NotEqual(String billingSuburb) { + registerBillingSuburb(ConditionKey.CK_NOT_EQUAL, filterRemoveEmptyString(billingSuburb)); + } + + /** + * Set the value of billingSuburb using greaterThan. { > } + * If the value is null or empty-string, this condition is ignored. + * + * @param billingSuburb The value of billingSuburb as greaterThan. + */ + public void setBillingSuburb_GreaterThan(String billingSuburb) { + registerBillingSuburb(ConditionKey.CK_GREATER_THAN, filterRemoveEmptyString(billingSuburb)); + } + + /** + * Set the value of billingSuburb using lessThan. { < } + * If the value is null or empty-string, this condition is ignored. + * + * @param billingSuburb The value of billingSuburb as lessThan. + */ + public void setBillingSuburb_LessThan(String billingSuburb) { + registerBillingSuburb(ConditionKey.CK_LESS_THAN, filterRemoveEmptyString(billingSuburb)); + } + + /** + * Set the value of billingSuburb using greaterEqual. { >= } + * If the value is null or empty-string, this condition is ignored. + * + * @param billingSuburb The value of billingSuburb as greaterEqual. + */ + public void setBillingSuburb_GreaterEqual(String billingSuburb) { + registerBillingSuburb(ConditionKey.CK_GREATER_EQUAL, filterRemoveEmptyString(billingSuburb)); + } + + /** + * Set the value of billingSuburb using lessEqual. { <= } + * If the value is null or empty-string, this condition is ignored. + * + * @param billingSuburb The value of billingSuburb as lessEqual. + */ + public void setBillingSuburb_LessEqual(String billingSuburb) { + registerBillingSuburb(ConditionKey.CK_LESS_EQUAL, filterRemoveEmptyString(billingSuburb)); + } + + /** + * Set the value of billingSuburb using prefixSearch. { like 'xxx%' } + * If the value is null or empty-string, this condition is ignored. + * + * @param billingSuburb The value of billingSuburb as prefixSearch. + */ + public void setBillingSuburb_PrefixSearch(String billingSuburb) { + registerBillingSuburb(ConditionKey.CK_PREFIX_SEARCH, filterRemoveEmptyString(billingSuburb)); + } + + /** + * Set the value of billingSuburb using likeSearch. { like '%xxx%' } + * If the value is null or empty-string, this condition is ignored. + * You can invoke this method several times and the conditions are set up. + * + * @param billingSuburb The value of billingSuburb as likeSearch. + * @param likeSearchOption Like search option. (NotNull) + */ + public void setBillingSuburb_LikeSearch(String billingSuburb, jp.sf.pal.pompei.allcommon.cbean.coption.LikeSearchOption likeSearchOption) { + registerLikeSearchQuery(ConditionKey.CK_LIKE_SEARCH, filterRemoveEmptyString(billingSuburb), getCValueBillingSuburb(), COL_BILLING_SUBURB, J_BillingSuburb, UJ_billingSuburb, likeSearchOption); + } + + /** + * Set the value of billingSuburb using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param billingSuburbList The value of billingSuburb as inScope. + */ + public void setBillingSuburb_InScope(java.util.List billingSuburbList) { + registerBillingSuburb(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyStringFromList(billingSuburbList)); + } + + /** + * Set the value of billingSuburb using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param billingSuburb The value of billingSuburb as inScope. + */ + public void setBillingSuburb_InScope(String billingSuburb, jp.sf.pal.pompei.allcommon.cbean.coption.InScopeOption option) { + registerInScopeQuery(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyString(billingSuburb), getCValueBillingSuburb(), COL_BILLING_SUBURB, J_BillingSuburb, UJ_billingSuburb, option); + } + + /** + * Set the value of billingSuburb using notInScope. { not in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param billingSuburbList The value of billingSuburb as notInScope. + */ + public void setBillingSuburb_NotInScope(java.util.List billingSuburbList) { + registerBillingSuburb(ConditionKey.CK_NOT_IN_SCOPE, filterRemoveEmptyStringFromList(billingSuburbList)); + } + + /** + * Set the value of billingSuburb using isNull. { is null } + */ + public void setBillingSuburb_IsNull() { + registerBillingSuburb(ConditionKey.CK_IS_NULL, DUMMY_OBJECT); + } + + /** + * Set the value of billingSuburb using isNotNull. { is not null } + */ + public void setBillingSuburb_IsNotNull() { + registerBillingSuburb(ConditionKey.CK_IS_NOT_NULL, DUMMY_OBJECT); + } + + /** + * Register condition of billingSuburb. + * + * @param key Condition key. (NotNull) + * @param value The value of billingSuburb. (Nullable) + */ + protected void registerBillingSuburb(ConditionKey key, Object value) { + registerQuery(key, value, getCValueBillingSuburb(), COL_BILLING_SUBURB, J_BillingSuburb, UJ_billingSuburb); + } + + /** + * Register inline condition of billingSuburb. + * + * @param key Condition key. (NotNull) + * @param value The value of billingSuburb. (Nullable) + */ + protected void registerInlineBillingSuburb(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueBillingSuburb(), COL_BILLING_SUBURB, J_BillingSuburb, UJ_billingSuburb); + } + + abstract protected ConditionValue getCValueBillingSuburb(); + + /** Column db name of billingCity. */ + protected static final String COL_BILLING_CITY = "BILLING_CITY"; + + /** Column java name of billingCity. */ + protected static final String J_BillingCity = "BillingCity"; + + /** Column uncapitalised java name of billingCity. */ + protected static final String UJ_billingCity = "billingCity"; + + /** + * Set the value of billingCity using equal. { = } + * If the value is null or empty-string, this condition is ignored. + * + * @param billingCity The value of billingCity as equal. + */ + public void setBillingCity_Equal(String billingCity) { + registerBillingCity(ConditionKey.CK_EQUAL, filterRemoveEmptyString(billingCity)); + } + + /** + * Set the value of billingCity using notEqual. { != } + * If the value is null or empty-string, this condition is ignored. + * + * @param billingCity The value of billingCity as notEqual. + */ + public void setBillingCity_NotEqual(String billingCity) { + registerBillingCity(ConditionKey.CK_NOT_EQUAL, filterRemoveEmptyString(billingCity)); + } + + /** + * Set the value of billingCity using greaterThan. { > } + * If the value is null or empty-string, this condition is ignored. + * + * @param billingCity The value of billingCity as greaterThan. + */ + public void setBillingCity_GreaterThan(String billingCity) { + registerBillingCity(ConditionKey.CK_GREATER_THAN, filterRemoveEmptyString(billingCity)); + } + + /** + * Set the value of billingCity using lessThan. { < } + * If the value is null or empty-string, this condition is ignored. + * + * @param billingCity The value of billingCity as lessThan. + */ + public void setBillingCity_LessThan(String billingCity) { + registerBillingCity(ConditionKey.CK_LESS_THAN, filterRemoveEmptyString(billingCity)); + } + + /** + * Set the value of billingCity using greaterEqual. { >= } + * If the value is null or empty-string, this condition is ignored. + * + * @param billingCity The value of billingCity as greaterEqual. + */ + public void setBillingCity_GreaterEqual(String billingCity) { + registerBillingCity(ConditionKey.CK_GREATER_EQUAL, filterRemoveEmptyString(billingCity)); + } + + /** + * Set the value of billingCity using lessEqual. { <= } + * If the value is null or empty-string, this condition is ignored. + * + * @param billingCity The value of billingCity as lessEqual. + */ + public void setBillingCity_LessEqual(String billingCity) { + registerBillingCity(ConditionKey.CK_LESS_EQUAL, filterRemoveEmptyString(billingCity)); + } + + /** + * Set the value of billingCity using prefixSearch. { like 'xxx%' } + * If the value is null or empty-string, this condition is ignored. + * + * @param billingCity The value of billingCity as prefixSearch. + */ + public void setBillingCity_PrefixSearch(String billingCity) { + registerBillingCity(ConditionKey.CK_PREFIX_SEARCH, filterRemoveEmptyString(billingCity)); + } + + /** + * Set the value of billingCity using likeSearch. { like '%xxx%' } + * If the value is null or empty-string, this condition is ignored. + * You can invoke this method several times and the conditions are set up. + * + * @param billingCity The value of billingCity as likeSearch. + * @param likeSearchOption Like search option. (NotNull) + */ + public void setBillingCity_LikeSearch(String billingCity, jp.sf.pal.pompei.allcommon.cbean.coption.LikeSearchOption likeSearchOption) { + registerLikeSearchQuery(ConditionKey.CK_LIKE_SEARCH, filterRemoveEmptyString(billingCity), getCValueBillingCity(), COL_BILLING_CITY, J_BillingCity, UJ_billingCity, likeSearchOption); + } + + /** + * Set the value of billingCity using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param billingCityList The value of billingCity as inScope. + */ + public void setBillingCity_InScope(java.util.List billingCityList) { + registerBillingCity(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyStringFromList(billingCityList)); + } + + /** + * Set the value of billingCity using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param billingCity The value of billingCity as inScope. + */ + public void setBillingCity_InScope(String billingCity, jp.sf.pal.pompei.allcommon.cbean.coption.InScopeOption option) { + registerInScopeQuery(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyString(billingCity), getCValueBillingCity(), COL_BILLING_CITY, J_BillingCity, UJ_billingCity, option); + } + + /** + * Set the value of billingCity using notInScope. { not in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param billingCityList The value of billingCity as notInScope. + */ + public void setBillingCity_NotInScope(java.util.List billingCityList) { + registerBillingCity(ConditionKey.CK_NOT_IN_SCOPE, filterRemoveEmptyStringFromList(billingCityList)); + } + + /** + * Register condition of billingCity. + * + * @param key Condition key. (NotNull) + * @param value The value of billingCity. (Nullable) + */ + protected void registerBillingCity(ConditionKey key, Object value) { + registerQuery(key, value, getCValueBillingCity(), COL_BILLING_CITY, J_BillingCity, UJ_billingCity); + } + + /** + * Register inline condition of billingCity. + * + * @param key Condition key. (NotNull) + * @param value The value of billingCity. (Nullable) + */ + protected void registerInlineBillingCity(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueBillingCity(), COL_BILLING_CITY, J_BillingCity, UJ_billingCity); + } + + abstract protected ConditionValue getCValueBillingCity(); + + /** Column db name of billingPostcode. */ + protected static final String COL_BILLING_POSTCODE = "BILLING_POSTCODE"; + + /** Column java name of billingPostcode. */ + protected static final String J_BillingPostcode = "BillingPostcode"; + + /** Column uncapitalised java name of billingPostcode. */ + protected static final String UJ_billingPostcode = "billingPostcode"; + + /** + * Set the value of billingPostcode using equal. { = } + * If the value is null or empty-string, this condition is ignored. + * + * @param billingPostcode The value of billingPostcode as equal. + */ + public void setBillingPostcode_Equal(String billingPostcode) { + registerBillingPostcode(ConditionKey.CK_EQUAL, filterRemoveEmptyString(billingPostcode)); + } + + /** + * Set the value of billingPostcode using notEqual. { != } + * If the value is null or empty-string, this condition is ignored. + * + * @param billingPostcode The value of billingPostcode as notEqual. + */ + public void setBillingPostcode_NotEqual(String billingPostcode) { + registerBillingPostcode(ConditionKey.CK_NOT_EQUAL, filterRemoveEmptyString(billingPostcode)); + } + + /** + * Set the value of billingPostcode using greaterThan. { > } + * If the value is null or empty-string, this condition is ignored. + * + * @param billingPostcode The value of billingPostcode as greaterThan. + */ + public void setBillingPostcode_GreaterThan(String billingPostcode) { + registerBillingPostcode(ConditionKey.CK_GREATER_THAN, filterRemoveEmptyString(billingPostcode)); + } + + /** + * Set the value of billingPostcode using lessThan. { < } + * If the value is null or empty-string, this condition is ignored. + * + * @param billingPostcode The value of billingPostcode as lessThan. + */ + public void setBillingPostcode_LessThan(String billingPostcode) { + registerBillingPostcode(ConditionKey.CK_LESS_THAN, filterRemoveEmptyString(billingPostcode)); + } + + /** + * Set the value of billingPostcode using greaterEqual. { >= } + * If the value is null or empty-string, this condition is ignored. + * + * @param billingPostcode The value of billingPostcode as greaterEqual. + */ + public void setBillingPostcode_GreaterEqual(String billingPostcode) { + registerBillingPostcode(ConditionKey.CK_GREATER_EQUAL, filterRemoveEmptyString(billingPostcode)); + } + + /** + * Set the value of billingPostcode using lessEqual. { <= } + * If the value is null or empty-string, this condition is ignored. + * + * @param billingPostcode The value of billingPostcode as lessEqual. + */ + public void setBillingPostcode_LessEqual(String billingPostcode) { + registerBillingPostcode(ConditionKey.CK_LESS_EQUAL, filterRemoveEmptyString(billingPostcode)); + } + + /** + * Set the value of billingPostcode using prefixSearch. { like 'xxx%' } + * If the value is null or empty-string, this condition is ignored. + * + * @param billingPostcode The value of billingPostcode as prefixSearch. + */ + public void setBillingPostcode_PrefixSearch(String billingPostcode) { + registerBillingPostcode(ConditionKey.CK_PREFIX_SEARCH, filterRemoveEmptyString(billingPostcode)); + } + + /** + * Set the value of billingPostcode using likeSearch. { like '%xxx%' } + * If the value is null or empty-string, this condition is ignored. + * You can invoke this method several times and the conditions are set up. + * + * @param billingPostcode The value of billingPostcode as likeSearch. + * @param likeSearchOption Like search option. (NotNull) + */ + public void setBillingPostcode_LikeSearch(String billingPostcode, jp.sf.pal.pompei.allcommon.cbean.coption.LikeSearchOption likeSearchOption) { + registerLikeSearchQuery(ConditionKey.CK_LIKE_SEARCH, filterRemoveEmptyString(billingPostcode), getCValueBillingPostcode(), COL_BILLING_POSTCODE, J_BillingPostcode, UJ_billingPostcode, likeSearchOption); + } + + /** + * Set the value of billingPostcode using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param billingPostcodeList The value of billingPostcode as inScope. + */ + public void setBillingPostcode_InScope(java.util.List billingPostcodeList) { + registerBillingPostcode(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyStringFromList(billingPostcodeList)); + } + + /** + * Set the value of billingPostcode using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param billingPostcode The value of billingPostcode as inScope. + */ + public void setBillingPostcode_InScope(String billingPostcode, jp.sf.pal.pompei.allcommon.cbean.coption.InScopeOption option) { + registerInScopeQuery(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyString(billingPostcode), getCValueBillingPostcode(), COL_BILLING_POSTCODE, J_BillingPostcode, UJ_billingPostcode, option); + } + + /** + * Set the value of billingPostcode using notInScope. { not in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param billingPostcodeList The value of billingPostcode as notInScope. + */ + public void setBillingPostcode_NotInScope(java.util.List billingPostcodeList) { + registerBillingPostcode(ConditionKey.CK_NOT_IN_SCOPE, filterRemoveEmptyStringFromList(billingPostcodeList)); + } + + /** + * Register condition of billingPostcode. + * + * @param key Condition key. (NotNull) + * @param value The value of billingPostcode. (Nullable) + */ + protected void registerBillingPostcode(ConditionKey key, Object value) { + registerQuery(key, value, getCValueBillingPostcode(), COL_BILLING_POSTCODE, J_BillingPostcode, UJ_billingPostcode); + } + + /** + * Register inline condition of billingPostcode. + * + * @param key Condition key. (NotNull) + * @param value The value of billingPostcode. (Nullable) + */ + protected void registerInlineBillingPostcode(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueBillingPostcode(), COL_BILLING_POSTCODE, J_BillingPostcode, UJ_billingPostcode); + } + + abstract protected ConditionValue getCValueBillingPostcode(); + + /** Column db name of billingState. */ + protected static final String COL_BILLING_STATE = "BILLING_STATE"; + + /** Column java name of billingState. */ + protected static final String J_BillingState = "BillingState"; + + /** Column uncapitalised java name of billingState. */ + protected static final String UJ_billingState = "billingState"; + + /** + * Set the value of billingState using equal. { = } + * If the value is null or empty-string, this condition is ignored. + * + * @param billingState The value of billingState as equal. + */ + public void setBillingState_Equal(String billingState) { + registerBillingState(ConditionKey.CK_EQUAL, filterRemoveEmptyString(billingState)); + } + + /** + * Set the value of billingState using notEqual. { != } + * If the value is null or empty-string, this condition is ignored. + * + * @param billingState The value of billingState as notEqual. + */ + public void setBillingState_NotEqual(String billingState) { + registerBillingState(ConditionKey.CK_NOT_EQUAL, filterRemoveEmptyString(billingState)); + } + + /** + * Set the value of billingState using greaterThan. { > } + * If the value is null or empty-string, this condition is ignored. + * + * @param billingState The value of billingState as greaterThan. + */ + public void setBillingState_GreaterThan(String billingState) { + registerBillingState(ConditionKey.CK_GREATER_THAN, filterRemoveEmptyString(billingState)); + } + + /** + * Set the value of billingState using lessThan. { < } + * If the value is null or empty-string, this condition is ignored. + * + * @param billingState The value of billingState as lessThan. + */ + public void setBillingState_LessThan(String billingState) { + registerBillingState(ConditionKey.CK_LESS_THAN, filterRemoveEmptyString(billingState)); + } + + /** + * Set the value of billingState using greaterEqual. { >= } + * If the value is null or empty-string, this condition is ignored. + * + * @param billingState The value of billingState as greaterEqual. + */ + public void setBillingState_GreaterEqual(String billingState) { + registerBillingState(ConditionKey.CK_GREATER_EQUAL, filterRemoveEmptyString(billingState)); + } + + /** + * Set the value of billingState using lessEqual. { <= } + * If the value is null or empty-string, this condition is ignored. + * + * @param billingState The value of billingState as lessEqual. + */ + public void setBillingState_LessEqual(String billingState) { + registerBillingState(ConditionKey.CK_LESS_EQUAL, filterRemoveEmptyString(billingState)); + } + + /** + * Set the value of billingState using prefixSearch. { like 'xxx%' } + * If the value is null or empty-string, this condition is ignored. + * + * @param billingState The value of billingState as prefixSearch. + */ + public void setBillingState_PrefixSearch(String billingState) { + registerBillingState(ConditionKey.CK_PREFIX_SEARCH, filterRemoveEmptyString(billingState)); + } + + /** + * Set the value of billingState using likeSearch. { like '%xxx%' } + * If the value is null or empty-string, this condition is ignored. + * You can invoke this method several times and the conditions are set up. + * + * @param billingState The value of billingState as likeSearch. + * @param likeSearchOption Like search option. (NotNull) + */ + public void setBillingState_LikeSearch(String billingState, jp.sf.pal.pompei.allcommon.cbean.coption.LikeSearchOption likeSearchOption) { + registerLikeSearchQuery(ConditionKey.CK_LIKE_SEARCH, filterRemoveEmptyString(billingState), getCValueBillingState(), COL_BILLING_STATE, J_BillingState, UJ_billingState, likeSearchOption); + } + + /** + * Set the value of billingState using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param billingStateList The value of billingState as inScope. + */ + public void setBillingState_InScope(java.util.List billingStateList) { + registerBillingState(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyStringFromList(billingStateList)); + } + + /** + * Set the value of billingState using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param billingState The value of billingState as inScope. + */ + public void setBillingState_InScope(String billingState, jp.sf.pal.pompei.allcommon.cbean.coption.InScopeOption option) { + registerInScopeQuery(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyString(billingState), getCValueBillingState(), COL_BILLING_STATE, J_BillingState, UJ_billingState, option); + } + + /** + * Set the value of billingState using notInScope. { not in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param billingStateList The value of billingState as notInScope. + */ + public void setBillingState_NotInScope(java.util.List billingStateList) { + registerBillingState(ConditionKey.CK_NOT_IN_SCOPE, filterRemoveEmptyStringFromList(billingStateList)); + } + + /** + * Set the value of billingState using isNull. { is null } + */ + public void setBillingState_IsNull() { + registerBillingState(ConditionKey.CK_IS_NULL, DUMMY_OBJECT); + } + + /** + * Set the value of billingState using isNotNull. { is not null } + */ + public void setBillingState_IsNotNull() { + registerBillingState(ConditionKey.CK_IS_NOT_NULL, DUMMY_OBJECT); + } + + /** + * Register condition of billingState. + * + * @param key Condition key. (NotNull) + * @param value The value of billingState. (Nullable) + */ + protected void registerBillingState(ConditionKey key, Object value) { + registerQuery(key, value, getCValueBillingState(), COL_BILLING_STATE, J_BillingState, UJ_billingState); + } + + /** + * Register inline condition of billingState. + * + * @param key Condition key. (NotNull) + * @param value The value of billingState. (Nullable) + */ + protected void registerInlineBillingState(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueBillingState(), COL_BILLING_STATE, J_BillingState, UJ_billingState); + } + + abstract protected ConditionValue getCValueBillingState(); + + /** Column db name of billingCountry. */ + protected static final String COL_BILLING_COUNTRY = "BILLING_COUNTRY"; + + /** Column java name of billingCountry. */ + protected static final String J_BillingCountry = "BillingCountry"; + + /** Column uncapitalised java name of billingCountry. */ + protected static final String UJ_billingCountry = "billingCountry"; + + /** + * Set the value of billingCountry using equal. { = } + * If the value is null or empty-string, this condition is ignored. + * + * @param billingCountry The value of billingCountry as equal. + */ + public void setBillingCountry_Equal(String billingCountry) { + registerBillingCountry(ConditionKey.CK_EQUAL, filterRemoveEmptyString(billingCountry)); + } + + /** + * Set the value of billingCountry using notEqual. { != } + * If the value is null or empty-string, this condition is ignored. + * + * @param billingCountry The value of billingCountry as notEqual. + */ + public void setBillingCountry_NotEqual(String billingCountry) { + registerBillingCountry(ConditionKey.CK_NOT_EQUAL, filterRemoveEmptyString(billingCountry)); + } + + /** + * Set the value of billingCountry using greaterThan. { > } + * If the value is null or empty-string, this condition is ignored. + * + * @param billingCountry The value of billingCountry as greaterThan. + */ + public void setBillingCountry_GreaterThan(String billingCountry) { + registerBillingCountry(ConditionKey.CK_GREATER_THAN, filterRemoveEmptyString(billingCountry)); + } + + /** + * Set the value of billingCountry using lessThan. { < } + * If the value is null or empty-string, this condition is ignored. + * + * @param billingCountry The value of billingCountry as lessThan. + */ + public void setBillingCountry_LessThan(String billingCountry) { + registerBillingCountry(ConditionKey.CK_LESS_THAN, filterRemoveEmptyString(billingCountry)); + } + + /** + * Set the value of billingCountry using greaterEqual. { >= } + * If the value is null or empty-string, this condition is ignored. + * + * @param billingCountry The value of billingCountry as greaterEqual. + */ + public void setBillingCountry_GreaterEqual(String billingCountry) { + registerBillingCountry(ConditionKey.CK_GREATER_EQUAL, filterRemoveEmptyString(billingCountry)); + } + + /** + * Set the value of billingCountry using lessEqual. { <= } + * If the value is null or empty-string, this condition is ignored. + * + * @param billingCountry The value of billingCountry as lessEqual. + */ + public void setBillingCountry_LessEqual(String billingCountry) { + registerBillingCountry(ConditionKey.CK_LESS_EQUAL, filterRemoveEmptyString(billingCountry)); + } + + /** + * Set the value of billingCountry using prefixSearch. { like 'xxx%' } + * If the value is null or empty-string, this condition is ignored. + * + * @param billingCountry The value of billingCountry as prefixSearch. + */ + public void setBillingCountry_PrefixSearch(String billingCountry) { + registerBillingCountry(ConditionKey.CK_PREFIX_SEARCH, filterRemoveEmptyString(billingCountry)); + } + + /** + * Set the value of billingCountry using likeSearch. { like '%xxx%' } + * If the value is null or empty-string, this condition is ignored. + * You can invoke this method several times and the conditions are set up. + * + * @param billingCountry The value of billingCountry as likeSearch. + * @param likeSearchOption Like search option. (NotNull) + */ + public void setBillingCountry_LikeSearch(String billingCountry, jp.sf.pal.pompei.allcommon.cbean.coption.LikeSearchOption likeSearchOption) { + registerLikeSearchQuery(ConditionKey.CK_LIKE_SEARCH, filterRemoveEmptyString(billingCountry), getCValueBillingCountry(), COL_BILLING_COUNTRY, J_BillingCountry, UJ_billingCountry, likeSearchOption); + } + + /** + * Set the value of billingCountry using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param billingCountryList The value of billingCountry as inScope. + */ + public void setBillingCountry_InScope(java.util.List billingCountryList) { + registerBillingCountry(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyStringFromList(billingCountryList)); + } + + /** + * Set the value of billingCountry using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param billingCountry The value of billingCountry as inScope. + */ + public void setBillingCountry_InScope(String billingCountry, jp.sf.pal.pompei.allcommon.cbean.coption.InScopeOption option) { + registerInScopeQuery(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyString(billingCountry), getCValueBillingCountry(), COL_BILLING_COUNTRY, J_BillingCountry, UJ_billingCountry, option); + } + + /** + * Set the value of billingCountry using notInScope. { not in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param billingCountryList The value of billingCountry as notInScope. + */ + public void setBillingCountry_NotInScope(java.util.List billingCountryList) { + registerBillingCountry(ConditionKey.CK_NOT_IN_SCOPE, filterRemoveEmptyStringFromList(billingCountryList)); + } + + /** + * Register condition of billingCountry. + * + * @param key Condition key. (NotNull) + * @param value The value of billingCountry. (Nullable) + */ + protected void registerBillingCountry(ConditionKey key, Object value) { + registerQuery(key, value, getCValueBillingCountry(), COL_BILLING_COUNTRY, J_BillingCountry, UJ_billingCountry); + } + + /** + * Register inline condition of billingCountry. + * + * @param key Condition key. (NotNull) + * @param value The value of billingCountry. (Nullable) + */ + protected void registerInlineBillingCountry(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueBillingCountry(), COL_BILLING_COUNTRY, J_BillingCountry, UJ_billingCountry); + } + + abstract protected ConditionValue getCValueBillingCountry(); + + /** Column db name of billingAddressFormatId. */ + protected static final String COL_BILLING_ADDRESS_FORMAT_ID = "BILLING_ADDRESS_FORMAT_ID"; + + /** Column java name of billingAddressFormatId. */ + protected static final String J_BillingAddressFormatId = "BillingAddressFormatId"; + + /** Column uncapitalised java name of billingAddressFormatId. */ + protected static final String UJ_billingAddressFormatId = "billingAddressFormatId"; + + /** + * Set the value of billingAddressFormatId using equal. { = } + * + * @param billingAddressFormatId The value of billingAddressFormatId as equal. + */ + public void setBillingAddressFormatId_Equal(java.math.BigDecimal billingAddressFormatId) { + registerBillingAddressFormatId(ConditionKey.CK_EQUAL, billingAddressFormatId); + } + + /** + * Set the value of billingAddressFormatId using notEqual. { != } + * + * @param billingAddressFormatId The value of billingAddressFormatId as notEqual. + */ + public void setBillingAddressFormatId_NotEqual(java.math.BigDecimal billingAddressFormatId) { + registerBillingAddressFormatId(ConditionKey.CK_NOT_EQUAL, billingAddressFormatId); + } + + /** + * Set the value of billingAddressFormatId using greaterThan. { > } + * + * @param billingAddressFormatId The value of billingAddressFormatId as greaterThan. + */ + public void setBillingAddressFormatId_GreaterThan(java.math.BigDecimal billingAddressFormatId) { + registerBillingAddressFormatId(ConditionKey.CK_GREATER_THAN, billingAddressFormatId); + } + + /** + * Set the value of billingAddressFormatId using lessThan. { < } + * + * @param billingAddressFormatId The value of billingAddressFormatId as lessThan. + */ + public void setBillingAddressFormatId_LessThan(java.math.BigDecimal billingAddressFormatId) { + registerBillingAddressFormatId(ConditionKey.CK_LESS_THAN, billingAddressFormatId); + } + + /** + * Set the value of billingAddressFormatId using greaterEqual. { >= } + * + * @param billingAddressFormatId The value of billingAddressFormatId as greaterEqual. + */ + public void setBillingAddressFormatId_GreaterEqual(java.math.BigDecimal billingAddressFormatId) { + registerBillingAddressFormatId(ConditionKey.CK_GREATER_EQUAL, billingAddressFormatId); + } + + /** + * Set the value of billingAddressFormatId using lessEqual. { <= } + * + * @param billingAddressFormatId The value of billingAddressFormatId as lessEqual. + */ + public void setBillingAddressFormatId_LessEqual(java.math.BigDecimal billingAddressFormatId) { + registerBillingAddressFormatId(ConditionKey.CK_LESS_EQUAL, billingAddressFormatId); + } + + /** + * Set the value of billingAddressFormatId using inScope. { in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param billingAddressFormatIdList The value of billingAddressFormatId as inScope. + */ + public void setBillingAddressFormatId_InScope(java.util.List billingAddressFormatIdList) { + registerBillingAddressFormatId(ConditionKey.CK_IN_SCOPE, billingAddressFormatIdList); + } + + /** + * Set the value of billingAddressFormatId using notInScope. { not in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param billingAddressFormatIdList The value of billingAddressFormatId as notInScope. + */ + public void setBillingAddressFormatId_NotInScope(java.util.List billingAddressFormatIdList) { + registerBillingAddressFormatId(ConditionKey.CK_NOT_IN_SCOPE, billingAddressFormatIdList); + } + + /** + * Register condition of billingAddressFormatId. + * + * @param key Condition key. (NotNull) + * @param value The value of billingAddressFormatId. (Nullable) + */ + protected void registerBillingAddressFormatId(ConditionKey key, Object value) { + registerQuery(key, value, getCValueBillingAddressFormatId(), COL_BILLING_ADDRESS_FORMAT_ID, J_BillingAddressFormatId, UJ_billingAddressFormatId); + } + + /** + * Register inline condition of billingAddressFormatId. + * + * @param key Condition key. (NotNull) + * @param value The value of billingAddressFormatId. (Nullable) + */ + protected void registerInlineBillingAddressFormatId(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueBillingAddressFormatId(), COL_BILLING_ADDRESS_FORMAT_ID, J_BillingAddressFormatId, UJ_billingAddressFormatId); + } + + abstract protected ConditionValue getCValueBillingAddressFormatId(); + + /** Column db name of paymentMethod. */ + protected static final String COL_PAYMENT_METHOD = "PAYMENT_METHOD"; + + /** Column java name of paymentMethod. */ + protected static final String J_PaymentMethod = "PaymentMethod"; + + /** Column uncapitalised java name of paymentMethod. */ + protected static final String UJ_paymentMethod = "paymentMethod"; + + /** + * Set the value of paymentMethod using equal. { = } + * If the value is null or empty-string, this condition is ignored. + * + * @param paymentMethod The value of paymentMethod as equal. + */ + public void setPaymentMethod_Equal(String paymentMethod) { + registerPaymentMethod(ConditionKey.CK_EQUAL, filterRemoveEmptyString(paymentMethod)); + } + + /** + * Set the value of paymentMethod using notEqual. { != } + * If the value is null or empty-string, this condition is ignored. + * + * @param paymentMethod The value of paymentMethod as notEqual. + */ + public void setPaymentMethod_NotEqual(String paymentMethod) { + registerPaymentMethod(ConditionKey.CK_NOT_EQUAL, filterRemoveEmptyString(paymentMethod)); + } + + /** + * Set the value of paymentMethod using greaterThan. { > } + * If the value is null or empty-string, this condition is ignored. + * + * @param paymentMethod The value of paymentMethod as greaterThan. + */ + public void setPaymentMethod_GreaterThan(String paymentMethod) { + registerPaymentMethod(ConditionKey.CK_GREATER_THAN, filterRemoveEmptyString(paymentMethod)); + } + + /** + * Set the value of paymentMethod using lessThan. { < } + * If the value is null or empty-string, this condition is ignored. + * + * @param paymentMethod The value of paymentMethod as lessThan. + */ + public void setPaymentMethod_LessThan(String paymentMethod) { + registerPaymentMethod(ConditionKey.CK_LESS_THAN, filterRemoveEmptyString(paymentMethod)); + } + + /** + * Set the value of paymentMethod using greaterEqual. { >= } + * If the value is null or empty-string, this condition is ignored. + * + * @param paymentMethod The value of paymentMethod as greaterEqual. + */ + public void setPaymentMethod_GreaterEqual(String paymentMethod) { + registerPaymentMethod(ConditionKey.CK_GREATER_EQUAL, filterRemoveEmptyString(paymentMethod)); + } + + /** + * Set the value of paymentMethod using lessEqual. { <= } + * If the value is null or empty-string, this condition is ignored. + * + * @param paymentMethod The value of paymentMethod as lessEqual. + */ + public void setPaymentMethod_LessEqual(String paymentMethod) { + registerPaymentMethod(ConditionKey.CK_LESS_EQUAL, filterRemoveEmptyString(paymentMethod)); + } + + /** + * Set the value of paymentMethod using prefixSearch. { like 'xxx%' } + * If the value is null or empty-string, this condition is ignored. + * + * @param paymentMethod The value of paymentMethod as prefixSearch. + */ + public void setPaymentMethod_PrefixSearch(String paymentMethod) { + registerPaymentMethod(ConditionKey.CK_PREFIX_SEARCH, filterRemoveEmptyString(paymentMethod)); + } + + /** + * Set the value of paymentMethod using likeSearch. { like '%xxx%' } + * If the value is null or empty-string, this condition is ignored. + * You can invoke this method several times and the conditions are set up. + * + * @param paymentMethod The value of paymentMethod as likeSearch. + * @param likeSearchOption Like search option. (NotNull) + */ + public void setPaymentMethod_LikeSearch(String paymentMethod, jp.sf.pal.pompei.allcommon.cbean.coption.LikeSearchOption likeSearchOption) { + registerLikeSearchQuery(ConditionKey.CK_LIKE_SEARCH, filterRemoveEmptyString(paymentMethod), getCValuePaymentMethod(), COL_PAYMENT_METHOD, J_PaymentMethod, UJ_paymentMethod, likeSearchOption); + } + + /** + * Set the value of paymentMethod using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param paymentMethodList The value of paymentMethod as inScope. + */ + public void setPaymentMethod_InScope(java.util.List paymentMethodList) { + registerPaymentMethod(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyStringFromList(paymentMethodList)); + } + + /** + * Set the value of paymentMethod using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param paymentMethod The value of paymentMethod as inScope. + */ + public void setPaymentMethod_InScope(String paymentMethod, jp.sf.pal.pompei.allcommon.cbean.coption.InScopeOption option) { + registerInScopeQuery(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyString(paymentMethod), getCValuePaymentMethod(), COL_PAYMENT_METHOD, J_PaymentMethod, UJ_paymentMethod, option); + } + + /** + * Set the value of paymentMethod using notInScope. { not in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param paymentMethodList The value of paymentMethod as notInScope. + */ + public void setPaymentMethod_NotInScope(java.util.List paymentMethodList) { + registerPaymentMethod(ConditionKey.CK_NOT_IN_SCOPE, filterRemoveEmptyStringFromList(paymentMethodList)); + } + + /** + * Register condition of paymentMethod. + * + * @param key Condition key. (NotNull) + * @param value The value of paymentMethod. (Nullable) + */ + protected void registerPaymentMethod(ConditionKey key, Object value) { + registerQuery(key, value, getCValuePaymentMethod(), COL_PAYMENT_METHOD, J_PaymentMethod, UJ_paymentMethod); + } + + /** + * Register inline condition of paymentMethod. + * + * @param key Condition key. (NotNull) + * @param value The value of paymentMethod. (Nullable) + */ + protected void registerInlinePaymentMethod(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValuePaymentMethod(), COL_PAYMENT_METHOD, J_PaymentMethod, UJ_paymentMethod); + } + + abstract protected ConditionValue getCValuePaymentMethod(); + + /** Column db name of ccType. */ + protected static final String COL_CC_TYPE = "CC_TYPE"; + + /** Column java name of ccType. */ + protected static final String J_CcType = "CcType"; + + /** Column uncapitalised java name of ccType. */ + protected static final String UJ_ccType = "ccType"; + + /** + * Set the value of ccType using equal. { = } + * If the value is null or empty-string, this condition is ignored. + * + * @param ccType The value of ccType as equal. + */ + public void setCcType_Equal(String ccType) { + registerCcType(ConditionKey.CK_EQUAL, filterRemoveEmptyString(ccType)); + } + + /** + * Set the value of ccType using notEqual. { != } + * If the value is null or empty-string, this condition is ignored. + * + * @param ccType The value of ccType as notEqual. + */ + public void setCcType_NotEqual(String ccType) { + registerCcType(ConditionKey.CK_NOT_EQUAL, filterRemoveEmptyString(ccType)); + } + + /** + * Set the value of ccType using greaterThan. { > } + * If the value is null or empty-string, this condition is ignored. + * + * @param ccType The value of ccType as greaterThan. + */ + public void setCcType_GreaterThan(String ccType) { + registerCcType(ConditionKey.CK_GREATER_THAN, filterRemoveEmptyString(ccType)); + } + + /** + * Set the value of ccType using lessThan. { < } + * If the value is null or empty-string, this condition is ignored. + * + * @param ccType The value of ccType as lessThan. + */ + public void setCcType_LessThan(String ccType) { + registerCcType(ConditionKey.CK_LESS_THAN, filterRemoveEmptyString(ccType)); + } + + /** + * Set the value of ccType using greaterEqual. { >= } + * If the value is null or empty-string, this condition is ignored. + * + * @param ccType The value of ccType as greaterEqual. + */ + public void setCcType_GreaterEqual(String ccType) { + registerCcType(ConditionKey.CK_GREATER_EQUAL, filterRemoveEmptyString(ccType)); + } + + /** + * Set the value of ccType using lessEqual. { <= } + * If the value is null or empty-string, this condition is ignored. + * + * @param ccType The value of ccType as lessEqual. + */ + public void setCcType_LessEqual(String ccType) { + registerCcType(ConditionKey.CK_LESS_EQUAL, filterRemoveEmptyString(ccType)); + } + + /** + * Set the value of ccType using prefixSearch. { like 'xxx%' } + * If the value is null or empty-string, this condition is ignored. + * + * @param ccType The value of ccType as prefixSearch. + */ + public void setCcType_PrefixSearch(String ccType) { + registerCcType(ConditionKey.CK_PREFIX_SEARCH, filterRemoveEmptyString(ccType)); + } + + /** + * Set the value of ccType using likeSearch. { like '%xxx%' } + * If the value is null or empty-string, this condition is ignored. + * You can invoke this method several times and the conditions are set up. + * + * @param ccType The value of ccType as likeSearch. + * @param likeSearchOption Like search option. (NotNull) + */ + public void setCcType_LikeSearch(String ccType, jp.sf.pal.pompei.allcommon.cbean.coption.LikeSearchOption likeSearchOption) { + registerLikeSearchQuery(ConditionKey.CK_LIKE_SEARCH, filterRemoveEmptyString(ccType), getCValueCcType(), COL_CC_TYPE, J_CcType, UJ_ccType, likeSearchOption); + } + + /** + * Set the value of ccType using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param ccTypeList The value of ccType as inScope. + */ + public void setCcType_InScope(java.util.List ccTypeList) { + registerCcType(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyStringFromList(ccTypeList)); + } + + /** + * Set the value of ccType using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param ccType The value of ccType as inScope. + */ + public void setCcType_InScope(String ccType, jp.sf.pal.pompei.allcommon.cbean.coption.InScopeOption option) { + registerInScopeQuery(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyString(ccType), getCValueCcType(), COL_CC_TYPE, J_CcType, UJ_ccType, option); + } + + /** + * Set the value of ccType using notInScope. { not in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param ccTypeList The value of ccType as notInScope. + */ + public void setCcType_NotInScope(java.util.List ccTypeList) { + registerCcType(ConditionKey.CK_NOT_IN_SCOPE, filterRemoveEmptyStringFromList(ccTypeList)); + } + + /** + * Set the value of ccType using isNull. { is null } + */ + public void setCcType_IsNull() { + registerCcType(ConditionKey.CK_IS_NULL, DUMMY_OBJECT); + } + + /** + * Set the value of ccType using isNotNull. { is not null } + */ + public void setCcType_IsNotNull() { + registerCcType(ConditionKey.CK_IS_NOT_NULL, DUMMY_OBJECT); + } + + /** + * Register condition of ccType. + * + * @param key Condition key. (NotNull) + * @param value The value of ccType. (Nullable) + */ + protected void registerCcType(ConditionKey key, Object value) { + registerQuery(key, value, getCValueCcType(), COL_CC_TYPE, J_CcType, UJ_ccType); + } + + /** + * Register inline condition of ccType. + * + * @param key Condition key. (NotNull) + * @param value The value of ccType. (Nullable) + */ + protected void registerInlineCcType(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueCcType(), COL_CC_TYPE, J_CcType, UJ_ccType); + } + + abstract protected ConditionValue getCValueCcType(); + + /** Column db name of ccOwner. */ + protected static final String COL_CC_OWNER = "CC_OWNER"; + + /** Column java name of ccOwner. */ + protected static final String J_CcOwner = "CcOwner"; + + /** Column uncapitalised java name of ccOwner. */ + protected static final String UJ_ccOwner = "ccOwner"; + + /** + * Set the value of ccOwner using equal. { = } + * If the value is null or empty-string, this condition is ignored. + * + * @param ccOwner The value of ccOwner as equal. + */ + public void setCcOwner_Equal(String ccOwner) { + registerCcOwner(ConditionKey.CK_EQUAL, filterRemoveEmptyString(ccOwner)); + } + + /** + * Set the value of ccOwner using notEqual. { != } + * If the value is null or empty-string, this condition is ignored. + * + * @param ccOwner The value of ccOwner as notEqual. + */ + public void setCcOwner_NotEqual(String ccOwner) { + registerCcOwner(ConditionKey.CK_NOT_EQUAL, filterRemoveEmptyString(ccOwner)); + } + + /** + * Set the value of ccOwner using greaterThan. { > } + * If the value is null or empty-string, this condition is ignored. + * + * @param ccOwner The value of ccOwner as greaterThan. + */ + public void setCcOwner_GreaterThan(String ccOwner) { + registerCcOwner(ConditionKey.CK_GREATER_THAN, filterRemoveEmptyString(ccOwner)); + } + + /** + * Set the value of ccOwner using lessThan. { < } + * If the value is null or empty-string, this condition is ignored. + * + * @param ccOwner The value of ccOwner as lessThan. + */ + public void setCcOwner_LessThan(String ccOwner) { + registerCcOwner(ConditionKey.CK_LESS_THAN, filterRemoveEmptyString(ccOwner)); + } + + /** + * Set the value of ccOwner using greaterEqual. { >= } + * If the value is null or empty-string, this condition is ignored. + * + * @param ccOwner The value of ccOwner as greaterEqual. + */ + public void setCcOwner_GreaterEqual(String ccOwner) { + registerCcOwner(ConditionKey.CK_GREATER_EQUAL, filterRemoveEmptyString(ccOwner)); + } + + /** + * Set the value of ccOwner using lessEqual. { <= } + * If the value is null or empty-string, this condition is ignored. + * + * @param ccOwner The value of ccOwner as lessEqual. + */ + public void setCcOwner_LessEqual(String ccOwner) { + registerCcOwner(ConditionKey.CK_LESS_EQUAL, filterRemoveEmptyString(ccOwner)); + } + + /** + * Set the value of ccOwner using prefixSearch. { like 'xxx%' } + * If the value is null or empty-string, this condition is ignored. + * + * @param ccOwner The value of ccOwner as prefixSearch. + */ + public void setCcOwner_PrefixSearch(String ccOwner) { + registerCcOwner(ConditionKey.CK_PREFIX_SEARCH, filterRemoveEmptyString(ccOwner)); + } + + /** + * Set the value of ccOwner using likeSearch. { like '%xxx%' } + * If the value is null or empty-string, this condition is ignored. + * You can invoke this method several times and the conditions are set up. + * + * @param ccOwner The value of ccOwner as likeSearch. + * @param likeSearchOption Like search option. (NotNull) + */ + public void setCcOwner_LikeSearch(String ccOwner, jp.sf.pal.pompei.allcommon.cbean.coption.LikeSearchOption likeSearchOption) { + registerLikeSearchQuery(ConditionKey.CK_LIKE_SEARCH, filterRemoveEmptyString(ccOwner), getCValueCcOwner(), COL_CC_OWNER, J_CcOwner, UJ_ccOwner, likeSearchOption); + } + + /** + * Set the value of ccOwner using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param ccOwnerList The value of ccOwner as inScope. + */ + public void setCcOwner_InScope(java.util.List ccOwnerList) { + registerCcOwner(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyStringFromList(ccOwnerList)); + } + + /** + * Set the value of ccOwner using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param ccOwner The value of ccOwner as inScope. + */ + public void setCcOwner_InScope(String ccOwner, jp.sf.pal.pompei.allcommon.cbean.coption.InScopeOption option) { + registerInScopeQuery(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyString(ccOwner), getCValueCcOwner(), COL_CC_OWNER, J_CcOwner, UJ_ccOwner, option); + } + + /** + * Set the value of ccOwner using notInScope. { not in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param ccOwnerList The value of ccOwner as notInScope. + */ + public void setCcOwner_NotInScope(java.util.List ccOwnerList) { + registerCcOwner(ConditionKey.CK_NOT_IN_SCOPE, filterRemoveEmptyStringFromList(ccOwnerList)); + } + + /** + * Set the value of ccOwner using isNull. { is null } + */ + public void setCcOwner_IsNull() { + registerCcOwner(ConditionKey.CK_IS_NULL, DUMMY_OBJECT); + } + + /** + * Set the value of ccOwner using isNotNull. { is not null } + */ + public void setCcOwner_IsNotNull() { + registerCcOwner(ConditionKey.CK_IS_NOT_NULL, DUMMY_OBJECT); + } + + /** + * Register condition of ccOwner. + * + * @param key Condition key. (NotNull) + * @param value The value of ccOwner. (Nullable) + */ + protected void registerCcOwner(ConditionKey key, Object value) { + registerQuery(key, value, getCValueCcOwner(), COL_CC_OWNER, J_CcOwner, UJ_ccOwner); + } + + /** + * Register inline condition of ccOwner. + * + * @param key Condition key. (NotNull) + * @param value The value of ccOwner. (Nullable) + */ + protected void registerInlineCcOwner(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueCcOwner(), COL_CC_OWNER, J_CcOwner, UJ_ccOwner); + } + + abstract protected ConditionValue getCValueCcOwner(); + + /** Column db name of ccNumber. */ + protected static final String COL_CC_NUMBER = "CC_NUMBER"; + + /** Column java name of ccNumber. */ + protected static final String J_CcNumber = "CcNumber"; + + /** Column uncapitalised java name of ccNumber. */ + protected static final String UJ_ccNumber = "ccNumber"; + + /** + * Set the value of ccNumber using equal. { = } + * If the value is null or empty-string, this condition is ignored. + * + * @param ccNumber The value of ccNumber as equal. + */ + public void setCcNumber_Equal(String ccNumber) { + registerCcNumber(ConditionKey.CK_EQUAL, filterRemoveEmptyString(ccNumber)); + } + + /** + * Set the value of ccNumber using notEqual. { != } + * If the value is null or empty-string, this condition is ignored. + * + * @param ccNumber The value of ccNumber as notEqual. + */ + public void setCcNumber_NotEqual(String ccNumber) { + registerCcNumber(ConditionKey.CK_NOT_EQUAL, filterRemoveEmptyString(ccNumber)); + } + + /** + * Set the value of ccNumber using greaterThan. { > } + * If the value is null or empty-string, this condition is ignored. + * + * @param ccNumber The value of ccNumber as greaterThan. + */ + public void setCcNumber_GreaterThan(String ccNumber) { + registerCcNumber(ConditionKey.CK_GREATER_THAN, filterRemoveEmptyString(ccNumber)); + } + + /** + * Set the value of ccNumber using lessThan. { < } + * If the value is null or empty-string, this condition is ignored. + * + * @param ccNumber The value of ccNumber as lessThan. + */ + public void setCcNumber_LessThan(String ccNumber) { + registerCcNumber(ConditionKey.CK_LESS_THAN, filterRemoveEmptyString(ccNumber)); + } + + /** + * Set the value of ccNumber using greaterEqual. { >= } + * If the value is null or empty-string, this condition is ignored. + * + * @param ccNumber The value of ccNumber as greaterEqual. + */ + public void setCcNumber_GreaterEqual(String ccNumber) { + registerCcNumber(ConditionKey.CK_GREATER_EQUAL, filterRemoveEmptyString(ccNumber)); + } + + /** + * Set the value of ccNumber using lessEqual. { <= } + * If the value is null or empty-string, this condition is ignored. + * + * @param ccNumber The value of ccNumber as lessEqual. + */ + public void setCcNumber_LessEqual(String ccNumber) { + registerCcNumber(ConditionKey.CK_LESS_EQUAL, filterRemoveEmptyString(ccNumber)); + } + + /** + * Set the value of ccNumber using prefixSearch. { like 'xxx%' } + * If the value is null or empty-string, this condition is ignored. + * + * @param ccNumber The value of ccNumber as prefixSearch. + */ + public void setCcNumber_PrefixSearch(String ccNumber) { + registerCcNumber(ConditionKey.CK_PREFIX_SEARCH, filterRemoveEmptyString(ccNumber)); + } + + /** + * Set the value of ccNumber using likeSearch. { like '%xxx%' } + * If the value is null or empty-string, this condition is ignored. + * You can invoke this method several times and the conditions are set up. + * + * @param ccNumber The value of ccNumber as likeSearch. + * @param likeSearchOption Like search option. (NotNull) + */ + public void setCcNumber_LikeSearch(String ccNumber, jp.sf.pal.pompei.allcommon.cbean.coption.LikeSearchOption likeSearchOption) { + registerLikeSearchQuery(ConditionKey.CK_LIKE_SEARCH, filterRemoveEmptyString(ccNumber), getCValueCcNumber(), COL_CC_NUMBER, J_CcNumber, UJ_ccNumber, likeSearchOption); + } + + /** + * Set the value of ccNumber using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param ccNumberList The value of ccNumber as inScope. + */ + public void setCcNumber_InScope(java.util.List ccNumberList) { + registerCcNumber(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyStringFromList(ccNumberList)); + } + + /** + * Set the value of ccNumber using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param ccNumber The value of ccNumber as inScope. + */ + public void setCcNumber_InScope(String ccNumber, jp.sf.pal.pompei.allcommon.cbean.coption.InScopeOption option) { + registerInScopeQuery(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyString(ccNumber), getCValueCcNumber(), COL_CC_NUMBER, J_CcNumber, UJ_ccNumber, option); + } + + /** + * Set the value of ccNumber using notInScope. { not in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param ccNumberList The value of ccNumber as notInScope. + */ + public void setCcNumber_NotInScope(java.util.List ccNumberList) { + registerCcNumber(ConditionKey.CK_NOT_IN_SCOPE, filterRemoveEmptyStringFromList(ccNumberList)); + } + + /** + * Set the value of ccNumber using isNull. { is null } + */ + public void setCcNumber_IsNull() { + registerCcNumber(ConditionKey.CK_IS_NULL, DUMMY_OBJECT); + } + + /** + * Set the value of ccNumber using isNotNull. { is not null } + */ + public void setCcNumber_IsNotNull() { + registerCcNumber(ConditionKey.CK_IS_NOT_NULL, DUMMY_OBJECT); + } + + /** + * Register condition of ccNumber. + * + * @param key Condition key. (NotNull) + * @param value The value of ccNumber. (Nullable) + */ + protected void registerCcNumber(ConditionKey key, Object value) { + registerQuery(key, value, getCValueCcNumber(), COL_CC_NUMBER, J_CcNumber, UJ_ccNumber); + } + + /** + * Register inline condition of ccNumber. + * + * @param key Condition key. (NotNull) + * @param value The value of ccNumber. (Nullable) + */ + protected void registerInlineCcNumber(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueCcNumber(), COL_CC_NUMBER, J_CcNumber, UJ_ccNumber); + } + + abstract protected ConditionValue getCValueCcNumber(); + + /** Column db name of ccExpires. */ + protected static final String COL_CC_EXPIRES = "CC_EXPIRES"; + + /** Column java name of ccExpires. */ + protected static final String J_CcExpires = "CcExpires"; + + /** Column uncapitalised java name of ccExpires. */ + protected static final String UJ_ccExpires = "ccExpires"; + + /** + * Set the value of ccExpires using equal. { = } + * If the value is null or empty-string, this condition is ignored. + * + * @param ccExpires The value of ccExpires as equal. + */ + public void setCcExpires_Equal(String ccExpires) { + registerCcExpires(ConditionKey.CK_EQUAL, filterRemoveEmptyString(ccExpires)); + } + + /** + * Set the value of ccExpires using notEqual. { != } + * If the value is null or empty-string, this condition is ignored. + * + * @param ccExpires The value of ccExpires as notEqual. + */ + public void setCcExpires_NotEqual(String ccExpires) { + registerCcExpires(ConditionKey.CK_NOT_EQUAL, filterRemoveEmptyString(ccExpires)); + } + + /** + * Set the value of ccExpires using greaterThan. { > } + * If the value is null or empty-string, this condition is ignored. + * + * @param ccExpires The value of ccExpires as greaterThan. + */ + public void setCcExpires_GreaterThan(String ccExpires) { + registerCcExpires(ConditionKey.CK_GREATER_THAN, filterRemoveEmptyString(ccExpires)); + } + + /** + * Set the value of ccExpires using lessThan. { < } + * If the value is null or empty-string, this condition is ignored. + * + * @param ccExpires The value of ccExpires as lessThan. + */ + public void setCcExpires_LessThan(String ccExpires) { + registerCcExpires(ConditionKey.CK_LESS_THAN, filterRemoveEmptyString(ccExpires)); + } + + /** + * Set the value of ccExpires using greaterEqual. { >= } + * If the value is null or empty-string, this condition is ignored. + * + * @param ccExpires The value of ccExpires as greaterEqual. + */ + public void setCcExpires_GreaterEqual(String ccExpires) { + registerCcExpires(ConditionKey.CK_GREATER_EQUAL, filterRemoveEmptyString(ccExpires)); + } + + /** + * Set the value of ccExpires using lessEqual. { <= } + * If the value is null or empty-string, this condition is ignored. + * + * @param ccExpires The value of ccExpires as lessEqual. + */ + public void setCcExpires_LessEqual(String ccExpires) { + registerCcExpires(ConditionKey.CK_LESS_EQUAL, filterRemoveEmptyString(ccExpires)); + } + + /** + * Set the value of ccExpires using prefixSearch. { like 'xxx%' } + * If the value is null or empty-string, this condition is ignored. + * + * @param ccExpires The value of ccExpires as prefixSearch. + */ + public void setCcExpires_PrefixSearch(String ccExpires) { + registerCcExpires(ConditionKey.CK_PREFIX_SEARCH, filterRemoveEmptyString(ccExpires)); + } + + /** + * Set the value of ccExpires using likeSearch. { like '%xxx%' } + * If the value is null or empty-string, this condition is ignored. + * You can invoke this method several times and the conditions are set up. + * + * @param ccExpires The value of ccExpires as likeSearch. + * @param likeSearchOption Like search option. (NotNull) + */ + public void setCcExpires_LikeSearch(String ccExpires, jp.sf.pal.pompei.allcommon.cbean.coption.LikeSearchOption likeSearchOption) { + registerLikeSearchQuery(ConditionKey.CK_LIKE_SEARCH, filterRemoveEmptyString(ccExpires), getCValueCcExpires(), COL_CC_EXPIRES, J_CcExpires, UJ_ccExpires, likeSearchOption); + } + + /** + * Set the value of ccExpires using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param ccExpiresList The value of ccExpires as inScope. + */ + public void setCcExpires_InScope(java.util.List ccExpiresList) { + registerCcExpires(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyStringFromList(ccExpiresList)); + } + + /** + * Set the value of ccExpires using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param ccExpires The value of ccExpires as inScope. + */ + public void setCcExpires_InScope(String ccExpires, jp.sf.pal.pompei.allcommon.cbean.coption.InScopeOption option) { + registerInScopeQuery(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyString(ccExpires), getCValueCcExpires(), COL_CC_EXPIRES, J_CcExpires, UJ_ccExpires, option); + } + + /** + * Set the value of ccExpires using notInScope. { not in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param ccExpiresList The value of ccExpires as notInScope. + */ + public void setCcExpires_NotInScope(java.util.List ccExpiresList) { + registerCcExpires(ConditionKey.CK_NOT_IN_SCOPE, filterRemoveEmptyStringFromList(ccExpiresList)); + } + + /** + * Set the value of ccExpires using isNull. { is null } + */ + public void setCcExpires_IsNull() { + registerCcExpires(ConditionKey.CK_IS_NULL, DUMMY_OBJECT); + } + + /** + * Set the value of ccExpires using isNotNull. { is not null } + */ + public void setCcExpires_IsNotNull() { + registerCcExpires(ConditionKey.CK_IS_NOT_NULL, DUMMY_OBJECT); + } + + /** + * Register condition of ccExpires. + * + * @param key Condition key. (NotNull) + * @param value The value of ccExpires. (Nullable) + */ + protected void registerCcExpires(ConditionKey key, Object value) { + registerQuery(key, value, getCValueCcExpires(), COL_CC_EXPIRES, J_CcExpires, UJ_ccExpires); + } + + /** + * Register inline condition of ccExpires. + * + * @param key Condition key. (NotNull) + * @param value The value of ccExpires. (Nullable) + */ + protected void registerInlineCcExpires(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueCcExpires(), COL_CC_EXPIRES, J_CcExpires, UJ_ccExpires); + } + + abstract protected ConditionValue getCValueCcExpires(); + + /** Column db name of lastModified. */ + protected static final String COL_LAST_MODIFIED = "LAST_MODIFIED"; + + /** Column java name of lastModified. */ + protected static final String J_LastModified = "LastModified"; + + /** Column uncapitalised java name of lastModified. */ + protected static final String UJ_lastModified = "lastModified"; + + /** + * Set the value of lastModified using equal. { = } + * + * @param lastModified The value of lastModified as equal. + */ + public void setLastModified_Equal(java.sql.Timestamp lastModified) { + registerLastModified(ConditionKey.CK_EQUAL, lastModified); + } + + /** + * Set the value of lastModified using notEqual. { != } + * + * @param lastModified The value of lastModified as notEqual. + */ + public void setLastModified_NotEqual(java.sql.Timestamp lastModified) { + registerLastModified(ConditionKey.CK_NOT_EQUAL, lastModified); + } + + /** + * Set the value of lastModified using greaterThan. { > } + * + * @param lastModified The value of lastModified as greaterThan. + */ + public void setLastModified_GreaterThan(java.sql.Timestamp lastModified) { + registerLastModified(ConditionKey.CK_GREATER_THAN, lastModified); + } + + /** + * Set the value of lastModified using lessThan. { < } + * + * @param lastModified The value of lastModified as lessThan. + */ + public void setLastModified_LessThan(java.sql.Timestamp lastModified) { + registerLastModified(ConditionKey.CK_LESS_THAN, lastModified); + } + + /** + * Set the value of lastModified using greaterEqual. { >= } + * + * @param lastModified The value of lastModified as greaterEqual. + */ + public void setLastModified_GreaterEqual(java.sql.Timestamp lastModified) { + registerLastModified(ConditionKey.CK_GREATER_EQUAL, lastModified); + } + + /** + * Set the value of lastModified using lessEqual. { <= } + * + * @param lastModified The value of lastModified as lessEqual. + */ + public void setLastModified_LessEqual(java.sql.Timestamp lastModified) { + registerLastModified(ConditionKey.CK_LESS_EQUAL, lastModified); + } + + /** + * Set the value of lastModified using from-to. { $fromDate <= COLUMN_NAME <= $toDate } + * + * @param lastModified The value of lastModified as from-to. + * @param fromToOption From-To option. (NotNull) + */ + public void setLastModified_FromTo(java.sql.Timestamp fromDate, java.sql.Timestamp toDate, jp.sf.pal.pompei.allcommon.cbean.coption.FromToOption fromToOption) { + registerFromToQuery(fromDate, toDate, getCValueLastModified(), COL_LAST_MODIFIED, J_LastModified, UJ_lastModified, fromToOption); + } + + /** + * Set the value of lastModified using isNull. { is null } + */ + public void setLastModified_IsNull() { + registerLastModified(ConditionKey.CK_IS_NULL, DUMMY_OBJECT); + } + + /** + * Set the value of lastModified using isNotNull. { is not null } + */ + public void setLastModified_IsNotNull() { + registerLastModified(ConditionKey.CK_IS_NOT_NULL, DUMMY_OBJECT); + } + + /** + * Register condition of lastModified. + * + * @param key Condition key. (NotNull) + * @param value The value of lastModified. (Nullable) + */ + protected void registerLastModified(ConditionKey key, Object value) { + registerQuery(key, value, getCValueLastModified(), COL_LAST_MODIFIED, J_LastModified, UJ_lastModified); + } + + /** + * Register inline condition of lastModified. + * + * @param key Condition key. (NotNull) + * @param value The value of lastModified. (Nullable) + */ + protected void registerInlineLastModified(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueLastModified(), COL_LAST_MODIFIED, J_LastModified, UJ_lastModified); + } + + abstract protected ConditionValue getCValueLastModified(); + + /** Column db name of datePurchased. */ + protected static final String COL_DATE_PURCHASED = "DATE_PURCHASED"; + + /** Column java name of datePurchased. */ + protected static final String J_DatePurchased = "DatePurchased"; + + /** Column uncapitalised java name of datePurchased. */ + protected static final String UJ_datePurchased = "datePurchased"; + + /** + * Set the value of datePurchased using equal. { = } + * + * @param datePurchased The value of datePurchased as equal. + */ + public void setDatePurchased_Equal(java.sql.Timestamp datePurchased) { + registerDatePurchased(ConditionKey.CK_EQUAL, datePurchased); + } + + /** + * Set the value of datePurchased using notEqual. { != } + * + * @param datePurchased The value of datePurchased as notEqual. + */ + public void setDatePurchased_NotEqual(java.sql.Timestamp datePurchased) { + registerDatePurchased(ConditionKey.CK_NOT_EQUAL, datePurchased); + } + + /** + * Set the value of datePurchased using greaterThan. { > } + * + * @param datePurchased The value of datePurchased as greaterThan. + */ + public void setDatePurchased_GreaterThan(java.sql.Timestamp datePurchased) { + registerDatePurchased(ConditionKey.CK_GREATER_THAN, datePurchased); + } + + /** + * Set the value of datePurchased using lessThan. { < } + * + * @param datePurchased The value of datePurchased as lessThan. + */ + public void setDatePurchased_LessThan(java.sql.Timestamp datePurchased) { + registerDatePurchased(ConditionKey.CK_LESS_THAN, datePurchased); + } + + /** + * Set the value of datePurchased using greaterEqual. { >= } + * + * @param datePurchased The value of datePurchased as greaterEqual. + */ + public void setDatePurchased_GreaterEqual(java.sql.Timestamp datePurchased) { + registerDatePurchased(ConditionKey.CK_GREATER_EQUAL, datePurchased); + } + + /** + * Set the value of datePurchased using lessEqual. { <= } + * + * @param datePurchased The value of datePurchased as lessEqual. + */ + public void setDatePurchased_LessEqual(java.sql.Timestamp datePurchased) { + registerDatePurchased(ConditionKey.CK_LESS_EQUAL, datePurchased); + } + + /** + * Set the value of datePurchased using from-to. { $fromDate <= COLUMN_NAME <= $toDate } + * + * @param datePurchased The value of datePurchased as from-to. + * @param fromToOption From-To option. (NotNull) + */ + public void setDatePurchased_FromTo(java.sql.Timestamp fromDate, java.sql.Timestamp toDate, jp.sf.pal.pompei.allcommon.cbean.coption.FromToOption fromToOption) { + registerFromToQuery(fromDate, toDate, getCValueDatePurchased(), COL_DATE_PURCHASED, J_DatePurchased, UJ_datePurchased, fromToOption); + } + + /** + * Set the value of datePurchased using isNull. { is null } + */ + public void setDatePurchased_IsNull() { + registerDatePurchased(ConditionKey.CK_IS_NULL, DUMMY_OBJECT); + } + + /** + * Set the value of datePurchased using isNotNull. { is not null } + */ + public void setDatePurchased_IsNotNull() { + registerDatePurchased(ConditionKey.CK_IS_NOT_NULL, DUMMY_OBJECT); + } + + /** + * Register condition of datePurchased. + * + * @param key Condition key. (NotNull) + * @param value The value of datePurchased. (Nullable) + */ + protected void registerDatePurchased(ConditionKey key, Object value) { + registerQuery(key, value, getCValueDatePurchased(), COL_DATE_PURCHASED, J_DatePurchased, UJ_datePurchased); + } + + /** + * Register inline condition of datePurchased. + * + * @param key Condition key. (NotNull) + * @param value The value of datePurchased. (Nullable) + */ + protected void registerInlineDatePurchased(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueDatePurchased(), COL_DATE_PURCHASED, J_DatePurchased, UJ_datePurchased); + } + + abstract protected ConditionValue getCValueDatePurchased(); + + /** Column db name of ordersStatus. */ + protected static final String COL_ORDERS_STATUS = "ORDERS_STATUS"; + + /** Column java name of ordersStatus. */ + protected static final String J_OrdersStatus = "OrdersStatus"; + + /** Column uncapitalised java name of ordersStatus. */ + protected static final String UJ_ordersStatus = "ordersStatus"; + + /** + * Set the value of ordersStatus using equal. { = } + * + * @param ordersStatus The value of ordersStatus as equal. + */ + public void setOrdersStatus_Equal(java.math.BigDecimal ordersStatus) { + registerOrdersStatus(ConditionKey.CK_EQUAL, ordersStatus); + } + + /** + * Set the value of ordersStatus using notEqual. { != } + * + * @param ordersStatus The value of ordersStatus as notEqual. + */ + public void setOrdersStatus_NotEqual(java.math.BigDecimal ordersStatus) { + registerOrdersStatus(ConditionKey.CK_NOT_EQUAL, ordersStatus); + } + + /** + * Set the value of ordersStatus using greaterThan. { > } + * + * @param ordersStatus The value of ordersStatus as greaterThan. + */ + public void setOrdersStatus_GreaterThan(java.math.BigDecimal ordersStatus) { + registerOrdersStatus(ConditionKey.CK_GREATER_THAN, ordersStatus); + } + + /** + * Set the value of ordersStatus using lessThan. { < } + * + * @param ordersStatus The value of ordersStatus as lessThan. + */ + public void setOrdersStatus_LessThan(java.math.BigDecimal ordersStatus) { + registerOrdersStatus(ConditionKey.CK_LESS_THAN, ordersStatus); + } + + /** + * Set the value of ordersStatus using greaterEqual. { >= } + * + * @param ordersStatus The value of ordersStatus as greaterEqual. + */ + public void setOrdersStatus_GreaterEqual(java.math.BigDecimal ordersStatus) { + registerOrdersStatus(ConditionKey.CK_GREATER_EQUAL, ordersStatus); + } + + /** + * Set the value of ordersStatus using lessEqual. { <= } + * + * @param ordersStatus The value of ordersStatus as lessEqual. + */ + public void setOrdersStatus_LessEqual(java.math.BigDecimal ordersStatus) { + registerOrdersStatus(ConditionKey.CK_LESS_EQUAL, ordersStatus); + } + + /** + * Set the value of ordersStatus using inScope. { in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param ordersStatusList The value of ordersStatus as inScope. + */ + public void setOrdersStatus_InScope(java.util.List ordersStatusList) { + registerOrdersStatus(ConditionKey.CK_IN_SCOPE, ordersStatusList); + } + + /** + * Set the value of ordersStatus using notInScope. { not in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param ordersStatusList The value of ordersStatus as notInScope. + */ + public void setOrdersStatus_NotInScope(java.util.List ordersStatusList) { + registerOrdersStatus(ConditionKey.CK_NOT_IN_SCOPE, ordersStatusList); + } + + /** + * Register condition of ordersStatus. + * + * @param key Condition key. (NotNull) + * @param value The value of ordersStatus. (Nullable) + */ + protected void registerOrdersStatus(ConditionKey key, Object value) { + registerQuery(key, value, getCValueOrdersStatus(), COL_ORDERS_STATUS, J_OrdersStatus, UJ_ordersStatus); + } + + /** + * Register inline condition of ordersStatus. + * + * @param key Condition key. (NotNull) + * @param value The value of ordersStatus. (Nullable) + */ + protected void registerInlineOrdersStatus(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueOrdersStatus(), COL_ORDERS_STATUS, J_OrdersStatus, UJ_ordersStatus); + } + + abstract protected ConditionValue getCValueOrdersStatus(); + + /** Column db name of ordersDateFinished. */ + protected static final String COL_ORDERS_DATE_FINISHED = "ORDERS_DATE_FINISHED"; + + /** Column java name of ordersDateFinished. */ + protected static final String J_OrdersDateFinished = "OrdersDateFinished"; + + /** Column uncapitalised java name of ordersDateFinished. */ + protected static final String UJ_ordersDateFinished = "ordersDateFinished"; + + /** + * Set the value of ordersDateFinished using equal. { = } + * + * @param ordersDateFinished The value of ordersDateFinished as equal. + */ + public void setOrdersDateFinished_Equal(java.sql.Timestamp ordersDateFinished) { + registerOrdersDateFinished(ConditionKey.CK_EQUAL, ordersDateFinished); + } + + /** + * Set the value of ordersDateFinished using notEqual. { != } + * + * @param ordersDateFinished The value of ordersDateFinished as notEqual. + */ + public void setOrdersDateFinished_NotEqual(java.sql.Timestamp ordersDateFinished) { + registerOrdersDateFinished(ConditionKey.CK_NOT_EQUAL, ordersDateFinished); + } + + /** + * Set the value of ordersDateFinished using greaterThan. { > } + * + * @param ordersDateFinished The value of ordersDateFinished as greaterThan. + */ + public void setOrdersDateFinished_GreaterThan(java.sql.Timestamp ordersDateFinished) { + registerOrdersDateFinished(ConditionKey.CK_GREATER_THAN, ordersDateFinished); + } + + /** + * Set the value of ordersDateFinished using lessThan. { < } + * + * @param ordersDateFinished The value of ordersDateFinished as lessThan. + */ + public void setOrdersDateFinished_LessThan(java.sql.Timestamp ordersDateFinished) { + registerOrdersDateFinished(ConditionKey.CK_LESS_THAN, ordersDateFinished); + } + + /** + * Set the value of ordersDateFinished using greaterEqual. { >= } + * + * @param ordersDateFinished The value of ordersDateFinished as greaterEqual. + */ + public void setOrdersDateFinished_GreaterEqual(java.sql.Timestamp ordersDateFinished) { + registerOrdersDateFinished(ConditionKey.CK_GREATER_EQUAL, ordersDateFinished); + } + + /** + * Set the value of ordersDateFinished using lessEqual. { <= } + * + * @param ordersDateFinished The value of ordersDateFinished as lessEqual. + */ + public void setOrdersDateFinished_LessEqual(java.sql.Timestamp ordersDateFinished) { + registerOrdersDateFinished(ConditionKey.CK_LESS_EQUAL, ordersDateFinished); + } + + /** + * Set the value of ordersDateFinished using from-to. { $fromDate <= COLUMN_NAME <= $toDate } + * + * @param ordersDateFinished The value of ordersDateFinished as from-to. + * @param fromToOption From-To option. (NotNull) + */ + public void setOrdersDateFinished_FromTo(java.sql.Timestamp fromDate, java.sql.Timestamp toDate, jp.sf.pal.pompei.allcommon.cbean.coption.FromToOption fromToOption) { + registerFromToQuery(fromDate, toDate, getCValueOrdersDateFinished(), COL_ORDERS_DATE_FINISHED, J_OrdersDateFinished, UJ_ordersDateFinished, fromToOption); + } + + /** + * Set the value of ordersDateFinished using isNull. { is null } + */ + public void setOrdersDateFinished_IsNull() { + registerOrdersDateFinished(ConditionKey.CK_IS_NULL, DUMMY_OBJECT); + } + + /** + * Set the value of ordersDateFinished using isNotNull. { is not null } + */ + public void setOrdersDateFinished_IsNotNull() { + registerOrdersDateFinished(ConditionKey.CK_IS_NOT_NULL, DUMMY_OBJECT); + } + + /** + * Register condition of ordersDateFinished. + * + * @param key Condition key. (NotNull) + * @param value The value of ordersDateFinished. (Nullable) + */ + protected void registerOrdersDateFinished(ConditionKey key, Object value) { + registerQuery(key, value, getCValueOrdersDateFinished(), COL_ORDERS_DATE_FINISHED, J_OrdersDateFinished, UJ_ordersDateFinished); + } + + /** + * Register inline condition of ordersDateFinished. + * + * @param key Condition key. (NotNull) + * @param value The value of ordersDateFinished. (Nullable) + */ + protected void registerInlineOrdersDateFinished(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueOrdersDateFinished(), COL_ORDERS_DATE_FINISHED, J_OrdersDateFinished, UJ_ordersDateFinished); + } + + abstract protected ConditionValue getCValueOrdersDateFinished(); + + /** Column db name of currency. */ + protected static final String COL_CURRENCY = "CURRENCY"; + + /** Column java name of currency. */ + protected static final String J_Currency = "Currency"; + + /** Column uncapitalised java name of currency. */ + protected static final String UJ_currency = "currency"; + + /** + * Set the value of currency using equal. { = } + * If the value is null or empty-string, this condition is ignored. + * + * @param currency The value of currency as equal. + */ + public void setCurrency_Equal(String currency) { + registerCurrency(ConditionKey.CK_EQUAL, filterRemoveEmptyString(currency)); + } + + /** + * Set the value of currency using notEqual. { != } + * If the value is null or empty-string, this condition is ignored. + * + * @param currency The value of currency as notEqual. + */ + public void setCurrency_NotEqual(String currency) { + registerCurrency(ConditionKey.CK_NOT_EQUAL, filterRemoveEmptyString(currency)); + } + + /** + * Set the value of currency using greaterThan. { > } + * If the value is null or empty-string, this condition is ignored. + * + * @param currency The value of currency as greaterThan. + */ + public void setCurrency_GreaterThan(String currency) { + registerCurrency(ConditionKey.CK_GREATER_THAN, filterRemoveEmptyString(currency)); + } + + /** + * Set the value of currency using lessThan. { < } + * If the value is null or empty-string, this condition is ignored. + * + * @param currency The value of currency as lessThan. + */ + public void setCurrency_LessThan(String currency) { + registerCurrency(ConditionKey.CK_LESS_THAN, filterRemoveEmptyString(currency)); + } + + /** + * Set the value of currency using greaterEqual. { >= } + * If the value is null or empty-string, this condition is ignored. + * + * @param currency The value of currency as greaterEqual. + */ + public void setCurrency_GreaterEqual(String currency) { + registerCurrency(ConditionKey.CK_GREATER_EQUAL, filterRemoveEmptyString(currency)); + } + + /** + * Set the value of currency using lessEqual. { <= } + * If the value is null or empty-string, this condition is ignored. + * + * @param currency The value of currency as lessEqual. + */ + public void setCurrency_LessEqual(String currency) { + registerCurrency(ConditionKey.CK_LESS_EQUAL, filterRemoveEmptyString(currency)); + } + + /** + * Set the value of currency using prefixSearch. { like 'xxx%' } + * If the value is null or empty-string, this condition is ignored. + * + * @param currency The value of currency as prefixSearch. + */ + public void setCurrency_PrefixSearch(String currency) { + registerCurrency(ConditionKey.CK_PREFIX_SEARCH, filterRemoveEmptyString(currency)); + } + + /** + * Set the value of currency using likeSearch. { like '%xxx%' } + * If the value is null or empty-string, this condition is ignored. + * You can invoke this method several times and the conditions are set up. + * + * @param currency The value of currency as likeSearch. + * @param likeSearchOption Like search option. (NotNull) + */ + public void setCurrency_LikeSearch(String currency, jp.sf.pal.pompei.allcommon.cbean.coption.LikeSearchOption likeSearchOption) { + registerLikeSearchQuery(ConditionKey.CK_LIKE_SEARCH, filterRemoveEmptyString(currency), getCValueCurrency(), COL_CURRENCY, J_Currency, UJ_currency, likeSearchOption); + } + + /** + * Set the value of currency using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param currencyList The value of currency as inScope. + */ + public void setCurrency_InScope(java.util.List currencyList) { + registerCurrency(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyStringFromList(currencyList)); + } + + /** + * Set the value of currency using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param currency The value of currency as inScope. + */ + public void setCurrency_InScope(String currency, jp.sf.pal.pompei.allcommon.cbean.coption.InScopeOption option) { + registerInScopeQuery(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyString(currency), getCValueCurrency(), COL_CURRENCY, J_Currency, UJ_currency, option); + } + + /** + * Set the value of currency using notInScope. { not in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param currencyList The value of currency as notInScope. + */ + public void setCurrency_NotInScope(java.util.List currencyList) { + registerCurrency(ConditionKey.CK_NOT_IN_SCOPE, filterRemoveEmptyStringFromList(currencyList)); + } + + /** + * Set the value of currency using isNull. { is null } + */ + public void setCurrency_IsNull() { + registerCurrency(ConditionKey.CK_IS_NULL, DUMMY_OBJECT); + } + + /** + * Set the value of currency using isNotNull. { is not null } + */ + public void setCurrency_IsNotNull() { + registerCurrency(ConditionKey.CK_IS_NOT_NULL, DUMMY_OBJECT); + } + + /** + * Register condition of currency. + * + * @param key Condition key. (NotNull) + * @param value The value of currency. (Nullable) + */ + protected void registerCurrency(ConditionKey key, Object value) { + registerQuery(key, value, getCValueCurrency(), COL_CURRENCY, J_Currency, UJ_currency); + } + + /** + * Register inline condition of currency. + * + * @param key Condition key. (NotNull) + * @param value The value of currency. (Nullable) + */ + protected void registerInlineCurrency(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueCurrency(), COL_CURRENCY, J_Currency, UJ_currency); + } + + abstract protected ConditionValue getCValueCurrency(); + + /** Column db name of currencyValue. */ + protected static final String COL_CURRENCY_VALUE = "CURRENCY_VALUE"; + + /** Column java name of currencyValue. */ + protected static final String J_CurrencyValue = "CurrencyValue"; + + /** Column uncapitalised java name of currencyValue. */ + protected static final String UJ_currencyValue = "currencyValue"; + + /** + * Set the value of currencyValue using equal. { = } + * + * @param currencyValue The value of currencyValue as equal. + */ + public void setCurrencyValue_Equal(java.math.BigDecimal currencyValue) { + registerCurrencyValue(ConditionKey.CK_EQUAL, currencyValue); + } + + /** + * Set the value of currencyValue using notEqual. { != } + * + * @param currencyValue The value of currencyValue as notEqual. + */ + public void setCurrencyValue_NotEqual(java.math.BigDecimal currencyValue) { + registerCurrencyValue(ConditionKey.CK_NOT_EQUAL, currencyValue); + } + + /** + * Set the value of currencyValue using greaterThan. { > } + * + * @param currencyValue The value of currencyValue as greaterThan. + */ + public void setCurrencyValue_GreaterThan(java.math.BigDecimal currencyValue) { + registerCurrencyValue(ConditionKey.CK_GREATER_THAN, currencyValue); + } + + /** + * Set the value of currencyValue using lessThan. { < } + * + * @param currencyValue The value of currencyValue as lessThan. + */ + public void setCurrencyValue_LessThan(java.math.BigDecimal currencyValue) { + registerCurrencyValue(ConditionKey.CK_LESS_THAN, currencyValue); + } + + /** + * Set the value of currencyValue using greaterEqual. { >= } + * + * @param currencyValue The value of currencyValue as greaterEqual. + */ + public void setCurrencyValue_GreaterEqual(java.math.BigDecimal currencyValue) { + registerCurrencyValue(ConditionKey.CK_GREATER_EQUAL, currencyValue); + } + + /** + * Set the value of currencyValue using lessEqual. { <= } + * + * @param currencyValue The value of currencyValue as lessEqual. + */ + public void setCurrencyValue_LessEqual(java.math.BigDecimal currencyValue) { + registerCurrencyValue(ConditionKey.CK_LESS_EQUAL, currencyValue); + } + + /** + * Set the value of currencyValue using inScope. { in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param currencyValueList The value of currencyValue as inScope. + */ + public void setCurrencyValue_InScope(java.util.List currencyValueList) { + registerCurrencyValue(ConditionKey.CK_IN_SCOPE, currencyValueList); + } + + /** + * Set the value of currencyValue using notInScope. { not in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param currencyValueList The value of currencyValue as notInScope. + */ + public void setCurrencyValue_NotInScope(java.util.List currencyValueList) { + registerCurrencyValue(ConditionKey.CK_NOT_IN_SCOPE, currencyValueList); + } + + /** + * Set the value of currencyValue using isNull. { is null } + */ + public void setCurrencyValue_IsNull() { + registerCurrencyValue(ConditionKey.CK_IS_NULL, DUMMY_OBJECT); + } + + /** + * Set the value of currencyValue using isNotNull. { is not null } + */ + public void setCurrencyValue_IsNotNull() { + registerCurrencyValue(ConditionKey.CK_IS_NOT_NULL, DUMMY_OBJECT); + } + + /** + * Register condition of currencyValue. + * + * @param key Condition key. (NotNull) + * @param value The value of currencyValue. (Nullable) + */ + protected void registerCurrencyValue(ConditionKey key, Object value) { + registerQuery(key, value, getCValueCurrencyValue(), COL_CURRENCY_VALUE, J_CurrencyValue, UJ_currencyValue); + } + + /** + * Register inline condition of currencyValue. + * + * @param key Condition key. (NotNull) + * @param value The value of currencyValue. (Nullable) + */ + protected void registerInlineCurrencyValue(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueCurrencyValue(), COL_CURRENCY_VALUE, J_CurrencyValue, UJ_currencyValue); + } + + abstract protected ConditionValue getCValueCurrencyValue(); + + // =================================================================================== + // Basic Override + // ============== + /** + * This method overrides the method that is declared at super. + * + * @return Clause string. (NotNull) + */ + public String toString() { + return getSqlClause().getClause(); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/AbstractBsOrdersProductsAttributesCQ.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/AbstractBsOrdersProductsAttributesCQ.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/AbstractBsOrdersProductsAttributesCQ.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,915 @@ + +package jp.sf.pal.pompei.cbean.cq.bs; + + + +import jp.sf.pal.pompei.allcommon.cbean.*; +import jp.sf.pal.pompei.allcommon.cbean.ckey.*; +import jp.sf.pal.pompei.allcommon.cbean.cvalue.ConditionValue; +import jp.sf.pal.pompei.allcommon.cbean.sqlclause.SqlClause; +import jp.sf.pal.pompei.cbean.cq.*; + +/** + * The condition-query of ORDERS_PRODUCTS_ATTRIBUTES. + * + * @author DBFlute(AutoGenerator) + */ +public abstract class AbstractBsOrdersProductsAttributesCQ extends AbstractConditionQuery { + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param childQuery Child query as abstract class. (Nullable: If null, this is base instance.) + * @param sqlClause SQL clause instance. (NotNull) + * @param aliasName My alias name. (NotNull) + * @param nestLevel Nest level. + */ + public AbstractBsOrdersProductsAttributesCQ(ConditionQuery childQuery, SqlClause sqlClause, String aliasName, int nestLevel) { + super(childQuery, sqlClause, aliasName, nestLevel); + } + + // =================================================================================== + // Table Name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + final public String getTableDbName() { + return "ORDERS_PRODUCTS_ATTRIBUTES"; + } + + // =================================================================================== + // Query + // ===== + + // /* * * * * * * * * * * * * * * * * * * * * * * + // MyTable = [ORDERS_PRODUCTS_ATTRIBUTES] + // * * * * * * * * */ + + + /** Column db name of ordersProductsAttributesId. */ + protected static final String COL_ORDERS_PRODUCTS_ATTRIBUTES_ID = "ORDERS_PRODUCTS_ATTRIBUTES_ID"; + + /** Column java name of ordersProductsAttributesId. */ + protected static final String J_OrdersProductsAttributesId = "OrdersProductsAttributesId"; + + /** Column uncapitalised java name of ordersProductsAttributesId. */ + protected static final String UJ_ordersProductsAttributesId = "ordersProductsAttributesId"; + + /** + * Set the value of ordersProductsAttributesId using equal. { = } + * + * @param ordersProductsAttributesId The value of ordersProductsAttributesId as equal. + */ + public void setOrdersProductsAttributesId_Equal(java.math.BigDecimal ordersProductsAttributesId) { + registerOrdersProductsAttributesId(ConditionKey.CK_EQUAL, ordersProductsAttributesId); + } + + /** + * Set the value of ordersProductsAttributesId using notEqual. { != } + * + * @param ordersProductsAttributesId The value of ordersProductsAttributesId as notEqual. + */ + public void setOrdersProductsAttributesId_NotEqual(java.math.BigDecimal ordersProductsAttributesId) { + registerOrdersProductsAttributesId(ConditionKey.CK_NOT_EQUAL, ordersProductsAttributesId); + } + + /** + * Set the value of ordersProductsAttributesId using greaterThan. { > } + * + * @param ordersProductsAttributesId The value of ordersProductsAttributesId as greaterThan. + */ + public void setOrdersProductsAttributesId_GreaterThan(java.math.BigDecimal ordersProductsAttributesId) { + registerOrdersProductsAttributesId(ConditionKey.CK_GREATER_THAN, ordersProductsAttributesId); + } + + /** + * Set the value of ordersProductsAttributesId using lessThan. { < } + * + * @param ordersProductsAttributesId The value of ordersProductsAttributesId as lessThan. + */ + public void setOrdersProductsAttributesId_LessThan(java.math.BigDecimal ordersProductsAttributesId) { + registerOrdersProductsAttributesId(ConditionKey.CK_LESS_THAN, ordersProductsAttributesId); + } + + /** + * Set the value of ordersProductsAttributesId using greaterEqual. { >= } + * + * @param ordersProductsAttributesId The value of ordersProductsAttributesId as greaterEqual. + */ + public void setOrdersProductsAttributesId_GreaterEqual(java.math.BigDecimal ordersProductsAttributesId) { + registerOrdersProductsAttributesId(ConditionKey.CK_GREATER_EQUAL, ordersProductsAttributesId); + } + + /** + * Set the value of ordersProductsAttributesId using lessEqual. { <= } + * + * @param ordersProductsAttributesId The value of ordersProductsAttributesId as lessEqual. + */ + public void setOrdersProductsAttributesId_LessEqual(java.math.BigDecimal ordersProductsAttributesId) { + registerOrdersProductsAttributesId(ConditionKey.CK_LESS_EQUAL, ordersProductsAttributesId); + } + + /** + * Set the value of ordersProductsAttributesId using inScope. { in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param ordersProductsAttributesIdList The value of ordersProductsAttributesId as inScope. + */ + public void setOrdersProductsAttributesId_InScope(java.util.List ordersProductsAttributesIdList) { + registerOrdersProductsAttributesId(ConditionKey.CK_IN_SCOPE, ordersProductsAttributesIdList); + } + + /** + * Set the value of ordersProductsAttributesId using notInScope. { not in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param ordersProductsAttributesIdList The value of ordersProductsAttributesId as notInScope. + */ + public void setOrdersProductsAttributesId_NotInScope(java.util.List ordersProductsAttributesIdList) { + registerOrdersProductsAttributesId(ConditionKey.CK_NOT_IN_SCOPE, ordersProductsAttributesIdList); + } + + /** + * Register condition of ordersProductsAttributesId. + * + * @param key Condition key. (NotNull) + * @param value The value of ordersProductsAttributesId. (Nullable) + */ + protected void registerOrdersProductsAttributesId(ConditionKey key, Object value) { + registerQuery(key, value, getCValueOrdersProductsAttributesId(), COL_ORDERS_PRODUCTS_ATTRIBUTES_ID, J_OrdersProductsAttributesId, UJ_ordersProductsAttributesId); + } + + /** + * Register inline condition of ordersProductsAttributesId. + * + * @param key Condition key. (NotNull) + * @param value The value of ordersProductsAttributesId. (Nullable) + */ + protected void registerInlineOrdersProductsAttributesId(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueOrdersProductsAttributesId(), COL_ORDERS_PRODUCTS_ATTRIBUTES_ID, J_OrdersProductsAttributesId, UJ_ordersProductsAttributesId); + } + + abstract protected ConditionValue getCValueOrdersProductsAttributesId(); + + /** Column db name of ordersId. */ + protected static final String COL_ORDERS_ID = "ORDERS_ID"; + + /** Column java name of ordersId. */ + protected static final String J_OrdersId = "OrdersId"; + + /** Column uncapitalised java name of ordersId. */ + protected static final String UJ_ordersId = "ordersId"; + + /** + * Set the value of ordersId using equal. { = } + * + * @param ordersId The value of ordersId as equal. + */ + public void setOrdersId_Equal(java.math.BigDecimal ordersId) { + registerOrdersId(ConditionKey.CK_EQUAL, ordersId); + } + + /** + * Set the value of ordersId using notEqual. { != } + * + * @param ordersId The value of ordersId as notEqual. + */ + public void setOrdersId_NotEqual(java.math.BigDecimal ordersId) { + registerOrdersId(ConditionKey.CK_NOT_EQUAL, ordersId); + } + + /** + * Set the value of ordersId using greaterThan. { > } + * + * @param ordersId The value of ordersId as greaterThan. + */ + public void setOrdersId_GreaterThan(java.math.BigDecimal ordersId) { + registerOrdersId(ConditionKey.CK_GREATER_THAN, ordersId); + } + + /** + * Set the value of ordersId using lessThan. { < } + * + * @param ordersId The value of ordersId as lessThan. + */ + public void setOrdersId_LessThan(java.math.BigDecimal ordersId) { + registerOrdersId(ConditionKey.CK_LESS_THAN, ordersId); + } + + /** + * Set the value of ordersId using greaterEqual. { >= } + * + * @param ordersId The value of ordersId as greaterEqual. + */ + public void setOrdersId_GreaterEqual(java.math.BigDecimal ordersId) { + registerOrdersId(ConditionKey.CK_GREATER_EQUAL, ordersId); + } + + /** + * Set the value of ordersId using lessEqual. { <= } + * + * @param ordersId The value of ordersId as lessEqual. + */ + public void setOrdersId_LessEqual(java.math.BigDecimal ordersId) { + registerOrdersId(ConditionKey.CK_LESS_EQUAL, ordersId); + } + + /** + * Set the value of ordersId using inScope. { in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param ordersIdList The value of ordersId as inScope. + */ + public void setOrdersId_InScope(java.util.List ordersIdList) { + registerOrdersId(ConditionKey.CK_IN_SCOPE, ordersIdList); + } + + /** + * Set the value of ordersId using notInScope. { not in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param ordersIdList The value of ordersId as notInScope. + */ + public void setOrdersId_NotInScope(java.util.List ordersIdList) { + registerOrdersId(ConditionKey.CK_NOT_IN_SCOPE, ordersIdList); + } + + /** + * Register condition of ordersId. + * + * @param key Condition key. (NotNull) + * @param value The value of ordersId. (Nullable) + */ + protected void registerOrdersId(ConditionKey key, Object value) { + registerQuery(key, value, getCValueOrdersId(), COL_ORDERS_ID, J_OrdersId, UJ_ordersId); + } + + /** + * Register inline condition of ordersId. + * + * @param key Condition key. (NotNull) + * @param value The value of ordersId. (Nullable) + */ + protected void registerInlineOrdersId(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueOrdersId(), COL_ORDERS_ID, J_OrdersId, UJ_ordersId); + } + + abstract protected ConditionValue getCValueOrdersId(); + + /** Column db name of ordersProductsId. */ + protected static final String COL_ORDERS_PRODUCTS_ID = "ORDERS_PRODUCTS_ID"; + + /** Column java name of ordersProductsId. */ + protected static final String J_OrdersProductsId = "OrdersProductsId"; + + /** Column uncapitalised java name of ordersProductsId. */ + protected static final String UJ_ordersProductsId = "ordersProductsId"; + + /** + * Set the value of ordersProductsId using equal. { = } + * + * @param ordersProductsId The value of ordersProductsId as equal. + */ + public void setOrdersProductsId_Equal(java.math.BigDecimal ordersProductsId) { + registerOrdersProductsId(ConditionKey.CK_EQUAL, ordersProductsId); + } + + /** + * Set the value of ordersProductsId using notEqual. { != } + * + * @param ordersProductsId The value of ordersProductsId as notEqual. + */ + public void setOrdersProductsId_NotEqual(java.math.BigDecimal ordersProductsId) { + registerOrdersProductsId(ConditionKey.CK_NOT_EQUAL, ordersProductsId); + } + + /** + * Set the value of ordersProductsId using greaterThan. { > } + * + * @param ordersProductsId The value of ordersProductsId as greaterThan. + */ + public void setOrdersProductsId_GreaterThan(java.math.BigDecimal ordersProductsId) { + registerOrdersProductsId(ConditionKey.CK_GREATER_THAN, ordersProductsId); + } + + /** + * Set the value of ordersProductsId using lessThan. { < } + * + * @param ordersProductsId The value of ordersProductsId as lessThan. + */ + public void setOrdersProductsId_LessThan(java.math.BigDecimal ordersProductsId) { + registerOrdersProductsId(ConditionKey.CK_LESS_THAN, ordersProductsId); + } + + /** + * Set the value of ordersProductsId using greaterEqual. { >= } + * + * @param ordersProductsId The value of ordersProductsId as greaterEqual. + */ + public void setOrdersProductsId_GreaterEqual(java.math.BigDecimal ordersProductsId) { + registerOrdersProductsId(ConditionKey.CK_GREATER_EQUAL, ordersProductsId); + } + + /** + * Set the value of ordersProductsId using lessEqual. { <= } + * + * @param ordersProductsId The value of ordersProductsId as lessEqual. + */ + public void setOrdersProductsId_LessEqual(java.math.BigDecimal ordersProductsId) { + registerOrdersProductsId(ConditionKey.CK_LESS_EQUAL, ordersProductsId); + } + + /** + * Set the value of ordersProductsId using inScope. { in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param ordersProductsIdList The value of ordersProductsId as inScope. + */ + public void setOrdersProductsId_InScope(java.util.List ordersProductsIdList) { + registerOrdersProductsId(ConditionKey.CK_IN_SCOPE, ordersProductsIdList); + } + + /** + * Set the value of ordersProductsId using notInScope. { not in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param ordersProductsIdList The value of ordersProductsId as notInScope. + */ + public void setOrdersProductsId_NotInScope(java.util.List ordersProductsIdList) { + registerOrdersProductsId(ConditionKey.CK_NOT_IN_SCOPE, ordersProductsIdList); + } + + /** + * Register condition of ordersProductsId. + * + * @param key Condition key. (NotNull) + * @param value The value of ordersProductsId. (Nullable) + */ + protected void registerOrdersProductsId(ConditionKey key, Object value) { + registerQuery(key, value, getCValueOrdersProductsId(), COL_ORDERS_PRODUCTS_ID, J_OrdersProductsId, UJ_ordersProductsId); + } + + /** + * Register inline condition of ordersProductsId. + * + * @param key Condition key. (NotNull) + * @param value The value of ordersProductsId. (Nullable) + */ + protected void registerInlineOrdersProductsId(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueOrdersProductsId(), COL_ORDERS_PRODUCTS_ID, J_OrdersProductsId, UJ_ordersProductsId); + } + + abstract protected ConditionValue getCValueOrdersProductsId(); + + /** Column db name of productsOptions. */ + protected static final String COL_PRODUCTS_OPTIONS = "PRODUCTS_OPTIONS"; + + /** Column java name of productsOptions. */ + protected static final String J_ProductsOptions = "ProductsOptions"; + + /** Column uncapitalised java name of productsOptions. */ + protected static final String UJ_productsOptions = "productsOptions"; + + /** + * Set the value of productsOptions using equal. { = } + * If the value is null or empty-string, this condition is ignored. + * + * @param productsOptions The value of productsOptions as equal. + */ + public void setProductsOptions_Equal(String productsOptions) { + registerProductsOptions(ConditionKey.CK_EQUAL, filterRemoveEmptyString(productsOptions)); + } + + /** + * Set the value of productsOptions using notEqual. { != } + * If the value is null or empty-string, this condition is ignored. + * + * @param productsOptions The value of productsOptions as notEqual. + */ + public void setProductsOptions_NotEqual(String productsOptions) { + registerProductsOptions(ConditionKey.CK_NOT_EQUAL, filterRemoveEmptyString(productsOptions)); + } + + /** + * Set the value of productsOptions using greaterThan. { > } + * If the value is null or empty-string, this condition is ignored. + * + * @param productsOptions The value of productsOptions as greaterThan. + */ + public void setProductsOptions_GreaterThan(String productsOptions) { + registerProductsOptions(ConditionKey.CK_GREATER_THAN, filterRemoveEmptyString(productsOptions)); + } + + /** + * Set the value of productsOptions using lessThan. { < } + * If the value is null or empty-string, this condition is ignored. + * + * @param productsOptions The value of productsOptions as lessThan. + */ + public void setProductsOptions_LessThan(String productsOptions) { + registerProductsOptions(ConditionKey.CK_LESS_THAN, filterRemoveEmptyString(productsOptions)); + } + + /** + * Set the value of productsOptions using greaterEqual. { >= } + * If the value is null or empty-string, this condition is ignored. + * + * @param productsOptions The value of productsOptions as greaterEqual. + */ + public void setProductsOptions_GreaterEqual(String productsOptions) { + registerProductsOptions(ConditionKey.CK_GREATER_EQUAL, filterRemoveEmptyString(productsOptions)); + } + + /** + * Set the value of productsOptions using lessEqual. { <= } + * If the value is null or empty-string, this condition is ignored. + * + * @param productsOptions The value of productsOptions as lessEqual. + */ + public void setProductsOptions_LessEqual(String productsOptions) { + registerProductsOptions(ConditionKey.CK_LESS_EQUAL, filterRemoveEmptyString(productsOptions)); + } + + /** + * Set the value of productsOptions using prefixSearch. { like 'xxx%' } + * If the value is null or empty-string, this condition is ignored. + * + * @param productsOptions The value of productsOptions as prefixSearch. + */ + public void setProductsOptions_PrefixSearch(String productsOptions) { + registerProductsOptions(ConditionKey.CK_PREFIX_SEARCH, filterRemoveEmptyString(productsOptions)); + } + + /** + * Set the value of productsOptions using likeSearch. { like '%xxx%' } + * If the value is null or empty-string, this condition is ignored. + * You can invoke this method several times and the conditions are set up. + * + * @param productsOptions The value of productsOptions as likeSearch. + * @param likeSearchOption Like search option. (NotNull) + */ + public void setProductsOptions_LikeSearch(String productsOptions, jp.sf.pal.pompei.allcommon.cbean.coption.LikeSearchOption likeSearchOption) { + registerLikeSearchQuery(ConditionKey.CK_LIKE_SEARCH, filterRemoveEmptyString(productsOptions), getCValueProductsOptions(), COL_PRODUCTS_OPTIONS, J_ProductsOptions, UJ_productsOptions, likeSearchOption); + } + + /** + * Set the value of productsOptions using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param productsOptionsList The value of productsOptions as inScope. + */ + public void setProductsOptions_InScope(java.util.List productsOptionsList) { + registerProductsOptions(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyStringFromList(productsOptionsList)); + } + + /** + * Set the value of productsOptions using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param productsOptions The value of productsOptions as inScope. + */ + public void setProductsOptions_InScope(String productsOptions, jp.sf.pal.pompei.allcommon.cbean.coption.InScopeOption option) { + registerInScopeQuery(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyString(productsOptions), getCValueProductsOptions(), COL_PRODUCTS_OPTIONS, J_ProductsOptions, UJ_productsOptions, option); + } + + /** + * Set the value of productsOptions using notInScope. { not in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param productsOptionsList The value of productsOptions as notInScope. + */ + public void setProductsOptions_NotInScope(java.util.List productsOptionsList) { + registerProductsOptions(ConditionKey.CK_NOT_IN_SCOPE, filterRemoveEmptyStringFromList(productsOptionsList)); + } + + /** + * Register condition of productsOptions. + * + * @param key Condition key. (NotNull) + * @param value The value of productsOptions. (Nullable) + */ + protected void registerProductsOptions(ConditionKey key, Object value) { + registerQuery(key, value, getCValueProductsOptions(), COL_PRODUCTS_OPTIONS, J_ProductsOptions, UJ_productsOptions); + } + + /** + * Register inline condition of productsOptions. + * + * @param key Condition key. (NotNull) + * @param value The value of productsOptions. (Nullable) + */ + protected void registerInlineProductsOptions(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueProductsOptions(), COL_PRODUCTS_OPTIONS, J_ProductsOptions, UJ_productsOptions); + } + + abstract protected ConditionValue getCValueProductsOptions(); + + /** Column db name of productsOptionsValues. */ + protected static final String COL_PRODUCTS_OPTIONS_VALUES = "PRODUCTS_OPTIONS_VALUES"; + + /** Column java name of productsOptionsValues. */ + protected static final String J_ProductsOptionsValues = "ProductsOptionsValues"; + + /** Column uncapitalised java name of productsOptionsValues. */ + protected static final String UJ_productsOptionsValues = "productsOptionsValues"; + + /** + * Set the value of productsOptionsValues using equal. { = } + * If the value is null or empty-string, this condition is ignored. + * + * @param productsOptionsValues The value of productsOptionsValues as equal. + */ + public void setProductsOptionsValues_Equal(String productsOptionsValues) { + registerProductsOptionsValues(ConditionKey.CK_EQUAL, filterRemoveEmptyString(productsOptionsValues)); + } + + /** + * Set the value of productsOptionsValues using notEqual. { != } + * If the value is null or empty-string, this condition is ignored. + * + * @param productsOptionsValues The value of productsOptionsValues as notEqual. + */ + public void setProductsOptionsValues_NotEqual(String productsOptionsValues) { + registerProductsOptionsValues(ConditionKey.CK_NOT_EQUAL, filterRemoveEmptyString(productsOptionsValues)); + } + + /** + * Set the value of productsOptionsValues using greaterThan. { > } + * If the value is null or empty-string, this condition is ignored. + * + * @param productsOptionsValues The value of productsOptionsValues as greaterThan. + */ + public void setProductsOptionsValues_GreaterThan(String productsOptionsValues) { + registerProductsOptionsValues(ConditionKey.CK_GREATER_THAN, filterRemoveEmptyString(productsOptionsValues)); + } + + /** + * Set the value of productsOptionsValues using lessThan. { < } + * If the value is null or empty-string, this condition is ignored. + * + * @param productsOptionsValues The value of productsOptionsValues as lessThan. + */ + public void setProductsOptionsValues_LessThan(String productsOptionsValues) { + registerProductsOptionsValues(ConditionKey.CK_LESS_THAN, filterRemoveEmptyString(productsOptionsValues)); + } + + /** + * Set the value of productsOptionsValues using greaterEqual. { >= } + * If the value is null or empty-string, this condition is ignored. + * + * @param productsOptionsValues The value of productsOptionsValues as greaterEqual. + */ + public void setProductsOptionsValues_GreaterEqual(String productsOptionsValues) { + registerProductsOptionsValues(ConditionKey.CK_GREATER_EQUAL, filterRemoveEmptyString(productsOptionsValues)); + } + + /** + * Set the value of productsOptionsValues using lessEqual. { <= } + * If the value is null or empty-string, this condition is ignored. + * + * @param productsOptionsValues The value of productsOptionsValues as lessEqual. + */ + public void setProductsOptionsValues_LessEqual(String productsOptionsValues) { + registerProductsOptionsValues(ConditionKey.CK_LESS_EQUAL, filterRemoveEmptyString(productsOptionsValues)); + } + + /** + * Set the value of productsOptionsValues using prefixSearch. { like 'xxx%' } + * If the value is null or empty-string, this condition is ignored. + * + * @param productsOptionsValues The value of productsOptionsValues as prefixSearch. + */ + public void setProductsOptionsValues_PrefixSearch(String productsOptionsValues) { + registerProductsOptionsValues(ConditionKey.CK_PREFIX_SEARCH, filterRemoveEmptyString(productsOptionsValues)); + } + + /** + * Set the value of productsOptionsValues using likeSearch. { like '%xxx%' } + * If the value is null or empty-string, this condition is ignored. + * You can invoke this method several times and the conditions are set up. + * + * @param productsOptionsValues The value of productsOptionsValues as likeSearch. + * @param likeSearchOption Like search option. (NotNull) + */ + public void setProductsOptionsValues_LikeSearch(String productsOptionsValues, jp.sf.pal.pompei.allcommon.cbean.coption.LikeSearchOption likeSearchOption) { + registerLikeSearchQuery(ConditionKey.CK_LIKE_SEARCH, filterRemoveEmptyString(productsOptionsValues), getCValueProductsOptionsValues(), COL_PRODUCTS_OPTIONS_VALUES, J_ProductsOptionsValues, UJ_productsOptionsValues, likeSearchOption); + } + + /** + * Set the value of productsOptionsValues using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param productsOptionsValuesList The value of productsOptionsValues as inScope. + */ + public void setProductsOptionsValues_InScope(java.util.List productsOptionsValuesList) { + registerProductsOptionsValues(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyStringFromList(productsOptionsValuesList)); + } + + /** + * Set the value of productsOptionsValues using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param productsOptionsValues The value of productsOptionsValues as inScope. + */ + public void setProductsOptionsValues_InScope(String productsOptionsValues, jp.sf.pal.pompei.allcommon.cbean.coption.InScopeOption option) { + registerInScopeQuery(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyString(productsOptionsValues), getCValueProductsOptionsValues(), COL_PRODUCTS_OPTIONS_VALUES, J_ProductsOptionsValues, UJ_productsOptionsValues, option); + } + + /** + * Set the value of productsOptionsValues using notInScope. { not in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param productsOptionsValuesList The value of productsOptionsValues as notInScope. + */ + public void setProductsOptionsValues_NotInScope(java.util.List productsOptionsValuesList) { + registerProductsOptionsValues(ConditionKey.CK_NOT_IN_SCOPE, filterRemoveEmptyStringFromList(productsOptionsValuesList)); + } + + /** + * Register condition of productsOptionsValues. + * + * @param key Condition key. (NotNull) + * @param value The value of productsOptionsValues. (Nullable) + */ + protected void registerProductsOptionsValues(ConditionKey key, Object value) { + registerQuery(key, value, getCValueProductsOptionsValues(), COL_PRODUCTS_OPTIONS_VALUES, J_ProductsOptionsValues, UJ_productsOptionsValues); + } + + /** + * Register inline condition of productsOptionsValues. + * + * @param key Condition key. (NotNull) + * @param value The value of productsOptionsValues. (Nullable) + */ + protected void registerInlineProductsOptionsValues(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueProductsOptionsValues(), COL_PRODUCTS_OPTIONS_VALUES, J_ProductsOptionsValues, UJ_productsOptionsValues); + } + + abstract protected ConditionValue getCValueProductsOptionsValues(); + + /** Column db name of optionsValuesPrice. */ + protected static final String COL_OPTIONS_VALUES_PRICE = "OPTIONS_VALUES_PRICE"; + + /** Column java name of optionsValuesPrice. */ + protected static final String J_OptionsValuesPrice = "OptionsValuesPrice"; + + /** Column uncapitalised java name of optionsValuesPrice. */ + protected static final String UJ_optionsValuesPrice = "optionsValuesPrice"; + + /** + * Set the value of optionsValuesPrice using equal. { = } + * + * @param optionsValuesPrice The value of optionsValuesPrice as equal. + */ + public void setOptionsValuesPrice_Equal(java.math.BigDecimal optionsValuesPrice) { + registerOptionsValuesPrice(ConditionKey.CK_EQUAL, optionsValuesPrice); + } + + /** + * Set the value of optionsValuesPrice using notEqual. { != } + * + * @param optionsValuesPrice The value of optionsValuesPrice as notEqual. + */ + public void setOptionsValuesPrice_NotEqual(java.math.BigDecimal optionsValuesPrice) { + registerOptionsValuesPrice(ConditionKey.CK_NOT_EQUAL, optionsValuesPrice); + } + + /** + * Set the value of optionsValuesPrice using greaterThan. { > } + * + * @param optionsValuesPrice The value of optionsValuesPrice as greaterThan. + */ + public void setOptionsValuesPrice_GreaterThan(java.math.BigDecimal optionsValuesPrice) { + registerOptionsValuesPrice(ConditionKey.CK_GREATER_THAN, optionsValuesPrice); + } + + /** + * Set the value of optionsValuesPrice using lessThan. { < } + * + * @param optionsValuesPrice The value of optionsValuesPrice as lessThan. + */ + public void setOptionsValuesPrice_LessThan(java.math.BigDecimal optionsValuesPrice) { + registerOptionsValuesPrice(ConditionKey.CK_LESS_THAN, optionsValuesPrice); + } + + /** + * Set the value of optionsValuesPrice using greaterEqual. { >= } + * + * @param optionsValuesPrice The value of optionsValuesPrice as greaterEqual. + */ + public void setOptionsValuesPrice_GreaterEqual(java.math.BigDecimal optionsValuesPrice) { + registerOptionsValuesPrice(ConditionKey.CK_GREATER_EQUAL, optionsValuesPrice); + } + + /** + * Set the value of optionsValuesPrice using lessEqual. { <= } + * + * @param optionsValuesPrice The value of optionsValuesPrice as lessEqual. + */ + public void setOptionsValuesPrice_LessEqual(java.math.BigDecimal optionsValuesPrice) { + registerOptionsValuesPrice(ConditionKey.CK_LESS_EQUAL, optionsValuesPrice); + } + + /** + * Set the value of optionsValuesPrice using inScope. { in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param optionsValuesPriceList The value of optionsValuesPrice as inScope. + */ + public void setOptionsValuesPrice_InScope(java.util.List optionsValuesPriceList) { + registerOptionsValuesPrice(ConditionKey.CK_IN_SCOPE, optionsValuesPriceList); + } + + /** + * Set the value of optionsValuesPrice using notInScope. { not in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param optionsValuesPriceList The value of optionsValuesPrice as notInScope. + */ + public void setOptionsValuesPrice_NotInScope(java.util.List optionsValuesPriceList) { + registerOptionsValuesPrice(ConditionKey.CK_NOT_IN_SCOPE, optionsValuesPriceList); + } + + /** + * Register condition of optionsValuesPrice. + * + * @param key Condition key. (NotNull) + * @param value The value of optionsValuesPrice. (Nullable) + */ + protected void registerOptionsValuesPrice(ConditionKey key, Object value) { + registerQuery(key, value, getCValueOptionsValuesPrice(), COL_OPTIONS_VALUES_PRICE, J_OptionsValuesPrice, UJ_optionsValuesPrice); + } + + /** + * Register inline condition of optionsValuesPrice. + * + * @param key Condition key. (NotNull) + * @param value The value of optionsValuesPrice. (Nullable) + */ + protected void registerInlineOptionsValuesPrice(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueOptionsValuesPrice(), COL_OPTIONS_VALUES_PRICE, J_OptionsValuesPrice, UJ_optionsValuesPrice); + } + + abstract protected ConditionValue getCValueOptionsValuesPrice(); + + /** Column db name of pricePrefix. */ + protected static final String COL_PRICE_PREFIX = "PRICE_PREFIX"; + + /** Column java name of pricePrefix. */ + protected static final String J_PricePrefix = "PricePrefix"; + + /** Column uncapitalised java name of pricePrefix. */ + protected static final String UJ_pricePrefix = "pricePrefix"; + + /** + * Set the value of pricePrefix using equal. { = } + * If the value is null or empty-string, this condition is ignored. + * + * @param pricePrefix The value of pricePrefix as equal. + */ + public void setPricePrefix_Equal(String pricePrefix) { + registerPricePrefix(ConditionKey.CK_EQUAL, filterRemoveEmptyString(pricePrefix)); + } + + /** + * Set the value of pricePrefix using notEqual. { != } + * If the value is null or empty-string, this condition is ignored. + * + * @param pricePrefix The value of pricePrefix as notEqual. + */ + public void setPricePrefix_NotEqual(String pricePrefix) { + registerPricePrefix(ConditionKey.CK_NOT_EQUAL, filterRemoveEmptyString(pricePrefix)); + } + + /** + * Set the value of pricePrefix using greaterThan. { > } + * If the value is null or empty-string, this condition is ignored. + * + * @param pricePrefix The value of pricePrefix as greaterThan. + */ + public void setPricePrefix_GreaterThan(String pricePrefix) { + registerPricePrefix(ConditionKey.CK_GREATER_THAN, filterRemoveEmptyString(pricePrefix)); + } + + /** + * Set the value of pricePrefix using lessThan. { < } + * If the value is null or empty-string, this condition is ignored. + * + * @param pricePrefix The value of pricePrefix as lessThan. + */ + public void setPricePrefix_LessThan(String pricePrefix) { + registerPricePrefix(ConditionKey.CK_LESS_THAN, filterRemoveEmptyString(pricePrefix)); + } + + /** + * Set the value of pricePrefix using greaterEqual. { >= } + * If the value is null or empty-string, this condition is ignored. + * + * @param pricePrefix The value of pricePrefix as greaterEqual. + */ + public void setPricePrefix_GreaterEqual(String pricePrefix) { + registerPricePrefix(ConditionKey.CK_GREATER_EQUAL, filterRemoveEmptyString(pricePrefix)); + } + + /** + * Set the value of pricePrefix using lessEqual. { <= } + * If the value is null or empty-string, this condition is ignored. + * + * @param pricePrefix The value of pricePrefix as lessEqual. + */ + public void setPricePrefix_LessEqual(String pricePrefix) { + registerPricePrefix(ConditionKey.CK_LESS_EQUAL, filterRemoveEmptyString(pricePrefix)); + } + + /** + * Set the value of pricePrefix using prefixSearch. { like 'xxx%' } + * If the value is null or empty-string, this condition is ignored. + * + * @param pricePrefix The value of pricePrefix as prefixSearch. + */ + public void setPricePrefix_PrefixSearch(String pricePrefix) { + registerPricePrefix(ConditionKey.CK_PREFIX_SEARCH, filterRemoveEmptyString(pricePrefix)); + } + + /** + * Set the value of pricePrefix using likeSearch. { like '%xxx%' } + * If the value is null or empty-string, this condition is ignored. + * You can invoke this method several times and the conditions are set up. + * + * @param pricePrefix The value of pricePrefix as likeSearch. + * @param likeSearchOption Like search option. (NotNull) + */ + public void setPricePrefix_LikeSearch(String pricePrefix, jp.sf.pal.pompei.allcommon.cbean.coption.LikeSearchOption likeSearchOption) { + registerLikeSearchQuery(ConditionKey.CK_LIKE_SEARCH, filterRemoveEmptyString(pricePrefix), getCValuePricePrefix(), COL_PRICE_PREFIX, J_PricePrefix, UJ_pricePrefix, likeSearchOption); + } + + /** + * Set the value of pricePrefix using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param pricePrefixList The value of pricePrefix as inScope. + */ + public void setPricePrefix_InScope(java.util.List pricePrefixList) { + registerPricePrefix(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyStringFromList(pricePrefixList)); + } + + /** + * Set the value of pricePrefix using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param pricePrefix The value of pricePrefix as inScope. + */ + public void setPricePrefix_InScope(String pricePrefix, jp.sf.pal.pompei.allcommon.cbean.coption.InScopeOption option) { + registerInScopeQuery(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyString(pricePrefix), getCValuePricePrefix(), COL_PRICE_PREFIX, J_PricePrefix, UJ_pricePrefix, option); + } + + /** + * Set the value of pricePrefix using notInScope. { not in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param pricePrefixList The value of pricePrefix as notInScope. + */ + public void setPricePrefix_NotInScope(java.util.List pricePrefixList) { + registerPricePrefix(ConditionKey.CK_NOT_IN_SCOPE, filterRemoveEmptyStringFromList(pricePrefixList)); + } + + /** + * Register condition of pricePrefix. + * + * @param key Condition key. (NotNull) + * @param value The value of pricePrefix. (Nullable) + */ + protected void registerPricePrefix(ConditionKey key, Object value) { + registerQuery(key, value, getCValuePricePrefix(), COL_PRICE_PREFIX, J_PricePrefix, UJ_pricePrefix); + } + + /** + * Register inline condition of pricePrefix. + * + * @param key Condition key. (NotNull) + * @param value The value of pricePrefix. (Nullable) + */ + protected void registerInlinePricePrefix(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValuePricePrefix(), COL_PRICE_PREFIX, J_PricePrefix, UJ_pricePrefix); + } + + abstract protected ConditionValue getCValuePricePrefix(); + + // =================================================================================== + // Basic Override + // ============== + /** + * This method overrides the method that is declared at super. + * + * @return Clause string. (NotNull) + */ + public String toString() { + return getSqlClause().getClause(); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/AbstractBsOrdersProductsCQ.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/AbstractBsOrdersProductsCQ.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/AbstractBsOrdersProductsCQ.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,1101 @@ + +package jp.sf.pal.pompei.cbean.cq.bs; + + + +import jp.sf.pal.pompei.allcommon.cbean.*; +import jp.sf.pal.pompei.allcommon.cbean.ckey.*; +import jp.sf.pal.pompei.allcommon.cbean.cvalue.ConditionValue; +import jp.sf.pal.pompei.allcommon.cbean.sqlclause.SqlClause; +import jp.sf.pal.pompei.cbean.cq.*; + +/** + * The condition-query of ORDERS_PRODUCTS. + * + * @author DBFlute(AutoGenerator) + */ +public abstract class AbstractBsOrdersProductsCQ extends AbstractConditionQuery { + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param childQuery Child query as abstract class. (Nullable: If null, this is base instance.) + * @param sqlClause SQL clause instance. (NotNull) + * @param aliasName My alias name. (NotNull) + * @param nestLevel Nest level. + */ + public AbstractBsOrdersProductsCQ(ConditionQuery childQuery, SqlClause sqlClause, String aliasName, int nestLevel) { + super(childQuery, sqlClause, aliasName, nestLevel); + } + + // =================================================================================== + // Table Name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + final public String getTableDbName() { + return "ORDERS_PRODUCTS"; + } + + // =================================================================================== + // Query + // ===== + + // /* * * * * * * * * * * * * * * * * * * * * * * + // MyTable = [ORDERS_PRODUCTS] + // * * * * * * * * */ + + + /** Column db name of ordersProductsId. */ + protected static final String COL_ORDERS_PRODUCTS_ID = "ORDERS_PRODUCTS_ID"; + + /** Column java name of ordersProductsId. */ + protected static final String J_OrdersProductsId = "OrdersProductsId"; + + /** Column uncapitalised java name of ordersProductsId. */ + protected static final String UJ_ordersProductsId = "ordersProductsId"; + + /** + * Set the value of ordersProductsId using equal. { = } + * + * @param ordersProductsId The value of ordersProductsId as equal. + */ + public void setOrdersProductsId_Equal(java.math.BigDecimal ordersProductsId) { + registerOrdersProductsId(ConditionKey.CK_EQUAL, ordersProductsId); + } + + /** + * Set the value of ordersProductsId using notEqual. { != } + * + * @param ordersProductsId The value of ordersProductsId as notEqual. + */ + public void setOrdersProductsId_NotEqual(java.math.BigDecimal ordersProductsId) { + registerOrdersProductsId(ConditionKey.CK_NOT_EQUAL, ordersProductsId); + } + + /** + * Set the value of ordersProductsId using greaterThan. { > } + * + * @param ordersProductsId The value of ordersProductsId as greaterThan. + */ + public void setOrdersProductsId_GreaterThan(java.math.BigDecimal ordersProductsId) { + registerOrdersProductsId(ConditionKey.CK_GREATER_THAN, ordersProductsId); + } + + /** + * Set the value of ordersProductsId using lessThan. { < } + * + * @param ordersProductsId The value of ordersProductsId as lessThan. + */ + public void setOrdersProductsId_LessThan(java.math.BigDecimal ordersProductsId) { + registerOrdersProductsId(ConditionKey.CK_LESS_THAN, ordersProductsId); + } + + /** + * Set the value of ordersProductsId using greaterEqual. { >= } + * + * @param ordersProductsId The value of ordersProductsId as greaterEqual. + */ + public void setOrdersProductsId_GreaterEqual(java.math.BigDecimal ordersProductsId) { + registerOrdersProductsId(ConditionKey.CK_GREATER_EQUAL, ordersProductsId); + } + + /** + * Set the value of ordersProductsId using lessEqual. { <= } + * + * @param ordersProductsId The value of ordersProductsId as lessEqual. + */ + public void setOrdersProductsId_LessEqual(java.math.BigDecimal ordersProductsId) { + registerOrdersProductsId(ConditionKey.CK_LESS_EQUAL, ordersProductsId); + } + + /** + * Set the value of ordersProductsId using inScope. { in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param ordersProductsIdList The value of ordersProductsId as inScope. + */ + public void setOrdersProductsId_InScope(java.util.List ordersProductsIdList) { + registerOrdersProductsId(ConditionKey.CK_IN_SCOPE, ordersProductsIdList); + } + + /** + * Set the value of ordersProductsId using notInScope. { not in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param ordersProductsIdList The value of ordersProductsId as notInScope. + */ + public void setOrdersProductsId_NotInScope(java.util.List ordersProductsIdList) { + registerOrdersProductsId(ConditionKey.CK_NOT_IN_SCOPE, ordersProductsIdList); + } + + /** + * Register condition of ordersProductsId. + * + * @param key Condition key. (NotNull) + * @param value The value of ordersProductsId. (Nullable) + */ + protected void registerOrdersProductsId(ConditionKey key, Object value) { + registerQuery(key, value, getCValueOrdersProductsId(), COL_ORDERS_PRODUCTS_ID, J_OrdersProductsId, UJ_ordersProductsId); + } + + /** + * Register inline condition of ordersProductsId. + * + * @param key Condition key. (NotNull) + * @param value The value of ordersProductsId. (Nullable) + */ + protected void registerInlineOrdersProductsId(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueOrdersProductsId(), COL_ORDERS_PRODUCTS_ID, J_OrdersProductsId, UJ_ordersProductsId); + } + + abstract protected ConditionValue getCValueOrdersProductsId(); + + /** Column db name of ordersId. */ + protected static final String COL_ORDERS_ID = "ORDERS_ID"; + + /** Column java name of ordersId. */ + protected static final String J_OrdersId = "OrdersId"; + + /** Column uncapitalised java name of ordersId. */ + protected static final String UJ_ordersId = "ordersId"; + + /** + * Set the value of ordersId using equal. { = } + * + * @param ordersId The value of ordersId as equal. + */ + public void setOrdersId_Equal(java.math.BigDecimal ordersId) { + registerOrdersId(ConditionKey.CK_EQUAL, ordersId); + } + + /** + * Set the value of ordersId using notEqual. { != } + * + * @param ordersId The value of ordersId as notEqual. + */ + public void setOrdersId_NotEqual(java.math.BigDecimal ordersId) { + registerOrdersId(ConditionKey.CK_NOT_EQUAL, ordersId); + } + + /** + * Set the value of ordersId using greaterThan. { > } + * + * @param ordersId The value of ordersId as greaterThan. + */ + public void setOrdersId_GreaterThan(java.math.BigDecimal ordersId) { + registerOrdersId(ConditionKey.CK_GREATER_THAN, ordersId); + } + + /** + * Set the value of ordersId using lessThan. { < } + * + * @param ordersId The value of ordersId as lessThan. + */ + public void setOrdersId_LessThan(java.math.BigDecimal ordersId) { + registerOrdersId(ConditionKey.CK_LESS_THAN, ordersId); + } + + /** + * Set the value of ordersId using greaterEqual. { >= } + * + * @param ordersId The value of ordersId as greaterEqual. + */ + public void setOrdersId_GreaterEqual(java.math.BigDecimal ordersId) { + registerOrdersId(ConditionKey.CK_GREATER_EQUAL, ordersId); + } + + /** + * Set the value of ordersId using lessEqual. { <= } + * + * @param ordersId The value of ordersId as lessEqual. + */ + public void setOrdersId_LessEqual(java.math.BigDecimal ordersId) { + registerOrdersId(ConditionKey.CK_LESS_EQUAL, ordersId); + } + + /** + * Set the value of ordersId using inScope. { in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param ordersIdList The value of ordersId as inScope. + */ + public void setOrdersId_InScope(java.util.List ordersIdList) { + registerOrdersId(ConditionKey.CK_IN_SCOPE, ordersIdList); + } + + /** + * Set the value of ordersId using notInScope. { not in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param ordersIdList The value of ordersId as notInScope. + */ + public void setOrdersId_NotInScope(java.util.List ordersIdList) { + registerOrdersId(ConditionKey.CK_NOT_IN_SCOPE, ordersIdList); + } + + /** + * Register condition of ordersId. + * + * @param key Condition key. (NotNull) + * @param value The value of ordersId. (Nullable) + */ + protected void registerOrdersId(ConditionKey key, Object value) { + registerQuery(key, value, getCValueOrdersId(), COL_ORDERS_ID, J_OrdersId, UJ_ordersId); + } + + /** + * Register inline condition of ordersId. + * + * @param key Condition key. (NotNull) + * @param value The value of ordersId. (Nullable) + */ + protected void registerInlineOrdersId(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueOrdersId(), COL_ORDERS_ID, J_OrdersId, UJ_ordersId); + } + + abstract protected ConditionValue getCValueOrdersId(); + + /** Column db name of productsId. */ + protected static final String COL_PRODUCTS_ID = "PRODUCTS_ID"; + + /** Column java name of productsId. */ + protected static final String J_ProductsId = "ProductsId"; + + /** Column uncapitalised java name of productsId. */ + protected static final String UJ_productsId = "productsId"; + + /** + * Set the value of productsId using equal. { = } + * + * @param productsId The value of productsId as equal. + */ + public void setProductsId_Equal(java.math.BigDecimal productsId) { + registerProductsId(ConditionKey.CK_EQUAL, productsId); + } + + /** + * Set the value of productsId using notEqual. { != } + * + * @param productsId The value of productsId as notEqual. + */ + public void setProductsId_NotEqual(java.math.BigDecimal productsId) { + registerProductsId(ConditionKey.CK_NOT_EQUAL, productsId); + } + + /** + * Set the value of productsId using greaterThan. { > } + * + * @param productsId The value of productsId as greaterThan. + */ + public void setProductsId_GreaterThan(java.math.BigDecimal productsId) { + registerProductsId(ConditionKey.CK_GREATER_THAN, productsId); + } + + /** + * Set the value of productsId using lessThan. { < } + * + * @param productsId The value of productsId as lessThan. + */ + public void setProductsId_LessThan(java.math.BigDecimal productsId) { + registerProductsId(ConditionKey.CK_LESS_THAN, productsId); + } + + /** + * Set the value of productsId using greaterEqual. { >= } + * + * @param productsId The value of productsId as greaterEqual. + */ + public void setProductsId_GreaterEqual(java.math.BigDecimal productsId) { + registerProductsId(ConditionKey.CK_GREATER_EQUAL, productsId); + } + + /** + * Set the value of productsId using lessEqual. { <= } + * + * @param productsId The value of productsId as lessEqual. + */ + public void setProductsId_LessEqual(java.math.BigDecimal productsId) { + registerProductsId(ConditionKey.CK_LESS_EQUAL, productsId); + } + + /** + * Set the value of productsId using inScope. { in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param productsIdList The value of productsId as inScope. + */ + public void setProductsId_InScope(java.util.List productsIdList) { + registerProductsId(ConditionKey.CK_IN_SCOPE, productsIdList); + } + + /** + * Set the value of productsId using notInScope. { not in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param productsIdList The value of productsId as notInScope. + */ + public void setProductsId_NotInScope(java.util.List productsIdList) { + registerProductsId(ConditionKey.CK_NOT_IN_SCOPE, productsIdList); + } + + /** + * Register condition of productsId. + * + * @param key Condition key. (NotNull) + * @param value The value of productsId. (Nullable) + */ + protected void registerProductsId(ConditionKey key, Object value) { + registerQuery(key, value, getCValueProductsId(), COL_PRODUCTS_ID, J_ProductsId, UJ_productsId); + } + + /** + * Register inline condition of productsId. + * + * @param key Condition key. (NotNull) + * @param value The value of productsId. (Nullable) + */ + protected void registerInlineProductsId(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueProductsId(), COL_PRODUCTS_ID, J_ProductsId, UJ_productsId); + } + + abstract protected ConditionValue getCValueProductsId(); + + /** Column db name of productsModel. */ + protected static final String COL_PRODUCTS_MODEL = "PRODUCTS_MODEL"; + + /** Column java name of productsModel. */ + protected static final String J_ProductsModel = "ProductsModel"; + + /** Column uncapitalised java name of productsModel. */ + protected static final String UJ_productsModel = "productsModel"; + + /** + * Set the value of productsModel using equal. { = } + * If the value is null or empty-string, this condition is ignored. + * + * @param productsModel The value of productsModel as equal. + */ + public void setProductsModel_Equal(String productsModel) { + registerProductsModel(ConditionKey.CK_EQUAL, filterRemoveEmptyString(productsModel)); + } + + /** + * Set the value of productsModel using notEqual. { != } + * If the value is null or empty-string, this condition is ignored. + * + * @param productsModel The value of productsModel as notEqual. + */ + public void setProductsModel_NotEqual(String productsModel) { + registerProductsModel(ConditionKey.CK_NOT_EQUAL, filterRemoveEmptyString(productsModel)); + } + + /** + * Set the value of productsModel using greaterThan. { > } + * If the value is null or empty-string, this condition is ignored. + * + * @param productsModel The value of productsModel as greaterThan. + */ + public void setProductsModel_GreaterThan(String productsModel) { + registerProductsModel(ConditionKey.CK_GREATER_THAN, filterRemoveEmptyString(productsModel)); + } + + /** + * Set the value of productsModel using lessThan. { < } + * If the value is null or empty-string, this condition is ignored. + * + * @param productsModel The value of productsModel as lessThan. + */ + public void setProductsModel_LessThan(String productsModel) { + registerProductsModel(ConditionKey.CK_LESS_THAN, filterRemoveEmptyString(productsModel)); + } + + /** + * Set the value of productsModel using greaterEqual. { >= } + * If the value is null or empty-string, this condition is ignored. + * + * @param productsModel The value of productsModel as greaterEqual. + */ + public void setProductsModel_GreaterEqual(String productsModel) { + registerProductsModel(ConditionKey.CK_GREATER_EQUAL, filterRemoveEmptyString(productsModel)); + } + + /** + * Set the value of productsModel using lessEqual. { <= } + * If the value is null or empty-string, this condition is ignored. + * + * @param productsModel The value of productsModel as lessEqual. + */ + public void setProductsModel_LessEqual(String productsModel) { + registerProductsModel(ConditionKey.CK_LESS_EQUAL, filterRemoveEmptyString(productsModel)); + } + + /** + * Set the value of productsModel using prefixSearch. { like 'xxx%' } + * If the value is null or empty-string, this condition is ignored. + * + * @param productsModel The value of productsModel as prefixSearch. + */ + public void setProductsModel_PrefixSearch(String productsModel) { + registerProductsModel(ConditionKey.CK_PREFIX_SEARCH, filterRemoveEmptyString(productsModel)); + } + + /** + * Set the value of productsModel using likeSearch. { like '%xxx%' } + * If the value is null or empty-string, this condition is ignored. + * You can invoke this method several times and the conditions are set up. + * + * @param productsModel The value of productsModel as likeSearch. + * @param likeSearchOption Like search option. (NotNull) + */ + public void setProductsModel_LikeSearch(String productsModel, jp.sf.pal.pompei.allcommon.cbean.coption.LikeSearchOption likeSearchOption) { + registerLikeSearchQuery(ConditionKey.CK_LIKE_SEARCH, filterRemoveEmptyString(productsModel), getCValueProductsModel(), COL_PRODUCTS_MODEL, J_ProductsModel, UJ_productsModel, likeSearchOption); + } + + /** + * Set the value of productsModel using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param productsModelList The value of productsModel as inScope. + */ + public void setProductsModel_InScope(java.util.List productsModelList) { + registerProductsModel(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyStringFromList(productsModelList)); + } + + /** + * Set the value of productsModel using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param productsModel The value of productsModel as inScope. + */ + public void setProductsModel_InScope(String productsModel, jp.sf.pal.pompei.allcommon.cbean.coption.InScopeOption option) { + registerInScopeQuery(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyString(productsModel), getCValueProductsModel(), COL_PRODUCTS_MODEL, J_ProductsModel, UJ_productsModel, option); + } + + /** + * Set the value of productsModel using notInScope. { not in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param productsModelList The value of productsModel as notInScope. + */ + public void setProductsModel_NotInScope(java.util.List productsModelList) { + registerProductsModel(ConditionKey.CK_NOT_IN_SCOPE, filterRemoveEmptyStringFromList(productsModelList)); + } + + /** + * Set the value of productsModel using isNull. { is null } + */ + public void setProductsModel_IsNull() { + registerProductsModel(ConditionKey.CK_IS_NULL, DUMMY_OBJECT); + } + + /** + * Set the value of productsModel using isNotNull. { is not null } + */ + public void setProductsModel_IsNotNull() { + registerProductsModel(ConditionKey.CK_IS_NOT_NULL, DUMMY_OBJECT); + } + + /** + * Register condition of productsModel. + * + * @param key Condition key. (NotNull) + * @param value The value of productsModel. (Nullable) + */ + protected void registerProductsModel(ConditionKey key, Object value) { + registerQuery(key, value, getCValueProductsModel(), COL_PRODUCTS_MODEL, J_ProductsModel, UJ_productsModel); + } + + /** + * Register inline condition of productsModel. + * + * @param key Condition key. (NotNull) + * @param value The value of productsModel. (Nullable) + */ + protected void registerInlineProductsModel(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueProductsModel(), COL_PRODUCTS_MODEL, J_ProductsModel, UJ_productsModel); + } + + abstract protected ConditionValue getCValueProductsModel(); + + /** Column db name of productsName. */ + protected static final String COL_PRODUCTS_NAME = "PRODUCTS_NAME"; + + /** Column java name of productsName. */ + protected static final String J_ProductsName = "ProductsName"; + + /** Column uncapitalised java name of productsName. */ + protected static final String UJ_productsName = "productsName"; + + /** + * Set the value of productsName using equal. { = } + * If the value is null or empty-string, this condition is ignored. + * + * @param productsName The value of productsName as equal. + */ + public void setProductsName_Equal(String productsName) { + registerProductsName(ConditionKey.CK_EQUAL, filterRemoveEmptyString(productsName)); + } + + /** + * Set the value of productsName using notEqual. { != } + * If the value is null or empty-string, this condition is ignored. + * + * @param productsName The value of productsName as notEqual. + */ + public void setProductsName_NotEqual(String productsName) { + registerProductsName(ConditionKey.CK_NOT_EQUAL, filterRemoveEmptyString(productsName)); + } + + /** + * Set the value of productsName using greaterThan. { > } + * If the value is null or empty-string, this condition is ignored. + * + * @param productsName The value of productsName as greaterThan. + */ + public void setProductsName_GreaterThan(String productsName) { + registerProductsName(ConditionKey.CK_GREATER_THAN, filterRemoveEmptyString(productsName)); + } + + /** + * Set the value of productsName using lessThan. { < } + * If the value is null or empty-string, this condition is ignored. + * + * @param productsName The value of productsName as lessThan. + */ + public void setProductsName_LessThan(String productsName) { + registerProductsName(ConditionKey.CK_LESS_THAN, filterRemoveEmptyString(productsName)); + } + + /** + * Set the value of productsName using greaterEqual. { >= } + * If the value is null or empty-string, this condition is ignored. + * + * @param productsName The value of productsName as greaterEqual. + */ + public void setProductsName_GreaterEqual(String productsName) { + registerProductsName(ConditionKey.CK_GREATER_EQUAL, filterRemoveEmptyString(productsName)); + } + + /** + * Set the value of productsName using lessEqual. { <= } + * If the value is null or empty-string, this condition is ignored. + * + * @param productsName The value of productsName as lessEqual. + */ + public void setProductsName_LessEqual(String productsName) { + registerProductsName(ConditionKey.CK_LESS_EQUAL, filterRemoveEmptyString(productsName)); + } + + /** + * Set the value of productsName using prefixSearch. { like 'xxx%' } + * If the value is null or empty-string, this condition is ignored. + * + * @param productsName The value of productsName as prefixSearch. + */ + public void setProductsName_PrefixSearch(String productsName) { + registerProductsName(ConditionKey.CK_PREFIX_SEARCH, filterRemoveEmptyString(productsName)); + } + + /** + * Set the value of productsName using likeSearch. { like '%xxx%' } + * If the value is null or empty-string, this condition is ignored. + * You can invoke this method several times and the conditions are set up. + * + * @param productsName The value of productsName as likeSearch. + * @param likeSearchOption Like search option. (NotNull) + */ + public void setProductsName_LikeSearch(String productsName, jp.sf.pal.pompei.allcommon.cbean.coption.LikeSearchOption likeSearchOption) { + registerLikeSearchQuery(ConditionKey.CK_LIKE_SEARCH, filterRemoveEmptyString(productsName), getCValueProductsName(), COL_PRODUCTS_NAME, J_ProductsName, UJ_productsName, likeSearchOption); + } + + /** + * Set the value of productsName using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param productsNameList The value of productsName as inScope. + */ + public void setProductsName_InScope(java.util.List productsNameList) { + registerProductsName(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyStringFromList(productsNameList)); + } + + /** + * Set the value of productsName using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param productsName The value of productsName as inScope. + */ + public void setProductsName_InScope(String productsName, jp.sf.pal.pompei.allcommon.cbean.coption.InScopeOption option) { + registerInScopeQuery(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyString(productsName), getCValueProductsName(), COL_PRODUCTS_NAME, J_ProductsName, UJ_productsName, option); + } + + /** + * Set the value of productsName using notInScope. { not in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param productsNameList The value of productsName as notInScope. + */ + public void setProductsName_NotInScope(java.util.List productsNameList) { + registerProductsName(ConditionKey.CK_NOT_IN_SCOPE, filterRemoveEmptyStringFromList(productsNameList)); + } + + /** + * Register condition of productsName. + * + * @param key Condition key. (NotNull) + * @param value The value of productsName. (Nullable) + */ + protected void registerProductsName(ConditionKey key, Object value) { + registerQuery(key, value, getCValueProductsName(), COL_PRODUCTS_NAME, J_ProductsName, UJ_productsName); + } + + /** + * Register inline condition of productsName. + * + * @param key Condition key. (NotNull) + * @param value The value of productsName. (Nullable) + */ + protected void registerInlineProductsName(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueProductsName(), COL_PRODUCTS_NAME, J_ProductsName, UJ_productsName); + } + + abstract protected ConditionValue getCValueProductsName(); + + /** Column db name of productsPrice. */ + protected static final String COL_PRODUCTS_PRICE = "PRODUCTS_PRICE"; + + /** Column java name of productsPrice. */ + protected static final String J_ProductsPrice = "ProductsPrice"; + + /** Column uncapitalised java name of productsPrice. */ + protected static final String UJ_productsPrice = "productsPrice"; + + /** + * Set the value of productsPrice using equal. { = } + * + * @param productsPrice The value of productsPrice as equal. + */ + public void setProductsPrice_Equal(java.math.BigDecimal productsPrice) { + registerProductsPrice(ConditionKey.CK_EQUAL, productsPrice); + } + + /** + * Set the value of productsPrice using notEqual. { != } + * + * @param productsPrice The value of productsPrice as notEqual. + */ + public void setProductsPrice_NotEqual(java.math.BigDecimal productsPrice) { + registerProductsPrice(ConditionKey.CK_NOT_EQUAL, productsPrice); + } + + /** + * Set the value of productsPrice using greaterThan. { > } + * + * @param productsPrice The value of productsPrice as greaterThan. + */ + public void setProductsPrice_GreaterThan(java.math.BigDecimal productsPrice) { + registerProductsPrice(ConditionKey.CK_GREATER_THAN, productsPrice); + } + + /** + * Set the value of productsPrice using lessThan. { < } + * + * @param productsPrice The value of productsPrice as lessThan. + */ + public void setProductsPrice_LessThan(java.math.BigDecimal productsPrice) { + registerProductsPrice(ConditionKey.CK_LESS_THAN, productsPrice); + } + + /** + * Set the value of productsPrice using greaterEqual. { >= } + * + * @param productsPrice The value of productsPrice as greaterEqual. + */ + public void setProductsPrice_GreaterEqual(java.math.BigDecimal productsPrice) { + registerProductsPrice(ConditionKey.CK_GREATER_EQUAL, productsPrice); + } + + /** + * Set the value of productsPrice using lessEqual. { <= } + * + * @param productsPrice The value of productsPrice as lessEqual. + */ + public void setProductsPrice_LessEqual(java.math.BigDecimal productsPrice) { + registerProductsPrice(ConditionKey.CK_LESS_EQUAL, productsPrice); + } + + /** + * Set the value of productsPrice using inScope. { in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param productsPriceList The value of productsPrice as inScope. + */ + public void setProductsPrice_InScope(java.util.List productsPriceList) { + registerProductsPrice(ConditionKey.CK_IN_SCOPE, productsPriceList); + } + + /** + * Set the value of productsPrice using notInScope. { not in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param productsPriceList The value of productsPrice as notInScope. + */ + public void setProductsPrice_NotInScope(java.util.List productsPriceList) { + registerProductsPrice(ConditionKey.CK_NOT_IN_SCOPE, productsPriceList); + } + + /** + * Register condition of productsPrice. + * + * @param key Condition key. (NotNull) + * @param value The value of productsPrice. (Nullable) + */ + protected void registerProductsPrice(ConditionKey key, Object value) { + registerQuery(key, value, getCValueProductsPrice(), COL_PRODUCTS_PRICE, J_ProductsPrice, UJ_productsPrice); + } + + /** + * Register inline condition of productsPrice. + * + * @param key Condition key. (NotNull) + * @param value The value of productsPrice. (Nullable) + */ + protected void registerInlineProductsPrice(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueProductsPrice(), COL_PRODUCTS_PRICE, J_ProductsPrice, UJ_productsPrice); + } + + abstract protected ConditionValue getCValueProductsPrice(); + + /** Column db name of finalPrice. */ + protected static final String COL_FINAL_PRICE = "FINAL_PRICE"; + + /** Column java name of finalPrice. */ + protected static final String J_FinalPrice = "FinalPrice"; + + /** Column uncapitalised java name of finalPrice. */ + protected static final String UJ_finalPrice = "finalPrice"; + + /** + * Set the value of finalPrice using equal. { = } + * + * @param finalPrice The value of finalPrice as equal. + */ + public void setFinalPrice_Equal(java.math.BigDecimal finalPrice) { + registerFinalPrice(ConditionKey.CK_EQUAL, finalPrice); + } + + /** + * Set the value of finalPrice using notEqual. { != } + * + * @param finalPrice The value of finalPrice as notEqual. + */ + public void setFinalPrice_NotEqual(java.math.BigDecimal finalPrice) { + registerFinalPrice(ConditionKey.CK_NOT_EQUAL, finalPrice); + } + + /** + * Set the value of finalPrice using greaterThan. { > } + * + * @param finalPrice The value of finalPrice as greaterThan. + */ + public void setFinalPrice_GreaterThan(java.math.BigDecimal finalPrice) { + registerFinalPrice(ConditionKey.CK_GREATER_THAN, finalPrice); + } + + /** + * Set the value of finalPrice using lessThan. { < } + * + * @param finalPrice The value of finalPrice as lessThan. + */ + public void setFinalPrice_LessThan(java.math.BigDecimal finalPrice) { + registerFinalPrice(ConditionKey.CK_LESS_THAN, finalPrice); + } + + /** + * Set the value of finalPrice using greaterEqual. { >= } + * + * @param finalPrice The value of finalPrice as greaterEqual. + */ + public void setFinalPrice_GreaterEqual(java.math.BigDecimal finalPrice) { + registerFinalPrice(ConditionKey.CK_GREATER_EQUAL, finalPrice); + } + + /** + * Set the value of finalPrice using lessEqual. { <= } + * + * @param finalPrice The value of finalPrice as lessEqual. + */ + public void setFinalPrice_LessEqual(java.math.BigDecimal finalPrice) { + registerFinalPrice(ConditionKey.CK_LESS_EQUAL, finalPrice); + } + + /** + * Set the value of finalPrice using inScope. { in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param finalPriceList The value of finalPrice as inScope. + */ + public void setFinalPrice_InScope(java.util.List finalPriceList) { + registerFinalPrice(ConditionKey.CK_IN_SCOPE, finalPriceList); + } + + /** + * Set the value of finalPrice using notInScope. { not in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param finalPriceList The value of finalPrice as notInScope. + */ + public void setFinalPrice_NotInScope(java.util.List finalPriceList) { + registerFinalPrice(ConditionKey.CK_NOT_IN_SCOPE, finalPriceList); + } + + /** + * Register condition of finalPrice. + * + * @param key Condition key. (NotNull) + * @param value The value of finalPrice. (Nullable) + */ + protected void registerFinalPrice(ConditionKey key, Object value) { + registerQuery(key, value, getCValueFinalPrice(), COL_FINAL_PRICE, J_FinalPrice, UJ_finalPrice); + } + + /** + * Register inline condition of finalPrice. + * + * @param key Condition key. (NotNull) + * @param value The value of finalPrice. (Nullable) + */ + protected void registerInlineFinalPrice(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueFinalPrice(), COL_FINAL_PRICE, J_FinalPrice, UJ_finalPrice); + } + + abstract protected ConditionValue getCValueFinalPrice(); + + /** Column db name of productsTax. */ + protected static final String COL_PRODUCTS_TAX = "PRODUCTS_TAX"; + + /** Column java name of productsTax. */ + protected static final String J_ProductsTax = "ProductsTax"; + + /** Column uncapitalised java name of productsTax. */ + protected static final String UJ_productsTax = "productsTax"; + + /** + * Set the value of productsTax using equal. { = } + * + * @param productsTax The value of productsTax as equal. + */ + public void setProductsTax_Equal(java.math.BigDecimal productsTax) { + registerProductsTax(ConditionKey.CK_EQUAL, productsTax); + } + + /** + * Set the value of productsTax using notEqual. { != } + * + * @param productsTax The value of productsTax as notEqual. + */ + public void setProductsTax_NotEqual(java.math.BigDecimal productsTax) { + registerProductsTax(ConditionKey.CK_NOT_EQUAL, productsTax); + } + + /** + * Set the value of productsTax using greaterThan. { > } + * + * @param productsTax The value of productsTax as greaterThan. + */ + public void setProductsTax_GreaterThan(java.math.BigDecimal productsTax) { + registerProductsTax(ConditionKey.CK_GREATER_THAN, productsTax); + } + + /** + * Set the value of productsTax using lessThan. { < } + * + * @param productsTax The value of productsTax as lessThan. + */ + public void setProductsTax_LessThan(java.math.BigDecimal productsTax) { + registerProductsTax(ConditionKey.CK_LESS_THAN, productsTax); + } + + /** + * Set the value of productsTax using greaterEqual. { >= } + * + * @param productsTax The value of productsTax as greaterEqual. + */ + public void setProductsTax_GreaterEqual(java.math.BigDecimal productsTax) { + registerProductsTax(ConditionKey.CK_GREATER_EQUAL, productsTax); + } + + /** + * Set the value of productsTax using lessEqual. { <= } + * + * @param productsTax The value of productsTax as lessEqual. + */ + public void setProductsTax_LessEqual(java.math.BigDecimal productsTax) { + registerProductsTax(ConditionKey.CK_LESS_EQUAL, productsTax); + } + + /** + * Set the value of productsTax using inScope. { in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param productsTaxList The value of productsTax as inScope. + */ + public void setProductsTax_InScope(java.util.List productsTaxList) { + registerProductsTax(ConditionKey.CK_IN_SCOPE, productsTaxList); + } + + /** + * Set the value of productsTax using notInScope. { not in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param productsTaxList The value of productsTax as notInScope. + */ + public void setProductsTax_NotInScope(java.util.List productsTaxList) { + registerProductsTax(ConditionKey.CK_NOT_IN_SCOPE, productsTaxList); + } + + /** + * Register condition of productsTax. + * + * @param key Condition key. (NotNull) + * @param value The value of productsTax. (Nullable) + */ + protected void registerProductsTax(ConditionKey key, Object value) { + registerQuery(key, value, getCValueProductsTax(), COL_PRODUCTS_TAX, J_ProductsTax, UJ_productsTax); + } + + /** + * Register inline condition of productsTax. + * + * @param key Condition key. (NotNull) + * @param value The value of productsTax. (Nullable) + */ + protected void registerInlineProductsTax(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueProductsTax(), COL_PRODUCTS_TAX, J_ProductsTax, UJ_productsTax); + } + + abstract protected ConditionValue getCValueProductsTax(); + + /** Column db name of productsQuantity. */ + protected static final String COL_PRODUCTS_QUANTITY = "PRODUCTS_QUANTITY"; + + /** Column java name of productsQuantity. */ + protected static final String J_ProductsQuantity = "ProductsQuantity"; + + /** Column uncapitalised java name of productsQuantity. */ + protected static final String UJ_productsQuantity = "productsQuantity"; + + /** + * Set the value of productsQuantity using equal. { = } + * + * @param productsQuantity The value of productsQuantity as equal. + */ + public void setProductsQuantity_Equal(java.math.BigDecimal productsQuantity) { + registerProductsQuantity(ConditionKey.CK_EQUAL, productsQuantity); + } + + /** + * Set the value of productsQuantity using notEqual. { != } + * + * @param productsQuantity The value of productsQuantity as notEqual. + */ + public void setProductsQuantity_NotEqual(java.math.BigDecimal productsQuantity) { + registerProductsQuantity(ConditionKey.CK_NOT_EQUAL, productsQuantity); + } + + /** + * Set the value of productsQuantity using greaterThan. { > } + * + * @param productsQuantity The value of productsQuantity as greaterThan. + */ + public void setProductsQuantity_GreaterThan(java.math.BigDecimal productsQuantity) { + registerProductsQuantity(ConditionKey.CK_GREATER_THAN, productsQuantity); + } + + /** + * Set the value of productsQuantity using lessThan. { < } + * + * @param productsQuantity The value of productsQuantity as lessThan. + */ + public void setProductsQuantity_LessThan(java.math.BigDecimal productsQuantity) { + registerProductsQuantity(ConditionKey.CK_LESS_THAN, productsQuantity); + } + + /** + * Set the value of productsQuantity using greaterEqual. { >= } + * + * @param productsQuantity The value of productsQuantity as greaterEqual. + */ + public void setProductsQuantity_GreaterEqual(java.math.BigDecimal productsQuantity) { + registerProductsQuantity(ConditionKey.CK_GREATER_EQUAL, productsQuantity); + } + + /** + * Set the value of productsQuantity using lessEqual. { <= } + * + * @param productsQuantity The value of productsQuantity as lessEqual. + */ + public void setProductsQuantity_LessEqual(java.math.BigDecimal productsQuantity) { + registerProductsQuantity(ConditionKey.CK_LESS_EQUAL, productsQuantity); + } + + /** + * Set the value of productsQuantity using inScope. { in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param productsQuantityList The value of productsQuantity as inScope. + */ + public void setProductsQuantity_InScope(java.util.List productsQuantityList) { + registerProductsQuantity(ConditionKey.CK_IN_SCOPE, productsQuantityList); + } + + /** + * Set the value of productsQuantity using notInScope. { not in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param productsQuantityList The value of productsQuantity as notInScope. + */ + public void setProductsQuantity_NotInScope(java.util.List productsQuantityList) { + registerProductsQuantity(ConditionKey.CK_NOT_IN_SCOPE, productsQuantityList); + } + + /** + * Register condition of productsQuantity. + * + * @param key Condition key. (NotNull) + * @param value The value of productsQuantity. (Nullable) + */ + protected void registerProductsQuantity(ConditionKey key, Object value) { + registerQuery(key, value, getCValueProductsQuantity(), COL_PRODUCTS_QUANTITY, J_ProductsQuantity, UJ_productsQuantity); + } + + /** + * Register inline condition of productsQuantity. + * + * @param key Condition key. (NotNull) + * @param value The value of productsQuantity. (Nullable) + */ + protected void registerInlineProductsQuantity(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueProductsQuantity(), COL_PRODUCTS_QUANTITY, J_ProductsQuantity, UJ_productsQuantity); + } + + abstract protected ConditionValue getCValueProductsQuantity(); + + // =================================================================================== + // Basic Override + // ============== + /** + * This method overrides the method that is declared at super. + * + * @return Clause string. (NotNull) + */ + public String toString() { + return getSqlClause().getClause(); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/AbstractBsOrdersProductsDownloadCQ.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/AbstractBsOrdersProductsDownloadCQ.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/AbstractBsOrdersProductsDownloadCQ.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,734 @@ + +package jp.sf.pal.pompei.cbean.cq.bs; + + + +import jp.sf.pal.pompei.allcommon.cbean.*; +import jp.sf.pal.pompei.allcommon.cbean.ckey.*; +import jp.sf.pal.pompei.allcommon.cbean.cvalue.ConditionValue; +import jp.sf.pal.pompei.allcommon.cbean.sqlclause.SqlClause; +import jp.sf.pal.pompei.cbean.cq.*; + +/** + * The condition-query of ORDERS_PRODUCTS_DOWNLOAD. + * + * @author DBFlute(AutoGenerator) + */ +public abstract class AbstractBsOrdersProductsDownloadCQ extends AbstractConditionQuery { + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param childQuery Child query as abstract class. (Nullable: If null, this is base instance.) + * @param sqlClause SQL clause instance. (NotNull) + * @param aliasName My alias name. (NotNull) + * @param nestLevel Nest level. + */ + public AbstractBsOrdersProductsDownloadCQ(ConditionQuery childQuery, SqlClause sqlClause, String aliasName, int nestLevel) { + super(childQuery, sqlClause, aliasName, nestLevel); + } + + // =================================================================================== + // Table Name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + final public String getTableDbName() { + return "ORDERS_PRODUCTS_DOWNLOAD"; + } + + // =================================================================================== + // Query + // ===== + + // /* * * * * * * * * * * * * * * * * * * * * * * + // MyTable = [ORDERS_PRODUCTS_DOWNLOAD] + // * * * * * * * * */ + + + /** Column db name of ordersProductsDownloadId. */ + protected static final String COL_ORDERS_PRODUCTS_DOWNLOAD_ID = "ORDERS_PRODUCTS_DOWNLOAD_ID"; + + /** Column java name of ordersProductsDownloadId. */ + protected static final String J_OrdersProductsDownloadId = "OrdersProductsDownloadId"; + + /** Column uncapitalised java name of ordersProductsDownloadId. */ + protected static final String UJ_ordersProductsDownloadId = "ordersProductsDownloadId"; + + /** + * Set the value of ordersProductsDownloadId using equal. { = } + * + * @param ordersProductsDownloadId The value of ordersProductsDownloadId as equal. + */ + public void setOrdersProductsDownloadId_Equal(java.math.BigDecimal ordersProductsDownloadId) { + registerOrdersProductsDownloadId(ConditionKey.CK_EQUAL, ordersProductsDownloadId); + } + + /** + * Set the value of ordersProductsDownloadId using notEqual. { != } + * + * @param ordersProductsDownloadId The value of ordersProductsDownloadId as notEqual. + */ + public void setOrdersProductsDownloadId_NotEqual(java.math.BigDecimal ordersProductsDownloadId) { + registerOrdersProductsDownloadId(ConditionKey.CK_NOT_EQUAL, ordersProductsDownloadId); + } + + /** + * Set the value of ordersProductsDownloadId using greaterThan. { > } + * + * @param ordersProductsDownloadId The value of ordersProductsDownloadId as greaterThan. + */ + public void setOrdersProductsDownloadId_GreaterThan(java.math.BigDecimal ordersProductsDownloadId) { + registerOrdersProductsDownloadId(ConditionKey.CK_GREATER_THAN, ordersProductsDownloadId); + } + + /** + * Set the value of ordersProductsDownloadId using lessThan. { < } + * + * @param ordersProductsDownloadId The value of ordersProductsDownloadId as lessThan. + */ + public void setOrdersProductsDownloadId_LessThan(java.math.BigDecimal ordersProductsDownloadId) { + registerOrdersProductsDownloadId(ConditionKey.CK_LESS_THAN, ordersProductsDownloadId); + } + + /** + * Set the value of ordersProductsDownloadId using greaterEqual. { >= } + * + * @param ordersProductsDownloadId The value of ordersProductsDownloadId as greaterEqual. + */ + public void setOrdersProductsDownloadId_GreaterEqual(java.math.BigDecimal ordersProductsDownloadId) { + registerOrdersProductsDownloadId(ConditionKey.CK_GREATER_EQUAL, ordersProductsDownloadId); + } + + /** + * Set the value of ordersProductsDownloadId using lessEqual. { <= } + * + * @param ordersProductsDownloadId The value of ordersProductsDownloadId as lessEqual. + */ + public void setOrdersProductsDownloadId_LessEqual(java.math.BigDecimal ordersProductsDownloadId) { + registerOrdersProductsDownloadId(ConditionKey.CK_LESS_EQUAL, ordersProductsDownloadId); + } + + /** + * Set the value of ordersProductsDownloadId using inScope. { in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param ordersProductsDownloadIdList The value of ordersProductsDownloadId as inScope. + */ + public void setOrdersProductsDownloadId_InScope(java.util.List ordersProductsDownloadIdList) { + registerOrdersProductsDownloadId(ConditionKey.CK_IN_SCOPE, ordersProductsDownloadIdList); + } + + /** + * Set the value of ordersProductsDownloadId using notInScope. { not in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param ordersProductsDownloadIdList The value of ordersProductsDownloadId as notInScope. + */ + public void setOrdersProductsDownloadId_NotInScope(java.util.List ordersProductsDownloadIdList) { + registerOrdersProductsDownloadId(ConditionKey.CK_NOT_IN_SCOPE, ordersProductsDownloadIdList); + } + + /** + * Register condition of ordersProductsDownloadId. + * + * @param key Condition key. (NotNull) + * @param value The value of ordersProductsDownloadId. (Nullable) + */ + protected void registerOrdersProductsDownloadId(ConditionKey key, Object value) { + registerQuery(key, value, getCValueOrdersProductsDownloadId(), COL_ORDERS_PRODUCTS_DOWNLOAD_ID, J_OrdersProductsDownloadId, UJ_ordersProductsDownloadId); + } + + /** + * Register inline condition of ordersProductsDownloadId. + * + * @param key Condition key. (NotNull) + * @param value The value of ordersProductsDownloadId. (Nullable) + */ + protected void registerInlineOrdersProductsDownloadId(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueOrdersProductsDownloadId(), COL_ORDERS_PRODUCTS_DOWNLOAD_ID, J_OrdersProductsDownloadId, UJ_ordersProductsDownloadId); + } + + abstract protected ConditionValue getCValueOrdersProductsDownloadId(); + + /** Column db name of ordersId. */ + protected static final String COL_ORDERS_ID = "ORDERS_ID"; + + /** Column java name of ordersId. */ + protected static final String J_OrdersId = "OrdersId"; + + /** Column uncapitalised java name of ordersId. */ + protected static final String UJ_ordersId = "ordersId"; + + /** + * Set the value of ordersId using equal. { = } + * + * @param ordersId The value of ordersId as equal. + */ + public void setOrdersId_Equal(java.math.BigDecimal ordersId) { + registerOrdersId(ConditionKey.CK_EQUAL, ordersId); + } + + /** + * Set the value of ordersId using notEqual. { != } + * + * @param ordersId The value of ordersId as notEqual. + */ + public void setOrdersId_NotEqual(java.math.BigDecimal ordersId) { + registerOrdersId(ConditionKey.CK_NOT_EQUAL, ordersId); + } + + /** + * Set the value of ordersId using greaterThan. { > } + * + * @param ordersId The value of ordersId as greaterThan. + */ + public void setOrdersId_GreaterThan(java.math.BigDecimal ordersId) { + registerOrdersId(ConditionKey.CK_GREATER_THAN, ordersId); + } + + /** + * Set the value of ordersId using lessThan. { < } + * + * @param ordersId The value of ordersId as lessThan. + */ + public void setOrdersId_LessThan(java.math.BigDecimal ordersId) { + registerOrdersId(ConditionKey.CK_LESS_THAN, ordersId); + } + + /** + * Set the value of ordersId using greaterEqual. { >= } + * + * @param ordersId The value of ordersId as greaterEqual. + */ + public void setOrdersId_GreaterEqual(java.math.BigDecimal ordersId) { + registerOrdersId(ConditionKey.CK_GREATER_EQUAL, ordersId); + } + + /** + * Set the value of ordersId using lessEqual. { <= } + * + * @param ordersId The value of ordersId as lessEqual. + */ + public void setOrdersId_LessEqual(java.math.BigDecimal ordersId) { + registerOrdersId(ConditionKey.CK_LESS_EQUAL, ordersId); + } + + /** + * Set the value of ordersId using inScope. { in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param ordersIdList The value of ordersId as inScope. + */ + public void setOrdersId_InScope(java.util.List ordersIdList) { + registerOrdersId(ConditionKey.CK_IN_SCOPE, ordersIdList); + } + + /** + * Set the value of ordersId using notInScope. { not in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param ordersIdList The value of ordersId as notInScope. + */ + public void setOrdersId_NotInScope(java.util.List ordersIdList) { + registerOrdersId(ConditionKey.CK_NOT_IN_SCOPE, ordersIdList); + } + + /** + * Register condition of ordersId. + * + * @param key Condition key. (NotNull) + * @param value The value of ordersId. (Nullable) + */ + protected void registerOrdersId(ConditionKey key, Object value) { + registerQuery(key, value, getCValueOrdersId(), COL_ORDERS_ID, J_OrdersId, UJ_ordersId); + } + + /** + * Register inline condition of ordersId. + * + * @param key Condition key. (NotNull) + * @param value The value of ordersId. (Nullable) + */ + protected void registerInlineOrdersId(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueOrdersId(), COL_ORDERS_ID, J_OrdersId, UJ_ordersId); + } + + abstract protected ConditionValue getCValueOrdersId(); + + /** Column db name of ordersProductsId. */ + protected static final String COL_ORDERS_PRODUCTS_ID = "ORDERS_PRODUCTS_ID"; + + /** Column java name of ordersProductsId. */ + protected static final String J_OrdersProductsId = "OrdersProductsId"; + + /** Column uncapitalised java name of ordersProductsId. */ + protected static final String UJ_ordersProductsId = "ordersProductsId"; + + /** + * Set the value of ordersProductsId using equal. { = } + * + * @param ordersProductsId The value of ordersProductsId as equal. + */ + public void setOrdersProductsId_Equal(java.math.BigDecimal ordersProductsId) { + registerOrdersProductsId(ConditionKey.CK_EQUAL, ordersProductsId); + } + + /** + * Set the value of ordersProductsId using notEqual. { != } + * + * @param ordersProductsId The value of ordersProductsId as notEqual. + */ + public void setOrdersProductsId_NotEqual(java.math.BigDecimal ordersProductsId) { + registerOrdersProductsId(ConditionKey.CK_NOT_EQUAL, ordersProductsId); + } + + /** + * Set the value of ordersProductsId using greaterThan. { > } + * + * @param ordersProductsId The value of ordersProductsId as greaterThan. + */ + public void setOrdersProductsId_GreaterThan(java.math.BigDecimal ordersProductsId) { + registerOrdersProductsId(ConditionKey.CK_GREATER_THAN, ordersProductsId); + } + + /** + * Set the value of ordersProductsId using lessThan. { < } + * + * @param ordersProductsId The value of ordersProductsId as lessThan. + */ + public void setOrdersProductsId_LessThan(java.math.BigDecimal ordersProductsId) { + registerOrdersProductsId(ConditionKey.CK_LESS_THAN, ordersProductsId); + } + + /** + * Set the value of ordersProductsId using greaterEqual. { >= } + * + * @param ordersProductsId The value of ordersProductsId as greaterEqual. + */ + public void setOrdersProductsId_GreaterEqual(java.math.BigDecimal ordersProductsId) { + registerOrdersProductsId(ConditionKey.CK_GREATER_EQUAL, ordersProductsId); + } + + /** + * Set the value of ordersProductsId using lessEqual. { <= } + * + * @param ordersProductsId The value of ordersProductsId as lessEqual. + */ + public void setOrdersProductsId_LessEqual(java.math.BigDecimal ordersProductsId) { + registerOrdersProductsId(ConditionKey.CK_LESS_EQUAL, ordersProductsId); + } + + /** + * Set the value of ordersProductsId using inScope. { in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param ordersProductsIdList The value of ordersProductsId as inScope. + */ + public void setOrdersProductsId_InScope(java.util.List ordersProductsIdList) { + registerOrdersProductsId(ConditionKey.CK_IN_SCOPE, ordersProductsIdList); + } + + /** + * Set the value of ordersProductsId using notInScope. { not in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param ordersProductsIdList The value of ordersProductsId as notInScope. + */ + public void setOrdersProductsId_NotInScope(java.util.List ordersProductsIdList) { + registerOrdersProductsId(ConditionKey.CK_NOT_IN_SCOPE, ordersProductsIdList); + } + + /** + * Register condition of ordersProductsId. + * + * @param key Condition key. (NotNull) + * @param value The value of ordersProductsId. (Nullable) + */ + protected void registerOrdersProductsId(ConditionKey key, Object value) { + registerQuery(key, value, getCValueOrdersProductsId(), COL_ORDERS_PRODUCTS_ID, J_OrdersProductsId, UJ_ordersProductsId); + } + + /** + * Register inline condition of ordersProductsId. + * + * @param key Condition key. (NotNull) + * @param value The value of ordersProductsId. (Nullable) + */ + protected void registerInlineOrdersProductsId(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueOrdersProductsId(), COL_ORDERS_PRODUCTS_ID, J_OrdersProductsId, UJ_ordersProductsId); + } + + abstract protected ConditionValue getCValueOrdersProductsId(); + + /** Column db name of ordersProductsFilename. */ + protected static final String COL_ORDERS_PRODUCTS_FILENAME = "ORDERS_PRODUCTS_FILENAME"; + + /** Column java name of ordersProductsFilename. */ + protected static final String J_OrdersProductsFilename = "OrdersProductsFilename"; + + /** Column uncapitalised java name of ordersProductsFilename. */ + protected static final String UJ_ordersProductsFilename = "ordersProductsFilename"; + + /** + * Set the value of ordersProductsFilename using equal. { = } + * If the value is null or empty-string, this condition is ignored. + * + * @param ordersProductsFilename The value of ordersProductsFilename as equal. + */ + public void setOrdersProductsFilename_Equal(String ordersProductsFilename) { + registerOrdersProductsFilename(ConditionKey.CK_EQUAL, filterRemoveEmptyString(ordersProductsFilename)); + } + + /** + * Set the value of ordersProductsFilename using notEqual. { != } + * If the value is null or empty-string, this condition is ignored. + * + * @param ordersProductsFilename The value of ordersProductsFilename as notEqual. + */ + public void setOrdersProductsFilename_NotEqual(String ordersProductsFilename) { + registerOrdersProductsFilename(ConditionKey.CK_NOT_EQUAL, filterRemoveEmptyString(ordersProductsFilename)); + } + + /** + * Set the value of ordersProductsFilename using greaterThan. { > } + * If the value is null or empty-string, this condition is ignored. + * + * @param ordersProductsFilename The value of ordersProductsFilename as greaterThan. + */ + public void setOrdersProductsFilename_GreaterThan(String ordersProductsFilename) { + registerOrdersProductsFilename(ConditionKey.CK_GREATER_THAN, filterRemoveEmptyString(ordersProductsFilename)); + } + + /** + * Set the value of ordersProductsFilename using lessThan. { < } + * If the value is null or empty-string, this condition is ignored. + * + * @param ordersProductsFilename The value of ordersProductsFilename as lessThan. + */ + public void setOrdersProductsFilename_LessThan(String ordersProductsFilename) { + registerOrdersProductsFilename(ConditionKey.CK_LESS_THAN, filterRemoveEmptyString(ordersProductsFilename)); + } + + /** + * Set the value of ordersProductsFilename using greaterEqual. { >= } + * If the value is null or empty-string, this condition is ignored. + * + * @param ordersProductsFilename The value of ordersProductsFilename as greaterEqual. + */ + public void setOrdersProductsFilename_GreaterEqual(String ordersProductsFilename) { + registerOrdersProductsFilename(ConditionKey.CK_GREATER_EQUAL, filterRemoveEmptyString(ordersProductsFilename)); + } + + /** + * Set the value of ordersProductsFilename using lessEqual. { <= } + * If the value is null or empty-string, this condition is ignored. + * + * @param ordersProductsFilename The value of ordersProductsFilename as lessEqual. + */ + public void setOrdersProductsFilename_LessEqual(String ordersProductsFilename) { + registerOrdersProductsFilename(ConditionKey.CK_LESS_EQUAL, filterRemoveEmptyString(ordersProductsFilename)); + } + + /** + * Set the value of ordersProductsFilename using prefixSearch. { like 'xxx%' } + * If the value is null or empty-string, this condition is ignored. + * + * @param ordersProductsFilename The value of ordersProductsFilename as prefixSearch. + */ + public void setOrdersProductsFilename_PrefixSearch(String ordersProductsFilename) { + registerOrdersProductsFilename(ConditionKey.CK_PREFIX_SEARCH, filterRemoveEmptyString(ordersProductsFilename)); + } + + /** + * Set the value of ordersProductsFilename using likeSearch. { like '%xxx%' } + * If the value is null or empty-string, this condition is ignored. + * You can invoke this method several times and the conditions are set up. + * + * @param ordersProductsFilename The value of ordersProductsFilename as likeSearch. + * @param likeSearchOption Like search option. (NotNull) + */ + public void setOrdersProductsFilename_LikeSearch(String ordersProductsFilename, jp.sf.pal.pompei.allcommon.cbean.coption.LikeSearchOption likeSearchOption) { + registerLikeSearchQuery(ConditionKey.CK_LIKE_SEARCH, filterRemoveEmptyString(ordersProductsFilename), getCValueOrdersProductsFilename(), COL_ORDERS_PRODUCTS_FILENAME, J_OrdersProductsFilename, UJ_ordersProductsFilename, likeSearchOption); + } + + /** + * Set the value of ordersProductsFilename using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param ordersProductsFilenameList The value of ordersProductsFilename as inScope. + */ + public void setOrdersProductsFilename_InScope(java.util.List ordersProductsFilenameList) { + registerOrdersProductsFilename(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyStringFromList(ordersProductsFilenameList)); + } + + /** + * Set the value of ordersProductsFilename using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param ordersProductsFilename The value of ordersProductsFilename as inScope. + */ + public void setOrdersProductsFilename_InScope(String ordersProductsFilename, jp.sf.pal.pompei.allcommon.cbean.coption.InScopeOption option) { + registerInScopeQuery(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyString(ordersProductsFilename), getCValueOrdersProductsFilename(), COL_ORDERS_PRODUCTS_FILENAME, J_OrdersProductsFilename, UJ_ordersProductsFilename, option); + } + + /** + * Set the value of ordersProductsFilename using notInScope. { not in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param ordersProductsFilenameList The value of ordersProductsFilename as notInScope. + */ + public void setOrdersProductsFilename_NotInScope(java.util.List ordersProductsFilenameList) { + registerOrdersProductsFilename(ConditionKey.CK_NOT_IN_SCOPE, filterRemoveEmptyStringFromList(ordersProductsFilenameList)); + } + + /** + * Register condition of ordersProductsFilename. + * + * @param key Condition key. (NotNull) + * @param value The value of ordersProductsFilename. (Nullable) + */ + protected void registerOrdersProductsFilename(ConditionKey key, Object value) { + registerQuery(key, value, getCValueOrdersProductsFilename(), COL_ORDERS_PRODUCTS_FILENAME, J_OrdersProductsFilename, UJ_ordersProductsFilename); + } + + /** + * Register inline condition of ordersProductsFilename. + * + * @param key Condition key. (NotNull) + * @param value The value of ordersProductsFilename. (Nullable) + */ + protected void registerInlineOrdersProductsFilename(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueOrdersProductsFilename(), COL_ORDERS_PRODUCTS_FILENAME, J_OrdersProductsFilename, UJ_ordersProductsFilename); + } + + abstract protected ConditionValue getCValueOrdersProductsFilename(); + + /** Column db name of downloadMaxdays. */ + protected static final String COL_DOWNLOAD_MAXDAYS = "DOWNLOAD_MAXDAYS"; + + /** Column java name of downloadMaxdays. */ + protected static final String J_DownloadMaxdays = "DownloadMaxdays"; + + /** Column uncapitalised java name of downloadMaxdays. */ + protected static final String UJ_downloadMaxdays = "downloadMaxdays"; + + /** + * Set the value of downloadMaxdays using equal. { = } + * + * @param downloadMaxdays The value of downloadMaxdays as equal. + */ + public void setDownloadMaxdays_Equal(java.math.BigDecimal downloadMaxdays) { + registerDownloadMaxdays(ConditionKey.CK_EQUAL, downloadMaxdays); + } + + /** + * Set the value of downloadMaxdays using notEqual. { != } + * + * @param downloadMaxdays The value of downloadMaxdays as notEqual. + */ + public void setDownloadMaxdays_NotEqual(java.math.BigDecimal downloadMaxdays) { + registerDownloadMaxdays(ConditionKey.CK_NOT_EQUAL, downloadMaxdays); + } + + /** + * Set the value of downloadMaxdays using greaterThan. { > } + * + * @param downloadMaxdays The value of downloadMaxdays as greaterThan. + */ + public void setDownloadMaxdays_GreaterThan(java.math.BigDecimal downloadMaxdays) { + registerDownloadMaxdays(ConditionKey.CK_GREATER_THAN, downloadMaxdays); + } + + /** + * Set the value of downloadMaxdays using lessThan. { < } + * + * @param downloadMaxdays The value of downloadMaxdays as lessThan. + */ + public void setDownloadMaxdays_LessThan(java.math.BigDecimal downloadMaxdays) { + registerDownloadMaxdays(ConditionKey.CK_LESS_THAN, downloadMaxdays); + } + + /** + * Set the value of downloadMaxdays using greaterEqual. { >= } + * + * @param downloadMaxdays The value of downloadMaxdays as greaterEqual. + */ + public void setDownloadMaxdays_GreaterEqual(java.math.BigDecimal downloadMaxdays) { + registerDownloadMaxdays(ConditionKey.CK_GREATER_EQUAL, downloadMaxdays); + } + + /** + * Set the value of downloadMaxdays using lessEqual. { <= } + * + * @param downloadMaxdays The value of downloadMaxdays as lessEqual. + */ + public void setDownloadMaxdays_LessEqual(java.math.BigDecimal downloadMaxdays) { + registerDownloadMaxdays(ConditionKey.CK_LESS_EQUAL, downloadMaxdays); + } + + /** + * Set the value of downloadMaxdays using inScope. { in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param downloadMaxdaysList The value of downloadMaxdays as inScope. + */ + public void setDownloadMaxdays_InScope(java.util.List downloadMaxdaysList) { + registerDownloadMaxdays(ConditionKey.CK_IN_SCOPE, downloadMaxdaysList); + } + + /** + * Set the value of downloadMaxdays using notInScope. { not in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param downloadMaxdaysList The value of downloadMaxdays as notInScope. + */ + public void setDownloadMaxdays_NotInScope(java.util.List downloadMaxdaysList) { + registerDownloadMaxdays(ConditionKey.CK_NOT_IN_SCOPE, downloadMaxdaysList); + } + + /** + * Register condition of downloadMaxdays. + * + * @param key Condition key. (NotNull) + * @param value The value of downloadMaxdays. (Nullable) + */ + protected void registerDownloadMaxdays(ConditionKey key, Object value) { + registerQuery(key, value, getCValueDownloadMaxdays(), COL_DOWNLOAD_MAXDAYS, J_DownloadMaxdays, UJ_downloadMaxdays); + } + + /** + * Register inline condition of downloadMaxdays. + * + * @param key Condition key. (NotNull) + * @param value The value of downloadMaxdays. (Nullable) + */ + protected void registerInlineDownloadMaxdays(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueDownloadMaxdays(), COL_DOWNLOAD_MAXDAYS, J_DownloadMaxdays, UJ_downloadMaxdays); + } + + abstract protected ConditionValue getCValueDownloadMaxdays(); + + /** Column db name of downloadCount. */ + protected static final String COL_DOWNLOAD_COUNT = "DOWNLOAD_COUNT"; + + /** Column java name of downloadCount. */ + protected static final String J_DownloadCount = "DownloadCount"; + + /** Column uncapitalised java name of downloadCount. */ + protected static final String UJ_downloadCount = "downloadCount"; + + /** + * Set the value of downloadCount using equal. { = } + * + * @param downloadCount The value of downloadCount as equal. + */ + public void setDownloadCount_Equal(java.math.BigDecimal downloadCount) { + registerDownloadCount(ConditionKey.CK_EQUAL, downloadCount); + } + + /** + * Set the value of downloadCount using notEqual. { != } + * + * @param downloadCount The value of downloadCount as notEqual. + */ + public void setDownloadCount_NotEqual(java.math.BigDecimal downloadCount) { + registerDownloadCount(ConditionKey.CK_NOT_EQUAL, downloadCount); + } + + /** + * Set the value of downloadCount using greaterThan. { > } + * + * @param downloadCount The value of downloadCount as greaterThan. + */ + public void setDownloadCount_GreaterThan(java.math.BigDecimal downloadCount) { + registerDownloadCount(ConditionKey.CK_GREATER_THAN, downloadCount); + } + + /** + * Set the value of downloadCount using lessThan. { < } + * + * @param downloadCount The value of downloadCount as lessThan. + */ + public void setDownloadCount_LessThan(java.math.BigDecimal downloadCount) { + registerDownloadCount(ConditionKey.CK_LESS_THAN, downloadCount); + } + + /** + * Set the value of downloadCount using greaterEqual. { >= } + * + * @param downloadCount The value of downloadCount as greaterEqual. + */ + public void setDownloadCount_GreaterEqual(java.math.BigDecimal downloadCount) { + registerDownloadCount(ConditionKey.CK_GREATER_EQUAL, downloadCount); + } + + /** + * Set the value of downloadCount using lessEqual. { <= } + * + * @param downloadCount The value of downloadCount as lessEqual. + */ + public void setDownloadCount_LessEqual(java.math.BigDecimal downloadCount) { + registerDownloadCount(ConditionKey.CK_LESS_EQUAL, downloadCount); + } + + /** + * Set the value of downloadCount using inScope. { in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param downloadCountList The value of downloadCount as inScope. + */ + public void setDownloadCount_InScope(java.util.List downloadCountList) { + registerDownloadCount(ConditionKey.CK_IN_SCOPE, downloadCountList); + } + + /** + * Set the value of downloadCount using notInScope. { not in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param downloadCountList The value of downloadCount as notInScope. + */ + public void setDownloadCount_NotInScope(java.util.List downloadCountList) { + registerDownloadCount(ConditionKey.CK_NOT_IN_SCOPE, downloadCountList); + } + + /** + * Register condition of downloadCount. + * + * @param key Condition key. (NotNull) + * @param value The value of downloadCount. (Nullable) + */ + protected void registerDownloadCount(ConditionKey key, Object value) { + registerQuery(key, value, getCValueDownloadCount(), COL_DOWNLOAD_COUNT, J_DownloadCount, UJ_downloadCount); + } + + /** + * Register inline condition of downloadCount. + * + * @param key Condition key. (NotNull) + * @param value The value of downloadCount. (Nullable) + */ + protected void registerInlineDownloadCount(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueDownloadCount(), COL_DOWNLOAD_COUNT, J_DownloadCount, UJ_downloadCount); + } + + abstract protected ConditionValue getCValueDownloadCount(); + + // =================================================================================== + // Basic Override + // ============== + /** + * This method overrides the method that is declared at super. + * + * @return Clause string. (NotNull) + */ + public String toString() { + return getSqlClause().getClause(); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/AbstractBsOrdersStatusCQ.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/AbstractBsOrdersStatusCQ.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/AbstractBsOrdersStatusCQ.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,419 @@ + +package jp.sf.pal.pompei.cbean.cq.bs; + + + +import jp.sf.pal.pompei.allcommon.cbean.*; +import jp.sf.pal.pompei.allcommon.cbean.ckey.*; +import jp.sf.pal.pompei.allcommon.cbean.cvalue.ConditionValue; +import jp.sf.pal.pompei.allcommon.cbean.sqlclause.SqlClause; +import jp.sf.pal.pompei.cbean.cq.*; + +/** + * The condition-query of ORDERS_STATUS. + * + * @author DBFlute(AutoGenerator) + */ +public abstract class AbstractBsOrdersStatusCQ extends AbstractConditionQuery { + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param childQuery Child query as abstract class. (Nullable: If null, this is base instance.) + * @param sqlClause SQL clause instance. (NotNull) + * @param aliasName My alias name. (NotNull) + * @param nestLevel Nest level. + */ + public AbstractBsOrdersStatusCQ(ConditionQuery childQuery, SqlClause sqlClause, String aliasName, int nestLevel) { + super(childQuery, sqlClause, aliasName, nestLevel); + } + + // =================================================================================== + // Table Name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + final public String getTableDbName() { + return "ORDERS_STATUS"; + } + + // =================================================================================== + // Query + // ===== + + // /* * * * * * * * * * * * * * * * * * * * * * * + // MyTable = [ORDERS_STATUS] + // * * * * * * * * */ + + + /** Column db name of ordersStatusId. */ + protected static final String COL_ORDERS_STATUS_ID = "ORDERS_STATUS_ID"; + + /** Column java name of ordersStatusId. */ + protected static final String J_OrdersStatusId = "OrdersStatusId"; + + /** Column uncapitalised java name of ordersStatusId. */ + protected static final String UJ_ordersStatusId = "ordersStatusId"; + + /** + * Set the value of ordersStatusId using equal. { = } + * + * @param ordersStatusId The value of ordersStatusId as equal. + */ + public void setOrdersStatusId_Equal(java.math.BigDecimal ordersStatusId) { + registerOrdersStatusId(ConditionKey.CK_EQUAL, ordersStatusId); + } + + /** + * Set the value of ordersStatusId using notEqual. { != } + * + * @param ordersStatusId The value of ordersStatusId as notEqual. + */ + public void setOrdersStatusId_NotEqual(java.math.BigDecimal ordersStatusId) { + registerOrdersStatusId(ConditionKey.CK_NOT_EQUAL, ordersStatusId); + } + + /** + * Set the value of ordersStatusId using greaterThan. { > } + * + * @param ordersStatusId The value of ordersStatusId as greaterThan. + */ + public void setOrdersStatusId_GreaterThan(java.math.BigDecimal ordersStatusId) { + registerOrdersStatusId(ConditionKey.CK_GREATER_THAN, ordersStatusId); + } + + /** + * Set the value of ordersStatusId using lessThan. { < } + * + * @param ordersStatusId The value of ordersStatusId as lessThan. + */ + public void setOrdersStatusId_LessThan(java.math.BigDecimal ordersStatusId) { + registerOrdersStatusId(ConditionKey.CK_LESS_THAN, ordersStatusId); + } + + /** + * Set the value of ordersStatusId using greaterEqual. { >= } + * + * @param ordersStatusId The value of ordersStatusId as greaterEqual. + */ + public void setOrdersStatusId_GreaterEqual(java.math.BigDecimal ordersStatusId) { + registerOrdersStatusId(ConditionKey.CK_GREATER_EQUAL, ordersStatusId); + } + + /** + * Set the value of ordersStatusId using lessEqual. { <= } + * + * @param ordersStatusId The value of ordersStatusId as lessEqual. + */ + public void setOrdersStatusId_LessEqual(java.math.BigDecimal ordersStatusId) { + registerOrdersStatusId(ConditionKey.CK_LESS_EQUAL, ordersStatusId); + } + + /** + * Set the value of ordersStatusId using inScope. { in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param ordersStatusIdList The value of ordersStatusId as inScope. + */ + public void setOrdersStatusId_InScope(java.util.List ordersStatusIdList) { + registerOrdersStatusId(ConditionKey.CK_IN_SCOPE, ordersStatusIdList); + } + + /** + * Set the value of ordersStatusId using notInScope. { not in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param ordersStatusIdList The value of ordersStatusId as notInScope. + */ + public void setOrdersStatusId_NotInScope(java.util.List ordersStatusIdList) { + registerOrdersStatusId(ConditionKey.CK_NOT_IN_SCOPE, ordersStatusIdList); + } + + /** + * Register condition of ordersStatusId. + * + * @param key Condition key. (NotNull) + * @param value The value of ordersStatusId. (Nullable) + */ + protected void registerOrdersStatusId(ConditionKey key, Object value) { + registerQuery(key, value, getCValueOrdersStatusId(), COL_ORDERS_STATUS_ID, J_OrdersStatusId, UJ_ordersStatusId); + } + + /** + * Register inline condition of ordersStatusId. + * + * @param key Condition key. (NotNull) + * @param value The value of ordersStatusId. (Nullable) + */ + protected void registerInlineOrdersStatusId(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueOrdersStatusId(), COL_ORDERS_STATUS_ID, J_OrdersStatusId, UJ_ordersStatusId); + } + + abstract protected ConditionValue getCValueOrdersStatusId(); + + /** Column db name of languageId. */ + protected static final String COL_LANGUAGE_ID = "LANGUAGE_ID"; + + /** Column java name of languageId. */ + protected static final String J_LanguageId = "LanguageId"; + + /** Column uncapitalised java name of languageId. */ + protected static final String UJ_languageId = "languageId"; + + /** + * Set the value of languageId using equal. { = } + * + * @param languageId The value of languageId as equal. + */ + public void setLanguageId_Equal(java.math.BigDecimal languageId) { + registerLanguageId(ConditionKey.CK_EQUAL, languageId); + } + + /** + * Set the value of languageId using notEqual. { != } + * + * @param languageId The value of languageId as notEqual. + */ + public void setLanguageId_NotEqual(java.math.BigDecimal languageId) { + registerLanguageId(ConditionKey.CK_NOT_EQUAL, languageId); + } + + /** + * Set the value of languageId using greaterThan. { > } + * + * @param languageId The value of languageId as greaterThan. + */ + public void setLanguageId_GreaterThan(java.math.BigDecimal languageId) { + registerLanguageId(ConditionKey.CK_GREATER_THAN, languageId); + } + + /** + * Set the value of languageId using lessThan. { < } + * + * @param languageId The value of languageId as lessThan. + */ + public void setLanguageId_LessThan(java.math.BigDecimal languageId) { + registerLanguageId(ConditionKey.CK_LESS_THAN, languageId); + } + + /** + * Set the value of languageId using greaterEqual. { >= } + * + * @param languageId The value of languageId as greaterEqual. + */ + public void setLanguageId_GreaterEqual(java.math.BigDecimal languageId) { + registerLanguageId(ConditionKey.CK_GREATER_EQUAL, languageId); + } + + /** + * Set the value of languageId using lessEqual. { <= } + * + * @param languageId The value of languageId as lessEqual. + */ + public void setLanguageId_LessEqual(java.math.BigDecimal languageId) { + registerLanguageId(ConditionKey.CK_LESS_EQUAL, languageId); + } + + /** + * Set the value of languageId using inScope. { in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param languageIdList The value of languageId as inScope. + */ + public void setLanguageId_InScope(java.util.List languageIdList) { + registerLanguageId(ConditionKey.CK_IN_SCOPE, languageIdList); + } + + /** + * Set the value of languageId using notInScope. { not in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param languageIdList The value of languageId as notInScope. + */ + public void setLanguageId_NotInScope(java.util.List languageIdList) { + registerLanguageId(ConditionKey.CK_NOT_IN_SCOPE, languageIdList); + } + + /** + * Register condition of languageId. + * + * @param key Condition key. (NotNull) + * @param value The value of languageId. (Nullable) + */ + protected void registerLanguageId(ConditionKey key, Object value) { + registerQuery(key, value, getCValueLanguageId(), COL_LANGUAGE_ID, J_LanguageId, UJ_languageId); + } + + /** + * Register inline condition of languageId. + * + * @param key Condition key. (NotNull) + * @param value The value of languageId. (Nullable) + */ + protected void registerInlineLanguageId(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueLanguageId(), COL_LANGUAGE_ID, J_LanguageId, UJ_languageId); + } + + abstract protected ConditionValue getCValueLanguageId(); + + /** Column db name of ordersStatusName. */ + protected static final String COL_ORDERS_STATUS_NAME = "ORDERS_STATUS_NAME"; + + /** Column java name of ordersStatusName. */ + protected static final String J_OrdersStatusName = "OrdersStatusName"; + + /** Column uncapitalised java name of ordersStatusName. */ + protected static final String UJ_ordersStatusName = "ordersStatusName"; + + /** + * Set the value of ordersStatusName using equal. { = } + * If the value is null or empty-string, this condition is ignored. + * + * @param ordersStatusName The value of ordersStatusName as equal. + */ + public void setOrdersStatusName_Equal(String ordersStatusName) { + registerOrdersStatusName(ConditionKey.CK_EQUAL, filterRemoveEmptyString(ordersStatusName)); + } + + /** + * Set the value of ordersStatusName using notEqual. { != } + * If the value is null or empty-string, this condition is ignored. + * + * @param ordersStatusName The value of ordersStatusName as notEqual. + */ + public void setOrdersStatusName_NotEqual(String ordersStatusName) { + registerOrdersStatusName(ConditionKey.CK_NOT_EQUAL, filterRemoveEmptyString(ordersStatusName)); + } + + /** + * Set the value of ordersStatusName using greaterThan. { > } + * If the value is null or empty-string, this condition is ignored. + * + * @param ordersStatusName The value of ordersStatusName as greaterThan. + */ + public void setOrdersStatusName_GreaterThan(String ordersStatusName) { + registerOrdersStatusName(ConditionKey.CK_GREATER_THAN, filterRemoveEmptyString(ordersStatusName)); + } + + /** + * Set the value of ordersStatusName using lessThan. { < } + * If the value is null or empty-string, this condition is ignored. + * + * @param ordersStatusName The value of ordersStatusName as lessThan. + */ + public void setOrdersStatusName_LessThan(String ordersStatusName) { + registerOrdersStatusName(ConditionKey.CK_LESS_THAN, filterRemoveEmptyString(ordersStatusName)); + } + + /** + * Set the value of ordersStatusName using greaterEqual. { >= } + * If the value is null or empty-string, this condition is ignored. + * + * @param ordersStatusName The value of ordersStatusName as greaterEqual. + */ + public void setOrdersStatusName_GreaterEqual(String ordersStatusName) { + registerOrdersStatusName(ConditionKey.CK_GREATER_EQUAL, filterRemoveEmptyString(ordersStatusName)); + } + + /** + * Set the value of ordersStatusName using lessEqual. { <= } + * If the value is null or empty-string, this condition is ignored. + * + * @param ordersStatusName The value of ordersStatusName as lessEqual. + */ + public void setOrdersStatusName_LessEqual(String ordersStatusName) { + registerOrdersStatusName(ConditionKey.CK_LESS_EQUAL, filterRemoveEmptyString(ordersStatusName)); + } + + /** + * Set the value of ordersStatusName using prefixSearch. { like 'xxx%' } + * If the value is null or empty-string, this condition is ignored. + * + * @param ordersStatusName The value of ordersStatusName as prefixSearch. + */ + public void setOrdersStatusName_PrefixSearch(String ordersStatusName) { + registerOrdersStatusName(ConditionKey.CK_PREFIX_SEARCH, filterRemoveEmptyString(ordersStatusName)); + } + + /** + * Set the value of ordersStatusName using likeSearch. { like '%xxx%' } + * If the value is null or empty-string, this condition is ignored. + * You can invoke this method several times and the conditions are set up. + * + * @param ordersStatusName The value of ordersStatusName as likeSearch. + * @param likeSearchOption Like search option. (NotNull) + */ + public void setOrdersStatusName_LikeSearch(String ordersStatusName, jp.sf.pal.pompei.allcommon.cbean.coption.LikeSearchOption likeSearchOption) { + registerLikeSearchQuery(ConditionKey.CK_LIKE_SEARCH, filterRemoveEmptyString(ordersStatusName), getCValueOrdersStatusName(), COL_ORDERS_STATUS_NAME, J_OrdersStatusName, UJ_ordersStatusName, likeSearchOption); + } + + /** + * Set the value of ordersStatusName using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param ordersStatusNameList The value of ordersStatusName as inScope. + */ + public void setOrdersStatusName_InScope(java.util.List ordersStatusNameList) { + registerOrdersStatusName(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyStringFromList(ordersStatusNameList)); + } + + /** + * Set the value of ordersStatusName using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param ordersStatusName The value of ordersStatusName as inScope. + */ + public void setOrdersStatusName_InScope(String ordersStatusName, jp.sf.pal.pompei.allcommon.cbean.coption.InScopeOption option) { + registerInScopeQuery(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyString(ordersStatusName), getCValueOrdersStatusName(), COL_ORDERS_STATUS_NAME, J_OrdersStatusName, UJ_ordersStatusName, option); + } + + /** + * Set the value of ordersStatusName using notInScope. { not in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param ordersStatusNameList The value of ordersStatusName as notInScope. + */ + public void setOrdersStatusName_NotInScope(java.util.List ordersStatusNameList) { + registerOrdersStatusName(ConditionKey.CK_NOT_IN_SCOPE, filterRemoveEmptyStringFromList(ordersStatusNameList)); + } + + /** + * Register condition of ordersStatusName. + * + * @param key Condition key. (NotNull) + * @param value The value of ordersStatusName. (Nullable) + */ + protected void registerOrdersStatusName(ConditionKey key, Object value) { + registerQuery(key, value, getCValueOrdersStatusName(), COL_ORDERS_STATUS_NAME, J_OrdersStatusName, UJ_ordersStatusName); + } + + /** + * Register inline condition of ordersStatusName. + * + * @param key Condition key. (NotNull) + * @param value The value of ordersStatusName. (Nullable) + */ + protected void registerInlineOrdersStatusName(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueOrdersStatusName(), COL_ORDERS_STATUS_NAME, J_OrdersStatusName, UJ_ordersStatusName); + } + + abstract protected ConditionValue getCValueOrdersStatusName(); + + // =================================================================================== + // Basic Override + // ============== + /** + * This method overrides the method that is declared at super. + * + * @return Clause string. (NotNull) + */ + public String toString() { + return getSqlClause().getClause(); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/AbstractBsOrdersStatusHistoryCQ.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/AbstractBsOrdersStatusHistoryCQ.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/AbstractBsOrdersStatusHistoryCQ.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,752 @@ + +package jp.sf.pal.pompei.cbean.cq.bs; + + + +import jp.sf.pal.pompei.allcommon.cbean.*; +import jp.sf.pal.pompei.allcommon.cbean.ckey.*; +import jp.sf.pal.pompei.allcommon.cbean.cvalue.ConditionValue; +import jp.sf.pal.pompei.allcommon.cbean.sqlclause.SqlClause; +import jp.sf.pal.pompei.cbean.cq.*; + +/** + * The condition-query of ORDERS_STATUS_HISTORY. + * + * @author DBFlute(AutoGenerator) + */ +public abstract class AbstractBsOrdersStatusHistoryCQ extends AbstractConditionQuery { + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param childQuery Child query as abstract class. (Nullable: If null, this is base instance.) + * @param sqlClause SQL clause instance. (NotNull) + * @param aliasName My alias name. (NotNull) + * @param nestLevel Nest level. + */ + public AbstractBsOrdersStatusHistoryCQ(ConditionQuery childQuery, SqlClause sqlClause, String aliasName, int nestLevel) { + super(childQuery, sqlClause, aliasName, nestLevel); + } + + // =================================================================================== + // Table Name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + final public String getTableDbName() { + return "ORDERS_STATUS_HISTORY"; + } + + // =================================================================================== + // Query + // ===== + + // /* * * * * * * * * * * * * * * * * * * * * * * + // MyTable = [ORDERS_STATUS_HISTORY] + // * * * * * * * * */ + + + /** Column db name of ordersStatusHistoryId. */ + protected static final String COL_ORDERS_STATUS_HISTORY_ID = "ORDERS_STATUS_HISTORY_ID"; + + /** Column java name of ordersStatusHistoryId. */ + protected static final String J_OrdersStatusHistoryId = "OrdersStatusHistoryId"; + + /** Column uncapitalised java name of ordersStatusHistoryId. */ + protected static final String UJ_ordersStatusHistoryId = "ordersStatusHistoryId"; + + /** + * Set the value of ordersStatusHistoryId using equal. { = } + * + * @param ordersStatusHistoryId The value of ordersStatusHistoryId as equal. + */ + public void setOrdersStatusHistoryId_Equal(java.math.BigDecimal ordersStatusHistoryId) { + registerOrdersStatusHistoryId(ConditionKey.CK_EQUAL, ordersStatusHistoryId); + } + + /** + * Set the value of ordersStatusHistoryId using notEqual. { != } + * + * @param ordersStatusHistoryId The value of ordersStatusHistoryId as notEqual. + */ + public void setOrdersStatusHistoryId_NotEqual(java.math.BigDecimal ordersStatusHistoryId) { + registerOrdersStatusHistoryId(ConditionKey.CK_NOT_EQUAL, ordersStatusHistoryId); + } + + /** + * Set the value of ordersStatusHistoryId using greaterThan. { > } + * + * @param ordersStatusHistoryId The value of ordersStatusHistoryId as greaterThan. + */ + public void setOrdersStatusHistoryId_GreaterThan(java.math.BigDecimal ordersStatusHistoryId) { + registerOrdersStatusHistoryId(ConditionKey.CK_GREATER_THAN, ordersStatusHistoryId); + } + + /** + * Set the value of ordersStatusHistoryId using lessThan. { < } + * + * @param ordersStatusHistoryId The value of ordersStatusHistoryId as lessThan. + */ + public void setOrdersStatusHistoryId_LessThan(java.math.BigDecimal ordersStatusHistoryId) { + registerOrdersStatusHistoryId(ConditionKey.CK_LESS_THAN, ordersStatusHistoryId); + } + + /** + * Set the value of ordersStatusHistoryId using greaterEqual. { >= } + * + * @param ordersStatusHistoryId The value of ordersStatusHistoryId as greaterEqual. + */ + public void setOrdersStatusHistoryId_GreaterEqual(java.math.BigDecimal ordersStatusHistoryId) { + registerOrdersStatusHistoryId(ConditionKey.CK_GREATER_EQUAL, ordersStatusHistoryId); + } + + /** + * Set the value of ordersStatusHistoryId using lessEqual. { <= } + * + * @param ordersStatusHistoryId The value of ordersStatusHistoryId as lessEqual. + */ + public void setOrdersStatusHistoryId_LessEqual(java.math.BigDecimal ordersStatusHistoryId) { + registerOrdersStatusHistoryId(ConditionKey.CK_LESS_EQUAL, ordersStatusHistoryId); + } + + /** + * Set the value of ordersStatusHistoryId using inScope. { in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param ordersStatusHistoryIdList The value of ordersStatusHistoryId as inScope. + */ + public void setOrdersStatusHistoryId_InScope(java.util.List ordersStatusHistoryIdList) { + registerOrdersStatusHistoryId(ConditionKey.CK_IN_SCOPE, ordersStatusHistoryIdList); + } + + /** + * Set the value of ordersStatusHistoryId using notInScope. { not in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param ordersStatusHistoryIdList The value of ordersStatusHistoryId as notInScope. + */ + public void setOrdersStatusHistoryId_NotInScope(java.util.List ordersStatusHistoryIdList) { + registerOrdersStatusHistoryId(ConditionKey.CK_NOT_IN_SCOPE, ordersStatusHistoryIdList); + } + + /** + * Register condition of ordersStatusHistoryId. + * + * @param key Condition key. (NotNull) + * @param value The value of ordersStatusHistoryId. (Nullable) + */ + protected void registerOrdersStatusHistoryId(ConditionKey key, Object value) { + registerQuery(key, value, getCValueOrdersStatusHistoryId(), COL_ORDERS_STATUS_HISTORY_ID, J_OrdersStatusHistoryId, UJ_ordersStatusHistoryId); + } + + /** + * Register inline condition of ordersStatusHistoryId. + * + * @param key Condition key. (NotNull) + * @param value The value of ordersStatusHistoryId. (Nullable) + */ + protected void registerInlineOrdersStatusHistoryId(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueOrdersStatusHistoryId(), COL_ORDERS_STATUS_HISTORY_ID, J_OrdersStatusHistoryId, UJ_ordersStatusHistoryId); + } + + abstract protected ConditionValue getCValueOrdersStatusHistoryId(); + + /** Column db name of ordersId. */ + protected static final String COL_ORDERS_ID = "ORDERS_ID"; + + /** Column java name of ordersId. */ + protected static final String J_OrdersId = "OrdersId"; + + /** Column uncapitalised java name of ordersId. */ + protected static final String UJ_ordersId = "ordersId"; + + /** + * Set the value of ordersId using equal. { = } + * + * @param ordersId The value of ordersId as equal. + */ + public void setOrdersId_Equal(java.math.BigDecimal ordersId) { + registerOrdersId(ConditionKey.CK_EQUAL, ordersId); + } + + /** + * Set the value of ordersId using notEqual. { != } + * + * @param ordersId The value of ordersId as notEqual. + */ + public void setOrdersId_NotEqual(java.math.BigDecimal ordersId) { + registerOrdersId(ConditionKey.CK_NOT_EQUAL, ordersId); + } + + /** + * Set the value of ordersId using greaterThan. { > } + * + * @param ordersId The value of ordersId as greaterThan. + */ + public void setOrdersId_GreaterThan(java.math.BigDecimal ordersId) { + registerOrdersId(ConditionKey.CK_GREATER_THAN, ordersId); + } + + /** + * Set the value of ordersId using lessThan. { < } + * + * @param ordersId The value of ordersId as lessThan. + */ + public void setOrdersId_LessThan(java.math.BigDecimal ordersId) { + registerOrdersId(ConditionKey.CK_LESS_THAN, ordersId); + } + + /** + * Set the value of ordersId using greaterEqual. { >= } + * + * @param ordersId The value of ordersId as greaterEqual. + */ + public void setOrdersId_GreaterEqual(java.math.BigDecimal ordersId) { + registerOrdersId(ConditionKey.CK_GREATER_EQUAL, ordersId); + } + + /** + * Set the value of ordersId using lessEqual. { <= } + * + * @param ordersId The value of ordersId as lessEqual. + */ + public void setOrdersId_LessEqual(java.math.BigDecimal ordersId) { + registerOrdersId(ConditionKey.CK_LESS_EQUAL, ordersId); + } + + /** + * Set the value of ordersId using inScope. { in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param ordersIdList The value of ordersId as inScope. + */ + public void setOrdersId_InScope(java.util.List ordersIdList) { + registerOrdersId(ConditionKey.CK_IN_SCOPE, ordersIdList); + } + + /** + * Set the value of ordersId using notInScope. { not in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param ordersIdList The value of ordersId as notInScope. + */ + public void setOrdersId_NotInScope(java.util.List ordersIdList) { + registerOrdersId(ConditionKey.CK_NOT_IN_SCOPE, ordersIdList); + } + + /** + * Register condition of ordersId. + * + * @param key Condition key. (NotNull) + * @param value The value of ordersId. (Nullable) + */ + protected void registerOrdersId(ConditionKey key, Object value) { + registerQuery(key, value, getCValueOrdersId(), COL_ORDERS_ID, J_OrdersId, UJ_ordersId); + } + + /** + * Register inline condition of ordersId. + * + * @param key Condition key. (NotNull) + * @param value The value of ordersId. (Nullable) + */ + protected void registerInlineOrdersId(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueOrdersId(), COL_ORDERS_ID, J_OrdersId, UJ_ordersId); + } + + abstract protected ConditionValue getCValueOrdersId(); + + /** Column db name of ordersStatusId. */ + protected static final String COL_ORDERS_STATUS_ID = "ORDERS_STATUS_ID"; + + /** Column java name of ordersStatusId. */ + protected static final String J_OrdersStatusId = "OrdersStatusId"; + + /** Column uncapitalised java name of ordersStatusId. */ + protected static final String UJ_ordersStatusId = "ordersStatusId"; + + /** + * Set the value of ordersStatusId using equal. { = } + * + * @param ordersStatusId The value of ordersStatusId as equal. + */ + public void setOrdersStatusId_Equal(java.math.BigDecimal ordersStatusId) { + registerOrdersStatusId(ConditionKey.CK_EQUAL, ordersStatusId); + } + + /** + * Set the value of ordersStatusId using notEqual. { != } + * + * @param ordersStatusId The value of ordersStatusId as notEqual. + */ + public void setOrdersStatusId_NotEqual(java.math.BigDecimal ordersStatusId) { + registerOrdersStatusId(ConditionKey.CK_NOT_EQUAL, ordersStatusId); + } + + /** + * Set the value of ordersStatusId using greaterThan. { > } + * + * @param ordersStatusId The value of ordersStatusId as greaterThan. + */ + public void setOrdersStatusId_GreaterThan(java.math.BigDecimal ordersStatusId) { + registerOrdersStatusId(ConditionKey.CK_GREATER_THAN, ordersStatusId); + } + + /** + * Set the value of ordersStatusId using lessThan. { < } + * + * @param ordersStatusId The value of ordersStatusId as lessThan. + */ + public void setOrdersStatusId_LessThan(java.math.BigDecimal ordersStatusId) { + registerOrdersStatusId(ConditionKey.CK_LESS_THAN, ordersStatusId); + } + + /** + * Set the value of ordersStatusId using greaterEqual. { >= } + * + * @param ordersStatusId The value of ordersStatusId as greaterEqual. + */ + public void setOrdersStatusId_GreaterEqual(java.math.BigDecimal ordersStatusId) { + registerOrdersStatusId(ConditionKey.CK_GREATER_EQUAL, ordersStatusId); + } + + /** + * Set the value of ordersStatusId using lessEqual. { <= } + * + * @param ordersStatusId The value of ordersStatusId as lessEqual. + */ + public void setOrdersStatusId_LessEqual(java.math.BigDecimal ordersStatusId) { + registerOrdersStatusId(ConditionKey.CK_LESS_EQUAL, ordersStatusId); + } + + /** + * Set the value of ordersStatusId using inScope. { in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param ordersStatusIdList The value of ordersStatusId as inScope. + */ + public void setOrdersStatusId_InScope(java.util.List ordersStatusIdList) { + registerOrdersStatusId(ConditionKey.CK_IN_SCOPE, ordersStatusIdList); + } + + /** + * Set the value of ordersStatusId using notInScope. { not in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param ordersStatusIdList The value of ordersStatusId as notInScope. + */ + public void setOrdersStatusId_NotInScope(java.util.List ordersStatusIdList) { + registerOrdersStatusId(ConditionKey.CK_NOT_IN_SCOPE, ordersStatusIdList); + } + + /** + * Register condition of ordersStatusId. + * + * @param key Condition key. (NotNull) + * @param value The value of ordersStatusId. (Nullable) + */ + protected void registerOrdersStatusId(ConditionKey key, Object value) { + registerQuery(key, value, getCValueOrdersStatusId(), COL_ORDERS_STATUS_ID, J_OrdersStatusId, UJ_ordersStatusId); + } + + /** + * Register inline condition of ordersStatusId. + * + * @param key Condition key. (NotNull) + * @param value The value of ordersStatusId. (Nullable) + */ + protected void registerInlineOrdersStatusId(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueOrdersStatusId(), COL_ORDERS_STATUS_ID, J_OrdersStatusId, UJ_ordersStatusId); + } + + abstract protected ConditionValue getCValueOrdersStatusId(); + + /** Column db name of dateAdded. */ + protected static final String COL_DATE_ADDED = "DATE_ADDED"; + + /** Column java name of dateAdded. */ + protected static final String J_DateAdded = "DateAdded"; + + /** Column uncapitalised java name of dateAdded. */ + protected static final String UJ_dateAdded = "dateAdded"; + + /** + * Set the value of dateAdded using equal. { = } + * + * @param dateAdded The value of dateAdded as equal. + */ + public void setDateAdded_Equal(java.sql.Timestamp dateAdded) { + registerDateAdded(ConditionKey.CK_EQUAL, dateAdded); + } + + /** + * Set the value of dateAdded using notEqual. { != } + * + * @param dateAdded The value of dateAdded as notEqual. + */ + public void setDateAdded_NotEqual(java.sql.Timestamp dateAdded) { + registerDateAdded(ConditionKey.CK_NOT_EQUAL, dateAdded); + } + + /** + * Set the value of dateAdded using greaterThan. { > } + * + * @param dateAdded The value of dateAdded as greaterThan. + */ + public void setDateAdded_GreaterThan(java.sql.Timestamp dateAdded) { + registerDateAdded(ConditionKey.CK_GREATER_THAN, dateAdded); + } + + /** + * Set the value of dateAdded using lessThan. { < } + * + * @param dateAdded The value of dateAdded as lessThan. + */ + public void setDateAdded_LessThan(java.sql.Timestamp dateAdded) { + registerDateAdded(ConditionKey.CK_LESS_THAN, dateAdded); + } + + /** + * Set the value of dateAdded using greaterEqual. { >= } + * + * @param dateAdded The value of dateAdded as greaterEqual. + */ + public void setDateAdded_GreaterEqual(java.sql.Timestamp dateAdded) { + registerDateAdded(ConditionKey.CK_GREATER_EQUAL, dateAdded); + } + + /** + * Set the value of dateAdded using lessEqual. { <= } + * + * @param dateAdded The value of dateAdded as lessEqual. + */ + public void setDateAdded_LessEqual(java.sql.Timestamp dateAdded) { + registerDateAdded(ConditionKey.CK_LESS_EQUAL, dateAdded); + } + + /** + * Set the value of dateAdded using from-to. { $fromDate <= COLUMN_NAME <= $toDate } + * + * @param dateAdded The value of dateAdded as from-to. + * @param fromToOption From-To option. (NotNull) + */ + public void setDateAdded_FromTo(java.sql.Timestamp fromDate, java.sql.Timestamp toDate, jp.sf.pal.pompei.allcommon.cbean.coption.FromToOption fromToOption) { + registerFromToQuery(fromDate, toDate, getCValueDateAdded(), COL_DATE_ADDED, J_DateAdded, UJ_dateAdded, fromToOption); + } + + /** + * Register condition of dateAdded. + * + * @param key Condition key. (NotNull) + * @param value The value of dateAdded. (Nullable) + */ + protected void registerDateAdded(ConditionKey key, Object value) { + registerQuery(key, value, getCValueDateAdded(), COL_DATE_ADDED, J_DateAdded, UJ_dateAdded); + } + + /** + * Register inline condition of dateAdded. + * + * @param key Condition key. (NotNull) + * @param value The value of dateAdded. (Nullable) + */ + protected void registerInlineDateAdded(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueDateAdded(), COL_DATE_ADDED, J_DateAdded, UJ_dateAdded); + } + + abstract protected ConditionValue getCValueDateAdded(); + + /** Column db name of customerNotified. */ + protected static final String COL_CUSTOMER_NOTIFIED = "CUSTOMER_NOTIFIED"; + + /** Column java name of customerNotified. */ + protected static final String J_CustomerNotified = "CustomerNotified"; + + /** Column uncapitalised java name of customerNotified. */ + protected static final String UJ_customerNotified = "customerNotified"; + + /** + * Set the value of customerNotified using equal. { = } + * + * @param customerNotified The value of customerNotified as equal. + */ + public void setCustomerNotified_Equal(java.math.BigDecimal customerNotified) { + registerCustomerNotified(ConditionKey.CK_EQUAL, customerNotified); + } + + /** + * Set the value of customerNotified using notEqual. { != } + * + * @param customerNotified The value of customerNotified as notEqual. + */ + public void setCustomerNotified_NotEqual(java.math.BigDecimal customerNotified) { + registerCustomerNotified(ConditionKey.CK_NOT_EQUAL, customerNotified); + } + + /** + * Set the value of customerNotified using greaterThan. { > } + * + * @param customerNotified The value of customerNotified as greaterThan. + */ + public void setCustomerNotified_GreaterThan(java.math.BigDecimal customerNotified) { + registerCustomerNotified(ConditionKey.CK_GREATER_THAN, customerNotified); + } + + /** + * Set the value of customerNotified using lessThan. { < } + * + * @param customerNotified The value of customerNotified as lessThan. + */ + public void setCustomerNotified_LessThan(java.math.BigDecimal customerNotified) { + registerCustomerNotified(ConditionKey.CK_LESS_THAN, customerNotified); + } + + /** + * Set the value of customerNotified using greaterEqual. { >= } + * + * @param customerNotified The value of customerNotified as greaterEqual. + */ + public void setCustomerNotified_GreaterEqual(java.math.BigDecimal customerNotified) { + registerCustomerNotified(ConditionKey.CK_GREATER_EQUAL, customerNotified); + } + + /** + * Set the value of customerNotified using lessEqual. { <= } + * + * @param customerNotified The value of customerNotified as lessEqual. + */ + public void setCustomerNotified_LessEqual(java.math.BigDecimal customerNotified) { + registerCustomerNotified(ConditionKey.CK_LESS_EQUAL, customerNotified); + } + + /** + * Set the value of customerNotified using inScope. { in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param customerNotifiedList The value of customerNotified as inScope. + */ + public void setCustomerNotified_InScope(java.util.List customerNotifiedList) { + registerCustomerNotified(ConditionKey.CK_IN_SCOPE, customerNotifiedList); + } + + /** + * Set the value of customerNotified using notInScope. { not in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param customerNotifiedList The value of customerNotified as notInScope. + */ + public void setCustomerNotified_NotInScope(java.util.List customerNotifiedList) { + registerCustomerNotified(ConditionKey.CK_NOT_IN_SCOPE, customerNotifiedList); + } + + /** + * Set the value of customerNotified using isNull. { is null } + */ + public void setCustomerNotified_IsNull() { + registerCustomerNotified(ConditionKey.CK_IS_NULL, DUMMY_OBJECT); + } + + /** + * Set the value of customerNotified using isNotNull. { is not null } + */ + public void setCustomerNotified_IsNotNull() { + registerCustomerNotified(ConditionKey.CK_IS_NOT_NULL, DUMMY_OBJECT); + } + + /** + * Register condition of customerNotified. + * + * @param key Condition key. (NotNull) + * @param value The value of customerNotified. (Nullable) + */ + protected void registerCustomerNotified(ConditionKey key, Object value) { + registerQuery(key, value, getCValueCustomerNotified(), COL_CUSTOMER_NOTIFIED, J_CustomerNotified, UJ_customerNotified); + } + + /** + * Register inline condition of customerNotified. + * + * @param key Condition key. (NotNull) + * @param value The value of customerNotified. (Nullable) + */ + protected void registerInlineCustomerNotified(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueCustomerNotified(), COL_CUSTOMER_NOTIFIED, J_CustomerNotified, UJ_customerNotified); + } + + abstract protected ConditionValue getCValueCustomerNotified(); + + /** Column db name of comments. */ + protected static final String COL_COMMENTS = "COMMENTS"; + + /** Column java name of comments. */ + protected static final String J_Comments = "Comments"; + + /** Column uncapitalised java name of comments. */ + protected static final String UJ_comments = "comments"; + + /** + * Set the value of comments using equal. { = } + * If the value is null or empty-string, this condition is ignored. + * + * @param comments The value of comments as equal. + */ + public void setComments_Equal(String comments) { + registerComments(ConditionKey.CK_EQUAL, filterRemoveEmptyString(comments)); + } + + /** + * Set the value of comments using notEqual. { != } + * If the value is null or empty-string, this condition is ignored. + * + * @param comments The value of comments as notEqual. + */ + public void setComments_NotEqual(String comments) { + registerComments(ConditionKey.CK_NOT_EQUAL, filterRemoveEmptyString(comments)); + } + + /** + * Set the value of comments using greaterThan. { > } + * If the value is null or empty-string, this condition is ignored. + * + * @param comments The value of comments as greaterThan. + */ + public void setComments_GreaterThan(String comments) { + registerComments(ConditionKey.CK_GREATER_THAN, filterRemoveEmptyString(comments)); + } + + /** + * Set the value of comments using lessThan. { < } + * If the value is null or empty-string, this condition is ignored. + * + * @param comments The value of comments as lessThan. + */ + public void setComments_LessThan(String comments) { + registerComments(ConditionKey.CK_LESS_THAN, filterRemoveEmptyString(comments)); + } + + /** + * Set the value of comments using greaterEqual. { >= } + * If the value is null or empty-string, this condition is ignored. + * + * @param comments The value of comments as greaterEqual. + */ + public void setComments_GreaterEqual(String comments) { + registerComments(ConditionKey.CK_GREATER_EQUAL, filterRemoveEmptyString(comments)); + } + + /** + * Set the value of comments using lessEqual. { <= } + * If the value is null or empty-string, this condition is ignored. + * + * @param comments The value of comments as lessEqual. + */ + public void setComments_LessEqual(String comments) { + registerComments(ConditionKey.CK_LESS_EQUAL, filterRemoveEmptyString(comments)); + } + + /** + * Set the value of comments using prefixSearch. { like 'xxx%' } + * If the value is null or empty-string, this condition is ignored. + * + * @param comments The value of comments as prefixSearch. + */ + public void setComments_PrefixSearch(String comments) { + registerComments(ConditionKey.CK_PREFIX_SEARCH, filterRemoveEmptyString(comments)); + } + + /** + * Set the value of comments using likeSearch. { like '%xxx%' } + * If the value is null or empty-string, this condition is ignored. + * You can invoke this method several times and the conditions are set up. + * + * @param comments The value of comments as likeSearch. + * @param likeSearchOption Like search option. (NotNull) + */ + public void setComments_LikeSearch(String comments, jp.sf.pal.pompei.allcommon.cbean.coption.LikeSearchOption likeSearchOption) { + registerLikeSearchQuery(ConditionKey.CK_LIKE_SEARCH, filterRemoveEmptyString(comments), getCValueComments(), COL_COMMENTS, J_Comments, UJ_comments, likeSearchOption); + } + + /** + * Set the value of comments using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param commentsList The value of comments as inScope. + */ + public void setComments_InScope(java.util.List commentsList) { + registerComments(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyStringFromList(commentsList)); + } + + /** + * Set the value of comments using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param comments The value of comments as inScope. + */ + public void setComments_InScope(String comments, jp.sf.pal.pompei.allcommon.cbean.coption.InScopeOption option) { + registerInScopeQuery(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyString(comments), getCValueComments(), COL_COMMENTS, J_Comments, UJ_comments, option); + } + + /** + * Set the value of comments using notInScope. { not in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param commentsList The value of comments as notInScope. + */ + public void setComments_NotInScope(java.util.List commentsList) { + registerComments(ConditionKey.CK_NOT_IN_SCOPE, filterRemoveEmptyStringFromList(commentsList)); + } + + /** + * Set the value of comments using isNull. { is null } + */ + public void setComments_IsNull() { + registerComments(ConditionKey.CK_IS_NULL, DUMMY_OBJECT); + } + + /** + * Set the value of comments using isNotNull. { is not null } + */ + public void setComments_IsNotNull() { + registerComments(ConditionKey.CK_IS_NOT_NULL, DUMMY_OBJECT); + } + + /** + * Register condition of comments. + * + * @param key Condition key. (NotNull) + * @param value The value of comments. (Nullable) + */ + protected void registerComments(ConditionKey key, Object value) { + registerQuery(key, value, getCValueComments(), COL_COMMENTS, J_Comments, UJ_comments); + } + + /** + * Register inline condition of comments. + * + * @param key Condition key. (NotNull) + * @param value The value of comments. (Nullable) + */ + protected void registerInlineComments(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueComments(), COL_COMMENTS, J_Comments, UJ_comments); + } + + abstract protected ConditionValue getCValueComments(); + + // =================================================================================== + // Basic Override + // ============== + /** + * This method overrides the method that is declared at super. + * + * @return Clause string. (NotNull) + */ + public String toString() { + return getSqlClause().getClause(); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/AbstractBsOrdersTotalCQ.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/AbstractBsOrdersTotalCQ.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/AbstractBsOrdersTotalCQ.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,915 @@ + +package jp.sf.pal.pompei.cbean.cq.bs; + + + +import jp.sf.pal.pompei.allcommon.cbean.*; +import jp.sf.pal.pompei.allcommon.cbean.ckey.*; +import jp.sf.pal.pompei.allcommon.cbean.cvalue.ConditionValue; +import jp.sf.pal.pompei.allcommon.cbean.sqlclause.SqlClause; +import jp.sf.pal.pompei.cbean.cq.*; + +/** + * The condition-query of ORDERS_TOTAL. + * + * @author DBFlute(AutoGenerator) + */ +public abstract class AbstractBsOrdersTotalCQ extends AbstractConditionQuery { + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param childQuery Child query as abstract class. (Nullable: If null, this is base instance.) + * @param sqlClause SQL clause instance. (NotNull) + * @param aliasName My alias name. (NotNull) + * @param nestLevel Nest level. + */ + public AbstractBsOrdersTotalCQ(ConditionQuery childQuery, SqlClause sqlClause, String aliasName, int nestLevel) { + super(childQuery, sqlClause, aliasName, nestLevel); + } + + // =================================================================================== + // Table Name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + final public String getTableDbName() { + return "ORDERS_TOTAL"; + } + + // =================================================================================== + // Query + // ===== + + // /* * * * * * * * * * * * * * * * * * * * * * * + // MyTable = [ORDERS_TOTAL] + // * * * * * * * * */ + + + /** Column db name of ordersTotalId. */ + protected static final String COL_ORDERS_TOTAL_ID = "ORDERS_TOTAL_ID"; + + /** Column java name of ordersTotalId. */ + protected static final String J_OrdersTotalId = "OrdersTotalId"; + + /** Column uncapitalised java name of ordersTotalId. */ + protected static final String UJ_ordersTotalId = "ordersTotalId"; + + /** + * Set the value of ordersTotalId using equal. { = } + * + * @param ordersTotalId The value of ordersTotalId as equal. + */ + public void setOrdersTotalId_Equal(java.math.BigDecimal ordersTotalId) { + registerOrdersTotalId(ConditionKey.CK_EQUAL, ordersTotalId); + } + + /** + * Set the value of ordersTotalId using notEqual. { != } + * + * @param ordersTotalId The value of ordersTotalId as notEqual. + */ + public void setOrdersTotalId_NotEqual(java.math.BigDecimal ordersTotalId) { + registerOrdersTotalId(ConditionKey.CK_NOT_EQUAL, ordersTotalId); + } + + /** + * Set the value of ordersTotalId using greaterThan. { > } + * + * @param ordersTotalId The value of ordersTotalId as greaterThan. + */ + public void setOrdersTotalId_GreaterThan(java.math.BigDecimal ordersTotalId) { + registerOrdersTotalId(ConditionKey.CK_GREATER_THAN, ordersTotalId); + } + + /** + * Set the value of ordersTotalId using lessThan. { < } + * + * @param ordersTotalId The value of ordersTotalId as lessThan. + */ + public void setOrdersTotalId_LessThan(java.math.BigDecimal ordersTotalId) { + registerOrdersTotalId(ConditionKey.CK_LESS_THAN, ordersTotalId); + } + + /** + * Set the value of ordersTotalId using greaterEqual. { >= } + * + * @param ordersTotalId The value of ordersTotalId as greaterEqual. + */ + public void setOrdersTotalId_GreaterEqual(java.math.BigDecimal ordersTotalId) { + registerOrdersTotalId(ConditionKey.CK_GREATER_EQUAL, ordersTotalId); + } + + /** + * Set the value of ordersTotalId using lessEqual. { <= } + * + * @param ordersTotalId The value of ordersTotalId as lessEqual. + */ + public void setOrdersTotalId_LessEqual(java.math.BigDecimal ordersTotalId) { + registerOrdersTotalId(ConditionKey.CK_LESS_EQUAL, ordersTotalId); + } + + /** + * Set the value of ordersTotalId using inScope. { in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param ordersTotalIdList The value of ordersTotalId as inScope. + */ + public void setOrdersTotalId_InScope(java.util.List ordersTotalIdList) { + registerOrdersTotalId(ConditionKey.CK_IN_SCOPE, ordersTotalIdList); + } + + /** + * Set the value of ordersTotalId using notInScope. { not in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param ordersTotalIdList The value of ordersTotalId as notInScope. + */ + public void setOrdersTotalId_NotInScope(java.util.List ordersTotalIdList) { + registerOrdersTotalId(ConditionKey.CK_NOT_IN_SCOPE, ordersTotalIdList); + } + + /** + * Register condition of ordersTotalId. + * + * @param key Condition key. (NotNull) + * @param value The value of ordersTotalId. (Nullable) + */ + protected void registerOrdersTotalId(ConditionKey key, Object value) { + registerQuery(key, value, getCValueOrdersTotalId(), COL_ORDERS_TOTAL_ID, J_OrdersTotalId, UJ_ordersTotalId); + } + + /** + * Register inline condition of ordersTotalId. + * + * @param key Condition key. (NotNull) + * @param value The value of ordersTotalId. (Nullable) + */ + protected void registerInlineOrdersTotalId(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueOrdersTotalId(), COL_ORDERS_TOTAL_ID, J_OrdersTotalId, UJ_ordersTotalId); + } + + abstract protected ConditionValue getCValueOrdersTotalId(); + + /** Column db name of ordersId. */ + protected static final String COL_ORDERS_ID = "ORDERS_ID"; + + /** Column java name of ordersId. */ + protected static final String J_OrdersId = "OrdersId"; + + /** Column uncapitalised java name of ordersId. */ + protected static final String UJ_ordersId = "ordersId"; + + /** + * Set the value of ordersId using equal. { = } + * + * @param ordersId The value of ordersId as equal. + */ + public void setOrdersId_Equal(java.math.BigDecimal ordersId) { + registerOrdersId(ConditionKey.CK_EQUAL, ordersId); + } + + /** + * Set the value of ordersId using notEqual. { != } + * + * @param ordersId The value of ordersId as notEqual. + */ + public void setOrdersId_NotEqual(java.math.BigDecimal ordersId) { + registerOrdersId(ConditionKey.CK_NOT_EQUAL, ordersId); + } + + /** + * Set the value of ordersId using greaterThan. { > } + * + * @param ordersId The value of ordersId as greaterThan. + */ + public void setOrdersId_GreaterThan(java.math.BigDecimal ordersId) { + registerOrdersId(ConditionKey.CK_GREATER_THAN, ordersId); + } + + /** + * Set the value of ordersId using lessThan. { < } + * + * @param ordersId The value of ordersId as lessThan. + */ + public void setOrdersId_LessThan(java.math.BigDecimal ordersId) { + registerOrdersId(ConditionKey.CK_LESS_THAN, ordersId); + } + + /** + * Set the value of ordersId using greaterEqual. { >= } + * + * @param ordersId The value of ordersId as greaterEqual. + */ + public void setOrdersId_GreaterEqual(java.math.BigDecimal ordersId) { + registerOrdersId(ConditionKey.CK_GREATER_EQUAL, ordersId); + } + + /** + * Set the value of ordersId using lessEqual. { <= } + * + * @param ordersId The value of ordersId as lessEqual. + */ + public void setOrdersId_LessEqual(java.math.BigDecimal ordersId) { + registerOrdersId(ConditionKey.CK_LESS_EQUAL, ordersId); + } + + /** + * Set the value of ordersId using inScope. { in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param ordersIdList The value of ordersId as inScope. + */ + public void setOrdersId_InScope(java.util.List ordersIdList) { + registerOrdersId(ConditionKey.CK_IN_SCOPE, ordersIdList); + } + + /** + * Set the value of ordersId using notInScope. { not in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param ordersIdList The value of ordersId as notInScope. + */ + public void setOrdersId_NotInScope(java.util.List ordersIdList) { + registerOrdersId(ConditionKey.CK_NOT_IN_SCOPE, ordersIdList); + } + + /** + * Register condition of ordersId. + * + * @param key Condition key. (NotNull) + * @param value The value of ordersId. (Nullable) + */ + protected void registerOrdersId(ConditionKey key, Object value) { + registerQuery(key, value, getCValueOrdersId(), COL_ORDERS_ID, J_OrdersId, UJ_ordersId); + } + + /** + * Register inline condition of ordersId. + * + * @param key Condition key. (NotNull) + * @param value The value of ordersId. (Nullable) + */ + protected void registerInlineOrdersId(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueOrdersId(), COL_ORDERS_ID, J_OrdersId, UJ_ordersId); + } + + abstract protected ConditionValue getCValueOrdersId(); + + /** Column db name of title. */ + protected static final String COL_TITLE = "TITLE"; + + /** Column java name of title. */ + protected static final String J_Title = "Title"; + + /** Column uncapitalised java name of title. */ + protected static final String UJ_title = "title"; + + /** + * Set the value of title using equal. { = } + * If the value is null or empty-string, this condition is ignored. + * + * @param title The value of title as equal. + */ + public void setTitle_Equal(String title) { + registerTitle(ConditionKey.CK_EQUAL, filterRemoveEmptyString(title)); + } + + /** + * Set the value of title using notEqual. { != } + * If the value is null or empty-string, this condition is ignored. + * + * @param title The value of title as notEqual. + */ + public void setTitle_NotEqual(String title) { + registerTitle(ConditionKey.CK_NOT_EQUAL, filterRemoveEmptyString(title)); + } + + /** + * Set the value of title using greaterThan. { > } + * If the value is null or empty-string, this condition is ignored. + * + * @param title The value of title as greaterThan. + */ + public void setTitle_GreaterThan(String title) { + registerTitle(ConditionKey.CK_GREATER_THAN, filterRemoveEmptyString(title)); + } + + /** + * Set the value of title using lessThan. { < } + * If the value is null or empty-string, this condition is ignored. + * + * @param title The value of title as lessThan. + */ + public void setTitle_LessThan(String title) { + registerTitle(ConditionKey.CK_LESS_THAN, filterRemoveEmptyString(title)); + } + + /** + * Set the value of title using greaterEqual. { >= } + * If the value is null or empty-string, this condition is ignored. + * + * @param title The value of title as greaterEqual. + */ + public void setTitle_GreaterEqual(String title) { + registerTitle(ConditionKey.CK_GREATER_EQUAL, filterRemoveEmptyString(title)); + } + + /** + * Set the value of title using lessEqual. { <= } + * If the value is null or empty-string, this condition is ignored. + * + * @param title The value of title as lessEqual. + */ + public void setTitle_LessEqual(String title) { + registerTitle(ConditionKey.CK_LESS_EQUAL, filterRemoveEmptyString(title)); + } + + /** + * Set the value of title using prefixSearch. { like 'xxx%' } + * If the value is null or empty-string, this condition is ignored. + * + * @param title The value of title as prefixSearch. + */ + public void setTitle_PrefixSearch(String title) { + registerTitle(ConditionKey.CK_PREFIX_SEARCH, filterRemoveEmptyString(title)); + } + + /** + * Set the value of title using likeSearch. { like '%xxx%' } + * If the value is null or empty-string, this condition is ignored. + * You can invoke this method several times and the conditions are set up. + * + * @param title The value of title as likeSearch. + * @param likeSearchOption Like search option. (NotNull) + */ + public void setTitle_LikeSearch(String title, jp.sf.pal.pompei.allcommon.cbean.coption.LikeSearchOption likeSearchOption) { + registerLikeSearchQuery(ConditionKey.CK_LIKE_SEARCH, filterRemoveEmptyString(title), getCValueTitle(), COL_TITLE, J_Title, UJ_title, likeSearchOption); + } + + /** + * Set the value of title using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param titleList The value of title as inScope. + */ + public void setTitle_InScope(java.util.List titleList) { + registerTitle(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyStringFromList(titleList)); + } + + /** + * Set the value of title using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param title The value of title as inScope. + */ + public void setTitle_InScope(String title, jp.sf.pal.pompei.allcommon.cbean.coption.InScopeOption option) { + registerInScopeQuery(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyString(title), getCValueTitle(), COL_TITLE, J_Title, UJ_title, option); + } + + /** + * Set the value of title using notInScope. { not in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param titleList The value of title as notInScope. + */ + public void setTitle_NotInScope(java.util.List titleList) { + registerTitle(ConditionKey.CK_NOT_IN_SCOPE, filterRemoveEmptyStringFromList(titleList)); + } + + /** + * Register condition of title. + * + * @param key Condition key. (NotNull) + * @param value The value of title. (Nullable) + */ + protected void registerTitle(ConditionKey key, Object value) { + registerQuery(key, value, getCValueTitle(), COL_TITLE, J_Title, UJ_title); + } + + /** + * Register inline condition of title. + * + * @param key Condition key. (NotNull) + * @param value The value of title. (Nullable) + */ + protected void registerInlineTitle(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueTitle(), COL_TITLE, J_Title, UJ_title); + } + + abstract protected ConditionValue getCValueTitle(); + + /** Column db name of text. */ + protected static final String COL_TEXT = "TEXT"; + + /** Column java name of text. */ + protected static final String J_Text = "Text"; + + /** Column uncapitalised java name of text. */ + protected static final String UJ_text = "text"; + + /** + * Set the value of text using equal. { = } + * If the value is null or empty-string, this condition is ignored. + * + * @param text The value of text as equal. + */ + public void setText_Equal(String text) { + registerText(ConditionKey.CK_EQUAL, filterRemoveEmptyString(text)); + } + + /** + * Set the value of text using notEqual. { != } + * If the value is null or empty-string, this condition is ignored. + * + * @param text The value of text as notEqual. + */ + public void setText_NotEqual(String text) { + registerText(ConditionKey.CK_NOT_EQUAL, filterRemoveEmptyString(text)); + } + + /** + * Set the value of text using greaterThan. { > } + * If the value is null or empty-string, this condition is ignored. + * + * @param text The value of text as greaterThan. + */ + public void setText_GreaterThan(String text) { + registerText(ConditionKey.CK_GREATER_THAN, filterRemoveEmptyString(text)); + } + + /** + * Set the value of text using lessThan. { < } + * If the value is null or empty-string, this condition is ignored. + * + * @param text The value of text as lessThan. + */ + public void setText_LessThan(String text) { + registerText(ConditionKey.CK_LESS_THAN, filterRemoveEmptyString(text)); + } + + /** + * Set the value of text using greaterEqual. { >= } + * If the value is null or empty-string, this condition is ignored. + * + * @param text The value of text as greaterEqual. + */ + public void setText_GreaterEqual(String text) { + registerText(ConditionKey.CK_GREATER_EQUAL, filterRemoveEmptyString(text)); + } + + /** + * Set the value of text using lessEqual. { <= } + * If the value is null or empty-string, this condition is ignored. + * + * @param text The value of text as lessEqual. + */ + public void setText_LessEqual(String text) { + registerText(ConditionKey.CK_LESS_EQUAL, filterRemoveEmptyString(text)); + } + + /** + * Set the value of text using prefixSearch. { like 'xxx%' } + * If the value is null or empty-string, this condition is ignored. + * + * @param text The value of text as prefixSearch. + */ + public void setText_PrefixSearch(String text) { + registerText(ConditionKey.CK_PREFIX_SEARCH, filterRemoveEmptyString(text)); + } + + /** + * Set the value of text using likeSearch. { like '%xxx%' } + * If the value is null or empty-string, this condition is ignored. + * You can invoke this method several times and the conditions are set up. + * + * @param text The value of text as likeSearch. + * @param likeSearchOption Like search option. (NotNull) + */ + public void setText_LikeSearch(String text, jp.sf.pal.pompei.allcommon.cbean.coption.LikeSearchOption likeSearchOption) { + registerLikeSearchQuery(ConditionKey.CK_LIKE_SEARCH, filterRemoveEmptyString(text), getCValueText(), COL_TEXT, J_Text, UJ_text, likeSearchOption); + } + + /** + * Set the value of text using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param textList The value of text as inScope. + */ + public void setText_InScope(java.util.List textList) { + registerText(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyStringFromList(textList)); + } + + /** + * Set the value of text using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param text The value of text as inScope. + */ + public void setText_InScope(String text, jp.sf.pal.pompei.allcommon.cbean.coption.InScopeOption option) { + registerInScopeQuery(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyString(text), getCValueText(), COL_TEXT, J_Text, UJ_text, option); + } + + /** + * Set the value of text using notInScope. { not in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param textList The value of text as notInScope. + */ + public void setText_NotInScope(java.util.List textList) { + registerText(ConditionKey.CK_NOT_IN_SCOPE, filterRemoveEmptyStringFromList(textList)); + } + + /** + * Register condition of text. + * + * @param key Condition key. (NotNull) + * @param value The value of text. (Nullable) + */ + protected void registerText(ConditionKey key, Object value) { + registerQuery(key, value, getCValueText(), COL_TEXT, J_Text, UJ_text); + } + + /** + * Register inline condition of text. + * + * @param key Condition key. (NotNull) + * @param value The value of text. (Nullable) + */ + protected void registerInlineText(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueText(), COL_TEXT, J_Text, UJ_text); + } + + abstract protected ConditionValue getCValueText(); + + /** Column db name of value. */ + protected static final String COL_VALUE = "VALUE"; + + /** Column java name of value. */ + protected static final String J_Value = "Value"; + + /** Column uncapitalised java name of value. */ + protected static final String UJ_value = "value"; + + /** + * Set the value of value using equal. { = } + * + * @param value The value of value as equal. + */ + public void setValue_Equal(java.math.BigDecimal value) { + registerValue(ConditionKey.CK_EQUAL, value); + } + + /** + * Set the value of value using notEqual. { != } + * + * @param value The value of value as notEqual. + */ + public void setValue_NotEqual(java.math.BigDecimal value) { + registerValue(ConditionKey.CK_NOT_EQUAL, value); + } + + /** + * Set the value of value using greaterThan. { > } + * + * @param value The value of value as greaterThan. + */ + public void setValue_GreaterThan(java.math.BigDecimal value) { + registerValue(ConditionKey.CK_GREATER_THAN, value); + } + + /** + * Set the value of value using lessThan. { < } + * + * @param value The value of value as lessThan. + */ + public void setValue_LessThan(java.math.BigDecimal value) { + registerValue(ConditionKey.CK_LESS_THAN, value); + } + + /** + * Set the value of value using greaterEqual. { >= } + * + * @param value The value of value as greaterEqual. + */ + public void setValue_GreaterEqual(java.math.BigDecimal value) { + registerValue(ConditionKey.CK_GREATER_EQUAL, value); + } + + /** + * Set the value of value using lessEqual. { <= } + * + * @param value The value of value as lessEqual. + */ + public void setValue_LessEqual(java.math.BigDecimal value) { + registerValue(ConditionKey.CK_LESS_EQUAL, value); + } + + /** + * Set the value of value using inScope. { in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param valueList The value of value as inScope. + */ + public void setValue_InScope(java.util.List valueList) { + registerValue(ConditionKey.CK_IN_SCOPE, valueList); + } + + /** + * Set the value of value using notInScope. { not in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param valueList The value of value as notInScope. + */ + public void setValue_NotInScope(java.util.List valueList) { + registerValue(ConditionKey.CK_NOT_IN_SCOPE, valueList); + } + + /** + * Register condition of value. + * + * @param key Condition key. (NotNull) + * @param value The value of value. (Nullable) + */ + protected void registerValue(ConditionKey key, Object value) { + registerQuery(key, value, getCValueValue(), COL_VALUE, J_Value, UJ_value); + } + + /** + * Register inline condition of value. + * + * @param key Condition key. (NotNull) + * @param value The value of value. (Nullable) + */ + protected void registerInlineValue(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueValue(), COL_VALUE, J_Value, UJ_value); + } + + abstract protected ConditionValue getCValueValue(); + + /** Column db name of otClass. */ + protected static final String COL_OT_CLASS = "OT_CLASS"; + + /** Column java name of otClass. */ + protected static final String J_OtClass = "OtClass"; + + /** Column uncapitalised java name of otClass. */ + protected static final String UJ_otClass = "otClass"; + + /** + * Set the value of otClass using equal. { = } + * If the value is null or empty-string, this condition is ignored. + * + * @param otClass The value of otClass as equal. + */ + public void setOtClass_Equal(String otClass) { + registerOtClass(ConditionKey.CK_EQUAL, filterRemoveEmptyString(otClass)); + } + + /** + * Set the value of otClass using notEqual. { != } + * If the value is null or empty-string, this condition is ignored. + * + * @param otClass The value of otClass as notEqual. + */ + public void setOtClass_NotEqual(String otClass) { + registerOtClass(ConditionKey.CK_NOT_EQUAL, filterRemoveEmptyString(otClass)); + } + + /** + * Set the value of otClass using greaterThan. { > } + * If the value is null or empty-string, this condition is ignored. + * + * @param otClass The value of otClass as greaterThan. + */ + public void setOtClass_GreaterThan(String otClass) { + registerOtClass(ConditionKey.CK_GREATER_THAN, filterRemoveEmptyString(otClass)); + } + + /** + * Set the value of otClass using lessThan. { < } + * If the value is null or empty-string, this condition is ignored. + * + * @param otClass The value of otClass as lessThan. + */ + public void setOtClass_LessThan(String otClass) { + registerOtClass(ConditionKey.CK_LESS_THAN, filterRemoveEmptyString(otClass)); + } + + /** + * Set the value of otClass using greaterEqual. { >= } + * If the value is null or empty-string, this condition is ignored. + * + * @param otClass The value of otClass as greaterEqual. + */ + public void setOtClass_GreaterEqual(String otClass) { + registerOtClass(ConditionKey.CK_GREATER_EQUAL, filterRemoveEmptyString(otClass)); + } + + /** + * Set the value of otClass using lessEqual. { <= } + * If the value is null or empty-string, this condition is ignored. + * + * @param otClass The value of otClass as lessEqual. + */ + public void setOtClass_LessEqual(String otClass) { + registerOtClass(ConditionKey.CK_LESS_EQUAL, filterRemoveEmptyString(otClass)); + } + + /** + * Set the value of otClass using prefixSearch. { like 'xxx%' } + * If the value is null or empty-string, this condition is ignored. + * + * @param otClass The value of otClass as prefixSearch. + */ + public void setOtClass_PrefixSearch(String otClass) { + registerOtClass(ConditionKey.CK_PREFIX_SEARCH, filterRemoveEmptyString(otClass)); + } + + /** + * Set the value of otClass using likeSearch. { like '%xxx%' } + * If the value is null or empty-string, this condition is ignored. + * You can invoke this method several times and the conditions are set up. + * + * @param otClass The value of otClass as likeSearch. + * @param likeSearchOption Like search option. (NotNull) + */ + public void setOtClass_LikeSearch(String otClass, jp.sf.pal.pompei.allcommon.cbean.coption.LikeSearchOption likeSearchOption) { + registerLikeSearchQuery(ConditionKey.CK_LIKE_SEARCH, filterRemoveEmptyString(otClass), getCValueOtClass(), COL_OT_CLASS, J_OtClass, UJ_otClass, likeSearchOption); + } + + /** + * Set the value of otClass using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param otClassList The value of otClass as inScope. + */ + public void setOtClass_InScope(java.util.List otClassList) { + registerOtClass(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyStringFromList(otClassList)); + } + + /** + * Set the value of otClass using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param otClass The value of otClass as inScope. + */ + public void setOtClass_InScope(String otClass, jp.sf.pal.pompei.allcommon.cbean.coption.InScopeOption option) { + registerInScopeQuery(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyString(otClass), getCValueOtClass(), COL_OT_CLASS, J_OtClass, UJ_otClass, option); + } + + /** + * Set the value of otClass using notInScope. { not in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param otClassList The value of otClass as notInScope. + */ + public void setOtClass_NotInScope(java.util.List otClassList) { + registerOtClass(ConditionKey.CK_NOT_IN_SCOPE, filterRemoveEmptyStringFromList(otClassList)); + } + + /** + * Register condition of otClass. + * + * @param key Condition key. (NotNull) + * @param value The value of otClass. (Nullable) + */ + protected void registerOtClass(ConditionKey key, Object value) { + registerQuery(key, value, getCValueOtClass(), COL_OT_CLASS, J_OtClass, UJ_otClass); + } + + /** + * Register inline condition of otClass. + * + * @param key Condition key. (NotNull) + * @param value The value of otClass. (Nullable) + */ + protected void registerInlineOtClass(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueOtClass(), COL_OT_CLASS, J_OtClass, UJ_otClass); + } + + abstract protected ConditionValue getCValueOtClass(); + + /** Column db name of sortOrder. */ + protected static final String COL_SORT_ORDER = "SORT_ORDER"; + + /** Column java name of sortOrder. */ + protected static final String J_SortOrder = "SortOrder"; + + /** Column uncapitalised java name of sortOrder. */ + protected static final String UJ_sortOrder = "sortOrder"; + + /** + * Set the value of sortOrder using equal. { = } + * + * @param sortOrder The value of sortOrder as equal. + */ + public void setSortOrder_Equal(java.math.BigDecimal sortOrder) { + registerSortOrder(ConditionKey.CK_EQUAL, sortOrder); + } + + /** + * Set the value of sortOrder using notEqual. { != } + * + * @param sortOrder The value of sortOrder as notEqual. + */ + public void setSortOrder_NotEqual(java.math.BigDecimal sortOrder) { + registerSortOrder(ConditionKey.CK_NOT_EQUAL, sortOrder); + } + + /** + * Set the value of sortOrder using greaterThan. { > } + * + * @param sortOrder The value of sortOrder as greaterThan. + */ + public void setSortOrder_GreaterThan(java.math.BigDecimal sortOrder) { + registerSortOrder(ConditionKey.CK_GREATER_THAN, sortOrder); + } + + /** + * Set the value of sortOrder using lessThan. { < } + * + * @param sortOrder The value of sortOrder as lessThan. + */ + public void setSortOrder_LessThan(java.math.BigDecimal sortOrder) { + registerSortOrder(ConditionKey.CK_LESS_THAN, sortOrder); + } + + /** + * Set the value of sortOrder using greaterEqual. { >= } + * + * @param sortOrder The value of sortOrder as greaterEqual. + */ + public void setSortOrder_GreaterEqual(java.math.BigDecimal sortOrder) { + registerSortOrder(ConditionKey.CK_GREATER_EQUAL, sortOrder); + } + + /** + * Set the value of sortOrder using lessEqual. { <= } + * + * @param sortOrder The value of sortOrder as lessEqual. + */ + public void setSortOrder_LessEqual(java.math.BigDecimal sortOrder) { + registerSortOrder(ConditionKey.CK_LESS_EQUAL, sortOrder); + } + + /** + * Set the value of sortOrder using inScope. { in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param sortOrderList The value of sortOrder as inScope. + */ + public void setSortOrder_InScope(java.util.List sortOrderList) { + registerSortOrder(ConditionKey.CK_IN_SCOPE, sortOrderList); + } + + /** + * Set the value of sortOrder using notInScope. { not in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param sortOrderList The value of sortOrder as notInScope. + */ + public void setSortOrder_NotInScope(java.util.List sortOrderList) { + registerSortOrder(ConditionKey.CK_NOT_IN_SCOPE, sortOrderList); + } + + /** + * Register condition of sortOrder. + * + * @param key Condition key. (NotNull) + * @param value The value of sortOrder. (Nullable) + */ + protected void registerSortOrder(ConditionKey key, Object value) { + registerQuery(key, value, getCValueSortOrder(), COL_SORT_ORDER, J_SortOrder, UJ_sortOrder); + } + + /** + * Register inline condition of sortOrder. + * + * @param key Condition key. (NotNull) + * @param value The value of sortOrder. (Nullable) + */ + protected void registerInlineSortOrder(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueSortOrder(), COL_SORT_ORDER, J_SortOrder, UJ_sortOrder); + } + + abstract protected ConditionValue getCValueSortOrder(); + + // =================================================================================== + // Basic Override + // ============== + /** + * This method overrides the method that is declared at super. + * + * @return Clause string. (NotNull) + */ + public String toString() { + return getSqlClause().getClause(); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/AbstractBsProductsAttributesCQ.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/AbstractBsProductsAttributesCQ.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/AbstractBsProductsAttributesCQ.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,734 @@ + +package jp.sf.pal.pompei.cbean.cq.bs; + + + +import jp.sf.pal.pompei.allcommon.cbean.*; +import jp.sf.pal.pompei.allcommon.cbean.ckey.*; +import jp.sf.pal.pompei.allcommon.cbean.cvalue.ConditionValue; +import jp.sf.pal.pompei.allcommon.cbean.sqlclause.SqlClause; +import jp.sf.pal.pompei.cbean.cq.*; + +/** + * The condition-query of PRODUCTS_ATTRIBUTES. + * + * @author DBFlute(AutoGenerator) + */ +public abstract class AbstractBsProductsAttributesCQ extends AbstractConditionQuery { + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param childQuery Child query as abstract class. (Nullable: If null, this is base instance.) + * @param sqlClause SQL clause instance. (NotNull) + * @param aliasName My alias name. (NotNull) + * @param nestLevel Nest level. + */ + public AbstractBsProductsAttributesCQ(ConditionQuery childQuery, SqlClause sqlClause, String aliasName, int nestLevel) { + super(childQuery, sqlClause, aliasName, nestLevel); + } + + // =================================================================================== + // Table Name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + final public String getTableDbName() { + return "PRODUCTS_ATTRIBUTES"; + } + + // =================================================================================== + // Query + // ===== + + // /* * * * * * * * * * * * * * * * * * * * * * * + // MyTable = [PRODUCTS_ATTRIBUTES] + // * * * * * * * * */ + + + /** Column db name of productsAttributesId. */ + protected static final String COL_PRODUCTS_ATTRIBUTES_ID = "PRODUCTS_ATTRIBUTES_ID"; + + /** Column java name of productsAttributesId. */ + protected static final String J_ProductsAttributesId = "ProductsAttributesId"; + + /** Column uncapitalised java name of productsAttributesId. */ + protected static final String UJ_productsAttributesId = "productsAttributesId"; + + /** + * Set the value of productsAttributesId using equal. { = } + * + * @param productsAttributesId The value of productsAttributesId as equal. + */ + public void setProductsAttributesId_Equal(java.math.BigDecimal productsAttributesId) { + registerProductsAttributesId(ConditionKey.CK_EQUAL, productsAttributesId); + } + + /** + * Set the value of productsAttributesId using notEqual. { != } + * + * @param productsAttributesId The value of productsAttributesId as notEqual. + */ + public void setProductsAttributesId_NotEqual(java.math.BigDecimal productsAttributesId) { + registerProductsAttributesId(ConditionKey.CK_NOT_EQUAL, productsAttributesId); + } + + /** + * Set the value of productsAttributesId using greaterThan. { > } + * + * @param productsAttributesId The value of productsAttributesId as greaterThan. + */ + public void setProductsAttributesId_GreaterThan(java.math.BigDecimal productsAttributesId) { + registerProductsAttributesId(ConditionKey.CK_GREATER_THAN, productsAttributesId); + } + + /** + * Set the value of productsAttributesId using lessThan. { < } + * + * @param productsAttributesId The value of productsAttributesId as lessThan. + */ + public void setProductsAttributesId_LessThan(java.math.BigDecimal productsAttributesId) { + registerProductsAttributesId(ConditionKey.CK_LESS_THAN, productsAttributesId); + } + + /** + * Set the value of productsAttributesId using greaterEqual. { >= } + * + * @param productsAttributesId The value of productsAttributesId as greaterEqual. + */ + public void setProductsAttributesId_GreaterEqual(java.math.BigDecimal productsAttributesId) { + registerProductsAttributesId(ConditionKey.CK_GREATER_EQUAL, productsAttributesId); + } + + /** + * Set the value of productsAttributesId using lessEqual. { <= } + * + * @param productsAttributesId The value of productsAttributesId as lessEqual. + */ + public void setProductsAttributesId_LessEqual(java.math.BigDecimal productsAttributesId) { + registerProductsAttributesId(ConditionKey.CK_LESS_EQUAL, productsAttributesId); + } + + /** + * Set the value of productsAttributesId using inScope. { in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param productsAttributesIdList The value of productsAttributesId as inScope. + */ + public void setProductsAttributesId_InScope(java.util.List productsAttributesIdList) { + registerProductsAttributesId(ConditionKey.CK_IN_SCOPE, productsAttributesIdList); + } + + /** + * Set the value of productsAttributesId using notInScope. { not in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param productsAttributesIdList The value of productsAttributesId as notInScope. + */ + public void setProductsAttributesId_NotInScope(java.util.List productsAttributesIdList) { + registerProductsAttributesId(ConditionKey.CK_NOT_IN_SCOPE, productsAttributesIdList); + } + + /** + * Register condition of productsAttributesId. + * + * @param key Condition key. (NotNull) + * @param value The value of productsAttributesId. (Nullable) + */ + protected void registerProductsAttributesId(ConditionKey key, Object value) { + registerQuery(key, value, getCValueProductsAttributesId(), COL_PRODUCTS_ATTRIBUTES_ID, J_ProductsAttributesId, UJ_productsAttributesId); + } + + /** + * Register inline condition of productsAttributesId. + * + * @param key Condition key. (NotNull) + * @param value The value of productsAttributesId. (Nullable) + */ + protected void registerInlineProductsAttributesId(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueProductsAttributesId(), COL_PRODUCTS_ATTRIBUTES_ID, J_ProductsAttributesId, UJ_productsAttributesId); + } + + abstract protected ConditionValue getCValueProductsAttributesId(); + + /** Column db name of productsId. */ + protected static final String COL_PRODUCTS_ID = "PRODUCTS_ID"; + + /** Column java name of productsId. */ + protected static final String J_ProductsId = "ProductsId"; + + /** Column uncapitalised java name of productsId. */ + protected static final String UJ_productsId = "productsId"; + + /** + * Set the value of productsId using equal. { = } + * + * @param productsId The value of productsId as equal. + */ + public void setProductsId_Equal(java.math.BigDecimal productsId) { + registerProductsId(ConditionKey.CK_EQUAL, productsId); + } + + /** + * Set the value of productsId using notEqual. { != } + * + * @param productsId The value of productsId as notEqual. + */ + public void setProductsId_NotEqual(java.math.BigDecimal productsId) { + registerProductsId(ConditionKey.CK_NOT_EQUAL, productsId); + } + + /** + * Set the value of productsId using greaterThan. { > } + * + * @param productsId The value of productsId as greaterThan. + */ + public void setProductsId_GreaterThan(java.math.BigDecimal productsId) { + registerProductsId(ConditionKey.CK_GREATER_THAN, productsId); + } + + /** + * Set the value of productsId using lessThan. { < } + * + * @param productsId The value of productsId as lessThan. + */ + public void setProductsId_LessThan(java.math.BigDecimal productsId) { + registerProductsId(ConditionKey.CK_LESS_THAN, productsId); + } + + /** + * Set the value of productsId using greaterEqual. { >= } + * + * @param productsId The value of productsId as greaterEqual. + */ + public void setProductsId_GreaterEqual(java.math.BigDecimal productsId) { + registerProductsId(ConditionKey.CK_GREATER_EQUAL, productsId); + } + + /** + * Set the value of productsId using lessEqual. { <= } + * + * @param productsId The value of productsId as lessEqual. + */ + public void setProductsId_LessEqual(java.math.BigDecimal productsId) { + registerProductsId(ConditionKey.CK_LESS_EQUAL, productsId); + } + + /** + * Set the value of productsId using inScope. { in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param productsIdList The value of productsId as inScope. + */ + public void setProductsId_InScope(java.util.List productsIdList) { + registerProductsId(ConditionKey.CK_IN_SCOPE, productsIdList); + } + + /** + * Set the value of productsId using notInScope. { not in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param productsIdList The value of productsId as notInScope. + */ + public void setProductsId_NotInScope(java.util.List productsIdList) { + registerProductsId(ConditionKey.CK_NOT_IN_SCOPE, productsIdList); + } + + /** + * Register condition of productsId. + * + * @param key Condition key. (NotNull) + * @param value The value of productsId. (Nullable) + */ + protected void registerProductsId(ConditionKey key, Object value) { + registerQuery(key, value, getCValueProductsId(), COL_PRODUCTS_ID, J_ProductsId, UJ_productsId); + } + + /** + * Register inline condition of productsId. + * + * @param key Condition key. (NotNull) + * @param value The value of productsId. (Nullable) + */ + protected void registerInlineProductsId(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueProductsId(), COL_PRODUCTS_ID, J_ProductsId, UJ_productsId); + } + + abstract protected ConditionValue getCValueProductsId(); + + /** Column db name of optionsId. */ + protected static final String COL_OPTIONS_ID = "OPTIONS_ID"; + + /** Column java name of optionsId. */ + protected static final String J_OptionsId = "OptionsId"; + + /** Column uncapitalised java name of optionsId. */ + protected static final String UJ_optionsId = "optionsId"; + + /** + * Set the value of optionsId using equal. { = } + * + * @param optionsId The value of optionsId as equal. + */ + public void setOptionsId_Equal(java.math.BigDecimal optionsId) { + registerOptionsId(ConditionKey.CK_EQUAL, optionsId); + } + + /** + * Set the value of optionsId using notEqual. { != } + * + * @param optionsId The value of optionsId as notEqual. + */ + public void setOptionsId_NotEqual(java.math.BigDecimal optionsId) { + registerOptionsId(ConditionKey.CK_NOT_EQUAL, optionsId); + } + + /** + * Set the value of optionsId using greaterThan. { > } + * + * @param optionsId The value of optionsId as greaterThan. + */ + public void setOptionsId_GreaterThan(java.math.BigDecimal optionsId) { + registerOptionsId(ConditionKey.CK_GREATER_THAN, optionsId); + } + + /** + * Set the value of optionsId using lessThan. { < } + * + * @param optionsId The value of optionsId as lessThan. + */ + public void setOptionsId_LessThan(java.math.BigDecimal optionsId) { + registerOptionsId(ConditionKey.CK_LESS_THAN, optionsId); + } + + /** + * Set the value of optionsId using greaterEqual. { >= } + * + * @param optionsId The value of optionsId as greaterEqual. + */ + public void setOptionsId_GreaterEqual(java.math.BigDecimal optionsId) { + registerOptionsId(ConditionKey.CK_GREATER_EQUAL, optionsId); + } + + /** + * Set the value of optionsId using lessEqual. { <= } + * + * @param optionsId The value of optionsId as lessEqual. + */ + public void setOptionsId_LessEqual(java.math.BigDecimal optionsId) { + registerOptionsId(ConditionKey.CK_LESS_EQUAL, optionsId); + } + + /** + * Set the value of optionsId using inScope. { in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param optionsIdList The value of optionsId as inScope. + */ + public void setOptionsId_InScope(java.util.List optionsIdList) { + registerOptionsId(ConditionKey.CK_IN_SCOPE, optionsIdList); + } + + /** + * Set the value of optionsId using notInScope. { not in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param optionsIdList The value of optionsId as notInScope. + */ + public void setOptionsId_NotInScope(java.util.List optionsIdList) { + registerOptionsId(ConditionKey.CK_NOT_IN_SCOPE, optionsIdList); + } + + /** + * Register condition of optionsId. + * + * @param key Condition key. (NotNull) + * @param value The value of optionsId. (Nullable) + */ + protected void registerOptionsId(ConditionKey key, Object value) { + registerQuery(key, value, getCValueOptionsId(), COL_OPTIONS_ID, J_OptionsId, UJ_optionsId); + } + + /** + * Register inline condition of optionsId. + * + * @param key Condition key. (NotNull) + * @param value The value of optionsId. (Nullable) + */ + protected void registerInlineOptionsId(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueOptionsId(), COL_OPTIONS_ID, J_OptionsId, UJ_optionsId); + } + + abstract protected ConditionValue getCValueOptionsId(); + + /** Column db name of optionsValuesId. */ + protected static final String COL_OPTIONS_VALUES_ID = "OPTIONS_VALUES_ID"; + + /** Column java name of optionsValuesId. */ + protected static final String J_OptionsValuesId = "OptionsValuesId"; + + /** Column uncapitalised java name of optionsValuesId. */ + protected static final String UJ_optionsValuesId = "optionsValuesId"; + + /** + * Set the value of optionsValuesId using equal. { = } + * + * @param optionsValuesId The value of optionsValuesId as equal. + */ + public void setOptionsValuesId_Equal(java.math.BigDecimal optionsValuesId) { + registerOptionsValuesId(ConditionKey.CK_EQUAL, optionsValuesId); + } + + /** + * Set the value of optionsValuesId using notEqual. { != } + * + * @param optionsValuesId The value of optionsValuesId as notEqual. + */ + public void setOptionsValuesId_NotEqual(java.math.BigDecimal optionsValuesId) { + registerOptionsValuesId(ConditionKey.CK_NOT_EQUAL, optionsValuesId); + } + + /** + * Set the value of optionsValuesId using greaterThan. { > } + * + * @param optionsValuesId The value of optionsValuesId as greaterThan. + */ + public void setOptionsValuesId_GreaterThan(java.math.BigDecimal optionsValuesId) { + registerOptionsValuesId(ConditionKey.CK_GREATER_THAN, optionsValuesId); + } + + /** + * Set the value of optionsValuesId using lessThan. { < } + * + * @param optionsValuesId The value of optionsValuesId as lessThan. + */ + public void setOptionsValuesId_LessThan(java.math.BigDecimal optionsValuesId) { + registerOptionsValuesId(ConditionKey.CK_LESS_THAN, optionsValuesId); + } + + /** + * Set the value of optionsValuesId using greaterEqual. { >= } + * + * @param optionsValuesId The value of optionsValuesId as greaterEqual. + */ + public void setOptionsValuesId_GreaterEqual(java.math.BigDecimal optionsValuesId) { + registerOptionsValuesId(ConditionKey.CK_GREATER_EQUAL, optionsValuesId); + } + + /** + * Set the value of optionsValuesId using lessEqual. { <= } + * + * @param optionsValuesId The value of optionsValuesId as lessEqual. + */ + public void setOptionsValuesId_LessEqual(java.math.BigDecimal optionsValuesId) { + registerOptionsValuesId(ConditionKey.CK_LESS_EQUAL, optionsValuesId); + } + + /** + * Set the value of optionsValuesId using inScope. { in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param optionsValuesIdList The value of optionsValuesId as inScope. + */ + public void setOptionsValuesId_InScope(java.util.List optionsValuesIdList) { + registerOptionsValuesId(ConditionKey.CK_IN_SCOPE, optionsValuesIdList); + } + + /** + * Set the value of optionsValuesId using notInScope. { not in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param optionsValuesIdList The value of optionsValuesId as notInScope. + */ + public void setOptionsValuesId_NotInScope(java.util.List optionsValuesIdList) { + registerOptionsValuesId(ConditionKey.CK_NOT_IN_SCOPE, optionsValuesIdList); + } + + /** + * Register condition of optionsValuesId. + * + * @param key Condition key. (NotNull) + * @param value The value of optionsValuesId. (Nullable) + */ + protected void registerOptionsValuesId(ConditionKey key, Object value) { + registerQuery(key, value, getCValueOptionsValuesId(), COL_OPTIONS_VALUES_ID, J_OptionsValuesId, UJ_optionsValuesId); + } + + /** + * Register inline condition of optionsValuesId. + * + * @param key Condition key. (NotNull) + * @param value The value of optionsValuesId. (Nullable) + */ + protected void registerInlineOptionsValuesId(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueOptionsValuesId(), COL_OPTIONS_VALUES_ID, J_OptionsValuesId, UJ_optionsValuesId); + } + + abstract protected ConditionValue getCValueOptionsValuesId(); + + /** Column db name of optionsValuesPrice. */ + protected static final String COL_OPTIONS_VALUES_PRICE = "OPTIONS_VALUES_PRICE"; + + /** Column java name of optionsValuesPrice. */ + protected static final String J_OptionsValuesPrice = "OptionsValuesPrice"; + + /** Column uncapitalised java name of optionsValuesPrice. */ + protected static final String UJ_optionsValuesPrice = "optionsValuesPrice"; + + /** + * Set the value of optionsValuesPrice using equal. { = } + * + * @param optionsValuesPrice The value of optionsValuesPrice as equal. + */ + public void setOptionsValuesPrice_Equal(java.math.BigDecimal optionsValuesPrice) { + registerOptionsValuesPrice(ConditionKey.CK_EQUAL, optionsValuesPrice); + } + + /** + * Set the value of optionsValuesPrice using notEqual. { != } + * + * @param optionsValuesPrice The value of optionsValuesPrice as notEqual. + */ + public void setOptionsValuesPrice_NotEqual(java.math.BigDecimal optionsValuesPrice) { + registerOptionsValuesPrice(ConditionKey.CK_NOT_EQUAL, optionsValuesPrice); + } + + /** + * Set the value of optionsValuesPrice using greaterThan. { > } + * + * @param optionsValuesPrice The value of optionsValuesPrice as greaterThan. + */ + public void setOptionsValuesPrice_GreaterThan(java.math.BigDecimal optionsValuesPrice) { + registerOptionsValuesPrice(ConditionKey.CK_GREATER_THAN, optionsValuesPrice); + } + + /** + * Set the value of optionsValuesPrice using lessThan. { < } + * + * @param optionsValuesPrice The value of optionsValuesPrice as lessThan. + */ + public void setOptionsValuesPrice_LessThan(java.math.BigDecimal optionsValuesPrice) { + registerOptionsValuesPrice(ConditionKey.CK_LESS_THAN, optionsValuesPrice); + } + + /** + * Set the value of optionsValuesPrice using greaterEqual. { >= } + * + * @param optionsValuesPrice The value of optionsValuesPrice as greaterEqual. + */ + public void setOptionsValuesPrice_GreaterEqual(java.math.BigDecimal optionsValuesPrice) { + registerOptionsValuesPrice(ConditionKey.CK_GREATER_EQUAL, optionsValuesPrice); + } + + /** + * Set the value of optionsValuesPrice using lessEqual. { <= } + * + * @param optionsValuesPrice The value of optionsValuesPrice as lessEqual. + */ + public void setOptionsValuesPrice_LessEqual(java.math.BigDecimal optionsValuesPrice) { + registerOptionsValuesPrice(ConditionKey.CK_LESS_EQUAL, optionsValuesPrice); + } + + /** + * Set the value of optionsValuesPrice using inScope. { in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param optionsValuesPriceList The value of optionsValuesPrice as inScope. + */ + public void setOptionsValuesPrice_InScope(java.util.List optionsValuesPriceList) { + registerOptionsValuesPrice(ConditionKey.CK_IN_SCOPE, optionsValuesPriceList); + } + + /** + * Set the value of optionsValuesPrice using notInScope. { not in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param optionsValuesPriceList The value of optionsValuesPrice as notInScope. + */ + public void setOptionsValuesPrice_NotInScope(java.util.List optionsValuesPriceList) { + registerOptionsValuesPrice(ConditionKey.CK_NOT_IN_SCOPE, optionsValuesPriceList); + } + + /** + * Register condition of optionsValuesPrice. + * + * @param key Condition key. (NotNull) + * @param value The value of optionsValuesPrice. (Nullable) + */ + protected void registerOptionsValuesPrice(ConditionKey key, Object value) { + registerQuery(key, value, getCValueOptionsValuesPrice(), COL_OPTIONS_VALUES_PRICE, J_OptionsValuesPrice, UJ_optionsValuesPrice); + } + + /** + * Register inline condition of optionsValuesPrice. + * + * @param key Condition key. (NotNull) + * @param value The value of optionsValuesPrice. (Nullable) + */ + protected void registerInlineOptionsValuesPrice(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueOptionsValuesPrice(), COL_OPTIONS_VALUES_PRICE, J_OptionsValuesPrice, UJ_optionsValuesPrice); + } + + abstract protected ConditionValue getCValueOptionsValuesPrice(); + + /** Column db name of pricePrefix. */ + protected static final String COL_PRICE_PREFIX = "PRICE_PREFIX"; + + /** Column java name of pricePrefix. */ + protected static final String J_PricePrefix = "PricePrefix"; + + /** Column uncapitalised java name of pricePrefix. */ + protected static final String UJ_pricePrefix = "pricePrefix"; + + /** + * Set the value of pricePrefix using equal. { = } + * If the value is null or empty-string, this condition is ignored. + * + * @param pricePrefix The value of pricePrefix as equal. + */ + public void setPricePrefix_Equal(String pricePrefix) { + registerPricePrefix(ConditionKey.CK_EQUAL, filterRemoveEmptyString(pricePrefix)); + } + + /** + * Set the value of pricePrefix using notEqual. { != } + * If the value is null or empty-string, this condition is ignored. + * + * @param pricePrefix The value of pricePrefix as notEqual. + */ + public void setPricePrefix_NotEqual(String pricePrefix) { + registerPricePrefix(ConditionKey.CK_NOT_EQUAL, filterRemoveEmptyString(pricePrefix)); + } + + /** + * Set the value of pricePrefix using greaterThan. { > } + * If the value is null or empty-string, this condition is ignored. + * + * @param pricePrefix The value of pricePrefix as greaterThan. + */ + public void setPricePrefix_GreaterThan(String pricePrefix) { + registerPricePrefix(ConditionKey.CK_GREATER_THAN, filterRemoveEmptyString(pricePrefix)); + } + + /** + * Set the value of pricePrefix using lessThan. { < } + * If the value is null or empty-string, this condition is ignored. + * + * @param pricePrefix The value of pricePrefix as lessThan. + */ + public void setPricePrefix_LessThan(String pricePrefix) { + registerPricePrefix(ConditionKey.CK_LESS_THAN, filterRemoveEmptyString(pricePrefix)); + } + + /** + * Set the value of pricePrefix using greaterEqual. { >= } + * If the value is null or empty-string, this condition is ignored. + * + * @param pricePrefix The value of pricePrefix as greaterEqual. + */ + public void setPricePrefix_GreaterEqual(String pricePrefix) { + registerPricePrefix(ConditionKey.CK_GREATER_EQUAL, filterRemoveEmptyString(pricePrefix)); + } + + /** + * Set the value of pricePrefix using lessEqual. { <= } + * If the value is null or empty-string, this condition is ignored. + * + * @param pricePrefix The value of pricePrefix as lessEqual. + */ + public void setPricePrefix_LessEqual(String pricePrefix) { + registerPricePrefix(ConditionKey.CK_LESS_EQUAL, filterRemoveEmptyString(pricePrefix)); + } + + /** + * Set the value of pricePrefix using prefixSearch. { like 'xxx%' } + * If the value is null or empty-string, this condition is ignored. + * + * @param pricePrefix The value of pricePrefix as prefixSearch. + */ + public void setPricePrefix_PrefixSearch(String pricePrefix) { + registerPricePrefix(ConditionKey.CK_PREFIX_SEARCH, filterRemoveEmptyString(pricePrefix)); + } + + /** + * Set the value of pricePrefix using likeSearch. { like '%xxx%' } + * If the value is null or empty-string, this condition is ignored. + * You can invoke this method several times and the conditions are set up. + * + * @param pricePrefix The value of pricePrefix as likeSearch. + * @param likeSearchOption Like search option. (NotNull) + */ + public void setPricePrefix_LikeSearch(String pricePrefix, jp.sf.pal.pompei.allcommon.cbean.coption.LikeSearchOption likeSearchOption) { + registerLikeSearchQuery(ConditionKey.CK_LIKE_SEARCH, filterRemoveEmptyString(pricePrefix), getCValuePricePrefix(), COL_PRICE_PREFIX, J_PricePrefix, UJ_pricePrefix, likeSearchOption); + } + + /** + * Set the value of pricePrefix using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param pricePrefixList The value of pricePrefix as inScope. + */ + public void setPricePrefix_InScope(java.util.List pricePrefixList) { + registerPricePrefix(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyStringFromList(pricePrefixList)); + } + + /** + * Set the value of pricePrefix using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param pricePrefix The value of pricePrefix as inScope. + */ + public void setPricePrefix_InScope(String pricePrefix, jp.sf.pal.pompei.allcommon.cbean.coption.InScopeOption option) { + registerInScopeQuery(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyString(pricePrefix), getCValuePricePrefix(), COL_PRICE_PREFIX, J_PricePrefix, UJ_pricePrefix, option); + } + + /** + * Set the value of pricePrefix using notInScope. { not in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param pricePrefixList The value of pricePrefix as notInScope. + */ + public void setPricePrefix_NotInScope(java.util.List pricePrefixList) { + registerPricePrefix(ConditionKey.CK_NOT_IN_SCOPE, filterRemoveEmptyStringFromList(pricePrefixList)); + } + + /** + * Register condition of pricePrefix. + * + * @param key Condition key. (NotNull) + * @param value The value of pricePrefix. (Nullable) + */ + protected void registerPricePrefix(ConditionKey key, Object value) { + registerQuery(key, value, getCValuePricePrefix(), COL_PRICE_PREFIX, J_PricePrefix, UJ_pricePrefix); + } + + /** + * Register inline condition of pricePrefix. + * + * @param key Condition key. (NotNull) + * @param value The value of pricePrefix. (Nullable) + */ + protected void registerInlinePricePrefix(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValuePricePrefix(), COL_PRICE_PREFIX, J_PricePrefix, UJ_pricePrefix); + } + + abstract protected ConditionValue getCValuePricePrefix(); + + // =================================================================================== + // Basic Override + // ============== + /** + * This method overrides the method that is declared at super. + * + * @return Clause string. (NotNull) + */ + public String toString() { + return getSqlClause().getClause(); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/AbstractBsProductsAttributesDownloadCQ.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/AbstractBsProductsAttributesDownloadCQ.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/AbstractBsProductsAttributesDownloadCQ.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,552 @@ + +package jp.sf.pal.pompei.cbean.cq.bs; + + + +import jp.sf.pal.pompei.allcommon.cbean.*; +import jp.sf.pal.pompei.allcommon.cbean.ckey.*; +import jp.sf.pal.pompei.allcommon.cbean.cvalue.ConditionValue; +import jp.sf.pal.pompei.allcommon.cbean.sqlclause.SqlClause; +import jp.sf.pal.pompei.cbean.cq.*; + +/** + * The condition-query of PRODUCTS_ATTRIBUTES_DOWNLOAD. + * + * @author DBFlute(AutoGenerator) + */ +public abstract class AbstractBsProductsAttributesDownloadCQ extends AbstractConditionQuery { + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param childQuery Child query as abstract class. (Nullable: If null, this is base instance.) + * @param sqlClause SQL clause instance. (NotNull) + * @param aliasName My alias name. (NotNull) + * @param nestLevel Nest level. + */ + public AbstractBsProductsAttributesDownloadCQ(ConditionQuery childQuery, SqlClause sqlClause, String aliasName, int nestLevel) { + super(childQuery, sqlClause, aliasName, nestLevel); + } + + // =================================================================================== + // Table Name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + final public String getTableDbName() { + return "PRODUCTS_ATTRIBUTES_DOWNLOAD"; + } + + // =================================================================================== + // Query + // ===== + + // /* * * * * * * * * * * * * * * * * * * * * * * + // MyTable = [PRODUCTS_ATTRIBUTES_DOWNLOAD] + // * * * * * * * * */ + + + /** Column db name of productsAttributesId. */ + protected static final String COL_PRODUCTS_ATTRIBUTES_ID = "PRODUCTS_ATTRIBUTES_ID"; + + /** Column java name of productsAttributesId. */ + protected static final String J_ProductsAttributesId = "ProductsAttributesId"; + + /** Column uncapitalised java name of productsAttributesId. */ + protected static final String UJ_productsAttributesId = "productsAttributesId"; + + /** + * Set the value of productsAttributesId using equal. { = } + * + * @param productsAttributesId The value of productsAttributesId as equal. + */ + public void setProductsAttributesId_Equal(java.math.BigDecimal productsAttributesId) { + registerProductsAttributesId(ConditionKey.CK_EQUAL, productsAttributesId); + } + + /** + * Set the value of productsAttributesId using notEqual. { != } + * + * @param productsAttributesId The value of productsAttributesId as notEqual. + */ + public void setProductsAttributesId_NotEqual(java.math.BigDecimal productsAttributesId) { + registerProductsAttributesId(ConditionKey.CK_NOT_EQUAL, productsAttributesId); + } + + /** + * Set the value of productsAttributesId using greaterThan. { > } + * + * @param productsAttributesId The value of productsAttributesId as greaterThan. + */ + public void setProductsAttributesId_GreaterThan(java.math.BigDecimal productsAttributesId) { + registerProductsAttributesId(ConditionKey.CK_GREATER_THAN, productsAttributesId); + } + + /** + * Set the value of productsAttributesId using lessThan. { < } + * + * @param productsAttributesId The value of productsAttributesId as lessThan. + */ + public void setProductsAttributesId_LessThan(java.math.BigDecimal productsAttributesId) { + registerProductsAttributesId(ConditionKey.CK_LESS_THAN, productsAttributesId); + } + + /** + * Set the value of productsAttributesId using greaterEqual. { >= } + * + * @param productsAttributesId The value of productsAttributesId as greaterEqual. + */ + public void setProductsAttributesId_GreaterEqual(java.math.BigDecimal productsAttributesId) { + registerProductsAttributesId(ConditionKey.CK_GREATER_EQUAL, productsAttributesId); + } + + /** + * Set the value of productsAttributesId using lessEqual. { <= } + * + * @param productsAttributesId The value of productsAttributesId as lessEqual. + */ + public void setProductsAttributesId_LessEqual(java.math.BigDecimal productsAttributesId) { + registerProductsAttributesId(ConditionKey.CK_LESS_EQUAL, productsAttributesId); + } + + /** + * Set the value of productsAttributesId using inScope. { in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param productsAttributesIdList The value of productsAttributesId as inScope. + */ + public void setProductsAttributesId_InScope(java.util.List productsAttributesIdList) { + registerProductsAttributesId(ConditionKey.CK_IN_SCOPE, productsAttributesIdList); + } + + /** + * Set the value of productsAttributesId using notInScope. { not in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param productsAttributesIdList The value of productsAttributesId as notInScope. + */ + public void setProductsAttributesId_NotInScope(java.util.List productsAttributesIdList) { + registerProductsAttributesId(ConditionKey.CK_NOT_IN_SCOPE, productsAttributesIdList); + } + + /** + * Register condition of productsAttributesId. + * + * @param key Condition key. (NotNull) + * @param value The value of productsAttributesId. (Nullable) + */ + protected void registerProductsAttributesId(ConditionKey key, Object value) { + registerQuery(key, value, getCValueProductsAttributesId(), COL_PRODUCTS_ATTRIBUTES_ID, J_ProductsAttributesId, UJ_productsAttributesId); + } + + /** + * Register inline condition of productsAttributesId. + * + * @param key Condition key. (NotNull) + * @param value The value of productsAttributesId. (Nullable) + */ + protected void registerInlineProductsAttributesId(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueProductsAttributesId(), COL_PRODUCTS_ATTRIBUTES_ID, J_ProductsAttributesId, UJ_productsAttributesId); + } + + abstract protected ConditionValue getCValueProductsAttributesId(); + + /** Column db name of productsAttributesFilename. */ + protected static final String COL_PRODUCTS_ATTRIBUTES_FILENAME = "PRODUCTS_ATTRIBUTES_FILENAME"; + + /** Column java name of productsAttributesFilename. */ + protected static final String J_ProductsAttributesFilename = "ProductsAttributesFilename"; + + /** Column uncapitalised java name of productsAttributesFilename. */ + protected static final String UJ_productsAttributesFilename = "productsAttributesFilename"; + + /** + * Set the value of productsAttributesFilename using equal. { = } + * If the value is null or empty-string, this condition is ignored. + * + * @param productsAttributesFilename The value of productsAttributesFilename as equal. + */ + public void setProductsAttributesFilename_Equal(String productsAttributesFilename) { + registerProductsAttributesFilename(ConditionKey.CK_EQUAL, filterRemoveEmptyString(productsAttributesFilename)); + } + + /** + * Set the value of productsAttributesFilename using notEqual. { != } + * If the value is null or empty-string, this condition is ignored. + * + * @param productsAttributesFilename The value of productsAttributesFilename as notEqual. + */ + public void setProductsAttributesFilename_NotEqual(String productsAttributesFilename) { + registerProductsAttributesFilename(ConditionKey.CK_NOT_EQUAL, filterRemoveEmptyString(productsAttributesFilename)); + } + + /** + * Set the value of productsAttributesFilename using greaterThan. { > } + * If the value is null or empty-string, this condition is ignored. + * + * @param productsAttributesFilename The value of productsAttributesFilename as greaterThan. + */ + public void setProductsAttributesFilename_GreaterThan(String productsAttributesFilename) { + registerProductsAttributesFilename(ConditionKey.CK_GREATER_THAN, filterRemoveEmptyString(productsAttributesFilename)); + } + + /** + * Set the value of productsAttributesFilename using lessThan. { < } + * If the value is null or empty-string, this condition is ignored. + * + * @param productsAttributesFilename The value of productsAttributesFilename as lessThan. + */ + public void setProductsAttributesFilename_LessThan(String productsAttributesFilename) { + registerProductsAttributesFilename(ConditionKey.CK_LESS_THAN, filterRemoveEmptyString(productsAttributesFilename)); + } + + /** + * Set the value of productsAttributesFilename using greaterEqual. { >= } + * If the value is null or empty-string, this condition is ignored. + * + * @param productsAttributesFilename The value of productsAttributesFilename as greaterEqual. + */ + public void setProductsAttributesFilename_GreaterEqual(String productsAttributesFilename) { + registerProductsAttributesFilename(ConditionKey.CK_GREATER_EQUAL, filterRemoveEmptyString(productsAttributesFilename)); + } + + /** + * Set the value of productsAttributesFilename using lessEqual. { <= } + * If the value is null or empty-string, this condition is ignored. + * + * @param productsAttributesFilename The value of productsAttributesFilename as lessEqual. + */ + public void setProductsAttributesFilename_LessEqual(String productsAttributesFilename) { + registerProductsAttributesFilename(ConditionKey.CK_LESS_EQUAL, filterRemoveEmptyString(productsAttributesFilename)); + } + + /** + * Set the value of productsAttributesFilename using prefixSearch. { like 'xxx%' } + * If the value is null or empty-string, this condition is ignored. + * + * @param productsAttributesFilename The value of productsAttributesFilename as prefixSearch. + */ + public void setProductsAttributesFilename_PrefixSearch(String productsAttributesFilename) { + registerProductsAttributesFilename(ConditionKey.CK_PREFIX_SEARCH, filterRemoveEmptyString(productsAttributesFilename)); + } + + /** + * Set the value of productsAttributesFilename using likeSearch. { like '%xxx%' } + * If the value is null or empty-string, this condition is ignored. + * You can invoke this method several times and the conditions are set up. + * + * @param productsAttributesFilename The value of productsAttributesFilename as likeSearch. + * @param likeSearchOption Like search option. (NotNull) + */ + public void setProductsAttributesFilename_LikeSearch(String productsAttributesFilename, jp.sf.pal.pompei.allcommon.cbean.coption.LikeSearchOption likeSearchOption) { + registerLikeSearchQuery(ConditionKey.CK_LIKE_SEARCH, filterRemoveEmptyString(productsAttributesFilename), getCValueProductsAttributesFilename(), COL_PRODUCTS_ATTRIBUTES_FILENAME, J_ProductsAttributesFilename, UJ_productsAttributesFilename, likeSearchOption); + } + + /** + * Set the value of productsAttributesFilename using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param productsAttributesFilenameList The value of productsAttributesFilename as inScope. + */ + public void setProductsAttributesFilename_InScope(java.util.List productsAttributesFilenameList) { + registerProductsAttributesFilename(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyStringFromList(productsAttributesFilenameList)); + } + + /** + * Set the value of productsAttributesFilename using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param productsAttributesFilename The value of productsAttributesFilename as inScope. + */ + public void setProductsAttributesFilename_InScope(String productsAttributesFilename, jp.sf.pal.pompei.allcommon.cbean.coption.InScopeOption option) { + registerInScopeQuery(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyString(productsAttributesFilename), getCValueProductsAttributesFilename(), COL_PRODUCTS_ATTRIBUTES_FILENAME, J_ProductsAttributesFilename, UJ_productsAttributesFilename, option); + } + + /** + * Set the value of productsAttributesFilename using notInScope. { not in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param productsAttributesFilenameList The value of productsAttributesFilename as notInScope. + */ + public void setProductsAttributesFilename_NotInScope(java.util.List productsAttributesFilenameList) { + registerProductsAttributesFilename(ConditionKey.CK_NOT_IN_SCOPE, filterRemoveEmptyStringFromList(productsAttributesFilenameList)); + } + + /** + * Register condition of productsAttributesFilename. + * + * @param key Condition key. (NotNull) + * @param value The value of productsAttributesFilename. (Nullable) + */ + protected void registerProductsAttributesFilename(ConditionKey key, Object value) { + registerQuery(key, value, getCValueProductsAttributesFilename(), COL_PRODUCTS_ATTRIBUTES_FILENAME, J_ProductsAttributesFilename, UJ_productsAttributesFilename); + } + + /** + * Register inline condition of productsAttributesFilename. + * + * @param key Condition key. (NotNull) + * @param value The value of productsAttributesFilename. (Nullable) + */ + protected void registerInlineProductsAttributesFilename(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueProductsAttributesFilename(), COL_PRODUCTS_ATTRIBUTES_FILENAME, J_ProductsAttributesFilename, UJ_productsAttributesFilename); + } + + abstract protected ConditionValue getCValueProductsAttributesFilename(); + + /** Column db name of productsAttributesMaxdays. */ + protected static final String COL_PRODUCTS_ATTRIBUTES_MAXDAYS = "PRODUCTS_ATTRIBUTES_MAXDAYS"; + + /** Column java name of productsAttributesMaxdays. */ + protected static final String J_ProductsAttributesMaxdays = "ProductsAttributesMaxdays"; + + /** Column uncapitalised java name of productsAttributesMaxdays. */ + protected static final String UJ_productsAttributesMaxdays = "productsAttributesMaxdays"; + + /** + * Set the value of productsAttributesMaxdays using equal. { = } + * + * @param productsAttributesMaxdays The value of productsAttributesMaxdays as equal. + */ + public void setProductsAttributesMaxdays_Equal(java.math.BigDecimal productsAttributesMaxdays) { + registerProductsAttributesMaxdays(ConditionKey.CK_EQUAL, productsAttributesMaxdays); + } + + /** + * Set the value of productsAttributesMaxdays using notEqual. { != } + * + * @param productsAttributesMaxdays The value of productsAttributesMaxdays as notEqual. + */ + public void setProductsAttributesMaxdays_NotEqual(java.math.BigDecimal productsAttributesMaxdays) { + registerProductsAttributesMaxdays(ConditionKey.CK_NOT_EQUAL, productsAttributesMaxdays); + } + + /** + * Set the value of productsAttributesMaxdays using greaterThan. { > } + * + * @param productsAttributesMaxdays The value of productsAttributesMaxdays as greaterThan. + */ + public void setProductsAttributesMaxdays_GreaterThan(java.math.BigDecimal productsAttributesMaxdays) { + registerProductsAttributesMaxdays(ConditionKey.CK_GREATER_THAN, productsAttributesMaxdays); + } + + /** + * Set the value of productsAttributesMaxdays using lessThan. { < } + * + * @param productsAttributesMaxdays The value of productsAttributesMaxdays as lessThan. + */ + public void setProductsAttributesMaxdays_LessThan(java.math.BigDecimal productsAttributesMaxdays) { + registerProductsAttributesMaxdays(ConditionKey.CK_LESS_THAN, productsAttributesMaxdays); + } + + /** + * Set the value of productsAttributesMaxdays using greaterEqual. { >= } + * + * @param productsAttributesMaxdays The value of productsAttributesMaxdays as greaterEqual. + */ + public void setProductsAttributesMaxdays_GreaterEqual(java.math.BigDecimal productsAttributesMaxdays) { + registerProductsAttributesMaxdays(ConditionKey.CK_GREATER_EQUAL, productsAttributesMaxdays); + } + + /** + * Set the value of productsAttributesMaxdays using lessEqual. { <= } + * + * @param productsAttributesMaxdays The value of productsAttributesMaxdays as lessEqual. + */ + public void setProductsAttributesMaxdays_LessEqual(java.math.BigDecimal productsAttributesMaxdays) { + registerProductsAttributesMaxdays(ConditionKey.CK_LESS_EQUAL, productsAttributesMaxdays); + } + + /** + * Set the value of productsAttributesMaxdays using inScope. { in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param productsAttributesMaxdaysList The value of productsAttributesMaxdays as inScope. + */ + public void setProductsAttributesMaxdays_InScope(java.util.List productsAttributesMaxdaysList) { + registerProductsAttributesMaxdays(ConditionKey.CK_IN_SCOPE, productsAttributesMaxdaysList); + } + + /** + * Set the value of productsAttributesMaxdays using notInScope. { not in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param productsAttributesMaxdaysList The value of productsAttributesMaxdays as notInScope. + */ + public void setProductsAttributesMaxdays_NotInScope(java.util.List productsAttributesMaxdaysList) { + registerProductsAttributesMaxdays(ConditionKey.CK_NOT_IN_SCOPE, productsAttributesMaxdaysList); + } + + /** + * Set the value of productsAttributesMaxdays using isNull. { is null } + */ + public void setProductsAttributesMaxdays_IsNull() { + registerProductsAttributesMaxdays(ConditionKey.CK_IS_NULL, DUMMY_OBJECT); + } + + /** + * Set the value of productsAttributesMaxdays using isNotNull. { is not null } + */ + public void setProductsAttributesMaxdays_IsNotNull() { + registerProductsAttributesMaxdays(ConditionKey.CK_IS_NOT_NULL, DUMMY_OBJECT); + } + + /** + * Register condition of productsAttributesMaxdays. + * + * @param key Condition key. (NotNull) + * @param value The value of productsAttributesMaxdays. (Nullable) + */ + protected void registerProductsAttributesMaxdays(ConditionKey key, Object value) { + registerQuery(key, value, getCValueProductsAttributesMaxdays(), COL_PRODUCTS_ATTRIBUTES_MAXDAYS, J_ProductsAttributesMaxdays, UJ_productsAttributesMaxdays); + } + + /** + * Register inline condition of productsAttributesMaxdays. + * + * @param key Condition key. (NotNull) + * @param value The value of productsAttributesMaxdays. (Nullable) + */ + protected void registerInlineProductsAttributesMaxdays(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueProductsAttributesMaxdays(), COL_PRODUCTS_ATTRIBUTES_MAXDAYS, J_ProductsAttributesMaxdays, UJ_productsAttributesMaxdays); + } + + abstract protected ConditionValue getCValueProductsAttributesMaxdays(); + + /** Column db name of productsAttributesMaxcount. */ + protected static final String COL_PRODUCTS_ATTRIBUTES_MAXCOUNT = "PRODUCTS_ATTRIBUTES_MAXCOUNT"; + + /** Column java name of productsAttributesMaxcount. */ + protected static final String J_ProductsAttributesMaxcount = "ProductsAttributesMaxcount"; + + /** Column uncapitalised java name of productsAttributesMaxcount. */ + protected static final String UJ_productsAttributesMaxcount = "productsAttributesMaxcount"; + + /** + * Set the value of productsAttributesMaxcount using equal. { = } + * + * @param productsAttributesMaxcount The value of productsAttributesMaxcount as equal. + */ + public void setProductsAttributesMaxcount_Equal(java.math.BigDecimal productsAttributesMaxcount) { + registerProductsAttributesMaxcount(ConditionKey.CK_EQUAL, productsAttributesMaxcount); + } + + /** + * Set the value of productsAttributesMaxcount using notEqual. { != } + * + * @param productsAttributesMaxcount The value of productsAttributesMaxcount as notEqual. + */ + public void setProductsAttributesMaxcount_NotEqual(java.math.BigDecimal productsAttributesMaxcount) { + registerProductsAttributesMaxcount(ConditionKey.CK_NOT_EQUAL, productsAttributesMaxcount); + } + + /** + * Set the value of productsAttributesMaxcount using greaterThan. { > } + * + * @param productsAttributesMaxcount The value of productsAttributesMaxcount as greaterThan. + */ + public void setProductsAttributesMaxcount_GreaterThan(java.math.BigDecimal productsAttributesMaxcount) { + registerProductsAttributesMaxcount(ConditionKey.CK_GREATER_THAN, productsAttributesMaxcount); + } + + /** + * Set the value of productsAttributesMaxcount using lessThan. { < } + * + * @param productsAttributesMaxcount The value of productsAttributesMaxcount as lessThan. + */ + public void setProductsAttributesMaxcount_LessThan(java.math.BigDecimal productsAttributesMaxcount) { + registerProductsAttributesMaxcount(ConditionKey.CK_LESS_THAN, productsAttributesMaxcount); + } + + /** + * Set the value of productsAttributesMaxcount using greaterEqual. { >= } + * + * @param productsAttributesMaxcount The value of productsAttributesMaxcount as greaterEqual. + */ + public void setProductsAttributesMaxcount_GreaterEqual(java.math.BigDecimal productsAttributesMaxcount) { + registerProductsAttributesMaxcount(ConditionKey.CK_GREATER_EQUAL, productsAttributesMaxcount); + } + + /** + * Set the value of productsAttributesMaxcount using lessEqual. { <= } + * + * @param productsAttributesMaxcount The value of productsAttributesMaxcount as lessEqual. + */ + public void setProductsAttributesMaxcount_LessEqual(java.math.BigDecimal productsAttributesMaxcount) { + registerProductsAttributesMaxcount(ConditionKey.CK_LESS_EQUAL, productsAttributesMaxcount); + } + + /** + * Set the value of productsAttributesMaxcount using inScope. { in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param productsAttributesMaxcountList The value of productsAttributesMaxcount as inScope. + */ + public void setProductsAttributesMaxcount_InScope(java.util.List productsAttributesMaxcountList) { + registerProductsAttributesMaxcount(ConditionKey.CK_IN_SCOPE, productsAttributesMaxcountList); + } + + /** + * Set the value of productsAttributesMaxcount using notInScope. { not in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param productsAttributesMaxcountList The value of productsAttributesMaxcount as notInScope. + */ + public void setProductsAttributesMaxcount_NotInScope(java.util.List productsAttributesMaxcountList) { + registerProductsAttributesMaxcount(ConditionKey.CK_NOT_IN_SCOPE, productsAttributesMaxcountList); + } + + /** + * Set the value of productsAttributesMaxcount using isNull. { is null } + */ + public void setProductsAttributesMaxcount_IsNull() { + registerProductsAttributesMaxcount(ConditionKey.CK_IS_NULL, DUMMY_OBJECT); + } + + /** + * Set the value of productsAttributesMaxcount using isNotNull. { is not null } + */ + public void setProductsAttributesMaxcount_IsNotNull() { + registerProductsAttributesMaxcount(ConditionKey.CK_IS_NOT_NULL, DUMMY_OBJECT); + } + + /** + * Register condition of productsAttributesMaxcount. + * + * @param key Condition key. (NotNull) + * @param value The value of productsAttributesMaxcount. (Nullable) + */ + protected void registerProductsAttributesMaxcount(ConditionKey key, Object value) { + registerQuery(key, value, getCValueProductsAttributesMaxcount(), COL_PRODUCTS_ATTRIBUTES_MAXCOUNT, J_ProductsAttributesMaxcount, UJ_productsAttributesMaxcount); + } + + /** + * Register inline condition of productsAttributesMaxcount. + * + * @param key Condition key. (NotNull) + * @param value The value of productsAttributesMaxcount. (Nullable) + */ + protected void registerInlineProductsAttributesMaxcount(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueProductsAttributesMaxcount(), COL_PRODUCTS_ATTRIBUTES_MAXCOUNT, J_ProductsAttributesMaxcount, UJ_productsAttributesMaxcount); + } + + abstract protected ConditionValue getCValueProductsAttributesMaxcount(); + + // =================================================================================== + // Basic Override + // ============== + /** + * This method overrides the method that is declared at super. + * + * @return Clause string. (NotNull) + */ + public String toString() { + return getSqlClause().getClause(); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/AbstractBsProductsCQ.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/AbstractBsProductsCQ.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/AbstractBsProductsCQ.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,1547 @@ + +package jp.sf.pal.pompei.cbean.cq.bs; + + + +import jp.sf.pal.pompei.allcommon.cbean.*; +import jp.sf.pal.pompei.allcommon.cbean.ckey.*; +import jp.sf.pal.pompei.allcommon.cbean.cvalue.ConditionValue; +import jp.sf.pal.pompei.allcommon.cbean.sqlclause.SqlClause; +import jp.sf.pal.pompei.cbean.cq.*; + +/** + * The condition-query of PRODUCTS. + * + * @author DBFlute(AutoGenerator) + */ +public abstract class AbstractBsProductsCQ extends AbstractConditionQuery { + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param childQuery Child query as abstract class. (Nullable: If null, this is base instance.) + * @param sqlClause SQL clause instance. (NotNull) + * @param aliasName My alias name. (NotNull) + * @param nestLevel Nest level. + */ + public AbstractBsProductsCQ(ConditionQuery childQuery, SqlClause sqlClause, String aliasName, int nestLevel) { + super(childQuery, sqlClause, aliasName, nestLevel); + } + + // =================================================================================== + // Table Name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + final public String getTableDbName() { + return "PRODUCTS"; + } + + // =================================================================================== + // Query + // ===== + + // /* * * * * * * * * * * * * * * * * * * * * * * + // MyTable = [PRODUCTS] + // * * * * * * * * */ + + + /** Column db name of productsId. */ + protected static final String COL_PRODUCTS_ID = "PRODUCTS_ID"; + + /** Column java name of productsId. */ + protected static final String J_ProductsId = "ProductsId"; + + /** Column uncapitalised java name of productsId. */ + protected static final String UJ_productsId = "productsId"; + + /** + * Set the value of productsId using equal. { = } + * + * @param productsId The value of productsId as equal. + */ + public void setProductsId_Equal(java.math.BigDecimal productsId) { + registerProductsId(ConditionKey.CK_EQUAL, productsId); + } + + /** + * Set the value of productsId using notEqual. { != } + * + * @param productsId The value of productsId as notEqual. + */ + public void setProductsId_NotEqual(java.math.BigDecimal productsId) { + registerProductsId(ConditionKey.CK_NOT_EQUAL, productsId); + } + + /** + * Set the value of productsId using greaterThan. { > } + * + * @param productsId The value of productsId as greaterThan. + */ + public void setProductsId_GreaterThan(java.math.BigDecimal productsId) { + registerProductsId(ConditionKey.CK_GREATER_THAN, productsId); + } + + /** + * Set the value of productsId using lessThan. { < } + * + * @param productsId The value of productsId as lessThan. + */ + public void setProductsId_LessThan(java.math.BigDecimal productsId) { + registerProductsId(ConditionKey.CK_LESS_THAN, productsId); + } + + /** + * Set the value of productsId using greaterEqual. { >= } + * + * @param productsId The value of productsId as greaterEqual. + */ + public void setProductsId_GreaterEqual(java.math.BigDecimal productsId) { + registerProductsId(ConditionKey.CK_GREATER_EQUAL, productsId); + } + + /** + * Set the value of productsId using lessEqual. { <= } + * + * @param productsId The value of productsId as lessEqual. + */ + public void setProductsId_LessEqual(java.math.BigDecimal productsId) { + registerProductsId(ConditionKey.CK_LESS_EQUAL, productsId); + } + + /** + * Set the value of productsId using inScope. { in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param productsIdList The value of productsId as inScope. + */ + public void setProductsId_InScope(java.util.List productsIdList) { + registerProductsId(ConditionKey.CK_IN_SCOPE, productsIdList); + } + + /** + * Set the value of productsId using notInScope. { not in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param productsIdList The value of productsId as notInScope. + */ + public void setProductsId_NotInScope(java.util.List productsIdList) { + registerProductsId(ConditionKey.CK_NOT_IN_SCOPE, productsIdList); + } + + /** + * Register condition of productsId. + * + * @param key Condition key. (NotNull) + * @param value The value of productsId. (Nullable) + */ + protected void registerProductsId(ConditionKey key, Object value) { + registerQuery(key, value, getCValueProductsId(), COL_PRODUCTS_ID, J_ProductsId, UJ_productsId); + } + + /** + * Register inline condition of productsId. + * + * @param key Condition key. (NotNull) + * @param value The value of productsId. (Nullable) + */ + protected void registerInlineProductsId(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueProductsId(), COL_PRODUCTS_ID, J_ProductsId, UJ_productsId); + } + + abstract protected ConditionValue getCValueProductsId(); + + /** Column db name of productsQuantity. */ + protected static final String COL_PRODUCTS_QUANTITY = "PRODUCTS_QUANTITY"; + + /** Column java name of productsQuantity. */ + protected static final String J_ProductsQuantity = "ProductsQuantity"; + + /** Column uncapitalised java name of productsQuantity. */ + protected static final String UJ_productsQuantity = "productsQuantity"; + + /** + * Set the value of productsQuantity using equal. { = } + * + * @param productsQuantity The value of productsQuantity as equal. + */ + public void setProductsQuantity_Equal(java.math.BigDecimal productsQuantity) { + registerProductsQuantity(ConditionKey.CK_EQUAL, productsQuantity); + } + + /** + * Set the value of productsQuantity using notEqual. { != } + * + * @param productsQuantity The value of productsQuantity as notEqual. + */ + public void setProductsQuantity_NotEqual(java.math.BigDecimal productsQuantity) { + registerProductsQuantity(ConditionKey.CK_NOT_EQUAL, productsQuantity); + } + + /** + * Set the value of productsQuantity using greaterThan. { > } + * + * @param productsQuantity The value of productsQuantity as greaterThan. + */ + public void setProductsQuantity_GreaterThan(java.math.BigDecimal productsQuantity) { + registerProductsQuantity(ConditionKey.CK_GREATER_THAN, productsQuantity); + } + + /** + * Set the value of productsQuantity using lessThan. { < } + * + * @param productsQuantity The value of productsQuantity as lessThan. + */ + public void setProductsQuantity_LessThan(java.math.BigDecimal productsQuantity) { + registerProductsQuantity(ConditionKey.CK_LESS_THAN, productsQuantity); + } + + /** + * Set the value of productsQuantity using greaterEqual. { >= } + * + * @param productsQuantity The value of productsQuantity as greaterEqual. + */ + public void setProductsQuantity_GreaterEqual(java.math.BigDecimal productsQuantity) { + registerProductsQuantity(ConditionKey.CK_GREATER_EQUAL, productsQuantity); + } + + /** + * Set the value of productsQuantity using lessEqual. { <= } + * + * @param productsQuantity The value of productsQuantity as lessEqual. + */ + public void setProductsQuantity_LessEqual(java.math.BigDecimal productsQuantity) { + registerProductsQuantity(ConditionKey.CK_LESS_EQUAL, productsQuantity); + } + + /** + * Set the value of productsQuantity using inScope. { in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param productsQuantityList The value of productsQuantity as inScope. + */ + public void setProductsQuantity_InScope(java.util.List productsQuantityList) { + registerProductsQuantity(ConditionKey.CK_IN_SCOPE, productsQuantityList); + } + + /** + * Set the value of productsQuantity using notInScope. { not in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param productsQuantityList The value of productsQuantity as notInScope. + */ + public void setProductsQuantity_NotInScope(java.util.List productsQuantityList) { + registerProductsQuantity(ConditionKey.CK_NOT_IN_SCOPE, productsQuantityList); + } + + /** + * Register condition of productsQuantity. + * + * @param key Condition key. (NotNull) + * @param value The value of productsQuantity. (Nullable) + */ + protected void registerProductsQuantity(ConditionKey key, Object value) { + registerQuery(key, value, getCValueProductsQuantity(), COL_PRODUCTS_QUANTITY, J_ProductsQuantity, UJ_productsQuantity); + } + + /** + * Register inline condition of productsQuantity. + * + * @param key Condition key. (NotNull) + * @param value The value of productsQuantity. (Nullable) + */ + protected void registerInlineProductsQuantity(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueProductsQuantity(), COL_PRODUCTS_QUANTITY, J_ProductsQuantity, UJ_productsQuantity); + } + + abstract protected ConditionValue getCValueProductsQuantity(); + + /** Column db name of productsModel. */ + protected static final String COL_PRODUCTS_MODEL = "PRODUCTS_MODEL"; + + /** Column java name of productsModel. */ + protected static final String J_ProductsModel = "ProductsModel"; + + /** Column uncapitalised java name of productsModel. */ + protected static final String UJ_productsModel = "productsModel"; + + /** + * Set the value of productsModel using equal. { = } + * If the value is null or empty-string, this condition is ignored. + * + * @param productsModel The value of productsModel as equal. + */ + public void setProductsModel_Equal(String productsModel) { + registerProductsModel(ConditionKey.CK_EQUAL, filterRemoveEmptyString(productsModel)); + } + + /** + * Set the value of productsModel using notEqual. { != } + * If the value is null or empty-string, this condition is ignored. + * + * @param productsModel The value of productsModel as notEqual. + */ + public void setProductsModel_NotEqual(String productsModel) { + registerProductsModel(ConditionKey.CK_NOT_EQUAL, filterRemoveEmptyString(productsModel)); + } + + /** + * Set the value of productsModel using greaterThan. { > } + * If the value is null or empty-string, this condition is ignored. + * + * @param productsModel The value of productsModel as greaterThan. + */ + public void setProductsModel_GreaterThan(String productsModel) { + registerProductsModel(ConditionKey.CK_GREATER_THAN, filterRemoveEmptyString(productsModel)); + } + + /** + * Set the value of productsModel using lessThan. { < } + * If the value is null or empty-string, this condition is ignored. + * + * @param productsModel The value of productsModel as lessThan. + */ + public void setProductsModel_LessThan(String productsModel) { + registerProductsModel(ConditionKey.CK_LESS_THAN, filterRemoveEmptyString(productsModel)); + } + + /** + * Set the value of productsModel using greaterEqual. { >= } + * If the value is null or empty-string, this condition is ignored. + * + * @param productsModel The value of productsModel as greaterEqual. + */ + public void setProductsModel_GreaterEqual(String productsModel) { + registerProductsModel(ConditionKey.CK_GREATER_EQUAL, filterRemoveEmptyString(productsModel)); + } + + /** + * Set the value of productsModel using lessEqual. { <= } + * If the value is null or empty-string, this condition is ignored. + * + * @param productsModel The value of productsModel as lessEqual. + */ + public void setProductsModel_LessEqual(String productsModel) { + registerProductsModel(ConditionKey.CK_LESS_EQUAL, filterRemoveEmptyString(productsModel)); + } + + /** + * Set the value of productsModel using prefixSearch. { like 'xxx%' } + * If the value is null or empty-string, this condition is ignored. + * + * @param productsModel The value of productsModel as prefixSearch. + */ + public void setProductsModel_PrefixSearch(String productsModel) { + registerProductsModel(ConditionKey.CK_PREFIX_SEARCH, filterRemoveEmptyString(productsModel)); + } + + /** + * Set the value of productsModel using likeSearch. { like '%xxx%' } + * If the value is null or empty-string, this condition is ignored. + * You can invoke this method several times and the conditions are set up. + * + * @param productsModel The value of productsModel as likeSearch. + * @param likeSearchOption Like search option. (NotNull) + */ + public void setProductsModel_LikeSearch(String productsModel, jp.sf.pal.pompei.allcommon.cbean.coption.LikeSearchOption likeSearchOption) { + registerLikeSearchQuery(ConditionKey.CK_LIKE_SEARCH, filterRemoveEmptyString(productsModel), getCValueProductsModel(), COL_PRODUCTS_MODEL, J_ProductsModel, UJ_productsModel, likeSearchOption); + } + + /** + * Set the value of productsModel using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param productsModelList The value of productsModel as inScope. + */ + public void setProductsModel_InScope(java.util.List productsModelList) { + registerProductsModel(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyStringFromList(productsModelList)); + } + + /** + * Set the value of productsModel using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param productsModel The value of productsModel as inScope. + */ + public void setProductsModel_InScope(String productsModel, jp.sf.pal.pompei.allcommon.cbean.coption.InScopeOption option) { + registerInScopeQuery(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyString(productsModel), getCValueProductsModel(), COL_PRODUCTS_MODEL, J_ProductsModel, UJ_productsModel, option); + } + + /** + * Set the value of productsModel using notInScope. { not in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param productsModelList The value of productsModel as notInScope. + */ + public void setProductsModel_NotInScope(java.util.List productsModelList) { + registerProductsModel(ConditionKey.CK_NOT_IN_SCOPE, filterRemoveEmptyStringFromList(productsModelList)); + } + + /** + * Set the value of productsModel using isNull. { is null } + */ + public void setProductsModel_IsNull() { + registerProductsModel(ConditionKey.CK_IS_NULL, DUMMY_OBJECT); + } + + /** + * Set the value of productsModel using isNotNull. { is not null } + */ + public void setProductsModel_IsNotNull() { + registerProductsModel(ConditionKey.CK_IS_NOT_NULL, DUMMY_OBJECT); + } + + /** + * Register condition of productsModel. + * + * @param key Condition key. (NotNull) + * @param value The value of productsModel. (Nullable) + */ + protected void registerProductsModel(ConditionKey key, Object value) { + registerQuery(key, value, getCValueProductsModel(), COL_PRODUCTS_MODEL, J_ProductsModel, UJ_productsModel); + } + + /** + * Register inline condition of productsModel. + * + * @param key Condition key. (NotNull) + * @param value The value of productsModel. (Nullable) + */ + protected void registerInlineProductsModel(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueProductsModel(), COL_PRODUCTS_MODEL, J_ProductsModel, UJ_productsModel); + } + + abstract protected ConditionValue getCValueProductsModel(); + + /** Column db name of productsImage. */ + protected static final String COL_PRODUCTS_IMAGE = "PRODUCTS_IMAGE"; + + /** Column java name of productsImage. */ + protected static final String J_ProductsImage = "ProductsImage"; + + /** Column uncapitalised java name of productsImage. */ + protected static final String UJ_productsImage = "productsImage"; + + /** + * Set the value of productsImage using equal. { = } + * If the value is null or empty-string, this condition is ignored. + * + * @param productsImage The value of productsImage as equal. + */ + public void setProductsImage_Equal(String productsImage) { + registerProductsImage(ConditionKey.CK_EQUAL, filterRemoveEmptyString(productsImage)); + } + + /** + * Set the value of productsImage using notEqual. { != } + * If the value is null or empty-string, this condition is ignored. + * + * @param productsImage The value of productsImage as notEqual. + */ + public void setProductsImage_NotEqual(String productsImage) { + registerProductsImage(ConditionKey.CK_NOT_EQUAL, filterRemoveEmptyString(productsImage)); + } + + /** + * Set the value of productsImage using greaterThan. { > } + * If the value is null or empty-string, this condition is ignored. + * + * @param productsImage The value of productsImage as greaterThan. + */ + public void setProductsImage_GreaterThan(String productsImage) { + registerProductsImage(ConditionKey.CK_GREATER_THAN, filterRemoveEmptyString(productsImage)); + } + + /** + * Set the value of productsImage using lessThan. { < } + * If the value is null or empty-string, this condition is ignored. + * + * @param productsImage The value of productsImage as lessThan. + */ + public void setProductsImage_LessThan(String productsImage) { + registerProductsImage(ConditionKey.CK_LESS_THAN, filterRemoveEmptyString(productsImage)); + } + + /** + * Set the value of productsImage using greaterEqual. { >= } + * If the value is null or empty-string, this condition is ignored. + * + * @param productsImage The value of productsImage as greaterEqual. + */ + public void setProductsImage_GreaterEqual(String productsImage) { + registerProductsImage(ConditionKey.CK_GREATER_EQUAL, filterRemoveEmptyString(productsImage)); + } + + /** + * Set the value of productsImage using lessEqual. { <= } + * If the value is null or empty-string, this condition is ignored. + * + * @param productsImage The value of productsImage as lessEqual. + */ + public void setProductsImage_LessEqual(String productsImage) { + registerProductsImage(ConditionKey.CK_LESS_EQUAL, filterRemoveEmptyString(productsImage)); + } + + /** + * Set the value of productsImage using prefixSearch. { like 'xxx%' } + * If the value is null or empty-string, this condition is ignored. + * + * @param productsImage The value of productsImage as prefixSearch. + */ + public void setProductsImage_PrefixSearch(String productsImage) { + registerProductsImage(ConditionKey.CK_PREFIX_SEARCH, filterRemoveEmptyString(productsImage)); + } + + /** + * Set the value of productsImage using likeSearch. { like '%xxx%' } + * If the value is null or empty-string, this condition is ignored. + * You can invoke this method several times and the conditions are set up. + * + * @param productsImage The value of productsImage as likeSearch. + * @param likeSearchOption Like search option. (NotNull) + */ + public void setProductsImage_LikeSearch(String productsImage, jp.sf.pal.pompei.allcommon.cbean.coption.LikeSearchOption likeSearchOption) { + registerLikeSearchQuery(ConditionKey.CK_LIKE_SEARCH, filterRemoveEmptyString(productsImage), getCValueProductsImage(), COL_PRODUCTS_IMAGE, J_ProductsImage, UJ_productsImage, likeSearchOption); + } + + /** + * Set the value of productsImage using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param productsImageList The value of productsImage as inScope. + */ + public void setProductsImage_InScope(java.util.List productsImageList) { + registerProductsImage(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyStringFromList(productsImageList)); + } + + /** + * Set the value of productsImage using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param productsImage The value of productsImage as inScope. + */ + public void setProductsImage_InScope(String productsImage, jp.sf.pal.pompei.allcommon.cbean.coption.InScopeOption option) { + registerInScopeQuery(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyString(productsImage), getCValueProductsImage(), COL_PRODUCTS_IMAGE, J_ProductsImage, UJ_productsImage, option); + } + + /** + * Set the value of productsImage using notInScope. { not in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param productsImageList The value of productsImage as notInScope. + */ + public void setProductsImage_NotInScope(java.util.List productsImageList) { + registerProductsImage(ConditionKey.CK_NOT_IN_SCOPE, filterRemoveEmptyStringFromList(productsImageList)); + } + + /** + * Set the value of productsImage using isNull. { is null } + */ + public void setProductsImage_IsNull() { + registerProductsImage(ConditionKey.CK_IS_NULL, DUMMY_OBJECT); + } + + /** + * Set the value of productsImage using isNotNull. { is not null } + */ + public void setProductsImage_IsNotNull() { + registerProductsImage(ConditionKey.CK_IS_NOT_NULL, DUMMY_OBJECT); + } + + /** + * Register condition of productsImage. + * + * @param key Condition key. (NotNull) + * @param value The value of productsImage. (Nullable) + */ + protected void registerProductsImage(ConditionKey key, Object value) { + registerQuery(key, value, getCValueProductsImage(), COL_PRODUCTS_IMAGE, J_ProductsImage, UJ_productsImage); + } + + /** + * Register inline condition of productsImage. + * + * @param key Condition key. (NotNull) + * @param value The value of productsImage. (Nullable) + */ + protected void registerInlineProductsImage(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueProductsImage(), COL_PRODUCTS_IMAGE, J_ProductsImage, UJ_productsImage); + } + + abstract protected ConditionValue getCValueProductsImage(); + + /** Column db name of productsPrice. */ + protected static final String COL_PRODUCTS_PRICE = "PRODUCTS_PRICE"; + + /** Column java name of productsPrice. */ + protected static final String J_ProductsPrice = "ProductsPrice"; + + /** Column uncapitalised java name of productsPrice. */ + protected static final String UJ_productsPrice = "productsPrice"; + + /** + * Set the value of productsPrice using equal. { = } + * + * @param productsPrice The value of productsPrice as equal. + */ + public void setProductsPrice_Equal(java.math.BigDecimal productsPrice) { + registerProductsPrice(ConditionKey.CK_EQUAL, productsPrice); + } + + /** + * Set the value of productsPrice using notEqual. { != } + * + * @param productsPrice The value of productsPrice as notEqual. + */ + public void setProductsPrice_NotEqual(java.math.BigDecimal productsPrice) { + registerProductsPrice(ConditionKey.CK_NOT_EQUAL, productsPrice); + } + + /** + * Set the value of productsPrice using greaterThan. { > } + * + * @param productsPrice The value of productsPrice as greaterThan. + */ + public void setProductsPrice_GreaterThan(java.math.BigDecimal productsPrice) { + registerProductsPrice(ConditionKey.CK_GREATER_THAN, productsPrice); + } + + /** + * Set the value of productsPrice using lessThan. { < } + * + * @param productsPrice The value of productsPrice as lessThan. + */ + public void setProductsPrice_LessThan(java.math.BigDecimal productsPrice) { + registerProductsPrice(ConditionKey.CK_LESS_THAN, productsPrice); + } + + /** + * Set the value of productsPrice using greaterEqual. { >= } + * + * @param productsPrice The value of productsPrice as greaterEqual. + */ + public void setProductsPrice_GreaterEqual(java.math.BigDecimal productsPrice) { + registerProductsPrice(ConditionKey.CK_GREATER_EQUAL, productsPrice); + } + + /** + * Set the value of productsPrice using lessEqual. { <= } + * + * @param productsPrice The value of productsPrice as lessEqual. + */ + public void setProductsPrice_LessEqual(java.math.BigDecimal productsPrice) { + registerProductsPrice(ConditionKey.CK_LESS_EQUAL, productsPrice); + } + + /** + * Set the value of productsPrice using inScope. { in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param productsPriceList The value of productsPrice as inScope. + */ + public void setProductsPrice_InScope(java.util.List productsPriceList) { + registerProductsPrice(ConditionKey.CK_IN_SCOPE, productsPriceList); + } + + /** + * Set the value of productsPrice using notInScope. { not in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param productsPriceList The value of productsPrice as notInScope. + */ + public void setProductsPrice_NotInScope(java.util.List productsPriceList) { + registerProductsPrice(ConditionKey.CK_NOT_IN_SCOPE, productsPriceList); + } + + /** + * Register condition of productsPrice. + * + * @param key Condition key. (NotNull) + * @param value The value of productsPrice. (Nullable) + */ + protected void registerProductsPrice(ConditionKey key, Object value) { + registerQuery(key, value, getCValueProductsPrice(), COL_PRODUCTS_PRICE, J_ProductsPrice, UJ_productsPrice); + } + + /** + * Register inline condition of productsPrice. + * + * @param key Condition key. (NotNull) + * @param value The value of productsPrice. (Nullable) + */ + protected void registerInlineProductsPrice(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueProductsPrice(), COL_PRODUCTS_PRICE, J_ProductsPrice, UJ_productsPrice); + } + + abstract protected ConditionValue getCValueProductsPrice(); + + /** Column db name of productsDateAdded. */ + protected static final String COL_PRODUCTS_DATE_ADDED = "PRODUCTS_DATE_ADDED"; + + /** Column java name of productsDateAdded. */ + protected static final String J_ProductsDateAdded = "ProductsDateAdded"; + + /** Column uncapitalised java name of productsDateAdded. */ + protected static final String UJ_productsDateAdded = "productsDateAdded"; + + /** + * Set the value of productsDateAdded using equal. { = } + * + * @param productsDateAdded The value of productsDateAdded as equal. + */ + public void setProductsDateAdded_Equal(java.sql.Timestamp productsDateAdded) { + registerProductsDateAdded(ConditionKey.CK_EQUAL, productsDateAdded); + } + + /** + * Set the value of productsDateAdded using notEqual. { != } + * + * @param productsDateAdded The value of productsDateAdded as notEqual. + */ + public void setProductsDateAdded_NotEqual(java.sql.Timestamp productsDateAdded) { + registerProductsDateAdded(ConditionKey.CK_NOT_EQUAL, productsDateAdded); + } + + /** + * Set the value of productsDateAdded using greaterThan. { > } + * + * @param productsDateAdded The value of productsDateAdded as greaterThan. + */ + public void setProductsDateAdded_GreaterThan(java.sql.Timestamp productsDateAdded) { + registerProductsDateAdded(ConditionKey.CK_GREATER_THAN, productsDateAdded); + } + + /** + * Set the value of productsDateAdded using lessThan. { < } + * + * @param productsDateAdded The value of productsDateAdded as lessThan. + */ + public void setProductsDateAdded_LessThan(java.sql.Timestamp productsDateAdded) { + registerProductsDateAdded(ConditionKey.CK_LESS_THAN, productsDateAdded); + } + + /** + * Set the value of productsDateAdded using greaterEqual. { >= } + * + * @param productsDateAdded The value of productsDateAdded as greaterEqual. + */ + public void setProductsDateAdded_GreaterEqual(java.sql.Timestamp productsDateAdded) { + registerProductsDateAdded(ConditionKey.CK_GREATER_EQUAL, productsDateAdded); + } + + /** + * Set the value of productsDateAdded using lessEqual. { <= } + * + * @param productsDateAdded The value of productsDateAdded as lessEqual. + */ + public void setProductsDateAdded_LessEqual(java.sql.Timestamp productsDateAdded) { + registerProductsDateAdded(ConditionKey.CK_LESS_EQUAL, productsDateAdded); + } + + /** + * Set the value of productsDateAdded using from-to. { $fromDate <= COLUMN_NAME <= $toDate } + * + * @param productsDateAdded The value of productsDateAdded as from-to. + * @param fromToOption From-To option. (NotNull) + */ + public void setProductsDateAdded_FromTo(java.sql.Timestamp fromDate, java.sql.Timestamp toDate, jp.sf.pal.pompei.allcommon.cbean.coption.FromToOption fromToOption) { + registerFromToQuery(fromDate, toDate, getCValueProductsDateAdded(), COL_PRODUCTS_DATE_ADDED, J_ProductsDateAdded, UJ_productsDateAdded, fromToOption); + } + + /** + * Register condition of productsDateAdded. + * + * @param key Condition key. (NotNull) + * @param value The value of productsDateAdded. (Nullable) + */ + protected void registerProductsDateAdded(ConditionKey key, Object value) { + registerQuery(key, value, getCValueProductsDateAdded(), COL_PRODUCTS_DATE_ADDED, J_ProductsDateAdded, UJ_productsDateAdded); + } + + /** + * Register inline condition of productsDateAdded. + * + * @param key Condition key. (NotNull) + * @param value The value of productsDateAdded. (Nullable) + */ + protected void registerInlineProductsDateAdded(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueProductsDateAdded(), COL_PRODUCTS_DATE_ADDED, J_ProductsDateAdded, UJ_productsDateAdded); + } + + abstract protected ConditionValue getCValueProductsDateAdded(); + + /** Column db name of productsLastModified. */ + protected static final String COL_PRODUCTS_LAST_MODIFIED = "PRODUCTS_LAST_MODIFIED"; + + /** Column java name of productsLastModified. */ + protected static final String J_ProductsLastModified = "ProductsLastModified"; + + /** Column uncapitalised java name of productsLastModified. */ + protected static final String UJ_productsLastModified = "productsLastModified"; + + /** + * Set the value of productsLastModified using equal. { = } + * + * @param productsLastModified The value of productsLastModified as equal. + */ + public void setProductsLastModified_Equal(java.sql.Timestamp productsLastModified) { + registerProductsLastModified(ConditionKey.CK_EQUAL, productsLastModified); + } + + /** + * Set the value of productsLastModified using notEqual. { != } + * + * @param productsLastModified The value of productsLastModified as notEqual. + */ + public void setProductsLastModified_NotEqual(java.sql.Timestamp productsLastModified) { + registerProductsLastModified(ConditionKey.CK_NOT_EQUAL, productsLastModified); + } + + /** + * Set the value of productsLastModified using greaterThan. { > } + * + * @param productsLastModified The value of productsLastModified as greaterThan. + */ + public void setProductsLastModified_GreaterThan(java.sql.Timestamp productsLastModified) { + registerProductsLastModified(ConditionKey.CK_GREATER_THAN, productsLastModified); + } + + /** + * Set the value of productsLastModified using lessThan. { < } + * + * @param productsLastModified The value of productsLastModified as lessThan. + */ + public void setProductsLastModified_LessThan(java.sql.Timestamp productsLastModified) { + registerProductsLastModified(ConditionKey.CK_LESS_THAN, productsLastModified); + } + + /** + * Set the value of productsLastModified using greaterEqual. { >= } + * + * @param productsLastModified The value of productsLastModified as greaterEqual. + */ + public void setProductsLastModified_GreaterEqual(java.sql.Timestamp productsLastModified) { + registerProductsLastModified(ConditionKey.CK_GREATER_EQUAL, productsLastModified); + } + + /** + * Set the value of productsLastModified using lessEqual. { <= } + * + * @param productsLastModified The value of productsLastModified as lessEqual. + */ + public void setProductsLastModified_LessEqual(java.sql.Timestamp productsLastModified) { + registerProductsLastModified(ConditionKey.CK_LESS_EQUAL, productsLastModified); + } + + /** + * Set the value of productsLastModified using from-to. { $fromDate <= COLUMN_NAME <= $toDate } + * + * @param productsLastModified The value of productsLastModified as from-to. + * @param fromToOption From-To option. (NotNull) + */ + public void setProductsLastModified_FromTo(java.sql.Timestamp fromDate, java.sql.Timestamp toDate, jp.sf.pal.pompei.allcommon.cbean.coption.FromToOption fromToOption) { + registerFromToQuery(fromDate, toDate, getCValueProductsLastModified(), COL_PRODUCTS_LAST_MODIFIED, J_ProductsLastModified, UJ_productsLastModified, fromToOption); + } + + /** + * Set the value of productsLastModified using isNull. { is null } + */ + public void setProductsLastModified_IsNull() { + registerProductsLastModified(ConditionKey.CK_IS_NULL, DUMMY_OBJECT); + } + + /** + * Set the value of productsLastModified using isNotNull. { is not null } + */ + public void setProductsLastModified_IsNotNull() { + registerProductsLastModified(ConditionKey.CK_IS_NOT_NULL, DUMMY_OBJECT); + } + + /** + * Register condition of productsLastModified. + * + * @param key Condition key. (NotNull) + * @param value The value of productsLastModified. (Nullable) + */ + protected void registerProductsLastModified(ConditionKey key, Object value) { + registerQuery(key, value, getCValueProductsLastModified(), COL_PRODUCTS_LAST_MODIFIED, J_ProductsLastModified, UJ_productsLastModified); + } + + /** + * Register inline condition of productsLastModified. + * + * @param key Condition key. (NotNull) + * @param value The value of productsLastModified. (Nullable) + */ + protected void registerInlineProductsLastModified(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueProductsLastModified(), COL_PRODUCTS_LAST_MODIFIED, J_ProductsLastModified, UJ_productsLastModified); + } + + abstract protected ConditionValue getCValueProductsLastModified(); + + /** Column db name of productsDateAvailable. */ + protected static final String COL_PRODUCTS_DATE_AVAILABLE = "PRODUCTS_DATE_AVAILABLE"; + + /** Column java name of productsDateAvailable. */ + protected static final String J_ProductsDateAvailable = "ProductsDateAvailable"; + + /** Column uncapitalised java name of productsDateAvailable. */ + protected static final String UJ_productsDateAvailable = "productsDateAvailable"; + + /** + * Set the value of productsDateAvailable using equal. { = } + * + * @param productsDateAvailable The value of productsDateAvailable as equal. + */ + public void setProductsDateAvailable_Equal(java.sql.Timestamp productsDateAvailable) { + registerProductsDateAvailable(ConditionKey.CK_EQUAL, productsDateAvailable); + } + + /** + * Set the value of productsDateAvailable using notEqual. { != } + * + * @param productsDateAvailable The value of productsDateAvailable as notEqual. + */ + public void setProductsDateAvailable_NotEqual(java.sql.Timestamp productsDateAvailable) { + registerProductsDateAvailable(ConditionKey.CK_NOT_EQUAL, productsDateAvailable); + } + + /** + * Set the value of productsDateAvailable using greaterThan. { > } + * + * @param productsDateAvailable The value of productsDateAvailable as greaterThan. + */ + public void setProductsDateAvailable_GreaterThan(java.sql.Timestamp productsDateAvailable) { + registerProductsDateAvailable(ConditionKey.CK_GREATER_THAN, productsDateAvailable); + } + + /** + * Set the value of productsDateAvailable using lessThan. { < } + * + * @param productsDateAvailable The value of productsDateAvailable as lessThan. + */ + public void setProductsDateAvailable_LessThan(java.sql.Timestamp productsDateAvailable) { + registerProductsDateAvailable(ConditionKey.CK_LESS_THAN, productsDateAvailable); + } + + /** + * Set the value of productsDateAvailable using greaterEqual. { >= } + * + * @param productsDateAvailable The value of productsDateAvailable as greaterEqual. + */ + public void setProductsDateAvailable_GreaterEqual(java.sql.Timestamp productsDateAvailable) { + registerProductsDateAvailable(ConditionKey.CK_GREATER_EQUAL, productsDateAvailable); + } + + /** + * Set the value of productsDateAvailable using lessEqual. { <= } + * + * @param productsDateAvailable The value of productsDateAvailable as lessEqual. + */ + public void setProductsDateAvailable_LessEqual(java.sql.Timestamp productsDateAvailable) { + registerProductsDateAvailable(ConditionKey.CK_LESS_EQUAL, productsDateAvailable); + } + + /** + * Set the value of productsDateAvailable using from-to. { $fromDate <= COLUMN_NAME <= $toDate } + * + * @param productsDateAvailable The value of productsDateAvailable as from-to. + * @param fromToOption From-To option. (NotNull) + */ + public void setProductsDateAvailable_FromTo(java.sql.Timestamp fromDate, java.sql.Timestamp toDate, jp.sf.pal.pompei.allcommon.cbean.coption.FromToOption fromToOption) { + registerFromToQuery(fromDate, toDate, getCValueProductsDateAvailable(), COL_PRODUCTS_DATE_AVAILABLE, J_ProductsDateAvailable, UJ_productsDateAvailable, fromToOption); + } + + /** + * Set the value of productsDateAvailable using isNull. { is null } + */ + public void setProductsDateAvailable_IsNull() { + registerProductsDateAvailable(ConditionKey.CK_IS_NULL, DUMMY_OBJECT); + } + + /** + * Set the value of productsDateAvailable using isNotNull. { is not null } + */ + public void setProductsDateAvailable_IsNotNull() { + registerProductsDateAvailable(ConditionKey.CK_IS_NOT_NULL, DUMMY_OBJECT); + } + + /** + * Register condition of productsDateAvailable. + * + * @param key Condition key. (NotNull) + * @param value The value of productsDateAvailable. (Nullable) + */ + protected void registerProductsDateAvailable(ConditionKey key, Object value) { + registerQuery(key, value, getCValueProductsDateAvailable(), COL_PRODUCTS_DATE_AVAILABLE, J_ProductsDateAvailable, UJ_productsDateAvailable); + } + + /** + * Register inline condition of productsDateAvailable. + * + * @param key Condition key. (NotNull) + * @param value The value of productsDateAvailable. (Nullable) + */ + protected void registerInlineProductsDateAvailable(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueProductsDateAvailable(), COL_PRODUCTS_DATE_AVAILABLE, J_ProductsDateAvailable, UJ_productsDateAvailable); + } + + abstract protected ConditionValue getCValueProductsDateAvailable(); + + /** Column db name of productsWeight. */ + protected static final String COL_PRODUCTS_WEIGHT = "PRODUCTS_WEIGHT"; + + /** Column java name of productsWeight. */ + protected static final String J_ProductsWeight = "ProductsWeight"; + + /** Column uncapitalised java name of productsWeight. */ + protected static final String UJ_productsWeight = "productsWeight"; + + /** + * Set the value of productsWeight using equal. { = } + * + * @param productsWeight The value of productsWeight as equal. + */ + public void setProductsWeight_Equal(java.math.BigDecimal productsWeight) { + registerProductsWeight(ConditionKey.CK_EQUAL, productsWeight); + } + + /** + * Set the value of productsWeight using notEqual. { != } + * + * @param productsWeight The value of productsWeight as notEqual. + */ + public void setProductsWeight_NotEqual(java.math.BigDecimal productsWeight) { + registerProductsWeight(ConditionKey.CK_NOT_EQUAL, productsWeight); + } + + /** + * Set the value of productsWeight using greaterThan. { > } + * + * @param productsWeight The value of productsWeight as greaterThan. + */ + public void setProductsWeight_GreaterThan(java.math.BigDecimal productsWeight) { + registerProductsWeight(ConditionKey.CK_GREATER_THAN, productsWeight); + } + + /** + * Set the value of productsWeight using lessThan. { < } + * + * @param productsWeight The value of productsWeight as lessThan. + */ + public void setProductsWeight_LessThan(java.math.BigDecimal productsWeight) { + registerProductsWeight(ConditionKey.CK_LESS_THAN, productsWeight); + } + + /** + * Set the value of productsWeight using greaterEqual. { >= } + * + * @param productsWeight The value of productsWeight as greaterEqual. + */ + public void setProductsWeight_GreaterEqual(java.math.BigDecimal productsWeight) { + registerProductsWeight(ConditionKey.CK_GREATER_EQUAL, productsWeight); + } + + /** + * Set the value of productsWeight using lessEqual. { <= } + * + * @param productsWeight The value of productsWeight as lessEqual. + */ + public void setProductsWeight_LessEqual(java.math.BigDecimal productsWeight) { + registerProductsWeight(ConditionKey.CK_LESS_EQUAL, productsWeight); + } + + /** + * Set the value of productsWeight using inScope. { in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param productsWeightList The value of productsWeight as inScope. + */ + public void setProductsWeight_InScope(java.util.List productsWeightList) { + registerProductsWeight(ConditionKey.CK_IN_SCOPE, productsWeightList); + } + + /** + * Set the value of productsWeight using notInScope. { not in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param productsWeightList The value of productsWeight as notInScope. + */ + public void setProductsWeight_NotInScope(java.util.List productsWeightList) { + registerProductsWeight(ConditionKey.CK_NOT_IN_SCOPE, productsWeightList); + } + + /** + * Register condition of productsWeight. + * + * @param key Condition key. (NotNull) + * @param value The value of productsWeight. (Nullable) + */ + protected void registerProductsWeight(ConditionKey key, Object value) { + registerQuery(key, value, getCValueProductsWeight(), COL_PRODUCTS_WEIGHT, J_ProductsWeight, UJ_productsWeight); + } + + /** + * Register inline condition of productsWeight. + * + * @param key Condition key. (NotNull) + * @param value The value of productsWeight. (Nullable) + */ + protected void registerInlineProductsWeight(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueProductsWeight(), COL_PRODUCTS_WEIGHT, J_ProductsWeight, UJ_productsWeight); + } + + abstract protected ConditionValue getCValueProductsWeight(); + + /** Column db name of productsStatus. */ + protected static final String COL_PRODUCTS_STATUS = "PRODUCTS_STATUS"; + + /** Column java name of productsStatus. */ + protected static final String J_ProductsStatus = "ProductsStatus"; + + /** Column uncapitalised java name of productsStatus. */ + protected static final String UJ_productsStatus = "productsStatus"; + + /** + * Set the value of productsStatus using equal. { = } + * + * @param productsStatus The value of productsStatus as equal. + */ + public void setProductsStatus_Equal(java.math.BigDecimal productsStatus) { + registerProductsStatus(ConditionKey.CK_EQUAL, productsStatus); + } + + /** + * Set the value of productsStatus using notEqual. { != } + * + * @param productsStatus The value of productsStatus as notEqual. + */ + public void setProductsStatus_NotEqual(java.math.BigDecimal productsStatus) { + registerProductsStatus(ConditionKey.CK_NOT_EQUAL, productsStatus); + } + + /** + * Set the value of productsStatus using greaterThan. { > } + * + * @param productsStatus The value of productsStatus as greaterThan. + */ + public void setProductsStatus_GreaterThan(java.math.BigDecimal productsStatus) { + registerProductsStatus(ConditionKey.CK_GREATER_THAN, productsStatus); + } + + /** + * Set the value of productsStatus using lessThan. { < } + * + * @param productsStatus The value of productsStatus as lessThan. + */ + public void setProductsStatus_LessThan(java.math.BigDecimal productsStatus) { + registerProductsStatus(ConditionKey.CK_LESS_THAN, productsStatus); + } + + /** + * Set the value of productsStatus using greaterEqual. { >= } + * + * @param productsStatus The value of productsStatus as greaterEqual. + */ + public void setProductsStatus_GreaterEqual(java.math.BigDecimal productsStatus) { + registerProductsStatus(ConditionKey.CK_GREATER_EQUAL, productsStatus); + } + + /** + * Set the value of productsStatus using lessEqual. { <= } + * + * @param productsStatus The value of productsStatus as lessEqual. + */ + public void setProductsStatus_LessEqual(java.math.BigDecimal productsStatus) { + registerProductsStatus(ConditionKey.CK_LESS_EQUAL, productsStatus); + } + + /** + * Set the value of productsStatus using inScope. { in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param productsStatusList The value of productsStatus as inScope. + */ + public void setProductsStatus_InScope(java.util.List productsStatusList) { + registerProductsStatus(ConditionKey.CK_IN_SCOPE, productsStatusList); + } + + /** + * Set the value of productsStatus using notInScope. { not in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param productsStatusList The value of productsStatus as notInScope. + */ + public void setProductsStatus_NotInScope(java.util.List productsStatusList) { + registerProductsStatus(ConditionKey.CK_NOT_IN_SCOPE, productsStatusList); + } + + /** + * Register condition of productsStatus. + * + * @param key Condition key. (NotNull) + * @param value The value of productsStatus. (Nullable) + */ + protected void registerProductsStatus(ConditionKey key, Object value) { + registerQuery(key, value, getCValueProductsStatus(), COL_PRODUCTS_STATUS, J_ProductsStatus, UJ_productsStatus); + } + + /** + * Register inline condition of productsStatus. + * + * @param key Condition key. (NotNull) + * @param value The value of productsStatus. (Nullable) + */ + protected void registerInlineProductsStatus(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueProductsStatus(), COL_PRODUCTS_STATUS, J_ProductsStatus, UJ_productsStatus); + } + + abstract protected ConditionValue getCValueProductsStatus(); + + /** Column db name of productsTaxClassId. */ + protected static final String COL_PRODUCTS_TAX_CLASS_ID = "PRODUCTS_TAX_CLASS_ID"; + + /** Column java name of productsTaxClassId. */ + protected static final String J_ProductsTaxClassId = "ProductsTaxClassId"; + + /** Column uncapitalised java name of productsTaxClassId. */ + protected static final String UJ_productsTaxClassId = "productsTaxClassId"; + + /** + * Set the value of productsTaxClassId using equal. { = } + * + * @param productsTaxClassId The value of productsTaxClassId as equal. + */ + public void setProductsTaxClassId_Equal(java.math.BigDecimal productsTaxClassId) { + registerProductsTaxClassId(ConditionKey.CK_EQUAL, productsTaxClassId); + } + + /** + * Set the value of productsTaxClassId using notEqual. { != } + * + * @param productsTaxClassId The value of productsTaxClassId as notEqual. + */ + public void setProductsTaxClassId_NotEqual(java.math.BigDecimal productsTaxClassId) { + registerProductsTaxClassId(ConditionKey.CK_NOT_EQUAL, productsTaxClassId); + } + + /** + * Set the value of productsTaxClassId using greaterThan. { > } + * + * @param productsTaxClassId The value of productsTaxClassId as greaterThan. + */ + public void setProductsTaxClassId_GreaterThan(java.math.BigDecimal productsTaxClassId) { + registerProductsTaxClassId(ConditionKey.CK_GREATER_THAN, productsTaxClassId); + } + + /** + * Set the value of productsTaxClassId using lessThan. { < } + * + * @param productsTaxClassId The value of productsTaxClassId as lessThan. + */ + public void setProductsTaxClassId_LessThan(java.math.BigDecimal productsTaxClassId) { + registerProductsTaxClassId(ConditionKey.CK_LESS_THAN, productsTaxClassId); + } + + /** + * Set the value of productsTaxClassId using greaterEqual. { >= } + * + * @param productsTaxClassId The value of productsTaxClassId as greaterEqual. + */ + public void setProductsTaxClassId_GreaterEqual(java.math.BigDecimal productsTaxClassId) { + registerProductsTaxClassId(ConditionKey.CK_GREATER_EQUAL, productsTaxClassId); + } + + /** + * Set the value of productsTaxClassId using lessEqual. { <= } + * + * @param productsTaxClassId The value of productsTaxClassId as lessEqual. + */ + public void setProductsTaxClassId_LessEqual(java.math.BigDecimal productsTaxClassId) { + registerProductsTaxClassId(ConditionKey.CK_LESS_EQUAL, productsTaxClassId); + } + + /** + * Set the value of productsTaxClassId using inScope. { in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param productsTaxClassIdList The value of productsTaxClassId as inScope. + */ + public void setProductsTaxClassId_InScope(java.util.List productsTaxClassIdList) { + registerProductsTaxClassId(ConditionKey.CK_IN_SCOPE, productsTaxClassIdList); + } + + /** + * Set the value of productsTaxClassId using notInScope. { not in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param productsTaxClassIdList The value of productsTaxClassId as notInScope. + */ + public void setProductsTaxClassId_NotInScope(java.util.List productsTaxClassIdList) { + registerProductsTaxClassId(ConditionKey.CK_NOT_IN_SCOPE, productsTaxClassIdList); + } + + /** + * Register condition of productsTaxClassId. + * + * @param key Condition key. (NotNull) + * @param value The value of productsTaxClassId. (Nullable) + */ + protected void registerProductsTaxClassId(ConditionKey key, Object value) { + registerQuery(key, value, getCValueProductsTaxClassId(), COL_PRODUCTS_TAX_CLASS_ID, J_ProductsTaxClassId, UJ_productsTaxClassId); + } + + /** + * Register inline condition of productsTaxClassId. + * + * @param key Condition key. (NotNull) + * @param value The value of productsTaxClassId. (Nullable) + */ + protected void registerInlineProductsTaxClassId(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueProductsTaxClassId(), COL_PRODUCTS_TAX_CLASS_ID, J_ProductsTaxClassId, UJ_productsTaxClassId); + } + + abstract protected ConditionValue getCValueProductsTaxClassId(); + + /** Column db name of manufacturersId. */ + protected static final String COL_MANUFACTURERS_ID = "MANUFACTURERS_ID"; + + /** Column java name of manufacturersId. */ + protected static final String J_ManufacturersId = "ManufacturersId"; + + /** Column uncapitalised java name of manufacturersId. */ + protected static final String UJ_manufacturersId = "manufacturersId"; + + /** + * Set the value of manufacturersId using equal. { = } + * + * @param manufacturersId The value of manufacturersId as equal. + */ + public void setManufacturersId_Equal(java.math.BigDecimal manufacturersId) { + registerManufacturersId(ConditionKey.CK_EQUAL, manufacturersId); + } + + /** + * Set the value of manufacturersId using notEqual. { != } + * + * @param manufacturersId The value of manufacturersId as notEqual. + */ + public void setManufacturersId_NotEqual(java.math.BigDecimal manufacturersId) { + registerManufacturersId(ConditionKey.CK_NOT_EQUAL, manufacturersId); + } + + /** + * Set the value of manufacturersId using greaterThan. { > } + * + * @param manufacturersId The value of manufacturersId as greaterThan. + */ + public void setManufacturersId_GreaterThan(java.math.BigDecimal manufacturersId) { + registerManufacturersId(ConditionKey.CK_GREATER_THAN, manufacturersId); + } + + /** + * Set the value of manufacturersId using lessThan. { < } + * + * @param manufacturersId The value of manufacturersId as lessThan. + */ + public void setManufacturersId_LessThan(java.math.BigDecimal manufacturersId) { + registerManufacturersId(ConditionKey.CK_LESS_THAN, manufacturersId); + } + + /** + * Set the value of manufacturersId using greaterEqual. { >= } + * + * @param manufacturersId The value of manufacturersId as greaterEqual. + */ + public void setManufacturersId_GreaterEqual(java.math.BigDecimal manufacturersId) { + registerManufacturersId(ConditionKey.CK_GREATER_EQUAL, manufacturersId); + } + + /** + * Set the value of manufacturersId using lessEqual. { <= } + * + * @param manufacturersId The value of manufacturersId as lessEqual. + */ + public void setManufacturersId_LessEqual(java.math.BigDecimal manufacturersId) { + registerManufacturersId(ConditionKey.CK_LESS_EQUAL, manufacturersId); + } + + /** + * Set the value of manufacturersId using inScope. { in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param manufacturersIdList The value of manufacturersId as inScope. + */ + public void setManufacturersId_InScope(java.util.List manufacturersIdList) { + registerManufacturersId(ConditionKey.CK_IN_SCOPE, manufacturersIdList); + } + + /** + * Set the value of manufacturersId using notInScope. { not in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param manufacturersIdList The value of manufacturersId as notInScope. + */ + public void setManufacturersId_NotInScope(java.util.List manufacturersIdList) { + registerManufacturersId(ConditionKey.CK_NOT_IN_SCOPE, manufacturersIdList); + } + + /** + * Set the value of manufacturersId using isNull. { is null } + */ + public void setManufacturersId_IsNull() { + registerManufacturersId(ConditionKey.CK_IS_NULL, DUMMY_OBJECT); + } + + /** + * Set the value of manufacturersId using isNotNull. { is not null } + */ + public void setManufacturersId_IsNotNull() { + registerManufacturersId(ConditionKey.CK_IS_NOT_NULL, DUMMY_OBJECT); + } + + /** + * Register condition of manufacturersId. + * + * @param key Condition key. (NotNull) + * @param value The value of manufacturersId. (Nullable) + */ + protected void registerManufacturersId(ConditionKey key, Object value) { + registerQuery(key, value, getCValueManufacturersId(), COL_MANUFACTURERS_ID, J_ManufacturersId, UJ_manufacturersId); + } + + /** + * Register inline condition of manufacturersId. + * + * @param key Condition key. (NotNull) + * @param value The value of manufacturersId. (Nullable) + */ + protected void registerInlineManufacturersId(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueManufacturersId(), COL_MANUFACTURERS_ID, J_ManufacturersId, UJ_manufacturersId); + } + + abstract protected ConditionValue getCValueManufacturersId(); + + /** Column db name of productsOrdered. */ + protected static final String COL_PRODUCTS_ORDERED = "PRODUCTS_ORDERED"; + + /** Column java name of productsOrdered. */ + protected static final String J_ProductsOrdered = "ProductsOrdered"; + + /** Column uncapitalised java name of productsOrdered. */ + protected static final String UJ_productsOrdered = "productsOrdered"; + + /** + * Set the value of productsOrdered using equal. { = } + * + * @param productsOrdered The value of productsOrdered as equal. + */ + public void setProductsOrdered_Equal(java.math.BigDecimal productsOrdered) { + registerProductsOrdered(ConditionKey.CK_EQUAL, productsOrdered); + } + + /** + * Set the value of productsOrdered using notEqual. { != } + * + * @param productsOrdered The value of productsOrdered as notEqual. + */ + public void setProductsOrdered_NotEqual(java.math.BigDecimal productsOrdered) { + registerProductsOrdered(ConditionKey.CK_NOT_EQUAL, productsOrdered); + } + + /** + * Set the value of productsOrdered using greaterThan. { > } + * + * @param productsOrdered The value of productsOrdered as greaterThan. + */ + public void setProductsOrdered_GreaterThan(java.math.BigDecimal productsOrdered) { + registerProductsOrdered(ConditionKey.CK_GREATER_THAN, productsOrdered); + } + + /** + * Set the value of productsOrdered using lessThan. { < } + * + * @param productsOrdered The value of productsOrdered as lessThan. + */ + public void setProductsOrdered_LessThan(java.math.BigDecimal productsOrdered) { + registerProductsOrdered(ConditionKey.CK_LESS_THAN, productsOrdered); + } + + /** + * Set the value of productsOrdered using greaterEqual. { >= } + * + * @param productsOrdered The value of productsOrdered as greaterEqual. + */ + public void setProductsOrdered_GreaterEqual(java.math.BigDecimal productsOrdered) { + registerProductsOrdered(ConditionKey.CK_GREATER_EQUAL, productsOrdered); + } + + /** + * Set the value of productsOrdered using lessEqual. { <= } + * + * @param productsOrdered The value of productsOrdered as lessEqual. + */ + public void setProductsOrdered_LessEqual(java.math.BigDecimal productsOrdered) { + registerProductsOrdered(ConditionKey.CK_LESS_EQUAL, productsOrdered); + } + + /** + * Set the value of productsOrdered using inScope. { in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param productsOrderedList The value of productsOrdered as inScope. + */ + public void setProductsOrdered_InScope(java.util.List productsOrderedList) { + registerProductsOrdered(ConditionKey.CK_IN_SCOPE, productsOrderedList); + } + + /** + * Set the value of productsOrdered using notInScope. { not in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param productsOrderedList The value of productsOrdered as notInScope. + */ + public void setProductsOrdered_NotInScope(java.util.List productsOrderedList) { + registerProductsOrdered(ConditionKey.CK_NOT_IN_SCOPE, productsOrderedList); + } + + /** + * Register condition of productsOrdered. + * + * @param key Condition key. (NotNull) + * @param value The value of productsOrdered. (Nullable) + */ + protected void registerProductsOrdered(ConditionKey key, Object value) { + registerQuery(key, value, getCValueProductsOrdered(), COL_PRODUCTS_ORDERED, J_ProductsOrdered, UJ_productsOrdered); + } + + /** + * Register inline condition of productsOrdered. + * + * @param key Condition key. (NotNull) + * @param value The value of productsOrdered. (Nullable) + */ + protected void registerInlineProductsOrdered(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueProductsOrdered(), COL_PRODUCTS_ORDERED, J_ProductsOrdered, UJ_productsOrdered); + } + + abstract protected ConditionValue getCValueProductsOrdered(); + + // =================================================================================== + // Basic Override + // ============== + /** + * This method overrides the method that is declared at super. + * + * @return Clause string. (NotNull) + */ + public String toString() { + return getSqlClause().getClause(); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/AbstractBsProductsDescriptionCQ.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/AbstractBsProductsDescriptionCQ.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/AbstractBsProductsDescriptionCQ.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,852 @@ + +package jp.sf.pal.pompei.cbean.cq.bs; + + + +import jp.sf.pal.pompei.allcommon.cbean.*; +import jp.sf.pal.pompei.allcommon.cbean.ckey.*; +import jp.sf.pal.pompei.allcommon.cbean.cvalue.ConditionValue; +import jp.sf.pal.pompei.allcommon.cbean.sqlclause.SqlClause; +import jp.sf.pal.pompei.cbean.cq.*; + +/** + * The condition-query of PRODUCTS_DESCRIPTION. + * + * @author DBFlute(AutoGenerator) + */ +public abstract class AbstractBsProductsDescriptionCQ extends AbstractConditionQuery { + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param childQuery Child query as abstract class. (Nullable: If null, this is base instance.) + * @param sqlClause SQL clause instance. (NotNull) + * @param aliasName My alias name. (NotNull) + * @param nestLevel Nest level. + */ + public AbstractBsProductsDescriptionCQ(ConditionQuery childQuery, SqlClause sqlClause, String aliasName, int nestLevel) { + super(childQuery, sqlClause, aliasName, nestLevel); + } + + // =================================================================================== + // Table Name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + final public String getTableDbName() { + return "PRODUCTS_DESCRIPTION"; + } + + // =================================================================================== + // Query + // ===== + + // /* * * * * * * * * * * * * * * * * * * * * * * + // MyTable = [PRODUCTS_DESCRIPTION] + // * * * * * * * * */ + + + /** Column db name of productsId. */ + protected static final String COL_PRODUCTS_ID = "PRODUCTS_ID"; + + /** Column java name of productsId. */ + protected static final String J_ProductsId = "ProductsId"; + + /** Column uncapitalised java name of productsId. */ + protected static final String UJ_productsId = "productsId"; + + /** + * Set the value of productsId using equal. { = } + * + * @param productsId The value of productsId as equal. + */ + public void setProductsId_Equal(java.math.BigDecimal productsId) { + registerProductsId(ConditionKey.CK_EQUAL, productsId); + } + + /** + * Set the value of productsId using notEqual. { != } + * + * @param productsId The value of productsId as notEqual. + */ + public void setProductsId_NotEqual(java.math.BigDecimal productsId) { + registerProductsId(ConditionKey.CK_NOT_EQUAL, productsId); + } + + /** + * Set the value of productsId using greaterThan. { > } + * + * @param productsId The value of productsId as greaterThan. + */ + public void setProductsId_GreaterThan(java.math.BigDecimal productsId) { + registerProductsId(ConditionKey.CK_GREATER_THAN, productsId); + } + + /** + * Set the value of productsId using lessThan. { < } + * + * @param productsId The value of productsId as lessThan. + */ + public void setProductsId_LessThan(java.math.BigDecimal productsId) { + registerProductsId(ConditionKey.CK_LESS_THAN, productsId); + } + + /** + * Set the value of productsId using greaterEqual. { >= } + * + * @param productsId The value of productsId as greaterEqual. + */ + public void setProductsId_GreaterEqual(java.math.BigDecimal productsId) { + registerProductsId(ConditionKey.CK_GREATER_EQUAL, productsId); + } + + /** + * Set the value of productsId using lessEqual. { <= } + * + * @param productsId The value of productsId as lessEqual. + */ + public void setProductsId_LessEqual(java.math.BigDecimal productsId) { + registerProductsId(ConditionKey.CK_LESS_EQUAL, productsId); + } + + /** + * Set the value of productsId using inScope. { in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param productsIdList The value of productsId as inScope. + */ + public void setProductsId_InScope(java.util.List productsIdList) { + registerProductsId(ConditionKey.CK_IN_SCOPE, productsIdList); + } + + /** + * Set the value of productsId using notInScope. { not in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param productsIdList The value of productsId as notInScope. + */ + public void setProductsId_NotInScope(java.util.List productsIdList) { + registerProductsId(ConditionKey.CK_NOT_IN_SCOPE, productsIdList); + } + + /** + * Register condition of productsId. + * + * @param key Condition key. (NotNull) + * @param value The value of productsId. (Nullable) + */ + protected void registerProductsId(ConditionKey key, Object value) { + registerQuery(key, value, getCValueProductsId(), COL_PRODUCTS_ID, J_ProductsId, UJ_productsId); + } + + /** + * Register inline condition of productsId. + * + * @param key Condition key. (NotNull) + * @param value The value of productsId. (Nullable) + */ + protected void registerInlineProductsId(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueProductsId(), COL_PRODUCTS_ID, J_ProductsId, UJ_productsId); + } + + abstract protected ConditionValue getCValueProductsId(); + + /** Column db name of languageId. */ + protected static final String COL_LANGUAGE_ID = "LANGUAGE_ID"; + + /** Column java name of languageId. */ + protected static final String J_LanguageId = "LanguageId"; + + /** Column uncapitalised java name of languageId. */ + protected static final String UJ_languageId = "languageId"; + + /** + * Set the value of languageId using equal. { = } + * + * @param languageId The value of languageId as equal. + */ + public void setLanguageId_Equal(java.math.BigDecimal languageId) { + registerLanguageId(ConditionKey.CK_EQUAL, languageId); + } + + /** + * Set the value of languageId using notEqual. { != } + * + * @param languageId The value of languageId as notEqual. + */ + public void setLanguageId_NotEqual(java.math.BigDecimal languageId) { + registerLanguageId(ConditionKey.CK_NOT_EQUAL, languageId); + } + + /** + * Set the value of languageId using greaterThan. { > } + * + * @param languageId The value of languageId as greaterThan. + */ + public void setLanguageId_GreaterThan(java.math.BigDecimal languageId) { + registerLanguageId(ConditionKey.CK_GREATER_THAN, languageId); + } + + /** + * Set the value of languageId using lessThan. { < } + * + * @param languageId The value of languageId as lessThan. + */ + public void setLanguageId_LessThan(java.math.BigDecimal languageId) { + registerLanguageId(ConditionKey.CK_LESS_THAN, languageId); + } + + /** + * Set the value of languageId using greaterEqual. { >= } + * + * @param languageId The value of languageId as greaterEqual. + */ + public void setLanguageId_GreaterEqual(java.math.BigDecimal languageId) { + registerLanguageId(ConditionKey.CK_GREATER_EQUAL, languageId); + } + + /** + * Set the value of languageId using lessEqual. { <= } + * + * @param languageId The value of languageId as lessEqual. + */ + public void setLanguageId_LessEqual(java.math.BigDecimal languageId) { + registerLanguageId(ConditionKey.CK_LESS_EQUAL, languageId); + } + + /** + * Set the value of languageId using inScope. { in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param languageIdList The value of languageId as inScope. + */ + public void setLanguageId_InScope(java.util.List languageIdList) { + registerLanguageId(ConditionKey.CK_IN_SCOPE, languageIdList); + } + + /** + * Set the value of languageId using notInScope. { not in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param languageIdList The value of languageId as notInScope. + */ + public void setLanguageId_NotInScope(java.util.List languageIdList) { + registerLanguageId(ConditionKey.CK_NOT_IN_SCOPE, languageIdList); + } + + /** + * Register condition of languageId. + * + * @param key Condition key. (NotNull) + * @param value The value of languageId. (Nullable) + */ + protected void registerLanguageId(ConditionKey key, Object value) { + registerQuery(key, value, getCValueLanguageId(), COL_LANGUAGE_ID, J_LanguageId, UJ_languageId); + } + + /** + * Register inline condition of languageId. + * + * @param key Condition key. (NotNull) + * @param value The value of languageId. (Nullable) + */ + protected void registerInlineLanguageId(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueLanguageId(), COL_LANGUAGE_ID, J_LanguageId, UJ_languageId); + } + + abstract protected ConditionValue getCValueLanguageId(); + + /** Column db name of productsName. */ + protected static final String COL_PRODUCTS_NAME = "PRODUCTS_NAME"; + + /** Column java name of productsName. */ + protected static final String J_ProductsName = "ProductsName"; + + /** Column uncapitalised java name of productsName. */ + protected static final String UJ_productsName = "productsName"; + + /** + * Set the value of productsName using equal. { = } + * If the value is null or empty-string, this condition is ignored. + * + * @param productsName The value of productsName as equal. + */ + public void setProductsName_Equal(String productsName) { + registerProductsName(ConditionKey.CK_EQUAL, filterRemoveEmptyString(productsName)); + } + + /** + * Set the value of productsName using notEqual. { != } + * If the value is null or empty-string, this condition is ignored. + * + * @param productsName The value of productsName as notEqual. + */ + public void setProductsName_NotEqual(String productsName) { + registerProductsName(ConditionKey.CK_NOT_EQUAL, filterRemoveEmptyString(productsName)); + } + + /** + * Set the value of productsName using greaterThan. { > } + * If the value is null or empty-string, this condition is ignored. + * + * @param productsName The value of productsName as greaterThan. + */ + public void setProductsName_GreaterThan(String productsName) { + registerProductsName(ConditionKey.CK_GREATER_THAN, filterRemoveEmptyString(productsName)); + } + + /** + * Set the value of productsName using lessThan. { < } + * If the value is null or empty-string, this condition is ignored. + * + * @param productsName The value of productsName as lessThan. + */ + public void setProductsName_LessThan(String productsName) { + registerProductsName(ConditionKey.CK_LESS_THAN, filterRemoveEmptyString(productsName)); + } + + /** + * Set the value of productsName using greaterEqual. { >= } + * If the value is null or empty-string, this condition is ignored. + * + * @param productsName The value of productsName as greaterEqual. + */ + public void setProductsName_GreaterEqual(String productsName) { + registerProductsName(ConditionKey.CK_GREATER_EQUAL, filterRemoveEmptyString(productsName)); + } + + /** + * Set the value of productsName using lessEqual. { <= } + * If the value is null or empty-string, this condition is ignored. + * + * @param productsName The value of productsName as lessEqual. + */ + public void setProductsName_LessEqual(String productsName) { + registerProductsName(ConditionKey.CK_LESS_EQUAL, filterRemoveEmptyString(productsName)); + } + + /** + * Set the value of productsName using prefixSearch. { like 'xxx%' } + * If the value is null or empty-string, this condition is ignored. + * + * @param productsName The value of productsName as prefixSearch. + */ + public void setProductsName_PrefixSearch(String productsName) { + registerProductsName(ConditionKey.CK_PREFIX_SEARCH, filterRemoveEmptyString(productsName)); + } + + /** + * Set the value of productsName using likeSearch. { like '%xxx%' } + * If the value is null or empty-string, this condition is ignored. + * You can invoke this method several times and the conditions are set up. + * + * @param productsName The value of productsName as likeSearch. + * @param likeSearchOption Like search option. (NotNull) + */ + public void setProductsName_LikeSearch(String productsName, jp.sf.pal.pompei.allcommon.cbean.coption.LikeSearchOption likeSearchOption) { + registerLikeSearchQuery(ConditionKey.CK_LIKE_SEARCH, filterRemoveEmptyString(productsName), getCValueProductsName(), COL_PRODUCTS_NAME, J_ProductsName, UJ_productsName, likeSearchOption); + } + + /** + * Set the value of productsName using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param productsNameList The value of productsName as inScope. + */ + public void setProductsName_InScope(java.util.List productsNameList) { + registerProductsName(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyStringFromList(productsNameList)); + } + + /** + * Set the value of productsName using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param productsName The value of productsName as inScope. + */ + public void setProductsName_InScope(String productsName, jp.sf.pal.pompei.allcommon.cbean.coption.InScopeOption option) { + registerInScopeQuery(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyString(productsName), getCValueProductsName(), COL_PRODUCTS_NAME, J_ProductsName, UJ_productsName, option); + } + + /** + * Set the value of productsName using notInScope. { not in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param productsNameList The value of productsName as notInScope. + */ + public void setProductsName_NotInScope(java.util.List productsNameList) { + registerProductsName(ConditionKey.CK_NOT_IN_SCOPE, filterRemoveEmptyStringFromList(productsNameList)); + } + + /** + * Register condition of productsName. + * + * @param key Condition key. (NotNull) + * @param value The value of productsName. (Nullable) + */ + protected void registerProductsName(ConditionKey key, Object value) { + registerQuery(key, value, getCValueProductsName(), COL_PRODUCTS_NAME, J_ProductsName, UJ_productsName); + } + + /** + * Register inline condition of productsName. + * + * @param key Condition key. (NotNull) + * @param value The value of productsName. (Nullable) + */ + protected void registerInlineProductsName(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueProductsName(), COL_PRODUCTS_NAME, J_ProductsName, UJ_productsName); + } + + abstract protected ConditionValue getCValueProductsName(); + + /** Column db name of productsDescription. */ + protected static final String COL_PRODUCTS_DESCRIPTION = "PRODUCTS_DESCRIPTION"; + + /** Column java name of productsDescription. */ + protected static final String J_ProductsDescription = "ProductsDescription"; + + /** Column uncapitalised java name of productsDescription. */ + protected static final String UJ_productsDescription = "productsDescription"; + + /** + * Set the value of productsDescription using equal. { = } + * If the value is null or empty-string, this condition is ignored. + * + * @param productsDescription The value of productsDescription as equal. + */ + public void setProductsDescription_Equal(String productsDescription) { + registerProductsDescription(ConditionKey.CK_EQUAL, filterRemoveEmptyString(productsDescription)); + } + + /** + * Set the value of productsDescription using notEqual. { != } + * If the value is null or empty-string, this condition is ignored. + * + * @param productsDescription The value of productsDescription as notEqual. + */ + public void setProductsDescription_NotEqual(String productsDescription) { + registerProductsDescription(ConditionKey.CK_NOT_EQUAL, filterRemoveEmptyString(productsDescription)); + } + + /** + * Set the value of productsDescription using greaterThan. { > } + * If the value is null or empty-string, this condition is ignored. + * + * @param productsDescription The value of productsDescription as greaterThan. + */ + public void setProductsDescription_GreaterThan(String productsDescription) { + registerProductsDescription(ConditionKey.CK_GREATER_THAN, filterRemoveEmptyString(productsDescription)); + } + + /** + * Set the value of productsDescription using lessThan. { < } + * If the value is null or empty-string, this condition is ignored. + * + * @param productsDescription The value of productsDescription as lessThan. + */ + public void setProductsDescription_LessThan(String productsDescription) { + registerProductsDescription(ConditionKey.CK_LESS_THAN, filterRemoveEmptyString(productsDescription)); + } + + /** + * Set the value of productsDescription using greaterEqual. { >= } + * If the value is null or empty-string, this condition is ignored. + * + * @param productsDescription The value of productsDescription as greaterEqual. + */ + public void setProductsDescription_GreaterEqual(String productsDescription) { + registerProductsDescription(ConditionKey.CK_GREATER_EQUAL, filterRemoveEmptyString(productsDescription)); + } + + /** + * Set the value of productsDescription using lessEqual. { <= } + * If the value is null or empty-string, this condition is ignored. + * + * @param productsDescription The value of productsDescription as lessEqual. + */ + public void setProductsDescription_LessEqual(String productsDescription) { + registerProductsDescription(ConditionKey.CK_LESS_EQUAL, filterRemoveEmptyString(productsDescription)); + } + + /** + * Set the value of productsDescription using prefixSearch. { like 'xxx%' } + * If the value is null or empty-string, this condition is ignored. + * + * @param productsDescription The value of productsDescription as prefixSearch. + */ + public void setProductsDescription_PrefixSearch(String productsDescription) { + registerProductsDescription(ConditionKey.CK_PREFIX_SEARCH, filterRemoveEmptyString(productsDescription)); + } + + /** + * Set the value of productsDescription using likeSearch. { like '%xxx%' } + * If the value is null or empty-string, this condition is ignored. + * You can invoke this method several times and the conditions are set up. + * + * @param productsDescription The value of productsDescription as likeSearch. + * @param likeSearchOption Like search option. (NotNull) + */ + public void setProductsDescription_LikeSearch(String productsDescription, jp.sf.pal.pompei.allcommon.cbean.coption.LikeSearchOption likeSearchOption) { + registerLikeSearchQuery(ConditionKey.CK_LIKE_SEARCH, filterRemoveEmptyString(productsDescription), getCValueProductsDescription(), COL_PRODUCTS_DESCRIPTION, J_ProductsDescription, UJ_productsDescription, likeSearchOption); + } + + /** + * Set the value of productsDescription using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param productsDescriptionList The value of productsDescription as inScope. + */ + public void setProductsDescription_InScope(java.util.List productsDescriptionList) { + registerProductsDescription(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyStringFromList(productsDescriptionList)); + } + + /** + * Set the value of productsDescription using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param productsDescription The value of productsDescription as inScope. + */ + public void setProductsDescription_InScope(String productsDescription, jp.sf.pal.pompei.allcommon.cbean.coption.InScopeOption option) { + registerInScopeQuery(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyString(productsDescription), getCValueProductsDescription(), COL_PRODUCTS_DESCRIPTION, J_ProductsDescription, UJ_productsDescription, option); + } + + /** + * Set the value of productsDescription using notInScope. { not in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param productsDescriptionList The value of productsDescription as notInScope. + */ + public void setProductsDescription_NotInScope(java.util.List productsDescriptionList) { + registerProductsDescription(ConditionKey.CK_NOT_IN_SCOPE, filterRemoveEmptyStringFromList(productsDescriptionList)); + } + + /** + * Set the value of productsDescription using isNull. { is null } + */ + public void setProductsDescription_IsNull() { + registerProductsDescription(ConditionKey.CK_IS_NULL, DUMMY_OBJECT); + } + + /** + * Set the value of productsDescription using isNotNull. { is not null } + */ + public void setProductsDescription_IsNotNull() { + registerProductsDescription(ConditionKey.CK_IS_NOT_NULL, DUMMY_OBJECT); + } + + /** + * Register condition of productsDescription. + * + * @param key Condition key. (NotNull) + * @param value The value of productsDescription. (Nullable) + */ + protected void registerProductsDescription(ConditionKey key, Object value) { + registerQuery(key, value, getCValueProductsDescription(), COL_PRODUCTS_DESCRIPTION, J_ProductsDescription, UJ_productsDescription); + } + + /** + * Register inline condition of productsDescription. + * + * @param key Condition key. (NotNull) + * @param value The value of productsDescription. (Nullable) + */ + protected void registerInlineProductsDescription(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueProductsDescription(), COL_PRODUCTS_DESCRIPTION, J_ProductsDescription, UJ_productsDescription); + } + + abstract protected ConditionValue getCValueProductsDescription(); + + /** Column db name of productsUrl. */ + protected static final String COL_PRODUCTS_URL = "PRODUCTS_URL"; + + /** Column java name of productsUrl. */ + protected static final String J_ProductsUrl = "ProductsUrl"; + + /** Column uncapitalised java name of productsUrl. */ + protected static final String UJ_productsUrl = "productsUrl"; + + /** + * Set the value of productsUrl using equal. { = } + * If the value is null or empty-string, this condition is ignored. + * + * @param productsUrl The value of productsUrl as equal. + */ + public void setProductsUrl_Equal(String productsUrl) { + registerProductsUrl(ConditionKey.CK_EQUAL, filterRemoveEmptyString(productsUrl)); + } + + /** + * Set the value of productsUrl using notEqual. { != } + * If the value is null or empty-string, this condition is ignored. + * + * @param productsUrl The value of productsUrl as notEqual. + */ + public void setProductsUrl_NotEqual(String productsUrl) { + registerProductsUrl(ConditionKey.CK_NOT_EQUAL, filterRemoveEmptyString(productsUrl)); + } + + /** + * Set the value of productsUrl using greaterThan. { > } + * If the value is null or empty-string, this condition is ignored. + * + * @param productsUrl The value of productsUrl as greaterThan. + */ + public void setProductsUrl_GreaterThan(String productsUrl) { + registerProductsUrl(ConditionKey.CK_GREATER_THAN, filterRemoveEmptyString(productsUrl)); + } + + /** + * Set the value of productsUrl using lessThan. { < } + * If the value is null or empty-string, this condition is ignored. + * + * @param productsUrl The value of productsUrl as lessThan. + */ + public void setProductsUrl_LessThan(String productsUrl) { + registerProductsUrl(ConditionKey.CK_LESS_THAN, filterRemoveEmptyString(productsUrl)); + } + + /** + * Set the value of productsUrl using greaterEqual. { >= } + * If the value is null or empty-string, this condition is ignored. + * + * @param productsUrl The value of productsUrl as greaterEqual. + */ + public void setProductsUrl_GreaterEqual(String productsUrl) { + registerProductsUrl(ConditionKey.CK_GREATER_EQUAL, filterRemoveEmptyString(productsUrl)); + } + + /** + * Set the value of productsUrl using lessEqual. { <= } + * If the value is null or empty-string, this condition is ignored. + * + * @param productsUrl The value of productsUrl as lessEqual. + */ + public void setProductsUrl_LessEqual(String productsUrl) { + registerProductsUrl(ConditionKey.CK_LESS_EQUAL, filterRemoveEmptyString(productsUrl)); + } + + /** + * Set the value of productsUrl using prefixSearch. { like 'xxx%' } + * If the value is null or empty-string, this condition is ignored. + * + * @param productsUrl The value of productsUrl as prefixSearch. + */ + public void setProductsUrl_PrefixSearch(String productsUrl) { + registerProductsUrl(ConditionKey.CK_PREFIX_SEARCH, filterRemoveEmptyString(productsUrl)); + } + + /** + * Set the value of productsUrl using likeSearch. { like '%xxx%' } + * If the value is null or empty-string, this condition is ignored. + * You can invoke this method several times and the conditions are set up. + * + * @param productsUrl The value of productsUrl as likeSearch. + * @param likeSearchOption Like search option. (NotNull) + */ + public void setProductsUrl_LikeSearch(String productsUrl, jp.sf.pal.pompei.allcommon.cbean.coption.LikeSearchOption likeSearchOption) { + registerLikeSearchQuery(ConditionKey.CK_LIKE_SEARCH, filterRemoveEmptyString(productsUrl), getCValueProductsUrl(), COL_PRODUCTS_URL, J_ProductsUrl, UJ_productsUrl, likeSearchOption); + } + + /** + * Set the value of productsUrl using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param productsUrlList The value of productsUrl as inScope. + */ + public void setProductsUrl_InScope(java.util.List productsUrlList) { + registerProductsUrl(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyStringFromList(productsUrlList)); + } + + /** + * Set the value of productsUrl using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param productsUrl The value of productsUrl as inScope. + */ + public void setProductsUrl_InScope(String productsUrl, jp.sf.pal.pompei.allcommon.cbean.coption.InScopeOption option) { + registerInScopeQuery(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyString(productsUrl), getCValueProductsUrl(), COL_PRODUCTS_URL, J_ProductsUrl, UJ_productsUrl, option); + } + + /** + * Set the value of productsUrl using notInScope. { not in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param productsUrlList The value of productsUrl as notInScope. + */ + public void setProductsUrl_NotInScope(java.util.List productsUrlList) { + registerProductsUrl(ConditionKey.CK_NOT_IN_SCOPE, filterRemoveEmptyStringFromList(productsUrlList)); + } + + /** + * Set the value of productsUrl using isNull. { is null } + */ + public void setProductsUrl_IsNull() { + registerProductsUrl(ConditionKey.CK_IS_NULL, DUMMY_OBJECT); + } + + /** + * Set the value of productsUrl using isNotNull. { is not null } + */ + public void setProductsUrl_IsNotNull() { + registerProductsUrl(ConditionKey.CK_IS_NOT_NULL, DUMMY_OBJECT); + } + + /** + * Register condition of productsUrl. + * + * @param key Condition key. (NotNull) + * @param value The value of productsUrl. (Nullable) + */ + protected void registerProductsUrl(ConditionKey key, Object value) { + registerQuery(key, value, getCValueProductsUrl(), COL_PRODUCTS_URL, J_ProductsUrl, UJ_productsUrl); + } + + /** + * Register inline condition of productsUrl. + * + * @param key Condition key. (NotNull) + * @param value The value of productsUrl. (Nullable) + */ + protected void registerInlineProductsUrl(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueProductsUrl(), COL_PRODUCTS_URL, J_ProductsUrl, UJ_productsUrl); + } + + abstract protected ConditionValue getCValueProductsUrl(); + + /** Column db name of productsViewed. */ + protected static final String COL_PRODUCTS_VIEWED = "PRODUCTS_VIEWED"; + + /** Column java name of productsViewed. */ + protected static final String J_ProductsViewed = "ProductsViewed"; + + /** Column uncapitalised java name of productsViewed. */ + protected static final String UJ_productsViewed = "productsViewed"; + + /** + * Set the value of productsViewed using equal. { = } + * + * @param productsViewed The value of productsViewed as equal. + */ + public void setProductsViewed_Equal(java.math.BigDecimal productsViewed) { + registerProductsViewed(ConditionKey.CK_EQUAL, productsViewed); + } + + /** + * Set the value of productsViewed using notEqual. { != } + * + * @param productsViewed The value of productsViewed as notEqual. + */ + public void setProductsViewed_NotEqual(java.math.BigDecimal productsViewed) { + registerProductsViewed(ConditionKey.CK_NOT_EQUAL, productsViewed); + } + + /** + * Set the value of productsViewed using greaterThan. { > } + * + * @param productsViewed The value of productsViewed as greaterThan. + */ + public void setProductsViewed_GreaterThan(java.math.BigDecimal productsViewed) { + registerProductsViewed(ConditionKey.CK_GREATER_THAN, productsViewed); + } + + /** + * Set the value of productsViewed using lessThan. { < } + * + * @param productsViewed The value of productsViewed as lessThan. + */ + public void setProductsViewed_LessThan(java.math.BigDecimal productsViewed) { + registerProductsViewed(ConditionKey.CK_LESS_THAN, productsViewed); + } + + /** + * Set the value of productsViewed using greaterEqual. { >= } + * + * @param productsViewed The value of productsViewed as greaterEqual. + */ + public void setProductsViewed_GreaterEqual(java.math.BigDecimal productsViewed) { + registerProductsViewed(ConditionKey.CK_GREATER_EQUAL, productsViewed); + } + + /** + * Set the value of productsViewed using lessEqual. { <= } + * + * @param productsViewed The value of productsViewed as lessEqual. + */ + public void setProductsViewed_LessEqual(java.math.BigDecimal productsViewed) { + registerProductsViewed(ConditionKey.CK_LESS_EQUAL, productsViewed); + } + + /** + * Set the value of productsViewed using inScope. { in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param productsViewedList The value of productsViewed as inScope. + */ + public void setProductsViewed_InScope(java.util.List productsViewedList) { + registerProductsViewed(ConditionKey.CK_IN_SCOPE, productsViewedList); + } + + /** + * Set the value of productsViewed using notInScope. { not in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param productsViewedList The value of productsViewed as notInScope. + */ + public void setProductsViewed_NotInScope(java.util.List productsViewedList) { + registerProductsViewed(ConditionKey.CK_NOT_IN_SCOPE, productsViewedList); + } + + /** + * Set the value of productsViewed using isNull. { is null } + */ + public void setProductsViewed_IsNull() { + registerProductsViewed(ConditionKey.CK_IS_NULL, DUMMY_OBJECT); + } + + /** + * Set the value of productsViewed using isNotNull. { is not null } + */ + public void setProductsViewed_IsNotNull() { + registerProductsViewed(ConditionKey.CK_IS_NOT_NULL, DUMMY_OBJECT); + } + + /** + * Register condition of productsViewed. + * + * @param key Condition key. (NotNull) + * @param value The value of productsViewed. (Nullable) + */ + protected void registerProductsViewed(ConditionKey key, Object value) { + registerQuery(key, value, getCValueProductsViewed(), COL_PRODUCTS_VIEWED, J_ProductsViewed, UJ_productsViewed); + } + + /** + * Register inline condition of productsViewed. + * + * @param key Condition key. (NotNull) + * @param value The value of productsViewed. (Nullable) + */ + protected void registerInlineProductsViewed(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueProductsViewed(), COL_PRODUCTS_VIEWED, J_ProductsViewed, UJ_productsViewed); + } + + abstract protected ConditionValue getCValueProductsViewed(); + + // =================================================================================== + // Basic Override + // ============== + /** + * This method overrides the method that is declared at super. + * + * @return Clause string. (NotNull) + */ + public String toString() { + return getSqlClause().getClause(); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/AbstractBsProductsNotificationsCQ.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/AbstractBsProductsNotificationsCQ.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/AbstractBsProductsNotificationsCQ.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,371 @@ + +package jp.sf.pal.pompei.cbean.cq.bs; + + + +import jp.sf.pal.pompei.allcommon.cbean.*; +import jp.sf.pal.pompei.allcommon.cbean.ckey.*; +import jp.sf.pal.pompei.allcommon.cbean.cvalue.ConditionValue; +import jp.sf.pal.pompei.allcommon.cbean.sqlclause.SqlClause; +import jp.sf.pal.pompei.cbean.cq.*; + +/** + * The condition-query of PRODUCTS_NOTIFICATIONS. + * + * @author DBFlute(AutoGenerator) + */ +public abstract class AbstractBsProductsNotificationsCQ extends AbstractConditionQuery { + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param childQuery Child query as abstract class. (Nullable: If null, this is base instance.) + * @param sqlClause SQL clause instance. (NotNull) + * @param aliasName My alias name. (NotNull) + * @param nestLevel Nest level. + */ + public AbstractBsProductsNotificationsCQ(ConditionQuery childQuery, SqlClause sqlClause, String aliasName, int nestLevel) { + super(childQuery, sqlClause, aliasName, nestLevel); + } + + // =================================================================================== + // Table Name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + final public String getTableDbName() { + return "PRODUCTS_NOTIFICATIONS"; + } + + // =================================================================================== + // Query + // ===== + + // /* * * * * * * * * * * * * * * * * * * * * * * + // MyTable = [PRODUCTS_NOTIFICATIONS] + // * * * * * * * * */ + + + /** Column db name of productsId. */ + protected static final String COL_PRODUCTS_ID = "PRODUCTS_ID"; + + /** Column java name of productsId. */ + protected static final String J_ProductsId = "ProductsId"; + + /** Column uncapitalised java name of productsId. */ + protected static final String UJ_productsId = "productsId"; + + /** + * Set the value of productsId using equal. { = } + * + * @param productsId The value of productsId as equal. + */ + public void setProductsId_Equal(java.math.BigDecimal productsId) { + registerProductsId(ConditionKey.CK_EQUAL, productsId); + } + + /** + * Set the value of productsId using notEqual. { != } + * + * @param productsId The value of productsId as notEqual. + */ + public void setProductsId_NotEqual(java.math.BigDecimal productsId) { + registerProductsId(ConditionKey.CK_NOT_EQUAL, productsId); + } + + /** + * Set the value of productsId using greaterThan. { > } + * + * @param productsId The value of productsId as greaterThan. + */ + public void setProductsId_GreaterThan(java.math.BigDecimal productsId) { + registerProductsId(ConditionKey.CK_GREATER_THAN, productsId); + } + + /** + * Set the value of productsId using lessThan. { < } + * + * @param productsId The value of productsId as lessThan. + */ + public void setProductsId_LessThan(java.math.BigDecimal productsId) { + registerProductsId(ConditionKey.CK_LESS_THAN, productsId); + } + + /** + * Set the value of productsId using greaterEqual. { >= } + * + * @param productsId The value of productsId as greaterEqual. + */ + public void setProductsId_GreaterEqual(java.math.BigDecimal productsId) { + registerProductsId(ConditionKey.CK_GREATER_EQUAL, productsId); + } + + /** + * Set the value of productsId using lessEqual. { <= } + * + * @param productsId The value of productsId as lessEqual. + */ + public void setProductsId_LessEqual(java.math.BigDecimal productsId) { + registerProductsId(ConditionKey.CK_LESS_EQUAL, productsId); + } + + /** + * Set the value of productsId using inScope. { in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param productsIdList The value of productsId as inScope. + */ + public void setProductsId_InScope(java.util.List productsIdList) { + registerProductsId(ConditionKey.CK_IN_SCOPE, productsIdList); + } + + /** + * Set the value of productsId using notInScope. { not in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param productsIdList The value of productsId as notInScope. + */ + public void setProductsId_NotInScope(java.util.List productsIdList) { + registerProductsId(ConditionKey.CK_NOT_IN_SCOPE, productsIdList); + } + + /** + * Register condition of productsId. + * + * @param key Condition key. (NotNull) + * @param value The value of productsId. (Nullable) + */ + protected void registerProductsId(ConditionKey key, Object value) { + registerQuery(key, value, getCValueProductsId(), COL_PRODUCTS_ID, J_ProductsId, UJ_productsId); + } + + /** + * Register inline condition of productsId. + * + * @param key Condition key. (NotNull) + * @param value The value of productsId. (Nullable) + */ + protected void registerInlineProductsId(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueProductsId(), COL_PRODUCTS_ID, J_ProductsId, UJ_productsId); + } + + abstract protected ConditionValue getCValueProductsId(); + + /** Column db name of customersId. */ + protected static final String COL_CUSTOMERS_ID = "CUSTOMERS_ID"; + + /** Column java name of customersId. */ + protected static final String J_CustomersId = "CustomersId"; + + /** Column uncapitalised java name of customersId. */ + protected static final String UJ_customersId = "customersId"; + + /** + * Set the value of customersId using equal. { = } + * + * @param customersId The value of customersId as equal. + */ + public void setCustomersId_Equal(java.math.BigDecimal customersId) { + registerCustomersId(ConditionKey.CK_EQUAL, customersId); + } + + /** + * Set the value of customersId using notEqual. { != } + * + * @param customersId The value of customersId as notEqual. + */ + public void setCustomersId_NotEqual(java.math.BigDecimal customersId) { + registerCustomersId(ConditionKey.CK_NOT_EQUAL, customersId); + } + + /** + * Set the value of customersId using greaterThan. { > } + * + * @param customersId The value of customersId as greaterThan. + */ + public void setCustomersId_GreaterThan(java.math.BigDecimal customersId) { + registerCustomersId(ConditionKey.CK_GREATER_THAN, customersId); + } + + /** + * Set the value of customersId using lessThan. { < } + * + * @param customersId The value of customersId as lessThan. + */ + public void setCustomersId_LessThan(java.math.BigDecimal customersId) { + registerCustomersId(ConditionKey.CK_LESS_THAN, customersId); + } + + /** + * Set the value of customersId using greaterEqual. { >= } + * + * @param customersId The value of customersId as greaterEqual. + */ + public void setCustomersId_GreaterEqual(java.math.BigDecimal customersId) { + registerCustomersId(ConditionKey.CK_GREATER_EQUAL, customersId); + } + + /** + * Set the value of customersId using lessEqual. { <= } + * + * @param customersId The value of customersId as lessEqual. + */ + public void setCustomersId_LessEqual(java.math.BigDecimal customersId) { + registerCustomersId(ConditionKey.CK_LESS_EQUAL, customersId); + } + + /** + * Set the value of customersId using inScope. { in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param customersIdList The value of customersId as inScope. + */ + public void setCustomersId_InScope(java.util.List customersIdList) { + registerCustomersId(ConditionKey.CK_IN_SCOPE, customersIdList); + } + + /** + * Set the value of customersId using notInScope. { not in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param customersIdList The value of customersId as notInScope. + */ + public void setCustomersId_NotInScope(java.util.List customersIdList) { + registerCustomersId(ConditionKey.CK_NOT_IN_SCOPE, customersIdList); + } + + /** + * Register condition of customersId. + * + * @param key Condition key. (NotNull) + * @param value The value of customersId. (Nullable) + */ + protected void registerCustomersId(ConditionKey key, Object value) { + registerQuery(key, value, getCValueCustomersId(), COL_CUSTOMERS_ID, J_CustomersId, UJ_customersId); + } + + /** + * Register inline condition of customersId. + * + * @param key Condition key. (NotNull) + * @param value The value of customersId. (Nullable) + */ + protected void registerInlineCustomersId(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueCustomersId(), COL_CUSTOMERS_ID, J_CustomersId, UJ_customersId); + } + + abstract protected ConditionValue getCValueCustomersId(); + + /** Column db name of dateAdded. */ + protected static final String COL_DATE_ADDED = "DATE_ADDED"; + + /** Column java name of dateAdded. */ + protected static final String J_DateAdded = "DateAdded"; + + /** Column uncapitalised java name of dateAdded. */ + protected static final String UJ_dateAdded = "dateAdded"; + + /** + * Set the value of dateAdded using equal. { = } + * + * @param dateAdded The value of dateAdded as equal. + */ + public void setDateAdded_Equal(java.sql.Timestamp dateAdded) { + registerDateAdded(ConditionKey.CK_EQUAL, dateAdded); + } + + /** + * Set the value of dateAdded using notEqual. { != } + * + * @param dateAdded The value of dateAdded as notEqual. + */ + public void setDateAdded_NotEqual(java.sql.Timestamp dateAdded) { + registerDateAdded(ConditionKey.CK_NOT_EQUAL, dateAdded); + } + + /** + * Set the value of dateAdded using greaterThan. { > } + * + * @param dateAdded The value of dateAdded as greaterThan. + */ + public void setDateAdded_GreaterThan(java.sql.Timestamp dateAdded) { + registerDateAdded(ConditionKey.CK_GREATER_THAN, dateAdded); + } + + /** + * Set the value of dateAdded using lessThan. { < } + * + * @param dateAdded The value of dateAdded as lessThan. + */ + public void setDateAdded_LessThan(java.sql.Timestamp dateAdded) { + registerDateAdded(ConditionKey.CK_LESS_THAN, dateAdded); + } + + /** + * Set the value of dateAdded using greaterEqual. { >= } + * + * @param dateAdded The value of dateAdded as greaterEqual. + */ + public void setDateAdded_GreaterEqual(java.sql.Timestamp dateAdded) { + registerDateAdded(ConditionKey.CK_GREATER_EQUAL, dateAdded); + } + + /** + * Set the value of dateAdded using lessEqual. { <= } + * + * @param dateAdded The value of dateAdded as lessEqual. + */ + public void setDateAdded_LessEqual(java.sql.Timestamp dateAdded) { + registerDateAdded(ConditionKey.CK_LESS_EQUAL, dateAdded); + } + + /** + * Set the value of dateAdded using from-to. { $fromDate <= COLUMN_NAME <= $toDate } + * + * @param dateAdded The value of dateAdded as from-to. + * @param fromToOption From-To option. (NotNull) + */ + public void setDateAdded_FromTo(java.sql.Timestamp fromDate, java.sql.Timestamp toDate, jp.sf.pal.pompei.allcommon.cbean.coption.FromToOption fromToOption) { + registerFromToQuery(fromDate, toDate, getCValueDateAdded(), COL_DATE_ADDED, J_DateAdded, UJ_dateAdded, fromToOption); + } + + /** + * Register condition of dateAdded. + * + * @param key Condition key. (NotNull) + * @param value The value of dateAdded. (Nullable) + */ + protected void registerDateAdded(ConditionKey key, Object value) { + registerQuery(key, value, getCValueDateAdded(), COL_DATE_ADDED, J_DateAdded, UJ_dateAdded); + } + + /** + * Register inline condition of dateAdded. + * + * @param key Condition key. (NotNull) + * @param value The value of dateAdded. (Nullable) + */ + protected void registerInlineDateAdded(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueDateAdded(), COL_DATE_ADDED, J_DateAdded, UJ_dateAdded); + } + + abstract protected ConditionValue getCValueDateAdded(); + + // =================================================================================== + // Basic Override + // ============== + /** + * This method overrides the method that is declared at super. + * + * @return Clause string. (NotNull) + */ + public String toString() { + return getSqlClause().getClause(); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/AbstractBsProductsOptionsCQ.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/AbstractBsProductsOptionsCQ.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/AbstractBsProductsOptionsCQ.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,419 @@ + +package jp.sf.pal.pompei.cbean.cq.bs; + + + +import jp.sf.pal.pompei.allcommon.cbean.*; +import jp.sf.pal.pompei.allcommon.cbean.ckey.*; +import jp.sf.pal.pompei.allcommon.cbean.cvalue.ConditionValue; +import jp.sf.pal.pompei.allcommon.cbean.sqlclause.SqlClause; +import jp.sf.pal.pompei.cbean.cq.*; + +/** + * The condition-query of PRODUCTS_OPTIONS. + * + * @author DBFlute(AutoGenerator) + */ +public abstract class AbstractBsProductsOptionsCQ extends AbstractConditionQuery { + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param childQuery Child query as abstract class. (Nullable: If null, this is base instance.) + * @param sqlClause SQL clause instance. (NotNull) + * @param aliasName My alias name. (NotNull) + * @param nestLevel Nest level. + */ + public AbstractBsProductsOptionsCQ(ConditionQuery childQuery, SqlClause sqlClause, String aliasName, int nestLevel) { + super(childQuery, sqlClause, aliasName, nestLevel); + } + + // =================================================================================== + // Table Name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + final public String getTableDbName() { + return "PRODUCTS_OPTIONS"; + } + + // =================================================================================== + // Query + // ===== + + // /* * * * * * * * * * * * * * * * * * * * * * * + // MyTable = [PRODUCTS_OPTIONS] + // * * * * * * * * */ + + + /** Column db name of productsOptionsId. */ + protected static final String COL_PRODUCTS_OPTIONS_ID = "PRODUCTS_OPTIONS_ID"; + + /** Column java name of productsOptionsId. */ + protected static final String J_ProductsOptionsId = "ProductsOptionsId"; + + /** Column uncapitalised java name of productsOptionsId. */ + protected static final String UJ_productsOptionsId = "productsOptionsId"; + + /** + * Set the value of productsOptionsId using equal. { = } + * + * @param productsOptionsId The value of productsOptionsId as equal. + */ + public void setProductsOptionsId_Equal(java.math.BigDecimal productsOptionsId) { + registerProductsOptionsId(ConditionKey.CK_EQUAL, productsOptionsId); + } + + /** + * Set the value of productsOptionsId using notEqual. { != } + * + * @param productsOptionsId The value of productsOptionsId as notEqual. + */ + public void setProductsOptionsId_NotEqual(java.math.BigDecimal productsOptionsId) { + registerProductsOptionsId(ConditionKey.CK_NOT_EQUAL, productsOptionsId); + } + + /** + * Set the value of productsOptionsId using greaterThan. { > } + * + * @param productsOptionsId The value of productsOptionsId as greaterThan. + */ + public void setProductsOptionsId_GreaterThan(java.math.BigDecimal productsOptionsId) { + registerProductsOptionsId(ConditionKey.CK_GREATER_THAN, productsOptionsId); + } + + /** + * Set the value of productsOptionsId using lessThan. { < } + * + * @param productsOptionsId The value of productsOptionsId as lessThan. + */ + public void setProductsOptionsId_LessThan(java.math.BigDecimal productsOptionsId) { + registerProductsOptionsId(ConditionKey.CK_LESS_THAN, productsOptionsId); + } + + /** + * Set the value of productsOptionsId using greaterEqual. { >= } + * + * @param productsOptionsId The value of productsOptionsId as greaterEqual. + */ + public void setProductsOptionsId_GreaterEqual(java.math.BigDecimal productsOptionsId) { + registerProductsOptionsId(ConditionKey.CK_GREATER_EQUAL, productsOptionsId); + } + + /** + * Set the value of productsOptionsId using lessEqual. { <= } + * + * @param productsOptionsId The value of productsOptionsId as lessEqual. + */ + public void setProductsOptionsId_LessEqual(java.math.BigDecimal productsOptionsId) { + registerProductsOptionsId(ConditionKey.CK_LESS_EQUAL, productsOptionsId); + } + + /** + * Set the value of productsOptionsId using inScope. { in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param productsOptionsIdList The value of productsOptionsId as inScope. + */ + public void setProductsOptionsId_InScope(java.util.List productsOptionsIdList) { + registerProductsOptionsId(ConditionKey.CK_IN_SCOPE, productsOptionsIdList); + } + + /** + * Set the value of productsOptionsId using notInScope. { not in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param productsOptionsIdList The value of productsOptionsId as notInScope. + */ + public void setProductsOptionsId_NotInScope(java.util.List productsOptionsIdList) { + registerProductsOptionsId(ConditionKey.CK_NOT_IN_SCOPE, productsOptionsIdList); + } + + /** + * Register condition of productsOptionsId. + * + * @param key Condition key. (NotNull) + * @param value The value of productsOptionsId. (Nullable) + */ + protected void registerProductsOptionsId(ConditionKey key, Object value) { + registerQuery(key, value, getCValueProductsOptionsId(), COL_PRODUCTS_OPTIONS_ID, J_ProductsOptionsId, UJ_productsOptionsId); + } + + /** + * Register inline condition of productsOptionsId. + * + * @param key Condition key. (NotNull) + * @param value The value of productsOptionsId. (Nullable) + */ + protected void registerInlineProductsOptionsId(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueProductsOptionsId(), COL_PRODUCTS_OPTIONS_ID, J_ProductsOptionsId, UJ_productsOptionsId); + } + + abstract protected ConditionValue getCValueProductsOptionsId(); + + /** Column db name of languageId. */ + protected static final String COL_LANGUAGE_ID = "LANGUAGE_ID"; + + /** Column java name of languageId. */ + protected static final String J_LanguageId = "LanguageId"; + + /** Column uncapitalised java name of languageId. */ + protected static final String UJ_languageId = "languageId"; + + /** + * Set the value of languageId using equal. { = } + * + * @param languageId The value of languageId as equal. + */ + public void setLanguageId_Equal(java.math.BigDecimal languageId) { + registerLanguageId(ConditionKey.CK_EQUAL, languageId); + } + + /** + * Set the value of languageId using notEqual. { != } + * + * @param languageId The value of languageId as notEqual. + */ + public void setLanguageId_NotEqual(java.math.BigDecimal languageId) { + registerLanguageId(ConditionKey.CK_NOT_EQUAL, languageId); + } + + /** + * Set the value of languageId using greaterThan. { > } + * + * @param languageId The value of languageId as greaterThan. + */ + public void setLanguageId_GreaterThan(java.math.BigDecimal languageId) { + registerLanguageId(ConditionKey.CK_GREATER_THAN, languageId); + } + + /** + * Set the value of languageId using lessThan. { < } + * + * @param languageId The value of languageId as lessThan. + */ + public void setLanguageId_LessThan(java.math.BigDecimal languageId) { + registerLanguageId(ConditionKey.CK_LESS_THAN, languageId); + } + + /** + * Set the value of languageId using greaterEqual. { >= } + * + * @param languageId The value of languageId as greaterEqual. + */ + public void setLanguageId_GreaterEqual(java.math.BigDecimal languageId) { + registerLanguageId(ConditionKey.CK_GREATER_EQUAL, languageId); + } + + /** + * Set the value of languageId using lessEqual. { <= } + * + * @param languageId The value of languageId as lessEqual. + */ + public void setLanguageId_LessEqual(java.math.BigDecimal languageId) { + registerLanguageId(ConditionKey.CK_LESS_EQUAL, languageId); + } + + /** + * Set the value of languageId using inScope. { in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param languageIdList The value of languageId as inScope. + */ + public void setLanguageId_InScope(java.util.List languageIdList) { + registerLanguageId(ConditionKey.CK_IN_SCOPE, languageIdList); + } + + /** + * Set the value of languageId using notInScope. { not in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param languageIdList The value of languageId as notInScope. + */ + public void setLanguageId_NotInScope(java.util.List languageIdList) { + registerLanguageId(ConditionKey.CK_NOT_IN_SCOPE, languageIdList); + } + + /** + * Register condition of languageId. + * + * @param key Condition key. (NotNull) + * @param value The value of languageId. (Nullable) + */ + protected void registerLanguageId(ConditionKey key, Object value) { + registerQuery(key, value, getCValueLanguageId(), COL_LANGUAGE_ID, J_LanguageId, UJ_languageId); + } + + /** + * Register inline condition of languageId. + * + * @param key Condition key. (NotNull) + * @param value The value of languageId. (Nullable) + */ + protected void registerInlineLanguageId(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueLanguageId(), COL_LANGUAGE_ID, J_LanguageId, UJ_languageId); + } + + abstract protected ConditionValue getCValueLanguageId(); + + /** Column db name of productsOptionsName. */ + protected static final String COL_PRODUCTS_OPTIONS_NAME = "PRODUCTS_OPTIONS_NAME"; + + /** Column java name of productsOptionsName. */ + protected static final String J_ProductsOptionsName = "ProductsOptionsName"; + + /** Column uncapitalised java name of productsOptionsName. */ + protected static final String UJ_productsOptionsName = "productsOptionsName"; + + /** + * Set the value of productsOptionsName using equal. { = } + * If the value is null or empty-string, this condition is ignored. + * + * @param productsOptionsName The value of productsOptionsName as equal. + */ + public void setProductsOptionsName_Equal(String productsOptionsName) { + registerProductsOptionsName(ConditionKey.CK_EQUAL, filterRemoveEmptyString(productsOptionsName)); + } + + /** + * Set the value of productsOptionsName using notEqual. { != } + * If the value is null or empty-string, this condition is ignored. + * + * @param productsOptionsName The value of productsOptionsName as notEqual. + */ + public void setProductsOptionsName_NotEqual(String productsOptionsName) { + registerProductsOptionsName(ConditionKey.CK_NOT_EQUAL, filterRemoveEmptyString(productsOptionsName)); + } + + /** + * Set the value of productsOptionsName using greaterThan. { > } + * If the value is null or empty-string, this condition is ignored. + * + * @param productsOptionsName The value of productsOptionsName as greaterThan. + */ + public void setProductsOptionsName_GreaterThan(String productsOptionsName) { + registerProductsOptionsName(ConditionKey.CK_GREATER_THAN, filterRemoveEmptyString(productsOptionsName)); + } + + /** + * Set the value of productsOptionsName using lessThan. { < } + * If the value is null or empty-string, this condition is ignored. + * + * @param productsOptionsName The value of productsOptionsName as lessThan. + */ + public void setProductsOptionsName_LessThan(String productsOptionsName) { + registerProductsOptionsName(ConditionKey.CK_LESS_THAN, filterRemoveEmptyString(productsOptionsName)); + } + + /** + * Set the value of productsOptionsName using greaterEqual. { >= } + * If the value is null or empty-string, this condition is ignored. + * + * @param productsOptionsName The value of productsOptionsName as greaterEqual. + */ + public void setProductsOptionsName_GreaterEqual(String productsOptionsName) { + registerProductsOptionsName(ConditionKey.CK_GREATER_EQUAL, filterRemoveEmptyString(productsOptionsName)); + } + + /** + * Set the value of productsOptionsName using lessEqual. { <= } + * If the value is null or empty-string, this condition is ignored. + * + * @param productsOptionsName The value of productsOptionsName as lessEqual. + */ + public void setProductsOptionsName_LessEqual(String productsOptionsName) { + registerProductsOptionsName(ConditionKey.CK_LESS_EQUAL, filterRemoveEmptyString(productsOptionsName)); + } + + /** + * Set the value of productsOptionsName using prefixSearch. { like 'xxx%' } + * If the value is null or empty-string, this condition is ignored. + * + * @param productsOptionsName The value of productsOptionsName as prefixSearch. + */ + public void setProductsOptionsName_PrefixSearch(String productsOptionsName) { + registerProductsOptionsName(ConditionKey.CK_PREFIX_SEARCH, filterRemoveEmptyString(productsOptionsName)); + } + + /** + * Set the value of productsOptionsName using likeSearch. { like '%xxx%' } + * If the value is null or empty-string, this condition is ignored. + * You can invoke this method several times and the conditions are set up. + * + * @param productsOptionsName The value of productsOptionsName as likeSearch. + * @param likeSearchOption Like search option. (NotNull) + */ + public void setProductsOptionsName_LikeSearch(String productsOptionsName, jp.sf.pal.pompei.allcommon.cbean.coption.LikeSearchOption likeSearchOption) { + registerLikeSearchQuery(ConditionKey.CK_LIKE_SEARCH, filterRemoveEmptyString(productsOptionsName), getCValueProductsOptionsName(), COL_PRODUCTS_OPTIONS_NAME, J_ProductsOptionsName, UJ_productsOptionsName, likeSearchOption); + } + + /** + * Set the value of productsOptionsName using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param productsOptionsNameList The value of productsOptionsName as inScope. + */ + public void setProductsOptionsName_InScope(java.util.List productsOptionsNameList) { + registerProductsOptionsName(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyStringFromList(productsOptionsNameList)); + } + + /** + * Set the value of productsOptionsName using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param productsOptionsName The value of productsOptionsName as inScope. + */ + public void setProductsOptionsName_InScope(String productsOptionsName, jp.sf.pal.pompei.allcommon.cbean.coption.InScopeOption option) { + registerInScopeQuery(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyString(productsOptionsName), getCValueProductsOptionsName(), COL_PRODUCTS_OPTIONS_NAME, J_ProductsOptionsName, UJ_productsOptionsName, option); + } + + /** + * Set the value of productsOptionsName using notInScope. { not in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param productsOptionsNameList The value of productsOptionsName as notInScope. + */ + public void setProductsOptionsName_NotInScope(java.util.List productsOptionsNameList) { + registerProductsOptionsName(ConditionKey.CK_NOT_IN_SCOPE, filterRemoveEmptyStringFromList(productsOptionsNameList)); + } + + /** + * Register condition of productsOptionsName. + * + * @param key Condition key. (NotNull) + * @param value The value of productsOptionsName. (Nullable) + */ + protected void registerProductsOptionsName(ConditionKey key, Object value) { + registerQuery(key, value, getCValueProductsOptionsName(), COL_PRODUCTS_OPTIONS_NAME, J_ProductsOptionsName, UJ_productsOptionsName); + } + + /** + * Register inline condition of productsOptionsName. + * + * @param key Condition key. (NotNull) + * @param value The value of productsOptionsName. (Nullable) + */ + protected void registerInlineProductsOptionsName(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueProductsOptionsName(), COL_PRODUCTS_OPTIONS_NAME, J_ProductsOptionsName, UJ_productsOptionsName); + } + + abstract protected ConditionValue getCValueProductsOptionsName(); + + // =================================================================================== + // Basic Override + // ============== + /** + * This method overrides the method that is declared at super. + * + * @return Clause string. (NotNull) + */ + public String toString() { + return getSqlClause().getClause(); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/AbstractBsProductsOptionsValuesCQ.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/AbstractBsProductsOptionsValuesCQ.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/AbstractBsProductsOptionsValuesCQ.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,419 @@ + +package jp.sf.pal.pompei.cbean.cq.bs; + + + +import jp.sf.pal.pompei.allcommon.cbean.*; +import jp.sf.pal.pompei.allcommon.cbean.ckey.*; +import jp.sf.pal.pompei.allcommon.cbean.cvalue.ConditionValue; +import jp.sf.pal.pompei.allcommon.cbean.sqlclause.SqlClause; +import jp.sf.pal.pompei.cbean.cq.*; + +/** + * The condition-query of PRODUCTS_OPTIONS_VALUES. + * + * @author DBFlute(AutoGenerator) + */ +public abstract class AbstractBsProductsOptionsValuesCQ extends AbstractConditionQuery { + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param childQuery Child query as abstract class. (Nullable: If null, this is base instance.) + * @param sqlClause SQL clause instance. (NotNull) + * @param aliasName My alias name. (NotNull) + * @param nestLevel Nest level. + */ + public AbstractBsProductsOptionsValuesCQ(ConditionQuery childQuery, SqlClause sqlClause, String aliasName, int nestLevel) { + super(childQuery, sqlClause, aliasName, nestLevel); + } + + // =================================================================================== + // Table Name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + final public String getTableDbName() { + return "PRODUCTS_OPTIONS_VALUES"; + } + + // =================================================================================== + // Query + // ===== + + // /* * * * * * * * * * * * * * * * * * * * * * * + // MyTable = [PRODUCTS_OPTIONS_VALUES] + // * * * * * * * * */ + + + /** Column db name of productsOptionsValuesId. */ + protected static final String COL_PRODUCTS_OPTIONS_VALUES_ID = "PRODUCTS_OPTIONS_VALUES_ID"; + + /** Column java name of productsOptionsValuesId. */ + protected static final String J_ProductsOptionsValuesId = "ProductsOptionsValuesId"; + + /** Column uncapitalised java name of productsOptionsValuesId. */ + protected static final String UJ_productsOptionsValuesId = "productsOptionsValuesId"; + + /** + * Set the value of productsOptionsValuesId using equal. { = } + * + * @param productsOptionsValuesId The value of productsOptionsValuesId as equal. + */ + public void setProductsOptionsValuesId_Equal(java.math.BigDecimal productsOptionsValuesId) { + registerProductsOptionsValuesId(ConditionKey.CK_EQUAL, productsOptionsValuesId); + } + + /** + * Set the value of productsOptionsValuesId using notEqual. { != } + * + * @param productsOptionsValuesId The value of productsOptionsValuesId as notEqual. + */ + public void setProductsOptionsValuesId_NotEqual(java.math.BigDecimal productsOptionsValuesId) { + registerProductsOptionsValuesId(ConditionKey.CK_NOT_EQUAL, productsOptionsValuesId); + } + + /** + * Set the value of productsOptionsValuesId using greaterThan. { > } + * + * @param productsOptionsValuesId The value of productsOptionsValuesId as greaterThan. + */ + public void setProductsOptionsValuesId_GreaterThan(java.math.BigDecimal productsOptionsValuesId) { + registerProductsOptionsValuesId(ConditionKey.CK_GREATER_THAN, productsOptionsValuesId); + } + + /** + * Set the value of productsOptionsValuesId using lessThan. { < } + * + * @param productsOptionsValuesId The value of productsOptionsValuesId as lessThan. + */ + public void setProductsOptionsValuesId_LessThan(java.math.BigDecimal productsOptionsValuesId) { + registerProductsOptionsValuesId(ConditionKey.CK_LESS_THAN, productsOptionsValuesId); + } + + /** + * Set the value of productsOptionsValuesId using greaterEqual. { >= } + * + * @param productsOptionsValuesId The value of productsOptionsValuesId as greaterEqual. + */ + public void setProductsOptionsValuesId_GreaterEqual(java.math.BigDecimal productsOptionsValuesId) { + registerProductsOptionsValuesId(ConditionKey.CK_GREATER_EQUAL, productsOptionsValuesId); + } + + /** + * Set the value of productsOptionsValuesId using lessEqual. { <= } + * + * @param productsOptionsValuesId The value of productsOptionsValuesId as lessEqual. + */ + public void setProductsOptionsValuesId_LessEqual(java.math.BigDecimal productsOptionsValuesId) { + registerProductsOptionsValuesId(ConditionKey.CK_LESS_EQUAL, productsOptionsValuesId); + } + + /** + * Set the value of productsOptionsValuesId using inScope. { in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param productsOptionsValuesIdList The value of productsOptionsValuesId as inScope. + */ + public void setProductsOptionsValuesId_InScope(java.util.List productsOptionsValuesIdList) { + registerProductsOptionsValuesId(ConditionKey.CK_IN_SCOPE, productsOptionsValuesIdList); + } + + /** + * Set the value of productsOptionsValuesId using notInScope. { not in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param productsOptionsValuesIdList The value of productsOptionsValuesId as notInScope. + */ + public void setProductsOptionsValuesId_NotInScope(java.util.List productsOptionsValuesIdList) { + registerProductsOptionsValuesId(ConditionKey.CK_NOT_IN_SCOPE, productsOptionsValuesIdList); + } + + /** + * Register condition of productsOptionsValuesId. + * + * @param key Condition key. (NotNull) + * @param value The value of productsOptionsValuesId. (Nullable) + */ + protected void registerProductsOptionsValuesId(ConditionKey key, Object value) { + registerQuery(key, value, getCValueProductsOptionsValuesId(), COL_PRODUCTS_OPTIONS_VALUES_ID, J_ProductsOptionsValuesId, UJ_productsOptionsValuesId); + } + + /** + * Register inline condition of productsOptionsValuesId. + * + * @param key Condition key. (NotNull) + * @param value The value of productsOptionsValuesId. (Nullable) + */ + protected void registerInlineProductsOptionsValuesId(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueProductsOptionsValuesId(), COL_PRODUCTS_OPTIONS_VALUES_ID, J_ProductsOptionsValuesId, UJ_productsOptionsValuesId); + } + + abstract protected ConditionValue getCValueProductsOptionsValuesId(); + + /** Column db name of languageId. */ + protected static final String COL_LANGUAGE_ID = "LANGUAGE_ID"; + + /** Column java name of languageId. */ + protected static final String J_LanguageId = "LanguageId"; + + /** Column uncapitalised java name of languageId. */ + protected static final String UJ_languageId = "languageId"; + + /** + * Set the value of languageId using equal. { = } + * + * @param languageId The value of languageId as equal. + */ + public void setLanguageId_Equal(java.math.BigDecimal languageId) { + registerLanguageId(ConditionKey.CK_EQUAL, languageId); + } + + /** + * Set the value of languageId using notEqual. { != } + * + * @param languageId The value of languageId as notEqual. + */ + public void setLanguageId_NotEqual(java.math.BigDecimal languageId) { + registerLanguageId(ConditionKey.CK_NOT_EQUAL, languageId); + } + + /** + * Set the value of languageId using greaterThan. { > } + * + * @param languageId The value of languageId as greaterThan. + */ + public void setLanguageId_GreaterThan(java.math.BigDecimal languageId) { + registerLanguageId(ConditionKey.CK_GREATER_THAN, languageId); + } + + /** + * Set the value of languageId using lessThan. { < } + * + * @param languageId The value of languageId as lessThan. + */ + public void setLanguageId_LessThan(java.math.BigDecimal languageId) { + registerLanguageId(ConditionKey.CK_LESS_THAN, languageId); + } + + /** + * Set the value of languageId using greaterEqual. { >= } + * + * @param languageId The value of languageId as greaterEqual. + */ + public void setLanguageId_GreaterEqual(java.math.BigDecimal languageId) { + registerLanguageId(ConditionKey.CK_GREATER_EQUAL, languageId); + } + + /** + * Set the value of languageId using lessEqual. { <= } + * + * @param languageId The value of languageId as lessEqual. + */ + public void setLanguageId_LessEqual(java.math.BigDecimal languageId) { + registerLanguageId(ConditionKey.CK_LESS_EQUAL, languageId); + } + + /** + * Set the value of languageId using inScope. { in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param languageIdList The value of languageId as inScope. + */ + public void setLanguageId_InScope(java.util.List languageIdList) { + registerLanguageId(ConditionKey.CK_IN_SCOPE, languageIdList); + } + + /** + * Set the value of languageId using notInScope. { not in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param languageIdList The value of languageId as notInScope. + */ + public void setLanguageId_NotInScope(java.util.List languageIdList) { + registerLanguageId(ConditionKey.CK_NOT_IN_SCOPE, languageIdList); + } + + /** + * Register condition of languageId. + * + * @param key Condition key. (NotNull) + * @param value The value of languageId. (Nullable) + */ + protected void registerLanguageId(ConditionKey key, Object value) { + registerQuery(key, value, getCValueLanguageId(), COL_LANGUAGE_ID, J_LanguageId, UJ_languageId); + } + + /** + * Register inline condition of languageId. + * + * @param key Condition key. (NotNull) + * @param value The value of languageId. (Nullable) + */ + protected void registerInlineLanguageId(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueLanguageId(), COL_LANGUAGE_ID, J_LanguageId, UJ_languageId); + } + + abstract protected ConditionValue getCValueLanguageId(); + + /** Column db name of productsOptionsValuesName. */ + protected static final String COL_PRODUCTS_OPTIONS_VALUES_NAME = "PRODUCTS_OPTIONS_VALUES_NAME"; + + /** Column java name of productsOptionsValuesName. */ + protected static final String J_ProductsOptionsValuesName = "ProductsOptionsValuesName"; + + /** Column uncapitalised java name of productsOptionsValuesName. */ + protected static final String UJ_productsOptionsValuesName = "productsOptionsValuesName"; + + /** + * Set the value of productsOptionsValuesName using equal. { = } + * If the value is null or empty-string, this condition is ignored. + * + * @param productsOptionsValuesName The value of productsOptionsValuesName as equal. + */ + public void setProductsOptionsValuesName_Equal(String productsOptionsValuesName) { + registerProductsOptionsValuesName(ConditionKey.CK_EQUAL, filterRemoveEmptyString(productsOptionsValuesName)); + } + + /** + * Set the value of productsOptionsValuesName using notEqual. { != } + * If the value is null or empty-string, this condition is ignored. + * + * @param productsOptionsValuesName The value of productsOptionsValuesName as notEqual. + */ + public void setProductsOptionsValuesName_NotEqual(String productsOptionsValuesName) { + registerProductsOptionsValuesName(ConditionKey.CK_NOT_EQUAL, filterRemoveEmptyString(productsOptionsValuesName)); + } + + /** + * Set the value of productsOptionsValuesName using greaterThan. { > } + * If the value is null or empty-string, this condition is ignored. + * + * @param productsOptionsValuesName The value of productsOptionsValuesName as greaterThan. + */ + public void setProductsOptionsValuesName_GreaterThan(String productsOptionsValuesName) { + registerProductsOptionsValuesName(ConditionKey.CK_GREATER_THAN, filterRemoveEmptyString(productsOptionsValuesName)); + } + + /** + * Set the value of productsOptionsValuesName using lessThan. { < } + * If the value is null or empty-string, this condition is ignored. + * + * @param productsOptionsValuesName The value of productsOptionsValuesName as lessThan. + */ + public void setProductsOptionsValuesName_LessThan(String productsOptionsValuesName) { + registerProductsOptionsValuesName(ConditionKey.CK_LESS_THAN, filterRemoveEmptyString(productsOptionsValuesName)); + } + + /** + * Set the value of productsOptionsValuesName using greaterEqual. { >= } + * If the value is null or empty-string, this condition is ignored. + * + * @param productsOptionsValuesName The value of productsOptionsValuesName as greaterEqual. + */ + public void setProductsOptionsValuesName_GreaterEqual(String productsOptionsValuesName) { + registerProductsOptionsValuesName(ConditionKey.CK_GREATER_EQUAL, filterRemoveEmptyString(productsOptionsValuesName)); + } + + /** + * Set the value of productsOptionsValuesName using lessEqual. { <= } + * If the value is null or empty-string, this condition is ignored. + * + * @param productsOptionsValuesName The value of productsOptionsValuesName as lessEqual. + */ + public void setProductsOptionsValuesName_LessEqual(String productsOptionsValuesName) { + registerProductsOptionsValuesName(ConditionKey.CK_LESS_EQUAL, filterRemoveEmptyString(productsOptionsValuesName)); + } + + /** + * Set the value of productsOptionsValuesName using prefixSearch. { like 'xxx%' } + * If the value is null or empty-string, this condition is ignored. + * + * @param productsOptionsValuesName The value of productsOptionsValuesName as prefixSearch. + */ + public void setProductsOptionsValuesName_PrefixSearch(String productsOptionsValuesName) { + registerProductsOptionsValuesName(ConditionKey.CK_PREFIX_SEARCH, filterRemoveEmptyString(productsOptionsValuesName)); + } + + /** + * Set the value of productsOptionsValuesName using likeSearch. { like '%xxx%' } + * If the value is null or empty-string, this condition is ignored. + * You can invoke this method several times and the conditions are set up. + * + * @param productsOptionsValuesName The value of productsOptionsValuesName as likeSearch. + * @param likeSearchOption Like search option. (NotNull) + */ + public void setProductsOptionsValuesName_LikeSearch(String productsOptionsValuesName, jp.sf.pal.pompei.allcommon.cbean.coption.LikeSearchOption likeSearchOption) { + registerLikeSearchQuery(ConditionKey.CK_LIKE_SEARCH, filterRemoveEmptyString(productsOptionsValuesName), getCValueProductsOptionsValuesName(), COL_PRODUCTS_OPTIONS_VALUES_NAME, J_ProductsOptionsValuesName, UJ_productsOptionsValuesName, likeSearchOption); + } + + /** + * Set the value of productsOptionsValuesName using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param productsOptionsValuesNameList The value of productsOptionsValuesName as inScope. + */ + public void setProductsOptionsValuesName_InScope(java.util.List productsOptionsValuesNameList) { + registerProductsOptionsValuesName(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyStringFromList(productsOptionsValuesNameList)); + } + + /** + * Set the value of productsOptionsValuesName using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param productsOptionsValuesName The value of productsOptionsValuesName as inScope. + */ + public void setProductsOptionsValuesName_InScope(String productsOptionsValuesName, jp.sf.pal.pompei.allcommon.cbean.coption.InScopeOption option) { + registerInScopeQuery(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyString(productsOptionsValuesName), getCValueProductsOptionsValuesName(), COL_PRODUCTS_OPTIONS_VALUES_NAME, J_ProductsOptionsValuesName, UJ_productsOptionsValuesName, option); + } + + /** + * Set the value of productsOptionsValuesName using notInScope. { not in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param productsOptionsValuesNameList The value of productsOptionsValuesName as notInScope. + */ + public void setProductsOptionsValuesName_NotInScope(java.util.List productsOptionsValuesNameList) { + registerProductsOptionsValuesName(ConditionKey.CK_NOT_IN_SCOPE, filterRemoveEmptyStringFromList(productsOptionsValuesNameList)); + } + + /** + * Register condition of productsOptionsValuesName. + * + * @param key Condition key. (NotNull) + * @param value The value of productsOptionsValuesName. (Nullable) + */ + protected void registerProductsOptionsValuesName(ConditionKey key, Object value) { + registerQuery(key, value, getCValueProductsOptionsValuesName(), COL_PRODUCTS_OPTIONS_VALUES_NAME, J_ProductsOptionsValuesName, UJ_productsOptionsValuesName); + } + + /** + * Register inline condition of productsOptionsValuesName. + * + * @param key Condition key. (NotNull) + * @param value The value of productsOptionsValuesName. (Nullable) + */ + protected void registerInlineProductsOptionsValuesName(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueProductsOptionsValuesName(), COL_PRODUCTS_OPTIONS_VALUES_NAME, J_ProductsOptionsValuesName, UJ_productsOptionsValuesName); + } + + abstract protected ConditionValue getCValueProductsOptionsValuesName(); + + // =================================================================================== + // Basic Override + // ============== + /** + * This method overrides the method that is declared at super. + * + * @return Clause string. (NotNull) + */ + public String toString() { + return getSqlClause().getClause(); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/AbstractBsProductsOptionsValuesToProductsOptionsCQ.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/AbstractBsProductsOptionsValuesToProductsOptionsCQ.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/AbstractBsProductsOptionsValuesToProductsOptionsCQ.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,381 @@ + +package jp.sf.pal.pompei.cbean.cq.bs; + + + +import jp.sf.pal.pompei.allcommon.cbean.*; +import jp.sf.pal.pompei.allcommon.cbean.ckey.*; +import jp.sf.pal.pompei.allcommon.cbean.cvalue.ConditionValue; +import jp.sf.pal.pompei.allcommon.cbean.sqlclause.SqlClause; +import jp.sf.pal.pompei.cbean.cq.*; + +/** + * The condition-query of PRODUCTS_OPTIONS_VALUES_TO_PRODUCTS_OPTIONS. + * + * @author DBFlute(AutoGenerator) + */ +public abstract class AbstractBsProductsOptionsValuesToProductsOptionsCQ extends AbstractConditionQuery { + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param childQuery Child query as abstract class. (Nullable: If null, this is base instance.) + * @param sqlClause SQL clause instance. (NotNull) + * @param aliasName My alias name. (NotNull) + * @param nestLevel Nest level. + */ + public AbstractBsProductsOptionsValuesToProductsOptionsCQ(ConditionQuery childQuery, SqlClause sqlClause, String aliasName, int nestLevel) { + super(childQuery, sqlClause, aliasName, nestLevel); + } + + // =================================================================================== + // Table Name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + final public String getTableDbName() { + return "PRODUCTS_OPTIONS_VALUES_TO_PRODUCTS_OPTIONS"; + } + + // =================================================================================== + // Query + // ===== + + // /* * * * * * * * * * * * * * * * * * * * * * * + // MyTable = [PRODUCTS_OPTIONS_VALUES_TO_PRODUCTS_OPTIONS] + // * * * * * * * * */ + + + /** Column db name of productsOptionsValuesToProductsOptionsId. */ + protected static final String COL_PRODUCTS_OPTIONS_VALUES_TO_PRODUCTS_OPTIONS_ID = "PRODUCTS_OPTIONS_VALUES_TO_PRODUCTS_OPTIONS_ID"; + + /** Column java name of productsOptionsValuesToProductsOptionsId. */ + protected static final String J_ProductsOptionsValuesToProductsOptionsId = "ProductsOptionsValuesToProductsOptionsId"; + + /** Column uncapitalised java name of productsOptionsValuesToProductsOptionsId. */ + protected static final String UJ_productsOptionsValuesToProductsOptionsId = "productsOptionsValuesToProductsOptionsId"; + + /** + * Set the value of productsOptionsValuesToProductsOptionsId using equal. { = } + * + * @param productsOptionsValuesToProductsOptionsId The value of productsOptionsValuesToProductsOptionsId as equal. + */ + public void setProductsOptionsValuesToProductsOptionsId_Equal(java.math.BigDecimal productsOptionsValuesToProductsOptionsId) { + registerProductsOptionsValuesToProductsOptionsId(ConditionKey.CK_EQUAL, productsOptionsValuesToProductsOptionsId); + } + + /** + * Set the value of productsOptionsValuesToProductsOptionsId using notEqual. { != } + * + * @param productsOptionsValuesToProductsOptionsId The value of productsOptionsValuesToProductsOptionsId as notEqual. + */ + public void setProductsOptionsValuesToProductsOptionsId_NotEqual(java.math.BigDecimal productsOptionsValuesToProductsOptionsId) { + registerProductsOptionsValuesToProductsOptionsId(ConditionKey.CK_NOT_EQUAL, productsOptionsValuesToProductsOptionsId); + } + + /** + * Set the value of productsOptionsValuesToProductsOptionsId using greaterThan. { > } + * + * @param productsOptionsValuesToProductsOptionsId The value of productsOptionsValuesToProductsOptionsId as greaterThan. + */ + public void setProductsOptionsValuesToProductsOptionsId_GreaterThan(java.math.BigDecimal productsOptionsValuesToProductsOptionsId) { + registerProductsOptionsValuesToProductsOptionsId(ConditionKey.CK_GREATER_THAN, productsOptionsValuesToProductsOptionsId); + } + + /** + * Set the value of productsOptionsValuesToProductsOptionsId using lessThan. { < } + * + * @param productsOptionsValuesToProductsOptionsId The value of productsOptionsValuesToProductsOptionsId as lessThan. + */ + public void setProductsOptionsValuesToProductsOptionsId_LessThan(java.math.BigDecimal productsOptionsValuesToProductsOptionsId) { + registerProductsOptionsValuesToProductsOptionsId(ConditionKey.CK_LESS_THAN, productsOptionsValuesToProductsOptionsId); + } + + /** + * Set the value of productsOptionsValuesToProductsOptionsId using greaterEqual. { >= } + * + * @param productsOptionsValuesToProductsOptionsId The value of productsOptionsValuesToProductsOptionsId as greaterEqual. + */ + public void setProductsOptionsValuesToProductsOptionsId_GreaterEqual(java.math.BigDecimal productsOptionsValuesToProductsOptionsId) { + registerProductsOptionsValuesToProductsOptionsId(ConditionKey.CK_GREATER_EQUAL, productsOptionsValuesToProductsOptionsId); + } + + /** + * Set the value of productsOptionsValuesToProductsOptionsId using lessEqual. { <= } + * + * @param productsOptionsValuesToProductsOptionsId The value of productsOptionsValuesToProductsOptionsId as lessEqual. + */ + public void setProductsOptionsValuesToProductsOptionsId_LessEqual(java.math.BigDecimal productsOptionsValuesToProductsOptionsId) { + registerProductsOptionsValuesToProductsOptionsId(ConditionKey.CK_LESS_EQUAL, productsOptionsValuesToProductsOptionsId); + } + + /** + * Set the value of productsOptionsValuesToProductsOptionsId using inScope. { in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param productsOptionsValuesToProductsOptionsIdList The value of productsOptionsValuesToProductsOptionsId as inScope. + */ + public void setProductsOptionsValuesToProductsOptionsId_InScope(java.util.List productsOptionsValuesToProductsOptionsIdList) { + registerProductsOptionsValuesToProductsOptionsId(ConditionKey.CK_IN_SCOPE, productsOptionsValuesToProductsOptionsIdList); + } + + /** + * Set the value of productsOptionsValuesToProductsOptionsId using notInScope. { not in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param productsOptionsValuesToProductsOptionsIdList The value of productsOptionsValuesToProductsOptionsId as notInScope. + */ + public void setProductsOptionsValuesToProductsOptionsId_NotInScope(java.util.List productsOptionsValuesToProductsOptionsIdList) { + registerProductsOptionsValuesToProductsOptionsId(ConditionKey.CK_NOT_IN_SCOPE, productsOptionsValuesToProductsOptionsIdList); + } + + /** + * Register condition of productsOptionsValuesToProductsOptionsId. + * + * @param key Condition key. (NotNull) + * @param value The value of productsOptionsValuesToProductsOptionsId. (Nullable) + */ + protected void registerProductsOptionsValuesToProductsOptionsId(ConditionKey key, Object value) { + registerQuery(key, value, getCValueProductsOptionsValuesToProductsOptionsId(), COL_PRODUCTS_OPTIONS_VALUES_TO_PRODUCTS_OPTIONS_ID, J_ProductsOptionsValuesToProductsOptionsId, UJ_productsOptionsValuesToProductsOptionsId); + } + + /** + * Register inline condition of productsOptionsValuesToProductsOptionsId. + * + * @param key Condition key. (NotNull) + * @param value The value of productsOptionsValuesToProductsOptionsId. (Nullable) + */ + protected void registerInlineProductsOptionsValuesToProductsOptionsId(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueProductsOptionsValuesToProductsOptionsId(), COL_PRODUCTS_OPTIONS_VALUES_TO_PRODUCTS_OPTIONS_ID, J_ProductsOptionsValuesToProductsOptionsId, UJ_productsOptionsValuesToProductsOptionsId); + } + + abstract protected ConditionValue getCValueProductsOptionsValuesToProductsOptionsId(); + + /** Column db name of productsOptionsId. */ + protected static final String COL_PRODUCTS_OPTIONS_ID = "PRODUCTS_OPTIONS_ID"; + + /** Column java name of productsOptionsId. */ + protected static final String J_ProductsOptionsId = "ProductsOptionsId"; + + /** Column uncapitalised java name of productsOptionsId. */ + protected static final String UJ_productsOptionsId = "productsOptionsId"; + + /** + * Set the value of productsOptionsId using equal. { = } + * + * @param productsOptionsId The value of productsOptionsId as equal. + */ + public void setProductsOptionsId_Equal(java.math.BigDecimal productsOptionsId) { + registerProductsOptionsId(ConditionKey.CK_EQUAL, productsOptionsId); + } + + /** + * Set the value of productsOptionsId using notEqual. { != } + * + * @param productsOptionsId The value of productsOptionsId as notEqual. + */ + public void setProductsOptionsId_NotEqual(java.math.BigDecimal productsOptionsId) { + registerProductsOptionsId(ConditionKey.CK_NOT_EQUAL, productsOptionsId); + } + + /** + * Set the value of productsOptionsId using greaterThan. { > } + * + * @param productsOptionsId The value of productsOptionsId as greaterThan. + */ + public void setProductsOptionsId_GreaterThan(java.math.BigDecimal productsOptionsId) { + registerProductsOptionsId(ConditionKey.CK_GREATER_THAN, productsOptionsId); + } + + /** + * Set the value of productsOptionsId using lessThan. { < } + * + * @param productsOptionsId The value of productsOptionsId as lessThan. + */ + public void setProductsOptionsId_LessThan(java.math.BigDecimal productsOptionsId) { + registerProductsOptionsId(ConditionKey.CK_LESS_THAN, productsOptionsId); + } + + /** + * Set the value of productsOptionsId using greaterEqual. { >= } + * + * @param productsOptionsId The value of productsOptionsId as greaterEqual. + */ + public void setProductsOptionsId_GreaterEqual(java.math.BigDecimal productsOptionsId) { + registerProductsOptionsId(ConditionKey.CK_GREATER_EQUAL, productsOptionsId); + } + + /** + * Set the value of productsOptionsId using lessEqual. { <= } + * + * @param productsOptionsId The value of productsOptionsId as lessEqual. + */ + public void setProductsOptionsId_LessEqual(java.math.BigDecimal productsOptionsId) { + registerProductsOptionsId(ConditionKey.CK_LESS_EQUAL, productsOptionsId); + } + + /** + * Set the value of productsOptionsId using inScope. { in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param productsOptionsIdList The value of productsOptionsId as inScope. + */ + public void setProductsOptionsId_InScope(java.util.List productsOptionsIdList) { + registerProductsOptionsId(ConditionKey.CK_IN_SCOPE, productsOptionsIdList); + } + + /** + * Set the value of productsOptionsId using notInScope. { not in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param productsOptionsIdList The value of productsOptionsId as notInScope. + */ + public void setProductsOptionsId_NotInScope(java.util.List productsOptionsIdList) { + registerProductsOptionsId(ConditionKey.CK_NOT_IN_SCOPE, productsOptionsIdList); + } + + /** + * Register condition of productsOptionsId. + * + * @param key Condition key. (NotNull) + * @param value The value of productsOptionsId. (Nullable) + */ + protected void registerProductsOptionsId(ConditionKey key, Object value) { + registerQuery(key, value, getCValueProductsOptionsId(), COL_PRODUCTS_OPTIONS_ID, J_ProductsOptionsId, UJ_productsOptionsId); + } + + /** + * Register inline condition of productsOptionsId. + * + * @param key Condition key. (NotNull) + * @param value The value of productsOptionsId. (Nullable) + */ + protected void registerInlineProductsOptionsId(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueProductsOptionsId(), COL_PRODUCTS_OPTIONS_ID, J_ProductsOptionsId, UJ_productsOptionsId); + } + + abstract protected ConditionValue getCValueProductsOptionsId(); + + /** Column db name of productsOptionsValuesId. */ + protected static final String COL_PRODUCTS_OPTIONS_VALUES_ID = "PRODUCTS_OPTIONS_VALUES_ID"; + + /** Column java name of productsOptionsValuesId. */ + protected static final String J_ProductsOptionsValuesId = "ProductsOptionsValuesId"; + + /** Column uncapitalised java name of productsOptionsValuesId. */ + protected static final String UJ_productsOptionsValuesId = "productsOptionsValuesId"; + + /** + * Set the value of productsOptionsValuesId using equal. { = } + * + * @param productsOptionsValuesId The value of productsOptionsValuesId as equal. + */ + public void setProductsOptionsValuesId_Equal(java.math.BigDecimal productsOptionsValuesId) { + registerProductsOptionsValuesId(ConditionKey.CK_EQUAL, productsOptionsValuesId); + } + + /** + * Set the value of productsOptionsValuesId using notEqual. { != } + * + * @param productsOptionsValuesId The value of productsOptionsValuesId as notEqual. + */ + public void setProductsOptionsValuesId_NotEqual(java.math.BigDecimal productsOptionsValuesId) { + registerProductsOptionsValuesId(ConditionKey.CK_NOT_EQUAL, productsOptionsValuesId); + } + + /** + * Set the value of productsOptionsValuesId using greaterThan. { > } + * + * @param productsOptionsValuesId The value of productsOptionsValuesId as greaterThan. + */ + public void setProductsOptionsValuesId_GreaterThan(java.math.BigDecimal productsOptionsValuesId) { + registerProductsOptionsValuesId(ConditionKey.CK_GREATER_THAN, productsOptionsValuesId); + } + + /** + * Set the value of productsOptionsValuesId using lessThan. { < } + * + * @param productsOptionsValuesId The value of productsOptionsValuesId as lessThan. + */ + public void setProductsOptionsValuesId_LessThan(java.math.BigDecimal productsOptionsValuesId) { + registerProductsOptionsValuesId(ConditionKey.CK_LESS_THAN, productsOptionsValuesId); + } + + /** + * Set the value of productsOptionsValuesId using greaterEqual. { >= } + * + * @param productsOptionsValuesId The value of productsOptionsValuesId as greaterEqual. + */ + public void setProductsOptionsValuesId_GreaterEqual(java.math.BigDecimal productsOptionsValuesId) { + registerProductsOptionsValuesId(ConditionKey.CK_GREATER_EQUAL, productsOptionsValuesId); + } + + /** + * Set the value of productsOptionsValuesId using lessEqual. { <= } + * + * @param productsOptionsValuesId The value of productsOptionsValuesId as lessEqual. + */ + public void setProductsOptionsValuesId_LessEqual(java.math.BigDecimal productsOptionsValuesId) { + registerProductsOptionsValuesId(ConditionKey.CK_LESS_EQUAL, productsOptionsValuesId); + } + + /** + * Set the value of productsOptionsValuesId using inScope. { in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param productsOptionsValuesIdList The value of productsOptionsValuesId as inScope. + */ + public void setProductsOptionsValuesId_InScope(java.util.List productsOptionsValuesIdList) { + registerProductsOptionsValuesId(ConditionKey.CK_IN_SCOPE, productsOptionsValuesIdList); + } + + /** + * Set the value of productsOptionsValuesId using notInScope. { not in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param productsOptionsValuesIdList The value of productsOptionsValuesId as notInScope. + */ + public void setProductsOptionsValuesId_NotInScope(java.util.List productsOptionsValuesIdList) { + registerProductsOptionsValuesId(ConditionKey.CK_NOT_IN_SCOPE, productsOptionsValuesIdList); + } + + /** + * Register condition of productsOptionsValuesId. + * + * @param key Condition key. (NotNull) + * @param value The value of productsOptionsValuesId. (Nullable) + */ + protected void registerProductsOptionsValuesId(ConditionKey key, Object value) { + registerQuery(key, value, getCValueProductsOptionsValuesId(), COL_PRODUCTS_OPTIONS_VALUES_ID, J_ProductsOptionsValuesId, UJ_productsOptionsValuesId); + } + + /** + * Register inline condition of productsOptionsValuesId. + * + * @param key Condition key. (NotNull) + * @param value The value of productsOptionsValuesId. (Nullable) + */ + protected void registerInlineProductsOptionsValuesId(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueProductsOptionsValuesId(), COL_PRODUCTS_OPTIONS_VALUES_ID, J_ProductsOptionsValuesId, UJ_productsOptionsValuesId); + } + + abstract protected ConditionValue getCValueProductsOptionsValuesId(); + + // =================================================================================== + // Basic Override + // ============== + /** + * This method overrides the method that is declared at super. + * + * @return Clause string. (NotNull) + */ + public String toString() { + return getSqlClause().getClause(); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/AbstractBsProductsToCategoriesCQ.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/AbstractBsProductsToCategoriesCQ.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/AbstractBsProductsToCategoriesCQ.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,276 @@ + +package jp.sf.pal.pompei.cbean.cq.bs; + + + +import jp.sf.pal.pompei.allcommon.cbean.*; +import jp.sf.pal.pompei.allcommon.cbean.ckey.*; +import jp.sf.pal.pompei.allcommon.cbean.cvalue.ConditionValue; +import jp.sf.pal.pompei.allcommon.cbean.sqlclause.SqlClause; +import jp.sf.pal.pompei.cbean.cq.*; + +/** + * The condition-query of PRODUCTS_TO_CATEGORIES. + * + * @author DBFlute(AutoGenerator) + */ +public abstract class AbstractBsProductsToCategoriesCQ extends AbstractConditionQuery { + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param childQuery Child query as abstract class. (Nullable: If null, this is base instance.) + * @param sqlClause SQL clause instance. (NotNull) + * @param aliasName My alias name. (NotNull) + * @param nestLevel Nest level. + */ + public AbstractBsProductsToCategoriesCQ(ConditionQuery childQuery, SqlClause sqlClause, String aliasName, int nestLevel) { + super(childQuery, sqlClause, aliasName, nestLevel); + } + + // =================================================================================== + // Table Name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + final public String getTableDbName() { + return "PRODUCTS_TO_CATEGORIES"; + } + + // =================================================================================== + // Query + // ===== + + // /* * * * * * * * * * * * * * * * * * * * * * * + // MyTable = [PRODUCTS_TO_CATEGORIES] + // * * * * * * * * */ + + + /** Column db name of productsId. */ + protected static final String COL_PRODUCTS_ID = "PRODUCTS_ID"; + + /** Column java name of productsId. */ + protected static final String J_ProductsId = "ProductsId"; + + /** Column uncapitalised java name of productsId. */ + protected static final String UJ_productsId = "productsId"; + + /** + * Set the value of productsId using equal. { = } + * + * @param productsId The value of productsId as equal. + */ + public void setProductsId_Equal(java.math.BigDecimal productsId) { + registerProductsId(ConditionKey.CK_EQUAL, productsId); + } + + /** + * Set the value of productsId using notEqual. { != } + * + * @param productsId The value of productsId as notEqual. + */ + public void setProductsId_NotEqual(java.math.BigDecimal productsId) { + registerProductsId(ConditionKey.CK_NOT_EQUAL, productsId); + } + + /** + * Set the value of productsId using greaterThan. { > } + * + * @param productsId The value of productsId as greaterThan. + */ + public void setProductsId_GreaterThan(java.math.BigDecimal productsId) { + registerProductsId(ConditionKey.CK_GREATER_THAN, productsId); + } + + /** + * Set the value of productsId using lessThan. { < } + * + * @param productsId The value of productsId as lessThan. + */ + public void setProductsId_LessThan(java.math.BigDecimal productsId) { + registerProductsId(ConditionKey.CK_LESS_THAN, productsId); + } + + /** + * Set the value of productsId using greaterEqual. { >= } + * + * @param productsId The value of productsId as greaterEqual. + */ + public void setProductsId_GreaterEqual(java.math.BigDecimal productsId) { + registerProductsId(ConditionKey.CK_GREATER_EQUAL, productsId); + } + + /** + * Set the value of productsId using lessEqual. { <= } + * + * @param productsId The value of productsId as lessEqual. + */ + public void setProductsId_LessEqual(java.math.BigDecimal productsId) { + registerProductsId(ConditionKey.CK_LESS_EQUAL, productsId); + } + + /** + * Set the value of productsId using inScope. { in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param productsIdList The value of productsId as inScope. + */ + public void setProductsId_InScope(java.util.List productsIdList) { + registerProductsId(ConditionKey.CK_IN_SCOPE, productsIdList); + } + + /** + * Set the value of productsId using notInScope. { not in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param productsIdList The value of productsId as notInScope. + */ + public void setProductsId_NotInScope(java.util.List productsIdList) { + registerProductsId(ConditionKey.CK_NOT_IN_SCOPE, productsIdList); + } + + /** + * Register condition of productsId. + * + * @param key Condition key. (NotNull) + * @param value The value of productsId. (Nullable) + */ + protected void registerProductsId(ConditionKey key, Object value) { + registerQuery(key, value, getCValueProductsId(), COL_PRODUCTS_ID, J_ProductsId, UJ_productsId); + } + + /** + * Register inline condition of productsId. + * + * @param key Condition key. (NotNull) + * @param value The value of productsId. (Nullable) + */ + protected void registerInlineProductsId(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueProductsId(), COL_PRODUCTS_ID, J_ProductsId, UJ_productsId); + } + + abstract protected ConditionValue getCValueProductsId(); + + /** Column db name of categoriesId. */ + protected static final String COL_CATEGORIES_ID = "CATEGORIES_ID"; + + /** Column java name of categoriesId. */ + protected static final String J_CategoriesId = "CategoriesId"; + + /** Column uncapitalised java name of categoriesId. */ + protected static final String UJ_categoriesId = "categoriesId"; + + /** + * Set the value of categoriesId using equal. { = } + * + * @param categoriesId The value of categoriesId as equal. + */ + public void setCategoriesId_Equal(java.math.BigDecimal categoriesId) { + registerCategoriesId(ConditionKey.CK_EQUAL, categoriesId); + } + + /** + * Set the value of categoriesId using notEqual. { != } + * + * @param categoriesId The value of categoriesId as notEqual. + */ + public void setCategoriesId_NotEqual(java.math.BigDecimal categoriesId) { + registerCategoriesId(ConditionKey.CK_NOT_EQUAL, categoriesId); + } + + /** + * Set the value of categoriesId using greaterThan. { > } + * + * @param categoriesId The value of categoriesId as greaterThan. + */ + public void setCategoriesId_GreaterThan(java.math.BigDecimal categoriesId) { + registerCategoriesId(ConditionKey.CK_GREATER_THAN, categoriesId); + } + + /** + * Set the value of categoriesId using lessThan. { < } + * + * @param categoriesId The value of categoriesId as lessThan. + */ + public void setCategoriesId_LessThan(java.math.BigDecimal categoriesId) { + registerCategoriesId(ConditionKey.CK_LESS_THAN, categoriesId); + } + + /** + * Set the value of categoriesId using greaterEqual. { >= } + * + * @param categoriesId The value of categoriesId as greaterEqual. + */ + public void setCategoriesId_GreaterEqual(java.math.BigDecimal categoriesId) { + registerCategoriesId(ConditionKey.CK_GREATER_EQUAL, categoriesId); + } + + /** + * Set the value of categoriesId using lessEqual. { <= } + * + * @param categoriesId The value of categoriesId as lessEqual. + */ + public void setCategoriesId_LessEqual(java.math.BigDecimal categoriesId) { + registerCategoriesId(ConditionKey.CK_LESS_EQUAL, categoriesId); + } + + /** + * Set the value of categoriesId using inScope. { in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param categoriesIdList The value of categoriesId as inScope. + */ + public void setCategoriesId_InScope(java.util.List categoriesIdList) { + registerCategoriesId(ConditionKey.CK_IN_SCOPE, categoriesIdList); + } + + /** + * Set the value of categoriesId using notInScope. { not in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param categoriesIdList The value of categoriesId as notInScope. + */ + public void setCategoriesId_NotInScope(java.util.List categoriesIdList) { + registerCategoriesId(ConditionKey.CK_NOT_IN_SCOPE, categoriesIdList); + } + + /** + * Register condition of categoriesId. + * + * @param key Condition key. (NotNull) + * @param value The value of categoriesId. (Nullable) + */ + protected void registerCategoriesId(ConditionKey key, Object value) { + registerQuery(key, value, getCValueCategoriesId(), COL_CATEGORIES_ID, J_CategoriesId, UJ_categoriesId); + } + + /** + * Register inline condition of categoriesId. + * + * @param key Condition key. (NotNull) + * @param value The value of categoriesId. (Nullable) + */ + protected void registerInlineCategoriesId(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueCategoriesId(), COL_CATEGORIES_ID, J_CategoriesId, UJ_categoriesId); + } + + abstract protected ConditionValue getCValueCategoriesId(); + + // =================================================================================== + // Basic Override + // ============== + /** + * This method overrides the method that is declared at super. + * + * @return Clause string. (NotNull) + */ + public String toString() { + return getSqlClause().getClause(); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/AbstractBsReviewsCQ.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/AbstractBsReviewsCQ.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/AbstractBsReviewsCQ.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,980 @@ + +package jp.sf.pal.pompei.cbean.cq.bs; + + + +import jp.sf.pal.pompei.allcommon.cbean.*; +import jp.sf.pal.pompei.allcommon.cbean.ckey.*; +import jp.sf.pal.pompei.allcommon.cbean.cvalue.ConditionValue; +import jp.sf.pal.pompei.allcommon.cbean.sqlclause.SqlClause; +import jp.sf.pal.pompei.cbean.cq.*; + +/** + * The condition-query of REVIEWS. + * + * @author DBFlute(AutoGenerator) + */ +public abstract class AbstractBsReviewsCQ extends AbstractConditionQuery { + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param childQuery Child query as abstract class. (Nullable: If null, this is base instance.) + * @param sqlClause SQL clause instance. (NotNull) + * @param aliasName My alias name. (NotNull) + * @param nestLevel Nest level. + */ + public AbstractBsReviewsCQ(ConditionQuery childQuery, SqlClause sqlClause, String aliasName, int nestLevel) { + super(childQuery, sqlClause, aliasName, nestLevel); + } + + // =================================================================================== + // Table Name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + final public String getTableDbName() { + return "REVIEWS"; + } + + // =================================================================================== + // Query + // ===== + + // /* * * * * * * * * * * * * * * * * * * * * * * + // MyTable = [REVIEWS] + // * * * * * * * * */ + + + /** Column db name of reviewsId. */ + protected static final String COL_REVIEWS_ID = "REVIEWS_ID"; + + /** Column java name of reviewsId. */ + protected static final String J_ReviewsId = "ReviewsId"; + + /** Column uncapitalised java name of reviewsId. */ + protected static final String UJ_reviewsId = "reviewsId"; + + /** + * Set the value of reviewsId using equal. { = } + * + * @param reviewsId The value of reviewsId as equal. + */ + public void setReviewsId_Equal(java.math.BigDecimal reviewsId) { + registerReviewsId(ConditionKey.CK_EQUAL, reviewsId); + } + + /** + * Set the value of reviewsId using notEqual. { != } + * + * @param reviewsId The value of reviewsId as notEqual. + */ + public void setReviewsId_NotEqual(java.math.BigDecimal reviewsId) { + registerReviewsId(ConditionKey.CK_NOT_EQUAL, reviewsId); + } + + /** + * Set the value of reviewsId using greaterThan. { > } + * + * @param reviewsId The value of reviewsId as greaterThan. + */ + public void setReviewsId_GreaterThan(java.math.BigDecimal reviewsId) { + registerReviewsId(ConditionKey.CK_GREATER_THAN, reviewsId); + } + + /** + * Set the value of reviewsId using lessThan. { < } + * + * @param reviewsId The value of reviewsId as lessThan. + */ + public void setReviewsId_LessThan(java.math.BigDecimal reviewsId) { + registerReviewsId(ConditionKey.CK_LESS_THAN, reviewsId); + } + + /** + * Set the value of reviewsId using greaterEqual. { >= } + * + * @param reviewsId The value of reviewsId as greaterEqual. + */ + public void setReviewsId_GreaterEqual(java.math.BigDecimal reviewsId) { + registerReviewsId(ConditionKey.CK_GREATER_EQUAL, reviewsId); + } + + /** + * Set the value of reviewsId using lessEqual. { <= } + * + * @param reviewsId The value of reviewsId as lessEqual. + */ + public void setReviewsId_LessEqual(java.math.BigDecimal reviewsId) { + registerReviewsId(ConditionKey.CK_LESS_EQUAL, reviewsId); + } + + /** + * Set the value of reviewsId using inScope. { in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param reviewsIdList The value of reviewsId as inScope. + */ + public void setReviewsId_InScope(java.util.List reviewsIdList) { + registerReviewsId(ConditionKey.CK_IN_SCOPE, reviewsIdList); + } + + /** + * Set the value of reviewsId using notInScope. { not in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param reviewsIdList The value of reviewsId as notInScope. + */ + public void setReviewsId_NotInScope(java.util.List reviewsIdList) { + registerReviewsId(ConditionKey.CK_NOT_IN_SCOPE, reviewsIdList); + } + + /** + * Register condition of reviewsId. + * + * @param key Condition key. (NotNull) + * @param value The value of reviewsId. (Nullable) + */ + protected void registerReviewsId(ConditionKey key, Object value) { + registerQuery(key, value, getCValueReviewsId(), COL_REVIEWS_ID, J_ReviewsId, UJ_reviewsId); + } + + /** + * Register inline condition of reviewsId. + * + * @param key Condition key. (NotNull) + * @param value The value of reviewsId. (Nullable) + */ + protected void registerInlineReviewsId(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueReviewsId(), COL_REVIEWS_ID, J_ReviewsId, UJ_reviewsId); + } + + abstract protected ConditionValue getCValueReviewsId(); + + /** Column db name of productsId. */ + protected static final String COL_PRODUCTS_ID = "PRODUCTS_ID"; + + /** Column java name of productsId. */ + protected static final String J_ProductsId = "ProductsId"; + + /** Column uncapitalised java name of productsId. */ + protected static final String UJ_productsId = "productsId"; + + /** + * Set the value of productsId using equal. { = } + * + * @param productsId The value of productsId as equal. + */ + public void setProductsId_Equal(java.math.BigDecimal productsId) { + registerProductsId(ConditionKey.CK_EQUAL, productsId); + } + + /** + * Set the value of productsId using notEqual. { != } + * + * @param productsId The value of productsId as notEqual. + */ + public void setProductsId_NotEqual(java.math.BigDecimal productsId) { + registerProductsId(ConditionKey.CK_NOT_EQUAL, productsId); + } + + /** + * Set the value of productsId using greaterThan. { > } + * + * @param productsId The value of productsId as greaterThan. + */ + public void setProductsId_GreaterThan(java.math.BigDecimal productsId) { + registerProductsId(ConditionKey.CK_GREATER_THAN, productsId); + } + + /** + * Set the value of productsId using lessThan. { < } + * + * @param productsId The value of productsId as lessThan. + */ + public void setProductsId_LessThan(java.math.BigDecimal productsId) { + registerProductsId(ConditionKey.CK_LESS_THAN, productsId); + } + + /** + * Set the value of productsId using greaterEqual. { >= } + * + * @param productsId The value of productsId as greaterEqual. + */ + public void setProductsId_GreaterEqual(java.math.BigDecimal productsId) { + registerProductsId(ConditionKey.CK_GREATER_EQUAL, productsId); + } + + /** + * Set the value of productsId using lessEqual. { <= } + * + * @param productsId The value of productsId as lessEqual. + */ + public void setProductsId_LessEqual(java.math.BigDecimal productsId) { + registerProductsId(ConditionKey.CK_LESS_EQUAL, productsId); + } + + /** + * Set the value of productsId using inScope. { in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param productsIdList The value of productsId as inScope. + */ + public void setProductsId_InScope(java.util.List productsIdList) { + registerProductsId(ConditionKey.CK_IN_SCOPE, productsIdList); + } + + /** + * Set the value of productsId using notInScope. { not in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param productsIdList The value of productsId as notInScope. + */ + public void setProductsId_NotInScope(java.util.List productsIdList) { + registerProductsId(ConditionKey.CK_NOT_IN_SCOPE, productsIdList); + } + + /** + * Register condition of productsId. + * + * @param key Condition key. (NotNull) + * @param value The value of productsId. (Nullable) + */ + protected void registerProductsId(ConditionKey key, Object value) { + registerQuery(key, value, getCValueProductsId(), COL_PRODUCTS_ID, J_ProductsId, UJ_productsId); + } + + /** + * Register inline condition of productsId. + * + * @param key Condition key. (NotNull) + * @param value The value of productsId. (Nullable) + */ + protected void registerInlineProductsId(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueProductsId(), COL_PRODUCTS_ID, J_ProductsId, UJ_productsId); + } + + abstract protected ConditionValue getCValueProductsId(); + + /** Column db name of customersId. */ + protected static final String COL_CUSTOMERS_ID = "CUSTOMERS_ID"; + + /** Column java name of customersId. */ + protected static final String J_CustomersId = "CustomersId"; + + /** Column uncapitalised java name of customersId. */ + protected static final String UJ_customersId = "customersId"; + + /** + * Set the value of customersId using equal. { = } + * + * @param customersId The value of customersId as equal. + */ + public void setCustomersId_Equal(java.math.BigDecimal customersId) { + registerCustomersId(ConditionKey.CK_EQUAL, customersId); + } + + /** + * Set the value of customersId using notEqual. { != } + * + * @param customersId The value of customersId as notEqual. + */ + public void setCustomersId_NotEqual(java.math.BigDecimal customersId) { + registerCustomersId(ConditionKey.CK_NOT_EQUAL, customersId); + } + + /** + * Set the value of customersId using greaterThan. { > } + * + * @param customersId The value of customersId as greaterThan. + */ + public void setCustomersId_GreaterThan(java.math.BigDecimal customersId) { + registerCustomersId(ConditionKey.CK_GREATER_THAN, customersId); + } + + /** + * Set the value of customersId using lessThan. { < } + * + * @param customersId The value of customersId as lessThan. + */ + public void setCustomersId_LessThan(java.math.BigDecimal customersId) { + registerCustomersId(ConditionKey.CK_LESS_THAN, customersId); + } + + /** + * Set the value of customersId using greaterEqual. { >= } + * + * @param customersId The value of customersId as greaterEqual. + */ + public void setCustomersId_GreaterEqual(java.math.BigDecimal customersId) { + registerCustomersId(ConditionKey.CK_GREATER_EQUAL, customersId); + } + + /** + * Set the value of customersId using lessEqual. { <= } + * + * @param customersId The value of customersId as lessEqual. + */ + public void setCustomersId_LessEqual(java.math.BigDecimal customersId) { + registerCustomersId(ConditionKey.CK_LESS_EQUAL, customersId); + } + + /** + * Set the value of customersId using inScope. { in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param customersIdList The value of customersId as inScope. + */ + public void setCustomersId_InScope(java.util.List customersIdList) { + registerCustomersId(ConditionKey.CK_IN_SCOPE, customersIdList); + } + + /** + * Set the value of customersId using notInScope. { not in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param customersIdList The value of customersId as notInScope. + */ + public void setCustomersId_NotInScope(java.util.List customersIdList) { + registerCustomersId(ConditionKey.CK_NOT_IN_SCOPE, customersIdList); + } + + /** + * Set the value of customersId using isNull. { is null } + */ + public void setCustomersId_IsNull() { + registerCustomersId(ConditionKey.CK_IS_NULL, DUMMY_OBJECT); + } + + /** + * Set the value of customersId using isNotNull. { is not null } + */ + public void setCustomersId_IsNotNull() { + registerCustomersId(ConditionKey.CK_IS_NOT_NULL, DUMMY_OBJECT); + } + + /** + * Register condition of customersId. + * + * @param key Condition key. (NotNull) + * @param value The value of customersId. (Nullable) + */ + protected void registerCustomersId(ConditionKey key, Object value) { + registerQuery(key, value, getCValueCustomersId(), COL_CUSTOMERS_ID, J_CustomersId, UJ_customersId); + } + + /** + * Register inline condition of customersId. + * + * @param key Condition key. (NotNull) + * @param value The value of customersId. (Nullable) + */ + protected void registerInlineCustomersId(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueCustomersId(), COL_CUSTOMERS_ID, J_CustomersId, UJ_customersId); + } + + abstract protected ConditionValue getCValueCustomersId(); + + /** Column db name of customersName. */ + protected static final String COL_CUSTOMERS_NAME = "CUSTOMERS_NAME"; + + /** Column java name of customersName. */ + protected static final String J_CustomersName = "CustomersName"; + + /** Column uncapitalised java name of customersName. */ + protected static final String UJ_customersName = "customersName"; + + /** + * Set the value of customersName using equal. { = } + * If the value is null or empty-string, this condition is ignored. + * + * @param customersName The value of customersName as equal. + */ + public void setCustomersName_Equal(String customersName) { + registerCustomersName(ConditionKey.CK_EQUAL, filterRemoveEmptyString(customersName)); + } + + /** + * Set the value of customersName using notEqual. { != } + * If the value is null or empty-string, this condition is ignored. + * + * @param customersName The value of customersName as notEqual. + */ + public void setCustomersName_NotEqual(String customersName) { + registerCustomersName(ConditionKey.CK_NOT_EQUAL, filterRemoveEmptyString(customersName)); + } + + /** + * Set the value of customersName using greaterThan. { > } + * If the value is null or empty-string, this condition is ignored. + * + * @param customersName The value of customersName as greaterThan. + */ + public void setCustomersName_GreaterThan(String customersName) { + registerCustomersName(ConditionKey.CK_GREATER_THAN, filterRemoveEmptyString(customersName)); + } + + /** + * Set the value of customersName using lessThan. { < } + * If the value is null or empty-string, this condition is ignored. + * + * @param customersName The value of customersName as lessThan. + */ + public void setCustomersName_LessThan(String customersName) { + registerCustomersName(ConditionKey.CK_LESS_THAN, filterRemoveEmptyString(customersName)); + } + + /** + * Set the value of customersName using greaterEqual. { >= } + * If the value is null or empty-string, this condition is ignored. + * + * @param customersName The value of customersName as greaterEqual. + */ + public void setCustomersName_GreaterEqual(String customersName) { + registerCustomersName(ConditionKey.CK_GREATER_EQUAL, filterRemoveEmptyString(customersName)); + } + + /** + * Set the value of customersName using lessEqual. { <= } + * If the value is null or empty-string, this condition is ignored. + * + * @param customersName The value of customersName as lessEqual. + */ + public void setCustomersName_LessEqual(String customersName) { + registerCustomersName(ConditionKey.CK_LESS_EQUAL, filterRemoveEmptyString(customersName)); + } + + /** + * Set the value of customersName using prefixSearch. { like 'xxx%' } + * If the value is null or empty-string, this condition is ignored. + * + * @param customersName The value of customersName as prefixSearch. + */ + public void setCustomersName_PrefixSearch(String customersName) { + registerCustomersName(ConditionKey.CK_PREFIX_SEARCH, filterRemoveEmptyString(customersName)); + } + + /** + * Set the value of customersName using likeSearch. { like '%xxx%' } + * If the value is null or empty-string, this condition is ignored. + * You can invoke this method several times and the conditions are set up. + * + * @param customersName The value of customersName as likeSearch. + * @param likeSearchOption Like search option. (NotNull) + */ + public void setCustomersName_LikeSearch(String customersName, jp.sf.pal.pompei.allcommon.cbean.coption.LikeSearchOption likeSearchOption) { + registerLikeSearchQuery(ConditionKey.CK_LIKE_SEARCH, filterRemoveEmptyString(customersName), getCValueCustomersName(), COL_CUSTOMERS_NAME, J_CustomersName, UJ_customersName, likeSearchOption); + } + + /** + * Set the value of customersName using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param customersNameList The value of customersName as inScope. + */ + public void setCustomersName_InScope(java.util.List customersNameList) { + registerCustomersName(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyStringFromList(customersNameList)); + } + + /** + * Set the value of customersName using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param customersName The value of customersName as inScope. + */ + public void setCustomersName_InScope(String customersName, jp.sf.pal.pompei.allcommon.cbean.coption.InScopeOption option) { + registerInScopeQuery(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyString(customersName), getCValueCustomersName(), COL_CUSTOMERS_NAME, J_CustomersName, UJ_customersName, option); + } + + /** + * Set the value of customersName using notInScope. { not in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param customersNameList The value of customersName as notInScope. + */ + public void setCustomersName_NotInScope(java.util.List customersNameList) { + registerCustomersName(ConditionKey.CK_NOT_IN_SCOPE, filterRemoveEmptyStringFromList(customersNameList)); + } + + /** + * Register condition of customersName. + * + * @param key Condition key. (NotNull) + * @param value The value of customersName. (Nullable) + */ + protected void registerCustomersName(ConditionKey key, Object value) { + registerQuery(key, value, getCValueCustomersName(), COL_CUSTOMERS_NAME, J_CustomersName, UJ_customersName); + } + + /** + * Register inline condition of customersName. + * + * @param key Condition key. (NotNull) + * @param value The value of customersName. (Nullable) + */ + protected void registerInlineCustomersName(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueCustomersName(), COL_CUSTOMERS_NAME, J_CustomersName, UJ_customersName); + } + + abstract protected ConditionValue getCValueCustomersName(); + + /** Column db name of reviewsRating. */ + protected static final String COL_REVIEWS_RATING = "REVIEWS_RATING"; + + /** Column java name of reviewsRating. */ + protected static final String J_ReviewsRating = "ReviewsRating"; + + /** Column uncapitalised java name of reviewsRating. */ + protected static final String UJ_reviewsRating = "reviewsRating"; + + /** + * Set the value of reviewsRating using equal. { = } + * + * @param reviewsRating The value of reviewsRating as equal. + */ + public void setReviewsRating_Equal(java.math.BigDecimal reviewsRating) { + registerReviewsRating(ConditionKey.CK_EQUAL, reviewsRating); + } + + /** + * Set the value of reviewsRating using notEqual. { != } + * + * @param reviewsRating The value of reviewsRating as notEqual. + */ + public void setReviewsRating_NotEqual(java.math.BigDecimal reviewsRating) { + registerReviewsRating(ConditionKey.CK_NOT_EQUAL, reviewsRating); + } + + /** + * Set the value of reviewsRating using greaterThan. { > } + * + * @param reviewsRating The value of reviewsRating as greaterThan. + */ + public void setReviewsRating_GreaterThan(java.math.BigDecimal reviewsRating) { + registerReviewsRating(ConditionKey.CK_GREATER_THAN, reviewsRating); + } + + /** + * Set the value of reviewsRating using lessThan. { < } + * + * @param reviewsRating The value of reviewsRating as lessThan. + */ + public void setReviewsRating_LessThan(java.math.BigDecimal reviewsRating) { + registerReviewsRating(ConditionKey.CK_LESS_THAN, reviewsRating); + } + + /** + * Set the value of reviewsRating using greaterEqual. { >= } + * + * @param reviewsRating The value of reviewsRating as greaterEqual. + */ + public void setReviewsRating_GreaterEqual(java.math.BigDecimal reviewsRating) { + registerReviewsRating(ConditionKey.CK_GREATER_EQUAL, reviewsRating); + } + + /** + * Set the value of reviewsRating using lessEqual. { <= } + * + * @param reviewsRating The value of reviewsRating as lessEqual. + */ + public void setReviewsRating_LessEqual(java.math.BigDecimal reviewsRating) { + registerReviewsRating(ConditionKey.CK_LESS_EQUAL, reviewsRating); + } + + /** + * Set the value of reviewsRating using inScope. { in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param reviewsRatingList The value of reviewsRating as inScope. + */ + public void setReviewsRating_InScope(java.util.List reviewsRatingList) { + registerReviewsRating(ConditionKey.CK_IN_SCOPE, reviewsRatingList); + } + + /** + * Set the value of reviewsRating using notInScope. { not in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param reviewsRatingList The value of reviewsRating as notInScope. + */ + public void setReviewsRating_NotInScope(java.util.List reviewsRatingList) { + registerReviewsRating(ConditionKey.CK_NOT_IN_SCOPE, reviewsRatingList); + } + + /** + * Set the value of reviewsRating using isNull. { is null } + */ + public void setReviewsRating_IsNull() { + registerReviewsRating(ConditionKey.CK_IS_NULL, DUMMY_OBJECT); + } + + /** + * Set the value of reviewsRating using isNotNull. { is not null } + */ + public void setReviewsRating_IsNotNull() { + registerReviewsRating(ConditionKey.CK_IS_NOT_NULL, DUMMY_OBJECT); + } + + /** + * Register condition of reviewsRating. + * + * @param key Condition key. (NotNull) + * @param value The value of reviewsRating. (Nullable) + */ + protected void registerReviewsRating(ConditionKey key, Object value) { + registerQuery(key, value, getCValueReviewsRating(), COL_REVIEWS_RATING, J_ReviewsRating, UJ_reviewsRating); + } + + /** + * Register inline condition of reviewsRating. + * + * @param key Condition key. (NotNull) + * @param value The value of reviewsRating. (Nullable) + */ + protected void registerInlineReviewsRating(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueReviewsRating(), COL_REVIEWS_RATING, J_ReviewsRating, UJ_reviewsRating); + } + + abstract protected ConditionValue getCValueReviewsRating(); + + /** Column db name of dateAdded. */ + protected static final String COL_DATE_ADDED = "DATE_ADDED"; + + /** Column java name of dateAdded. */ + protected static final String J_DateAdded = "DateAdded"; + + /** Column uncapitalised java name of dateAdded. */ + protected static final String UJ_dateAdded = "dateAdded"; + + /** + * Set the value of dateAdded using equal. { = } + * + * @param dateAdded The value of dateAdded as equal. + */ + public void setDateAdded_Equal(java.sql.Timestamp dateAdded) { + registerDateAdded(ConditionKey.CK_EQUAL, dateAdded); + } + + /** + * Set the value of dateAdded using notEqual. { != } + * + * @param dateAdded The value of dateAdded as notEqual. + */ + public void setDateAdded_NotEqual(java.sql.Timestamp dateAdded) { + registerDateAdded(ConditionKey.CK_NOT_EQUAL, dateAdded); + } + + /** + * Set the value of dateAdded using greaterThan. { > } + * + * @param dateAdded The value of dateAdded as greaterThan. + */ + public void setDateAdded_GreaterThan(java.sql.Timestamp dateAdded) { + registerDateAdded(ConditionKey.CK_GREATER_THAN, dateAdded); + } + + /** + * Set the value of dateAdded using lessThan. { < } + * + * @param dateAdded The value of dateAdded as lessThan. + */ + public void setDateAdded_LessThan(java.sql.Timestamp dateAdded) { + registerDateAdded(ConditionKey.CK_LESS_THAN, dateAdded); + } + + /** + * Set the value of dateAdded using greaterEqual. { >= } + * + * @param dateAdded The value of dateAdded as greaterEqual. + */ + public void setDateAdded_GreaterEqual(java.sql.Timestamp dateAdded) { + registerDateAdded(ConditionKey.CK_GREATER_EQUAL, dateAdded); + } + + /** + * Set the value of dateAdded using lessEqual. { <= } + * + * @param dateAdded The value of dateAdded as lessEqual. + */ + public void setDateAdded_LessEqual(java.sql.Timestamp dateAdded) { + registerDateAdded(ConditionKey.CK_LESS_EQUAL, dateAdded); + } + + /** + * Set the value of dateAdded using from-to. { $fromDate <= COLUMN_NAME <= $toDate } + * + * @param dateAdded The value of dateAdded as from-to. + * @param fromToOption From-To option. (NotNull) + */ + public void setDateAdded_FromTo(java.sql.Timestamp fromDate, java.sql.Timestamp toDate, jp.sf.pal.pompei.allcommon.cbean.coption.FromToOption fromToOption) { + registerFromToQuery(fromDate, toDate, getCValueDateAdded(), COL_DATE_ADDED, J_DateAdded, UJ_dateAdded, fromToOption); + } + + /** + * Set the value of dateAdded using isNull. { is null } + */ + public void setDateAdded_IsNull() { + registerDateAdded(ConditionKey.CK_IS_NULL, DUMMY_OBJECT); + } + + /** + * Set the value of dateAdded using isNotNull. { is not null } + */ + public void setDateAdded_IsNotNull() { + registerDateAdded(ConditionKey.CK_IS_NOT_NULL, DUMMY_OBJECT); + } + + /** + * Register condition of dateAdded. + * + * @param key Condition key. (NotNull) + * @param value The value of dateAdded. (Nullable) + */ + protected void registerDateAdded(ConditionKey key, Object value) { + registerQuery(key, value, getCValueDateAdded(), COL_DATE_ADDED, J_DateAdded, UJ_dateAdded); + } + + /** + * Register inline condition of dateAdded. + * + * @param key Condition key. (NotNull) + * @param value The value of dateAdded. (Nullable) + */ + protected void registerInlineDateAdded(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueDateAdded(), COL_DATE_ADDED, J_DateAdded, UJ_dateAdded); + } + + abstract protected ConditionValue getCValueDateAdded(); + + /** Column db name of lastModified. */ + protected static final String COL_LAST_MODIFIED = "LAST_MODIFIED"; + + /** Column java name of lastModified. */ + protected static final String J_LastModified = "LastModified"; + + /** Column uncapitalised java name of lastModified. */ + protected static final String UJ_lastModified = "lastModified"; + + /** + * Set the value of lastModified using equal. { = } + * + * @param lastModified The value of lastModified as equal. + */ + public void setLastModified_Equal(java.sql.Timestamp lastModified) { + registerLastModified(ConditionKey.CK_EQUAL, lastModified); + } + + /** + * Set the value of lastModified using notEqual. { != } + * + * @param lastModified The value of lastModified as notEqual. + */ + public void setLastModified_NotEqual(java.sql.Timestamp lastModified) { + registerLastModified(ConditionKey.CK_NOT_EQUAL, lastModified); + } + + /** + * Set the value of lastModified using greaterThan. { > } + * + * @param lastModified The value of lastModified as greaterThan. + */ + public void setLastModified_GreaterThan(java.sql.Timestamp lastModified) { + registerLastModified(ConditionKey.CK_GREATER_THAN, lastModified); + } + + /** + * Set the value of lastModified using lessThan. { < } + * + * @param lastModified The value of lastModified as lessThan. + */ + public void setLastModified_LessThan(java.sql.Timestamp lastModified) { + registerLastModified(ConditionKey.CK_LESS_THAN, lastModified); + } + + /** + * Set the value of lastModified using greaterEqual. { >= } + * + * @param lastModified The value of lastModified as greaterEqual. + */ + public void setLastModified_GreaterEqual(java.sql.Timestamp lastModified) { + registerLastModified(ConditionKey.CK_GREATER_EQUAL, lastModified); + } + + /** + * Set the value of lastModified using lessEqual. { <= } + * + * @param lastModified The value of lastModified as lessEqual. + */ + public void setLastModified_LessEqual(java.sql.Timestamp lastModified) { + registerLastModified(ConditionKey.CK_LESS_EQUAL, lastModified); + } + + /** + * Set the value of lastModified using from-to. { $fromDate <= COLUMN_NAME <= $toDate } + * + * @param lastModified The value of lastModified as from-to. + * @param fromToOption From-To option. (NotNull) + */ + public void setLastModified_FromTo(java.sql.Timestamp fromDate, java.sql.Timestamp toDate, jp.sf.pal.pompei.allcommon.cbean.coption.FromToOption fromToOption) { + registerFromToQuery(fromDate, toDate, getCValueLastModified(), COL_LAST_MODIFIED, J_LastModified, UJ_lastModified, fromToOption); + } + + /** + * Set the value of lastModified using isNull. { is null } + */ + public void setLastModified_IsNull() { + registerLastModified(ConditionKey.CK_IS_NULL, DUMMY_OBJECT); + } + + /** + * Set the value of lastModified using isNotNull. { is not null } + */ + public void setLastModified_IsNotNull() { + registerLastModified(ConditionKey.CK_IS_NOT_NULL, DUMMY_OBJECT); + } + + /** + * Register condition of lastModified. + * + * @param key Condition key. (NotNull) + * @param value The value of lastModified. (Nullable) + */ + protected void registerLastModified(ConditionKey key, Object value) { + registerQuery(key, value, getCValueLastModified(), COL_LAST_MODIFIED, J_LastModified, UJ_lastModified); + } + + /** + * Register inline condition of lastModified. + * + * @param key Condition key. (NotNull) + * @param value The value of lastModified. (Nullable) + */ + protected void registerInlineLastModified(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueLastModified(), COL_LAST_MODIFIED, J_LastModified, UJ_lastModified); + } + + abstract protected ConditionValue getCValueLastModified(); + + /** Column db name of reviewsRead. */ + protected static final String COL_REVIEWS_READ = "REVIEWS_READ"; + + /** Column java name of reviewsRead. */ + protected static final String J_ReviewsRead = "ReviewsRead"; + + /** Column uncapitalised java name of reviewsRead. */ + protected static final String UJ_reviewsRead = "reviewsRead"; + + /** + * Set the value of reviewsRead using equal. { = } + * + * @param reviewsRead The value of reviewsRead as equal. + */ + public void setReviewsRead_Equal(java.math.BigDecimal reviewsRead) { + registerReviewsRead(ConditionKey.CK_EQUAL, reviewsRead); + } + + /** + * Set the value of reviewsRead using notEqual. { != } + * + * @param reviewsRead The value of reviewsRead as notEqual. + */ + public void setReviewsRead_NotEqual(java.math.BigDecimal reviewsRead) { + registerReviewsRead(ConditionKey.CK_NOT_EQUAL, reviewsRead); + } + + /** + * Set the value of reviewsRead using greaterThan. { > } + * + * @param reviewsRead The value of reviewsRead as greaterThan. + */ + public void setReviewsRead_GreaterThan(java.math.BigDecimal reviewsRead) { + registerReviewsRead(ConditionKey.CK_GREATER_THAN, reviewsRead); + } + + /** + * Set the value of reviewsRead using lessThan. { < } + * + * @param reviewsRead The value of reviewsRead as lessThan. + */ + public void setReviewsRead_LessThan(java.math.BigDecimal reviewsRead) { + registerReviewsRead(ConditionKey.CK_LESS_THAN, reviewsRead); + } + + /** + * Set the value of reviewsRead using greaterEqual. { >= } + * + * @param reviewsRead The value of reviewsRead as greaterEqual. + */ + public void setReviewsRead_GreaterEqual(java.math.BigDecimal reviewsRead) { + registerReviewsRead(ConditionKey.CK_GREATER_EQUAL, reviewsRead); + } + + /** + * Set the value of reviewsRead using lessEqual. { <= } + * + * @param reviewsRead The value of reviewsRead as lessEqual. + */ + public void setReviewsRead_LessEqual(java.math.BigDecimal reviewsRead) { + registerReviewsRead(ConditionKey.CK_LESS_EQUAL, reviewsRead); + } + + /** + * Set the value of reviewsRead using inScope. { in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param reviewsReadList The value of reviewsRead as inScope. + */ + public void setReviewsRead_InScope(java.util.List reviewsReadList) { + registerReviewsRead(ConditionKey.CK_IN_SCOPE, reviewsReadList); + } + + /** + * Set the value of reviewsRead using notInScope. { not in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param reviewsReadList The value of reviewsRead as notInScope. + */ + public void setReviewsRead_NotInScope(java.util.List reviewsReadList) { + registerReviewsRead(ConditionKey.CK_NOT_IN_SCOPE, reviewsReadList); + } + + /** + * Register condition of reviewsRead. + * + * @param key Condition key. (NotNull) + * @param value The value of reviewsRead. (Nullable) + */ + protected void registerReviewsRead(ConditionKey key, Object value) { + registerQuery(key, value, getCValueReviewsRead(), COL_REVIEWS_READ, J_ReviewsRead, UJ_reviewsRead); + } + + /** + * Register inline condition of reviewsRead. + * + * @param key Condition key. (NotNull) + * @param value The value of reviewsRead. (Nullable) + */ + protected void registerInlineReviewsRead(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueReviewsRead(), COL_REVIEWS_READ, J_ReviewsRead, UJ_reviewsRead); + } + + abstract protected ConditionValue getCValueReviewsRead(); + + // =================================================================================== + // Basic Override + // ============== + /** + * This method overrides the method that is declared at super. + * + * @return Clause string. (NotNull) + */ + public String toString() { + return getSqlClause().getClause(); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/AbstractBsReviewsDescriptionCQ.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/AbstractBsReviewsDescriptionCQ.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/AbstractBsReviewsDescriptionCQ.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,419 @@ + +package jp.sf.pal.pompei.cbean.cq.bs; + + + +import jp.sf.pal.pompei.allcommon.cbean.*; +import jp.sf.pal.pompei.allcommon.cbean.ckey.*; +import jp.sf.pal.pompei.allcommon.cbean.cvalue.ConditionValue; +import jp.sf.pal.pompei.allcommon.cbean.sqlclause.SqlClause; +import jp.sf.pal.pompei.cbean.cq.*; + +/** + * The condition-query of REVIEWS_DESCRIPTION. + * + * @author DBFlute(AutoGenerator) + */ +public abstract class AbstractBsReviewsDescriptionCQ extends AbstractConditionQuery { + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param childQuery Child query as abstract class. (Nullable: If null, this is base instance.) + * @param sqlClause SQL clause instance. (NotNull) + * @param aliasName My alias name. (NotNull) + * @param nestLevel Nest level. + */ + public AbstractBsReviewsDescriptionCQ(ConditionQuery childQuery, SqlClause sqlClause, String aliasName, int nestLevel) { + super(childQuery, sqlClause, aliasName, nestLevel); + } + + // =================================================================================== + // Table Name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + final public String getTableDbName() { + return "REVIEWS_DESCRIPTION"; + } + + // =================================================================================== + // Query + // ===== + + // /* * * * * * * * * * * * * * * * * * * * * * * + // MyTable = [REVIEWS_DESCRIPTION] + // * * * * * * * * */ + + + /** Column db name of reviewsId. */ + protected static final String COL_REVIEWS_ID = "REVIEWS_ID"; + + /** Column java name of reviewsId. */ + protected static final String J_ReviewsId = "ReviewsId"; + + /** Column uncapitalised java name of reviewsId. */ + protected static final String UJ_reviewsId = "reviewsId"; + + /** + * Set the value of reviewsId using equal. { = } + * + * @param reviewsId The value of reviewsId as equal. + */ + public void setReviewsId_Equal(java.math.BigDecimal reviewsId) { + registerReviewsId(ConditionKey.CK_EQUAL, reviewsId); + } + + /** + * Set the value of reviewsId using notEqual. { != } + * + * @param reviewsId The value of reviewsId as notEqual. + */ + public void setReviewsId_NotEqual(java.math.BigDecimal reviewsId) { + registerReviewsId(ConditionKey.CK_NOT_EQUAL, reviewsId); + } + + /** + * Set the value of reviewsId using greaterThan. { > } + * + * @param reviewsId The value of reviewsId as greaterThan. + */ + public void setReviewsId_GreaterThan(java.math.BigDecimal reviewsId) { + registerReviewsId(ConditionKey.CK_GREATER_THAN, reviewsId); + } + + /** + * Set the value of reviewsId using lessThan. { < } + * + * @param reviewsId The value of reviewsId as lessThan. + */ + public void setReviewsId_LessThan(java.math.BigDecimal reviewsId) { + registerReviewsId(ConditionKey.CK_LESS_THAN, reviewsId); + } + + /** + * Set the value of reviewsId using greaterEqual. { >= } + * + * @param reviewsId The value of reviewsId as greaterEqual. + */ + public void setReviewsId_GreaterEqual(java.math.BigDecimal reviewsId) { + registerReviewsId(ConditionKey.CK_GREATER_EQUAL, reviewsId); + } + + /** + * Set the value of reviewsId using lessEqual. { <= } + * + * @param reviewsId The value of reviewsId as lessEqual. + */ + public void setReviewsId_LessEqual(java.math.BigDecimal reviewsId) { + registerReviewsId(ConditionKey.CK_LESS_EQUAL, reviewsId); + } + + /** + * Set the value of reviewsId using inScope. { in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param reviewsIdList The value of reviewsId as inScope. + */ + public void setReviewsId_InScope(java.util.List reviewsIdList) { + registerReviewsId(ConditionKey.CK_IN_SCOPE, reviewsIdList); + } + + /** + * Set the value of reviewsId using notInScope. { not in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param reviewsIdList The value of reviewsId as notInScope. + */ + public void setReviewsId_NotInScope(java.util.List reviewsIdList) { + registerReviewsId(ConditionKey.CK_NOT_IN_SCOPE, reviewsIdList); + } + + /** + * Register condition of reviewsId. + * + * @param key Condition key. (NotNull) + * @param value The value of reviewsId. (Nullable) + */ + protected void registerReviewsId(ConditionKey key, Object value) { + registerQuery(key, value, getCValueReviewsId(), COL_REVIEWS_ID, J_ReviewsId, UJ_reviewsId); + } + + /** + * Register inline condition of reviewsId. + * + * @param key Condition key. (NotNull) + * @param value The value of reviewsId. (Nullable) + */ + protected void registerInlineReviewsId(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueReviewsId(), COL_REVIEWS_ID, J_ReviewsId, UJ_reviewsId); + } + + abstract protected ConditionValue getCValueReviewsId(); + + /** Column db name of languagesId. */ + protected static final String COL_LANGUAGES_ID = "LANGUAGES_ID"; + + /** Column java name of languagesId. */ + protected static final String J_LanguagesId = "LanguagesId"; + + /** Column uncapitalised java name of languagesId. */ + protected static final String UJ_languagesId = "languagesId"; + + /** + * Set the value of languagesId using equal. { = } + * + * @param languagesId The value of languagesId as equal. + */ + public void setLanguagesId_Equal(java.math.BigDecimal languagesId) { + registerLanguagesId(ConditionKey.CK_EQUAL, languagesId); + } + + /** + * Set the value of languagesId using notEqual. { != } + * + * @param languagesId The value of languagesId as notEqual. + */ + public void setLanguagesId_NotEqual(java.math.BigDecimal languagesId) { + registerLanguagesId(ConditionKey.CK_NOT_EQUAL, languagesId); + } + + /** + * Set the value of languagesId using greaterThan. { > } + * + * @param languagesId The value of languagesId as greaterThan. + */ + public void setLanguagesId_GreaterThan(java.math.BigDecimal languagesId) { + registerLanguagesId(ConditionKey.CK_GREATER_THAN, languagesId); + } + + /** + * Set the value of languagesId using lessThan. { < } + * + * @param languagesId The value of languagesId as lessThan. + */ + public void setLanguagesId_LessThan(java.math.BigDecimal languagesId) { + registerLanguagesId(ConditionKey.CK_LESS_THAN, languagesId); + } + + /** + * Set the value of languagesId using greaterEqual. { >= } + * + * @param languagesId The value of languagesId as greaterEqual. + */ + public void setLanguagesId_GreaterEqual(java.math.BigDecimal languagesId) { + registerLanguagesId(ConditionKey.CK_GREATER_EQUAL, languagesId); + } + + /** + * Set the value of languagesId using lessEqual. { <= } + * + * @param languagesId The value of languagesId as lessEqual. + */ + public void setLanguagesId_LessEqual(java.math.BigDecimal languagesId) { + registerLanguagesId(ConditionKey.CK_LESS_EQUAL, languagesId); + } + + /** + * Set the value of languagesId using inScope. { in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param languagesIdList The value of languagesId as inScope. + */ + public void setLanguagesId_InScope(java.util.List languagesIdList) { + registerLanguagesId(ConditionKey.CK_IN_SCOPE, languagesIdList); + } + + /** + * Set the value of languagesId using notInScope. { not in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param languagesIdList The value of languagesId as notInScope. + */ + public void setLanguagesId_NotInScope(java.util.List languagesIdList) { + registerLanguagesId(ConditionKey.CK_NOT_IN_SCOPE, languagesIdList); + } + + /** + * Register condition of languagesId. + * + * @param key Condition key. (NotNull) + * @param value The value of languagesId. (Nullable) + */ + protected void registerLanguagesId(ConditionKey key, Object value) { + registerQuery(key, value, getCValueLanguagesId(), COL_LANGUAGES_ID, J_LanguagesId, UJ_languagesId); + } + + /** + * Register inline condition of languagesId. + * + * @param key Condition key. (NotNull) + * @param value The value of languagesId. (Nullable) + */ + protected void registerInlineLanguagesId(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueLanguagesId(), COL_LANGUAGES_ID, J_LanguagesId, UJ_languagesId); + } + + abstract protected ConditionValue getCValueLanguagesId(); + + /** Column db name of reviewsText. */ + protected static final String COL_REVIEWS_TEXT = "REVIEWS_TEXT"; + + /** Column java name of reviewsText. */ + protected static final String J_ReviewsText = "ReviewsText"; + + /** Column uncapitalised java name of reviewsText. */ + protected static final String UJ_reviewsText = "reviewsText"; + + /** + * Set the value of reviewsText using equal. { = } + * If the value is null or empty-string, this condition is ignored. + * + * @param reviewsText The value of reviewsText as equal. + */ + public void setReviewsText_Equal(String reviewsText) { + registerReviewsText(ConditionKey.CK_EQUAL, filterRemoveEmptyString(reviewsText)); + } + + /** + * Set the value of reviewsText using notEqual. { != } + * If the value is null or empty-string, this condition is ignored. + * + * @param reviewsText The value of reviewsText as notEqual. + */ + public void setReviewsText_NotEqual(String reviewsText) { + registerReviewsText(ConditionKey.CK_NOT_EQUAL, filterRemoveEmptyString(reviewsText)); + } + + /** + * Set the value of reviewsText using greaterThan. { > } + * If the value is null or empty-string, this condition is ignored. + * + * @param reviewsText The value of reviewsText as greaterThan. + */ + public void setReviewsText_GreaterThan(String reviewsText) { + registerReviewsText(ConditionKey.CK_GREATER_THAN, filterRemoveEmptyString(reviewsText)); + } + + /** + * Set the value of reviewsText using lessThan. { < } + * If the value is null or empty-string, this condition is ignored. + * + * @param reviewsText The value of reviewsText as lessThan. + */ + public void setReviewsText_LessThan(String reviewsText) { + registerReviewsText(ConditionKey.CK_LESS_THAN, filterRemoveEmptyString(reviewsText)); + } + + /** + * Set the value of reviewsText using greaterEqual. { >= } + * If the value is null or empty-string, this condition is ignored. + * + * @param reviewsText The value of reviewsText as greaterEqual. + */ + public void setReviewsText_GreaterEqual(String reviewsText) { + registerReviewsText(ConditionKey.CK_GREATER_EQUAL, filterRemoveEmptyString(reviewsText)); + } + + /** + * Set the value of reviewsText using lessEqual. { <= } + * If the value is null or empty-string, this condition is ignored. + * + * @param reviewsText The value of reviewsText as lessEqual. + */ + public void setReviewsText_LessEqual(String reviewsText) { + registerReviewsText(ConditionKey.CK_LESS_EQUAL, filterRemoveEmptyString(reviewsText)); + } + + /** + * Set the value of reviewsText using prefixSearch. { like 'xxx%' } + * If the value is null or empty-string, this condition is ignored. + * + * @param reviewsText The value of reviewsText as prefixSearch. + */ + public void setReviewsText_PrefixSearch(String reviewsText) { + registerReviewsText(ConditionKey.CK_PREFIX_SEARCH, filterRemoveEmptyString(reviewsText)); + } + + /** + * Set the value of reviewsText using likeSearch. { like '%xxx%' } + * If the value is null or empty-string, this condition is ignored. + * You can invoke this method several times and the conditions are set up. + * + * @param reviewsText The value of reviewsText as likeSearch. + * @param likeSearchOption Like search option. (NotNull) + */ + public void setReviewsText_LikeSearch(String reviewsText, jp.sf.pal.pompei.allcommon.cbean.coption.LikeSearchOption likeSearchOption) { + registerLikeSearchQuery(ConditionKey.CK_LIKE_SEARCH, filterRemoveEmptyString(reviewsText), getCValueReviewsText(), COL_REVIEWS_TEXT, J_ReviewsText, UJ_reviewsText, likeSearchOption); + } + + /** + * Set the value of reviewsText using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param reviewsTextList The value of reviewsText as inScope. + */ + public void setReviewsText_InScope(java.util.List reviewsTextList) { + registerReviewsText(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyStringFromList(reviewsTextList)); + } + + /** + * Set the value of reviewsText using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param reviewsText The value of reviewsText as inScope. + */ + public void setReviewsText_InScope(String reviewsText, jp.sf.pal.pompei.allcommon.cbean.coption.InScopeOption option) { + registerInScopeQuery(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyString(reviewsText), getCValueReviewsText(), COL_REVIEWS_TEXT, J_ReviewsText, UJ_reviewsText, option); + } + + /** + * Set the value of reviewsText using notInScope. { not in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param reviewsTextList The value of reviewsText as notInScope. + */ + public void setReviewsText_NotInScope(java.util.List reviewsTextList) { + registerReviewsText(ConditionKey.CK_NOT_IN_SCOPE, filterRemoveEmptyStringFromList(reviewsTextList)); + } + + /** + * Register condition of reviewsText. + * + * @param key Condition key. (NotNull) + * @param value The value of reviewsText. (Nullable) + */ + protected void registerReviewsText(ConditionKey key, Object value) { + registerQuery(key, value, getCValueReviewsText(), COL_REVIEWS_TEXT, J_ReviewsText, UJ_reviewsText); + } + + /** + * Register inline condition of reviewsText. + * + * @param key Condition key. (NotNull) + * @param value The value of reviewsText. (Nullable) + */ + protected void registerInlineReviewsText(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueReviewsText(), COL_REVIEWS_TEXT, J_ReviewsText, UJ_reviewsText); + } + + abstract protected ConditionValue getCValueReviewsText(); + + // =================================================================================== + // Basic Override + // ============== + /** + * This method overrides the method that is declared at super. + * + * @return Clause string. (NotNull) + */ + public String toString() { + return getSqlClause().getClause(); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/AbstractBsSessionsCQ.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/AbstractBsSessionsCQ.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/AbstractBsSessionsCQ.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,457 @@ + +package jp.sf.pal.pompei.cbean.cq.bs; + + + +import jp.sf.pal.pompei.allcommon.cbean.*; +import jp.sf.pal.pompei.allcommon.cbean.ckey.*; +import jp.sf.pal.pompei.allcommon.cbean.cvalue.ConditionValue; +import jp.sf.pal.pompei.allcommon.cbean.sqlclause.SqlClause; +import jp.sf.pal.pompei.cbean.cq.*; + +/** + * The condition-query of SESSIONS. + * + * @author DBFlute(AutoGenerator) + */ +public abstract class AbstractBsSessionsCQ extends AbstractConditionQuery { + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param childQuery Child query as abstract class. (Nullable: If null, this is base instance.) + * @param sqlClause SQL clause instance. (NotNull) + * @param aliasName My alias name. (NotNull) + * @param nestLevel Nest level. + */ + public AbstractBsSessionsCQ(ConditionQuery childQuery, SqlClause sqlClause, String aliasName, int nestLevel) { + super(childQuery, sqlClause, aliasName, nestLevel); + } + + // =================================================================================== + // Table Name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + final public String getTableDbName() { + return "SESSIONS"; + } + + // =================================================================================== + // Query + // ===== + + // /* * * * * * * * * * * * * * * * * * * * * * * + // MyTable = [SESSIONS] + // * * * * * * * * */ + + + /** Column db name of sesskey. */ + protected static final String COL_SESSKEY = "SESSKEY"; + + /** Column java name of sesskey. */ + protected static final String J_Sesskey = "Sesskey"; + + /** Column uncapitalised java name of sesskey. */ + protected static final String UJ_sesskey = "sesskey"; + + /** + * Set the value of sesskey using equal. { = } + * If the value is null or empty-string, this condition is ignored. + * + * @param sesskey The value of sesskey as equal. + */ + public void setSesskey_Equal(String sesskey) { + registerSesskey(ConditionKey.CK_EQUAL, filterRemoveEmptyString(sesskey)); + } + + /** + * Set the value of sesskey using notEqual. { != } + * If the value is null or empty-string, this condition is ignored. + * + * @param sesskey The value of sesskey as notEqual. + */ + public void setSesskey_NotEqual(String sesskey) { + registerSesskey(ConditionKey.CK_NOT_EQUAL, filterRemoveEmptyString(sesskey)); + } + + /** + * Set the value of sesskey using greaterThan. { > } + * If the value is null or empty-string, this condition is ignored. + * + * @param sesskey The value of sesskey as greaterThan. + */ + public void setSesskey_GreaterThan(String sesskey) { + registerSesskey(ConditionKey.CK_GREATER_THAN, filterRemoveEmptyString(sesskey)); + } + + /** + * Set the value of sesskey using lessThan. { < } + * If the value is null or empty-string, this condition is ignored. + * + * @param sesskey The value of sesskey as lessThan. + */ + public void setSesskey_LessThan(String sesskey) { + registerSesskey(ConditionKey.CK_LESS_THAN, filterRemoveEmptyString(sesskey)); + } + + /** + * Set the value of sesskey using greaterEqual. { >= } + * If the value is null or empty-string, this condition is ignored. + * + * @param sesskey The value of sesskey as greaterEqual. + */ + public void setSesskey_GreaterEqual(String sesskey) { + registerSesskey(ConditionKey.CK_GREATER_EQUAL, filterRemoveEmptyString(sesskey)); + } + + /** + * Set the value of sesskey using lessEqual. { <= } + * If the value is null or empty-string, this condition is ignored. + * + * @param sesskey The value of sesskey as lessEqual. + */ + public void setSesskey_LessEqual(String sesskey) { + registerSesskey(ConditionKey.CK_LESS_EQUAL, filterRemoveEmptyString(sesskey)); + } + + /** + * Set the value of sesskey using prefixSearch. { like 'xxx%' } + * If the value is null or empty-string, this condition is ignored. + * + * @param sesskey The value of sesskey as prefixSearch. + */ + public void setSesskey_PrefixSearch(String sesskey) { + registerSesskey(ConditionKey.CK_PREFIX_SEARCH, filterRemoveEmptyString(sesskey)); + } + + /** + * Set the value of sesskey using likeSearch. { like '%xxx%' } + * If the value is null or empty-string, this condition is ignored. + * You can invoke this method several times and the conditions are set up. + * + * @param sesskey The value of sesskey as likeSearch. + * @param likeSearchOption Like search option. (NotNull) + */ + public void setSesskey_LikeSearch(String sesskey, jp.sf.pal.pompei.allcommon.cbean.coption.LikeSearchOption likeSearchOption) { + registerLikeSearchQuery(ConditionKey.CK_LIKE_SEARCH, filterRemoveEmptyString(sesskey), getCValueSesskey(), COL_SESSKEY, J_Sesskey, UJ_sesskey, likeSearchOption); + } + + /** + * Set the value of sesskey using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param sesskeyList The value of sesskey as inScope. + */ + public void setSesskey_InScope(java.util.List sesskeyList) { + registerSesskey(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyStringFromList(sesskeyList)); + } + + /** + * Set the value of sesskey using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param sesskey The value of sesskey as inScope. + */ + public void setSesskey_InScope(String sesskey, jp.sf.pal.pompei.allcommon.cbean.coption.InScopeOption option) { + registerInScopeQuery(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyString(sesskey), getCValueSesskey(), COL_SESSKEY, J_Sesskey, UJ_sesskey, option); + } + + /** + * Set the value of sesskey using notInScope. { not in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param sesskeyList The value of sesskey as notInScope. + */ + public void setSesskey_NotInScope(java.util.List sesskeyList) { + registerSesskey(ConditionKey.CK_NOT_IN_SCOPE, filterRemoveEmptyStringFromList(sesskeyList)); + } + + /** + * Register condition of sesskey. + * + * @param key Condition key. (NotNull) + * @param value The value of sesskey. (Nullable) + */ + protected void registerSesskey(ConditionKey key, Object value) { + registerQuery(key, value, getCValueSesskey(), COL_SESSKEY, J_Sesskey, UJ_sesskey); + } + + /** + * Register inline condition of sesskey. + * + * @param key Condition key. (NotNull) + * @param value The value of sesskey. (Nullable) + */ + protected void registerInlineSesskey(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueSesskey(), COL_SESSKEY, J_Sesskey, UJ_sesskey); + } + + abstract protected ConditionValue getCValueSesskey(); + + /** Column db name of expiry. */ + protected static final String COL_EXPIRY = "EXPIRY"; + + /** Column java name of expiry. */ + protected static final String J_Expiry = "Expiry"; + + /** Column uncapitalised java name of expiry. */ + protected static final String UJ_expiry = "expiry"; + + /** + * Set the value of expiry using equal. { = } + * + * @param expiry The value of expiry as equal. + */ + public void setExpiry_Equal(java.math.BigDecimal expiry) { + registerExpiry(ConditionKey.CK_EQUAL, expiry); + } + + /** + * Set the value of expiry using notEqual. { != } + * + * @param expiry The value of expiry as notEqual. + */ + public void setExpiry_NotEqual(java.math.BigDecimal expiry) { + registerExpiry(ConditionKey.CK_NOT_EQUAL, expiry); + } + + /** + * Set the value of expiry using greaterThan. { > } + * + * @param expiry The value of expiry as greaterThan. + */ + public void setExpiry_GreaterThan(java.math.BigDecimal expiry) { + registerExpiry(ConditionKey.CK_GREATER_THAN, expiry); + } + + /** + * Set the value of expiry using lessThan. { < } + * + * @param expiry The value of expiry as lessThan. + */ + public void setExpiry_LessThan(java.math.BigDecimal expiry) { + registerExpiry(ConditionKey.CK_LESS_THAN, expiry); + } + + /** + * Set the value of expiry using greaterEqual. { >= } + * + * @param expiry The value of expiry as greaterEqual. + */ + public void setExpiry_GreaterEqual(java.math.BigDecimal expiry) { + registerExpiry(ConditionKey.CK_GREATER_EQUAL, expiry); + } + + /** + * Set the value of expiry using lessEqual. { <= } + * + * @param expiry The value of expiry as lessEqual. + */ + public void setExpiry_LessEqual(java.math.BigDecimal expiry) { + registerExpiry(ConditionKey.CK_LESS_EQUAL, expiry); + } + + /** + * Set the value of expiry using inScope. { in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param expiryList The value of expiry as inScope. + */ + public void setExpiry_InScope(java.util.List expiryList) { + registerExpiry(ConditionKey.CK_IN_SCOPE, expiryList); + } + + /** + * Set the value of expiry using notInScope. { not in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param expiryList The value of expiry as notInScope. + */ + public void setExpiry_NotInScope(java.util.List expiryList) { + registerExpiry(ConditionKey.CK_NOT_IN_SCOPE, expiryList); + } + + /** + * Register condition of expiry. + * + * @param key Condition key. (NotNull) + * @param value The value of expiry. (Nullable) + */ + protected void registerExpiry(ConditionKey key, Object value) { + registerQuery(key, value, getCValueExpiry(), COL_EXPIRY, J_Expiry, UJ_expiry); + } + + /** + * Register inline condition of expiry. + * + * @param key Condition key. (NotNull) + * @param value The value of expiry. (Nullable) + */ + protected void registerInlineExpiry(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueExpiry(), COL_EXPIRY, J_Expiry, UJ_expiry); + } + + abstract protected ConditionValue getCValueExpiry(); + + /** Column db name of value. */ + protected static final String COL_VALUE = "VALUE"; + + /** Column java name of value. */ + protected static final String J_Value = "Value"; + + /** Column uncapitalised java name of value. */ + protected static final String UJ_value = "value"; + + /** + * Set the value of value using equal. { = } + * If the value is null or empty-string, this condition is ignored. + * + * @param value The value of value as equal. + */ + public void setValue_Equal(String value) { + registerValue(ConditionKey.CK_EQUAL, filterRemoveEmptyString(value)); + } + + /** + * Set the value of value using notEqual. { != } + * If the value is null or empty-string, this condition is ignored. + * + * @param value The value of value as notEqual. + */ + public void setValue_NotEqual(String value) { + registerValue(ConditionKey.CK_NOT_EQUAL, filterRemoveEmptyString(value)); + } + + /** + * Set the value of value using greaterThan. { > } + * If the value is null or empty-string, this condition is ignored. + * + * @param value The value of value as greaterThan. + */ + public void setValue_GreaterThan(String value) { + registerValue(ConditionKey.CK_GREATER_THAN, filterRemoveEmptyString(value)); + } + + /** + * Set the value of value using lessThan. { < } + * If the value is null or empty-string, this condition is ignored. + * + * @param value The value of value as lessThan. + */ + public void setValue_LessThan(String value) { + registerValue(ConditionKey.CK_LESS_THAN, filterRemoveEmptyString(value)); + } + + /** + * Set the value of value using greaterEqual. { >= } + * If the value is null or empty-string, this condition is ignored. + * + * @param value The value of value as greaterEqual. + */ + public void setValue_GreaterEqual(String value) { + registerValue(ConditionKey.CK_GREATER_EQUAL, filterRemoveEmptyString(value)); + } + + /** + * Set the value of value using lessEqual. { <= } + * If the value is null or empty-string, this condition is ignored. + * + * @param value The value of value as lessEqual. + */ + public void setValue_LessEqual(String value) { + registerValue(ConditionKey.CK_LESS_EQUAL, filterRemoveEmptyString(value)); + } + + /** + * Set the value of value using prefixSearch. { like 'xxx%' } + * If the value is null or empty-string, this condition is ignored. + * + * @param value The value of value as prefixSearch. + */ + public void setValue_PrefixSearch(String value) { + registerValue(ConditionKey.CK_PREFIX_SEARCH, filterRemoveEmptyString(value)); + } + + /** + * Set the value of value using likeSearch. { like '%xxx%' } + * If the value is null or empty-string, this condition is ignored. + * You can invoke this method several times and the conditions are set up. + * + * @param value The value of value as likeSearch. + * @param likeSearchOption Like search option. (NotNull) + */ + public void setValue_LikeSearch(String value, jp.sf.pal.pompei.allcommon.cbean.coption.LikeSearchOption likeSearchOption) { + registerLikeSearchQuery(ConditionKey.CK_LIKE_SEARCH, filterRemoveEmptyString(value), getCValueValue(), COL_VALUE, J_Value, UJ_value, likeSearchOption); + } + + /** + * Set the value of value using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param valueList The value of value as inScope. + */ + public void setValue_InScope(java.util.List valueList) { + registerValue(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyStringFromList(valueList)); + } + + /** + * Set the value of value using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param value The value of value as inScope. + */ + public void setValue_InScope(String value, jp.sf.pal.pompei.allcommon.cbean.coption.InScopeOption option) { + registerInScopeQuery(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyString(value), getCValueValue(), COL_VALUE, J_Value, UJ_value, option); + } + + /** + * Set the value of value using notInScope. { not in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param valueList The value of value as notInScope. + */ + public void setValue_NotInScope(java.util.List valueList) { + registerValue(ConditionKey.CK_NOT_IN_SCOPE, filterRemoveEmptyStringFromList(valueList)); + } + + /** + * Register condition of value. + * + * @param key Condition key. (NotNull) + * @param value The value of value. (Nullable) + */ + protected void registerValue(ConditionKey key, Object value) { + registerQuery(key, value, getCValueValue(), COL_VALUE, J_Value, UJ_value); + } + + /** + * Register inline condition of value. + * + * @param key Condition key. (NotNull) + * @param value The value of value. (Nullable) + */ + protected void registerInlineValue(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueValue(), COL_VALUE, J_Value, UJ_value); + } + + abstract protected ConditionValue getCValueValue(); + + // =================================================================================== + // Basic Override + // ============== + /** + * This method overrides the method that is declared at super. + * + * @return Clause string. (NotNull) + */ + public String toString() { + return getSqlClause().getClause(); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/AbstractBsSpecialsCQ.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/AbstractBsSpecialsCQ.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/AbstractBsSpecialsCQ.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,922 @@ + +package jp.sf.pal.pompei.cbean.cq.bs; + + + +import jp.sf.pal.pompei.allcommon.cbean.*; +import jp.sf.pal.pompei.allcommon.cbean.ckey.*; +import jp.sf.pal.pompei.allcommon.cbean.cvalue.ConditionValue; +import jp.sf.pal.pompei.allcommon.cbean.sqlclause.SqlClause; +import jp.sf.pal.pompei.cbean.cq.*; + +/** + * The condition-query of SPECIALS. + * + * @author DBFlute(AutoGenerator) + */ +public abstract class AbstractBsSpecialsCQ extends AbstractConditionQuery { + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param childQuery Child query as abstract class. (Nullable: If null, this is base instance.) + * @param sqlClause SQL clause instance. (NotNull) + * @param aliasName My alias name. (NotNull) + * @param nestLevel Nest level. + */ + public AbstractBsSpecialsCQ(ConditionQuery childQuery, SqlClause sqlClause, String aliasName, int nestLevel) { + super(childQuery, sqlClause, aliasName, nestLevel); + } + + // =================================================================================== + // Table Name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + final public String getTableDbName() { + return "SPECIALS"; + } + + // =================================================================================== + // Query + // ===== + + // /* * * * * * * * * * * * * * * * * * * * * * * + // MyTable = [SPECIALS] + // * * * * * * * * */ + + + /** Column db name of specialsId. */ + protected static final String COL_SPECIALS_ID = "SPECIALS_ID"; + + /** Column java name of specialsId. */ + protected static final String J_SpecialsId = "SpecialsId"; + + /** Column uncapitalised java name of specialsId. */ + protected static final String UJ_specialsId = "specialsId"; + + /** + * Set the value of specialsId using equal. { = } + * + * @param specialsId The value of specialsId as equal. + */ + public void setSpecialsId_Equal(java.math.BigDecimal specialsId) { + registerSpecialsId(ConditionKey.CK_EQUAL, specialsId); + } + + /** + * Set the value of specialsId using notEqual. { != } + * + * @param specialsId The value of specialsId as notEqual. + */ + public void setSpecialsId_NotEqual(java.math.BigDecimal specialsId) { + registerSpecialsId(ConditionKey.CK_NOT_EQUAL, specialsId); + } + + /** + * Set the value of specialsId using greaterThan. { > } + * + * @param specialsId The value of specialsId as greaterThan. + */ + public void setSpecialsId_GreaterThan(java.math.BigDecimal specialsId) { + registerSpecialsId(ConditionKey.CK_GREATER_THAN, specialsId); + } + + /** + * Set the value of specialsId using lessThan. { < } + * + * @param specialsId The value of specialsId as lessThan. + */ + public void setSpecialsId_LessThan(java.math.BigDecimal specialsId) { + registerSpecialsId(ConditionKey.CK_LESS_THAN, specialsId); + } + + /** + * Set the value of specialsId using greaterEqual. { >= } + * + * @param specialsId The value of specialsId as greaterEqual. + */ + public void setSpecialsId_GreaterEqual(java.math.BigDecimal specialsId) { + registerSpecialsId(ConditionKey.CK_GREATER_EQUAL, specialsId); + } + + /** + * Set the value of specialsId using lessEqual. { <= } + * + * @param specialsId The value of specialsId as lessEqual. + */ + public void setSpecialsId_LessEqual(java.math.BigDecimal specialsId) { + registerSpecialsId(ConditionKey.CK_LESS_EQUAL, specialsId); + } + + /** + * Set the value of specialsId using inScope. { in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param specialsIdList The value of specialsId as inScope. + */ + public void setSpecialsId_InScope(java.util.List specialsIdList) { + registerSpecialsId(ConditionKey.CK_IN_SCOPE, specialsIdList); + } + + /** + * Set the value of specialsId using notInScope. { not in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param specialsIdList The value of specialsId as notInScope. + */ + public void setSpecialsId_NotInScope(java.util.List specialsIdList) { + registerSpecialsId(ConditionKey.CK_NOT_IN_SCOPE, specialsIdList); + } + + /** + * Register condition of specialsId. + * + * @param key Condition key. (NotNull) + * @param value The value of specialsId. (Nullable) + */ + protected void registerSpecialsId(ConditionKey key, Object value) { + registerQuery(key, value, getCValueSpecialsId(), COL_SPECIALS_ID, J_SpecialsId, UJ_specialsId); + } + + /** + * Register inline condition of specialsId. + * + * @param key Condition key. (NotNull) + * @param value The value of specialsId. (Nullable) + */ + protected void registerInlineSpecialsId(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueSpecialsId(), COL_SPECIALS_ID, J_SpecialsId, UJ_specialsId); + } + + abstract protected ConditionValue getCValueSpecialsId(); + + /** Column db name of productsId. */ + protected static final String COL_PRODUCTS_ID = "PRODUCTS_ID"; + + /** Column java name of productsId. */ + protected static final String J_ProductsId = "ProductsId"; + + /** Column uncapitalised java name of productsId. */ + protected static final String UJ_productsId = "productsId"; + + /** + * Set the value of productsId using equal. { = } + * + * @param productsId The value of productsId as equal. + */ + public void setProductsId_Equal(java.math.BigDecimal productsId) { + registerProductsId(ConditionKey.CK_EQUAL, productsId); + } + + /** + * Set the value of productsId using notEqual. { != } + * + * @param productsId The value of productsId as notEqual. + */ + public void setProductsId_NotEqual(java.math.BigDecimal productsId) { + registerProductsId(ConditionKey.CK_NOT_EQUAL, productsId); + } + + /** + * Set the value of productsId using greaterThan. { > } + * + * @param productsId The value of productsId as greaterThan. + */ + public void setProductsId_GreaterThan(java.math.BigDecimal productsId) { + registerProductsId(ConditionKey.CK_GREATER_THAN, productsId); + } + + /** + * Set the value of productsId using lessThan. { < } + * + * @param productsId The value of productsId as lessThan. + */ + public void setProductsId_LessThan(java.math.BigDecimal productsId) { + registerProductsId(ConditionKey.CK_LESS_THAN, productsId); + } + + /** + * Set the value of productsId using greaterEqual. { >= } + * + * @param productsId The value of productsId as greaterEqual. + */ + public void setProductsId_GreaterEqual(java.math.BigDecimal productsId) { + registerProductsId(ConditionKey.CK_GREATER_EQUAL, productsId); + } + + /** + * Set the value of productsId using lessEqual. { <= } + * + * @param productsId The value of productsId as lessEqual. + */ + public void setProductsId_LessEqual(java.math.BigDecimal productsId) { + registerProductsId(ConditionKey.CK_LESS_EQUAL, productsId); + } + + /** + * Set the value of productsId using inScope. { in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param productsIdList The value of productsId as inScope. + */ + public void setProductsId_InScope(java.util.List productsIdList) { + registerProductsId(ConditionKey.CK_IN_SCOPE, productsIdList); + } + + /** + * Set the value of productsId using notInScope. { not in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param productsIdList The value of productsId as notInScope. + */ + public void setProductsId_NotInScope(java.util.List productsIdList) { + registerProductsId(ConditionKey.CK_NOT_IN_SCOPE, productsIdList); + } + + /** + * Register condition of productsId. + * + * @param key Condition key. (NotNull) + * @param value The value of productsId. (Nullable) + */ + protected void registerProductsId(ConditionKey key, Object value) { + registerQuery(key, value, getCValueProductsId(), COL_PRODUCTS_ID, J_ProductsId, UJ_productsId); + } + + /** + * Register inline condition of productsId. + * + * @param key Condition key. (NotNull) + * @param value The value of productsId. (Nullable) + */ + protected void registerInlineProductsId(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueProductsId(), COL_PRODUCTS_ID, J_ProductsId, UJ_productsId); + } + + abstract protected ConditionValue getCValueProductsId(); + + /** Column db name of specialsNewProductsPrice. */ + protected static final String COL_SPECIALS_NEW_PRODUCTS_PRICE = "SPECIALS_NEW_PRODUCTS_PRICE"; + + /** Column java name of specialsNewProductsPrice. */ + protected static final String J_SpecialsNewProductsPrice = "SpecialsNewProductsPrice"; + + /** Column uncapitalised java name of specialsNewProductsPrice. */ + protected static final String UJ_specialsNewProductsPrice = "specialsNewProductsPrice"; + + /** + * Set the value of specialsNewProductsPrice using equal. { = } + * + * @param specialsNewProductsPrice The value of specialsNewProductsPrice as equal. + */ + public void setSpecialsNewProductsPrice_Equal(java.math.BigDecimal specialsNewProductsPrice) { + registerSpecialsNewProductsPrice(ConditionKey.CK_EQUAL, specialsNewProductsPrice); + } + + /** + * Set the value of specialsNewProductsPrice using notEqual. { != } + * + * @param specialsNewProductsPrice The value of specialsNewProductsPrice as notEqual. + */ + public void setSpecialsNewProductsPrice_NotEqual(java.math.BigDecimal specialsNewProductsPrice) { + registerSpecialsNewProductsPrice(ConditionKey.CK_NOT_EQUAL, specialsNewProductsPrice); + } + + /** + * Set the value of specialsNewProductsPrice using greaterThan. { > } + * + * @param specialsNewProductsPrice The value of specialsNewProductsPrice as greaterThan. + */ + public void setSpecialsNewProductsPrice_GreaterThan(java.math.BigDecimal specialsNewProductsPrice) { + registerSpecialsNewProductsPrice(ConditionKey.CK_GREATER_THAN, specialsNewProductsPrice); + } + + /** + * Set the value of specialsNewProductsPrice using lessThan. { < } + * + * @param specialsNewProductsPrice The value of specialsNewProductsPrice as lessThan. + */ + public void setSpecialsNewProductsPrice_LessThan(java.math.BigDecimal specialsNewProductsPrice) { + registerSpecialsNewProductsPrice(ConditionKey.CK_LESS_THAN, specialsNewProductsPrice); + } + + /** + * Set the value of specialsNewProductsPrice using greaterEqual. { >= } + * + * @param specialsNewProductsPrice The value of specialsNewProductsPrice as greaterEqual. + */ + public void setSpecialsNewProductsPrice_GreaterEqual(java.math.BigDecimal specialsNewProductsPrice) { + registerSpecialsNewProductsPrice(ConditionKey.CK_GREATER_EQUAL, specialsNewProductsPrice); + } + + /** + * Set the value of specialsNewProductsPrice using lessEqual. { <= } + * + * @param specialsNewProductsPrice The value of specialsNewProductsPrice as lessEqual. + */ + public void setSpecialsNewProductsPrice_LessEqual(java.math.BigDecimal specialsNewProductsPrice) { + registerSpecialsNewProductsPrice(ConditionKey.CK_LESS_EQUAL, specialsNewProductsPrice); + } + + /** + * Set the value of specialsNewProductsPrice using inScope. { in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param specialsNewProductsPriceList The value of specialsNewProductsPrice as inScope. + */ + public void setSpecialsNewProductsPrice_InScope(java.util.List specialsNewProductsPriceList) { + registerSpecialsNewProductsPrice(ConditionKey.CK_IN_SCOPE, specialsNewProductsPriceList); + } + + /** + * Set the value of specialsNewProductsPrice using notInScope. { not in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param specialsNewProductsPriceList The value of specialsNewProductsPrice as notInScope. + */ + public void setSpecialsNewProductsPrice_NotInScope(java.util.List specialsNewProductsPriceList) { + registerSpecialsNewProductsPrice(ConditionKey.CK_NOT_IN_SCOPE, specialsNewProductsPriceList); + } + + /** + * Register condition of specialsNewProductsPrice. + * + * @param key Condition key. (NotNull) + * @param value The value of specialsNewProductsPrice. (Nullable) + */ + protected void registerSpecialsNewProductsPrice(ConditionKey key, Object value) { + registerQuery(key, value, getCValueSpecialsNewProductsPrice(), COL_SPECIALS_NEW_PRODUCTS_PRICE, J_SpecialsNewProductsPrice, UJ_specialsNewProductsPrice); + } + + /** + * Register inline condition of specialsNewProductsPrice. + * + * @param key Condition key. (NotNull) + * @param value The value of specialsNewProductsPrice. (Nullable) + */ + protected void registerInlineSpecialsNewProductsPrice(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueSpecialsNewProductsPrice(), COL_SPECIALS_NEW_PRODUCTS_PRICE, J_SpecialsNewProductsPrice, UJ_specialsNewProductsPrice); + } + + abstract protected ConditionValue getCValueSpecialsNewProductsPrice(); + + /** Column db name of specialsDateAdded. */ + protected static final String COL_SPECIALS_DATE_ADDED = "SPECIALS_DATE_ADDED"; + + /** Column java name of specialsDateAdded. */ + protected static final String J_SpecialsDateAdded = "SpecialsDateAdded"; + + /** Column uncapitalised java name of specialsDateAdded. */ + protected static final String UJ_specialsDateAdded = "specialsDateAdded"; + + /** + * Set the value of specialsDateAdded using equal. { = } + * + * @param specialsDateAdded The value of specialsDateAdded as equal. + */ + public void setSpecialsDateAdded_Equal(java.sql.Timestamp specialsDateAdded) { + registerSpecialsDateAdded(ConditionKey.CK_EQUAL, specialsDateAdded); + } + + /** + * Set the value of specialsDateAdded using notEqual. { != } + * + * @param specialsDateAdded The value of specialsDateAdded as notEqual. + */ + public void setSpecialsDateAdded_NotEqual(java.sql.Timestamp specialsDateAdded) { + registerSpecialsDateAdded(ConditionKey.CK_NOT_EQUAL, specialsDateAdded); + } + + /** + * Set the value of specialsDateAdded using greaterThan. { > } + * + * @param specialsDateAdded The value of specialsDateAdded as greaterThan. + */ + public void setSpecialsDateAdded_GreaterThan(java.sql.Timestamp specialsDateAdded) { + registerSpecialsDateAdded(ConditionKey.CK_GREATER_THAN, specialsDateAdded); + } + + /** + * Set the value of specialsDateAdded using lessThan. { < } + * + * @param specialsDateAdded The value of specialsDateAdded as lessThan. + */ + public void setSpecialsDateAdded_LessThan(java.sql.Timestamp specialsDateAdded) { + registerSpecialsDateAdded(ConditionKey.CK_LESS_THAN, specialsDateAdded); + } + + /** + * Set the value of specialsDateAdded using greaterEqual. { >= } + * + * @param specialsDateAdded The value of specialsDateAdded as greaterEqual. + */ + public void setSpecialsDateAdded_GreaterEqual(java.sql.Timestamp specialsDateAdded) { + registerSpecialsDateAdded(ConditionKey.CK_GREATER_EQUAL, specialsDateAdded); + } + + /** + * Set the value of specialsDateAdded using lessEqual. { <= } + * + * @param specialsDateAdded The value of specialsDateAdded as lessEqual. + */ + public void setSpecialsDateAdded_LessEqual(java.sql.Timestamp specialsDateAdded) { + registerSpecialsDateAdded(ConditionKey.CK_LESS_EQUAL, specialsDateAdded); + } + + /** + * Set the value of specialsDateAdded using from-to. { $fromDate <= COLUMN_NAME <= $toDate } + * + * @param specialsDateAdded The value of specialsDateAdded as from-to. + * @param fromToOption From-To option. (NotNull) + */ + public void setSpecialsDateAdded_FromTo(java.sql.Timestamp fromDate, java.sql.Timestamp toDate, jp.sf.pal.pompei.allcommon.cbean.coption.FromToOption fromToOption) { + registerFromToQuery(fromDate, toDate, getCValueSpecialsDateAdded(), COL_SPECIALS_DATE_ADDED, J_SpecialsDateAdded, UJ_specialsDateAdded, fromToOption); + } + + /** + * Set the value of specialsDateAdded using isNull. { is null } + */ + public void setSpecialsDateAdded_IsNull() { + registerSpecialsDateAdded(ConditionKey.CK_IS_NULL, DUMMY_OBJECT); + } + + /** + * Set the value of specialsDateAdded using isNotNull. { is not null } + */ + public void setSpecialsDateAdded_IsNotNull() { + registerSpecialsDateAdded(ConditionKey.CK_IS_NOT_NULL, DUMMY_OBJECT); + } + + /** + * Register condition of specialsDateAdded. + * + * @param key Condition key. (NotNull) + * @param value The value of specialsDateAdded. (Nullable) + */ + protected void registerSpecialsDateAdded(ConditionKey key, Object value) { + registerQuery(key, value, getCValueSpecialsDateAdded(), COL_SPECIALS_DATE_ADDED, J_SpecialsDateAdded, UJ_specialsDateAdded); + } + + /** + * Register inline condition of specialsDateAdded. + * + * @param key Condition key. (NotNull) + * @param value The value of specialsDateAdded. (Nullable) + */ + protected void registerInlineSpecialsDateAdded(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueSpecialsDateAdded(), COL_SPECIALS_DATE_ADDED, J_SpecialsDateAdded, UJ_specialsDateAdded); + } + + abstract protected ConditionValue getCValueSpecialsDateAdded(); + + /** Column db name of specialsLastModified. */ + protected static final String COL_SPECIALS_LAST_MODIFIED = "SPECIALS_LAST_MODIFIED"; + + /** Column java name of specialsLastModified. */ + protected static final String J_SpecialsLastModified = "SpecialsLastModified"; + + /** Column uncapitalised java name of specialsLastModified. */ + protected static final String UJ_specialsLastModified = "specialsLastModified"; + + /** + * Set the value of specialsLastModified using equal. { = } + * + * @param specialsLastModified The value of specialsLastModified as equal. + */ + public void setSpecialsLastModified_Equal(java.sql.Timestamp specialsLastModified) { + registerSpecialsLastModified(ConditionKey.CK_EQUAL, specialsLastModified); + } + + /** + * Set the value of specialsLastModified using notEqual. { != } + * + * @param specialsLastModified The value of specialsLastModified as notEqual. + */ + public void setSpecialsLastModified_NotEqual(java.sql.Timestamp specialsLastModified) { + registerSpecialsLastModified(ConditionKey.CK_NOT_EQUAL, specialsLastModified); + } + + /** + * Set the value of specialsLastModified using greaterThan. { > } + * + * @param specialsLastModified The value of specialsLastModified as greaterThan. + */ + public void setSpecialsLastModified_GreaterThan(java.sql.Timestamp specialsLastModified) { + registerSpecialsLastModified(ConditionKey.CK_GREATER_THAN, specialsLastModified); + } + + /** + * Set the value of specialsLastModified using lessThan. { < } + * + * @param specialsLastModified The value of specialsLastModified as lessThan. + */ + public void setSpecialsLastModified_LessThan(java.sql.Timestamp specialsLastModified) { + registerSpecialsLastModified(ConditionKey.CK_LESS_THAN, specialsLastModified); + } + + /** + * Set the value of specialsLastModified using greaterEqual. { >= } + * + * @param specialsLastModified The value of specialsLastModified as greaterEqual. + */ + public void setSpecialsLastModified_GreaterEqual(java.sql.Timestamp specialsLastModified) { + registerSpecialsLastModified(ConditionKey.CK_GREATER_EQUAL, specialsLastModified); + } + + /** + * Set the value of specialsLastModified using lessEqual. { <= } + * + * @param specialsLastModified The value of specialsLastModified as lessEqual. + */ + public void setSpecialsLastModified_LessEqual(java.sql.Timestamp specialsLastModified) { + registerSpecialsLastModified(ConditionKey.CK_LESS_EQUAL, specialsLastModified); + } + + /** + * Set the value of specialsLastModified using from-to. { $fromDate <= COLUMN_NAME <= $toDate } + * + * @param specialsLastModified The value of specialsLastModified as from-to. + * @param fromToOption From-To option. (NotNull) + */ + public void setSpecialsLastModified_FromTo(java.sql.Timestamp fromDate, java.sql.Timestamp toDate, jp.sf.pal.pompei.allcommon.cbean.coption.FromToOption fromToOption) { + registerFromToQuery(fromDate, toDate, getCValueSpecialsLastModified(), COL_SPECIALS_LAST_MODIFIED, J_SpecialsLastModified, UJ_specialsLastModified, fromToOption); + } + + /** + * Set the value of specialsLastModified using isNull. { is null } + */ + public void setSpecialsLastModified_IsNull() { + registerSpecialsLastModified(ConditionKey.CK_IS_NULL, DUMMY_OBJECT); + } + + /** + * Set the value of specialsLastModified using isNotNull. { is not null } + */ + public void setSpecialsLastModified_IsNotNull() { + registerSpecialsLastModified(ConditionKey.CK_IS_NOT_NULL, DUMMY_OBJECT); + } + + /** + * Register condition of specialsLastModified. + * + * @param key Condition key. (NotNull) + * @param value The value of specialsLastModified. (Nullable) + */ + protected void registerSpecialsLastModified(ConditionKey key, Object value) { + registerQuery(key, value, getCValueSpecialsLastModified(), COL_SPECIALS_LAST_MODIFIED, J_SpecialsLastModified, UJ_specialsLastModified); + } + + /** + * Register inline condition of specialsLastModified. + * + * @param key Condition key. (NotNull) + * @param value The value of specialsLastModified. (Nullable) + */ + protected void registerInlineSpecialsLastModified(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueSpecialsLastModified(), COL_SPECIALS_LAST_MODIFIED, J_SpecialsLastModified, UJ_specialsLastModified); + } + + abstract protected ConditionValue getCValueSpecialsLastModified(); + + /** Column db name of expiresDate. */ + protected static final String COL_EXPIRES_DATE = "EXPIRES_DATE"; + + /** Column java name of expiresDate. */ + protected static final String J_ExpiresDate = "ExpiresDate"; + + /** Column uncapitalised java name of expiresDate. */ + protected static final String UJ_expiresDate = "expiresDate"; + + /** + * Set the value of expiresDate using equal. { = } + * + * @param expiresDate The value of expiresDate as equal. + */ + public void setExpiresDate_Equal(java.sql.Timestamp expiresDate) { + registerExpiresDate(ConditionKey.CK_EQUAL, expiresDate); + } + + /** + * Set the value of expiresDate using notEqual. { != } + * + * @param expiresDate The value of expiresDate as notEqual. + */ + public void setExpiresDate_NotEqual(java.sql.Timestamp expiresDate) { + registerExpiresDate(ConditionKey.CK_NOT_EQUAL, expiresDate); + } + + /** + * Set the value of expiresDate using greaterThan. { > } + * + * @param expiresDate The value of expiresDate as greaterThan. + */ + public void setExpiresDate_GreaterThan(java.sql.Timestamp expiresDate) { + registerExpiresDate(ConditionKey.CK_GREATER_THAN, expiresDate); + } + + /** + * Set the value of expiresDate using lessThan. { < } + * + * @param expiresDate The value of expiresDate as lessThan. + */ + public void setExpiresDate_LessThan(java.sql.Timestamp expiresDate) { + registerExpiresDate(ConditionKey.CK_LESS_THAN, expiresDate); + } + + /** + * Set the value of expiresDate using greaterEqual. { >= } + * + * @param expiresDate The value of expiresDate as greaterEqual. + */ + public void setExpiresDate_GreaterEqual(java.sql.Timestamp expiresDate) { + registerExpiresDate(ConditionKey.CK_GREATER_EQUAL, expiresDate); + } + + /** + * Set the value of expiresDate using lessEqual. { <= } + * + * @param expiresDate The value of expiresDate as lessEqual. + */ + public void setExpiresDate_LessEqual(java.sql.Timestamp expiresDate) { + registerExpiresDate(ConditionKey.CK_LESS_EQUAL, expiresDate); + } + + /** + * Set the value of expiresDate using from-to. { $fromDate <= COLUMN_NAME <= $toDate } + * + * @param expiresDate The value of expiresDate as from-to. + * @param fromToOption From-To option. (NotNull) + */ + public void setExpiresDate_FromTo(java.sql.Timestamp fromDate, java.sql.Timestamp toDate, jp.sf.pal.pompei.allcommon.cbean.coption.FromToOption fromToOption) { + registerFromToQuery(fromDate, toDate, getCValueExpiresDate(), COL_EXPIRES_DATE, J_ExpiresDate, UJ_expiresDate, fromToOption); + } + + /** + * Set the value of expiresDate using isNull. { is null } + */ + public void setExpiresDate_IsNull() { + registerExpiresDate(ConditionKey.CK_IS_NULL, DUMMY_OBJECT); + } + + /** + * Set the value of expiresDate using isNotNull. { is not null } + */ + public void setExpiresDate_IsNotNull() { + registerExpiresDate(ConditionKey.CK_IS_NOT_NULL, DUMMY_OBJECT); + } + + /** + * Register condition of expiresDate. + * + * @param key Condition key. (NotNull) + * @param value The value of expiresDate. (Nullable) + */ + protected void registerExpiresDate(ConditionKey key, Object value) { + registerQuery(key, value, getCValueExpiresDate(), COL_EXPIRES_DATE, J_ExpiresDate, UJ_expiresDate); + } + + /** + * Register inline condition of expiresDate. + * + * @param key Condition key. (NotNull) + * @param value The value of expiresDate. (Nullable) + */ + protected void registerInlineExpiresDate(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueExpiresDate(), COL_EXPIRES_DATE, J_ExpiresDate, UJ_expiresDate); + } + + abstract protected ConditionValue getCValueExpiresDate(); + + /** Column db name of dateStatusChange. */ + protected static final String COL_DATE_STATUS_CHANGE = "DATE_STATUS_CHANGE"; + + /** Column java name of dateStatusChange. */ + protected static final String J_DateStatusChange = "DateStatusChange"; + + /** Column uncapitalised java name of dateStatusChange. */ + protected static final String UJ_dateStatusChange = "dateStatusChange"; + + /** + * Set the value of dateStatusChange using equal. { = } + * + * @param dateStatusChange The value of dateStatusChange as equal. + */ + public void setDateStatusChange_Equal(java.sql.Timestamp dateStatusChange) { + registerDateStatusChange(ConditionKey.CK_EQUAL, dateStatusChange); + } + + /** + * Set the value of dateStatusChange using notEqual. { != } + * + * @param dateStatusChange The value of dateStatusChange as notEqual. + */ + public void setDateStatusChange_NotEqual(java.sql.Timestamp dateStatusChange) { + registerDateStatusChange(ConditionKey.CK_NOT_EQUAL, dateStatusChange); + } + + /** + * Set the value of dateStatusChange using greaterThan. { > } + * + * @param dateStatusChange The value of dateStatusChange as greaterThan. + */ + public void setDateStatusChange_GreaterThan(java.sql.Timestamp dateStatusChange) { + registerDateStatusChange(ConditionKey.CK_GREATER_THAN, dateStatusChange); + } + + /** + * Set the value of dateStatusChange using lessThan. { < } + * + * @param dateStatusChange The value of dateStatusChange as lessThan. + */ + public void setDateStatusChange_LessThan(java.sql.Timestamp dateStatusChange) { + registerDateStatusChange(ConditionKey.CK_LESS_THAN, dateStatusChange); + } + + /** + * Set the value of dateStatusChange using greaterEqual. { >= } + * + * @param dateStatusChange The value of dateStatusChange as greaterEqual. + */ + public void setDateStatusChange_GreaterEqual(java.sql.Timestamp dateStatusChange) { + registerDateStatusChange(ConditionKey.CK_GREATER_EQUAL, dateStatusChange); + } + + /** + * Set the value of dateStatusChange using lessEqual. { <= } + * + * @param dateStatusChange The value of dateStatusChange as lessEqual. + */ + public void setDateStatusChange_LessEqual(java.sql.Timestamp dateStatusChange) { + registerDateStatusChange(ConditionKey.CK_LESS_EQUAL, dateStatusChange); + } + + /** + * Set the value of dateStatusChange using from-to. { $fromDate <= COLUMN_NAME <= $toDate } + * + * @param dateStatusChange The value of dateStatusChange as from-to. + * @param fromToOption From-To option. (NotNull) + */ + public void setDateStatusChange_FromTo(java.sql.Timestamp fromDate, java.sql.Timestamp toDate, jp.sf.pal.pompei.allcommon.cbean.coption.FromToOption fromToOption) { + registerFromToQuery(fromDate, toDate, getCValueDateStatusChange(), COL_DATE_STATUS_CHANGE, J_DateStatusChange, UJ_dateStatusChange, fromToOption); + } + + /** + * Set the value of dateStatusChange using isNull. { is null } + */ + public void setDateStatusChange_IsNull() { + registerDateStatusChange(ConditionKey.CK_IS_NULL, DUMMY_OBJECT); + } + + /** + * Set the value of dateStatusChange using isNotNull. { is not null } + */ + public void setDateStatusChange_IsNotNull() { + registerDateStatusChange(ConditionKey.CK_IS_NOT_NULL, DUMMY_OBJECT); + } + + /** + * Register condition of dateStatusChange. + * + * @param key Condition key. (NotNull) + * @param value The value of dateStatusChange. (Nullable) + */ + protected void registerDateStatusChange(ConditionKey key, Object value) { + registerQuery(key, value, getCValueDateStatusChange(), COL_DATE_STATUS_CHANGE, J_DateStatusChange, UJ_dateStatusChange); + } + + /** + * Register inline condition of dateStatusChange. + * + * @param key Condition key. (NotNull) + * @param value The value of dateStatusChange. (Nullable) + */ + protected void registerInlineDateStatusChange(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueDateStatusChange(), COL_DATE_STATUS_CHANGE, J_DateStatusChange, UJ_dateStatusChange); + } + + abstract protected ConditionValue getCValueDateStatusChange(); + + /** Column db name of status. */ + protected static final String COL_STATUS = "STATUS"; + + /** Column java name of status. */ + protected static final String J_Status = "Status"; + + /** Column uncapitalised java name of status. */ + protected static final String UJ_status = "status"; + + /** + * Set the value of status using equal. { = } + * + * @param status The value of status as equal. + */ + public void setStatus_Equal(java.math.BigDecimal status) { + registerStatus(ConditionKey.CK_EQUAL, status); + } + + /** + * Set the value of status using notEqual. { != } + * + * @param status The value of status as notEqual. + */ + public void setStatus_NotEqual(java.math.BigDecimal status) { + registerStatus(ConditionKey.CK_NOT_EQUAL, status); + } + + /** + * Set the value of status using greaterThan. { > } + * + * @param status The value of status as greaterThan. + */ + public void setStatus_GreaterThan(java.math.BigDecimal status) { + registerStatus(ConditionKey.CK_GREATER_THAN, status); + } + + /** + * Set the value of status using lessThan. { < } + * + * @param status The value of status as lessThan. + */ + public void setStatus_LessThan(java.math.BigDecimal status) { + registerStatus(ConditionKey.CK_LESS_THAN, status); + } + + /** + * Set the value of status using greaterEqual. { >= } + * + * @param status The value of status as greaterEqual. + */ + public void setStatus_GreaterEqual(java.math.BigDecimal status) { + registerStatus(ConditionKey.CK_GREATER_EQUAL, status); + } + + /** + * Set the value of status using lessEqual. { <= } + * + * @param status The value of status as lessEqual. + */ + public void setStatus_LessEqual(java.math.BigDecimal status) { + registerStatus(ConditionKey.CK_LESS_EQUAL, status); + } + + /** + * Set the value of status using inScope. { in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param statusList The value of status as inScope. + */ + public void setStatus_InScope(java.util.List statusList) { + registerStatus(ConditionKey.CK_IN_SCOPE, statusList); + } + + /** + * Set the value of status using notInScope. { not in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param statusList The value of status as notInScope. + */ + public void setStatus_NotInScope(java.util.List statusList) { + registerStatus(ConditionKey.CK_NOT_IN_SCOPE, statusList); + } + + /** + * Register condition of status. + * + * @param key Condition key. (NotNull) + * @param value The value of status. (Nullable) + */ + protected void registerStatus(ConditionKey key, Object value) { + registerQuery(key, value, getCValueStatus(), COL_STATUS, J_Status, UJ_status); + } + + /** + * Register inline condition of status. + * + * @param key Condition key. (NotNull) + * @param value The value of status. (Nullable) + */ + protected void registerInlineStatus(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueStatus(), COL_STATUS, J_Status, UJ_status); + } + + abstract protected ConditionValue getCValueStatus(); + + // =================================================================================== + // Basic Override + // ============== + /** + * This method overrides the method that is declared at super. + * + * @return Clause string. (NotNull) + */ + public String toString() { + return getSqlClause().getClause(); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/AbstractBsTaxClassCQ.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/AbstractBsTaxClassCQ.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/AbstractBsTaxClassCQ.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,661 @@ + +package jp.sf.pal.pompei.cbean.cq.bs; + + + +import jp.sf.pal.pompei.allcommon.cbean.*; +import jp.sf.pal.pompei.allcommon.cbean.ckey.*; +import jp.sf.pal.pompei.allcommon.cbean.cvalue.ConditionValue; +import jp.sf.pal.pompei.allcommon.cbean.sqlclause.SqlClause; +import jp.sf.pal.pompei.cbean.cq.*; + +/** + * The condition-query of TAX_CLASS. + * + * @author DBFlute(AutoGenerator) + */ +public abstract class AbstractBsTaxClassCQ extends AbstractConditionQuery { + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param childQuery Child query as abstract class. (Nullable: If null, this is base instance.) + * @param sqlClause SQL clause instance. (NotNull) + * @param aliasName My alias name. (NotNull) + * @param nestLevel Nest level. + */ + public AbstractBsTaxClassCQ(ConditionQuery childQuery, SqlClause sqlClause, String aliasName, int nestLevel) { + super(childQuery, sqlClause, aliasName, nestLevel); + } + + // =================================================================================== + // Table Name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + final public String getTableDbName() { + return "TAX_CLASS"; + } + + // =================================================================================== + // Query + // ===== + + // /* * * * * * * * * * * * * * * * * * * * * * * + // MyTable = [TAX_CLASS] + // * * * * * * * * */ + + + /** Column db name of taxClassId. */ + protected static final String COL_TAX_CLASS_ID = "TAX_CLASS_ID"; + + /** Column java name of taxClassId. */ + protected static final String J_TaxClassId = "TaxClassId"; + + /** Column uncapitalised java name of taxClassId. */ + protected static final String UJ_taxClassId = "taxClassId"; + + /** + * Set the value of taxClassId using equal. { = } + * + * @param taxClassId The value of taxClassId as equal. + */ + public void setTaxClassId_Equal(java.math.BigDecimal taxClassId) { + registerTaxClassId(ConditionKey.CK_EQUAL, taxClassId); + } + + /** + * Set the value of taxClassId using notEqual. { != } + * + * @param taxClassId The value of taxClassId as notEqual. + */ + public void setTaxClassId_NotEqual(java.math.BigDecimal taxClassId) { + registerTaxClassId(ConditionKey.CK_NOT_EQUAL, taxClassId); + } + + /** + * Set the value of taxClassId using greaterThan. { > } + * + * @param taxClassId The value of taxClassId as greaterThan. + */ + public void setTaxClassId_GreaterThan(java.math.BigDecimal taxClassId) { + registerTaxClassId(ConditionKey.CK_GREATER_THAN, taxClassId); + } + + /** + * Set the value of taxClassId using lessThan. { < } + * + * @param taxClassId The value of taxClassId as lessThan. + */ + public void setTaxClassId_LessThan(java.math.BigDecimal taxClassId) { + registerTaxClassId(ConditionKey.CK_LESS_THAN, taxClassId); + } + + /** + * Set the value of taxClassId using greaterEqual. { >= } + * + * @param taxClassId The value of taxClassId as greaterEqual. + */ + public void setTaxClassId_GreaterEqual(java.math.BigDecimal taxClassId) { + registerTaxClassId(ConditionKey.CK_GREATER_EQUAL, taxClassId); + } + + /** + * Set the value of taxClassId using lessEqual. { <= } + * + * @param taxClassId The value of taxClassId as lessEqual. + */ + public void setTaxClassId_LessEqual(java.math.BigDecimal taxClassId) { + registerTaxClassId(ConditionKey.CK_LESS_EQUAL, taxClassId); + } + + /** + * Set the value of taxClassId using inScope. { in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param taxClassIdList The value of taxClassId as inScope. + */ + public void setTaxClassId_InScope(java.util.List taxClassIdList) { + registerTaxClassId(ConditionKey.CK_IN_SCOPE, taxClassIdList); + } + + /** + * Set the value of taxClassId using notInScope. { not in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param taxClassIdList The value of taxClassId as notInScope. + */ + public void setTaxClassId_NotInScope(java.util.List taxClassIdList) { + registerTaxClassId(ConditionKey.CK_NOT_IN_SCOPE, taxClassIdList); + } + + /** + * Register condition of taxClassId. + * + * @param key Condition key. (NotNull) + * @param value The value of taxClassId. (Nullable) + */ + protected void registerTaxClassId(ConditionKey key, Object value) { + registerQuery(key, value, getCValueTaxClassId(), COL_TAX_CLASS_ID, J_TaxClassId, UJ_taxClassId); + } + + /** + * Register inline condition of taxClassId. + * + * @param key Condition key. (NotNull) + * @param value The value of taxClassId. (Nullable) + */ + protected void registerInlineTaxClassId(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueTaxClassId(), COL_TAX_CLASS_ID, J_TaxClassId, UJ_taxClassId); + } + + abstract protected ConditionValue getCValueTaxClassId(); + + /** Column db name of taxClassTitle. */ + protected static final String COL_TAX_CLASS_TITLE = "TAX_CLASS_TITLE"; + + /** Column java name of taxClassTitle. */ + protected static final String J_TaxClassTitle = "TaxClassTitle"; + + /** Column uncapitalised java name of taxClassTitle. */ + protected static final String UJ_taxClassTitle = "taxClassTitle"; + + /** + * Set the value of taxClassTitle using equal. { = } + * If the value is null or empty-string, this condition is ignored. + * + * @param taxClassTitle The value of taxClassTitle as equal. + */ + public void setTaxClassTitle_Equal(String taxClassTitle) { + registerTaxClassTitle(ConditionKey.CK_EQUAL, filterRemoveEmptyString(taxClassTitle)); + } + + /** + * Set the value of taxClassTitle using notEqual. { != } + * If the value is null or empty-string, this condition is ignored. + * + * @param taxClassTitle The value of taxClassTitle as notEqual. + */ + public void setTaxClassTitle_NotEqual(String taxClassTitle) { + registerTaxClassTitle(ConditionKey.CK_NOT_EQUAL, filterRemoveEmptyString(taxClassTitle)); + } + + /** + * Set the value of taxClassTitle using greaterThan. { > } + * If the value is null or empty-string, this condition is ignored. + * + * @param taxClassTitle The value of taxClassTitle as greaterThan. + */ + public void setTaxClassTitle_GreaterThan(String taxClassTitle) { + registerTaxClassTitle(ConditionKey.CK_GREATER_THAN, filterRemoveEmptyString(taxClassTitle)); + } + + /** + * Set the value of taxClassTitle using lessThan. { < } + * If the value is null or empty-string, this condition is ignored. + * + * @param taxClassTitle The value of taxClassTitle as lessThan. + */ + public void setTaxClassTitle_LessThan(String taxClassTitle) { + registerTaxClassTitle(ConditionKey.CK_LESS_THAN, filterRemoveEmptyString(taxClassTitle)); + } + + /** + * Set the value of taxClassTitle using greaterEqual. { >= } + * If the value is null or empty-string, this condition is ignored. + * + * @param taxClassTitle The value of taxClassTitle as greaterEqual. + */ + public void setTaxClassTitle_GreaterEqual(String taxClassTitle) { + registerTaxClassTitle(ConditionKey.CK_GREATER_EQUAL, filterRemoveEmptyString(taxClassTitle)); + } + + /** + * Set the value of taxClassTitle using lessEqual. { <= } + * If the value is null or empty-string, this condition is ignored. + * + * @param taxClassTitle The value of taxClassTitle as lessEqual. + */ + public void setTaxClassTitle_LessEqual(String taxClassTitle) { + registerTaxClassTitle(ConditionKey.CK_LESS_EQUAL, filterRemoveEmptyString(taxClassTitle)); + } + + /** + * Set the value of taxClassTitle using prefixSearch. { like 'xxx%' } + * If the value is null or empty-string, this condition is ignored. + * + * @param taxClassTitle The value of taxClassTitle as prefixSearch. + */ + public void setTaxClassTitle_PrefixSearch(String taxClassTitle) { + registerTaxClassTitle(ConditionKey.CK_PREFIX_SEARCH, filterRemoveEmptyString(taxClassTitle)); + } + + /** + * Set the value of taxClassTitle using likeSearch. { like '%xxx%' } + * If the value is null or empty-string, this condition is ignored. + * You can invoke this method several times and the conditions are set up. + * + * @param taxClassTitle The value of taxClassTitle as likeSearch. + * @param likeSearchOption Like search option. (NotNull) + */ + public void setTaxClassTitle_LikeSearch(String taxClassTitle, jp.sf.pal.pompei.allcommon.cbean.coption.LikeSearchOption likeSearchOption) { + registerLikeSearchQuery(ConditionKey.CK_LIKE_SEARCH, filterRemoveEmptyString(taxClassTitle), getCValueTaxClassTitle(), COL_TAX_CLASS_TITLE, J_TaxClassTitle, UJ_taxClassTitle, likeSearchOption); + } + + /** + * Set the value of taxClassTitle using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param taxClassTitleList The value of taxClassTitle as inScope. + */ + public void setTaxClassTitle_InScope(java.util.List taxClassTitleList) { + registerTaxClassTitle(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyStringFromList(taxClassTitleList)); + } + + /** + * Set the value of taxClassTitle using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param taxClassTitle The value of taxClassTitle as inScope. + */ + public void setTaxClassTitle_InScope(String taxClassTitle, jp.sf.pal.pompei.allcommon.cbean.coption.InScopeOption option) { + registerInScopeQuery(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyString(taxClassTitle), getCValueTaxClassTitle(), COL_TAX_CLASS_TITLE, J_TaxClassTitle, UJ_taxClassTitle, option); + } + + /** + * Set the value of taxClassTitle using notInScope. { not in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param taxClassTitleList The value of taxClassTitle as notInScope. + */ + public void setTaxClassTitle_NotInScope(java.util.List taxClassTitleList) { + registerTaxClassTitle(ConditionKey.CK_NOT_IN_SCOPE, filterRemoveEmptyStringFromList(taxClassTitleList)); + } + + /** + * Register condition of taxClassTitle. + * + * @param key Condition key. (NotNull) + * @param value The value of taxClassTitle. (Nullable) + */ + protected void registerTaxClassTitle(ConditionKey key, Object value) { + registerQuery(key, value, getCValueTaxClassTitle(), COL_TAX_CLASS_TITLE, J_TaxClassTitle, UJ_taxClassTitle); + } + + /** + * Register inline condition of taxClassTitle. + * + * @param key Condition key. (NotNull) + * @param value The value of taxClassTitle. (Nullable) + */ + protected void registerInlineTaxClassTitle(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueTaxClassTitle(), COL_TAX_CLASS_TITLE, J_TaxClassTitle, UJ_taxClassTitle); + } + + abstract protected ConditionValue getCValueTaxClassTitle(); + + /** Column db name of taxClassDescription. */ + protected static final String COL_TAX_CLASS_DESCRIPTION = "TAX_CLASS_DESCRIPTION"; + + /** Column java name of taxClassDescription. */ + protected static final String J_TaxClassDescription = "TaxClassDescription"; + + /** Column uncapitalised java name of taxClassDescription. */ + protected static final String UJ_taxClassDescription = "taxClassDescription"; + + /** + * Set the value of taxClassDescription using equal. { = } + * If the value is null or empty-string, this condition is ignored. + * + * @param taxClassDescription The value of taxClassDescription as equal. + */ + public void setTaxClassDescription_Equal(String taxClassDescription) { + registerTaxClassDescription(ConditionKey.CK_EQUAL, filterRemoveEmptyString(taxClassDescription)); + } + + /** + * Set the value of taxClassDescription using notEqual. { != } + * If the value is null or empty-string, this condition is ignored. + * + * @param taxClassDescription The value of taxClassDescription as notEqual. + */ + public void setTaxClassDescription_NotEqual(String taxClassDescription) { + registerTaxClassDescription(ConditionKey.CK_NOT_EQUAL, filterRemoveEmptyString(taxClassDescription)); + } + + /** + * Set the value of taxClassDescription using greaterThan. { > } + * If the value is null or empty-string, this condition is ignored. + * + * @param taxClassDescription The value of taxClassDescription as greaterThan. + */ + public void setTaxClassDescription_GreaterThan(String taxClassDescription) { + registerTaxClassDescription(ConditionKey.CK_GREATER_THAN, filterRemoveEmptyString(taxClassDescription)); + } + + /** + * Set the value of taxClassDescription using lessThan. { < } + * If the value is null or empty-string, this condition is ignored. + * + * @param taxClassDescription The value of taxClassDescription as lessThan. + */ + public void setTaxClassDescription_LessThan(String taxClassDescription) { + registerTaxClassDescription(ConditionKey.CK_LESS_THAN, filterRemoveEmptyString(taxClassDescription)); + } + + /** + * Set the value of taxClassDescription using greaterEqual. { >= } + * If the value is null or empty-string, this condition is ignored. + * + * @param taxClassDescription The value of taxClassDescription as greaterEqual. + */ + public void setTaxClassDescription_GreaterEqual(String taxClassDescription) { + registerTaxClassDescription(ConditionKey.CK_GREATER_EQUAL, filterRemoveEmptyString(taxClassDescription)); + } + + /** + * Set the value of taxClassDescription using lessEqual. { <= } + * If the value is null or empty-string, this condition is ignored. + * + * @param taxClassDescription The value of taxClassDescription as lessEqual. + */ + public void setTaxClassDescription_LessEqual(String taxClassDescription) { + registerTaxClassDescription(ConditionKey.CK_LESS_EQUAL, filterRemoveEmptyString(taxClassDescription)); + } + + /** + * Set the value of taxClassDescription using prefixSearch. { like 'xxx%' } + * If the value is null or empty-string, this condition is ignored. + * + * @param taxClassDescription The value of taxClassDescription as prefixSearch. + */ + public void setTaxClassDescription_PrefixSearch(String taxClassDescription) { + registerTaxClassDescription(ConditionKey.CK_PREFIX_SEARCH, filterRemoveEmptyString(taxClassDescription)); + } + + /** + * Set the value of taxClassDescription using likeSearch. { like '%xxx%' } + * If the value is null or empty-string, this condition is ignored. + * You can invoke this method several times and the conditions are set up. + * + * @param taxClassDescription The value of taxClassDescription as likeSearch. + * @param likeSearchOption Like search option. (NotNull) + */ + public void setTaxClassDescription_LikeSearch(String taxClassDescription, jp.sf.pal.pompei.allcommon.cbean.coption.LikeSearchOption likeSearchOption) { + registerLikeSearchQuery(ConditionKey.CK_LIKE_SEARCH, filterRemoveEmptyString(taxClassDescription), getCValueTaxClassDescription(), COL_TAX_CLASS_DESCRIPTION, J_TaxClassDescription, UJ_taxClassDescription, likeSearchOption); + } + + /** + * Set the value of taxClassDescription using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param taxClassDescriptionList The value of taxClassDescription as inScope. + */ + public void setTaxClassDescription_InScope(java.util.List taxClassDescriptionList) { + registerTaxClassDescription(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyStringFromList(taxClassDescriptionList)); + } + + /** + * Set the value of taxClassDescription using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param taxClassDescription The value of taxClassDescription as inScope. + */ + public void setTaxClassDescription_InScope(String taxClassDescription, jp.sf.pal.pompei.allcommon.cbean.coption.InScopeOption option) { + registerInScopeQuery(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyString(taxClassDescription), getCValueTaxClassDescription(), COL_TAX_CLASS_DESCRIPTION, J_TaxClassDescription, UJ_taxClassDescription, option); + } + + /** + * Set the value of taxClassDescription using notInScope. { not in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param taxClassDescriptionList The value of taxClassDescription as notInScope. + */ + public void setTaxClassDescription_NotInScope(java.util.List taxClassDescriptionList) { + registerTaxClassDescription(ConditionKey.CK_NOT_IN_SCOPE, filterRemoveEmptyStringFromList(taxClassDescriptionList)); + } + + /** + * Register condition of taxClassDescription. + * + * @param key Condition key. (NotNull) + * @param value The value of taxClassDescription. (Nullable) + */ + protected void registerTaxClassDescription(ConditionKey key, Object value) { + registerQuery(key, value, getCValueTaxClassDescription(), COL_TAX_CLASS_DESCRIPTION, J_TaxClassDescription, UJ_taxClassDescription); + } + + /** + * Register inline condition of taxClassDescription. + * + * @param key Condition key. (NotNull) + * @param value The value of taxClassDescription. (Nullable) + */ + protected void registerInlineTaxClassDescription(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueTaxClassDescription(), COL_TAX_CLASS_DESCRIPTION, J_TaxClassDescription, UJ_taxClassDescription); + } + + abstract protected ConditionValue getCValueTaxClassDescription(); + + /** Column db name of lastModified. */ + protected static final String COL_LAST_MODIFIED = "LAST_MODIFIED"; + + /** Column java name of lastModified. */ + protected static final String J_LastModified = "LastModified"; + + /** Column uncapitalised java name of lastModified. */ + protected static final String UJ_lastModified = "lastModified"; + + /** + * Set the value of lastModified using equal. { = } + * + * @param lastModified The value of lastModified as equal. + */ + public void setLastModified_Equal(java.sql.Timestamp lastModified) { + registerLastModified(ConditionKey.CK_EQUAL, lastModified); + } + + /** + * Set the value of lastModified using notEqual. { != } + * + * @param lastModified The value of lastModified as notEqual. + */ + public void setLastModified_NotEqual(java.sql.Timestamp lastModified) { + registerLastModified(ConditionKey.CK_NOT_EQUAL, lastModified); + } + + /** + * Set the value of lastModified using greaterThan. { > } + * + * @param lastModified The value of lastModified as greaterThan. + */ + public void setLastModified_GreaterThan(java.sql.Timestamp lastModified) { + registerLastModified(ConditionKey.CK_GREATER_THAN, lastModified); + } + + /** + * Set the value of lastModified using lessThan. { < } + * + * @param lastModified The value of lastModified as lessThan. + */ + public void setLastModified_LessThan(java.sql.Timestamp lastModified) { + registerLastModified(ConditionKey.CK_LESS_THAN, lastModified); + } + + /** + * Set the value of lastModified using greaterEqual. { >= } + * + * @param lastModified The value of lastModified as greaterEqual. + */ + public void setLastModified_GreaterEqual(java.sql.Timestamp lastModified) { + registerLastModified(ConditionKey.CK_GREATER_EQUAL, lastModified); + } + + /** + * Set the value of lastModified using lessEqual. { <= } + * + * @param lastModified The value of lastModified as lessEqual. + */ + public void setLastModified_LessEqual(java.sql.Timestamp lastModified) { + registerLastModified(ConditionKey.CK_LESS_EQUAL, lastModified); + } + + /** + * Set the value of lastModified using from-to. { $fromDate <= COLUMN_NAME <= $toDate } + * + * @param lastModified The value of lastModified as from-to. + * @param fromToOption From-To option. (NotNull) + */ + public void setLastModified_FromTo(java.sql.Timestamp fromDate, java.sql.Timestamp toDate, jp.sf.pal.pompei.allcommon.cbean.coption.FromToOption fromToOption) { + registerFromToQuery(fromDate, toDate, getCValueLastModified(), COL_LAST_MODIFIED, J_LastModified, UJ_lastModified, fromToOption); + } + + /** + * Set the value of lastModified using isNull. { is null } + */ + public void setLastModified_IsNull() { + registerLastModified(ConditionKey.CK_IS_NULL, DUMMY_OBJECT); + } + + /** + * Set the value of lastModified using isNotNull. { is not null } + */ + public void setLastModified_IsNotNull() { + registerLastModified(ConditionKey.CK_IS_NOT_NULL, DUMMY_OBJECT); + } + + /** + * Register condition of lastModified. + * + * @param key Condition key. (NotNull) + * @param value The value of lastModified. (Nullable) + */ + protected void registerLastModified(ConditionKey key, Object value) { + registerQuery(key, value, getCValueLastModified(), COL_LAST_MODIFIED, J_LastModified, UJ_lastModified); + } + + /** + * Register inline condition of lastModified. + * + * @param key Condition key. (NotNull) + * @param value The value of lastModified. (Nullable) + */ + protected void registerInlineLastModified(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueLastModified(), COL_LAST_MODIFIED, J_LastModified, UJ_lastModified); + } + + abstract protected ConditionValue getCValueLastModified(); + + /** Column db name of dateAdded. */ + protected static final String COL_DATE_ADDED = "DATE_ADDED"; + + /** Column java name of dateAdded. */ + protected static final String J_DateAdded = "DateAdded"; + + /** Column uncapitalised java name of dateAdded. */ + protected static final String UJ_dateAdded = "dateAdded"; + + /** + * Set the value of dateAdded using equal. { = } + * + * @param dateAdded The value of dateAdded as equal. + */ + public void setDateAdded_Equal(java.sql.Timestamp dateAdded) { + registerDateAdded(ConditionKey.CK_EQUAL, dateAdded); + } + + /** + * Set the value of dateAdded using notEqual. { != } + * + * @param dateAdded The value of dateAdded as notEqual. + */ + public void setDateAdded_NotEqual(java.sql.Timestamp dateAdded) { + registerDateAdded(ConditionKey.CK_NOT_EQUAL, dateAdded); + } + + /** + * Set the value of dateAdded using greaterThan. { > } + * + * @param dateAdded The value of dateAdded as greaterThan. + */ + public void setDateAdded_GreaterThan(java.sql.Timestamp dateAdded) { + registerDateAdded(ConditionKey.CK_GREATER_THAN, dateAdded); + } + + /** + * Set the value of dateAdded using lessThan. { < } + * + * @param dateAdded The value of dateAdded as lessThan. + */ + public void setDateAdded_LessThan(java.sql.Timestamp dateAdded) { + registerDateAdded(ConditionKey.CK_LESS_THAN, dateAdded); + } + + /** + * Set the value of dateAdded using greaterEqual. { >= } + * + * @param dateAdded The value of dateAdded as greaterEqual. + */ + public void setDateAdded_GreaterEqual(java.sql.Timestamp dateAdded) { + registerDateAdded(ConditionKey.CK_GREATER_EQUAL, dateAdded); + } + + /** + * Set the value of dateAdded using lessEqual. { <= } + * + * @param dateAdded The value of dateAdded as lessEqual. + */ + public void setDateAdded_LessEqual(java.sql.Timestamp dateAdded) { + registerDateAdded(ConditionKey.CK_LESS_EQUAL, dateAdded); + } + + /** + * Set the value of dateAdded using from-to. { $fromDate <= COLUMN_NAME <= $toDate } + * + * @param dateAdded The value of dateAdded as from-to. + * @param fromToOption From-To option. (NotNull) + */ + public void setDateAdded_FromTo(java.sql.Timestamp fromDate, java.sql.Timestamp toDate, jp.sf.pal.pompei.allcommon.cbean.coption.FromToOption fromToOption) { + registerFromToQuery(fromDate, toDate, getCValueDateAdded(), COL_DATE_ADDED, J_DateAdded, UJ_dateAdded, fromToOption); + } + + /** + * Register condition of dateAdded. + * + * @param key Condition key. (NotNull) + * @param value The value of dateAdded. (Nullable) + */ + protected void registerDateAdded(ConditionKey key, Object value) { + registerQuery(key, value, getCValueDateAdded(), COL_DATE_ADDED, J_DateAdded, UJ_dateAdded); + } + + /** + * Register inline condition of dateAdded. + * + * @param key Condition key. (NotNull) + * @param value The value of dateAdded. (Nullable) + */ + protected void registerInlineDateAdded(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueDateAdded(), COL_DATE_ADDED, J_DateAdded, UJ_dateAdded); + } + + abstract protected ConditionValue getCValueDateAdded(); + + // =================================================================================== + // Basic Override + // ============== + /** + * This method overrides the method that is declared at super. + * + * @return Clause string. (NotNull) + */ + public String toString() { + return getSqlClause().getClause(); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/AbstractBsTaxRatesCQ.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/AbstractBsTaxRatesCQ.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/AbstractBsTaxRatesCQ.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,952 @@ + +package jp.sf.pal.pompei.cbean.cq.bs; + + + +import jp.sf.pal.pompei.allcommon.cbean.*; +import jp.sf.pal.pompei.allcommon.cbean.ckey.*; +import jp.sf.pal.pompei.allcommon.cbean.cvalue.ConditionValue; +import jp.sf.pal.pompei.allcommon.cbean.sqlclause.SqlClause; +import jp.sf.pal.pompei.cbean.cq.*; + +/** + * The condition-query of TAX_RATES. + * + * @author DBFlute(AutoGenerator) + */ +public abstract class AbstractBsTaxRatesCQ extends AbstractConditionQuery { + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param childQuery Child query as abstract class. (Nullable: If null, this is base instance.) + * @param sqlClause SQL clause instance. (NotNull) + * @param aliasName My alias name. (NotNull) + * @param nestLevel Nest level. + */ + public AbstractBsTaxRatesCQ(ConditionQuery childQuery, SqlClause sqlClause, String aliasName, int nestLevel) { + super(childQuery, sqlClause, aliasName, nestLevel); + } + + // =================================================================================== + // Table Name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + final public String getTableDbName() { + return "TAX_RATES"; + } + + // =================================================================================== + // Query + // ===== + + // /* * * * * * * * * * * * * * * * * * * * * * * + // MyTable = [TAX_RATES] + // * * * * * * * * */ + + + /** Column db name of taxRatesId. */ + protected static final String COL_TAX_RATES_ID = "TAX_RATES_ID"; + + /** Column java name of taxRatesId. */ + protected static final String J_TaxRatesId = "TaxRatesId"; + + /** Column uncapitalised java name of taxRatesId. */ + protected static final String UJ_taxRatesId = "taxRatesId"; + + /** + * Set the value of taxRatesId using equal. { = } + * + * @param taxRatesId The value of taxRatesId as equal. + */ + public void setTaxRatesId_Equal(java.math.BigDecimal taxRatesId) { + registerTaxRatesId(ConditionKey.CK_EQUAL, taxRatesId); + } + + /** + * Set the value of taxRatesId using notEqual. { != } + * + * @param taxRatesId The value of taxRatesId as notEqual. + */ + public void setTaxRatesId_NotEqual(java.math.BigDecimal taxRatesId) { + registerTaxRatesId(ConditionKey.CK_NOT_EQUAL, taxRatesId); + } + + /** + * Set the value of taxRatesId using greaterThan. { > } + * + * @param taxRatesId The value of taxRatesId as greaterThan. + */ + public void setTaxRatesId_GreaterThan(java.math.BigDecimal taxRatesId) { + registerTaxRatesId(ConditionKey.CK_GREATER_THAN, taxRatesId); + } + + /** + * Set the value of taxRatesId using lessThan. { < } + * + * @param taxRatesId The value of taxRatesId as lessThan. + */ + public void setTaxRatesId_LessThan(java.math.BigDecimal taxRatesId) { + registerTaxRatesId(ConditionKey.CK_LESS_THAN, taxRatesId); + } + + /** + * Set the value of taxRatesId using greaterEqual. { >= } + * + * @param taxRatesId The value of taxRatesId as greaterEqual. + */ + public void setTaxRatesId_GreaterEqual(java.math.BigDecimal taxRatesId) { + registerTaxRatesId(ConditionKey.CK_GREATER_EQUAL, taxRatesId); + } + + /** + * Set the value of taxRatesId using lessEqual. { <= } + * + * @param taxRatesId The value of taxRatesId as lessEqual. + */ + public void setTaxRatesId_LessEqual(java.math.BigDecimal taxRatesId) { + registerTaxRatesId(ConditionKey.CK_LESS_EQUAL, taxRatesId); + } + + /** + * Set the value of taxRatesId using inScope. { in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param taxRatesIdList The value of taxRatesId as inScope. + */ + public void setTaxRatesId_InScope(java.util.List taxRatesIdList) { + registerTaxRatesId(ConditionKey.CK_IN_SCOPE, taxRatesIdList); + } + + /** + * Set the value of taxRatesId using notInScope. { not in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param taxRatesIdList The value of taxRatesId as notInScope. + */ + public void setTaxRatesId_NotInScope(java.util.List taxRatesIdList) { + registerTaxRatesId(ConditionKey.CK_NOT_IN_SCOPE, taxRatesIdList); + } + + /** + * Register condition of taxRatesId. + * + * @param key Condition key. (NotNull) + * @param value The value of taxRatesId. (Nullable) + */ + protected void registerTaxRatesId(ConditionKey key, Object value) { + registerQuery(key, value, getCValueTaxRatesId(), COL_TAX_RATES_ID, J_TaxRatesId, UJ_taxRatesId); + } + + /** + * Register inline condition of taxRatesId. + * + * @param key Condition key. (NotNull) + * @param value The value of taxRatesId. (Nullable) + */ + protected void registerInlineTaxRatesId(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueTaxRatesId(), COL_TAX_RATES_ID, J_TaxRatesId, UJ_taxRatesId); + } + + abstract protected ConditionValue getCValueTaxRatesId(); + + /** Column db name of taxZoneId. */ + protected static final String COL_TAX_ZONE_ID = "TAX_ZONE_ID"; + + /** Column java name of taxZoneId. */ + protected static final String J_TaxZoneId = "TaxZoneId"; + + /** Column uncapitalised java name of taxZoneId. */ + protected static final String UJ_taxZoneId = "taxZoneId"; + + /** + * Set the value of taxZoneId using equal. { = } + * + * @param taxZoneId The value of taxZoneId as equal. + */ + public void setTaxZoneId_Equal(java.math.BigDecimal taxZoneId) { + registerTaxZoneId(ConditionKey.CK_EQUAL, taxZoneId); + } + + /** + * Set the value of taxZoneId using notEqual. { != } + * + * @param taxZoneId The value of taxZoneId as notEqual. + */ + public void setTaxZoneId_NotEqual(java.math.BigDecimal taxZoneId) { + registerTaxZoneId(ConditionKey.CK_NOT_EQUAL, taxZoneId); + } + + /** + * Set the value of taxZoneId using greaterThan. { > } + * + * @param taxZoneId The value of taxZoneId as greaterThan. + */ + public void setTaxZoneId_GreaterThan(java.math.BigDecimal taxZoneId) { + registerTaxZoneId(ConditionKey.CK_GREATER_THAN, taxZoneId); + } + + /** + * Set the value of taxZoneId using lessThan. { < } + * + * @param taxZoneId The value of taxZoneId as lessThan. + */ + public void setTaxZoneId_LessThan(java.math.BigDecimal taxZoneId) { + registerTaxZoneId(ConditionKey.CK_LESS_THAN, taxZoneId); + } + + /** + * Set the value of taxZoneId using greaterEqual. { >= } + * + * @param taxZoneId The value of taxZoneId as greaterEqual. + */ + public void setTaxZoneId_GreaterEqual(java.math.BigDecimal taxZoneId) { + registerTaxZoneId(ConditionKey.CK_GREATER_EQUAL, taxZoneId); + } + + /** + * Set the value of taxZoneId using lessEqual. { <= } + * + * @param taxZoneId The value of taxZoneId as lessEqual. + */ + public void setTaxZoneId_LessEqual(java.math.BigDecimal taxZoneId) { + registerTaxZoneId(ConditionKey.CK_LESS_EQUAL, taxZoneId); + } + + /** + * Set the value of taxZoneId using inScope. { in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param taxZoneIdList The value of taxZoneId as inScope. + */ + public void setTaxZoneId_InScope(java.util.List taxZoneIdList) { + registerTaxZoneId(ConditionKey.CK_IN_SCOPE, taxZoneIdList); + } + + /** + * Set the value of taxZoneId using notInScope. { not in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param taxZoneIdList The value of taxZoneId as notInScope. + */ + public void setTaxZoneId_NotInScope(java.util.List taxZoneIdList) { + registerTaxZoneId(ConditionKey.CK_NOT_IN_SCOPE, taxZoneIdList); + } + + /** + * Register condition of taxZoneId. + * + * @param key Condition key. (NotNull) + * @param value The value of taxZoneId. (Nullable) + */ + protected void registerTaxZoneId(ConditionKey key, Object value) { + registerQuery(key, value, getCValueTaxZoneId(), COL_TAX_ZONE_ID, J_TaxZoneId, UJ_taxZoneId); + } + + /** + * Register inline condition of taxZoneId. + * + * @param key Condition key. (NotNull) + * @param value The value of taxZoneId. (Nullable) + */ + protected void registerInlineTaxZoneId(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueTaxZoneId(), COL_TAX_ZONE_ID, J_TaxZoneId, UJ_taxZoneId); + } + + abstract protected ConditionValue getCValueTaxZoneId(); + + /** Column db name of taxClassId. */ + protected static final String COL_TAX_CLASS_ID = "TAX_CLASS_ID"; + + /** Column java name of taxClassId. */ + protected static final String J_TaxClassId = "TaxClassId"; + + /** Column uncapitalised java name of taxClassId. */ + protected static final String UJ_taxClassId = "taxClassId"; + + /** + * Set the value of taxClassId using equal. { = } + * + * @param taxClassId The value of taxClassId as equal. + */ + public void setTaxClassId_Equal(java.math.BigDecimal taxClassId) { + registerTaxClassId(ConditionKey.CK_EQUAL, taxClassId); + } + + /** + * Set the value of taxClassId using notEqual. { != } + * + * @param taxClassId The value of taxClassId as notEqual. + */ + public void setTaxClassId_NotEqual(java.math.BigDecimal taxClassId) { + registerTaxClassId(ConditionKey.CK_NOT_EQUAL, taxClassId); + } + + /** + * Set the value of taxClassId using greaterThan. { > } + * + * @param taxClassId The value of taxClassId as greaterThan. + */ + public void setTaxClassId_GreaterThan(java.math.BigDecimal taxClassId) { + registerTaxClassId(ConditionKey.CK_GREATER_THAN, taxClassId); + } + + /** + * Set the value of taxClassId using lessThan. { < } + * + * @param taxClassId The value of taxClassId as lessThan. + */ + public void setTaxClassId_LessThan(java.math.BigDecimal taxClassId) { + registerTaxClassId(ConditionKey.CK_LESS_THAN, taxClassId); + } + + /** + * Set the value of taxClassId using greaterEqual. { >= } + * + * @param taxClassId The value of taxClassId as greaterEqual. + */ + public void setTaxClassId_GreaterEqual(java.math.BigDecimal taxClassId) { + registerTaxClassId(ConditionKey.CK_GREATER_EQUAL, taxClassId); + } + + /** + * Set the value of taxClassId using lessEqual. { <= } + * + * @param taxClassId The value of taxClassId as lessEqual. + */ + public void setTaxClassId_LessEqual(java.math.BigDecimal taxClassId) { + registerTaxClassId(ConditionKey.CK_LESS_EQUAL, taxClassId); + } + + /** + * Set the value of taxClassId using inScope. { in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param taxClassIdList The value of taxClassId as inScope. + */ + public void setTaxClassId_InScope(java.util.List taxClassIdList) { + registerTaxClassId(ConditionKey.CK_IN_SCOPE, taxClassIdList); + } + + /** + * Set the value of taxClassId using notInScope. { not in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param taxClassIdList The value of taxClassId as notInScope. + */ + public void setTaxClassId_NotInScope(java.util.List taxClassIdList) { + registerTaxClassId(ConditionKey.CK_NOT_IN_SCOPE, taxClassIdList); + } + + /** + * Register condition of taxClassId. + * + * @param key Condition key. (NotNull) + * @param value The value of taxClassId. (Nullable) + */ + protected void registerTaxClassId(ConditionKey key, Object value) { + registerQuery(key, value, getCValueTaxClassId(), COL_TAX_CLASS_ID, J_TaxClassId, UJ_taxClassId); + } + + /** + * Register inline condition of taxClassId. + * + * @param key Condition key. (NotNull) + * @param value The value of taxClassId. (Nullable) + */ + protected void registerInlineTaxClassId(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueTaxClassId(), COL_TAX_CLASS_ID, J_TaxClassId, UJ_taxClassId); + } + + abstract protected ConditionValue getCValueTaxClassId(); + + /** Column db name of taxPriority. */ + protected static final String COL_TAX_PRIORITY = "TAX_PRIORITY"; + + /** Column java name of taxPriority. */ + protected static final String J_TaxPriority = "TaxPriority"; + + /** Column uncapitalised java name of taxPriority. */ + protected static final String UJ_taxPriority = "taxPriority"; + + /** + * Set the value of taxPriority using equal. { = } + * + * @param taxPriority The value of taxPriority as equal. + */ + public void setTaxPriority_Equal(java.math.BigDecimal taxPriority) { + registerTaxPriority(ConditionKey.CK_EQUAL, taxPriority); + } + + /** + * Set the value of taxPriority using notEqual. { != } + * + * @param taxPriority The value of taxPriority as notEqual. + */ + public void setTaxPriority_NotEqual(java.math.BigDecimal taxPriority) { + registerTaxPriority(ConditionKey.CK_NOT_EQUAL, taxPriority); + } + + /** + * Set the value of taxPriority using greaterThan. { > } + * + * @param taxPriority The value of taxPriority as greaterThan. + */ + public void setTaxPriority_GreaterThan(java.math.BigDecimal taxPriority) { + registerTaxPriority(ConditionKey.CK_GREATER_THAN, taxPriority); + } + + /** + * Set the value of taxPriority using lessThan. { < } + * + * @param taxPriority The value of taxPriority as lessThan. + */ + public void setTaxPriority_LessThan(java.math.BigDecimal taxPriority) { + registerTaxPriority(ConditionKey.CK_LESS_THAN, taxPriority); + } + + /** + * Set the value of taxPriority using greaterEqual. { >= } + * + * @param taxPriority The value of taxPriority as greaterEqual. + */ + public void setTaxPriority_GreaterEqual(java.math.BigDecimal taxPriority) { + registerTaxPriority(ConditionKey.CK_GREATER_EQUAL, taxPriority); + } + + /** + * Set the value of taxPriority using lessEqual. { <= } + * + * @param taxPriority The value of taxPriority as lessEqual. + */ + public void setTaxPriority_LessEqual(java.math.BigDecimal taxPriority) { + registerTaxPriority(ConditionKey.CK_LESS_EQUAL, taxPriority); + } + + /** + * Set the value of taxPriority using inScope. { in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param taxPriorityList The value of taxPriority as inScope. + */ + public void setTaxPriority_InScope(java.util.List taxPriorityList) { + registerTaxPriority(ConditionKey.CK_IN_SCOPE, taxPriorityList); + } + + /** + * Set the value of taxPriority using notInScope. { not in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param taxPriorityList The value of taxPriority as notInScope. + */ + public void setTaxPriority_NotInScope(java.util.List taxPriorityList) { + registerTaxPriority(ConditionKey.CK_NOT_IN_SCOPE, taxPriorityList); + } + + /** + * Set the value of taxPriority using isNull. { is null } + */ + public void setTaxPriority_IsNull() { + registerTaxPriority(ConditionKey.CK_IS_NULL, DUMMY_OBJECT); + } + + /** + * Set the value of taxPriority using isNotNull. { is not null } + */ + public void setTaxPriority_IsNotNull() { + registerTaxPriority(ConditionKey.CK_IS_NOT_NULL, DUMMY_OBJECT); + } + + /** + * Register condition of taxPriority. + * + * @param key Condition key. (NotNull) + * @param value The value of taxPriority. (Nullable) + */ + protected void registerTaxPriority(ConditionKey key, Object value) { + registerQuery(key, value, getCValueTaxPriority(), COL_TAX_PRIORITY, J_TaxPriority, UJ_taxPriority); + } + + /** + * Register inline condition of taxPriority. + * + * @param key Condition key. (NotNull) + * @param value The value of taxPriority. (Nullable) + */ + protected void registerInlineTaxPriority(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueTaxPriority(), COL_TAX_PRIORITY, J_TaxPriority, UJ_taxPriority); + } + + abstract protected ConditionValue getCValueTaxPriority(); + + /** Column db name of taxRate. */ + protected static final String COL_TAX_RATE = "TAX_RATE"; + + /** Column java name of taxRate. */ + protected static final String J_TaxRate = "TaxRate"; + + /** Column uncapitalised java name of taxRate. */ + protected static final String UJ_taxRate = "taxRate"; + + /** + * Set the value of taxRate using equal. { = } + * + * @param taxRate The value of taxRate as equal. + */ + public void setTaxRate_Equal(java.math.BigDecimal taxRate) { + registerTaxRate(ConditionKey.CK_EQUAL, taxRate); + } + + /** + * Set the value of taxRate using notEqual. { != } + * + * @param taxRate The value of taxRate as notEqual. + */ + public void setTaxRate_NotEqual(java.math.BigDecimal taxRate) { + registerTaxRate(ConditionKey.CK_NOT_EQUAL, taxRate); + } + + /** + * Set the value of taxRate using greaterThan. { > } + * + * @param taxRate The value of taxRate as greaterThan. + */ + public void setTaxRate_GreaterThan(java.math.BigDecimal taxRate) { + registerTaxRate(ConditionKey.CK_GREATER_THAN, taxRate); + } + + /** + * Set the value of taxRate using lessThan. { < } + * + * @param taxRate The value of taxRate as lessThan. + */ + public void setTaxRate_LessThan(java.math.BigDecimal taxRate) { + registerTaxRate(ConditionKey.CK_LESS_THAN, taxRate); + } + + /** + * Set the value of taxRate using greaterEqual. { >= } + * + * @param taxRate The value of taxRate as greaterEqual. + */ + public void setTaxRate_GreaterEqual(java.math.BigDecimal taxRate) { + registerTaxRate(ConditionKey.CK_GREATER_EQUAL, taxRate); + } + + /** + * Set the value of taxRate using lessEqual. { <= } + * + * @param taxRate The value of taxRate as lessEqual. + */ + public void setTaxRate_LessEqual(java.math.BigDecimal taxRate) { + registerTaxRate(ConditionKey.CK_LESS_EQUAL, taxRate); + } + + /** + * Set the value of taxRate using inScope. { in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param taxRateList The value of taxRate as inScope. + */ + public void setTaxRate_InScope(java.util.List taxRateList) { + registerTaxRate(ConditionKey.CK_IN_SCOPE, taxRateList); + } + + /** + * Set the value of taxRate using notInScope. { not in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param taxRateList The value of taxRate as notInScope. + */ + public void setTaxRate_NotInScope(java.util.List taxRateList) { + registerTaxRate(ConditionKey.CK_NOT_IN_SCOPE, taxRateList); + } + + /** + * Register condition of taxRate. + * + * @param key Condition key. (NotNull) + * @param value The value of taxRate. (Nullable) + */ + protected void registerTaxRate(ConditionKey key, Object value) { + registerQuery(key, value, getCValueTaxRate(), COL_TAX_RATE, J_TaxRate, UJ_taxRate); + } + + /** + * Register inline condition of taxRate. + * + * @param key Condition key. (NotNull) + * @param value The value of taxRate. (Nullable) + */ + protected void registerInlineTaxRate(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueTaxRate(), COL_TAX_RATE, J_TaxRate, UJ_taxRate); + } + + abstract protected ConditionValue getCValueTaxRate(); + + /** Column db name of taxDescription. */ + protected static final String COL_TAX_DESCRIPTION = "TAX_DESCRIPTION"; + + /** Column java name of taxDescription. */ + protected static final String J_TaxDescription = "TaxDescription"; + + /** Column uncapitalised java name of taxDescription. */ + protected static final String UJ_taxDescription = "taxDescription"; + + /** + * Set the value of taxDescription using equal. { = } + * If the value is null or empty-string, this condition is ignored. + * + * @param taxDescription The value of taxDescription as equal. + */ + public void setTaxDescription_Equal(String taxDescription) { + registerTaxDescription(ConditionKey.CK_EQUAL, filterRemoveEmptyString(taxDescription)); + } + + /** + * Set the value of taxDescription using notEqual. { != } + * If the value is null or empty-string, this condition is ignored. + * + * @param taxDescription The value of taxDescription as notEqual. + */ + public void setTaxDescription_NotEqual(String taxDescription) { + registerTaxDescription(ConditionKey.CK_NOT_EQUAL, filterRemoveEmptyString(taxDescription)); + } + + /** + * Set the value of taxDescription using greaterThan. { > } + * If the value is null or empty-string, this condition is ignored. + * + * @param taxDescription The value of taxDescription as greaterThan. + */ + public void setTaxDescription_GreaterThan(String taxDescription) { + registerTaxDescription(ConditionKey.CK_GREATER_THAN, filterRemoveEmptyString(taxDescription)); + } + + /** + * Set the value of taxDescription using lessThan. { < } + * If the value is null or empty-string, this condition is ignored. + * + * @param taxDescription The value of taxDescription as lessThan. + */ + public void setTaxDescription_LessThan(String taxDescription) { + registerTaxDescription(ConditionKey.CK_LESS_THAN, filterRemoveEmptyString(taxDescription)); + } + + /** + * Set the value of taxDescription using greaterEqual. { >= } + * If the value is null or empty-string, this condition is ignored. + * + * @param taxDescription The value of taxDescription as greaterEqual. + */ + public void setTaxDescription_GreaterEqual(String taxDescription) { + registerTaxDescription(ConditionKey.CK_GREATER_EQUAL, filterRemoveEmptyString(taxDescription)); + } + + /** + * Set the value of taxDescription using lessEqual. { <= } + * If the value is null or empty-string, this condition is ignored. + * + * @param taxDescription The value of taxDescription as lessEqual. + */ + public void setTaxDescription_LessEqual(String taxDescription) { + registerTaxDescription(ConditionKey.CK_LESS_EQUAL, filterRemoveEmptyString(taxDescription)); + } + + /** + * Set the value of taxDescription using prefixSearch. { like 'xxx%' } + * If the value is null or empty-string, this condition is ignored. + * + * @param taxDescription The value of taxDescription as prefixSearch. + */ + public void setTaxDescription_PrefixSearch(String taxDescription) { + registerTaxDescription(ConditionKey.CK_PREFIX_SEARCH, filterRemoveEmptyString(taxDescription)); + } + + /** + * Set the value of taxDescription using likeSearch. { like '%xxx%' } + * If the value is null or empty-string, this condition is ignored. + * You can invoke this method several times and the conditions are set up. + * + * @param taxDescription The value of taxDescription as likeSearch. + * @param likeSearchOption Like search option. (NotNull) + */ + public void setTaxDescription_LikeSearch(String taxDescription, jp.sf.pal.pompei.allcommon.cbean.coption.LikeSearchOption likeSearchOption) { + registerLikeSearchQuery(ConditionKey.CK_LIKE_SEARCH, filterRemoveEmptyString(taxDescription), getCValueTaxDescription(), COL_TAX_DESCRIPTION, J_TaxDescription, UJ_taxDescription, likeSearchOption); + } + + /** + * Set the value of taxDescription using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param taxDescriptionList The value of taxDescription as inScope. + */ + public void setTaxDescription_InScope(java.util.List taxDescriptionList) { + registerTaxDescription(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyStringFromList(taxDescriptionList)); + } + + /** + * Set the value of taxDescription using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param taxDescription The value of taxDescription as inScope. + */ + public void setTaxDescription_InScope(String taxDescription, jp.sf.pal.pompei.allcommon.cbean.coption.InScopeOption option) { + registerInScopeQuery(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyString(taxDescription), getCValueTaxDescription(), COL_TAX_DESCRIPTION, J_TaxDescription, UJ_taxDescription, option); + } + + /** + * Set the value of taxDescription using notInScope. { not in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param taxDescriptionList The value of taxDescription as notInScope. + */ + public void setTaxDescription_NotInScope(java.util.List taxDescriptionList) { + registerTaxDescription(ConditionKey.CK_NOT_IN_SCOPE, filterRemoveEmptyStringFromList(taxDescriptionList)); + } + + /** + * Register condition of taxDescription. + * + * @param key Condition key. (NotNull) + * @param value The value of taxDescription. (Nullable) + */ + protected void registerTaxDescription(ConditionKey key, Object value) { + registerQuery(key, value, getCValueTaxDescription(), COL_TAX_DESCRIPTION, J_TaxDescription, UJ_taxDescription); + } + + /** + * Register inline condition of taxDescription. + * + * @param key Condition key. (NotNull) + * @param value The value of taxDescription. (Nullable) + */ + protected void registerInlineTaxDescription(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueTaxDescription(), COL_TAX_DESCRIPTION, J_TaxDescription, UJ_taxDescription); + } + + abstract protected ConditionValue getCValueTaxDescription(); + + /** Column db name of lastModified. */ + protected static final String COL_LAST_MODIFIED = "LAST_MODIFIED"; + + /** Column java name of lastModified. */ + protected static final String J_LastModified = "LastModified"; + + /** Column uncapitalised java name of lastModified. */ + protected static final String UJ_lastModified = "lastModified"; + + /** + * Set the value of lastModified using equal. { = } + * + * @param lastModified The value of lastModified as equal. + */ + public void setLastModified_Equal(java.sql.Timestamp lastModified) { + registerLastModified(ConditionKey.CK_EQUAL, lastModified); + } + + /** + * Set the value of lastModified using notEqual. { != } + * + * @param lastModified The value of lastModified as notEqual. + */ + public void setLastModified_NotEqual(java.sql.Timestamp lastModified) { + registerLastModified(ConditionKey.CK_NOT_EQUAL, lastModified); + } + + /** + * Set the value of lastModified using greaterThan. { > } + * + * @param lastModified The value of lastModified as greaterThan. + */ + public void setLastModified_GreaterThan(java.sql.Timestamp lastModified) { + registerLastModified(ConditionKey.CK_GREATER_THAN, lastModified); + } + + /** + * Set the value of lastModified using lessThan. { < } + * + * @param lastModified The value of lastModified as lessThan. + */ + public void setLastModified_LessThan(java.sql.Timestamp lastModified) { + registerLastModified(ConditionKey.CK_LESS_THAN, lastModified); + } + + /** + * Set the value of lastModified using greaterEqual. { >= } + * + * @param lastModified The value of lastModified as greaterEqual. + */ + public void setLastModified_GreaterEqual(java.sql.Timestamp lastModified) { + registerLastModified(ConditionKey.CK_GREATER_EQUAL, lastModified); + } + + /** + * Set the value of lastModified using lessEqual. { <= } + * + * @param lastModified The value of lastModified as lessEqual. + */ + public void setLastModified_LessEqual(java.sql.Timestamp lastModified) { + registerLastModified(ConditionKey.CK_LESS_EQUAL, lastModified); + } + + /** + * Set the value of lastModified using from-to. { $fromDate <= COLUMN_NAME <= $toDate } + * + * @param lastModified The value of lastModified as from-to. + * @param fromToOption From-To option. (NotNull) + */ + public void setLastModified_FromTo(java.sql.Timestamp fromDate, java.sql.Timestamp toDate, jp.sf.pal.pompei.allcommon.cbean.coption.FromToOption fromToOption) { + registerFromToQuery(fromDate, toDate, getCValueLastModified(), COL_LAST_MODIFIED, J_LastModified, UJ_lastModified, fromToOption); + } + + /** + * Set the value of lastModified using isNull. { is null } + */ + public void setLastModified_IsNull() { + registerLastModified(ConditionKey.CK_IS_NULL, DUMMY_OBJECT); + } + + /** + * Set the value of lastModified using isNotNull. { is not null } + */ + public void setLastModified_IsNotNull() { + registerLastModified(ConditionKey.CK_IS_NOT_NULL, DUMMY_OBJECT); + } + + /** + * Register condition of lastModified. + * + * @param key Condition key. (NotNull) + * @param value The value of lastModified. (Nullable) + */ + protected void registerLastModified(ConditionKey key, Object value) { + registerQuery(key, value, getCValueLastModified(), COL_LAST_MODIFIED, J_LastModified, UJ_lastModified); + } + + /** + * Register inline condition of lastModified. + * + * @param key Condition key. (NotNull) + * @param value The value of lastModified. (Nullable) + */ + protected void registerInlineLastModified(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueLastModified(), COL_LAST_MODIFIED, J_LastModified, UJ_lastModified); + } + + abstract protected ConditionValue getCValueLastModified(); + + /** Column db name of dateAdded. */ + protected static final String COL_DATE_ADDED = "DATE_ADDED"; + + /** Column java name of dateAdded. */ + protected static final String J_DateAdded = "DateAdded"; + + /** Column uncapitalised java name of dateAdded. */ + protected static final String UJ_dateAdded = "dateAdded"; + + /** + * Set the value of dateAdded using equal. { = } + * + * @param dateAdded The value of dateAdded as equal. + */ + public void setDateAdded_Equal(java.sql.Timestamp dateAdded) { + registerDateAdded(ConditionKey.CK_EQUAL, dateAdded); + } + + /** + * Set the value of dateAdded using notEqual. { != } + * + * @param dateAdded The value of dateAdded as notEqual. + */ + public void setDateAdded_NotEqual(java.sql.Timestamp dateAdded) { + registerDateAdded(ConditionKey.CK_NOT_EQUAL, dateAdded); + } + + /** + * Set the value of dateAdded using greaterThan. { > } + * + * @param dateAdded The value of dateAdded as greaterThan. + */ + public void setDateAdded_GreaterThan(java.sql.Timestamp dateAdded) { + registerDateAdded(ConditionKey.CK_GREATER_THAN, dateAdded); + } + + /** + * Set the value of dateAdded using lessThan. { < } + * + * @param dateAdded The value of dateAdded as lessThan. + */ + public void setDateAdded_LessThan(java.sql.Timestamp dateAdded) { + registerDateAdded(ConditionKey.CK_LESS_THAN, dateAdded); + } + + /** + * Set the value of dateAdded using greaterEqual. { >= } + * + * @param dateAdded The value of dateAdded as greaterEqual. + */ + public void setDateAdded_GreaterEqual(java.sql.Timestamp dateAdded) { + registerDateAdded(ConditionKey.CK_GREATER_EQUAL, dateAdded); + } + + /** + * Set the value of dateAdded using lessEqual. { <= } + * + * @param dateAdded The value of dateAdded as lessEqual. + */ + public void setDateAdded_LessEqual(java.sql.Timestamp dateAdded) { + registerDateAdded(ConditionKey.CK_LESS_EQUAL, dateAdded); + } + + /** + * Set the value of dateAdded using from-to. { $fromDate <= COLUMN_NAME <= $toDate } + * + * @param dateAdded The value of dateAdded as from-to. + * @param fromToOption From-To option. (NotNull) + */ + public void setDateAdded_FromTo(java.sql.Timestamp fromDate, java.sql.Timestamp toDate, jp.sf.pal.pompei.allcommon.cbean.coption.FromToOption fromToOption) { + registerFromToQuery(fromDate, toDate, getCValueDateAdded(), COL_DATE_ADDED, J_DateAdded, UJ_dateAdded, fromToOption); + } + + /** + * Register condition of dateAdded. + * + * @param key Condition key. (NotNull) + * @param value The value of dateAdded. (Nullable) + */ + protected void registerDateAdded(ConditionKey key, Object value) { + registerQuery(key, value, getCValueDateAdded(), COL_DATE_ADDED, J_DateAdded, UJ_dateAdded); + } + + /** + * Register inline condition of dateAdded. + * + * @param key Condition key. (NotNull) + * @param value The value of dateAdded. (Nullable) + */ + protected void registerInlineDateAdded(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueDateAdded(), COL_DATE_ADDED, J_DateAdded, UJ_dateAdded); + } + + abstract protected ConditionValue getCValueDateAdded(); + + // =================================================================================== + // Basic Override + // ============== + /** + * This method overrides the method that is declared at super. + * + * @return Clause string. (NotNull) + */ + public String toString() { + return getSqlClause().getClause(); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/AbstractBsWhosOnlineCQ.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/AbstractBsWhosOnlineCQ.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/AbstractBsWhosOnlineCQ.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,1043 @@ + +package jp.sf.pal.pompei.cbean.cq.bs; + + + +import jp.sf.pal.pompei.allcommon.cbean.*; +import jp.sf.pal.pompei.allcommon.cbean.ckey.*; +import jp.sf.pal.pompei.allcommon.cbean.cvalue.ConditionValue; +import jp.sf.pal.pompei.allcommon.cbean.sqlclause.SqlClause; +import jp.sf.pal.pompei.cbean.cq.*; + +/** + * The condition-query of WHOS_ONLINE. + * + * @author DBFlute(AutoGenerator) + */ +public abstract class AbstractBsWhosOnlineCQ extends AbstractConditionQuery { + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param childQuery Child query as abstract class. (Nullable: If null, this is base instance.) + * @param sqlClause SQL clause instance. (NotNull) + * @param aliasName My alias name. (NotNull) + * @param nestLevel Nest level. + */ + public AbstractBsWhosOnlineCQ(ConditionQuery childQuery, SqlClause sqlClause, String aliasName, int nestLevel) { + super(childQuery, sqlClause, aliasName, nestLevel); + } + + // =================================================================================== + // Table Name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + final public String getTableDbName() { + return "WHOS_ONLINE"; + } + + // =================================================================================== + // Query + // ===== + + // /* * * * * * * * * * * * * * * * * * * * * * * + // MyTable = [WHOS_ONLINE] + // * * * * * * * * */ + + + /** Column db name of customerId. */ + protected static final String COL_CUSTOMER_ID = "CUSTOMER_ID"; + + /** Column java name of customerId. */ + protected static final String J_CustomerId = "CustomerId"; + + /** Column uncapitalised java name of customerId. */ + protected static final String UJ_customerId = "customerId"; + + /** + * Set the value of customerId using equal. { = } + * + * @param customerId The value of customerId as equal. + */ + public void setCustomerId_Equal(java.math.BigDecimal customerId) { + registerCustomerId(ConditionKey.CK_EQUAL, customerId); + } + + /** + * Set the value of customerId using notEqual. { != } + * + * @param customerId The value of customerId as notEqual. + */ + public void setCustomerId_NotEqual(java.math.BigDecimal customerId) { + registerCustomerId(ConditionKey.CK_NOT_EQUAL, customerId); + } + + /** + * Set the value of customerId using greaterThan. { > } + * + * @param customerId The value of customerId as greaterThan. + */ + public void setCustomerId_GreaterThan(java.math.BigDecimal customerId) { + registerCustomerId(ConditionKey.CK_GREATER_THAN, customerId); + } + + /** + * Set the value of customerId using lessThan. { < } + * + * @param customerId The value of customerId as lessThan. + */ + public void setCustomerId_LessThan(java.math.BigDecimal customerId) { + registerCustomerId(ConditionKey.CK_LESS_THAN, customerId); + } + + /** + * Set the value of customerId using greaterEqual. { >= } + * + * @param customerId The value of customerId as greaterEqual. + */ + public void setCustomerId_GreaterEqual(java.math.BigDecimal customerId) { + registerCustomerId(ConditionKey.CK_GREATER_EQUAL, customerId); + } + + /** + * Set the value of customerId using lessEqual. { <= } + * + * @param customerId The value of customerId as lessEqual. + */ + public void setCustomerId_LessEqual(java.math.BigDecimal customerId) { + registerCustomerId(ConditionKey.CK_LESS_EQUAL, customerId); + } + + /** + * Set the value of customerId using inScope. { in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param customerIdList The value of customerId as inScope. + */ + public void setCustomerId_InScope(java.util.List customerIdList) { + registerCustomerId(ConditionKey.CK_IN_SCOPE, customerIdList); + } + + /** + * Set the value of customerId using notInScope. { not in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param customerIdList The value of customerId as notInScope. + */ + public void setCustomerId_NotInScope(java.util.List customerIdList) { + registerCustomerId(ConditionKey.CK_NOT_IN_SCOPE, customerIdList); + } + + /** + * Set the value of customerId using isNull. { is null } + */ + public void setCustomerId_IsNull() { + registerCustomerId(ConditionKey.CK_IS_NULL, DUMMY_OBJECT); + } + + /** + * Set the value of customerId using isNotNull. { is not null } + */ + public void setCustomerId_IsNotNull() { + registerCustomerId(ConditionKey.CK_IS_NOT_NULL, DUMMY_OBJECT); + } + + /** + * Register condition of customerId. + * + * @param key Condition key. (NotNull) + * @param value The value of customerId. (Nullable) + */ + protected void registerCustomerId(ConditionKey key, Object value) { + registerQuery(key, value, getCValueCustomerId(), COL_CUSTOMER_ID, J_CustomerId, UJ_customerId); + } + + /** + * Register inline condition of customerId. + * + * @param key Condition key. (NotNull) + * @param value The value of customerId. (Nullable) + */ + protected void registerInlineCustomerId(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueCustomerId(), COL_CUSTOMER_ID, J_CustomerId, UJ_customerId); + } + + abstract protected ConditionValue getCValueCustomerId(); + + /** Column db name of fullName. */ + protected static final String COL_FULL_NAME = "FULL_NAME"; + + /** Column java name of fullName. */ + protected static final String J_FullName = "FullName"; + + /** Column uncapitalised java name of fullName. */ + protected static final String UJ_fullName = "fullName"; + + /** + * Set the value of fullName using equal. { = } + * If the value is null or empty-string, this condition is ignored. + * + * @param fullName The value of fullName as equal. + */ + public void setFullName_Equal(String fullName) { + registerFullName(ConditionKey.CK_EQUAL, filterRemoveEmptyString(fullName)); + } + + /** + * Set the value of fullName using notEqual. { != } + * If the value is null or empty-string, this condition is ignored. + * + * @param fullName The value of fullName as notEqual. + */ + public void setFullName_NotEqual(String fullName) { + registerFullName(ConditionKey.CK_NOT_EQUAL, filterRemoveEmptyString(fullName)); + } + + /** + * Set the value of fullName using greaterThan. { > } + * If the value is null or empty-string, this condition is ignored. + * + * @param fullName The value of fullName as greaterThan. + */ + public void setFullName_GreaterThan(String fullName) { + registerFullName(ConditionKey.CK_GREATER_THAN, filterRemoveEmptyString(fullName)); + } + + /** + * Set the value of fullName using lessThan. { < } + * If the value is null or empty-string, this condition is ignored. + * + * @param fullName The value of fullName as lessThan. + */ + public void setFullName_LessThan(String fullName) { + registerFullName(ConditionKey.CK_LESS_THAN, filterRemoveEmptyString(fullName)); + } + + /** + * Set the value of fullName using greaterEqual. { >= } + * If the value is null or empty-string, this condition is ignored. + * + * @param fullName The value of fullName as greaterEqual. + */ + public void setFullName_GreaterEqual(String fullName) { + registerFullName(ConditionKey.CK_GREATER_EQUAL, filterRemoveEmptyString(fullName)); + } + + /** + * Set the value of fullName using lessEqual. { <= } + * If the value is null or empty-string, this condition is ignored. + * + * @param fullName The value of fullName as lessEqual. + */ + public void setFullName_LessEqual(String fullName) { + registerFullName(ConditionKey.CK_LESS_EQUAL, filterRemoveEmptyString(fullName)); + } + + /** + * Set the value of fullName using prefixSearch. { like 'xxx%' } + * If the value is null or empty-string, this condition is ignored. + * + * @param fullName The value of fullName as prefixSearch. + */ + public void setFullName_PrefixSearch(String fullName) { + registerFullName(ConditionKey.CK_PREFIX_SEARCH, filterRemoveEmptyString(fullName)); + } + + /** + * Set the value of fullName using likeSearch. { like '%xxx%' } + * If the value is null or empty-string, this condition is ignored. + * You can invoke this method several times and the conditions are set up. + * + * @param fullName The value of fullName as likeSearch. + * @param likeSearchOption Like search option. (NotNull) + */ + public void setFullName_LikeSearch(String fullName, jp.sf.pal.pompei.allcommon.cbean.coption.LikeSearchOption likeSearchOption) { + registerLikeSearchQuery(ConditionKey.CK_LIKE_SEARCH, filterRemoveEmptyString(fullName), getCValueFullName(), COL_FULL_NAME, J_FullName, UJ_fullName, likeSearchOption); + } + + /** + * Set the value of fullName using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param fullNameList The value of fullName as inScope. + */ + public void setFullName_InScope(java.util.List fullNameList) { + registerFullName(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyStringFromList(fullNameList)); + } + + /** + * Set the value of fullName using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param fullName The value of fullName as inScope. + */ + public void setFullName_InScope(String fullName, jp.sf.pal.pompei.allcommon.cbean.coption.InScopeOption option) { + registerInScopeQuery(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyString(fullName), getCValueFullName(), COL_FULL_NAME, J_FullName, UJ_fullName, option); + } + + /** + * Set the value of fullName using notInScope. { not in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param fullNameList The value of fullName as notInScope. + */ + public void setFullName_NotInScope(java.util.List fullNameList) { + registerFullName(ConditionKey.CK_NOT_IN_SCOPE, filterRemoveEmptyStringFromList(fullNameList)); + } + + /** + * Register condition of fullName. + * + * @param key Condition key. (NotNull) + * @param value The value of fullName. (Nullable) + */ + protected void registerFullName(ConditionKey key, Object value) { + registerQuery(key, value, getCValueFullName(), COL_FULL_NAME, J_FullName, UJ_fullName); + } + + /** + * Register inline condition of fullName. + * + * @param key Condition key. (NotNull) + * @param value The value of fullName. (Nullable) + */ + protected void registerInlineFullName(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueFullName(), COL_FULL_NAME, J_FullName, UJ_fullName); + } + + abstract protected ConditionValue getCValueFullName(); + + /** Column db name of sessionId. */ + protected static final String COL_SESSION_ID = "SESSION_ID"; + + /** Column java name of sessionId. */ + protected static final String J_SessionId = "SessionId"; + + /** Column uncapitalised java name of sessionId. */ + protected static final String UJ_sessionId = "sessionId"; + + /** + * Set the value of sessionId using equal. { = } + * If the value is null or empty-string, this condition is ignored. + * + * @param sessionId The value of sessionId as equal. + */ + public void setSessionId_Equal(String sessionId) { + registerSessionId(ConditionKey.CK_EQUAL, filterRemoveEmptyString(sessionId)); + } + + /** + * Set the value of sessionId using notEqual. { != } + * If the value is null or empty-string, this condition is ignored. + * + * @param sessionId The value of sessionId as notEqual. + */ + public void setSessionId_NotEqual(String sessionId) { + registerSessionId(ConditionKey.CK_NOT_EQUAL, filterRemoveEmptyString(sessionId)); + } + + /** + * Set the value of sessionId using greaterThan. { > } + * If the value is null or empty-string, this condition is ignored. + * + * @param sessionId The value of sessionId as greaterThan. + */ + public void setSessionId_GreaterThan(String sessionId) { + registerSessionId(ConditionKey.CK_GREATER_THAN, filterRemoveEmptyString(sessionId)); + } + + /** + * Set the value of sessionId using lessThan. { < } + * If the value is null or empty-string, this condition is ignored. + * + * @param sessionId The value of sessionId as lessThan. + */ + public void setSessionId_LessThan(String sessionId) { + registerSessionId(ConditionKey.CK_LESS_THAN, filterRemoveEmptyString(sessionId)); + } + + /** + * Set the value of sessionId using greaterEqual. { >= } + * If the value is null or empty-string, this condition is ignored. + * + * @param sessionId The value of sessionId as greaterEqual. + */ + public void setSessionId_GreaterEqual(String sessionId) { + registerSessionId(ConditionKey.CK_GREATER_EQUAL, filterRemoveEmptyString(sessionId)); + } + + /** + * Set the value of sessionId using lessEqual. { <= } + * If the value is null or empty-string, this condition is ignored. + * + * @param sessionId The value of sessionId as lessEqual. + */ + public void setSessionId_LessEqual(String sessionId) { + registerSessionId(ConditionKey.CK_LESS_EQUAL, filterRemoveEmptyString(sessionId)); + } + + /** + * Set the value of sessionId using prefixSearch. { like 'xxx%' } + * If the value is null or empty-string, this condition is ignored. + * + * @param sessionId The value of sessionId as prefixSearch. + */ + public void setSessionId_PrefixSearch(String sessionId) { + registerSessionId(ConditionKey.CK_PREFIX_SEARCH, filterRemoveEmptyString(sessionId)); + } + + /** + * Set the value of sessionId using likeSearch. { like '%xxx%' } + * If the value is null or empty-string, this condition is ignored. + * You can invoke this method several times and the conditions are set up. + * + * @param sessionId The value of sessionId as likeSearch. + * @param likeSearchOption Like search option. (NotNull) + */ + public void setSessionId_LikeSearch(String sessionId, jp.sf.pal.pompei.allcommon.cbean.coption.LikeSearchOption likeSearchOption) { + registerLikeSearchQuery(ConditionKey.CK_LIKE_SEARCH, filterRemoveEmptyString(sessionId), getCValueSessionId(), COL_SESSION_ID, J_SessionId, UJ_sessionId, likeSearchOption); + } + + /** + * Set the value of sessionId using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param sessionIdList The value of sessionId as inScope. + */ + public void setSessionId_InScope(java.util.List sessionIdList) { + registerSessionId(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyStringFromList(sessionIdList)); + } + + /** + * Set the value of sessionId using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param sessionId The value of sessionId as inScope. + */ + public void setSessionId_InScope(String sessionId, jp.sf.pal.pompei.allcommon.cbean.coption.InScopeOption option) { + registerInScopeQuery(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyString(sessionId), getCValueSessionId(), COL_SESSION_ID, J_SessionId, UJ_sessionId, option); + } + + /** + * Set the value of sessionId using notInScope. { not in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param sessionIdList The value of sessionId as notInScope. + */ + public void setSessionId_NotInScope(java.util.List sessionIdList) { + registerSessionId(ConditionKey.CK_NOT_IN_SCOPE, filterRemoveEmptyStringFromList(sessionIdList)); + } + + /** + * Register condition of sessionId. + * + * @param key Condition key. (NotNull) + * @param value The value of sessionId. (Nullable) + */ + protected void registerSessionId(ConditionKey key, Object value) { + registerQuery(key, value, getCValueSessionId(), COL_SESSION_ID, J_SessionId, UJ_sessionId); + } + + /** + * Register inline condition of sessionId. + * + * @param key Condition key. (NotNull) + * @param value The value of sessionId. (Nullable) + */ + protected void registerInlineSessionId(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueSessionId(), COL_SESSION_ID, J_SessionId, UJ_sessionId); + } + + abstract protected ConditionValue getCValueSessionId(); + + /** Column db name of ipAddress. */ + protected static final String COL_IP_ADDRESS = "IP_ADDRESS"; + + /** Column java name of ipAddress. */ + protected static final String J_IpAddress = "IpAddress"; + + /** Column uncapitalised java name of ipAddress. */ + protected static final String UJ_ipAddress = "ipAddress"; + + /** + * Set the value of ipAddress using equal. { = } + * If the value is null or empty-string, this condition is ignored. + * + * @param ipAddress The value of ipAddress as equal. + */ + public void setIpAddress_Equal(String ipAddress) { + registerIpAddress(ConditionKey.CK_EQUAL, filterRemoveEmptyString(ipAddress)); + } + + /** + * Set the value of ipAddress using notEqual. { != } + * If the value is null or empty-string, this condition is ignored. + * + * @param ipAddress The value of ipAddress as notEqual. + */ + public void setIpAddress_NotEqual(String ipAddress) { + registerIpAddress(ConditionKey.CK_NOT_EQUAL, filterRemoveEmptyString(ipAddress)); + } + + /** + * Set the value of ipAddress using greaterThan. { > } + * If the value is null or empty-string, this condition is ignored. + * + * @param ipAddress The value of ipAddress as greaterThan. + */ + public void setIpAddress_GreaterThan(String ipAddress) { + registerIpAddress(ConditionKey.CK_GREATER_THAN, filterRemoveEmptyString(ipAddress)); + } + + /** + * Set the value of ipAddress using lessThan. { < } + * If the value is null or empty-string, this condition is ignored. + * + * @param ipAddress The value of ipAddress as lessThan. + */ + public void setIpAddress_LessThan(String ipAddress) { + registerIpAddress(ConditionKey.CK_LESS_THAN, filterRemoveEmptyString(ipAddress)); + } + + /** + * Set the value of ipAddress using greaterEqual. { >= } + * If the value is null or empty-string, this condition is ignored. + * + * @param ipAddress The value of ipAddress as greaterEqual. + */ + public void setIpAddress_GreaterEqual(String ipAddress) { + registerIpAddress(ConditionKey.CK_GREATER_EQUAL, filterRemoveEmptyString(ipAddress)); + } + + /** + * Set the value of ipAddress using lessEqual. { <= } + * If the value is null or empty-string, this condition is ignored. + * + * @param ipAddress The value of ipAddress as lessEqual. + */ + public void setIpAddress_LessEqual(String ipAddress) { + registerIpAddress(ConditionKey.CK_LESS_EQUAL, filterRemoveEmptyString(ipAddress)); + } + + /** + * Set the value of ipAddress using prefixSearch. { like 'xxx%' } + * If the value is null or empty-string, this condition is ignored. + * + * @param ipAddress The value of ipAddress as prefixSearch. + */ + public void setIpAddress_PrefixSearch(String ipAddress) { + registerIpAddress(ConditionKey.CK_PREFIX_SEARCH, filterRemoveEmptyString(ipAddress)); + } + + /** + * Set the value of ipAddress using likeSearch. { like '%xxx%' } + * If the value is null or empty-string, this condition is ignored. + * You can invoke this method several times and the conditions are set up. + * + * @param ipAddress The value of ipAddress as likeSearch. + * @param likeSearchOption Like search option. (NotNull) + */ + public void setIpAddress_LikeSearch(String ipAddress, jp.sf.pal.pompei.allcommon.cbean.coption.LikeSearchOption likeSearchOption) { + registerLikeSearchQuery(ConditionKey.CK_LIKE_SEARCH, filterRemoveEmptyString(ipAddress), getCValueIpAddress(), COL_IP_ADDRESS, J_IpAddress, UJ_ipAddress, likeSearchOption); + } + + /** + * Set the value of ipAddress using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param ipAddressList The value of ipAddress as inScope. + */ + public void setIpAddress_InScope(java.util.List ipAddressList) { + registerIpAddress(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyStringFromList(ipAddressList)); + } + + /** + * Set the value of ipAddress using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param ipAddress The value of ipAddress as inScope. + */ + public void setIpAddress_InScope(String ipAddress, jp.sf.pal.pompei.allcommon.cbean.coption.InScopeOption option) { + registerInScopeQuery(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyString(ipAddress), getCValueIpAddress(), COL_IP_ADDRESS, J_IpAddress, UJ_ipAddress, option); + } + + /** + * Set the value of ipAddress using notInScope. { not in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param ipAddressList The value of ipAddress as notInScope. + */ + public void setIpAddress_NotInScope(java.util.List ipAddressList) { + registerIpAddress(ConditionKey.CK_NOT_IN_SCOPE, filterRemoveEmptyStringFromList(ipAddressList)); + } + + /** + * Register condition of ipAddress. + * + * @param key Condition key. (NotNull) + * @param value The value of ipAddress. (Nullable) + */ + protected void registerIpAddress(ConditionKey key, Object value) { + registerQuery(key, value, getCValueIpAddress(), COL_IP_ADDRESS, J_IpAddress, UJ_ipAddress); + } + + /** + * Register inline condition of ipAddress. + * + * @param key Condition key. (NotNull) + * @param value The value of ipAddress. (Nullable) + */ + protected void registerInlineIpAddress(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueIpAddress(), COL_IP_ADDRESS, J_IpAddress, UJ_ipAddress); + } + + abstract protected ConditionValue getCValueIpAddress(); + + /** Column db name of timeEntry. */ + protected static final String COL_TIME_ENTRY = "TIME_ENTRY"; + + /** Column java name of timeEntry. */ + protected static final String J_TimeEntry = "TimeEntry"; + + /** Column uncapitalised java name of timeEntry. */ + protected static final String UJ_timeEntry = "timeEntry"; + + /** + * Set the value of timeEntry using equal. { = } + * If the value is null or empty-string, this condition is ignored. + * + * @param timeEntry The value of timeEntry as equal. + */ + public void setTimeEntry_Equal(String timeEntry) { + registerTimeEntry(ConditionKey.CK_EQUAL, filterRemoveEmptyString(timeEntry)); + } + + /** + * Set the value of timeEntry using notEqual. { != } + * If the value is null or empty-string, this condition is ignored. + * + * @param timeEntry The value of timeEntry as notEqual. + */ + public void setTimeEntry_NotEqual(String timeEntry) { + registerTimeEntry(ConditionKey.CK_NOT_EQUAL, filterRemoveEmptyString(timeEntry)); + } + + /** + * Set the value of timeEntry using greaterThan. { > } + * If the value is null or empty-string, this condition is ignored. + * + * @param timeEntry The value of timeEntry as greaterThan. + */ + public void setTimeEntry_GreaterThan(String timeEntry) { + registerTimeEntry(ConditionKey.CK_GREATER_THAN, filterRemoveEmptyString(timeEntry)); + } + + /** + * Set the value of timeEntry using lessThan. { < } + * If the value is null or empty-string, this condition is ignored. + * + * @param timeEntry The value of timeEntry as lessThan. + */ + public void setTimeEntry_LessThan(String timeEntry) { + registerTimeEntry(ConditionKey.CK_LESS_THAN, filterRemoveEmptyString(timeEntry)); + } + + /** + * Set the value of timeEntry using greaterEqual. { >= } + * If the value is null or empty-string, this condition is ignored. + * + * @param timeEntry The value of timeEntry as greaterEqual. + */ + public void setTimeEntry_GreaterEqual(String timeEntry) { + registerTimeEntry(ConditionKey.CK_GREATER_EQUAL, filterRemoveEmptyString(timeEntry)); + } + + /** + * Set the value of timeEntry using lessEqual. { <= } + * If the value is null or empty-string, this condition is ignored. + * + * @param timeEntry The value of timeEntry as lessEqual. + */ + public void setTimeEntry_LessEqual(String timeEntry) { + registerTimeEntry(ConditionKey.CK_LESS_EQUAL, filterRemoveEmptyString(timeEntry)); + } + + /** + * Set the value of timeEntry using prefixSearch. { like 'xxx%' } + * If the value is null or empty-string, this condition is ignored. + * + * @param timeEntry The value of timeEntry as prefixSearch. + */ + public void setTimeEntry_PrefixSearch(String timeEntry) { + registerTimeEntry(ConditionKey.CK_PREFIX_SEARCH, filterRemoveEmptyString(timeEntry)); + } + + /** + * Set the value of timeEntry using likeSearch. { like '%xxx%' } + * If the value is null or empty-string, this condition is ignored. + * You can invoke this method several times and the conditions are set up. + * + * @param timeEntry The value of timeEntry as likeSearch. + * @param likeSearchOption Like search option. (NotNull) + */ + public void setTimeEntry_LikeSearch(String timeEntry, jp.sf.pal.pompei.allcommon.cbean.coption.LikeSearchOption likeSearchOption) { + registerLikeSearchQuery(ConditionKey.CK_LIKE_SEARCH, filterRemoveEmptyString(timeEntry), getCValueTimeEntry(), COL_TIME_ENTRY, J_TimeEntry, UJ_timeEntry, likeSearchOption); + } + + /** + * Set the value of timeEntry using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param timeEntryList The value of timeEntry as inScope. + */ + public void setTimeEntry_InScope(java.util.List timeEntryList) { + registerTimeEntry(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyStringFromList(timeEntryList)); + } + + /** + * Set the value of timeEntry using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param timeEntry The value of timeEntry as inScope. + */ + public void setTimeEntry_InScope(String timeEntry, jp.sf.pal.pompei.allcommon.cbean.coption.InScopeOption option) { + registerInScopeQuery(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyString(timeEntry), getCValueTimeEntry(), COL_TIME_ENTRY, J_TimeEntry, UJ_timeEntry, option); + } + + /** + * Set the value of timeEntry using notInScope. { not in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param timeEntryList The value of timeEntry as notInScope. + */ + public void setTimeEntry_NotInScope(java.util.List timeEntryList) { + registerTimeEntry(ConditionKey.CK_NOT_IN_SCOPE, filterRemoveEmptyStringFromList(timeEntryList)); + } + + /** + * Register condition of timeEntry. + * + * @param key Condition key. (NotNull) + * @param value The value of timeEntry. (Nullable) + */ + protected void registerTimeEntry(ConditionKey key, Object value) { + registerQuery(key, value, getCValueTimeEntry(), COL_TIME_ENTRY, J_TimeEntry, UJ_timeEntry); + } + + /** + * Register inline condition of timeEntry. + * + * @param key Condition key. (NotNull) + * @param value The value of timeEntry. (Nullable) + */ + protected void registerInlineTimeEntry(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueTimeEntry(), COL_TIME_ENTRY, J_TimeEntry, UJ_timeEntry); + } + + abstract protected ConditionValue getCValueTimeEntry(); + + /** Column db name of timeLastClick. */ + protected static final String COL_TIME_LAST_CLICK = "TIME_LAST_CLICK"; + + /** Column java name of timeLastClick. */ + protected static final String J_TimeLastClick = "TimeLastClick"; + + /** Column uncapitalised java name of timeLastClick. */ + protected static final String UJ_timeLastClick = "timeLastClick"; + + /** + * Set the value of timeLastClick using equal. { = } + * If the value is null or empty-string, this condition is ignored. + * + * @param timeLastClick The value of timeLastClick as equal. + */ + public void setTimeLastClick_Equal(String timeLastClick) { + registerTimeLastClick(ConditionKey.CK_EQUAL, filterRemoveEmptyString(timeLastClick)); + } + + /** + * Set the value of timeLastClick using notEqual. { != } + * If the value is null or empty-string, this condition is ignored. + * + * @param timeLastClick The value of timeLastClick as notEqual. + */ + public void setTimeLastClick_NotEqual(String timeLastClick) { + registerTimeLastClick(ConditionKey.CK_NOT_EQUAL, filterRemoveEmptyString(timeLastClick)); + } + + /** + * Set the value of timeLastClick using greaterThan. { > } + * If the value is null or empty-string, this condition is ignored. + * + * @param timeLastClick The value of timeLastClick as greaterThan. + */ + public void setTimeLastClick_GreaterThan(String timeLastClick) { + registerTimeLastClick(ConditionKey.CK_GREATER_THAN, filterRemoveEmptyString(timeLastClick)); + } + + /** + * Set the value of timeLastClick using lessThan. { < } + * If the value is null or empty-string, this condition is ignored. + * + * @param timeLastClick The value of timeLastClick as lessThan. + */ + public void setTimeLastClick_LessThan(String timeLastClick) { + registerTimeLastClick(ConditionKey.CK_LESS_THAN, filterRemoveEmptyString(timeLastClick)); + } + + /** + * Set the value of timeLastClick using greaterEqual. { >= } + * If the value is null or empty-string, this condition is ignored. + * + * @param timeLastClick The value of timeLastClick as greaterEqual. + */ + public void setTimeLastClick_GreaterEqual(String timeLastClick) { + registerTimeLastClick(ConditionKey.CK_GREATER_EQUAL, filterRemoveEmptyString(timeLastClick)); + } + + /** + * Set the value of timeLastClick using lessEqual. { <= } + * If the value is null or empty-string, this condition is ignored. + * + * @param timeLastClick The value of timeLastClick as lessEqual. + */ + public void setTimeLastClick_LessEqual(String timeLastClick) { + registerTimeLastClick(ConditionKey.CK_LESS_EQUAL, filterRemoveEmptyString(timeLastClick)); + } + + /** + * Set the value of timeLastClick using prefixSearch. { like 'xxx%' } + * If the value is null or empty-string, this condition is ignored. + * + * @param timeLastClick The value of timeLastClick as prefixSearch. + */ + public void setTimeLastClick_PrefixSearch(String timeLastClick) { + registerTimeLastClick(ConditionKey.CK_PREFIX_SEARCH, filterRemoveEmptyString(timeLastClick)); + } + + /** + * Set the value of timeLastClick using likeSearch. { like '%xxx%' } + * If the value is null or empty-string, this condition is ignored. + * You can invoke this method several times and the conditions are set up. + * + * @param timeLastClick The value of timeLastClick as likeSearch. + * @param likeSearchOption Like search option. (NotNull) + */ + public void setTimeLastClick_LikeSearch(String timeLastClick, jp.sf.pal.pompei.allcommon.cbean.coption.LikeSearchOption likeSearchOption) { + registerLikeSearchQuery(ConditionKey.CK_LIKE_SEARCH, filterRemoveEmptyString(timeLastClick), getCValueTimeLastClick(), COL_TIME_LAST_CLICK, J_TimeLastClick, UJ_timeLastClick, likeSearchOption); + } + + /** + * Set the value of timeLastClick using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param timeLastClickList The value of timeLastClick as inScope. + */ + public void setTimeLastClick_InScope(java.util.List timeLastClickList) { + registerTimeLastClick(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyStringFromList(timeLastClickList)); + } + + /** + * Set the value of timeLastClick using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param timeLastClick The value of timeLastClick as inScope. + */ + public void setTimeLastClick_InScope(String timeLastClick, jp.sf.pal.pompei.allcommon.cbean.coption.InScopeOption option) { + registerInScopeQuery(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyString(timeLastClick), getCValueTimeLastClick(), COL_TIME_LAST_CLICK, J_TimeLastClick, UJ_timeLastClick, option); + } + + /** + * Set the value of timeLastClick using notInScope. { not in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param timeLastClickList The value of timeLastClick as notInScope. + */ + public void setTimeLastClick_NotInScope(java.util.List timeLastClickList) { + registerTimeLastClick(ConditionKey.CK_NOT_IN_SCOPE, filterRemoveEmptyStringFromList(timeLastClickList)); + } + + /** + * Register condition of timeLastClick. + * + * @param key Condition key. (NotNull) + * @param value The value of timeLastClick. (Nullable) + */ + protected void registerTimeLastClick(ConditionKey key, Object value) { + registerQuery(key, value, getCValueTimeLastClick(), COL_TIME_LAST_CLICK, J_TimeLastClick, UJ_timeLastClick); + } + + /** + * Register inline condition of timeLastClick. + * + * @param key Condition key. (NotNull) + * @param value The value of timeLastClick. (Nullable) + */ + protected void registerInlineTimeLastClick(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueTimeLastClick(), COL_TIME_LAST_CLICK, J_TimeLastClick, UJ_timeLastClick); + } + + abstract protected ConditionValue getCValueTimeLastClick(); + + /** Column db name of lastPageUrl. */ + protected static final String COL_LAST_PAGE_URL = "LAST_PAGE_URL"; + + /** Column java name of lastPageUrl. */ + protected static final String J_LastPageUrl = "LastPageUrl"; + + /** Column uncapitalised java name of lastPageUrl. */ + protected static final String UJ_lastPageUrl = "lastPageUrl"; + + /** + * Set the value of lastPageUrl using equal. { = } + * If the value is null or empty-string, this condition is ignored. + * + * @param lastPageUrl The value of lastPageUrl as equal. + */ + public void setLastPageUrl_Equal(String lastPageUrl) { + registerLastPageUrl(ConditionKey.CK_EQUAL, filterRemoveEmptyString(lastPageUrl)); + } + + /** + * Set the value of lastPageUrl using notEqual. { != } + * If the value is null or empty-string, this condition is ignored. + * + * @param lastPageUrl The value of lastPageUrl as notEqual. + */ + public void setLastPageUrl_NotEqual(String lastPageUrl) { + registerLastPageUrl(ConditionKey.CK_NOT_EQUAL, filterRemoveEmptyString(lastPageUrl)); + } + + /** + * Set the value of lastPageUrl using greaterThan. { > } + * If the value is null or empty-string, this condition is ignored. + * + * @param lastPageUrl The value of lastPageUrl as greaterThan. + */ + public void setLastPageUrl_GreaterThan(String lastPageUrl) { + registerLastPageUrl(ConditionKey.CK_GREATER_THAN, filterRemoveEmptyString(lastPageUrl)); + } + + /** + * Set the value of lastPageUrl using lessThan. { < } + * If the value is null or empty-string, this condition is ignored. + * + * @param lastPageUrl The value of lastPageUrl as lessThan. + */ + public void setLastPageUrl_LessThan(String lastPageUrl) { + registerLastPageUrl(ConditionKey.CK_LESS_THAN, filterRemoveEmptyString(lastPageUrl)); + } + + /** + * Set the value of lastPageUrl using greaterEqual. { >= } + * If the value is null or empty-string, this condition is ignored. + * + * @param lastPageUrl The value of lastPageUrl as greaterEqual. + */ + public void setLastPageUrl_GreaterEqual(String lastPageUrl) { + registerLastPageUrl(ConditionKey.CK_GREATER_EQUAL, filterRemoveEmptyString(lastPageUrl)); + } + + /** + * Set the value of lastPageUrl using lessEqual. { <= } + * If the value is null or empty-string, this condition is ignored. + * + * @param lastPageUrl The value of lastPageUrl as lessEqual. + */ + public void setLastPageUrl_LessEqual(String lastPageUrl) { + registerLastPageUrl(ConditionKey.CK_LESS_EQUAL, filterRemoveEmptyString(lastPageUrl)); + } + + /** + * Set the value of lastPageUrl using prefixSearch. { like 'xxx%' } + * If the value is null or empty-string, this condition is ignored. + * + * @param lastPageUrl The value of lastPageUrl as prefixSearch. + */ + public void setLastPageUrl_PrefixSearch(String lastPageUrl) { + registerLastPageUrl(ConditionKey.CK_PREFIX_SEARCH, filterRemoveEmptyString(lastPageUrl)); + } + + /** + * Set the value of lastPageUrl using likeSearch. { like '%xxx%' } + * If the value is null or empty-string, this condition is ignored. + * You can invoke this method several times and the conditions are set up. + * + * @param lastPageUrl The value of lastPageUrl as likeSearch. + * @param likeSearchOption Like search option. (NotNull) + */ + public void setLastPageUrl_LikeSearch(String lastPageUrl, jp.sf.pal.pompei.allcommon.cbean.coption.LikeSearchOption likeSearchOption) { + registerLikeSearchQuery(ConditionKey.CK_LIKE_SEARCH, filterRemoveEmptyString(lastPageUrl), getCValueLastPageUrl(), COL_LAST_PAGE_URL, J_LastPageUrl, UJ_lastPageUrl, likeSearchOption); + } + + /** + * Set the value of lastPageUrl using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param lastPageUrlList The value of lastPageUrl as inScope. + */ + public void setLastPageUrl_InScope(java.util.List lastPageUrlList) { + registerLastPageUrl(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyStringFromList(lastPageUrlList)); + } + + /** + * Set the value of lastPageUrl using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param lastPageUrl The value of lastPageUrl as inScope. + */ + public void setLastPageUrl_InScope(String lastPageUrl, jp.sf.pal.pompei.allcommon.cbean.coption.InScopeOption option) { + registerInScopeQuery(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyString(lastPageUrl), getCValueLastPageUrl(), COL_LAST_PAGE_URL, J_LastPageUrl, UJ_lastPageUrl, option); + } + + /** + * Set the value of lastPageUrl using notInScope. { not in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param lastPageUrlList The value of lastPageUrl as notInScope. + */ + public void setLastPageUrl_NotInScope(java.util.List lastPageUrlList) { + registerLastPageUrl(ConditionKey.CK_NOT_IN_SCOPE, filterRemoveEmptyStringFromList(lastPageUrlList)); + } + + /** + * Register condition of lastPageUrl. + * + * @param key Condition key. (NotNull) + * @param value The value of lastPageUrl. (Nullable) + */ + protected void registerLastPageUrl(ConditionKey key, Object value) { + registerQuery(key, value, getCValueLastPageUrl(), COL_LAST_PAGE_URL, J_LastPageUrl, UJ_lastPageUrl); + } + + /** + * Register inline condition of lastPageUrl. + * + * @param key Condition key. (NotNull) + * @param value The value of lastPageUrl. (Nullable) + */ + protected void registerInlineLastPageUrl(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueLastPageUrl(), COL_LAST_PAGE_URL, J_LastPageUrl, UJ_lastPageUrl); + } + + abstract protected ConditionValue getCValueLastPageUrl(); + + // =================================================================================== + // Basic Override + // ============== + /** + * This method overrides the method that is declared at super. + * + * @return Clause string. (NotNull) + */ + public String toString() { + return getSqlClause().getClause(); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/AbstractBsZonesCQ.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/AbstractBsZonesCQ.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/AbstractBsZonesCQ.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,562 @@ + +package jp.sf.pal.pompei.cbean.cq.bs; + + + +import jp.sf.pal.pompei.allcommon.cbean.*; +import jp.sf.pal.pompei.allcommon.cbean.ckey.*; +import jp.sf.pal.pompei.allcommon.cbean.cvalue.ConditionValue; +import jp.sf.pal.pompei.allcommon.cbean.sqlclause.SqlClause; +import jp.sf.pal.pompei.cbean.cq.*; + +/** + * The condition-query of ZONES. + * + * @author DBFlute(AutoGenerator) + */ +public abstract class AbstractBsZonesCQ extends AbstractConditionQuery { + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param childQuery Child query as abstract class. (Nullable: If null, this is base instance.) + * @param sqlClause SQL clause instance. (NotNull) + * @param aliasName My alias name. (NotNull) + * @param nestLevel Nest level. + */ + public AbstractBsZonesCQ(ConditionQuery childQuery, SqlClause sqlClause, String aliasName, int nestLevel) { + super(childQuery, sqlClause, aliasName, nestLevel); + } + + // =================================================================================== + // Table Name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + final public String getTableDbName() { + return "ZONES"; + } + + // =================================================================================== + // Query + // ===== + + // /* * * * * * * * * * * * * * * * * * * * * * * + // MyTable = [ZONES] + // * * * * * * * * */ + + + /** Column db name of zoneId. */ + protected static final String COL_ZONE_ID = "ZONE_ID"; + + /** Column java name of zoneId. */ + protected static final String J_ZoneId = "ZoneId"; + + /** Column uncapitalised java name of zoneId. */ + protected static final String UJ_zoneId = "zoneId"; + + /** + * Set the value of zoneId using equal. { = } + * + * @param zoneId The value of zoneId as equal. + */ + public void setZoneId_Equal(java.math.BigDecimal zoneId) { + registerZoneId(ConditionKey.CK_EQUAL, zoneId); + } + + /** + * Set the value of zoneId using notEqual. { != } + * + * @param zoneId The value of zoneId as notEqual. + */ + public void setZoneId_NotEqual(java.math.BigDecimal zoneId) { + registerZoneId(ConditionKey.CK_NOT_EQUAL, zoneId); + } + + /** + * Set the value of zoneId using greaterThan. { > } + * + * @param zoneId The value of zoneId as greaterThan. + */ + public void setZoneId_GreaterThan(java.math.BigDecimal zoneId) { + registerZoneId(ConditionKey.CK_GREATER_THAN, zoneId); + } + + /** + * Set the value of zoneId using lessThan. { < } + * + * @param zoneId The value of zoneId as lessThan. + */ + public void setZoneId_LessThan(java.math.BigDecimal zoneId) { + registerZoneId(ConditionKey.CK_LESS_THAN, zoneId); + } + + /** + * Set the value of zoneId using greaterEqual. { >= } + * + * @param zoneId The value of zoneId as greaterEqual. + */ + public void setZoneId_GreaterEqual(java.math.BigDecimal zoneId) { + registerZoneId(ConditionKey.CK_GREATER_EQUAL, zoneId); + } + + /** + * Set the value of zoneId using lessEqual. { <= } + * + * @param zoneId The value of zoneId as lessEqual. + */ + public void setZoneId_LessEqual(java.math.BigDecimal zoneId) { + registerZoneId(ConditionKey.CK_LESS_EQUAL, zoneId); + } + + /** + * Set the value of zoneId using inScope. { in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param zoneIdList The value of zoneId as inScope. + */ + public void setZoneId_InScope(java.util.List zoneIdList) { + registerZoneId(ConditionKey.CK_IN_SCOPE, zoneIdList); + } + + /** + * Set the value of zoneId using notInScope. { not in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param zoneIdList The value of zoneId as notInScope. + */ + public void setZoneId_NotInScope(java.util.List zoneIdList) { + registerZoneId(ConditionKey.CK_NOT_IN_SCOPE, zoneIdList); + } + + /** + * Register condition of zoneId. + * + * @param key Condition key. (NotNull) + * @param value The value of zoneId. (Nullable) + */ + protected void registerZoneId(ConditionKey key, Object value) { + registerQuery(key, value, getCValueZoneId(), COL_ZONE_ID, J_ZoneId, UJ_zoneId); + } + + /** + * Register inline condition of zoneId. + * + * @param key Condition key. (NotNull) + * @param value The value of zoneId. (Nullable) + */ + protected void registerInlineZoneId(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueZoneId(), COL_ZONE_ID, J_ZoneId, UJ_zoneId); + } + + abstract protected ConditionValue getCValueZoneId(); + + /** Column db name of zoneCountryId. */ + protected static final String COL_ZONE_COUNTRY_ID = "ZONE_COUNTRY_ID"; + + /** Column java name of zoneCountryId. */ + protected static final String J_ZoneCountryId = "ZoneCountryId"; + + /** Column uncapitalised java name of zoneCountryId. */ + protected static final String UJ_zoneCountryId = "zoneCountryId"; + + /** + * Set the value of zoneCountryId using equal. { = } + * + * @param zoneCountryId The value of zoneCountryId as equal. + */ + public void setZoneCountryId_Equal(java.math.BigDecimal zoneCountryId) { + registerZoneCountryId(ConditionKey.CK_EQUAL, zoneCountryId); + } + + /** + * Set the value of zoneCountryId using notEqual. { != } + * + * @param zoneCountryId The value of zoneCountryId as notEqual. + */ + public void setZoneCountryId_NotEqual(java.math.BigDecimal zoneCountryId) { + registerZoneCountryId(ConditionKey.CK_NOT_EQUAL, zoneCountryId); + } + + /** + * Set the value of zoneCountryId using greaterThan. { > } + * + * @param zoneCountryId The value of zoneCountryId as greaterThan. + */ + public void setZoneCountryId_GreaterThan(java.math.BigDecimal zoneCountryId) { + registerZoneCountryId(ConditionKey.CK_GREATER_THAN, zoneCountryId); + } + + /** + * Set the value of zoneCountryId using lessThan. { < } + * + * @param zoneCountryId The value of zoneCountryId as lessThan. + */ + public void setZoneCountryId_LessThan(java.math.BigDecimal zoneCountryId) { + registerZoneCountryId(ConditionKey.CK_LESS_THAN, zoneCountryId); + } + + /** + * Set the value of zoneCountryId using greaterEqual. { >= } + * + * @param zoneCountryId The value of zoneCountryId as greaterEqual. + */ + public void setZoneCountryId_GreaterEqual(java.math.BigDecimal zoneCountryId) { + registerZoneCountryId(ConditionKey.CK_GREATER_EQUAL, zoneCountryId); + } + + /** + * Set the value of zoneCountryId using lessEqual. { <= } + * + * @param zoneCountryId The value of zoneCountryId as lessEqual. + */ + public void setZoneCountryId_LessEqual(java.math.BigDecimal zoneCountryId) { + registerZoneCountryId(ConditionKey.CK_LESS_EQUAL, zoneCountryId); + } + + /** + * Set the value of zoneCountryId using inScope. { in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param zoneCountryIdList The value of zoneCountryId as inScope. + */ + public void setZoneCountryId_InScope(java.util.List zoneCountryIdList) { + registerZoneCountryId(ConditionKey.CK_IN_SCOPE, zoneCountryIdList); + } + + /** + * Set the value of zoneCountryId using notInScope. { not in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param zoneCountryIdList The value of zoneCountryId as notInScope. + */ + public void setZoneCountryId_NotInScope(java.util.List zoneCountryIdList) { + registerZoneCountryId(ConditionKey.CK_NOT_IN_SCOPE, zoneCountryIdList); + } + + /** + * Register condition of zoneCountryId. + * + * @param key Condition key. (NotNull) + * @param value The value of zoneCountryId. (Nullable) + */ + protected void registerZoneCountryId(ConditionKey key, Object value) { + registerQuery(key, value, getCValueZoneCountryId(), COL_ZONE_COUNTRY_ID, J_ZoneCountryId, UJ_zoneCountryId); + } + + /** + * Register inline condition of zoneCountryId. + * + * @param key Condition key. (NotNull) + * @param value The value of zoneCountryId. (Nullable) + */ + protected void registerInlineZoneCountryId(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueZoneCountryId(), COL_ZONE_COUNTRY_ID, J_ZoneCountryId, UJ_zoneCountryId); + } + + abstract protected ConditionValue getCValueZoneCountryId(); + + /** Column db name of zoneCode. */ + protected static final String COL_ZONE_CODE = "ZONE_CODE"; + + /** Column java name of zoneCode. */ + protected static final String J_ZoneCode = "ZoneCode"; + + /** Column uncapitalised java name of zoneCode. */ + protected static final String UJ_zoneCode = "zoneCode"; + + /** + * Set the value of zoneCode using equal. { = } + * If the value is null or empty-string, this condition is ignored. + * + * @param zoneCode The value of zoneCode as equal. + */ + public void setZoneCode_Equal(String zoneCode) { + registerZoneCode(ConditionKey.CK_EQUAL, filterRemoveEmptyString(zoneCode)); + } + + /** + * Set the value of zoneCode using notEqual. { != } + * If the value is null or empty-string, this condition is ignored. + * + * @param zoneCode The value of zoneCode as notEqual. + */ + public void setZoneCode_NotEqual(String zoneCode) { + registerZoneCode(ConditionKey.CK_NOT_EQUAL, filterRemoveEmptyString(zoneCode)); + } + + /** + * Set the value of zoneCode using greaterThan. { > } + * If the value is null or empty-string, this condition is ignored. + * + * @param zoneCode The value of zoneCode as greaterThan. + */ + public void setZoneCode_GreaterThan(String zoneCode) { + registerZoneCode(ConditionKey.CK_GREATER_THAN, filterRemoveEmptyString(zoneCode)); + } + + /** + * Set the value of zoneCode using lessThan. { < } + * If the value is null or empty-string, this condition is ignored. + * + * @param zoneCode The value of zoneCode as lessThan. + */ + public void setZoneCode_LessThan(String zoneCode) { + registerZoneCode(ConditionKey.CK_LESS_THAN, filterRemoveEmptyString(zoneCode)); + } + + /** + * Set the value of zoneCode using greaterEqual. { >= } + * If the value is null or empty-string, this condition is ignored. + * + * @param zoneCode The value of zoneCode as greaterEqual. + */ + public void setZoneCode_GreaterEqual(String zoneCode) { + registerZoneCode(ConditionKey.CK_GREATER_EQUAL, filterRemoveEmptyString(zoneCode)); + } + + /** + * Set the value of zoneCode using lessEqual. { <= } + * If the value is null or empty-string, this condition is ignored. + * + * @param zoneCode The value of zoneCode as lessEqual. + */ + public void setZoneCode_LessEqual(String zoneCode) { + registerZoneCode(ConditionKey.CK_LESS_EQUAL, filterRemoveEmptyString(zoneCode)); + } + + /** + * Set the value of zoneCode using prefixSearch. { like 'xxx%' } + * If the value is null or empty-string, this condition is ignored. + * + * @param zoneCode The value of zoneCode as prefixSearch. + */ + public void setZoneCode_PrefixSearch(String zoneCode) { + registerZoneCode(ConditionKey.CK_PREFIX_SEARCH, filterRemoveEmptyString(zoneCode)); + } + + /** + * Set the value of zoneCode using likeSearch. { like '%xxx%' } + * If the value is null or empty-string, this condition is ignored. + * You can invoke this method several times and the conditions are set up. + * + * @param zoneCode The value of zoneCode as likeSearch. + * @param likeSearchOption Like search option. (NotNull) + */ + public void setZoneCode_LikeSearch(String zoneCode, jp.sf.pal.pompei.allcommon.cbean.coption.LikeSearchOption likeSearchOption) { + registerLikeSearchQuery(ConditionKey.CK_LIKE_SEARCH, filterRemoveEmptyString(zoneCode), getCValueZoneCode(), COL_ZONE_CODE, J_ZoneCode, UJ_zoneCode, likeSearchOption); + } + + /** + * Set the value of zoneCode using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param zoneCodeList The value of zoneCode as inScope. + */ + public void setZoneCode_InScope(java.util.List zoneCodeList) { + registerZoneCode(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyStringFromList(zoneCodeList)); + } + + /** + * Set the value of zoneCode using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param zoneCode The value of zoneCode as inScope. + */ + public void setZoneCode_InScope(String zoneCode, jp.sf.pal.pompei.allcommon.cbean.coption.InScopeOption option) { + registerInScopeQuery(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyString(zoneCode), getCValueZoneCode(), COL_ZONE_CODE, J_ZoneCode, UJ_zoneCode, option); + } + + /** + * Set the value of zoneCode using notInScope. { not in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param zoneCodeList The value of zoneCode as notInScope. + */ + public void setZoneCode_NotInScope(java.util.List zoneCodeList) { + registerZoneCode(ConditionKey.CK_NOT_IN_SCOPE, filterRemoveEmptyStringFromList(zoneCodeList)); + } + + /** + * Register condition of zoneCode. + * + * @param key Condition key. (NotNull) + * @param value The value of zoneCode. (Nullable) + */ + protected void registerZoneCode(ConditionKey key, Object value) { + registerQuery(key, value, getCValueZoneCode(), COL_ZONE_CODE, J_ZoneCode, UJ_zoneCode); + } + + /** + * Register inline condition of zoneCode. + * + * @param key Condition key. (NotNull) + * @param value The value of zoneCode. (Nullable) + */ + protected void registerInlineZoneCode(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueZoneCode(), COL_ZONE_CODE, J_ZoneCode, UJ_zoneCode); + } + + abstract protected ConditionValue getCValueZoneCode(); + + /** Column db name of zoneName. */ + protected static final String COL_ZONE_NAME = "ZONE_NAME"; + + /** Column java name of zoneName. */ + protected static final String J_ZoneName = "ZoneName"; + + /** Column uncapitalised java name of zoneName. */ + protected static final String UJ_zoneName = "zoneName"; + + /** + * Set the value of zoneName using equal. { = } + * If the value is null or empty-string, this condition is ignored. + * + * @param zoneName The value of zoneName as equal. + */ + public void setZoneName_Equal(String zoneName) { + registerZoneName(ConditionKey.CK_EQUAL, filterRemoveEmptyString(zoneName)); + } + + /** + * Set the value of zoneName using notEqual. { != } + * If the value is null or empty-string, this condition is ignored. + * + * @param zoneName The value of zoneName as notEqual. + */ + public void setZoneName_NotEqual(String zoneName) { + registerZoneName(ConditionKey.CK_NOT_EQUAL, filterRemoveEmptyString(zoneName)); + } + + /** + * Set the value of zoneName using greaterThan. { > } + * If the value is null or empty-string, this condition is ignored. + * + * @param zoneName The value of zoneName as greaterThan. + */ + public void setZoneName_GreaterThan(String zoneName) { + registerZoneName(ConditionKey.CK_GREATER_THAN, filterRemoveEmptyString(zoneName)); + } + + /** + * Set the value of zoneName using lessThan. { < } + * If the value is null or empty-string, this condition is ignored. + * + * @param zoneName The value of zoneName as lessThan. + */ + public void setZoneName_LessThan(String zoneName) { + registerZoneName(ConditionKey.CK_LESS_THAN, filterRemoveEmptyString(zoneName)); + } + + /** + * Set the value of zoneName using greaterEqual. { >= } + * If the value is null or empty-string, this condition is ignored. + * + * @param zoneName The value of zoneName as greaterEqual. + */ + public void setZoneName_GreaterEqual(String zoneName) { + registerZoneName(ConditionKey.CK_GREATER_EQUAL, filterRemoveEmptyString(zoneName)); + } + + /** + * Set the value of zoneName using lessEqual. { <= } + * If the value is null or empty-string, this condition is ignored. + * + * @param zoneName The value of zoneName as lessEqual. + */ + public void setZoneName_LessEqual(String zoneName) { + registerZoneName(ConditionKey.CK_LESS_EQUAL, filterRemoveEmptyString(zoneName)); + } + + /** + * Set the value of zoneName using prefixSearch. { like 'xxx%' } + * If the value is null or empty-string, this condition is ignored. + * + * @param zoneName The value of zoneName as prefixSearch. + */ + public void setZoneName_PrefixSearch(String zoneName) { + registerZoneName(ConditionKey.CK_PREFIX_SEARCH, filterRemoveEmptyString(zoneName)); + } + + /** + * Set the value of zoneName using likeSearch. { like '%xxx%' } + * If the value is null or empty-string, this condition is ignored. + * You can invoke this method several times and the conditions are set up. + * + * @param zoneName The value of zoneName as likeSearch. + * @param likeSearchOption Like search option. (NotNull) + */ + public void setZoneName_LikeSearch(String zoneName, jp.sf.pal.pompei.allcommon.cbean.coption.LikeSearchOption likeSearchOption) { + registerLikeSearchQuery(ConditionKey.CK_LIKE_SEARCH, filterRemoveEmptyString(zoneName), getCValueZoneName(), COL_ZONE_NAME, J_ZoneName, UJ_zoneName, likeSearchOption); + } + + /** + * Set the value of zoneName using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param zoneNameList The value of zoneName as inScope. + */ + public void setZoneName_InScope(java.util.List zoneNameList) { + registerZoneName(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyStringFromList(zoneNameList)); + } + + /** + * Set the value of zoneName using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param zoneName The value of zoneName as inScope. + */ + public void setZoneName_InScope(String zoneName, jp.sf.pal.pompei.allcommon.cbean.coption.InScopeOption option) { + registerInScopeQuery(ConditionKey.CK_IN_SCOPE, filterRemoveEmptyString(zoneName), getCValueZoneName(), COL_ZONE_NAME, J_ZoneName, UJ_zoneName, option); + } + + /** + * Set the value of zoneName using notInScope. { not in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param zoneNameList The value of zoneName as notInScope. + */ + public void setZoneName_NotInScope(java.util.List zoneNameList) { + registerZoneName(ConditionKey.CK_NOT_IN_SCOPE, filterRemoveEmptyStringFromList(zoneNameList)); + } + + /** + * Register condition of zoneName. + * + * @param key Condition key. (NotNull) + * @param value The value of zoneName. (Nullable) + */ + protected void registerZoneName(ConditionKey key, Object value) { + registerQuery(key, value, getCValueZoneName(), COL_ZONE_NAME, J_ZoneName, UJ_zoneName); + } + + /** + * Register inline condition of zoneName. + * + * @param key Condition key. (NotNull) + * @param value The value of zoneName. (Nullable) + */ + protected void registerInlineZoneName(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueZoneName(), COL_ZONE_NAME, J_ZoneName, UJ_zoneName); + } + + abstract protected ConditionValue getCValueZoneName(); + + // =================================================================================== + // Basic Override + // ============== + /** + * This method overrides the method that is declared at super. + * + * @return Clause string. (NotNull) + */ + public String toString() { + return getSqlClause().getClause(); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/AbstractBsZonesToGeoZonesCQ.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/AbstractBsZonesToGeoZonesCQ.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/AbstractBsZonesToGeoZonesCQ.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,718 @@ + +package jp.sf.pal.pompei.cbean.cq.bs; + + + +import jp.sf.pal.pompei.allcommon.cbean.*; +import jp.sf.pal.pompei.allcommon.cbean.ckey.*; +import jp.sf.pal.pompei.allcommon.cbean.cvalue.ConditionValue; +import jp.sf.pal.pompei.allcommon.cbean.sqlclause.SqlClause; +import jp.sf.pal.pompei.cbean.cq.*; + +/** + * The condition-query of ZONES_TO_GEO_ZONES. + * + * @author DBFlute(AutoGenerator) + */ +public abstract class AbstractBsZonesToGeoZonesCQ extends AbstractConditionQuery { + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param childQuery Child query as abstract class. (Nullable: If null, this is base instance.) + * @param sqlClause SQL clause instance. (NotNull) + * @param aliasName My alias name. (NotNull) + * @param nestLevel Nest level. + */ + public AbstractBsZonesToGeoZonesCQ(ConditionQuery childQuery, SqlClause sqlClause, String aliasName, int nestLevel) { + super(childQuery, sqlClause, aliasName, nestLevel); + } + + // =================================================================================== + // Table Name + // ========== + /** + * This method implements the method that is declared at super. + * + * @return Table db-name. (NotNull) + */ + final public String getTableDbName() { + return "ZONES_TO_GEO_ZONES"; + } + + // =================================================================================== + // Query + // ===== + + // /* * * * * * * * * * * * * * * * * * * * * * * + // MyTable = [ZONES_TO_GEO_ZONES] + // * * * * * * * * */ + + + /** Column db name of associationId. */ + protected static final String COL_ASSOCIATION_ID = "ASSOCIATION_ID"; + + /** Column java name of associationId. */ + protected static final String J_AssociationId = "AssociationId"; + + /** Column uncapitalised java name of associationId. */ + protected static final String UJ_associationId = "associationId"; + + /** + * Set the value of associationId using equal. { = } + * + * @param associationId The value of associationId as equal. + */ + public void setAssociationId_Equal(java.math.BigDecimal associationId) { + registerAssociationId(ConditionKey.CK_EQUAL, associationId); + } + + /** + * Set the value of associationId using notEqual. { != } + * + * @param associationId The value of associationId as notEqual. + */ + public void setAssociationId_NotEqual(java.math.BigDecimal associationId) { + registerAssociationId(ConditionKey.CK_NOT_EQUAL, associationId); + } + + /** + * Set the value of associationId using greaterThan. { > } + * + * @param associationId The value of associationId as greaterThan. + */ + public void setAssociationId_GreaterThan(java.math.BigDecimal associationId) { + registerAssociationId(ConditionKey.CK_GREATER_THAN, associationId); + } + + /** + * Set the value of associationId using lessThan. { < } + * + * @param associationId The value of associationId as lessThan. + */ + public void setAssociationId_LessThan(java.math.BigDecimal associationId) { + registerAssociationId(ConditionKey.CK_LESS_THAN, associationId); + } + + /** + * Set the value of associationId using greaterEqual. { >= } + * + * @param associationId The value of associationId as greaterEqual. + */ + public void setAssociationId_GreaterEqual(java.math.BigDecimal associationId) { + registerAssociationId(ConditionKey.CK_GREATER_EQUAL, associationId); + } + + /** + * Set the value of associationId using lessEqual. { <= } + * + * @param associationId The value of associationId as lessEqual. + */ + public void setAssociationId_LessEqual(java.math.BigDecimal associationId) { + registerAssociationId(ConditionKey.CK_LESS_EQUAL, associationId); + } + + /** + * Set the value of associationId using inScope. { in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param associationIdList The value of associationId as inScope. + */ + public void setAssociationId_InScope(java.util.List associationIdList) { + registerAssociationId(ConditionKey.CK_IN_SCOPE, associationIdList); + } + + /** + * Set the value of associationId using notInScope. { not in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param associationIdList The value of associationId as notInScope. + */ + public void setAssociationId_NotInScope(java.util.List associationIdList) { + registerAssociationId(ConditionKey.CK_NOT_IN_SCOPE, associationIdList); + } + + /** + * Register condition of associationId. + * + * @param key Condition key. (NotNull) + * @param value The value of associationId. (Nullable) + */ + protected void registerAssociationId(ConditionKey key, Object value) { + registerQuery(key, value, getCValueAssociationId(), COL_ASSOCIATION_ID, J_AssociationId, UJ_associationId); + } + + /** + * Register inline condition of associationId. + * + * @param key Condition key. (NotNull) + * @param value The value of associationId. (Nullable) + */ + protected void registerInlineAssociationId(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueAssociationId(), COL_ASSOCIATION_ID, J_AssociationId, UJ_associationId); + } + + abstract protected ConditionValue getCValueAssociationId(); + + /** Column db name of zoneCountryId. */ + protected static final String COL_ZONE_COUNTRY_ID = "ZONE_COUNTRY_ID"; + + /** Column java name of zoneCountryId. */ + protected static final String J_ZoneCountryId = "ZoneCountryId"; + + /** Column uncapitalised java name of zoneCountryId. */ + protected static final String UJ_zoneCountryId = "zoneCountryId"; + + /** + * Set the value of zoneCountryId using equal. { = } + * + * @param zoneCountryId The value of zoneCountryId as equal. + */ + public void setZoneCountryId_Equal(java.math.BigDecimal zoneCountryId) { + registerZoneCountryId(ConditionKey.CK_EQUAL, zoneCountryId); + } + + /** + * Set the value of zoneCountryId using notEqual. { != } + * + * @param zoneCountryId The value of zoneCountryId as notEqual. + */ + public void setZoneCountryId_NotEqual(java.math.BigDecimal zoneCountryId) { + registerZoneCountryId(ConditionKey.CK_NOT_EQUAL, zoneCountryId); + } + + /** + * Set the value of zoneCountryId using greaterThan. { > } + * + * @param zoneCountryId The value of zoneCountryId as greaterThan. + */ + public void setZoneCountryId_GreaterThan(java.math.BigDecimal zoneCountryId) { + registerZoneCountryId(ConditionKey.CK_GREATER_THAN, zoneCountryId); + } + + /** + * Set the value of zoneCountryId using lessThan. { < } + * + * @param zoneCountryId The value of zoneCountryId as lessThan. + */ + public void setZoneCountryId_LessThan(java.math.BigDecimal zoneCountryId) { + registerZoneCountryId(ConditionKey.CK_LESS_THAN, zoneCountryId); + } + + /** + * Set the value of zoneCountryId using greaterEqual. { >= } + * + * @param zoneCountryId The value of zoneCountryId as greaterEqual. + */ + public void setZoneCountryId_GreaterEqual(java.math.BigDecimal zoneCountryId) { + registerZoneCountryId(ConditionKey.CK_GREATER_EQUAL, zoneCountryId); + } + + /** + * Set the value of zoneCountryId using lessEqual. { <= } + * + * @param zoneCountryId The value of zoneCountryId as lessEqual. + */ + public void setZoneCountryId_LessEqual(java.math.BigDecimal zoneCountryId) { + registerZoneCountryId(ConditionKey.CK_LESS_EQUAL, zoneCountryId); + } + + /** + * Set the value of zoneCountryId using inScope. { in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param zoneCountryIdList The value of zoneCountryId as inScope. + */ + public void setZoneCountryId_InScope(java.util.List zoneCountryIdList) { + registerZoneCountryId(ConditionKey.CK_IN_SCOPE, zoneCountryIdList); + } + + /** + * Set the value of zoneCountryId using notInScope. { not in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param zoneCountryIdList The value of zoneCountryId as notInScope. + */ + public void setZoneCountryId_NotInScope(java.util.List zoneCountryIdList) { + registerZoneCountryId(ConditionKey.CK_NOT_IN_SCOPE, zoneCountryIdList); + } + + /** + * Register condition of zoneCountryId. + * + * @param key Condition key. (NotNull) + * @param value The value of zoneCountryId. (Nullable) + */ + protected void registerZoneCountryId(ConditionKey key, Object value) { + registerQuery(key, value, getCValueZoneCountryId(), COL_ZONE_COUNTRY_ID, J_ZoneCountryId, UJ_zoneCountryId); + } + + /** + * Register inline condition of zoneCountryId. + * + * @param key Condition key. (NotNull) + * @param value The value of zoneCountryId. (Nullable) + */ + protected void registerInlineZoneCountryId(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueZoneCountryId(), COL_ZONE_COUNTRY_ID, J_ZoneCountryId, UJ_zoneCountryId); + } + + abstract protected ConditionValue getCValueZoneCountryId(); + + /** Column db name of zoneId. */ + protected static final String COL_ZONE_ID = "ZONE_ID"; + + /** Column java name of zoneId. */ + protected static final String J_ZoneId = "ZoneId"; + + /** Column uncapitalised java name of zoneId. */ + protected static final String UJ_zoneId = "zoneId"; + + /** + * Set the value of zoneId using equal. { = } + * + * @param zoneId The value of zoneId as equal. + */ + public void setZoneId_Equal(java.math.BigDecimal zoneId) { + registerZoneId(ConditionKey.CK_EQUAL, zoneId); + } + + /** + * Set the value of zoneId using notEqual. { != } + * + * @param zoneId The value of zoneId as notEqual. + */ + public void setZoneId_NotEqual(java.math.BigDecimal zoneId) { + registerZoneId(ConditionKey.CK_NOT_EQUAL, zoneId); + } + + /** + * Set the value of zoneId using greaterThan. { > } + * + * @param zoneId The value of zoneId as greaterThan. + */ + public void setZoneId_GreaterThan(java.math.BigDecimal zoneId) { + registerZoneId(ConditionKey.CK_GREATER_THAN, zoneId); + } + + /** + * Set the value of zoneId using lessThan. { < } + * + * @param zoneId The value of zoneId as lessThan. + */ + public void setZoneId_LessThan(java.math.BigDecimal zoneId) { + registerZoneId(ConditionKey.CK_LESS_THAN, zoneId); + } + + /** + * Set the value of zoneId using greaterEqual. { >= } + * + * @param zoneId The value of zoneId as greaterEqual. + */ + public void setZoneId_GreaterEqual(java.math.BigDecimal zoneId) { + registerZoneId(ConditionKey.CK_GREATER_EQUAL, zoneId); + } + + /** + * Set the value of zoneId using lessEqual. { <= } + * + * @param zoneId The value of zoneId as lessEqual. + */ + public void setZoneId_LessEqual(java.math.BigDecimal zoneId) { + registerZoneId(ConditionKey.CK_LESS_EQUAL, zoneId); + } + + /** + * Set the value of zoneId using inScope. { in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param zoneIdList The value of zoneId as inScope. + */ + public void setZoneId_InScope(java.util.List zoneIdList) { + registerZoneId(ConditionKey.CK_IN_SCOPE, zoneIdList); + } + + /** + * Set the value of zoneId using notInScope. { not in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param zoneIdList The value of zoneId as notInScope. + */ + public void setZoneId_NotInScope(java.util.List zoneIdList) { + registerZoneId(ConditionKey.CK_NOT_IN_SCOPE, zoneIdList); + } + + /** + * Set the value of zoneId using isNull. { is null } + */ + public void setZoneId_IsNull() { + registerZoneId(ConditionKey.CK_IS_NULL, DUMMY_OBJECT); + } + + /** + * Set the value of zoneId using isNotNull. { is not null } + */ + public void setZoneId_IsNotNull() { + registerZoneId(ConditionKey.CK_IS_NOT_NULL, DUMMY_OBJECT); + } + + /** + * Register condition of zoneId. + * + * @param key Condition key. (NotNull) + * @param value The value of zoneId. (Nullable) + */ + protected void registerZoneId(ConditionKey key, Object value) { + registerQuery(key, value, getCValueZoneId(), COL_ZONE_ID, J_ZoneId, UJ_zoneId); + } + + /** + * Register inline condition of zoneId. + * + * @param key Condition key. (NotNull) + * @param value The value of zoneId. (Nullable) + */ + protected void registerInlineZoneId(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueZoneId(), COL_ZONE_ID, J_ZoneId, UJ_zoneId); + } + + abstract protected ConditionValue getCValueZoneId(); + + /** Column db name of geoZoneId. */ + protected static final String COL_GEO_ZONE_ID = "GEO_ZONE_ID"; + + /** Column java name of geoZoneId. */ + protected static final String J_GeoZoneId = "GeoZoneId"; + + /** Column uncapitalised java name of geoZoneId. */ + protected static final String UJ_geoZoneId = "geoZoneId"; + + /** + * Set the value of geoZoneId using equal. { = } + * + * @param geoZoneId The value of geoZoneId as equal. + */ + public void setGeoZoneId_Equal(java.math.BigDecimal geoZoneId) { + registerGeoZoneId(ConditionKey.CK_EQUAL, geoZoneId); + } + + /** + * Set the value of geoZoneId using notEqual. { != } + * + * @param geoZoneId The value of geoZoneId as notEqual. + */ + public void setGeoZoneId_NotEqual(java.math.BigDecimal geoZoneId) { + registerGeoZoneId(ConditionKey.CK_NOT_EQUAL, geoZoneId); + } + + /** + * Set the value of geoZoneId using greaterThan. { > } + * + * @param geoZoneId The value of geoZoneId as greaterThan. + */ + public void setGeoZoneId_GreaterThan(java.math.BigDecimal geoZoneId) { + registerGeoZoneId(ConditionKey.CK_GREATER_THAN, geoZoneId); + } + + /** + * Set the value of geoZoneId using lessThan. { < } + * + * @param geoZoneId The value of geoZoneId as lessThan. + */ + public void setGeoZoneId_LessThan(java.math.BigDecimal geoZoneId) { + registerGeoZoneId(ConditionKey.CK_LESS_THAN, geoZoneId); + } + + /** + * Set the value of geoZoneId using greaterEqual. { >= } + * + * @param geoZoneId The value of geoZoneId as greaterEqual. + */ + public void setGeoZoneId_GreaterEqual(java.math.BigDecimal geoZoneId) { + registerGeoZoneId(ConditionKey.CK_GREATER_EQUAL, geoZoneId); + } + + /** + * Set the value of geoZoneId using lessEqual. { <= } + * + * @param geoZoneId The value of geoZoneId as lessEqual. + */ + public void setGeoZoneId_LessEqual(java.math.BigDecimal geoZoneId) { + registerGeoZoneId(ConditionKey.CK_LESS_EQUAL, geoZoneId); + } + + /** + * Set the value of geoZoneId using inScope. { in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param geoZoneIdList The value of geoZoneId as inScope. + */ + public void setGeoZoneId_InScope(java.util.List geoZoneIdList) { + registerGeoZoneId(ConditionKey.CK_IN_SCOPE, geoZoneIdList); + } + + /** + * Set the value of geoZoneId using notInScope. { not in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param geoZoneIdList The value of geoZoneId as notInScope. + */ + public void setGeoZoneId_NotInScope(java.util.List geoZoneIdList) { + registerGeoZoneId(ConditionKey.CK_NOT_IN_SCOPE, geoZoneIdList); + } + + /** + * Set the value of geoZoneId using isNull. { is null } + */ + public void setGeoZoneId_IsNull() { + registerGeoZoneId(ConditionKey.CK_IS_NULL, DUMMY_OBJECT); + } + + /** + * Set the value of geoZoneId using isNotNull. { is not null } + */ + public void setGeoZoneId_IsNotNull() { + registerGeoZoneId(ConditionKey.CK_IS_NOT_NULL, DUMMY_OBJECT); + } + + /** + * Register condition of geoZoneId. + * + * @param key Condition key. (NotNull) + * @param value The value of geoZoneId. (Nullable) + */ + protected void registerGeoZoneId(ConditionKey key, Object value) { + registerQuery(key, value, getCValueGeoZoneId(), COL_GEO_ZONE_ID, J_GeoZoneId, UJ_geoZoneId); + } + + /** + * Register inline condition of geoZoneId. + * + * @param key Condition key. (NotNull) + * @param value The value of geoZoneId. (Nullable) + */ + protected void registerInlineGeoZoneId(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueGeoZoneId(), COL_GEO_ZONE_ID, J_GeoZoneId, UJ_geoZoneId); + } + + abstract protected ConditionValue getCValueGeoZoneId(); + + /** Column db name of lastModified. */ + protected static final String COL_LAST_MODIFIED = "LAST_MODIFIED"; + + /** Column java name of lastModified. */ + protected static final String J_LastModified = "LastModified"; + + /** Column uncapitalised java name of lastModified. */ + protected static final String UJ_lastModified = "lastModified"; + + /** + * Set the value of lastModified using equal. { = } + * + * @param lastModified The value of lastModified as equal. + */ + public void setLastModified_Equal(java.sql.Timestamp lastModified) { + registerLastModified(ConditionKey.CK_EQUAL, lastModified); + } + + /** + * Set the value of lastModified using notEqual. { != } + * + * @param lastModified The value of lastModified as notEqual. + */ + public void setLastModified_NotEqual(java.sql.Timestamp lastModified) { + registerLastModified(ConditionKey.CK_NOT_EQUAL, lastModified); + } + + /** + * Set the value of lastModified using greaterThan. { > } + * + * @param lastModified The value of lastModified as greaterThan. + */ + public void setLastModified_GreaterThan(java.sql.Timestamp lastModified) { + registerLastModified(ConditionKey.CK_GREATER_THAN, lastModified); + } + + /** + * Set the value of lastModified using lessThan. { < } + * + * @param lastModified The value of lastModified as lessThan. + */ + public void setLastModified_LessThan(java.sql.Timestamp lastModified) { + registerLastModified(ConditionKey.CK_LESS_THAN, lastModified); + } + + /** + * Set the value of lastModified using greaterEqual. { >= } + * + * @param lastModified The value of lastModified as greaterEqual. + */ + public void setLastModified_GreaterEqual(java.sql.Timestamp lastModified) { + registerLastModified(ConditionKey.CK_GREATER_EQUAL, lastModified); + } + + /** + * Set the value of lastModified using lessEqual. { <= } + * + * @param lastModified The value of lastModified as lessEqual. + */ + public void setLastModified_LessEqual(java.sql.Timestamp lastModified) { + registerLastModified(ConditionKey.CK_LESS_EQUAL, lastModified); + } + + /** + * Set the value of lastModified using from-to. { $fromDate <= COLUMN_NAME <= $toDate } + * + * @param lastModified The value of lastModified as from-to. + * @param fromToOption From-To option. (NotNull) + */ + public void setLastModified_FromTo(java.sql.Timestamp fromDate, java.sql.Timestamp toDate, jp.sf.pal.pompei.allcommon.cbean.coption.FromToOption fromToOption) { + registerFromToQuery(fromDate, toDate, getCValueLastModified(), COL_LAST_MODIFIED, J_LastModified, UJ_lastModified, fromToOption); + } + + /** + * Set the value of lastModified using isNull. { is null } + */ + public void setLastModified_IsNull() { + registerLastModified(ConditionKey.CK_IS_NULL, DUMMY_OBJECT); + } + + /** + * Set the value of lastModified using isNotNull. { is not null } + */ + public void setLastModified_IsNotNull() { + registerLastModified(ConditionKey.CK_IS_NOT_NULL, DUMMY_OBJECT); + } + + /** + * Register condition of lastModified. + * + * @param key Condition key. (NotNull) + * @param value The value of lastModified. (Nullable) + */ + protected void registerLastModified(ConditionKey key, Object value) { + registerQuery(key, value, getCValueLastModified(), COL_LAST_MODIFIED, J_LastModified, UJ_lastModified); + } + + /** + * Register inline condition of lastModified. + * + * @param key Condition key. (NotNull) + * @param value The value of lastModified. (Nullable) + */ + protected void registerInlineLastModified(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueLastModified(), COL_LAST_MODIFIED, J_LastModified, UJ_lastModified); + } + + abstract protected ConditionValue getCValueLastModified(); + + /** Column db name of dateAdded. */ + protected static final String COL_DATE_ADDED = "DATE_ADDED"; + + /** Column java name of dateAdded. */ + protected static final String J_DateAdded = "DateAdded"; + + /** Column uncapitalised java name of dateAdded. */ + protected static final String UJ_dateAdded = "dateAdded"; + + /** + * Set the value of dateAdded using equal. { = } + * + * @param dateAdded The value of dateAdded as equal. + */ + public void setDateAdded_Equal(java.sql.Timestamp dateAdded) { + registerDateAdded(ConditionKey.CK_EQUAL, dateAdded); + } + + /** + * Set the value of dateAdded using notEqual. { != } + * + * @param dateAdded The value of dateAdded as notEqual. + */ + public void setDateAdded_NotEqual(java.sql.Timestamp dateAdded) { + registerDateAdded(ConditionKey.CK_NOT_EQUAL, dateAdded); + } + + /** + * Set the value of dateAdded using greaterThan. { > } + * + * @param dateAdded The value of dateAdded as greaterThan. + */ + public void setDateAdded_GreaterThan(java.sql.Timestamp dateAdded) { + registerDateAdded(ConditionKey.CK_GREATER_THAN, dateAdded); + } + + /** + * Set the value of dateAdded using lessThan. { < } + * + * @param dateAdded The value of dateAdded as lessThan. + */ + public void setDateAdded_LessThan(java.sql.Timestamp dateAdded) { + registerDateAdded(ConditionKey.CK_LESS_THAN, dateAdded); + } + + /** + * Set the value of dateAdded using greaterEqual. { >= } + * + * @param dateAdded The value of dateAdded as greaterEqual. + */ + public void setDateAdded_GreaterEqual(java.sql.Timestamp dateAdded) { + registerDateAdded(ConditionKey.CK_GREATER_EQUAL, dateAdded); + } + + /** + * Set the value of dateAdded using lessEqual. { <= } + * + * @param dateAdded The value of dateAdded as lessEqual. + */ + public void setDateAdded_LessEqual(java.sql.Timestamp dateAdded) { + registerDateAdded(ConditionKey.CK_LESS_EQUAL, dateAdded); + } + + /** + * Set the value of dateAdded using from-to. { $fromDate <= COLUMN_NAME <= $toDate } + * + * @param dateAdded The value of dateAdded as from-to. + * @param fromToOption From-To option. (NotNull) + */ + public void setDateAdded_FromTo(java.sql.Timestamp fromDate, java.sql.Timestamp toDate, jp.sf.pal.pompei.allcommon.cbean.coption.FromToOption fromToOption) { + registerFromToQuery(fromDate, toDate, getCValueDateAdded(), COL_DATE_ADDED, J_DateAdded, UJ_dateAdded, fromToOption); + } + + /** + * Register condition of dateAdded. + * + * @param key Condition key. (NotNull) + * @param value The value of dateAdded. (Nullable) + */ + protected void registerDateAdded(ConditionKey key, Object value) { + registerQuery(key, value, getCValueDateAdded(), COL_DATE_ADDED, J_DateAdded, UJ_dateAdded); + } + + /** + * Register inline condition of dateAdded. + * + * @param key Condition key. (NotNull) + * @param value The value of dateAdded. (Nullable) + */ + protected void registerInlineDateAdded(ConditionKey key, Object value) { + registerInlineQuery(key, value, getCValueDateAdded(), COL_DATE_ADDED, J_DateAdded, UJ_dateAdded); + } + + abstract protected ConditionValue getCValueDateAdded(); + + // =================================================================================== + // Basic Override + // ============== + /** + * This method overrides the method that is declared at super. + * + * @return Clause string. (NotNull) + */ + public String toString() { + return getSqlClause().getClause(); + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/BsAddressBookCQ.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/BsAddressBookCQ.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/BsAddressBookCQ.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,860 @@ + +package jp.sf.pal.pompei.cbean.cq.bs; + +import jp.sf.pal.pompei.cbean.cq.*; + +import jp.sf.pal.pompei.allcommon.cbean.*; +import jp.sf.pal.pompei.allcommon.cbean.ckey.*; +import jp.sf.pal.pompei.allcommon.cbean.cvalue.ConditionValue; +import jp.sf.pal.pompei.allcommon.cbean.sqlclause.SqlClause; +import jp.sf.pal.pompei.cbean.cq.ciq.*; + +/** + * The condition-query of ADDRESS_BOOK. + * + * @author DBFlute(AutoGenerator) + */ +public class BsAddressBookCQ extends AbstractBsAddressBookCQ { + + // =================================================================================== + // Attribute + // ========= + /** Corresponding inline query. */ + protected AddressBookCIQ _inlineQuery; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param childQuery Child query as abstract class. (Nullable: If null, this is base instance.) + * @param sqlClause SQL clause instance. (NotNull) + * @param aliasName My alias name. (NotNull) + * @param nestLevel Nest level. + */ + public BsAddressBookCQ(ConditionQuery childQuery, SqlClause sqlClause, String aliasName, int nestLevel) { + super(childQuery, sqlClause, aliasName, nestLevel); + } + + // =================================================================================== + // Inline + // ====== + /** + * Get inline query. + * + * @return Inline query. (NotNull) + */ + public AddressBookCIQ inline() { + if (_inlineQuery == null) { + _inlineQuery = new AddressBookCIQ(getChildQuery(), getSqlClause(), getAliasName(), getNestLevel(), this); + } + return _inlineQuery; + } + + // =================================================================================== + // Include-as-Mine + // =============== + + /** + * Include select-column of addressBookId as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_AddressBookId() { + registerIncludedSelectColumn("AddressBookId", getRealColumnName("ADDRESS_BOOK_ID")); + } + + /** + * Include select-column of addressBookId as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_AddressBookId(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("ADDRESS_BOOK_ID")); + } + + /** + * Include select-column of customersId as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_CustomersId() { + registerIncludedSelectColumn("CustomersId", getRealColumnName("CUSTOMERS_ID")); + } + + /** + * Include select-column of customersId as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_CustomersId(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("CUSTOMERS_ID")); + } + + /** + * Include select-column of entryGender as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_EntryGender() { + registerIncludedSelectColumn("EntryGender", getRealColumnName("ENTRY_GENDER")); + } + + /** + * Include select-column of entryGender as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_EntryGender(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("ENTRY_GENDER")); + } + + /** + * Include select-column of entryCompany as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_EntryCompany() { + registerIncludedSelectColumn("EntryCompany", getRealColumnName("ENTRY_COMPANY")); + } + + /** + * Include select-column of entryCompany as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_EntryCompany(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("ENTRY_COMPANY")); + } + + /** + * Include select-column of entryFirstname as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_EntryFirstname() { + registerIncludedSelectColumn("EntryFirstname", getRealColumnName("ENTRY_FIRSTNAME")); + } + + /** + * Include select-column of entryFirstname as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_EntryFirstname(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("ENTRY_FIRSTNAME")); + } + + /** + * Include select-column of entryLastname as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_EntryLastname() { + registerIncludedSelectColumn("EntryLastname", getRealColumnName("ENTRY_LASTNAME")); + } + + /** + * Include select-column of entryLastname as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_EntryLastname(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("ENTRY_LASTNAME")); + } + + /** + * Include select-column of entryStreetAddress as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_EntryStreetAddress() { + registerIncludedSelectColumn("EntryStreetAddress", getRealColumnName("ENTRY_STREET_ADDRESS")); + } + + /** + * Include select-column of entryStreetAddress as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_EntryStreetAddress(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("ENTRY_STREET_ADDRESS")); + } + + /** + * Include select-column of entrySuburb as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_EntrySuburb() { + registerIncludedSelectColumn("EntrySuburb", getRealColumnName("ENTRY_SUBURB")); + } + + /** + * Include select-column of entrySuburb as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_EntrySuburb(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("ENTRY_SUBURB")); + } + + /** + * Include select-column of entryPostcode as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_EntryPostcode() { + registerIncludedSelectColumn("EntryPostcode", getRealColumnName("ENTRY_POSTCODE")); + } + + /** + * Include select-column of entryPostcode as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_EntryPostcode(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("ENTRY_POSTCODE")); + } + + /** + * Include select-column of entryCity as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_EntryCity() { + registerIncludedSelectColumn("EntryCity", getRealColumnName("ENTRY_CITY")); + } + + /** + * Include select-column of entryCity as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_EntryCity(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("ENTRY_CITY")); + } + + /** + * Include select-column of entryState as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_EntryState() { + registerIncludedSelectColumn("EntryState", getRealColumnName("ENTRY_STATE")); + } + + /** + * Include select-column of entryState as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_EntryState(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("ENTRY_STATE")); + } + + /** + * Include select-column of entryCountryId as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_EntryCountryId() { + registerIncludedSelectColumn("EntryCountryId", getRealColumnName("ENTRY_COUNTRY_ID")); + } + + /** + * Include select-column of entryCountryId as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_EntryCountryId(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("ENTRY_COUNTRY_ID")); + } + + /** + * Include select-column of entryZoneId as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_EntryZoneId() { + registerIncludedSelectColumn("EntryZoneId", getRealColumnName("ENTRY_ZONE_ID")); + } + + /** + * Include select-column of entryZoneId as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_EntryZoneId(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("ENTRY_ZONE_ID")); + } + + // =================================================================================== + // Query + // ===== + // /* * * * * * * * * * * * * * * * * * * * * * * + // MyTable = [ADDRESS_BOOK] + // * * * * * * * * */ + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [ADDRESS_BOOK_ID] + // - - - - - - - - -/ + + /** The attribute of addressBookId. */ + protected ConditionValue _addressBookId; + + /** + * Get the value of addressBookId. + * + * @return The value of addressBookId. + */ + public ConditionValue getAddressBookId() { + if (_addressBookId == null) { + _addressBookId = new ConditionValue(); + } + return _addressBookId; + } + + protected ConditionValue getCValueAddressBookId() { + return getAddressBookId(); + } + + + /** + * Add order-by of addressBookId as ASC. + * + * @return this. (NotNull) + */ + public BsAddressBookCQ addOrderBy_AddressBookId_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_ADDRESS_BOOK_ID), null, true);return this; + } + + /** + * Add order-by of addressBookId as DESC. + * + * @return this. (NotNull) + */ + public BsAddressBookCQ addOrderBy_AddressBookId_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_ADDRESS_BOOK_ID), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [CUSTOMERS_ID] + // - - - - - - - - -/ + + /** The attribute of customersId. */ + protected ConditionValue _customersId; + + /** + * Get the value of customersId. + * + * @return The value of customersId. + */ + public ConditionValue getCustomersId() { + if (_customersId == null) { + _customersId = new ConditionValue(); + } + return _customersId; + } + + protected ConditionValue getCValueCustomersId() { + return getCustomersId(); + } + + + /** + * Add order-by of customersId as ASC. + * + * @return this. (NotNull) + */ + public BsAddressBookCQ addOrderBy_CustomersId_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_CUSTOMERS_ID), null, true);return this; + } + + /** + * Add order-by of customersId as DESC. + * + * @return this. (NotNull) + */ + public BsAddressBookCQ addOrderBy_CustomersId_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_CUSTOMERS_ID), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [ENTRY_GENDER] + // - - - - - - - - -/ + + /** The attribute of entryGender. */ + protected ConditionValue _entryGender; + + /** + * Get the value of entryGender. + * + * @return The value of entryGender. + */ + public ConditionValue getEntryGender() { + if (_entryGender == null) { + _entryGender = new ConditionValue(); + } + return _entryGender; + } + + protected ConditionValue getCValueEntryGender() { + return getEntryGender(); + } + + + /** + * Add order-by of entryGender as ASC. + * + * @return this. (NotNull) + */ + public BsAddressBookCQ addOrderBy_EntryGender_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_ENTRY_GENDER), null, true);return this; + } + + /** + * Add order-by of entryGender as DESC. + * + * @return this. (NotNull) + */ + public BsAddressBookCQ addOrderBy_EntryGender_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_ENTRY_GENDER), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [ENTRY_COMPANY] + // - - - - - - - - -/ + + /** The attribute of entryCompany. */ + protected ConditionValue _entryCompany; + + /** + * Get the value of entryCompany. + * + * @return The value of entryCompany. + */ + public ConditionValue getEntryCompany() { + if (_entryCompany == null) { + _entryCompany = new ConditionValue(); + } + return _entryCompany; + } + + protected ConditionValue getCValueEntryCompany() { + return getEntryCompany(); + } + + + /** + * Add order-by of entryCompany as ASC. + * + * @return this. (NotNull) + */ + public BsAddressBookCQ addOrderBy_EntryCompany_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_ENTRY_COMPANY), null, true);return this; + } + + /** + * Add order-by of entryCompany as DESC. + * + * @return this. (NotNull) + */ + public BsAddressBookCQ addOrderBy_EntryCompany_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_ENTRY_COMPANY), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [ENTRY_FIRSTNAME] + // - - - - - - - - -/ + + /** The attribute of entryFirstname. */ + protected ConditionValue _entryFirstname; + + /** + * Get the value of entryFirstname. + * + * @return The value of entryFirstname. + */ + public ConditionValue getEntryFirstname() { + if (_entryFirstname == null) { + _entryFirstname = new ConditionValue(); + } + return _entryFirstname; + } + + protected ConditionValue getCValueEntryFirstname() { + return getEntryFirstname(); + } + + + /** + * Add order-by of entryFirstname as ASC. + * + * @return this. (NotNull) + */ + public BsAddressBookCQ addOrderBy_EntryFirstname_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_ENTRY_FIRSTNAME), null, true);return this; + } + + /** + * Add order-by of entryFirstname as DESC. + * + * @return this. (NotNull) + */ + public BsAddressBookCQ addOrderBy_EntryFirstname_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_ENTRY_FIRSTNAME), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [ENTRY_LASTNAME] + // - - - - - - - - -/ + + /** The attribute of entryLastname. */ + protected ConditionValue _entryLastname; + + /** + * Get the value of entryLastname. + * + * @return The value of entryLastname. + */ + public ConditionValue getEntryLastname() { + if (_entryLastname == null) { + _entryLastname = new ConditionValue(); + } + return _entryLastname; + } + + protected ConditionValue getCValueEntryLastname() { + return getEntryLastname(); + } + + + /** + * Add order-by of entryLastname as ASC. + * + * @return this. (NotNull) + */ + public BsAddressBookCQ addOrderBy_EntryLastname_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_ENTRY_LASTNAME), null, true);return this; + } + + /** + * Add order-by of entryLastname as DESC. + * + * @return this. (NotNull) + */ + public BsAddressBookCQ addOrderBy_EntryLastname_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_ENTRY_LASTNAME), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [ENTRY_STREET_ADDRESS] + // - - - - - - - - -/ + + /** The attribute of entryStreetAddress. */ + protected ConditionValue _entryStreetAddress; + + /** + * Get the value of entryStreetAddress. + * + * @return The value of entryStreetAddress. + */ + public ConditionValue getEntryStreetAddress() { + if (_entryStreetAddress == null) { + _entryStreetAddress = new ConditionValue(); + } + return _entryStreetAddress; + } + + protected ConditionValue getCValueEntryStreetAddress() { + return getEntryStreetAddress(); + } + + + /** + * Add order-by of entryStreetAddress as ASC. + * + * @return this. (NotNull) + */ + public BsAddressBookCQ addOrderBy_EntryStreetAddress_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_ENTRY_STREET_ADDRESS), null, true);return this; + } + + /** + * Add order-by of entryStreetAddress as DESC. + * + * @return this. (NotNull) + */ + public BsAddressBookCQ addOrderBy_EntryStreetAddress_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_ENTRY_STREET_ADDRESS), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [ENTRY_SUBURB] + // - - - - - - - - -/ + + /** The attribute of entrySuburb. */ + protected ConditionValue _entrySuburb; + + /** + * Get the value of entrySuburb. + * + * @return The value of entrySuburb. + */ + public ConditionValue getEntrySuburb() { + if (_entrySuburb == null) { + _entrySuburb = new ConditionValue(); + } + return _entrySuburb; + } + + protected ConditionValue getCValueEntrySuburb() { + return getEntrySuburb(); + } + + + /** + * Add order-by of entrySuburb as ASC. + * + * @return this. (NotNull) + */ + public BsAddressBookCQ addOrderBy_EntrySuburb_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_ENTRY_SUBURB), null, true);return this; + } + + /** + * Add order-by of entrySuburb as DESC. + * + * @return this. (NotNull) + */ + public BsAddressBookCQ addOrderBy_EntrySuburb_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_ENTRY_SUBURB), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [ENTRY_POSTCODE] + // - - - - - - - - -/ + + /** The attribute of entryPostcode. */ + protected ConditionValue _entryPostcode; + + /** + * Get the value of entryPostcode. + * + * @return The value of entryPostcode. + */ + public ConditionValue getEntryPostcode() { + if (_entryPostcode == null) { + _entryPostcode = new ConditionValue(); + } + return _entryPostcode; + } + + protected ConditionValue getCValueEntryPostcode() { + return getEntryPostcode(); + } + + + /** + * Add order-by of entryPostcode as ASC. + * + * @return this. (NotNull) + */ + public BsAddressBookCQ addOrderBy_EntryPostcode_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_ENTRY_POSTCODE), null, true);return this; + } + + /** + * Add order-by of entryPostcode as DESC. + * + * @return this. (NotNull) + */ + public BsAddressBookCQ addOrderBy_EntryPostcode_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_ENTRY_POSTCODE), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [ENTRY_CITY] + // - - - - - - - - -/ + + /** The attribute of entryCity. */ + protected ConditionValue _entryCity; + + /** + * Get the value of entryCity. + * + * @return The value of entryCity. + */ + public ConditionValue getEntryCity() { + if (_entryCity == null) { + _entryCity = new ConditionValue(); + } + return _entryCity; + } + + protected ConditionValue getCValueEntryCity() { + return getEntryCity(); + } + + + /** + * Add order-by of entryCity as ASC. + * + * @return this. (NotNull) + */ + public BsAddressBookCQ addOrderBy_EntryCity_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_ENTRY_CITY), null, true);return this; + } + + /** + * Add order-by of entryCity as DESC. + * + * @return this. (NotNull) + */ + public BsAddressBookCQ addOrderBy_EntryCity_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_ENTRY_CITY), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [ENTRY_STATE] + // - - - - - - - - -/ + + /** The attribute of entryState. */ + protected ConditionValue _entryState; + + /** + * Get the value of entryState. + * + * @return The value of entryState. + */ + public ConditionValue getEntryState() { + if (_entryState == null) { + _entryState = new ConditionValue(); + } + return _entryState; + } + + protected ConditionValue getCValueEntryState() { + return getEntryState(); + } + + + /** + * Add order-by of entryState as ASC. + * + * @return this. (NotNull) + */ + public BsAddressBookCQ addOrderBy_EntryState_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_ENTRY_STATE), null, true);return this; + } + + /** + * Add order-by of entryState as DESC. + * + * @return this. (NotNull) + */ + public BsAddressBookCQ addOrderBy_EntryState_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_ENTRY_STATE), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [ENTRY_COUNTRY_ID] + // - - - - - - - - -/ + + /** The attribute of entryCountryId. */ + protected ConditionValue _entryCountryId; + + /** + * Get the value of entryCountryId. + * + * @return The value of entryCountryId. + */ + public ConditionValue getEntryCountryId() { + if (_entryCountryId == null) { + _entryCountryId = new ConditionValue(); + } + return _entryCountryId; + } + + protected ConditionValue getCValueEntryCountryId() { + return getEntryCountryId(); + } + + + /** + * Add order-by of entryCountryId as ASC. + * + * @return this. (NotNull) + */ + public BsAddressBookCQ addOrderBy_EntryCountryId_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_ENTRY_COUNTRY_ID), null, true);return this; + } + + /** + * Add order-by of entryCountryId as DESC. + * + * @return this. (NotNull) + */ + public BsAddressBookCQ addOrderBy_EntryCountryId_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_ENTRY_COUNTRY_ID), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [ENTRY_ZONE_ID] + // - - - - - - - - -/ + + /** The attribute of entryZoneId. */ + protected ConditionValue _entryZoneId; + + /** + * Get the value of entryZoneId. + * + * @return The value of entryZoneId. + */ + public ConditionValue getEntryZoneId() { + if (_entryZoneId == null) { + _entryZoneId = new ConditionValue(); + } + return _entryZoneId; + } + + protected ConditionValue getCValueEntryZoneId() { + return getEntryZoneId(); + } + + + /** + * Add order-by of entryZoneId as ASC. + * + * @return this. (NotNull) + */ + public BsAddressBookCQ addOrderBy_EntryZoneId_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_ENTRY_ZONE_ID), null, true);return this; + } + + /** + * Add order-by of entryZoneId as DESC. + * + * @return this. (NotNull) + */ + public BsAddressBookCQ addOrderBy_EntryZoneId_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_ENTRY_ZONE_ID), null, false);return this; + } + + // =================================================================================== + // Union Query + // =========== + protected void reflectRelationOnUnionQuery(ConditionQuery baseQueryAsSuper, ConditionQuery unionQueryAsSuper) { + final AddressBookCQ baseQuery = (AddressBookCQ)baseQueryAsSuper; + final AddressBookCQ unionQuery = (AddressBookCQ)unionQueryAsSuper; + + } + + // =================================================================================== + // Foreign Query + // ============= + + +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/BsAddressFormatCQ.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/BsAddressFormatCQ.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/BsAddressFormatCQ.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,260 @@ + +package jp.sf.pal.pompei.cbean.cq.bs; + +import jp.sf.pal.pompei.cbean.cq.*; + +import jp.sf.pal.pompei.allcommon.cbean.*; +import jp.sf.pal.pompei.allcommon.cbean.ckey.*; +import jp.sf.pal.pompei.allcommon.cbean.cvalue.ConditionValue; +import jp.sf.pal.pompei.allcommon.cbean.sqlclause.SqlClause; +import jp.sf.pal.pompei.cbean.cq.ciq.*; + +/** + * The condition-query of ADDRESS_FORMAT. + * + * @author DBFlute(AutoGenerator) + */ +public class BsAddressFormatCQ extends AbstractBsAddressFormatCQ { + + // =================================================================================== + // Attribute + // ========= + /** Corresponding inline query. */ + protected AddressFormatCIQ _inlineQuery; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param childQuery Child query as abstract class. (Nullable: If null, this is base instance.) + * @param sqlClause SQL clause instance. (NotNull) + * @param aliasName My alias name. (NotNull) + * @param nestLevel Nest level. + */ + public BsAddressFormatCQ(ConditionQuery childQuery, SqlClause sqlClause, String aliasName, int nestLevel) { + super(childQuery, sqlClause, aliasName, nestLevel); + } + + // =================================================================================== + // Inline + // ====== + /** + * Get inline query. + * + * @return Inline query. (NotNull) + */ + public AddressFormatCIQ inline() { + if (_inlineQuery == null) { + _inlineQuery = new AddressFormatCIQ(getChildQuery(), getSqlClause(), getAliasName(), getNestLevel(), this); + } + return _inlineQuery; + } + + // =================================================================================== + // Include-as-Mine + // =============== + + /** + * Include select-column of addressFormatId as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_AddressFormatId() { + registerIncludedSelectColumn("AddressFormatId", getRealColumnName("ADDRESS_FORMAT_ID")); + } + + /** + * Include select-column of addressFormatId as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_AddressFormatId(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("ADDRESS_FORMAT_ID")); + } + + /** + * Include select-column of addressFormat as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_AddressFormat() { + registerIncludedSelectColumn("AddressFormat", getRealColumnName("ADDRESS_FORMAT")); + } + + /** + * Include select-column of addressFormat as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_AddressFormat(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("ADDRESS_FORMAT")); + } + + /** + * Include select-column of addressSummary as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_AddressSummary() { + registerIncludedSelectColumn("AddressSummary", getRealColumnName("ADDRESS_SUMMARY")); + } + + /** + * Include select-column of addressSummary as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_AddressSummary(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("ADDRESS_SUMMARY")); + } + + // =================================================================================== + // Query + // ===== + // /* * * * * * * * * * * * * * * * * * * * * * * + // MyTable = [ADDRESS_FORMAT] + // * * * * * * * * */ + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [ADDRESS_FORMAT_ID] + // - - - - - - - - -/ + + /** The attribute of addressFormatId. */ + protected ConditionValue _addressFormatId; + + /** + * Get the value of addressFormatId. + * + * @return The value of addressFormatId. + */ + public ConditionValue getAddressFormatId() { + if (_addressFormatId == null) { + _addressFormatId = new ConditionValue(); + } + return _addressFormatId; + } + + protected ConditionValue getCValueAddressFormatId() { + return getAddressFormatId(); + } + + + /** + * Add order-by of addressFormatId as ASC. + * + * @return this. (NotNull) + */ + public BsAddressFormatCQ addOrderBy_AddressFormatId_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_ADDRESS_FORMAT_ID), null, true);return this; + } + + /** + * Add order-by of addressFormatId as DESC. + * + * @return this. (NotNull) + */ + public BsAddressFormatCQ addOrderBy_AddressFormatId_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_ADDRESS_FORMAT_ID), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [ADDRESS_FORMAT] + // - - - - - - - - -/ + + /** The attribute of addressFormat. */ + protected ConditionValue _addressFormat; + + /** + * Get the value of addressFormat. + * + * @return The value of addressFormat. + */ + public ConditionValue getAddressFormat() { + if (_addressFormat == null) { + _addressFormat = new ConditionValue(); + } + return _addressFormat; + } + + protected ConditionValue getCValueAddressFormat() { + return getAddressFormat(); + } + + + /** + * Add order-by of addressFormat as ASC. + * + * @return this. (NotNull) + */ + public BsAddressFormatCQ addOrderBy_AddressFormat_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_ADDRESS_FORMAT), null, true);return this; + } + + /** + * Add order-by of addressFormat as DESC. + * + * @return this. (NotNull) + */ + public BsAddressFormatCQ addOrderBy_AddressFormat_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_ADDRESS_FORMAT), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [ADDRESS_SUMMARY] + // - - - - - - - - -/ + + /** The attribute of addressSummary. */ + protected ConditionValue _addressSummary; + + /** + * Get the value of addressSummary. + * + * @return The value of addressSummary. + */ + public ConditionValue getAddressSummary() { + if (_addressSummary == null) { + _addressSummary = new ConditionValue(); + } + return _addressSummary; + } + + protected ConditionValue getCValueAddressSummary() { + return getAddressSummary(); + } + + + /** + * Add order-by of addressSummary as ASC. + * + * @return this. (NotNull) + */ + public BsAddressFormatCQ addOrderBy_AddressSummary_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_ADDRESS_SUMMARY), null, true);return this; + } + + /** + * Add order-by of addressSummary as DESC. + * + * @return this. (NotNull) + */ + public BsAddressFormatCQ addOrderBy_AddressSummary_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_ADDRESS_SUMMARY), null, false);return this; + } + + // =================================================================================== + // Union Query + // =========== + protected void reflectRelationOnUnionQuery(ConditionQuery baseQueryAsSuper, ConditionQuery unionQueryAsSuper) { + final AddressFormatCQ baseQuery = (AddressFormatCQ)baseQueryAsSuper; + final AddressFormatCQ unionQuery = (AddressFormatCQ)unionQueryAsSuper; + + } + + // =================================================================================== + // Foreign Query + // ============= + + +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/BsBannersCQ.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/BsBannersCQ.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/BsBannersCQ.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,800 @@ + +package jp.sf.pal.pompei.cbean.cq.bs; + +import jp.sf.pal.pompei.cbean.cq.*; + +import jp.sf.pal.pompei.allcommon.cbean.*; +import jp.sf.pal.pompei.allcommon.cbean.ckey.*; +import jp.sf.pal.pompei.allcommon.cbean.cvalue.ConditionValue; +import jp.sf.pal.pompei.allcommon.cbean.sqlclause.SqlClause; +import jp.sf.pal.pompei.cbean.cq.ciq.*; + +/** + * The condition-query of BANNERS. + * + * @author DBFlute(AutoGenerator) + */ +public class BsBannersCQ extends AbstractBsBannersCQ { + + // =================================================================================== + // Attribute + // ========= + /** Corresponding inline query. */ + protected BannersCIQ _inlineQuery; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param childQuery Child query as abstract class. (Nullable: If null, this is base instance.) + * @param sqlClause SQL clause instance. (NotNull) + * @param aliasName My alias name. (NotNull) + * @param nestLevel Nest level. + */ + public BsBannersCQ(ConditionQuery childQuery, SqlClause sqlClause, String aliasName, int nestLevel) { + super(childQuery, sqlClause, aliasName, nestLevel); + } + + // =================================================================================== + // Inline + // ====== + /** + * Get inline query. + * + * @return Inline query. (NotNull) + */ + public BannersCIQ inline() { + if (_inlineQuery == null) { + _inlineQuery = new BannersCIQ(getChildQuery(), getSqlClause(), getAliasName(), getNestLevel(), this); + } + return _inlineQuery; + } + + // =================================================================================== + // Include-as-Mine + // =============== + + /** + * Include select-column of bannersId as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_BannersId() { + registerIncludedSelectColumn("BannersId", getRealColumnName("BANNERS_ID")); + } + + /** + * Include select-column of bannersId as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_BannersId(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("BANNERS_ID")); + } + + /** + * Include select-column of bannersTitle as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_BannersTitle() { + registerIncludedSelectColumn("BannersTitle", getRealColumnName("BANNERS_TITLE")); + } + + /** + * Include select-column of bannersTitle as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_BannersTitle(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("BANNERS_TITLE")); + } + + /** + * Include select-column of bannersUrl as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_BannersUrl() { + registerIncludedSelectColumn("BannersUrl", getRealColumnName("BANNERS_URL")); + } + + /** + * Include select-column of bannersUrl as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_BannersUrl(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("BANNERS_URL")); + } + + /** + * Include select-column of bannersImage as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_BannersImage() { + registerIncludedSelectColumn("BannersImage", getRealColumnName("BANNERS_IMAGE")); + } + + /** + * Include select-column of bannersImage as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_BannersImage(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("BANNERS_IMAGE")); + } + + /** + * Include select-column of bannersGroup as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_BannersGroup() { + registerIncludedSelectColumn("BannersGroup", getRealColumnName("BANNERS_GROUP")); + } + + /** + * Include select-column of bannersGroup as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_BannersGroup(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("BANNERS_GROUP")); + } + + /** + * Include select-column of bannersHtmlText as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_BannersHtmlText() { + registerIncludedSelectColumn("BannersHtmlText", getRealColumnName("BANNERS_HTML_TEXT")); + } + + /** + * Include select-column of bannersHtmlText as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_BannersHtmlText(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("BANNERS_HTML_TEXT")); + } + + /** + * Include select-column of expiresImpressions as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_ExpiresImpressions() { + registerIncludedSelectColumn("ExpiresImpressions", getRealColumnName("EXPIRES_IMPRESSIONS")); + } + + /** + * Include select-column of expiresImpressions as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_ExpiresImpressions(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("EXPIRES_IMPRESSIONS")); + } + + /** + * Include select-column of expiresDate as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_ExpiresDate() { + registerIncludedSelectColumn("ExpiresDate", getRealColumnName("EXPIRES_DATE")); + } + + /** + * Include select-column of expiresDate as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_ExpiresDate(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("EXPIRES_DATE")); + } + + /** + * Include select-column of dateScheduled as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_DateScheduled() { + registerIncludedSelectColumn("DateScheduled", getRealColumnName("DATE_SCHEDULED")); + } + + /** + * Include select-column of dateScheduled as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_DateScheduled(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("DATE_SCHEDULED")); + } + + /** + * Include select-column of dateAdded as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_DateAdded() { + registerIncludedSelectColumn("DateAdded", getRealColumnName("DATE_ADDED")); + } + + /** + * Include select-column of dateAdded as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_DateAdded(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("DATE_ADDED")); + } + + /** + * Include select-column of dateStatusChange as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_DateStatusChange() { + registerIncludedSelectColumn("DateStatusChange", getRealColumnName("DATE_STATUS_CHANGE")); + } + + /** + * Include select-column of dateStatusChange as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_DateStatusChange(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("DATE_STATUS_CHANGE")); + } + + /** + * Include select-column of status as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_Status() { + registerIncludedSelectColumn("Status", getRealColumnName("STATUS")); + } + + /** + * Include select-column of status as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_Status(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("STATUS")); + } + + // =================================================================================== + // Query + // ===== + // /* * * * * * * * * * * * * * * * * * * * * * * + // MyTable = [BANNERS] + // * * * * * * * * */ + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [BANNERS_ID] + // - - - - - - - - -/ + + /** The attribute of bannersId. */ + protected ConditionValue _bannersId; + + /** + * Get the value of bannersId. + * + * @return The value of bannersId. + */ + public ConditionValue getBannersId() { + if (_bannersId == null) { + _bannersId = new ConditionValue(); + } + return _bannersId; + } + + protected ConditionValue getCValueBannersId() { + return getBannersId(); + } + + + /** + * Add order-by of bannersId as ASC. + * + * @return this. (NotNull) + */ + public BsBannersCQ addOrderBy_BannersId_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_BANNERS_ID), null, true);return this; + } + + /** + * Add order-by of bannersId as DESC. + * + * @return this. (NotNull) + */ + public BsBannersCQ addOrderBy_BannersId_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_BANNERS_ID), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [BANNERS_TITLE] + // - - - - - - - - -/ + + /** The attribute of bannersTitle. */ + protected ConditionValue _bannersTitle; + + /** + * Get the value of bannersTitle. + * + * @return The value of bannersTitle. + */ + public ConditionValue getBannersTitle() { + if (_bannersTitle == null) { + _bannersTitle = new ConditionValue(); + } + return _bannersTitle; + } + + protected ConditionValue getCValueBannersTitle() { + return getBannersTitle(); + } + + + /** + * Add order-by of bannersTitle as ASC. + * + * @return this. (NotNull) + */ + public BsBannersCQ addOrderBy_BannersTitle_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_BANNERS_TITLE), null, true);return this; + } + + /** + * Add order-by of bannersTitle as DESC. + * + * @return this. (NotNull) + */ + public BsBannersCQ addOrderBy_BannersTitle_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_BANNERS_TITLE), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [BANNERS_URL] + // - - - - - - - - -/ + + /** The attribute of bannersUrl. */ + protected ConditionValue _bannersUrl; + + /** + * Get the value of bannersUrl. + * + * @return The value of bannersUrl. + */ + public ConditionValue getBannersUrl() { + if (_bannersUrl == null) { + _bannersUrl = new ConditionValue(); + } + return _bannersUrl; + } + + protected ConditionValue getCValueBannersUrl() { + return getBannersUrl(); + } + + + /** + * Add order-by of bannersUrl as ASC. + * + * @return this. (NotNull) + */ + public BsBannersCQ addOrderBy_BannersUrl_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_BANNERS_URL), null, true);return this; + } + + /** + * Add order-by of bannersUrl as DESC. + * + * @return this. (NotNull) + */ + public BsBannersCQ addOrderBy_BannersUrl_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_BANNERS_URL), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [BANNERS_IMAGE] + // - - - - - - - - -/ + + /** The attribute of bannersImage. */ + protected ConditionValue _bannersImage; + + /** + * Get the value of bannersImage. + * + * @return The value of bannersImage. + */ + public ConditionValue getBannersImage() { + if (_bannersImage == null) { + _bannersImage = new ConditionValue(); + } + return _bannersImage; + } + + protected ConditionValue getCValueBannersImage() { + return getBannersImage(); + } + + + /** + * Add order-by of bannersImage as ASC. + * + * @return this. (NotNull) + */ + public BsBannersCQ addOrderBy_BannersImage_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_BANNERS_IMAGE), null, true);return this; + } + + /** + * Add order-by of bannersImage as DESC. + * + * @return this. (NotNull) + */ + public BsBannersCQ addOrderBy_BannersImage_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_BANNERS_IMAGE), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [BANNERS_GROUP] + // - - - - - - - - -/ + + /** The attribute of bannersGroup. */ + protected ConditionValue _bannersGroup; + + /** + * Get the value of bannersGroup. + * + * @return The value of bannersGroup. + */ + public ConditionValue getBannersGroup() { + if (_bannersGroup == null) { + _bannersGroup = new ConditionValue(); + } + return _bannersGroup; + } + + protected ConditionValue getCValueBannersGroup() { + return getBannersGroup(); + } + + + /** + * Add order-by of bannersGroup as ASC. + * + * @return this. (NotNull) + */ + public BsBannersCQ addOrderBy_BannersGroup_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_BANNERS_GROUP), null, true);return this; + } + + /** + * Add order-by of bannersGroup as DESC. + * + * @return this. (NotNull) + */ + public BsBannersCQ addOrderBy_BannersGroup_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_BANNERS_GROUP), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [BANNERS_HTML_TEXT] + // - - - - - - - - -/ + + /** The attribute of bannersHtmlText. */ + protected ConditionValue _bannersHtmlText; + + /** + * Get the value of bannersHtmlText. + * + * @return The value of bannersHtmlText. + */ + public ConditionValue getBannersHtmlText() { + if (_bannersHtmlText == null) { + _bannersHtmlText = new ConditionValue(); + } + return _bannersHtmlText; + } + + protected ConditionValue getCValueBannersHtmlText() { + return getBannersHtmlText(); + } + + + /** + * Add order-by of bannersHtmlText as ASC. + * + * @return this. (NotNull) + */ + public BsBannersCQ addOrderBy_BannersHtmlText_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_BANNERS_HTML_TEXT), null, true);return this; + } + + /** + * Add order-by of bannersHtmlText as DESC. + * + * @return this. (NotNull) + */ + public BsBannersCQ addOrderBy_BannersHtmlText_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_BANNERS_HTML_TEXT), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [EXPIRES_IMPRESSIONS] + // - - - - - - - - -/ + + /** The attribute of expiresImpressions. */ + protected ConditionValue _expiresImpressions; + + /** + * Get the value of expiresImpressions. + * + * @return The value of expiresImpressions. + */ + public ConditionValue getExpiresImpressions() { + if (_expiresImpressions == null) { + _expiresImpressions = new ConditionValue(); + } + return _expiresImpressions; + } + + protected ConditionValue getCValueExpiresImpressions() { + return getExpiresImpressions(); + } + + + /** + * Add order-by of expiresImpressions as ASC. + * + * @return this. (NotNull) + */ + public BsBannersCQ addOrderBy_ExpiresImpressions_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_EXPIRES_IMPRESSIONS), null, true);return this; + } + + /** + * Add order-by of expiresImpressions as DESC. + * + * @return this. (NotNull) + */ + public BsBannersCQ addOrderBy_ExpiresImpressions_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_EXPIRES_IMPRESSIONS), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [EXPIRES_DATE] + // - - - - - - - - -/ + + /** The attribute of expiresDate. */ + protected ConditionValue _expiresDate; + + /** + * Get the value of expiresDate. + * + * @return The value of expiresDate. + */ + public ConditionValue getExpiresDate() { + if (_expiresDate == null) { + _expiresDate = new ConditionValue(); + } + return _expiresDate; + } + + protected ConditionValue getCValueExpiresDate() { + return getExpiresDate(); + } + + + /** + * Add order-by of expiresDate as ASC. + * + * @return this. (NotNull) + */ + public BsBannersCQ addOrderBy_ExpiresDate_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_EXPIRES_DATE), null, true);return this; + } + + /** + * Add order-by of expiresDate as DESC. + * + * @return this. (NotNull) + */ + public BsBannersCQ addOrderBy_ExpiresDate_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_EXPIRES_DATE), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [DATE_SCHEDULED] + // - - - - - - - - -/ + + /** The attribute of dateScheduled. */ + protected ConditionValue _dateScheduled; + + /** + * Get the value of dateScheduled. + * + * @return The value of dateScheduled. + */ + public ConditionValue getDateScheduled() { + if (_dateScheduled == null) { + _dateScheduled = new ConditionValue(); + } + return _dateScheduled; + } + + protected ConditionValue getCValueDateScheduled() { + return getDateScheduled(); + } + + + /** + * Add order-by of dateScheduled as ASC. + * + * @return this. (NotNull) + */ + public BsBannersCQ addOrderBy_DateScheduled_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_DATE_SCHEDULED), null, true);return this; + } + + /** + * Add order-by of dateScheduled as DESC. + * + * @return this. (NotNull) + */ + public BsBannersCQ addOrderBy_DateScheduled_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_DATE_SCHEDULED), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [DATE_ADDED] + // - - - - - - - - -/ + + /** The attribute of dateAdded. */ + protected ConditionValue _dateAdded; + + /** + * Get the value of dateAdded. + * + * @return The value of dateAdded. + */ + public ConditionValue getDateAdded() { + if (_dateAdded == null) { + _dateAdded = new ConditionValue(); + } + return _dateAdded; + } + + protected ConditionValue getCValueDateAdded() { + return getDateAdded(); + } + + + /** + * Add order-by of dateAdded as ASC. + * + * @return this. (NotNull) + */ + public BsBannersCQ addOrderBy_DateAdded_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_DATE_ADDED), null, true);return this; + } + + /** + * Add order-by of dateAdded as DESC. + * + * @return this. (NotNull) + */ + public BsBannersCQ addOrderBy_DateAdded_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_DATE_ADDED), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [DATE_STATUS_CHANGE] + // - - - - - - - - -/ + + /** The attribute of dateStatusChange. */ + protected ConditionValue _dateStatusChange; + + /** + * Get the value of dateStatusChange. + * + * @return The value of dateStatusChange. + */ + public ConditionValue getDateStatusChange() { + if (_dateStatusChange == null) { + _dateStatusChange = new ConditionValue(); + } + return _dateStatusChange; + } + + protected ConditionValue getCValueDateStatusChange() { + return getDateStatusChange(); + } + + + /** + * Add order-by of dateStatusChange as ASC. + * + * @return this. (NotNull) + */ + public BsBannersCQ addOrderBy_DateStatusChange_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_DATE_STATUS_CHANGE), null, true);return this; + } + + /** + * Add order-by of dateStatusChange as DESC. + * + * @return this. (NotNull) + */ + public BsBannersCQ addOrderBy_DateStatusChange_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_DATE_STATUS_CHANGE), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [STATUS] + // - - - - - - - - -/ + + /** The attribute of status. */ + protected ConditionValue _status; + + /** + * Get the value of status. + * + * @return The value of status. + */ + public ConditionValue getStatus() { + if (_status == null) { + _status = new ConditionValue(); + } + return _status; + } + + protected ConditionValue getCValueStatus() { + return getStatus(); + } + + + /** + * Add order-by of status as ASC. + * + * @return this. (NotNull) + */ + public BsBannersCQ addOrderBy_Status_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_STATUS), null, true);return this; + } + + /** + * Add order-by of status as DESC. + * + * @return this. (NotNull) + */ + public BsBannersCQ addOrderBy_Status_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_STATUS), null, false);return this; + } + + // =================================================================================== + // Union Query + // =========== + protected void reflectRelationOnUnionQuery(ConditionQuery baseQueryAsSuper, ConditionQuery unionQueryAsSuper) { + final BannersCQ baseQuery = (BannersCQ)baseQueryAsSuper; + final BannersCQ unionQuery = (BannersCQ)unionQueryAsSuper; + + } + + // =================================================================================== + // Foreign Query + // ============= + + +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/BsBannersHistoryCQ.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/BsBannersHistoryCQ.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/BsBannersHistoryCQ.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,380 @@ + +package jp.sf.pal.pompei.cbean.cq.bs; + +import jp.sf.pal.pompei.cbean.cq.*; + +import jp.sf.pal.pompei.allcommon.cbean.*; +import jp.sf.pal.pompei.allcommon.cbean.ckey.*; +import jp.sf.pal.pompei.allcommon.cbean.cvalue.ConditionValue; +import jp.sf.pal.pompei.allcommon.cbean.sqlclause.SqlClause; +import jp.sf.pal.pompei.cbean.cq.ciq.*; + +/** + * The condition-query of BANNERS_HISTORY. + * + * @author DBFlute(AutoGenerator) + */ +public class BsBannersHistoryCQ extends AbstractBsBannersHistoryCQ { + + // =================================================================================== + // Attribute + // ========= + /** Corresponding inline query. */ + protected BannersHistoryCIQ _inlineQuery; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param childQuery Child query as abstract class. (Nullable: If null, this is base instance.) + * @param sqlClause SQL clause instance. (NotNull) + * @param aliasName My alias name. (NotNull) + * @param nestLevel Nest level. + */ + public BsBannersHistoryCQ(ConditionQuery childQuery, SqlClause sqlClause, String aliasName, int nestLevel) { + super(childQuery, sqlClause, aliasName, nestLevel); + } + + // =================================================================================== + // Inline + // ====== + /** + * Get inline query. + * + * @return Inline query. (NotNull) + */ + public BannersHistoryCIQ inline() { + if (_inlineQuery == null) { + _inlineQuery = new BannersHistoryCIQ(getChildQuery(), getSqlClause(), getAliasName(), getNestLevel(), this); + } + return _inlineQuery; + } + + // =================================================================================== + // Include-as-Mine + // =============== + + /** + * Include select-column of bannersHistoryId as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_BannersHistoryId() { + registerIncludedSelectColumn("BannersHistoryId", getRealColumnName("BANNERS_HISTORY_ID")); + } + + /** + * Include select-column of bannersHistoryId as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_BannersHistoryId(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("BANNERS_HISTORY_ID")); + } + + /** + * Include select-column of bannersId as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_BannersId() { + registerIncludedSelectColumn("BannersId", getRealColumnName("BANNERS_ID")); + } + + /** + * Include select-column of bannersId as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_BannersId(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("BANNERS_ID")); + } + + /** + * Include select-column of bannersShown as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_BannersShown() { + registerIncludedSelectColumn("BannersShown", getRealColumnName("BANNERS_SHOWN")); + } + + /** + * Include select-column of bannersShown as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_BannersShown(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("BANNERS_SHOWN")); + } + + /** + * Include select-column of bannersClicked as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_BannersClicked() { + registerIncludedSelectColumn("BannersClicked", getRealColumnName("BANNERS_CLICKED")); + } + + /** + * Include select-column of bannersClicked as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_BannersClicked(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("BANNERS_CLICKED")); + } + + /** + * Include select-column of bannersHistoryDate as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_BannersHistoryDate() { + registerIncludedSelectColumn("BannersHistoryDate", getRealColumnName("BANNERS_HISTORY_DATE")); + } + + /** + * Include select-column of bannersHistoryDate as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_BannersHistoryDate(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("BANNERS_HISTORY_DATE")); + } + + // =================================================================================== + // Query + // ===== + // /* * * * * * * * * * * * * * * * * * * * * * * + // MyTable = [BANNERS_HISTORY] + // * * * * * * * * */ + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [BANNERS_HISTORY_ID] + // - - - - - - - - -/ + + /** The attribute of bannersHistoryId. */ + protected ConditionValue _bannersHistoryId; + + /** + * Get the value of bannersHistoryId. + * + * @return The value of bannersHistoryId. + */ + public ConditionValue getBannersHistoryId() { + if (_bannersHistoryId == null) { + _bannersHistoryId = new ConditionValue(); + } + return _bannersHistoryId; + } + + protected ConditionValue getCValueBannersHistoryId() { + return getBannersHistoryId(); + } + + + /** + * Add order-by of bannersHistoryId as ASC. + * + * @return this. (NotNull) + */ + public BsBannersHistoryCQ addOrderBy_BannersHistoryId_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_BANNERS_HISTORY_ID), null, true);return this; + } + + /** + * Add order-by of bannersHistoryId as DESC. + * + * @return this. (NotNull) + */ + public BsBannersHistoryCQ addOrderBy_BannersHistoryId_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_BANNERS_HISTORY_ID), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [BANNERS_ID] + // - - - - - - - - -/ + + /** The attribute of bannersId. */ + protected ConditionValue _bannersId; + + /** + * Get the value of bannersId. + * + * @return The value of bannersId. + */ + public ConditionValue getBannersId() { + if (_bannersId == null) { + _bannersId = new ConditionValue(); + } + return _bannersId; + } + + protected ConditionValue getCValueBannersId() { + return getBannersId(); + } + + + /** + * Add order-by of bannersId as ASC. + * + * @return this. (NotNull) + */ + public BsBannersHistoryCQ addOrderBy_BannersId_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_BANNERS_ID), null, true);return this; + } + + /** + * Add order-by of bannersId as DESC. + * + * @return this. (NotNull) + */ + public BsBannersHistoryCQ addOrderBy_BannersId_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_BANNERS_ID), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [BANNERS_SHOWN] + // - - - - - - - - -/ + + /** The attribute of bannersShown. */ + protected ConditionValue _bannersShown; + + /** + * Get the value of bannersShown. + * + * @return The value of bannersShown. + */ + public ConditionValue getBannersShown() { + if (_bannersShown == null) { + _bannersShown = new ConditionValue(); + } + return _bannersShown; + } + + protected ConditionValue getCValueBannersShown() { + return getBannersShown(); + } + + + /** + * Add order-by of bannersShown as ASC. + * + * @return this. (NotNull) + */ + public BsBannersHistoryCQ addOrderBy_BannersShown_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_BANNERS_SHOWN), null, true);return this; + } + + /** + * Add order-by of bannersShown as DESC. + * + * @return this. (NotNull) + */ + public BsBannersHistoryCQ addOrderBy_BannersShown_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_BANNERS_SHOWN), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [BANNERS_CLICKED] + // - - - - - - - - -/ + + /** The attribute of bannersClicked. */ + protected ConditionValue _bannersClicked; + + /** + * Get the value of bannersClicked. + * + * @return The value of bannersClicked. + */ + public ConditionValue getBannersClicked() { + if (_bannersClicked == null) { + _bannersClicked = new ConditionValue(); + } + return _bannersClicked; + } + + protected ConditionValue getCValueBannersClicked() { + return getBannersClicked(); + } + + + /** + * Add order-by of bannersClicked as ASC. + * + * @return this. (NotNull) + */ + public BsBannersHistoryCQ addOrderBy_BannersClicked_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_BANNERS_CLICKED), null, true);return this; + } + + /** + * Add order-by of bannersClicked as DESC. + * + * @return this. (NotNull) + */ + public BsBannersHistoryCQ addOrderBy_BannersClicked_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_BANNERS_CLICKED), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [BANNERS_HISTORY_DATE] + // - - - - - - - - -/ + + /** The attribute of bannersHistoryDate. */ + protected ConditionValue _bannersHistoryDate; + + /** + * Get the value of bannersHistoryDate. + * + * @return The value of bannersHistoryDate. + */ + public ConditionValue getBannersHistoryDate() { + if (_bannersHistoryDate == null) { + _bannersHistoryDate = new ConditionValue(); + } + return _bannersHistoryDate; + } + + protected ConditionValue getCValueBannersHistoryDate() { + return getBannersHistoryDate(); + } + + + /** + * Add order-by of bannersHistoryDate as ASC. + * + * @return this. (NotNull) + */ + public BsBannersHistoryCQ addOrderBy_BannersHistoryDate_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_BANNERS_HISTORY_DATE), null, true);return this; + } + + /** + * Add order-by of bannersHistoryDate as DESC. + * + * @return this. (NotNull) + */ + public BsBannersHistoryCQ addOrderBy_BannersHistoryDate_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_BANNERS_HISTORY_DATE), null, false);return this; + } + + // =================================================================================== + // Union Query + // =========== + protected void reflectRelationOnUnionQuery(ConditionQuery baseQueryAsSuper, ConditionQuery unionQueryAsSuper) { + final BannersHistoryCQ baseQuery = (BannersHistoryCQ)baseQueryAsSuper; + final BannersHistoryCQ unionQuery = (BannersHistoryCQ)unionQueryAsSuper; + + } + + // =================================================================================== + // Foreign Query + // ============= + + +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/BsCategoriesCQ.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/BsCategoriesCQ.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/BsCategoriesCQ.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,440 @@ + +package jp.sf.pal.pompei.cbean.cq.bs; + +import jp.sf.pal.pompei.cbean.cq.*; + +import jp.sf.pal.pompei.allcommon.cbean.*; +import jp.sf.pal.pompei.allcommon.cbean.ckey.*; +import jp.sf.pal.pompei.allcommon.cbean.cvalue.ConditionValue; +import jp.sf.pal.pompei.allcommon.cbean.sqlclause.SqlClause; +import jp.sf.pal.pompei.cbean.cq.ciq.*; + +/** + * The condition-query of CATEGORIES. + * + * @author DBFlute(AutoGenerator) + */ +public class BsCategoriesCQ extends AbstractBsCategoriesCQ { + + // =================================================================================== + // Attribute + // ========= + /** Corresponding inline query. */ + protected CategoriesCIQ _inlineQuery; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param childQuery Child query as abstract class. (Nullable: If null, this is base instance.) + * @param sqlClause SQL clause instance. (NotNull) + * @param aliasName My alias name. (NotNull) + * @param nestLevel Nest level. + */ + public BsCategoriesCQ(ConditionQuery childQuery, SqlClause sqlClause, String aliasName, int nestLevel) { + super(childQuery, sqlClause, aliasName, nestLevel); + } + + // =================================================================================== + // Inline + // ====== + /** + * Get inline query. + * + * @return Inline query. (NotNull) + */ + public CategoriesCIQ inline() { + if (_inlineQuery == null) { + _inlineQuery = new CategoriesCIQ(getChildQuery(), getSqlClause(), getAliasName(), getNestLevel(), this); + } + return _inlineQuery; + } + + // =================================================================================== + // Include-as-Mine + // =============== + + /** + * Include select-column of categoriesId as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_CategoriesId() { + registerIncludedSelectColumn("CategoriesId", getRealColumnName("CATEGORIES_ID")); + } + + /** + * Include select-column of categoriesId as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_CategoriesId(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("CATEGORIES_ID")); + } + + /** + * Include select-column of categoriesImage as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_CategoriesImage() { + registerIncludedSelectColumn("CategoriesImage", getRealColumnName("CATEGORIES_IMAGE")); + } + + /** + * Include select-column of categoriesImage as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_CategoriesImage(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("CATEGORIES_IMAGE")); + } + + /** + * Include select-column of parentId as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_ParentId() { + registerIncludedSelectColumn("ParentId", getRealColumnName("PARENT_ID")); + } + + /** + * Include select-column of parentId as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_ParentId(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("PARENT_ID")); + } + + /** + * Include select-column of sortOrder as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_SortOrder() { + registerIncludedSelectColumn("SortOrder", getRealColumnName("SORT_ORDER")); + } + + /** + * Include select-column of sortOrder as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_SortOrder(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("SORT_ORDER")); + } + + /** + * Include select-column of dateAdded as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_DateAdded() { + registerIncludedSelectColumn("DateAdded", getRealColumnName("DATE_ADDED")); + } + + /** + * Include select-column of dateAdded as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_DateAdded(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("DATE_ADDED")); + } + + /** + * Include select-column of lastModified as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_LastModified() { + registerIncludedSelectColumn("LastModified", getRealColumnName("LAST_MODIFIED")); + } + + /** + * Include select-column of lastModified as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_LastModified(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("LAST_MODIFIED")); + } + + // =================================================================================== + // Query + // ===== + // /* * * * * * * * * * * * * * * * * * * * * * * + // MyTable = [CATEGORIES] + // * * * * * * * * */ + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [CATEGORIES_ID] + // - - - - - - - - -/ + + /** The attribute of categoriesId. */ + protected ConditionValue _categoriesId; + + /** + * Get the value of categoriesId. + * + * @return The value of categoriesId. + */ + public ConditionValue getCategoriesId() { + if (_categoriesId == null) { + _categoriesId = new ConditionValue(); + } + return _categoriesId; + } + + protected ConditionValue getCValueCategoriesId() { + return getCategoriesId(); + } + + + /** + * Add order-by of categoriesId as ASC. + * + * @return this. (NotNull) + */ + public BsCategoriesCQ addOrderBy_CategoriesId_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_CATEGORIES_ID), null, true);return this; + } + + /** + * Add order-by of categoriesId as DESC. + * + * @return this. (NotNull) + */ + public BsCategoriesCQ addOrderBy_CategoriesId_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_CATEGORIES_ID), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [CATEGORIES_IMAGE] + // - - - - - - - - -/ + + /** The attribute of categoriesImage. */ + protected ConditionValue _categoriesImage; + + /** + * Get the value of categoriesImage. + * + * @return The value of categoriesImage. + */ + public ConditionValue getCategoriesImage() { + if (_categoriesImage == null) { + _categoriesImage = new ConditionValue(); + } + return _categoriesImage; + } + + protected ConditionValue getCValueCategoriesImage() { + return getCategoriesImage(); + } + + + /** + * Add order-by of categoriesImage as ASC. + * + * @return this. (NotNull) + */ + public BsCategoriesCQ addOrderBy_CategoriesImage_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_CATEGORIES_IMAGE), null, true);return this; + } + + /** + * Add order-by of categoriesImage as DESC. + * + * @return this. (NotNull) + */ + public BsCategoriesCQ addOrderBy_CategoriesImage_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_CATEGORIES_IMAGE), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [PARENT_ID] + // - - - - - - - - -/ + + /** The attribute of parentId. */ + protected ConditionValue _parentId; + + /** + * Get the value of parentId. + * + * @return The value of parentId. + */ + public ConditionValue getParentId() { + if (_parentId == null) { + _parentId = new ConditionValue(); + } + return _parentId; + } + + protected ConditionValue getCValueParentId() { + return getParentId(); + } + + + /** + * Add order-by of parentId as ASC. + * + * @return this. (NotNull) + */ + public BsCategoriesCQ addOrderBy_ParentId_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_PARENT_ID), null, true);return this; + } + + /** + * Add order-by of parentId as DESC. + * + * @return this. (NotNull) + */ + public BsCategoriesCQ addOrderBy_ParentId_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_PARENT_ID), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [SORT_ORDER] + // - - - - - - - - -/ + + /** The attribute of sortOrder. */ + protected ConditionValue _sortOrder; + + /** + * Get the value of sortOrder. + * + * @return The value of sortOrder. + */ + public ConditionValue getSortOrder() { + if (_sortOrder == null) { + _sortOrder = new ConditionValue(); + } + return _sortOrder; + } + + protected ConditionValue getCValueSortOrder() { + return getSortOrder(); + } + + + /** + * Add order-by of sortOrder as ASC. + * + * @return this. (NotNull) + */ + public BsCategoriesCQ addOrderBy_SortOrder_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_SORT_ORDER), null, true);return this; + } + + /** + * Add order-by of sortOrder as DESC. + * + * @return this. (NotNull) + */ + public BsCategoriesCQ addOrderBy_SortOrder_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_SORT_ORDER), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [DATE_ADDED] + // - - - - - - - - -/ + + /** The attribute of dateAdded. */ + protected ConditionValue _dateAdded; + + /** + * Get the value of dateAdded. + * + * @return The value of dateAdded. + */ + public ConditionValue getDateAdded() { + if (_dateAdded == null) { + _dateAdded = new ConditionValue(); + } + return _dateAdded; + } + + protected ConditionValue getCValueDateAdded() { + return getDateAdded(); + } + + + /** + * Add order-by of dateAdded as ASC. + * + * @return this. (NotNull) + */ + public BsCategoriesCQ addOrderBy_DateAdded_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_DATE_ADDED), null, true);return this; + } + + /** + * Add order-by of dateAdded as DESC. + * + * @return this. (NotNull) + */ + public BsCategoriesCQ addOrderBy_DateAdded_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_DATE_ADDED), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [LAST_MODIFIED] + // - - - - - - - - -/ + + /** The attribute of lastModified. */ + protected ConditionValue _lastModified; + + /** + * Get the value of lastModified. + * + * @return The value of lastModified. + */ + public ConditionValue getLastModified() { + if (_lastModified == null) { + _lastModified = new ConditionValue(); + } + return _lastModified; + } + + protected ConditionValue getCValueLastModified() { + return getLastModified(); + } + + + /** + * Add order-by of lastModified as ASC. + * + * @return this. (NotNull) + */ + public BsCategoriesCQ addOrderBy_LastModified_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_LAST_MODIFIED), null, true);return this; + } + + /** + * Add order-by of lastModified as DESC. + * + * @return this. (NotNull) + */ + public BsCategoriesCQ addOrderBy_LastModified_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_LAST_MODIFIED), null, false);return this; + } + + // =================================================================================== + // Union Query + // =========== + protected void reflectRelationOnUnionQuery(ConditionQuery baseQueryAsSuper, ConditionQuery unionQueryAsSuper) { + final CategoriesCQ baseQuery = (CategoriesCQ)baseQueryAsSuper; + final CategoriesCQ unionQuery = (CategoriesCQ)unionQueryAsSuper; + + } + + // =================================================================================== + // Foreign Query + // ============= + + +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/BsCategoriesDescriptionCQ.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/BsCategoriesDescriptionCQ.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/BsCategoriesDescriptionCQ.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,260 @@ + +package jp.sf.pal.pompei.cbean.cq.bs; + +import jp.sf.pal.pompei.cbean.cq.*; + +import jp.sf.pal.pompei.allcommon.cbean.*; +import jp.sf.pal.pompei.allcommon.cbean.ckey.*; +import jp.sf.pal.pompei.allcommon.cbean.cvalue.ConditionValue; +import jp.sf.pal.pompei.allcommon.cbean.sqlclause.SqlClause; +import jp.sf.pal.pompei.cbean.cq.ciq.*; + +/** + * The condition-query of CATEGORIES_DESCRIPTION. + * + * @author DBFlute(AutoGenerator) + */ +public class BsCategoriesDescriptionCQ extends AbstractBsCategoriesDescriptionCQ { + + // =================================================================================== + // Attribute + // ========= + /** Corresponding inline query. */ + protected CategoriesDescriptionCIQ _inlineQuery; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param childQuery Child query as abstract class. (Nullable: If null, this is base instance.) + * @param sqlClause SQL clause instance. (NotNull) + * @param aliasName My alias name. (NotNull) + * @param nestLevel Nest level. + */ + public BsCategoriesDescriptionCQ(ConditionQuery childQuery, SqlClause sqlClause, String aliasName, int nestLevel) { + super(childQuery, sqlClause, aliasName, nestLevel); + } + + // =================================================================================== + // Inline + // ====== + /** + * Get inline query. + * + * @return Inline query. (NotNull) + */ + public CategoriesDescriptionCIQ inline() { + if (_inlineQuery == null) { + _inlineQuery = new CategoriesDescriptionCIQ(getChildQuery(), getSqlClause(), getAliasName(), getNestLevel(), this); + } + return _inlineQuery; + } + + // =================================================================================== + // Include-as-Mine + // =============== + + /** + * Include select-column of categoriesId as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_CategoriesId() { + registerIncludedSelectColumn("CategoriesId", getRealColumnName("CATEGORIES_ID")); + } + + /** + * Include select-column of categoriesId as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_CategoriesId(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("CATEGORIES_ID")); + } + + /** + * Include select-column of languageId as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_LanguageId() { + registerIncludedSelectColumn("LanguageId", getRealColumnName("LANGUAGE_ID")); + } + + /** + * Include select-column of languageId as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_LanguageId(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("LANGUAGE_ID")); + } + + /** + * Include select-column of categoriesName as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_CategoriesName() { + registerIncludedSelectColumn("CategoriesName", getRealColumnName("CATEGORIES_NAME")); + } + + /** + * Include select-column of categoriesName as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_CategoriesName(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("CATEGORIES_NAME")); + } + + // =================================================================================== + // Query + // ===== + // /* * * * * * * * * * * * * * * * * * * * * * * + // MyTable = [CATEGORIES_DESCRIPTION] + // * * * * * * * * */ + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [CATEGORIES_ID] + // - - - - - - - - -/ + + /** The attribute of categoriesId. */ + protected ConditionValue _categoriesId; + + /** + * Get the value of categoriesId. + * + * @return The value of categoriesId. + */ + public ConditionValue getCategoriesId() { + if (_categoriesId == null) { + _categoriesId = new ConditionValue(); + } + return _categoriesId; + } + + protected ConditionValue getCValueCategoriesId() { + return getCategoriesId(); + } + + + /** + * Add order-by of categoriesId as ASC. + * + * @return this. (NotNull) + */ + public BsCategoriesDescriptionCQ addOrderBy_CategoriesId_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_CATEGORIES_ID), null, true);return this; + } + + /** + * Add order-by of categoriesId as DESC. + * + * @return this. (NotNull) + */ + public BsCategoriesDescriptionCQ addOrderBy_CategoriesId_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_CATEGORIES_ID), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [LANGUAGE_ID] + // - - - - - - - - -/ + + /** The attribute of languageId. */ + protected ConditionValue _languageId; + + /** + * Get the value of languageId. + * + * @return The value of languageId. + */ + public ConditionValue getLanguageId() { + if (_languageId == null) { + _languageId = new ConditionValue(); + } + return _languageId; + } + + protected ConditionValue getCValueLanguageId() { + return getLanguageId(); + } + + + /** + * Add order-by of languageId as ASC. + * + * @return this. (NotNull) + */ + public BsCategoriesDescriptionCQ addOrderBy_LanguageId_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_LANGUAGE_ID), null, true);return this; + } + + /** + * Add order-by of languageId as DESC. + * + * @return this. (NotNull) + */ + public BsCategoriesDescriptionCQ addOrderBy_LanguageId_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_LANGUAGE_ID), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [CATEGORIES_NAME] + // - - - - - - - - -/ + + /** The attribute of categoriesName. */ + protected ConditionValue _categoriesName; + + /** + * Get the value of categoriesName. + * + * @return The value of categoriesName. + */ + public ConditionValue getCategoriesName() { + if (_categoriesName == null) { + _categoriesName = new ConditionValue(); + } + return _categoriesName; + } + + protected ConditionValue getCValueCategoriesName() { + return getCategoriesName(); + } + + + /** + * Add order-by of categoriesName as ASC. + * + * @return this. (NotNull) + */ + public BsCategoriesDescriptionCQ addOrderBy_CategoriesName_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_CATEGORIES_NAME), null, true);return this; + } + + /** + * Add order-by of categoriesName as DESC. + * + * @return this. (NotNull) + */ + public BsCategoriesDescriptionCQ addOrderBy_CategoriesName_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_CATEGORIES_NAME), null, false);return this; + } + + // =================================================================================== + // Union Query + // =========== + protected void reflectRelationOnUnionQuery(ConditionQuery baseQueryAsSuper, ConditionQuery unionQueryAsSuper) { + final CategoriesDescriptionCQ baseQuery = (CategoriesDescriptionCQ)baseQueryAsSuper; + final CategoriesDescriptionCQ unionQuery = (CategoriesDescriptionCQ)unionQueryAsSuper; + + } + + // =================================================================================== + // Foreign Query + // ============= + + +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/BsConfigurationCQ.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/BsConfigurationCQ.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/BsConfigurationCQ.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,740 @@ + +package jp.sf.pal.pompei.cbean.cq.bs; + +import jp.sf.pal.pompei.cbean.cq.*; + +import jp.sf.pal.pompei.allcommon.cbean.*; +import jp.sf.pal.pompei.allcommon.cbean.ckey.*; +import jp.sf.pal.pompei.allcommon.cbean.cvalue.ConditionValue; +import jp.sf.pal.pompei.allcommon.cbean.sqlclause.SqlClause; +import jp.sf.pal.pompei.cbean.cq.ciq.*; + +/** + * The condition-query of CONFIGURATION. + * + * @author DBFlute(AutoGenerator) + */ +public class BsConfigurationCQ extends AbstractBsConfigurationCQ { + + // =================================================================================== + // Attribute + // ========= + /** Corresponding inline query. */ + protected ConfigurationCIQ _inlineQuery; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param childQuery Child query as abstract class. (Nullable: If null, this is base instance.) + * @param sqlClause SQL clause instance. (NotNull) + * @param aliasName My alias name. (NotNull) + * @param nestLevel Nest level. + */ + public BsConfigurationCQ(ConditionQuery childQuery, SqlClause sqlClause, String aliasName, int nestLevel) { + super(childQuery, sqlClause, aliasName, nestLevel); + } + + // =================================================================================== + // Inline + // ====== + /** + * Get inline query. + * + * @return Inline query. (NotNull) + */ + public ConfigurationCIQ inline() { + if (_inlineQuery == null) { + _inlineQuery = new ConfigurationCIQ(getChildQuery(), getSqlClause(), getAliasName(), getNestLevel(), this); + } + return _inlineQuery; + } + + // =================================================================================== + // Include-as-Mine + // =============== + + /** + * Include select-column of configurationId as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_ConfigurationId() { + registerIncludedSelectColumn("ConfigurationId", getRealColumnName("CONFIGURATION_ID")); + } + + /** + * Include select-column of configurationId as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_ConfigurationId(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("CONFIGURATION_ID")); + } + + /** + * Include select-column of configurationTitle as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_ConfigurationTitle() { + registerIncludedSelectColumn("ConfigurationTitle", getRealColumnName("CONFIGURATION_TITLE")); + } + + /** + * Include select-column of configurationTitle as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_ConfigurationTitle(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("CONFIGURATION_TITLE")); + } + + /** + * Include select-column of configurationKey as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_ConfigurationKey() { + registerIncludedSelectColumn("ConfigurationKey", getRealColumnName("CONFIGURATION_KEY")); + } + + /** + * Include select-column of configurationKey as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_ConfigurationKey(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("CONFIGURATION_KEY")); + } + + /** + * Include select-column of configurationValue as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_ConfigurationValue() { + registerIncludedSelectColumn("ConfigurationValue", getRealColumnName("CONFIGURATION_VALUE")); + } + + /** + * Include select-column of configurationValue as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_ConfigurationValue(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("CONFIGURATION_VALUE")); + } + + /** + * Include select-column of configurationDescription as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_ConfigurationDescription() { + registerIncludedSelectColumn("ConfigurationDescription", getRealColumnName("CONFIGURATION_DESCRIPTION")); + } + + /** + * Include select-column of configurationDescription as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_ConfigurationDescription(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("CONFIGURATION_DESCRIPTION")); + } + + /** + * Include select-column of configurationGroupId as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_ConfigurationGroupId() { + registerIncludedSelectColumn("ConfigurationGroupId", getRealColumnName("CONFIGURATION_GROUP_ID")); + } + + /** + * Include select-column of configurationGroupId as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_ConfigurationGroupId(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("CONFIGURATION_GROUP_ID")); + } + + /** + * Include select-column of sortOrder as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_SortOrder() { + registerIncludedSelectColumn("SortOrder", getRealColumnName("SORT_ORDER")); + } + + /** + * Include select-column of sortOrder as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_SortOrder(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("SORT_ORDER")); + } + + /** + * Include select-column of lastModified as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_LastModified() { + registerIncludedSelectColumn("LastModified", getRealColumnName("LAST_MODIFIED")); + } + + /** + * Include select-column of lastModified as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_LastModified(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("LAST_MODIFIED")); + } + + /** + * Include select-column of dateAdded as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_DateAdded() { + registerIncludedSelectColumn("DateAdded", getRealColumnName("DATE_ADDED")); + } + + /** + * Include select-column of dateAdded as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_DateAdded(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("DATE_ADDED")); + } + + /** + * Include select-column of useFunction as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_UseFunction() { + registerIncludedSelectColumn("UseFunction", getRealColumnName("USE_FUNCTION")); + } + + /** + * Include select-column of useFunction as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_UseFunction(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("USE_FUNCTION")); + } + + /** + * Include select-column of setFunction as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_SetFunction() { + registerIncludedSelectColumn("SetFunction", getRealColumnName("SET_FUNCTION")); + } + + /** + * Include select-column of setFunction as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_SetFunction(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("SET_FUNCTION")); + } + + // =================================================================================== + // Query + // ===== + // /* * * * * * * * * * * * * * * * * * * * * * * + // MyTable = [CONFIGURATION] + // * * * * * * * * */ + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [CONFIGURATION_ID] + // - - - - - - - - -/ + + /** The attribute of configurationId. */ + protected ConditionValue _configurationId; + + /** + * Get the value of configurationId. + * + * @return The value of configurationId. + */ + public ConditionValue getConfigurationId() { + if (_configurationId == null) { + _configurationId = new ConditionValue(); + } + return _configurationId; + } + + protected ConditionValue getCValueConfigurationId() { + return getConfigurationId(); + } + + + /** + * Add order-by of configurationId as ASC. + * + * @return this. (NotNull) + */ + public BsConfigurationCQ addOrderBy_ConfigurationId_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_CONFIGURATION_ID), null, true);return this; + } + + /** + * Add order-by of configurationId as DESC. + * + * @return this. (NotNull) + */ + public BsConfigurationCQ addOrderBy_ConfigurationId_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_CONFIGURATION_ID), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [CONFIGURATION_TITLE] + // - - - - - - - - -/ + + /** The attribute of configurationTitle. */ + protected ConditionValue _configurationTitle; + + /** + * Get the value of configurationTitle. + * + * @return The value of configurationTitle. + */ + public ConditionValue getConfigurationTitle() { + if (_configurationTitle == null) { + _configurationTitle = new ConditionValue(); + } + return _configurationTitle; + } + + protected ConditionValue getCValueConfigurationTitle() { + return getConfigurationTitle(); + } + + + /** + * Add order-by of configurationTitle as ASC. + * + * @return this. (NotNull) + */ + public BsConfigurationCQ addOrderBy_ConfigurationTitle_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_CONFIGURATION_TITLE), null, true);return this; + } + + /** + * Add order-by of configurationTitle as DESC. + * + * @return this. (NotNull) + */ + public BsConfigurationCQ addOrderBy_ConfigurationTitle_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_CONFIGURATION_TITLE), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [CONFIGURATION_KEY] + // - - - - - - - - -/ + + /** The attribute of configurationKey. */ + protected ConditionValue _configurationKey; + + /** + * Get the value of configurationKey. + * + * @return The value of configurationKey. + */ + public ConditionValue getConfigurationKey() { + if (_configurationKey == null) { + _configurationKey = new ConditionValue(); + } + return _configurationKey; + } + + protected ConditionValue getCValueConfigurationKey() { + return getConfigurationKey(); + } + + + /** + * Add order-by of configurationKey as ASC. + * + * @return this. (NotNull) + */ + public BsConfigurationCQ addOrderBy_ConfigurationKey_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_CONFIGURATION_KEY), null, true);return this; + } + + /** + * Add order-by of configurationKey as DESC. + * + * @return this. (NotNull) + */ + public BsConfigurationCQ addOrderBy_ConfigurationKey_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_CONFIGURATION_KEY), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [CONFIGURATION_VALUE] + // - - - - - - - - -/ + + /** The attribute of configurationValue. */ + protected ConditionValue _configurationValue; + + /** + * Get the value of configurationValue. + * + * @return The value of configurationValue. + */ + public ConditionValue getConfigurationValue() { + if (_configurationValue == null) { + _configurationValue = new ConditionValue(); + } + return _configurationValue; + } + + protected ConditionValue getCValueConfigurationValue() { + return getConfigurationValue(); + } + + + /** + * Add order-by of configurationValue as ASC. + * + * @return this. (NotNull) + */ + public BsConfigurationCQ addOrderBy_ConfigurationValue_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_CONFIGURATION_VALUE), null, true);return this; + } + + /** + * Add order-by of configurationValue as DESC. + * + * @return this. (NotNull) + */ + public BsConfigurationCQ addOrderBy_ConfigurationValue_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_CONFIGURATION_VALUE), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [CONFIGURATION_DESCRIPTION] + // - - - - - - - - -/ + + /** The attribute of configurationDescription. */ + protected ConditionValue _configurationDescription; + + /** + * Get the value of configurationDescription. + * + * @return The value of configurationDescription. + */ + public ConditionValue getConfigurationDescription() { + if (_configurationDescription == null) { + _configurationDescription = new ConditionValue(); + } + return _configurationDescription; + } + + protected ConditionValue getCValueConfigurationDescription() { + return getConfigurationDescription(); + } + + + /** + * Add order-by of configurationDescription as ASC. + * + * @return this. (NotNull) + */ + public BsConfigurationCQ addOrderBy_ConfigurationDescription_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_CONFIGURATION_DESCRIPTION), null, true);return this; + } + + /** + * Add order-by of configurationDescription as DESC. + * + * @return this. (NotNull) + */ + public BsConfigurationCQ addOrderBy_ConfigurationDescription_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_CONFIGURATION_DESCRIPTION), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [CONFIGURATION_GROUP_ID] + // - - - - - - - - -/ + + /** The attribute of configurationGroupId. */ + protected ConditionValue _configurationGroupId; + + /** + * Get the value of configurationGroupId. + * + * @return The value of configurationGroupId. + */ + public ConditionValue getConfigurationGroupId() { + if (_configurationGroupId == null) { + _configurationGroupId = new ConditionValue(); + } + return _configurationGroupId; + } + + protected ConditionValue getCValueConfigurationGroupId() { + return getConfigurationGroupId(); + } + + + /** + * Add order-by of configurationGroupId as ASC. + * + * @return this. (NotNull) + */ + public BsConfigurationCQ addOrderBy_ConfigurationGroupId_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_CONFIGURATION_GROUP_ID), null, true);return this; + } + + /** + * Add order-by of configurationGroupId as DESC. + * + * @return this. (NotNull) + */ + public BsConfigurationCQ addOrderBy_ConfigurationGroupId_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_CONFIGURATION_GROUP_ID), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [SORT_ORDER] + // - - - - - - - - -/ + + /** The attribute of sortOrder. */ + protected ConditionValue _sortOrder; + + /** + * Get the value of sortOrder. + * + * @return The value of sortOrder. + */ + public ConditionValue getSortOrder() { + if (_sortOrder == null) { + _sortOrder = new ConditionValue(); + } + return _sortOrder; + } + + protected ConditionValue getCValueSortOrder() { + return getSortOrder(); + } + + + /** + * Add order-by of sortOrder as ASC. + * + * @return this. (NotNull) + */ + public BsConfigurationCQ addOrderBy_SortOrder_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_SORT_ORDER), null, true);return this; + } + + /** + * Add order-by of sortOrder as DESC. + * + * @return this. (NotNull) + */ + public BsConfigurationCQ addOrderBy_SortOrder_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_SORT_ORDER), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [LAST_MODIFIED] + // - - - - - - - - -/ + + /** The attribute of lastModified. */ + protected ConditionValue _lastModified; + + /** + * Get the value of lastModified. + * + * @return The value of lastModified. + */ + public ConditionValue getLastModified() { + if (_lastModified == null) { + _lastModified = new ConditionValue(); + } + return _lastModified; + } + + protected ConditionValue getCValueLastModified() { + return getLastModified(); + } + + + /** + * Add order-by of lastModified as ASC. + * + * @return this. (NotNull) + */ + public BsConfigurationCQ addOrderBy_LastModified_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_LAST_MODIFIED), null, true);return this; + } + + /** + * Add order-by of lastModified as DESC. + * + * @return this. (NotNull) + */ + public BsConfigurationCQ addOrderBy_LastModified_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_LAST_MODIFIED), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [DATE_ADDED] + // - - - - - - - - -/ + + /** The attribute of dateAdded. */ + protected ConditionValue _dateAdded; + + /** + * Get the value of dateAdded. + * + * @return The value of dateAdded. + */ + public ConditionValue getDateAdded() { + if (_dateAdded == null) { + _dateAdded = new ConditionValue(); + } + return _dateAdded; + } + + protected ConditionValue getCValueDateAdded() { + return getDateAdded(); + } + + + /** + * Add order-by of dateAdded as ASC. + * + * @return this. (NotNull) + */ + public BsConfigurationCQ addOrderBy_DateAdded_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_DATE_ADDED), null, true);return this; + } + + /** + * Add order-by of dateAdded as DESC. + * + * @return this. (NotNull) + */ + public BsConfigurationCQ addOrderBy_DateAdded_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_DATE_ADDED), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [USE_FUNCTION] + // - - - - - - - - -/ + + /** The attribute of useFunction. */ + protected ConditionValue _useFunction; + + /** + * Get the value of useFunction. + * + * @return The value of useFunction. + */ + public ConditionValue getUseFunction() { + if (_useFunction == null) { + _useFunction = new ConditionValue(); + } + return _useFunction; + } + + protected ConditionValue getCValueUseFunction() { + return getUseFunction(); + } + + + /** + * Add order-by of useFunction as ASC. + * + * @return this. (NotNull) + */ + public BsConfigurationCQ addOrderBy_UseFunction_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_USE_FUNCTION), null, true);return this; + } + + /** + * Add order-by of useFunction as DESC. + * + * @return this. (NotNull) + */ + public BsConfigurationCQ addOrderBy_UseFunction_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_USE_FUNCTION), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [SET_FUNCTION] + // - - - - - - - - -/ + + /** The attribute of setFunction. */ + protected ConditionValue _setFunction; + + /** + * Get the value of setFunction. + * + * @return The value of setFunction. + */ + public ConditionValue getSetFunction() { + if (_setFunction == null) { + _setFunction = new ConditionValue(); + } + return _setFunction; + } + + protected ConditionValue getCValueSetFunction() { + return getSetFunction(); + } + + + /** + * Add order-by of setFunction as ASC. + * + * @return this. (NotNull) + */ + public BsConfigurationCQ addOrderBy_SetFunction_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_SET_FUNCTION), null, true);return this; + } + + /** + * Add order-by of setFunction as DESC. + * + * @return this. (NotNull) + */ + public BsConfigurationCQ addOrderBy_SetFunction_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_SET_FUNCTION), null, false);return this; + } + + // =================================================================================== + // Union Query + // =========== + protected void reflectRelationOnUnionQuery(ConditionQuery baseQueryAsSuper, ConditionQuery unionQueryAsSuper) { + final ConfigurationCQ baseQuery = (ConfigurationCQ)baseQueryAsSuper; + final ConfigurationCQ unionQuery = (ConfigurationCQ)unionQueryAsSuper; + + } + + // =================================================================================== + // Foreign Query + // ============= + + +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/BsConfigurationGroupCQ.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/BsConfigurationGroupCQ.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/BsConfigurationGroupCQ.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,380 @@ + +package jp.sf.pal.pompei.cbean.cq.bs; + +import jp.sf.pal.pompei.cbean.cq.*; + +import jp.sf.pal.pompei.allcommon.cbean.*; +import jp.sf.pal.pompei.allcommon.cbean.ckey.*; +import jp.sf.pal.pompei.allcommon.cbean.cvalue.ConditionValue; +import jp.sf.pal.pompei.allcommon.cbean.sqlclause.SqlClause; +import jp.sf.pal.pompei.cbean.cq.ciq.*; + +/** + * The condition-query of CONFIGURATION_GROUP. + * + * @author DBFlute(AutoGenerator) + */ +public class BsConfigurationGroupCQ extends AbstractBsConfigurationGroupCQ { + + // =================================================================================== + // Attribute + // ========= + /** Corresponding inline query. */ + protected ConfigurationGroupCIQ _inlineQuery; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param childQuery Child query as abstract class. (Nullable: If null, this is base instance.) + * @param sqlClause SQL clause instance. (NotNull) + * @param aliasName My alias name. (NotNull) + * @param nestLevel Nest level. + */ + public BsConfigurationGroupCQ(ConditionQuery childQuery, SqlClause sqlClause, String aliasName, int nestLevel) { + super(childQuery, sqlClause, aliasName, nestLevel); + } + + // =================================================================================== + // Inline + // ====== + /** + * Get inline query. + * + * @return Inline query. (NotNull) + */ + public ConfigurationGroupCIQ inline() { + if (_inlineQuery == null) { + _inlineQuery = new ConfigurationGroupCIQ(getChildQuery(), getSqlClause(), getAliasName(), getNestLevel(), this); + } + return _inlineQuery; + } + + // =================================================================================== + // Include-as-Mine + // =============== + + /** + * Include select-column of configurationGroupId as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_ConfigurationGroupId() { + registerIncludedSelectColumn("ConfigurationGroupId", getRealColumnName("CONFIGURATION_GROUP_ID")); + } + + /** + * Include select-column of configurationGroupId as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_ConfigurationGroupId(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("CONFIGURATION_GROUP_ID")); + } + + /** + * Include select-column of configurationGroupTitle as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_ConfigurationGroupTitle() { + registerIncludedSelectColumn("ConfigurationGroupTitle", getRealColumnName("CONFIGURATION_GROUP_TITLE")); + } + + /** + * Include select-column of configurationGroupTitle as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_ConfigurationGroupTitle(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("CONFIGURATION_GROUP_TITLE")); + } + + /** + * Include select-column of configurationGroupDescription as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_ConfigurationGroupDescription() { + registerIncludedSelectColumn("ConfigurationGroupDescription", getRealColumnName("CONFIGURATION_GROUP_DESCRIPTION")); + } + + /** + * Include select-column of configurationGroupDescription as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_ConfigurationGroupDescription(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("CONFIGURATION_GROUP_DESCRIPTION")); + } + + /** + * Include select-column of sortOrder as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_SortOrder() { + registerIncludedSelectColumn("SortOrder", getRealColumnName("SORT_ORDER")); + } + + /** + * Include select-column of sortOrder as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_SortOrder(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("SORT_ORDER")); + } + + /** + * Include select-column of visible as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_Visible() { + registerIncludedSelectColumn("Visible", getRealColumnName("VISIBLE")); + } + + /** + * Include select-column of visible as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_Visible(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("VISIBLE")); + } + + // =================================================================================== + // Query + // ===== + // /* * * * * * * * * * * * * * * * * * * * * * * + // MyTable = [CONFIGURATION_GROUP] + // * * * * * * * * */ + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [CONFIGURATION_GROUP_ID] + // - - - - - - - - -/ + + /** The attribute of configurationGroupId. */ + protected ConditionValue _configurationGroupId; + + /** + * Get the value of configurationGroupId. + * + * @return The value of configurationGroupId. + */ + public ConditionValue getConfigurationGroupId() { + if (_configurationGroupId == null) { + _configurationGroupId = new ConditionValue(); + } + return _configurationGroupId; + } + + protected ConditionValue getCValueConfigurationGroupId() { + return getConfigurationGroupId(); + } + + + /** + * Add order-by of configurationGroupId as ASC. + * + * @return this. (NotNull) + */ + public BsConfigurationGroupCQ addOrderBy_ConfigurationGroupId_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_CONFIGURATION_GROUP_ID), null, true);return this; + } + + /** + * Add order-by of configurationGroupId as DESC. + * + * @return this. (NotNull) + */ + public BsConfigurationGroupCQ addOrderBy_ConfigurationGroupId_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_CONFIGURATION_GROUP_ID), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [CONFIGURATION_GROUP_TITLE] + // - - - - - - - - -/ + + /** The attribute of configurationGroupTitle. */ + protected ConditionValue _configurationGroupTitle; + + /** + * Get the value of configurationGroupTitle. + * + * @return The value of configurationGroupTitle. + */ + public ConditionValue getConfigurationGroupTitle() { + if (_configurationGroupTitle == null) { + _configurationGroupTitle = new ConditionValue(); + } + return _configurationGroupTitle; + } + + protected ConditionValue getCValueConfigurationGroupTitle() { + return getConfigurationGroupTitle(); + } + + + /** + * Add order-by of configurationGroupTitle as ASC. + * + * @return this. (NotNull) + */ + public BsConfigurationGroupCQ addOrderBy_ConfigurationGroupTitle_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_CONFIGURATION_GROUP_TITLE), null, true);return this; + } + + /** + * Add order-by of configurationGroupTitle as DESC. + * + * @return this. (NotNull) + */ + public BsConfigurationGroupCQ addOrderBy_ConfigurationGroupTitle_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_CONFIGURATION_GROUP_TITLE), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [CONFIGURATION_GROUP_DESCRIPTION] + // - - - - - - - - -/ + + /** The attribute of configurationGroupDescription. */ + protected ConditionValue _configurationGroupDescription; + + /** + * Get the value of configurationGroupDescription. + * + * @return The value of configurationGroupDescription. + */ + public ConditionValue getConfigurationGroupDescription() { + if (_configurationGroupDescription == null) { + _configurationGroupDescription = new ConditionValue(); + } + return _configurationGroupDescription; + } + + protected ConditionValue getCValueConfigurationGroupDescription() { + return getConfigurationGroupDescription(); + } + + + /** + * Add order-by of configurationGroupDescription as ASC. + * + * @return this. (NotNull) + */ + public BsConfigurationGroupCQ addOrderBy_ConfigurationGroupDescription_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_CONFIGURATION_GROUP_DESCRIPTION), null, true);return this; + } + + /** + * Add order-by of configurationGroupDescription as DESC. + * + * @return this. (NotNull) + */ + public BsConfigurationGroupCQ addOrderBy_ConfigurationGroupDescription_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_CONFIGURATION_GROUP_DESCRIPTION), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [SORT_ORDER] + // - - - - - - - - -/ + + /** The attribute of sortOrder. */ + protected ConditionValue _sortOrder; + + /** + * Get the value of sortOrder. + * + * @return The value of sortOrder. + */ + public ConditionValue getSortOrder() { + if (_sortOrder == null) { + _sortOrder = new ConditionValue(); + } + return _sortOrder; + } + + protected ConditionValue getCValueSortOrder() { + return getSortOrder(); + } + + + /** + * Add order-by of sortOrder as ASC. + * + * @return this. (NotNull) + */ + public BsConfigurationGroupCQ addOrderBy_SortOrder_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_SORT_ORDER), null, true);return this; + } + + /** + * Add order-by of sortOrder as DESC. + * + * @return this. (NotNull) + */ + public BsConfigurationGroupCQ addOrderBy_SortOrder_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_SORT_ORDER), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [VISIBLE] + // - - - - - - - - -/ + + /** The attribute of visible. */ + protected ConditionValue _visible; + + /** + * Get the value of visible. + * + * @return The value of visible. + */ + public ConditionValue getVisible() { + if (_visible == null) { + _visible = new ConditionValue(); + } + return _visible; + } + + protected ConditionValue getCValueVisible() { + return getVisible(); + } + + + /** + * Add order-by of visible as ASC. + * + * @return this. (NotNull) + */ + public BsConfigurationGroupCQ addOrderBy_Visible_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_VISIBLE), null, true);return this; + } + + /** + * Add order-by of visible as DESC. + * + * @return this. (NotNull) + */ + public BsConfigurationGroupCQ addOrderBy_Visible_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_VISIBLE), null, false);return this; + } + + // =================================================================================== + // Union Query + // =========== + protected void reflectRelationOnUnionQuery(ConditionQuery baseQueryAsSuper, ConditionQuery unionQueryAsSuper) { + final ConfigurationGroupCQ baseQuery = (ConfigurationGroupCQ)baseQueryAsSuper; + final ConfigurationGroupCQ unionQuery = (ConfigurationGroupCQ)unionQueryAsSuper; + + } + + // =================================================================================== + // Foreign Query + // ============= + + +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/BsCounterCQ.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/BsCounterCQ.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/BsCounterCQ.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,200 @@ + +package jp.sf.pal.pompei.cbean.cq.bs; + +import jp.sf.pal.pompei.cbean.cq.*; + +import jp.sf.pal.pompei.allcommon.cbean.*; +import jp.sf.pal.pompei.allcommon.cbean.ckey.*; +import jp.sf.pal.pompei.allcommon.cbean.cvalue.ConditionValue; +import jp.sf.pal.pompei.allcommon.cbean.sqlclause.SqlClause; +import jp.sf.pal.pompei.cbean.cq.ciq.*; + +/** + * The condition-query of COUNTER. + * + * @author DBFlute(AutoGenerator) + */ +public class BsCounterCQ extends AbstractBsCounterCQ { + + // =================================================================================== + // Attribute + // ========= + /** Corresponding inline query. */ + protected CounterCIQ _inlineQuery; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param childQuery Child query as abstract class. (Nullable: If null, this is base instance.) + * @param sqlClause SQL clause instance. (NotNull) + * @param aliasName My alias name. (NotNull) + * @param nestLevel Nest level. + */ + public BsCounterCQ(ConditionQuery childQuery, SqlClause sqlClause, String aliasName, int nestLevel) { + super(childQuery, sqlClause, aliasName, nestLevel); + } + + // =================================================================================== + // Inline + // ====== + /** + * Get inline query. + * + * @return Inline query. (NotNull) + */ + public CounterCIQ inline() { + if (_inlineQuery == null) { + _inlineQuery = new CounterCIQ(getChildQuery(), getSqlClause(), getAliasName(), getNestLevel(), this); + } + return _inlineQuery; + } + + // =================================================================================== + // Include-as-Mine + // =============== + + /** + * Include select-column of startdate as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_Startdate() { + registerIncludedSelectColumn("Startdate", getRealColumnName("STARTDATE")); + } + + /** + * Include select-column of startdate as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_Startdate(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("STARTDATE")); + } + + /** + * Include select-column of counter as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_Counter() { + registerIncludedSelectColumn("Counter", getRealColumnName("COUNTER")); + } + + /** + * Include select-column of counter as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_Counter(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("COUNTER")); + } + + // =================================================================================== + // Query + // ===== + // /* * * * * * * * * * * * * * * * * * * * * * * + // MyTable = [COUNTER] + // * * * * * * * * */ + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [STARTDATE] + // - - - - - - - - -/ + + /** The attribute of startdate. */ + protected ConditionValue _startdate; + + /** + * Get the value of startdate. + * + * @return The value of startdate. + */ + public ConditionValue getStartdate() { + if (_startdate == null) { + _startdate = new ConditionValue(); + } + return _startdate; + } + + protected ConditionValue getCValueStartdate() { + return getStartdate(); + } + + + /** + * Add order-by of startdate as ASC. + * + * @return this. (NotNull) + */ + public BsCounterCQ addOrderBy_Startdate_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_STARTDATE), null, true);return this; + } + + /** + * Add order-by of startdate as DESC. + * + * @return this. (NotNull) + */ + public BsCounterCQ addOrderBy_Startdate_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_STARTDATE), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [COUNTER] + // - - - - - - - - -/ + + /** The attribute of counter. */ + protected ConditionValue _counter; + + /** + * Get the value of counter. + * + * @return The value of counter. + */ + public ConditionValue getCounter() { + if (_counter == null) { + _counter = new ConditionValue(); + } + return _counter; + } + + protected ConditionValue getCValueCounter() { + return getCounter(); + } + + + /** + * Add order-by of counter as ASC. + * + * @return this. (NotNull) + */ + public BsCounterCQ addOrderBy_Counter_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_COUNTER), null, true);return this; + } + + /** + * Add order-by of counter as DESC. + * + * @return this. (NotNull) + */ + public BsCounterCQ addOrderBy_Counter_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_COUNTER), null, false);return this; + } + + // =================================================================================== + // Union Query + // =========== + protected void reflectRelationOnUnionQuery(ConditionQuery baseQueryAsSuper, ConditionQuery unionQueryAsSuper) { + final CounterCQ baseQuery = (CounterCQ)baseQueryAsSuper; + final CounterCQ unionQuery = (CounterCQ)unionQueryAsSuper; + + } + + // =================================================================================== + // Foreign Query + // ============= + + +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/BsCounterHistoryCQ.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/BsCounterHistoryCQ.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/BsCounterHistoryCQ.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,200 @@ + +package jp.sf.pal.pompei.cbean.cq.bs; + +import jp.sf.pal.pompei.cbean.cq.*; + +import jp.sf.pal.pompei.allcommon.cbean.*; +import jp.sf.pal.pompei.allcommon.cbean.ckey.*; +import jp.sf.pal.pompei.allcommon.cbean.cvalue.ConditionValue; +import jp.sf.pal.pompei.allcommon.cbean.sqlclause.SqlClause; +import jp.sf.pal.pompei.cbean.cq.ciq.*; + +/** + * The condition-query of COUNTER_HISTORY. + * + * @author DBFlute(AutoGenerator) + */ +public class BsCounterHistoryCQ extends AbstractBsCounterHistoryCQ { + + // =================================================================================== + // Attribute + // ========= + /** Corresponding inline query. */ + protected CounterHistoryCIQ _inlineQuery; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param childQuery Child query as abstract class. (Nullable: If null, this is base instance.) + * @param sqlClause SQL clause instance. (NotNull) + * @param aliasName My alias name. (NotNull) + * @param nestLevel Nest level. + */ + public BsCounterHistoryCQ(ConditionQuery childQuery, SqlClause sqlClause, String aliasName, int nestLevel) { + super(childQuery, sqlClause, aliasName, nestLevel); + } + + // =================================================================================== + // Inline + // ====== + /** + * Get inline query. + * + * @return Inline query. (NotNull) + */ + public CounterHistoryCIQ inline() { + if (_inlineQuery == null) { + _inlineQuery = new CounterHistoryCIQ(getChildQuery(), getSqlClause(), getAliasName(), getNestLevel(), this); + } + return _inlineQuery; + } + + // =================================================================================== + // Include-as-Mine + // =============== + + /** + * Include select-column of month as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_Month() { + registerIncludedSelectColumn("Month", getRealColumnName("MONTH")); + } + + /** + * Include select-column of month as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_Month(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("MONTH")); + } + + /** + * Include select-column of counter as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_Counter() { + registerIncludedSelectColumn("Counter", getRealColumnName("COUNTER")); + } + + /** + * Include select-column of counter as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_Counter(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("COUNTER")); + } + + // =================================================================================== + // Query + // ===== + // /* * * * * * * * * * * * * * * * * * * * * * * + // MyTable = [COUNTER_HISTORY] + // * * * * * * * * */ + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [MONTH] + // - - - - - - - - -/ + + /** The attribute of month. */ + protected ConditionValue _month; + + /** + * Get the value of month. + * + * @return The value of month. + */ + public ConditionValue getMonth() { + if (_month == null) { + _month = new ConditionValue(); + } + return _month; + } + + protected ConditionValue getCValueMonth() { + return getMonth(); + } + + + /** + * Add order-by of month as ASC. + * + * @return this. (NotNull) + */ + public BsCounterHistoryCQ addOrderBy_Month_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_MONTH), null, true);return this; + } + + /** + * Add order-by of month as DESC. + * + * @return this. (NotNull) + */ + public BsCounterHistoryCQ addOrderBy_Month_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_MONTH), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [COUNTER] + // - - - - - - - - -/ + + /** The attribute of counter. */ + protected ConditionValue _counter; + + /** + * Get the value of counter. + * + * @return The value of counter. + */ + public ConditionValue getCounter() { + if (_counter == null) { + _counter = new ConditionValue(); + } + return _counter; + } + + protected ConditionValue getCValueCounter() { + return getCounter(); + } + + + /** + * Add order-by of counter as ASC. + * + * @return this. (NotNull) + */ + public BsCounterHistoryCQ addOrderBy_Counter_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_COUNTER), null, true);return this; + } + + /** + * Add order-by of counter as DESC. + * + * @return this. (NotNull) + */ + public BsCounterHistoryCQ addOrderBy_Counter_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_COUNTER), null, false);return this; + } + + // =================================================================================== + // Union Query + // =========== + protected void reflectRelationOnUnionQuery(ConditionQuery baseQueryAsSuper, ConditionQuery unionQueryAsSuper) { + final CounterHistoryCQ baseQuery = (CounterHistoryCQ)baseQueryAsSuper; + final CounterHistoryCQ unionQuery = (CounterHistoryCQ)unionQueryAsSuper; + + } + + // =================================================================================== + // Foreign Query + // ============= + + +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/BsCountriesCQ.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/BsCountriesCQ.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/BsCountriesCQ.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,380 @@ + +package jp.sf.pal.pompei.cbean.cq.bs; + +import jp.sf.pal.pompei.cbean.cq.*; + +import jp.sf.pal.pompei.allcommon.cbean.*; +import jp.sf.pal.pompei.allcommon.cbean.ckey.*; +import jp.sf.pal.pompei.allcommon.cbean.cvalue.ConditionValue; +import jp.sf.pal.pompei.allcommon.cbean.sqlclause.SqlClause; +import jp.sf.pal.pompei.cbean.cq.ciq.*; + +/** + * The condition-query of COUNTRIES. + * + * @author DBFlute(AutoGenerator) + */ +public class BsCountriesCQ extends AbstractBsCountriesCQ { + + // =================================================================================== + // Attribute + // ========= + /** Corresponding inline query. */ + protected CountriesCIQ _inlineQuery; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param childQuery Child query as abstract class. (Nullable: If null, this is base instance.) + * @param sqlClause SQL clause instance. (NotNull) + * @param aliasName My alias name. (NotNull) + * @param nestLevel Nest level. + */ + public BsCountriesCQ(ConditionQuery childQuery, SqlClause sqlClause, String aliasName, int nestLevel) { + super(childQuery, sqlClause, aliasName, nestLevel); + } + + // =================================================================================== + // Inline + // ====== + /** + * Get inline query. + * + * @return Inline query. (NotNull) + */ + public CountriesCIQ inline() { + if (_inlineQuery == null) { + _inlineQuery = new CountriesCIQ(getChildQuery(), getSqlClause(), getAliasName(), getNestLevel(), this); + } + return _inlineQuery; + } + + // =================================================================================== + // Include-as-Mine + // =============== + + /** + * Include select-column of countriesId as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_CountriesId() { + registerIncludedSelectColumn("CountriesId", getRealColumnName("COUNTRIES_ID")); + } + + /** + * Include select-column of countriesId as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_CountriesId(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("COUNTRIES_ID")); + } + + /** + * Include select-column of countriesName as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_CountriesName() { + registerIncludedSelectColumn("CountriesName", getRealColumnName("COUNTRIES_NAME")); + } + + /** + * Include select-column of countriesName as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_CountriesName(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("COUNTRIES_NAME")); + } + + /** + * Include select-column of countriesIsoCode2 as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_CountriesIsoCode2() { + registerIncludedSelectColumn("CountriesIsoCode2", getRealColumnName("COUNTRIES_ISO_CODE_2")); + } + + /** + * Include select-column of countriesIsoCode2 as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_CountriesIsoCode2(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("COUNTRIES_ISO_CODE_2")); + } + + /** + * Include select-column of countriesIsoCode3 as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_CountriesIsoCode3() { + registerIncludedSelectColumn("CountriesIsoCode3", getRealColumnName("COUNTRIES_ISO_CODE_3")); + } + + /** + * Include select-column of countriesIsoCode3 as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_CountriesIsoCode3(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("COUNTRIES_ISO_CODE_3")); + } + + /** + * Include select-column of addressFormatId as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_AddressFormatId() { + registerIncludedSelectColumn("AddressFormatId", getRealColumnName("ADDRESS_FORMAT_ID")); + } + + /** + * Include select-column of addressFormatId as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_AddressFormatId(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("ADDRESS_FORMAT_ID")); + } + + // =================================================================================== + // Query + // ===== + // /* * * * * * * * * * * * * * * * * * * * * * * + // MyTable = [COUNTRIES] + // * * * * * * * * */ + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [COUNTRIES_ID] + // - - - - - - - - -/ + + /** The attribute of countriesId. */ + protected ConditionValue _countriesId; + + /** + * Get the value of countriesId. + * + * @return The value of countriesId. + */ + public ConditionValue getCountriesId() { + if (_countriesId == null) { + _countriesId = new ConditionValue(); + } + return _countriesId; + } + + protected ConditionValue getCValueCountriesId() { + return getCountriesId(); + } + + + /** + * Add order-by of countriesId as ASC. + * + * @return this. (NotNull) + */ + public BsCountriesCQ addOrderBy_CountriesId_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_COUNTRIES_ID), null, true);return this; + } + + /** + * Add order-by of countriesId as DESC. + * + * @return this. (NotNull) + */ + public BsCountriesCQ addOrderBy_CountriesId_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_COUNTRIES_ID), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [COUNTRIES_NAME] + // - - - - - - - - -/ + + /** The attribute of countriesName. */ + protected ConditionValue _countriesName; + + /** + * Get the value of countriesName. + * + * @return The value of countriesName. + */ + public ConditionValue getCountriesName() { + if (_countriesName == null) { + _countriesName = new ConditionValue(); + } + return _countriesName; + } + + protected ConditionValue getCValueCountriesName() { + return getCountriesName(); + } + + + /** + * Add order-by of countriesName as ASC. + * + * @return this. (NotNull) + */ + public BsCountriesCQ addOrderBy_CountriesName_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_COUNTRIES_NAME), null, true);return this; + } + + /** + * Add order-by of countriesName as DESC. + * + * @return this. (NotNull) + */ + public BsCountriesCQ addOrderBy_CountriesName_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_COUNTRIES_NAME), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [COUNTRIES_ISO_CODE_2] + // - - - - - - - - -/ + + /** The attribute of countriesIsoCode2. */ + protected ConditionValue _countriesIsoCode2; + + /** + * Get the value of countriesIsoCode2. + * + * @return The value of countriesIsoCode2. + */ + public ConditionValue getCountriesIsoCode2() { + if (_countriesIsoCode2 == null) { + _countriesIsoCode2 = new ConditionValue(); + } + return _countriesIsoCode2; + } + + protected ConditionValue getCValueCountriesIsoCode2() { + return getCountriesIsoCode2(); + } + + + /** + * Add order-by of countriesIsoCode2 as ASC. + * + * @return this. (NotNull) + */ + public BsCountriesCQ addOrderBy_CountriesIsoCode2_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_COUNTRIES_ISO_CODE_2), null, true);return this; + } + + /** + * Add order-by of countriesIsoCode2 as DESC. + * + * @return this. (NotNull) + */ + public BsCountriesCQ addOrderBy_CountriesIsoCode2_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_COUNTRIES_ISO_CODE_2), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [COUNTRIES_ISO_CODE_3] + // - - - - - - - - -/ + + /** The attribute of countriesIsoCode3. */ + protected ConditionValue _countriesIsoCode3; + + /** + * Get the value of countriesIsoCode3. + * + * @return The value of countriesIsoCode3. + */ + public ConditionValue getCountriesIsoCode3() { + if (_countriesIsoCode3 == null) { + _countriesIsoCode3 = new ConditionValue(); + } + return _countriesIsoCode3; + } + + protected ConditionValue getCValueCountriesIsoCode3() { + return getCountriesIsoCode3(); + } + + + /** + * Add order-by of countriesIsoCode3 as ASC. + * + * @return this. (NotNull) + */ + public BsCountriesCQ addOrderBy_CountriesIsoCode3_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_COUNTRIES_ISO_CODE_3), null, true);return this; + } + + /** + * Add order-by of countriesIsoCode3 as DESC. + * + * @return this. (NotNull) + */ + public BsCountriesCQ addOrderBy_CountriesIsoCode3_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_COUNTRIES_ISO_CODE_3), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [ADDRESS_FORMAT_ID] + // - - - - - - - - -/ + + /** The attribute of addressFormatId. */ + protected ConditionValue _addressFormatId; + + /** + * Get the value of addressFormatId. + * + * @return The value of addressFormatId. + */ + public ConditionValue getAddressFormatId() { + if (_addressFormatId == null) { + _addressFormatId = new ConditionValue(); + } + return _addressFormatId; + } + + protected ConditionValue getCValueAddressFormatId() { + return getAddressFormatId(); + } + + + /** + * Add order-by of addressFormatId as ASC. + * + * @return this. (NotNull) + */ + public BsCountriesCQ addOrderBy_AddressFormatId_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_ADDRESS_FORMAT_ID), null, true);return this; + } + + /** + * Add order-by of addressFormatId as DESC. + * + * @return this. (NotNull) + */ + public BsCountriesCQ addOrderBy_AddressFormatId_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_ADDRESS_FORMAT_ID), null, false);return this; + } + + // =================================================================================== + // Union Query + // =========== + protected void reflectRelationOnUnionQuery(ConditionQuery baseQueryAsSuper, ConditionQuery unionQueryAsSuper) { + final CountriesCQ baseQuery = (CountriesCQ)baseQueryAsSuper; + final CountriesCQ unionQuery = (CountriesCQ)unionQueryAsSuper; + + } + + // =================================================================================== + // Foreign Query + // ============= + + +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/BsCurrenciesCQ.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/BsCurrenciesCQ.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/BsCurrenciesCQ.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,680 @@ + +package jp.sf.pal.pompei.cbean.cq.bs; + +import jp.sf.pal.pompei.cbean.cq.*; + +import jp.sf.pal.pompei.allcommon.cbean.*; +import jp.sf.pal.pompei.allcommon.cbean.ckey.*; +import jp.sf.pal.pompei.allcommon.cbean.cvalue.ConditionValue; +import jp.sf.pal.pompei.allcommon.cbean.sqlclause.SqlClause; +import jp.sf.pal.pompei.cbean.cq.ciq.*; + +/** + * The condition-query of CURRENCIES. + * + * @author DBFlute(AutoGenerator) + */ +public class BsCurrenciesCQ extends AbstractBsCurrenciesCQ { + + // =================================================================================== + // Attribute + // ========= + /** Corresponding inline query. */ + protected CurrenciesCIQ _inlineQuery; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param childQuery Child query as abstract class. (Nullable: If null, this is base instance.) + * @param sqlClause SQL clause instance. (NotNull) + * @param aliasName My alias name. (NotNull) + * @param nestLevel Nest level. + */ + public BsCurrenciesCQ(ConditionQuery childQuery, SqlClause sqlClause, String aliasName, int nestLevel) { + super(childQuery, sqlClause, aliasName, nestLevel); + } + + // =================================================================================== + // Inline + // ====== + /** + * Get inline query. + * + * @return Inline query. (NotNull) + */ + public CurrenciesCIQ inline() { + if (_inlineQuery == null) { + _inlineQuery = new CurrenciesCIQ(getChildQuery(), getSqlClause(), getAliasName(), getNestLevel(), this); + } + return _inlineQuery; + } + + // =================================================================================== + // Include-as-Mine + // =============== + + /** + * Include select-column of currenciesId as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_CurrenciesId() { + registerIncludedSelectColumn("CurrenciesId", getRealColumnName("CURRENCIES_ID")); + } + + /** + * Include select-column of currenciesId as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_CurrenciesId(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("CURRENCIES_ID")); + } + + /** + * Include select-column of title as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_Title() { + registerIncludedSelectColumn("Title", getRealColumnName("TITLE")); + } + + /** + * Include select-column of title as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_Title(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("TITLE")); + } + + /** + * Include select-column of code as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_Code() { + registerIncludedSelectColumn("Code", getRealColumnName("CODE")); + } + + /** + * Include select-column of code as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_Code(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("CODE")); + } + + /** + * Include select-column of symbolLeft as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_SymbolLeft() { + registerIncludedSelectColumn("SymbolLeft", getRealColumnName("SYMBOL_LEFT")); + } + + /** + * Include select-column of symbolLeft as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_SymbolLeft(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("SYMBOL_LEFT")); + } + + /** + * Include select-column of symbolRight as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_SymbolRight() { + registerIncludedSelectColumn("SymbolRight", getRealColumnName("SYMBOL_RIGHT")); + } + + /** + * Include select-column of symbolRight as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_SymbolRight(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("SYMBOL_RIGHT")); + } + + /** + * Include select-column of decimalPoint as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_DecimalPoint() { + registerIncludedSelectColumn("DecimalPoint", getRealColumnName("DECIMAL_POINT")); + } + + /** + * Include select-column of decimalPoint as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_DecimalPoint(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("DECIMAL_POINT")); + } + + /** + * Include select-column of thousandsPoint as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_ThousandsPoint() { + registerIncludedSelectColumn("ThousandsPoint", getRealColumnName("THOUSANDS_POINT")); + } + + /** + * Include select-column of thousandsPoint as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_ThousandsPoint(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("THOUSANDS_POINT")); + } + + /** + * Include select-column of decimalPlaces as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_DecimalPlaces() { + registerIncludedSelectColumn("DecimalPlaces", getRealColumnName("DECIMAL_PLACES")); + } + + /** + * Include select-column of decimalPlaces as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_DecimalPlaces(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("DECIMAL_PLACES")); + } + + /** + * Include select-column of value as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_Value() { + registerIncludedSelectColumn("Value", getRealColumnName("VALUE")); + } + + /** + * Include select-column of value as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_Value(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("VALUE")); + } + + /** + * Include select-column of lastUpdated as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_LastUpdated() { + registerIncludedSelectColumn("LastUpdated", getRealColumnName("LAST_UPDATED")); + } + + /** + * Include select-column of lastUpdated as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_LastUpdated(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("LAST_UPDATED")); + } + + // =================================================================================== + // Query + // ===== + // /* * * * * * * * * * * * * * * * * * * * * * * + // MyTable = [CURRENCIES] + // * * * * * * * * */ + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [CURRENCIES_ID] + // - - - - - - - - -/ + + /** The attribute of currenciesId. */ + protected ConditionValue _currenciesId; + + /** + * Get the value of currenciesId. + * + * @return The value of currenciesId. + */ + public ConditionValue getCurrenciesId() { + if (_currenciesId == null) { + _currenciesId = new ConditionValue(); + } + return _currenciesId; + } + + protected ConditionValue getCValueCurrenciesId() { + return getCurrenciesId(); + } + + + /** + * Add order-by of currenciesId as ASC. + * + * @return this. (NotNull) + */ + public BsCurrenciesCQ addOrderBy_CurrenciesId_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_CURRENCIES_ID), null, true);return this; + } + + /** + * Add order-by of currenciesId as DESC. + * + * @return this. (NotNull) + */ + public BsCurrenciesCQ addOrderBy_CurrenciesId_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_CURRENCIES_ID), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [TITLE] + // - - - - - - - - -/ + + /** The attribute of title. */ + protected ConditionValue _title; + + /** + * Get the value of title. + * + * @return The value of title. + */ + public ConditionValue getTitle() { + if (_title == null) { + _title = new ConditionValue(); + } + return _title; + } + + protected ConditionValue getCValueTitle() { + return getTitle(); + } + + + /** + * Add order-by of title as ASC. + * + * @return this. (NotNull) + */ + public BsCurrenciesCQ addOrderBy_Title_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_TITLE), null, true);return this; + } + + /** + * Add order-by of title as DESC. + * + * @return this. (NotNull) + */ + public BsCurrenciesCQ addOrderBy_Title_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_TITLE), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [CODE] + // - - - - - - - - -/ + + /** The attribute of code. */ + protected ConditionValue _code; + + /** + * Get the value of code. + * + * @return The value of code. + */ + public ConditionValue getCode() { + if (_code == null) { + _code = new ConditionValue(); + } + return _code; + } + + protected ConditionValue getCValueCode() { + return getCode(); + } + + + /** + * Add order-by of code as ASC. + * + * @return this. (NotNull) + */ + public BsCurrenciesCQ addOrderBy_Code_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_CODE), null, true);return this; + } + + /** + * Add order-by of code as DESC. + * + * @return this. (NotNull) + */ + public BsCurrenciesCQ addOrderBy_Code_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_CODE), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [SYMBOL_LEFT] + // - - - - - - - - -/ + + /** The attribute of symbolLeft. */ + protected ConditionValue _symbolLeft; + + /** + * Get the value of symbolLeft. + * + * @return The value of symbolLeft. + */ + public ConditionValue getSymbolLeft() { + if (_symbolLeft == null) { + _symbolLeft = new ConditionValue(); + } + return _symbolLeft; + } + + protected ConditionValue getCValueSymbolLeft() { + return getSymbolLeft(); + } + + + /** + * Add order-by of symbolLeft as ASC. + * + * @return this. (NotNull) + */ + public BsCurrenciesCQ addOrderBy_SymbolLeft_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_SYMBOL_LEFT), null, true);return this; + } + + /** + * Add order-by of symbolLeft as DESC. + * + * @return this. (NotNull) + */ + public BsCurrenciesCQ addOrderBy_SymbolLeft_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_SYMBOL_LEFT), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [SYMBOL_RIGHT] + // - - - - - - - - -/ + + /** The attribute of symbolRight. */ + protected ConditionValue _symbolRight; + + /** + * Get the value of symbolRight. + * + * @return The value of symbolRight. + */ + public ConditionValue getSymbolRight() { + if (_symbolRight == null) { + _symbolRight = new ConditionValue(); + } + return _symbolRight; + } + + protected ConditionValue getCValueSymbolRight() { + return getSymbolRight(); + } + + + /** + * Add order-by of symbolRight as ASC. + * + * @return this. (NotNull) + */ + public BsCurrenciesCQ addOrderBy_SymbolRight_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_SYMBOL_RIGHT), null, true);return this; + } + + /** + * Add order-by of symbolRight as DESC. + * + * @return this. (NotNull) + */ + public BsCurrenciesCQ addOrderBy_SymbolRight_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_SYMBOL_RIGHT), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [DECIMAL_POINT] + // - - - - - - - - -/ + + /** The attribute of decimalPoint. */ + protected ConditionValue _decimalPoint; + + /** + * Get the value of decimalPoint. + * + * @return The value of decimalPoint. + */ + public ConditionValue getDecimalPoint() { + if (_decimalPoint == null) { + _decimalPoint = new ConditionValue(); + } + return _decimalPoint; + } + + protected ConditionValue getCValueDecimalPoint() { + return getDecimalPoint(); + } + + + /** + * Add order-by of decimalPoint as ASC. + * + * @return this. (NotNull) + */ + public BsCurrenciesCQ addOrderBy_DecimalPoint_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_DECIMAL_POINT), null, true);return this; + } + + /** + * Add order-by of decimalPoint as DESC. + * + * @return this. (NotNull) + */ + public BsCurrenciesCQ addOrderBy_DecimalPoint_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_DECIMAL_POINT), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [THOUSANDS_POINT] + // - - - - - - - - -/ + + /** The attribute of thousandsPoint. */ + protected ConditionValue _thousandsPoint; + + /** + * Get the value of thousandsPoint. + * + * @return The value of thousandsPoint. + */ + public ConditionValue getThousandsPoint() { + if (_thousandsPoint == null) { + _thousandsPoint = new ConditionValue(); + } + return _thousandsPoint; + } + + protected ConditionValue getCValueThousandsPoint() { + return getThousandsPoint(); + } + + + /** + * Add order-by of thousandsPoint as ASC. + * + * @return this. (NotNull) + */ + public BsCurrenciesCQ addOrderBy_ThousandsPoint_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_THOUSANDS_POINT), null, true);return this; + } + + /** + * Add order-by of thousandsPoint as DESC. + * + * @return this. (NotNull) + */ + public BsCurrenciesCQ addOrderBy_ThousandsPoint_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_THOUSANDS_POINT), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [DECIMAL_PLACES] + // - - - - - - - - -/ + + /** The attribute of decimalPlaces. */ + protected ConditionValue _decimalPlaces; + + /** + * Get the value of decimalPlaces. + * + * @return The value of decimalPlaces. + */ + public ConditionValue getDecimalPlaces() { + if (_decimalPlaces == null) { + _decimalPlaces = new ConditionValue(); + } + return _decimalPlaces; + } + + protected ConditionValue getCValueDecimalPlaces() { + return getDecimalPlaces(); + } + + + /** + * Add order-by of decimalPlaces as ASC. + * + * @return this. (NotNull) + */ + public BsCurrenciesCQ addOrderBy_DecimalPlaces_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_DECIMAL_PLACES), null, true);return this; + } + + /** + * Add order-by of decimalPlaces as DESC. + * + * @return this. (NotNull) + */ + public BsCurrenciesCQ addOrderBy_DecimalPlaces_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_DECIMAL_PLACES), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [VALUE] + // - - - - - - - - -/ + + /** The attribute of value. */ + protected ConditionValue _value; + + /** + * Get the value of value. + * + * @return The value of value. + */ + public ConditionValue getValue() { + if (_value == null) { + _value = new ConditionValue(); + } + return _value; + } + + protected ConditionValue getCValueValue() { + return getValue(); + } + + + /** + * Add order-by of value as ASC. + * + * @return this. (NotNull) + */ + public BsCurrenciesCQ addOrderBy_Value_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_VALUE), null, true);return this; + } + + /** + * Add order-by of value as DESC. + * + * @return this. (NotNull) + */ + public BsCurrenciesCQ addOrderBy_Value_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_VALUE), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [LAST_UPDATED] + // - - - - - - - - -/ + + /** The attribute of lastUpdated. */ + protected ConditionValue _lastUpdated; + + /** + * Get the value of lastUpdated. + * + * @return The value of lastUpdated. + */ + public ConditionValue getLastUpdated() { + if (_lastUpdated == null) { + _lastUpdated = new ConditionValue(); + } + return _lastUpdated; + } + + protected ConditionValue getCValueLastUpdated() { + return getLastUpdated(); + } + + + /** + * Add order-by of lastUpdated as ASC. + * + * @return this. (NotNull) + */ + public BsCurrenciesCQ addOrderBy_LastUpdated_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_LAST_UPDATED), null, true);return this; + } + + /** + * Add order-by of lastUpdated as DESC. + * + * @return this. (NotNull) + */ + public BsCurrenciesCQ addOrderBy_LastUpdated_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_LAST_UPDATED), null, false);return this; + } + + // =================================================================================== + // Union Query + // =========== + protected void reflectRelationOnUnionQuery(ConditionQuery baseQueryAsSuper, ConditionQuery unionQueryAsSuper) { + final CurrenciesCQ baseQuery = (CurrenciesCQ)baseQueryAsSuper; + final CurrenciesCQ unionQuery = (CurrenciesCQ)unionQueryAsSuper; + + } + + // =================================================================================== + // Foreign Query + // ============= + + +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/BsCustomersBasketAttributesCQ.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/BsCustomersBasketAttributesCQ.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/BsCustomersBasketAttributesCQ.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,380 @@ + +package jp.sf.pal.pompei.cbean.cq.bs; + +import jp.sf.pal.pompei.cbean.cq.*; + +import jp.sf.pal.pompei.allcommon.cbean.*; +import jp.sf.pal.pompei.allcommon.cbean.ckey.*; +import jp.sf.pal.pompei.allcommon.cbean.cvalue.ConditionValue; +import jp.sf.pal.pompei.allcommon.cbean.sqlclause.SqlClause; +import jp.sf.pal.pompei.cbean.cq.ciq.*; + +/** + * The condition-query of CUSTOMERS_BASKET_ATTRIBUTES. + * + * @author DBFlute(AutoGenerator) + */ +public class BsCustomersBasketAttributesCQ extends AbstractBsCustomersBasketAttributesCQ { + + // =================================================================================== + // Attribute + // ========= + /** Corresponding inline query. */ + protected CustomersBasketAttributesCIQ _inlineQuery; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param childQuery Child query as abstract class. (Nullable: If null, this is base instance.) + * @param sqlClause SQL clause instance. (NotNull) + * @param aliasName My alias name. (NotNull) + * @param nestLevel Nest level. + */ + public BsCustomersBasketAttributesCQ(ConditionQuery childQuery, SqlClause sqlClause, String aliasName, int nestLevel) { + super(childQuery, sqlClause, aliasName, nestLevel); + } + + // =================================================================================== + // Inline + // ====== + /** + * Get inline query. + * + * @return Inline query. (NotNull) + */ + public CustomersBasketAttributesCIQ inline() { + if (_inlineQuery == null) { + _inlineQuery = new CustomersBasketAttributesCIQ(getChildQuery(), getSqlClause(), getAliasName(), getNestLevel(), this); + } + return _inlineQuery; + } + + // =================================================================================== + // Include-as-Mine + // =============== + + /** + * Include select-column of customersBasketAttributesId as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_CustomersBasketAttributesId() { + registerIncludedSelectColumn("CustomersBasketAttributesId", getRealColumnName("CUSTOMERS_BASKET_ATTRIBUTES_ID")); + } + + /** + * Include select-column of customersBasketAttributesId as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_CustomersBasketAttributesId(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("CUSTOMERS_BASKET_ATTRIBUTES_ID")); + } + + /** + * Include select-column of customersId as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_CustomersId() { + registerIncludedSelectColumn("CustomersId", getRealColumnName("CUSTOMERS_ID")); + } + + /** + * Include select-column of customersId as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_CustomersId(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("CUSTOMERS_ID")); + } + + /** + * Include select-column of productsId as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_ProductsId() { + registerIncludedSelectColumn("ProductsId", getRealColumnName("PRODUCTS_ID")); + } + + /** + * Include select-column of productsId as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_ProductsId(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("PRODUCTS_ID")); + } + + /** + * Include select-column of productsOptionsId as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_ProductsOptionsId() { + registerIncludedSelectColumn("ProductsOptionsId", getRealColumnName("PRODUCTS_OPTIONS_ID")); + } + + /** + * Include select-column of productsOptionsId as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_ProductsOptionsId(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("PRODUCTS_OPTIONS_ID")); + } + + /** + * Include select-column of productsOptionsValueId as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_ProductsOptionsValueId() { + registerIncludedSelectColumn("ProductsOptionsValueId", getRealColumnName("PRODUCTS_OPTIONS_VALUE_ID")); + } + + /** + * Include select-column of productsOptionsValueId as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_ProductsOptionsValueId(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("PRODUCTS_OPTIONS_VALUE_ID")); + } + + // =================================================================================== + // Query + // ===== + // /* * * * * * * * * * * * * * * * * * * * * * * + // MyTable = [CUSTOMERS_BASKET_ATTRIBUTES] + // * * * * * * * * */ + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [CUSTOMERS_BASKET_ATTRIBUTES_ID] + // - - - - - - - - -/ + + /** The attribute of customersBasketAttributesId. */ + protected ConditionValue _customersBasketAttributesId; + + /** + * Get the value of customersBasketAttributesId. + * + * @return The value of customersBasketAttributesId. + */ + public ConditionValue getCustomersBasketAttributesId() { + if (_customersBasketAttributesId == null) { + _customersBasketAttributesId = new ConditionValue(); + } + return _customersBasketAttributesId; + } + + protected ConditionValue getCValueCustomersBasketAttributesId() { + return getCustomersBasketAttributesId(); + } + + + /** + * Add order-by of customersBasketAttributesId as ASC. + * + * @return this. (NotNull) + */ + public BsCustomersBasketAttributesCQ addOrderBy_CustomersBasketAttributesId_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_CUSTOMERS_BASKET_ATTRIBUTES_ID), null, true);return this; + } + + /** + * Add order-by of customersBasketAttributesId as DESC. + * + * @return this. (NotNull) + */ + public BsCustomersBasketAttributesCQ addOrderBy_CustomersBasketAttributesId_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_CUSTOMERS_BASKET_ATTRIBUTES_ID), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [CUSTOMERS_ID] + // - - - - - - - - -/ + + /** The attribute of customersId. */ + protected ConditionValue _customersId; + + /** + * Get the value of customersId. + * + * @return The value of customersId. + */ + public ConditionValue getCustomersId() { + if (_customersId == null) { + _customersId = new ConditionValue(); + } + return _customersId; + } + + protected ConditionValue getCValueCustomersId() { + return getCustomersId(); + } + + + /** + * Add order-by of customersId as ASC. + * + * @return this. (NotNull) + */ + public BsCustomersBasketAttributesCQ addOrderBy_CustomersId_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_CUSTOMERS_ID), null, true);return this; + } + + /** + * Add order-by of customersId as DESC. + * + * @return this. (NotNull) + */ + public BsCustomersBasketAttributesCQ addOrderBy_CustomersId_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_CUSTOMERS_ID), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [PRODUCTS_ID] + // - - - - - - - - -/ + + /** The attribute of productsId. */ + protected ConditionValue _productsId; + + /** + * Get the value of productsId. + * + * @return The value of productsId. + */ + public ConditionValue getProductsId() { + if (_productsId == null) { + _productsId = new ConditionValue(); + } + return _productsId; + } + + protected ConditionValue getCValueProductsId() { + return getProductsId(); + } + + + /** + * Add order-by of productsId as ASC. + * + * @return this. (NotNull) + */ + public BsCustomersBasketAttributesCQ addOrderBy_ProductsId_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_PRODUCTS_ID), null, true);return this; + } + + /** + * Add order-by of productsId as DESC. + * + * @return this. (NotNull) + */ + public BsCustomersBasketAttributesCQ addOrderBy_ProductsId_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_PRODUCTS_ID), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [PRODUCTS_OPTIONS_ID] + // - - - - - - - - -/ + + /** The attribute of productsOptionsId. */ + protected ConditionValue _productsOptionsId; + + /** + * Get the value of productsOptionsId. + * + * @return The value of productsOptionsId. + */ + public ConditionValue getProductsOptionsId() { + if (_productsOptionsId == null) { + _productsOptionsId = new ConditionValue(); + } + return _productsOptionsId; + } + + protected ConditionValue getCValueProductsOptionsId() { + return getProductsOptionsId(); + } + + + /** + * Add order-by of productsOptionsId as ASC. + * + * @return this. (NotNull) + */ + public BsCustomersBasketAttributesCQ addOrderBy_ProductsOptionsId_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_PRODUCTS_OPTIONS_ID), null, true);return this; + } + + /** + * Add order-by of productsOptionsId as DESC. + * + * @return this. (NotNull) + */ + public BsCustomersBasketAttributesCQ addOrderBy_ProductsOptionsId_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_PRODUCTS_OPTIONS_ID), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [PRODUCTS_OPTIONS_VALUE_ID] + // - - - - - - - - -/ + + /** The attribute of productsOptionsValueId. */ + protected ConditionValue _productsOptionsValueId; + + /** + * Get the value of productsOptionsValueId. + * + * @return The value of productsOptionsValueId. + */ + public ConditionValue getProductsOptionsValueId() { + if (_productsOptionsValueId == null) { + _productsOptionsValueId = new ConditionValue(); + } + return _productsOptionsValueId; + } + + protected ConditionValue getCValueProductsOptionsValueId() { + return getProductsOptionsValueId(); + } + + + /** + * Add order-by of productsOptionsValueId as ASC. + * + * @return this. (NotNull) + */ + public BsCustomersBasketAttributesCQ addOrderBy_ProductsOptionsValueId_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_PRODUCTS_OPTIONS_VALUE_ID), null, true);return this; + } + + /** + * Add order-by of productsOptionsValueId as DESC. + * + * @return this. (NotNull) + */ + public BsCustomersBasketAttributesCQ addOrderBy_ProductsOptionsValueId_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_PRODUCTS_OPTIONS_VALUE_ID), null, false);return this; + } + + // =================================================================================== + // Union Query + // =========== + protected void reflectRelationOnUnionQuery(ConditionQuery baseQueryAsSuper, ConditionQuery unionQueryAsSuper) { + final CustomersBasketAttributesCQ baseQuery = (CustomersBasketAttributesCQ)baseQueryAsSuper; + final CustomersBasketAttributesCQ unionQuery = (CustomersBasketAttributesCQ)unionQueryAsSuper; + + } + + // =================================================================================== + // Foreign Query + // ============= + + +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/BsCustomersBasketCQ.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/BsCustomersBasketCQ.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/BsCustomersBasketCQ.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,440 @@ + +package jp.sf.pal.pompei.cbean.cq.bs; + +import jp.sf.pal.pompei.cbean.cq.*; + +import jp.sf.pal.pompei.allcommon.cbean.*; +import jp.sf.pal.pompei.allcommon.cbean.ckey.*; +import jp.sf.pal.pompei.allcommon.cbean.cvalue.ConditionValue; +import jp.sf.pal.pompei.allcommon.cbean.sqlclause.SqlClause; +import jp.sf.pal.pompei.cbean.cq.ciq.*; + +/** + * The condition-query of CUSTOMERS_BASKET. + * + * @author DBFlute(AutoGenerator) + */ +public class BsCustomersBasketCQ extends AbstractBsCustomersBasketCQ { + + // =================================================================================== + // Attribute + // ========= + /** Corresponding inline query. */ + protected CustomersBasketCIQ _inlineQuery; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param childQuery Child query as abstract class. (Nullable: If null, this is base instance.) + * @param sqlClause SQL clause instance. (NotNull) + * @param aliasName My alias name. (NotNull) + * @param nestLevel Nest level. + */ + public BsCustomersBasketCQ(ConditionQuery childQuery, SqlClause sqlClause, String aliasName, int nestLevel) { + super(childQuery, sqlClause, aliasName, nestLevel); + } + + // =================================================================================== + // Inline + // ====== + /** + * Get inline query. + * + * @return Inline query. (NotNull) + */ + public CustomersBasketCIQ inline() { + if (_inlineQuery == null) { + _inlineQuery = new CustomersBasketCIQ(getChildQuery(), getSqlClause(), getAliasName(), getNestLevel(), this); + } + return _inlineQuery; + } + + // =================================================================================== + // Include-as-Mine + // =============== + + /** + * Include select-column of customersBasketId as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_CustomersBasketId() { + registerIncludedSelectColumn("CustomersBasketId", getRealColumnName("CUSTOMERS_BASKET_ID")); + } + + /** + * Include select-column of customersBasketId as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_CustomersBasketId(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("CUSTOMERS_BASKET_ID")); + } + + /** + * Include select-column of customersId as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_CustomersId() { + registerIncludedSelectColumn("CustomersId", getRealColumnName("CUSTOMERS_ID")); + } + + /** + * Include select-column of customersId as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_CustomersId(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("CUSTOMERS_ID")); + } + + /** + * Include select-column of productsId as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_ProductsId() { + registerIncludedSelectColumn("ProductsId", getRealColumnName("PRODUCTS_ID")); + } + + /** + * Include select-column of productsId as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_ProductsId(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("PRODUCTS_ID")); + } + + /** + * Include select-column of customersBasketQuantity as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_CustomersBasketQuantity() { + registerIncludedSelectColumn("CustomersBasketQuantity", getRealColumnName("CUSTOMERS_BASKET_QUANTITY")); + } + + /** + * Include select-column of customersBasketQuantity as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_CustomersBasketQuantity(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("CUSTOMERS_BASKET_QUANTITY")); + } + + /** + * Include select-column of finalPrice as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_FinalPrice() { + registerIncludedSelectColumn("FinalPrice", getRealColumnName("FINAL_PRICE")); + } + + /** + * Include select-column of finalPrice as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_FinalPrice(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("FINAL_PRICE")); + } + + /** + * Include select-column of customersBasketDateAdded as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_CustomersBasketDateAdded() { + registerIncludedSelectColumn("CustomersBasketDateAdded", getRealColumnName("CUSTOMERS_BASKET_DATE_ADDED")); + } + + /** + * Include select-column of customersBasketDateAdded as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_CustomersBasketDateAdded(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("CUSTOMERS_BASKET_DATE_ADDED")); + } + + // =================================================================================== + // Query + // ===== + // /* * * * * * * * * * * * * * * * * * * * * * * + // MyTable = [CUSTOMERS_BASKET] + // * * * * * * * * */ + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [CUSTOMERS_BASKET_ID] + // - - - - - - - - -/ + + /** The attribute of customersBasketId. */ + protected ConditionValue _customersBasketId; + + /** + * Get the value of customersBasketId. + * + * @return The value of customersBasketId. + */ + public ConditionValue getCustomersBasketId() { + if (_customersBasketId == null) { + _customersBasketId = new ConditionValue(); + } + return _customersBasketId; + } + + protected ConditionValue getCValueCustomersBasketId() { + return getCustomersBasketId(); + } + + + /** + * Add order-by of customersBasketId as ASC. + * + * @return this. (NotNull) + */ + public BsCustomersBasketCQ addOrderBy_CustomersBasketId_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_CUSTOMERS_BASKET_ID), null, true);return this; + } + + /** + * Add order-by of customersBasketId as DESC. + * + * @return this. (NotNull) + */ + public BsCustomersBasketCQ addOrderBy_CustomersBasketId_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_CUSTOMERS_BASKET_ID), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [CUSTOMERS_ID] + // - - - - - - - - -/ + + /** The attribute of customersId. */ + protected ConditionValue _customersId; + + /** + * Get the value of customersId. + * + * @return The value of customersId. + */ + public ConditionValue getCustomersId() { + if (_customersId == null) { + _customersId = new ConditionValue(); + } + return _customersId; + } + + protected ConditionValue getCValueCustomersId() { + return getCustomersId(); + } + + + /** + * Add order-by of customersId as ASC. + * + * @return this. (NotNull) + */ + public BsCustomersBasketCQ addOrderBy_CustomersId_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_CUSTOMERS_ID), null, true);return this; + } + + /** + * Add order-by of customersId as DESC. + * + * @return this. (NotNull) + */ + public BsCustomersBasketCQ addOrderBy_CustomersId_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_CUSTOMERS_ID), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [PRODUCTS_ID] + // - - - - - - - - -/ + + /** The attribute of productsId. */ + protected ConditionValue _productsId; + + /** + * Get the value of productsId. + * + * @return The value of productsId. + */ + public ConditionValue getProductsId() { + if (_productsId == null) { + _productsId = new ConditionValue(); + } + return _productsId; + } + + protected ConditionValue getCValueProductsId() { + return getProductsId(); + } + + + /** + * Add order-by of productsId as ASC. + * + * @return this. (NotNull) + */ + public BsCustomersBasketCQ addOrderBy_ProductsId_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_PRODUCTS_ID), null, true);return this; + } + + /** + * Add order-by of productsId as DESC. + * + * @return this. (NotNull) + */ + public BsCustomersBasketCQ addOrderBy_ProductsId_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_PRODUCTS_ID), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [CUSTOMERS_BASKET_QUANTITY] + // - - - - - - - - -/ + + /** The attribute of customersBasketQuantity. */ + protected ConditionValue _customersBasketQuantity; + + /** + * Get the value of customersBasketQuantity. + * + * @return The value of customersBasketQuantity. + */ + public ConditionValue getCustomersBasketQuantity() { + if (_customersBasketQuantity == null) { + _customersBasketQuantity = new ConditionValue(); + } + return _customersBasketQuantity; + } + + protected ConditionValue getCValueCustomersBasketQuantity() { + return getCustomersBasketQuantity(); + } + + + /** + * Add order-by of customersBasketQuantity as ASC. + * + * @return this. (NotNull) + */ + public BsCustomersBasketCQ addOrderBy_CustomersBasketQuantity_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_CUSTOMERS_BASKET_QUANTITY), null, true);return this; + } + + /** + * Add order-by of customersBasketQuantity as DESC. + * + * @return this. (NotNull) + */ + public BsCustomersBasketCQ addOrderBy_CustomersBasketQuantity_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_CUSTOMERS_BASKET_QUANTITY), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [FINAL_PRICE] + // - - - - - - - - -/ + + /** The attribute of finalPrice. */ + protected ConditionValue _finalPrice; + + /** + * Get the value of finalPrice. + * + * @return The value of finalPrice. + */ + public ConditionValue getFinalPrice() { + if (_finalPrice == null) { + _finalPrice = new ConditionValue(); + } + return _finalPrice; + } + + protected ConditionValue getCValueFinalPrice() { + return getFinalPrice(); + } + + + /** + * Add order-by of finalPrice as ASC. + * + * @return this. (NotNull) + */ + public BsCustomersBasketCQ addOrderBy_FinalPrice_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_FINAL_PRICE), null, true);return this; + } + + /** + * Add order-by of finalPrice as DESC. + * + * @return this. (NotNull) + */ + public BsCustomersBasketCQ addOrderBy_FinalPrice_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_FINAL_PRICE), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [CUSTOMERS_BASKET_DATE_ADDED] + // - - - - - - - - -/ + + /** The attribute of customersBasketDateAdded. */ + protected ConditionValue _customersBasketDateAdded; + + /** + * Get the value of customersBasketDateAdded. + * + * @return The value of customersBasketDateAdded. + */ + public ConditionValue getCustomersBasketDateAdded() { + if (_customersBasketDateAdded == null) { + _customersBasketDateAdded = new ConditionValue(); + } + return _customersBasketDateAdded; + } + + protected ConditionValue getCValueCustomersBasketDateAdded() { + return getCustomersBasketDateAdded(); + } + + + /** + * Add order-by of customersBasketDateAdded as ASC. + * + * @return this. (NotNull) + */ + public BsCustomersBasketCQ addOrderBy_CustomersBasketDateAdded_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_CUSTOMERS_BASKET_DATE_ADDED), null, true);return this; + } + + /** + * Add order-by of customersBasketDateAdded as DESC. + * + * @return this. (NotNull) + */ + public BsCustomersBasketCQ addOrderBy_CustomersBasketDateAdded_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_CUSTOMERS_BASKET_DATE_ADDED), null, false);return this; + } + + // =================================================================================== + // Union Query + // =========== + protected void reflectRelationOnUnionQuery(ConditionQuery baseQueryAsSuper, ConditionQuery unionQueryAsSuper) { + final CustomersBasketCQ baseQuery = (CustomersBasketCQ)baseQueryAsSuper; + final CustomersBasketCQ unionQuery = (CustomersBasketCQ)unionQueryAsSuper; + + } + + // =================================================================================== + // Foreign Query + // ============= + + +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/BsCustomersCQ.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/BsCustomersCQ.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/BsCustomersCQ.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,740 @@ + +package jp.sf.pal.pompei.cbean.cq.bs; + +import jp.sf.pal.pompei.cbean.cq.*; + +import jp.sf.pal.pompei.allcommon.cbean.*; +import jp.sf.pal.pompei.allcommon.cbean.ckey.*; +import jp.sf.pal.pompei.allcommon.cbean.cvalue.ConditionValue; +import jp.sf.pal.pompei.allcommon.cbean.sqlclause.SqlClause; +import jp.sf.pal.pompei.cbean.cq.ciq.*; + +/** + * The condition-query of CUSTOMERS. + * + * @author DBFlute(AutoGenerator) + */ +public class BsCustomersCQ extends AbstractBsCustomersCQ { + + // =================================================================================== + // Attribute + // ========= + /** Corresponding inline query. */ + protected CustomersCIQ _inlineQuery; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param childQuery Child query as abstract class. (Nullable: If null, this is base instance.) + * @param sqlClause SQL clause instance. (NotNull) + * @param aliasName My alias name. (NotNull) + * @param nestLevel Nest level. + */ + public BsCustomersCQ(ConditionQuery childQuery, SqlClause sqlClause, String aliasName, int nestLevel) { + super(childQuery, sqlClause, aliasName, nestLevel); + } + + // =================================================================================== + // Inline + // ====== + /** + * Get inline query. + * + * @return Inline query. (NotNull) + */ + public CustomersCIQ inline() { + if (_inlineQuery == null) { + _inlineQuery = new CustomersCIQ(getChildQuery(), getSqlClause(), getAliasName(), getNestLevel(), this); + } + return _inlineQuery; + } + + // =================================================================================== + // Include-as-Mine + // =============== + + /** + * Include select-column of customersId as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_CustomersId() { + registerIncludedSelectColumn("CustomersId", getRealColumnName("CUSTOMERS_ID")); + } + + /** + * Include select-column of customersId as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_CustomersId(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("CUSTOMERS_ID")); + } + + /** + * Include select-column of customersGender as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_CustomersGender() { + registerIncludedSelectColumn("CustomersGender", getRealColumnName("CUSTOMERS_GENDER")); + } + + /** + * Include select-column of customersGender as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_CustomersGender(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("CUSTOMERS_GENDER")); + } + + /** + * Include select-column of customersFirstname as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_CustomersFirstname() { + registerIncludedSelectColumn("CustomersFirstname", getRealColumnName("CUSTOMERS_FIRSTNAME")); + } + + /** + * Include select-column of customersFirstname as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_CustomersFirstname(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("CUSTOMERS_FIRSTNAME")); + } + + /** + * Include select-column of customersLastname as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_CustomersLastname() { + registerIncludedSelectColumn("CustomersLastname", getRealColumnName("CUSTOMERS_LASTNAME")); + } + + /** + * Include select-column of customersLastname as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_CustomersLastname(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("CUSTOMERS_LASTNAME")); + } + + /** + * Include select-column of customersDob as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_CustomersDob() { + registerIncludedSelectColumn("CustomersDob", getRealColumnName("CUSTOMERS_DOB")); + } + + /** + * Include select-column of customersDob as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_CustomersDob(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("CUSTOMERS_DOB")); + } + + /** + * Include select-column of customersEmailAddress as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_CustomersEmailAddress() { + registerIncludedSelectColumn("CustomersEmailAddress", getRealColumnName("CUSTOMERS_EMAIL_ADDRESS")); + } + + /** + * Include select-column of customersEmailAddress as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_CustomersEmailAddress(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("CUSTOMERS_EMAIL_ADDRESS")); + } + + /** + * Include select-column of customersDefaultAddressId as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_CustomersDefaultAddressId() { + registerIncludedSelectColumn("CustomersDefaultAddressId", getRealColumnName("CUSTOMERS_DEFAULT_ADDRESS_ID")); + } + + /** + * Include select-column of customersDefaultAddressId as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_CustomersDefaultAddressId(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("CUSTOMERS_DEFAULT_ADDRESS_ID")); + } + + /** + * Include select-column of customersTelephone as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_CustomersTelephone() { + registerIncludedSelectColumn("CustomersTelephone", getRealColumnName("CUSTOMERS_TELEPHONE")); + } + + /** + * Include select-column of customersTelephone as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_CustomersTelephone(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("CUSTOMERS_TELEPHONE")); + } + + /** + * Include select-column of customersFax as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_CustomersFax() { + registerIncludedSelectColumn("CustomersFax", getRealColumnName("CUSTOMERS_FAX")); + } + + /** + * Include select-column of customersFax as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_CustomersFax(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("CUSTOMERS_FAX")); + } + + /** + * Include select-column of customersPassword as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_CustomersPassword() { + registerIncludedSelectColumn("CustomersPassword", getRealColumnName("CUSTOMERS_PASSWORD")); + } + + /** + * Include select-column of customersPassword as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_CustomersPassword(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("CUSTOMERS_PASSWORD")); + } + + /** + * Include select-column of customersNewsletter as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_CustomersNewsletter() { + registerIncludedSelectColumn("CustomersNewsletter", getRealColumnName("CUSTOMERS_NEWSLETTER")); + } + + /** + * Include select-column of customersNewsletter as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_CustomersNewsletter(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("CUSTOMERS_NEWSLETTER")); + } + + // =================================================================================== + // Query + // ===== + // /* * * * * * * * * * * * * * * * * * * * * * * + // MyTable = [CUSTOMERS] + // * * * * * * * * */ + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [CUSTOMERS_ID] + // - - - - - - - - -/ + + /** The attribute of customersId. */ + protected ConditionValue _customersId; + + /** + * Get the value of customersId. + * + * @return The value of customersId. + */ + public ConditionValue getCustomersId() { + if (_customersId == null) { + _customersId = new ConditionValue(); + } + return _customersId; + } + + protected ConditionValue getCValueCustomersId() { + return getCustomersId(); + } + + + /** + * Add order-by of customersId as ASC. + * + * @return this. (NotNull) + */ + public BsCustomersCQ addOrderBy_CustomersId_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_CUSTOMERS_ID), null, true);return this; + } + + /** + * Add order-by of customersId as DESC. + * + * @return this. (NotNull) + */ + public BsCustomersCQ addOrderBy_CustomersId_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_CUSTOMERS_ID), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [CUSTOMERS_GENDER] + // - - - - - - - - -/ + + /** The attribute of customersGender. */ + protected ConditionValue _customersGender; + + /** + * Get the value of customersGender. + * + * @return The value of customersGender. + */ + public ConditionValue getCustomersGender() { + if (_customersGender == null) { + _customersGender = new ConditionValue(); + } + return _customersGender; + } + + protected ConditionValue getCValueCustomersGender() { + return getCustomersGender(); + } + + + /** + * Add order-by of customersGender as ASC. + * + * @return this. (NotNull) + */ + public BsCustomersCQ addOrderBy_CustomersGender_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_CUSTOMERS_GENDER), null, true);return this; + } + + /** + * Add order-by of customersGender as DESC. + * + * @return this. (NotNull) + */ + public BsCustomersCQ addOrderBy_CustomersGender_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_CUSTOMERS_GENDER), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [CUSTOMERS_FIRSTNAME] + // - - - - - - - - -/ + + /** The attribute of customersFirstname. */ + protected ConditionValue _customersFirstname; + + /** + * Get the value of customersFirstname. + * + * @return The value of customersFirstname. + */ + public ConditionValue getCustomersFirstname() { + if (_customersFirstname == null) { + _customersFirstname = new ConditionValue(); + } + return _customersFirstname; + } + + protected ConditionValue getCValueCustomersFirstname() { + return getCustomersFirstname(); + } + + + /** + * Add order-by of customersFirstname as ASC. + * + * @return this. (NotNull) + */ + public BsCustomersCQ addOrderBy_CustomersFirstname_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_CUSTOMERS_FIRSTNAME), null, true);return this; + } + + /** + * Add order-by of customersFirstname as DESC. + * + * @return this. (NotNull) + */ + public BsCustomersCQ addOrderBy_CustomersFirstname_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_CUSTOMERS_FIRSTNAME), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [CUSTOMERS_LASTNAME] + // - - - - - - - - -/ + + /** The attribute of customersLastname. */ + protected ConditionValue _customersLastname; + + /** + * Get the value of customersLastname. + * + * @return The value of customersLastname. + */ + public ConditionValue getCustomersLastname() { + if (_customersLastname == null) { + _customersLastname = new ConditionValue(); + } + return _customersLastname; + } + + protected ConditionValue getCValueCustomersLastname() { + return getCustomersLastname(); + } + + + /** + * Add order-by of customersLastname as ASC. + * + * @return this. (NotNull) + */ + public BsCustomersCQ addOrderBy_CustomersLastname_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_CUSTOMERS_LASTNAME), null, true);return this; + } + + /** + * Add order-by of customersLastname as DESC. + * + * @return this. (NotNull) + */ + public BsCustomersCQ addOrderBy_CustomersLastname_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_CUSTOMERS_LASTNAME), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [CUSTOMERS_DOB] + // - - - - - - - - -/ + + /** The attribute of customersDob. */ + protected ConditionValue _customersDob; + + /** + * Get the value of customersDob. + * + * @return The value of customersDob. + */ + public ConditionValue getCustomersDob() { + if (_customersDob == null) { + _customersDob = new ConditionValue(); + } + return _customersDob; + } + + protected ConditionValue getCValueCustomersDob() { + return getCustomersDob(); + } + + + /** + * Add order-by of customersDob as ASC. + * + * @return this. (NotNull) + */ + public BsCustomersCQ addOrderBy_CustomersDob_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_CUSTOMERS_DOB), null, true);return this; + } + + /** + * Add order-by of customersDob as DESC. + * + * @return this. (NotNull) + */ + public BsCustomersCQ addOrderBy_CustomersDob_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_CUSTOMERS_DOB), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [CUSTOMERS_EMAIL_ADDRESS] + // - - - - - - - - -/ + + /** The attribute of customersEmailAddress. */ + protected ConditionValue _customersEmailAddress; + + /** + * Get the value of customersEmailAddress. + * + * @return The value of customersEmailAddress. + */ + public ConditionValue getCustomersEmailAddress() { + if (_customersEmailAddress == null) { + _customersEmailAddress = new ConditionValue(); + } + return _customersEmailAddress; + } + + protected ConditionValue getCValueCustomersEmailAddress() { + return getCustomersEmailAddress(); + } + + + /** + * Add order-by of customersEmailAddress as ASC. + * + * @return this. (NotNull) + */ + public BsCustomersCQ addOrderBy_CustomersEmailAddress_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_CUSTOMERS_EMAIL_ADDRESS), null, true);return this; + } + + /** + * Add order-by of customersEmailAddress as DESC. + * + * @return this. (NotNull) + */ + public BsCustomersCQ addOrderBy_CustomersEmailAddress_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_CUSTOMERS_EMAIL_ADDRESS), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [CUSTOMERS_DEFAULT_ADDRESS_ID] + // - - - - - - - - -/ + + /** The attribute of customersDefaultAddressId. */ + protected ConditionValue _customersDefaultAddressId; + + /** + * Get the value of customersDefaultAddressId. + * + * @return The value of customersDefaultAddressId. + */ + public ConditionValue getCustomersDefaultAddressId() { + if (_customersDefaultAddressId == null) { + _customersDefaultAddressId = new ConditionValue(); + } + return _customersDefaultAddressId; + } + + protected ConditionValue getCValueCustomersDefaultAddressId() { + return getCustomersDefaultAddressId(); + } + + + /** + * Add order-by of customersDefaultAddressId as ASC. + * + * @return this. (NotNull) + */ + public BsCustomersCQ addOrderBy_CustomersDefaultAddressId_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_CUSTOMERS_DEFAULT_ADDRESS_ID), null, true);return this; + } + + /** + * Add order-by of customersDefaultAddressId as DESC. + * + * @return this. (NotNull) + */ + public BsCustomersCQ addOrderBy_CustomersDefaultAddressId_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_CUSTOMERS_DEFAULT_ADDRESS_ID), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [CUSTOMERS_TELEPHONE] + // - - - - - - - - -/ + + /** The attribute of customersTelephone. */ + protected ConditionValue _customersTelephone; + + /** + * Get the value of customersTelephone. + * + * @return The value of customersTelephone. + */ + public ConditionValue getCustomersTelephone() { + if (_customersTelephone == null) { + _customersTelephone = new ConditionValue(); + } + return _customersTelephone; + } + + protected ConditionValue getCValueCustomersTelephone() { + return getCustomersTelephone(); + } + + + /** + * Add order-by of customersTelephone as ASC. + * + * @return this. (NotNull) + */ + public BsCustomersCQ addOrderBy_CustomersTelephone_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_CUSTOMERS_TELEPHONE), null, true);return this; + } + + /** + * Add order-by of customersTelephone as DESC. + * + * @return this. (NotNull) + */ + public BsCustomersCQ addOrderBy_CustomersTelephone_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_CUSTOMERS_TELEPHONE), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [CUSTOMERS_FAX] + // - - - - - - - - -/ + + /** The attribute of customersFax. */ + protected ConditionValue _customersFax; + + /** + * Get the value of customersFax. + * + * @return The value of customersFax. + */ + public ConditionValue getCustomersFax() { + if (_customersFax == null) { + _customersFax = new ConditionValue(); + } + return _customersFax; + } + + protected ConditionValue getCValueCustomersFax() { + return getCustomersFax(); + } + + + /** + * Add order-by of customersFax as ASC. + * + * @return this. (NotNull) + */ + public BsCustomersCQ addOrderBy_CustomersFax_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_CUSTOMERS_FAX), null, true);return this; + } + + /** + * Add order-by of customersFax as DESC. + * + * @return this. (NotNull) + */ + public BsCustomersCQ addOrderBy_CustomersFax_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_CUSTOMERS_FAX), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [CUSTOMERS_PASSWORD] + // - - - - - - - - -/ + + /** The attribute of customersPassword. */ + protected ConditionValue _customersPassword; + + /** + * Get the value of customersPassword. + * + * @return The value of customersPassword. + */ + public ConditionValue getCustomersPassword() { + if (_customersPassword == null) { + _customersPassword = new ConditionValue(); + } + return _customersPassword; + } + + protected ConditionValue getCValueCustomersPassword() { + return getCustomersPassword(); + } + + + /** + * Add order-by of customersPassword as ASC. + * + * @return this. (NotNull) + */ + public BsCustomersCQ addOrderBy_CustomersPassword_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_CUSTOMERS_PASSWORD), null, true);return this; + } + + /** + * Add order-by of customersPassword as DESC. + * + * @return this. (NotNull) + */ + public BsCustomersCQ addOrderBy_CustomersPassword_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_CUSTOMERS_PASSWORD), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [CUSTOMERS_NEWSLETTER] + // - - - - - - - - -/ + + /** The attribute of customersNewsletter. */ + protected ConditionValue _customersNewsletter; + + /** + * Get the value of customersNewsletter. + * + * @return The value of customersNewsletter. + */ + public ConditionValue getCustomersNewsletter() { + if (_customersNewsletter == null) { + _customersNewsletter = new ConditionValue(); + } + return _customersNewsletter; + } + + protected ConditionValue getCValueCustomersNewsletter() { + return getCustomersNewsletter(); + } + + + /** + * Add order-by of customersNewsletter as ASC. + * + * @return this. (NotNull) + */ + public BsCustomersCQ addOrderBy_CustomersNewsletter_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_CUSTOMERS_NEWSLETTER), null, true);return this; + } + + /** + * Add order-by of customersNewsletter as DESC. + * + * @return this. (NotNull) + */ + public BsCustomersCQ addOrderBy_CustomersNewsletter_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_CUSTOMERS_NEWSLETTER), null, false);return this; + } + + // =================================================================================== + // Union Query + // =========== + protected void reflectRelationOnUnionQuery(ConditionQuery baseQueryAsSuper, ConditionQuery unionQueryAsSuper) { + final CustomersCQ baseQuery = (CustomersCQ)baseQueryAsSuper; + final CustomersCQ unionQuery = (CustomersCQ)unionQueryAsSuper; + + } + + // =================================================================================== + // Foreign Query + // ============= + + +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/BsCustomersInfoCQ.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/BsCustomersInfoCQ.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/BsCustomersInfoCQ.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,440 @@ + +package jp.sf.pal.pompei.cbean.cq.bs; + +import jp.sf.pal.pompei.cbean.cq.*; + +import jp.sf.pal.pompei.allcommon.cbean.*; +import jp.sf.pal.pompei.allcommon.cbean.ckey.*; +import jp.sf.pal.pompei.allcommon.cbean.cvalue.ConditionValue; +import jp.sf.pal.pompei.allcommon.cbean.sqlclause.SqlClause; +import jp.sf.pal.pompei.cbean.cq.ciq.*; + +/** + * The condition-query of CUSTOMERS_INFO. + * + * @author DBFlute(AutoGenerator) + */ +public class BsCustomersInfoCQ extends AbstractBsCustomersInfoCQ { + + // =================================================================================== + // Attribute + // ========= + /** Corresponding inline query. */ + protected CustomersInfoCIQ _inlineQuery; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param childQuery Child query as abstract class. (Nullable: If null, this is base instance.) + * @param sqlClause SQL clause instance. (NotNull) + * @param aliasName My alias name. (NotNull) + * @param nestLevel Nest level. + */ + public BsCustomersInfoCQ(ConditionQuery childQuery, SqlClause sqlClause, String aliasName, int nestLevel) { + super(childQuery, sqlClause, aliasName, nestLevel); + } + + // =================================================================================== + // Inline + // ====== + /** + * Get inline query. + * + * @return Inline query. (NotNull) + */ + public CustomersInfoCIQ inline() { + if (_inlineQuery == null) { + _inlineQuery = new CustomersInfoCIQ(getChildQuery(), getSqlClause(), getAliasName(), getNestLevel(), this); + } + return _inlineQuery; + } + + // =================================================================================== + // Include-as-Mine + // =============== + + /** + * Include select-column of customersInfoId as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_CustomersInfoId() { + registerIncludedSelectColumn("CustomersInfoId", getRealColumnName("CUSTOMERS_INFO_ID")); + } + + /** + * Include select-column of customersInfoId as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_CustomersInfoId(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("CUSTOMERS_INFO_ID")); + } + + /** + * Include select-column of customersInfoDateOfLastLogon as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_CustomersInfoDateOfLastLogon() { + registerIncludedSelectColumn("CustomersInfoDateOfLastLogon", getRealColumnName("CUSTOMERS_INFO_DATE_OF_LAST_LOGON")); + } + + /** + * Include select-column of customersInfoDateOfLastLogon as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_CustomersInfoDateOfLastLogon(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("CUSTOMERS_INFO_DATE_OF_LAST_LOGON")); + } + + /** + * Include select-column of customersInfoNumberOfLogons as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_CustomersInfoNumberOfLogons() { + registerIncludedSelectColumn("CustomersInfoNumberOfLogons", getRealColumnName("CUSTOMERS_INFO_NUMBER_OF_LOGONS")); + } + + /** + * Include select-column of customersInfoNumberOfLogons as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_CustomersInfoNumberOfLogons(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("CUSTOMERS_INFO_NUMBER_OF_LOGONS")); + } + + /** + * Include select-column of customersInfoDateAccountCreated as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_CustomersInfoDateAccountCreated() { + registerIncludedSelectColumn("CustomersInfoDateAccountCreated", getRealColumnName("CUSTOMERS_INFO_DATE_ACCOUNT_CREATED")); + } + + /** + * Include select-column of customersInfoDateAccountCreated as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_CustomersInfoDateAccountCreated(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("CUSTOMERS_INFO_DATE_ACCOUNT_CREATED")); + } + + /** + * Include select-column of customersInfoDateAccountLastModified as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_CustomersInfoDateAccountLastModified() { + registerIncludedSelectColumn("CustomersInfoDateAccountLastModified", getRealColumnName("CUSTOMERS_INFO_DATE_ACCOUNT_LAST_MODIFIED")); + } + + /** + * Include select-column of customersInfoDateAccountLastModified as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_CustomersInfoDateAccountLastModified(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("CUSTOMERS_INFO_DATE_ACCOUNT_LAST_MODIFIED")); + } + + /** + * Include select-column of globalProductNotifications as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_GlobalProductNotifications() { + registerIncludedSelectColumn("GlobalProductNotifications", getRealColumnName("GLOBAL_PRODUCT_NOTIFICATIONS")); + } + + /** + * Include select-column of globalProductNotifications as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_GlobalProductNotifications(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("GLOBAL_PRODUCT_NOTIFICATIONS")); + } + + // =================================================================================== + // Query + // ===== + // /* * * * * * * * * * * * * * * * * * * * * * * + // MyTable = [CUSTOMERS_INFO] + // * * * * * * * * */ + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [CUSTOMERS_INFO_ID] + // - - - - - - - - -/ + + /** The attribute of customersInfoId. */ + protected ConditionValue _customersInfoId; + + /** + * Get the value of customersInfoId. + * + * @return The value of customersInfoId. + */ + public ConditionValue getCustomersInfoId() { + if (_customersInfoId == null) { + _customersInfoId = new ConditionValue(); + } + return _customersInfoId; + } + + protected ConditionValue getCValueCustomersInfoId() { + return getCustomersInfoId(); + } + + + /** + * Add order-by of customersInfoId as ASC. + * + * @return this. (NotNull) + */ + public BsCustomersInfoCQ addOrderBy_CustomersInfoId_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_CUSTOMERS_INFO_ID), null, true);return this; + } + + /** + * Add order-by of customersInfoId as DESC. + * + * @return this. (NotNull) + */ + public BsCustomersInfoCQ addOrderBy_CustomersInfoId_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_CUSTOMERS_INFO_ID), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [CUSTOMERS_INFO_DATE_OF_LAST_LOGON] + // - - - - - - - - -/ + + /** The attribute of customersInfoDateOfLastLogon. */ + protected ConditionValue _customersInfoDateOfLastLogon; + + /** + * Get the value of customersInfoDateOfLastLogon. + * + * @return The value of customersInfoDateOfLastLogon. + */ + public ConditionValue getCustomersInfoDateOfLastLogon() { + if (_customersInfoDateOfLastLogon == null) { + _customersInfoDateOfLastLogon = new ConditionValue(); + } + return _customersInfoDateOfLastLogon; + } + + protected ConditionValue getCValueCustomersInfoDateOfLastLogon() { + return getCustomersInfoDateOfLastLogon(); + } + + + /** + * Add order-by of customersInfoDateOfLastLogon as ASC. + * + * @return this. (NotNull) + */ + public BsCustomersInfoCQ addOrderBy_CustomersInfoDateOfLastLogon_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_CUSTOMERS_INFO_DATE_OF_LAST_LOGON), null, true);return this; + } + + /** + * Add order-by of customersInfoDateOfLastLogon as DESC. + * + * @return this. (NotNull) + */ + public BsCustomersInfoCQ addOrderBy_CustomersInfoDateOfLastLogon_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_CUSTOMERS_INFO_DATE_OF_LAST_LOGON), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [CUSTOMERS_INFO_NUMBER_OF_LOGONS] + // - - - - - - - - -/ + + /** The attribute of customersInfoNumberOfLogons. */ + protected ConditionValue _customersInfoNumberOfLogons; + + /** + * Get the value of customersInfoNumberOfLogons. + * + * @return The value of customersInfoNumberOfLogons. + */ + public ConditionValue getCustomersInfoNumberOfLogons() { + if (_customersInfoNumberOfLogons == null) { + _customersInfoNumberOfLogons = new ConditionValue(); + } + return _customersInfoNumberOfLogons; + } + + protected ConditionValue getCValueCustomersInfoNumberOfLogons() { + return getCustomersInfoNumberOfLogons(); + } + + + /** + * Add order-by of customersInfoNumberOfLogons as ASC. + * + * @return this. (NotNull) + */ + public BsCustomersInfoCQ addOrderBy_CustomersInfoNumberOfLogons_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_CUSTOMERS_INFO_NUMBER_OF_LOGONS), null, true);return this; + } + + /** + * Add order-by of customersInfoNumberOfLogons as DESC. + * + * @return this. (NotNull) + */ + public BsCustomersInfoCQ addOrderBy_CustomersInfoNumberOfLogons_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_CUSTOMERS_INFO_NUMBER_OF_LOGONS), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [CUSTOMERS_INFO_DATE_ACCOUNT_CREATED] + // - - - - - - - - -/ + + /** The attribute of customersInfoDateAccountCreated. */ + protected ConditionValue _customersInfoDateAccountCreated; + + /** + * Get the value of customersInfoDateAccountCreated. + * + * @return The value of customersInfoDateAccountCreated. + */ + public ConditionValue getCustomersInfoDateAccountCreated() { + if (_customersInfoDateAccountCreated == null) { + _customersInfoDateAccountCreated = new ConditionValue(); + } + return _customersInfoDateAccountCreated; + } + + protected ConditionValue getCValueCustomersInfoDateAccountCreated() { + return getCustomersInfoDateAccountCreated(); + } + + + /** + * Add order-by of customersInfoDateAccountCreated as ASC. + * + * @return this. (NotNull) + */ + public BsCustomersInfoCQ addOrderBy_CustomersInfoDateAccountCreated_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_CUSTOMERS_INFO_DATE_ACCOUNT_CREATED), null, true);return this; + } + + /** + * Add order-by of customersInfoDateAccountCreated as DESC. + * + * @return this. (NotNull) + */ + public BsCustomersInfoCQ addOrderBy_CustomersInfoDateAccountCreated_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_CUSTOMERS_INFO_DATE_ACCOUNT_CREATED), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [CUSTOMERS_INFO_DATE_ACCOUNT_LAST_MODIFIED] + // - - - - - - - - -/ + + /** The attribute of customersInfoDateAccountLastModified. */ + protected ConditionValue _customersInfoDateAccountLastModified; + + /** + * Get the value of customersInfoDateAccountLastModified. + * + * @return The value of customersInfoDateAccountLastModified. + */ + public ConditionValue getCustomersInfoDateAccountLastModified() { + if (_customersInfoDateAccountLastModified == null) { + _customersInfoDateAccountLastModified = new ConditionValue(); + } + return _customersInfoDateAccountLastModified; + } + + protected ConditionValue getCValueCustomersInfoDateAccountLastModified() { + return getCustomersInfoDateAccountLastModified(); + } + + + /** + * Add order-by of customersInfoDateAccountLastModified as ASC. + * + * @return this. (NotNull) + */ + public BsCustomersInfoCQ addOrderBy_CustomersInfoDateAccountLastModified_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_CUSTOMERS_INFO_DATE_ACCOUNT_LAST_MODIFIED), null, true);return this; + } + + /** + * Add order-by of customersInfoDateAccountLastModified as DESC. + * + * @return this. (NotNull) + */ + public BsCustomersInfoCQ addOrderBy_CustomersInfoDateAccountLastModified_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_CUSTOMERS_INFO_DATE_ACCOUNT_LAST_MODIFIED), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [GLOBAL_PRODUCT_NOTIFICATIONS] + // - - - - - - - - -/ + + /** The attribute of globalProductNotifications. */ + protected ConditionValue _globalProductNotifications; + + /** + * Get the value of globalProductNotifications. + * + * @return The value of globalProductNotifications. + */ + public ConditionValue getGlobalProductNotifications() { + if (_globalProductNotifications == null) { + _globalProductNotifications = new ConditionValue(); + } + return _globalProductNotifications; + } + + protected ConditionValue getCValueGlobalProductNotifications() { + return getGlobalProductNotifications(); + } + + + /** + * Add order-by of globalProductNotifications as ASC. + * + * @return this. (NotNull) + */ + public BsCustomersInfoCQ addOrderBy_GlobalProductNotifications_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_GLOBAL_PRODUCT_NOTIFICATIONS), null, true);return this; + } + + /** + * Add order-by of globalProductNotifications as DESC. + * + * @return this. (NotNull) + */ + public BsCustomersInfoCQ addOrderBy_GlobalProductNotifications_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_GLOBAL_PRODUCT_NOTIFICATIONS), null, false);return this; + } + + // =================================================================================== + // Union Query + // =========== + protected void reflectRelationOnUnionQuery(ConditionQuery baseQueryAsSuper, ConditionQuery unionQueryAsSuper) { + final CustomersInfoCQ baseQuery = (CustomersInfoCQ)baseQueryAsSuper; + final CustomersInfoCQ unionQuery = (CustomersInfoCQ)unionQueryAsSuper; + + } + + // =================================================================================== + // Foreign Query + // ============= + + +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/BsGeoZonesCQ.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/BsGeoZonesCQ.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/BsGeoZonesCQ.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,380 @@ + +package jp.sf.pal.pompei.cbean.cq.bs; + +import jp.sf.pal.pompei.cbean.cq.*; + +import jp.sf.pal.pompei.allcommon.cbean.*; +import jp.sf.pal.pompei.allcommon.cbean.ckey.*; +import jp.sf.pal.pompei.allcommon.cbean.cvalue.ConditionValue; +import jp.sf.pal.pompei.allcommon.cbean.sqlclause.SqlClause; +import jp.sf.pal.pompei.cbean.cq.ciq.*; + +/** + * The condition-query of GEO_ZONES. + * + * @author DBFlute(AutoGenerator) + */ +public class BsGeoZonesCQ extends AbstractBsGeoZonesCQ { + + // =================================================================================== + // Attribute + // ========= + /** Corresponding inline query. */ + protected GeoZonesCIQ _inlineQuery; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param childQuery Child query as abstract class. (Nullable: If null, this is base instance.) + * @param sqlClause SQL clause instance. (NotNull) + * @param aliasName My alias name. (NotNull) + * @param nestLevel Nest level. + */ + public BsGeoZonesCQ(ConditionQuery childQuery, SqlClause sqlClause, String aliasName, int nestLevel) { + super(childQuery, sqlClause, aliasName, nestLevel); + } + + // =================================================================================== + // Inline + // ====== + /** + * Get inline query. + * + * @return Inline query. (NotNull) + */ + public GeoZonesCIQ inline() { + if (_inlineQuery == null) { + _inlineQuery = new GeoZonesCIQ(getChildQuery(), getSqlClause(), getAliasName(), getNestLevel(), this); + } + return _inlineQuery; + } + + // =================================================================================== + // Include-as-Mine + // =============== + + /** + * Include select-column of geoZoneId as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_GeoZoneId() { + registerIncludedSelectColumn("GeoZoneId", getRealColumnName("GEO_ZONE_ID")); + } + + /** + * Include select-column of geoZoneId as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_GeoZoneId(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("GEO_ZONE_ID")); + } + + /** + * Include select-column of geoZoneName as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_GeoZoneName() { + registerIncludedSelectColumn("GeoZoneName", getRealColumnName("GEO_ZONE_NAME")); + } + + /** + * Include select-column of geoZoneName as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_GeoZoneName(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("GEO_ZONE_NAME")); + } + + /** + * Include select-column of geoZoneDescription as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_GeoZoneDescription() { + registerIncludedSelectColumn("GeoZoneDescription", getRealColumnName("GEO_ZONE_DESCRIPTION")); + } + + /** + * Include select-column of geoZoneDescription as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_GeoZoneDescription(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("GEO_ZONE_DESCRIPTION")); + } + + /** + * Include select-column of lastModified as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_LastModified() { + registerIncludedSelectColumn("LastModified", getRealColumnName("LAST_MODIFIED")); + } + + /** + * Include select-column of lastModified as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_LastModified(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("LAST_MODIFIED")); + } + + /** + * Include select-column of dateAdded as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_DateAdded() { + registerIncludedSelectColumn("DateAdded", getRealColumnName("DATE_ADDED")); + } + + /** + * Include select-column of dateAdded as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_DateAdded(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("DATE_ADDED")); + } + + // =================================================================================== + // Query + // ===== + // /* * * * * * * * * * * * * * * * * * * * * * * + // MyTable = [GEO_ZONES] + // * * * * * * * * */ + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [GEO_ZONE_ID] + // - - - - - - - - -/ + + /** The attribute of geoZoneId. */ + protected ConditionValue _geoZoneId; + + /** + * Get the value of geoZoneId. + * + * @return The value of geoZoneId. + */ + public ConditionValue getGeoZoneId() { + if (_geoZoneId == null) { + _geoZoneId = new ConditionValue(); + } + return _geoZoneId; + } + + protected ConditionValue getCValueGeoZoneId() { + return getGeoZoneId(); + } + + + /** + * Add order-by of geoZoneId as ASC. + * + * @return this. (NotNull) + */ + public BsGeoZonesCQ addOrderBy_GeoZoneId_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_GEO_ZONE_ID), null, true);return this; + } + + /** + * Add order-by of geoZoneId as DESC. + * + * @return this. (NotNull) + */ + public BsGeoZonesCQ addOrderBy_GeoZoneId_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_GEO_ZONE_ID), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [GEO_ZONE_NAME] + // - - - - - - - - -/ + + /** The attribute of geoZoneName. */ + protected ConditionValue _geoZoneName; + + /** + * Get the value of geoZoneName. + * + * @return The value of geoZoneName. + */ + public ConditionValue getGeoZoneName() { + if (_geoZoneName == null) { + _geoZoneName = new ConditionValue(); + } + return _geoZoneName; + } + + protected ConditionValue getCValueGeoZoneName() { + return getGeoZoneName(); + } + + + /** + * Add order-by of geoZoneName as ASC. + * + * @return this. (NotNull) + */ + public BsGeoZonesCQ addOrderBy_GeoZoneName_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_GEO_ZONE_NAME), null, true);return this; + } + + /** + * Add order-by of geoZoneName as DESC. + * + * @return this. (NotNull) + */ + public BsGeoZonesCQ addOrderBy_GeoZoneName_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_GEO_ZONE_NAME), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [GEO_ZONE_DESCRIPTION] + // - - - - - - - - -/ + + /** The attribute of geoZoneDescription. */ + protected ConditionValue _geoZoneDescription; + + /** + * Get the value of geoZoneDescription. + * + * @return The value of geoZoneDescription. + */ + public ConditionValue getGeoZoneDescription() { + if (_geoZoneDescription == null) { + _geoZoneDescription = new ConditionValue(); + } + return _geoZoneDescription; + } + + protected ConditionValue getCValueGeoZoneDescription() { + return getGeoZoneDescription(); + } + + + /** + * Add order-by of geoZoneDescription as ASC. + * + * @return this. (NotNull) + */ + public BsGeoZonesCQ addOrderBy_GeoZoneDescription_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_GEO_ZONE_DESCRIPTION), null, true);return this; + } + + /** + * Add order-by of geoZoneDescription as DESC. + * + * @return this. (NotNull) + */ + public BsGeoZonesCQ addOrderBy_GeoZoneDescription_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_GEO_ZONE_DESCRIPTION), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [LAST_MODIFIED] + // - - - - - - - - -/ + + /** The attribute of lastModified. */ + protected ConditionValue _lastModified; + + /** + * Get the value of lastModified. + * + * @return The value of lastModified. + */ + public ConditionValue getLastModified() { + if (_lastModified == null) { + _lastModified = new ConditionValue(); + } + return _lastModified; + } + + protected ConditionValue getCValueLastModified() { + return getLastModified(); + } + + + /** + * Add order-by of lastModified as ASC. + * + * @return this. (NotNull) + */ + public BsGeoZonesCQ addOrderBy_LastModified_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_LAST_MODIFIED), null, true);return this; + } + + /** + * Add order-by of lastModified as DESC. + * + * @return this. (NotNull) + */ + public BsGeoZonesCQ addOrderBy_LastModified_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_LAST_MODIFIED), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [DATE_ADDED] + // - - - - - - - - -/ + + /** The attribute of dateAdded. */ + protected ConditionValue _dateAdded; + + /** + * Get the value of dateAdded. + * + * @return The value of dateAdded. + */ + public ConditionValue getDateAdded() { + if (_dateAdded == null) { + _dateAdded = new ConditionValue(); + } + return _dateAdded; + } + + protected ConditionValue getCValueDateAdded() { + return getDateAdded(); + } + + + /** + * Add order-by of dateAdded as ASC. + * + * @return this. (NotNull) + */ + public BsGeoZonesCQ addOrderBy_DateAdded_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_DATE_ADDED), null, true);return this; + } + + /** + * Add order-by of dateAdded as DESC. + * + * @return this. (NotNull) + */ + public BsGeoZonesCQ addOrderBy_DateAdded_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_DATE_ADDED), null, false);return this; + } + + // =================================================================================== + // Union Query + // =========== + protected void reflectRelationOnUnionQuery(ConditionQuery baseQueryAsSuper, ConditionQuery unionQueryAsSuper) { + final GeoZonesCQ baseQuery = (GeoZonesCQ)baseQueryAsSuper; + final GeoZonesCQ unionQuery = (GeoZonesCQ)unionQueryAsSuper; + + } + + // =================================================================================== + // Foreign Query + // ============= + + +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/BsLanguagesCQ.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/BsLanguagesCQ.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/BsLanguagesCQ.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,440 @@ + +package jp.sf.pal.pompei.cbean.cq.bs; + +import jp.sf.pal.pompei.cbean.cq.*; + +import jp.sf.pal.pompei.allcommon.cbean.*; +import jp.sf.pal.pompei.allcommon.cbean.ckey.*; +import jp.sf.pal.pompei.allcommon.cbean.cvalue.ConditionValue; +import jp.sf.pal.pompei.allcommon.cbean.sqlclause.SqlClause; +import jp.sf.pal.pompei.cbean.cq.ciq.*; + +/** + * The condition-query of LANGUAGES. + * + * @author DBFlute(AutoGenerator) + */ +public class BsLanguagesCQ extends AbstractBsLanguagesCQ { + + // =================================================================================== + // Attribute + // ========= + /** Corresponding inline query. */ + protected LanguagesCIQ _inlineQuery; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param childQuery Child query as abstract class. (Nullable: If null, this is base instance.) + * @param sqlClause SQL clause instance. (NotNull) + * @param aliasName My alias name. (NotNull) + * @param nestLevel Nest level. + */ + public BsLanguagesCQ(ConditionQuery childQuery, SqlClause sqlClause, String aliasName, int nestLevel) { + super(childQuery, sqlClause, aliasName, nestLevel); + } + + // =================================================================================== + // Inline + // ====== + /** + * Get inline query. + * + * @return Inline query. (NotNull) + */ + public LanguagesCIQ inline() { + if (_inlineQuery == null) { + _inlineQuery = new LanguagesCIQ(getChildQuery(), getSqlClause(), getAliasName(), getNestLevel(), this); + } + return _inlineQuery; + } + + // =================================================================================== + // Include-as-Mine + // =============== + + /** + * Include select-column of languagesId as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_LanguagesId() { + registerIncludedSelectColumn("LanguagesId", getRealColumnName("LANGUAGES_ID")); + } + + /** + * Include select-column of languagesId as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_LanguagesId(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("LANGUAGES_ID")); + } + + /** + * Include select-column of name as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_Name() { + registerIncludedSelectColumn("Name", getRealColumnName("NAME")); + } + + /** + * Include select-column of name as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_Name(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("NAME")); + } + + /** + * Include select-column of code as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_Code() { + registerIncludedSelectColumn("Code", getRealColumnName("CODE")); + } + + /** + * Include select-column of code as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_Code(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("CODE")); + } + + /** + * Include select-column of image as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_Image() { + registerIncludedSelectColumn("Image", getRealColumnName("IMAGE")); + } + + /** + * Include select-column of image as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_Image(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("IMAGE")); + } + + /** + * Include select-column of directory as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_Directory() { + registerIncludedSelectColumn("Directory", getRealColumnName("DIRECTORY")); + } + + /** + * Include select-column of directory as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_Directory(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("DIRECTORY")); + } + + /** + * Include select-column of sortOrder as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_SortOrder() { + registerIncludedSelectColumn("SortOrder", getRealColumnName("SORT_ORDER")); + } + + /** + * Include select-column of sortOrder as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_SortOrder(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("SORT_ORDER")); + } + + // =================================================================================== + // Query + // ===== + // /* * * * * * * * * * * * * * * * * * * * * * * + // MyTable = [LANGUAGES] + // * * * * * * * * */ + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [LANGUAGES_ID] + // - - - - - - - - -/ + + /** The attribute of languagesId. */ + protected ConditionValue _languagesId; + + /** + * Get the value of languagesId. + * + * @return The value of languagesId. + */ + public ConditionValue getLanguagesId() { + if (_languagesId == null) { + _languagesId = new ConditionValue(); + } + return _languagesId; + } + + protected ConditionValue getCValueLanguagesId() { + return getLanguagesId(); + } + + + /** + * Add order-by of languagesId as ASC. + * + * @return this. (NotNull) + */ + public BsLanguagesCQ addOrderBy_LanguagesId_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_LANGUAGES_ID), null, true);return this; + } + + /** + * Add order-by of languagesId as DESC. + * + * @return this. (NotNull) + */ + public BsLanguagesCQ addOrderBy_LanguagesId_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_LANGUAGES_ID), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [NAME] + // - - - - - - - - -/ + + /** The attribute of name. */ + protected ConditionValue _name; + + /** + * Get the value of name. + * + * @return The value of name. + */ + public ConditionValue getName() { + if (_name == null) { + _name = new ConditionValue(); + } + return _name; + } + + protected ConditionValue getCValueName() { + return getName(); + } + + + /** + * Add order-by of name as ASC. + * + * @return this. (NotNull) + */ + public BsLanguagesCQ addOrderBy_Name_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_NAME), null, true);return this; + } + + /** + * Add order-by of name as DESC. + * + * @return this. (NotNull) + */ + public BsLanguagesCQ addOrderBy_Name_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_NAME), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [CODE] + // - - - - - - - - -/ + + /** The attribute of code. */ + protected ConditionValue _code; + + /** + * Get the value of code. + * + * @return The value of code. + */ + public ConditionValue getCode() { + if (_code == null) { + _code = new ConditionValue(); + } + return _code; + } + + protected ConditionValue getCValueCode() { + return getCode(); + } + + + /** + * Add order-by of code as ASC. + * + * @return this. (NotNull) + */ + public BsLanguagesCQ addOrderBy_Code_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_CODE), null, true);return this; + } + + /** + * Add order-by of code as DESC. + * + * @return this. (NotNull) + */ + public BsLanguagesCQ addOrderBy_Code_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_CODE), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [IMAGE] + // - - - - - - - - -/ + + /** The attribute of image. */ + protected ConditionValue _image; + + /** + * Get the value of image. + * + * @return The value of image. + */ + public ConditionValue getImage() { + if (_image == null) { + _image = new ConditionValue(); + } + return _image; + } + + protected ConditionValue getCValueImage() { + return getImage(); + } + + + /** + * Add order-by of image as ASC. + * + * @return this. (NotNull) + */ + public BsLanguagesCQ addOrderBy_Image_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_IMAGE), null, true);return this; + } + + /** + * Add order-by of image as DESC. + * + * @return this. (NotNull) + */ + public BsLanguagesCQ addOrderBy_Image_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_IMAGE), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [DIRECTORY] + // - - - - - - - - -/ + + /** The attribute of directory. */ + protected ConditionValue _directory; + + /** + * Get the value of directory. + * + * @return The value of directory. + */ + public ConditionValue getDirectory() { + if (_directory == null) { + _directory = new ConditionValue(); + } + return _directory; + } + + protected ConditionValue getCValueDirectory() { + return getDirectory(); + } + + + /** + * Add order-by of directory as ASC. + * + * @return this. (NotNull) + */ + public BsLanguagesCQ addOrderBy_Directory_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_DIRECTORY), null, true);return this; + } + + /** + * Add order-by of directory as DESC. + * + * @return this. (NotNull) + */ + public BsLanguagesCQ addOrderBy_Directory_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_DIRECTORY), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [SORT_ORDER] + // - - - - - - - - -/ + + /** The attribute of sortOrder. */ + protected ConditionValue _sortOrder; + + /** + * Get the value of sortOrder. + * + * @return The value of sortOrder. + */ + public ConditionValue getSortOrder() { + if (_sortOrder == null) { + _sortOrder = new ConditionValue(); + } + return _sortOrder; + } + + protected ConditionValue getCValueSortOrder() { + return getSortOrder(); + } + + + /** + * Add order-by of sortOrder as ASC. + * + * @return this. (NotNull) + */ + public BsLanguagesCQ addOrderBy_SortOrder_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_SORT_ORDER), null, true);return this; + } + + /** + * Add order-by of sortOrder as DESC. + * + * @return this. (NotNull) + */ + public BsLanguagesCQ addOrderBy_SortOrder_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_SORT_ORDER), null, false);return this; + } + + // =================================================================================== + // Union Query + // =========== + protected void reflectRelationOnUnionQuery(ConditionQuery baseQueryAsSuper, ConditionQuery unionQueryAsSuper) { + final LanguagesCQ baseQuery = (LanguagesCQ)baseQueryAsSuper; + final LanguagesCQ unionQuery = (LanguagesCQ)unionQueryAsSuper; + + } + + // =================================================================================== + // Foreign Query + // ============= + + +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/BsManufacturersCQ.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/BsManufacturersCQ.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/BsManufacturersCQ.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,380 @@ + +package jp.sf.pal.pompei.cbean.cq.bs; + +import jp.sf.pal.pompei.cbean.cq.*; + +import jp.sf.pal.pompei.allcommon.cbean.*; +import jp.sf.pal.pompei.allcommon.cbean.ckey.*; +import jp.sf.pal.pompei.allcommon.cbean.cvalue.ConditionValue; +import jp.sf.pal.pompei.allcommon.cbean.sqlclause.SqlClause; +import jp.sf.pal.pompei.cbean.cq.ciq.*; + +/** + * The condition-query of MANUFACTURERS. + * + * @author DBFlute(AutoGenerator) + */ +public class BsManufacturersCQ extends AbstractBsManufacturersCQ { + + // =================================================================================== + // Attribute + // ========= + /** Corresponding inline query. */ + protected ManufacturersCIQ _inlineQuery; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param childQuery Child query as abstract class. (Nullable: If null, this is base instance.) + * @param sqlClause SQL clause instance. (NotNull) + * @param aliasName My alias name. (NotNull) + * @param nestLevel Nest level. + */ + public BsManufacturersCQ(ConditionQuery childQuery, SqlClause sqlClause, String aliasName, int nestLevel) { + super(childQuery, sqlClause, aliasName, nestLevel); + } + + // =================================================================================== + // Inline + // ====== + /** + * Get inline query. + * + * @return Inline query. (NotNull) + */ + public ManufacturersCIQ inline() { + if (_inlineQuery == null) { + _inlineQuery = new ManufacturersCIQ(getChildQuery(), getSqlClause(), getAliasName(), getNestLevel(), this); + } + return _inlineQuery; + } + + // =================================================================================== + // Include-as-Mine + // =============== + + /** + * Include select-column of manufacturersId as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_ManufacturersId() { + registerIncludedSelectColumn("ManufacturersId", getRealColumnName("MANUFACTURERS_ID")); + } + + /** + * Include select-column of manufacturersId as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_ManufacturersId(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("MANUFACTURERS_ID")); + } + + /** + * Include select-column of manufacturersName as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_ManufacturersName() { + registerIncludedSelectColumn("ManufacturersName", getRealColumnName("MANUFACTURERS_NAME")); + } + + /** + * Include select-column of manufacturersName as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_ManufacturersName(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("MANUFACTURERS_NAME")); + } + + /** + * Include select-column of manufacturersImage as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_ManufacturersImage() { + registerIncludedSelectColumn("ManufacturersImage", getRealColumnName("MANUFACTURERS_IMAGE")); + } + + /** + * Include select-column of manufacturersImage as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_ManufacturersImage(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("MANUFACTURERS_IMAGE")); + } + + /** + * Include select-column of dateAdded as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_DateAdded() { + registerIncludedSelectColumn("DateAdded", getRealColumnName("DATE_ADDED")); + } + + /** + * Include select-column of dateAdded as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_DateAdded(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("DATE_ADDED")); + } + + /** + * Include select-column of lastModified as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_LastModified() { + registerIncludedSelectColumn("LastModified", getRealColumnName("LAST_MODIFIED")); + } + + /** + * Include select-column of lastModified as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_LastModified(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("LAST_MODIFIED")); + } + + // =================================================================================== + // Query + // ===== + // /* * * * * * * * * * * * * * * * * * * * * * * + // MyTable = [MANUFACTURERS] + // * * * * * * * * */ + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [MANUFACTURERS_ID] + // - - - - - - - - -/ + + /** The attribute of manufacturersId. */ + protected ConditionValue _manufacturersId; + + /** + * Get the value of manufacturersId. + * + * @return The value of manufacturersId. + */ + public ConditionValue getManufacturersId() { + if (_manufacturersId == null) { + _manufacturersId = new ConditionValue(); + } + return _manufacturersId; + } + + protected ConditionValue getCValueManufacturersId() { + return getManufacturersId(); + } + + + /** + * Add order-by of manufacturersId as ASC. + * + * @return this. (NotNull) + */ + public BsManufacturersCQ addOrderBy_ManufacturersId_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_MANUFACTURERS_ID), null, true);return this; + } + + /** + * Add order-by of manufacturersId as DESC. + * + * @return this. (NotNull) + */ + public BsManufacturersCQ addOrderBy_ManufacturersId_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_MANUFACTURERS_ID), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [MANUFACTURERS_NAME] + // - - - - - - - - -/ + + /** The attribute of manufacturersName. */ + protected ConditionValue _manufacturersName; + + /** + * Get the value of manufacturersName. + * + * @return The value of manufacturersName. + */ + public ConditionValue getManufacturersName() { + if (_manufacturersName == null) { + _manufacturersName = new ConditionValue(); + } + return _manufacturersName; + } + + protected ConditionValue getCValueManufacturersName() { + return getManufacturersName(); + } + + + /** + * Add order-by of manufacturersName as ASC. + * + * @return this. (NotNull) + */ + public BsManufacturersCQ addOrderBy_ManufacturersName_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_MANUFACTURERS_NAME), null, true);return this; + } + + /** + * Add order-by of manufacturersName as DESC. + * + * @return this. (NotNull) + */ + public BsManufacturersCQ addOrderBy_ManufacturersName_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_MANUFACTURERS_NAME), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [MANUFACTURERS_IMAGE] + // - - - - - - - - -/ + + /** The attribute of manufacturersImage. */ + protected ConditionValue _manufacturersImage; + + /** + * Get the value of manufacturersImage. + * + * @return The value of manufacturersImage. + */ + public ConditionValue getManufacturersImage() { + if (_manufacturersImage == null) { + _manufacturersImage = new ConditionValue(); + } + return _manufacturersImage; + } + + protected ConditionValue getCValueManufacturersImage() { + return getManufacturersImage(); + } + + + /** + * Add order-by of manufacturersImage as ASC. + * + * @return this. (NotNull) + */ + public BsManufacturersCQ addOrderBy_ManufacturersImage_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_MANUFACTURERS_IMAGE), null, true);return this; + } + + /** + * Add order-by of manufacturersImage as DESC. + * + * @return this. (NotNull) + */ + public BsManufacturersCQ addOrderBy_ManufacturersImage_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_MANUFACTURERS_IMAGE), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [DATE_ADDED] + // - - - - - - - - -/ + + /** The attribute of dateAdded. */ + protected ConditionValue _dateAdded; + + /** + * Get the value of dateAdded. + * + * @return The value of dateAdded. + */ + public ConditionValue getDateAdded() { + if (_dateAdded == null) { + _dateAdded = new ConditionValue(); + } + return _dateAdded; + } + + protected ConditionValue getCValueDateAdded() { + return getDateAdded(); + } + + + /** + * Add order-by of dateAdded as ASC. + * + * @return this. (NotNull) + */ + public BsManufacturersCQ addOrderBy_DateAdded_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_DATE_ADDED), null, true);return this; + } + + /** + * Add order-by of dateAdded as DESC. + * + * @return this. (NotNull) + */ + public BsManufacturersCQ addOrderBy_DateAdded_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_DATE_ADDED), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [LAST_MODIFIED] + // - - - - - - - - -/ + + /** The attribute of lastModified. */ + protected ConditionValue _lastModified; + + /** + * Get the value of lastModified. + * + * @return The value of lastModified. + */ + public ConditionValue getLastModified() { + if (_lastModified == null) { + _lastModified = new ConditionValue(); + } + return _lastModified; + } + + protected ConditionValue getCValueLastModified() { + return getLastModified(); + } + + + /** + * Add order-by of lastModified as ASC. + * + * @return this. (NotNull) + */ + public BsManufacturersCQ addOrderBy_LastModified_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_LAST_MODIFIED), null, true);return this; + } + + /** + * Add order-by of lastModified as DESC. + * + * @return this. (NotNull) + */ + public BsManufacturersCQ addOrderBy_LastModified_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_LAST_MODIFIED), null, false);return this; + } + + // =================================================================================== + // Union Query + // =========== + protected void reflectRelationOnUnionQuery(ConditionQuery baseQueryAsSuper, ConditionQuery unionQueryAsSuper) { + final ManufacturersCQ baseQuery = (ManufacturersCQ)baseQueryAsSuper; + final ManufacturersCQ unionQuery = (ManufacturersCQ)unionQueryAsSuper; + + } + + // =================================================================================== + // Foreign Query + // ============= + + +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/BsManufacturersInfoCQ.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/BsManufacturersInfoCQ.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/BsManufacturersInfoCQ.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,380 @@ + +package jp.sf.pal.pompei.cbean.cq.bs; + +import jp.sf.pal.pompei.cbean.cq.*; + +import jp.sf.pal.pompei.allcommon.cbean.*; +import jp.sf.pal.pompei.allcommon.cbean.ckey.*; +import jp.sf.pal.pompei.allcommon.cbean.cvalue.ConditionValue; +import jp.sf.pal.pompei.allcommon.cbean.sqlclause.SqlClause; +import jp.sf.pal.pompei.cbean.cq.ciq.*; + +/** + * The condition-query of MANUFACTURERS_INFO. + * + * @author DBFlute(AutoGenerator) + */ +public class BsManufacturersInfoCQ extends AbstractBsManufacturersInfoCQ { + + // =================================================================================== + // Attribute + // ========= + /** Corresponding inline query. */ + protected ManufacturersInfoCIQ _inlineQuery; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param childQuery Child query as abstract class. (Nullable: If null, this is base instance.) + * @param sqlClause SQL clause instance. (NotNull) + * @param aliasName My alias name. (NotNull) + * @param nestLevel Nest level. + */ + public BsManufacturersInfoCQ(ConditionQuery childQuery, SqlClause sqlClause, String aliasName, int nestLevel) { + super(childQuery, sqlClause, aliasName, nestLevel); + } + + // =================================================================================== + // Inline + // ====== + /** + * Get inline query. + * + * @return Inline query. (NotNull) + */ + public ManufacturersInfoCIQ inline() { + if (_inlineQuery == null) { + _inlineQuery = new ManufacturersInfoCIQ(getChildQuery(), getSqlClause(), getAliasName(), getNestLevel(), this); + } + return _inlineQuery; + } + + // =================================================================================== + // Include-as-Mine + // =============== + + /** + * Include select-column of manufacturersId as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_ManufacturersId() { + registerIncludedSelectColumn("ManufacturersId", getRealColumnName("MANUFACTURERS_ID")); + } + + /** + * Include select-column of manufacturersId as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_ManufacturersId(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("MANUFACTURERS_ID")); + } + + /** + * Include select-column of languagesId as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_LanguagesId() { + registerIncludedSelectColumn("LanguagesId", getRealColumnName("LANGUAGES_ID")); + } + + /** + * Include select-column of languagesId as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_LanguagesId(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("LANGUAGES_ID")); + } + + /** + * Include select-column of manufacturersUrl as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_ManufacturersUrl() { + registerIncludedSelectColumn("ManufacturersUrl", getRealColumnName("MANUFACTURERS_URL")); + } + + /** + * Include select-column of manufacturersUrl as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_ManufacturersUrl(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("MANUFACTURERS_URL")); + } + + /** + * Include select-column of urlClicked as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_UrlClicked() { + registerIncludedSelectColumn("UrlClicked", getRealColumnName("URL_CLICKED")); + } + + /** + * Include select-column of urlClicked as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_UrlClicked(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("URL_CLICKED")); + } + + /** + * Include select-column of dateLastClick as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_DateLastClick() { + registerIncludedSelectColumn("DateLastClick", getRealColumnName("DATE_LAST_CLICK")); + } + + /** + * Include select-column of dateLastClick as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_DateLastClick(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("DATE_LAST_CLICK")); + } + + // =================================================================================== + // Query + // ===== + // /* * * * * * * * * * * * * * * * * * * * * * * + // MyTable = [MANUFACTURERS_INFO] + // * * * * * * * * */ + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [MANUFACTURERS_ID] + // - - - - - - - - -/ + + /** The attribute of manufacturersId. */ + protected ConditionValue _manufacturersId; + + /** + * Get the value of manufacturersId. + * + * @return The value of manufacturersId. + */ + public ConditionValue getManufacturersId() { + if (_manufacturersId == null) { + _manufacturersId = new ConditionValue(); + } + return _manufacturersId; + } + + protected ConditionValue getCValueManufacturersId() { + return getManufacturersId(); + } + + + /** + * Add order-by of manufacturersId as ASC. + * + * @return this. (NotNull) + */ + public BsManufacturersInfoCQ addOrderBy_ManufacturersId_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_MANUFACTURERS_ID), null, true);return this; + } + + /** + * Add order-by of manufacturersId as DESC. + * + * @return this. (NotNull) + */ + public BsManufacturersInfoCQ addOrderBy_ManufacturersId_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_MANUFACTURERS_ID), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [LANGUAGES_ID] + // - - - - - - - - -/ + + /** The attribute of languagesId. */ + protected ConditionValue _languagesId; + + /** + * Get the value of languagesId. + * + * @return The value of languagesId. + */ + public ConditionValue getLanguagesId() { + if (_languagesId == null) { + _languagesId = new ConditionValue(); + } + return _languagesId; + } + + protected ConditionValue getCValueLanguagesId() { + return getLanguagesId(); + } + + + /** + * Add order-by of languagesId as ASC. + * + * @return this. (NotNull) + */ + public BsManufacturersInfoCQ addOrderBy_LanguagesId_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_LANGUAGES_ID), null, true);return this; + } + + /** + * Add order-by of languagesId as DESC. + * + * @return this. (NotNull) + */ + public BsManufacturersInfoCQ addOrderBy_LanguagesId_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_LANGUAGES_ID), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [MANUFACTURERS_URL] + // - - - - - - - - -/ + + /** The attribute of manufacturersUrl. */ + protected ConditionValue _manufacturersUrl; + + /** + * Get the value of manufacturersUrl. + * + * @return The value of manufacturersUrl. + */ + public ConditionValue getManufacturersUrl() { + if (_manufacturersUrl == null) { + _manufacturersUrl = new ConditionValue(); + } + return _manufacturersUrl; + } + + protected ConditionValue getCValueManufacturersUrl() { + return getManufacturersUrl(); + } + + + /** + * Add order-by of manufacturersUrl as ASC. + * + * @return this. (NotNull) + */ + public BsManufacturersInfoCQ addOrderBy_ManufacturersUrl_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_MANUFACTURERS_URL), null, true);return this; + } + + /** + * Add order-by of manufacturersUrl as DESC. + * + * @return this. (NotNull) + */ + public BsManufacturersInfoCQ addOrderBy_ManufacturersUrl_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_MANUFACTURERS_URL), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [URL_CLICKED] + // - - - - - - - - -/ + + /** The attribute of urlClicked. */ + protected ConditionValue _urlClicked; + + /** + * Get the value of urlClicked. + * + * @return The value of urlClicked. + */ + public ConditionValue getUrlClicked() { + if (_urlClicked == null) { + _urlClicked = new ConditionValue(); + } + return _urlClicked; + } + + protected ConditionValue getCValueUrlClicked() { + return getUrlClicked(); + } + + + /** + * Add order-by of urlClicked as ASC. + * + * @return this. (NotNull) + */ + public BsManufacturersInfoCQ addOrderBy_UrlClicked_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_URL_CLICKED), null, true);return this; + } + + /** + * Add order-by of urlClicked as DESC. + * + * @return this. (NotNull) + */ + public BsManufacturersInfoCQ addOrderBy_UrlClicked_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_URL_CLICKED), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [DATE_LAST_CLICK] + // - - - - - - - - -/ + + /** The attribute of dateLastClick. */ + protected ConditionValue _dateLastClick; + + /** + * Get the value of dateLastClick. + * + * @return The value of dateLastClick. + */ + public ConditionValue getDateLastClick() { + if (_dateLastClick == null) { + _dateLastClick = new ConditionValue(); + } + return _dateLastClick; + } + + protected ConditionValue getCValueDateLastClick() { + return getDateLastClick(); + } + + + /** + * Add order-by of dateLastClick as ASC. + * + * @return this. (NotNull) + */ + public BsManufacturersInfoCQ addOrderBy_DateLastClick_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_DATE_LAST_CLICK), null, true);return this; + } + + /** + * Add order-by of dateLastClick as DESC. + * + * @return this. (NotNull) + */ + public BsManufacturersInfoCQ addOrderBy_DateLastClick_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_DATE_LAST_CLICK), null, false);return this; + } + + // =================================================================================== + // Union Query + // =========== + protected void reflectRelationOnUnionQuery(ConditionQuery baseQueryAsSuper, ConditionQuery unionQueryAsSuper) { + final ManufacturersInfoCQ baseQuery = (ManufacturersInfoCQ)baseQueryAsSuper; + final ManufacturersInfoCQ unionQuery = (ManufacturersInfoCQ)unionQueryAsSuper; + + } + + // =================================================================================== + // Foreign Query + // ============= + + +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/BsNewslettersCQ.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/BsNewslettersCQ.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/BsNewslettersCQ.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,560 @@ + +package jp.sf.pal.pompei.cbean.cq.bs; + +import jp.sf.pal.pompei.cbean.cq.*; + +import jp.sf.pal.pompei.allcommon.cbean.*; +import jp.sf.pal.pompei.allcommon.cbean.ckey.*; +import jp.sf.pal.pompei.allcommon.cbean.cvalue.ConditionValue; +import jp.sf.pal.pompei.allcommon.cbean.sqlclause.SqlClause; +import jp.sf.pal.pompei.cbean.cq.ciq.*; + +/** + * The condition-query of NEWSLETTERS. + * + * @author DBFlute(AutoGenerator) + */ +public class BsNewslettersCQ extends AbstractBsNewslettersCQ { + + // =================================================================================== + // Attribute + // ========= + /** Corresponding inline query. */ + protected NewslettersCIQ _inlineQuery; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param childQuery Child query as abstract class. (Nullable: If null, this is base instance.) + * @param sqlClause SQL clause instance. (NotNull) + * @param aliasName My alias name. (NotNull) + * @param nestLevel Nest level. + */ + public BsNewslettersCQ(ConditionQuery childQuery, SqlClause sqlClause, String aliasName, int nestLevel) { + super(childQuery, sqlClause, aliasName, nestLevel); + } + + // =================================================================================== + // Inline + // ====== + /** + * Get inline query. + * + * @return Inline query. (NotNull) + */ + public NewslettersCIQ inline() { + if (_inlineQuery == null) { + _inlineQuery = new NewslettersCIQ(getChildQuery(), getSqlClause(), getAliasName(), getNestLevel(), this); + } + return _inlineQuery; + } + + // =================================================================================== + // Include-as-Mine + // =============== + + /** + * Include select-column of newslettersId as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_NewslettersId() { + registerIncludedSelectColumn("NewslettersId", getRealColumnName("NEWSLETTERS_ID")); + } + + /** + * Include select-column of newslettersId as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_NewslettersId(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("NEWSLETTERS_ID")); + } + + /** + * Include select-column of title as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_Title() { + registerIncludedSelectColumn("Title", getRealColumnName("TITLE")); + } + + /** + * Include select-column of title as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_Title(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("TITLE")); + } + + /** + * Include select-column of content as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_Content() { + registerIncludedSelectColumn("Content", getRealColumnName("CONTENT")); + } + + /** + * Include select-column of content as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_Content(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("CONTENT")); + } + + /** + * Include select-column of module as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_Module() { + registerIncludedSelectColumn("Module", getRealColumnName("MODULE")); + } + + /** + * Include select-column of module as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_Module(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("MODULE")); + } + + /** + * Include select-column of dateAdded as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_DateAdded() { + registerIncludedSelectColumn("DateAdded", getRealColumnName("DATE_ADDED")); + } + + /** + * Include select-column of dateAdded as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_DateAdded(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("DATE_ADDED")); + } + + /** + * Include select-column of dateSent as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_DateSent() { + registerIncludedSelectColumn("DateSent", getRealColumnName("DATE_SENT")); + } + + /** + * Include select-column of dateSent as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_DateSent(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("DATE_SENT")); + } + + /** + * Include select-column of status as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_Status() { + registerIncludedSelectColumn("Status", getRealColumnName("STATUS")); + } + + /** + * Include select-column of status as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_Status(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("STATUS")); + } + + /** + * Include select-column of locked as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_Locked() { + registerIncludedSelectColumn("Locked", getRealColumnName("LOCKED")); + } + + /** + * Include select-column of locked as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_Locked(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("LOCKED")); + } + + // =================================================================================== + // Query + // ===== + // /* * * * * * * * * * * * * * * * * * * * * * * + // MyTable = [NEWSLETTERS] + // * * * * * * * * */ + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [NEWSLETTERS_ID] + // - - - - - - - - -/ + + /** The attribute of newslettersId. */ + protected ConditionValue _newslettersId; + + /** + * Get the value of newslettersId. + * + * @return The value of newslettersId. + */ + public ConditionValue getNewslettersId() { + if (_newslettersId == null) { + _newslettersId = new ConditionValue(); + } + return _newslettersId; + } + + protected ConditionValue getCValueNewslettersId() { + return getNewslettersId(); + } + + + /** + * Add order-by of newslettersId as ASC. + * + * @return this. (NotNull) + */ + public BsNewslettersCQ addOrderBy_NewslettersId_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_NEWSLETTERS_ID), null, true);return this; + } + + /** + * Add order-by of newslettersId as DESC. + * + * @return this. (NotNull) + */ + public BsNewslettersCQ addOrderBy_NewslettersId_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_NEWSLETTERS_ID), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [TITLE] + // - - - - - - - - -/ + + /** The attribute of title. */ + protected ConditionValue _title; + + /** + * Get the value of title. + * + * @return The value of title. + */ + public ConditionValue getTitle() { + if (_title == null) { + _title = new ConditionValue(); + } + return _title; + } + + protected ConditionValue getCValueTitle() { + return getTitle(); + } + + + /** + * Add order-by of title as ASC. + * + * @return this. (NotNull) + */ + public BsNewslettersCQ addOrderBy_Title_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_TITLE), null, true);return this; + } + + /** + * Add order-by of title as DESC. + * + * @return this. (NotNull) + */ + public BsNewslettersCQ addOrderBy_Title_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_TITLE), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [CONTENT] + // - - - - - - - - -/ + + /** The attribute of content. */ + protected ConditionValue _content; + + /** + * Get the value of content. + * + * @return The value of content. + */ + public ConditionValue getContent() { + if (_content == null) { + _content = new ConditionValue(); + } + return _content; + } + + protected ConditionValue getCValueContent() { + return getContent(); + } + + + /** + * Add order-by of content as ASC. + * + * @return this. (NotNull) + */ + public BsNewslettersCQ addOrderBy_Content_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_CONTENT), null, true);return this; + } + + /** + * Add order-by of content as DESC. + * + * @return this. (NotNull) + */ + public BsNewslettersCQ addOrderBy_Content_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_CONTENT), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [MODULE] + // - - - - - - - - -/ + + /** The attribute of module. */ + protected ConditionValue _module; + + /** + * Get the value of module. + * + * @return The value of module. + */ + public ConditionValue getModule() { + if (_module == null) { + _module = new ConditionValue(); + } + return _module; + } + + protected ConditionValue getCValueModule() { + return getModule(); + } + + + /** + * Add order-by of module as ASC. + * + * @return this. (NotNull) + */ + public BsNewslettersCQ addOrderBy_Module_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_MODULE), null, true);return this; + } + + /** + * Add order-by of module as DESC. + * + * @return this. (NotNull) + */ + public BsNewslettersCQ addOrderBy_Module_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_MODULE), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [DATE_ADDED] + // - - - - - - - - -/ + + /** The attribute of dateAdded. */ + protected ConditionValue _dateAdded; + + /** + * Get the value of dateAdded. + * + * @return The value of dateAdded. + */ + public ConditionValue getDateAdded() { + if (_dateAdded == null) { + _dateAdded = new ConditionValue(); + } + return _dateAdded; + } + + protected ConditionValue getCValueDateAdded() { + return getDateAdded(); + } + + + /** + * Add order-by of dateAdded as ASC. + * + * @return this. (NotNull) + */ + public BsNewslettersCQ addOrderBy_DateAdded_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_DATE_ADDED), null, true);return this; + } + + /** + * Add order-by of dateAdded as DESC. + * + * @return this. (NotNull) + */ + public BsNewslettersCQ addOrderBy_DateAdded_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_DATE_ADDED), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [DATE_SENT] + // - - - - - - - - -/ + + /** The attribute of dateSent. */ + protected ConditionValue _dateSent; + + /** + * Get the value of dateSent. + * + * @return The value of dateSent. + */ + public ConditionValue getDateSent() { + if (_dateSent == null) { + _dateSent = new ConditionValue(); + } + return _dateSent; + } + + protected ConditionValue getCValueDateSent() { + return getDateSent(); + } + + + /** + * Add order-by of dateSent as ASC. + * + * @return this. (NotNull) + */ + public BsNewslettersCQ addOrderBy_DateSent_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_DATE_SENT), null, true);return this; + } + + /** + * Add order-by of dateSent as DESC. + * + * @return this. (NotNull) + */ + public BsNewslettersCQ addOrderBy_DateSent_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_DATE_SENT), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [STATUS] + // - - - - - - - - -/ + + /** The attribute of status. */ + protected ConditionValue _status; + + /** + * Get the value of status. + * + * @return The value of status. + */ + public ConditionValue getStatus() { + if (_status == null) { + _status = new ConditionValue(); + } + return _status; + } + + protected ConditionValue getCValueStatus() { + return getStatus(); + } + + + /** + * Add order-by of status as ASC. + * + * @return this. (NotNull) + */ + public BsNewslettersCQ addOrderBy_Status_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_STATUS), null, true);return this; + } + + /** + * Add order-by of status as DESC. + * + * @return this. (NotNull) + */ + public BsNewslettersCQ addOrderBy_Status_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_STATUS), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [LOCKED] + // - - - - - - - - -/ + + /** The attribute of locked. */ + protected ConditionValue _locked; + + /** + * Get the value of locked. + * + * @return The value of locked. + */ + public ConditionValue getLocked() { + if (_locked == null) { + _locked = new ConditionValue(); + } + return _locked; + } + + protected ConditionValue getCValueLocked() { + return getLocked(); + } + + + /** + * Add order-by of locked as ASC. + * + * @return this. (NotNull) + */ + public BsNewslettersCQ addOrderBy_Locked_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_LOCKED), null, true);return this; + } + + /** + * Add order-by of locked as DESC. + * + * @return this. (NotNull) + */ + public BsNewslettersCQ addOrderBy_Locked_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_LOCKED), null, false);return this; + } + + // =================================================================================== + // Union Query + // =========== + protected void reflectRelationOnUnionQuery(ConditionQuery baseQueryAsSuper, ConditionQuery unionQueryAsSuper) { + final NewslettersCQ baseQuery = (NewslettersCQ)baseQueryAsSuper; + final NewslettersCQ unionQuery = (NewslettersCQ)unionQueryAsSuper; + + } + + // =================================================================================== + // Foreign Query + // ============= + + +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/BsOrdersCQ.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/BsOrdersCQ.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/BsOrdersCQ.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,2600 @@ + +package jp.sf.pal.pompei.cbean.cq.bs; + +import jp.sf.pal.pompei.cbean.cq.*; + +import jp.sf.pal.pompei.allcommon.cbean.*; +import jp.sf.pal.pompei.allcommon.cbean.ckey.*; +import jp.sf.pal.pompei.allcommon.cbean.cvalue.ConditionValue; +import jp.sf.pal.pompei.allcommon.cbean.sqlclause.SqlClause; +import jp.sf.pal.pompei.cbean.cq.ciq.*; + +/** + * The condition-query of ORDERS. + * + * @author DBFlute(AutoGenerator) + */ +public class BsOrdersCQ extends AbstractBsOrdersCQ { + + // =================================================================================== + // Attribute + // ========= + /** Corresponding inline query. */ + protected OrdersCIQ _inlineQuery; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param childQuery Child query as abstract class. (Nullable: If null, this is base instance.) + * @param sqlClause SQL clause instance. (NotNull) + * @param aliasName My alias name. (NotNull) + * @param nestLevel Nest level. + */ + public BsOrdersCQ(ConditionQuery childQuery, SqlClause sqlClause, String aliasName, int nestLevel) { + super(childQuery, sqlClause, aliasName, nestLevel); + } + + // =================================================================================== + // Inline + // ====== + /** + * Get inline query. + * + * @return Inline query. (NotNull) + */ + public OrdersCIQ inline() { + if (_inlineQuery == null) { + _inlineQuery = new OrdersCIQ(getChildQuery(), getSqlClause(), getAliasName(), getNestLevel(), this); + } + return _inlineQuery; + } + + // =================================================================================== + // Include-as-Mine + // =============== + + /** + * Include select-column of ordersId as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_OrdersId() { + registerIncludedSelectColumn("OrdersId", getRealColumnName("ORDERS_ID")); + } + + /** + * Include select-column of ordersId as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_OrdersId(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("ORDERS_ID")); + } + + /** + * Include select-column of customersId as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_CustomersId() { + registerIncludedSelectColumn("CustomersId", getRealColumnName("CUSTOMERS_ID")); + } + + /** + * Include select-column of customersId as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_CustomersId(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("CUSTOMERS_ID")); + } + + /** + * Include select-column of customersName as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_CustomersName() { + registerIncludedSelectColumn("CustomersName", getRealColumnName("CUSTOMERS_NAME")); + } + + /** + * Include select-column of customersName as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_CustomersName(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("CUSTOMERS_NAME")); + } + + /** + * Include select-column of customersCompany as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_CustomersCompany() { + registerIncludedSelectColumn("CustomersCompany", getRealColumnName("CUSTOMERS_COMPANY")); + } + + /** + * Include select-column of customersCompany as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_CustomersCompany(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("CUSTOMERS_COMPANY")); + } + + /** + * Include select-column of customersStreetAddress as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_CustomersStreetAddress() { + registerIncludedSelectColumn("CustomersStreetAddress", getRealColumnName("CUSTOMERS_STREET_ADDRESS")); + } + + /** + * Include select-column of customersStreetAddress as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_CustomersStreetAddress(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("CUSTOMERS_STREET_ADDRESS")); + } + + /** + * Include select-column of customersSuburb as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_CustomersSuburb() { + registerIncludedSelectColumn("CustomersSuburb", getRealColumnName("CUSTOMERS_SUBURB")); + } + + /** + * Include select-column of customersSuburb as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_CustomersSuburb(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("CUSTOMERS_SUBURB")); + } + + /** + * Include select-column of customersCity as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_CustomersCity() { + registerIncludedSelectColumn("CustomersCity", getRealColumnName("CUSTOMERS_CITY")); + } + + /** + * Include select-column of customersCity as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_CustomersCity(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("CUSTOMERS_CITY")); + } + + /** + * Include select-column of customersPostcode as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_CustomersPostcode() { + registerIncludedSelectColumn("CustomersPostcode", getRealColumnName("CUSTOMERS_POSTCODE")); + } + + /** + * Include select-column of customersPostcode as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_CustomersPostcode(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("CUSTOMERS_POSTCODE")); + } + + /** + * Include select-column of customersState as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_CustomersState() { + registerIncludedSelectColumn("CustomersState", getRealColumnName("CUSTOMERS_STATE")); + } + + /** + * Include select-column of customersState as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_CustomersState(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("CUSTOMERS_STATE")); + } + + /** + * Include select-column of customersCountry as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_CustomersCountry() { + registerIncludedSelectColumn("CustomersCountry", getRealColumnName("CUSTOMERS_COUNTRY")); + } + + /** + * Include select-column of customersCountry as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_CustomersCountry(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("CUSTOMERS_COUNTRY")); + } + + /** + * Include select-column of customersTelephone as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_CustomersTelephone() { + registerIncludedSelectColumn("CustomersTelephone", getRealColumnName("CUSTOMERS_TELEPHONE")); + } + + /** + * Include select-column of customersTelephone as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_CustomersTelephone(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("CUSTOMERS_TELEPHONE")); + } + + /** + * Include select-column of customersEmailAddress as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_CustomersEmailAddress() { + registerIncludedSelectColumn("CustomersEmailAddress", getRealColumnName("CUSTOMERS_EMAIL_ADDRESS")); + } + + /** + * Include select-column of customersEmailAddress as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_CustomersEmailAddress(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("CUSTOMERS_EMAIL_ADDRESS")); + } + + /** + * Include select-column of customersAddressFormatId as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_CustomersAddressFormatId() { + registerIncludedSelectColumn("CustomersAddressFormatId", getRealColumnName("CUSTOMERS_ADDRESS_FORMAT_ID")); + } + + /** + * Include select-column of customersAddressFormatId as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_CustomersAddressFormatId(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("CUSTOMERS_ADDRESS_FORMAT_ID")); + } + + /** + * Include select-column of deliveryName as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_DeliveryName() { + registerIncludedSelectColumn("DeliveryName", getRealColumnName("DELIVERY_NAME")); + } + + /** + * Include select-column of deliveryName as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_DeliveryName(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("DELIVERY_NAME")); + } + + /** + * Include select-column of deliveryCompany as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_DeliveryCompany() { + registerIncludedSelectColumn("DeliveryCompany", getRealColumnName("DELIVERY_COMPANY")); + } + + /** + * Include select-column of deliveryCompany as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_DeliveryCompany(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("DELIVERY_COMPANY")); + } + + /** + * Include select-column of deliveryStreetAddress as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_DeliveryStreetAddress() { + registerIncludedSelectColumn("DeliveryStreetAddress", getRealColumnName("DELIVERY_STREET_ADDRESS")); + } + + /** + * Include select-column of deliveryStreetAddress as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_DeliveryStreetAddress(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("DELIVERY_STREET_ADDRESS")); + } + + /** + * Include select-column of deliverySuburb as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_DeliverySuburb() { + registerIncludedSelectColumn("DeliverySuburb", getRealColumnName("DELIVERY_SUBURB")); + } + + /** + * Include select-column of deliverySuburb as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_DeliverySuburb(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("DELIVERY_SUBURB")); + } + + /** + * Include select-column of deliveryCity as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_DeliveryCity() { + registerIncludedSelectColumn("DeliveryCity", getRealColumnName("DELIVERY_CITY")); + } + + /** + * Include select-column of deliveryCity as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_DeliveryCity(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("DELIVERY_CITY")); + } + + /** + * Include select-column of deliveryPostcode as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_DeliveryPostcode() { + registerIncludedSelectColumn("DeliveryPostcode", getRealColumnName("DELIVERY_POSTCODE")); + } + + /** + * Include select-column of deliveryPostcode as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_DeliveryPostcode(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("DELIVERY_POSTCODE")); + } + + /** + * Include select-column of deliveryState as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_DeliveryState() { + registerIncludedSelectColumn("DeliveryState", getRealColumnName("DELIVERY_STATE")); + } + + /** + * Include select-column of deliveryState as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_DeliveryState(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("DELIVERY_STATE")); + } + + /** + * Include select-column of deliveryCountry as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_DeliveryCountry() { + registerIncludedSelectColumn("DeliveryCountry", getRealColumnName("DELIVERY_COUNTRY")); + } + + /** + * Include select-column of deliveryCountry as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_DeliveryCountry(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("DELIVERY_COUNTRY")); + } + + /** + * Include select-column of deliveryAddressFormatId as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_DeliveryAddressFormatId() { + registerIncludedSelectColumn("DeliveryAddressFormatId", getRealColumnName("DELIVERY_ADDRESS_FORMAT_ID")); + } + + /** + * Include select-column of deliveryAddressFormatId as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_DeliveryAddressFormatId(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("DELIVERY_ADDRESS_FORMAT_ID")); + } + + /** + * Include select-column of billingName as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_BillingName() { + registerIncludedSelectColumn("BillingName", getRealColumnName("BILLING_NAME")); + } + + /** + * Include select-column of billingName as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_BillingName(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("BILLING_NAME")); + } + + /** + * Include select-column of billingCompany as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_BillingCompany() { + registerIncludedSelectColumn("BillingCompany", getRealColumnName("BILLING_COMPANY")); + } + + /** + * Include select-column of billingCompany as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_BillingCompany(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("BILLING_COMPANY")); + } + + /** + * Include select-column of billingStreetAddress as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_BillingStreetAddress() { + registerIncludedSelectColumn("BillingStreetAddress", getRealColumnName("BILLING_STREET_ADDRESS")); + } + + /** + * Include select-column of billingStreetAddress as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_BillingStreetAddress(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("BILLING_STREET_ADDRESS")); + } + + /** + * Include select-column of billingSuburb as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_BillingSuburb() { + registerIncludedSelectColumn("BillingSuburb", getRealColumnName("BILLING_SUBURB")); + } + + /** + * Include select-column of billingSuburb as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_BillingSuburb(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("BILLING_SUBURB")); + } + + /** + * Include select-column of billingCity as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_BillingCity() { + registerIncludedSelectColumn("BillingCity", getRealColumnName("BILLING_CITY")); + } + + /** + * Include select-column of billingCity as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_BillingCity(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("BILLING_CITY")); + } + + /** + * Include select-column of billingPostcode as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_BillingPostcode() { + registerIncludedSelectColumn("BillingPostcode", getRealColumnName("BILLING_POSTCODE")); + } + + /** + * Include select-column of billingPostcode as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_BillingPostcode(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("BILLING_POSTCODE")); + } + + /** + * Include select-column of billingState as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_BillingState() { + registerIncludedSelectColumn("BillingState", getRealColumnName("BILLING_STATE")); + } + + /** + * Include select-column of billingState as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_BillingState(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("BILLING_STATE")); + } + + /** + * Include select-column of billingCountry as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_BillingCountry() { + registerIncludedSelectColumn("BillingCountry", getRealColumnName("BILLING_COUNTRY")); + } + + /** + * Include select-column of billingCountry as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_BillingCountry(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("BILLING_COUNTRY")); + } + + /** + * Include select-column of billingAddressFormatId as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_BillingAddressFormatId() { + registerIncludedSelectColumn("BillingAddressFormatId", getRealColumnName("BILLING_ADDRESS_FORMAT_ID")); + } + + /** + * Include select-column of billingAddressFormatId as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_BillingAddressFormatId(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("BILLING_ADDRESS_FORMAT_ID")); + } + + /** + * Include select-column of paymentMethod as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_PaymentMethod() { + registerIncludedSelectColumn("PaymentMethod", getRealColumnName("PAYMENT_METHOD")); + } + + /** + * Include select-column of paymentMethod as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_PaymentMethod(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("PAYMENT_METHOD")); + } + + /** + * Include select-column of ccType as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_CcType() { + registerIncludedSelectColumn("CcType", getRealColumnName("CC_TYPE")); + } + + /** + * Include select-column of ccType as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_CcType(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("CC_TYPE")); + } + + /** + * Include select-column of ccOwner as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_CcOwner() { + registerIncludedSelectColumn("CcOwner", getRealColumnName("CC_OWNER")); + } + + /** + * Include select-column of ccOwner as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_CcOwner(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("CC_OWNER")); + } + + /** + * Include select-column of ccNumber as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_CcNumber() { + registerIncludedSelectColumn("CcNumber", getRealColumnName("CC_NUMBER")); + } + + /** + * Include select-column of ccNumber as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_CcNumber(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("CC_NUMBER")); + } + + /** + * Include select-column of ccExpires as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_CcExpires() { + registerIncludedSelectColumn("CcExpires", getRealColumnName("CC_EXPIRES")); + } + + /** + * Include select-column of ccExpires as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_CcExpires(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("CC_EXPIRES")); + } + + /** + * Include select-column of lastModified as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_LastModified() { + registerIncludedSelectColumn("LastModified", getRealColumnName("LAST_MODIFIED")); + } + + /** + * Include select-column of lastModified as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_LastModified(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("LAST_MODIFIED")); + } + + /** + * Include select-column of datePurchased as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_DatePurchased() { + registerIncludedSelectColumn("DatePurchased", getRealColumnName("DATE_PURCHASED")); + } + + /** + * Include select-column of datePurchased as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_DatePurchased(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("DATE_PURCHASED")); + } + + /** + * Include select-column of ordersStatus as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_OrdersStatus() { + registerIncludedSelectColumn("OrdersStatus", getRealColumnName("ORDERS_STATUS")); + } + + /** + * Include select-column of ordersStatus as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_OrdersStatus(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("ORDERS_STATUS")); + } + + /** + * Include select-column of ordersDateFinished as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_OrdersDateFinished() { + registerIncludedSelectColumn("OrdersDateFinished", getRealColumnName("ORDERS_DATE_FINISHED")); + } + + /** + * Include select-column of ordersDateFinished as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_OrdersDateFinished(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("ORDERS_DATE_FINISHED")); + } + + /** + * Include select-column of currency as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_Currency() { + registerIncludedSelectColumn("Currency", getRealColumnName("CURRENCY")); + } + + /** + * Include select-column of currency as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_Currency(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("CURRENCY")); + } + + /** + * Include select-column of currencyValue as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_CurrencyValue() { + registerIncludedSelectColumn("CurrencyValue", getRealColumnName("CURRENCY_VALUE")); + } + + /** + * Include select-column of currencyValue as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_CurrencyValue(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("CURRENCY_VALUE")); + } + + // =================================================================================== + // Query + // ===== + // /* * * * * * * * * * * * * * * * * * * * * * * + // MyTable = [ORDERS] + // * * * * * * * * */ + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [ORDERS_ID] + // - - - - - - - - -/ + + /** The attribute of ordersId. */ + protected ConditionValue _ordersId; + + /** + * Get the value of ordersId. + * + * @return The value of ordersId. + */ + public ConditionValue getOrdersId() { + if (_ordersId == null) { + _ordersId = new ConditionValue(); + } + return _ordersId; + } + + protected ConditionValue getCValueOrdersId() { + return getOrdersId(); + } + + + /** + * Add order-by of ordersId as ASC. + * + * @return this. (NotNull) + */ + public BsOrdersCQ addOrderBy_OrdersId_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_ORDERS_ID), null, true);return this; + } + + /** + * Add order-by of ordersId as DESC. + * + * @return this. (NotNull) + */ + public BsOrdersCQ addOrderBy_OrdersId_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_ORDERS_ID), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [CUSTOMERS_ID] + // - - - - - - - - -/ + + /** The attribute of customersId. */ + protected ConditionValue _customersId; + + /** + * Get the value of customersId. + * + * @return The value of customersId. + */ + public ConditionValue getCustomersId() { + if (_customersId == null) { + _customersId = new ConditionValue(); + } + return _customersId; + } + + protected ConditionValue getCValueCustomersId() { + return getCustomersId(); + } + + + /** + * Add order-by of customersId as ASC. + * + * @return this. (NotNull) + */ + public BsOrdersCQ addOrderBy_CustomersId_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_CUSTOMERS_ID), null, true);return this; + } + + /** + * Add order-by of customersId as DESC. + * + * @return this. (NotNull) + */ + public BsOrdersCQ addOrderBy_CustomersId_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_CUSTOMERS_ID), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [CUSTOMERS_NAME] + // - - - - - - - - -/ + + /** The attribute of customersName. */ + protected ConditionValue _customersName; + + /** + * Get the value of customersName. + * + * @return The value of customersName. + */ + public ConditionValue getCustomersName() { + if (_customersName == null) { + _customersName = new ConditionValue(); + } + return _customersName; + } + + protected ConditionValue getCValueCustomersName() { + return getCustomersName(); + } + + + /** + * Add order-by of customersName as ASC. + * + * @return this. (NotNull) + */ + public BsOrdersCQ addOrderBy_CustomersName_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_CUSTOMERS_NAME), null, true);return this; + } + + /** + * Add order-by of customersName as DESC. + * + * @return this. (NotNull) + */ + public BsOrdersCQ addOrderBy_CustomersName_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_CUSTOMERS_NAME), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [CUSTOMERS_COMPANY] + // - - - - - - - - -/ + + /** The attribute of customersCompany. */ + protected ConditionValue _customersCompany; + + /** + * Get the value of customersCompany. + * + * @return The value of customersCompany. + */ + public ConditionValue getCustomersCompany() { + if (_customersCompany == null) { + _customersCompany = new ConditionValue(); + } + return _customersCompany; + } + + protected ConditionValue getCValueCustomersCompany() { + return getCustomersCompany(); + } + + + /** + * Add order-by of customersCompany as ASC. + * + * @return this. (NotNull) + */ + public BsOrdersCQ addOrderBy_CustomersCompany_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_CUSTOMERS_COMPANY), null, true);return this; + } + + /** + * Add order-by of customersCompany as DESC. + * + * @return this. (NotNull) + */ + public BsOrdersCQ addOrderBy_CustomersCompany_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_CUSTOMERS_COMPANY), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [CUSTOMERS_STREET_ADDRESS] + // - - - - - - - - -/ + + /** The attribute of customersStreetAddress. */ + protected ConditionValue _customersStreetAddress; + + /** + * Get the value of customersStreetAddress. + * + * @return The value of customersStreetAddress. + */ + public ConditionValue getCustomersStreetAddress() { + if (_customersStreetAddress == null) { + _customersStreetAddress = new ConditionValue(); + } + return _customersStreetAddress; + } + + protected ConditionValue getCValueCustomersStreetAddress() { + return getCustomersStreetAddress(); + } + + + /** + * Add order-by of customersStreetAddress as ASC. + * + * @return this. (NotNull) + */ + public BsOrdersCQ addOrderBy_CustomersStreetAddress_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_CUSTOMERS_STREET_ADDRESS), null, true);return this; + } + + /** + * Add order-by of customersStreetAddress as DESC. + * + * @return this. (NotNull) + */ + public BsOrdersCQ addOrderBy_CustomersStreetAddress_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_CUSTOMERS_STREET_ADDRESS), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [CUSTOMERS_SUBURB] + // - - - - - - - - -/ + + /** The attribute of customersSuburb. */ + protected ConditionValue _customersSuburb; + + /** + * Get the value of customersSuburb. + * + * @return The value of customersSuburb. + */ + public ConditionValue getCustomersSuburb() { + if (_customersSuburb == null) { + _customersSuburb = new ConditionValue(); + } + return _customersSuburb; + } + + protected ConditionValue getCValueCustomersSuburb() { + return getCustomersSuburb(); + } + + + /** + * Add order-by of customersSuburb as ASC. + * + * @return this. (NotNull) + */ + public BsOrdersCQ addOrderBy_CustomersSuburb_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_CUSTOMERS_SUBURB), null, true);return this; + } + + /** + * Add order-by of customersSuburb as DESC. + * + * @return this. (NotNull) + */ + public BsOrdersCQ addOrderBy_CustomersSuburb_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_CUSTOMERS_SUBURB), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [CUSTOMERS_CITY] + // - - - - - - - - -/ + + /** The attribute of customersCity. */ + protected ConditionValue _customersCity; + + /** + * Get the value of customersCity. + * + * @return The value of customersCity. + */ + public ConditionValue getCustomersCity() { + if (_customersCity == null) { + _customersCity = new ConditionValue(); + } + return _customersCity; + } + + protected ConditionValue getCValueCustomersCity() { + return getCustomersCity(); + } + + + /** + * Add order-by of customersCity as ASC. + * + * @return this. (NotNull) + */ + public BsOrdersCQ addOrderBy_CustomersCity_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_CUSTOMERS_CITY), null, true);return this; + } + + /** + * Add order-by of customersCity as DESC. + * + * @return this. (NotNull) + */ + public BsOrdersCQ addOrderBy_CustomersCity_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_CUSTOMERS_CITY), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [CUSTOMERS_POSTCODE] + // - - - - - - - - -/ + + /** The attribute of customersPostcode. */ + protected ConditionValue _customersPostcode; + + /** + * Get the value of customersPostcode. + * + * @return The value of customersPostcode. + */ + public ConditionValue getCustomersPostcode() { + if (_customersPostcode == null) { + _customersPostcode = new ConditionValue(); + } + return _customersPostcode; + } + + protected ConditionValue getCValueCustomersPostcode() { + return getCustomersPostcode(); + } + + + /** + * Add order-by of customersPostcode as ASC. + * + * @return this. (NotNull) + */ + public BsOrdersCQ addOrderBy_CustomersPostcode_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_CUSTOMERS_POSTCODE), null, true);return this; + } + + /** + * Add order-by of customersPostcode as DESC. + * + * @return this. (NotNull) + */ + public BsOrdersCQ addOrderBy_CustomersPostcode_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_CUSTOMERS_POSTCODE), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [CUSTOMERS_STATE] + // - - - - - - - - -/ + + /** The attribute of customersState. */ + protected ConditionValue _customersState; + + /** + * Get the value of customersState. + * + * @return The value of customersState. + */ + public ConditionValue getCustomersState() { + if (_customersState == null) { + _customersState = new ConditionValue(); + } + return _customersState; + } + + protected ConditionValue getCValueCustomersState() { + return getCustomersState(); + } + + + /** + * Add order-by of customersState as ASC. + * + * @return this. (NotNull) + */ + public BsOrdersCQ addOrderBy_CustomersState_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_CUSTOMERS_STATE), null, true);return this; + } + + /** + * Add order-by of customersState as DESC. + * + * @return this. (NotNull) + */ + public BsOrdersCQ addOrderBy_CustomersState_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_CUSTOMERS_STATE), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [CUSTOMERS_COUNTRY] + // - - - - - - - - -/ + + /** The attribute of customersCountry. */ + protected ConditionValue _customersCountry; + + /** + * Get the value of customersCountry. + * + * @return The value of customersCountry. + */ + public ConditionValue getCustomersCountry() { + if (_customersCountry == null) { + _customersCountry = new ConditionValue(); + } + return _customersCountry; + } + + protected ConditionValue getCValueCustomersCountry() { + return getCustomersCountry(); + } + + + /** + * Add order-by of customersCountry as ASC. + * + * @return this. (NotNull) + */ + public BsOrdersCQ addOrderBy_CustomersCountry_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_CUSTOMERS_COUNTRY), null, true);return this; + } + + /** + * Add order-by of customersCountry as DESC. + * + * @return this. (NotNull) + */ + public BsOrdersCQ addOrderBy_CustomersCountry_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_CUSTOMERS_COUNTRY), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [CUSTOMERS_TELEPHONE] + // - - - - - - - - -/ + + /** The attribute of customersTelephone. */ + protected ConditionValue _customersTelephone; + + /** + * Get the value of customersTelephone. + * + * @return The value of customersTelephone. + */ + public ConditionValue getCustomersTelephone() { + if (_customersTelephone == null) { + _customersTelephone = new ConditionValue(); + } + return _customersTelephone; + } + + protected ConditionValue getCValueCustomersTelephone() { + return getCustomersTelephone(); + } + + + /** + * Add order-by of customersTelephone as ASC. + * + * @return this. (NotNull) + */ + public BsOrdersCQ addOrderBy_CustomersTelephone_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_CUSTOMERS_TELEPHONE), null, true);return this; + } + + /** + * Add order-by of customersTelephone as DESC. + * + * @return this. (NotNull) + */ + public BsOrdersCQ addOrderBy_CustomersTelephone_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_CUSTOMERS_TELEPHONE), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [CUSTOMERS_EMAIL_ADDRESS] + // - - - - - - - - -/ + + /** The attribute of customersEmailAddress. */ + protected ConditionValue _customersEmailAddress; + + /** + * Get the value of customersEmailAddress. + * + * @return The value of customersEmailAddress. + */ + public ConditionValue getCustomersEmailAddress() { + if (_customersEmailAddress == null) { + _customersEmailAddress = new ConditionValue(); + } + return _customersEmailAddress; + } + + protected ConditionValue getCValueCustomersEmailAddress() { + return getCustomersEmailAddress(); + } + + + /** + * Add order-by of customersEmailAddress as ASC. + * + * @return this. (NotNull) + */ + public BsOrdersCQ addOrderBy_CustomersEmailAddress_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_CUSTOMERS_EMAIL_ADDRESS), null, true);return this; + } + + /** + * Add order-by of customersEmailAddress as DESC. + * + * @return this. (NotNull) + */ + public BsOrdersCQ addOrderBy_CustomersEmailAddress_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_CUSTOMERS_EMAIL_ADDRESS), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [CUSTOMERS_ADDRESS_FORMAT_ID] + // - - - - - - - - -/ + + /** The attribute of customersAddressFormatId. */ + protected ConditionValue _customersAddressFormatId; + + /** + * Get the value of customersAddressFormatId. + * + * @return The value of customersAddressFormatId. + */ + public ConditionValue getCustomersAddressFormatId() { + if (_customersAddressFormatId == null) { + _customersAddressFormatId = new ConditionValue(); + } + return _customersAddressFormatId; + } + + protected ConditionValue getCValueCustomersAddressFormatId() { + return getCustomersAddressFormatId(); + } + + + /** + * Add order-by of customersAddressFormatId as ASC. + * + * @return this. (NotNull) + */ + public BsOrdersCQ addOrderBy_CustomersAddressFormatId_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_CUSTOMERS_ADDRESS_FORMAT_ID), null, true);return this; + } + + /** + * Add order-by of customersAddressFormatId as DESC. + * + * @return this. (NotNull) + */ + public BsOrdersCQ addOrderBy_CustomersAddressFormatId_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_CUSTOMERS_ADDRESS_FORMAT_ID), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [DELIVERY_NAME] + // - - - - - - - - -/ + + /** The attribute of deliveryName. */ + protected ConditionValue _deliveryName; + + /** + * Get the value of deliveryName. + * + * @return The value of deliveryName. + */ + public ConditionValue getDeliveryName() { + if (_deliveryName == null) { + _deliveryName = new ConditionValue(); + } + return _deliveryName; + } + + protected ConditionValue getCValueDeliveryName() { + return getDeliveryName(); + } + + + /** + * Add order-by of deliveryName as ASC. + * + * @return this. (NotNull) + */ + public BsOrdersCQ addOrderBy_DeliveryName_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_DELIVERY_NAME), null, true);return this; + } + + /** + * Add order-by of deliveryName as DESC. + * + * @return this. (NotNull) + */ + public BsOrdersCQ addOrderBy_DeliveryName_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_DELIVERY_NAME), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [DELIVERY_COMPANY] + // - - - - - - - - -/ + + /** The attribute of deliveryCompany. */ + protected ConditionValue _deliveryCompany; + + /** + * Get the value of deliveryCompany. + * + * @return The value of deliveryCompany. + */ + public ConditionValue getDeliveryCompany() { + if (_deliveryCompany == null) { + _deliveryCompany = new ConditionValue(); + } + return _deliveryCompany; + } + + protected ConditionValue getCValueDeliveryCompany() { + return getDeliveryCompany(); + } + + + /** + * Add order-by of deliveryCompany as ASC. + * + * @return this. (NotNull) + */ + public BsOrdersCQ addOrderBy_DeliveryCompany_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_DELIVERY_COMPANY), null, true);return this; + } + + /** + * Add order-by of deliveryCompany as DESC. + * + * @return this. (NotNull) + */ + public BsOrdersCQ addOrderBy_DeliveryCompany_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_DELIVERY_COMPANY), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [DELIVERY_STREET_ADDRESS] + // - - - - - - - - -/ + + /** The attribute of deliveryStreetAddress. */ + protected ConditionValue _deliveryStreetAddress; + + /** + * Get the value of deliveryStreetAddress. + * + * @return The value of deliveryStreetAddress. + */ + public ConditionValue getDeliveryStreetAddress() { + if (_deliveryStreetAddress == null) { + _deliveryStreetAddress = new ConditionValue(); + } + return _deliveryStreetAddress; + } + + protected ConditionValue getCValueDeliveryStreetAddress() { + return getDeliveryStreetAddress(); + } + + + /** + * Add order-by of deliveryStreetAddress as ASC. + * + * @return this. (NotNull) + */ + public BsOrdersCQ addOrderBy_DeliveryStreetAddress_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_DELIVERY_STREET_ADDRESS), null, true);return this; + } + + /** + * Add order-by of deliveryStreetAddress as DESC. + * + * @return this. (NotNull) + */ + public BsOrdersCQ addOrderBy_DeliveryStreetAddress_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_DELIVERY_STREET_ADDRESS), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [DELIVERY_SUBURB] + // - - - - - - - - -/ + + /** The attribute of deliverySuburb. */ + protected ConditionValue _deliverySuburb; + + /** + * Get the value of deliverySuburb. + * + * @return The value of deliverySuburb. + */ + public ConditionValue getDeliverySuburb() { + if (_deliverySuburb == null) { + _deliverySuburb = new ConditionValue(); + } + return _deliverySuburb; + } + + protected ConditionValue getCValueDeliverySuburb() { + return getDeliverySuburb(); + } + + + /** + * Add order-by of deliverySuburb as ASC. + * + * @return this. (NotNull) + */ + public BsOrdersCQ addOrderBy_DeliverySuburb_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_DELIVERY_SUBURB), null, true);return this; + } + + /** + * Add order-by of deliverySuburb as DESC. + * + * @return this. (NotNull) + */ + public BsOrdersCQ addOrderBy_DeliverySuburb_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_DELIVERY_SUBURB), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [DELIVERY_CITY] + // - - - - - - - - -/ + + /** The attribute of deliveryCity. */ + protected ConditionValue _deliveryCity; + + /** + * Get the value of deliveryCity. + * + * @return The value of deliveryCity. + */ + public ConditionValue getDeliveryCity() { + if (_deliveryCity == null) { + _deliveryCity = new ConditionValue(); + } + return _deliveryCity; + } + + protected ConditionValue getCValueDeliveryCity() { + return getDeliveryCity(); + } + + + /** + * Add order-by of deliveryCity as ASC. + * + * @return this. (NotNull) + */ + public BsOrdersCQ addOrderBy_DeliveryCity_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_DELIVERY_CITY), null, true);return this; + } + + /** + * Add order-by of deliveryCity as DESC. + * + * @return this. (NotNull) + */ + public BsOrdersCQ addOrderBy_DeliveryCity_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_DELIVERY_CITY), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [DELIVERY_POSTCODE] + // - - - - - - - - -/ + + /** The attribute of deliveryPostcode. */ + protected ConditionValue _deliveryPostcode; + + /** + * Get the value of deliveryPostcode. + * + * @return The value of deliveryPostcode. + */ + public ConditionValue getDeliveryPostcode() { + if (_deliveryPostcode == null) { + _deliveryPostcode = new ConditionValue(); + } + return _deliveryPostcode; + } + + protected ConditionValue getCValueDeliveryPostcode() { + return getDeliveryPostcode(); + } + + + /** + * Add order-by of deliveryPostcode as ASC. + * + * @return this. (NotNull) + */ + public BsOrdersCQ addOrderBy_DeliveryPostcode_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_DELIVERY_POSTCODE), null, true);return this; + } + + /** + * Add order-by of deliveryPostcode as DESC. + * + * @return this. (NotNull) + */ + public BsOrdersCQ addOrderBy_DeliveryPostcode_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_DELIVERY_POSTCODE), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [DELIVERY_STATE] + // - - - - - - - - -/ + + /** The attribute of deliveryState. */ + protected ConditionValue _deliveryState; + + /** + * Get the value of deliveryState. + * + * @return The value of deliveryState. + */ + public ConditionValue getDeliveryState() { + if (_deliveryState == null) { + _deliveryState = new ConditionValue(); + } + return _deliveryState; + } + + protected ConditionValue getCValueDeliveryState() { + return getDeliveryState(); + } + + + /** + * Add order-by of deliveryState as ASC. + * + * @return this. (NotNull) + */ + public BsOrdersCQ addOrderBy_DeliveryState_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_DELIVERY_STATE), null, true);return this; + } + + /** + * Add order-by of deliveryState as DESC. + * + * @return this. (NotNull) + */ + public BsOrdersCQ addOrderBy_DeliveryState_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_DELIVERY_STATE), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [DELIVERY_COUNTRY] + // - - - - - - - - -/ + + /** The attribute of deliveryCountry. */ + protected ConditionValue _deliveryCountry; + + /** + * Get the value of deliveryCountry. + * + * @return The value of deliveryCountry. + */ + public ConditionValue getDeliveryCountry() { + if (_deliveryCountry == null) { + _deliveryCountry = new ConditionValue(); + } + return _deliveryCountry; + } + + protected ConditionValue getCValueDeliveryCountry() { + return getDeliveryCountry(); + } + + + /** + * Add order-by of deliveryCountry as ASC. + * + * @return this. (NotNull) + */ + public BsOrdersCQ addOrderBy_DeliveryCountry_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_DELIVERY_COUNTRY), null, true);return this; + } + + /** + * Add order-by of deliveryCountry as DESC. + * + * @return this. (NotNull) + */ + public BsOrdersCQ addOrderBy_DeliveryCountry_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_DELIVERY_COUNTRY), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [DELIVERY_ADDRESS_FORMAT_ID] + // - - - - - - - - -/ + + /** The attribute of deliveryAddressFormatId. */ + protected ConditionValue _deliveryAddressFormatId; + + /** + * Get the value of deliveryAddressFormatId. + * + * @return The value of deliveryAddressFormatId. + */ + public ConditionValue getDeliveryAddressFormatId() { + if (_deliveryAddressFormatId == null) { + _deliveryAddressFormatId = new ConditionValue(); + } + return _deliveryAddressFormatId; + } + + protected ConditionValue getCValueDeliveryAddressFormatId() { + return getDeliveryAddressFormatId(); + } + + + /** + * Add order-by of deliveryAddressFormatId as ASC. + * + * @return this. (NotNull) + */ + public BsOrdersCQ addOrderBy_DeliveryAddressFormatId_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_DELIVERY_ADDRESS_FORMAT_ID), null, true);return this; + } + + /** + * Add order-by of deliveryAddressFormatId as DESC. + * + * @return this. (NotNull) + */ + public BsOrdersCQ addOrderBy_DeliveryAddressFormatId_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_DELIVERY_ADDRESS_FORMAT_ID), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [BILLING_NAME] + // - - - - - - - - -/ + + /** The attribute of billingName. */ + protected ConditionValue _billingName; + + /** + * Get the value of billingName. + * + * @return The value of billingName. + */ + public ConditionValue getBillingName() { + if (_billingName == null) { + _billingName = new ConditionValue(); + } + return _billingName; + } + + protected ConditionValue getCValueBillingName() { + return getBillingName(); + } + + + /** + * Add order-by of billingName as ASC. + * + * @return this. (NotNull) + */ + public BsOrdersCQ addOrderBy_BillingName_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_BILLING_NAME), null, true);return this; + } + + /** + * Add order-by of billingName as DESC. + * + * @return this. (NotNull) + */ + public BsOrdersCQ addOrderBy_BillingName_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_BILLING_NAME), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [BILLING_COMPANY] + // - - - - - - - - -/ + + /** The attribute of billingCompany. */ + protected ConditionValue _billingCompany; + + /** + * Get the value of billingCompany. + * + * @return The value of billingCompany. + */ + public ConditionValue getBillingCompany() { + if (_billingCompany == null) { + _billingCompany = new ConditionValue(); + } + return _billingCompany; + } + + protected ConditionValue getCValueBillingCompany() { + return getBillingCompany(); + } + + + /** + * Add order-by of billingCompany as ASC. + * + * @return this. (NotNull) + */ + public BsOrdersCQ addOrderBy_BillingCompany_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_BILLING_COMPANY), null, true);return this; + } + + /** + * Add order-by of billingCompany as DESC. + * + * @return this. (NotNull) + */ + public BsOrdersCQ addOrderBy_BillingCompany_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_BILLING_COMPANY), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [BILLING_STREET_ADDRESS] + // - - - - - - - - -/ + + /** The attribute of billingStreetAddress. */ + protected ConditionValue _billingStreetAddress; + + /** + * Get the value of billingStreetAddress. + * + * @return The value of billingStreetAddress. + */ + public ConditionValue getBillingStreetAddress() { + if (_billingStreetAddress == null) { + _billingStreetAddress = new ConditionValue(); + } + return _billingStreetAddress; + } + + protected ConditionValue getCValueBillingStreetAddress() { + return getBillingStreetAddress(); + } + + + /** + * Add order-by of billingStreetAddress as ASC. + * + * @return this. (NotNull) + */ + public BsOrdersCQ addOrderBy_BillingStreetAddress_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_BILLING_STREET_ADDRESS), null, true);return this; + } + + /** + * Add order-by of billingStreetAddress as DESC. + * + * @return this. (NotNull) + */ + public BsOrdersCQ addOrderBy_BillingStreetAddress_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_BILLING_STREET_ADDRESS), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [BILLING_SUBURB] + // - - - - - - - - -/ + + /** The attribute of billingSuburb. */ + protected ConditionValue _billingSuburb; + + /** + * Get the value of billingSuburb. + * + * @return The value of billingSuburb. + */ + public ConditionValue getBillingSuburb() { + if (_billingSuburb == null) { + _billingSuburb = new ConditionValue(); + } + return _billingSuburb; + } + + protected ConditionValue getCValueBillingSuburb() { + return getBillingSuburb(); + } + + + /** + * Add order-by of billingSuburb as ASC. + * + * @return this. (NotNull) + */ + public BsOrdersCQ addOrderBy_BillingSuburb_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_BILLING_SUBURB), null, true);return this; + } + + /** + * Add order-by of billingSuburb as DESC. + * + * @return this. (NotNull) + */ + public BsOrdersCQ addOrderBy_BillingSuburb_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_BILLING_SUBURB), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [BILLING_CITY] + // - - - - - - - - -/ + + /** The attribute of billingCity. */ + protected ConditionValue _billingCity; + + /** + * Get the value of billingCity. + * + * @return The value of billingCity. + */ + public ConditionValue getBillingCity() { + if (_billingCity == null) { + _billingCity = new ConditionValue(); + } + return _billingCity; + } + + protected ConditionValue getCValueBillingCity() { + return getBillingCity(); + } + + + /** + * Add order-by of billingCity as ASC. + * + * @return this. (NotNull) + */ + public BsOrdersCQ addOrderBy_BillingCity_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_BILLING_CITY), null, true);return this; + } + + /** + * Add order-by of billingCity as DESC. + * + * @return this. (NotNull) + */ + public BsOrdersCQ addOrderBy_BillingCity_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_BILLING_CITY), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [BILLING_POSTCODE] + // - - - - - - - - -/ + + /** The attribute of billingPostcode. */ + protected ConditionValue _billingPostcode; + + /** + * Get the value of billingPostcode. + * + * @return The value of billingPostcode. + */ + public ConditionValue getBillingPostcode() { + if (_billingPostcode == null) { + _billingPostcode = new ConditionValue(); + } + return _billingPostcode; + } + + protected ConditionValue getCValueBillingPostcode() { + return getBillingPostcode(); + } + + + /** + * Add order-by of billingPostcode as ASC. + * + * @return this. (NotNull) + */ + public BsOrdersCQ addOrderBy_BillingPostcode_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_BILLING_POSTCODE), null, true);return this; + } + + /** + * Add order-by of billingPostcode as DESC. + * + * @return this. (NotNull) + */ + public BsOrdersCQ addOrderBy_BillingPostcode_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_BILLING_POSTCODE), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [BILLING_STATE] + // - - - - - - - - -/ + + /** The attribute of billingState. */ + protected ConditionValue _billingState; + + /** + * Get the value of billingState. + * + * @return The value of billingState. + */ + public ConditionValue getBillingState() { + if (_billingState == null) { + _billingState = new ConditionValue(); + } + return _billingState; + } + + protected ConditionValue getCValueBillingState() { + return getBillingState(); + } + + + /** + * Add order-by of billingState as ASC. + * + * @return this. (NotNull) + */ + public BsOrdersCQ addOrderBy_BillingState_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_BILLING_STATE), null, true);return this; + } + + /** + * Add order-by of billingState as DESC. + * + * @return this. (NotNull) + */ + public BsOrdersCQ addOrderBy_BillingState_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_BILLING_STATE), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [BILLING_COUNTRY] + // - - - - - - - - -/ + + /** The attribute of billingCountry. */ + protected ConditionValue _billingCountry; + + /** + * Get the value of billingCountry. + * + * @return The value of billingCountry. + */ + public ConditionValue getBillingCountry() { + if (_billingCountry == null) { + _billingCountry = new ConditionValue(); + } + return _billingCountry; + } + + protected ConditionValue getCValueBillingCountry() { + return getBillingCountry(); + } + + + /** + * Add order-by of billingCountry as ASC. + * + * @return this. (NotNull) + */ + public BsOrdersCQ addOrderBy_BillingCountry_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_BILLING_COUNTRY), null, true);return this; + } + + /** + * Add order-by of billingCountry as DESC. + * + * @return this. (NotNull) + */ + public BsOrdersCQ addOrderBy_BillingCountry_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_BILLING_COUNTRY), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [BILLING_ADDRESS_FORMAT_ID] + // - - - - - - - - -/ + + /** The attribute of billingAddressFormatId. */ + protected ConditionValue _billingAddressFormatId; + + /** + * Get the value of billingAddressFormatId. + * + * @return The value of billingAddressFormatId. + */ + public ConditionValue getBillingAddressFormatId() { + if (_billingAddressFormatId == null) { + _billingAddressFormatId = new ConditionValue(); + } + return _billingAddressFormatId; + } + + protected ConditionValue getCValueBillingAddressFormatId() { + return getBillingAddressFormatId(); + } + + + /** + * Add order-by of billingAddressFormatId as ASC. + * + * @return this. (NotNull) + */ + public BsOrdersCQ addOrderBy_BillingAddressFormatId_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_BILLING_ADDRESS_FORMAT_ID), null, true);return this; + } + + /** + * Add order-by of billingAddressFormatId as DESC. + * + * @return this. (NotNull) + */ + public BsOrdersCQ addOrderBy_BillingAddressFormatId_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_BILLING_ADDRESS_FORMAT_ID), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [PAYMENT_METHOD] + // - - - - - - - - -/ + + /** The attribute of paymentMethod. */ + protected ConditionValue _paymentMethod; + + /** + * Get the value of paymentMethod. + * + * @return The value of paymentMethod. + */ + public ConditionValue getPaymentMethod() { + if (_paymentMethod == null) { + _paymentMethod = new ConditionValue(); + } + return _paymentMethod; + } + + protected ConditionValue getCValuePaymentMethod() { + return getPaymentMethod(); + } + + + /** + * Add order-by of paymentMethod as ASC. + * + * @return this. (NotNull) + */ + public BsOrdersCQ addOrderBy_PaymentMethod_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_PAYMENT_METHOD), null, true);return this; + } + + /** + * Add order-by of paymentMethod as DESC. + * + * @return this. (NotNull) + */ + public BsOrdersCQ addOrderBy_PaymentMethod_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_PAYMENT_METHOD), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [CC_TYPE] + // - - - - - - - - -/ + + /** The attribute of ccType. */ + protected ConditionValue _ccType; + + /** + * Get the value of ccType. + * + * @return The value of ccType. + */ + public ConditionValue getCcType() { + if (_ccType == null) { + _ccType = new ConditionValue(); + } + return _ccType; + } + + protected ConditionValue getCValueCcType() { + return getCcType(); + } + + + /** + * Add order-by of ccType as ASC. + * + * @return this. (NotNull) + */ + public BsOrdersCQ addOrderBy_CcType_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_CC_TYPE), null, true);return this; + } + + /** + * Add order-by of ccType as DESC. + * + * @return this. (NotNull) + */ + public BsOrdersCQ addOrderBy_CcType_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_CC_TYPE), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [CC_OWNER] + // - - - - - - - - -/ + + /** The attribute of ccOwner. */ + protected ConditionValue _ccOwner; + + /** + * Get the value of ccOwner. + * + * @return The value of ccOwner. + */ + public ConditionValue getCcOwner() { + if (_ccOwner == null) { + _ccOwner = new ConditionValue(); + } + return _ccOwner; + } + + protected ConditionValue getCValueCcOwner() { + return getCcOwner(); + } + + + /** + * Add order-by of ccOwner as ASC. + * + * @return this. (NotNull) + */ + public BsOrdersCQ addOrderBy_CcOwner_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_CC_OWNER), null, true);return this; + } + + /** + * Add order-by of ccOwner as DESC. + * + * @return this. (NotNull) + */ + public BsOrdersCQ addOrderBy_CcOwner_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_CC_OWNER), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [CC_NUMBER] + // - - - - - - - - -/ + + /** The attribute of ccNumber. */ + protected ConditionValue _ccNumber; + + /** + * Get the value of ccNumber. + * + * @return The value of ccNumber. + */ + public ConditionValue getCcNumber() { + if (_ccNumber == null) { + _ccNumber = new ConditionValue(); + } + return _ccNumber; + } + + protected ConditionValue getCValueCcNumber() { + return getCcNumber(); + } + + + /** + * Add order-by of ccNumber as ASC. + * + * @return this. (NotNull) + */ + public BsOrdersCQ addOrderBy_CcNumber_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_CC_NUMBER), null, true);return this; + } + + /** + * Add order-by of ccNumber as DESC. + * + * @return this. (NotNull) + */ + public BsOrdersCQ addOrderBy_CcNumber_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_CC_NUMBER), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [CC_EXPIRES] + // - - - - - - - - -/ + + /** The attribute of ccExpires. */ + protected ConditionValue _ccExpires; + + /** + * Get the value of ccExpires. + * + * @return The value of ccExpires. + */ + public ConditionValue getCcExpires() { + if (_ccExpires == null) { + _ccExpires = new ConditionValue(); + } + return _ccExpires; + } + + protected ConditionValue getCValueCcExpires() { + return getCcExpires(); + } + + + /** + * Add order-by of ccExpires as ASC. + * + * @return this. (NotNull) + */ + public BsOrdersCQ addOrderBy_CcExpires_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_CC_EXPIRES), null, true);return this; + } + + /** + * Add order-by of ccExpires as DESC. + * + * @return this. (NotNull) + */ + public BsOrdersCQ addOrderBy_CcExpires_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_CC_EXPIRES), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [LAST_MODIFIED] + // - - - - - - - - -/ + + /** The attribute of lastModified. */ + protected ConditionValue _lastModified; + + /** + * Get the value of lastModified. + * + * @return The value of lastModified. + */ + public ConditionValue getLastModified() { + if (_lastModified == null) { + _lastModified = new ConditionValue(); + } + return _lastModified; + } + + protected ConditionValue getCValueLastModified() { + return getLastModified(); + } + + + /** + * Add order-by of lastModified as ASC. + * + * @return this. (NotNull) + */ + public BsOrdersCQ addOrderBy_LastModified_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_LAST_MODIFIED), null, true);return this; + } + + /** + * Add order-by of lastModified as DESC. + * + * @return this. (NotNull) + */ + public BsOrdersCQ addOrderBy_LastModified_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_LAST_MODIFIED), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [DATE_PURCHASED] + // - - - - - - - - -/ + + /** The attribute of datePurchased. */ + protected ConditionValue _datePurchased; + + /** + * Get the value of datePurchased. + * + * @return The value of datePurchased. + */ + public ConditionValue getDatePurchased() { + if (_datePurchased == null) { + _datePurchased = new ConditionValue(); + } + return _datePurchased; + } + + protected ConditionValue getCValueDatePurchased() { + return getDatePurchased(); + } + + + /** + * Add order-by of datePurchased as ASC. + * + * @return this. (NotNull) + */ + public BsOrdersCQ addOrderBy_DatePurchased_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_DATE_PURCHASED), null, true);return this; + } + + /** + * Add order-by of datePurchased as DESC. + * + * @return this. (NotNull) + */ + public BsOrdersCQ addOrderBy_DatePurchased_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_DATE_PURCHASED), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [ORDERS_STATUS] + // - - - - - - - - -/ + + /** The attribute of ordersStatus. */ + protected ConditionValue _ordersStatus; + + /** + * Get the value of ordersStatus. + * + * @return The value of ordersStatus. + */ + public ConditionValue getOrdersStatus() { + if (_ordersStatus == null) { + _ordersStatus = new ConditionValue(); + } + return _ordersStatus; + } + + protected ConditionValue getCValueOrdersStatus() { + return getOrdersStatus(); + } + + + /** + * Add order-by of ordersStatus as ASC. + * + * @return this. (NotNull) + */ + public BsOrdersCQ addOrderBy_OrdersStatus_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_ORDERS_STATUS), null, true);return this; + } + + /** + * Add order-by of ordersStatus as DESC. + * + * @return this. (NotNull) + */ + public BsOrdersCQ addOrderBy_OrdersStatus_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_ORDERS_STATUS), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [ORDERS_DATE_FINISHED] + // - - - - - - - - -/ + + /** The attribute of ordersDateFinished. */ + protected ConditionValue _ordersDateFinished; + + /** + * Get the value of ordersDateFinished. + * + * @return The value of ordersDateFinished. + */ + public ConditionValue getOrdersDateFinished() { + if (_ordersDateFinished == null) { + _ordersDateFinished = new ConditionValue(); + } + return _ordersDateFinished; + } + + protected ConditionValue getCValueOrdersDateFinished() { + return getOrdersDateFinished(); + } + + + /** + * Add order-by of ordersDateFinished as ASC. + * + * @return this. (NotNull) + */ + public BsOrdersCQ addOrderBy_OrdersDateFinished_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_ORDERS_DATE_FINISHED), null, true);return this; + } + + /** + * Add order-by of ordersDateFinished as DESC. + * + * @return this. (NotNull) + */ + public BsOrdersCQ addOrderBy_OrdersDateFinished_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_ORDERS_DATE_FINISHED), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [CURRENCY] + // - - - - - - - - -/ + + /** The attribute of currency. */ + protected ConditionValue _currency; + + /** + * Get the value of currency. + * + * @return The value of currency. + */ + public ConditionValue getCurrency() { + if (_currency == null) { + _currency = new ConditionValue(); + } + return _currency; + } + + protected ConditionValue getCValueCurrency() { + return getCurrency(); + } + + + /** + * Add order-by of currency as ASC. + * + * @return this. (NotNull) + */ + public BsOrdersCQ addOrderBy_Currency_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_CURRENCY), null, true);return this; + } + + /** + * Add order-by of currency as DESC. + * + * @return this. (NotNull) + */ + public BsOrdersCQ addOrderBy_Currency_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_CURRENCY), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [CURRENCY_VALUE] + // - - - - - - - - -/ + + /** The attribute of currencyValue. */ + protected ConditionValue _currencyValue; + + /** + * Get the value of currencyValue. + * + * @return The value of currencyValue. + */ + public ConditionValue getCurrencyValue() { + if (_currencyValue == null) { + _currencyValue = new ConditionValue(); + } + return _currencyValue; + } + + protected ConditionValue getCValueCurrencyValue() { + return getCurrencyValue(); + } + + + /** + * Add order-by of currencyValue as ASC. + * + * @return this. (NotNull) + */ + public BsOrdersCQ addOrderBy_CurrencyValue_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_CURRENCY_VALUE), null, true);return this; + } + + /** + * Add order-by of currencyValue as DESC. + * + * @return this. (NotNull) + */ + public BsOrdersCQ addOrderBy_CurrencyValue_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_CURRENCY_VALUE), null, false);return this; + } + + // =================================================================================== + // Union Query + // =========== + protected void reflectRelationOnUnionQuery(ConditionQuery baseQueryAsSuper, ConditionQuery unionQueryAsSuper) { + final OrdersCQ baseQuery = (OrdersCQ)baseQueryAsSuper; + final OrdersCQ unionQuery = (OrdersCQ)unionQueryAsSuper; + + } + + // =================================================================================== + // Foreign Query + // ============= + + +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/BsOrdersProductsAttributesCQ.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/BsOrdersProductsAttributesCQ.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/BsOrdersProductsAttributesCQ.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,500 @@ + +package jp.sf.pal.pompei.cbean.cq.bs; + +import jp.sf.pal.pompei.cbean.cq.*; + +import jp.sf.pal.pompei.allcommon.cbean.*; +import jp.sf.pal.pompei.allcommon.cbean.ckey.*; +import jp.sf.pal.pompei.allcommon.cbean.cvalue.ConditionValue; +import jp.sf.pal.pompei.allcommon.cbean.sqlclause.SqlClause; +import jp.sf.pal.pompei.cbean.cq.ciq.*; + +/** + * The condition-query of ORDERS_PRODUCTS_ATTRIBUTES. + * + * @author DBFlute(AutoGenerator) + */ +public class BsOrdersProductsAttributesCQ extends AbstractBsOrdersProductsAttributesCQ { + + // =================================================================================== + // Attribute + // ========= + /** Corresponding inline query. */ + protected OrdersProductsAttributesCIQ _inlineQuery; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param childQuery Child query as abstract class. (Nullable: If null, this is base instance.) + * @param sqlClause SQL clause instance. (NotNull) + * @param aliasName My alias name. (NotNull) + * @param nestLevel Nest level. + */ + public BsOrdersProductsAttributesCQ(ConditionQuery childQuery, SqlClause sqlClause, String aliasName, int nestLevel) { + super(childQuery, sqlClause, aliasName, nestLevel); + } + + // =================================================================================== + // Inline + // ====== + /** + * Get inline query. + * + * @return Inline query. (NotNull) + */ + public OrdersProductsAttributesCIQ inline() { + if (_inlineQuery == null) { + _inlineQuery = new OrdersProductsAttributesCIQ(getChildQuery(), getSqlClause(), getAliasName(), getNestLevel(), this); + } + return _inlineQuery; + } + + // =================================================================================== + // Include-as-Mine + // =============== + + /** + * Include select-column of ordersProductsAttributesId as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_OrdersProductsAttributesId() { + registerIncludedSelectColumn("OrdersProductsAttributesId", getRealColumnName("ORDERS_PRODUCTS_ATTRIBUTES_ID")); + } + + /** + * Include select-column of ordersProductsAttributesId as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_OrdersProductsAttributesId(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("ORDERS_PRODUCTS_ATTRIBUTES_ID")); + } + + /** + * Include select-column of ordersId as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_OrdersId() { + registerIncludedSelectColumn("OrdersId", getRealColumnName("ORDERS_ID")); + } + + /** + * Include select-column of ordersId as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_OrdersId(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("ORDERS_ID")); + } + + /** + * Include select-column of ordersProductsId as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_OrdersProductsId() { + registerIncludedSelectColumn("OrdersProductsId", getRealColumnName("ORDERS_PRODUCTS_ID")); + } + + /** + * Include select-column of ordersProductsId as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_OrdersProductsId(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("ORDERS_PRODUCTS_ID")); + } + + /** + * Include select-column of productsOptions as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_ProductsOptions() { + registerIncludedSelectColumn("ProductsOptions", getRealColumnName("PRODUCTS_OPTIONS")); + } + + /** + * Include select-column of productsOptions as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_ProductsOptions(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("PRODUCTS_OPTIONS")); + } + + /** + * Include select-column of productsOptionsValues as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_ProductsOptionsValues() { + registerIncludedSelectColumn("ProductsOptionsValues", getRealColumnName("PRODUCTS_OPTIONS_VALUES")); + } + + /** + * Include select-column of productsOptionsValues as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_ProductsOptionsValues(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("PRODUCTS_OPTIONS_VALUES")); + } + + /** + * Include select-column of optionsValuesPrice as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_OptionsValuesPrice() { + registerIncludedSelectColumn("OptionsValuesPrice", getRealColumnName("OPTIONS_VALUES_PRICE")); + } + + /** + * Include select-column of optionsValuesPrice as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_OptionsValuesPrice(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("OPTIONS_VALUES_PRICE")); + } + + /** + * Include select-column of pricePrefix as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_PricePrefix() { + registerIncludedSelectColumn("PricePrefix", getRealColumnName("PRICE_PREFIX")); + } + + /** + * Include select-column of pricePrefix as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_PricePrefix(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("PRICE_PREFIX")); + } + + // =================================================================================== + // Query + // ===== + // /* * * * * * * * * * * * * * * * * * * * * * * + // MyTable = [ORDERS_PRODUCTS_ATTRIBUTES] + // * * * * * * * * */ + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [ORDERS_PRODUCTS_ATTRIBUTES_ID] + // - - - - - - - - -/ + + /** The attribute of ordersProductsAttributesId. */ + protected ConditionValue _ordersProductsAttributesId; + + /** + * Get the value of ordersProductsAttributesId. + * + * @return The value of ordersProductsAttributesId. + */ + public ConditionValue getOrdersProductsAttributesId() { + if (_ordersProductsAttributesId == null) { + _ordersProductsAttributesId = new ConditionValue(); + } + return _ordersProductsAttributesId; + } + + protected ConditionValue getCValueOrdersProductsAttributesId() { + return getOrdersProductsAttributesId(); + } + + + /** + * Add order-by of ordersProductsAttributesId as ASC. + * + * @return this. (NotNull) + */ + public BsOrdersProductsAttributesCQ addOrderBy_OrdersProductsAttributesId_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_ORDERS_PRODUCTS_ATTRIBUTES_ID), null, true);return this; + } + + /** + * Add order-by of ordersProductsAttributesId as DESC. + * + * @return this. (NotNull) + */ + public BsOrdersProductsAttributesCQ addOrderBy_OrdersProductsAttributesId_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_ORDERS_PRODUCTS_ATTRIBUTES_ID), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [ORDERS_ID] + // - - - - - - - - -/ + + /** The attribute of ordersId. */ + protected ConditionValue _ordersId; + + /** + * Get the value of ordersId. + * + * @return The value of ordersId. + */ + public ConditionValue getOrdersId() { + if (_ordersId == null) { + _ordersId = new ConditionValue(); + } + return _ordersId; + } + + protected ConditionValue getCValueOrdersId() { + return getOrdersId(); + } + + + /** + * Add order-by of ordersId as ASC. + * + * @return this. (NotNull) + */ + public BsOrdersProductsAttributesCQ addOrderBy_OrdersId_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_ORDERS_ID), null, true);return this; + } + + /** + * Add order-by of ordersId as DESC. + * + * @return this. (NotNull) + */ + public BsOrdersProductsAttributesCQ addOrderBy_OrdersId_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_ORDERS_ID), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [ORDERS_PRODUCTS_ID] + // - - - - - - - - -/ + + /** The attribute of ordersProductsId. */ + protected ConditionValue _ordersProductsId; + + /** + * Get the value of ordersProductsId. + * + * @return The value of ordersProductsId. + */ + public ConditionValue getOrdersProductsId() { + if (_ordersProductsId == null) { + _ordersProductsId = new ConditionValue(); + } + return _ordersProductsId; + } + + protected ConditionValue getCValueOrdersProductsId() { + return getOrdersProductsId(); + } + + + /** + * Add order-by of ordersProductsId as ASC. + * + * @return this. (NotNull) + */ + public BsOrdersProductsAttributesCQ addOrderBy_OrdersProductsId_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_ORDERS_PRODUCTS_ID), null, true);return this; + } + + /** + * Add order-by of ordersProductsId as DESC. + * + * @return this. (NotNull) + */ + public BsOrdersProductsAttributesCQ addOrderBy_OrdersProductsId_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_ORDERS_PRODUCTS_ID), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [PRODUCTS_OPTIONS] + // - - - - - - - - -/ + + /** The attribute of productsOptions. */ + protected ConditionValue _productsOptions; + + /** + * Get the value of productsOptions. + * + * @return The value of productsOptions. + */ + public ConditionValue getProductsOptions() { + if (_productsOptions == null) { + _productsOptions = new ConditionValue(); + } + return _productsOptions; + } + + protected ConditionValue getCValueProductsOptions() { + return getProductsOptions(); + } + + + /** + * Add order-by of productsOptions as ASC. + * + * @return this. (NotNull) + */ + public BsOrdersProductsAttributesCQ addOrderBy_ProductsOptions_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_PRODUCTS_OPTIONS), null, true);return this; + } + + /** + * Add order-by of productsOptions as DESC. + * + * @return this. (NotNull) + */ + public BsOrdersProductsAttributesCQ addOrderBy_ProductsOptions_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_PRODUCTS_OPTIONS), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [PRODUCTS_OPTIONS_VALUES] + // - - - - - - - - -/ + + /** The attribute of productsOptionsValues. */ + protected ConditionValue _productsOptionsValues; + + /** + * Get the value of productsOptionsValues. + * + * @return The value of productsOptionsValues. + */ + public ConditionValue getProductsOptionsValues() { + if (_productsOptionsValues == null) { + _productsOptionsValues = new ConditionValue(); + } + return _productsOptionsValues; + } + + protected ConditionValue getCValueProductsOptionsValues() { + return getProductsOptionsValues(); + } + + + /** + * Add order-by of productsOptionsValues as ASC. + * + * @return this. (NotNull) + */ + public BsOrdersProductsAttributesCQ addOrderBy_ProductsOptionsValues_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_PRODUCTS_OPTIONS_VALUES), null, true);return this; + } + + /** + * Add order-by of productsOptionsValues as DESC. + * + * @return this. (NotNull) + */ + public BsOrdersProductsAttributesCQ addOrderBy_ProductsOptionsValues_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_PRODUCTS_OPTIONS_VALUES), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [OPTIONS_VALUES_PRICE] + // - - - - - - - - -/ + + /** The attribute of optionsValuesPrice. */ + protected ConditionValue _optionsValuesPrice; + + /** + * Get the value of optionsValuesPrice. + * + * @return The value of optionsValuesPrice. + */ + public ConditionValue getOptionsValuesPrice() { + if (_optionsValuesPrice == null) { + _optionsValuesPrice = new ConditionValue(); + } + return _optionsValuesPrice; + } + + protected ConditionValue getCValueOptionsValuesPrice() { + return getOptionsValuesPrice(); + } + + + /** + * Add order-by of optionsValuesPrice as ASC. + * + * @return this. (NotNull) + */ + public BsOrdersProductsAttributesCQ addOrderBy_OptionsValuesPrice_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_OPTIONS_VALUES_PRICE), null, true);return this; + } + + /** + * Add order-by of optionsValuesPrice as DESC. + * + * @return this. (NotNull) + */ + public BsOrdersProductsAttributesCQ addOrderBy_OptionsValuesPrice_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_OPTIONS_VALUES_PRICE), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [PRICE_PREFIX] + // - - - - - - - - -/ + + /** The attribute of pricePrefix. */ + protected ConditionValue _pricePrefix; + + /** + * Get the value of pricePrefix. + * + * @return The value of pricePrefix. + */ + public ConditionValue getPricePrefix() { + if (_pricePrefix == null) { + _pricePrefix = new ConditionValue(); + } + return _pricePrefix; + } + + protected ConditionValue getCValuePricePrefix() { + return getPricePrefix(); + } + + + /** + * Add order-by of pricePrefix as ASC. + * + * @return this. (NotNull) + */ + public BsOrdersProductsAttributesCQ addOrderBy_PricePrefix_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_PRICE_PREFIX), null, true);return this; + } + + /** + * Add order-by of pricePrefix as DESC. + * + * @return this. (NotNull) + */ + public BsOrdersProductsAttributesCQ addOrderBy_PricePrefix_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_PRICE_PREFIX), null, false);return this; + } + + // =================================================================================== + // Union Query + // =========== + protected void reflectRelationOnUnionQuery(ConditionQuery baseQueryAsSuper, ConditionQuery unionQueryAsSuper) { + final OrdersProductsAttributesCQ baseQuery = (OrdersProductsAttributesCQ)baseQueryAsSuper; + final OrdersProductsAttributesCQ unionQuery = (OrdersProductsAttributesCQ)unionQueryAsSuper; + + } + + // =================================================================================== + // Foreign Query + // ============= + + +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/BsOrdersProductsCQ.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/BsOrdersProductsCQ.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/BsOrdersProductsCQ.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,620 @@ + +package jp.sf.pal.pompei.cbean.cq.bs; + +import jp.sf.pal.pompei.cbean.cq.*; + +import jp.sf.pal.pompei.allcommon.cbean.*; +import jp.sf.pal.pompei.allcommon.cbean.ckey.*; +import jp.sf.pal.pompei.allcommon.cbean.cvalue.ConditionValue; +import jp.sf.pal.pompei.allcommon.cbean.sqlclause.SqlClause; +import jp.sf.pal.pompei.cbean.cq.ciq.*; + +/** + * The condition-query of ORDERS_PRODUCTS. + * + * @author DBFlute(AutoGenerator) + */ +public class BsOrdersProductsCQ extends AbstractBsOrdersProductsCQ { + + // =================================================================================== + // Attribute + // ========= + /** Corresponding inline query. */ + protected OrdersProductsCIQ _inlineQuery; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param childQuery Child query as abstract class. (Nullable: If null, this is base instance.) + * @param sqlClause SQL clause instance. (NotNull) + * @param aliasName My alias name. (NotNull) + * @param nestLevel Nest level. + */ + public BsOrdersProductsCQ(ConditionQuery childQuery, SqlClause sqlClause, String aliasName, int nestLevel) { + super(childQuery, sqlClause, aliasName, nestLevel); + } + + // =================================================================================== + // Inline + // ====== + /** + * Get inline query. + * + * @return Inline query. (NotNull) + */ + public OrdersProductsCIQ inline() { + if (_inlineQuery == null) { + _inlineQuery = new OrdersProductsCIQ(getChildQuery(), getSqlClause(), getAliasName(), getNestLevel(), this); + } + return _inlineQuery; + } + + // =================================================================================== + // Include-as-Mine + // =============== + + /** + * Include select-column of ordersProductsId as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_OrdersProductsId() { + registerIncludedSelectColumn("OrdersProductsId", getRealColumnName("ORDERS_PRODUCTS_ID")); + } + + /** + * Include select-column of ordersProductsId as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_OrdersProductsId(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("ORDERS_PRODUCTS_ID")); + } + + /** + * Include select-column of ordersId as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_OrdersId() { + registerIncludedSelectColumn("OrdersId", getRealColumnName("ORDERS_ID")); + } + + /** + * Include select-column of ordersId as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_OrdersId(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("ORDERS_ID")); + } + + /** + * Include select-column of productsId as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_ProductsId() { + registerIncludedSelectColumn("ProductsId", getRealColumnName("PRODUCTS_ID")); + } + + /** + * Include select-column of productsId as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_ProductsId(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("PRODUCTS_ID")); + } + + /** + * Include select-column of productsModel as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_ProductsModel() { + registerIncludedSelectColumn("ProductsModel", getRealColumnName("PRODUCTS_MODEL")); + } + + /** + * Include select-column of productsModel as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_ProductsModel(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("PRODUCTS_MODEL")); + } + + /** + * Include select-column of productsName as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_ProductsName() { + registerIncludedSelectColumn("ProductsName", getRealColumnName("PRODUCTS_NAME")); + } + + /** + * Include select-column of productsName as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_ProductsName(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("PRODUCTS_NAME")); + } + + /** + * Include select-column of productsPrice as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_ProductsPrice() { + registerIncludedSelectColumn("ProductsPrice", getRealColumnName("PRODUCTS_PRICE")); + } + + /** + * Include select-column of productsPrice as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_ProductsPrice(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("PRODUCTS_PRICE")); + } + + /** + * Include select-column of finalPrice as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_FinalPrice() { + registerIncludedSelectColumn("FinalPrice", getRealColumnName("FINAL_PRICE")); + } + + /** + * Include select-column of finalPrice as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_FinalPrice(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("FINAL_PRICE")); + } + + /** + * Include select-column of productsTax as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_ProductsTax() { + registerIncludedSelectColumn("ProductsTax", getRealColumnName("PRODUCTS_TAX")); + } + + /** + * Include select-column of productsTax as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_ProductsTax(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("PRODUCTS_TAX")); + } + + /** + * Include select-column of productsQuantity as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_ProductsQuantity() { + registerIncludedSelectColumn("ProductsQuantity", getRealColumnName("PRODUCTS_QUANTITY")); + } + + /** + * Include select-column of productsQuantity as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_ProductsQuantity(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("PRODUCTS_QUANTITY")); + } + + // =================================================================================== + // Query + // ===== + // /* * * * * * * * * * * * * * * * * * * * * * * + // MyTable = [ORDERS_PRODUCTS] + // * * * * * * * * */ + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [ORDERS_PRODUCTS_ID] + // - - - - - - - - -/ + + /** The attribute of ordersProductsId. */ + protected ConditionValue _ordersProductsId; + + /** + * Get the value of ordersProductsId. + * + * @return The value of ordersProductsId. + */ + public ConditionValue getOrdersProductsId() { + if (_ordersProductsId == null) { + _ordersProductsId = new ConditionValue(); + } + return _ordersProductsId; + } + + protected ConditionValue getCValueOrdersProductsId() { + return getOrdersProductsId(); + } + + + /** + * Add order-by of ordersProductsId as ASC. + * + * @return this. (NotNull) + */ + public BsOrdersProductsCQ addOrderBy_OrdersProductsId_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_ORDERS_PRODUCTS_ID), null, true);return this; + } + + /** + * Add order-by of ordersProductsId as DESC. + * + * @return this. (NotNull) + */ + public BsOrdersProductsCQ addOrderBy_OrdersProductsId_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_ORDERS_PRODUCTS_ID), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [ORDERS_ID] + // - - - - - - - - -/ + + /** The attribute of ordersId. */ + protected ConditionValue _ordersId; + + /** + * Get the value of ordersId. + * + * @return The value of ordersId. + */ + public ConditionValue getOrdersId() { + if (_ordersId == null) { + _ordersId = new ConditionValue(); + } + return _ordersId; + } + + protected ConditionValue getCValueOrdersId() { + return getOrdersId(); + } + + + /** + * Add order-by of ordersId as ASC. + * + * @return this. (NotNull) + */ + public BsOrdersProductsCQ addOrderBy_OrdersId_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_ORDERS_ID), null, true);return this; + } + + /** + * Add order-by of ordersId as DESC. + * + * @return this. (NotNull) + */ + public BsOrdersProductsCQ addOrderBy_OrdersId_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_ORDERS_ID), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [PRODUCTS_ID] + // - - - - - - - - -/ + + /** The attribute of productsId. */ + protected ConditionValue _productsId; + + /** + * Get the value of productsId. + * + * @return The value of productsId. + */ + public ConditionValue getProductsId() { + if (_productsId == null) { + _productsId = new ConditionValue(); + } + return _productsId; + } + + protected ConditionValue getCValueProductsId() { + return getProductsId(); + } + + + /** + * Add order-by of productsId as ASC. + * + * @return this. (NotNull) + */ + public BsOrdersProductsCQ addOrderBy_ProductsId_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_PRODUCTS_ID), null, true);return this; + } + + /** + * Add order-by of productsId as DESC. + * + * @return this. (NotNull) + */ + public BsOrdersProductsCQ addOrderBy_ProductsId_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_PRODUCTS_ID), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [PRODUCTS_MODEL] + // - - - - - - - - -/ + + /** The attribute of productsModel. */ + protected ConditionValue _productsModel; + + /** + * Get the value of productsModel. + * + * @return The value of productsModel. + */ + public ConditionValue getProductsModel() { + if (_productsModel == null) { + _productsModel = new ConditionValue(); + } + return _productsModel; + } + + protected ConditionValue getCValueProductsModel() { + return getProductsModel(); + } + + + /** + * Add order-by of productsModel as ASC. + * + * @return this. (NotNull) + */ + public BsOrdersProductsCQ addOrderBy_ProductsModel_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_PRODUCTS_MODEL), null, true);return this; + } + + /** + * Add order-by of productsModel as DESC. + * + * @return this. (NotNull) + */ + public BsOrdersProductsCQ addOrderBy_ProductsModel_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_PRODUCTS_MODEL), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [PRODUCTS_NAME] + // - - - - - - - - -/ + + /** The attribute of productsName. */ + protected ConditionValue _productsName; + + /** + * Get the value of productsName. + * + * @return The value of productsName. + */ + public ConditionValue getProductsName() { + if (_productsName == null) { + _productsName = new ConditionValue(); + } + return _productsName; + } + + protected ConditionValue getCValueProductsName() { + return getProductsName(); + } + + + /** + * Add order-by of productsName as ASC. + * + * @return this. (NotNull) + */ + public BsOrdersProductsCQ addOrderBy_ProductsName_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_PRODUCTS_NAME), null, true);return this; + } + + /** + * Add order-by of productsName as DESC. + * + * @return this. (NotNull) + */ + public BsOrdersProductsCQ addOrderBy_ProductsName_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_PRODUCTS_NAME), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [PRODUCTS_PRICE] + // - - - - - - - - -/ + + /** The attribute of productsPrice. */ + protected ConditionValue _productsPrice; + + /** + * Get the value of productsPrice. + * + * @return The value of productsPrice. + */ + public ConditionValue getProductsPrice() { + if (_productsPrice == null) { + _productsPrice = new ConditionValue(); + } + return _productsPrice; + } + + protected ConditionValue getCValueProductsPrice() { + return getProductsPrice(); + } + + + /** + * Add order-by of productsPrice as ASC. + * + * @return this. (NotNull) + */ + public BsOrdersProductsCQ addOrderBy_ProductsPrice_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_PRODUCTS_PRICE), null, true);return this; + } + + /** + * Add order-by of productsPrice as DESC. + * + * @return this. (NotNull) + */ + public BsOrdersProductsCQ addOrderBy_ProductsPrice_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_PRODUCTS_PRICE), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [FINAL_PRICE] + // - - - - - - - - -/ + + /** The attribute of finalPrice. */ + protected ConditionValue _finalPrice; + + /** + * Get the value of finalPrice. + * + * @return The value of finalPrice. + */ + public ConditionValue getFinalPrice() { + if (_finalPrice == null) { + _finalPrice = new ConditionValue(); + } + return _finalPrice; + } + + protected ConditionValue getCValueFinalPrice() { + return getFinalPrice(); + } + + + /** + * Add order-by of finalPrice as ASC. + * + * @return this. (NotNull) + */ + public BsOrdersProductsCQ addOrderBy_FinalPrice_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_FINAL_PRICE), null, true);return this; + } + + /** + * Add order-by of finalPrice as DESC. + * + * @return this. (NotNull) + */ + public BsOrdersProductsCQ addOrderBy_FinalPrice_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_FINAL_PRICE), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [PRODUCTS_TAX] + // - - - - - - - - -/ + + /** The attribute of productsTax. */ + protected ConditionValue _productsTax; + + /** + * Get the value of productsTax. + * + * @return The value of productsTax. + */ + public ConditionValue getProductsTax() { + if (_productsTax == null) { + _productsTax = new ConditionValue(); + } + return _productsTax; + } + + protected ConditionValue getCValueProductsTax() { + return getProductsTax(); + } + + + /** + * Add order-by of productsTax as ASC. + * + * @return this. (NotNull) + */ + public BsOrdersProductsCQ addOrderBy_ProductsTax_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_PRODUCTS_TAX), null, true);return this; + } + + /** + * Add order-by of productsTax as DESC. + * + * @return this. (NotNull) + */ + public BsOrdersProductsCQ addOrderBy_ProductsTax_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_PRODUCTS_TAX), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [PRODUCTS_QUANTITY] + // - - - - - - - - -/ + + /** The attribute of productsQuantity. */ + protected ConditionValue _productsQuantity; + + /** + * Get the value of productsQuantity. + * + * @return The value of productsQuantity. + */ + public ConditionValue getProductsQuantity() { + if (_productsQuantity == null) { + _productsQuantity = new ConditionValue(); + } + return _productsQuantity; + } + + protected ConditionValue getCValueProductsQuantity() { + return getProductsQuantity(); + } + + + /** + * Add order-by of productsQuantity as ASC. + * + * @return this. (NotNull) + */ + public BsOrdersProductsCQ addOrderBy_ProductsQuantity_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_PRODUCTS_QUANTITY), null, true);return this; + } + + /** + * Add order-by of productsQuantity as DESC. + * + * @return this. (NotNull) + */ + public BsOrdersProductsCQ addOrderBy_ProductsQuantity_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_PRODUCTS_QUANTITY), null, false);return this; + } + + // =================================================================================== + // Union Query + // =========== + protected void reflectRelationOnUnionQuery(ConditionQuery baseQueryAsSuper, ConditionQuery unionQueryAsSuper) { + final OrdersProductsCQ baseQuery = (OrdersProductsCQ)baseQueryAsSuper; + final OrdersProductsCQ unionQuery = (OrdersProductsCQ)unionQueryAsSuper; + + } + + // =================================================================================== + // Foreign Query + // ============= + + +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/BsOrdersProductsDownloadCQ.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/BsOrdersProductsDownloadCQ.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/BsOrdersProductsDownloadCQ.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,440 @@ + +package jp.sf.pal.pompei.cbean.cq.bs; + +import jp.sf.pal.pompei.cbean.cq.*; + +import jp.sf.pal.pompei.allcommon.cbean.*; +import jp.sf.pal.pompei.allcommon.cbean.ckey.*; +import jp.sf.pal.pompei.allcommon.cbean.cvalue.ConditionValue; +import jp.sf.pal.pompei.allcommon.cbean.sqlclause.SqlClause; +import jp.sf.pal.pompei.cbean.cq.ciq.*; + +/** + * The condition-query of ORDERS_PRODUCTS_DOWNLOAD. + * + * @author DBFlute(AutoGenerator) + */ +public class BsOrdersProductsDownloadCQ extends AbstractBsOrdersProductsDownloadCQ { + + // =================================================================================== + // Attribute + // ========= + /** Corresponding inline query. */ + protected OrdersProductsDownloadCIQ _inlineQuery; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param childQuery Child query as abstract class. (Nullable: If null, this is base instance.) + * @param sqlClause SQL clause instance. (NotNull) + * @param aliasName My alias name. (NotNull) + * @param nestLevel Nest level. + */ + public BsOrdersProductsDownloadCQ(ConditionQuery childQuery, SqlClause sqlClause, String aliasName, int nestLevel) { + super(childQuery, sqlClause, aliasName, nestLevel); + } + + // =================================================================================== + // Inline + // ====== + /** + * Get inline query. + * + * @return Inline query. (NotNull) + */ + public OrdersProductsDownloadCIQ inline() { + if (_inlineQuery == null) { + _inlineQuery = new OrdersProductsDownloadCIQ(getChildQuery(), getSqlClause(), getAliasName(), getNestLevel(), this); + } + return _inlineQuery; + } + + // =================================================================================== + // Include-as-Mine + // =============== + + /** + * Include select-column of ordersProductsDownloadId as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_OrdersProductsDownloadId() { + registerIncludedSelectColumn("OrdersProductsDownloadId", getRealColumnName("ORDERS_PRODUCTS_DOWNLOAD_ID")); + } + + /** + * Include select-column of ordersProductsDownloadId as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_OrdersProductsDownloadId(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("ORDERS_PRODUCTS_DOWNLOAD_ID")); + } + + /** + * Include select-column of ordersId as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_OrdersId() { + registerIncludedSelectColumn("OrdersId", getRealColumnName("ORDERS_ID")); + } + + /** + * Include select-column of ordersId as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_OrdersId(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("ORDERS_ID")); + } + + /** + * Include select-column of ordersProductsId as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_OrdersProductsId() { + registerIncludedSelectColumn("OrdersProductsId", getRealColumnName("ORDERS_PRODUCTS_ID")); + } + + /** + * Include select-column of ordersProductsId as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_OrdersProductsId(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("ORDERS_PRODUCTS_ID")); + } + + /** + * Include select-column of ordersProductsFilename as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_OrdersProductsFilename() { + registerIncludedSelectColumn("OrdersProductsFilename", getRealColumnName("ORDERS_PRODUCTS_FILENAME")); + } + + /** + * Include select-column of ordersProductsFilename as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_OrdersProductsFilename(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("ORDERS_PRODUCTS_FILENAME")); + } + + /** + * Include select-column of downloadMaxdays as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_DownloadMaxdays() { + registerIncludedSelectColumn("DownloadMaxdays", getRealColumnName("DOWNLOAD_MAXDAYS")); + } + + /** + * Include select-column of downloadMaxdays as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_DownloadMaxdays(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("DOWNLOAD_MAXDAYS")); + } + + /** + * Include select-column of downloadCount as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_DownloadCount() { + registerIncludedSelectColumn("DownloadCount", getRealColumnName("DOWNLOAD_COUNT")); + } + + /** + * Include select-column of downloadCount as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_DownloadCount(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("DOWNLOAD_COUNT")); + } + + // =================================================================================== + // Query + // ===== + // /* * * * * * * * * * * * * * * * * * * * * * * + // MyTable = [ORDERS_PRODUCTS_DOWNLOAD] + // * * * * * * * * */ + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [ORDERS_PRODUCTS_DOWNLOAD_ID] + // - - - - - - - - -/ + + /** The attribute of ordersProductsDownloadId. */ + protected ConditionValue _ordersProductsDownloadId; + + /** + * Get the value of ordersProductsDownloadId. + * + * @return The value of ordersProductsDownloadId. + */ + public ConditionValue getOrdersProductsDownloadId() { + if (_ordersProductsDownloadId == null) { + _ordersProductsDownloadId = new ConditionValue(); + } + return _ordersProductsDownloadId; + } + + protected ConditionValue getCValueOrdersProductsDownloadId() { + return getOrdersProductsDownloadId(); + } + + + /** + * Add order-by of ordersProductsDownloadId as ASC. + * + * @return this. (NotNull) + */ + public BsOrdersProductsDownloadCQ addOrderBy_OrdersProductsDownloadId_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_ORDERS_PRODUCTS_DOWNLOAD_ID), null, true);return this; + } + + /** + * Add order-by of ordersProductsDownloadId as DESC. + * + * @return this. (NotNull) + */ + public BsOrdersProductsDownloadCQ addOrderBy_OrdersProductsDownloadId_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_ORDERS_PRODUCTS_DOWNLOAD_ID), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [ORDERS_ID] + // - - - - - - - - -/ + + /** The attribute of ordersId. */ + protected ConditionValue _ordersId; + + /** + * Get the value of ordersId. + * + * @return The value of ordersId. + */ + public ConditionValue getOrdersId() { + if (_ordersId == null) { + _ordersId = new ConditionValue(); + } + return _ordersId; + } + + protected ConditionValue getCValueOrdersId() { + return getOrdersId(); + } + + + /** + * Add order-by of ordersId as ASC. + * + * @return this. (NotNull) + */ + public BsOrdersProductsDownloadCQ addOrderBy_OrdersId_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_ORDERS_ID), null, true);return this; + } + + /** + * Add order-by of ordersId as DESC. + * + * @return this. (NotNull) + */ + public BsOrdersProductsDownloadCQ addOrderBy_OrdersId_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_ORDERS_ID), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [ORDERS_PRODUCTS_ID] + // - - - - - - - - -/ + + /** The attribute of ordersProductsId. */ + protected ConditionValue _ordersProductsId; + + /** + * Get the value of ordersProductsId. + * + * @return The value of ordersProductsId. + */ + public ConditionValue getOrdersProductsId() { + if (_ordersProductsId == null) { + _ordersProductsId = new ConditionValue(); + } + return _ordersProductsId; + } + + protected ConditionValue getCValueOrdersProductsId() { + return getOrdersProductsId(); + } + + + /** + * Add order-by of ordersProductsId as ASC. + * + * @return this. (NotNull) + */ + public BsOrdersProductsDownloadCQ addOrderBy_OrdersProductsId_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_ORDERS_PRODUCTS_ID), null, true);return this; + } + + /** + * Add order-by of ordersProductsId as DESC. + * + * @return this. (NotNull) + */ + public BsOrdersProductsDownloadCQ addOrderBy_OrdersProductsId_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_ORDERS_PRODUCTS_ID), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [ORDERS_PRODUCTS_FILENAME] + // - - - - - - - - -/ + + /** The attribute of ordersProductsFilename. */ + protected ConditionValue _ordersProductsFilename; + + /** + * Get the value of ordersProductsFilename. + * + * @return The value of ordersProductsFilename. + */ + public ConditionValue getOrdersProductsFilename() { + if (_ordersProductsFilename == null) { + _ordersProductsFilename = new ConditionValue(); + } + return _ordersProductsFilename; + } + + protected ConditionValue getCValueOrdersProductsFilename() { + return getOrdersProductsFilename(); + } + + + /** + * Add order-by of ordersProductsFilename as ASC. + * + * @return this. (NotNull) + */ + public BsOrdersProductsDownloadCQ addOrderBy_OrdersProductsFilename_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_ORDERS_PRODUCTS_FILENAME), null, true);return this; + } + + /** + * Add order-by of ordersProductsFilename as DESC. + * + * @return this. (NotNull) + */ + public BsOrdersProductsDownloadCQ addOrderBy_OrdersProductsFilename_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_ORDERS_PRODUCTS_FILENAME), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [DOWNLOAD_MAXDAYS] + // - - - - - - - - -/ + + /** The attribute of downloadMaxdays. */ + protected ConditionValue _downloadMaxdays; + + /** + * Get the value of downloadMaxdays. + * + * @return The value of downloadMaxdays. + */ + public ConditionValue getDownloadMaxdays() { + if (_downloadMaxdays == null) { + _downloadMaxdays = new ConditionValue(); + } + return _downloadMaxdays; + } + + protected ConditionValue getCValueDownloadMaxdays() { + return getDownloadMaxdays(); + } + + + /** + * Add order-by of downloadMaxdays as ASC. + * + * @return this. (NotNull) + */ + public BsOrdersProductsDownloadCQ addOrderBy_DownloadMaxdays_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_DOWNLOAD_MAXDAYS), null, true);return this; + } + + /** + * Add order-by of downloadMaxdays as DESC. + * + * @return this. (NotNull) + */ + public BsOrdersProductsDownloadCQ addOrderBy_DownloadMaxdays_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_DOWNLOAD_MAXDAYS), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [DOWNLOAD_COUNT] + // - - - - - - - - -/ + + /** The attribute of downloadCount. */ + protected ConditionValue _downloadCount; + + /** + * Get the value of downloadCount. + * + * @return The value of downloadCount. + */ + public ConditionValue getDownloadCount() { + if (_downloadCount == null) { + _downloadCount = new ConditionValue(); + } + return _downloadCount; + } + + protected ConditionValue getCValueDownloadCount() { + return getDownloadCount(); + } + + + /** + * Add order-by of downloadCount as ASC. + * + * @return this. (NotNull) + */ + public BsOrdersProductsDownloadCQ addOrderBy_DownloadCount_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_DOWNLOAD_COUNT), null, true);return this; + } + + /** + * Add order-by of downloadCount as DESC. + * + * @return this. (NotNull) + */ + public BsOrdersProductsDownloadCQ addOrderBy_DownloadCount_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_DOWNLOAD_COUNT), null, false);return this; + } + + // =================================================================================== + // Union Query + // =========== + protected void reflectRelationOnUnionQuery(ConditionQuery baseQueryAsSuper, ConditionQuery unionQueryAsSuper) { + final OrdersProductsDownloadCQ baseQuery = (OrdersProductsDownloadCQ)baseQueryAsSuper; + final OrdersProductsDownloadCQ unionQuery = (OrdersProductsDownloadCQ)unionQueryAsSuper; + + } + + // =================================================================================== + // Foreign Query + // ============= + + +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/BsOrdersStatusCQ.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/BsOrdersStatusCQ.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/BsOrdersStatusCQ.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,260 @@ + +package jp.sf.pal.pompei.cbean.cq.bs; + +import jp.sf.pal.pompei.cbean.cq.*; + +import jp.sf.pal.pompei.allcommon.cbean.*; +import jp.sf.pal.pompei.allcommon.cbean.ckey.*; +import jp.sf.pal.pompei.allcommon.cbean.cvalue.ConditionValue; +import jp.sf.pal.pompei.allcommon.cbean.sqlclause.SqlClause; +import jp.sf.pal.pompei.cbean.cq.ciq.*; + +/** + * The condition-query of ORDERS_STATUS. + * + * @author DBFlute(AutoGenerator) + */ +public class BsOrdersStatusCQ extends AbstractBsOrdersStatusCQ { + + // =================================================================================== + // Attribute + // ========= + /** Corresponding inline query. */ + protected OrdersStatusCIQ _inlineQuery; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param childQuery Child query as abstract class. (Nullable: If null, this is base instance.) + * @param sqlClause SQL clause instance. (NotNull) + * @param aliasName My alias name. (NotNull) + * @param nestLevel Nest level. + */ + public BsOrdersStatusCQ(ConditionQuery childQuery, SqlClause sqlClause, String aliasName, int nestLevel) { + super(childQuery, sqlClause, aliasName, nestLevel); + } + + // =================================================================================== + // Inline + // ====== + /** + * Get inline query. + * + * @return Inline query. (NotNull) + */ + public OrdersStatusCIQ inline() { + if (_inlineQuery == null) { + _inlineQuery = new OrdersStatusCIQ(getChildQuery(), getSqlClause(), getAliasName(), getNestLevel(), this); + } + return _inlineQuery; + } + + // =================================================================================== + // Include-as-Mine + // =============== + + /** + * Include select-column of ordersStatusId as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_OrdersStatusId() { + registerIncludedSelectColumn("OrdersStatusId", getRealColumnName("ORDERS_STATUS_ID")); + } + + /** + * Include select-column of ordersStatusId as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_OrdersStatusId(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("ORDERS_STATUS_ID")); + } + + /** + * Include select-column of languageId as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_LanguageId() { + registerIncludedSelectColumn("LanguageId", getRealColumnName("LANGUAGE_ID")); + } + + /** + * Include select-column of languageId as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_LanguageId(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("LANGUAGE_ID")); + } + + /** + * Include select-column of ordersStatusName as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_OrdersStatusName() { + registerIncludedSelectColumn("OrdersStatusName", getRealColumnName("ORDERS_STATUS_NAME")); + } + + /** + * Include select-column of ordersStatusName as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_OrdersStatusName(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("ORDERS_STATUS_NAME")); + } + + // =================================================================================== + // Query + // ===== + // /* * * * * * * * * * * * * * * * * * * * * * * + // MyTable = [ORDERS_STATUS] + // * * * * * * * * */ + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [ORDERS_STATUS_ID] + // - - - - - - - - -/ + + /** The attribute of ordersStatusId. */ + protected ConditionValue _ordersStatusId; + + /** + * Get the value of ordersStatusId. + * + * @return The value of ordersStatusId. + */ + public ConditionValue getOrdersStatusId() { + if (_ordersStatusId == null) { + _ordersStatusId = new ConditionValue(); + } + return _ordersStatusId; + } + + protected ConditionValue getCValueOrdersStatusId() { + return getOrdersStatusId(); + } + + + /** + * Add order-by of ordersStatusId as ASC. + * + * @return this. (NotNull) + */ + public BsOrdersStatusCQ addOrderBy_OrdersStatusId_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_ORDERS_STATUS_ID), null, true);return this; + } + + /** + * Add order-by of ordersStatusId as DESC. + * + * @return this. (NotNull) + */ + public BsOrdersStatusCQ addOrderBy_OrdersStatusId_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_ORDERS_STATUS_ID), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [LANGUAGE_ID] + // - - - - - - - - -/ + + /** The attribute of languageId. */ + protected ConditionValue _languageId; + + /** + * Get the value of languageId. + * + * @return The value of languageId. + */ + public ConditionValue getLanguageId() { + if (_languageId == null) { + _languageId = new ConditionValue(); + } + return _languageId; + } + + protected ConditionValue getCValueLanguageId() { + return getLanguageId(); + } + + + /** + * Add order-by of languageId as ASC. + * + * @return this. (NotNull) + */ + public BsOrdersStatusCQ addOrderBy_LanguageId_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_LANGUAGE_ID), null, true);return this; + } + + /** + * Add order-by of languageId as DESC. + * + * @return this. (NotNull) + */ + public BsOrdersStatusCQ addOrderBy_LanguageId_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_LANGUAGE_ID), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [ORDERS_STATUS_NAME] + // - - - - - - - - -/ + + /** The attribute of ordersStatusName. */ + protected ConditionValue _ordersStatusName; + + /** + * Get the value of ordersStatusName. + * + * @return The value of ordersStatusName. + */ + public ConditionValue getOrdersStatusName() { + if (_ordersStatusName == null) { + _ordersStatusName = new ConditionValue(); + } + return _ordersStatusName; + } + + protected ConditionValue getCValueOrdersStatusName() { + return getOrdersStatusName(); + } + + + /** + * Add order-by of ordersStatusName as ASC. + * + * @return this. (NotNull) + */ + public BsOrdersStatusCQ addOrderBy_OrdersStatusName_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_ORDERS_STATUS_NAME), null, true);return this; + } + + /** + * Add order-by of ordersStatusName as DESC. + * + * @return this. (NotNull) + */ + public BsOrdersStatusCQ addOrderBy_OrdersStatusName_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_ORDERS_STATUS_NAME), null, false);return this; + } + + // =================================================================================== + // Union Query + // =========== + protected void reflectRelationOnUnionQuery(ConditionQuery baseQueryAsSuper, ConditionQuery unionQueryAsSuper) { + final OrdersStatusCQ baseQuery = (OrdersStatusCQ)baseQueryAsSuper; + final OrdersStatusCQ unionQuery = (OrdersStatusCQ)unionQueryAsSuper; + + } + + // =================================================================================== + // Foreign Query + // ============= + + +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/BsOrdersStatusHistoryCQ.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/BsOrdersStatusHistoryCQ.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/BsOrdersStatusHistoryCQ.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,440 @@ + +package jp.sf.pal.pompei.cbean.cq.bs; + +import jp.sf.pal.pompei.cbean.cq.*; + +import jp.sf.pal.pompei.allcommon.cbean.*; +import jp.sf.pal.pompei.allcommon.cbean.ckey.*; +import jp.sf.pal.pompei.allcommon.cbean.cvalue.ConditionValue; +import jp.sf.pal.pompei.allcommon.cbean.sqlclause.SqlClause; +import jp.sf.pal.pompei.cbean.cq.ciq.*; + +/** + * The condition-query of ORDERS_STATUS_HISTORY. + * + * @author DBFlute(AutoGenerator) + */ +public class BsOrdersStatusHistoryCQ extends AbstractBsOrdersStatusHistoryCQ { + + // =================================================================================== + // Attribute + // ========= + /** Corresponding inline query. */ + protected OrdersStatusHistoryCIQ _inlineQuery; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param childQuery Child query as abstract class. (Nullable: If null, this is base instance.) + * @param sqlClause SQL clause instance. (NotNull) + * @param aliasName My alias name. (NotNull) + * @param nestLevel Nest level. + */ + public BsOrdersStatusHistoryCQ(ConditionQuery childQuery, SqlClause sqlClause, String aliasName, int nestLevel) { + super(childQuery, sqlClause, aliasName, nestLevel); + } + + // =================================================================================== + // Inline + // ====== + /** + * Get inline query. + * + * @return Inline query. (NotNull) + */ + public OrdersStatusHistoryCIQ inline() { + if (_inlineQuery == null) { + _inlineQuery = new OrdersStatusHistoryCIQ(getChildQuery(), getSqlClause(), getAliasName(), getNestLevel(), this); + } + return _inlineQuery; + } + + // =================================================================================== + // Include-as-Mine + // =============== + + /** + * Include select-column of ordersStatusHistoryId as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_OrdersStatusHistoryId() { + registerIncludedSelectColumn("OrdersStatusHistoryId", getRealColumnName("ORDERS_STATUS_HISTORY_ID")); + } + + /** + * Include select-column of ordersStatusHistoryId as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_OrdersStatusHistoryId(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("ORDERS_STATUS_HISTORY_ID")); + } + + /** + * Include select-column of ordersId as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_OrdersId() { + registerIncludedSelectColumn("OrdersId", getRealColumnName("ORDERS_ID")); + } + + /** + * Include select-column of ordersId as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_OrdersId(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("ORDERS_ID")); + } + + /** + * Include select-column of ordersStatusId as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_OrdersStatusId() { + registerIncludedSelectColumn("OrdersStatusId", getRealColumnName("ORDERS_STATUS_ID")); + } + + /** + * Include select-column of ordersStatusId as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_OrdersStatusId(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("ORDERS_STATUS_ID")); + } + + /** + * Include select-column of dateAdded as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_DateAdded() { + registerIncludedSelectColumn("DateAdded", getRealColumnName("DATE_ADDED")); + } + + /** + * Include select-column of dateAdded as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_DateAdded(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("DATE_ADDED")); + } + + /** + * Include select-column of customerNotified as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_CustomerNotified() { + registerIncludedSelectColumn("CustomerNotified", getRealColumnName("CUSTOMER_NOTIFIED")); + } + + /** + * Include select-column of customerNotified as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_CustomerNotified(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("CUSTOMER_NOTIFIED")); + } + + /** + * Include select-column of comments as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_Comments() { + registerIncludedSelectColumn("Comments", getRealColumnName("COMMENTS")); + } + + /** + * Include select-column of comments as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_Comments(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("COMMENTS")); + } + + // =================================================================================== + // Query + // ===== + // /* * * * * * * * * * * * * * * * * * * * * * * + // MyTable = [ORDERS_STATUS_HISTORY] + // * * * * * * * * */ + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [ORDERS_STATUS_HISTORY_ID] + // - - - - - - - - -/ + + /** The attribute of ordersStatusHistoryId. */ + protected ConditionValue _ordersStatusHistoryId; + + /** + * Get the value of ordersStatusHistoryId. + * + * @return The value of ordersStatusHistoryId. + */ + public ConditionValue getOrdersStatusHistoryId() { + if (_ordersStatusHistoryId == null) { + _ordersStatusHistoryId = new ConditionValue(); + } + return _ordersStatusHistoryId; + } + + protected ConditionValue getCValueOrdersStatusHistoryId() { + return getOrdersStatusHistoryId(); + } + + + /** + * Add order-by of ordersStatusHistoryId as ASC. + * + * @return this. (NotNull) + */ + public BsOrdersStatusHistoryCQ addOrderBy_OrdersStatusHistoryId_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_ORDERS_STATUS_HISTORY_ID), null, true);return this; + } + + /** + * Add order-by of ordersStatusHistoryId as DESC. + * + * @return this. (NotNull) + */ + public BsOrdersStatusHistoryCQ addOrderBy_OrdersStatusHistoryId_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_ORDERS_STATUS_HISTORY_ID), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [ORDERS_ID] + // - - - - - - - - -/ + + /** The attribute of ordersId. */ + protected ConditionValue _ordersId; + + /** + * Get the value of ordersId. + * + * @return The value of ordersId. + */ + public ConditionValue getOrdersId() { + if (_ordersId == null) { + _ordersId = new ConditionValue(); + } + return _ordersId; + } + + protected ConditionValue getCValueOrdersId() { + return getOrdersId(); + } + + + /** + * Add order-by of ordersId as ASC. + * + * @return this. (NotNull) + */ + public BsOrdersStatusHistoryCQ addOrderBy_OrdersId_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_ORDERS_ID), null, true);return this; + } + + /** + * Add order-by of ordersId as DESC. + * + * @return this. (NotNull) + */ + public BsOrdersStatusHistoryCQ addOrderBy_OrdersId_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_ORDERS_ID), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [ORDERS_STATUS_ID] + // - - - - - - - - -/ + + /** The attribute of ordersStatusId. */ + protected ConditionValue _ordersStatusId; + + /** + * Get the value of ordersStatusId. + * + * @return The value of ordersStatusId. + */ + public ConditionValue getOrdersStatusId() { + if (_ordersStatusId == null) { + _ordersStatusId = new ConditionValue(); + } + return _ordersStatusId; + } + + protected ConditionValue getCValueOrdersStatusId() { + return getOrdersStatusId(); + } + + + /** + * Add order-by of ordersStatusId as ASC. + * + * @return this. (NotNull) + */ + public BsOrdersStatusHistoryCQ addOrderBy_OrdersStatusId_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_ORDERS_STATUS_ID), null, true);return this; + } + + /** + * Add order-by of ordersStatusId as DESC. + * + * @return this. (NotNull) + */ + public BsOrdersStatusHistoryCQ addOrderBy_OrdersStatusId_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_ORDERS_STATUS_ID), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [DATE_ADDED] + // - - - - - - - - -/ + + /** The attribute of dateAdded. */ + protected ConditionValue _dateAdded; + + /** + * Get the value of dateAdded. + * + * @return The value of dateAdded. + */ + public ConditionValue getDateAdded() { + if (_dateAdded == null) { + _dateAdded = new ConditionValue(); + } + return _dateAdded; + } + + protected ConditionValue getCValueDateAdded() { + return getDateAdded(); + } + + + /** + * Add order-by of dateAdded as ASC. + * + * @return this. (NotNull) + */ + public BsOrdersStatusHistoryCQ addOrderBy_DateAdded_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_DATE_ADDED), null, true);return this; + } + + /** + * Add order-by of dateAdded as DESC. + * + * @return this. (NotNull) + */ + public BsOrdersStatusHistoryCQ addOrderBy_DateAdded_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_DATE_ADDED), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [CUSTOMER_NOTIFIED] + // - - - - - - - - -/ + + /** The attribute of customerNotified. */ + protected ConditionValue _customerNotified; + + /** + * Get the value of customerNotified. + * + * @return The value of customerNotified. + */ + public ConditionValue getCustomerNotified() { + if (_customerNotified == null) { + _customerNotified = new ConditionValue(); + } + return _customerNotified; + } + + protected ConditionValue getCValueCustomerNotified() { + return getCustomerNotified(); + } + + + /** + * Add order-by of customerNotified as ASC. + * + * @return this. (NotNull) + */ + public BsOrdersStatusHistoryCQ addOrderBy_CustomerNotified_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_CUSTOMER_NOTIFIED), null, true);return this; + } + + /** + * Add order-by of customerNotified as DESC. + * + * @return this. (NotNull) + */ + public BsOrdersStatusHistoryCQ addOrderBy_CustomerNotified_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_CUSTOMER_NOTIFIED), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [COMMENTS] + // - - - - - - - - -/ + + /** The attribute of comments. */ + protected ConditionValue _comments; + + /** + * Get the value of comments. + * + * @return The value of comments. + */ + public ConditionValue getComments() { + if (_comments == null) { + _comments = new ConditionValue(); + } + return _comments; + } + + protected ConditionValue getCValueComments() { + return getComments(); + } + + + /** + * Add order-by of comments as ASC. + * + * @return this. (NotNull) + */ + public BsOrdersStatusHistoryCQ addOrderBy_Comments_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_COMMENTS), null, true);return this; + } + + /** + * Add order-by of comments as DESC. + * + * @return this. (NotNull) + */ + public BsOrdersStatusHistoryCQ addOrderBy_Comments_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_COMMENTS), null, false);return this; + } + + // =================================================================================== + // Union Query + // =========== + protected void reflectRelationOnUnionQuery(ConditionQuery baseQueryAsSuper, ConditionQuery unionQueryAsSuper) { + final OrdersStatusHistoryCQ baseQuery = (OrdersStatusHistoryCQ)baseQueryAsSuper; + final OrdersStatusHistoryCQ unionQuery = (OrdersStatusHistoryCQ)unionQueryAsSuper; + + } + + // =================================================================================== + // Foreign Query + // ============= + + +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/BsOrdersTotalCQ.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/BsOrdersTotalCQ.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/BsOrdersTotalCQ.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,500 @@ + +package jp.sf.pal.pompei.cbean.cq.bs; + +import jp.sf.pal.pompei.cbean.cq.*; + +import jp.sf.pal.pompei.allcommon.cbean.*; +import jp.sf.pal.pompei.allcommon.cbean.ckey.*; +import jp.sf.pal.pompei.allcommon.cbean.cvalue.ConditionValue; +import jp.sf.pal.pompei.allcommon.cbean.sqlclause.SqlClause; +import jp.sf.pal.pompei.cbean.cq.ciq.*; + +/** + * The condition-query of ORDERS_TOTAL. + * + * @author DBFlute(AutoGenerator) + */ +public class BsOrdersTotalCQ extends AbstractBsOrdersTotalCQ { + + // =================================================================================== + // Attribute + // ========= + /** Corresponding inline query. */ + protected OrdersTotalCIQ _inlineQuery; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param childQuery Child query as abstract class. (Nullable: If null, this is base instance.) + * @param sqlClause SQL clause instance. (NotNull) + * @param aliasName My alias name. (NotNull) + * @param nestLevel Nest level. + */ + public BsOrdersTotalCQ(ConditionQuery childQuery, SqlClause sqlClause, String aliasName, int nestLevel) { + super(childQuery, sqlClause, aliasName, nestLevel); + } + + // =================================================================================== + // Inline + // ====== + /** + * Get inline query. + * + * @return Inline query. (NotNull) + */ + public OrdersTotalCIQ inline() { + if (_inlineQuery == null) { + _inlineQuery = new OrdersTotalCIQ(getChildQuery(), getSqlClause(), getAliasName(), getNestLevel(), this); + } + return _inlineQuery; + } + + // =================================================================================== + // Include-as-Mine + // =============== + + /** + * Include select-column of ordersTotalId as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_OrdersTotalId() { + registerIncludedSelectColumn("OrdersTotalId", getRealColumnName("ORDERS_TOTAL_ID")); + } + + /** + * Include select-column of ordersTotalId as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_OrdersTotalId(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("ORDERS_TOTAL_ID")); + } + + /** + * Include select-column of ordersId as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_OrdersId() { + registerIncludedSelectColumn("OrdersId", getRealColumnName("ORDERS_ID")); + } + + /** + * Include select-column of ordersId as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_OrdersId(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("ORDERS_ID")); + } + + /** + * Include select-column of title as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_Title() { + registerIncludedSelectColumn("Title", getRealColumnName("TITLE")); + } + + /** + * Include select-column of title as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_Title(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("TITLE")); + } + + /** + * Include select-column of text as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_Text() { + registerIncludedSelectColumn("Text", getRealColumnName("TEXT")); + } + + /** + * Include select-column of text as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_Text(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("TEXT")); + } + + /** + * Include select-column of value as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_Value() { + registerIncludedSelectColumn("Value", getRealColumnName("VALUE")); + } + + /** + * Include select-column of value as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_Value(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("VALUE")); + } + + /** + * Include select-column of otClass as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_OtClass() { + registerIncludedSelectColumn("OtClass", getRealColumnName("OT_CLASS")); + } + + /** + * Include select-column of otClass as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_OtClass(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("OT_CLASS")); + } + + /** + * Include select-column of sortOrder as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_SortOrder() { + registerIncludedSelectColumn("SortOrder", getRealColumnName("SORT_ORDER")); + } + + /** + * Include select-column of sortOrder as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_SortOrder(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("SORT_ORDER")); + } + + // =================================================================================== + // Query + // ===== + // /* * * * * * * * * * * * * * * * * * * * * * * + // MyTable = [ORDERS_TOTAL] + // * * * * * * * * */ + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [ORDERS_TOTAL_ID] + // - - - - - - - - -/ + + /** The attribute of ordersTotalId. */ + protected ConditionValue _ordersTotalId; + + /** + * Get the value of ordersTotalId. + * + * @return The value of ordersTotalId. + */ + public ConditionValue getOrdersTotalId() { + if (_ordersTotalId == null) { + _ordersTotalId = new ConditionValue(); + } + return _ordersTotalId; + } + + protected ConditionValue getCValueOrdersTotalId() { + return getOrdersTotalId(); + } + + + /** + * Add order-by of ordersTotalId as ASC. + * + * @return this. (NotNull) + */ + public BsOrdersTotalCQ addOrderBy_OrdersTotalId_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_ORDERS_TOTAL_ID), null, true);return this; + } + + /** + * Add order-by of ordersTotalId as DESC. + * + * @return this. (NotNull) + */ + public BsOrdersTotalCQ addOrderBy_OrdersTotalId_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_ORDERS_TOTAL_ID), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [ORDERS_ID] + // - - - - - - - - -/ + + /** The attribute of ordersId. */ + protected ConditionValue _ordersId; + + /** + * Get the value of ordersId. + * + * @return The value of ordersId. + */ + public ConditionValue getOrdersId() { + if (_ordersId == null) { + _ordersId = new ConditionValue(); + } + return _ordersId; + } + + protected ConditionValue getCValueOrdersId() { + return getOrdersId(); + } + + + /** + * Add order-by of ordersId as ASC. + * + * @return this. (NotNull) + */ + public BsOrdersTotalCQ addOrderBy_OrdersId_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_ORDERS_ID), null, true);return this; + } + + /** + * Add order-by of ordersId as DESC. + * + * @return this. (NotNull) + */ + public BsOrdersTotalCQ addOrderBy_OrdersId_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_ORDERS_ID), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [TITLE] + // - - - - - - - - -/ + + /** The attribute of title. */ + protected ConditionValue _title; + + /** + * Get the value of title. + * + * @return The value of title. + */ + public ConditionValue getTitle() { + if (_title == null) { + _title = new ConditionValue(); + } + return _title; + } + + protected ConditionValue getCValueTitle() { + return getTitle(); + } + + + /** + * Add order-by of title as ASC. + * + * @return this. (NotNull) + */ + public BsOrdersTotalCQ addOrderBy_Title_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_TITLE), null, true);return this; + } + + /** + * Add order-by of title as DESC. + * + * @return this. (NotNull) + */ + public BsOrdersTotalCQ addOrderBy_Title_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_TITLE), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [TEXT] + // - - - - - - - - -/ + + /** The attribute of text. */ + protected ConditionValue _text; + + /** + * Get the value of text. + * + * @return The value of text. + */ + public ConditionValue getText() { + if (_text == null) { + _text = new ConditionValue(); + } + return _text; + } + + protected ConditionValue getCValueText() { + return getText(); + } + + + /** + * Add order-by of text as ASC. + * + * @return this. (NotNull) + */ + public BsOrdersTotalCQ addOrderBy_Text_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_TEXT), null, true);return this; + } + + /** + * Add order-by of text as DESC. + * + * @return this. (NotNull) + */ + public BsOrdersTotalCQ addOrderBy_Text_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_TEXT), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [VALUE] + // - - - - - - - - -/ + + /** The attribute of value. */ + protected ConditionValue _value; + + /** + * Get the value of value. + * + * @return The value of value. + */ + public ConditionValue getValue() { + if (_value == null) { + _value = new ConditionValue(); + } + return _value; + } + + protected ConditionValue getCValueValue() { + return getValue(); + } + + + /** + * Add order-by of value as ASC. + * + * @return this. (NotNull) + */ + public BsOrdersTotalCQ addOrderBy_Value_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_VALUE), null, true);return this; + } + + /** + * Add order-by of value as DESC. + * + * @return this. (NotNull) + */ + public BsOrdersTotalCQ addOrderBy_Value_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_VALUE), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [OT_CLASS] + // - - - - - - - - -/ + + /** The attribute of otClass. */ + protected ConditionValue _otClass; + + /** + * Get the value of otClass. + * + * @return The value of otClass. + */ + public ConditionValue getOtClass() { + if (_otClass == null) { + _otClass = new ConditionValue(); + } + return _otClass; + } + + protected ConditionValue getCValueOtClass() { + return getOtClass(); + } + + + /** + * Add order-by of otClass as ASC. + * + * @return this. (NotNull) + */ + public BsOrdersTotalCQ addOrderBy_OtClass_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_OT_CLASS), null, true);return this; + } + + /** + * Add order-by of otClass as DESC. + * + * @return this. (NotNull) + */ + public BsOrdersTotalCQ addOrderBy_OtClass_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_OT_CLASS), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [SORT_ORDER] + // - - - - - - - - -/ + + /** The attribute of sortOrder. */ + protected ConditionValue _sortOrder; + + /** + * Get the value of sortOrder. + * + * @return The value of sortOrder. + */ + public ConditionValue getSortOrder() { + if (_sortOrder == null) { + _sortOrder = new ConditionValue(); + } + return _sortOrder; + } + + protected ConditionValue getCValueSortOrder() { + return getSortOrder(); + } + + + /** + * Add order-by of sortOrder as ASC. + * + * @return this. (NotNull) + */ + public BsOrdersTotalCQ addOrderBy_SortOrder_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_SORT_ORDER), null, true);return this; + } + + /** + * Add order-by of sortOrder as DESC. + * + * @return this. (NotNull) + */ + public BsOrdersTotalCQ addOrderBy_SortOrder_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_SORT_ORDER), null, false);return this; + } + + // =================================================================================== + // Union Query + // =========== + protected void reflectRelationOnUnionQuery(ConditionQuery baseQueryAsSuper, ConditionQuery unionQueryAsSuper) { + final OrdersTotalCQ baseQuery = (OrdersTotalCQ)baseQueryAsSuper; + final OrdersTotalCQ unionQuery = (OrdersTotalCQ)unionQueryAsSuper; + + } + + // =================================================================================== + // Foreign Query + // ============= + + +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/BsProductsAttributesCQ.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/BsProductsAttributesCQ.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/BsProductsAttributesCQ.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,440 @@ + +package jp.sf.pal.pompei.cbean.cq.bs; + +import jp.sf.pal.pompei.cbean.cq.*; + +import jp.sf.pal.pompei.allcommon.cbean.*; +import jp.sf.pal.pompei.allcommon.cbean.ckey.*; +import jp.sf.pal.pompei.allcommon.cbean.cvalue.ConditionValue; +import jp.sf.pal.pompei.allcommon.cbean.sqlclause.SqlClause; +import jp.sf.pal.pompei.cbean.cq.ciq.*; + +/** + * The condition-query of PRODUCTS_ATTRIBUTES. + * + * @author DBFlute(AutoGenerator) + */ +public class BsProductsAttributesCQ extends AbstractBsProductsAttributesCQ { + + // =================================================================================== + // Attribute + // ========= + /** Corresponding inline query. */ + protected ProductsAttributesCIQ _inlineQuery; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param childQuery Child query as abstract class. (Nullable: If null, this is base instance.) + * @param sqlClause SQL clause instance. (NotNull) + * @param aliasName My alias name. (NotNull) + * @param nestLevel Nest level. + */ + public BsProductsAttributesCQ(ConditionQuery childQuery, SqlClause sqlClause, String aliasName, int nestLevel) { + super(childQuery, sqlClause, aliasName, nestLevel); + } + + // =================================================================================== + // Inline + // ====== + /** + * Get inline query. + * + * @return Inline query. (NotNull) + */ + public ProductsAttributesCIQ inline() { + if (_inlineQuery == null) { + _inlineQuery = new ProductsAttributesCIQ(getChildQuery(), getSqlClause(), getAliasName(), getNestLevel(), this); + } + return _inlineQuery; + } + + // =================================================================================== + // Include-as-Mine + // =============== + + /** + * Include select-column of productsAttributesId as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_ProductsAttributesId() { + registerIncludedSelectColumn("ProductsAttributesId", getRealColumnName("PRODUCTS_ATTRIBUTES_ID")); + } + + /** + * Include select-column of productsAttributesId as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_ProductsAttributesId(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("PRODUCTS_ATTRIBUTES_ID")); + } + + /** + * Include select-column of productsId as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_ProductsId() { + registerIncludedSelectColumn("ProductsId", getRealColumnName("PRODUCTS_ID")); + } + + /** + * Include select-column of productsId as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_ProductsId(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("PRODUCTS_ID")); + } + + /** + * Include select-column of optionsId as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_OptionsId() { + registerIncludedSelectColumn("OptionsId", getRealColumnName("OPTIONS_ID")); + } + + /** + * Include select-column of optionsId as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_OptionsId(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("OPTIONS_ID")); + } + + /** + * Include select-column of optionsValuesId as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_OptionsValuesId() { + registerIncludedSelectColumn("OptionsValuesId", getRealColumnName("OPTIONS_VALUES_ID")); + } + + /** + * Include select-column of optionsValuesId as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_OptionsValuesId(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("OPTIONS_VALUES_ID")); + } + + /** + * Include select-column of optionsValuesPrice as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_OptionsValuesPrice() { + registerIncludedSelectColumn("OptionsValuesPrice", getRealColumnName("OPTIONS_VALUES_PRICE")); + } + + /** + * Include select-column of optionsValuesPrice as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_OptionsValuesPrice(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("OPTIONS_VALUES_PRICE")); + } + + /** + * Include select-column of pricePrefix as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_PricePrefix() { + registerIncludedSelectColumn("PricePrefix", getRealColumnName("PRICE_PREFIX")); + } + + /** + * Include select-column of pricePrefix as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_PricePrefix(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("PRICE_PREFIX")); + } + + // =================================================================================== + // Query + // ===== + // /* * * * * * * * * * * * * * * * * * * * * * * + // MyTable = [PRODUCTS_ATTRIBUTES] + // * * * * * * * * */ + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [PRODUCTS_ATTRIBUTES_ID] + // - - - - - - - - -/ + + /** The attribute of productsAttributesId. */ + protected ConditionValue _productsAttributesId; + + /** + * Get the value of productsAttributesId. + * + * @return The value of productsAttributesId. + */ + public ConditionValue getProductsAttributesId() { + if (_productsAttributesId == null) { + _productsAttributesId = new ConditionValue(); + } + return _productsAttributesId; + } + + protected ConditionValue getCValueProductsAttributesId() { + return getProductsAttributesId(); + } + + + /** + * Add order-by of productsAttributesId as ASC. + * + * @return this. (NotNull) + */ + public BsProductsAttributesCQ addOrderBy_ProductsAttributesId_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_PRODUCTS_ATTRIBUTES_ID), null, true);return this; + } + + /** + * Add order-by of productsAttributesId as DESC. + * + * @return this. (NotNull) + */ + public BsProductsAttributesCQ addOrderBy_ProductsAttributesId_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_PRODUCTS_ATTRIBUTES_ID), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [PRODUCTS_ID] + // - - - - - - - - -/ + + /** The attribute of productsId. */ + protected ConditionValue _productsId; + + /** + * Get the value of productsId. + * + * @return The value of productsId. + */ + public ConditionValue getProductsId() { + if (_productsId == null) { + _productsId = new ConditionValue(); + } + return _productsId; + } + + protected ConditionValue getCValueProductsId() { + return getProductsId(); + } + + + /** + * Add order-by of productsId as ASC. + * + * @return this. (NotNull) + */ + public BsProductsAttributesCQ addOrderBy_ProductsId_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_PRODUCTS_ID), null, true);return this; + } + + /** + * Add order-by of productsId as DESC. + * + * @return this. (NotNull) + */ + public BsProductsAttributesCQ addOrderBy_ProductsId_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_PRODUCTS_ID), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [OPTIONS_ID] + // - - - - - - - - -/ + + /** The attribute of optionsId. */ + protected ConditionValue _optionsId; + + /** + * Get the value of optionsId. + * + * @return The value of optionsId. + */ + public ConditionValue getOptionsId() { + if (_optionsId == null) { + _optionsId = new ConditionValue(); + } + return _optionsId; + } + + protected ConditionValue getCValueOptionsId() { + return getOptionsId(); + } + + + /** + * Add order-by of optionsId as ASC. + * + * @return this. (NotNull) + */ + public BsProductsAttributesCQ addOrderBy_OptionsId_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_OPTIONS_ID), null, true);return this; + } + + /** + * Add order-by of optionsId as DESC. + * + * @return this. (NotNull) + */ + public BsProductsAttributesCQ addOrderBy_OptionsId_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_OPTIONS_ID), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [OPTIONS_VALUES_ID] + // - - - - - - - - -/ + + /** The attribute of optionsValuesId. */ + protected ConditionValue _optionsValuesId; + + /** + * Get the value of optionsValuesId. + * + * @return The value of optionsValuesId. + */ + public ConditionValue getOptionsValuesId() { + if (_optionsValuesId == null) { + _optionsValuesId = new ConditionValue(); + } + return _optionsValuesId; + } + + protected ConditionValue getCValueOptionsValuesId() { + return getOptionsValuesId(); + } + + + /** + * Add order-by of optionsValuesId as ASC. + * + * @return this. (NotNull) + */ + public BsProductsAttributesCQ addOrderBy_OptionsValuesId_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_OPTIONS_VALUES_ID), null, true);return this; + } + + /** + * Add order-by of optionsValuesId as DESC. + * + * @return this. (NotNull) + */ + public BsProductsAttributesCQ addOrderBy_OptionsValuesId_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_OPTIONS_VALUES_ID), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [OPTIONS_VALUES_PRICE] + // - - - - - - - - -/ + + /** The attribute of optionsValuesPrice. */ + protected ConditionValue _optionsValuesPrice; + + /** + * Get the value of optionsValuesPrice. + * + * @return The value of optionsValuesPrice. + */ + public ConditionValue getOptionsValuesPrice() { + if (_optionsValuesPrice == null) { + _optionsValuesPrice = new ConditionValue(); + } + return _optionsValuesPrice; + } + + protected ConditionValue getCValueOptionsValuesPrice() { + return getOptionsValuesPrice(); + } + + + /** + * Add order-by of optionsValuesPrice as ASC. + * + * @return this. (NotNull) + */ + public BsProductsAttributesCQ addOrderBy_OptionsValuesPrice_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_OPTIONS_VALUES_PRICE), null, true);return this; + } + + /** + * Add order-by of optionsValuesPrice as DESC. + * + * @return this. (NotNull) + */ + public BsProductsAttributesCQ addOrderBy_OptionsValuesPrice_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_OPTIONS_VALUES_PRICE), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [PRICE_PREFIX] + // - - - - - - - - -/ + + /** The attribute of pricePrefix. */ + protected ConditionValue _pricePrefix; + + /** + * Get the value of pricePrefix. + * + * @return The value of pricePrefix. + */ + public ConditionValue getPricePrefix() { + if (_pricePrefix == null) { + _pricePrefix = new ConditionValue(); + } + return _pricePrefix; + } + + protected ConditionValue getCValuePricePrefix() { + return getPricePrefix(); + } + + + /** + * Add order-by of pricePrefix as ASC. + * + * @return this. (NotNull) + */ + public BsProductsAttributesCQ addOrderBy_PricePrefix_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_PRICE_PREFIX), null, true);return this; + } + + /** + * Add order-by of pricePrefix as DESC. + * + * @return this. (NotNull) + */ + public BsProductsAttributesCQ addOrderBy_PricePrefix_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_PRICE_PREFIX), null, false);return this; + } + + // =================================================================================== + // Union Query + // =========== + protected void reflectRelationOnUnionQuery(ConditionQuery baseQueryAsSuper, ConditionQuery unionQueryAsSuper) { + final ProductsAttributesCQ baseQuery = (ProductsAttributesCQ)baseQueryAsSuper; + final ProductsAttributesCQ unionQuery = (ProductsAttributesCQ)unionQueryAsSuper; + + } + + // =================================================================================== + // Foreign Query + // ============= + + +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/BsProductsAttributesDownloadCQ.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/BsProductsAttributesDownloadCQ.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/BsProductsAttributesDownloadCQ.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,320 @@ + +package jp.sf.pal.pompei.cbean.cq.bs; + +import jp.sf.pal.pompei.cbean.cq.*; + +import jp.sf.pal.pompei.allcommon.cbean.*; +import jp.sf.pal.pompei.allcommon.cbean.ckey.*; +import jp.sf.pal.pompei.allcommon.cbean.cvalue.ConditionValue; +import jp.sf.pal.pompei.allcommon.cbean.sqlclause.SqlClause; +import jp.sf.pal.pompei.cbean.cq.ciq.*; + +/** + * The condition-query of PRODUCTS_ATTRIBUTES_DOWNLOAD. + * + * @author DBFlute(AutoGenerator) + */ +public class BsProductsAttributesDownloadCQ extends AbstractBsProductsAttributesDownloadCQ { + + // =================================================================================== + // Attribute + // ========= + /** Corresponding inline query. */ + protected ProductsAttributesDownloadCIQ _inlineQuery; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param childQuery Child query as abstract class. (Nullable: If null, this is base instance.) + * @param sqlClause SQL clause instance. (NotNull) + * @param aliasName My alias name. (NotNull) + * @param nestLevel Nest level. + */ + public BsProductsAttributesDownloadCQ(ConditionQuery childQuery, SqlClause sqlClause, String aliasName, int nestLevel) { + super(childQuery, sqlClause, aliasName, nestLevel); + } + + // =================================================================================== + // Inline + // ====== + /** + * Get inline query. + * + * @return Inline query. (NotNull) + */ + public ProductsAttributesDownloadCIQ inline() { + if (_inlineQuery == null) { + _inlineQuery = new ProductsAttributesDownloadCIQ(getChildQuery(), getSqlClause(), getAliasName(), getNestLevel(), this); + } + return _inlineQuery; + } + + // =================================================================================== + // Include-as-Mine + // =============== + + /** + * Include select-column of productsAttributesId as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_ProductsAttributesId() { + registerIncludedSelectColumn("ProductsAttributesId", getRealColumnName("PRODUCTS_ATTRIBUTES_ID")); + } + + /** + * Include select-column of productsAttributesId as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_ProductsAttributesId(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("PRODUCTS_ATTRIBUTES_ID")); + } + + /** + * Include select-column of productsAttributesFilename as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_ProductsAttributesFilename() { + registerIncludedSelectColumn("ProductsAttributesFilename", getRealColumnName("PRODUCTS_ATTRIBUTES_FILENAME")); + } + + /** + * Include select-column of productsAttributesFilename as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_ProductsAttributesFilename(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("PRODUCTS_ATTRIBUTES_FILENAME")); + } + + /** + * Include select-column of productsAttributesMaxdays as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_ProductsAttributesMaxdays() { + registerIncludedSelectColumn("ProductsAttributesMaxdays", getRealColumnName("PRODUCTS_ATTRIBUTES_MAXDAYS")); + } + + /** + * Include select-column of productsAttributesMaxdays as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_ProductsAttributesMaxdays(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("PRODUCTS_ATTRIBUTES_MAXDAYS")); + } + + /** + * Include select-column of productsAttributesMaxcount as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_ProductsAttributesMaxcount() { + registerIncludedSelectColumn("ProductsAttributesMaxcount", getRealColumnName("PRODUCTS_ATTRIBUTES_MAXCOUNT")); + } + + /** + * Include select-column of productsAttributesMaxcount as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_ProductsAttributesMaxcount(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("PRODUCTS_ATTRIBUTES_MAXCOUNT")); + } + + // =================================================================================== + // Query + // ===== + // /* * * * * * * * * * * * * * * * * * * * * * * + // MyTable = [PRODUCTS_ATTRIBUTES_DOWNLOAD] + // * * * * * * * * */ + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [PRODUCTS_ATTRIBUTES_ID] + // - - - - - - - - -/ + + /** The attribute of productsAttributesId. */ + protected ConditionValue _productsAttributesId; + + /** + * Get the value of productsAttributesId. + * + * @return The value of productsAttributesId. + */ + public ConditionValue getProductsAttributesId() { + if (_productsAttributesId == null) { + _productsAttributesId = new ConditionValue(); + } + return _productsAttributesId; + } + + protected ConditionValue getCValueProductsAttributesId() { + return getProductsAttributesId(); + } + + + /** + * Add order-by of productsAttributesId as ASC. + * + * @return this. (NotNull) + */ + public BsProductsAttributesDownloadCQ addOrderBy_ProductsAttributesId_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_PRODUCTS_ATTRIBUTES_ID), null, true);return this; + } + + /** + * Add order-by of productsAttributesId as DESC. + * + * @return this. (NotNull) + */ + public BsProductsAttributesDownloadCQ addOrderBy_ProductsAttributesId_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_PRODUCTS_ATTRIBUTES_ID), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [PRODUCTS_ATTRIBUTES_FILENAME] + // - - - - - - - - -/ + + /** The attribute of productsAttributesFilename. */ + protected ConditionValue _productsAttributesFilename; + + /** + * Get the value of productsAttributesFilename. + * + * @return The value of productsAttributesFilename. + */ + public ConditionValue getProductsAttributesFilename() { + if (_productsAttributesFilename == null) { + _productsAttributesFilename = new ConditionValue(); + } + return _productsAttributesFilename; + } + + protected ConditionValue getCValueProductsAttributesFilename() { + return getProductsAttributesFilename(); + } + + + /** + * Add order-by of productsAttributesFilename as ASC. + * + * @return this. (NotNull) + */ + public BsProductsAttributesDownloadCQ addOrderBy_ProductsAttributesFilename_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_PRODUCTS_ATTRIBUTES_FILENAME), null, true);return this; + } + + /** + * Add order-by of productsAttributesFilename as DESC. + * + * @return this. (NotNull) + */ + public BsProductsAttributesDownloadCQ addOrderBy_ProductsAttributesFilename_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_PRODUCTS_ATTRIBUTES_FILENAME), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [PRODUCTS_ATTRIBUTES_MAXDAYS] + // - - - - - - - - -/ + + /** The attribute of productsAttributesMaxdays. */ + protected ConditionValue _productsAttributesMaxdays; + + /** + * Get the value of productsAttributesMaxdays. + * + * @return The value of productsAttributesMaxdays. + */ + public ConditionValue getProductsAttributesMaxdays() { + if (_productsAttributesMaxdays == null) { + _productsAttributesMaxdays = new ConditionValue(); + } + return _productsAttributesMaxdays; + } + + protected ConditionValue getCValueProductsAttributesMaxdays() { + return getProductsAttributesMaxdays(); + } + + + /** + * Add order-by of productsAttributesMaxdays as ASC. + * + * @return this. (NotNull) + */ + public BsProductsAttributesDownloadCQ addOrderBy_ProductsAttributesMaxdays_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_PRODUCTS_ATTRIBUTES_MAXDAYS), null, true);return this; + } + + /** + * Add order-by of productsAttributesMaxdays as DESC. + * + * @return this. (NotNull) + */ + public BsProductsAttributesDownloadCQ addOrderBy_ProductsAttributesMaxdays_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_PRODUCTS_ATTRIBUTES_MAXDAYS), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [PRODUCTS_ATTRIBUTES_MAXCOUNT] + // - - - - - - - - -/ + + /** The attribute of productsAttributesMaxcount. */ + protected ConditionValue _productsAttributesMaxcount; + + /** + * Get the value of productsAttributesMaxcount. + * + * @return The value of productsAttributesMaxcount. + */ + public ConditionValue getProductsAttributesMaxcount() { + if (_productsAttributesMaxcount == null) { + _productsAttributesMaxcount = new ConditionValue(); + } + return _productsAttributesMaxcount; + } + + protected ConditionValue getCValueProductsAttributesMaxcount() { + return getProductsAttributesMaxcount(); + } + + + /** + * Add order-by of productsAttributesMaxcount as ASC. + * + * @return this. (NotNull) + */ + public BsProductsAttributesDownloadCQ addOrderBy_ProductsAttributesMaxcount_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_PRODUCTS_ATTRIBUTES_MAXCOUNT), null, true);return this; + } + + /** + * Add order-by of productsAttributesMaxcount as DESC. + * + * @return this. (NotNull) + */ + public BsProductsAttributesDownloadCQ addOrderBy_ProductsAttributesMaxcount_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_PRODUCTS_ATTRIBUTES_MAXCOUNT), null, false);return this; + } + + // =================================================================================== + // Union Query + // =========== + protected void reflectRelationOnUnionQuery(ConditionQuery baseQueryAsSuper, ConditionQuery unionQueryAsSuper) { + final ProductsAttributesDownloadCQ baseQuery = (ProductsAttributesDownloadCQ)baseQueryAsSuper; + final ProductsAttributesDownloadCQ unionQuery = (ProductsAttributesDownloadCQ)unionQueryAsSuper; + + } + + // =================================================================================== + // Foreign Query + // ============= + + +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/BsProductsCQ.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/BsProductsCQ.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/BsProductsCQ.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,860 @@ + +package jp.sf.pal.pompei.cbean.cq.bs; + +import jp.sf.pal.pompei.cbean.cq.*; + +import jp.sf.pal.pompei.allcommon.cbean.*; +import jp.sf.pal.pompei.allcommon.cbean.ckey.*; +import jp.sf.pal.pompei.allcommon.cbean.cvalue.ConditionValue; +import jp.sf.pal.pompei.allcommon.cbean.sqlclause.SqlClause; +import jp.sf.pal.pompei.cbean.cq.ciq.*; + +/** + * The condition-query of PRODUCTS. + * + * @author DBFlute(AutoGenerator) + */ +public class BsProductsCQ extends AbstractBsProductsCQ { + + // =================================================================================== + // Attribute + // ========= + /** Corresponding inline query. */ + protected ProductsCIQ _inlineQuery; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param childQuery Child query as abstract class. (Nullable: If null, this is base instance.) + * @param sqlClause SQL clause instance. (NotNull) + * @param aliasName My alias name. (NotNull) + * @param nestLevel Nest level. + */ + public BsProductsCQ(ConditionQuery childQuery, SqlClause sqlClause, String aliasName, int nestLevel) { + super(childQuery, sqlClause, aliasName, nestLevel); + } + + // =================================================================================== + // Inline + // ====== + /** + * Get inline query. + * + * @return Inline query. (NotNull) + */ + public ProductsCIQ inline() { + if (_inlineQuery == null) { + _inlineQuery = new ProductsCIQ(getChildQuery(), getSqlClause(), getAliasName(), getNestLevel(), this); + } + return _inlineQuery; + } + + // =================================================================================== + // Include-as-Mine + // =============== + + /** + * Include select-column of productsId as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_ProductsId() { + registerIncludedSelectColumn("ProductsId", getRealColumnName("PRODUCTS_ID")); + } + + /** + * Include select-column of productsId as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_ProductsId(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("PRODUCTS_ID")); + } + + /** + * Include select-column of productsQuantity as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_ProductsQuantity() { + registerIncludedSelectColumn("ProductsQuantity", getRealColumnName("PRODUCTS_QUANTITY")); + } + + /** + * Include select-column of productsQuantity as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_ProductsQuantity(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("PRODUCTS_QUANTITY")); + } + + /** + * Include select-column of productsModel as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_ProductsModel() { + registerIncludedSelectColumn("ProductsModel", getRealColumnName("PRODUCTS_MODEL")); + } + + /** + * Include select-column of productsModel as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_ProductsModel(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("PRODUCTS_MODEL")); + } + + /** + * Include select-column of productsImage as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_ProductsImage() { + registerIncludedSelectColumn("ProductsImage", getRealColumnName("PRODUCTS_IMAGE")); + } + + /** + * Include select-column of productsImage as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_ProductsImage(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("PRODUCTS_IMAGE")); + } + + /** + * Include select-column of productsPrice as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_ProductsPrice() { + registerIncludedSelectColumn("ProductsPrice", getRealColumnName("PRODUCTS_PRICE")); + } + + /** + * Include select-column of productsPrice as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_ProductsPrice(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("PRODUCTS_PRICE")); + } + + /** + * Include select-column of productsDateAdded as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_ProductsDateAdded() { + registerIncludedSelectColumn("ProductsDateAdded", getRealColumnName("PRODUCTS_DATE_ADDED")); + } + + /** + * Include select-column of productsDateAdded as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_ProductsDateAdded(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("PRODUCTS_DATE_ADDED")); + } + + /** + * Include select-column of productsLastModified as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_ProductsLastModified() { + registerIncludedSelectColumn("ProductsLastModified", getRealColumnName("PRODUCTS_LAST_MODIFIED")); + } + + /** + * Include select-column of productsLastModified as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_ProductsLastModified(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("PRODUCTS_LAST_MODIFIED")); + } + + /** + * Include select-column of productsDateAvailable as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_ProductsDateAvailable() { + registerIncludedSelectColumn("ProductsDateAvailable", getRealColumnName("PRODUCTS_DATE_AVAILABLE")); + } + + /** + * Include select-column of productsDateAvailable as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_ProductsDateAvailable(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("PRODUCTS_DATE_AVAILABLE")); + } + + /** + * Include select-column of productsWeight as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_ProductsWeight() { + registerIncludedSelectColumn("ProductsWeight", getRealColumnName("PRODUCTS_WEIGHT")); + } + + /** + * Include select-column of productsWeight as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_ProductsWeight(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("PRODUCTS_WEIGHT")); + } + + /** + * Include select-column of productsStatus as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_ProductsStatus() { + registerIncludedSelectColumn("ProductsStatus", getRealColumnName("PRODUCTS_STATUS")); + } + + /** + * Include select-column of productsStatus as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_ProductsStatus(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("PRODUCTS_STATUS")); + } + + /** + * Include select-column of productsTaxClassId as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_ProductsTaxClassId() { + registerIncludedSelectColumn("ProductsTaxClassId", getRealColumnName("PRODUCTS_TAX_CLASS_ID")); + } + + /** + * Include select-column of productsTaxClassId as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_ProductsTaxClassId(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("PRODUCTS_TAX_CLASS_ID")); + } + + /** + * Include select-column of manufacturersId as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_ManufacturersId() { + registerIncludedSelectColumn("ManufacturersId", getRealColumnName("MANUFACTURERS_ID")); + } + + /** + * Include select-column of manufacturersId as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_ManufacturersId(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("MANUFACTURERS_ID")); + } + + /** + * Include select-column of productsOrdered as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_ProductsOrdered() { + registerIncludedSelectColumn("ProductsOrdered", getRealColumnName("PRODUCTS_ORDERED")); + } + + /** + * Include select-column of productsOrdered as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_ProductsOrdered(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("PRODUCTS_ORDERED")); + } + + // =================================================================================== + // Query + // ===== + // /* * * * * * * * * * * * * * * * * * * * * * * + // MyTable = [PRODUCTS] + // * * * * * * * * */ + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [PRODUCTS_ID] + // - - - - - - - - -/ + + /** The attribute of productsId. */ + protected ConditionValue _productsId; + + /** + * Get the value of productsId. + * + * @return The value of productsId. + */ + public ConditionValue getProductsId() { + if (_productsId == null) { + _productsId = new ConditionValue(); + } + return _productsId; + } + + protected ConditionValue getCValueProductsId() { + return getProductsId(); + } + + + /** + * Add order-by of productsId as ASC. + * + * @return this. (NotNull) + */ + public BsProductsCQ addOrderBy_ProductsId_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_PRODUCTS_ID), null, true);return this; + } + + /** + * Add order-by of productsId as DESC. + * + * @return this. (NotNull) + */ + public BsProductsCQ addOrderBy_ProductsId_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_PRODUCTS_ID), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [PRODUCTS_QUANTITY] + // - - - - - - - - -/ + + /** The attribute of productsQuantity. */ + protected ConditionValue _productsQuantity; + + /** + * Get the value of productsQuantity. + * + * @return The value of productsQuantity. + */ + public ConditionValue getProductsQuantity() { + if (_productsQuantity == null) { + _productsQuantity = new ConditionValue(); + } + return _productsQuantity; + } + + protected ConditionValue getCValueProductsQuantity() { + return getProductsQuantity(); + } + + + /** + * Add order-by of productsQuantity as ASC. + * + * @return this. (NotNull) + */ + public BsProductsCQ addOrderBy_ProductsQuantity_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_PRODUCTS_QUANTITY), null, true);return this; + } + + /** + * Add order-by of productsQuantity as DESC. + * + * @return this. (NotNull) + */ + public BsProductsCQ addOrderBy_ProductsQuantity_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_PRODUCTS_QUANTITY), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [PRODUCTS_MODEL] + // - - - - - - - - -/ + + /** The attribute of productsModel. */ + protected ConditionValue _productsModel; + + /** + * Get the value of productsModel. + * + * @return The value of productsModel. + */ + public ConditionValue getProductsModel() { + if (_productsModel == null) { + _productsModel = new ConditionValue(); + } + return _productsModel; + } + + protected ConditionValue getCValueProductsModel() { + return getProductsModel(); + } + + + /** + * Add order-by of productsModel as ASC. + * + * @return this. (NotNull) + */ + public BsProductsCQ addOrderBy_ProductsModel_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_PRODUCTS_MODEL), null, true);return this; + } + + /** + * Add order-by of productsModel as DESC. + * + * @return this. (NotNull) + */ + public BsProductsCQ addOrderBy_ProductsModel_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_PRODUCTS_MODEL), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [PRODUCTS_IMAGE] + // - - - - - - - - -/ + + /** The attribute of productsImage. */ + protected ConditionValue _productsImage; + + /** + * Get the value of productsImage. + * + * @return The value of productsImage. + */ + public ConditionValue getProductsImage() { + if (_productsImage == null) { + _productsImage = new ConditionValue(); + } + return _productsImage; + } + + protected ConditionValue getCValueProductsImage() { + return getProductsImage(); + } + + + /** + * Add order-by of productsImage as ASC. + * + * @return this. (NotNull) + */ + public BsProductsCQ addOrderBy_ProductsImage_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_PRODUCTS_IMAGE), null, true);return this; + } + + /** + * Add order-by of productsImage as DESC. + * + * @return this. (NotNull) + */ + public BsProductsCQ addOrderBy_ProductsImage_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_PRODUCTS_IMAGE), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [PRODUCTS_PRICE] + // - - - - - - - - -/ + + /** The attribute of productsPrice. */ + protected ConditionValue _productsPrice; + + /** + * Get the value of productsPrice. + * + * @return The value of productsPrice. + */ + public ConditionValue getProductsPrice() { + if (_productsPrice == null) { + _productsPrice = new ConditionValue(); + } + return _productsPrice; + } + + protected ConditionValue getCValueProductsPrice() { + return getProductsPrice(); + } + + + /** + * Add order-by of productsPrice as ASC. + * + * @return this. (NotNull) + */ + public BsProductsCQ addOrderBy_ProductsPrice_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_PRODUCTS_PRICE), null, true);return this; + } + + /** + * Add order-by of productsPrice as DESC. + * + * @return this. (NotNull) + */ + public BsProductsCQ addOrderBy_ProductsPrice_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_PRODUCTS_PRICE), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [PRODUCTS_DATE_ADDED] + // - - - - - - - - -/ + + /** The attribute of productsDateAdded. */ + protected ConditionValue _productsDateAdded; + + /** + * Get the value of productsDateAdded. + * + * @return The value of productsDateAdded. + */ + public ConditionValue getProductsDateAdded() { + if (_productsDateAdded == null) { + _productsDateAdded = new ConditionValue(); + } + return _productsDateAdded; + } + + protected ConditionValue getCValueProductsDateAdded() { + return getProductsDateAdded(); + } + + + /** + * Add order-by of productsDateAdded as ASC. + * + * @return this. (NotNull) + */ + public BsProductsCQ addOrderBy_ProductsDateAdded_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_PRODUCTS_DATE_ADDED), null, true);return this; + } + + /** + * Add order-by of productsDateAdded as DESC. + * + * @return this. (NotNull) + */ + public BsProductsCQ addOrderBy_ProductsDateAdded_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_PRODUCTS_DATE_ADDED), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [PRODUCTS_LAST_MODIFIED] + // - - - - - - - - -/ + + /** The attribute of productsLastModified. */ + protected ConditionValue _productsLastModified; + + /** + * Get the value of productsLastModified. + * + * @return The value of productsLastModified. + */ + public ConditionValue getProductsLastModified() { + if (_productsLastModified == null) { + _productsLastModified = new ConditionValue(); + } + return _productsLastModified; + } + + protected ConditionValue getCValueProductsLastModified() { + return getProductsLastModified(); + } + + + /** + * Add order-by of productsLastModified as ASC. + * + * @return this. (NotNull) + */ + public BsProductsCQ addOrderBy_ProductsLastModified_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_PRODUCTS_LAST_MODIFIED), null, true);return this; + } + + /** + * Add order-by of productsLastModified as DESC. + * + * @return this. (NotNull) + */ + public BsProductsCQ addOrderBy_ProductsLastModified_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_PRODUCTS_LAST_MODIFIED), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [PRODUCTS_DATE_AVAILABLE] + // - - - - - - - - -/ + + /** The attribute of productsDateAvailable. */ + protected ConditionValue _productsDateAvailable; + + /** + * Get the value of productsDateAvailable. + * + * @return The value of productsDateAvailable. + */ + public ConditionValue getProductsDateAvailable() { + if (_productsDateAvailable == null) { + _productsDateAvailable = new ConditionValue(); + } + return _productsDateAvailable; + } + + protected ConditionValue getCValueProductsDateAvailable() { + return getProductsDateAvailable(); + } + + + /** + * Add order-by of productsDateAvailable as ASC. + * + * @return this. (NotNull) + */ + public BsProductsCQ addOrderBy_ProductsDateAvailable_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_PRODUCTS_DATE_AVAILABLE), null, true);return this; + } + + /** + * Add order-by of productsDateAvailable as DESC. + * + * @return this. (NotNull) + */ + public BsProductsCQ addOrderBy_ProductsDateAvailable_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_PRODUCTS_DATE_AVAILABLE), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [PRODUCTS_WEIGHT] + // - - - - - - - - -/ + + /** The attribute of productsWeight. */ + protected ConditionValue _productsWeight; + + /** + * Get the value of productsWeight. + * + * @return The value of productsWeight. + */ + public ConditionValue getProductsWeight() { + if (_productsWeight == null) { + _productsWeight = new ConditionValue(); + } + return _productsWeight; + } + + protected ConditionValue getCValueProductsWeight() { + return getProductsWeight(); + } + + + /** + * Add order-by of productsWeight as ASC. + * + * @return this. (NotNull) + */ + public BsProductsCQ addOrderBy_ProductsWeight_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_PRODUCTS_WEIGHT), null, true);return this; + } + + /** + * Add order-by of productsWeight as DESC. + * + * @return this. (NotNull) + */ + public BsProductsCQ addOrderBy_ProductsWeight_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_PRODUCTS_WEIGHT), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [PRODUCTS_STATUS] + // - - - - - - - - -/ + + /** The attribute of productsStatus. */ + protected ConditionValue _productsStatus; + + /** + * Get the value of productsStatus. + * + * @return The value of productsStatus. + */ + public ConditionValue getProductsStatus() { + if (_productsStatus == null) { + _productsStatus = new ConditionValue(); + } + return _productsStatus; + } + + protected ConditionValue getCValueProductsStatus() { + return getProductsStatus(); + } + + + /** + * Add order-by of productsStatus as ASC. + * + * @return this. (NotNull) + */ + public BsProductsCQ addOrderBy_ProductsStatus_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_PRODUCTS_STATUS), null, true);return this; + } + + /** + * Add order-by of productsStatus as DESC. + * + * @return this. (NotNull) + */ + public BsProductsCQ addOrderBy_ProductsStatus_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_PRODUCTS_STATUS), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [PRODUCTS_TAX_CLASS_ID] + // - - - - - - - - -/ + + /** The attribute of productsTaxClassId. */ + protected ConditionValue _productsTaxClassId; + + /** + * Get the value of productsTaxClassId. + * + * @return The value of productsTaxClassId. + */ + public ConditionValue getProductsTaxClassId() { + if (_productsTaxClassId == null) { + _productsTaxClassId = new ConditionValue(); + } + return _productsTaxClassId; + } + + protected ConditionValue getCValueProductsTaxClassId() { + return getProductsTaxClassId(); + } + + + /** + * Add order-by of productsTaxClassId as ASC. + * + * @return this. (NotNull) + */ + public BsProductsCQ addOrderBy_ProductsTaxClassId_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_PRODUCTS_TAX_CLASS_ID), null, true);return this; + } + + /** + * Add order-by of productsTaxClassId as DESC. + * + * @return this. (NotNull) + */ + public BsProductsCQ addOrderBy_ProductsTaxClassId_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_PRODUCTS_TAX_CLASS_ID), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [MANUFACTURERS_ID] + // - - - - - - - - -/ + + /** The attribute of manufacturersId. */ + protected ConditionValue _manufacturersId; + + /** + * Get the value of manufacturersId. + * + * @return The value of manufacturersId. + */ + public ConditionValue getManufacturersId() { + if (_manufacturersId == null) { + _manufacturersId = new ConditionValue(); + } + return _manufacturersId; + } + + protected ConditionValue getCValueManufacturersId() { + return getManufacturersId(); + } + + + /** + * Add order-by of manufacturersId as ASC. + * + * @return this. (NotNull) + */ + public BsProductsCQ addOrderBy_ManufacturersId_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_MANUFACTURERS_ID), null, true);return this; + } + + /** + * Add order-by of manufacturersId as DESC. + * + * @return this. (NotNull) + */ + public BsProductsCQ addOrderBy_ManufacturersId_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_MANUFACTURERS_ID), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [PRODUCTS_ORDERED] + // - - - - - - - - -/ + + /** The attribute of productsOrdered. */ + protected ConditionValue _productsOrdered; + + /** + * Get the value of productsOrdered. + * + * @return The value of productsOrdered. + */ + public ConditionValue getProductsOrdered() { + if (_productsOrdered == null) { + _productsOrdered = new ConditionValue(); + } + return _productsOrdered; + } + + protected ConditionValue getCValueProductsOrdered() { + return getProductsOrdered(); + } + + + /** + * Add order-by of productsOrdered as ASC. + * + * @return this. (NotNull) + */ + public BsProductsCQ addOrderBy_ProductsOrdered_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_PRODUCTS_ORDERED), null, true);return this; + } + + /** + * Add order-by of productsOrdered as DESC. + * + * @return this. (NotNull) + */ + public BsProductsCQ addOrderBy_ProductsOrdered_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_PRODUCTS_ORDERED), null, false);return this; + } + + // =================================================================================== + // Union Query + // =========== + protected void reflectRelationOnUnionQuery(ConditionQuery baseQueryAsSuper, ConditionQuery unionQueryAsSuper) { + final ProductsCQ baseQuery = (ProductsCQ)baseQueryAsSuper; + final ProductsCQ unionQuery = (ProductsCQ)unionQueryAsSuper; + + } + + // =================================================================================== + // Foreign Query + // ============= + + +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/BsProductsDescriptionCQ.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/BsProductsDescriptionCQ.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/BsProductsDescriptionCQ.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,440 @@ + +package jp.sf.pal.pompei.cbean.cq.bs; + +import jp.sf.pal.pompei.cbean.cq.*; + +import jp.sf.pal.pompei.allcommon.cbean.*; +import jp.sf.pal.pompei.allcommon.cbean.ckey.*; +import jp.sf.pal.pompei.allcommon.cbean.cvalue.ConditionValue; +import jp.sf.pal.pompei.allcommon.cbean.sqlclause.SqlClause; +import jp.sf.pal.pompei.cbean.cq.ciq.*; + +/** + * The condition-query of PRODUCTS_DESCRIPTION. + * + * @author DBFlute(AutoGenerator) + */ +public class BsProductsDescriptionCQ extends AbstractBsProductsDescriptionCQ { + + // =================================================================================== + // Attribute + // ========= + /** Corresponding inline query. */ + protected ProductsDescriptionCIQ _inlineQuery; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param childQuery Child query as abstract class. (Nullable: If null, this is base instance.) + * @param sqlClause SQL clause instance. (NotNull) + * @param aliasName My alias name. (NotNull) + * @param nestLevel Nest level. + */ + public BsProductsDescriptionCQ(ConditionQuery childQuery, SqlClause sqlClause, String aliasName, int nestLevel) { + super(childQuery, sqlClause, aliasName, nestLevel); + } + + // =================================================================================== + // Inline + // ====== + /** + * Get inline query. + * + * @return Inline query. (NotNull) + */ + public ProductsDescriptionCIQ inline() { + if (_inlineQuery == null) { + _inlineQuery = new ProductsDescriptionCIQ(getChildQuery(), getSqlClause(), getAliasName(), getNestLevel(), this); + } + return _inlineQuery; + } + + // =================================================================================== + // Include-as-Mine + // =============== + + /** + * Include select-column of productsId as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_ProductsId() { + registerIncludedSelectColumn("ProductsId", getRealColumnName("PRODUCTS_ID")); + } + + /** + * Include select-column of productsId as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_ProductsId(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("PRODUCTS_ID")); + } + + /** + * Include select-column of languageId as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_LanguageId() { + registerIncludedSelectColumn("LanguageId", getRealColumnName("LANGUAGE_ID")); + } + + /** + * Include select-column of languageId as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_LanguageId(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("LANGUAGE_ID")); + } + + /** + * Include select-column of productsName as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_ProductsName() { + registerIncludedSelectColumn("ProductsName", getRealColumnName("PRODUCTS_NAME")); + } + + /** + * Include select-column of productsName as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_ProductsName(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("PRODUCTS_NAME")); + } + + /** + * Include select-column of productsDescription as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_ProductsDescription() { + registerIncludedSelectColumn("ProductsDescription", getRealColumnName("PRODUCTS_DESCRIPTION")); + } + + /** + * Include select-column of productsDescription as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_ProductsDescription(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("PRODUCTS_DESCRIPTION")); + } + + /** + * Include select-column of productsUrl as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_ProductsUrl() { + registerIncludedSelectColumn("ProductsUrl", getRealColumnName("PRODUCTS_URL")); + } + + /** + * Include select-column of productsUrl as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_ProductsUrl(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("PRODUCTS_URL")); + } + + /** + * Include select-column of productsViewed as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_ProductsViewed() { + registerIncludedSelectColumn("ProductsViewed", getRealColumnName("PRODUCTS_VIEWED")); + } + + /** + * Include select-column of productsViewed as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_ProductsViewed(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("PRODUCTS_VIEWED")); + } + + // =================================================================================== + // Query + // ===== + // /* * * * * * * * * * * * * * * * * * * * * * * + // MyTable = [PRODUCTS_DESCRIPTION] + // * * * * * * * * */ + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [PRODUCTS_ID] + // - - - - - - - - -/ + + /** The attribute of productsId. */ + protected ConditionValue _productsId; + + /** + * Get the value of productsId. + * + * @return The value of productsId. + */ + public ConditionValue getProductsId() { + if (_productsId == null) { + _productsId = new ConditionValue(); + } + return _productsId; + } + + protected ConditionValue getCValueProductsId() { + return getProductsId(); + } + + + /** + * Add order-by of productsId as ASC. + * + * @return this. (NotNull) + */ + public BsProductsDescriptionCQ addOrderBy_ProductsId_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_PRODUCTS_ID), null, true);return this; + } + + /** + * Add order-by of productsId as DESC. + * + * @return this. (NotNull) + */ + public BsProductsDescriptionCQ addOrderBy_ProductsId_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_PRODUCTS_ID), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [LANGUAGE_ID] + // - - - - - - - - -/ + + /** The attribute of languageId. */ + protected ConditionValue _languageId; + + /** + * Get the value of languageId. + * + * @return The value of languageId. + */ + public ConditionValue getLanguageId() { + if (_languageId == null) { + _languageId = new ConditionValue(); + } + return _languageId; + } + + protected ConditionValue getCValueLanguageId() { + return getLanguageId(); + } + + + /** + * Add order-by of languageId as ASC. + * + * @return this. (NotNull) + */ + public BsProductsDescriptionCQ addOrderBy_LanguageId_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_LANGUAGE_ID), null, true);return this; + } + + /** + * Add order-by of languageId as DESC. + * + * @return this. (NotNull) + */ + public BsProductsDescriptionCQ addOrderBy_LanguageId_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_LANGUAGE_ID), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [PRODUCTS_NAME] + // - - - - - - - - -/ + + /** The attribute of productsName. */ + protected ConditionValue _productsName; + + /** + * Get the value of productsName. + * + * @return The value of productsName. + */ + public ConditionValue getProductsName() { + if (_productsName == null) { + _productsName = new ConditionValue(); + } + return _productsName; + } + + protected ConditionValue getCValueProductsName() { + return getProductsName(); + } + + + /** + * Add order-by of productsName as ASC. + * + * @return this. (NotNull) + */ + public BsProductsDescriptionCQ addOrderBy_ProductsName_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_PRODUCTS_NAME), null, true);return this; + } + + /** + * Add order-by of productsName as DESC. + * + * @return this. (NotNull) + */ + public BsProductsDescriptionCQ addOrderBy_ProductsName_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_PRODUCTS_NAME), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [PRODUCTS_DESCRIPTION] + // - - - - - - - - -/ + + /** The attribute of productsDescription. */ + protected ConditionValue _productsDescription; + + /** + * Get the value of productsDescription. + * + * @return The value of productsDescription. + */ + public ConditionValue getProductsDescription() { + if (_productsDescription == null) { + _productsDescription = new ConditionValue(); + } + return _productsDescription; + } + + protected ConditionValue getCValueProductsDescription() { + return getProductsDescription(); + } + + + /** + * Add order-by of productsDescription as ASC. + * + * @return this. (NotNull) + */ + public BsProductsDescriptionCQ addOrderBy_ProductsDescription_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_PRODUCTS_DESCRIPTION), null, true);return this; + } + + /** + * Add order-by of productsDescription as DESC. + * + * @return this. (NotNull) + */ + public BsProductsDescriptionCQ addOrderBy_ProductsDescription_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_PRODUCTS_DESCRIPTION), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [PRODUCTS_URL] + // - - - - - - - - -/ + + /** The attribute of productsUrl. */ + protected ConditionValue _productsUrl; + + /** + * Get the value of productsUrl. + * + * @return The value of productsUrl. + */ + public ConditionValue getProductsUrl() { + if (_productsUrl == null) { + _productsUrl = new ConditionValue(); + } + return _productsUrl; + } + + protected ConditionValue getCValueProductsUrl() { + return getProductsUrl(); + } + + + /** + * Add order-by of productsUrl as ASC. + * + * @return this. (NotNull) + */ + public BsProductsDescriptionCQ addOrderBy_ProductsUrl_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_PRODUCTS_URL), null, true);return this; + } + + /** + * Add order-by of productsUrl as DESC. + * + * @return this. (NotNull) + */ + public BsProductsDescriptionCQ addOrderBy_ProductsUrl_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_PRODUCTS_URL), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [PRODUCTS_VIEWED] + // - - - - - - - - -/ + + /** The attribute of productsViewed. */ + protected ConditionValue _productsViewed; + + /** + * Get the value of productsViewed. + * + * @return The value of productsViewed. + */ + public ConditionValue getProductsViewed() { + if (_productsViewed == null) { + _productsViewed = new ConditionValue(); + } + return _productsViewed; + } + + protected ConditionValue getCValueProductsViewed() { + return getProductsViewed(); + } + + + /** + * Add order-by of productsViewed as ASC. + * + * @return this. (NotNull) + */ + public BsProductsDescriptionCQ addOrderBy_ProductsViewed_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_PRODUCTS_VIEWED), null, true);return this; + } + + /** + * Add order-by of productsViewed as DESC. + * + * @return this. (NotNull) + */ + public BsProductsDescriptionCQ addOrderBy_ProductsViewed_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_PRODUCTS_VIEWED), null, false);return this; + } + + // =================================================================================== + // Union Query + // =========== + protected void reflectRelationOnUnionQuery(ConditionQuery baseQueryAsSuper, ConditionQuery unionQueryAsSuper) { + final ProductsDescriptionCQ baseQuery = (ProductsDescriptionCQ)baseQueryAsSuper; + final ProductsDescriptionCQ unionQuery = (ProductsDescriptionCQ)unionQueryAsSuper; + + } + + // =================================================================================== + // Foreign Query + // ============= + + +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/BsProductsNotificationsCQ.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/BsProductsNotificationsCQ.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/BsProductsNotificationsCQ.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,260 @@ + +package jp.sf.pal.pompei.cbean.cq.bs; + +import jp.sf.pal.pompei.cbean.cq.*; + +import jp.sf.pal.pompei.allcommon.cbean.*; +import jp.sf.pal.pompei.allcommon.cbean.ckey.*; +import jp.sf.pal.pompei.allcommon.cbean.cvalue.ConditionValue; +import jp.sf.pal.pompei.allcommon.cbean.sqlclause.SqlClause; +import jp.sf.pal.pompei.cbean.cq.ciq.*; + +/** + * The condition-query of PRODUCTS_NOTIFICATIONS. + * + * @author DBFlute(AutoGenerator) + */ +public class BsProductsNotificationsCQ extends AbstractBsProductsNotificationsCQ { + + // =================================================================================== + // Attribute + // ========= + /** Corresponding inline query. */ + protected ProductsNotificationsCIQ _inlineQuery; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param childQuery Child query as abstract class. (Nullable: If null, this is base instance.) + * @param sqlClause SQL clause instance. (NotNull) + * @param aliasName My alias name. (NotNull) + * @param nestLevel Nest level. + */ + public BsProductsNotificationsCQ(ConditionQuery childQuery, SqlClause sqlClause, String aliasName, int nestLevel) { + super(childQuery, sqlClause, aliasName, nestLevel); + } + + // =================================================================================== + // Inline + // ====== + /** + * Get inline query. + * + * @return Inline query. (NotNull) + */ + public ProductsNotificationsCIQ inline() { + if (_inlineQuery == null) { + _inlineQuery = new ProductsNotificationsCIQ(getChildQuery(), getSqlClause(), getAliasName(), getNestLevel(), this); + } + return _inlineQuery; + } + + // =================================================================================== + // Include-as-Mine + // =============== + + /** + * Include select-column of productsId as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_ProductsId() { + registerIncludedSelectColumn("ProductsId", getRealColumnName("PRODUCTS_ID")); + } + + /** + * Include select-column of productsId as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_ProductsId(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("PRODUCTS_ID")); + } + + /** + * Include select-column of customersId as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_CustomersId() { + registerIncludedSelectColumn("CustomersId", getRealColumnName("CUSTOMERS_ID")); + } + + /** + * Include select-column of customersId as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_CustomersId(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("CUSTOMERS_ID")); + } + + /** + * Include select-column of dateAdded as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_DateAdded() { + registerIncludedSelectColumn("DateAdded", getRealColumnName("DATE_ADDED")); + } + + /** + * Include select-column of dateAdded as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_DateAdded(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("DATE_ADDED")); + } + + // =================================================================================== + // Query + // ===== + // /* * * * * * * * * * * * * * * * * * * * * * * + // MyTable = [PRODUCTS_NOTIFICATIONS] + // * * * * * * * * */ + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [PRODUCTS_ID] + // - - - - - - - - -/ + + /** The attribute of productsId. */ + protected ConditionValue _productsId; + + /** + * Get the value of productsId. + * + * @return The value of productsId. + */ + public ConditionValue getProductsId() { + if (_productsId == null) { + _productsId = new ConditionValue(); + } + return _productsId; + } + + protected ConditionValue getCValueProductsId() { + return getProductsId(); + } + + + /** + * Add order-by of productsId as ASC. + * + * @return this. (NotNull) + */ + public BsProductsNotificationsCQ addOrderBy_ProductsId_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_PRODUCTS_ID), null, true);return this; + } + + /** + * Add order-by of productsId as DESC. + * + * @return this. (NotNull) + */ + public BsProductsNotificationsCQ addOrderBy_ProductsId_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_PRODUCTS_ID), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [CUSTOMERS_ID] + // - - - - - - - - -/ + + /** The attribute of customersId. */ + protected ConditionValue _customersId; + + /** + * Get the value of customersId. + * + * @return The value of customersId. + */ + public ConditionValue getCustomersId() { + if (_customersId == null) { + _customersId = new ConditionValue(); + } + return _customersId; + } + + protected ConditionValue getCValueCustomersId() { + return getCustomersId(); + } + + + /** + * Add order-by of customersId as ASC. + * + * @return this. (NotNull) + */ + public BsProductsNotificationsCQ addOrderBy_CustomersId_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_CUSTOMERS_ID), null, true);return this; + } + + /** + * Add order-by of customersId as DESC. + * + * @return this. (NotNull) + */ + public BsProductsNotificationsCQ addOrderBy_CustomersId_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_CUSTOMERS_ID), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [DATE_ADDED] + // - - - - - - - - -/ + + /** The attribute of dateAdded. */ + protected ConditionValue _dateAdded; + + /** + * Get the value of dateAdded. + * + * @return The value of dateAdded. + */ + public ConditionValue getDateAdded() { + if (_dateAdded == null) { + _dateAdded = new ConditionValue(); + } + return _dateAdded; + } + + protected ConditionValue getCValueDateAdded() { + return getDateAdded(); + } + + + /** + * Add order-by of dateAdded as ASC. + * + * @return this. (NotNull) + */ + public BsProductsNotificationsCQ addOrderBy_DateAdded_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_DATE_ADDED), null, true);return this; + } + + /** + * Add order-by of dateAdded as DESC. + * + * @return this. (NotNull) + */ + public BsProductsNotificationsCQ addOrderBy_DateAdded_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_DATE_ADDED), null, false);return this; + } + + // =================================================================================== + // Union Query + // =========== + protected void reflectRelationOnUnionQuery(ConditionQuery baseQueryAsSuper, ConditionQuery unionQueryAsSuper) { + final ProductsNotificationsCQ baseQuery = (ProductsNotificationsCQ)baseQueryAsSuper; + final ProductsNotificationsCQ unionQuery = (ProductsNotificationsCQ)unionQueryAsSuper; + + } + + // =================================================================================== + // Foreign Query + // ============= + + +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/BsProductsOptionsCQ.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/BsProductsOptionsCQ.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/BsProductsOptionsCQ.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,260 @@ + +package jp.sf.pal.pompei.cbean.cq.bs; + +import jp.sf.pal.pompei.cbean.cq.*; + +import jp.sf.pal.pompei.allcommon.cbean.*; +import jp.sf.pal.pompei.allcommon.cbean.ckey.*; +import jp.sf.pal.pompei.allcommon.cbean.cvalue.ConditionValue; +import jp.sf.pal.pompei.allcommon.cbean.sqlclause.SqlClause; +import jp.sf.pal.pompei.cbean.cq.ciq.*; + +/** + * The condition-query of PRODUCTS_OPTIONS. + * + * @author DBFlute(AutoGenerator) + */ +public class BsProductsOptionsCQ extends AbstractBsProductsOptionsCQ { + + // =================================================================================== + // Attribute + // ========= + /** Corresponding inline query. */ + protected ProductsOptionsCIQ _inlineQuery; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param childQuery Child query as abstract class. (Nullable: If null, this is base instance.) + * @param sqlClause SQL clause instance. (NotNull) + * @param aliasName My alias name. (NotNull) + * @param nestLevel Nest level. + */ + public BsProductsOptionsCQ(ConditionQuery childQuery, SqlClause sqlClause, String aliasName, int nestLevel) { + super(childQuery, sqlClause, aliasName, nestLevel); + } + + // =================================================================================== + // Inline + // ====== + /** + * Get inline query. + * + * @return Inline query. (NotNull) + */ + public ProductsOptionsCIQ inline() { + if (_inlineQuery == null) { + _inlineQuery = new ProductsOptionsCIQ(getChildQuery(), getSqlClause(), getAliasName(), getNestLevel(), this); + } + return _inlineQuery; + } + + // =================================================================================== + // Include-as-Mine + // =============== + + /** + * Include select-column of productsOptionsId as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_ProductsOptionsId() { + registerIncludedSelectColumn("ProductsOptionsId", getRealColumnName("PRODUCTS_OPTIONS_ID")); + } + + /** + * Include select-column of productsOptionsId as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_ProductsOptionsId(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("PRODUCTS_OPTIONS_ID")); + } + + /** + * Include select-column of languageId as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_LanguageId() { + registerIncludedSelectColumn("LanguageId", getRealColumnName("LANGUAGE_ID")); + } + + /** + * Include select-column of languageId as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_LanguageId(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("LANGUAGE_ID")); + } + + /** + * Include select-column of productsOptionsName as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_ProductsOptionsName() { + registerIncludedSelectColumn("ProductsOptionsName", getRealColumnName("PRODUCTS_OPTIONS_NAME")); + } + + /** + * Include select-column of productsOptionsName as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_ProductsOptionsName(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("PRODUCTS_OPTIONS_NAME")); + } + + // =================================================================================== + // Query + // ===== + // /* * * * * * * * * * * * * * * * * * * * * * * + // MyTable = [PRODUCTS_OPTIONS] + // * * * * * * * * */ + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [PRODUCTS_OPTIONS_ID] + // - - - - - - - - -/ + + /** The attribute of productsOptionsId. */ + protected ConditionValue _productsOptionsId; + + /** + * Get the value of productsOptionsId. + * + * @return The value of productsOptionsId. + */ + public ConditionValue getProductsOptionsId() { + if (_productsOptionsId == null) { + _productsOptionsId = new ConditionValue(); + } + return _productsOptionsId; + } + + protected ConditionValue getCValueProductsOptionsId() { + return getProductsOptionsId(); + } + + + /** + * Add order-by of productsOptionsId as ASC. + * + * @return this. (NotNull) + */ + public BsProductsOptionsCQ addOrderBy_ProductsOptionsId_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_PRODUCTS_OPTIONS_ID), null, true);return this; + } + + /** + * Add order-by of productsOptionsId as DESC. + * + * @return this. (NotNull) + */ + public BsProductsOptionsCQ addOrderBy_ProductsOptionsId_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_PRODUCTS_OPTIONS_ID), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [LANGUAGE_ID] + // - - - - - - - - -/ + + /** The attribute of languageId. */ + protected ConditionValue _languageId; + + /** + * Get the value of languageId. + * + * @return The value of languageId. + */ + public ConditionValue getLanguageId() { + if (_languageId == null) { + _languageId = new ConditionValue(); + } + return _languageId; + } + + protected ConditionValue getCValueLanguageId() { + return getLanguageId(); + } + + + /** + * Add order-by of languageId as ASC. + * + * @return this. (NotNull) + */ + public BsProductsOptionsCQ addOrderBy_LanguageId_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_LANGUAGE_ID), null, true);return this; + } + + /** + * Add order-by of languageId as DESC. + * + * @return this. (NotNull) + */ + public BsProductsOptionsCQ addOrderBy_LanguageId_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_LANGUAGE_ID), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [PRODUCTS_OPTIONS_NAME] + // - - - - - - - - -/ + + /** The attribute of productsOptionsName. */ + protected ConditionValue _productsOptionsName; + + /** + * Get the value of productsOptionsName. + * + * @return The value of productsOptionsName. + */ + public ConditionValue getProductsOptionsName() { + if (_productsOptionsName == null) { + _productsOptionsName = new ConditionValue(); + } + return _productsOptionsName; + } + + protected ConditionValue getCValueProductsOptionsName() { + return getProductsOptionsName(); + } + + + /** + * Add order-by of productsOptionsName as ASC. + * + * @return this. (NotNull) + */ + public BsProductsOptionsCQ addOrderBy_ProductsOptionsName_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_PRODUCTS_OPTIONS_NAME), null, true);return this; + } + + /** + * Add order-by of productsOptionsName as DESC. + * + * @return this. (NotNull) + */ + public BsProductsOptionsCQ addOrderBy_ProductsOptionsName_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_PRODUCTS_OPTIONS_NAME), null, false);return this; + } + + // =================================================================================== + // Union Query + // =========== + protected void reflectRelationOnUnionQuery(ConditionQuery baseQueryAsSuper, ConditionQuery unionQueryAsSuper) { + final ProductsOptionsCQ baseQuery = (ProductsOptionsCQ)baseQueryAsSuper; + final ProductsOptionsCQ unionQuery = (ProductsOptionsCQ)unionQueryAsSuper; + + } + + // =================================================================================== + // Foreign Query + // ============= + + +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/BsProductsOptionsValuesCQ.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/BsProductsOptionsValuesCQ.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/BsProductsOptionsValuesCQ.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,260 @@ + +package jp.sf.pal.pompei.cbean.cq.bs; + +import jp.sf.pal.pompei.cbean.cq.*; + +import jp.sf.pal.pompei.allcommon.cbean.*; +import jp.sf.pal.pompei.allcommon.cbean.ckey.*; +import jp.sf.pal.pompei.allcommon.cbean.cvalue.ConditionValue; +import jp.sf.pal.pompei.allcommon.cbean.sqlclause.SqlClause; +import jp.sf.pal.pompei.cbean.cq.ciq.*; + +/** + * The condition-query of PRODUCTS_OPTIONS_VALUES. + * + * @author DBFlute(AutoGenerator) + */ +public class BsProductsOptionsValuesCQ extends AbstractBsProductsOptionsValuesCQ { + + // =================================================================================== + // Attribute + // ========= + /** Corresponding inline query. */ + protected ProductsOptionsValuesCIQ _inlineQuery; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param childQuery Child query as abstract class. (Nullable: If null, this is base instance.) + * @param sqlClause SQL clause instance. (NotNull) + * @param aliasName My alias name. (NotNull) + * @param nestLevel Nest level. + */ + public BsProductsOptionsValuesCQ(ConditionQuery childQuery, SqlClause sqlClause, String aliasName, int nestLevel) { + super(childQuery, sqlClause, aliasName, nestLevel); + } + + // =================================================================================== + // Inline + // ====== + /** + * Get inline query. + * + * @return Inline query. (NotNull) + */ + public ProductsOptionsValuesCIQ inline() { + if (_inlineQuery == null) { + _inlineQuery = new ProductsOptionsValuesCIQ(getChildQuery(), getSqlClause(), getAliasName(), getNestLevel(), this); + } + return _inlineQuery; + } + + // =================================================================================== + // Include-as-Mine + // =============== + + /** + * Include select-column of productsOptionsValuesId as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_ProductsOptionsValuesId() { + registerIncludedSelectColumn("ProductsOptionsValuesId", getRealColumnName("PRODUCTS_OPTIONS_VALUES_ID")); + } + + /** + * Include select-column of productsOptionsValuesId as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_ProductsOptionsValuesId(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("PRODUCTS_OPTIONS_VALUES_ID")); + } + + /** + * Include select-column of languageId as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_LanguageId() { + registerIncludedSelectColumn("LanguageId", getRealColumnName("LANGUAGE_ID")); + } + + /** + * Include select-column of languageId as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_LanguageId(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("LANGUAGE_ID")); + } + + /** + * Include select-column of productsOptionsValuesName as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_ProductsOptionsValuesName() { + registerIncludedSelectColumn("ProductsOptionsValuesName", getRealColumnName("PRODUCTS_OPTIONS_VALUES_NAME")); + } + + /** + * Include select-column of productsOptionsValuesName as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_ProductsOptionsValuesName(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("PRODUCTS_OPTIONS_VALUES_NAME")); + } + + // =================================================================================== + // Query + // ===== + // /* * * * * * * * * * * * * * * * * * * * * * * + // MyTable = [PRODUCTS_OPTIONS_VALUES] + // * * * * * * * * */ + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [PRODUCTS_OPTIONS_VALUES_ID] + // - - - - - - - - -/ + + /** The attribute of productsOptionsValuesId. */ + protected ConditionValue _productsOptionsValuesId; + + /** + * Get the value of productsOptionsValuesId. + * + * @return The value of productsOptionsValuesId. + */ + public ConditionValue getProductsOptionsValuesId() { + if (_productsOptionsValuesId == null) { + _productsOptionsValuesId = new ConditionValue(); + } + return _productsOptionsValuesId; + } + + protected ConditionValue getCValueProductsOptionsValuesId() { + return getProductsOptionsValuesId(); + } + + + /** + * Add order-by of productsOptionsValuesId as ASC. + * + * @return this. (NotNull) + */ + public BsProductsOptionsValuesCQ addOrderBy_ProductsOptionsValuesId_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_PRODUCTS_OPTIONS_VALUES_ID), null, true);return this; + } + + /** + * Add order-by of productsOptionsValuesId as DESC. + * + * @return this. (NotNull) + */ + public BsProductsOptionsValuesCQ addOrderBy_ProductsOptionsValuesId_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_PRODUCTS_OPTIONS_VALUES_ID), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [LANGUAGE_ID] + // - - - - - - - - -/ + + /** The attribute of languageId. */ + protected ConditionValue _languageId; + + /** + * Get the value of languageId. + * + * @return The value of languageId. + */ + public ConditionValue getLanguageId() { + if (_languageId == null) { + _languageId = new ConditionValue(); + } + return _languageId; + } + + protected ConditionValue getCValueLanguageId() { + return getLanguageId(); + } + + + /** + * Add order-by of languageId as ASC. + * + * @return this. (NotNull) + */ + public BsProductsOptionsValuesCQ addOrderBy_LanguageId_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_LANGUAGE_ID), null, true);return this; + } + + /** + * Add order-by of languageId as DESC. + * + * @return this. (NotNull) + */ + public BsProductsOptionsValuesCQ addOrderBy_LanguageId_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_LANGUAGE_ID), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [PRODUCTS_OPTIONS_VALUES_NAME] + // - - - - - - - - -/ + + /** The attribute of productsOptionsValuesName. */ + protected ConditionValue _productsOptionsValuesName; + + /** + * Get the value of productsOptionsValuesName. + * + * @return The value of productsOptionsValuesName. + */ + public ConditionValue getProductsOptionsValuesName() { + if (_productsOptionsValuesName == null) { + _productsOptionsValuesName = new ConditionValue(); + } + return _productsOptionsValuesName; + } + + protected ConditionValue getCValueProductsOptionsValuesName() { + return getProductsOptionsValuesName(); + } + + + /** + * Add order-by of productsOptionsValuesName as ASC. + * + * @return this. (NotNull) + */ + public BsProductsOptionsValuesCQ addOrderBy_ProductsOptionsValuesName_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_PRODUCTS_OPTIONS_VALUES_NAME), null, true);return this; + } + + /** + * Add order-by of productsOptionsValuesName as DESC. + * + * @return this. (NotNull) + */ + public BsProductsOptionsValuesCQ addOrderBy_ProductsOptionsValuesName_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_PRODUCTS_OPTIONS_VALUES_NAME), null, false);return this; + } + + // =================================================================================== + // Union Query + // =========== + protected void reflectRelationOnUnionQuery(ConditionQuery baseQueryAsSuper, ConditionQuery unionQueryAsSuper) { + final ProductsOptionsValuesCQ baseQuery = (ProductsOptionsValuesCQ)baseQueryAsSuper; + final ProductsOptionsValuesCQ unionQuery = (ProductsOptionsValuesCQ)unionQueryAsSuper; + + } + + // =================================================================================== + // Foreign Query + // ============= + + +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/BsProductsOptionsValuesToProductsOptionsCQ.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/BsProductsOptionsValuesToProductsOptionsCQ.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/BsProductsOptionsValuesToProductsOptionsCQ.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,260 @@ + +package jp.sf.pal.pompei.cbean.cq.bs; + +import jp.sf.pal.pompei.cbean.cq.*; + +import jp.sf.pal.pompei.allcommon.cbean.*; +import jp.sf.pal.pompei.allcommon.cbean.ckey.*; +import jp.sf.pal.pompei.allcommon.cbean.cvalue.ConditionValue; +import jp.sf.pal.pompei.allcommon.cbean.sqlclause.SqlClause; +import jp.sf.pal.pompei.cbean.cq.ciq.*; + +/** + * The condition-query of PRODUCTS_OPTIONS_VALUES_TO_PRODUCTS_OPTIONS. + * + * @author DBFlute(AutoGenerator) + */ +public class BsProductsOptionsValuesToProductsOptionsCQ extends AbstractBsProductsOptionsValuesToProductsOptionsCQ { + + // =================================================================================== + // Attribute + // ========= + /** Corresponding inline query. */ + protected ProductsOptionsValuesToProductsOptionsCIQ _inlineQuery; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param childQuery Child query as abstract class. (Nullable: If null, this is base instance.) + * @param sqlClause SQL clause instance. (NotNull) + * @param aliasName My alias name. (NotNull) + * @param nestLevel Nest level. + */ + public BsProductsOptionsValuesToProductsOptionsCQ(ConditionQuery childQuery, SqlClause sqlClause, String aliasName, int nestLevel) { + super(childQuery, sqlClause, aliasName, nestLevel); + } + + // =================================================================================== + // Inline + // ====== + /** + * Get inline query. + * + * @return Inline query. (NotNull) + */ + public ProductsOptionsValuesToProductsOptionsCIQ inline() { + if (_inlineQuery == null) { + _inlineQuery = new ProductsOptionsValuesToProductsOptionsCIQ(getChildQuery(), getSqlClause(), getAliasName(), getNestLevel(), this); + } + return _inlineQuery; + } + + // =================================================================================== + // Include-as-Mine + // =============== + + /** + * Include select-column of productsOptionsValuesToProductsOptionsId as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_ProductsOptionsValuesToProductsOptionsId() { + registerIncludedSelectColumn("ProductsOptionsValuesToProductsOptionsId", getRealColumnName("PRODUCTS_OPTIONS_VALUES_TO_PRODUCTS_OPTIONS_ID")); + } + + /** + * Include select-column of productsOptionsValuesToProductsOptionsId as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_ProductsOptionsValuesToProductsOptionsId(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("PRODUCTS_OPTIONS_VALUES_TO_PRODUCTS_OPTIONS_ID")); + } + + /** + * Include select-column of productsOptionsId as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_ProductsOptionsId() { + registerIncludedSelectColumn("ProductsOptionsId", getRealColumnName("PRODUCTS_OPTIONS_ID")); + } + + /** + * Include select-column of productsOptionsId as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_ProductsOptionsId(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("PRODUCTS_OPTIONS_ID")); + } + + /** + * Include select-column of productsOptionsValuesId as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_ProductsOptionsValuesId() { + registerIncludedSelectColumn("ProductsOptionsValuesId", getRealColumnName("PRODUCTS_OPTIONS_VALUES_ID")); + } + + /** + * Include select-column of productsOptionsValuesId as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_ProductsOptionsValuesId(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("PRODUCTS_OPTIONS_VALUES_ID")); + } + + // =================================================================================== + // Query + // ===== + // /* * * * * * * * * * * * * * * * * * * * * * * + // MyTable = [PRODUCTS_OPTIONS_VALUES_TO_PRODUCTS_OPTIONS] + // * * * * * * * * */ + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [PRODUCTS_OPTIONS_VALUES_TO_PRODUCTS_OPTIONS_ID] + // - - - - - - - - -/ + + /** The attribute of productsOptionsValuesToProductsOptionsId. */ + protected ConditionValue _productsOptionsValuesToProductsOptionsId; + + /** + * Get the value of productsOptionsValuesToProductsOptionsId. + * + * @return The value of productsOptionsValuesToProductsOptionsId. + */ + public ConditionValue getProductsOptionsValuesToProductsOptionsId() { + if (_productsOptionsValuesToProductsOptionsId == null) { + _productsOptionsValuesToProductsOptionsId = new ConditionValue(); + } + return _productsOptionsValuesToProductsOptionsId; + } + + protected ConditionValue getCValueProductsOptionsValuesToProductsOptionsId() { + return getProductsOptionsValuesToProductsOptionsId(); + } + + + /** + * Add order-by of productsOptionsValuesToProductsOptionsId as ASC. + * + * @return this. (NotNull) + */ + public BsProductsOptionsValuesToProductsOptionsCQ addOrderBy_ProductsOptionsValuesToProductsOptionsId_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_PRODUCTS_OPTIONS_VALUES_TO_PRODUCTS_OPTIONS_ID), null, true);return this; + } + + /** + * Add order-by of productsOptionsValuesToProductsOptionsId as DESC. + * + * @return this. (NotNull) + */ + public BsProductsOptionsValuesToProductsOptionsCQ addOrderBy_ProductsOptionsValuesToProductsOptionsId_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_PRODUCTS_OPTIONS_VALUES_TO_PRODUCTS_OPTIONS_ID), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [PRODUCTS_OPTIONS_ID] + // - - - - - - - - -/ + + /** The attribute of productsOptionsId. */ + protected ConditionValue _productsOptionsId; + + /** + * Get the value of productsOptionsId. + * + * @return The value of productsOptionsId. + */ + public ConditionValue getProductsOptionsId() { + if (_productsOptionsId == null) { + _productsOptionsId = new ConditionValue(); + } + return _productsOptionsId; + } + + protected ConditionValue getCValueProductsOptionsId() { + return getProductsOptionsId(); + } + + + /** + * Add order-by of productsOptionsId as ASC. + * + * @return this. (NotNull) + */ + public BsProductsOptionsValuesToProductsOptionsCQ addOrderBy_ProductsOptionsId_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_PRODUCTS_OPTIONS_ID), null, true);return this; + } + + /** + * Add order-by of productsOptionsId as DESC. + * + * @return this. (NotNull) + */ + public BsProductsOptionsValuesToProductsOptionsCQ addOrderBy_ProductsOptionsId_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_PRODUCTS_OPTIONS_ID), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [PRODUCTS_OPTIONS_VALUES_ID] + // - - - - - - - - -/ + + /** The attribute of productsOptionsValuesId. */ + protected ConditionValue _productsOptionsValuesId; + + /** + * Get the value of productsOptionsValuesId. + * + * @return The value of productsOptionsValuesId. + */ + public ConditionValue getProductsOptionsValuesId() { + if (_productsOptionsValuesId == null) { + _productsOptionsValuesId = new ConditionValue(); + } + return _productsOptionsValuesId; + } + + protected ConditionValue getCValueProductsOptionsValuesId() { + return getProductsOptionsValuesId(); + } + + + /** + * Add order-by of productsOptionsValuesId as ASC. + * + * @return this. (NotNull) + */ + public BsProductsOptionsValuesToProductsOptionsCQ addOrderBy_ProductsOptionsValuesId_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_PRODUCTS_OPTIONS_VALUES_ID), null, true);return this; + } + + /** + * Add order-by of productsOptionsValuesId as DESC. + * + * @return this. (NotNull) + */ + public BsProductsOptionsValuesToProductsOptionsCQ addOrderBy_ProductsOptionsValuesId_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_PRODUCTS_OPTIONS_VALUES_ID), null, false);return this; + } + + // =================================================================================== + // Union Query + // =========== + protected void reflectRelationOnUnionQuery(ConditionQuery baseQueryAsSuper, ConditionQuery unionQueryAsSuper) { + final ProductsOptionsValuesToProductsOptionsCQ baseQuery = (ProductsOptionsValuesToProductsOptionsCQ)baseQueryAsSuper; + final ProductsOptionsValuesToProductsOptionsCQ unionQuery = (ProductsOptionsValuesToProductsOptionsCQ)unionQueryAsSuper; + + } + + // =================================================================================== + // Foreign Query + // ============= + + +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/BsProductsToCategoriesCQ.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/BsProductsToCategoriesCQ.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/BsProductsToCategoriesCQ.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,200 @@ + +package jp.sf.pal.pompei.cbean.cq.bs; + +import jp.sf.pal.pompei.cbean.cq.*; + +import jp.sf.pal.pompei.allcommon.cbean.*; +import jp.sf.pal.pompei.allcommon.cbean.ckey.*; +import jp.sf.pal.pompei.allcommon.cbean.cvalue.ConditionValue; +import jp.sf.pal.pompei.allcommon.cbean.sqlclause.SqlClause; +import jp.sf.pal.pompei.cbean.cq.ciq.*; + +/** + * The condition-query of PRODUCTS_TO_CATEGORIES. + * + * @author DBFlute(AutoGenerator) + */ +public class BsProductsToCategoriesCQ extends AbstractBsProductsToCategoriesCQ { + + // =================================================================================== + // Attribute + // ========= + /** Corresponding inline query. */ + protected ProductsToCategoriesCIQ _inlineQuery; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param childQuery Child query as abstract class. (Nullable: If null, this is base instance.) + * @param sqlClause SQL clause instance. (NotNull) + * @param aliasName My alias name. (NotNull) + * @param nestLevel Nest level. + */ + public BsProductsToCategoriesCQ(ConditionQuery childQuery, SqlClause sqlClause, String aliasName, int nestLevel) { + super(childQuery, sqlClause, aliasName, nestLevel); + } + + // =================================================================================== + // Inline + // ====== + /** + * Get inline query. + * + * @return Inline query. (NotNull) + */ + public ProductsToCategoriesCIQ inline() { + if (_inlineQuery == null) { + _inlineQuery = new ProductsToCategoriesCIQ(getChildQuery(), getSqlClause(), getAliasName(), getNestLevel(), this); + } + return _inlineQuery; + } + + // =================================================================================== + // Include-as-Mine + // =============== + + /** + * Include select-column of productsId as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_ProductsId() { + registerIncludedSelectColumn("ProductsId", getRealColumnName("PRODUCTS_ID")); + } + + /** + * Include select-column of productsId as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_ProductsId(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("PRODUCTS_ID")); + } + + /** + * Include select-column of categoriesId as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_CategoriesId() { + registerIncludedSelectColumn("CategoriesId", getRealColumnName("CATEGORIES_ID")); + } + + /** + * Include select-column of categoriesId as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_CategoriesId(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("CATEGORIES_ID")); + } + + // =================================================================================== + // Query + // ===== + // /* * * * * * * * * * * * * * * * * * * * * * * + // MyTable = [PRODUCTS_TO_CATEGORIES] + // * * * * * * * * */ + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [PRODUCTS_ID] + // - - - - - - - - -/ + + /** The attribute of productsId. */ + protected ConditionValue _productsId; + + /** + * Get the value of productsId. + * + * @return The value of productsId. + */ + public ConditionValue getProductsId() { + if (_productsId == null) { + _productsId = new ConditionValue(); + } + return _productsId; + } + + protected ConditionValue getCValueProductsId() { + return getProductsId(); + } + + + /** + * Add order-by of productsId as ASC. + * + * @return this. (NotNull) + */ + public BsProductsToCategoriesCQ addOrderBy_ProductsId_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_PRODUCTS_ID), null, true);return this; + } + + /** + * Add order-by of productsId as DESC. + * + * @return this. (NotNull) + */ + public BsProductsToCategoriesCQ addOrderBy_ProductsId_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_PRODUCTS_ID), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [CATEGORIES_ID] + // - - - - - - - - -/ + + /** The attribute of categoriesId. */ + protected ConditionValue _categoriesId; + + /** + * Get the value of categoriesId. + * + * @return The value of categoriesId. + */ + public ConditionValue getCategoriesId() { + if (_categoriesId == null) { + _categoriesId = new ConditionValue(); + } + return _categoriesId; + } + + protected ConditionValue getCValueCategoriesId() { + return getCategoriesId(); + } + + + /** + * Add order-by of categoriesId as ASC. + * + * @return this. (NotNull) + */ + public BsProductsToCategoriesCQ addOrderBy_CategoriesId_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_CATEGORIES_ID), null, true);return this; + } + + /** + * Add order-by of categoriesId as DESC. + * + * @return this. (NotNull) + */ + public BsProductsToCategoriesCQ addOrderBy_CategoriesId_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_CATEGORIES_ID), null, false);return this; + } + + // =================================================================================== + // Union Query + // =========== + protected void reflectRelationOnUnionQuery(ConditionQuery baseQueryAsSuper, ConditionQuery unionQueryAsSuper) { + final ProductsToCategoriesCQ baseQuery = (ProductsToCategoriesCQ)baseQueryAsSuper; + final ProductsToCategoriesCQ unionQuery = (ProductsToCategoriesCQ)unionQueryAsSuper; + + } + + // =================================================================================== + // Foreign Query + // ============= + + +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/BsReviewsCQ.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/BsReviewsCQ.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/BsReviewsCQ.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,560 @@ + +package jp.sf.pal.pompei.cbean.cq.bs; + +import jp.sf.pal.pompei.cbean.cq.*; + +import jp.sf.pal.pompei.allcommon.cbean.*; +import jp.sf.pal.pompei.allcommon.cbean.ckey.*; +import jp.sf.pal.pompei.allcommon.cbean.cvalue.ConditionValue; +import jp.sf.pal.pompei.allcommon.cbean.sqlclause.SqlClause; +import jp.sf.pal.pompei.cbean.cq.ciq.*; + +/** + * The condition-query of REVIEWS. + * + * @author DBFlute(AutoGenerator) + */ +public class BsReviewsCQ extends AbstractBsReviewsCQ { + + // =================================================================================== + // Attribute + // ========= + /** Corresponding inline query. */ + protected ReviewsCIQ _inlineQuery; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param childQuery Child query as abstract class. (Nullable: If null, this is base instance.) + * @param sqlClause SQL clause instance. (NotNull) + * @param aliasName My alias name. (NotNull) + * @param nestLevel Nest level. + */ + public BsReviewsCQ(ConditionQuery childQuery, SqlClause sqlClause, String aliasName, int nestLevel) { + super(childQuery, sqlClause, aliasName, nestLevel); + } + + // =================================================================================== + // Inline + // ====== + /** + * Get inline query. + * + * @return Inline query. (NotNull) + */ + public ReviewsCIQ inline() { + if (_inlineQuery == null) { + _inlineQuery = new ReviewsCIQ(getChildQuery(), getSqlClause(), getAliasName(), getNestLevel(), this); + } + return _inlineQuery; + } + + // =================================================================================== + // Include-as-Mine + // =============== + + /** + * Include select-column of reviewsId as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_ReviewsId() { + registerIncludedSelectColumn("ReviewsId", getRealColumnName("REVIEWS_ID")); + } + + /** + * Include select-column of reviewsId as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_ReviewsId(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("REVIEWS_ID")); + } + + /** + * Include select-column of productsId as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_ProductsId() { + registerIncludedSelectColumn("ProductsId", getRealColumnName("PRODUCTS_ID")); + } + + /** + * Include select-column of productsId as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_ProductsId(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("PRODUCTS_ID")); + } + + /** + * Include select-column of customersId as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_CustomersId() { + registerIncludedSelectColumn("CustomersId", getRealColumnName("CUSTOMERS_ID")); + } + + /** + * Include select-column of customersId as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_CustomersId(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("CUSTOMERS_ID")); + } + + /** + * Include select-column of customersName as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_CustomersName() { + registerIncludedSelectColumn("CustomersName", getRealColumnName("CUSTOMERS_NAME")); + } + + /** + * Include select-column of customersName as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_CustomersName(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("CUSTOMERS_NAME")); + } + + /** + * Include select-column of reviewsRating as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_ReviewsRating() { + registerIncludedSelectColumn("ReviewsRating", getRealColumnName("REVIEWS_RATING")); + } + + /** + * Include select-column of reviewsRating as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_ReviewsRating(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("REVIEWS_RATING")); + } + + /** + * Include select-column of dateAdded as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_DateAdded() { + registerIncludedSelectColumn("DateAdded", getRealColumnName("DATE_ADDED")); + } + + /** + * Include select-column of dateAdded as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_DateAdded(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("DATE_ADDED")); + } + + /** + * Include select-column of lastModified as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_LastModified() { + registerIncludedSelectColumn("LastModified", getRealColumnName("LAST_MODIFIED")); + } + + /** + * Include select-column of lastModified as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_LastModified(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("LAST_MODIFIED")); + } + + /** + * Include select-column of reviewsRead as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_ReviewsRead() { + registerIncludedSelectColumn("ReviewsRead", getRealColumnName("REVIEWS_READ")); + } + + /** + * Include select-column of reviewsRead as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_ReviewsRead(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("REVIEWS_READ")); + } + + // =================================================================================== + // Query + // ===== + // /* * * * * * * * * * * * * * * * * * * * * * * + // MyTable = [REVIEWS] + // * * * * * * * * */ + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [REVIEWS_ID] + // - - - - - - - - -/ + + /** The attribute of reviewsId. */ + protected ConditionValue _reviewsId; + + /** + * Get the value of reviewsId. + * + * @return The value of reviewsId. + */ + public ConditionValue getReviewsId() { + if (_reviewsId == null) { + _reviewsId = new ConditionValue(); + } + return _reviewsId; + } + + protected ConditionValue getCValueReviewsId() { + return getReviewsId(); + } + + + /** + * Add order-by of reviewsId as ASC. + * + * @return this. (NotNull) + */ + public BsReviewsCQ addOrderBy_ReviewsId_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_REVIEWS_ID), null, true);return this; + } + + /** + * Add order-by of reviewsId as DESC. + * + * @return this. (NotNull) + */ + public BsReviewsCQ addOrderBy_ReviewsId_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_REVIEWS_ID), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [PRODUCTS_ID] + // - - - - - - - - -/ + + /** The attribute of productsId. */ + protected ConditionValue _productsId; + + /** + * Get the value of productsId. + * + * @return The value of productsId. + */ + public ConditionValue getProductsId() { + if (_productsId == null) { + _productsId = new ConditionValue(); + } + return _productsId; + } + + protected ConditionValue getCValueProductsId() { + return getProductsId(); + } + + + /** + * Add order-by of productsId as ASC. + * + * @return this. (NotNull) + */ + public BsReviewsCQ addOrderBy_ProductsId_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_PRODUCTS_ID), null, true);return this; + } + + /** + * Add order-by of productsId as DESC. + * + * @return this. (NotNull) + */ + public BsReviewsCQ addOrderBy_ProductsId_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_PRODUCTS_ID), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [CUSTOMERS_ID] + // - - - - - - - - -/ + + /** The attribute of customersId. */ + protected ConditionValue _customersId; + + /** + * Get the value of customersId. + * + * @return The value of customersId. + */ + public ConditionValue getCustomersId() { + if (_customersId == null) { + _customersId = new ConditionValue(); + } + return _customersId; + } + + protected ConditionValue getCValueCustomersId() { + return getCustomersId(); + } + + + /** + * Add order-by of customersId as ASC. + * + * @return this. (NotNull) + */ + public BsReviewsCQ addOrderBy_CustomersId_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_CUSTOMERS_ID), null, true);return this; + } + + /** + * Add order-by of customersId as DESC. + * + * @return this. (NotNull) + */ + public BsReviewsCQ addOrderBy_CustomersId_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_CUSTOMERS_ID), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [CUSTOMERS_NAME] + // - - - - - - - - -/ + + /** The attribute of customersName. */ + protected ConditionValue _customersName; + + /** + * Get the value of customersName. + * + * @return The value of customersName. + */ + public ConditionValue getCustomersName() { + if (_customersName == null) { + _customersName = new ConditionValue(); + } + return _customersName; + } + + protected ConditionValue getCValueCustomersName() { + return getCustomersName(); + } + + + /** + * Add order-by of customersName as ASC. + * + * @return this. (NotNull) + */ + public BsReviewsCQ addOrderBy_CustomersName_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_CUSTOMERS_NAME), null, true);return this; + } + + /** + * Add order-by of customersName as DESC. + * + * @return this. (NotNull) + */ + public BsReviewsCQ addOrderBy_CustomersName_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_CUSTOMERS_NAME), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [REVIEWS_RATING] + // - - - - - - - - -/ + + /** The attribute of reviewsRating. */ + protected ConditionValue _reviewsRating; + + /** + * Get the value of reviewsRating. + * + * @return The value of reviewsRating. + */ + public ConditionValue getReviewsRating() { + if (_reviewsRating == null) { + _reviewsRating = new ConditionValue(); + } + return _reviewsRating; + } + + protected ConditionValue getCValueReviewsRating() { + return getReviewsRating(); + } + + + /** + * Add order-by of reviewsRating as ASC. + * + * @return this. (NotNull) + */ + public BsReviewsCQ addOrderBy_ReviewsRating_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_REVIEWS_RATING), null, true);return this; + } + + /** + * Add order-by of reviewsRating as DESC. + * + * @return this. (NotNull) + */ + public BsReviewsCQ addOrderBy_ReviewsRating_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_REVIEWS_RATING), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [DATE_ADDED] + // - - - - - - - - -/ + + /** The attribute of dateAdded. */ + protected ConditionValue _dateAdded; + + /** + * Get the value of dateAdded. + * + * @return The value of dateAdded. + */ + public ConditionValue getDateAdded() { + if (_dateAdded == null) { + _dateAdded = new ConditionValue(); + } + return _dateAdded; + } + + protected ConditionValue getCValueDateAdded() { + return getDateAdded(); + } + + + /** + * Add order-by of dateAdded as ASC. + * + * @return this. (NotNull) + */ + public BsReviewsCQ addOrderBy_DateAdded_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_DATE_ADDED), null, true);return this; + } + + /** + * Add order-by of dateAdded as DESC. + * + * @return this. (NotNull) + */ + public BsReviewsCQ addOrderBy_DateAdded_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_DATE_ADDED), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [LAST_MODIFIED] + // - - - - - - - - -/ + + /** The attribute of lastModified. */ + protected ConditionValue _lastModified; + + /** + * Get the value of lastModified. + * + * @return The value of lastModified. + */ + public ConditionValue getLastModified() { + if (_lastModified == null) { + _lastModified = new ConditionValue(); + } + return _lastModified; + } + + protected ConditionValue getCValueLastModified() { + return getLastModified(); + } + + + /** + * Add order-by of lastModified as ASC. + * + * @return this. (NotNull) + */ + public BsReviewsCQ addOrderBy_LastModified_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_LAST_MODIFIED), null, true);return this; + } + + /** + * Add order-by of lastModified as DESC. + * + * @return this. (NotNull) + */ + public BsReviewsCQ addOrderBy_LastModified_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_LAST_MODIFIED), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [REVIEWS_READ] + // - - - - - - - - -/ + + /** The attribute of reviewsRead. */ + protected ConditionValue _reviewsRead; + + /** + * Get the value of reviewsRead. + * + * @return The value of reviewsRead. + */ + public ConditionValue getReviewsRead() { + if (_reviewsRead == null) { + _reviewsRead = new ConditionValue(); + } + return _reviewsRead; + } + + protected ConditionValue getCValueReviewsRead() { + return getReviewsRead(); + } + + + /** + * Add order-by of reviewsRead as ASC. + * + * @return this. (NotNull) + */ + public BsReviewsCQ addOrderBy_ReviewsRead_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_REVIEWS_READ), null, true);return this; + } + + /** + * Add order-by of reviewsRead as DESC. + * + * @return this. (NotNull) + */ + public BsReviewsCQ addOrderBy_ReviewsRead_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_REVIEWS_READ), null, false);return this; + } + + // =================================================================================== + // Union Query + // =========== + protected void reflectRelationOnUnionQuery(ConditionQuery baseQueryAsSuper, ConditionQuery unionQueryAsSuper) { + final ReviewsCQ baseQuery = (ReviewsCQ)baseQueryAsSuper; + final ReviewsCQ unionQuery = (ReviewsCQ)unionQueryAsSuper; + + } + + // =================================================================================== + // Foreign Query + // ============= + + +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/BsReviewsDescriptionCQ.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/BsReviewsDescriptionCQ.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/BsReviewsDescriptionCQ.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,260 @@ + +package jp.sf.pal.pompei.cbean.cq.bs; + +import jp.sf.pal.pompei.cbean.cq.*; + +import jp.sf.pal.pompei.allcommon.cbean.*; +import jp.sf.pal.pompei.allcommon.cbean.ckey.*; +import jp.sf.pal.pompei.allcommon.cbean.cvalue.ConditionValue; +import jp.sf.pal.pompei.allcommon.cbean.sqlclause.SqlClause; +import jp.sf.pal.pompei.cbean.cq.ciq.*; + +/** + * The condition-query of REVIEWS_DESCRIPTION. + * + * @author DBFlute(AutoGenerator) + */ +public class BsReviewsDescriptionCQ extends AbstractBsReviewsDescriptionCQ { + + // =================================================================================== + // Attribute + // ========= + /** Corresponding inline query. */ + protected ReviewsDescriptionCIQ _inlineQuery; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param childQuery Child query as abstract class. (Nullable: If null, this is base instance.) + * @param sqlClause SQL clause instance. (NotNull) + * @param aliasName My alias name. (NotNull) + * @param nestLevel Nest level. + */ + public BsReviewsDescriptionCQ(ConditionQuery childQuery, SqlClause sqlClause, String aliasName, int nestLevel) { + super(childQuery, sqlClause, aliasName, nestLevel); + } + + // =================================================================================== + // Inline + // ====== + /** + * Get inline query. + * + * @return Inline query. (NotNull) + */ + public ReviewsDescriptionCIQ inline() { + if (_inlineQuery == null) { + _inlineQuery = new ReviewsDescriptionCIQ(getChildQuery(), getSqlClause(), getAliasName(), getNestLevel(), this); + } + return _inlineQuery; + } + + // =================================================================================== + // Include-as-Mine + // =============== + + /** + * Include select-column of reviewsId as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_ReviewsId() { + registerIncludedSelectColumn("ReviewsId", getRealColumnName("REVIEWS_ID")); + } + + /** + * Include select-column of reviewsId as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_ReviewsId(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("REVIEWS_ID")); + } + + /** + * Include select-column of languagesId as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_LanguagesId() { + registerIncludedSelectColumn("LanguagesId", getRealColumnName("LANGUAGES_ID")); + } + + /** + * Include select-column of languagesId as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_LanguagesId(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("LANGUAGES_ID")); + } + + /** + * Include select-column of reviewsText as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_ReviewsText() { + registerIncludedSelectColumn("ReviewsText", getRealColumnName("REVIEWS_TEXT")); + } + + /** + * Include select-column of reviewsText as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_ReviewsText(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("REVIEWS_TEXT")); + } + + // =================================================================================== + // Query + // ===== + // /* * * * * * * * * * * * * * * * * * * * * * * + // MyTable = [REVIEWS_DESCRIPTION] + // * * * * * * * * */ + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [REVIEWS_ID] + // - - - - - - - - -/ + + /** The attribute of reviewsId. */ + protected ConditionValue _reviewsId; + + /** + * Get the value of reviewsId. + * + * @return The value of reviewsId. + */ + public ConditionValue getReviewsId() { + if (_reviewsId == null) { + _reviewsId = new ConditionValue(); + } + return _reviewsId; + } + + protected ConditionValue getCValueReviewsId() { + return getReviewsId(); + } + + + /** + * Add order-by of reviewsId as ASC. + * + * @return this. (NotNull) + */ + public BsReviewsDescriptionCQ addOrderBy_ReviewsId_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_REVIEWS_ID), null, true);return this; + } + + /** + * Add order-by of reviewsId as DESC. + * + * @return this. (NotNull) + */ + public BsReviewsDescriptionCQ addOrderBy_ReviewsId_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_REVIEWS_ID), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [LANGUAGES_ID] + // - - - - - - - - -/ + + /** The attribute of languagesId. */ + protected ConditionValue _languagesId; + + /** + * Get the value of languagesId. + * + * @return The value of languagesId. + */ + public ConditionValue getLanguagesId() { + if (_languagesId == null) { + _languagesId = new ConditionValue(); + } + return _languagesId; + } + + protected ConditionValue getCValueLanguagesId() { + return getLanguagesId(); + } + + + /** + * Add order-by of languagesId as ASC. + * + * @return this. (NotNull) + */ + public BsReviewsDescriptionCQ addOrderBy_LanguagesId_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_LANGUAGES_ID), null, true);return this; + } + + /** + * Add order-by of languagesId as DESC. + * + * @return this. (NotNull) + */ + public BsReviewsDescriptionCQ addOrderBy_LanguagesId_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_LANGUAGES_ID), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [REVIEWS_TEXT] + // - - - - - - - - -/ + + /** The attribute of reviewsText. */ + protected ConditionValue _reviewsText; + + /** + * Get the value of reviewsText. + * + * @return The value of reviewsText. + */ + public ConditionValue getReviewsText() { + if (_reviewsText == null) { + _reviewsText = new ConditionValue(); + } + return _reviewsText; + } + + protected ConditionValue getCValueReviewsText() { + return getReviewsText(); + } + + + /** + * Add order-by of reviewsText as ASC. + * + * @return this. (NotNull) + */ + public BsReviewsDescriptionCQ addOrderBy_ReviewsText_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_REVIEWS_TEXT), null, true);return this; + } + + /** + * Add order-by of reviewsText as DESC. + * + * @return this. (NotNull) + */ + public BsReviewsDescriptionCQ addOrderBy_ReviewsText_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_REVIEWS_TEXT), null, false);return this; + } + + // =================================================================================== + // Union Query + // =========== + protected void reflectRelationOnUnionQuery(ConditionQuery baseQueryAsSuper, ConditionQuery unionQueryAsSuper) { + final ReviewsDescriptionCQ baseQuery = (ReviewsDescriptionCQ)baseQueryAsSuper; + final ReviewsDescriptionCQ unionQuery = (ReviewsDescriptionCQ)unionQueryAsSuper; + + } + + // =================================================================================== + // Foreign Query + // ============= + + +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/BsSessionsCQ.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/BsSessionsCQ.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/BsSessionsCQ.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,260 @@ + +package jp.sf.pal.pompei.cbean.cq.bs; + +import jp.sf.pal.pompei.cbean.cq.*; + +import jp.sf.pal.pompei.allcommon.cbean.*; +import jp.sf.pal.pompei.allcommon.cbean.ckey.*; +import jp.sf.pal.pompei.allcommon.cbean.cvalue.ConditionValue; +import jp.sf.pal.pompei.allcommon.cbean.sqlclause.SqlClause; +import jp.sf.pal.pompei.cbean.cq.ciq.*; + +/** + * The condition-query of SESSIONS. + * + * @author DBFlute(AutoGenerator) + */ +public class BsSessionsCQ extends AbstractBsSessionsCQ { + + // =================================================================================== + // Attribute + // ========= + /** Corresponding inline query. */ + protected SessionsCIQ _inlineQuery; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param childQuery Child query as abstract class. (Nullable: If null, this is base instance.) + * @param sqlClause SQL clause instance. (NotNull) + * @param aliasName My alias name. (NotNull) + * @param nestLevel Nest level. + */ + public BsSessionsCQ(ConditionQuery childQuery, SqlClause sqlClause, String aliasName, int nestLevel) { + super(childQuery, sqlClause, aliasName, nestLevel); + } + + // =================================================================================== + // Inline + // ====== + /** + * Get inline query. + * + * @return Inline query. (NotNull) + */ + public SessionsCIQ inline() { + if (_inlineQuery == null) { + _inlineQuery = new SessionsCIQ(getChildQuery(), getSqlClause(), getAliasName(), getNestLevel(), this); + } + return _inlineQuery; + } + + // =================================================================================== + // Include-as-Mine + // =============== + + /** + * Include select-column of sesskey as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_Sesskey() { + registerIncludedSelectColumn("Sesskey", getRealColumnName("SESSKEY")); + } + + /** + * Include select-column of sesskey as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_Sesskey(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("SESSKEY")); + } + + /** + * Include select-column of expiry as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_Expiry() { + registerIncludedSelectColumn("Expiry", getRealColumnName("EXPIRY")); + } + + /** + * Include select-column of expiry as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_Expiry(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("EXPIRY")); + } + + /** + * Include select-column of value as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_Value() { + registerIncludedSelectColumn("Value", getRealColumnName("VALUE")); + } + + /** + * Include select-column of value as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_Value(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("VALUE")); + } + + // =================================================================================== + // Query + // ===== + // /* * * * * * * * * * * * * * * * * * * * * * * + // MyTable = [SESSIONS] + // * * * * * * * * */ + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [SESSKEY] + // - - - - - - - - -/ + + /** The attribute of sesskey. */ + protected ConditionValue _sesskey; + + /** + * Get the value of sesskey. + * + * @return The value of sesskey. + */ + public ConditionValue getSesskey() { + if (_sesskey == null) { + _sesskey = new ConditionValue(); + } + return _sesskey; + } + + protected ConditionValue getCValueSesskey() { + return getSesskey(); + } + + + /** + * Add order-by of sesskey as ASC. + * + * @return this. (NotNull) + */ + public BsSessionsCQ addOrderBy_Sesskey_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_SESSKEY), null, true);return this; + } + + /** + * Add order-by of sesskey as DESC. + * + * @return this. (NotNull) + */ + public BsSessionsCQ addOrderBy_Sesskey_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_SESSKEY), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [EXPIRY] + // - - - - - - - - -/ + + /** The attribute of expiry. */ + protected ConditionValue _expiry; + + /** + * Get the value of expiry. + * + * @return The value of expiry. + */ + public ConditionValue getExpiry() { + if (_expiry == null) { + _expiry = new ConditionValue(); + } + return _expiry; + } + + protected ConditionValue getCValueExpiry() { + return getExpiry(); + } + + + /** + * Add order-by of expiry as ASC. + * + * @return this. (NotNull) + */ + public BsSessionsCQ addOrderBy_Expiry_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_EXPIRY), null, true);return this; + } + + /** + * Add order-by of expiry as DESC. + * + * @return this. (NotNull) + */ + public BsSessionsCQ addOrderBy_Expiry_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_EXPIRY), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [VALUE] + // - - - - - - - - -/ + + /** The attribute of value. */ + protected ConditionValue _value; + + /** + * Get the value of value. + * + * @return The value of value. + */ + public ConditionValue getValue() { + if (_value == null) { + _value = new ConditionValue(); + } + return _value; + } + + protected ConditionValue getCValueValue() { + return getValue(); + } + + + /** + * Add order-by of value as ASC. + * + * @return this. (NotNull) + */ + public BsSessionsCQ addOrderBy_Value_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_VALUE), null, true);return this; + } + + /** + * Add order-by of value as DESC. + * + * @return this. (NotNull) + */ + public BsSessionsCQ addOrderBy_Value_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_VALUE), null, false);return this; + } + + // =================================================================================== + // Union Query + // =========== + protected void reflectRelationOnUnionQuery(ConditionQuery baseQueryAsSuper, ConditionQuery unionQueryAsSuper) { + final SessionsCQ baseQuery = (SessionsCQ)baseQueryAsSuper; + final SessionsCQ unionQuery = (SessionsCQ)unionQueryAsSuper; + + } + + // =================================================================================== + // Foreign Query + // ============= + + +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/BsSpecialsCQ.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/BsSpecialsCQ.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/BsSpecialsCQ.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,560 @@ + +package jp.sf.pal.pompei.cbean.cq.bs; + +import jp.sf.pal.pompei.cbean.cq.*; + +import jp.sf.pal.pompei.allcommon.cbean.*; +import jp.sf.pal.pompei.allcommon.cbean.ckey.*; +import jp.sf.pal.pompei.allcommon.cbean.cvalue.ConditionValue; +import jp.sf.pal.pompei.allcommon.cbean.sqlclause.SqlClause; +import jp.sf.pal.pompei.cbean.cq.ciq.*; + +/** + * The condition-query of SPECIALS. + * + * @author DBFlute(AutoGenerator) + */ +public class BsSpecialsCQ extends AbstractBsSpecialsCQ { + + // =================================================================================== + // Attribute + // ========= + /** Corresponding inline query. */ + protected SpecialsCIQ _inlineQuery; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param childQuery Child query as abstract class. (Nullable: If null, this is base instance.) + * @param sqlClause SQL clause instance. (NotNull) + * @param aliasName My alias name. (NotNull) + * @param nestLevel Nest level. + */ + public BsSpecialsCQ(ConditionQuery childQuery, SqlClause sqlClause, String aliasName, int nestLevel) { + super(childQuery, sqlClause, aliasName, nestLevel); + } + + // =================================================================================== + // Inline + // ====== + /** + * Get inline query. + * + * @return Inline query. (NotNull) + */ + public SpecialsCIQ inline() { + if (_inlineQuery == null) { + _inlineQuery = new SpecialsCIQ(getChildQuery(), getSqlClause(), getAliasName(), getNestLevel(), this); + } + return _inlineQuery; + } + + // =================================================================================== + // Include-as-Mine + // =============== + + /** + * Include select-column of specialsId as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_SpecialsId() { + registerIncludedSelectColumn("SpecialsId", getRealColumnName("SPECIALS_ID")); + } + + /** + * Include select-column of specialsId as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_SpecialsId(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("SPECIALS_ID")); + } + + /** + * Include select-column of productsId as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_ProductsId() { + registerIncludedSelectColumn("ProductsId", getRealColumnName("PRODUCTS_ID")); + } + + /** + * Include select-column of productsId as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_ProductsId(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("PRODUCTS_ID")); + } + + /** + * Include select-column of specialsNewProductsPrice as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_SpecialsNewProductsPrice() { + registerIncludedSelectColumn("SpecialsNewProductsPrice", getRealColumnName("SPECIALS_NEW_PRODUCTS_PRICE")); + } + + /** + * Include select-column of specialsNewProductsPrice as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_SpecialsNewProductsPrice(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("SPECIALS_NEW_PRODUCTS_PRICE")); + } + + /** + * Include select-column of specialsDateAdded as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_SpecialsDateAdded() { + registerIncludedSelectColumn("SpecialsDateAdded", getRealColumnName("SPECIALS_DATE_ADDED")); + } + + /** + * Include select-column of specialsDateAdded as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_SpecialsDateAdded(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("SPECIALS_DATE_ADDED")); + } + + /** + * Include select-column of specialsLastModified as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_SpecialsLastModified() { + registerIncludedSelectColumn("SpecialsLastModified", getRealColumnName("SPECIALS_LAST_MODIFIED")); + } + + /** + * Include select-column of specialsLastModified as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_SpecialsLastModified(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("SPECIALS_LAST_MODIFIED")); + } + + /** + * Include select-column of expiresDate as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_ExpiresDate() { + registerIncludedSelectColumn("ExpiresDate", getRealColumnName("EXPIRES_DATE")); + } + + /** + * Include select-column of expiresDate as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_ExpiresDate(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("EXPIRES_DATE")); + } + + /** + * Include select-column of dateStatusChange as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_DateStatusChange() { + registerIncludedSelectColumn("DateStatusChange", getRealColumnName("DATE_STATUS_CHANGE")); + } + + /** + * Include select-column of dateStatusChange as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_DateStatusChange(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("DATE_STATUS_CHANGE")); + } + + /** + * Include select-column of status as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_Status() { + registerIncludedSelectColumn("Status", getRealColumnName("STATUS")); + } + + /** + * Include select-column of status as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_Status(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("STATUS")); + } + + // =================================================================================== + // Query + // ===== + // /* * * * * * * * * * * * * * * * * * * * * * * + // MyTable = [SPECIALS] + // * * * * * * * * */ + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [SPECIALS_ID] + // - - - - - - - - -/ + + /** The attribute of specialsId. */ + protected ConditionValue _specialsId; + + /** + * Get the value of specialsId. + * + * @return The value of specialsId. + */ + public ConditionValue getSpecialsId() { + if (_specialsId == null) { + _specialsId = new ConditionValue(); + } + return _specialsId; + } + + protected ConditionValue getCValueSpecialsId() { + return getSpecialsId(); + } + + + /** + * Add order-by of specialsId as ASC. + * + * @return this. (NotNull) + */ + public BsSpecialsCQ addOrderBy_SpecialsId_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_SPECIALS_ID), null, true);return this; + } + + /** + * Add order-by of specialsId as DESC. + * + * @return this. (NotNull) + */ + public BsSpecialsCQ addOrderBy_SpecialsId_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_SPECIALS_ID), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [PRODUCTS_ID] + // - - - - - - - - -/ + + /** The attribute of productsId. */ + protected ConditionValue _productsId; + + /** + * Get the value of productsId. + * + * @return The value of productsId. + */ + public ConditionValue getProductsId() { + if (_productsId == null) { + _productsId = new ConditionValue(); + } + return _productsId; + } + + protected ConditionValue getCValueProductsId() { + return getProductsId(); + } + + + /** + * Add order-by of productsId as ASC. + * + * @return this. (NotNull) + */ + public BsSpecialsCQ addOrderBy_ProductsId_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_PRODUCTS_ID), null, true);return this; + } + + /** + * Add order-by of productsId as DESC. + * + * @return this. (NotNull) + */ + public BsSpecialsCQ addOrderBy_ProductsId_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_PRODUCTS_ID), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [SPECIALS_NEW_PRODUCTS_PRICE] + // - - - - - - - - -/ + + /** The attribute of specialsNewProductsPrice. */ + protected ConditionValue _specialsNewProductsPrice; + + /** + * Get the value of specialsNewProductsPrice. + * + * @return The value of specialsNewProductsPrice. + */ + public ConditionValue getSpecialsNewProductsPrice() { + if (_specialsNewProductsPrice == null) { + _specialsNewProductsPrice = new ConditionValue(); + } + return _specialsNewProductsPrice; + } + + protected ConditionValue getCValueSpecialsNewProductsPrice() { + return getSpecialsNewProductsPrice(); + } + + + /** + * Add order-by of specialsNewProductsPrice as ASC. + * + * @return this. (NotNull) + */ + public BsSpecialsCQ addOrderBy_SpecialsNewProductsPrice_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_SPECIALS_NEW_PRODUCTS_PRICE), null, true);return this; + } + + /** + * Add order-by of specialsNewProductsPrice as DESC. + * + * @return this. (NotNull) + */ + public BsSpecialsCQ addOrderBy_SpecialsNewProductsPrice_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_SPECIALS_NEW_PRODUCTS_PRICE), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [SPECIALS_DATE_ADDED] + // - - - - - - - - -/ + + /** The attribute of specialsDateAdded. */ + protected ConditionValue _specialsDateAdded; + + /** + * Get the value of specialsDateAdded. + * + * @return The value of specialsDateAdded. + */ + public ConditionValue getSpecialsDateAdded() { + if (_specialsDateAdded == null) { + _specialsDateAdded = new ConditionValue(); + } + return _specialsDateAdded; + } + + protected ConditionValue getCValueSpecialsDateAdded() { + return getSpecialsDateAdded(); + } + + + /** + * Add order-by of specialsDateAdded as ASC. + * + * @return this. (NotNull) + */ + public BsSpecialsCQ addOrderBy_SpecialsDateAdded_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_SPECIALS_DATE_ADDED), null, true);return this; + } + + /** + * Add order-by of specialsDateAdded as DESC. + * + * @return this. (NotNull) + */ + public BsSpecialsCQ addOrderBy_SpecialsDateAdded_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_SPECIALS_DATE_ADDED), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [SPECIALS_LAST_MODIFIED] + // - - - - - - - - -/ + + /** The attribute of specialsLastModified. */ + protected ConditionValue _specialsLastModified; + + /** + * Get the value of specialsLastModified. + * + * @return The value of specialsLastModified. + */ + public ConditionValue getSpecialsLastModified() { + if (_specialsLastModified == null) { + _specialsLastModified = new ConditionValue(); + } + return _specialsLastModified; + } + + protected ConditionValue getCValueSpecialsLastModified() { + return getSpecialsLastModified(); + } + + + /** + * Add order-by of specialsLastModified as ASC. + * + * @return this. (NotNull) + */ + public BsSpecialsCQ addOrderBy_SpecialsLastModified_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_SPECIALS_LAST_MODIFIED), null, true);return this; + } + + /** + * Add order-by of specialsLastModified as DESC. + * + * @return this. (NotNull) + */ + public BsSpecialsCQ addOrderBy_SpecialsLastModified_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_SPECIALS_LAST_MODIFIED), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [EXPIRES_DATE] + // - - - - - - - - -/ + + /** The attribute of expiresDate. */ + protected ConditionValue _expiresDate; + + /** + * Get the value of expiresDate. + * + * @return The value of expiresDate. + */ + public ConditionValue getExpiresDate() { + if (_expiresDate == null) { + _expiresDate = new ConditionValue(); + } + return _expiresDate; + } + + protected ConditionValue getCValueExpiresDate() { + return getExpiresDate(); + } + + + /** + * Add order-by of expiresDate as ASC. + * + * @return this. (NotNull) + */ + public BsSpecialsCQ addOrderBy_ExpiresDate_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_EXPIRES_DATE), null, true);return this; + } + + /** + * Add order-by of expiresDate as DESC. + * + * @return this. (NotNull) + */ + public BsSpecialsCQ addOrderBy_ExpiresDate_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_EXPIRES_DATE), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [DATE_STATUS_CHANGE] + // - - - - - - - - -/ + + /** The attribute of dateStatusChange. */ + protected ConditionValue _dateStatusChange; + + /** + * Get the value of dateStatusChange. + * + * @return The value of dateStatusChange. + */ + public ConditionValue getDateStatusChange() { + if (_dateStatusChange == null) { + _dateStatusChange = new ConditionValue(); + } + return _dateStatusChange; + } + + protected ConditionValue getCValueDateStatusChange() { + return getDateStatusChange(); + } + + + /** + * Add order-by of dateStatusChange as ASC. + * + * @return this. (NotNull) + */ + public BsSpecialsCQ addOrderBy_DateStatusChange_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_DATE_STATUS_CHANGE), null, true);return this; + } + + /** + * Add order-by of dateStatusChange as DESC. + * + * @return this. (NotNull) + */ + public BsSpecialsCQ addOrderBy_DateStatusChange_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_DATE_STATUS_CHANGE), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [STATUS] + // - - - - - - - - -/ + + /** The attribute of status. */ + protected ConditionValue _status; + + /** + * Get the value of status. + * + * @return The value of status. + */ + public ConditionValue getStatus() { + if (_status == null) { + _status = new ConditionValue(); + } + return _status; + } + + protected ConditionValue getCValueStatus() { + return getStatus(); + } + + + /** + * Add order-by of status as ASC. + * + * @return this. (NotNull) + */ + public BsSpecialsCQ addOrderBy_Status_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_STATUS), null, true);return this; + } + + /** + * Add order-by of status as DESC. + * + * @return this. (NotNull) + */ + public BsSpecialsCQ addOrderBy_Status_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_STATUS), null, false);return this; + } + + // =================================================================================== + // Union Query + // =========== + protected void reflectRelationOnUnionQuery(ConditionQuery baseQueryAsSuper, ConditionQuery unionQueryAsSuper) { + final SpecialsCQ baseQuery = (SpecialsCQ)baseQueryAsSuper; + final SpecialsCQ unionQuery = (SpecialsCQ)unionQueryAsSuper; + + } + + // =================================================================================== + // Foreign Query + // ============= + + +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/BsTaxClassCQ.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/BsTaxClassCQ.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/BsTaxClassCQ.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,380 @@ + +package jp.sf.pal.pompei.cbean.cq.bs; + +import jp.sf.pal.pompei.cbean.cq.*; + +import jp.sf.pal.pompei.allcommon.cbean.*; +import jp.sf.pal.pompei.allcommon.cbean.ckey.*; +import jp.sf.pal.pompei.allcommon.cbean.cvalue.ConditionValue; +import jp.sf.pal.pompei.allcommon.cbean.sqlclause.SqlClause; +import jp.sf.pal.pompei.cbean.cq.ciq.*; + +/** + * The condition-query of TAX_CLASS. + * + * @author DBFlute(AutoGenerator) + */ +public class BsTaxClassCQ extends AbstractBsTaxClassCQ { + + // =================================================================================== + // Attribute + // ========= + /** Corresponding inline query. */ + protected TaxClassCIQ _inlineQuery; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param childQuery Child query as abstract class. (Nullable: If null, this is base instance.) + * @param sqlClause SQL clause instance. (NotNull) + * @param aliasName My alias name. (NotNull) + * @param nestLevel Nest level. + */ + public BsTaxClassCQ(ConditionQuery childQuery, SqlClause sqlClause, String aliasName, int nestLevel) { + super(childQuery, sqlClause, aliasName, nestLevel); + } + + // =================================================================================== + // Inline + // ====== + /** + * Get inline query. + * + * @return Inline query. (NotNull) + */ + public TaxClassCIQ inline() { + if (_inlineQuery == null) { + _inlineQuery = new TaxClassCIQ(getChildQuery(), getSqlClause(), getAliasName(), getNestLevel(), this); + } + return _inlineQuery; + } + + // =================================================================================== + // Include-as-Mine + // =============== + + /** + * Include select-column of taxClassId as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_TaxClassId() { + registerIncludedSelectColumn("TaxClassId", getRealColumnName("TAX_CLASS_ID")); + } + + /** + * Include select-column of taxClassId as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_TaxClassId(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("TAX_CLASS_ID")); + } + + /** + * Include select-column of taxClassTitle as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_TaxClassTitle() { + registerIncludedSelectColumn("TaxClassTitle", getRealColumnName("TAX_CLASS_TITLE")); + } + + /** + * Include select-column of taxClassTitle as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_TaxClassTitle(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("TAX_CLASS_TITLE")); + } + + /** + * Include select-column of taxClassDescription as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_TaxClassDescription() { + registerIncludedSelectColumn("TaxClassDescription", getRealColumnName("TAX_CLASS_DESCRIPTION")); + } + + /** + * Include select-column of taxClassDescription as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_TaxClassDescription(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("TAX_CLASS_DESCRIPTION")); + } + + /** + * Include select-column of lastModified as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_LastModified() { + registerIncludedSelectColumn("LastModified", getRealColumnName("LAST_MODIFIED")); + } + + /** + * Include select-column of lastModified as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_LastModified(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("LAST_MODIFIED")); + } + + /** + * Include select-column of dateAdded as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_DateAdded() { + registerIncludedSelectColumn("DateAdded", getRealColumnName("DATE_ADDED")); + } + + /** + * Include select-column of dateAdded as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_DateAdded(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("DATE_ADDED")); + } + + // =================================================================================== + // Query + // ===== + // /* * * * * * * * * * * * * * * * * * * * * * * + // MyTable = [TAX_CLASS] + // * * * * * * * * */ + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [TAX_CLASS_ID] + // - - - - - - - - -/ + + /** The attribute of taxClassId. */ + protected ConditionValue _taxClassId; + + /** + * Get the value of taxClassId. + * + * @return The value of taxClassId. + */ + public ConditionValue getTaxClassId() { + if (_taxClassId == null) { + _taxClassId = new ConditionValue(); + } + return _taxClassId; + } + + protected ConditionValue getCValueTaxClassId() { + return getTaxClassId(); + } + + + /** + * Add order-by of taxClassId as ASC. + * + * @return this. (NotNull) + */ + public BsTaxClassCQ addOrderBy_TaxClassId_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_TAX_CLASS_ID), null, true);return this; + } + + /** + * Add order-by of taxClassId as DESC. + * + * @return this. (NotNull) + */ + public BsTaxClassCQ addOrderBy_TaxClassId_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_TAX_CLASS_ID), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [TAX_CLASS_TITLE] + // - - - - - - - - -/ + + /** The attribute of taxClassTitle. */ + protected ConditionValue _taxClassTitle; + + /** + * Get the value of taxClassTitle. + * + * @return The value of taxClassTitle. + */ + public ConditionValue getTaxClassTitle() { + if (_taxClassTitle == null) { + _taxClassTitle = new ConditionValue(); + } + return _taxClassTitle; + } + + protected ConditionValue getCValueTaxClassTitle() { + return getTaxClassTitle(); + } + + + /** + * Add order-by of taxClassTitle as ASC. + * + * @return this. (NotNull) + */ + public BsTaxClassCQ addOrderBy_TaxClassTitle_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_TAX_CLASS_TITLE), null, true);return this; + } + + /** + * Add order-by of taxClassTitle as DESC. + * + * @return this. (NotNull) + */ + public BsTaxClassCQ addOrderBy_TaxClassTitle_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_TAX_CLASS_TITLE), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [TAX_CLASS_DESCRIPTION] + // - - - - - - - - -/ + + /** The attribute of taxClassDescription. */ + protected ConditionValue _taxClassDescription; + + /** + * Get the value of taxClassDescription. + * + * @return The value of taxClassDescription. + */ + public ConditionValue getTaxClassDescription() { + if (_taxClassDescription == null) { + _taxClassDescription = new ConditionValue(); + } + return _taxClassDescription; + } + + protected ConditionValue getCValueTaxClassDescription() { + return getTaxClassDescription(); + } + + + /** + * Add order-by of taxClassDescription as ASC. + * + * @return this. (NotNull) + */ + public BsTaxClassCQ addOrderBy_TaxClassDescription_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_TAX_CLASS_DESCRIPTION), null, true);return this; + } + + /** + * Add order-by of taxClassDescription as DESC. + * + * @return this. (NotNull) + */ + public BsTaxClassCQ addOrderBy_TaxClassDescription_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_TAX_CLASS_DESCRIPTION), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [LAST_MODIFIED] + // - - - - - - - - -/ + + /** The attribute of lastModified. */ + protected ConditionValue _lastModified; + + /** + * Get the value of lastModified. + * + * @return The value of lastModified. + */ + public ConditionValue getLastModified() { + if (_lastModified == null) { + _lastModified = new ConditionValue(); + } + return _lastModified; + } + + protected ConditionValue getCValueLastModified() { + return getLastModified(); + } + + + /** + * Add order-by of lastModified as ASC. + * + * @return this. (NotNull) + */ + public BsTaxClassCQ addOrderBy_LastModified_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_LAST_MODIFIED), null, true);return this; + } + + /** + * Add order-by of lastModified as DESC. + * + * @return this. (NotNull) + */ + public BsTaxClassCQ addOrderBy_LastModified_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_LAST_MODIFIED), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [DATE_ADDED] + // - - - - - - - - -/ + + /** The attribute of dateAdded. */ + protected ConditionValue _dateAdded; + + /** + * Get the value of dateAdded. + * + * @return The value of dateAdded. + */ + public ConditionValue getDateAdded() { + if (_dateAdded == null) { + _dateAdded = new ConditionValue(); + } + return _dateAdded; + } + + protected ConditionValue getCValueDateAdded() { + return getDateAdded(); + } + + + /** + * Add order-by of dateAdded as ASC. + * + * @return this. (NotNull) + */ + public BsTaxClassCQ addOrderBy_DateAdded_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_DATE_ADDED), null, true);return this; + } + + /** + * Add order-by of dateAdded as DESC. + * + * @return this. (NotNull) + */ + public BsTaxClassCQ addOrderBy_DateAdded_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_DATE_ADDED), null, false);return this; + } + + // =================================================================================== + // Union Query + // =========== + protected void reflectRelationOnUnionQuery(ConditionQuery baseQueryAsSuper, ConditionQuery unionQueryAsSuper) { + final TaxClassCQ baseQuery = (TaxClassCQ)baseQueryAsSuper; + final TaxClassCQ unionQuery = (TaxClassCQ)unionQueryAsSuper; + + } + + // =================================================================================== + // Foreign Query + // ============= + + +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/BsTaxRatesCQ.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/BsTaxRatesCQ.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/BsTaxRatesCQ.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,560 @@ + +package jp.sf.pal.pompei.cbean.cq.bs; + +import jp.sf.pal.pompei.cbean.cq.*; + +import jp.sf.pal.pompei.allcommon.cbean.*; +import jp.sf.pal.pompei.allcommon.cbean.ckey.*; +import jp.sf.pal.pompei.allcommon.cbean.cvalue.ConditionValue; +import jp.sf.pal.pompei.allcommon.cbean.sqlclause.SqlClause; +import jp.sf.pal.pompei.cbean.cq.ciq.*; + +/** + * The condition-query of TAX_RATES. + * + * @author DBFlute(AutoGenerator) + */ +public class BsTaxRatesCQ extends AbstractBsTaxRatesCQ { + + // =================================================================================== + // Attribute + // ========= + /** Corresponding inline query. */ + protected TaxRatesCIQ _inlineQuery; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param childQuery Child query as abstract class. (Nullable: If null, this is base instance.) + * @param sqlClause SQL clause instance. (NotNull) + * @param aliasName My alias name. (NotNull) + * @param nestLevel Nest level. + */ + public BsTaxRatesCQ(ConditionQuery childQuery, SqlClause sqlClause, String aliasName, int nestLevel) { + super(childQuery, sqlClause, aliasName, nestLevel); + } + + // =================================================================================== + // Inline + // ====== + /** + * Get inline query. + * + * @return Inline query. (NotNull) + */ + public TaxRatesCIQ inline() { + if (_inlineQuery == null) { + _inlineQuery = new TaxRatesCIQ(getChildQuery(), getSqlClause(), getAliasName(), getNestLevel(), this); + } + return _inlineQuery; + } + + // =================================================================================== + // Include-as-Mine + // =============== + + /** + * Include select-column of taxRatesId as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_TaxRatesId() { + registerIncludedSelectColumn("TaxRatesId", getRealColumnName("TAX_RATES_ID")); + } + + /** + * Include select-column of taxRatesId as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_TaxRatesId(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("TAX_RATES_ID")); + } + + /** + * Include select-column of taxZoneId as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_TaxZoneId() { + registerIncludedSelectColumn("TaxZoneId", getRealColumnName("TAX_ZONE_ID")); + } + + /** + * Include select-column of taxZoneId as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_TaxZoneId(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("TAX_ZONE_ID")); + } + + /** + * Include select-column of taxClassId as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_TaxClassId() { + registerIncludedSelectColumn("TaxClassId", getRealColumnName("TAX_CLASS_ID")); + } + + /** + * Include select-column of taxClassId as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_TaxClassId(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("TAX_CLASS_ID")); + } + + /** + * Include select-column of taxPriority as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_TaxPriority() { + registerIncludedSelectColumn("TaxPriority", getRealColumnName("TAX_PRIORITY")); + } + + /** + * Include select-column of taxPriority as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_TaxPriority(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("TAX_PRIORITY")); + } + + /** + * Include select-column of taxRate as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_TaxRate() { + registerIncludedSelectColumn("TaxRate", getRealColumnName("TAX_RATE")); + } + + /** + * Include select-column of taxRate as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_TaxRate(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("TAX_RATE")); + } + + /** + * Include select-column of taxDescription as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_TaxDescription() { + registerIncludedSelectColumn("TaxDescription", getRealColumnName("TAX_DESCRIPTION")); + } + + /** + * Include select-column of taxDescription as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_TaxDescription(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("TAX_DESCRIPTION")); + } + + /** + * Include select-column of lastModified as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_LastModified() { + registerIncludedSelectColumn("LastModified", getRealColumnName("LAST_MODIFIED")); + } + + /** + * Include select-column of lastModified as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_LastModified(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("LAST_MODIFIED")); + } + + /** + * Include select-column of dateAdded as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_DateAdded() { + registerIncludedSelectColumn("DateAdded", getRealColumnName("DATE_ADDED")); + } + + /** + * Include select-column of dateAdded as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_DateAdded(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("DATE_ADDED")); + } + + // =================================================================================== + // Query + // ===== + // /* * * * * * * * * * * * * * * * * * * * * * * + // MyTable = [TAX_RATES] + // * * * * * * * * */ + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [TAX_RATES_ID] + // - - - - - - - - -/ + + /** The attribute of taxRatesId. */ + protected ConditionValue _taxRatesId; + + /** + * Get the value of taxRatesId. + * + * @return The value of taxRatesId. + */ + public ConditionValue getTaxRatesId() { + if (_taxRatesId == null) { + _taxRatesId = new ConditionValue(); + } + return _taxRatesId; + } + + protected ConditionValue getCValueTaxRatesId() { + return getTaxRatesId(); + } + + + /** + * Add order-by of taxRatesId as ASC. + * + * @return this. (NotNull) + */ + public BsTaxRatesCQ addOrderBy_TaxRatesId_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_TAX_RATES_ID), null, true);return this; + } + + /** + * Add order-by of taxRatesId as DESC. + * + * @return this. (NotNull) + */ + public BsTaxRatesCQ addOrderBy_TaxRatesId_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_TAX_RATES_ID), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [TAX_ZONE_ID] + // - - - - - - - - -/ + + /** The attribute of taxZoneId. */ + protected ConditionValue _taxZoneId; + + /** + * Get the value of taxZoneId. + * + * @return The value of taxZoneId. + */ + public ConditionValue getTaxZoneId() { + if (_taxZoneId == null) { + _taxZoneId = new ConditionValue(); + } + return _taxZoneId; + } + + protected ConditionValue getCValueTaxZoneId() { + return getTaxZoneId(); + } + + + /** + * Add order-by of taxZoneId as ASC. + * + * @return this. (NotNull) + */ + public BsTaxRatesCQ addOrderBy_TaxZoneId_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_TAX_ZONE_ID), null, true);return this; + } + + /** + * Add order-by of taxZoneId as DESC. + * + * @return this. (NotNull) + */ + public BsTaxRatesCQ addOrderBy_TaxZoneId_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_TAX_ZONE_ID), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [TAX_CLASS_ID] + // - - - - - - - - -/ + + /** The attribute of taxClassId. */ + protected ConditionValue _taxClassId; + + /** + * Get the value of taxClassId. + * + * @return The value of taxClassId. + */ + public ConditionValue getTaxClassId() { + if (_taxClassId == null) { + _taxClassId = new ConditionValue(); + } + return _taxClassId; + } + + protected ConditionValue getCValueTaxClassId() { + return getTaxClassId(); + } + + + /** + * Add order-by of taxClassId as ASC. + * + * @return this. (NotNull) + */ + public BsTaxRatesCQ addOrderBy_TaxClassId_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_TAX_CLASS_ID), null, true);return this; + } + + /** + * Add order-by of taxClassId as DESC. + * + * @return this. (NotNull) + */ + public BsTaxRatesCQ addOrderBy_TaxClassId_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_TAX_CLASS_ID), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [TAX_PRIORITY] + // - - - - - - - - -/ + + /** The attribute of taxPriority. */ + protected ConditionValue _taxPriority; + + /** + * Get the value of taxPriority. + * + * @return The value of taxPriority. + */ + public ConditionValue getTaxPriority() { + if (_taxPriority == null) { + _taxPriority = new ConditionValue(); + } + return _taxPriority; + } + + protected ConditionValue getCValueTaxPriority() { + return getTaxPriority(); + } + + + /** + * Add order-by of taxPriority as ASC. + * + * @return this. (NotNull) + */ + public BsTaxRatesCQ addOrderBy_TaxPriority_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_TAX_PRIORITY), null, true);return this; + } + + /** + * Add order-by of taxPriority as DESC. + * + * @return this. (NotNull) + */ + public BsTaxRatesCQ addOrderBy_TaxPriority_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_TAX_PRIORITY), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [TAX_RATE] + // - - - - - - - - -/ + + /** The attribute of taxRate. */ + protected ConditionValue _taxRate; + + /** + * Get the value of taxRate. + * + * @return The value of taxRate. + */ + public ConditionValue getTaxRate() { + if (_taxRate == null) { + _taxRate = new ConditionValue(); + } + return _taxRate; + } + + protected ConditionValue getCValueTaxRate() { + return getTaxRate(); + } + + + /** + * Add order-by of taxRate as ASC. + * + * @return this. (NotNull) + */ + public BsTaxRatesCQ addOrderBy_TaxRate_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_TAX_RATE), null, true);return this; + } + + /** + * Add order-by of taxRate as DESC. + * + * @return this. (NotNull) + */ + public BsTaxRatesCQ addOrderBy_TaxRate_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_TAX_RATE), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [TAX_DESCRIPTION] + // - - - - - - - - -/ + + /** The attribute of taxDescription. */ + protected ConditionValue _taxDescription; + + /** + * Get the value of taxDescription. + * + * @return The value of taxDescription. + */ + public ConditionValue getTaxDescription() { + if (_taxDescription == null) { + _taxDescription = new ConditionValue(); + } + return _taxDescription; + } + + protected ConditionValue getCValueTaxDescription() { + return getTaxDescription(); + } + + + /** + * Add order-by of taxDescription as ASC. + * + * @return this. (NotNull) + */ + public BsTaxRatesCQ addOrderBy_TaxDescription_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_TAX_DESCRIPTION), null, true);return this; + } + + /** + * Add order-by of taxDescription as DESC. + * + * @return this. (NotNull) + */ + public BsTaxRatesCQ addOrderBy_TaxDescription_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_TAX_DESCRIPTION), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [LAST_MODIFIED] + // - - - - - - - - -/ + + /** The attribute of lastModified. */ + protected ConditionValue _lastModified; + + /** + * Get the value of lastModified. + * + * @return The value of lastModified. + */ + public ConditionValue getLastModified() { + if (_lastModified == null) { + _lastModified = new ConditionValue(); + } + return _lastModified; + } + + protected ConditionValue getCValueLastModified() { + return getLastModified(); + } + + + /** + * Add order-by of lastModified as ASC. + * + * @return this. (NotNull) + */ + public BsTaxRatesCQ addOrderBy_LastModified_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_LAST_MODIFIED), null, true);return this; + } + + /** + * Add order-by of lastModified as DESC. + * + * @return this. (NotNull) + */ + public BsTaxRatesCQ addOrderBy_LastModified_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_LAST_MODIFIED), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [DATE_ADDED] + // - - - - - - - - -/ + + /** The attribute of dateAdded. */ + protected ConditionValue _dateAdded; + + /** + * Get the value of dateAdded. + * + * @return The value of dateAdded. + */ + public ConditionValue getDateAdded() { + if (_dateAdded == null) { + _dateAdded = new ConditionValue(); + } + return _dateAdded; + } + + protected ConditionValue getCValueDateAdded() { + return getDateAdded(); + } + + + /** + * Add order-by of dateAdded as ASC. + * + * @return this. (NotNull) + */ + public BsTaxRatesCQ addOrderBy_DateAdded_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_DATE_ADDED), null, true);return this; + } + + /** + * Add order-by of dateAdded as DESC. + * + * @return this. (NotNull) + */ + public BsTaxRatesCQ addOrderBy_DateAdded_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_DATE_ADDED), null, false);return this; + } + + // =================================================================================== + // Union Query + // =========== + protected void reflectRelationOnUnionQuery(ConditionQuery baseQueryAsSuper, ConditionQuery unionQueryAsSuper) { + final TaxRatesCQ baseQuery = (TaxRatesCQ)baseQueryAsSuper; + final TaxRatesCQ unionQuery = (TaxRatesCQ)unionQueryAsSuper; + + } + + // =================================================================================== + // Foreign Query + // ============= + + +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/BsWhosOnlineCQ.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/BsWhosOnlineCQ.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/BsWhosOnlineCQ.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,500 @@ + +package jp.sf.pal.pompei.cbean.cq.bs; + +import jp.sf.pal.pompei.cbean.cq.*; + +import jp.sf.pal.pompei.allcommon.cbean.*; +import jp.sf.pal.pompei.allcommon.cbean.ckey.*; +import jp.sf.pal.pompei.allcommon.cbean.cvalue.ConditionValue; +import jp.sf.pal.pompei.allcommon.cbean.sqlclause.SqlClause; +import jp.sf.pal.pompei.cbean.cq.ciq.*; + +/** + * The condition-query of WHOS_ONLINE. + * + * @author DBFlute(AutoGenerator) + */ +public class BsWhosOnlineCQ extends AbstractBsWhosOnlineCQ { + + // =================================================================================== + // Attribute + // ========= + /** Corresponding inline query. */ + protected WhosOnlineCIQ _inlineQuery; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param childQuery Child query as abstract class. (Nullable: If null, this is base instance.) + * @param sqlClause SQL clause instance. (NotNull) + * @param aliasName My alias name. (NotNull) + * @param nestLevel Nest level. + */ + public BsWhosOnlineCQ(ConditionQuery childQuery, SqlClause sqlClause, String aliasName, int nestLevel) { + super(childQuery, sqlClause, aliasName, nestLevel); + } + + // =================================================================================== + // Inline + // ====== + /** + * Get inline query. + * + * @return Inline query. (NotNull) + */ + public WhosOnlineCIQ inline() { + if (_inlineQuery == null) { + _inlineQuery = new WhosOnlineCIQ(getChildQuery(), getSqlClause(), getAliasName(), getNestLevel(), this); + } + return _inlineQuery; + } + + // =================================================================================== + // Include-as-Mine + // =============== + + /** + * Include select-column of customerId as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_CustomerId() { + registerIncludedSelectColumn("CustomerId", getRealColumnName("CUSTOMER_ID")); + } + + /** + * Include select-column of customerId as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_CustomerId(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("CUSTOMER_ID")); + } + + /** + * Include select-column of fullName as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_FullName() { + registerIncludedSelectColumn("FullName", getRealColumnName("FULL_NAME")); + } + + /** + * Include select-column of fullName as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_FullName(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("FULL_NAME")); + } + + /** + * Include select-column of sessionId as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_SessionId() { + registerIncludedSelectColumn("SessionId", getRealColumnName("SESSION_ID")); + } + + /** + * Include select-column of sessionId as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_SessionId(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("SESSION_ID")); + } + + /** + * Include select-column of ipAddress as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_IpAddress() { + registerIncludedSelectColumn("IpAddress", getRealColumnName("IP_ADDRESS")); + } + + /** + * Include select-column of ipAddress as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_IpAddress(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("IP_ADDRESS")); + } + + /** + * Include select-column of timeEntry as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_TimeEntry() { + registerIncludedSelectColumn("TimeEntry", getRealColumnName("TIME_ENTRY")); + } + + /** + * Include select-column of timeEntry as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_TimeEntry(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("TIME_ENTRY")); + } + + /** + * Include select-column of timeLastClick as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_TimeLastClick() { + registerIncludedSelectColumn("TimeLastClick", getRealColumnName("TIME_LAST_CLICK")); + } + + /** + * Include select-column of timeLastClick as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_TimeLastClick(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("TIME_LAST_CLICK")); + } + + /** + * Include select-column of lastPageUrl as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_LastPageUrl() { + registerIncludedSelectColumn("LastPageUrl", getRealColumnName("LAST_PAGE_URL")); + } + + /** + * Include select-column of lastPageUrl as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_LastPageUrl(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("LAST_PAGE_URL")); + } + + // =================================================================================== + // Query + // ===== + // /* * * * * * * * * * * * * * * * * * * * * * * + // MyTable = [WHOS_ONLINE] + // * * * * * * * * */ + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [CUSTOMER_ID] + // - - - - - - - - -/ + + /** The attribute of customerId. */ + protected ConditionValue _customerId; + + /** + * Get the value of customerId. + * + * @return The value of customerId. + */ + public ConditionValue getCustomerId() { + if (_customerId == null) { + _customerId = new ConditionValue(); + } + return _customerId; + } + + protected ConditionValue getCValueCustomerId() { + return getCustomerId(); + } + + + /** + * Add order-by of customerId as ASC. + * + * @return this. (NotNull) + */ + public BsWhosOnlineCQ addOrderBy_CustomerId_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_CUSTOMER_ID), null, true);return this; + } + + /** + * Add order-by of customerId as DESC. + * + * @return this. (NotNull) + */ + public BsWhosOnlineCQ addOrderBy_CustomerId_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_CUSTOMER_ID), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [FULL_NAME] + // - - - - - - - - -/ + + /** The attribute of fullName. */ + protected ConditionValue _fullName; + + /** + * Get the value of fullName. + * + * @return The value of fullName. + */ + public ConditionValue getFullName() { + if (_fullName == null) { + _fullName = new ConditionValue(); + } + return _fullName; + } + + protected ConditionValue getCValueFullName() { + return getFullName(); + } + + + /** + * Add order-by of fullName as ASC. + * + * @return this. (NotNull) + */ + public BsWhosOnlineCQ addOrderBy_FullName_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_FULL_NAME), null, true);return this; + } + + /** + * Add order-by of fullName as DESC. + * + * @return this. (NotNull) + */ + public BsWhosOnlineCQ addOrderBy_FullName_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_FULL_NAME), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [SESSION_ID] + // - - - - - - - - -/ + + /** The attribute of sessionId. */ + protected ConditionValue _sessionId; + + /** + * Get the value of sessionId. + * + * @return The value of sessionId. + */ + public ConditionValue getSessionId() { + if (_sessionId == null) { + _sessionId = new ConditionValue(); + } + return _sessionId; + } + + protected ConditionValue getCValueSessionId() { + return getSessionId(); + } + + + /** + * Add order-by of sessionId as ASC. + * + * @return this. (NotNull) + */ + public BsWhosOnlineCQ addOrderBy_SessionId_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_SESSION_ID), null, true);return this; + } + + /** + * Add order-by of sessionId as DESC. + * + * @return this. (NotNull) + */ + public BsWhosOnlineCQ addOrderBy_SessionId_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_SESSION_ID), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [IP_ADDRESS] + // - - - - - - - - -/ + + /** The attribute of ipAddress. */ + protected ConditionValue _ipAddress; + + /** + * Get the value of ipAddress. + * + * @return The value of ipAddress. + */ + public ConditionValue getIpAddress() { + if (_ipAddress == null) { + _ipAddress = new ConditionValue(); + } + return _ipAddress; + } + + protected ConditionValue getCValueIpAddress() { + return getIpAddress(); + } + + + /** + * Add order-by of ipAddress as ASC. + * + * @return this. (NotNull) + */ + public BsWhosOnlineCQ addOrderBy_IpAddress_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_IP_ADDRESS), null, true);return this; + } + + /** + * Add order-by of ipAddress as DESC. + * + * @return this. (NotNull) + */ + public BsWhosOnlineCQ addOrderBy_IpAddress_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_IP_ADDRESS), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [TIME_ENTRY] + // - - - - - - - - -/ + + /** The attribute of timeEntry. */ + protected ConditionValue _timeEntry; + + /** + * Get the value of timeEntry. + * + * @return The value of timeEntry. + */ + public ConditionValue getTimeEntry() { + if (_timeEntry == null) { + _timeEntry = new ConditionValue(); + } + return _timeEntry; + } + + protected ConditionValue getCValueTimeEntry() { + return getTimeEntry(); + } + + + /** + * Add order-by of timeEntry as ASC. + * + * @return this. (NotNull) + */ + public BsWhosOnlineCQ addOrderBy_TimeEntry_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_TIME_ENTRY), null, true);return this; + } + + /** + * Add order-by of timeEntry as DESC. + * + * @return this. (NotNull) + */ + public BsWhosOnlineCQ addOrderBy_TimeEntry_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_TIME_ENTRY), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [TIME_LAST_CLICK] + // - - - - - - - - -/ + + /** The attribute of timeLastClick. */ + protected ConditionValue _timeLastClick; + + /** + * Get the value of timeLastClick. + * + * @return The value of timeLastClick. + */ + public ConditionValue getTimeLastClick() { + if (_timeLastClick == null) { + _timeLastClick = new ConditionValue(); + } + return _timeLastClick; + } + + protected ConditionValue getCValueTimeLastClick() { + return getTimeLastClick(); + } + + + /** + * Add order-by of timeLastClick as ASC. + * + * @return this. (NotNull) + */ + public BsWhosOnlineCQ addOrderBy_TimeLastClick_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_TIME_LAST_CLICK), null, true);return this; + } + + /** + * Add order-by of timeLastClick as DESC. + * + * @return this. (NotNull) + */ + public BsWhosOnlineCQ addOrderBy_TimeLastClick_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_TIME_LAST_CLICK), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [LAST_PAGE_URL] + // - - - - - - - - -/ + + /** The attribute of lastPageUrl. */ + protected ConditionValue _lastPageUrl; + + /** + * Get the value of lastPageUrl. + * + * @return The value of lastPageUrl. + */ + public ConditionValue getLastPageUrl() { + if (_lastPageUrl == null) { + _lastPageUrl = new ConditionValue(); + } + return _lastPageUrl; + } + + protected ConditionValue getCValueLastPageUrl() { + return getLastPageUrl(); + } + + + /** + * Add order-by of lastPageUrl as ASC. + * + * @return this. (NotNull) + */ + public BsWhosOnlineCQ addOrderBy_LastPageUrl_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_LAST_PAGE_URL), null, true);return this; + } + + /** + * Add order-by of lastPageUrl as DESC. + * + * @return this. (NotNull) + */ + public BsWhosOnlineCQ addOrderBy_LastPageUrl_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_LAST_PAGE_URL), null, false);return this; + } + + // =================================================================================== + // Union Query + // =========== + protected void reflectRelationOnUnionQuery(ConditionQuery baseQueryAsSuper, ConditionQuery unionQueryAsSuper) { + final WhosOnlineCQ baseQuery = (WhosOnlineCQ)baseQueryAsSuper; + final WhosOnlineCQ unionQuery = (WhosOnlineCQ)unionQueryAsSuper; + + } + + // =================================================================================== + // Foreign Query + // ============= + + +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/BsZonesCQ.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/BsZonesCQ.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/BsZonesCQ.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,320 @@ + +package jp.sf.pal.pompei.cbean.cq.bs; + +import jp.sf.pal.pompei.cbean.cq.*; + +import jp.sf.pal.pompei.allcommon.cbean.*; +import jp.sf.pal.pompei.allcommon.cbean.ckey.*; +import jp.sf.pal.pompei.allcommon.cbean.cvalue.ConditionValue; +import jp.sf.pal.pompei.allcommon.cbean.sqlclause.SqlClause; +import jp.sf.pal.pompei.cbean.cq.ciq.*; + +/** + * The condition-query of ZONES. + * + * @author DBFlute(AutoGenerator) + */ +public class BsZonesCQ extends AbstractBsZonesCQ { + + // =================================================================================== + // Attribute + // ========= + /** Corresponding inline query. */ + protected ZonesCIQ _inlineQuery; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param childQuery Child query as abstract class. (Nullable: If null, this is base instance.) + * @param sqlClause SQL clause instance. (NotNull) + * @param aliasName My alias name. (NotNull) + * @param nestLevel Nest level. + */ + public BsZonesCQ(ConditionQuery childQuery, SqlClause sqlClause, String aliasName, int nestLevel) { + super(childQuery, sqlClause, aliasName, nestLevel); + } + + // =================================================================================== + // Inline + // ====== + /** + * Get inline query. + * + * @return Inline query. (NotNull) + */ + public ZonesCIQ inline() { + if (_inlineQuery == null) { + _inlineQuery = new ZonesCIQ(getChildQuery(), getSqlClause(), getAliasName(), getNestLevel(), this); + } + return _inlineQuery; + } + + // =================================================================================== + // Include-as-Mine + // =============== + + /** + * Include select-column of zoneId as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_ZoneId() { + registerIncludedSelectColumn("ZoneId", getRealColumnName("ZONE_ID")); + } + + /** + * Include select-column of zoneId as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_ZoneId(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("ZONE_ID")); + } + + /** + * Include select-column of zoneCountryId as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_ZoneCountryId() { + registerIncludedSelectColumn("ZoneCountryId", getRealColumnName("ZONE_COUNTRY_ID")); + } + + /** + * Include select-column of zoneCountryId as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_ZoneCountryId(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("ZONE_COUNTRY_ID")); + } + + /** + * Include select-column of zoneCode as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_ZoneCode() { + registerIncludedSelectColumn("ZoneCode", getRealColumnName("ZONE_CODE")); + } + + /** + * Include select-column of zoneCode as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_ZoneCode(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("ZONE_CODE")); + } + + /** + * Include select-column of zoneName as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_ZoneName() { + registerIncludedSelectColumn("ZoneName", getRealColumnName("ZONE_NAME")); + } + + /** + * Include select-column of zoneName as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_ZoneName(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("ZONE_NAME")); + } + + // =================================================================================== + // Query + // ===== + // /* * * * * * * * * * * * * * * * * * * * * * * + // MyTable = [ZONES] + // * * * * * * * * */ + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [ZONE_ID] + // - - - - - - - - -/ + + /** The attribute of zoneId. */ + protected ConditionValue _zoneId; + + /** + * Get the value of zoneId. + * + * @return The value of zoneId. + */ + public ConditionValue getZoneId() { + if (_zoneId == null) { + _zoneId = new ConditionValue(); + } + return _zoneId; + } + + protected ConditionValue getCValueZoneId() { + return getZoneId(); + } + + + /** + * Add order-by of zoneId as ASC. + * + * @return this. (NotNull) + */ + public BsZonesCQ addOrderBy_ZoneId_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_ZONE_ID), null, true);return this; + } + + /** + * Add order-by of zoneId as DESC. + * + * @return this. (NotNull) + */ + public BsZonesCQ addOrderBy_ZoneId_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_ZONE_ID), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [ZONE_COUNTRY_ID] + // - - - - - - - - -/ + + /** The attribute of zoneCountryId. */ + protected ConditionValue _zoneCountryId; + + /** + * Get the value of zoneCountryId. + * + * @return The value of zoneCountryId. + */ + public ConditionValue getZoneCountryId() { + if (_zoneCountryId == null) { + _zoneCountryId = new ConditionValue(); + } + return _zoneCountryId; + } + + protected ConditionValue getCValueZoneCountryId() { + return getZoneCountryId(); + } + + + /** + * Add order-by of zoneCountryId as ASC. + * + * @return this. (NotNull) + */ + public BsZonesCQ addOrderBy_ZoneCountryId_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_ZONE_COUNTRY_ID), null, true);return this; + } + + /** + * Add order-by of zoneCountryId as DESC. + * + * @return this. (NotNull) + */ + public BsZonesCQ addOrderBy_ZoneCountryId_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_ZONE_COUNTRY_ID), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [ZONE_CODE] + // - - - - - - - - -/ + + /** The attribute of zoneCode. */ + protected ConditionValue _zoneCode; + + /** + * Get the value of zoneCode. + * + * @return The value of zoneCode. + */ + public ConditionValue getZoneCode() { + if (_zoneCode == null) { + _zoneCode = new ConditionValue(); + } + return _zoneCode; + } + + protected ConditionValue getCValueZoneCode() { + return getZoneCode(); + } + + + /** + * Add order-by of zoneCode as ASC. + * + * @return this. (NotNull) + */ + public BsZonesCQ addOrderBy_ZoneCode_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_ZONE_CODE), null, true);return this; + } + + /** + * Add order-by of zoneCode as DESC. + * + * @return this. (NotNull) + */ + public BsZonesCQ addOrderBy_ZoneCode_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_ZONE_CODE), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [ZONE_NAME] + // - - - - - - - - -/ + + /** The attribute of zoneName. */ + protected ConditionValue _zoneName; + + /** + * Get the value of zoneName. + * + * @return The value of zoneName. + */ + public ConditionValue getZoneName() { + if (_zoneName == null) { + _zoneName = new ConditionValue(); + } + return _zoneName; + } + + protected ConditionValue getCValueZoneName() { + return getZoneName(); + } + + + /** + * Add order-by of zoneName as ASC. + * + * @return this. (NotNull) + */ + public BsZonesCQ addOrderBy_ZoneName_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_ZONE_NAME), null, true);return this; + } + + /** + * Add order-by of zoneName as DESC. + * + * @return this. (NotNull) + */ + public BsZonesCQ addOrderBy_ZoneName_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_ZONE_NAME), null, false);return this; + } + + // =================================================================================== + // Union Query + // =========== + protected void reflectRelationOnUnionQuery(ConditionQuery baseQueryAsSuper, ConditionQuery unionQueryAsSuper) { + final ZonesCQ baseQuery = (ZonesCQ)baseQueryAsSuper; + final ZonesCQ unionQuery = (ZonesCQ)unionQueryAsSuper; + + } + + // =================================================================================== + // Foreign Query + // ============= + + +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/BsZonesToGeoZonesCQ.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/BsZonesToGeoZonesCQ.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/bs/BsZonesToGeoZonesCQ.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,440 @@ + +package jp.sf.pal.pompei.cbean.cq.bs; + +import jp.sf.pal.pompei.cbean.cq.*; + +import jp.sf.pal.pompei.allcommon.cbean.*; +import jp.sf.pal.pompei.allcommon.cbean.ckey.*; +import jp.sf.pal.pompei.allcommon.cbean.cvalue.ConditionValue; +import jp.sf.pal.pompei.allcommon.cbean.sqlclause.SqlClause; +import jp.sf.pal.pompei.cbean.cq.ciq.*; + +/** + * The condition-query of ZONES_TO_GEO_ZONES. + * + * @author DBFlute(AutoGenerator) + */ +public class BsZonesToGeoZonesCQ extends AbstractBsZonesToGeoZonesCQ { + + // =================================================================================== + // Attribute + // ========= + /** Corresponding inline query. */ + protected ZonesToGeoZonesCIQ _inlineQuery; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param childQuery Child query as abstract class. (Nullable: If null, this is base instance.) + * @param sqlClause SQL clause instance. (NotNull) + * @param aliasName My alias name. (NotNull) + * @param nestLevel Nest level. + */ + public BsZonesToGeoZonesCQ(ConditionQuery childQuery, SqlClause sqlClause, String aliasName, int nestLevel) { + super(childQuery, sqlClause, aliasName, nestLevel); + } + + // =================================================================================== + // Inline + // ====== + /** + * Get inline query. + * + * @return Inline query. (NotNull) + */ + public ZonesToGeoZonesCIQ inline() { + if (_inlineQuery == null) { + _inlineQuery = new ZonesToGeoZonesCIQ(getChildQuery(), getSqlClause(), getAliasName(), getNestLevel(), this); + } + return _inlineQuery; + } + + // =================================================================================== + // Include-as-Mine + // =============== + + /** + * Include select-column of associationId as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_AssociationId() { + registerIncludedSelectColumn("AssociationId", getRealColumnName("ASSOCIATION_ID")); + } + + /** + * Include select-column of associationId as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_AssociationId(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("ASSOCIATION_ID")); + } + + /** + * Include select-column of zoneCountryId as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_ZoneCountryId() { + registerIncludedSelectColumn("ZoneCountryId", getRealColumnName("ZONE_COUNTRY_ID")); + } + + /** + * Include select-column of zoneCountryId as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_ZoneCountryId(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("ZONE_COUNTRY_ID")); + } + + /** + * Include select-column of zoneId as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_ZoneId() { + registerIncludedSelectColumn("ZoneId", getRealColumnName("ZONE_ID")); + } + + /** + * Include select-column of zoneId as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_ZoneId(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("ZONE_ID")); + } + + /** + * Include select-column of geoZoneId as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_GeoZoneId() { + registerIncludedSelectColumn("GeoZoneId", getRealColumnName("GEO_ZONE_ID")); + } + + /** + * Include select-column of geoZoneId as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_GeoZoneId(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("GEO_ZONE_ID")); + } + + /** + * Include select-column of lastModified as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_LastModified() { + registerIncludedSelectColumn("LastModified", getRealColumnName("LAST_MODIFIED")); + } + + /** + * Include select-column of lastModified as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_LastModified(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("LAST_MODIFIED")); + } + + /** + * Include select-column of dateAdded as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_DateAdded() { + registerIncludedSelectColumn("DateAdded", getRealColumnName("DATE_ADDED")); + } + + /** + * Include select-column of dateAdded as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_DateAdded(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("DATE_ADDED")); + } + + // =================================================================================== + // Query + // ===== + // /* * * * * * * * * * * * * * * * * * * * * * * + // MyTable = [ZONES_TO_GEO_ZONES] + // * * * * * * * * */ + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [ASSOCIATION_ID] + // - - - - - - - - -/ + + /** The attribute of associationId. */ + protected ConditionValue _associationId; + + /** + * Get the value of associationId. + * + * @return The value of associationId. + */ + public ConditionValue getAssociationId() { + if (_associationId == null) { + _associationId = new ConditionValue(); + } + return _associationId; + } + + protected ConditionValue getCValueAssociationId() { + return getAssociationId(); + } + + + /** + * Add order-by of associationId as ASC. + * + * @return this. (NotNull) + */ + public BsZonesToGeoZonesCQ addOrderBy_AssociationId_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_ASSOCIATION_ID), null, true);return this; + } + + /** + * Add order-by of associationId as DESC. + * + * @return this. (NotNull) + */ + public BsZonesToGeoZonesCQ addOrderBy_AssociationId_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_ASSOCIATION_ID), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [ZONE_COUNTRY_ID] + // - - - - - - - - -/ + + /** The attribute of zoneCountryId. */ + protected ConditionValue _zoneCountryId; + + /** + * Get the value of zoneCountryId. + * + * @return The value of zoneCountryId. + */ + public ConditionValue getZoneCountryId() { + if (_zoneCountryId == null) { + _zoneCountryId = new ConditionValue(); + } + return _zoneCountryId; + } + + protected ConditionValue getCValueZoneCountryId() { + return getZoneCountryId(); + } + + + /** + * Add order-by of zoneCountryId as ASC. + * + * @return this. (NotNull) + */ + public BsZonesToGeoZonesCQ addOrderBy_ZoneCountryId_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_ZONE_COUNTRY_ID), null, true);return this; + } + + /** + * Add order-by of zoneCountryId as DESC. + * + * @return this. (NotNull) + */ + public BsZonesToGeoZonesCQ addOrderBy_ZoneCountryId_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_ZONE_COUNTRY_ID), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [ZONE_ID] + // - - - - - - - - -/ + + /** The attribute of zoneId. */ + protected ConditionValue _zoneId; + + /** + * Get the value of zoneId. + * + * @return The value of zoneId. + */ + public ConditionValue getZoneId() { + if (_zoneId == null) { + _zoneId = new ConditionValue(); + } + return _zoneId; + } + + protected ConditionValue getCValueZoneId() { + return getZoneId(); + } + + + /** + * Add order-by of zoneId as ASC. + * + * @return this. (NotNull) + */ + public BsZonesToGeoZonesCQ addOrderBy_ZoneId_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_ZONE_ID), null, true);return this; + } + + /** + * Add order-by of zoneId as DESC. + * + * @return this. (NotNull) + */ + public BsZonesToGeoZonesCQ addOrderBy_ZoneId_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_ZONE_ID), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [GEO_ZONE_ID] + // - - - - - - - - -/ + + /** The attribute of geoZoneId. */ + protected ConditionValue _geoZoneId; + + /** + * Get the value of geoZoneId. + * + * @return The value of geoZoneId. + */ + public ConditionValue getGeoZoneId() { + if (_geoZoneId == null) { + _geoZoneId = new ConditionValue(); + } + return _geoZoneId; + } + + protected ConditionValue getCValueGeoZoneId() { + return getGeoZoneId(); + } + + + /** + * Add order-by of geoZoneId as ASC. + * + * @return this. (NotNull) + */ + public BsZonesToGeoZonesCQ addOrderBy_GeoZoneId_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_GEO_ZONE_ID), null, true);return this; + } + + /** + * Add order-by of geoZoneId as DESC. + * + * @return this. (NotNull) + */ + public BsZonesToGeoZonesCQ addOrderBy_GeoZoneId_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_GEO_ZONE_ID), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [LAST_MODIFIED] + // - - - - - - - - -/ + + /** The attribute of lastModified. */ + protected ConditionValue _lastModified; + + /** + * Get the value of lastModified. + * + * @return The value of lastModified. + */ + public ConditionValue getLastModified() { + if (_lastModified == null) { + _lastModified = new ConditionValue(); + } + return _lastModified; + } + + protected ConditionValue getCValueLastModified() { + return getLastModified(); + } + + + /** + * Add order-by of lastModified as ASC. + * + * @return this. (NotNull) + */ + public BsZonesToGeoZonesCQ addOrderBy_LastModified_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_LAST_MODIFIED), null, true);return this; + } + + /** + * Add order-by of lastModified as DESC. + * + * @return this. (NotNull) + */ + public BsZonesToGeoZonesCQ addOrderBy_LastModified_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_LAST_MODIFIED), null, false);return this; + } + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [DATE_ADDED] + // - - - - - - - - -/ + + /** The attribute of dateAdded. */ + protected ConditionValue _dateAdded; + + /** + * Get the value of dateAdded. + * + * @return The value of dateAdded. + */ + public ConditionValue getDateAdded() { + if (_dateAdded == null) { + _dateAdded = new ConditionValue(); + } + return _dateAdded; + } + + protected ConditionValue getCValueDateAdded() { + return getDateAdded(); + } + + + /** + * Add order-by of dateAdded as ASC. + * + * @return this. (NotNull) + */ + public BsZonesToGeoZonesCQ addOrderBy_DateAdded_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_DATE_ADDED), null, true);return this; + } + + /** + * Add order-by of dateAdded as DESC. + * + * @return this. (NotNull) + */ + public BsZonesToGeoZonesCQ addOrderBy_DateAdded_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_DATE_ADDED), null, false);return this; + } + + // =================================================================================== + // Union Query + // =========== + protected void reflectRelationOnUnionQuery(ConditionQuery baseQueryAsSuper, ConditionQuery unionQueryAsSuper) { + final ZonesToGeoZonesCQ baseQuery = (ZonesToGeoZonesCQ)baseQueryAsSuper; + final ZonesToGeoZonesCQ unionQuery = (ZonesToGeoZonesCQ)unionQueryAsSuper; + + } + + // =================================================================================== + // Foreign Query + // ============= + + +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ciq/AddressBookCIQ.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ciq/AddressBookCIQ.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ciq/AddressBookCIQ.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,174 @@ +package jp.sf.pal.pompei.cbean.cq.ciq; + +import jp.sf.pal.pompei.cbean.cq.bs.*; +import jp.sf.pal.pompei.cbean.cq.*; + +import jp.sf.pal.pompei.allcommon.cbean.*; +import jp.sf.pal.pompei.allcommon.cbean.ckey.*; +import jp.sf.pal.pompei.allcommon.cbean.coption.ConditionOption; +import jp.sf.pal.pompei.allcommon.cbean.cvalue.ConditionValue; +import jp.sf.pal.pompei.allcommon.cbean.sqlclause.SqlClause; + +/** + * The condition-inline-query of ADDRESS_BOOK. + * + * @author DBFlute(AutoGenerator) + */ +public class AddressBookCIQ extends AbstractBsAddressBookCQ { + + // =================================================================================== + // Attribute + // ========= + /** Corresponding condition query. */ + protected BsAddressBookCQ _myCQ; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param childQuery Child query as abstract class. (Nullable: If null, this is base instance.) + * @param sqlClause SQL clause instance. (NotNull) + * @param aliasName My alias name. (NotNull) + * @param nestLevel Nest level. + */ + public AddressBookCIQ(ConditionQuery childQuery, SqlClause sqlClause, String aliasName, int nestLevel, BsAddressBookCQ myCQ) { + super(childQuery, sqlClause, aliasName, nestLevel); + _myCQ = myCQ; + } + + // =================================================================================== + // Override about Register + // ======================= + protected void reflectRelationOnUnionQuery(ConditionQuery baseQueryAsSuper, ConditionQuery unionQueryAsSuper) { + throw new UnsupportedOperationException("InlineQuery must not need UNION method: " + baseQueryAsSuper + " : " + unionQueryAsSuper); + } + + protected void setupConditionValueAndRegisterWhereClause(ConditionKey key, Object value, ConditionValue cvalue + , String colName, String capPropName, String uncapPropName) { + registerInlineQuery(key, value, cvalue, colName, capPropName, uncapPropName); + } + + protected void setupConditionValueAndRegisterWhereClause(ConditionKey key, Object value, ConditionValue cvalue + , String colName, String capPropName, String uncapPropName, ConditionOption option) { + registerInlineQuery(key, value, cvalue, colName, capPropName, uncapPropName, option); + } + + protected void registerWhereClause(String whereClause) { + registerInlineWhereClause(whereClause); + } + + // =================================================================================== + // Override about Query + // ==================== + // /* * * * * * * * * * * * * * * * * * * * * * * + // MyTable = [ADDRESS_BOOK] + // * * * * * * * * */ + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [ADDRESS_BOOK_ID] + // - - - - - - - - -/ + protected ConditionValue getCValueAddressBookId() { + return _myCQ.getAddressBookId(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [CUSTOMERS_ID] + // - - - - - - - - -/ + protected ConditionValue getCValueCustomersId() { + return _myCQ.getCustomersId(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [ENTRY_GENDER] + // - - - - - - - - -/ + protected ConditionValue getCValueEntryGender() { + return _myCQ.getEntryGender(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [ENTRY_COMPANY] + // - - - - - - - - -/ + protected ConditionValue getCValueEntryCompany() { + return _myCQ.getEntryCompany(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [ENTRY_FIRSTNAME] + // - - - - - - - - -/ + protected ConditionValue getCValueEntryFirstname() { + return _myCQ.getEntryFirstname(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [ENTRY_LASTNAME] + // - - - - - - - - -/ + protected ConditionValue getCValueEntryLastname() { + return _myCQ.getEntryLastname(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [ENTRY_STREET_ADDRESS] + // - - - - - - - - -/ + protected ConditionValue getCValueEntryStreetAddress() { + return _myCQ.getEntryStreetAddress(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [ENTRY_SUBURB] + // - - - - - - - - -/ + protected ConditionValue getCValueEntrySuburb() { + return _myCQ.getEntrySuburb(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [ENTRY_POSTCODE] + // - - - - - - - - -/ + protected ConditionValue getCValueEntryPostcode() { + return _myCQ.getEntryPostcode(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [ENTRY_CITY] + // - - - - - - - - -/ + protected ConditionValue getCValueEntryCity() { + return _myCQ.getEntryCity(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [ENTRY_STATE] + // - - - - - - - - -/ + protected ConditionValue getCValueEntryState() { + return _myCQ.getEntryState(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [ENTRY_COUNTRY_ID] + // - - - - - - - - -/ + protected ConditionValue getCValueEntryCountryId() { + return _myCQ.getEntryCountryId(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [ENTRY_ZONE_ID] + // - - - - - - - - -/ + protected ConditionValue getCValueEntryZoneId() { + return _myCQ.getEntryZoneId(); + } + + +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ciq/AddressFormatCIQ.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ciq/AddressFormatCIQ.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ciq/AddressFormatCIQ.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,94 @@ +package jp.sf.pal.pompei.cbean.cq.ciq; + +import jp.sf.pal.pompei.cbean.cq.bs.*; +import jp.sf.pal.pompei.cbean.cq.*; + +import jp.sf.pal.pompei.allcommon.cbean.*; +import jp.sf.pal.pompei.allcommon.cbean.ckey.*; +import jp.sf.pal.pompei.allcommon.cbean.coption.ConditionOption; +import jp.sf.pal.pompei.allcommon.cbean.cvalue.ConditionValue; +import jp.sf.pal.pompei.allcommon.cbean.sqlclause.SqlClause; + +/** + * The condition-inline-query of ADDRESS_FORMAT. + * + * @author DBFlute(AutoGenerator) + */ +public class AddressFormatCIQ extends AbstractBsAddressFormatCQ { + + // =================================================================================== + // Attribute + // ========= + /** Corresponding condition query. */ + protected BsAddressFormatCQ _myCQ; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param childQuery Child query as abstract class. (Nullable: If null, this is base instance.) + * @param sqlClause SQL clause instance. (NotNull) + * @param aliasName My alias name. (NotNull) + * @param nestLevel Nest level. + */ + public AddressFormatCIQ(ConditionQuery childQuery, SqlClause sqlClause, String aliasName, int nestLevel, BsAddressFormatCQ myCQ) { + super(childQuery, sqlClause, aliasName, nestLevel); + _myCQ = myCQ; + } + + // =================================================================================== + // Override about Register + // ======================= + protected void reflectRelationOnUnionQuery(ConditionQuery baseQueryAsSuper, ConditionQuery unionQueryAsSuper) { + throw new UnsupportedOperationException("InlineQuery must not need UNION method: " + baseQueryAsSuper + " : " + unionQueryAsSuper); + } + + protected void setupConditionValueAndRegisterWhereClause(ConditionKey key, Object value, ConditionValue cvalue + , String colName, String capPropName, String uncapPropName) { + registerInlineQuery(key, value, cvalue, colName, capPropName, uncapPropName); + } + + protected void setupConditionValueAndRegisterWhereClause(ConditionKey key, Object value, ConditionValue cvalue + , String colName, String capPropName, String uncapPropName, ConditionOption option) { + registerInlineQuery(key, value, cvalue, colName, capPropName, uncapPropName, option); + } + + protected void registerWhereClause(String whereClause) { + registerInlineWhereClause(whereClause); + } + + // =================================================================================== + // Override about Query + // ==================== + // /* * * * * * * * * * * * * * * * * * * * * * * + // MyTable = [ADDRESS_FORMAT] + // * * * * * * * * */ + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [ADDRESS_FORMAT_ID] + // - - - - - - - - -/ + protected ConditionValue getCValueAddressFormatId() { + return _myCQ.getAddressFormatId(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [ADDRESS_FORMAT] + // - - - - - - - - -/ + protected ConditionValue getCValueAddressFormat() { + return _myCQ.getAddressFormat(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [ADDRESS_SUMMARY] + // - - - - - - - - -/ + protected ConditionValue getCValueAddressSummary() { + return _myCQ.getAddressSummary(); + } + + +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ciq/BannersCIQ.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ciq/BannersCIQ.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ciq/BannersCIQ.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,166 @@ +package jp.sf.pal.pompei.cbean.cq.ciq; + +import jp.sf.pal.pompei.cbean.cq.bs.*; +import jp.sf.pal.pompei.cbean.cq.*; + +import jp.sf.pal.pompei.allcommon.cbean.*; +import jp.sf.pal.pompei.allcommon.cbean.ckey.*; +import jp.sf.pal.pompei.allcommon.cbean.coption.ConditionOption; +import jp.sf.pal.pompei.allcommon.cbean.cvalue.ConditionValue; +import jp.sf.pal.pompei.allcommon.cbean.sqlclause.SqlClause; + +/** + * The condition-inline-query of BANNERS. + * + * @author DBFlute(AutoGenerator) + */ +public class BannersCIQ extends AbstractBsBannersCQ { + + // =================================================================================== + // Attribute + // ========= + /** Corresponding condition query. */ + protected BsBannersCQ _myCQ; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param childQuery Child query as abstract class. (Nullable: If null, this is base instance.) + * @param sqlClause SQL clause instance. (NotNull) + * @param aliasName My alias name. (NotNull) + * @param nestLevel Nest level. + */ + public BannersCIQ(ConditionQuery childQuery, SqlClause sqlClause, String aliasName, int nestLevel, BsBannersCQ myCQ) { + super(childQuery, sqlClause, aliasName, nestLevel); + _myCQ = myCQ; + } + + // =================================================================================== + // Override about Register + // ======================= + protected void reflectRelationOnUnionQuery(ConditionQuery baseQueryAsSuper, ConditionQuery unionQueryAsSuper) { + throw new UnsupportedOperationException("InlineQuery must not need UNION method: " + baseQueryAsSuper + " : " + unionQueryAsSuper); + } + + protected void setupConditionValueAndRegisterWhereClause(ConditionKey key, Object value, ConditionValue cvalue + , String colName, String capPropName, String uncapPropName) { + registerInlineQuery(key, value, cvalue, colName, capPropName, uncapPropName); + } + + protected void setupConditionValueAndRegisterWhereClause(ConditionKey key, Object value, ConditionValue cvalue + , String colName, String capPropName, String uncapPropName, ConditionOption option) { + registerInlineQuery(key, value, cvalue, colName, capPropName, uncapPropName, option); + } + + protected void registerWhereClause(String whereClause) { + registerInlineWhereClause(whereClause); + } + + // =================================================================================== + // Override about Query + // ==================== + // /* * * * * * * * * * * * * * * * * * * * * * * + // MyTable = [BANNERS] + // * * * * * * * * */ + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [BANNERS_ID] + // - - - - - - - - -/ + protected ConditionValue getCValueBannersId() { + return _myCQ.getBannersId(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [BANNERS_TITLE] + // - - - - - - - - -/ + protected ConditionValue getCValueBannersTitle() { + return _myCQ.getBannersTitle(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [BANNERS_URL] + // - - - - - - - - -/ + protected ConditionValue getCValueBannersUrl() { + return _myCQ.getBannersUrl(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [BANNERS_IMAGE] + // - - - - - - - - -/ + protected ConditionValue getCValueBannersImage() { + return _myCQ.getBannersImage(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [BANNERS_GROUP] + // - - - - - - - - -/ + protected ConditionValue getCValueBannersGroup() { + return _myCQ.getBannersGroup(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [BANNERS_HTML_TEXT] + // - - - - - - - - -/ + protected ConditionValue getCValueBannersHtmlText() { + return _myCQ.getBannersHtmlText(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [EXPIRES_IMPRESSIONS] + // - - - - - - - - -/ + protected ConditionValue getCValueExpiresImpressions() { + return _myCQ.getExpiresImpressions(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [EXPIRES_DATE] + // - - - - - - - - -/ + protected ConditionValue getCValueExpiresDate() { + return _myCQ.getExpiresDate(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [DATE_SCHEDULED] + // - - - - - - - - -/ + protected ConditionValue getCValueDateScheduled() { + return _myCQ.getDateScheduled(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [DATE_ADDED] + // - - - - - - - - -/ + protected ConditionValue getCValueDateAdded() { + return _myCQ.getDateAdded(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [DATE_STATUS_CHANGE] + // - - - - - - - - -/ + protected ConditionValue getCValueDateStatusChange() { + return _myCQ.getDateStatusChange(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [STATUS] + // - - - - - - - - -/ + protected ConditionValue getCValueStatus() { + return _myCQ.getStatus(); + } + + +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ciq/BannersHistoryCIQ.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ciq/BannersHistoryCIQ.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ciq/BannersHistoryCIQ.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,110 @@ +package jp.sf.pal.pompei.cbean.cq.ciq; + +import jp.sf.pal.pompei.cbean.cq.bs.*; +import jp.sf.pal.pompei.cbean.cq.*; + +import jp.sf.pal.pompei.allcommon.cbean.*; +import jp.sf.pal.pompei.allcommon.cbean.ckey.*; +import jp.sf.pal.pompei.allcommon.cbean.coption.ConditionOption; +import jp.sf.pal.pompei.allcommon.cbean.cvalue.ConditionValue; +import jp.sf.pal.pompei.allcommon.cbean.sqlclause.SqlClause; + +/** + * The condition-inline-query of BANNERS_HISTORY. + * + * @author DBFlute(AutoGenerator) + */ +public class BannersHistoryCIQ extends AbstractBsBannersHistoryCQ { + + // =================================================================================== + // Attribute + // ========= + /** Corresponding condition query. */ + protected BsBannersHistoryCQ _myCQ; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param childQuery Child query as abstract class. (Nullable: If null, this is base instance.) + * @param sqlClause SQL clause instance. (NotNull) + * @param aliasName My alias name. (NotNull) + * @param nestLevel Nest level. + */ + public BannersHistoryCIQ(ConditionQuery childQuery, SqlClause sqlClause, String aliasName, int nestLevel, BsBannersHistoryCQ myCQ) { + super(childQuery, sqlClause, aliasName, nestLevel); + _myCQ = myCQ; + } + + // =================================================================================== + // Override about Register + // ======================= + protected void reflectRelationOnUnionQuery(ConditionQuery baseQueryAsSuper, ConditionQuery unionQueryAsSuper) { + throw new UnsupportedOperationException("InlineQuery must not need UNION method: " + baseQueryAsSuper + " : " + unionQueryAsSuper); + } + + protected void setupConditionValueAndRegisterWhereClause(ConditionKey key, Object value, ConditionValue cvalue + , String colName, String capPropName, String uncapPropName) { + registerInlineQuery(key, value, cvalue, colName, capPropName, uncapPropName); + } + + protected void setupConditionValueAndRegisterWhereClause(ConditionKey key, Object value, ConditionValue cvalue + , String colName, String capPropName, String uncapPropName, ConditionOption option) { + registerInlineQuery(key, value, cvalue, colName, capPropName, uncapPropName, option); + } + + protected void registerWhereClause(String whereClause) { + registerInlineWhereClause(whereClause); + } + + // =================================================================================== + // Override about Query + // ==================== + // /* * * * * * * * * * * * * * * * * * * * * * * + // MyTable = [BANNERS_HISTORY] + // * * * * * * * * */ + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [BANNERS_HISTORY_ID] + // - - - - - - - - -/ + protected ConditionValue getCValueBannersHistoryId() { + return _myCQ.getBannersHistoryId(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [BANNERS_ID] + // - - - - - - - - -/ + protected ConditionValue getCValueBannersId() { + return _myCQ.getBannersId(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [BANNERS_SHOWN] + // - - - - - - - - -/ + protected ConditionValue getCValueBannersShown() { + return _myCQ.getBannersShown(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [BANNERS_CLICKED] + // - - - - - - - - -/ + protected ConditionValue getCValueBannersClicked() { + return _myCQ.getBannersClicked(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [BANNERS_HISTORY_DATE] + // - - - - - - - - -/ + protected ConditionValue getCValueBannersHistoryDate() { + return _myCQ.getBannersHistoryDate(); + } + + +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ciq/CategoriesCIQ.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ciq/CategoriesCIQ.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ciq/CategoriesCIQ.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,118 @@ +package jp.sf.pal.pompei.cbean.cq.ciq; + +import jp.sf.pal.pompei.cbean.cq.bs.*; +import jp.sf.pal.pompei.cbean.cq.*; + +import jp.sf.pal.pompei.allcommon.cbean.*; +import jp.sf.pal.pompei.allcommon.cbean.ckey.*; +import jp.sf.pal.pompei.allcommon.cbean.coption.ConditionOption; +import jp.sf.pal.pompei.allcommon.cbean.cvalue.ConditionValue; +import jp.sf.pal.pompei.allcommon.cbean.sqlclause.SqlClause; + +/** + * The condition-inline-query of CATEGORIES. + * + * @author DBFlute(AutoGenerator) + */ +public class CategoriesCIQ extends AbstractBsCategoriesCQ { + + // =================================================================================== + // Attribute + // ========= + /** Corresponding condition query. */ + protected BsCategoriesCQ _myCQ; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param childQuery Child query as abstract class. (Nullable: If null, this is base instance.) + * @param sqlClause SQL clause instance. (NotNull) + * @param aliasName My alias name. (NotNull) + * @param nestLevel Nest level. + */ + public CategoriesCIQ(ConditionQuery childQuery, SqlClause sqlClause, String aliasName, int nestLevel, BsCategoriesCQ myCQ) { + super(childQuery, sqlClause, aliasName, nestLevel); + _myCQ = myCQ; + } + + // =================================================================================== + // Override about Register + // ======================= + protected void reflectRelationOnUnionQuery(ConditionQuery baseQueryAsSuper, ConditionQuery unionQueryAsSuper) { + throw new UnsupportedOperationException("InlineQuery must not need UNION method: " + baseQueryAsSuper + " : " + unionQueryAsSuper); + } + + protected void setupConditionValueAndRegisterWhereClause(ConditionKey key, Object value, ConditionValue cvalue + , String colName, String capPropName, String uncapPropName) { + registerInlineQuery(key, value, cvalue, colName, capPropName, uncapPropName); + } + + protected void setupConditionValueAndRegisterWhereClause(ConditionKey key, Object value, ConditionValue cvalue + , String colName, String capPropName, String uncapPropName, ConditionOption option) { + registerInlineQuery(key, value, cvalue, colName, capPropName, uncapPropName, option); + } + + protected void registerWhereClause(String whereClause) { + registerInlineWhereClause(whereClause); + } + + // =================================================================================== + // Override about Query + // ==================== + // /* * * * * * * * * * * * * * * * * * * * * * * + // MyTable = [CATEGORIES] + // * * * * * * * * */ + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [CATEGORIES_ID] + // - - - - - - - - -/ + protected ConditionValue getCValueCategoriesId() { + return _myCQ.getCategoriesId(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [CATEGORIES_IMAGE] + // - - - - - - - - -/ + protected ConditionValue getCValueCategoriesImage() { + return _myCQ.getCategoriesImage(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [PARENT_ID] + // - - - - - - - - -/ + protected ConditionValue getCValueParentId() { + return _myCQ.getParentId(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [SORT_ORDER] + // - - - - - - - - -/ + protected ConditionValue getCValueSortOrder() { + return _myCQ.getSortOrder(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [DATE_ADDED] + // - - - - - - - - -/ + protected ConditionValue getCValueDateAdded() { + return _myCQ.getDateAdded(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [LAST_MODIFIED] + // - - - - - - - - -/ + protected ConditionValue getCValueLastModified() { + return _myCQ.getLastModified(); + } + + +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ciq/CategoriesDescriptionCIQ.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ciq/CategoriesDescriptionCIQ.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ciq/CategoriesDescriptionCIQ.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,94 @@ +package jp.sf.pal.pompei.cbean.cq.ciq; + +import jp.sf.pal.pompei.cbean.cq.bs.*; +import jp.sf.pal.pompei.cbean.cq.*; + +import jp.sf.pal.pompei.allcommon.cbean.*; +import jp.sf.pal.pompei.allcommon.cbean.ckey.*; +import jp.sf.pal.pompei.allcommon.cbean.coption.ConditionOption; +import jp.sf.pal.pompei.allcommon.cbean.cvalue.ConditionValue; +import jp.sf.pal.pompei.allcommon.cbean.sqlclause.SqlClause; + +/** + * The condition-inline-query of CATEGORIES_DESCRIPTION. + * + * @author DBFlute(AutoGenerator) + */ +public class CategoriesDescriptionCIQ extends AbstractBsCategoriesDescriptionCQ { + + // =================================================================================== + // Attribute + // ========= + /** Corresponding condition query. */ + protected BsCategoriesDescriptionCQ _myCQ; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param childQuery Child query as abstract class. (Nullable: If null, this is base instance.) + * @param sqlClause SQL clause instance. (NotNull) + * @param aliasName My alias name. (NotNull) + * @param nestLevel Nest level. + */ + public CategoriesDescriptionCIQ(ConditionQuery childQuery, SqlClause sqlClause, String aliasName, int nestLevel, BsCategoriesDescriptionCQ myCQ) { + super(childQuery, sqlClause, aliasName, nestLevel); + _myCQ = myCQ; + } + + // =================================================================================== + // Override about Register + // ======================= + protected void reflectRelationOnUnionQuery(ConditionQuery baseQueryAsSuper, ConditionQuery unionQueryAsSuper) { + throw new UnsupportedOperationException("InlineQuery must not need UNION method: " + baseQueryAsSuper + " : " + unionQueryAsSuper); + } + + protected void setupConditionValueAndRegisterWhereClause(ConditionKey key, Object value, ConditionValue cvalue + , String colName, String capPropName, String uncapPropName) { + registerInlineQuery(key, value, cvalue, colName, capPropName, uncapPropName); + } + + protected void setupConditionValueAndRegisterWhereClause(ConditionKey key, Object value, ConditionValue cvalue + , String colName, String capPropName, String uncapPropName, ConditionOption option) { + registerInlineQuery(key, value, cvalue, colName, capPropName, uncapPropName, option); + } + + protected void registerWhereClause(String whereClause) { + registerInlineWhereClause(whereClause); + } + + // =================================================================================== + // Override about Query + // ==================== + // /* * * * * * * * * * * * * * * * * * * * * * * + // MyTable = [CATEGORIES_DESCRIPTION] + // * * * * * * * * */ + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [CATEGORIES_ID] + // - - - - - - - - -/ + protected ConditionValue getCValueCategoriesId() { + return _myCQ.getCategoriesId(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [LANGUAGE_ID] + // - - - - - - - - -/ + protected ConditionValue getCValueLanguageId() { + return _myCQ.getLanguageId(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [CATEGORIES_NAME] + // - - - - - - - - -/ + protected ConditionValue getCValueCategoriesName() { + return _myCQ.getCategoriesName(); + } + + +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ciq/ConfigurationCIQ.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ciq/ConfigurationCIQ.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ciq/ConfigurationCIQ.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,158 @@ +package jp.sf.pal.pompei.cbean.cq.ciq; + +import jp.sf.pal.pompei.cbean.cq.bs.*; +import jp.sf.pal.pompei.cbean.cq.*; + +import jp.sf.pal.pompei.allcommon.cbean.*; +import jp.sf.pal.pompei.allcommon.cbean.ckey.*; +import jp.sf.pal.pompei.allcommon.cbean.coption.ConditionOption; +import jp.sf.pal.pompei.allcommon.cbean.cvalue.ConditionValue; +import jp.sf.pal.pompei.allcommon.cbean.sqlclause.SqlClause; + +/** + * The condition-inline-query of CONFIGURATION. + * + * @author DBFlute(AutoGenerator) + */ +public class ConfigurationCIQ extends AbstractBsConfigurationCQ { + + // =================================================================================== + // Attribute + // ========= + /** Corresponding condition query. */ + protected BsConfigurationCQ _myCQ; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param childQuery Child query as abstract class. (Nullable: If null, this is base instance.) + * @param sqlClause SQL clause instance. (NotNull) + * @param aliasName My alias name. (NotNull) + * @param nestLevel Nest level. + */ + public ConfigurationCIQ(ConditionQuery childQuery, SqlClause sqlClause, String aliasName, int nestLevel, BsConfigurationCQ myCQ) { + super(childQuery, sqlClause, aliasName, nestLevel); + _myCQ = myCQ; + } + + // =================================================================================== + // Override about Register + // ======================= + protected void reflectRelationOnUnionQuery(ConditionQuery baseQueryAsSuper, ConditionQuery unionQueryAsSuper) { + throw new UnsupportedOperationException("InlineQuery must not need UNION method: " + baseQueryAsSuper + " : " + unionQueryAsSuper); + } + + protected void setupConditionValueAndRegisterWhereClause(ConditionKey key, Object value, ConditionValue cvalue + , String colName, String capPropName, String uncapPropName) { + registerInlineQuery(key, value, cvalue, colName, capPropName, uncapPropName); + } + + protected void setupConditionValueAndRegisterWhereClause(ConditionKey key, Object value, ConditionValue cvalue + , String colName, String capPropName, String uncapPropName, ConditionOption option) { + registerInlineQuery(key, value, cvalue, colName, capPropName, uncapPropName, option); + } + + protected void registerWhereClause(String whereClause) { + registerInlineWhereClause(whereClause); + } + + // =================================================================================== + // Override about Query + // ==================== + // /* * * * * * * * * * * * * * * * * * * * * * * + // MyTable = [CONFIGURATION] + // * * * * * * * * */ + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [CONFIGURATION_ID] + // - - - - - - - - -/ + protected ConditionValue getCValueConfigurationId() { + return _myCQ.getConfigurationId(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [CONFIGURATION_TITLE] + // - - - - - - - - -/ + protected ConditionValue getCValueConfigurationTitle() { + return _myCQ.getConfigurationTitle(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [CONFIGURATION_KEY] + // - - - - - - - - -/ + protected ConditionValue getCValueConfigurationKey() { + return _myCQ.getConfigurationKey(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [CONFIGURATION_VALUE] + // - - - - - - - - -/ + protected ConditionValue getCValueConfigurationValue() { + return _myCQ.getConfigurationValue(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [CONFIGURATION_DESCRIPTION] + // - - - - - - - - -/ + protected ConditionValue getCValueConfigurationDescription() { + return _myCQ.getConfigurationDescription(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [CONFIGURATION_GROUP_ID] + // - - - - - - - - -/ + protected ConditionValue getCValueConfigurationGroupId() { + return _myCQ.getConfigurationGroupId(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [SORT_ORDER] + // - - - - - - - - -/ + protected ConditionValue getCValueSortOrder() { + return _myCQ.getSortOrder(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [LAST_MODIFIED] + // - - - - - - - - -/ + protected ConditionValue getCValueLastModified() { + return _myCQ.getLastModified(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [DATE_ADDED] + // - - - - - - - - -/ + protected ConditionValue getCValueDateAdded() { + return _myCQ.getDateAdded(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [USE_FUNCTION] + // - - - - - - - - -/ + protected ConditionValue getCValueUseFunction() { + return _myCQ.getUseFunction(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [SET_FUNCTION] + // - - - - - - - - -/ + protected ConditionValue getCValueSetFunction() { + return _myCQ.getSetFunction(); + } + + +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ciq/ConfigurationGroupCIQ.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ciq/ConfigurationGroupCIQ.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ciq/ConfigurationGroupCIQ.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,110 @@ +package jp.sf.pal.pompei.cbean.cq.ciq; + +import jp.sf.pal.pompei.cbean.cq.bs.*; +import jp.sf.pal.pompei.cbean.cq.*; + +import jp.sf.pal.pompei.allcommon.cbean.*; +import jp.sf.pal.pompei.allcommon.cbean.ckey.*; +import jp.sf.pal.pompei.allcommon.cbean.coption.ConditionOption; +import jp.sf.pal.pompei.allcommon.cbean.cvalue.ConditionValue; +import jp.sf.pal.pompei.allcommon.cbean.sqlclause.SqlClause; + +/** + * The condition-inline-query of CONFIGURATION_GROUP. + * + * @author DBFlute(AutoGenerator) + */ +public class ConfigurationGroupCIQ extends AbstractBsConfigurationGroupCQ { + + // =================================================================================== + // Attribute + // ========= + /** Corresponding condition query. */ + protected BsConfigurationGroupCQ _myCQ; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param childQuery Child query as abstract class. (Nullable: If null, this is base instance.) + * @param sqlClause SQL clause instance. (NotNull) + * @param aliasName My alias name. (NotNull) + * @param nestLevel Nest level. + */ + public ConfigurationGroupCIQ(ConditionQuery childQuery, SqlClause sqlClause, String aliasName, int nestLevel, BsConfigurationGroupCQ myCQ) { + super(childQuery, sqlClause, aliasName, nestLevel); + _myCQ = myCQ; + } + + // =================================================================================== + // Override about Register + // ======================= + protected void reflectRelationOnUnionQuery(ConditionQuery baseQueryAsSuper, ConditionQuery unionQueryAsSuper) { + throw new UnsupportedOperationException("InlineQuery must not need UNION method: " + baseQueryAsSuper + " : " + unionQueryAsSuper); + } + + protected void setupConditionValueAndRegisterWhereClause(ConditionKey key, Object value, ConditionValue cvalue + , String colName, String capPropName, String uncapPropName) { + registerInlineQuery(key, value, cvalue, colName, capPropName, uncapPropName); + } + + protected void setupConditionValueAndRegisterWhereClause(ConditionKey key, Object value, ConditionValue cvalue + , String colName, String capPropName, String uncapPropName, ConditionOption option) { + registerInlineQuery(key, value, cvalue, colName, capPropName, uncapPropName, option); + } + + protected void registerWhereClause(String whereClause) { + registerInlineWhereClause(whereClause); + } + + // =================================================================================== + // Override about Query + // ==================== + // /* * * * * * * * * * * * * * * * * * * * * * * + // MyTable = [CONFIGURATION_GROUP] + // * * * * * * * * */ + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [CONFIGURATION_GROUP_ID] + // - - - - - - - - -/ + protected ConditionValue getCValueConfigurationGroupId() { + return _myCQ.getConfigurationGroupId(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [CONFIGURATION_GROUP_TITLE] + // - - - - - - - - -/ + protected ConditionValue getCValueConfigurationGroupTitle() { + return _myCQ.getConfigurationGroupTitle(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [CONFIGURATION_GROUP_DESCRIPTION] + // - - - - - - - - -/ + protected ConditionValue getCValueConfigurationGroupDescription() { + return _myCQ.getConfigurationGroupDescription(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [SORT_ORDER] + // - - - - - - - - -/ + protected ConditionValue getCValueSortOrder() { + return _myCQ.getSortOrder(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [VISIBLE] + // - - - - - - - - -/ + protected ConditionValue getCValueVisible() { + return _myCQ.getVisible(); + } + + +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ciq/CounterCIQ.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ciq/CounterCIQ.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ciq/CounterCIQ.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,86 @@ +package jp.sf.pal.pompei.cbean.cq.ciq; + +import jp.sf.pal.pompei.cbean.cq.bs.*; +import jp.sf.pal.pompei.cbean.cq.*; + +import jp.sf.pal.pompei.allcommon.cbean.*; +import jp.sf.pal.pompei.allcommon.cbean.ckey.*; +import jp.sf.pal.pompei.allcommon.cbean.coption.ConditionOption; +import jp.sf.pal.pompei.allcommon.cbean.cvalue.ConditionValue; +import jp.sf.pal.pompei.allcommon.cbean.sqlclause.SqlClause; + +/** + * The condition-inline-query of COUNTER. + * + * @author DBFlute(AutoGenerator) + */ +public class CounterCIQ extends AbstractBsCounterCQ { + + // =================================================================================== + // Attribute + // ========= + /** Corresponding condition query. */ + protected BsCounterCQ _myCQ; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param childQuery Child query as abstract class. (Nullable: If null, this is base instance.) + * @param sqlClause SQL clause instance. (NotNull) + * @param aliasName My alias name. (NotNull) + * @param nestLevel Nest level. + */ + public CounterCIQ(ConditionQuery childQuery, SqlClause sqlClause, String aliasName, int nestLevel, BsCounterCQ myCQ) { + super(childQuery, sqlClause, aliasName, nestLevel); + _myCQ = myCQ; + } + + // =================================================================================== + // Override about Register + // ======================= + protected void reflectRelationOnUnionQuery(ConditionQuery baseQueryAsSuper, ConditionQuery unionQueryAsSuper) { + throw new UnsupportedOperationException("InlineQuery must not need UNION method: " + baseQueryAsSuper + " : " + unionQueryAsSuper); + } + + protected void setupConditionValueAndRegisterWhereClause(ConditionKey key, Object value, ConditionValue cvalue + , String colName, String capPropName, String uncapPropName) { + registerInlineQuery(key, value, cvalue, colName, capPropName, uncapPropName); + } + + protected void setupConditionValueAndRegisterWhereClause(ConditionKey key, Object value, ConditionValue cvalue + , String colName, String capPropName, String uncapPropName, ConditionOption option) { + registerInlineQuery(key, value, cvalue, colName, capPropName, uncapPropName, option); + } + + protected void registerWhereClause(String whereClause) { + registerInlineWhereClause(whereClause); + } + + // =================================================================================== + // Override about Query + // ==================== + // /* * * * * * * * * * * * * * * * * * * * * * * + // MyTable = [COUNTER] + // * * * * * * * * */ + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [STARTDATE] + // - - - - - - - - -/ + protected ConditionValue getCValueStartdate() { + return _myCQ.getStartdate(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [COUNTER] + // - - - - - - - - -/ + protected ConditionValue getCValueCounter() { + return _myCQ.getCounter(); + } + + +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ciq/CounterHistoryCIQ.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ciq/CounterHistoryCIQ.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ciq/CounterHistoryCIQ.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,86 @@ +package jp.sf.pal.pompei.cbean.cq.ciq; + +import jp.sf.pal.pompei.cbean.cq.bs.*; +import jp.sf.pal.pompei.cbean.cq.*; + +import jp.sf.pal.pompei.allcommon.cbean.*; +import jp.sf.pal.pompei.allcommon.cbean.ckey.*; +import jp.sf.pal.pompei.allcommon.cbean.coption.ConditionOption; +import jp.sf.pal.pompei.allcommon.cbean.cvalue.ConditionValue; +import jp.sf.pal.pompei.allcommon.cbean.sqlclause.SqlClause; + +/** + * The condition-inline-query of COUNTER_HISTORY. + * + * @author DBFlute(AutoGenerator) + */ +public class CounterHistoryCIQ extends AbstractBsCounterHistoryCQ { + + // =================================================================================== + // Attribute + // ========= + /** Corresponding condition query. */ + protected BsCounterHistoryCQ _myCQ; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param childQuery Child query as abstract class. (Nullable: If null, this is base instance.) + * @param sqlClause SQL clause instance. (NotNull) + * @param aliasName My alias name. (NotNull) + * @param nestLevel Nest level. + */ + public CounterHistoryCIQ(ConditionQuery childQuery, SqlClause sqlClause, String aliasName, int nestLevel, BsCounterHistoryCQ myCQ) { + super(childQuery, sqlClause, aliasName, nestLevel); + _myCQ = myCQ; + } + + // =================================================================================== + // Override about Register + // ======================= + protected void reflectRelationOnUnionQuery(ConditionQuery baseQueryAsSuper, ConditionQuery unionQueryAsSuper) { + throw new UnsupportedOperationException("InlineQuery must not need UNION method: " + baseQueryAsSuper + " : " + unionQueryAsSuper); + } + + protected void setupConditionValueAndRegisterWhereClause(ConditionKey key, Object value, ConditionValue cvalue + , String colName, String capPropName, String uncapPropName) { + registerInlineQuery(key, value, cvalue, colName, capPropName, uncapPropName); + } + + protected void setupConditionValueAndRegisterWhereClause(ConditionKey key, Object value, ConditionValue cvalue + , String colName, String capPropName, String uncapPropName, ConditionOption option) { + registerInlineQuery(key, value, cvalue, colName, capPropName, uncapPropName, option); + } + + protected void registerWhereClause(String whereClause) { + registerInlineWhereClause(whereClause); + } + + // =================================================================================== + // Override about Query + // ==================== + // /* * * * * * * * * * * * * * * * * * * * * * * + // MyTable = [COUNTER_HISTORY] + // * * * * * * * * */ + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [MONTH] + // - - - - - - - - -/ + protected ConditionValue getCValueMonth() { + return _myCQ.getMonth(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [COUNTER] + // - - - - - - - - -/ + protected ConditionValue getCValueCounter() { + return _myCQ.getCounter(); + } + + +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ciq/CountriesCIQ.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ciq/CountriesCIQ.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ciq/CountriesCIQ.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,110 @@ +package jp.sf.pal.pompei.cbean.cq.ciq; + +import jp.sf.pal.pompei.cbean.cq.bs.*; +import jp.sf.pal.pompei.cbean.cq.*; + +import jp.sf.pal.pompei.allcommon.cbean.*; +import jp.sf.pal.pompei.allcommon.cbean.ckey.*; +import jp.sf.pal.pompei.allcommon.cbean.coption.ConditionOption; +import jp.sf.pal.pompei.allcommon.cbean.cvalue.ConditionValue; +import jp.sf.pal.pompei.allcommon.cbean.sqlclause.SqlClause; + +/** + * The condition-inline-query of COUNTRIES. + * + * @author DBFlute(AutoGenerator) + */ +public class CountriesCIQ extends AbstractBsCountriesCQ { + + // =================================================================================== + // Attribute + // ========= + /** Corresponding condition query. */ + protected BsCountriesCQ _myCQ; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param childQuery Child query as abstract class. (Nullable: If null, this is base instance.) + * @param sqlClause SQL clause instance. (NotNull) + * @param aliasName My alias name. (NotNull) + * @param nestLevel Nest level. + */ + public CountriesCIQ(ConditionQuery childQuery, SqlClause sqlClause, String aliasName, int nestLevel, BsCountriesCQ myCQ) { + super(childQuery, sqlClause, aliasName, nestLevel); + _myCQ = myCQ; + } + + // =================================================================================== + // Override about Register + // ======================= + protected void reflectRelationOnUnionQuery(ConditionQuery baseQueryAsSuper, ConditionQuery unionQueryAsSuper) { + throw new UnsupportedOperationException("InlineQuery must not need UNION method: " + baseQueryAsSuper + " : " + unionQueryAsSuper); + } + + protected void setupConditionValueAndRegisterWhereClause(ConditionKey key, Object value, ConditionValue cvalue + , String colName, String capPropName, String uncapPropName) { + registerInlineQuery(key, value, cvalue, colName, capPropName, uncapPropName); + } + + protected void setupConditionValueAndRegisterWhereClause(ConditionKey key, Object value, ConditionValue cvalue + , String colName, String capPropName, String uncapPropName, ConditionOption option) { + registerInlineQuery(key, value, cvalue, colName, capPropName, uncapPropName, option); + } + + protected void registerWhereClause(String whereClause) { + registerInlineWhereClause(whereClause); + } + + // =================================================================================== + // Override about Query + // ==================== + // /* * * * * * * * * * * * * * * * * * * * * * * + // MyTable = [COUNTRIES] + // * * * * * * * * */ + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [COUNTRIES_ID] + // - - - - - - - - -/ + protected ConditionValue getCValueCountriesId() { + return _myCQ.getCountriesId(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [COUNTRIES_NAME] + // - - - - - - - - -/ + protected ConditionValue getCValueCountriesName() { + return _myCQ.getCountriesName(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [COUNTRIES_ISO_CODE_2] + // - - - - - - - - -/ + protected ConditionValue getCValueCountriesIsoCode2() { + return _myCQ.getCountriesIsoCode2(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [COUNTRIES_ISO_CODE_3] + // - - - - - - - - -/ + protected ConditionValue getCValueCountriesIsoCode3() { + return _myCQ.getCountriesIsoCode3(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [ADDRESS_FORMAT_ID] + // - - - - - - - - -/ + protected ConditionValue getCValueAddressFormatId() { + return _myCQ.getAddressFormatId(); + } + + +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ciq/CurrenciesCIQ.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ciq/CurrenciesCIQ.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ciq/CurrenciesCIQ.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,150 @@ +package jp.sf.pal.pompei.cbean.cq.ciq; + +import jp.sf.pal.pompei.cbean.cq.bs.*; +import jp.sf.pal.pompei.cbean.cq.*; + +import jp.sf.pal.pompei.allcommon.cbean.*; +import jp.sf.pal.pompei.allcommon.cbean.ckey.*; +import jp.sf.pal.pompei.allcommon.cbean.coption.ConditionOption; +import jp.sf.pal.pompei.allcommon.cbean.cvalue.ConditionValue; +import jp.sf.pal.pompei.allcommon.cbean.sqlclause.SqlClause; + +/** + * The condition-inline-query of CURRENCIES. + * + * @author DBFlute(AutoGenerator) + */ +public class CurrenciesCIQ extends AbstractBsCurrenciesCQ { + + // =================================================================================== + // Attribute + // ========= + /** Corresponding condition query. */ + protected BsCurrenciesCQ _myCQ; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param childQuery Child query as abstract class. (Nullable: If null, this is base instance.) + * @param sqlClause SQL clause instance. (NotNull) + * @param aliasName My alias name. (NotNull) + * @param nestLevel Nest level. + */ + public CurrenciesCIQ(ConditionQuery childQuery, SqlClause sqlClause, String aliasName, int nestLevel, BsCurrenciesCQ myCQ) { + super(childQuery, sqlClause, aliasName, nestLevel); + _myCQ = myCQ; + } + + // =================================================================================== + // Override about Register + // ======================= + protected void reflectRelationOnUnionQuery(ConditionQuery baseQueryAsSuper, ConditionQuery unionQueryAsSuper) { + throw new UnsupportedOperationException("InlineQuery must not need UNION method: " + baseQueryAsSuper + " : " + unionQueryAsSuper); + } + + protected void setupConditionValueAndRegisterWhereClause(ConditionKey key, Object value, ConditionValue cvalue + , String colName, String capPropName, String uncapPropName) { + registerInlineQuery(key, value, cvalue, colName, capPropName, uncapPropName); + } + + protected void setupConditionValueAndRegisterWhereClause(ConditionKey key, Object value, ConditionValue cvalue + , String colName, String capPropName, String uncapPropName, ConditionOption option) { + registerInlineQuery(key, value, cvalue, colName, capPropName, uncapPropName, option); + } + + protected void registerWhereClause(String whereClause) { + registerInlineWhereClause(whereClause); + } + + // =================================================================================== + // Override about Query + // ==================== + // /* * * * * * * * * * * * * * * * * * * * * * * + // MyTable = [CURRENCIES] + // * * * * * * * * */ + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [CURRENCIES_ID] + // - - - - - - - - -/ + protected ConditionValue getCValueCurrenciesId() { + return _myCQ.getCurrenciesId(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [TITLE] + // - - - - - - - - -/ + protected ConditionValue getCValueTitle() { + return _myCQ.getTitle(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [CODE] + // - - - - - - - - -/ + protected ConditionValue getCValueCode() { + return _myCQ.getCode(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [SYMBOL_LEFT] + // - - - - - - - - -/ + protected ConditionValue getCValueSymbolLeft() { + return _myCQ.getSymbolLeft(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [SYMBOL_RIGHT] + // - - - - - - - - -/ + protected ConditionValue getCValueSymbolRight() { + return _myCQ.getSymbolRight(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [DECIMAL_POINT] + // - - - - - - - - -/ + protected ConditionValue getCValueDecimalPoint() { + return _myCQ.getDecimalPoint(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [THOUSANDS_POINT] + // - - - - - - - - -/ + protected ConditionValue getCValueThousandsPoint() { + return _myCQ.getThousandsPoint(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [DECIMAL_PLACES] + // - - - - - - - - -/ + protected ConditionValue getCValueDecimalPlaces() { + return _myCQ.getDecimalPlaces(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [VALUE] + // - - - - - - - - -/ + protected ConditionValue getCValueValue() { + return _myCQ.getValue(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [LAST_UPDATED] + // - - - - - - - - -/ + protected ConditionValue getCValueLastUpdated() { + return _myCQ.getLastUpdated(); + } + + +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ciq/CustomersBasketAttributesCIQ.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ciq/CustomersBasketAttributesCIQ.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ciq/CustomersBasketAttributesCIQ.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,110 @@ +package jp.sf.pal.pompei.cbean.cq.ciq; + +import jp.sf.pal.pompei.cbean.cq.bs.*; +import jp.sf.pal.pompei.cbean.cq.*; + +import jp.sf.pal.pompei.allcommon.cbean.*; +import jp.sf.pal.pompei.allcommon.cbean.ckey.*; +import jp.sf.pal.pompei.allcommon.cbean.coption.ConditionOption; +import jp.sf.pal.pompei.allcommon.cbean.cvalue.ConditionValue; +import jp.sf.pal.pompei.allcommon.cbean.sqlclause.SqlClause; + +/** + * The condition-inline-query of CUSTOMERS_BASKET_ATTRIBUTES. + * + * @author DBFlute(AutoGenerator) + */ +public class CustomersBasketAttributesCIQ extends AbstractBsCustomersBasketAttributesCQ { + + // =================================================================================== + // Attribute + // ========= + /** Corresponding condition query. */ + protected BsCustomersBasketAttributesCQ _myCQ; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param childQuery Child query as abstract class. (Nullable: If null, this is base instance.) + * @param sqlClause SQL clause instance. (NotNull) + * @param aliasName My alias name. (NotNull) + * @param nestLevel Nest level. + */ + public CustomersBasketAttributesCIQ(ConditionQuery childQuery, SqlClause sqlClause, String aliasName, int nestLevel, BsCustomersBasketAttributesCQ myCQ) { + super(childQuery, sqlClause, aliasName, nestLevel); + _myCQ = myCQ; + } + + // =================================================================================== + // Override about Register + // ======================= + protected void reflectRelationOnUnionQuery(ConditionQuery baseQueryAsSuper, ConditionQuery unionQueryAsSuper) { + throw new UnsupportedOperationException("InlineQuery must not need UNION method: " + baseQueryAsSuper + " : " + unionQueryAsSuper); + } + + protected void setupConditionValueAndRegisterWhereClause(ConditionKey key, Object value, ConditionValue cvalue + , String colName, String capPropName, String uncapPropName) { + registerInlineQuery(key, value, cvalue, colName, capPropName, uncapPropName); + } + + protected void setupConditionValueAndRegisterWhereClause(ConditionKey key, Object value, ConditionValue cvalue + , String colName, String capPropName, String uncapPropName, ConditionOption option) { + registerInlineQuery(key, value, cvalue, colName, capPropName, uncapPropName, option); + } + + protected void registerWhereClause(String whereClause) { + registerInlineWhereClause(whereClause); + } + + // =================================================================================== + // Override about Query + // ==================== + // /* * * * * * * * * * * * * * * * * * * * * * * + // MyTable = [CUSTOMERS_BASKET_ATTRIBUTES] + // * * * * * * * * */ + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [CUSTOMERS_BASKET_ATTRIBUTES_ID] + // - - - - - - - - -/ + protected ConditionValue getCValueCustomersBasketAttributesId() { + return _myCQ.getCustomersBasketAttributesId(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [CUSTOMERS_ID] + // - - - - - - - - -/ + protected ConditionValue getCValueCustomersId() { + return _myCQ.getCustomersId(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [PRODUCTS_ID] + // - - - - - - - - -/ + protected ConditionValue getCValueProductsId() { + return _myCQ.getProductsId(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [PRODUCTS_OPTIONS_ID] + // - - - - - - - - -/ + protected ConditionValue getCValueProductsOptionsId() { + return _myCQ.getProductsOptionsId(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [PRODUCTS_OPTIONS_VALUE_ID] + // - - - - - - - - -/ + protected ConditionValue getCValueProductsOptionsValueId() { + return _myCQ.getProductsOptionsValueId(); + } + + +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ciq/CustomersBasketCIQ.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ciq/CustomersBasketCIQ.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ciq/CustomersBasketCIQ.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,118 @@ +package jp.sf.pal.pompei.cbean.cq.ciq; + +import jp.sf.pal.pompei.cbean.cq.bs.*; +import jp.sf.pal.pompei.cbean.cq.*; + +import jp.sf.pal.pompei.allcommon.cbean.*; +import jp.sf.pal.pompei.allcommon.cbean.ckey.*; +import jp.sf.pal.pompei.allcommon.cbean.coption.ConditionOption; +import jp.sf.pal.pompei.allcommon.cbean.cvalue.ConditionValue; +import jp.sf.pal.pompei.allcommon.cbean.sqlclause.SqlClause; + +/** + * The condition-inline-query of CUSTOMERS_BASKET. + * + * @author DBFlute(AutoGenerator) + */ +public class CustomersBasketCIQ extends AbstractBsCustomersBasketCQ { + + // =================================================================================== + // Attribute + // ========= + /** Corresponding condition query. */ + protected BsCustomersBasketCQ _myCQ; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param childQuery Child query as abstract class. (Nullable: If null, this is base instance.) + * @param sqlClause SQL clause instance. (NotNull) + * @param aliasName My alias name. (NotNull) + * @param nestLevel Nest level. + */ + public CustomersBasketCIQ(ConditionQuery childQuery, SqlClause sqlClause, String aliasName, int nestLevel, BsCustomersBasketCQ myCQ) { + super(childQuery, sqlClause, aliasName, nestLevel); + _myCQ = myCQ; + } + + // =================================================================================== + // Override about Register + // ======================= + protected void reflectRelationOnUnionQuery(ConditionQuery baseQueryAsSuper, ConditionQuery unionQueryAsSuper) { + throw new UnsupportedOperationException("InlineQuery must not need UNION method: " + baseQueryAsSuper + " : " + unionQueryAsSuper); + } + + protected void setupConditionValueAndRegisterWhereClause(ConditionKey key, Object value, ConditionValue cvalue + , String colName, String capPropName, String uncapPropName) { + registerInlineQuery(key, value, cvalue, colName, capPropName, uncapPropName); + } + + protected void setupConditionValueAndRegisterWhereClause(ConditionKey key, Object value, ConditionValue cvalue + , String colName, String capPropName, String uncapPropName, ConditionOption option) { + registerInlineQuery(key, value, cvalue, colName, capPropName, uncapPropName, option); + } + + protected void registerWhereClause(String whereClause) { + registerInlineWhereClause(whereClause); + } + + // =================================================================================== + // Override about Query + // ==================== + // /* * * * * * * * * * * * * * * * * * * * * * * + // MyTable = [CUSTOMERS_BASKET] + // * * * * * * * * */ + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [CUSTOMERS_BASKET_ID] + // - - - - - - - - -/ + protected ConditionValue getCValueCustomersBasketId() { + return _myCQ.getCustomersBasketId(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [CUSTOMERS_ID] + // - - - - - - - - -/ + protected ConditionValue getCValueCustomersId() { + return _myCQ.getCustomersId(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [PRODUCTS_ID] + // - - - - - - - - -/ + protected ConditionValue getCValueProductsId() { + return _myCQ.getProductsId(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [CUSTOMERS_BASKET_QUANTITY] + // - - - - - - - - -/ + protected ConditionValue getCValueCustomersBasketQuantity() { + return _myCQ.getCustomersBasketQuantity(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [FINAL_PRICE] + // - - - - - - - - -/ + protected ConditionValue getCValueFinalPrice() { + return _myCQ.getFinalPrice(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [CUSTOMERS_BASKET_DATE_ADDED] + // - - - - - - - - -/ + protected ConditionValue getCValueCustomersBasketDateAdded() { + return _myCQ.getCustomersBasketDateAdded(); + } + + +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ciq/CustomersCIQ.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ciq/CustomersCIQ.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ciq/CustomersCIQ.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,158 @@ +package jp.sf.pal.pompei.cbean.cq.ciq; + +import jp.sf.pal.pompei.cbean.cq.bs.*; +import jp.sf.pal.pompei.cbean.cq.*; + +import jp.sf.pal.pompei.allcommon.cbean.*; +import jp.sf.pal.pompei.allcommon.cbean.ckey.*; +import jp.sf.pal.pompei.allcommon.cbean.coption.ConditionOption; +import jp.sf.pal.pompei.allcommon.cbean.cvalue.ConditionValue; +import jp.sf.pal.pompei.allcommon.cbean.sqlclause.SqlClause; + +/** + * The condition-inline-query of CUSTOMERS. + * + * @author DBFlute(AutoGenerator) + */ +public class CustomersCIQ extends AbstractBsCustomersCQ { + + // =================================================================================== + // Attribute + // ========= + /** Corresponding condition query. */ + protected BsCustomersCQ _myCQ; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param childQuery Child query as abstract class. (Nullable: If null, this is base instance.) + * @param sqlClause SQL clause instance. (NotNull) + * @param aliasName My alias name. (NotNull) + * @param nestLevel Nest level. + */ + public CustomersCIQ(ConditionQuery childQuery, SqlClause sqlClause, String aliasName, int nestLevel, BsCustomersCQ myCQ) { + super(childQuery, sqlClause, aliasName, nestLevel); + _myCQ = myCQ; + } + + // =================================================================================== + // Override about Register + // ======================= + protected void reflectRelationOnUnionQuery(ConditionQuery baseQueryAsSuper, ConditionQuery unionQueryAsSuper) { + throw new UnsupportedOperationException("InlineQuery must not need UNION method: " + baseQueryAsSuper + " : " + unionQueryAsSuper); + } + + protected void setupConditionValueAndRegisterWhereClause(ConditionKey key, Object value, ConditionValue cvalue + , String colName, String capPropName, String uncapPropName) { + registerInlineQuery(key, value, cvalue, colName, capPropName, uncapPropName); + } + + protected void setupConditionValueAndRegisterWhereClause(ConditionKey key, Object value, ConditionValue cvalue + , String colName, String capPropName, String uncapPropName, ConditionOption option) { + registerInlineQuery(key, value, cvalue, colName, capPropName, uncapPropName, option); + } + + protected void registerWhereClause(String whereClause) { + registerInlineWhereClause(whereClause); + } + + // =================================================================================== + // Override about Query + // ==================== + // /* * * * * * * * * * * * * * * * * * * * * * * + // MyTable = [CUSTOMERS] + // * * * * * * * * */ + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [CUSTOMERS_ID] + // - - - - - - - - -/ + protected ConditionValue getCValueCustomersId() { + return _myCQ.getCustomersId(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [CUSTOMERS_GENDER] + // - - - - - - - - -/ + protected ConditionValue getCValueCustomersGender() { + return _myCQ.getCustomersGender(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [CUSTOMERS_FIRSTNAME] + // - - - - - - - - -/ + protected ConditionValue getCValueCustomersFirstname() { + return _myCQ.getCustomersFirstname(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [CUSTOMERS_LASTNAME] + // - - - - - - - - -/ + protected ConditionValue getCValueCustomersLastname() { + return _myCQ.getCustomersLastname(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [CUSTOMERS_DOB] + // - - - - - - - - -/ + protected ConditionValue getCValueCustomersDob() { + return _myCQ.getCustomersDob(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [CUSTOMERS_EMAIL_ADDRESS] + // - - - - - - - - -/ + protected ConditionValue getCValueCustomersEmailAddress() { + return _myCQ.getCustomersEmailAddress(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [CUSTOMERS_DEFAULT_ADDRESS_ID] + // - - - - - - - - -/ + protected ConditionValue getCValueCustomersDefaultAddressId() { + return _myCQ.getCustomersDefaultAddressId(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [CUSTOMERS_TELEPHONE] + // - - - - - - - - -/ + protected ConditionValue getCValueCustomersTelephone() { + return _myCQ.getCustomersTelephone(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [CUSTOMERS_FAX] + // - - - - - - - - -/ + protected ConditionValue getCValueCustomersFax() { + return _myCQ.getCustomersFax(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [CUSTOMERS_PASSWORD] + // - - - - - - - - -/ + protected ConditionValue getCValueCustomersPassword() { + return _myCQ.getCustomersPassword(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [CUSTOMERS_NEWSLETTER] + // - - - - - - - - -/ + protected ConditionValue getCValueCustomersNewsletter() { + return _myCQ.getCustomersNewsletter(); + } + + +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ciq/CustomersInfoCIQ.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ciq/CustomersInfoCIQ.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ciq/CustomersInfoCIQ.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,118 @@ +package jp.sf.pal.pompei.cbean.cq.ciq; + +import jp.sf.pal.pompei.cbean.cq.bs.*; +import jp.sf.pal.pompei.cbean.cq.*; + +import jp.sf.pal.pompei.allcommon.cbean.*; +import jp.sf.pal.pompei.allcommon.cbean.ckey.*; +import jp.sf.pal.pompei.allcommon.cbean.coption.ConditionOption; +import jp.sf.pal.pompei.allcommon.cbean.cvalue.ConditionValue; +import jp.sf.pal.pompei.allcommon.cbean.sqlclause.SqlClause; + +/** + * The condition-inline-query of CUSTOMERS_INFO. + * + * @author DBFlute(AutoGenerator) + */ +public class CustomersInfoCIQ extends AbstractBsCustomersInfoCQ { + + // =================================================================================== + // Attribute + // ========= + /** Corresponding condition query. */ + protected BsCustomersInfoCQ _myCQ; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param childQuery Child query as abstract class. (Nullable: If null, this is base instance.) + * @param sqlClause SQL clause instance. (NotNull) + * @param aliasName My alias name. (NotNull) + * @param nestLevel Nest level. + */ + public CustomersInfoCIQ(ConditionQuery childQuery, SqlClause sqlClause, String aliasName, int nestLevel, BsCustomersInfoCQ myCQ) { + super(childQuery, sqlClause, aliasName, nestLevel); + _myCQ = myCQ; + } + + // =================================================================================== + // Override about Register + // ======================= + protected void reflectRelationOnUnionQuery(ConditionQuery baseQueryAsSuper, ConditionQuery unionQueryAsSuper) { + throw new UnsupportedOperationException("InlineQuery must not need UNION method: " + baseQueryAsSuper + " : " + unionQueryAsSuper); + } + + protected void setupConditionValueAndRegisterWhereClause(ConditionKey key, Object value, ConditionValue cvalue + , String colName, String capPropName, String uncapPropName) { + registerInlineQuery(key, value, cvalue, colName, capPropName, uncapPropName); + } + + protected void setupConditionValueAndRegisterWhereClause(ConditionKey key, Object value, ConditionValue cvalue + , String colName, String capPropName, String uncapPropName, ConditionOption option) { + registerInlineQuery(key, value, cvalue, colName, capPropName, uncapPropName, option); + } + + protected void registerWhereClause(String whereClause) { + registerInlineWhereClause(whereClause); + } + + // =================================================================================== + // Override about Query + // ==================== + // /* * * * * * * * * * * * * * * * * * * * * * * + // MyTable = [CUSTOMERS_INFO] + // * * * * * * * * */ + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [CUSTOMERS_INFO_ID] + // - - - - - - - - -/ + protected ConditionValue getCValueCustomersInfoId() { + return _myCQ.getCustomersInfoId(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [CUSTOMERS_INFO_DATE_OF_LAST_LOGON] + // - - - - - - - - -/ + protected ConditionValue getCValueCustomersInfoDateOfLastLogon() { + return _myCQ.getCustomersInfoDateOfLastLogon(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [CUSTOMERS_INFO_NUMBER_OF_LOGONS] + // - - - - - - - - -/ + protected ConditionValue getCValueCustomersInfoNumberOfLogons() { + return _myCQ.getCustomersInfoNumberOfLogons(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [CUSTOMERS_INFO_DATE_ACCOUNT_CREATED] + // - - - - - - - - -/ + protected ConditionValue getCValueCustomersInfoDateAccountCreated() { + return _myCQ.getCustomersInfoDateAccountCreated(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [CUSTOMERS_INFO_DATE_ACCOUNT_LAST_MODIFIED] + // - - - - - - - - -/ + protected ConditionValue getCValueCustomersInfoDateAccountLastModified() { + return _myCQ.getCustomersInfoDateAccountLastModified(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [GLOBAL_PRODUCT_NOTIFICATIONS] + // - - - - - - - - -/ + protected ConditionValue getCValueGlobalProductNotifications() { + return _myCQ.getGlobalProductNotifications(); + } + + +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ciq/GeoZonesCIQ.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ciq/GeoZonesCIQ.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ciq/GeoZonesCIQ.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,110 @@ +package jp.sf.pal.pompei.cbean.cq.ciq; + +import jp.sf.pal.pompei.cbean.cq.bs.*; +import jp.sf.pal.pompei.cbean.cq.*; + +import jp.sf.pal.pompei.allcommon.cbean.*; +import jp.sf.pal.pompei.allcommon.cbean.ckey.*; +import jp.sf.pal.pompei.allcommon.cbean.coption.ConditionOption; +import jp.sf.pal.pompei.allcommon.cbean.cvalue.ConditionValue; +import jp.sf.pal.pompei.allcommon.cbean.sqlclause.SqlClause; + +/** + * The condition-inline-query of GEO_ZONES. + * + * @author DBFlute(AutoGenerator) + */ +public class GeoZonesCIQ extends AbstractBsGeoZonesCQ { + + // =================================================================================== + // Attribute + // ========= + /** Corresponding condition query. */ + protected BsGeoZonesCQ _myCQ; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param childQuery Child query as abstract class. (Nullable: If null, this is base instance.) + * @param sqlClause SQL clause instance. (NotNull) + * @param aliasName My alias name. (NotNull) + * @param nestLevel Nest level. + */ + public GeoZonesCIQ(ConditionQuery childQuery, SqlClause sqlClause, String aliasName, int nestLevel, BsGeoZonesCQ myCQ) { + super(childQuery, sqlClause, aliasName, nestLevel); + _myCQ = myCQ; + } + + // =================================================================================== + // Override about Register + // ======================= + protected void reflectRelationOnUnionQuery(ConditionQuery baseQueryAsSuper, ConditionQuery unionQueryAsSuper) { + throw new UnsupportedOperationException("InlineQuery must not need UNION method: " + baseQueryAsSuper + " : " + unionQueryAsSuper); + } + + protected void setupConditionValueAndRegisterWhereClause(ConditionKey key, Object value, ConditionValue cvalue + , String colName, String capPropName, String uncapPropName) { + registerInlineQuery(key, value, cvalue, colName, capPropName, uncapPropName); + } + + protected void setupConditionValueAndRegisterWhereClause(ConditionKey key, Object value, ConditionValue cvalue + , String colName, String capPropName, String uncapPropName, ConditionOption option) { + registerInlineQuery(key, value, cvalue, colName, capPropName, uncapPropName, option); + } + + protected void registerWhereClause(String whereClause) { + registerInlineWhereClause(whereClause); + } + + // =================================================================================== + // Override about Query + // ==================== + // /* * * * * * * * * * * * * * * * * * * * * * * + // MyTable = [GEO_ZONES] + // * * * * * * * * */ + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [GEO_ZONE_ID] + // - - - - - - - - -/ + protected ConditionValue getCValueGeoZoneId() { + return _myCQ.getGeoZoneId(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [GEO_ZONE_NAME] + // - - - - - - - - -/ + protected ConditionValue getCValueGeoZoneName() { + return _myCQ.getGeoZoneName(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [GEO_ZONE_DESCRIPTION] + // - - - - - - - - -/ + protected ConditionValue getCValueGeoZoneDescription() { + return _myCQ.getGeoZoneDescription(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [LAST_MODIFIED] + // - - - - - - - - -/ + protected ConditionValue getCValueLastModified() { + return _myCQ.getLastModified(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [DATE_ADDED] + // - - - - - - - - -/ + protected ConditionValue getCValueDateAdded() { + return _myCQ.getDateAdded(); + } + + +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ciq/LanguagesCIQ.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ciq/LanguagesCIQ.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ciq/LanguagesCIQ.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,118 @@ +package jp.sf.pal.pompei.cbean.cq.ciq; + +import jp.sf.pal.pompei.cbean.cq.bs.*; +import jp.sf.pal.pompei.cbean.cq.*; + +import jp.sf.pal.pompei.allcommon.cbean.*; +import jp.sf.pal.pompei.allcommon.cbean.ckey.*; +import jp.sf.pal.pompei.allcommon.cbean.coption.ConditionOption; +import jp.sf.pal.pompei.allcommon.cbean.cvalue.ConditionValue; +import jp.sf.pal.pompei.allcommon.cbean.sqlclause.SqlClause; + +/** + * The condition-inline-query of LANGUAGES. + * + * @author DBFlute(AutoGenerator) + */ +public class LanguagesCIQ extends AbstractBsLanguagesCQ { + + // =================================================================================== + // Attribute + // ========= + /** Corresponding condition query. */ + protected BsLanguagesCQ _myCQ; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param childQuery Child query as abstract class. (Nullable: If null, this is base instance.) + * @param sqlClause SQL clause instance. (NotNull) + * @param aliasName My alias name. (NotNull) + * @param nestLevel Nest level. + */ + public LanguagesCIQ(ConditionQuery childQuery, SqlClause sqlClause, String aliasName, int nestLevel, BsLanguagesCQ myCQ) { + super(childQuery, sqlClause, aliasName, nestLevel); + _myCQ = myCQ; + } + + // =================================================================================== + // Override about Register + // ======================= + protected void reflectRelationOnUnionQuery(ConditionQuery baseQueryAsSuper, ConditionQuery unionQueryAsSuper) { + throw new UnsupportedOperationException("InlineQuery must not need UNION method: " + baseQueryAsSuper + " : " + unionQueryAsSuper); + } + + protected void setupConditionValueAndRegisterWhereClause(ConditionKey key, Object value, ConditionValue cvalue + , String colName, String capPropName, String uncapPropName) { + registerInlineQuery(key, value, cvalue, colName, capPropName, uncapPropName); + } + + protected void setupConditionValueAndRegisterWhereClause(ConditionKey key, Object value, ConditionValue cvalue + , String colName, String capPropName, String uncapPropName, ConditionOption option) { + registerInlineQuery(key, value, cvalue, colName, capPropName, uncapPropName, option); + } + + protected void registerWhereClause(String whereClause) { + registerInlineWhereClause(whereClause); + } + + // =================================================================================== + // Override about Query + // ==================== + // /* * * * * * * * * * * * * * * * * * * * * * * + // MyTable = [LANGUAGES] + // * * * * * * * * */ + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [LANGUAGES_ID] + // - - - - - - - - -/ + protected ConditionValue getCValueLanguagesId() { + return _myCQ.getLanguagesId(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [NAME] + // - - - - - - - - -/ + protected ConditionValue getCValueName() { + return _myCQ.getName(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [CODE] + // - - - - - - - - -/ + protected ConditionValue getCValueCode() { + return _myCQ.getCode(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [IMAGE] + // - - - - - - - - -/ + protected ConditionValue getCValueImage() { + return _myCQ.getImage(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [DIRECTORY] + // - - - - - - - - -/ + protected ConditionValue getCValueDirectory() { + return _myCQ.getDirectory(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [SORT_ORDER] + // - - - - - - - - -/ + protected ConditionValue getCValueSortOrder() { + return _myCQ.getSortOrder(); + } + + +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ciq/ManufacturersCIQ.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ciq/ManufacturersCIQ.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ciq/ManufacturersCIQ.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,110 @@ +package jp.sf.pal.pompei.cbean.cq.ciq; + +import jp.sf.pal.pompei.cbean.cq.bs.*; +import jp.sf.pal.pompei.cbean.cq.*; + +import jp.sf.pal.pompei.allcommon.cbean.*; +import jp.sf.pal.pompei.allcommon.cbean.ckey.*; +import jp.sf.pal.pompei.allcommon.cbean.coption.ConditionOption; +import jp.sf.pal.pompei.allcommon.cbean.cvalue.ConditionValue; +import jp.sf.pal.pompei.allcommon.cbean.sqlclause.SqlClause; + +/** + * The condition-inline-query of MANUFACTURERS. + * + * @author DBFlute(AutoGenerator) + */ +public class ManufacturersCIQ extends AbstractBsManufacturersCQ { + + // =================================================================================== + // Attribute + // ========= + /** Corresponding condition query. */ + protected BsManufacturersCQ _myCQ; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param childQuery Child query as abstract class. (Nullable: If null, this is base instance.) + * @param sqlClause SQL clause instance. (NotNull) + * @param aliasName My alias name. (NotNull) + * @param nestLevel Nest level. + */ + public ManufacturersCIQ(ConditionQuery childQuery, SqlClause sqlClause, String aliasName, int nestLevel, BsManufacturersCQ myCQ) { + super(childQuery, sqlClause, aliasName, nestLevel); + _myCQ = myCQ; + } + + // =================================================================================== + // Override about Register + // ======================= + protected void reflectRelationOnUnionQuery(ConditionQuery baseQueryAsSuper, ConditionQuery unionQueryAsSuper) { + throw new UnsupportedOperationException("InlineQuery must not need UNION method: " + baseQueryAsSuper + " : " + unionQueryAsSuper); + } + + protected void setupConditionValueAndRegisterWhereClause(ConditionKey key, Object value, ConditionValue cvalue + , String colName, String capPropName, String uncapPropName) { + registerInlineQuery(key, value, cvalue, colName, capPropName, uncapPropName); + } + + protected void setupConditionValueAndRegisterWhereClause(ConditionKey key, Object value, ConditionValue cvalue + , String colName, String capPropName, String uncapPropName, ConditionOption option) { + registerInlineQuery(key, value, cvalue, colName, capPropName, uncapPropName, option); + } + + protected void registerWhereClause(String whereClause) { + registerInlineWhereClause(whereClause); + } + + // =================================================================================== + // Override about Query + // ==================== + // /* * * * * * * * * * * * * * * * * * * * * * * + // MyTable = [MANUFACTURERS] + // * * * * * * * * */ + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [MANUFACTURERS_ID] + // - - - - - - - - -/ + protected ConditionValue getCValueManufacturersId() { + return _myCQ.getManufacturersId(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [MANUFACTURERS_NAME] + // - - - - - - - - -/ + protected ConditionValue getCValueManufacturersName() { + return _myCQ.getManufacturersName(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [MANUFACTURERS_IMAGE] + // - - - - - - - - -/ + protected ConditionValue getCValueManufacturersImage() { + return _myCQ.getManufacturersImage(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [DATE_ADDED] + // - - - - - - - - -/ + protected ConditionValue getCValueDateAdded() { + return _myCQ.getDateAdded(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [LAST_MODIFIED] + // - - - - - - - - -/ + protected ConditionValue getCValueLastModified() { + return _myCQ.getLastModified(); + } + + +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ciq/ManufacturersInfoCIQ.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ciq/ManufacturersInfoCIQ.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ciq/ManufacturersInfoCIQ.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,110 @@ +package jp.sf.pal.pompei.cbean.cq.ciq; + +import jp.sf.pal.pompei.cbean.cq.bs.*; +import jp.sf.pal.pompei.cbean.cq.*; + +import jp.sf.pal.pompei.allcommon.cbean.*; +import jp.sf.pal.pompei.allcommon.cbean.ckey.*; +import jp.sf.pal.pompei.allcommon.cbean.coption.ConditionOption; +import jp.sf.pal.pompei.allcommon.cbean.cvalue.ConditionValue; +import jp.sf.pal.pompei.allcommon.cbean.sqlclause.SqlClause; + +/** + * The condition-inline-query of MANUFACTURERS_INFO. + * + * @author DBFlute(AutoGenerator) + */ +public class ManufacturersInfoCIQ extends AbstractBsManufacturersInfoCQ { + + // =================================================================================== + // Attribute + // ========= + /** Corresponding condition query. */ + protected BsManufacturersInfoCQ _myCQ; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param childQuery Child query as abstract class. (Nullable: If null, this is base instance.) + * @param sqlClause SQL clause instance. (NotNull) + * @param aliasName My alias name. (NotNull) + * @param nestLevel Nest level. + */ + public ManufacturersInfoCIQ(ConditionQuery childQuery, SqlClause sqlClause, String aliasName, int nestLevel, BsManufacturersInfoCQ myCQ) { + super(childQuery, sqlClause, aliasName, nestLevel); + _myCQ = myCQ; + } + + // =================================================================================== + // Override about Register + // ======================= + protected void reflectRelationOnUnionQuery(ConditionQuery baseQueryAsSuper, ConditionQuery unionQueryAsSuper) { + throw new UnsupportedOperationException("InlineQuery must not need UNION method: " + baseQueryAsSuper + " : " + unionQueryAsSuper); + } + + protected void setupConditionValueAndRegisterWhereClause(ConditionKey key, Object value, ConditionValue cvalue + , String colName, String capPropName, String uncapPropName) { + registerInlineQuery(key, value, cvalue, colName, capPropName, uncapPropName); + } + + protected void setupConditionValueAndRegisterWhereClause(ConditionKey key, Object value, ConditionValue cvalue + , String colName, String capPropName, String uncapPropName, ConditionOption option) { + registerInlineQuery(key, value, cvalue, colName, capPropName, uncapPropName, option); + } + + protected void registerWhereClause(String whereClause) { + registerInlineWhereClause(whereClause); + } + + // =================================================================================== + // Override about Query + // ==================== + // /* * * * * * * * * * * * * * * * * * * * * * * + // MyTable = [MANUFACTURERS_INFO] + // * * * * * * * * */ + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [MANUFACTURERS_ID] + // - - - - - - - - -/ + protected ConditionValue getCValueManufacturersId() { + return _myCQ.getManufacturersId(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [LANGUAGES_ID] + // - - - - - - - - -/ + protected ConditionValue getCValueLanguagesId() { + return _myCQ.getLanguagesId(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [MANUFACTURERS_URL] + // - - - - - - - - -/ + protected ConditionValue getCValueManufacturersUrl() { + return _myCQ.getManufacturersUrl(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [URL_CLICKED] + // - - - - - - - - -/ + protected ConditionValue getCValueUrlClicked() { + return _myCQ.getUrlClicked(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [DATE_LAST_CLICK] + // - - - - - - - - -/ + protected ConditionValue getCValueDateLastClick() { + return _myCQ.getDateLastClick(); + } + + +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ciq/NewslettersCIQ.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ciq/NewslettersCIQ.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ciq/NewslettersCIQ.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,134 @@ +package jp.sf.pal.pompei.cbean.cq.ciq; + +import jp.sf.pal.pompei.cbean.cq.bs.*; +import jp.sf.pal.pompei.cbean.cq.*; + +import jp.sf.pal.pompei.allcommon.cbean.*; +import jp.sf.pal.pompei.allcommon.cbean.ckey.*; +import jp.sf.pal.pompei.allcommon.cbean.coption.ConditionOption; +import jp.sf.pal.pompei.allcommon.cbean.cvalue.ConditionValue; +import jp.sf.pal.pompei.allcommon.cbean.sqlclause.SqlClause; + +/** + * The condition-inline-query of NEWSLETTERS. + * + * @author DBFlute(AutoGenerator) + */ +public class NewslettersCIQ extends AbstractBsNewslettersCQ { + + // =================================================================================== + // Attribute + // ========= + /** Corresponding condition query. */ + protected BsNewslettersCQ _myCQ; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param childQuery Child query as abstract class. (Nullable: If null, this is base instance.) + * @param sqlClause SQL clause instance. (NotNull) + * @param aliasName My alias name. (NotNull) + * @param nestLevel Nest level. + */ + public NewslettersCIQ(ConditionQuery childQuery, SqlClause sqlClause, String aliasName, int nestLevel, BsNewslettersCQ myCQ) { + super(childQuery, sqlClause, aliasName, nestLevel); + _myCQ = myCQ; + } + + // =================================================================================== + // Override about Register + // ======================= + protected void reflectRelationOnUnionQuery(ConditionQuery baseQueryAsSuper, ConditionQuery unionQueryAsSuper) { + throw new UnsupportedOperationException("InlineQuery must not need UNION method: " + baseQueryAsSuper + " : " + unionQueryAsSuper); + } + + protected void setupConditionValueAndRegisterWhereClause(ConditionKey key, Object value, ConditionValue cvalue + , String colName, String capPropName, String uncapPropName) { + registerInlineQuery(key, value, cvalue, colName, capPropName, uncapPropName); + } + + protected void setupConditionValueAndRegisterWhereClause(ConditionKey key, Object value, ConditionValue cvalue + , String colName, String capPropName, String uncapPropName, ConditionOption option) { + registerInlineQuery(key, value, cvalue, colName, capPropName, uncapPropName, option); + } + + protected void registerWhereClause(String whereClause) { + registerInlineWhereClause(whereClause); + } + + // =================================================================================== + // Override about Query + // ==================== + // /* * * * * * * * * * * * * * * * * * * * * * * + // MyTable = [NEWSLETTERS] + // * * * * * * * * */ + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [NEWSLETTERS_ID] + // - - - - - - - - -/ + protected ConditionValue getCValueNewslettersId() { + return _myCQ.getNewslettersId(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [TITLE] + // - - - - - - - - -/ + protected ConditionValue getCValueTitle() { + return _myCQ.getTitle(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [CONTENT] + // - - - - - - - - -/ + protected ConditionValue getCValueContent() { + return _myCQ.getContent(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [MODULE] + // - - - - - - - - -/ + protected ConditionValue getCValueModule() { + return _myCQ.getModule(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [DATE_ADDED] + // - - - - - - - - -/ + protected ConditionValue getCValueDateAdded() { + return _myCQ.getDateAdded(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [DATE_SENT] + // - - - - - - - - -/ + protected ConditionValue getCValueDateSent() { + return _myCQ.getDateSent(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [STATUS] + // - - - - - - - - -/ + protected ConditionValue getCValueStatus() { + return _myCQ.getStatus(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [LOCKED] + // - - - - - - - - -/ + protected ConditionValue getCValueLocked() { + return _myCQ.getLocked(); + } + + +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ciq/OrdersCIQ.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ciq/OrdersCIQ.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ciq/OrdersCIQ.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,406 @@ +package jp.sf.pal.pompei.cbean.cq.ciq; + +import jp.sf.pal.pompei.cbean.cq.bs.*; +import jp.sf.pal.pompei.cbean.cq.*; + +import jp.sf.pal.pompei.allcommon.cbean.*; +import jp.sf.pal.pompei.allcommon.cbean.ckey.*; +import jp.sf.pal.pompei.allcommon.cbean.coption.ConditionOption; +import jp.sf.pal.pompei.allcommon.cbean.cvalue.ConditionValue; +import jp.sf.pal.pompei.allcommon.cbean.sqlclause.SqlClause; + +/** + * The condition-inline-query of ORDERS. + * + * @author DBFlute(AutoGenerator) + */ +public class OrdersCIQ extends AbstractBsOrdersCQ { + + // =================================================================================== + // Attribute + // ========= + /** Corresponding condition query. */ + protected BsOrdersCQ _myCQ; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param childQuery Child query as abstract class. (Nullable: If null, this is base instance.) + * @param sqlClause SQL clause instance. (NotNull) + * @param aliasName My alias name. (NotNull) + * @param nestLevel Nest level. + */ + public OrdersCIQ(ConditionQuery childQuery, SqlClause sqlClause, String aliasName, int nestLevel, BsOrdersCQ myCQ) { + super(childQuery, sqlClause, aliasName, nestLevel); + _myCQ = myCQ; + } + + // =================================================================================== + // Override about Register + // ======================= + protected void reflectRelationOnUnionQuery(ConditionQuery baseQueryAsSuper, ConditionQuery unionQueryAsSuper) { + throw new UnsupportedOperationException("InlineQuery must not need UNION method: " + baseQueryAsSuper + " : " + unionQueryAsSuper); + } + + protected void setupConditionValueAndRegisterWhereClause(ConditionKey key, Object value, ConditionValue cvalue + , String colName, String capPropName, String uncapPropName) { + registerInlineQuery(key, value, cvalue, colName, capPropName, uncapPropName); + } + + protected void setupConditionValueAndRegisterWhereClause(ConditionKey key, Object value, ConditionValue cvalue + , String colName, String capPropName, String uncapPropName, ConditionOption option) { + registerInlineQuery(key, value, cvalue, colName, capPropName, uncapPropName, option); + } + + protected void registerWhereClause(String whereClause) { + registerInlineWhereClause(whereClause); + } + + // =================================================================================== + // Override about Query + // ==================== + // /* * * * * * * * * * * * * * * * * * * * * * * + // MyTable = [ORDERS] + // * * * * * * * * */ + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [ORDERS_ID] + // - - - - - - - - -/ + protected ConditionValue getCValueOrdersId() { + return _myCQ.getOrdersId(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [CUSTOMERS_ID] + // - - - - - - - - -/ + protected ConditionValue getCValueCustomersId() { + return _myCQ.getCustomersId(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [CUSTOMERS_NAME] + // - - - - - - - - -/ + protected ConditionValue getCValueCustomersName() { + return _myCQ.getCustomersName(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [CUSTOMERS_COMPANY] + // - - - - - - - - -/ + protected ConditionValue getCValueCustomersCompany() { + return _myCQ.getCustomersCompany(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [CUSTOMERS_STREET_ADDRESS] + // - - - - - - - - -/ + protected ConditionValue getCValueCustomersStreetAddress() { + return _myCQ.getCustomersStreetAddress(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [CUSTOMERS_SUBURB] + // - - - - - - - - -/ + protected ConditionValue getCValueCustomersSuburb() { + return _myCQ.getCustomersSuburb(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [CUSTOMERS_CITY] + // - - - - - - - - -/ + protected ConditionValue getCValueCustomersCity() { + return _myCQ.getCustomersCity(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [CUSTOMERS_POSTCODE] + // - - - - - - - - -/ + protected ConditionValue getCValueCustomersPostcode() { + return _myCQ.getCustomersPostcode(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [CUSTOMERS_STATE] + // - - - - - - - - -/ + protected ConditionValue getCValueCustomersState() { + return _myCQ.getCustomersState(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [CUSTOMERS_COUNTRY] + // - - - - - - - - -/ + protected ConditionValue getCValueCustomersCountry() { + return _myCQ.getCustomersCountry(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [CUSTOMERS_TELEPHONE] + // - - - - - - - - -/ + protected ConditionValue getCValueCustomersTelephone() { + return _myCQ.getCustomersTelephone(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [CUSTOMERS_EMAIL_ADDRESS] + // - - - - - - - - -/ + protected ConditionValue getCValueCustomersEmailAddress() { + return _myCQ.getCustomersEmailAddress(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [CUSTOMERS_ADDRESS_FORMAT_ID] + // - - - - - - - - -/ + protected ConditionValue getCValueCustomersAddressFormatId() { + return _myCQ.getCustomersAddressFormatId(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [DELIVERY_NAME] + // - - - - - - - - -/ + protected ConditionValue getCValueDeliveryName() { + return _myCQ.getDeliveryName(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [DELIVERY_COMPANY] + // - - - - - - - - -/ + protected ConditionValue getCValueDeliveryCompany() { + return _myCQ.getDeliveryCompany(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [DELIVERY_STREET_ADDRESS] + // - - - - - - - - -/ + protected ConditionValue getCValueDeliveryStreetAddress() { + return _myCQ.getDeliveryStreetAddress(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [DELIVERY_SUBURB] + // - - - - - - - - -/ + protected ConditionValue getCValueDeliverySuburb() { + return _myCQ.getDeliverySuburb(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [DELIVERY_CITY] + // - - - - - - - - -/ + protected ConditionValue getCValueDeliveryCity() { + return _myCQ.getDeliveryCity(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [DELIVERY_POSTCODE] + // - - - - - - - - -/ + protected ConditionValue getCValueDeliveryPostcode() { + return _myCQ.getDeliveryPostcode(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [DELIVERY_STATE] + // - - - - - - - - -/ + protected ConditionValue getCValueDeliveryState() { + return _myCQ.getDeliveryState(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [DELIVERY_COUNTRY] + // - - - - - - - - -/ + protected ConditionValue getCValueDeliveryCountry() { + return _myCQ.getDeliveryCountry(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [DELIVERY_ADDRESS_FORMAT_ID] + // - - - - - - - - -/ + protected ConditionValue getCValueDeliveryAddressFormatId() { + return _myCQ.getDeliveryAddressFormatId(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [BILLING_NAME] + // - - - - - - - - -/ + protected ConditionValue getCValueBillingName() { + return _myCQ.getBillingName(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [BILLING_COMPANY] + // - - - - - - - - -/ + protected ConditionValue getCValueBillingCompany() { + return _myCQ.getBillingCompany(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [BILLING_STREET_ADDRESS] + // - - - - - - - - -/ + protected ConditionValue getCValueBillingStreetAddress() { + return _myCQ.getBillingStreetAddress(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [BILLING_SUBURB] + // - - - - - - - - -/ + protected ConditionValue getCValueBillingSuburb() { + return _myCQ.getBillingSuburb(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [BILLING_CITY] + // - - - - - - - - -/ + protected ConditionValue getCValueBillingCity() { + return _myCQ.getBillingCity(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [BILLING_POSTCODE] + // - - - - - - - - -/ + protected ConditionValue getCValueBillingPostcode() { + return _myCQ.getBillingPostcode(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [BILLING_STATE] + // - - - - - - - - -/ + protected ConditionValue getCValueBillingState() { + return _myCQ.getBillingState(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [BILLING_COUNTRY] + // - - - - - - - - -/ + protected ConditionValue getCValueBillingCountry() { + return _myCQ.getBillingCountry(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [BILLING_ADDRESS_FORMAT_ID] + // - - - - - - - - -/ + protected ConditionValue getCValueBillingAddressFormatId() { + return _myCQ.getBillingAddressFormatId(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [PAYMENT_METHOD] + // - - - - - - - - -/ + protected ConditionValue getCValuePaymentMethod() { + return _myCQ.getPaymentMethod(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [CC_TYPE] + // - - - - - - - - -/ + protected ConditionValue getCValueCcType() { + return _myCQ.getCcType(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [CC_OWNER] + // - - - - - - - - -/ + protected ConditionValue getCValueCcOwner() { + return _myCQ.getCcOwner(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [CC_NUMBER] + // - - - - - - - - -/ + protected ConditionValue getCValueCcNumber() { + return _myCQ.getCcNumber(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [CC_EXPIRES] + // - - - - - - - - -/ + protected ConditionValue getCValueCcExpires() { + return _myCQ.getCcExpires(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [LAST_MODIFIED] + // - - - - - - - - -/ + protected ConditionValue getCValueLastModified() { + return _myCQ.getLastModified(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [DATE_PURCHASED] + // - - - - - - - - -/ + protected ConditionValue getCValueDatePurchased() { + return _myCQ.getDatePurchased(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [ORDERS_STATUS] + // - - - - - - - - -/ + protected ConditionValue getCValueOrdersStatus() { + return _myCQ.getOrdersStatus(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [ORDERS_DATE_FINISHED] + // - - - - - - - - -/ + protected ConditionValue getCValueOrdersDateFinished() { + return _myCQ.getOrdersDateFinished(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [CURRENCY] + // - - - - - - - - -/ + protected ConditionValue getCValueCurrency() { + return _myCQ.getCurrency(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [CURRENCY_VALUE] + // - - - - - - - - -/ + protected ConditionValue getCValueCurrencyValue() { + return _myCQ.getCurrencyValue(); + } + + +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ciq/OrdersProductsAttributesCIQ.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ciq/OrdersProductsAttributesCIQ.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ciq/OrdersProductsAttributesCIQ.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,126 @@ +package jp.sf.pal.pompei.cbean.cq.ciq; + +import jp.sf.pal.pompei.cbean.cq.bs.*; +import jp.sf.pal.pompei.cbean.cq.*; + +import jp.sf.pal.pompei.allcommon.cbean.*; +import jp.sf.pal.pompei.allcommon.cbean.ckey.*; +import jp.sf.pal.pompei.allcommon.cbean.coption.ConditionOption; +import jp.sf.pal.pompei.allcommon.cbean.cvalue.ConditionValue; +import jp.sf.pal.pompei.allcommon.cbean.sqlclause.SqlClause; + +/** + * The condition-inline-query of ORDERS_PRODUCTS_ATTRIBUTES. + * + * @author DBFlute(AutoGenerator) + */ +public class OrdersProductsAttributesCIQ extends AbstractBsOrdersProductsAttributesCQ { + + // =================================================================================== + // Attribute + // ========= + /** Corresponding condition query. */ + protected BsOrdersProductsAttributesCQ _myCQ; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param childQuery Child query as abstract class. (Nullable: If null, this is base instance.) + * @param sqlClause SQL clause instance. (NotNull) + * @param aliasName My alias name. (NotNull) + * @param nestLevel Nest level. + */ + public OrdersProductsAttributesCIQ(ConditionQuery childQuery, SqlClause sqlClause, String aliasName, int nestLevel, BsOrdersProductsAttributesCQ myCQ) { + super(childQuery, sqlClause, aliasName, nestLevel); + _myCQ = myCQ; + } + + // =================================================================================== + // Override about Register + // ======================= + protected void reflectRelationOnUnionQuery(ConditionQuery baseQueryAsSuper, ConditionQuery unionQueryAsSuper) { + throw new UnsupportedOperationException("InlineQuery must not need UNION method: " + baseQueryAsSuper + " : " + unionQueryAsSuper); + } + + protected void setupConditionValueAndRegisterWhereClause(ConditionKey key, Object value, ConditionValue cvalue + , String colName, String capPropName, String uncapPropName) { + registerInlineQuery(key, value, cvalue, colName, capPropName, uncapPropName); + } + + protected void setupConditionValueAndRegisterWhereClause(ConditionKey key, Object value, ConditionValue cvalue + , String colName, String capPropName, String uncapPropName, ConditionOption option) { + registerInlineQuery(key, value, cvalue, colName, capPropName, uncapPropName, option); + } + + protected void registerWhereClause(String whereClause) { + registerInlineWhereClause(whereClause); + } + + // =================================================================================== + // Override about Query + // ==================== + // /* * * * * * * * * * * * * * * * * * * * * * * + // MyTable = [ORDERS_PRODUCTS_ATTRIBUTES] + // * * * * * * * * */ + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [ORDERS_PRODUCTS_ATTRIBUTES_ID] + // - - - - - - - - -/ + protected ConditionValue getCValueOrdersProductsAttributesId() { + return _myCQ.getOrdersProductsAttributesId(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [ORDERS_ID] + // - - - - - - - - -/ + protected ConditionValue getCValueOrdersId() { + return _myCQ.getOrdersId(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [ORDERS_PRODUCTS_ID] + // - - - - - - - - -/ + protected ConditionValue getCValueOrdersProductsId() { + return _myCQ.getOrdersProductsId(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [PRODUCTS_OPTIONS] + // - - - - - - - - -/ + protected ConditionValue getCValueProductsOptions() { + return _myCQ.getProductsOptions(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [PRODUCTS_OPTIONS_VALUES] + // - - - - - - - - -/ + protected ConditionValue getCValueProductsOptionsValues() { + return _myCQ.getProductsOptionsValues(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [OPTIONS_VALUES_PRICE] + // - - - - - - - - -/ + protected ConditionValue getCValueOptionsValuesPrice() { + return _myCQ.getOptionsValuesPrice(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [PRICE_PREFIX] + // - - - - - - - - -/ + protected ConditionValue getCValuePricePrefix() { + return _myCQ.getPricePrefix(); + } + + +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ciq/OrdersProductsCIQ.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ciq/OrdersProductsCIQ.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ciq/OrdersProductsCIQ.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,142 @@ +package jp.sf.pal.pompei.cbean.cq.ciq; + +import jp.sf.pal.pompei.cbean.cq.bs.*; +import jp.sf.pal.pompei.cbean.cq.*; + +import jp.sf.pal.pompei.allcommon.cbean.*; +import jp.sf.pal.pompei.allcommon.cbean.ckey.*; +import jp.sf.pal.pompei.allcommon.cbean.coption.ConditionOption; +import jp.sf.pal.pompei.allcommon.cbean.cvalue.ConditionValue; +import jp.sf.pal.pompei.allcommon.cbean.sqlclause.SqlClause; + +/** + * The condition-inline-query of ORDERS_PRODUCTS. + * + * @author DBFlute(AutoGenerator) + */ +public class OrdersProductsCIQ extends AbstractBsOrdersProductsCQ { + + // =================================================================================== + // Attribute + // ========= + /** Corresponding condition query. */ + protected BsOrdersProductsCQ _myCQ; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param childQuery Child query as abstract class. (Nullable: If null, this is base instance.) + * @param sqlClause SQL clause instance. (NotNull) + * @param aliasName My alias name. (NotNull) + * @param nestLevel Nest level. + */ + public OrdersProductsCIQ(ConditionQuery childQuery, SqlClause sqlClause, String aliasName, int nestLevel, BsOrdersProductsCQ myCQ) { + super(childQuery, sqlClause, aliasName, nestLevel); + _myCQ = myCQ; + } + + // =================================================================================== + // Override about Register + // ======================= + protected void reflectRelationOnUnionQuery(ConditionQuery baseQueryAsSuper, ConditionQuery unionQueryAsSuper) { + throw new UnsupportedOperationException("InlineQuery must not need UNION method: " + baseQueryAsSuper + " : " + unionQueryAsSuper); + } + + protected void setupConditionValueAndRegisterWhereClause(ConditionKey key, Object value, ConditionValue cvalue + , String colName, String capPropName, String uncapPropName) { + registerInlineQuery(key, value, cvalue, colName, capPropName, uncapPropName); + } + + protected void setupConditionValueAndRegisterWhereClause(ConditionKey key, Object value, ConditionValue cvalue + , String colName, String capPropName, String uncapPropName, ConditionOption option) { + registerInlineQuery(key, value, cvalue, colName, capPropName, uncapPropName, option); + } + + protected void registerWhereClause(String whereClause) { + registerInlineWhereClause(whereClause); + } + + // =================================================================================== + // Override about Query + // ==================== + // /* * * * * * * * * * * * * * * * * * * * * * * + // MyTable = [ORDERS_PRODUCTS] + // * * * * * * * * */ + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [ORDERS_PRODUCTS_ID] + // - - - - - - - - -/ + protected ConditionValue getCValueOrdersProductsId() { + return _myCQ.getOrdersProductsId(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [ORDERS_ID] + // - - - - - - - - -/ + protected ConditionValue getCValueOrdersId() { + return _myCQ.getOrdersId(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [PRODUCTS_ID] + // - - - - - - - - -/ + protected ConditionValue getCValueProductsId() { + return _myCQ.getProductsId(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [PRODUCTS_MODEL] + // - - - - - - - - -/ + protected ConditionValue getCValueProductsModel() { + return _myCQ.getProductsModel(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [PRODUCTS_NAME] + // - - - - - - - - -/ + protected ConditionValue getCValueProductsName() { + return _myCQ.getProductsName(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [PRODUCTS_PRICE] + // - - - - - - - - -/ + protected ConditionValue getCValueProductsPrice() { + return _myCQ.getProductsPrice(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [FINAL_PRICE] + // - - - - - - - - -/ + protected ConditionValue getCValueFinalPrice() { + return _myCQ.getFinalPrice(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [PRODUCTS_TAX] + // - - - - - - - - -/ + protected ConditionValue getCValueProductsTax() { + return _myCQ.getProductsTax(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [PRODUCTS_QUANTITY] + // - - - - - - - - -/ + protected ConditionValue getCValueProductsQuantity() { + return _myCQ.getProductsQuantity(); + } + + +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ciq/OrdersProductsDownloadCIQ.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ciq/OrdersProductsDownloadCIQ.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ciq/OrdersProductsDownloadCIQ.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,118 @@ +package jp.sf.pal.pompei.cbean.cq.ciq; + +import jp.sf.pal.pompei.cbean.cq.bs.*; +import jp.sf.pal.pompei.cbean.cq.*; + +import jp.sf.pal.pompei.allcommon.cbean.*; +import jp.sf.pal.pompei.allcommon.cbean.ckey.*; +import jp.sf.pal.pompei.allcommon.cbean.coption.ConditionOption; +import jp.sf.pal.pompei.allcommon.cbean.cvalue.ConditionValue; +import jp.sf.pal.pompei.allcommon.cbean.sqlclause.SqlClause; + +/** + * The condition-inline-query of ORDERS_PRODUCTS_DOWNLOAD. + * + * @author DBFlute(AutoGenerator) + */ +public class OrdersProductsDownloadCIQ extends AbstractBsOrdersProductsDownloadCQ { + + // =================================================================================== + // Attribute + // ========= + /** Corresponding condition query. */ + protected BsOrdersProductsDownloadCQ _myCQ; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param childQuery Child query as abstract class. (Nullable: If null, this is base instance.) + * @param sqlClause SQL clause instance. (NotNull) + * @param aliasName My alias name. (NotNull) + * @param nestLevel Nest level. + */ + public OrdersProductsDownloadCIQ(ConditionQuery childQuery, SqlClause sqlClause, String aliasName, int nestLevel, BsOrdersProductsDownloadCQ myCQ) { + super(childQuery, sqlClause, aliasName, nestLevel); + _myCQ = myCQ; + } + + // =================================================================================== + // Override about Register + // ======================= + protected void reflectRelationOnUnionQuery(ConditionQuery baseQueryAsSuper, ConditionQuery unionQueryAsSuper) { + throw new UnsupportedOperationException("InlineQuery must not need UNION method: " + baseQueryAsSuper + " : " + unionQueryAsSuper); + } + + protected void setupConditionValueAndRegisterWhereClause(ConditionKey key, Object value, ConditionValue cvalue + , String colName, String capPropName, String uncapPropName) { + registerInlineQuery(key, value, cvalue, colName, capPropName, uncapPropName); + } + + protected void setupConditionValueAndRegisterWhereClause(ConditionKey key, Object value, ConditionValue cvalue + , String colName, String capPropName, String uncapPropName, ConditionOption option) { + registerInlineQuery(key, value, cvalue, colName, capPropName, uncapPropName, option); + } + + protected void registerWhereClause(String whereClause) { + registerInlineWhereClause(whereClause); + } + + // =================================================================================== + // Override about Query + // ==================== + // /* * * * * * * * * * * * * * * * * * * * * * * + // MyTable = [ORDERS_PRODUCTS_DOWNLOAD] + // * * * * * * * * */ + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [ORDERS_PRODUCTS_DOWNLOAD_ID] + // - - - - - - - - -/ + protected ConditionValue getCValueOrdersProductsDownloadId() { + return _myCQ.getOrdersProductsDownloadId(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [ORDERS_ID] + // - - - - - - - - -/ + protected ConditionValue getCValueOrdersId() { + return _myCQ.getOrdersId(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [ORDERS_PRODUCTS_ID] + // - - - - - - - - -/ + protected ConditionValue getCValueOrdersProductsId() { + return _myCQ.getOrdersProductsId(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [ORDERS_PRODUCTS_FILENAME] + // - - - - - - - - -/ + protected ConditionValue getCValueOrdersProductsFilename() { + return _myCQ.getOrdersProductsFilename(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [DOWNLOAD_MAXDAYS] + // - - - - - - - - -/ + protected ConditionValue getCValueDownloadMaxdays() { + return _myCQ.getDownloadMaxdays(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [DOWNLOAD_COUNT] + // - - - - - - - - -/ + protected ConditionValue getCValueDownloadCount() { + return _myCQ.getDownloadCount(); + } + + +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ciq/OrdersStatusCIQ.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ciq/OrdersStatusCIQ.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ciq/OrdersStatusCIQ.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,94 @@ +package jp.sf.pal.pompei.cbean.cq.ciq; + +import jp.sf.pal.pompei.cbean.cq.bs.*; +import jp.sf.pal.pompei.cbean.cq.*; + +import jp.sf.pal.pompei.allcommon.cbean.*; +import jp.sf.pal.pompei.allcommon.cbean.ckey.*; +import jp.sf.pal.pompei.allcommon.cbean.coption.ConditionOption; +import jp.sf.pal.pompei.allcommon.cbean.cvalue.ConditionValue; +import jp.sf.pal.pompei.allcommon.cbean.sqlclause.SqlClause; + +/** + * The condition-inline-query of ORDERS_STATUS. + * + * @author DBFlute(AutoGenerator) + */ +public class OrdersStatusCIQ extends AbstractBsOrdersStatusCQ { + + // =================================================================================== + // Attribute + // ========= + /** Corresponding condition query. */ + protected BsOrdersStatusCQ _myCQ; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param childQuery Child query as abstract class. (Nullable: If null, this is base instance.) + * @param sqlClause SQL clause instance. (NotNull) + * @param aliasName My alias name. (NotNull) + * @param nestLevel Nest level. + */ + public OrdersStatusCIQ(ConditionQuery childQuery, SqlClause sqlClause, String aliasName, int nestLevel, BsOrdersStatusCQ myCQ) { + super(childQuery, sqlClause, aliasName, nestLevel); + _myCQ = myCQ; + } + + // =================================================================================== + // Override about Register + // ======================= + protected void reflectRelationOnUnionQuery(ConditionQuery baseQueryAsSuper, ConditionQuery unionQueryAsSuper) { + throw new UnsupportedOperationException("InlineQuery must not need UNION method: " + baseQueryAsSuper + " : " + unionQueryAsSuper); + } + + protected void setupConditionValueAndRegisterWhereClause(ConditionKey key, Object value, ConditionValue cvalue + , String colName, String capPropName, String uncapPropName) { + registerInlineQuery(key, value, cvalue, colName, capPropName, uncapPropName); + } + + protected void setupConditionValueAndRegisterWhereClause(ConditionKey key, Object value, ConditionValue cvalue + , String colName, String capPropName, String uncapPropName, ConditionOption option) { + registerInlineQuery(key, value, cvalue, colName, capPropName, uncapPropName, option); + } + + protected void registerWhereClause(String whereClause) { + registerInlineWhereClause(whereClause); + } + + // =================================================================================== + // Override about Query + // ==================== + // /* * * * * * * * * * * * * * * * * * * * * * * + // MyTable = [ORDERS_STATUS] + // * * * * * * * * */ + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [ORDERS_STATUS_ID] + // - - - - - - - - -/ + protected ConditionValue getCValueOrdersStatusId() { + return _myCQ.getOrdersStatusId(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [LANGUAGE_ID] + // - - - - - - - - -/ + protected ConditionValue getCValueLanguageId() { + return _myCQ.getLanguageId(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [ORDERS_STATUS_NAME] + // - - - - - - - - -/ + protected ConditionValue getCValueOrdersStatusName() { + return _myCQ.getOrdersStatusName(); + } + + +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ciq/OrdersStatusHistoryCIQ.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ciq/OrdersStatusHistoryCIQ.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ciq/OrdersStatusHistoryCIQ.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,118 @@ +package jp.sf.pal.pompei.cbean.cq.ciq; + +import jp.sf.pal.pompei.cbean.cq.bs.*; +import jp.sf.pal.pompei.cbean.cq.*; + +import jp.sf.pal.pompei.allcommon.cbean.*; +import jp.sf.pal.pompei.allcommon.cbean.ckey.*; +import jp.sf.pal.pompei.allcommon.cbean.coption.ConditionOption; +import jp.sf.pal.pompei.allcommon.cbean.cvalue.ConditionValue; +import jp.sf.pal.pompei.allcommon.cbean.sqlclause.SqlClause; + +/** + * The condition-inline-query of ORDERS_STATUS_HISTORY. + * + * @author DBFlute(AutoGenerator) + */ +public class OrdersStatusHistoryCIQ extends AbstractBsOrdersStatusHistoryCQ { + + // =================================================================================== + // Attribute + // ========= + /** Corresponding condition query. */ + protected BsOrdersStatusHistoryCQ _myCQ; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param childQuery Child query as abstract class. (Nullable: If null, this is base instance.) + * @param sqlClause SQL clause instance. (NotNull) + * @param aliasName My alias name. (NotNull) + * @param nestLevel Nest level. + */ + public OrdersStatusHistoryCIQ(ConditionQuery childQuery, SqlClause sqlClause, String aliasName, int nestLevel, BsOrdersStatusHistoryCQ myCQ) { + super(childQuery, sqlClause, aliasName, nestLevel); + _myCQ = myCQ; + } + + // =================================================================================== + // Override about Register + // ======================= + protected void reflectRelationOnUnionQuery(ConditionQuery baseQueryAsSuper, ConditionQuery unionQueryAsSuper) { + throw new UnsupportedOperationException("InlineQuery must not need UNION method: " + baseQueryAsSuper + " : " + unionQueryAsSuper); + } + + protected void setupConditionValueAndRegisterWhereClause(ConditionKey key, Object value, ConditionValue cvalue + , String colName, String capPropName, String uncapPropName) { + registerInlineQuery(key, value, cvalue, colName, capPropName, uncapPropName); + } + + protected void setupConditionValueAndRegisterWhereClause(ConditionKey key, Object value, ConditionValue cvalue + , String colName, String capPropName, String uncapPropName, ConditionOption option) { + registerInlineQuery(key, value, cvalue, colName, capPropName, uncapPropName, option); + } + + protected void registerWhereClause(String whereClause) { + registerInlineWhereClause(whereClause); + } + + // =================================================================================== + // Override about Query + // ==================== + // /* * * * * * * * * * * * * * * * * * * * * * * + // MyTable = [ORDERS_STATUS_HISTORY] + // * * * * * * * * */ + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [ORDERS_STATUS_HISTORY_ID] + // - - - - - - - - -/ + protected ConditionValue getCValueOrdersStatusHistoryId() { + return _myCQ.getOrdersStatusHistoryId(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [ORDERS_ID] + // - - - - - - - - -/ + protected ConditionValue getCValueOrdersId() { + return _myCQ.getOrdersId(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [ORDERS_STATUS_ID] + // - - - - - - - - -/ + protected ConditionValue getCValueOrdersStatusId() { + return _myCQ.getOrdersStatusId(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [DATE_ADDED] + // - - - - - - - - -/ + protected ConditionValue getCValueDateAdded() { + return _myCQ.getDateAdded(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [CUSTOMER_NOTIFIED] + // - - - - - - - - -/ + protected ConditionValue getCValueCustomerNotified() { + return _myCQ.getCustomerNotified(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [COMMENTS] + // - - - - - - - - -/ + protected ConditionValue getCValueComments() { + return _myCQ.getComments(); + } + + +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ciq/OrdersTotalCIQ.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ciq/OrdersTotalCIQ.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ciq/OrdersTotalCIQ.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,126 @@ +package jp.sf.pal.pompei.cbean.cq.ciq; + +import jp.sf.pal.pompei.cbean.cq.bs.*; +import jp.sf.pal.pompei.cbean.cq.*; + +import jp.sf.pal.pompei.allcommon.cbean.*; +import jp.sf.pal.pompei.allcommon.cbean.ckey.*; +import jp.sf.pal.pompei.allcommon.cbean.coption.ConditionOption; +import jp.sf.pal.pompei.allcommon.cbean.cvalue.ConditionValue; +import jp.sf.pal.pompei.allcommon.cbean.sqlclause.SqlClause; + +/** + * The condition-inline-query of ORDERS_TOTAL. + * + * @author DBFlute(AutoGenerator) + */ +public class OrdersTotalCIQ extends AbstractBsOrdersTotalCQ { + + // =================================================================================== + // Attribute + // ========= + /** Corresponding condition query. */ + protected BsOrdersTotalCQ _myCQ; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param childQuery Child query as abstract class. (Nullable: If null, this is base instance.) + * @param sqlClause SQL clause instance. (NotNull) + * @param aliasName My alias name. (NotNull) + * @param nestLevel Nest level. + */ + public OrdersTotalCIQ(ConditionQuery childQuery, SqlClause sqlClause, String aliasName, int nestLevel, BsOrdersTotalCQ myCQ) { + super(childQuery, sqlClause, aliasName, nestLevel); + _myCQ = myCQ; + } + + // =================================================================================== + // Override about Register + // ======================= + protected void reflectRelationOnUnionQuery(ConditionQuery baseQueryAsSuper, ConditionQuery unionQueryAsSuper) { + throw new UnsupportedOperationException("InlineQuery must not need UNION method: " + baseQueryAsSuper + " : " + unionQueryAsSuper); + } + + protected void setupConditionValueAndRegisterWhereClause(ConditionKey key, Object value, ConditionValue cvalue + , String colName, String capPropName, String uncapPropName) { + registerInlineQuery(key, value, cvalue, colName, capPropName, uncapPropName); + } + + protected void setupConditionValueAndRegisterWhereClause(ConditionKey key, Object value, ConditionValue cvalue + , String colName, String capPropName, String uncapPropName, ConditionOption option) { + registerInlineQuery(key, value, cvalue, colName, capPropName, uncapPropName, option); + } + + protected void registerWhereClause(String whereClause) { + registerInlineWhereClause(whereClause); + } + + // =================================================================================== + // Override about Query + // ==================== + // /* * * * * * * * * * * * * * * * * * * * * * * + // MyTable = [ORDERS_TOTAL] + // * * * * * * * * */ + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [ORDERS_TOTAL_ID] + // - - - - - - - - -/ + protected ConditionValue getCValueOrdersTotalId() { + return _myCQ.getOrdersTotalId(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [ORDERS_ID] + // - - - - - - - - -/ + protected ConditionValue getCValueOrdersId() { + return _myCQ.getOrdersId(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [TITLE] + // - - - - - - - - -/ + protected ConditionValue getCValueTitle() { + return _myCQ.getTitle(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [TEXT] + // - - - - - - - - -/ + protected ConditionValue getCValueText() { + return _myCQ.getText(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [VALUE] + // - - - - - - - - -/ + protected ConditionValue getCValueValue() { + return _myCQ.getValue(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [OT_CLASS] + // - - - - - - - - -/ + protected ConditionValue getCValueOtClass() { + return _myCQ.getOtClass(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [SORT_ORDER] + // - - - - - - - - -/ + protected ConditionValue getCValueSortOrder() { + return _myCQ.getSortOrder(); + } + + +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ciq/ProductsAttributesCIQ.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ciq/ProductsAttributesCIQ.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ciq/ProductsAttributesCIQ.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,118 @@ +package jp.sf.pal.pompei.cbean.cq.ciq; + +import jp.sf.pal.pompei.cbean.cq.bs.*; +import jp.sf.pal.pompei.cbean.cq.*; + +import jp.sf.pal.pompei.allcommon.cbean.*; +import jp.sf.pal.pompei.allcommon.cbean.ckey.*; +import jp.sf.pal.pompei.allcommon.cbean.coption.ConditionOption; +import jp.sf.pal.pompei.allcommon.cbean.cvalue.ConditionValue; +import jp.sf.pal.pompei.allcommon.cbean.sqlclause.SqlClause; + +/** + * The condition-inline-query of PRODUCTS_ATTRIBUTES. + * + * @author DBFlute(AutoGenerator) + */ +public class ProductsAttributesCIQ extends AbstractBsProductsAttributesCQ { + + // =================================================================================== + // Attribute + // ========= + /** Corresponding condition query. */ + protected BsProductsAttributesCQ _myCQ; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param childQuery Child query as abstract class. (Nullable: If null, this is base instance.) + * @param sqlClause SQL clause instance. (NotNull) + * @param aliasName My alias name. (NotNull) + * @param nestLevel Nest level. + */ + public ProductsAttributesCIQ(ConditionQuery childQuery, SqlClause sqlClause, String aliasName, int nestLevel, BsProductsAttributesCQ myCQ) { + super(childQuery, sqlClause, aliasName, nestLevel); + _myCQ = myCQ; + } + + // =================================================================================== + // Override about Register + // ======================= + protected void reflectRelationOnUnionQuery(ConditionQuery baseQueryAsSuper, ConditionQuery unionQueryAsSuper) { + throw new UnsupportedOperationException("InlineQuery must not need UNION method: " + baseQueryAsSuper + " : " + unionQueryAsSuper); + } + + protected void setupConditionValueAndRegisterWhereClause(ConditionKey key, Object value, ConditionValue cvalue + , String colName, String capPropName, String uncapPropName) { + registerInlineQuery(key, value, cvalue, colName, capPropName, uncapPropName); + } + + protected void setupConditionValueAndRegisterWhereClause(ConditionKey key, Object value, ConditionValue cvalue + , String colName, String capPropName, String uncapPropName, ConditionOption option) { + registerInlineQuery(key, value, cvalue, colName, capPropName, uncapPropName, option); + } + + protected void registerWhereClause(String whereClause) { + registerInlineWhereClause(whereClause); + } + + // =================================================================================== + // Override about Query + // ==================== + // /* * * * * * * * * * * * * * * * * * * * * * * + // MyTable = [PRODUCTS_ATTRIBUTES] + // * * * * * * * * */ + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [PRODUCTS_ATTRIBUTES_ID] + // - - - - - - - - -/ + protected ConditionValue getCValueProductsAttributesId() { + return _myCQ.getProductsAttributesId(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [PRODUCTS_ID] + // - - - - - - - - -/ + protected ConditionValue getCValueProductsId() { + return _myCQ.getProductsId(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [OPTIONS_ID] + // - - - - - - - - -/ + protected ConditionValue getCValueOptionsId() { + return _myCQ.getOptionsId(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [OPTIONS_VALUES_ID] + // - - - - - - - - -/ + protected ConditionValue getCValueOptionsValuesId() { + return _myCQ.getOptionsValuesId(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [OPTIONS_VALUES_PRICE] + // - - - - - - - - -/ + protected ConditionValue getCValueOptionsValuesPrice() { + return _myCQ.getOptionsValuesPrice(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [PRICE_PREFIX] + // - - - - - - - - -/ + protected ConditionValue getCValuePricePrefix() { + return _myCQ.getPricePrefix(); + } + + +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ciq/ProductsAttributesDownloadCIQ.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ciq/ProductsAttributesDownloadCIQ.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ciq/ProductsAttributesDownloadCIQ.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,102 @@ +package jp.sf.pal.pompei.cbean.cq.ciq; + +import jp.sf.pal.pompei.cbean.cq.bs.*; +import jp.sf.pal.pompei.cbean.cq.*; + +import jp.sf.pal.pompei.allcommon.cbean.*; +import jp.sf.pal.pompei.allcommon.cbean.ckey.*; +import jp.sf.pal.pompei.allcommon.cbean.coption.ConditionOption; +import jp.sf.pal.pompei.allcommon.cbean.cvalue.ConditionValue; +import jp.sf.pal.pompei.allcommon.cbean.sqlclause.SqlClause; + +/** + * The condition-inline-query of PRODUCTS_ATTRIBUTES_DOWNLOAD. + * + * @author DBFlute(AutoGenerator) + */ +public class ProductsAttributesDownloadCIQ extends AbstractBsProductsAttributesDownloadCQ { + + // =================================================================================== + // Attribute + // ========= + /** Corresponding condition query. */ + protected BsProductsAttributesDownloadCQ _myCQ; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param childQuery Child query as abstract class. (Nullable: If null, this is base instance.) + * @param sqlClause SQL clause instance. (NotNull) + * @param aliasName My alias name. (NotNull) + * @param nestLevel Nest level. + */ + public ProductsAttributesDownloadCIQ(ConditionQuery childQuery, SqlClause sqlClause, String aliasName, int nestLevel, BsProductsAttributesDownloadCQ myCQ) { + super(childQuery, sqlClause, aliasName, nestLevel); + _myCQ = myCQ; + } + + // =================================================================================== + // Override about Register + // ======================= + protected void reflectRelationOnUnionQuery(ConditionQuery baseQueryAsSuper, ConditionQuery unionQueryAsSuper) { + throw new UnsupportedOperationException("InlineQuery must not need UNION method: " + baseQueryAsSuper + " : " + unionQueryAsSuper); + } + + protected void setupConditionValueAndRegisterWhereClause(ConditionKey key, Object value, ConditionValue cvalue + , String colName, String capPropName, String uncapPropName) { + registerInlineQuery(key, value, cvalue, colName, capPropName, uncapPropName); + } + + protected void setupConditionValueAndRegisterWhereClause(ConditionKey key, Object value, ConditionValue cvalue + , String colName, String capPropName, String uncapPropName, ConditionOption option) { + registerInlineQuery(key, value, cvalue, colName, capPropName, uncapPropName, option); + } + + protected void registerWhereClause(String whereClause) { + registerInlineWhereClause(whereClause); + } + + // =================================================================================== + // Override about Query + // ==================== + // /* * * * * * * * * * * * * * * * * * * * * * * + // MyTable = [PRODUCTS_ATTRIBUTES_DOWNLOAD] + // * * * * * * * * */ + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [PRODUCTS_ATTRIBUTES_ID] + // - - - - - - - - -/ + protected ConditionValue getCValueProductsAttributesId() { + return _myCQ.getProductsAttributesId(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [PRODUCTS_ATTRIBUTES_FILENAME] + // - - - - - - - - -/ + protected ConditionValue getCValueProductsAttributesFilename() { + return _myCQ.getProductsAttributesFilename(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [PRODUCTS_ATTRIBUTES_MAXDAYS] + // - - - - - - - - -/ + protected ConditionValue getCValueProductsAttributesMaxdays() { + return _myCQ.getProductsAttributesMaxdays(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [PRODUCTS_ATTRIBUTES_MAXCOUNT] + // - - - - - - - - -/ + protected ConditionValue getCValueProductsAttributesMaxcount() { + return _myCQ.getProductsAttributesMaxcount(); + } + + +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ciq/ProductsCIQ.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ciq/ProductsCIQ.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ciq/ProductsCIQ.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,174 @@ +package jp.sf.pal.pompei.cbean.cq.ciq; + +import jp.sf.pal.pompei.cbean.cq.bs.*; +import jp.sf.pal.pompei.cbean.cq.*; + +import jp.sf.pal.pompei.allcommon.cbean.*; +import jp.sf.pal.pompei.allcommon.cbean.ckey.*; +import jp.sf.pal.pompei.allcommon.cbean.coption.ConditionOption; +import jp.sf.pal.pompei.allcommon.cbean.cvalue.ConditionValue; +import jp.sf.pal.pompei.allcommon.cbean.sqlclause.SqlClause; + +/** + * The condition-inline-query of PRODUCTS. + * + * @author DBFlute(AutoGenerator) + */ +public class ProductsCIQ extends AbstractBsProductsCQ { + + // =================================================================================== + // Attribute + // ========= + /** Corresponding condition query. */ + protected BsProductsCQ _myCQ; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param childQuery Child query as abstract class. (Nullable: If null, this is base instance.) + * @param sqlClause SQL clause instance. (NotNull) + * @param aliasName My alias name. (NotNull) + * @param nestLevel Nest level. + */ + public ProductsCIQ(ConditionQuery childQuery, SqlClause sqlClause, String aliasName, int nestLevel, BsProductsCQ myCQ) { + super(childQuery, sqlClause, aliasName, nestLevel); + _myCQ = myCQ; + } + + // =================================================================================== + // Override about Register + // ======================= + protected void reflectRelationOnUnionQuery(ConditionQuery baseQueryAsSuper, ConditionQuery unionQueryAsSuper) { + throw new UnsupportedOperationException("InlineQuery must not need UNION method: " + baseQueryAsSuper + " : " + unionQueryAsSuper); + } + + protected void setupConditionValueAndRegisterWhereClause(ConditionKey key, Object value, ConditionValue cvalue + , String colName, String capPropName, String uncapPropName) { + registerInlineQuery(key, value, cvalue, colName, capPropName, uncapPropName); + } + + protected void setupConditionValueAndRegisterWhereClause(ConditionKey key, Object value, ConditionValue cvalue + , String colName, String capPropName, String uncapPropName, ConditionOption option) { + registerInlineQuery(key, value, cvalue, colName, capPropName, uncapPropName, option); + } + + protected void registerWhereClause(String whereClause) { + registerInlineWhereClause(whereClause); + } + + // =================================================================================== + // Override about Query + // ==================== + // /* * * * * * * * * * * * * * * * * * * * * * * + // MyTable = [PRODUCTS] + // * * * * * * * * */ + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [PRODUCTS_ID] + // - - - - - - - - -/ + protected ConditionValue getCValueProductsId() { + return _myCQ.getProductsId(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [PRODUCTS_QUANTITY] + // - - - - - - - - -/ + protected ConditionValue getCValueProductsQuantity() { + return _myCQ.getProductsQuantity(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [PRODUCTS_MODEL] + // - - - - - - - - -/ + protected ConditionValue getCValueProductsModel() { + return _myCQ.getProductsModel(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [PRODUCTS_IMAGE] + // - - - - - - - - -/ + protected ConditionValue getCValueProductsImage() { + return _myCQ.getProductsImage(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [PRODUCTS_PRICE] + // - - - - - - - - -/ + protected ConditionValue getCValueProductsPrice() { + return _myCQ.getProductsPrice(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [PRODUCTS_DATE_ADDED] + // - - - - - - - - -/ + protected ConditionValue getCValueProductsDateAdded() { + return _myCQ.getProductsDateAdded(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [PRODUCTS_LAST_MODIFIED] + // - - - - - - - - -/ + protected ConditionValue getCValueProductsLastModified() { + return _myCQ.getProductsLastModified(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [PRODUCTS_DATE_AVAILABLE] + // - - - - - - - - -/ + protected ConditionValue getCValueProductsDateAvailable() { + return _myCQ.getProductsDateAvailable(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [PRODUCTS_WEIGHT] + // - - - - - - - - -/ + protected ConditionValue getCValueProductsWeight() { + return _myCQ.getProductsWeight(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [PRODUCTS_STATUS] + // - - - - - - - - -/ + protected ConditionValue getCValueProductsStatus() { + return _myCQ.getProductsStatus(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [PRODUCTS_TAX_CLASS_ID] + // - - - - - - - - -/ + protected ConditionValue getCValueProductsTaxClassId() { + return _myCQ.getProductsTaxClassId(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [MANUFACTURERS_ID] + // - - - - - - - - -/ + protected ConditionValue getCValueManufacturersId() { + return _myCQ.getManufacturersId(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [PRODUCTS_ORDERED] + // - - - - - - - - -/ + protected ConditionValue getCValueProductsOrdered() { + return _myCQ.getProductsOrdered(); + } + + +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ciq/ProductsDescriptionCIQ.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ciq/ProductsDescriptionCIQ.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ciq/ProductsDescriptionCIQ.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,118 @@ +package jp.sf.pal.pompei.cbean.cq.ciq; + +import jp.sf.pal.pompei.cbean.cq.bs.*; +import jp.sf.pal.pompei.cbean.cq.*; + +import jp.sf.pal.pompei.allcommon.cbean.*; +import jp.sf.pal.pompei.allcommon.cbean.ckey.*; +import jp.sf.pal.pompei.allcommon.cbean.coption.ConditionOption; +import jp.sf.pal.pompei.allcommon.cbean.cvalue.ConditionValue; +import jp.sf.pal.pompei.allcommon.cbean.sqlclause.SqlClause; + +/** + * The condition-inline-query of PRODUCTS_DESCRIPTION. + * + * @author DBFlute(AutoGenerator) + */ +public class ProductsDescriptionCIQ extends AbstractBsProductsDescriptionCQ { + + // =================================================================================== + // Attribute + // ========= + /** Corresponding condition query. */ + protected BsProductsDescriptionCQ _myCQ; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param childQuery Child query as abstract class. (Nullable: If null, this is base instance.) + * @param sqlClause SQL clause instance. (NotNull) + * @param aliasName My alias name. (NotNull) + * @param nestLevel Nest level. + */ + public ProductsDescriptionCIQ(ConditionQuery childQuery, SqlClause sqlClause, String aliasName, int nestLevel, BsProductsDescriptionCQ myCQ) { + super(childQuery, sqlClause, aliasName, nestLevel); + _myCQ = myCQ; + } + + // =================================================================================== + // Override about Register + // ======================= + protected void reflectRelationOnUnionQuery(ConditionQuery baseQueryAsSuper, ConditionQuery unionQueryAsSuper) { + throw new UnsupportedOperationException("InlineQuery must not need UNION method: " + baseQueryAsSuper + " : " + unionQueryAsSuper); + } + + protected void setupConditionValueAndRegisterWhereClause(ConditionKey key, Object value, ConditionValue cvalue + , String colName, String capPropName, String uncapPropName) { + registerInlineQuery(key, value, cvalue, colName, capPropName, uncapPropName); + } + + protected void setupConditionValueAndRegisterWhereClause(ConditionKey key, Object value, ConditionValue cvalue + , String colName, String capPropName, String uncapPropName, ConditionOption option) { + registerInlineQuery(key, value, cvalue, colName, capPropName, uncapPropName, option); + } + + protected void registerWhereClause(String whereClause) { + registerInlineWhereClause(whereClause); + } + + // =================================================================================== + // Override about Query + // ==================== + // /* * * * * * * * * * * * * * * * * * * * * * * + // MyTable = [PRODUCTS_DESCRIPTION] + // * * * * * * * * */ + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [PRODUCTS_ID] + // - - - - - - - - -/ + protected ConditionValue getCValueProductsId() { + return _myCQ.getProductsId(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [LANGUAGE_ID] + // - - - - - - - - -/ + protected ConditionValue getCValueLanguageId() { + return _myCQ.getLanguageId(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [PRODUCTS_NAME] + // - - - - - - - - -/ + protected ConditionValue getCValueProductsName() { + return _myCQ.getProductsName(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [PRODUCTS_DESCRIPTION] + // - - - - - - - - -/ + protected ConditionValue getCValueProductsDescription() { + return _myCQ.getProductsDescription(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [PRODUCTS_URL] + // - - - - - - - - -/ + protected ConditionValue getCValueProductsUrl() { + return _myCQ.getProductsUrl(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [PRODUCTS_VIEWED] + // - - - - - - - - -/ + protected ConditionValue getCValueProductsViewed() { + return _myCQ.getProductsViewed(); + } + + +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ciq/ProductsNotificationsCIQ.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ciq/ProductsNotificationsCIQ.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ciq/ProductsNotificationsCIQ.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,94 @@ +package jp.sf.pal.pompei.cbean.cq.ciq; + +import jp.sf.pal.pompei.cbean.cq.bs.*; +import jp.sf.pal.pompei.cbean.cq.*; + +import jp.sf.pal.pompei.allcommon.cbean.*; +import jp.sf.pal.pompei.allcommon.cbean.ckey.*; +import jp.sf.pal.pompei.allcommon.cbean.coption.ConditionOption; +import jp.sf.pal.pompei.allcommon.cbean.cvalue.ConditionValue; +import jp.sf.pal.pompei.allcommon.cbean.sqlclause.SqlClause; + +/** + * The condition-inline-query of PRODUCTS_NOTIFICATIONS. + * + * @author DBFlute(AutoGenerator) + */ +public class ProductsNotificationsCIQ extends AbstractBsProductsNotificationsCQ { + + // =================================================================================== + // Attribute + // ========= + /** Corresponding condition query. */ + protected BsProductsNotificationsCQ _myCQ; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param childQuery Child query as abstract class. (Nullable: If null, this is base instance.) + * @param sqlClause SQL clause instance. (NotNull) + * @param aliasName My alias name. (NotNull) + * @param nestLevel Nest level. + */ + public ProductsNotificationsCIQ(ConditionQuery childQuery, SqlClause sqlClause, String aliasName, int nestLevel, BsProductsNotificationsCQ myCQ) { + super(childQuery, sqlClause, aliasName, nestLevel); + _myCQ = myCQ; + } + + // =================================================================================== + // Override about Register + // ======================= + protected void reflectRelationOnUnionQuery(ConditionQuery baseQueryAsSuper, ConditionQuery unionQueryAsSuper) { + throw new UnsupportedOperationException("InlineQuery must not need UNION method: " + baseQueryAsSuper + " : " + unionQueryAsSuper); + } + + protected void setupConditionValueAndRegisterWhereClause(ConditionKey key, Object value, ConditionValue cvalue + , String colName, String capPropName, String uncapPropName) { + registerInlineQuery(key, value, cvalue, colName, capPropName, uncapPropName); + } + + protected void setupConditionValueAndRegisterWhereClause(ConditionKey key, Object value, ConditionValue cvalue + , String colName, String capPropName, String uncapPropName, ConditionOption option) { + registerInlineQuery(key, value, cvalue, colName, capPropName, uncapPropName, option); + } + + protected void registerWhereClause(String whereClause) { + registerInlineWhereClause(whereClause); + } + + // =================================================================================== + // Override about Query + // ==================== + // /* * * * * * * * * * * * * * * * * * * * * * * + // MyTable = [PRODUCTS_NOTIFICATIONS] + // * * * * * * * * */ + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [PRODUCTS_ID] + // - - - - - - - - -/ + protected ConditionValue getCValueProductsId() { + return _myCQ.getProductsId(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [CUSTOMERS_ID] + // - - - - - - - - -/ + protected ConditionValue getCValueCustomersId() { + return _myCQ.getCustomersId(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [DATE_ADDED] + // - - - - - - - - -/ + protected ConditionValue getCValueDateAdded() { + return _myCQ.getDateAdded(); + } + + +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ciq/ProductsOptionsCIQ.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ciq/ProductsOptionsCIQ.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ciq/ProductsOptionsCIQ.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,94 @@ +package jp.sf.pal.pompei.cbean.cq.ciq; + +import jp.sf.pal.pompei.cbean.cq.bs.*; +import jp.sf.pal.pompei.cbean.cq.*; + +import jp.sf.pal.pompei.allcommon.cbean.*; +import jp.sf.pal.pompei.allcommon.cbean.ckey.*; +import jp.sf.pal.pompei.allcommon.cbean.coption.ConditionOption; +import jp.sf.pal.pompei.allcommon.cbean.cvalue.ConditionValue; +import jp.sf.pal.pompei.allcommon.cbean.sqlclause.SqlClause; + +/** + * The condition-inline-query of PRODUCTS_OPTIONS. + * + * @author DBFlute(AutoGenerator) + */ +public class ProductsOptionsCIQ extends AbstractBsProductsOptionsCQ { + + // =================================================================================== + // Attribute + // ========= + /** Corresponding condition query. */ + protected BsProductsOptionsCQ _myCQ; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param childQuery Child query as abstract class. (Nullable: If null, this is base instance.) + * @param sqlClause SQL clause instance. (NotNull) + * @param aliasName My alias name. (NotNull) + * @param nestLevel Nest level. + */ + public ProductsOptionsCIQ(ConditionQuery childQuery, SqlClause sqlClause, String aliasName, int nestLevel, BsProductsOptionsCQ myCQ) { + super(childQuery, sqlClause, aliasName, nestLevel); + _myCQ = myCQ; + } + + // =================================================================================== + // Override about Register + // ======================= + protected void reflectRelationOnUnionQuery(ConditionQuery baseQueryAsSuper, ConditionQuery unionQueryAsSuper) { + throw new UnsupportedOperationException("InlineQuery must not need UNION method: " + baseQueryAsSuper + " : " + unionQueryAsSuper); + } + + protected void setupConditionValueAndRegisterWhereClause(ConditionKey key, Object value, ConditionValue cvalue + , String colName, String capPropName, String uncapPropName) { + registerInlineQuery(key, value, cvalue, colName, capPropName, uncapPropName); + } + + protected void setupConditionValueAndRegisterWhereClause(ConditionKey key, Object value, ConditionValue cvalue + , String colName, String capPropName, String uncapPropName, ConditionOption option) { + registerInlineQuery(key, value, cvalue, colName, capPropName, uncapPropName, option); + } + + protected void registerWhereClause(String whereClause) { + registerInlineWhereClause(whereClause); + } + + // =================================================================================== + // Override about Query + // ==================== + // /* * * * * * * * * * * * * * * * * * * * * * * + // MyTable = [PRODUCTS_OPTIONS] + // * * * * * * * * */ + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [PRODUCTS_OPTIONS_ID] + // - - - - - - - - -/ + protected ConditionValue getCValueProductsOptionsId() { + return _myCQ.getProductsOptionsId(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [LANGUAGE_ID] + // - - - - - - - - -/ + protected ConditionValue getCValueLanguageId() { + return _myCQ.getLanguageId(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [PRODUCTS_OPTIONS_NAME] + // - - - - - - - - -/ + protected ConditionValue getCValueProductsOptionsName() { + return _myCQ.getProductsOptionsName(); + } + + +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ciq/ProductsOptionsValuesCIQ.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ciq/ProductsOptionsValuesCIQ.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ciq/ProductsOptionsValuesCIQ.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,94 @@ +package jp.sf.pal.pompei.cbean.cq.ciq; + +import jp.sf.pal.pompei.cbean.cq.bs.*; +import jp.sf.pal.pompei.cbean.cq.*; + +import jp.sf.pal.pompei.allcommon.cbean.*; +import jp.sf.pal.pompei.allcommon.cbean.ckey.*; +import jp.sf.pal.pompei.allcommon.cbean.coption.ConditionOption; +import jp.sf.pal.pompei.allcommon.cbean.cvalue.ConditionValue; +import jp.sf.pal.pompei.allcommon.cbean.sqlclause.SqlClause; + +/** + * The condition-inline-query of PRODUCTS_OPTIONS_VALUES. + * + * @author DBFlute(AutoGenerator) + */ +public class ProductsOptionsValuesCIQ extends AbstractBsProductsOptionsValuesCQ { + + // =================================================================================== + // Attribute + // ========= + /** Corresponding condition query. */ + protected BsProductsOptionsValuesCQ _myCQ; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param childQuery Child query as abstract class. (Nullable: If null, this is base instance.) + * @param sqlClause SQL clause instance. (NotNull) + * @param aliasName My alias name. (NotNull) + * @param nestLevel Nest level. + */ + public ProductsOptionsValuesCIQ(ConditionQuery childQuery, SqlClause sqlClause, String aliasName, int nestLevel, BsProductsOptionsValuesCQ myCQ) { + super(childQuery, sqlClause, aliasName, nestLevel); + _myCQ = myCQ; + } + + // =================================================================================== + // Override about Register + // ======================= + protected void reflectRelationOnUnionQuery(ConditionQuery baseQueryAsSuper, ConditionQuery unionQueryAsSuper) { + throw new UnsupportedOperationException("InlineQuery must not need UNION method: " + baseQueryAsSuper + " : " + unionQueryAsSuper); + } + + protected void setupConditionValueAndRegisterWhereClause(ConditionKey key, Object value, ConditionValue cvalue + , String colName, String capPropName, String uncapPropName) { + registerInlineQuery(key, value, cvalue, colName, capPropName, uncapPropName); + } + + protected void setupConditionValueAndRegisterWhereClause(ConditionKey key, Object value, ConditionValue cvalue + , String colName, String capPropName, String uncapPropName, ConditionOption option) { + registerInlineQuery(key, value, cvalue, colName, capPropName, uncapPropName, option); + } + + protected void registerWhereClause(String whereClause) { + registerInlineWhereClause(whereClause); + } + + // =================================================================================== + // Override about Query + // ==================== + // /* * * * * * * * * * * * * * * * * * * * * * * + // MyTable = [PRODUCTS_OPTIONS_VALUES] + // * * * * * * * * */ + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [PRODUCTS_OPTIONS_VALUES_ID] + // - - - - - - - - -/ + protected ConditionValue getCValueProductsOptionsValuesId() { + return _myCQ.getProductsOptionsValuesId(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [LANGUAGE_ID] + // - - - - - - - - -/ + protected ConditionValue getCValueLanguageId() { + return _myCQ.getLanguageId(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [PRODUCTS_OPTIONS_VALUES_NAME] + // - - - - - - - - -/ + protected ConditionValue getCValueProductsOptionsValuesName() { + return _myCQ.getProductsOptionsValuesName(); + } + + +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ciq/ProductsOptionsValuesToProductsOptionsCIQ.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ciq/ProductsOptionsValuesToProductsOptionsCIQ.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ciq/ProductsOptionsValuesToProductsOptionsCIQ.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,94 @@ +package jp.sf.pal.pompei.cbean.cq.ciq; + +import jp.sf.pal.pompei.cbean.cq.bs.*; +import jp.sf.pal.pompei.cbean.cq.*; + +import jp.sf.pal.pompei.allcommon.cbean.*; +import jp.sf.pal.pompei.allcommon.cbean.ckey.*; +import jp.sf.pal.pompei.allcommon.cbean.coption.ConditionOption; +import jp.sf.pal.pompei.allcommon.cbean.cvalue.ConditionValue; +import jp.sf.pal.pompei.allcommon.cbean.sqlclause.SqlClause; + +/** + * The condition-inline-query of PRODUCTS_OPTIONS_VALUES_TO_PRODUCTS_OPTIONS. + * + * @author DBFlute(AutoGenerator) + */ +public class ProductsOptionsValuesToProductsOptionsCIQ extends AbstractBsProductsOptionsValuesToProductsOptionsCQ { + + // =================================================================================== + // Attribute + // ========= + /** Corresponding condition query. */ + protected BsProductsOptionsValuesToProductsOptionsCQ _myCQ; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param childQuery Child query as abstract class. (Nullable: If null, this is base instance.) + * @param sqlClause SQL clause instance. (NotNull) + * @param aliasName My alias name. (NotNull) + * @param nestLevel Nest level. + */ + public ProductsOptionsValuesToProductsOptionsCIQ(ConditionQuery childQuery, SqlClause sqlClause, String aliasName, int nestLevel, BsProductsOptionsValuesToProductsOptionsCQ myCQ) { + super(childQuery, sqlClause, aliasName, nestLevel); + _myCQ = myCQ; + } + + // =================================================================================== + // Override about Register + // ======================= + protected void reflectRelationOnUnionQuery(ConditionQuery baseQueryAsSuper, ConditionQuery unionQueryAsSuper) { + throw new UnsupportedOperationException("InlineQuery must not need UNION method: " + baseQueryAsSuper + " : " + unionQueryAsSuper); + } + + protected void setupConditionValueAndRegisterWhereClause(ConditionKey key, Object value, ConditionValue cvalue + , String colName, String capPropName, String uncapPropName) { + registerInlineQuery(key, value, cvalue, colName, capPropName, uncapPropName); + } + + protected void setupConditionValueAndRegisterWhereClause(ConditionKey key, Object value, ConditionValue cvalue + , String colName, String capPropName, String uncapPropName, ConditionOption option) { + registerInlineQuery(key, value, cvalue, colName, capPropName, uncapPropName, option); + } + + protected void registerWhereClause(String whereClause) { + registerInlineWhereClause(whereClause); + } + + // =================================================================================== + // Override about Query + // ==================== + // /* * * * * * * * * * * * * * * * * * * * * * * + // MyTable = [PRODUCTS_OPTIONS_VALUES_TO_PRODUCTS_OPTIONS] + // * * * * * * * * */ + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [PRODUCTS_OPTIONS_VALUES_TO_PRODUCTS_OPTIONS_ID] + // - - - - - - - - -/ + protected ConditionValue getCValueProductsOptionsValuesToProductsOptionsId() { + return _myCQ.getProductsOptionsValuesToProductsOptionsId(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [PRODUCTS_OPTIONS_ID] + // - - - - - - - - -/ + protected ConditionValue getCValueProductsOptionsId() { + return _myCQ.getProductsOptionsId(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [PRODUCTS_OPTIONS_VALUES_ID] + // - - - - - - - - -/ + protected ConditionValue getCValueProductsOptionsValuesId() { + return _myCQ.getProductsOptionsValuesId(); + } + + +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ciq/ProductsToCategoriesCIQ.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ciq/ProductsToCategoriesCIQ.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ciq/ProductsToCategoriesCIQ.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,86 @@ +package jp.sf.pal.pompei.cbean.cq.ciq; + +import jp.sf.pal.pompei.cbean.cq.bs.*; +import jp.sf.pal.pompei.cbean.cq.*; + +import jp.sf.pal.pompei.allcommon.cbean.*; +import jp.sf.pal.pompei.allcommon.cbean.ckey.*; +import jp.sf.pal.pompei.allcommon.cbean.coption.ConditionOption; +import jp.sf.pal.pompei.allcommon.cbean.cvalue.ConditionValue; +import jp.sf.pal.pompei.allcommon.cbean.sqlclause.SqlClause; + +/** + * The condition-inline-query of PRODUCTS_TO_CATEGORIES. + * + * @author DBFlute(AutoGenerator) + */ +public class ProductsToCategoriesCIQ extends AbstractBsProductsToCategoriesCQ { + + // =================================================================================== + // Attribute + // ========= + /** Corresponding condition query. */ + protected BsProductsToCategoriesCQ _myCQ; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param childQuery Child query as abstract class. (Nullable: If null, this is base instance.) + * @param sqlClause SQL clause instance. (NotNull) + * @param aliasName My alias name. (NotNull) + * @param nestLevel Nest level. + */ + public ProductsToCategoriesCIQ(ConditionQuery childQuery, SqlClause sqlClause, String aliasName, int nestLevel, BsProductsToCategoriesCQ myCQ) { + super(childQuery, sqlClause, aliasName, nestLevel); + _myCQ = myCQ; + } + + // =================================================================================== + // Override about Register + // ======================= + protected void reflectRelationOnUnionQuery(ConditionQuery baseQueryAsSuper, ConditionQuery unionQueryAsSuper) { + throw new UnsupportedOperationException("InlineQuery must not need UNION method: " + baseQueryAsSuper + " : " + unionQueryAsSuper); + } + + protected void setupConditionValueAndRegisterWhereClause(ConditionKey key, Object value, ConditionValue cvalue + , String colName, String capPropName, String uncapPropName) { + registerInlineQuery(key, value, cvalue, colName, capPropName, uncapPropName); + } + + protected void setupConditionValueAndRegisterWhereClause(ConditionKey key, Object value, ConditionValue cvalue + , String colName, String capPropName, String uncapPropName, ConditionOption option) { + registerInlineQuery(key, value, cvalue, colName, capPropName, uncapPropName, option); + } + + protected void registerWhereClause(String whereClause) { + registerInlineWhereClause(whereClause); + } + + // =================================================================================== + // Override about Query + // ==================== + // /* * * * * * * * * * * * * * * * * * * * * * * + // MyTable = [PRODUCTS_TO_CATEGORIES] + // * * * * * * * * */ + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [PRODUCTS_ID] + // - - - - - - - - -/ + protected ConditionValue getCValueProductsId() { + return _myCQ.getProductsId(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [CATEGORIES_ID] + // - - - - - - - - -/ + protected ConditionValue getCValueCategoriesId() { + return _myCQ.getCategoriesId(); + } + + +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ciq/ReviewsCIQ.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ciq/ReviewsCIQ.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ciq/ReviewsCIQ.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,134 @@ +package jp.sf.pal.pompei.cbean.cq.ciq; + +import jp.sf.pal.pompei.cbean.cq.bs.*; +import jp.sf.pal.pompei.cbean.cq.*; + +import jp.sf.pal.pompei.allcommon.cbean.*; +import jp.sf.pal.pompei.allcommon.cbean.ckey.*; +import jp.sf.pal.pompei.allcommon.cbean.coption.ConditionOption; +import jp.sf.pal.pompei.allcommon.cbean.cvalue.ConditionValue; +import jp.sf.pal.pompei.allcommon.cbean.sqlclause.SqlClause; + +/** + * The condition-inline-query of REVIEWS. + * + * @author DBFlute(AutoGenerator) + */ +public class ReviewsCIQ extends AbstractBsReviewsCQ { + + // =================================================================================== + // Attribute + // ========= + /** Corresponding condition query. */ + protected BsReviewsCQ _myCQ; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param childQuery Child query as abstract class. (Nullable: If null, this is base instance.) + * @param sqlClause SQL clause instance. (NotNull) + * @param aliasName My alias name. (NotNull) + * @param nestLevel Nest level. + */ + public ReviewsCIQ(ConditionQuery childQuery, SqlClause sqlClause, String aliasName, int nestLevel, BsReviewsCQ myCQ) { + super(childQuery, sqlClause, aliasName, nestLevel); + _myCQ = myCQ; + } + + // =================================================================================== + // Override about Register + // ======================= + protected void reflectRelationOnUnionQuery(ConditionQuery baseQueryAsSuper, ConditionQuery unionQueryAsSuper) { + throw new UnsupportedOperationException("InlineQuery must not need UNION method: " + baseQueryAsSuper + " : " + unionQueryAsSuper); + } + + protected void setupConditionValueAndRegisterWhereClause(ConditionKey key, Object value, ConditionValue cvalue + , String colName, String capPropName, String uncapPropName) { + registerInlineQuery(key, value, cvalue, colName, capPropName, uncapPropName); + } + + protected void setupConditionValueAndRegisterWhereClause(ConditionKey key, Object value, ConditionValue cvalue + , String colName, String capPropName, String uncapPropName, ConditionOption option) { + registerInlineQuery(key, value, cvalue, colName, capPropName, uncapPropName, option); + } + + protected void registerWhereClause(String whereClause) { + registerInlineWhereClause(whereClause); + } + + // =================================================================================== + // Override about Query + // ==================== + // /* * * * * * * * * * * * * * * * * * * * * * * + // MyTable = [REVIEWS] + // * * * * * * * * */ + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [REVIEWS_ID] + // - - - - - - - - -/ + protected ConditionValue getCValueReviewsId() { + return _myCQ.getReviewsId(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [PRODUCTS_ID] + // - - - - - - - - -/ + protected ConditionValue getCValueProductsId() { + return _myCQ.getProductsId(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [CUSTOMERS_ID] + // - - - - - - - - -/ + protected ConditionValue getCValueCustomersId() { + return _myCQ.getCustomersId(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [CUSTOMERS_NAME] + // - - - - - - - - -/ + protected ConditionValue getCValueCustomersName() { + return _myCQ.getCustomersName(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [REVIEWS_RATING] + // - - - - - - - - -/ + protected ConditionValue getCValueReviewsRating() { + return _myCQ.getReviewsRating(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [DATE_ADDED] + // - - - - - - - - -/ + protected ConditionValue getCValueDateAdded() { + return _myCQ.getDateAdded(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [LAST_MODIFIED] + // - - - - - - - - -/ + protected ConditionValue getCValueLastModified() { + return _myCQ.getLastModified(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [REVIEWS_READ] + // - - - - - - - - -/ + protected ConditionValue getCValueReviewsRead() { + return _myCQ.getReviewsRead(); + } + + +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ciq/ReviewsDescriptionCIQ.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ciq/ReviewsDescriptionCIQ.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ciq/ReviewsDescriptionCIQ.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,94 @@ +package jp.sf.pal.pompei.cbean.cq.ciq; + +import jp.sf.pal.pompei.cbean.cq.bs.*; +import jp.sf.pal.pompei.cbean.cq.*; + +import jp.sf.pal.pompei.allcommon.cbean.*; +import jp.sf.pal.pompei.allcommon.cbean.ckey.*; +import jp.sf.pal.pompei.allcommon.cbean.coption.ConditionOption; +import jp.sf.pal.pompei.allcommon.cbean.cvalue.ConditionValue; +import jp.sf.pal.pompei.allcommon.cbean.sqlclause.SqlClause; + +/** + * The condition-inline-query of REVIEWS_DESCRIPTION. + * + * @author DBFlute(AutoGenerator) + */ +public class ReviewsDescriptionCIQ extends AbstractBsReviewsDescriptionCQ { + + // =================================================================================== + // Attribute + // ========= + /** Corresponding condition query. */ + protected BsReviewsDescriptionCQ _myCQ; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param childQuery Child query as abstract class. (Nullable: If null, this is base instance.) + * @param sqlClause SQL clause instance. (NotNull) + * @param aliasName My alias name. (NotNull) + * @param nestLevel Nest level. + */ + public ReviewsDescriptionCIQ(ConditionQuery childQuery, SqlClause sqlClause, String aliasName, int nestLevel, BsReviewsDescriptionCQ myCQ) { + super(childQuery, sqlClause, aliasName, nestLevel); + _myCQ = myCQ; + } + + // =================================================================================== + // Override about Register + // ======================= + protected void reflectRelationOnUnionQuery(ConditionQuery baseQueryAsSuper, ConditionQuery unionQueryAsSuper) { + throw new UnsupportedOperationException("InlineQuery must not need UNION method: " + baseQueryAsSuper + " : " + unionQueryAsSuper); + } + + protected void setupConditionValueAndRegisterWhereClause(ConditionKey key, Object value, ConditionValue cvalue + , String colName, String capPropName, String uncapPropName) { + registerInlineQuery(key, value, cvalue, colName, capPropName, uncapPropName); + } + + protected void setupConditionValueAndRegisterWhereClause(ConditionKey key, Object value, ConditionValue cvalue + , String colName, String capPropName, String uncapPropName, ConditionOption option) { + registerInlineQuery(key, value, cvalue, colName, capPropName, uncapPropName, option); + } + + protected void registerWhereClause(String whereClause) { + registerInlineWhereClause(whereClause); + } + + // =================================================================================== + // Override about Query + // ==================== + // /* * * * * * * * * * * * * * * * * * * * * * * + // MyTable = [REVIEWS_DESCRIPTION] + // * * * * * * * * */ + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [REVIEWS_ID] + // - - - - - - - - -/ + protected ConditionValue getCValueReviewsId() { + return _myCQ.getReviewsId(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [LANGUAGES_ID] + // - - - - - - - - -/ + protected ConditionValue getCValueLanguagesId() { + return _myCQ.getLanguagesId(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [REVIEWS_TEXT] + // - - - - - - - - -/ + protected ConditionValue getCValueReviewsText() { + return _myCQ.getReviewsText(); + } + + +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ciq/SessionsCIQ.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ciq/SessionsCIQ.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ciq/SessionsCIQ.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,94 @@ +package jp.sf.pal.pompei.cbean.cq.ciq; + +import jp.sf.pal.pompei.cbean.cq.bs.*; +import jp.sf.pal.pompei.cbean.cq.*; + +import jp.sf.pal.pompei.allcommon.cbean.*; +import jp.sf.pal.pompei.allcommon.cbean.ckey.*; +import jp.sf.pal.pompei.allcommon.cbean.coption.ConditionOption; +import jp.sf.pal.pompei.allcommon.cbean.cvalue.ConditionValue; +import jp.sf.pal.pompei.allcommon.cbean.sqlclause.SqlClause; + +/** + * The condition-inline-query of SESSIONS. + * + * @author DBFlute(AutoGenerator) + */ +public class SessionsCIQ extends AbstractBsSessionsCQ { + + // =================================================================================== + // Attribute + // ========= + /** Corresponding condition query. */ + protected BsSessionsCQ _myCQ; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param childQuery Child query as abstract class. (Nullable: If null, this is base instance.) + * @param sqlClause SQL clause instance. (NotNull) + * @param aliasName My alias name. (NotNull) + * @param nestLevel Nest level. + */ + public SessionsCIQ(ConditionQuery childQuery, SqlClause sqlClause, String aliasName, int nestLevel, BsSessionsCQ myCQ) { + super(childQuery, sqlClause, aliasName, nestLevel); + _myCQ = myCQ; + } + + // =================================================================================== + // Override about Register + // ======================= + protected void reflectRelationOnUnionQuery(ConditionQuery baseQueryAsSuper, ConditionQuery unionQueryAsSuper) { + throw new UnsupportedOperationException("InlineQuery must not need UNION method: " + baseQueryAsSuper + " : " + unionQueryAsSuper); + } + + protected void setupConditionValueAndRegisterWhereClause(ConditionKey key, Object value, ConditionValue cvalue + , String colName, String capPropName, String uncapPropName) { + registerInlineQuery(key, value, cvalue, colName, capPropName, uncapPropName); + } + + protected void setupConditionValueAndRegisterWhereClause(ConditionKey key, Object value, ConditionValue cvalue + , String colName, String capPropName, String uncapPropName, ConditionOption option) { + registerInlineQuery(key, value, cvalue, colName, capPropName, uncapPropName, option); + } + + protected void registerWhereClause(String whereClause) { + registerInlineWhereClause(whereClause); + } + + // =================================================================================== + // Override about Query + // ==================== + // /* * * * * * * * * * * * * * * * * * * * * * * + // MyTable = [SESSIONS] + // * * * * * * * * */ + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [SESSKEY] + // - - - - - - - - -/ + protected ConditionValue getCValueSesskey() { + return _myCQ.getSesskey(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [EXPIRY] + // - - - - - - - - -/ + protected ConditionValue getCValueExpiry() { + return _myCQ.getExpiry(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [VALUE] + // - - - - - - - - -/ + protected ConditionValue getCValueValue() { + return _myCQ.getValue(); + } + + +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ciq/SpecialsCIQ.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ciq/SpecialsCIQ.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ciq/SpecialsCIQ.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,134 @@ +package jp.sf.pal.pompei.cbean.cq.ciq; + +import jp.sf.pal.pompei.cbean.cq.bs.*; +import jp.sf.pal.pompei.cbean.cq.*; + +import jp.sf.pal.pompei.allcommon.cbean.*; +import jp.sf.pal.pompei.allcommon.cbean.ckey.*; +import jp.sf.pal.pompei.allcommon.cbean.coption.ConditionOption; +import jp.sf.pal.pompei.allcommon.cbean.cvalue.ConditionValue; +import jp.sf.pal.pompei.allcommon.cbean.sqlclause.SqlClause; + +/** + * The condition-inline-query of SPECIALS. + * + * @author DBFlute(AutoGenerator) + */ +public class SpecialsCIQ extends AbstractBsSpecialsCQ { + + // =================================================================================== + // Attribute + // ========= + /** Corresponding condition query. */ + protected BsSpecialsCQ _myCQ; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param childQuery Child query as abstract class. (Nullable: If null, this is base instance.) + * @param sqlClause SQL clause instance. (NotNull) + * @param aliasName My alias name. (NotNull) + * @param nestLevel Nest level. + */ + public SpecialsCIQ(ConditionQuery childQuery, SqlClause sqlClause, String aliasName, int nestLevel, BsSpecialsCQ myCQ) { + super(childQuery, sqlClause, aliasName, nestLevel); + _myCQ = myCQ; + } + + // =================================================================================== + // Override about Register + // ======================= + protected void reflectRelationOnUnionQuery(ConditionQuery baseQueryAsSuper, ConditionQuery unionQueryAsSuper) { + throw new UnsupportedOperationException("InlineQuery must not need UNION method: " + baseQueryAsSuper + " : " + unionQueryAsSuper); + } + + protected void setupConditionValueAndRegisterWhereClause(ConditionKey key, Object value, ConditionValue cvalue + , String colName, String capPropName, String uncapPropName) { + registerInlineQuery(key, value, cvalue, colName, capPropName, uncapPropName); + } + + protected void setupConditionValueAndRegisterWhereClause(ConditionKey key, Object value, ConditionValue cvalue + , String colName, String capPropName, String uncapPropName, ConditionOption option) { + registerInlineQuery(key, value, cvalue, colName, capPropName, uncapPropName, option); + } + + protected void registerWhereClause(String whereClause) { + registerInlineWhereClause(whereClause); + } + + // =================================================================================== + // Override about Query + // ==================== + // /* * * * * * * * * * * * * * * * * * * * * * * + // MyTable = [SPECIALS] + // * * * * * * * * */ + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [SPECIALS_ID] + // - - - - - - - - -/ + protected ConditionValue getCValueSpecialsId() { + return _myCQ.getSpecialsId(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [PRODUCTS_ID] + // - - - - - - - - -/ + protected ConditionValue getCValueProductsId() { + return _myCQ.getProductsId(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [SPECIALS_NEW_PRODUCTS_PRICE] + // - - - - - - - - -/ + protected ConditionValue getCValueSpecialsNewProductsPrice() { + return _myCQ.getSpecialsNewProductsPrice(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [SPECIALS_DATE_ADDED] + // - - - - - - - - -/ + protected ConditionValue getCValueSpecialsDateAdded() { + return _myCQ.getSpecialsDateAdded(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [SPECIALS_LAST_MODIFIED] + // - - - - - - - - -/ + protected ConditionValue getCValueSpecialsLastModified() { + return _myCQ.getSpecialsLastModified(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [EXPIRES_DATE] + // - - - - - - - - -/ + protected ConditionValue getCValueExpiresDate() { + return _myCQ.getExpiresDate(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [DATE_STATUS_CHANGE] + // - - - - - - - - -/ + protected ConditionValue getCValueDateStatusChange() { + return _myCQ.getDateStatusChange(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [STATUS] + // - - - - - - - - -/ + protected ConditionValue getCValueStatus() { + return _myCQ.getStatus(); + } + + +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ciq/TaxClassCIQ.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ciq/TaxClassCIQ.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ciq/TaxClassCIQ.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,110 @@ +package jp.sf.pal.pompei.cbean.cq.ciq; + +import jp.sf.pal.pompei.cbean.cq.bs.*; +import jp.sf.pal.pompei.cbean.cq.*; + +import jp.sf.pal.pompei.allcommon.cbean.*; +import jp.sf.pal.pompei.allcommon.cbean.ckey.*; +import jp.sf.pal.pompei.allcommon.cbean.coption.ConditionOption; +import jp.sf.pal.pompei.allcommon.cbean.cvalue.ConditionValue; +import jp.sf.pal.pompei.allcommon.cbean.sqlclause.SqlClause; + +/** + * The condition-inline-query of TAX_CLASS. + * + * @author DBFlute(AutoGenerator) + */ +public class TaxClassCIQ extends AbstractBsTaxClassCQ { + + // =================================================================================== + // Attribute + // ========= + /** Corresponding condition query. */ + protected BsTaxClassCQ _myCQ; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param childQuery Child query as abstract class. (Nullable: If null, this is base instance.) + * @param sqlClause SQL clause instance. (NotNull) + * @param aliasName My alias name. (NotNull) + * @param nestLevel Nest level. + */ + public TaxClassCIQ(ConditionQuery childQuery, SqlClause sqlClause, String aliasName, int nestLevel, BsTaxClassCQ myCQ) { + super(childQuery, sqlClause, aliasName, nestLevel); + _myCQ = myCQ; + } + + // =================================================================================== + // Override about Register + // ======================= + protected void reflectRelationOnUnionQuery(ConditionQuery baseQueryAsSuper, ConditionQuery unionQueryAsSuper) { + throw new UnsupportedOperationException("InlineQuery must not need UNION method: " + baseQueryAsSuper + " : " + unionQueryAsSuper); + } + + protected void setupConditionValueAndRegisterWhereClause(ConditionKey key, Object value, ConditionValue cvalue + , String colName, String capPropName, String uncapPropName) { + registerInlineQuery(key, value, cvalue, colName, capPropName, uncapPropName); + } + + protected void setupConditionValueAndRegisterWhereClause(ConditionKey key, Object value, ConditionValue cvalue + , String colName, String capPropName, String uncapPropName, ConditionOption option) { + registerInlineQuery(key, value, cvalue, colName, capPropName, uncapPropName, option); + } + + protected void registerWhereClause(String whereClause) { + registerInlineWhereClause(whereClause); + } + + // =================================================================================== + // Override about Query + // ==================== + // /* * * * * * * * * * * * * * * * * * * * * * * + // MyTable = [TAX_CLASS] + // * * * * * * * * */ + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [TAX_CLASS_ID] + // - - - - - - - - -/ + protected ConditionValue getCValueTaxClassId() { + return _myCQ.getTaxClassId(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [TAX_CLASS_TITLE] + // - - - - - - - - -/ + protected ConditionValue getCValueTaxClassTitle() { + return _myCQ.getTaxClassTitle(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [TAX_CLASS_DESCRIPTION] + // - - - - - - - - -/ + protected ConditionValue getCValueTaxClassDescription() { + return _myCQ.getTaxClassDescription(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [LAST_MODIFIED] + // - - - - - - - - -/ + protected ConditionValue getCValueLastModified() { + return _myCQ.getLastModified(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [DATE_ADDED] + // - - - - - - - - -/ + protected ConditionValue getCValueDateAdded() { + return _myCQ.getDateAdded(); + } + + +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ciq/TaxRatesCIQ.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ciq/TaxRatesCIQ.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ciq/TaxRatesCIQ.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,134 @@ +package jp.sf.pal.pompei.cbean.cq.ciq; + +import jp.sf.pal.pompei.cbean.cq.bs.*; +import jp.sf.pal.pompei.cbean.cq.*; + +import jp.sf.pal.pompei.allcommon.cbean.*; +import jp.sf.pal.pompei.allcommon.cbean.ckey.*; +import jp.sf.pal.pompei.allcommon.cbean.coption.ConditionOption; +import jp.sf.pal.pompei.allcommon.cbean.cvalue.ConditionValue; +import jp.sf.pal.pompei.allcommon.cbean.sqlclause.SqlClause; + +/** + * The condition-inline-query of TAX_RATES. + * + * @author DBFlute(AutoGenerator) + */ +public class TaxRatesCIQ extends AbstractBsTaxRatesCQ { + + // =================================================================================== + // Attribute + // ========= + /** Corresponding condition query. */ + protected BsTaxRatesCQ _myCQ; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param childQuery Child query as abstract class. (Nullable: If null, this is base instance.) + * @param sqlClause SQL clause instance. (NotNull) + * @param aliasName My alias name. (NotNull) + * @param nestLevel Nest level. + */ + public TaxRatesCIQ(ConditionQuery childQuery, SqlClause sqlClause, String aliasName, int nestLevel, BsTaxRatesCQ myCQ) { + super(childQuery, sqlClause, aliasName, nestLevel); + _myCQ = myCQ; + } + + // =================================================================================== + // Override about Register + // ======================= + protected void reflectRelationOnUnionQuery(ConditionQuery baseQueryAsSuper, ConditionQuery unionQueryAsSuper) { + throw new UnsupportedOperationException("InlineQuery must not need UNION method: " + baseQueryAsSuper + " : " + unionQueryAsSuper); + } + + protected void setupConditionValueAndRegisterWhereClause(ConditionKey key, Object value, ConditionValue cvalue + , String colName, String capPropName, String uncapPropName) { + registerInlineQuery(key, value, cvalue, colName, capPropName, uncapPropName); + } + + protected void setupConditionValueAndRegisterWhereClause(ConditionKey key, Object value, ConditionValue cvalue + , String colName, String capPropName, String uncapPropName, ConditionOption option) { + registerInlineQuery(key, value, cvalue, colName, capPropName, uncapPropName, option); + } + + protected void registerWhereClause(String whereClause) { + registerInlineWhereClause(whereClause); + } + + // =================================================================================== + // Override about Query + // ==================== + // /* * * * * * * * * * * * * * * * * * * * * * * + // MyTable = [TAX_RATES] + // * * * * * * * * */ + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [TAX_RATES_ID] + // - - - - - - - - -/ + protected ConditionValue getCValueTaxRatesId() { + return _myCQ.getTaxRatesId(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [TAX_ZONE_ID] + // - - - - - - - - -/ + protected ConditionValue getCValueTaxZoneId() { + return _myCQ.getTaxZoneId(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [TAX_CLASS_ID] + // - - - - - - - - -/ + protected ConditionValue getCValueTaxClassId() { + return _myCQ.getTaxClassId(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [TAX_PRIORITY] + // - - - - - - - - -/ + protected ConditionValue getCValueTaxPriority() { + return _myCQ.getTaxPriority(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [TAX_RATE] + // - - - - - - - - -/ + protected ConditionValue getCValueTaxRate() { + return _myCQ.getTaxRate(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [TAX_DESCRIPTION] + // - - - - - - - - -/ + protected ConditionValue getCValueTaxDescription() { + return _myCQ.getTaxDescription(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [LAST_MODIFIED] + // - - - - - - - - -/ + protected ConditionValue getCValueLastModified() { + return _myCQ.getLastModified(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [DATE_ADDED] + // - - - - - - - - -/ + protected ConditionValue getCValueDateAdded() { + return _myCQ.getDateAdded(); + } + + +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ciq/WhosOnlineCIQ.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ciq/WhosOnlineCIQ.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ciq/WhosOnlineCIQ.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,126 @@ +package jp.sf.pal.pompei.cbean.cq.ciq; + +import jp.sf.pal.pompei.cbean.cq.bs.*; +import jp.sf.pal.pompei.cbean.cq.*; + +import jp.sf.pal.pompei.allcommon.cbean.*; +import jp.sf.pal.pompei.allcommon.cbean.ckey.*; +import jp.sf.pal.pompei.allcommon.cbean.coption.ConditionOption; +import jp.sf.pal.pompei.allcommon.cbean.cvalue.ConditionValue; +import jp.sf.pal.pompei.allcommon.cbean.sqlclause.SqlClause; + +/** + * The condition-inline-query of WHOS_ONLINE. + * + * @author DBFlute(AutoGenerator) + */ +public class WhosOnlineCIQ extends AbstractBsWhosOnlineCQ { + + // =================================================================================== + // Attribute + // ========= + /** Corresponding condition query. */ + protected BsWhosOnlineCQ _myCQ; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param childQuery Child query as abstract class. (Nullable: If null, this is base instance.) + * @param sqlClause SQL clause instance. (NotNull) + * @param aliasName My alias name. (NotNull) + * @param nestLevel Nest level. + */ + public WhosOnlineCIQ(ConditionQuery childQuery, SqlClause sqlClause, String aliasName, int nestLevel, BsWhosOnlineCQ myCQ) { + super(childQuery, sqlClause, aliasName, nestLevel); + _myCQ = myCQ; + } + + // =================================================================================== + // Override about Register + // ======================= + protected void reflectRelationOnUnionQuery(ConditionQuery baseQueryAsSuper, ConditionQuery unionQueryAsSuper) { + throw new UnsupportedOperationException("InlineQuery must not need UNION method: " + baseQueryAsSuper + " : " + unionQueryAsSuper); + } + + protected void setupConditionValueAndRegisterWhereClause(ConditionKey key, Object value, ConditionValue cvalue + , String colName, String capPropName, String uncapPropName) { + registerInlineQuery(key, value, cvalue, colName, capPropName, uncapPropName); + } + + protected void setupConditionValueAndRegisterWhereClause(ConditionKey key, Object value, ConditionValue cvalue + , String colName, String capPropName, String uncapPropName, ConditionOption option) { + registerInlineQuery(key, value, cvalue, colName, capPropName, uncapPropName, option); + } + + protected void registerWhereClause(String whereClause) { + registerInlineWhereClause(whereClause); + } + + // =================================================================================== + // Override about Query + // ==================== + // /* * * * * * * * * * * * * * * * * * * * * * * + // MyTable = [WHOS_ONLINE] + // * * * * * * * * */ + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [CUSTOMER_ID] + // - - - - - - - - -/ + protected ConditionValue getCValueCustomerId() { + return _myCQ.getCustomerId(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [FULL_NAME] + // - - - - - - - - -/ + protected ConditionValue getCValueFullName() { + return _myCQ.getFullName(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [SESSION_ID] + // - - - - - - - - -/ + protected ConditionValue getCValueSessionId() { + return _myCQ.getSessionId(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [IP_ADDRESS] + // - - - - - - - - -/ + protected ConditionValue getCValueIpAddress() { + return _myCQ.getIpAddress(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [TIME_ENTRY] + // - - - - - - - - -/ + protected ConditionValue getCValueTimeEntry() { + return _myCQ.getTimeEntry(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [TIME_LAST_CLICK] + // - - - - - - - - -/ + protected ConditionValue getCValueTimeLastClick() { + return _myCQ.getTimeLastClick(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [LAST_PAGE_URL] + // - - - - - - - - -/ + protected ConditionValue getCValueLastPageUrl() { + return _myCQ.getLastPageUrl(); + } + + +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ciq/ZonesCIQ.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ciq/ZonesCIQ.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ciq/ZonesCIQ.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,102 @@ +package jp.sf.pal.pompei.cbean.cq.ciq; + +import jp.sf.pal.pompei.cbean.cq.bs.*; +import jp.sf.pal.pompei.cbean.cq.*; + +import jp.sf.pal.pompei.allcommon.cbean.*; +import jp.sf.pal.pompei.allcommon.cbean.ckey.*; +import jp.sf.pal.pompei.allcommon.cbean.coption.ConditionOption; +import jp.sf.pal.pompei.allcommon.cbean.cvalue.ConditionValue; +import jp.sf.pal.pompei.allcommon.cbean.sqlclause.SqlClause; + +/** + * The condition-inline-query of ZONES. + * + * @author DBFlute(AutoGenerator) + */ +public class ZonesCIQ extends AbstractBsZonesCQ { + + // =================================================================================== + // Attribute + // ========= + /** Corresponding condition query. */ + protected BsZonesCQ _myCQ; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param childQuery Child query as abstract class. (Nullable: If null, this is base instance.) + * @param sqlClause SQL clause instance. (NotNull) + * @param aliasName My alias name. (NotNull) + * @param nestLevel Nest level. + */ + public ZonesCIQ(ConditionQuery childQuery, SqlClause sqlClause, String aliasName, int nestLevel, BsZonesCQ myCQ) { + super(childQuery, sqlClause, aliasName, nestLevel); + _myCQ = myCQ; + } + + // =================================================================================== + // Override about Register + // ======================= + protected void reflectRelationOnUnionQuery(ConditionQuery baseQueryAsSuper, ConditionQuery unionQueryAsSuper) { + throw new UnsupportedOperationException("InlineQuery must not need UNION method: " + baseQueryAsSuper + " : " + unionQueryAsSuper); + } + + protected void setupConditionValueAndRegisterWhereClause(ConditionKey key, Object value, ConditionValue cvalue + , String colName, String capPropName, String uncapPropName) { + registerInlineQuery(key, value, cvalue, colName, capPropName, uncapPropName); + } + + protected void setupConditionValueAndRegisterWhereClause(ConditionKey key, Object value, ConditionValue cvalue + , String colName, String capPropName, String uncapPropName, ConditionOption option) { + registerInlineQuery(key, value, cvalue, colName, capPropName, uncapPropName, option); + } + + protected void registerWhereClause(String whereClause) { + registerInlineWhereClause(whereClause); + } + + // =================================================================================== + // Override about Query + // ==================== + // /* * * * * * * * * * * * * * * * * * * * * * * + // MyTable = [ZONES] + // * * * * * * * * */ + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [ZONE_ID] + // - - - - - - - - -/ + protected ConditionValue getCValueZoneId() { + return _myCQ.getZoneId(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [ZONE_COUNTRY_ID] + // - - - - - - - - -/ + protected ConditionValue getCValueZoneCountryId() { + return _myCQ.getZoneCountryId(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [ZONE_CODE] + // - - - - - - - - -/ + protected ConditionValue getCValueZoneCode() { + return _myCQ.getZoneCode(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [ZONE_NAME] + // - - - - - - - - -/ + protected ConditionValue getCValueZoneName() { + return _myCQ.getZoneName(); + } + + +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ciq/ZonesToGeoZonesCIQ.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ciq/ZonesToGeoZonesCIQ.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/cq/ciq/ZonesToGeoZonesCIQ.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,118 @@ +package jp.sf.pal.pompei.cbean.cq.ciq; + +import jp.sf.pal.pompei.cbean.cq.bs.*; +import jp.sf.pal.pompei.cbean.cq.*; + +import jp.sf.pal.pompei.allcommon.cbean.*; +import jp.sf.pal.pompei.allcommon.cbean.ckey.*; +import jp.sf.pal.pompei.allcommon.cbean.coption.ConditionOption; +import jp.sf.pal.pompei.allcommon.cbean.cvalue.ConditionValue; +import jp.sf.pal.pompei.allcommon.cbean.sqlclause.SqlClause; + +/** + * The condition-inline-query of ZONES_TO_GEO_ZONES. + * + * @author DBFlute(AutoGenerator) + */ +public class ZonesToGeoZonesCIQ extends AbstractBsZonesToGeoZonesCQ { + + // =================================================================================== + // Attribute + // ========= + /** Corresponding condition query. */ + protected BsZonesToGeoZonesCQ _myCQ; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param childQuery Child query as abstract class. (Nullable: If null, this is base instance.) + * @param sqlClause SQL clause instance. (NotNull) + * @param aliasName My alias name. (NotNull) + * @param nestLevel Nest level. + */ + public ZonesToGeoZonesCIQ(ConditionQuery childQuery, SqlClause sqlClause, String aliasName, int nestLevel, BsZonesToGeoZonesCQ myCQ) { + super(childQuery, sqlClause, aliasName, nestLevel); + _myCQ = myCQ; + } + + // =================================================================================== + // Override about Register + // ======================= + protected void reflectRelationOnUnionQuery(ConditionQuery baseQueryAsSuper, ConditionQuery unionQueryAsSuper) { + throw new UnsupportedOperationException("InlineQuery must not need UNION method: " + baseQueryAsSuper + " : " + unionQueryAsSuper); + } + + protected void setupConditionValueAndRegisterWhereClause(ConditionKey key, Object value, ConditionValue cvalue + , String colName, String capPropName, String uncapPropName) { + registerInlineQuery(key, value, cvalue, colName, capPropName, uncapPropName); + } + + protected void setupConditionValueAndRegisterWhereClause(ConditionKey key, Object value, ConditionValue cvalue + , String colName, String capPropName, String uncapPropName, ConditionOption option) { + registerInlineQuery(key, value, cvalue, colName, capPropName, uncapPropName, option); + } + + protected void registerWhereClause(String whereClause) { + registerInlineWhereClause(whereClause); + } + + // =================================================================================== + // Override about Query + // ==================== + // /* * * * * * * * * * * * * * * * * * * * * * * + // MyTable = [ZONES_TO_GEO_ZONES] + // * * * * * * * * */ + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [ASSOCIATION_ID] + // - - - - - - - - -/ + protected ConditionValue getCValueAssociationId() { + return _myCQ.getAssociationId(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [ZONE_COUNTRY_ID] + // - - - - - - - - -/ + protected ConditionValue getCValueZoneCountryId() { + return _myCQ.getZoneCountryId(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [ZONE_ID] + // - - - - - - - - -/ + protected ConditionValue getCValueZoneId() { + return _myCQ.getZoneId(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [GEO_ZONE_ID] + // - - - - - - - - -/ + protected ConditionValue getCValueGeoZoneId() { + return _myCQ.getGeoZoneId(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [LAST_MODIFIED] + // - - - - - - - - -/ + protected ConditionValue getCValueLastModified() { + return _myCQ.getLastModified(); + } + + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [DATE_ADDED] + // - - - - - - - - -/ + protected ConditionValue getCValueDateAdded() { + return _myCQ.getDateAdded(); + } + + +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/nss/AddressBookNss.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/nss/AddressBookNss.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/nss/AddressBookNss.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,64 @@ +package jp.sf.pal.pompei.cbean.nss; + + +import jp.sf.pal.pompei.cbean.cq.AddressBookCQ; + + +/** + * The nest select setupper of ADDRESS_BOOK. + * + * @author DBFlute(AutoGenerator) + */ +public class AddressBookNss { + + // =================================================================================== + // Attribute + // ========= + /** Base query. */ + protected AddressBookCQ _query; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param query Base query. (NotNull) + */ + public AddressBookNss(AddressBookCQ query) { + _query = query; + } + + // =================================================================================== + // Accessor + // ======== + /** + * @deprecated This method is INTERNAL! Please use cb.query().queryXxx().setXxx_Equal()... + */ + public AddressBookCQ query() { + return _query; + } + + /** + * Has condition query? + * + * @return Determination. + */ + public boolean hasConditionQuery() { + return _query != null; + } + + // =================================================================================== + // With... + // ======= + + // =================================================================================== + // Helper + // ====== + protected void assertConditionQuery() { + if (!hasConditionQuery()) { + String msg = "The query should not be null."; + throw new IllegalStateException(msg); + } + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/nss/AddressFormatNss.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/nss/AddressFormatNss.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/nss/AddressFormatNss.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,64 @@ +package jp.sf.pal.pompei.cbean.nss; + + +import jp.sf.pal.pompei.cbean.cq.AddressFormatCQ; + + +/** + * The nest select setupper of ADDRESS_FORMAT. + * + * @author DBFlute(AutoGenerator) + */ +public class AddressFormatNss { + + // =================================================================================== + // Attribute + // ========= + /** Base query. */ + protected AddressFormatCQ _query; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param query Base query. (NotNull) + */ + public AddressFormatNss(AddressFormatCQ query) { + _query = query; + } + + // =================================================================================== + // Accessor + // ======== + /** + * @deprecated This method is INTERNAL! Please use cb.query().queryXxx().setXxx_Equal()... + */ + public AddressFormatCQ query() { + return _query; + } + + /** + * Has condition query? + * + * @return Determination. + */ + public boolean hasConditionQuery() { + return _query != null; + } + + // =================================================================================== + // With... + // ======= + + // =================================================================================== + // Helper + // ====== + protected void assertConditionQuery() { + if (!hasConditionQuery()) { + String msg = "The query should not be null."; + throw new IllegalStateException(msg); + } + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/nss/BannersHistoryNss.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/nss/BannersHistoryNss.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/nss/BannersHistoryNss.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,64 @@ +package jp.sf.pal.pompei.cbean.nss; + + +import jp.sf.pal.pompei.cbean.cq.BannersHistoryCQ; + + +/** + * The nest select setupper of BANNERS_HISTORY. + * + * @author DBFlute(AutoGenerator) + */ +public class BannersHistoryNss { + + // =================================================================================== + // Attribute + // ========= + /** Base query. */ + protected BannersHistoryCQ _query; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param query Base query. (NotNull) + */ + public BannersHistoryNss(BannersHistoryCQ query) { + _query = query; + } + + // =================================================================================== + // Accessor + // ======== + /** + * @deprecated This method is INTERNAL! Please use cb.query().queryXxx().setXxx_Equal()... + */ + public BannersHistoryCQ query() { + return _query; + } + + /** + * Has condition query? + * + * @return Determination. + */ + public boolean hasConditionQuery() { + return _query != null; + } + + // =================================================================================== + // With... + // ======= + + // =================================================================================== + // Helper + // ====== + protected void assertConditionQuery() { + if (!hasConditionQuery()) { + String msg = "The query should not be null."; + throw new IllegalStateException(msg); + } + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/nss/BannersNss.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/nss/BannersNss.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/nss/BannersNss.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,64 @@ +package jp.sf.pal.pompei.cbean.nss; + + +import jp.sf.pal.pompei.cbean.cq.BannersCQ; + + +/** + * The nest select setupper of BANNERS. + * + * @author DBFlute(AutoGenerator) + */ +public class BannersNss { + + // =================================================================================== + // Attribute + // ========= + /** Base query. */ + protected BannersCQ _query; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param query Base query. (NotNull) + */ + public BannersNss(BannersCQ query) { + _query = query; + } + + // =================================================================================== + // Accessor + // ======== + /** + * @deprecated This method is INTERNAL! Please use cb.query().queryXxx().setXxx_Equal()... + */ + public BannersCQ query() { + return _query; + } + + /** + * Has condition query? + * + * @return Determination. + */ + public boolean hasConditionQuery() { + return _query != null; + } + + // =================================================================================== + // With... + // ======= + + // =================================================================================== + // Helper + // ====== + protected void assertConditionQuery() { + if (!hasConditionQuery()) { + String msg = "The query should not be null."; + throw new IllegalStateException(msg); + } + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/nss/CategoriesDescriptionNss.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/nss/CategoriesDescriptionNss.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/nss/CategoriesDescriptionNss.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,64 @@ +package jp.sf.pal.pompei.cbean.nss; + + +import jp.sf.pal.pompei.cbean.cq.CategoriesDescriptionCQ; + + +/** + * The nest select setupper of CATEGORIES_DESCRIPTION. + * + * @author DBFlute(AutoGenerator) + */ +public class CategoriesDescriptionNss { + + // =================================================================================== + // Attribute + // ========= + /** Base query. */ + protected CategoriesDescriptionCQ _query; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param query Base query. (NotNull) + */ + public CategoriesDescriptionNss(CategoriesDescriptionCQ query) { + _query = query; + } + + // =================================================================================== + // Accessor + // ======== + /** + * @deprecated This method is INTERNAL! Please use cb.query().queryXxx().setXxx_Equal()... + */ + public CategoriesDescriptionCQ query() { + return _query; + } + + /** + * Has condition query? + * + * @return Determination. + */ + public boolean hasConditionQuery() { + return _query != null; + } + + // =================================================================================== + // With... + // ======= + + // =================================================================================== + // Helper + // ====== + protected void assertConditionQuery() { + if (!hasConditionQuery()) { + String msg = "The query should not be null."; + throw new IllegalStateException(msg); + } + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/nss/CategoriesNss.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/nss/CategoriesNss.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/nss/CategoriesNss.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,64 @@ +package jp.sf.pal.pompei.cbean.nss; + + +import jp.sf.pal.pompei.cbean.cq.CategoriesCQ; + + +/** + * The nest select setupper of CATEGORIES. + * + * @author DBFlute(AutoGenerator) + */ +public class CategoriesNss { + + // =================================================================================== + // Attribute + // ========= + /** Base query. */ + protected CategoriesCQ _query; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param query Base query. (NotNull) + */ + public CategoriesNss(CategoriesCQ query) { + _query = query; + } + + // =================================================================================== + // Accessor + // ======== + /** + * @deprecated This method is INTERNAL! Please use cb.query().queryXxx().setXxx_Equal()... + */ + public CategoriesCQ query() { + return _query; + } + + /** + * Has condition query? + * + * @return Determination. + */ + public boolean hasConditionQuery() { + return _query != null; + } + + // =================================================================================== + // With... + // ======= + + // =================================================================================== + // Helper + // ====== + protected void assertConditionQuery() { + if (!hasConditionQuery()) { + String msg = "The query should not be null."; + throw new IllegalStateException(msg); + } + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/nss/ConfigurationGroupNss.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/nss/ConfigurationGroupNss.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/nss/ConfigurationGroupNss.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,64 @@ +package jp.sf.pal.pompei.cbean.nss; + + +import jp.sf.pal.pompei.cbean.cq.ConfigurationGroupCQ; + + +/** + * The nest select setupper of CONFIGURATION_GROUP. + * + * @author DBFlute(AutoGenerator) + */ +public class ConfigurationGroupNss { + + // =================================================================================== + // Attribute + // ========= + /** Base query. */ + protected ConfigurationGroupCQ _query; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param query Base query. (NotNull) + */ + public ConfigurationGroupNss(ConfigurationGroupCQ query) { + _query = query; + } + + // =================================================================================== + // Accessor + // ======== + /** + * @deprecated This method is INTERNAL! Please use cb.query().queryXxx().setXxx_Equal()... + */ + public ConfigurationGroupCQ query() { + return _query; + } + + /** + * Has condition query? + * + * @return Determination. + */ + public boolean hasConditionQuery() { + return _query != null; + } + + // =================================================================================== + // With... + // ======= + + // =================================================================================== + // Helper + // ====== + protected void assertConditionQuery() { + if (!hasConditionQuery()) { + String msg = "The query should not be null."; + throw new IllegalStateException(msg); + } + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/nss/ConfigurationNss.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/nss/ConfigurationNss.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/nss/ConfigurationNss.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,64 @@ +package jp.sf.pal.pompei.cbean.nss; + + +import jp.sf.pal.pompei.cbean.cq.ConfigurationCQ; + + +/** + * The nest select setupper of CONFIGURATION. + * + * @author DBFlute(AutoGenerator) + */ +public class ConfigurationNss { + + // =================================================================================== + // Attribute + // ========= + /** Base query. */ + protected ConfigurationCQ _query; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param query Base query. (NotNull) + */ + public ConfigurationNss(ConfigurationCQ query) { + _query = query; + } + + // =================================================================================== + // Accessor + // ======== + /** + * @deprecated This method is INTERNAL! Please use cb.query().queryXxx().setXxx_Equal()... + */ + public ConfigurationCQ query() { + return _query; + } + + /** + * Has condition query? + * + * @return Determination. + */ + public boolean hasConditionQuery() { + return _query != null; + } + + // =================================================================================== + // With... + // ======= + + // =================================================================================== + // Helper + // ====== + protected void assertConditionQuery() { + if (!hasConditionQuery()) { + String msg = "The query should not be null."; + throw new IllegalStateException(msg); + } + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/nss/CounterHistoryNss.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/nss/CounterHistoryNss.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/nss/CounterHistoryNss.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,64 @@ +package jp.sf.pal.pompei.cbean.nss; + + +import jp.sf.pal.pompei.cbean.cq.CounterHistoryCQ; + + +/** + * The nest select setupper of COUNTER_HISTORY. + * + * @author DBFlute(AutoGenerator) + */ +public class CounterHistoryNss { + + // =================================================================================== + // Attribute + // ========= + /** Base query. */ + protected CounterHistoryCQ _query; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param query Base query. (NotNull) + */ + public CounterHistoryNss(CounterHistoryCQ query) { + _query = query; + } + + // =================================================================================== + // Accessor + // ======== + /** + * @deprecated This method is INTERNAL! Please use cb.query().queryXxx().setXxx_Equal()... + */ + public CounterHistoryCQ query() { + return _query; + } + + /** + * Has condition query? + * + * @return Determination. + */ + public boolean hasConditionQuery() { + return _query != null; + } + + // =================================================================================== + // With... + // ======= + + // =================================================================================== + // Helper + // ====== + protected void assertConditionQuery() { + if (!hasConditionQuery()) { + String msg = "The query should not be null."; + throw new IllegalStateException(msg); + } + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/nss/CounterNss.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/nss/CounterNss.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/nss/CounterNss.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,64 @@ +package jp.sf.pal.pompei.cbean.nss; + + +import jp.sf.pal.pompei.cbean.cq.CounterCQ; + + +/** + * The nest select setupper of COUNTER. + * + * @author DBFlute(AutoGenerator) + */ +public class CounterNss { + + // =================================================================================== + // Attribute + // ========= + /** Base query. */ + protected CounterCQ _query; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param query Base query. (NotNull) + */ + public CounterNss(CounterCQ query) { + _query = query; + } + + // =================================================================================== + // Accessor + // ======== + /** + * @deprecated This method is INTERNAL! Please use cb.query().queryXxx().setXxx_Equal()... + */ + public CounterCQ query() { + return _query; + } + + /** + * Has condition query? + * + * @return Determination. + */ + public boolean hasConditionQuery() { + return _query != null; + } + + // =================================================================================== + // With... + // ======= + + // =================================================================================== + // Helper + // ====== + protected void assertConditionQuery() { + if (!hasConditionQuery()) { + String msg = "The query should not be null."; + throw new IllegalStateException(msg); + } + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/nss/CountriesNss.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/nss/CountriesNss.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/nss/CountriesNss.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,64 @@ +package jp.sf.pal.pompei.cbean.nss; + + +import jp.sf.pal.pompei.cbean.cq.CountriesCQ; + + +/** + * The nest select setupper of COUNTRIES. + * + * @author DBFlute(AutoGenerator) + */ +public class CountriesNss { + + // =================================================================================== + // Attribute + // ========= + /** Base query. */ + protected CountriesCQ _query; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param query Base query. (NotNull) + */ + public CountriesNss(CountriesCQ query) { + _query = query; + } + + // =================================================================================== + // Accessor + // ======== + /** + * @deprecated This method is INTERNAL! Please use cb.query().queryXxx().setXxx_Equal()... + */ + public CountriesCQ query() { + return _query; + } + + /** + * Has condition query? + * + * @return Determination. + */ + public boolean hasConditionQuery() { + return _query != null; + } + + // =================================================================================== + // With... + // ======= + + // =================================================================================== + // Helper + // ====== + protected void assertConditionQuery() { + if (!hasConditionQuery()) { + String msg = "The query should not be null."; + throw new IllegalStateException(msg); + } + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/nss/CurrenciesNss.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/nss/CurrenciesNss.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/nss/CurrenciesNss.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,64 @@ +package jp.sf.pal.pompei.cbean.nss; + + +import jp.sf.pal.pompei.cbean.cq.CurrenciesCQ; + + +/** + * The nest select setupper of CURRENCIES. + * + * @author DBFlute(AutoGenerator) + */ +public class CurrenciesNss { + + // =================================================================================== + // Attribute + // ========= + /** Base query. */ + protected CurrenciesCQ _query; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param query Base query. (NotNull) + */ + public CurrenciesNss(CurrenciesCQ query) { + _query = query; + } + + // =================================================================================== + // Accessor + // ======== + /** + * @deprecated This method is INTERNAL! Please use cb.query().queryXxx().setXxx_Equal()... + */ + public CurrenciesCQ query() { + return _query; + } + + /** + * Has condition query? + * + * @return Determination. + */ + public boolean hasConditionQuery() { + return _query != null; + } + + // =================================================================================== + // With... + // ======= + + // =================================================================================== + // Helper + // ====== + protected void assertConditionQuery() { + if (!hasConditionQuery()) { + String msg = "The query should not be null."; + throw new IllegalStateException(msg); + } + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/nss/CustomersBasketAttributesNss.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/nss/CustomersBasketAttributesNss.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/nss/CustomersBasketAttributesNss.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,64 @@ +package jp.sf.pal.pompei.cbean.nss; + + +import jp.sf.pal.pompei.cbean.cq.CustomersBasketAttributesCQ; + + +/** + * The nest select setupper of CUSTOMERS_BASKET_ATTRIBUTES. + * + * @author DBFlute(AutoGenerator) + */ +public class CustomersBasketAttributesNss { + + // =================================================================================== + // Attribute + // ========= + /** Base query. */ + protected CustomersBasketAttributesCQ _query; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param query Base query. (NotNull) + */ + public CustomersBasketAttributesNss(CustomersBasketAttributesCQ query) { + _query = query; + } + + // =================================================================================== + // Accessor + // ======== + /** + * @deprecated This method is INTERNAL! Please use cb.query().queryXxx().setXxx_Equal()... + */ + public CustomersBasketAttributesCQ query() { + return _query; + } + + /** + * Has condition query? + * + * @return Determination. + */ + public boolean hasConditionQuery() { + return _query != null; + } + + // =================================================================================== + // With... + // ======= + + // =================================================================================== + // Helper + // ====== + protected void assertConditionQuery() { + if (!hasConditionQuery()) { + String msg = "The query should not be null."; + throw new IllegalStateException(msg); + } + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/nss/CustomersBasketNss.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/nss/CustomersBasketNss.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/nss/CustomersBasketNss.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,64 @@ +package jp.sf.pal.pompei.cbean.nss; + + +import jp.sf.pal.pompei.cbean.cq.CustomersBasketCQ; + + +/** + * The nest select setupper of CUSTOMERS_BASKET. + * + * @author DBFlute(AutoGenerator) + */ +public class CustomersBasketNss { + + // =================================================================================== + // Attribute + // ========= + /** Base query. */ + protected CustomersBasketCQ _query; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param query Base query. (NotNull) + */ + public CustomersBasketNss(CustomersBasketCQ query) { + _query = query; + } + + // =================================================================================== + // Accessor + // ======== + /** + * @deprecated This method is INTERNAL! Please use cb.query().queryXxx().setXxx_Equal()... + */ + public CustomersBasketCQ query() { + return _query; + } + + /** + * Has condition query? + * + * @return Determination. + */ + public boolean hasConditionQuery() { + return _query != null; + } + + // =================================================================================== + // With... + // ======= + + // =================================================================================== + // Helper + // ====== + protected void assertConditionQuery() { + if (!hasConditionQuery()) { + String msg = "The query should not be null."; + throw new IllegalStateException(msg); + } + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/nss/CustomersInfoNss.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/nss/CustomersInfoNss.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/nss/CustomersInfoNss.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,64 @@ +package jp.sf.pal.pompei.cbean.nss; + + +import jp.sf.pal.pompei.cbean.cq.CustomersInfoCQ; + + +/** + * The nest select setupper of CUSTOMERS_INFO. + * + * @author DBFlute(AutoGenerator) + */ +public class CustomersInfoNss { + + // =================================================================================== + // Attribute + // ========= + /** Base query. */ + protected CustomersInfoCQ _query; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param query Base query. (NotNull) + */ + public CustomersInfoNss(CustomersInfoCQ query) { + _query = query; + } + + // =================================================================================== + // Accessor + // ======== + /** + * @deprecated This method is INTERNAL! Please use cb.query().queryXxx().setXxx_Equal()... + */ + public CustomersInfoCQ query() { + return _query; + } + + /** + * Has condition query? + * + * @return Determination. + */ + public boolean hasConditionQuery() { + return _query != null; + } + + // =================================================================================== + // With... + // ======= + + // =================================================================================== + // Helper + // ====== + protected void assertConditionQuery() { + if (!hasConditionQuery()) { + String msg = "The query should not be null."; + throw new IllegalStateException(msg); + } + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/nss/CustomersNss.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/nss/CustomersNss.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/nss/CustomersNss.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,64 @@ +package jp.sf.pal.pompei.cbean.nss; + + +import jp.sf.pal.pompei.cbean.cq.CustomersCQ; + + +/** + * The nest select setupper of CUSTOMERS. + * + * @author DBFlute(AutoGenerator) + */ +public class CustomersNss { + + // =================================================================================== + // Attribute + // ========= + /** Base query. */ + protected CustomersCQ _query; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param query Base query. (NotNull) + */ + public CustomersNss(CustomersCQ query) { + _query = query; + } + + // =================================================================================== + // Accessor + // ======== + /** + * @deprecated This method is INTERNAL! Please use cb.query().queryXxx().setXxx_Equal()... + */ + public CustomersCQ query() { + return _query; + } + + /** + * Has condition query? + * + * @return Determination. + */ + public boolean hasConditionQuery() { + return _query != null; + } + + // =================================================================================== + // With... + // ======= + + // =================================================================================== + // Helper + // ====== + protected void assertConditionQuery() { + if (!hasConditionQuery()) { + String msg = "The query should not be null."; + throw new IllegalStateException(msg); + } + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/nss/GeoZonesNss.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/nss/GeoZonesNss.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/nss/GeoZonesNss.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,64 @@ +package jp.sf.pal.pompei.cbean.nss; + + +import jp.sf.pal.pompei.cbean.cq.GeoZonesCQ; + + +/** + * The nest select setupper of GEO_ZONES. + * + * @author DBFlute(AutoGenerator) + */ +public class GeoZonesNss { + + // =================================================================================== + // Attribute + // ========= + /** Base query. */ + protected GeoZonesCQ _query; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param query Base query. (NotNull) + */ + public GeoZonesNss(GeoZonesCQ query) { + _query = query; + } + + // =================================================================================== + // Accessor + // ======== + /** + * @deprecated This method is INTERNAL! Please use cb.query().queryXxx().setXxx_Equal()... + */ + public GeoZonesCQ query() { + return _query; + } + + /** + * Has condition query? + * + * @return Determination. + */ + public boolean hasConditionQuery() { + return _query != null; + } + + // =================================================================================== + // With... + // ======= + + // =================================================================================== + // Helper + // ====== + protected void assertConditionQuery() { + if (!hasConditionQuery()) { + String msg = "The query should not be null."; + throw new IllegalStateException(msg); + } + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/nss/LanguagesNss.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/nss/LanguagesNss.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/nss/LanguagesNss.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,64 @@ +package jp.sf.pal.pompei.cbean.nss; + + +import jp.sf.pal.pompei.cbean.cq.LanguagesCQ; + + +/** + * The nest select setupper of LANGUAGES. + * + * @author DBFlute(AutoGenerator) + */ +public class LanguagesNss { + + // =================================================================================== + // Attribute + // ========= + /** Base query. */ + protected LanguagesCQ _query; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param query Base query. (NotNull) + */ + public LanguagesNss(LanguagesCQ query) { + _query = query; + } + + // =================================================================================== + // Accessor + // ======== + /** + * @deprecated This method is INTERNAL! Please use cb.query().queryXxx().setXxx_Equal()... + */ + public LanguagesCQ query() { + return _query; + } + + /** + * Has condition query? + * + * @return Determination. + */ + public boolean hasConditionQuery() { + return _query != null; + } + + // =================================================================================== + // With... + // ======= + + // =================================================================================== + // Helper + // ====== + protected void assertConditionQuery() { + if (!hasConditionQuery()) { + String msg = "The query should not be null."; + throw new IllegalStateException(msg); + } + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/nss/ManufacturersInfoNss.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/nss/ManufacturersInfoNss.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/nss/ManufacturersInfoNss.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,64 @@ +package jp.sf.pal.pompei.cbean.nss; + + +import jp.sf.pal.pompei.cbean.cq.ManufacturersInfoCQ; + + +/** + * The nest select setupper of MANUFACTURERS_INFO. + * + * @author DBFlute(AutoGenerator) + */ +public class ManufacturersInfoNss { + + // =================================================================================== + // Attribute + // ========= + /** Base query. */ + protected ManufacturersInfoCQ _query; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param query Base query. (NotNull) + */ + public ManufacturersInfoNss(ManufacturersInfoCQ query) { + _query = query; + } + + // =================================================================================== + // Accessor + // ======== + /** + * @deprecated This method is INTERNAL! Please use cb.query().queryXxx().setXxx_Equal()... + */ + public ManufacturersInfoCQ query() { + return _query; + } + + /** + * Has condition query? + * + * @return Determination. + */ + public boolean hasConditionQuery() { + return _query != null; + } + + // =================================================================================== + // With... + // ======= + + // =================================================================================== + // Helper + // ====== + protected void assertConditionQuery() { + if (!hasConditionQuery()) { + String msg = "The query should not be null."; + throw new IllegalStateException(msg); + } + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/nss/ManufacturersNss.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/nss/ManufacturersNss.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/nss/ManufacturersNss.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,64 @@ +package jp.sf.pal.pompei.cbean.nss; + + +import jp.sf.pal.pompei.cbean.cq.ManufacturersCQ; + + +/** + * The nest select setupper of MANUFACTURERS. + * + * @author DBFlute(AutoGenerator) + */ +public class ManufacturersNss { + + // =================================================================================== + // Attribute + // ========= + /** Base query. */ + protected ManufacturersCQ _query; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param query Base query. (NotNull) + */ + public ManufacturersNss(ManufacturersCQ query) { + _query = query; + } + + // =================================================================================== + // Accessor + // ======== + /** + * @deprecated This method is INTERNAL! Please use cb.query().queryXxx().setXxx_Equal()... + */ + public ManufacturersCQ query() { + return _query; + } + + /** + * Has condition query? + * + * @return Determination. + */ + public boolean hasConditionQuery() { + return _query != null; + } + + // =================================================================================== + // With... + // ======= + + // =================================================================================== + // Helper + // ====== + protected void assertConditionQuery() { + if (!hasConditionQuery()) { + String msg = "The query should not be null."; + throw new IllegalStateException(msg); + } + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/nss/NewslettersNss.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/nss/NewslettersNss.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/nss/NewslettersNss.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,64 @@ +package jp.sf.pal.pompei.cbean.nss; + + +import jp.sf.pal.pompei.cbean.cq.NewslettersCQ; + + +/** + * The nest select setupper of NEWSLETTERS. + * + * @author DBFlute(AutoGenerator) + */ +public class NewslettersNss { + + // =================================================================================== + // Attribute + // ========= + /** Base query. */ + protected NewslettersCQ _query; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param query Base query. (NotNull) + */ + public NewslettersNss(NewslettersCQ query) { + _query = query; + } + + // =================================================================================== + // Accessor + // ======== + /** + * @deprecated This method is INTERNAL! Please use cb.query().queryXxx().setXxx_Equal()... + */ + public NewslettersCQ query() { + return _query; + } + + /** + * Has condition query? + * + * @return Determination. + */ + public boolean hasConditionQuery() { + return _query != null; + } + + // =================================================================================== + // With... + // ======= + + // =================================================================================== + // Helper + // ====== + protected void assertConditionQuery() { + if (!hasConditionQuery()) { + String msg = "The query should not be null."; + throw new IllegalStateException(msg); + } + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/nss/OrdersNss.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/nss/OrdersNss.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/nss/OrdersNss.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,64 @@ +package jp.sf.pal.pompei.cbean.nss; + + +import jp.sf.pal.pompei.cbean.cq.OrdersCQ; + + +/** + * The nest select setupper of ORDERS. + * + * @author DBFlute(AutoGenerator) + */ +public class OrdersNss { + + // =================================================================================== + // Attribute + // ========= + /** Base query. */ + protected OrdersCQ _query; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param query Base query. (NotNull) + */ + public OrdersNss(OrdersCQ query) { + _query = query; + } + + // =================================================================================== + // Accessor + // ======== + /** + * @deprecated This method is INTERNAL! Please use cb.query().queryXxx().setXxx_Equal()... + */ + public OrdersCQ query() { + return _query; + } + + /** + * Has condition query? + * + * @return Determination. + */ + public boolean hasConditionQuery() { + return _query != null; + } + + // =================================================================================== + // With... + // ======= + + // =================================================================================== + // Helper + // ====== + protected void assertConditionQuery() { + if (!hasConditionQuery()) { + String msg = "The query should not be null."; + throw new IllegalStateException(msg); + } + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/nss/OrdersProductsAttributesNss.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/nss/OrdersProductsAttributesNss.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/nss/OrdersProductsAttributesNss.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,64 @@ +package jp.sf.pal.pompei.cbean.nss; + + +import jp.sf.pal.pompei.cbean.cq.OrdersProductsAttributesCQ; + + +/** + * The nest select setupper of ORDERS_PRODUCTS_ATTRIBUTES. + * + * @author DBFlute(AutoGenerator) + */ +public class OrdersProductsAttributesNss { + + // =================================================================================== + // Attribute + // ========= + /** Base query. */ + protected OrdersProductsAttributesCQ _query; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param query Base query. (NotNull) + */ + public OrdersProductsAttributesNss(OrdersProductsAttributesCQ query) { + _query = query; + } + + // =================================================================================== + // Accessor + // ======== + /** + * @deprecated This method is INTERNAL! Please use cb.query().queryXxx().setXxx_Equal()... + */ + public OrdersProductsAttributesCQ query() { + return _query; + } + + /** + * Has condition query? + * + * @return Determination. + */ + public boolean hasConditionQuery() { + return _query != null; + } + + // =================================================================================== + // With... + // ======= + + // =================================================================================== + // Helper + // ====== + protected void assertConditionQuery() { + if (!hasConditionQuery()) { + String msg = "The query should not be null."; + throw new IllegalStateException(msg); + } + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/nss/OrdersProductsDownloadNss.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/nss/OrdersProductsDownloadNss.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/nss/OrdersProductsDownloadNss.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,64 @@ +package jp.sf.pal.pompei.cbean.nss; + + +import jp.sf.pal.pompei.cbean.cq.OrdersProductsDownloadCQ; + + +/** + * The nest select setupper of ORDERS_PRODUCTS_DOWNLOAD. + * + * @author DBFlute(AutoGenerator) + */ +public class OrdersProductsDownloadNss { + + // =================================================================================== + // Attribute + // ========= + /** Base query. */ + protected OrdersProductsDownloadCQ _query; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param query Base query. (NotNull) + */ + public OrdersProductsDownloadNss(OrdersProductsDownloadCQ query) { + _query = query; + } + + // =================================================================================== + // Accessor + // ======== + /** + * @deprecated This method is INTERNAL! Please use cb.query().queryXxx().setXxx_Equal()... + */ + public OrdersProductsDownloadCQ query() { + return _query; + } + + /** + * Has condition query? + * + * @return Determination. + */ + public boolean hasConditionQuery() { + return _query != null; + } + + // =================================================================================== + // With... + // ======= + + // =================================================================================== + // Helper + // ====== + protected void assertConditionQuery() { + if (!hasConditionQuery()) { + String msg = "The query should not be null."; + throw new IllegalStateException(msg); + } + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/nss/OrdersProductsNss.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/nss/OrdersProductsNss.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/nss/OrdersProductsNss.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,64 @@ +package jp.sf.pal.pompei.cbean.nss; + + +import jp.sf.pal.pompei.cbean.cq.OrdersProductsCQ; + + +/** + * The nest select setupper of ORDERS_PRODUCTS. + * + * @author DBFlute(AutoGenerator) + */ +public class OrdersProductsNss { + + // =================================================================================== + // Attribute + // ========= + /** Base query. */ + protected OrdersProductsCQ _query; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param query Base query. (NotNull) + */ + public OrdersProductsNss(OrdersProductsCQ query) { + _query = query; + } + + // =================================================================================== + // Accessor + // ======== + /** + * @deprecated This method is INTERNAL! Please use cb.query().queryXxx().setXxx_Equal()... + */ + public OrdersProductsCQ query() { + return _query; + } + + /** + * Has condition query? + * + * @return Determination. + */ + public boolean hasConditionQuery() { + return _query != null; + } + + // =================================================================================== + // With... + // ======= + + // =================================================================================== + // Helper + // ====== + protected void assertConditionQuery() { + if (!hasConditionQuery()) { + String msg = "The query should not be null."; + throw new IllegalStateException(msg); + } + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/nss/OrdersStatusHistoryNss.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/nss/OrdersStatusHistoryNss.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/nss/OrdersStatusHistoryNss.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,64 @@ +package jp.sf.pal.pompei.cbean.nss; + + +import jp.sf.pal.pompei.cbean.cq.OrdersStatusHistoryCQ; + + +/** + * The nest select setupper of ORDERS_STATUS_HISTORY. + * + * @author DBFlute(AutoGenerator) + */ +public class OrdersStatusHistoryNss { + + // =================================================================================== + // Attribute + // ========= + /** Base query. */ + protected OrdersStatusHistoryCQ _query; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param query Base query. (NotNull) + */ + public OrdersStatusHistoryNss(OrdersStatusHistoryCQ query) { + _query = query; + } + + // =================================================================================== + // Accessor + // ======== + /** + * @deprecated This method is INTERNAL! Please use cb.query().queryXxx().setXxx_Equal()... + */ + public OrdersStatusHistoryCQ query() { + return _query; + } + + /** + * Has condition query? + * + * @return Determination. + */ + public boolean hasConditionQuery() { + return _query != null; + } + + // =================================================================================== + // With... + // ======= + + // =================================================================================== + // Helper + // ====== + protected void assertConditionQuery() { + if (!hasConditionQuery()) { + String msg = "The query should not be null."; + throw new IllegalStateException(msg); + } + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/nss/OrdersStatusNss.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/nss/OrdersStatusNss.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/nss/OrdersStatusNss.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,64 @@ +package jp.sf.pal.pompei.cbean.nss; + + +import jp.sf.pal.pompei.cbean.cq.OrdersStatusCQ; + + +/** + * The nest select setupper of ORDERS_STATUS. + * + * @author DBFlute(AutoGenerator) + */ +public class OrdersStatusNss { + + // =================================================================================== + // Attribute + // ========= + /** Base query. */ + protected OrdersStatusCQ _query; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param query Base query. (NotNull) + */ + public OrdersStatusNss(OrdersStatusCQ query) { + _query = query; + } + + // =================================================================================== + // Accessor + // ======== + /** + * @deprecated This method is INTERNAL! Please use cb.query().queryXxx().setXxx_Equal()... + */ + public OrdersStatusCQ query() { + return _query; + } + + /** + * Has condition query? + * + * @return Determination. + */ + public boolean hasConditionQuery() { + return _query != null; + } + + // =================================================================================== + // With... + // ======= + + // =================================================================================== + // Helper + // ====== + protected void assertConditionQuery() { + if (!hasConditionQuery()) { + String msg = "The query should not be null."; + throw new IllegalStateException(msg); + } + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/nss/OrdersTotalNss.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/nss/OrdersTotalNss.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/nss/OrdersTotalNss.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,64 @@ +package jp.sf.pal.pompei.cbean.nss; + + +import jp.sf.pal.pompei.cbean.cq.OrdersTotalCQ; + + +/** + * The nest select setupper of ORDERS_TOTAL. + * + * @author DBFlute(AutoGenerator) + */ +public class OrdersTotalNss { + + // =================================================================================== + // Attribute + // ========= + /** Base query. */ + protected OrdersTotalCQ _query; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param query Base query. (NotNull) + */ + public OrdersTotalNss(OrdersTotalCQ query) { + _query = query; + } + + // =================================================================================== + // Accessor + // ======== + /** + * @deprecated This method is INTERNAL! Please use cb.query().queryXxx().setXxx_Equal()... + */ + public OrdersTotalCQ query() { + return _query; + } + + /** + * Has condition query? + * + * @return Determination. + */ + public boolean hasConditionQuery() { + return _query != null; + } + + // =================================================================================== + // With... + // ======= + + // =================================================================================== + // Helper + // ====== + protected void assertConditionQuery() { + if (!hasConditionQuery()) { + String msg = "The query should not be null."; + throw new IllegalStateException(msg); + } + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/nss/ProductsAttributesDownloadNss.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/nss/ProductsAttributesDownloadNss.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/nss/ProductsAttributesDownloadNss.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,64 @@ +package jp.sf.pal.pompei.cbean.nss; + + +import jp.sf.pal.pompei.cbean.cq.ProductsAttributesDownloadCQ; + + +/** + * The nest select setupper of PRODUCTS_ATTRIBUTES_DOWNLOAD. + * + * @author DBFlute(AutoGenerator) + */ +public class ProductsAttributesDownloadNss { + + // =================================================================================== + // Attribute + // ========= + /** Base query. */ + protected ProductsAttributesDownloadCQ _query; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param query Base query. (NotNull) + */ + public ProductsAttributesDownloadNss(ProductsAttributesDownloadCQ query) { + _query = query; + } + + // =================================================================================== + // Accessor + // ======== + /** + * @deprecated This method is INTERNAL! Please use cb.query().queryXxx().setXxx_Equal()... + */ + public ProductsAttributesDownloadCQ query() { + return _query; + } + + /** + * Has condition query? + * + * @return Determination. + */ + public boolean hasConditionQuery() { + return _query != null; + } + + // =================================================================================== + // With... + // ======= + + // =================================================================================== + // Helper + // ====== + protected void assertConditionQuery() { + if (!hasConditionQuery()) { + String msg = "The query should not be null."; + throw new IllegalStateException(msg); + } + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/nss/ProductsAttributesNss.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/nss/ProductsAttributesNss.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/nss/ProductsAttributesNss.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,64 @@ +package jp.sf.pal.pompei.cbean.nss; + + +import jp.sf.pal.pompei.cbean.cq.ProductsAttributesCQ; + + +/** + * The nest select setupper of PRODUCTS_ATTRIBUTES. + * + * @author DBFlute(AutoGenerator) + */ +public class ProductsAttributesNss { + + // =================================================================================== + // Attribute + // ========= + /** Base query. */ + protected ProductsAttributesCQ _query; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param query Base query. (NotNull) + */ + public ProductsAttributesNss(ProductsAttributesCQ query) { + _query = query; + } + + // =================================================================================== + // Accessor + // ======== + /** + * @deprecated This method is INTERNAL! Please use cb.query().queryXxx().setXxx_Equal()... + */ + public ProductsAttributesCQ query() { + return _query; + } + + /** + * Has condition query? + * + * @return Determination. + */ + public boolean hasConditionQuery() { + return _query != null; + } + + // =================================================================================== + // With... + // ======= + + // =================================================================================== + // Helper + // ====== + protected void assertConditionQuery() { + if (!hasConditionQuery()) { + String msg = "The query should not be null."; + throw new IllegalStateException(msg); + } + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/nss/ProductsDescriptionNss.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/nss/ProductsDescriptionNss.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/nss/ProductsDescriptionNss.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,64 @@ +package jp.sf.pal.pompei.cbean.nss; + + +import jp.sf.pal.pompei.cbean.cq.ProductsDescriptionCQ; + + +/** + * The nest select setupper of PRODUCTS_DESCRIPTION. + * + * @author DBFlute(AutoGenerator) + */ +public class ProductsDescriptionNss { + + // =================================================================================== + // Attribute + // ========= + /** Base query. */ + protected ProductsDescriptionCQ _query; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param query Base query. (NotNull) + */ + public ProductsDescriptionNss(ProductsDescriptionCQ query) { + _query = query; + } + + // =================================================================================== + // Accessor + // ======== + /** + * @deprecated This method is INTERNAL! Please use cb.query().queryXxx().setXxx_Equal()... + */ + public ProductsDescriptionCQ query() { + return _query; + } + + /** + * Has condition query? + * + * @return Determination. + */ + public boolean hasConditionQuery() { + return _query != null; + } + + // =================================================================================== + // With... + // ======= + + // =================================================================================== + // Helper + // ====== + protected void assertConditionQuery() { + if (!hasConditionQuery()) { + String msg = "The query should not be null."; + throw new IllegalStateException(msg); + } + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/nss/ProductsNotificationsNss.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/nss/ProductsNotificationsNss.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/nss/ProductsNotificationsNss.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,64 @@ +package jp.sf.pal.pompei.cbean.nss; + + +import jp.sf.pal.pompei.cbean.cq.ProductsNotificationsCQ; + + +/** + * The nest select setupper of PRODUCTS_NOTIFICATIONS. + * + * @author DBFlute(AutoGenerator) + */ +public class ProductsNotificationsNss { + + // =================================================================================== + // Attribute + // ========= + /** Base query. */ + protected ProductsNotificationsCQ _query; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param query Base query. (NotNull) + */ + public ProductsNotificationsNss(ProductsNotificationsCQ query) { + _query = query; + } + + // =================================================================================== + // Accessor + // ======== + /** + * @deprecated This method is INTERNAL! Please use cb.query().queryXxx().setXxx_Equal()... + */ + public ProductsNotificationsCQ query() { + return _query; + } + + /** + * Has condition query? + * + * @return Determination. + */ + public boolean hasConditionQuery() { + return _query != null; + } + + // =================================================================================== + // With... + // ======= + + // =================================================================================== + // Helper + // ====== + protected void assertConditionQuery() { + if (!hasConditionQuery()) { + String msg = "The query should not be null."; + throw new IllegalStateException(msg); + } + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/nss/ProductsNss.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/nss/ProductsNss.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/nss/ProductsNss.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,64 @@ +package jp.sf.pal.pompei.cbean.nss; + + +import jp.sf.pal.pompei.cbean.cq.ProductsCQ; + + +/** + * The nest select setupper of PRODUCTS. + * + * @author DBFlute(AutoGenerator) + */ +public class ProductsNss { + + // =================================================================================== + // Attribute + // ========= + /** Base query. */ + protected ProductsCQ _query; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param query Base query. (NotNull) + */ + public ProductsNss(ProductsCQ query) { + _query = query; + } + + // =================================================================================== + // Accessor + // ======== + /** + * @deprecated This method is INTERNAL! Please use cb.query().queryXxx().setXxx_Equal()... + */ + public ProductsCQ query() { + return _query; + } + + /** + * Has condition query? + * + * @return Determination. + */ + public boolean hasConditionQuery() { + return _query != null; + } + + // =================================================================================== + // With... + // ======= + + // =================================================================================== + // Helper + // ====== + protected void assertConditionQuery() { + if (!hasConditionQuery()) { + String msg = "The query should not be null."; + throw new IllegalStateException(msg); + } + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/nss/ProductsOptionsNss.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/nss/ProductsOptionsNss.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/nss/ProductsOptionsNss.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,64 @@ +package jp.sf.pal.pompei.cbean.nss; + + +import jp.sf.pal.pompei.cbean.cq.ProductsOptionsCQ; + + +/** + * The nest select setupper of PRODUCTS_OPTIONS. + * + * @author DBFlute(AutoGenerator) + */ +public class ProductsOptionsNss { + + // =================================================================================== + // Attribute + // ========= + /** Base query. */ + protected ProductsOptionsCQ _query; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param query Base query. (NotNull) + */ + public ProductsOptionsNss(ProductsOptionsCQ query) { + _query = query; + } + + // =================================================================================== + // Accessor + // ======== + /** + * @deprecated This method is INTERNAL! Please use cb.query().queryXxx().setXxx_Equal()... + */ + public ProductsOptionsCQ query() { + return _query; + } + + /** + * Has condition query? + * + * @return Determination. + */ + public boolean hasConditionQuery() { + return _query != null; + } + + // =================================================================================== + // With... + // ======= + + // =================================================================================== + // Helper + // ====== + protected void assertConditionQuery() { + if (!hasConditionQuery()) { + String msg = "The query should not be null."; + throw new IllegalStateException(msg); + } + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/nss/ProductsOptionsValuesNss.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/nss/ProductsOptionsValuesNss.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/nss/ProductsOptionsValuesNss.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,64 @@ +package jp.sf.pal.pompei.cbean.nss; + + +import jp.sf.pal.pompei.cbean.cq.ProductsOptionsValuesCQ; + + +/** + * The nest select setupper of PRODUCTS_OPTIONS_VALUES. + * + * @author DBFlute(AutoGenerator) + */ +public class ProductsOptionsValuesNss { + + // =================================================================================== + // Attribute + // ========= + /** Base query. */ + protected ProductsOptionsValuesCQ _query; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param query Base query. (NotNull) + */ + public ProductsOptionsValuesNss(ProductsOptionsValuesCQ query) { + _query = query; + } + + // =================================================================================== + // Accessor + // ======== + /** + * @deprecated This method is INTERNAL! Please use cb.query().queryXxx().setXxx_Equal()... + */ + public ProductsOptionsValuesCQ query() { + return _query; + } + + /** + * Has condition query? + * + * @return Determination. + */ + public boolean hasConditionQuery() { + return _query != null; + } + + // =================================================================================== + // With... + // ======= + + // =================================================================================== + // Helper + // ====== + protected void assertConditionQuery() { + if (!hasConditionQuery()) { + String msg = "The query should not be null."; + throw new IllegalStateException(msg); + } + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/nss/ProductsOptionsValuesToProductsOptionsNss.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/nss/ProductsOptionsValuesToProductsOptionsNss.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/nss/ProductsOptionsValuesToProductsOptionsNss.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,64 @@ +package jp.sf.pal.pompei.cbean.nss; + + +import jp.sf.pal.pompei.cbean.cq.ProductsOptionsValuesToProductsOptionsCQ; + + +/** + * The nest select setupper of PRODUCTS_OPTIONS_VALUES_TO_PRODUCTS_OPTIONS. + * + * @author DBFlute(AutoGenerator) + */ +public class ProductsOptionsValuesToProductsOptionsNss { + + // =================================================================================== + // Attribute + // ========= + /** Base query. */ + protected ProductsOptionsValuesToProductsOptionsCQ _query; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param query Base query. (NotNull) + */ + public ProductsOptionsValuesToProductsOptionsNss(ProductsOptionsValuesToProductsOptionsCQ query) { + _query = query; + } + + // =================================================================================== + // Accessor + // ======== + /** + * @deprecated This method is INTERNAL! Please use cb.query().queryXxx().setXxx_Equal()... + */ + public ProductsOptionsValuesToProductsOptionsCQ query() { + return _query; + } + + /** + * Has condition query? + * + * @return Determination. + */ + public boolean hasConditionQuery() { + return _query != null; + } + + // =================================================================================== + // With... + // ======= + + // =================================================================================== + // Helper + // ====== + protected void assertConditionQuery() { + if (!hasConditionQuery()) { + String msg = "The query should not be null."; + throw new IllegalStateException(msg); + } + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/nss/ProductsToCategoriesNss.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/nss/ProductsToCategoriesNss.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/nss/ProductsToCategoriesNss.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,64 @@ +package jp.sf.pal.pompei.cbean.nss; + + +import jp.sf.pal.pompei.cbean.cq.ProductsToCategoriesCQ; + + +/** + * The nest select setupper of PRODUCTS_TO_CATEGORIES. + * + * @author DBFlute(AutoGenerator) + */ +public class ProductsToCategoriesNss { + + // =================================================================================== + // Attribute + // ========= + /** Base query. */ + protected ProductsToCategoriesCQ _query; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param query Base query. (NotNull) + */ + public ProductsToCategoriesNss(ProductsToCategoriesCQ query) { + _query = query; + } + + // =================================================================================== + // Accessor + // ======== + /** + * @deprecated This method is INTERNAL! Please use cb.query().queryXxx().setXxx_Equal()... + */ + public ProductsToCategoriesCQ query() { + return _query; + } + + /** + * Has condition query? + * + * @return Determination. + */ + public boolean hasConditionQuery() { + return _query != null; + } + + // =================================================================================== + // With... + // ======= + + // =================================================================================== + // Helper + // ====== + protected void assertConditionQuery() { + if (!hasConditionQuery()) { + String msg = "The query should not be null."; + throw new IllegalStateException(msg); + } + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/nss/ReviewsDescriptionNss.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/nss/ReviewsDescriptionNss.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/nss/ReviewsDescriptionNss.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,64 @@ +package jp.sf.pal.pompei.cbean.nss; + + +import jp.sf.pal.pompei.cbean.cq.ReviewsDescriptionCQ; + + +/** + * The nest select setupper of REVIEWS_DESCRIPTION. + * + * @author DBFlute(AutoGenerator) + */ +public class ReviewsDescriptionNss { + + // =================================================================================== + // Attribute + // ========= + /** Base query. */ + protected ReviewsDescriptionCQ _query; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param query Base query. (NotNull) + */ + public ReviewsDescriptionNss(ReviewsDescriptionCQ query) { + _query = query; + } + + // =================================================================================== + // Accessor + // ======== + /** + * @deprecated This method is INTERNAL! Please use cb.query().queryXxx().setXxx_Equal()... + */ + public ReviewsDescriptionCQ query() { + return _query; + } + + /** + * Has condition query? + * + * @return Determination. + */ + public boolean hasConditionQuery() { + return _query != null; + } + + // =================================================================================== + // With... + // ======= + + // =================================================================================== + // Helper + // ====== + protected void assertConditionQuery() { + if (!hasConditionQuery()) { + String msg = "The query should not be null."; + throw new IllegalStateException(msg); + } + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/nss/ReviewsNss.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/nss/ReviewsNss.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/nss/ReviewsNss.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,64 @@ +package jp.sf.pal.pompei.cbean.nss; + + +import jp.sf.pal.pompei.cbean.cq.ReviewsCQ; + + +/** + * The nest select setupper of REVIEWS. + * + * @author DBFlute(AutoGenerator) + */ +public class ReviewsNss { + + // =================================================================================== + // Attribute + // ========= + /** Base query. */ + protected ReviewsCQ _query; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param query Base query. (NotNull) + */ + public ReviewsNss(ReviewsCQ query) { + _query = query; + } + + // =================================================================================== + // Accessor + // ======== + /** + * @deprecated This method is INTERNAL! Please use cb.query().queryXxx().setXxx_Equal()... + */ + public ReviewsCQ query() { + return _query; + } + + /** + * Has condition query? + * + * @return Determination. + */ + public boolean hasConditionQuery() { + return _query != null; + } + + // =================================================================================== + // With... + // ======= + + // =================================================================================== + // Helper + // ====== + protected void assertConditionQuery() { + if (!hasConditionQuery()) { + String msg = "The query should not be null."; + throw new IllegalStateException(msg); + } + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/nss/SessionsNss.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/nss/SessionsNss.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/nss/SessionsNss.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,64 @@ +package jp.sf.pal.pompei.cbean.nss; + + +import jp.sf.pal.pompei.cbean.cq.SessionsCQ; + + +/** + * The nest select setupper of SESSIONS. + * + * @author DBFlute(AutoGenerator) + */ +public class SessionsNss { + + // =================================================================================== + // Attribute + // ========= + /** Base query. */ + protected SessionsCQ _query; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param query Base query. (NotNull) + */ + public SessionsNss(SessionsCQ query) { + _query = query; + } + + // =================================================================================== + // Accessor + // ======== + /** + * @deprecated This method is INTERNAL! Please use cb.query().queryXxx().setXxx_Equal()... + */ + public SessionsCQ query() { + return _query; + } + + /** + * Has condition query? + * + * @return Determination. + */ + public boolean hasConditionQuery() { + return _query != null; + } + + // =================================================================================== + // With... + // ======= + + // =================================================================================== + // Helper + // ====== + protected void assertConditionQuery() { + if (!hasConditionQuery()) { + String msg = "The query should not be null."; + throw new IllegalStateException(msg); + } + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/nss/SpecialsNss.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/nss/SpecialsNss.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/nss/SpecialsNss.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,64 @@ +package jp.sf.pal.pompei.cbean.nss; + + +import jp.sf.pal.pompei.cbean.cq.SpecialsCQ; + + +/** + * The nest select setupper of SPECIALS. + * + * @author DBFlute(AutoGenerator) + */ +public class SpecialsNss { + + // =================================================================================== + // Attribute + // ========= + /** Base query. */ + protected SpecialsCQ _query; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param query Base query. (NotNull) + */ + public SpecialsNss(SpecialsCQ query) { + _query = query; + } + + // =================================================================================== + // Accessor + // ======== + /** + * @deprecated This method is INTERNAL! Please use cb.query().queryXxx().setXxx_Equal()... + */ + public SpecialsCQ query() { + return _query; + } + + /** + * Has condition query? + * + * @return Determination. + */ + public boolean hasConditionQuery() { + return _query != null; + } + + // =================================================================================== + // With... + // ======= + + // =================================================================================== + // Helper + // ====== + protected void assertConditionQuery() { + if (!hasConditionQuery()) { + String msg = "The query should not be null."; + throw new IllegalStateException(msg); + } + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/nss/TaxClassNss.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/nss/TaxClassNss.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/nss/TaxClassNss.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,64 @@ +package jp.sf.pal.pompei.cbean.nss; + + +import jp.sf.pal.pompei.cbean.cq.TaxClassCQ; + + +/** + * The nest select setupper of TAX_CLASS. + * + * @author DBFlute(AutoGenerator) + */ +public class TaxClassNss { + + // =================================================================================== + // Attribute + // ========= + /** Base query. */ + protected TaxClassCQ _query; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param query Base query. (NotNull) + */ + public TaxClassNss(TaxClassCQ query) { + _query = query; + } + + // =================================================================================== + // Accessor + // ======== + /** + * @deprecated This method is INTERNAL! Please use cb.query().queryXxx().setXxx_Equal()... + */ + public TaxClassCQ query() { + return _query; + } + + /** + * Has condition query? + * + * @return Determination. + */ + public boolean hasConditionQuery() { + return _query != null; + } + + // =================================================================================== + // With... + // ======= + + // =================================================================================== + // Helper + // ====== + protected void assertConditionQuery() { + if (!hasConditionQuery()) { + String msg = "The query should not be null."; + throw new IllegalStateException(msg); + } + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/nss/TaxRatesNss.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/nss/TaxRatesNss.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/nss/TaxRatesNss.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,64 @@ +package jp.sf.pal.pompei.cbean.nss; + + +import jp.sf.pal.pompei.cbean.cq.TaxRatesCQ; + + +/** + * The nest select setupper of TAX_RATES. + * + * @author DBFlute(AutoGenerator) + */ +public class TaxRatesNss { + + // =================================================================================== + // Attribute + // ========= + /** Base query. */ + protected TaxRatesCQ _query; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param query Base query. (NotNull) + */ + public TaxRatesNss(TaxRatesCQ query) { + _query = query; + } + + // =================================================================================== + // Accessor + // ======== + /** + * @deprecated This method is INTERNAL! Please use cb.query().queryXxx().setXxx_Equal()... + */ + public TaxRatesCQ query() { + return _query; + } + + /** + * Has condition query? + * + * @return Determination. + */ + public boolean hasConditionQuery() { + return _query != null; + } + + // =================================================================================== + // With... + // ======= + + // =================================================================================== + // Helper + // ====== + protected void assertConditionQuery() { + if (!hasConditionQuery()) { + String msg = "The query should not be null."; + throw new IllegalStateException(msg); + } + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/nss/WhosOnlineNss.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/nss/WhosOnlineNss.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/nss/WhosOnlineNss.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,64 @@ +package jp.sf.pal.pompei.cbean.nss; + + +import jp.sf.pal.pompei.cbean.cq.WhosOnlineCQ; + + +/** + * The nest select setupper of WHOS_ONLINE. + * + * @author DBFlute(AutoGenerator) + */ +public class WhosOnlineNss { + + // =================================================================================== + // Attribute + // ========= + /** Base query. */ + protected WhosOnlineCQ _query; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param query Base query. (NotNull) + */ + public WhosOnlineNss(WhosOnlineCQ query) { + _query = query; + } + + // =================================================================================== + // Accessor + // ======== + /** + * @deprecated This method is INTERNAL! Please use cb.query().queryXxx().setXxx_Equal()... + */ + public WhosOnlineCQ query() { + return _query; + } + + /** + * Has condition query? + * + * @return Determination. + */ + public boolean hasConditionQuery() { + return _query != null; + } + + // =================================================================================== + // With... + // ======= + + // =================================================================================== + // Helper + // ====== + protected void assertConditionQuery() { + if (!hasConditionQuery()) { + String msg = "The query should not be null."; + throw new IllegalStateException(msg); + } + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/nss/ZonesNss.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/nss/ZonesNss.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/nss/ZonesNss.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,64 @@ +package jp.sf.pal.pompei.cbean.nss; + + +import jp.sf.pal.pompei.cbean.cq.ZonesCQ; + + +/** + * The nest select setupper of ZONES. + * + * @author DBFlute(AutoGenerator) + */ +public class ZonesNss { + + // =================================================================================== + // Attribute + // ========= + /** Base query. */ + protected ZonesCQ _query; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param query Base query. (NotNull) + */ + public ZonesNss(ZonesCQ query) { + _query = query; + } + + // =================================================================================== + // Accessor + // ======== + /** + * @deprecated This method is INTERNAL! Please use cb.query().queryXxx().setXxx_Equal()... + */ + public ZonesCQ query() { + return _query; + } + + /** + * Has condition query? + * + * @return Determination. + */ + public boolean hasConditionQuery() { + return _query != null; + } + + // =================================================================================== + // With... + // ======= + + // =================================================================================== + // Helper + // ====== + protected void assertConditionQuery() { + if (!hasConditionQuery()) { + String msg = "The query should not be null."; + throw new IllegalStateException(msg); + } + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/nss/ZonesToGeoZonesNss.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/nss/ZonesToGeoZonesNss.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/cbean/nss/ZonesToGeoZonesNss.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,64 @@ +package jp.sf.pal.pompei.cbean.nss; + + +import jp.sf.pal.pompei.cbean.cq.ZonesToGeoZonesCQ; + + +/** + * The nest select setupper of ZONES_TO_GEO_ZONES. + * + * @author DBFlute(AutoGenerator) + */ +public class ZonesToGeoZonesNss { + + // =================================================================================== + // Attribute + // ========= + /** Base query. */ + protected ZonesToGeoZonesCQ _query; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param query Base query. (NotNull) + */ + public ZonesToGeoZonesNss(ZonesToGeoZonesCQ query) { + _query = query; + } + + // =================================================================================== + // Accessor + // ======== + /** + * @deprecated This method is INTERNAL! Please use cb.query().queryXxx().setXxx_Equal()... + */ + public ZonesToGeoZonesCQ query() { + return _query; + } + + /** + * Has condition query? + * + * @return Determination. + */ + public boolean hasConditionQuery() { + return _query != null; + } + + // =================================================================================== + // With... + // ======= + + // =================================================================================== + // Helper + // ====== + protected void assertConditionQuery() { + if (!hasConditionQuery()) { + String msg = "The query should not be null."; + throw new IllegalStateException(msg); + } + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/exbhv/AddressBookBhv.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/exbhv/AddressBookBhv.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/exbhv/AddressBookBhv.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,10 @@ +package jp.sf.pal.pompei.exbhv; + + +/** + * The behavior of ADDRESS_BOOK. + * + * @author DBFlute(AutoGenerator) + */ +public class AddressBookBhv extends jp.sf.pal.pompei.bsbhv.BsAddressBookBhv { +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/exbhv/AddressFormatBhv.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/exbhv/AddressFormatBhv.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/exbhv/AddressFormatBhv.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,10 @@ +package jp.sf.pal.pompei.exbhv; + + +/** + * The behavior of ADDRESS_FORMAT. + * + * @author DBFlute(AutoGenerator) + */ +public class AddressFormatBhv extends jp.sf.pal.pompei.bsbhv.BsAddressFormatBhv { +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/exbhv/BannersBhv.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/exbhv/BannersBhv.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/exbhv/BannersBhv.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,10 @@ +package jp.sf.pal.pompei.exbhv; + + +/** + * The behavior of BANNERS. + * + * @author DBFlute(AutoGenerator) + */ +public class BannersBhv extends jp.sf.pal.pompei.bsbhv.BsBannersBhv { +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/exbhv/BannersHistoryBhv.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/exbhv/BannersHistoryBhv.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/exbhv/BannersHistoryBhv.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,10 @@ +package jp.sf.pal.pompei.exbhv; + + +/** + * The behavior of BANNERS_HISTORY. + * + * @author DBFlute(AutoGenerator) + */ +public class BannersHistoryBhv extends jp.sf.pal.pompei.bsbhv.BsBannersHistoryBhv { +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/exbhv/CategoriesBhv.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/exbhv/CategoriesBhv.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/exbhv/CategoriesBhv.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,10 @@ +package jp.sf.pal.pompei.exbhv; + + +/** + * The behavior of CATEGORIES. + * + * @author DBFlute(AutoGenerator) + */ +public class CategoriesBhv extends jp.sf.pal.pompei.bsbhv.BsCategoriesBhv { +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/exbhv/CategoriesDescriptionBhv.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/exbhv/CategoriesDescriptionBhv.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/exbhv/CategoriesDescriptionBhv.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,10 @@ +package jp.sf.pal.pompei.exbhv; + + +/** + * The behavior of CATEGORIES_DESCRIPTION. + * + * @author DBFlute(AutoGenerator) + */ +public class CategoriesDescriptionBhv extends jp.sf.pal.pompei.bsbhv.BsCategoriesDescriptionBhv { +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/exbhv/ConfigurationBhv.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/exbhv/ConfigurationBhv.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/exbhv/ConfigurationBhv.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,10 @@ +package jp.sf.pal.pompei.exbhv; + + +/** + * The behavior of CONFIGURATION. + * + * @author DBFlute(AutoGenerator) + */ +public class ConfigurationBhv extends jp.sf.pal.pompei.bsbhv.BsConfigurationBhv { +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/exbhv/ConfigurationGroupBhv.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/exbhv/ConfigurationGroupBhv.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/exbhv/ConfigurationGroupBhv.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,10 @@ +package jp.sf.pal.pompei.exbhv; + + +/** + * The behavior of CONFIGURATION_GROUP. + * + * @author DBFlute(AutoGenerator) + */ +public class ConfigurationGroupBhv extends jp.sf.pal.pompei.bsbhv.BsConfigurationGroupBhv { +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/exbhv/CounterBhv.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/exbhv/CounterBhv.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/exbhv/CounterBhv.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,10 @@ +package jp.sf.pal.pompei.exbhv; + + +/** + * The behavior of COUNTER. + * + * @author DBFlute(AutoGenerator) + */ +public class CounterBhv extends jp.sf.pal.pompei.bsbhv.BsCounterBhv { +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/exbhv/CounterHistoryBhv.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/exbhv/CounterHistoryBhv.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/exbhv/CounterHistoryBhv.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,10 @@ +package jp.sf.pal.pompei.exbhv; + + +/** + * The behavior of COUNTER_HISTORY. + * + * @author DBFlute(AutoGenerator) + */ +public class CounterHistoryBhv extends jp.sf.pal.pompei.bsbhv.BsCounterHistoryBhv { +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/exbhv/CountriesBhv.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/exbhv/CountriesBhv.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/exbhv/CountriesBhv.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,10 @@ +package jp.sf.pal.pompei.exbhv; + + +/** + * The behavior of COUNTRIES. + * + * @author DBFlute(AutoGenerator) + */ +public class CountriesBhv extends jp.sf.pal.pompei.bsbhv.BsCountriesBhv { +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/exbhv/CurrenciesBhv.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/exbhv/CurrenciesBhv.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/exbhv/CurrenciesBhv.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,10 @@ +package jp.sf.pal.pompei.exbhv; + + +/** + * The behavior of CURRENCIES. + * + * @author DBFlute(AutoGenerator) + */ +public class CurrenciesBhv extends jp.sf.pal.pompei.bsbhv.BsCurrenciesBhv { +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/exbhv/CustomersBasketAttributesBhv.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/exbhv/CustomersBasketAttributesBhv.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/exbhv/CustomersBasketAttributesBhv.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,10 @@ +package jp.sf.pal.pompei.exbhv; + + +/** + * The behavior of CUSTOMERS_BASKET_ATTRIBUTES. + * + * @author DBFlute(AutoGenerator) + */ +public class CustomersBasketAttributesBhv extends jp.sf.pal.pompei.bsbhv.BsCustomersBasketAttributesBhv { +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/exbhv/CustomersBasketBhv.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/exbhv/CustomersBasketBhv.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/exbhv/CustomersBasketBhv.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,10 @@ +package jp.sf.pal.pompei.exbhv; + + +/** + * The behavior of CUSTOMERS_BASKET. + * + * @author DBFlute(AutoGenerator) + */ +public class CustomersBasketBhv extends jp.sf.pal.pompei.bsbhv.BsCustomersBasketBhv { +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/exbhv/CustomersBhv.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/exbhv/CustomersBhv.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/exbhv/CustomersBhv.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,10 @@ +package jp.sf.pal.pompei.exbhv; + + +/** + * The behavior of CUSTOMERS. + * + * @author DBFlute(AutoGenerator) + */ +public class CustomersBhv extends jp.sf.pal.pompei.bsbhv.BsCustomersBhv { +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/exbhv/CustomersInfoBhv.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/exbhv/CustomersInfoBhv.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/exbhv/CustomersInfoBhv.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,10 @@ +package jp.sf.pal.pompei.exbhv; + + +/** + * The behavior of CUSTOMERS_INFO. + * + * @author DBFlute(AutoGenerator) + */ +public class CustomersInfoBhv extends jp.sf.pal.pompei.bsbhv.BsCustomersInfoBhv { +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/exbhv/GeoZonesBhv.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/exbhv/GeoZonesBhv.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/exbhv/GeoZonesBhv.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,10 @@ +package jp.sf.pal.pompei.exbhv; + + +/** + * The behavior of GEO_ZONES. + * + * @author DBFlute(AutoGenerator) + */ +public class GeoZonesBhv extends jp.sf.pal.pompei.bsbhv.BsGeoZonesBhv { +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/exbhv/LanguagesBhv.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/exbhv/LanguagesBhv.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/exbhv/LanguagesBhv.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,10 @@ +package jp.sf.pal.pompei.exbhv; + + +/** + * The behavior of LANGUAGES. + * + * @author DBFlute(AutoGenerator) + */ +public class LanguagesBhv extends jp.sf.pal.pompei.bsbhv.BsLanguagesBhv { +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/exbhv/ManufacturersBhv.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/exbhv/ManufacturersBhv.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/exbhv/ManufacturersBhv.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,10 @@ +package jp.sf.pal.pompei.exbhv; + + +/** + * The behavior of MANUFACTURERS. + * + * @author DBFlute(AutoGenerator) + */ +public class ManufacturersBhv extends jp.sf.pal.pompei.bsbhv.BsManufacturersBhv { +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/exbhv/ManufacturersInfoBhv.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/exbhv/ManufacturersInfoBhv.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/exbhv/ManufacturersInfoBhv.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,10 @@ +package jp.sf.pal.pompei.exbhv; + + +/** + * The behavior of MANUFACTURERS_INFO. + * + * @author DBFlute(AutoGenerator) + */ +public class ManufacturersInfoBhv extends jp.sf.pal.pompei.bsbhv.BsManufacturersInfoBhv { +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/exbhv/NewslettersBhv.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/exbhv/NewslettersBhv.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/exbhv/NewslettersBhv.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,10 @@ +package jp.sf.pal.pompei.exbhv; + + +/** + * The behavior of NEWSLETTERS. + * + * @author DBFlute(AutoGenerator) + */ +public class NewslettersBhv extends jp.sf.pal.pompei.bsbhv.BsNewslettersBhv { +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/exbhv/OrdersBhv.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/exbhv/OrdersBhv.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/exbhv/OrdersBhv.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,10 @@ +package jp.sf.pal.pompei.exbhv; + + +/** + * The behavior of ORDERS. + * + * @author DBFlute(AutoGenerator) + */ +public class OrdersBhv extends jp.sf.pal.pompei.bsbhv.BsOrdersBhv { +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/exbhv/OrdersProductsAttributesBhv.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/exbhv/OrdersProductsAttributesBhv.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/exbhv/OrdersProductsAttributesBhv.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,10 @@ +package jp.sf.pal.pompei.exbhv; + + +/** + * The behavior of ORDERS_PRODUCTS_ATTRIBUTES. + * + * @author DBFlute(AutoGenerator) + */ +public class OrdersProductsAttributesBhv extends jp.sf.pal.pompei.bsbhv.BsOrdersProductsAttributesBhv { +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/exbhv/OrdersProductsBhv.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/exbhv/OrdersProductsBhv.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/exbhv/OrdersProductsBhv.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,10 @@ +package jp.sf.pal.pompei.exbhv; + + +/** + * The behavior of ORDERS_PRODUCTS. + * + * @author DBFlute(AutoGenerator) + */ +public class OrdersProductsBhv extends jp.sf.pal.pompei.bsbhv.BsOrdersProductsBhv { +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/exbhv/OrdersProductsDownloadBhv.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/exbhv/OrdersProductsDownloadBhv.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/exbhv/OrdersProductsDownloadBhv.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,10 @@ +package jp.sf.pal.pompei.exbhv; + + +/** + * The behavior of ORDERS_PRODUCTS_DOWNLOAD. + * + * @author DBFlute(AutoGenerator) + */ +public class OrdersProductsDownloadBhv extends jp.sf.pal.pompei.bsbhv.BsOrdersProductsDownloadBhv { +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/exbhv/OrdersStatusBhv.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/exbhv/OrdersStatusBhv.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/exbhv/OrdersStatusBhv.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,10 @@ +package jp.sf.pal.pompei.exbhv; + + +/** + * The behavior of ORDERS_STATUS. + * + * @author DBFlute(AutoGenerator) + */ +public class OrdersStatusBhv extends jp.sf.pal.pompei.bsbhv.BsOrdersStatusBhv { +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/exbhv/OrdersStatusHistoryBhv.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/exbhv/OrdersStatusHistoryBhv.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/exbhv/OrdersStatusHistoryBhv.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,10 @@ +package jp.sf.pal.pompei.exbhv; + + +/** + * The behavior of ORDERS_STATUS_HISTORY. + * + * @author DBFlute(AutoGenerator) + */ +public class OrdersStatusHistoryBhv extends jp.sf.pal.pompei.bsbhv.BsOrdersStatusHistoryBhv { +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/exbhv/OrdersTotalBhv.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/exbhv/OrdersTotalBhv.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/exbhv/OrdersTotalBhv.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,10 @@ +package jp.sf.pal.pompei.exbhv; + + +/** + * The behavior of ORDERS_TOTAL. + * + * @author DBFlute(AutoGenerator) + */ +public class OrdersTotalBhv extends jp.sf.pal.pompei.bsbhv.BsOrdersTotalBhv { +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/exbhv/ProductsAttributesBhv.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/exbhv/ProductsAttributesBhv.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/exbhv/ProductsAttributesBhv.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,10 @@ +package jp.sf.pal.pompei.exbhv; + + +/** + * The behavior of PRODUCTS_ATTRIBUTES. + * + * @author DBFlute(AutoGenerator) + */ +public class ProductsAttributesBhv extends jp.sf.pal.pompei.bsbhv.BsProductsAttributesBhv { +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/exbhv/ProductsAttributesDownloadBhv.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/exbhv/ProductsAttributesDownloadBhv.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/exbhv/ProductsAttributesDownloadBhv.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,10 @@ +package jp.sf.pal.pompei.exbhv; + + +/** + * The behavior of PRODUCTS_ATTRIBUTES_DOWNLOAD. + * + * @author DBFlute(AutoGenerator) + */ +public class ProductsAttributesDownloadBhv extends jp.sf.pal.pompei.bsbhv.BsProductsAttributesDownloadBhv { +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/exbhv/ProductsBhv.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/exbhv/ProductsBhv.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/exbhv/ProductsBhv.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,10 @@ +package jp.sf.pal.pompei.exbhv; + + +/** + * The behavior of PRODUCTS. + * + * @author DBFlute(AutoGenerator) + */ +public class ProductsBhv extends jp.sf.pal.pompei.bsbhv.BsProductsBhv { +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/exbhv/ProductsDescriptionBhv.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/exbhv/ProductsDescriptionBhv.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/exbhv/ProductsDescriptionBhv.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,10 @@ +package jp.sf.pal.pompei.exbhv; + + +/** + * The behavior of PRODUCTS_DESCRIPTION. + * + * @author DBFlute(AutoGenerator) + */ +public class ProductsDescriptionBhv extends jp.sf.pal.pompei.bsbhv.BsProductsDescriptionBhv { +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/exbhv/ProductsNotificationsBhv.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/exbhv/ProductsNotificationsBhv.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/exbhv/ProductsNotificationsBhv.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,10 @@ +package jp.sf.pal.pompei.exbhv; + + +/** + * The behavior of PRODUCTS_NOTIFICATIONS. + * + * @author DBFlute(AutoGenerator) + */ +public class ProductsNotificationsBhv extends jp.sf.pal.pompei.bsbhv.BsProductsNotificationsBhv { +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/exbhv/ProductsOptionsBhv.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/exbhv/ProductsOptionsBhv.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/exbhv/ProductsOptionsBhv.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,10 @@ +package jp.sf.pal.pompei.exbhv; + + +/** + * The behavior of PRODUCTS_OPTIONS. + * + * @author DBFlute(AutoGenerator) + */ +public class ProductsOptionsBhv extends jp.sf.pal.pompei.bsbhv.BsProductsOptionsBhv { +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/exbhv/ProductsOptionsValuesBhv.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/exbhv/ProductsOptionsValuesBhv.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/exbhv/ProductsOptionsValuesBhv.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,10 @@ +package jp.sf.pal.pompei.exbhv; + + +/** + * The behavior of PRODUCTS_OPTIONS_VALUES. + * + * @author DBFlute(AutoGenerator) + */ +public class ProductsOptionsValuesBhv extends jp.sf.pal.pompei.bsbhv.BsProductsOptionsValuesBhv { +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/exbhv/ProductsOptionsValuesToProductsOptionsBhv.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/exbhv/ProductsOptionsValuesToProductsOptionsBhv.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/exbhv/ProductsOptionsValuesToProductsOptionsBhv.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,10 @@ +package jp.sf.pal.pompei.exbhv; + + +/** + * The behavior of PRODUCTS_OPTIONS_VALUES_TO_PRODUCTS_OPTIONS. + * + * @author DBFlute(AutoGenerator) + */ +public class ProductsOptionsValuesToProductsOptionsBhv extends jp.sf.pal.pompei.bsbhv.BsProductsOptionsValuesToProductsOptionsBhv { +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/exbhv/ProductsToCategoriesBhv.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/exbhv/ProductsToCategoriesBhv.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/exbhv/ProductsToCategoriesBhv.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,10 @@ +package jp.sf.pal.pompei.exbhv; + + +/** + * The behavior of PRODUCTS_TO_CATEGORIES. + * + * @author DBFlute(AutoGenerator) + */ +public class ProductsToCategoriesBhv extends jp.sf.pal.pompei.bsbhv.BsProductsToCategoriesBhv { +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/exbhv/ReviewsBhv.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/exbhv/ReviewsBhv.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/exbhv/ReviewsBhv.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,10 @@ +package jp.sf.pal.pompei.exbhv; + + +/** + * The behavior of REVIEWS. + * + * @author DBFlute(AutoGenerator) + */ +public class ReviewsBhv extends jp.sf.pal.pompei.bsbhv.BsReviewsBhv { +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/exbhv/ReviewsDescriptionBhv.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/exbhv/ReviewsDescriptionBhv.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/exbhv/ReviewsDescriptionBhv.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,10 @@ +package jp.sf.pal.pompei.exbhv; + + +/** + * The behavior of REVIEWS_DESCRIPTION. + * + * @author DBFlute(AutoGenerator) + */ +public class ReviewsDescriptionBhv extends jp.sf.pal.pompei.bsbhv.BsReviewsDescriptionBhv { +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/exbhv/SessionsBhv.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/exbhv/SessionsBhv.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/exbhv/SessionsBhv.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,10 @@ +package jp.sf.pal.pompei.exbhv; + + +/** + * The behavior of SESSIONS. + * + * @author DBFlute(AutoGenerator) + */ +public class SessionsBhv extends jp.sf.pal.pompei.bsbhv.BsSessionsBhv { +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/exbhv/SpecialsBhv.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/exbhv/SpecialsBhv.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/exbhv/SpecialsBhv.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,10 @@ +package jp.sf.pal.pompei.exbhv; + + +/** + * The behavior of SPECIALS. + * + * @author DBFlute(AutoGenerator) + */ +public class SpecialsBhv extends jp.sf.pal.pompei.bsbhv.BsSpecialsBhv { +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/exbhv/TaxClassBhv.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/exbhv/TaxClassBhv.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/exbhv/TaxClassBhv.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,10 @@ +package jp.sf.pal.pompei.exbhv; + + +/** + * The behavior of TAX_CLASS. + * + * @author DBFlute(AutoGenerator) + */ +public class TaxClassBhv extends jp.sf.pal.pompei.bsbhv.BsTaxClassBhv { +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/exbhv/TaxRatesBhv.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/exbhv/TaxRatesBhv.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/exbhv/TaxRatesBhv.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,10 @@ +package jp.sf.pal.pompei.exbhv; + + +/** + * The behavior of TAX_RATES. + * + * @author DBFlute(AutoGenerator) + */ +public class TaxRatesBhv extends jp.sf.pal.pompei.bsbhv.BsTaxRatesBhv { +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/exbhv/WhosOnlineBhv.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/exbhv/WhosOnlineBhv.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/exbhv/WhosOnlineBhv.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,10 @@ +package jp.sf.pal.pompei.exbhv; + + +/** + * The behavior of WHOS_ONLINE. + * + * @author DBFlute(AutoGenerator) + */ +public class WhosOnlineBhv extends jp.sf.pal.pompei.bsbhv.BsWhosOnlineBhv { +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/exbhv/ZonesBhv.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/exbhv/ZonesBhv.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/exbhv/ZonesBhv.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,10 @@ +package jp.sf.pal.pompei.exbhv; + + +/** + * The behavior of ZONES. + * + * @author DBFlute(AutoGenerator) + */ +public class ZonesBhv extends jp.sf.pal.pompei.bsbhv.BsZonesBhv { +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/exbhv/ZonesToGeoZonesBhv.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/exbhv/ZonesToGeoZonesBhv.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/exbhv/ZonesToGeoZonesBhv.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,10 @@ +package jp.sf.pal.pompei.exbhv; + + +/** + * The behavior of ZONES_TO_GEO_ZONES. + * + * @author DBFlute(AutoGenerator) + */ +public class ZonesToGeoZonesBhv extends jp.sf.pal.pompei.bsbhv.BsZonesToGeoZonesBhv { +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/exdao/AddressBookDao.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/exdao/AddressBookDao.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/exdao/AddressBookDao.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,10 @@ +package jp.sf.pal.pompei.exdao; + + +/** + * The dao interface of ADDRESS_BOOK. + * + * @author DBFlute(AutoGenerator) + */ +public interface AddressBookDao extends jp.sf.pal.pompei.bsdao.BsAddressBookDao { +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/exdao/AddressFormatDao.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/exdao/AddressFormatDao.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/exdao/AddressFormatDao.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,10 @@ +package jp.sf.pal.pompei.exdao; + + +/** + * The dao interface of ADDRESS_FORMAT. + * + * @author DBFlute(AutoGenerator) + */ +public interface AddressFormatDao extends jp.sf.pal.pompei.bsdao.BsAddressFormatDao { +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/exdao/BannersDao.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/exdao/BannersDao.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/exdao/BannersDao.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,10 @@ +package jp.sf.pal.pompei.exdao; + + +/** + * The dao interface of BANNERS. + * + * @author DBFlute(AutoGenerator) + */ +public interface BannersDao extends jp.sf.pal.pompei.bsdao.BsBannersDao { +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/exdao/BannersHistoryDao.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/exdao/BannersHistoryDao.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/exdao/BannersHistoryDao.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,10 @@ +package jp.sf.pal.pompei.exdao; + + +/** + * The dao interface of BANNERS_HISTORY. + * + * @author DBFlute(AutoGenerator) + */ +public interface BannersHistoryDao extends jp.sf.pal.pompei.bsdao.BsBannersHistoryDao { +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/exdao/CategoriesDao.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/exdao/CategoriesDao.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/exdao/CategoriesDao.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,10 @@ +package jp.sf.pal.pompei.exdao; + + +/** + * The dao interface of CATEGORIES. + * + * @author DBFlute(AutoGenerator) + */ +public interface CategoriesDao extends jp.sf.pal.pompei.bsdao.BsCategoriesDao { +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/exdao/CategoriesDescriptionDao.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/exdao/CategoriesDescriptionDao.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/exdao/CategoriesDescriptionDao.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,10 @@ +package jp.sf.pal.pompei.exdao; + + +/** + * The dao interface of CATEGORIES_DESCRIPTION. + * + * @author DBFlute(AutoGenerator) + */ +public interface CategoriesDescriptionDao extends jp.sf.pal.pompei.bsdao.BsCategoriesDescriptionDao { +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/exdao/ConfigurationDao.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/exdao/ConfigurationDao.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/exdao/ConfigurationDao.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,10 @@ +package jp.sf.pal.pompei.exdao; + + +/** + * The dao interface of CONFIGURATION. + * + * @author DBFlute(AutoGenerator) + */ +public interface ConfigurationDao extends jp.sf.pal.pompei.bsdao.BsConfigurationDao { +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/exdao/ConfigurationGroupDao.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/exdao/ConfigurationGroupDao.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/exdao/ConfigurationGroupDao.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,10 @@ +package jp.sf.pal.pompei.exdao; + + +/** + * The dao interface of CONFIGURATION_GROUP. + * + * @author DBFlute(AutoGenerator) + */ +public interface ConfigurationGroupDao extends jp.sf.pal.pompei.bsdao.BsConfigurationGroupDao { +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/exdao/CounterDao.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/exdao/CounterDao.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/exdao/CounterDao.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,10 @@ +package jp.sf.pal.pompei.exdao; + + +/** + * The dao interface of COUNTER. + * + * @author DBFlute(AutoGenerator) + */ +public interface CounterDao extends jp.sf.pal.pompei.bsdao.BsCounterDao { +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/exdao/CounterHistoryDao.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/exdao/CounterHistoryDao.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/exdao/CounterHistoryDao.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,10 @@ +package jp.sf.pal.pompei.exdao; + + +/** + * The dao interface of COUNTER_HISTORY. + * + * @author DBFlute(AutoGenerator) + */ +public interface CounterHistoryDao extends jp.sf.pal.pompei.bsdao.BsCounterHistoryDao { +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/exdao/CountriesDao.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/exdao/CountriesDao.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/exdao/CountriesDao.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,10 @@ +package jp.sf.pal.pompei.exdao; + + +/** + * The dao interface of COUNTRIES. + * + * @author DBFlute(AutoGenerator) + */ +public interface CountriesDao extends jp.sf.pal.pompei.bsdao.BsCountriesDao { +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/exdao/CurrenciesDao.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/exdao/CurrenciesDao.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/exdao/CurrenciesDao.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,10 @@ +package jp.sf.pal.pompei.exdao; + + +/** + * The dao interface of CURRENCIES. + * + * @author DBFlute(AutoGenerator) + */ +public interface CurrenciesDao extends jp.sf.pal.pompei.bsdao.BsCurrenciesDao { +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/exdao/CustomersBasketAttributesDao.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/exdao/CustomersBasketAttributesDao.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/exdao/CustomersBasketAttributesDao.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,10 @@ +package jp.sf.pal.pompei.exdao; + + +/** + * The dao interface of CUSTOMERS_BASKET_ATTRIBUTES. + * + * @author DBFlute(AutoGenerator) + */ +public interface CustomersBasketAttributesDao extends jp.sf.pal.pompei.bsdao.BsCustomersBasketAttributesDao { +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/exdao/CustomersBasketDao.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/exdao/CustomersBasketDao.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/exdao/CustomersBasketDao.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,10 @@ +package jp.sf.pal.pompei.exdao; + + +/** + * The dao interface of CUSTOMERS_BASKET. + * + * @author DBFlute(AutoGenerator) + */ +public interface CustomersBasketDao extends jp.sf.pal.pompei.bsdao.BsCustomersBasketDao { +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/exdao/CustomersDao.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/exdao/CustomersDao.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/exdao/CustomersDao.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,10 @@ +package jp.sf.pal.pompei.exdao; + + +/** + * The dao interface of CUSTOMERS. + * + * @author DBFlute(AutoGenerator) + */ +public interface CustomersDao extends jp.sf.pal.pompei.bsdao.BsCustomersDao { +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/exdao/CustomersInfoDao.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/exdao/CustomersInfoDao.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/exdao/CustomersInfoDao.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,10 @@ +package jp.sf.pal.pompei.exdao; + + +/** + * The dao interface of CUSTOMERS_INFO. + * + * @author DBFlute(AutoGenerator) + */ +public interface CustomersInfoDao extends jp.sf.pal.pompei.bsdao.BsCustomersInfoDao { +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/exdao/GeoZonesDao.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/exdao/GeoZonesDao.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/exdao/GeoZonesDao.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,10 @@ +package jp.sf.pal.pompei.exdao; + + +/** + * The dao interface of GEO_ZONES. + * + * @author DBFlute(AutoGenerator) + */ +public interface GeoZonesDao extends jp.sf.pal.pompei.bsdao.BsGeoZonesDao { +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/exdao/LanguagesDao.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/exdao/LanguagesDao.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/exdao/LanguagesDao.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,10 @@ +package jp.sf.pal.pompei.exdao; + + +/** + * The dao interface of LANGUAGES. + * + * @author DBFlute(AutoGenerator) + */ +public interface LanguagesDao extends jp.sf.pal.pompei.bsdao.BsLanguagesDao { +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/exdao/ManufacturersDao.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/exdao/ManufacturersDao.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/exdao/ManufacturersDao.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,10 @@ +package jp.sf.pal.pompei.exdao; + + +/** + * The dao interface of MANUFACTURERS. + * + * @author DBFlute(AutoGenerator) + */ +public interface ManufacturersDao extends jp.sf.pal.pompei.bsdao.BsManufacturersDao { +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/exdao/ManufacturersInfoDao.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/exdao/ManufacturersInfoDao.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/exdao/ManufacturersInfoDao.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,10 @@ +package jp.sf.pal.pompei.exdao; + + +/** + * The dao interface of MANUFACTURERS_INFO. + * + * @author DBFlute(AutoGenerator) + */ +public interface ManufacturersInfoDao extends jp.sf.pal.pompei.bsdao.BsManufacturersInfoDao { +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/exdao/NewslettersDao.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/exdao/NewslettersDao.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/exdao/NewslettersDao.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,10 @@ +package jp.sf.pal.pompei.exdao; + + +/** + * The dao interface of NEWSLETTERS. + * + * @author DBFlute(AutoGenerator) + */ +public interface NewslettersDao extends jp.sf.pal.pompei.bsdao.BsNewslettersDao { +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/exdao/OrdersDao.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/exdao/OrdersDao.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/exdao/OrdersDao.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,10 @@ +package jp.sf.pal.pompei.exdao; + + +/** + * The dao interface of ORDERS. + * + * @author DBFlute(AutoGenerator) + */ +public interface OrdersDao extends jp.sf.pal.pompei.bsdao.BsOrdersDao { +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/exdao/OrdersProductsAttributesDao.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/exdao/OrdersProductsAttributesDao.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/exdao/OrdersProductsAttributesDao.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,10 @@ +package jp.sf.pal.pompei.exdao; + + +/** + * The dao interface of ORDERS_PRODUCTS_ATTRIBUTES. + * + * @author DBFlute(AutoGenerator) + */ +public interface OrdersProductsAttributesDao extends jp.sf.pal.pompei.bsdao.BsOrdersProductsAttributesDao { +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/exdao/OrdersProductsDao.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/exdao/OrdersProductsDao.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/exdao/OrdersProductsDao.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,10 @@ +package jp.sf.pal.pompei.exdao; + + +/** + * The dao interface of ORDERS_PRODUCTS. + * + * @author DBFlute(AutoGenerator) + */ +public interface OrdersProductsDao extends jp.sf.pal.pompei.bsdao.BsOrdersProductsDao { +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/exdao/OrdersProductsDownloadDao.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/exdao/OrdersProductsDownloadDao.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/exdao/OrdersProductsDownloadDao.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,10 @@ +package jp.sf.pal.pompei.exdao; + + +/** + * The dao interface of ORDERS_PRODUCTS_DOWNLOAD. + * + * @author DBFlute(AutoGenerator) + */ +public interface OrdersProductsDownloadDao extends jp.sf.pal.pompei.bsdao.BsOrdersProductsDownloadDao { +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/exdao/OrdersStatusDao.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/exdao/OrdersStatusDao.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/exdao/OrdersStatusDao.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,10 @@ +package jp.sf.pal.pompei.exdao; + + +/** + * The dao interface of ORDERS_STATUS. + * + * @author DBFlute(AutoGenerator) + */ +public interface OrdersStatusDao extends jp.sf.pal.pompei.bsdao.BsOrdersStatusDao { +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/exdao/OrdersStatusHistoryDao.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/exdao/OrdersStatusHistoryDao.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/exdao/OrdersStatusHistoryDao.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,10 @@ +package jp.sf.pal.pompei.exdao; + + +/** + * The dao interface of ORDERS_STATUS_HISTORY. + * + * @author DBFlute(AutoGenerator) + */ +public interface OrdersStatusHistoryDao extends jp.sf.pal.pompei.bsdao.BsOrdersStatusHistoryDao { +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/exdao/OrdersTotalDao.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/exdao/OrdersTotalDao.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/exdao/OrdersTotalDao.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,10 @@ +package jp.sf.pal.pompei.exdao; + + +/** + * The dao interface of ORDERS_TOTAL. + * + * @author DBFlute(AutoGenerator) + */ +public interface OrdersTotalDao extends jp.sf.pal.pompei.bsdao.BsOrdersTotalDao { +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/exdao/ProductsAttributesDao.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/exdao/ProductsAttributesDao.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/exdao/ProductsAttributesDao.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,10 @@ +package jp.sf.pal.pompei.exdao; + + +/** + * The dao interface of PRODUCTS_ATTRIBUTES. + * + * @author DBFlute(AutoGenerator) + */ +public interface ProductsAttributesDao extends jp.sf.pal.pompei.bsdao.BsProductsAttributesDao { +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/exdao/ProductsAttributesDownloadDao.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/exdao/ProductsAttributesDownloadDao.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/exdao/ProductsAttributesDownloadDao.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,10 @@ +package jp.sf.pal.pompei.exdao; + + +/** + * The dao interface of PRODUCTS_ATTRIBUTES_DOWNLOAD. + * + * @author DBFlute(AutoGenerator) + */ +public interface ProductsAttributesDownloadDao extends jp.sf.pal.pompei.bsdao.BsProductsAttributesDownloadDao { +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/exdao/ProductsDao.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/exdao/ProductsDao.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/exdao/ProductsDao.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,10 @@ +package jp.sf.pal.pompei.exdao; + + +/** + * The dao interface of PRODUCTS. + * + * @author DBFlute(AutoGenerator) + */ +public interface ProductsDao extends jp.sf.pal.pompei.bsdao.BsProductsDao { +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/exdao/ProductsDescriptionDao.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/exdao/ProductsDescriptionDao.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/exdao/ProductsDescriptionDao.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,10 @@ +package jp.sf.pal.pompei.exdao; + + +/** + * The dao interface of PRODUCTS_DESCRIPTION. + * + * @author DBFlute(AutoGenerator) + */ +public interface ProductsDescriptionDao extends jp.sf.pal.pompei.bsdao.BsProductsDescriptionDao { +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/exdao/ProductsNotificationsDao.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/exdao/ProductsNotificationsDao.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/exdao/ProductsNotificationsDao.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,10 @@ +package jp.sf.pal.pompei.exdao; + + +/** + * The dao interface of PRODUCTS_NOTIFICATIONS. + * + * @author DBFlute(AutoGenerator) + */ +public interface ProductsNotificationsDao extends jp.sf.pal.pompei.bsdao.BsProductsNotificationsDao { +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/exdao/ProductsOptionsDao.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/exdao/ProductsOptionsDao.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/exdao/ProductsOptionsDao.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,10 @@ +package jp.sf.pal.pompei.exdao; + + +/** + * The dao interface of PRODUCTS_OPTIONS. + * + * @author DBFlute(AutoGenerator) + */ +public interface ProductsOptionsDao extends jp.sf.pal.pompei.bsdao.BsProductsOptionsDao { +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/exdao/ProductsOptionsValuesDao.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/exdao/ProductsOptionsValuesDao.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/exdao/ProductsOptionsValuesDao.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,10 @@ +package jp.sf.pal.pompei.exdao; + + +/** + * The dao interface of PRODUCTS_OPTIONS_VALUES. + * + * @author DBFlute(AutoGenerator) + */ +public interface ProductsOptionsValuesDao extends jp.sf.pal.pompei.bsdao.BsProductsOptionsValuesDao { +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/exdao/ProductsOptionsValuesToProductsOptionsDao.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/exdao/ProductsOptionsValuesToProductsOptionsDao.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/exdao/ProductsOptionsValuesToProductsOptionsDao.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,10 @@ +package jp.sf.pal.pompei.exdao; + + +/** + * The dao interface of PRODUCTS_OPTIONS_VALUES_TO_PRODUCTS_OPTIONS. + * + * @author DBFlute(AutoGenerator) + */ +public interface ProductsOptionsValuesToProductsOptionsDao extends jp.sf.pal.pompei.bsdao.BsProductsOptionsValuesToProductsOptionsDao { +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/exdao/ProductsToCategoriesDao.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/exdao/ProductsToCategoriesDao.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/exdao/ProductsToCategoriesDao.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,10 @@ +package jp.sf.pal.pompei.exdao; + + +/** + * The dao interface of PRODUCTS_TO_CATEGORIES. + * + * @author DBFlute(AutoGenerator) + */ +public interface ProductsToCategoriesDao extends jp.sf.pal.pompei.bsdao.BsProductsToCategoriesDao { +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/exdao/ReviewsDao.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/exdao/ReviewsDao.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/exdao/ReviewsDao.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,10 @@ +package jp.sf.pal.pompei.exdao; + + +/** + * The dao interface of REVIEWS. + * + * @author DBFlute(AutoGenerator) + */ +public interface ReviewsDao extends jp.sf.pal.pompei.bsdao.BsReviewsDao { +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/exdao/ReviewsDescriptionDao.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/exdao/ReviewsDescriptionDao.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/exdao/ReviewsDescriptionDao.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,10 @@ +package jp.sf.pal.pompei.exdao; + + +/** + * The dao interface of REVIEWS_DESCRIPTION. + * + * @author DBFlute(AutoGenerator) + */ +public interface ReviewsDescriptionDao extends jp.sf.pal.pompei.bsdao.BsReviewsDescriptionDao { +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/exdao/SessionsDao.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/exdao/SessionsDao.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/exdao/SessionsDao.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,10 @@ +package jp.sf.pal.pompei.exdao; + + +/** + * The dao interface of SESSIONS. + * + * @author DBFlute(AutoGenerator) + */ +public interface SessionsDao extends jp.sf.pal.pompei.bsdao.BsSessionsDao { +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/exdao/SpecialsDao.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/exdao/SpecialsDao.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/exdao/SpecialsDao.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,10 @@ +package jp.sf.pal.pompei.exdao; + + +/** + * The dao interface of SPECIALS. + * + * @author DBFlute(AutoGenerator) + */ +public interface SpecialsDao extends jp.sf.pal.pompei.bsdao.BsSpecialsDao { +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/exdao/TaxClassDao.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/exdao/TaxClassDao.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/exdao/TaxClassDao.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,10 @@ +package jp.sf.pal.pompei.exdao; + + +/** + * The dao interface of TAX_CLASS. + * + * @author DBFlute(AutoGenerator) + */ +public interface TaxClassDao extends jp.sf.pal.pompei.bsdao.BsTaxClassDao { +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/exdao/TaxRatesDao.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/exdao/TaxRatesDao.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/exdao/TaxRatesDao.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,10 @@ +package jp.sf.pal.pompei.exdao; + + +/** + * The dao interface of TAX_RATES. + * + * @author DBFlute(AutoGenerator) + */ +public interface TaxRatesDao extends jp.sf.pal.pompei.bsdao.BsTaxRatesDao { +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/exdao/WhosOnlineDao.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/exdao/WhosOnlineDao.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/exdao/WhosOnlineDao.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,10 @@ +package jp.sf.pal.pompei.exdao; + + +/** + * The dao interface of WHOS_ONLINE. + * + * @author DBFlute(AutoGenerator) + */ +public interface WhosOnlineDao extends jp.sf.pal.pompei.bsdao.BsWhosOnlineDao { +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/exdao/ZonesDao.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/exdao/ZonesDao.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/exdao/ZonesDao.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,10 @@ +package jp.sf.pal.pompei.exdao; + + +/** + * The dao interface of ZONES. + * + * @author DBFlute(AutoGenerator) + */ +public interface ZonesDao extends jp.sf.pal.pompei.bsdao.BsZonesDao { +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/exdao/ZonesToGeoZonesDao.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/exdao/ZonesToGeoZonesDao.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/exdao/ZonesToGeoZonesDao.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,10 @@ +package jp.sf.pal.pompei.exdao; + + +/** + * The dao interface of ZONES_TO_GEO_ZONES. + * + * @author DBFlute(AutoGenerator) + */ +public interface ZonesToGeoZonesDao extends jp.sf.pal.pompei.bsdao.BsZonesToGeoZonesDao { +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/exentity/AddressBook.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/exentity/AddressBook.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/exentity/AddressBook.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,13 @@ +package jp.sf.pal.pompei.exentity; + + +/** + * The entity of ADDRESS_BOOK. + * + * @author DBFlute(AutoGenerator) + */ +public class AddressBook extends jp.sf.pal.pompei.bsentity.BsAddressBook { + + /** Serial version UID. (Default) */ + private static final long serialVersionUID = 1L; +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/exentity/AddressFormat.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/exentity/AddressFormat.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/exentity/AddressFormat.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,13 @@ +package jp.sf.pal.pompei.exentity; + + +/** + * The entity of ADDRESS_FORMAT. + * + * @author DBFlute(AutoGenerator) + */ +public class AddressFormat extends jp.sf.pal.pompei.bsentity.BsAddressFormat { + + /** Serial version UID. (Default) */ + private static final long serialVersionUID = 1L; +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/exentity/Banners.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/exentity/Banners.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/exentity/Banners.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,13 @@ +package jp.sf.pal.pompei.exentity; + + +/** + * The entity of BANNERS. + * + * @author DBFlute(AutoGenerator) + */ +public class Banners extends jp.sf.pal.pompei.bsentity.BsBanners { + + /** Serial version UID. (Default) */ + private static final long serialVersionUID = 1L; +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/exentity/BannersHistory.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/exentity/BannersHistory.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/exentity/BannersHistory.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,13 @@ +package jp.sf.pal.pompei.exentity; + + +/** + * The entity of BANNERS_HISTORY. + * + * @author DBFlute(AutoGenerator) + */ +public class BannersHistory extends jp.sf.pal.pompei.bsentity.BsBannersHistory { + + /** Serial version UID. (Default) */ + private static final long serialVersionUID = 1L; +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/exentity/Categories.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/exentity/Categories.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/exentity/Categories.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,13 @@ +package jp.sf.pal.pompei.exentity; + + +/** + * The entity of CATEGORIES. + * + * @author DBFlute(AutoGenerator) + */ +public class Categories extends jp.sf.pal.pompei.bsentity.BsCategories { + + /** Serial version UID. (Default) */ + private static final long serialVersionUID = 1L; +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/exentity/CategoriesDescription.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/exentity/CategoriesDescription.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/exentity/CategoriesDescription.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,13 @@ +package jp.sf.pal.pompei.exentity; + + +/** + * The entity of CATEGORIES_DESCRIPTION. + * + * @author DBFlute(AutoGenerator) + */ +public class CategoriesDescription extends jp.sf.pal.pompei.bsentity.BsCategoriesDescription { + + /** Serial version UID. (Default) */ + private static final long serialVersionUID = 1L; +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/exentity/Configuration.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/exentity/Configuration.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/exentity/Configuration.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,13 @@ +package jp.sf.pal.pompei.exentity; + + +/** + * The entity of CONFIGURATION. + * + * @author DBFlute(AutoGenerator) + */ +public class Configuration extends jp.sf.pal.pompei.bsentity.BsConfiguration { + + /** Serial version UID. (Default) */ + private static final long serialVersionUID = 1L; +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/exentity/ConfigurationGroup.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/exentity/ConfigurationGroup.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/exentity/ConfigurationGroup.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,13 @@ +package jp.sf.pal.pompei.exentity; + + +/** + * The entity of CONFIGURATION_GROUP. + * + * @author DBFlute(AutoGenerator) + */ +public class ConfigurationGroup extends jp.sf.pal.pompei.bsentity.BsConfigurationGroup { + + /** Serial version UID. (Default) */ + private static final long serialVersionUID = 1L; +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/exentity/Counter.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/exentity/Counter.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/exentity/Counter.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,13 @@ +package jp.sf.pal.pompei.exentity; + + +/** + * The entity of COUNTER. + * + * @author DBFlute(AutoGenerator) + */ +public class Counter extends jp.sf.pal.pompei.bsentity.BsCounter { + + /** Serial version UID. (Default) */ + private static final long serialVersionUID = 1L; +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/exentity/CounterHistory.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/exentity/CounterHistory.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/exentity/CounterHistory.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,13 @@ +package jp.sf.pal.pompei.exentity; + + +/** + * The entity of COUNTER_HISTORY. + * + * @author DBFlute(AutoGenerator) + */ +public class CounterHistory extends jp.sf.pal.pompei.bsentity.BsCounterHistory { + + /** Serial version UID. (Default) */ + private static final long serialVersionUID = 1L; +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/exentity/Countries.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/exentity/Countries.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/exentity/Countries.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,13 @@ +package jp.sf.pal.pompei.exentity; + + +/** + * The entity of COUNTRIES. + * + * @author DBFlute(AutoGenerator) + */ +public class Countries extends jp.sf.pal.pompei.bsentity.BsCountries { + + /** Serial version UID. (Default) */ + private static final long serialVersionUID = 1L; +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/exentity/Currencies.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/exentity/Currencies.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/exentity/Currencies.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,13 @@ +package jp.sf.pal.pompei.exentity; + + +/** + * The entity of CURRENCIES. + * + * @author DBFlute(AutoGenerator) + */ +public class Currencies extends jp.sf.pal.pompei.bsentity.BsCurrencies { + + /** Serial version UID. (Default) */ + private static final long serialVersionUID = 1L; +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/exentity/Customers.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/exentity/Customers.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/exentity/Customers.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,13 @@ +package jp.sf.pal.pompei.exentity; + + +/** + * The entity of CUSTOMERS. + * + * @author DBFlute(AutoGenerator) + */ +public class Customers extends jp.sf.pal.pompei.bsentity.BsCustomers { + + /** Serial version UID. (Default) */ + private static final long serialVersionUID = 1L; +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/exentity/CustomersBasket.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/exentity/CustomersBasket.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/exentity/CustomersBasket.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,13 @@ +package jp.sf.pal.pompei.exentity; + + +/** + * The entity of CUSTOMERS_BASKET. + * + * @author DBFlute(AutoGenerator) + */ +public class CustomersBasket extends jp.sf.pal.pompei.bsentity.BsCustomersBasket { + + /** Serial version UID. (Default) */ + private static final long serialVersionUID = 1L; +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/exentity/CustomersBasketAttributes.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/exentity/CustomersBasketAttributes.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/exentity/CustomersBasketAttributes.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,13 @@ +package jp.sf.pal.pompei.exentity; + + +/** + * The entity of CUSTOMERS_BASKET_ATTRIBUTES. + * + * @author DBFlute(AutoGenerator) + */ +public class CustomersBasketAttributes extends jp.sf.pal.pompei.bsentity.BsCustomersBasketAttributes { + + /** Serial version UID. (Default) */ + private static final long serialVersionUID = 1L; +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/exentity/CustomersInfo.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/exentity/CustomersInfo.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/exentity/CustomersInfo.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,13 @@ +package jp.sf.pal.pompei.exentity; + + +/** + * The entity of CUSTOMERS_INFO. + * + * @author DBFlute(AutoGenerator) + */ +public class CustomersInfo extends jp.sf.pal.pompei.bsentity.BsCustomersInfo { + + /** Serial version UID. (Default) */ + private static final long serialVersionUID = 1L; +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/exentity/GeoZones.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/exentity/GeoZones.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/exentity/GeoZones.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,13 @@ +package jp.sf.pal.pompei.exentity; + + +/** + * The entity of GEO_ZONES. + * + * @author DBFlute(AutoGenerator) + */ +public class GeoZones extends jp.sf.pal.pompei.bsentity.BsGeoZones { + + /** Serial version UID. (Default) */ + private static final long serialVersionUID = 1L; +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/exentity/Languages.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/exentity/Languages.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/exentity/Languages.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,13 @@ +package jp.sf.pal.pompei.exentity; + + +/** + * The entity of LANGUAGES. + * + * @author DBFlute(AutoGenerator) + */ +public class Languages extends jp.sf.pal.pompei.bsentity.BsLanguages { + + /** Serial version UID. (Default) */ + private static final long serialVersionUID = 1L; +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/exentity/Manufacturers.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/exentity/Manufacturers.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/exentity/Manufacturers.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,13 @@ +package jp.sf.pal.pompei.exentity; + + +/** + * The entity of MANUFACTURERS. + * + * @author DBFlute(AutoGenerator) + */ +public class Manufacturers extends jp.sf.pal.pompei.bsentity.BsManufacturers { + + /** Serial version UID. (Default) */ + private static final long serialVersionUID = 1L; +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/exentity/ManufacturersInfo.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/exentity/ManufacturersInfo.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/exentity/ManufacturersInfo.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,13 @@ +package jp.sf.pal.pompei.exentity; + + +/** + * The entity of MANUFACTURERS_INFO. + * + * @author DBFlute(AutoGenerator) + */ +public class ManufacturersInfo extends jp.sf.pal.pompei.bsentity.BsManufacturersInfo { + + /** Serial version UID. (Default) */ + private static final long serialVersionUID = 1L; +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/exentity/Newsletters.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/exentity/Newsletters.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/exentity/Newsletters.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,13 @@ +package jp.sf.pal.pompei.exentity; + + +/** + * The entity of NEWSLETTERS. + * + * @author DBFlute(AutoGenerator) + */ +public class Newsletters extends jp.sf.pal.pompei.bsentity.BsNewsletters { + + /** Serial version UID. (Default) */ + private static final long serialVersionUID = 1L; +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/exentity/Orders.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/exentity/Orders.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/exentity/Orders.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,13 @@ +package jp.sf.pal.pompei.exentity; + + +/** + * The entity of ORDERS. + * + * @author DBFlute(AutoGenerator) + */ +public class Orders extends jp.sf.pal.pompei.bsentity.BsOrders { + + /** Serial version UID. (Default) */ + private static final long serialVersionUID = 1L; +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/exentity/OrdersProducts.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/exentity/OrdersProducts.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/exentity/OrdersProducts.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,13 @@ +package jp.sf.pal.pompei.exentity; + + +/** + * The entity of ORDERS_PRODUCTS. + * + * @author DBFlute(AutoGenerator) + */ +public class OrdersProducts extends jp.sf.pal.pompei.bsentity.BsOrdersProducts { + + /** Serial version UID. (Default) */ + private static final long serialVersionUID = 1L; +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/exentity/OrdersProductsAttributes.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/exentity/OrdersProductsAttributes.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/exentity/OrdersProductsAttributes.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,13 @@ +package jp.sf.pal.pompei.exentity; + + +/** + * The entity of ORDERS_PRODUCTS_ATTRIBUTES. + * + * @author DBFlute(AutoGenerator) + */ +public class OrdersProductsAttributes extends jp.sf.pal.pompei.bsentity.BsOrdersProductsAttributes { + + /** Serial version UID. (Default) */ + private static final long serialVersionUID = 1L; +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/exentity/OrdersProductsDownload.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/exentity/OrdersProductsDownload.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/exentity/OrdersProductsDownload.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,13 @@ +package jp.sf.pal.pompei.exentity; + + +/** + * The entity of ORDERS_PRODUCTS_DOWNLOAD. + * + * @author DBFlute(AutoGenerator) + */ +public class OrdersProductsDownload extends jp.sf.pal.pompei.bsentity.BsOrdersProductsDownload { + + /** Serial version UID. (Default) */ + private static final long serialVersionUID = 1L; +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/exentity/OrdersStatus.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/exentity/OrdersStatus.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/exentity/OrdersStatus.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,13 @@ +package jp.sf.pal.pompei.exentity; + + +/** + * The entity of ORDERS_STATUS. + * + * @author DBFlute(AutoGenerator) + */ +public class OrdersStatus extends jp.sf.pal.pompei.bsentity.BsOrdersStatus { + + /** Serial version UID. (Default) */ + private static final long serialVersionUID = 1L; +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/exentity/OrdersStatusHistory.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/exentity/OrdersStatusHistory.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/exentity/OrdersStatusHistory.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,13 @@ +package jp.sf.pal.pompei.exentity; + + +/** + * The entity of ORDERS_STATUS_HISTORY. + * + * @author DBFlute(AutoGenerator) + */ +public class OrdersStatusHistory extends jp.sf.pal.pompei.bsentity.BsOrdersStatusHistory { + + /** Serial version UID. (Default) */ + private static final long serialVersionUID = 1L; +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/exentity/OrdersTotal.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/exentity/OrdersTotal.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/exentity/OrdersTotal.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,13 @@ +package jp.sf.pal.pompei.exentity; + + +/** + * The entity of ORDERS_TOTAL. + * + * @author DBFlute(AutoGenerator) + */ +public class OrdersTotal extends jp.sf.pal.pompei.bsentity.BsOrdersTotal { + + /** Serial version UID. (Default) */ + private static final long serialVersionUID = 1L; +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/exentity/Products.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/exentity/Products.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/exentity/Products.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,15 @@ +package jp.sf.pal.pompei.exentity; + + + +/** + * The entity of PRODUCTS. + * + * @author DBFlute(AutoGenerator) + */ +public class Products extends jp.sf.pal.pompei.bsentity.BsProducts { + + /** Serial version UID. (Default) */ + private static final long serialVersionUID = 1L; + +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/exentity/ProductsAttributes.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/exentity/ProductsAttributes.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/exentity/ProductsAttributes.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,13 @@ +package jp.sf.pal.pompei.exentity; + + +/** + * The entity of PRODUCTS_ATTRIBUTES. + * + * @author DBFlute(AutoGenerator) + */ +public class ProductsAttributes extends jp.sf.pal.pompei.bsentity.BsProductsAttributes { + + /** Serial version UID. (Default) */ + private static final long serialVersionUID = 1L; +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/exentity/ProductsAttributesDownload.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/exentity/ProductsAttributesDownload.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/exentity/ProductsAttributesDownload.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,13 @@ +package jp.sf.pal.pompei.exentity; + + +/** + * The entity of PRODUCTS_ATTRIBUTES_DOWNLOAD. + * + * @author DBFlute(AutoGenerator) + */ +public class ProductsAttributesDownload extends jp.sf.pal.pompei.bsentity.BsProductsAttributesDownload { + + /** Serial version UID. (Default) */ + private static final long serialVersionUID = 1L; +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/exentity/ProductsDescription.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/exentity/ProductsDescription.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/exentity/ProductsDescription.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,13 @@ +package jp.sf.pal.pompei.exentity; + + +/** + * The entity of PRODUCTS_DESCRIPTION. + * + * @author DBFlute(AutoGenerator) + */ +public class ProductsDescription extends jp.sf.pal.pompei.bsentity.BsProductsDescription { + + /** Serial version UID. (Default) */ + private static final long serialVersionUID = 1L; +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/exentity/ProductsNotifications.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/exentity/ProductsNotifications.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/exentity/ProductsNotifications.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,13 @@ +package jp.sf.pal.pompei.exentity; + + +/** + * The entity of PRODUCTS_NOTIFICATIONS. + * + * @author DBFlute(AutoGenerator) + */ +public class ProductsNotifications extends jp.sf.pal.pompei.bsentity.BsProductsNotifications { + + /** Serial version UID. (Default) */ + private static final long serialVersionUID = 1L; +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/exentity/ProductsOptions.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/exentity/ProductsOptions.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/exentity/ProductsOptions.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,13 @@ +package jp.sf.pal.pompei.exentity; + + +/** + * The entity of PRODUCTS_OPTIONS. + * + * @author DBFlute(AutoGenerator) + */ +public class ProductsOptions extends jp.sf.pal.pompei.bsentity.BsProductsOptions { + + /** Serial version UID. (Default) */ + private static final long serialVersionUID = 1L; +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/exentity/ProductsOptionsValues.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/exentity/ProductsOptionsValues.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/exentity/ProductsOptionsValues.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,13 @@ +package jp.sf.pal.pompei.exentity; + + +/** + * The entity of PRODUCTS_OPTIONS_VALUES. + * + * @author DBFlute(AutoGenerator) + */ +public class ProductsOptionsValues extends jp.sf.pal.pompei.bsentity.BsProductsOptionsValues { + + /** Serial version UID. (Default) */ + private static final long serialVersionUID = 1L; +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/exentity/ProductsOptionsValuesToProductsOptions.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/exentity/ProductsOptionsValuesToProductsOptions.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/exentity/ProductsOptionsValuesToProductsOptions.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,13 @@ +package jp.sf.pal.pompei.exentity; + + +/** + * The entity of PRODUCTS_OPTIONS_VALUES_TO_PRODUCTS_OPTIONS. + * + * @author DBFlute(AutoGenerator) + */ +public class ProductsOptionsValuesToProductsOptions extends jp.sf.pal.pompei.bsentity.BsProductsOptionsValuesToProductsOptions { + + /** Serial version UID. (Default) */ + private static final long serialVersionUID = 1L; +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/exentity/ProductsToCategories.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/exentity/ProductsToCategories.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/exentity/ProductsToCategories.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,13 @@ +package jp.sf.pal.pompei.exentity; + + +/** + * The entity of PRODUCTS_TO_CATEGORIES. + * + * @author DBFlute(AutoGenerator) + */ +public class ProductsToCategories extends jp.sf.pal.pompei.bsentity.BsProductsToCategories { + + /** Serial version UID. (Default) */ + private static final long serialVersionUID = 1L; +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/exentity/Reviews.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/exentity/Reviews.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/exentity/Reviews.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,13 @@ +package jp.sf.pal.pompei.exentity; + + +/** + * The entity of REVIEWS. + * + * @author DBFlute(AutoGenerator) + */ +public class Reviews extends jp.sf.pal.pompei.bsentity.BsReviews { + + /** Serial version UID. (Default) */ + private static final long serialVersionUID = 1L; +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/exentity/ReviewsDescription.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/exentity/ReviewsDescription.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/exentity/ReviewsDescription.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,13 @@ +package jp.sf.pal.pompei.exentity; + + +/** + * The entity of REVIEWS_DESCRIPTION. + * + * @author DBFlute(AutoGenerator) + */ +public class ReviewsDescription extends jp.sf.pal.pompei.bsentity.BsReviewsDescription { + + /** Serial version UID. (Default) */ + private static final long serialVersionUID = 1L; +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/exentity/Sessions.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/exentity/Sessions.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/exentity/Sessions.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,13 @@ +package jp.sf.pal.pompei.exentity; + + +/** + * The entity of SESSIONS. + * + * @author DBFlute(AutoGenerator) + */ +public class Sessions extends jp.sf.pal.pompei.bsentity.BsSessions { + + /** Serial version UID. (Default) */ + private static final long serialVersionUID = 1L; +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/exentity/Specials.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/exentity/Specials.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/exentity/Specials.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,13 @@ +package jp.sf.pal.pompei.exentity; + + +/** + * The entity of SPECIALS. + * + * @author DBFlute(AutoGenerator) + */ +public class Specials extends jp.sf.pal.pompei.bsentity.BsSpecials { + + /** Serial version UID. (Default) */ + private static final long serialVersionUID = 1L; +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/exentity/TaxClass.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/exentity/TaxClass.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/exentity/TaxClass.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,13 @@ +package jp.sf.pal.pompei.exentity; + + +/** + * The entity of TAX_CLASS. + * + * @author DBFlute(AutoGenerator) + */ +public class TaxClass extends jp.sf.pal.pompei.bsentity.BsTaxClass { + + /** Serial version UID. (Default) */ + private static final long serialVersionUID = 1L; +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/exentity/TaxRates.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/exentity/TaxRates.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/exentity/TaxRates.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,13 @@ +package jp.sf.pal.pompei.exentity; + + +/** + * The entity of TAX_RATES. + * + * @author DBFlute(AutoGenerator) + */ +public class TaxRates extends jp.sf.pal.pompei.bsentity.BsTaxRates { + + /** Serial version UID. (Default) */ + private static final long serialVersionUID = 1L; +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/exentity/WhosOnline.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/exentity/WhosOnline.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/exentity/WhosOnline.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,13 @@ +package jp.sf.pal.pompei.exentity; + + +/** + * The entity of WHOS_ONLINE. + * + * @author DBFlute(AutoGenerator) + */ +public class WhosOnline extends jp.sf.pal.pompei.bsentity.BsWhosOnline { + + /** Serial version UID. (Default) */ + private static final long serialVersionUID = 1L; +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/exentity/Zones.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/exentity/Zones.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/exentity/Zones.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,13 @@ +package jp.sf.pal.pompei.exentity; + + +/** + * The entity of ZONES. + * + * @author DBFlute(AutoGenerator) + */ +public class Zones extends jp.sf.pal.pompei.bsentity.BsZones { + + /** Serial version UID. (Default) */ + private static final long serialVersionUID = 1L; +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/exentity/ZonesToGeoZones.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/exentity/ZonesToGeoZones.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/exentity/ZonesToGeoZones.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,13 @@ +package jp.sf.pal.pompei.exentity; + + +/** + * The entity of ZONES_TO_GEO_ZONES. + * + * @author DBFlute(AutoGenerator) + */ +public class ZonesToGeoZones extends jp.sf.pal.pompei.bsentity.BsZonesToGeoZones { + + /** Serial version UID. (Default) */ + private static final long serialVersionUID = 1L; +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/web/error/ErrorPage.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/web/error/ErrorPage.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/web/error/ErrorPage.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,86 @@ +package jp.sf.pal.pompei.web.error; + +import javax.faces.context.FacesContext; + +public class ErrorPage { + + private static final String SERVLET_NAME = "javax.faces.webapp.FacesServlet"; + + private FacesContext context; + + private String stackTrace; + + private Exception exception; + + public Class prerender() { + stackTrace = buildStackTrace(exception); + return null; + } + + protected String buildStackTrace(Throwable t) { + if (t == null) { + return ""; + } + final StringBuffer buf = new StringBuffer(); + buf.append("
"); + + Throwable current = t; + do { + buf.append(""); + buf.append(current.toString()); + buf.append("
"); + final StackTraceElement[] traces = current.getStackTrace(); + for (int i = 0; i < traces.length; i++) { + final StackTraceElement elm = traces[i]; + if (elm.getClassName().startsWith(SERVLET_NAME)) { + // Servlet より涟は稍妥 + break; + } + buf.append("  at "); + buf.append(elm.getClassName()); + buf.append("#"); + buf.append(elm.getMethodName()); + buf.append(" ("); + buf.append(elm.getFileName()); + buf.append(lineString(elm.getLineNumber())); + buf.append(")
"); + } + buf.append("
"); + } while ((current = current.getCause()) != null); + buf.append("
"); + + return buf.toString(); + } + + protected String lineString(int lineNumber) { + if (lineNumber >= 0) { + return "#" + Integer.toString(lineNumber); + } + return ""; + } + + public FacesContext getFacesContext() { + return context; + } + + public void setFacesContext(FacesContext context) { + this.context = context; + } + + public String getStackTrace() { + return stackTrace; + } + + public void setStackTrace(String stackTace) { + this.stackTrace = stackTace; + } + + public Exception getException() { + return exception; + } + + public void setException(Exception exception2) { + this.exception = exception2; + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/web/sample/SampleAction.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/web/sample/SampleAction.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/web/sample/SampleAction.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,87 @@ +package jp.sf.pal.pompei.web.sample; + + +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.List; + +import jp.sf.pal.pompei.exbhv.ProductsBhv; + + +public class SampleAction { + + /** + * + */ + private SamplePage samplePage; + + /** + * + */ + private SampleService sampleService; + + /** + * @return samplePage + */ + public SamplePage getSamplePage() { + return samplePage; + } + + /** + * @param samplePage 肋年する samplePage + */ + public void setSamplePage(SamplePage samplePage) { + this.samplePage = samplePage; + } + + public Class initialize() { + return null; + } + + public Class prerender() { + List list = sampleService.getProdcts(); + + if(list != null && !list.isEmpty()) { + samplePage.setProductsItems(list); + }else { + samplePage.setProductsItems(new ArrayList()); + } + + return null; + } + + public Class doInsert() { + System.out.println("doInsert"); + String s = "insertOK"; + sampleService.doInsert(s); + + return null; + } + + public Class doUpdate() { + System.out.println("doUpdate"); +// Products p = (Products)samplePage.getProductsItems(); +// p.setProductsImage("upd"); + + sampleService.doUpdate(new BigDecimal(samplePage.getArg1())); + return null; + } + + /** + * @return sampleService + */ + public SampleService getSampleService() { + return sampleService; + } + + /** + * @param sampleService 肋年する sampleService + */ + public void setSampleService(SampleService sampleService) { + this.sampleService = sampleService; + } + + public String doCalculate() { + return null; + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/web/sample/SamplePage.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/web/sample/SamplePage.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/web/sample/SamplePage.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,61 @@ +package jp.sf.pal.pompei.web.sample; + +import java.math.BigDecimal; +import java.util.List; + +public class SamplePage { + protected String hello; + protected int arg1; + protected int arg2; + private List productsItems; + private BigDecimal productsId; + private String productsImage; + + public List getProductsItems() { + return productsItems; + } + + public void setProductsItems(List productsList) { + this.productsItems = productsList; + } + + public BigDecimal getProductsId() { + return productsId; + } + + public void setProductsId(BigDecimal productsId) { + this.productsId = productsId; + } + + public String getProductsImage() { + return productsImage; + } + + public void setProductsImage(String productsImage) { + this.productsImage = productsImage; + } + + public String getHello() { + return hello; + } + + public void setHello(String hello) { + this.hello = hello; + } + + public int getArg1() { + return arg1; + } + + public int getArg2() { + return arg2; + } + + public void setArg2(int arg2) { + this.arg2 = arg2; + } + + public void setArg1(int arg1) { + this.arg1 = arg1; + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/web/sample/SampleService.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/web/sample/SampleService.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/web/sample/SampleService.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,12 @@ +package jp.sf.pal.pompei.web.sample; + +import java.math.BigDecimal; +import java.util.List; + +public interface SampleService { + public List getProdcts(); + + public void doInsert(String s); + + public void doUpdate(BigDecimal decimal); +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/web/sample/impl/SampleServiceImpl.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/web/sample/impl/SampleServiceImpl.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/web/sample/impl/SampleServiceImpl.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,84 @@ +package jp.sf.pal.pompei.web.sample.impl; + + +import java.math.BigDecimal; +import java.sql.Timestamp; +import java.util.Date; +import java.util.List; + +import jp.sf.pal.pompei.cbean.ProductsCB; +import jp.sf.pal.pompei.exbhv.ProductsBhv; +import jp.sf.pal.pompei.exentity.Products; +import jp.sf.pal.pompei.web.sample.SampleService; + +public class SampleServiceImpl implements SampleService { + private ProductsBhv productsBhv; + public List getProdcts() { + List l = productsBhv.getMyDao().getListAll(); + +// List l = new ArrayList(); +// for(int i=0;i<10;i++) { +// Products p = new Products(); +// p.setProductsId(new BigDecimal(i)); +// p.setProductsImage("aaa"); +// l.add(p); +// } + + List list = l; + + return list; + } + public Products getProdct(int id) { + return null; + } + + public int getCount() { + ProductsBhv bhv = new ProductsBhv(); + + int c=0; +// int c = dao.getCountAll(); + return c; + } + public ProductsBhv getProductsBhv() { + return productsBhv; + } + public void setProductsBhv(ProductsBhv productsBhv) { + this.productsBhv = productsBhv; + } + public void doInsert(int arg1) { + return; + } + public void doUpdate(Products p) { + productsBhv.update(p); + + } + public void doUpdate(BigDecimal decimal) { + ProductsCB cb = new ProductsCB(); + cb.query().setProductsId_Equal(decimal); + + + Products p = productsBhv.selectEntity(cb); + p.setProductsImage("success"); + + productsBhv.update(p); + + } + public void doInsert(String s) { + + Products p = new Products(); + p.setProductsImage(s); + int c= productsBhv.getCountAll()+1; +// productsBhv. +// productsBhv.insert(p); + p.setProductsQuantity(new BigDecimal("0")); + p.setProductsPrice(new BigDecimal("0")); + p.setProductsDateAdded(new Timestamp(new Date().getTime())); + p.setProductsWeight(new BigDecimal("0")); + p.setProductsTaxClassId(new BigDecimal("0")); + p.setProductsId(new BigDecimal(c)); + p.setProductsStatus(new BigDecimal("0")); + productsBhv.insert(p); + + } + +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/web/test/AddResultPage.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/web/test/AddResultPage.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/web/test/AddResultPage.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,43 @@ +package jp.sf.pal.pompei.web.test; + +public class AddResultPage { + + private String title; + private String hello; + private int result; + public int getResult() { + return result; + } + + public void setResult(int result) { + this.result = result; + } + + public String getHello() { + return hello; + } + + public void setHello(String hello) { + this.hello = hello; + } + + public String getTitle() { + return title; + } + + public void setTitle(String title) { + this.title = title; + } + + public Class initialize() { + return null; + } + + public Class prerender() { + hello ="Hello Wrold"; + return null; + } + + + +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/web/test/TestAction.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/web/test/TestAction.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/web/test/TestAction.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,45 @@ +package jp.sf.pal.pompei.web.test; + +public class TestAction { + + private TestPage testPage; + + /** + * + */ + private TestService testService; + + public String doCalculate2() { + int i = testPage.getArg1() + testPage.getArg2(); + testPage.setResult(i); + return "addResult"; + } + + public String doCalculate3() { + int i = testService.add(testPage.getArg1(),testPage.getArg2()); + testPage.setResult(i); + return "addResult"; + } + + public TestPage getTestPage() { + return testPage; + } + + public void setTestPage(TestPage testPage) { + this.testPage = testPage; + } + + /** + * @return testService + */ + public TestService getTestService() { + return testService; + } + + /** + * @param testService 肋年する testService + */ + public void setTestService(TestService testService) { + this.testService = testService; + } +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/web/test/TestPage.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/web/test/TestPage.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/web/test/TestPage.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,56 @@ +package jp.sf.pal.pompei.web.test; + +public class TestPage { + + private String hello; + private int arg1; + private int arg2; + private int result; + + public Class initialize() { + return null; + } + + public Class prerender() { + hello ="Hello Wrold"; + return null; + } + + public String getHello() { + return hello; + } + + public void setHello(String hello) { + this.hello = hello; + } + + public String doCalculate() { + result = arg1 + arg2; + return "addResult"; + } + + public int getResult() { + return result; + } + + public void setResult(int result) { + this.result = result; + } + + public int getArg1() { + return arg1; + } + + public void setArg1(int arg1) { + this.arg1 = arg1; + } + + public int getArg2() { + return arg2; + } + + public void setArg2(int arg2) { + this.arg2 = arg2; + } + +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/web/test/TestService.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/web/test/TestService.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/web/test/TestService.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,5 @@ +package jp.sf.pal.pompei.web.test; + +public interface TestService { + int add(int arg1,int arg2); +} Added: pompei/trunk/src/main/java/jp/sf/pal/pompei/web/test/impl/TestServiceImpl.java =================================================================== --- pompei/trunk/src/main/java/jp/sf/pal/pompei/web/test/impl/TestServiceImpl.java 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/java/jp/sf/pal/pompei/web/test/impl/TestServiceImpl.java 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,9 @@ +package jp.sf.pal.pompei.web.test.impl; + +import jp.sf.pal.pompei.web.test.TestService; + +public class TestServiceImpl implements TestService { + public int add(int arg1, int arg2) { + return arg1 + arg2; + } +} Added: pompei/trunk/src/main/resources/app.dicon =================================================================== --- pompei/trunk/src/main/resources/app.dicon 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/resources/app.dicon 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,12 @@ + + + + + + + + + + + Added: pompei/trunk/src/main/resources/appMessages.properties =================================================================== --- pompei/trunk/src/main/resources/appMessages.properties 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/resources/appMessages.properties 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,2 @@ + +E0000001=Does't found records. Added: pompei/trunk/src/main/resources/appMessages_ja.properties =================================================================== --- pompei/trunk/src/main/resources/appMessages_ja.properties 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/resources/appMessages_ja.properties 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,2 @@ + +E0000001=\u691c\u7d22\u7d50\u679c\u304c\u3042\u308a\u307e\u305b\u3093\u3002 Added: pompei/trunk/src/main/resources/app_aop.dicon =================================================================== --- pompei/trunk/src/main/resources/app_aop.dicon 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/resources/app_aop.dicon 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,8 @@ + + + + + + + Added: pompei/trunk/src/main/resources/convention.dicon =================================================================== --- pompei/trunk/src/main/resources/convention.dicon 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/resources/convention.dicon 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,10 @@ + + + + + + "jp.sf.pal.pompei" + + + Added: pompei/trunk/src/main/resources/creator.dicon =================================================================== --- pompei/trunk/src/main/resources/creator.dicon 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/resources/creator.dicon 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + \ No newline at end of file Added: pompei/trunk/src/main/resources/customizer.dicon =================================================================== --- pompei/trunk/src/main/resources/customizer.dicon 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/resources/customizer.dicon 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,74 @@ + + + + + + + + traceCustomizer + + + + + + "app_aop.appFacesExceptionThrowsInterceptor" + + "do.*, initialize, prerender" + + + + + requiredTxCustomizer + + + + + traceCustomizer + + + + + + "app_aop.actionSupportInterceptor" + + "do.*, initialize, prerender" + + + + + + + traceCustomizer + + + requiredTxCustomizer + + + + + traceCustomizer + + + + + traceCustomizer + + + s2DaoCustomizer + + + + + traceCustomizer + + + s2DxoCustomizer + + + + + traceCustomizer + + + Added: pompei/trunk/src/main/resources/data/demo.sql =================================================================== --- pompei/trunk/src/main/resources/data/demo.sql 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/resources/data/demo.sql 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,21 @@ +CREATE TABLE EMP(ID NUMERIC(8,0) NOT NULL PRIMARY KEY, EMP_NO NUMERIC(4,0) NOT NULL ,EMP_NAME VARCHAR(20),MGR_ID NUMERIC(8,0),HIREDATE DATE,SAL NUMERIC(7,2),DEPT_ID NUMERIC(8,0), VERSION_NO NUMERIC(8)); +CREATE TABLE DEPT(ID NUMERIC(8,0) NOT NULL PRIMARY KEY, DEPT_NO NUMERIC(2,0) NOT NULL,DEPT_NAME VARCHAR(20),LOC VARCHAR(20), VERSION_NO NUMERIC(8,0)); + +INSERT INTO EMP VALUES(1,7369,'SMITH',13,'1980-12-17',800,2,1); +INSERT INTO EMP VALUES(2,7499,'ALLEN',6,'1981-02-20',1600,3,1); +INSERT INTO EMP VALUES(3,7521,'WARD',6,'1981-02-22',1250,3,1); +INSERT INTO EMP VALUES(4,7566,'JONES',9,'1981-04-02',2975,2,1); +INSERT INTO EMP VALUES(5,7654,'MARTIN',6,'1981-09-28',1250,3,1); +INSERT INTO EMP VALUES(6,7698,'BLAKE',9,'1981-05-01',2850,3,1); +INSERT INTO EMP VALUES(7,7782,'CLARK',9,'1981-06-09',2450,1,1); +INSERT INTO EMP VALUES(8,7788,'SCOTT',4,'1982-12-09',3000.0,2,1); +INSERT INTO EMP VALUES(9,7839,'KING',NULL,'1981-11-17',5000,1,1); +INSERT INTO EMP VALUES(10,7844,'TURNER',6,'1981-09-08',1500,3,1); +INSERT INTO EMP VALUES(11,7876,'ADAMS',8,'1983-01-12',1100,2,1); +INSERT INTO EMP VALUES(12,7900,'JAMES',6,'1981-12-03',950,3,1); +INSERT INTO EMP VALUES(13,7902,'FORD',4,'1981-12-03',3000,2,1); +INSERT INTO EMP VALUES(14,7934,'MILLER',7,'1982-01-23',1300,1,1); +INSERT INTO DEPT VALUES(1,10,'ACCOUNTING','NEW YORK',1); +INSERT INTO DEPT VALUES(2,20,'RESEARCH','DALLAS',1); +INSERT INTO DEPT VALUES(3,30,'SALES','CHICAGO',1); +INSERT INTO DEPT VALUES(4,40,'OPERATIONS','BOSTON',1); \ No newline at end of file Added: pompei/trunk/src/main/resources/dbflute.dicon =================================================================== --- pompei/trunk/src/main/resources/dbflute.dicon 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/resources/dbflute.dicon 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,590 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + dbflute.interceptor + + + + requiresNewTx + requiredTx + + + + + + + dbflute.interceptor + + + + requiresNewTx + requiredTx + + + + + + + dbflute.interceptor + + + + requiresNewTx + requiredTx + + + + + + + dbflute.interceptor + + + + requiresNewTx + requiredTx + + + + + + + dbflute.interceptor + + + + requiresNewTx + requiredTx + + + + + + + dbflute.interceptor + + + + requiresNewTx + requiredTx + + + + + + + dbflute.interceptor + + + + requiresNewTx + requiredTx + + + + + + + dbflute.interceptor + + + + requiresNewTx + requiredTx + + + + + + + dbflute.interceptor + + + + requiresNewTx + requiredTx + + + + + + + dbflute.interceptor + + + + requiresNewTx + requiredTx + + + + + + + dbflute.interceptor + + + + requiresNewTx + requiredTx + + + + + + + dbflute.interceptor + + + + requiresNewTx + requiredTx + + + + + + + dbflute.interceptor + + + + requiresNewTx + requiredTx + + + + + + + dbflute.interceptor + + + + requiresNewTx + requiredTx + + + + + + + dbflute.interceptor + + + + requiresNewTx + requiredTx + + + + + + + dbflute.interceptor + + + + requiresNewTx + requiredTx + + + + + + + dbflute.interceptor + + + + requiresNewTx + requiredTx + + + + + + + dbflute.interceptor + + + + requiresNewTx + requiredTx + + + + + + + dbflute.interceptor + + + + requiresNewTx + requiredTx + + + + + + + dbflute.interceptor + + + + requiresNewTx + requiredTx + + + + + + + dbflute.interceptor + + + + requiresNewTx + requiredTx + + + + + + + dbflute.interceptor + + + + requiresNewTx + requiredTx + + + + + + + dbflute.interceptor + + + + requiresNewTx + requiredTx + + + + + + + dbflute.interceptor + + + + requiresNewTx + requiredTx + + + + + + + dbflute.interceptor + + + + requiresNewTx + requiredTx + + + + + + + dbflute.interceptor + + + + requiresNewTx + requiredTx + + + + + + + dbflute.interceptor + + + + requiresNewTx + requiredTx + + + + + + + dbflute.interceptor + + + + requiresNewTx + requiredTx + + + + + + + dbflute.interceptor + + + + requiresNewTx + requiredTx + + + + + + + dbflute.interceptor + + + + requiresNewTx + requiredTx + + + + + + + dbflute.interceptor + + + + requiresNewTx + requiredTx + + + + + + + dbflute.interceptor + + + + requiresNewTx + requiredTx + + + + + + + dbflute.interceptor + + + + requiresNewTx + requiredTx + + + + + + + dbflute.interceptor + + + + requiresNewTx + requiredTx + + + + + + + dbflute.interceptor + + + + requiresNewTx + requiredTx + + + + + + + dbflute.interceptor + + + + requiresNewTx + requiredTx + + + + + + + dbflute.interceptor + + + + requiresNewTx + requiredTx + + + + + + + dbflute.interceptor + + + + requiresNewTx + requiredTx + + + + + + + dbflute.interceptor + + + + requiresNewTx + requiredTx + + + + + + + dbflute.interceptor + + + + requiresNewTx + requiredTx + + + + + + + dbflute.interceptor + + + + requiresNewTx + requiredTx + + + + + + + dbflute.interceptor + + + + requiresNewTx + requiredTx + + + + + + + dbflute.interceptor + + + + requiresNewTx + requiredTx + + + + + + + dbflute.interceptor + + + + requiresNewTx + requiredTx + + + + + + + dbflute.interceptor + + + + requiresNewTx + requiredTx + + + + + + + dbflute.interceptor + + + + requiresNewTx + requiredTx + + + + + Added: pompei/trunk/src/main/resources/env.txt =================================================================== --- pompei/trunk/src/main/resources/env.txt 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/resources/env.txt 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1 @@ +ct \ No newline at end of file Added: pompei/trunk/src/main/resources/env_ut.txt =================================================================== --- pompei/trunk/src/main/resources/env_ut.txt 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/resources/env_ut.txt 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1 @@ +ut \ No newline at end of file Added: pompei/trunk/src/main/resources/jdbc.dicon =================================================================== --- pompei/trunk/src/main/resources/jdbc.dicon 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/resources/jdbc.dicon 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,157 @@ + + + + + + + + + + + + 100 + + + + + + + "org.apache.derby.jdbc.EmbeddedDriver" + + + "jdbc:derby:directory:" + container.getComponent(@java.lang.Class △ forName("javax.servlet.ServletContext")).getRealPath("/WEB-INF/db/pompei") + + "" + "" + + + + + + + + + + + + + + + + + 600 + 10 + true + + + + + + + + + + \ No newline at end of file Added: pompei/trunk/src/main/resources/log4j.properties =================================================================== --- pompei/trunk/src/main/resources/log4j.properties 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/resources/log4j.properties 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,16 @@ +log4j.category.org.seasar=DEBUG, C +log4j.additivity.org.seasar=false + +log4j.category.jp.sf.pal.pompei=DEBUG, C +log4j.additivity.jp.sf.pal.pompei=false + +log4j.appender.C=org.apache.log4j.ConsoleAppender +log4j.appender.C.Target=System.out +log4j.appender.C.ImmediateFlush=true +log4j.appender.C.layout=org.apache.log4j.PatternLayout +log4j.appender.C.layout.ConversionPattern=%-5p %d [%t] %m%n + +log4j.rootLogger=INFO, A1 +log4j.appender.A1=org.apache.log4j.ConsoleAppender +log4j.appender.A1.layout=org.apache.log4j.PatternLayout +log4j.appender.A1.layout.ConversionPattern=%d [%t] %-5p %c - %m%n Added: pompei/trunk/src/main/resources/s2container.dicon =================================================================== --- pompei/trunk/src/main/resources/s2container.dicon 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/resources/s2container.dicon 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,8 @@ + + + + + + + \ No newline at end of file Added: pompei/trunk/src/main/resources/teedaCustomize.dicon =================================================================== --- pompei/trunk/src/main/resources/teedaCustomize.dicon 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/resources/teedaCustomize.dicon 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,8 @@ + + + + + + + Added: pompei/trunk/src/main/resources/teedaErrorPage.dicon =================================================================== --- pompei/trunk/src/main/resources/teedaErrorPage.dicon 2007-07-10 08:51:31 UTC (rev 213) +++ pompei/trunk/src/main/resources/teedaErrorPage.dicon 2007-07-10 09:09:05 UTC (rev 214) @@ -0,0 +1,12 @@ + + + + + + + @java.lang.Throwable △ class + "/view/error/error.html" + + + \ No newline at end of file From svnnotify △ sourceforge.jp Tue Jul 10 21:31:36 2007 From: svnnotify △ sourceforge.jp (svnnotify △ sourceforge.jp) Date: Tue, 10 Jul 2007 21:31:36 +0900 Subject: [pal-cvs 2483] [215] added html source Message-ID: <20070710123136.D80D82AC02E@users.sourceforge.jp> Revision: 215 http://svn.sourceforge.jp/cgi-bin/viewcvs.cgi?root=pal&view=rev&rev=215 Author: takeharu Date: 2007-07-10 21:31:36 +0900 (Tue, 10 Jul 2007) Log Message: ----------- added html source Added Paths: ----------- pompei/trunk/src/main/webapp/view/ pompei/trunk/src/main/webapp/view/sample/ pompei/trunk/src/main/webapp/view/sample/add.html pompei/trunk/src/main/webapp/view/sample/sample.html -------------- next part -------------- Added: pompei/trunk/src/main/webapp/view/sample/add.html =================================================================== --- pompei/trunk/src/main/webapp/view/sample/add.html 2007-07-10 09:09:05 UTC (rev 214) +++ pompei/trunk/src/main/webapp/view/sample/add.html 2007-07-10 12:31:36 UTC (rev 215) @@ -0,0 +1,10 @@ + + + + + +add + + + + \ No newline at end of file Added: pompei/trunk/src/main/webapp/view/sample/sample.html =================================================================== --- pompei/trunk/src/main/webapp/view/sample/sample.html 2007-07-10 09:09:05 UTC (rev 214) +++ pompei/trunk/src/main/webapp/view/sample/sample.html 2007-07-10 12:31:36 UTC (rev 215) @@ -0,0 +1,32 @@ + + + + + +Sample + + +
+ + hello
+
+ +
+
+ + +
+ hoge, + fuga
+
+ + + + +
+ +
+ \ No newline at end of file From svnnotify △ sourceforge.jp Tue Jul 10 21:32:04 2007 From: svnnotify △ sourceforge.jp (svnnotify △ sourceforge.jp) Date: Tue, 10 Jul 2007 21:32:04 +0900 Subject: [pal-cvs 2484] [216] added html source Message-ID: <20070710123204.C546F2AC010@users.sourceforge.jp> Revision: 216 http://svn.sourceforge.jp/cgi-bin/viewcvs.cgi?root=pal&view=rev&rev=216 Author: takeharu Date: 2007-07-10 21:32:04 +0900 (Tue, 10 Jul 2007) Log Message: ----------- added html source Added Paths: ----------- pompei/trunk/src/main/webapp/view/error/ pompei/trunk/src/main/webapp/view/error/error.html -------------- next part -------------- Added: pompei/trunk/src/main/webapp/view/error/error.html =================================================================== --- pompei/trunk/src/main/webapp/view/error/error.html 2007-07-10 12:31:36 UTC (rev 215) +++ pompei/trunk/src/main/webapp/view/error/error.html 2007-07-10 12:32:04 UTC (rev 216) @@ -0,0 +1,14 @@ + + + + + +AppFacesException Error Page + + +
+ +
+
+ + \ No newline at end of file From svnnotify △ sourceforge.jp Tue Jul 10 21:34:46 2007 From: svnnotify △ sourceforge.jp (svnnotify △ sourceforge.jp) Date: Tue, 10 Jul 2007 21:34:46 +0900 Subject: [pal-cvs 2485] [217] added pompei database Message-ID: <20070710123446.331E22AC01C@users.sourceforge.jp> Revision: 217 http://svn.sourceforge.jp/cgi-bin/viewcvs.cgi?root=pal&view=rev&rev=217 Author: takeharu Date: 2007-07-10 21:34:38 +0900 (Tue, 10 Jul 2007) Log Message: ----------- added pompei database Added Paths: ----------- pompei/trunk/src/main/webapp/WEB-INF/db/ pompei/trunk/src/main/webapp/WEB-INF/db/create_table.sql pompei/trunk/src/main/webapp/WEB-INF/db/insert_sample_data.sql pompei/trunk/src/main/webapp/WEB-INF/db/pompei/ pompei/trunk/src/main/webapp/WEB-INF/db/pompei/db.lck pompei/trunk/src/main/webapp/WEB-INF/db/pompei/log/ pompei/trunk/src/main/webapp/WEB-INF/db/pompei/log/log.ctrl pompei/trunk/src/main/webapp/WEB-INF/db/pompei/log/log1.dat pompei/trunk/src/main/webapp/WEB-INF/db/pompei/log/logmirror.ctrl pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/ pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c10.dat pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c101.dat pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c111.dat pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c121.dat pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c130.dat pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c141.dat pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c150.dat pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c161.dat pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c171.dat pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c180.dat pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c191.dat pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c1a1.dat pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c1b1.dat pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c1c0.dat pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c1d1.dat pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c1e0.dat pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c1f1.dat pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c20.dat pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c200.dat pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c211.dat pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c221.dat pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c230.dat pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c241.dat pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c251.dat pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c260.dat pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c271.dat pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c281.dat pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c290.dat pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c2a1.dat pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c2b1.dat pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c2c1.dat pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c2d0.dat pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c2e1.dat pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c2f0.dat pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c300.dat pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c31.dat pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c311.dat pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c321.dat pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c331.dat pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c340.dat pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c351.dat pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c361.dat pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c371.dat pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c380.dat pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c391.dat pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c3a1.dat pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c3b1.dat pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c3c0.dat pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c3d1.dat pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c3e0.dat pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c3f1.dat pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c400.dat pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c41.dat pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c411.dat pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c420.dat pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c431.dat pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c440.dat pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c451.dat pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c460.dat pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c471.dat pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c480.dat pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c491.dat pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c4a0.dat pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c4b1.dat pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c4c0.dat pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c4d0.dat pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c4e0.dat pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c4f1.dat pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c500.dat pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c51.dat pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c511.dat pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c520.dat pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c531.dat pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c540.dat pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c551.dat pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c560.dat pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c571.dat pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c580.dat pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c591.dat pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c5a0.dat pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c5b1.dat pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c5c0.dat pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c5d1.dat pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c5e0.dat pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c5f1.dat pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c60.dat pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c600.dat pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c611.dat pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c620.dat pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c631.dat pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c640.dat pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c651.dat pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c660.dat pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c671.dat pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c680.dat pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c691.dat pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c6a0.dat pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c6b1.dat pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c6c0.dat pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c6d1.dat pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c6e0.dat pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c6f1.dat pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c700.dat pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c71.dat pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c711.dat pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c720.dat pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c731.dat pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c740.dat pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c751.dat pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c760.dat pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c771.dat pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c780.dat pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c791.dat pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c7a0.dat pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c7b1.dat pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c7c0.dat pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c7d1.dat pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c7e0.dat pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c7f1.dat pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c800.dat pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c81.dat pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c811.dat pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c820.dat pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c831.dat pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c840.dat pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c851.dat pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c860.dat pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c871.dat pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c880.dat pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c891.dat pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c8a0.dat pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c8b1.dat pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c8c0.dat pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c8d1.dat pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c8e0.dat pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c8f1.dat pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c90.dat pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c900.dat pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c910.dat pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c921.dat pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c930.dat pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c941.dat pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/ca1.dat pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/cb1.dat pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/cc0.dat pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/cd1.dat pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/ce1.dat pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/cf0.dat pompei/trunk/src/main/webapp/WEB-INF/db/pompei/service.properties pompei/trunk/src/main/webapp/WEB-INF/db/pompei/tmp/ -------------- next part -------------- Added: pompei/trunk/src/main/webapp/WEB-INF/db/create_table.sql =================================================================== --- pompei/trunk/src/main/webapp/WEB-INF/db/create_table.sql 2007-07-10 12:32:04 UTC (rev 216) +++ pompei/trunk/src/main/webapp/WEB-INF/db/create_table.sql 2007-07-10 12:34:38 UTC (rev 217) @@ -0,0 +1,536 @@ +DROP TABLE address_book; +CREATE TABLE address_book ( + address_book_id int NOT NULL, + customers_id int NOT NULL, + entry_gender char(1) NOT NULL, + entry_company varchar(32), + entry_firstname varchar(32) NOT NULL, + entry_lastname varchar(32) NOT NULL, + entry_street_address varchar(64) NOT NULL, + entry_suburb varchar(32), + entry_postcode varchar(10) NOT NULL, + entry_city varchar(32) NOT NULL, + entry_state varchar(32), + entry_country_id int DEFAULT 0 NOT NULL, + entry_zone_id int DEFAULT 0 NOT NULL, + PRIMARY KEY (address_book_id) +); + +DROP TABLE address_format; +CREATE TABLE address_format ( + address_format_id int NOT NULL, + address_format varchar(128) NOT NULL, + address_summary varchar(48) NOT NULL, + PRIMARY KEY (address_format_id) +); + +DROP TABLE banners; +CREATE TABLE banners ( + banners_id int NOT NULL, + banners_title varchar(64) NOT NULL, + banners_url varchar(255) NOT NULL, + banners_image varchar(64) NOT NULL, + banners_group varchar(10) NOT NULL, + banners_html_text LONG VARCHAR, + expires_impressions int DEFAULT 0, + expires_date TIMESTAMP DEFAULT NULL, + date_scheduled TIMESTAMP DEFAULT NULL, + date_added TIMESTAMP NOT NULL, + date_status_change TIMESTAMP DEFAULT NULL, + status int DEFAULT 1 NOT NULL, + PRIMARY KEY (banners_id) +); + +DROP TABLE banners_history; +CREATE TABLE banners_history ( + banners_history_id int NOT NULL, + banners_id int NOT NULL, + banners_shown int NOT NULL DEFAULT 0, + banners_clicked int NOT NULL DEFAULT 0, + banners_history_date TIMESTAMP NOT NULL, + PRIMARY KEY (banners_history_id) +); + +DROP TABLE categories; +CREATE TABLE categories ( + categories_id int NOT NULL, + categories_image varchar(64), + parent_id int DEFAULT 0 NOT NULL, + sort_order int, + date_added TIMESTAMP, + last_modified TIMESTAMP, + PRIMARY KEY (categories_id) +); + +DROP TABLE categories_description; +CREATE TABLE categories_description ( + categories_id int DEFAULT 0 NOT NULL, + language_id int DEFAULT 1 NOT NULL, + categories_name varchar(32) NOT NULL, + PRIMARY KEY (categories_id, language_id) +); + +DROP TABLE configuration; +CREATE TABLE configuration ( + configuration_id int NOT NULL, + configuration_title varchar(64) NOT NULL, + configuration_key varchar(64) NOT NULL, + configuration_value varchar(255) NOT NULL, + configuration_description varchar(255) NOT NULL, + configuration_group_id int NOT NULL, + sort_order int, + last_modified TIMESTAMP, + date_added TIMESTAMP NOT NULL, + use_function varchar(255), + set_function varchar(255), + PRIMARY KEY (configuration_id) +); + +DROP TABLE configuration_group; +CREATE TABLE configuration_group ( + configuration_group_id int NOT NULL, + configuration_group_title varchar(64) NOT NULL, + configuration_group_description varchar(255) NOT NULL, + sort_order int, + visible int DEFAULT 1, + PRIMARY KEY (configuration_group_id) +); + +DROP TABLE counter; +CREATE TABLE counter ( + startdate char(8), + counter int +); + +DROP TABLE counter_history; +CREATE TABLE counter_history ( + month char(8), + counter int +); + +DROP TABLE countries; +CREATE TABLE countries ( + countries_id int NOT NULL, + countries_name varchar(64) NOT NULL, + countries_iso_code_2 char(2) NOT NULL, + countries_iso_code_3 char(3) NOT NULL, + address_format_id int NOT NULL, + PRIMARY KEY (countries_id) +); + +DROP TABLE currencies; +CREATE TABLE currencies ( + currencies_id int NOT NULL, + title varchar(32) NOT NULL, + code char(3) NOT NULL, + symbol_left varchar(12), + symbol_right varchar(12), + decimal_point char(1), + thousands_point char(1), + decimal_places char(1), + value float, + last_updated TIMESTAMP, + PRIMARY KEY (currencies_id) +); + +DROP TABLE customers; +CREATE TABLE customers ( + customers_id int NOT NULL, + customers_gender char(1) NOT NULL, + customers_firstname varchar(32) NOT NULL, + customers_lastname varchar(32) NOT NULL, + customers_dob TIMESTAMP DEFAULT '0000-00-00 00:00:00' NOT NULL, + customers_email_address varchar(96) NOT NULL, + customers_default_address_id int, + customers_telephone varchar(32) NOT NULL, + customers_fax varchar(32), + customers_password varchar(40) NOT NULL, + customers_newsletter char(1), + PRIMARY KEY (customers_id) +); + +DROP TABLE customers_basket; +CREATE TABLE customers_basket ( + customers_basket_id int NOT NULL, + customers_id int NOT NULL, + products_id LONG VARCHAR NOT NULL, + customers_basket_quantity int NOT NULL, + final_price decimal(15,4), + customers_basket_date_added char(8), + PRIMARY KEY (customers_basket_id) +); + +DROP TABLE customers_basket_attributes; +CREATE TABLE customers_basket_attributes ( + customers_basket_attributes_id int NOT NULL, + customers_id int NOT NULL, + products_id LONG VARCHAR NOT NULL, + products_options_id int NOT NULL, + products_options_value_id int NOT NULL, + PRIMARY KEY (customers_basket_attributes_id) +); + +DROP TABLE customers_info; +CREATE TABLE customers_info ( + customers_info_id int NOT NULL, + customers_info_date_of_last_logon TIMESTAMP, + customers_info_number_of_logons int, + customers_info_date_account_created TIMESTAMP, + customers_info_date_account_last_modified TIMESTAMP, + global_product_notifications int DEFAULT 0, + PRIMARY KEY (customers_info_id) +); + +DROP TABLE languages; +CREATE TABLE languages ( + languages_id int NOT NULL, + name varchar(32) NOT NULL, + code char(2) NOT NULL, + image varchar(64), + directory varchar(32), + sort_order int, + PRIMARY KEY (languages_id) +); + + +DROP TABLE manufacturers; +CREATE TABLE manufacturers ( + manufacturers_id int NOT NULL, + manufacturers_name varchar(32) NOT NULL, + manufacturers_image varchar(64), + date_added TIMESTAMP, + last_modified TIMESTAMP, + PRIMARY KEY (manufacturers_id) +); + +DROP TABLE manufacturers_info; +CREATE TABLE manufacturers_info ( + manufacturers_id int NOT NULL, + languages_id int NOT NULL, + manufacturers_url varchar(255) NOT NULL, + url_clicked int NOT NULL default 0, + date_last_click TIMESTAMP, + PRIMARY KEY (manufacturers_id, languages_id) +); + +DROP TABLE newsletters; +CREATE TABLE newsletters ( + newsletters_id int NOT NULL, + title varchar(255) NOT NULL, + content LONG VARCHAR NOT NULL, + module varchar(255) NOT NULL, + date_added TIMESTAMP NOT NULL, + date_sent TIMESTAMP, + status int, + locked int DEFAULT 0, + PRIMARY KEY (newsletters_id) +); + +DROP TABLE orders; +CREATE TABLE orders ( + orders_id int NOT NULL, + customers_id int NOT NULL, + customers_name varchar(64) NOT NULL, + customers_company varchar(32), + customers_street_address varchar(64) NOT NULL, + customers_suburb varchar(32), + customers_city varchar(32) NOT NULL, + customers_postcode varchar(10) NOT NULL, + customers_state varchar(32), + customers_country varchar(32) NOT NULL, + customers_telephone varchar(32) NOT NULL, + customers_email_address varchar(96) NOT NULL, + customers_address_format_id int NOT NULL, + delivery_name varchar(64) NOT NULL, + delivery_company varchar(32), + delivery_street_address varchar(64) NOT NULL, + delivery_suburb varchar(32), + delivery_city varchar(32) NOT NULL, + delivery_postcode varchar(10) NOT NULL, + delivery_state varchar(32), + delivery_country varchar(32) NOT NULL, + delivery_address_format_id int NOT NULL, + billing_name varchar(64) NOT NULL, + billing_company varchar(32), + billing_street_address varchar(64) NOT NULL, + billing_suburb varchar(32), + billing_city varchar(32) NOT NULL, + billing_postcode varchar(10) NOT NULL, + billing_state varchar(32), + billing_country varchar(32) NOT NULL, + billing_address_format_id int NOT NULL, + payment_method varchar(32) NOT NULL, + cc_type varchar(20), + cc_owner varchar(64), + cc_number varchar(32), + cc_expires varchar(4), + last_modified TIMESTAMP, + date_purchased TIMESTAMP, + orders_status int NOT NULL, + orders_date_finished TIMESTAMP, + currency char(3), + currency_value decimal(14,6), + PRIMARY KEY (orders_id) +); + +DROP TABLE orders_products; +CREATE TABLE orders_products ( + orders_products_id int NOT NULL, + orders_id int NOT NULL, + products_id int NOT NULL, + products_model varchar(12), + products_name varchar(64) NOT NULL, + products_price decimal(15,4) NOT NULL, + final_price decimal(15,4) NOT NULL, + products_tax decimal(7,4) NOT NULL, + products_quantity int NOT NULL, + PRIMARY KEY (orders_products_id) +); + +DROP TABLE orders_status; +CREATE TABLE orders_status ( + orders_status_id int DEFAULT 0 NOT NULL, + language_id int DEFAULT 1 NOT NULL, + orders_status_name varchar(32) NOT NULL, + PRIMARY KEY (orders_status_id, language_id) +); + +DROP TABLE orders_status_history; +CREATE TABLE orders_status_history ( + orders_status_history_id int NOT NULL, + orders_id int NOT NULL, + orders_status_id int NOT NULL, + date_added TIMESTAMP NOT NULL, + customer_notified int DEFAULT 0, + comments LONG VARCHAR, + PRIMARY KEY (orders_status_history_id) +); + +DROP TABLE orders_products_attributes; +CREATE TABLE orders_products_attributes ( + orders_products_attributes_id int NOT NULL, + orders_id int NOT NULL, + orders_products_id int NOT NULL, + products_options varchar(32) NOT NULL, + products_options_values varchar(32) NOT NULL, + options_values_price decimal(15,4) NOT NULL, + price_prefix char(1) NOT NULL, + PRIMARY KEY (orders_products_attributes_id) +); + +DROP TABLE orders_products_download; +CREATE TABLE orders_products_download ( + orders_products_download_id int NOT NULL, + orders_id int NOT NULL default 0, + orders_products_id int NOT NULL default 0, + orders_products_filename varchar(255) NOT NULL default '', + download_maxdays int NOT NULL default 0, + download_count int NOT NULL default 0, + PRIMARY KEY (orders_products_download_id) +); + +DROP TABLE orders_total; +CREATE TABLE orders_total ( + orders_total_id int NOT NULL, + orders_id int NOT NULL, + title varchar(255) NOT NULL, + text varchar(255) NOT NULL, + value decimal(15,4) NOT NULL, + ot_class varchar(32) NOT NULL, + sort_order int NOT NULL, + PRIMARY KEY (orders_total_id) +); + +DROP TABLE products; +CREATE TABLE products ( + products_id int NOT NULL, + products_quantity int NOT NULL, + products_model varchar(12), + products_image varchar(64), + products_price decimal(15,4) NOT NULL, + products_date_added TIMESTAMP NOT NULL, + products_last_modified TIMESTAMP, + products_date_available TIMESTAMP, + products_weight decimal(5,2) NOT NULL, + products_status int NOT NULL, + products_tax_class_id int NOT NULL, + manufacturers_id int, + products_ordered int NOT NULL default 0, + PRIMARY KEY (products_id) +); + +DROP TABLE products_attributes; +CREATE TABLE products_attributes ( + products_attributes_id int NOT NULL, + products_id int NOT NULL, + options_id int NOT NULL, + options_values_id int NOT NULL, + options_values_price decimal(15,4) NOT NULL, + price_prefix char(1) NOT NULL, + PRIMARY KEY (products_attributes_id) +); + +DROP TABLE products_attributes_download; +CREATE TABLE products_attributes_download ( + products_attributes_id int NOT NULL, + products_attributes_filename varchar(255) NOT NULL default '', + products_attributes_maxdays int default 0, + products_attributes_maxcount int default 0, + PRIMARY KEY (products_attributes_id) +); + +DROP TABLE products_description; +CREATE TABLE products_description ( + products_id int NOT NULL, + language_id int NOT NULL default 1, + products_name varchar(64) NOT NULL default '', + products_description LONG VARCHAR, + products_url varchar(255), + products_viewed int default 0, + PRIMARY KEY (products_id,language_id) +); + +DROP TABLE products_notifications; +CREATE TABLE products_notifications ( + products_id int NOT NULL, + customers_id int NOT NULL, + date_added TIMESTAMP NOT NULL, + PRIMARY KEY (products_id, customers_id) +); + +DROP TABLE products_options; +CREATE TABLE products_options ( + products_options_id int NOT NULL default 0, + language_id int NOT NULL default 1, + products_options_name varchar(32) NOT NULL default '', + PRIMARY KEY (products_options_id,language_id) +); + +DROP TABLE products_options_values; +CREATE TABLE products_options_values ( + products_options_values_id int NOT NULL default 0, + language_id int NOT NULL default 1, + products_options_values_name varchar(64) NOT NULL default '', + PRIMARY KEY (products_options_values_id,language_id) +); + +DROP TABLE products_options_values_to_products_options; +CREATE TABLE products_options_values_to_products_options ( + products_options_values_to_products_options_id int NOT NULL, + products_options_id int NOT NULL, + products_options_values_id int NOT NULL, + PRIMARY KEY (products_options_values_to_products_options_id) +); + +DROP TABLE products_to_categories; +CREATE TABLE products_to_categories ( + products_id int NOT NULL, + categories_id int NOT NULL, + PRIMARY KEY (products_id,categories_id) +); + +DROP TABLE reviews; +CREATE TABLE reviews ( + reviews_id int NOT NULL, + products_id int NOT NULL, + customers_id int, + customers_name varchar(64) NOT NULL, + reviews_rating int, + date_added TIMESTAMP, + last_modified TIMESTAMP, + reviews_read int NOT NULL default 0, + PRIMARY KEY (reviews_id) +); + +DROP TABLE reviews_description; +CREATE TABLE reviews_description ( + reviews_id int NOT NULL, + languages_id int NOT NULL, + reviews_text LONG VARCHAR NOT NULL, + PRIMARY KEY (reviews_id, languages_id) +); + +DROP TABLE sessions; +CREATE TABLE sessions ( + sesskey varchar(32) NOT NULL, + expiry int NOT NULL, + value LONG VARCHAR NOT NULL, + PRIMARY KEY (sesskey) +); + +DROP TABLE specials; +CREATE TABLE specials ( + specials_id int NOT NULL, + products_id int NOT NULL, + specials_new_products_price decimal(15,4) NOT NULL, + specials_date_added TIMESTAMP, + specials_last_modified TIMESTAMP, + expires_date TIMESTAMP, + date_status_change TIMESTAMP, + status int NOT NULL DEFAULT 1, + PRIMARY KEY (specials_id) +); + +DROP TABLE tax_class; +CREATE TABLE tax_class ( + tax_class_id int NOT NULL, + tax_class_title varchar(32) NOT NULL, + tax_class_description varchar(255) NOT NULL, + last_modified TIMESTAMP, + date_added TIMESTAMP NOT NULL, + PRIMARY KEY (tax_class_id) +); + +DROP TABLE tax_rates; +CREATE TABLE tax_rates ( + tax_rates_id int NOT NULL, + tax_zone_id int NOT NULL, + tax_class_id int NOT NULL, + tax_priority int DEFAULT 1, + tax_rate decimal(7,4) NOT NULL, + tax_description varchar(255) NOT NULL, + last_modified TIMESTAMP, + date_added TIMESTAMP NOT NULL, + PRIMARY KEY (tax_rates_id) +); + +DROP TABLE geo_zones; +CREATE TABLE geo_zones ( + geo_zone_id int NOT NULL, + geo_zone_name varchar(32) NOT NULL, + geo_zone_description varchar(255) NOT NULL, + last_modified TIMESTAMP, + date_added TIMESTAMP NOT NULL, + PRIMARY KEY (geo_zone_id) +); + +DROP TABLE whos_online; +CREATE TABLE whos_online ( + customer_id int, + full_name varchar(64) NOT NULL, + session_id varchar(128) NOT NULL, + ip_address varchar(15) NOT NULL, + time_entry varchar(14) NOT NULL, + time_last_click varchar(14) NOT NULL, + last_page_url varchar(255) NOT NULL +); + +DROP TABLE zones; +CREATE TABLE zones ( + zone_id int NOT NULL, + zone_country_id int NOT NULL, + zone_code varchar(32) NOT NULL, + zone_name varchar(32) NOT NULL, + PRIMARY KEY (zone_id) +); + +DROP TABLE zones_to_geo_zones; +CREATE TABLE zones_to_geo_zones ( + association_id int NOT NULL, + zone_country_id int NOT NULL, + zone_id int, + geo_zone_id int, + last_modified TIMESTAMP, + date_added TIMESTAMP NOT NULL, + PRIMARY KEY (association_id) +); Added: pompei/trunk/src/main/webapp/WEB-INF/db/insert_sample_data.sql =================================================================== --- pompei/trunk/src/main/webapp/WEB-INF/db/insert_sample_data.sql 2007-07-10 12:32:04 UTC (rev 216) +++ pompei/trunk/src/main/webapp/WEB-INF/db/insert_sample_data.sql 2007-07-10 12:34:38 UTC (rev 217) @@ -0,0 +1,33 @@ + + +--ADDRESS_BOOK +--INSERT INTO address_book VALUES ( 1, 1, 'm', 'ACME Inc.', 'John', 'Doe', '1 Way Street', '', '12345', 'NeverNever', '', 223, 12); + +--PRODUCTS +INSERT INTO products VALUES (1,32,'MG200MMS','matrox/mg200mms.gif',299.99, CURRENT_TIMESTAMP,null,null,23.00,1,1,1,0); +INSERT INTO products VALUES (2,32,'MG400-32MB','matrox/mg400-32mb.gif',499.99, CURRENT_TIMESTAMP,null,null,23.00,1,1,1,0); +INSERT INTO products VALUES (3,2,'MSIMPRO','microsoft/msimpro.gif',49.99, CURRENT_TIMESTAMP,null,null,7.00,1,1,3,0); +INSERT INTO products VALUES (4,13,'DVD-RPMK','dvd/replacement_killers.gif',42.00, CURRENT_TIMESTAMP,null,null,23.00,1,1,2,0); +INSERT INTO products VALUES (5,17,'DVD-BLDRNDC','dvd/blade_runner.gif',35.99, CURRENT_TIMESTAMP,null,null,7.00,1,1,3,0); +INSERT INTO products VALUES (6,10,'DVD-MATR','dvd/the_matrix.gif',39.99, CURRENT_TIMESTAMP,null,null,7.00,1,1,3,0); +INSERT INTO products VALUES (7,10,'DVD-YGEM','dvd/youve_got_mail.gif',34.99, CURRENT_TIMESTAMP,null,null,7.00,1,1,3,0); +INSERT INTO products VALUES (8,10,'DVD-ABUG','dvd/a_bugs_life.gif',35.99, CURRENT_TIMESTAMP,null,null,7.00,1,1,3,0); +INSERT INTO products VALUES (9,10,'DVD-UNSG','dvd/under_siege.gif',29.99, CURRENT_TIMESTAMP,null,null,7.00,1,1,3,0); +INSERT INTO products VALUES (10,10,'DVD-UNSG2','dvd/under_siege2.gif',29.99, CURRENT_TIMESTAMP,null,null,7.00,1,1,3,0); +INSERT INTO products VALUES (11,10,'DVD-FDBL','dvd/fire_down_below.gif',29.99, CURRENT_TIMESTAMP,null,null,7.00,1,1,3,0); +INSERT INTO products VALUES (12,10,'DVD-DHWV','dvd/die_hard_3.gif',39.99, CURRENT_TIMESTAMP,null,null,7.00,1,1,4,0); +INSERT INTO products VALUES (13,10,'DVD-LTWP','dvd/lethal_weapon.gif',34.99, CURRENT_TIMESTAMP,null,null,7.00,1,1,3,0); +INSERT INTO products VALUES (14,10,'DVD-REDC','dvd/red_corner.gif',32.00, CURRENT_TIMESTAMP,null,null,7.00,1,1,3,0); +INSERT INTO products VALUES (15,10,'DVD-FRAN','dvd/frantic.gif',35.00, CURRENT_TIMESTAMP,null,null,7.00,1,1,3,0); +INSERT INTO products VALUES (16,10,'DVD-CUFI','dvd/courage_under_fire.gif',38.99, CURRENT_TIMESTAMP,null,null,7.00,1,1,4,0); +INSERT INTO products VALUES (17,10,'DVD-SPEED','dvd/speed.gif',39.99, CURRENT_TIMESTAMP,null,null,7.00,1,1,4,0); +INSERT INTO products VALUES (18,10,'DVD-SPEED2','dvd/speed_2.gif',42.00, CURRENT_TIMESTAMP,null,null,7.00,1,1,4,0); +INSERT INTO products VALUES (19,10,'DVD-TSAB','dvd/theres_something_about_mary.gif',49.99, CURRENT_TIMESTAMP,null,null,7.00,1,1,4,0); +INSERT INTO products VALUES (20,10,'DVD-BELOVED','dvd/beloved.gif',54.99, CURRENT_TIMESTAMP,null,null,7.00,1,1,3,0); +INSERT INTO products VALUES (21,16,'PC-SWAT3','sierra/swat_3.gif',79.99, CURRENT_TIMESTAMP,null,null,7.00,1,1,7,0); +INSERT INTO products VALUES (22,13,'PC-UNTM','gt_interactive/unreal_tournament.gif',89.99, CURRENT_TIMESTAMP,null,null,7.00,1,1,8,0); +INSERT INTO products VALUES (23,16,'PC-TWOF','gt_interactive/wheel_of_time.gif',99.99, CURRENT_TIMESTAMP,null,null,10.00,1,1,8,0); +INSERT INTO products VALUES (24,17,'PC-DISC','gt_interactive/disciples.gif',90.00, CURRENT_TIMESTAMP,null,null,8.00,1,1,8,0); +INSERT INTO products VALUES (25,16,'MSINTKB','microsoft/intkeyboardps2.gif',69.99, CURRENT_TIMESTAMP,null,null,8.00,1,1,2,0); +INSERT INTO products VALUES (26,10,'MSIMEXP','microsoft/imexplorer.gif',64.95, CURRENT_TIMESTAMP,null,null,8.00,1,1,2,0); +INSERT INTO products VALUES (27,8,'HPLJ1100XI','hewlett_packard/lj1100xi.gif',499.99, CURRENT_TIMESTAMP,null,null,45.00,1,1,9,0); Added: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/db.lck =================================================================== (Binary files differ) Property changes on: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/db.lck ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/log/log.ctrl =================================================================== (Binary files differ) Property changes on: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/log/log.ctrl ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/log/log1.dat =================================================================== (Binary files differ) Property changes on: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/log/log1.dat ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/log/logmirror.ctrl =================================================================== (Binary files differ) Property changes on: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/log/logmirror.ctrl ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c10.dat =================================================================== (Binary files differ) Property changes on: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c10.dat ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c101.dat =================================================================== (Binary files differ) Property changes on: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c101.dat ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c111.dat =================================================================== (Binary files differ) Property changes on: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c111.dat ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c121.dat =================================================================== (Binary files differ) Property changes on: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c121.dat ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c130.dat =================================================================== (Binary files differ) Property changes on: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c130.dat ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c141.dat =================================================================== (Binary files differ) Property changes on: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c141.dat ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c150.dat =================================================================== (Binary files differ) Property changes on: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c150.dat ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c161.dat =================================================================== (Binary files differ) Property changes on: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c161.dat ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c171.dat =================================================================== (Binary files differ) Property changes on: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c171.dat ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c180.dat =================================================================== (Binary files differ) Property changes on: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c180.dat ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c191.dat =================================================================== (Binary files differ) Property changes on: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c191.dat ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c1a1.dat =================================================================== (Binary files differ) Property changes on: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c1a1.dat ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c1b1.dat =================================================================== (Binary files differ) Property changes on: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c1b1.dat ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c1c0.dat =================================================================== (Binary files differ) Property changes on: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c1c0.dat ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c1d1.dat =================================================================== (Binary files differ) Property changes on: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c1d1.dat ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c1e0.dat =================================================================== (Binary files differ) Property changes on: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c1e0.dat ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c1f1.dat =================================================================== (Binary files differ) Property changes on: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c1f1.dat ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c20.dat =================================================================== (Binary files differ) Property changes on: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c20.dat ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c200.dat =================================================================== (Binary files differ) Property changes on: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c200.dat ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c211.dat =================================================================== (Binary files differ) Property changes on: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c211.dat ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c221.dat =================================================================== (Binary files differ) Property changes on: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c221.dat ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c230.dat =================================================================== (Binary files differ) Property changes on: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c230.dat ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c241.dat =================================================================== (Binary files differ) Property changes on: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c241.dat ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c251.dat =================================================================== (Binary files differ) Property changes on: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c251.dat ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c260.dat =================================================================== (Binary files differ) Property changes on: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c260.dat ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c271.dat =================================================================== (Binary files differ) Property changes on: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c271.dat ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c281.dat =================================================================== (Binary files differ) Property changes on: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c281.dat ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c290.dat =================================================================== (Binary files differ) Property changes on: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c290.dat ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c2a1.dat =================================================================== (Binary files differ) Property changes on: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c2a1.dat ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c2b1.dat =================================================================== (Binary files differ) Property changes on: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c2b1.dat ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c2c1.dat =================================================================== (Binary files differ) Property changes on: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c2c1.dat ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c2d0.dat =================================================================== (Binary files differ) Property changes on: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c2d0.dat ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c2e1.dat =================================================================== (Binary files differ) Property changes on: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c2e1.dat ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c2f0.dat =================================================================== (Binary files differ) Property changes on: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c2f0.dat ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c300.dat =================================================================== (Binary files differ) Property changes on: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c300.dat ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c31.dat =================================================================== (Binary files differ) Property changes on: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c31.dat ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c311.dat =================================================================== (Binary files differ) Property changes on: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c311.dat ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c321.dat =================================================================== (Binary files differ) Property changes on: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c321.dat ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c331.dat =================================================================== (Binary files differ) Property changes on: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c331.dat ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c340.dat =================================================================== (Binary files differ) Property changes on: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c340.dat ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c351.dat =================================================================== (Binary files differ) Property changes on: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c351.dat ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c361.dat =================================================================== (Binary files differ) Property changes on: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c361.dat ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c371.dat =================================================================== (Binary files differ) Property changes on: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c371.dat ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c380.dat =================================================================== (Binary files differ) Property changes on: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c380.dat ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c391.dat =================================================================== (Binary files differ) Property changes on: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c391.dat ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c3a1.dat =================================================================== (Binary files differ) Property changes on: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c3a1.dat ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c3b1.dat =================================================================== (Binary files differ) Property changes on: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c3b1.dat ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c3c0.dat =================================================================== (Binary files differ) Property changes on: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c3c0.dat ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c3d1.dat =================================================================== (Binary files differ) Property changes on: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c3d1.dat ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c3e0.dat =================================================================== (Binary files differ) Property changes on: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c3e0.dat ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c3f1.dat =================================================================== (Binary files differ) Property changes on: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c3f1.dat ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c400.dat =================================================================== (Binary files differ) Property changes on: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c400.dat ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c41.dat =================================================================== (Binary files differ) Property changes on: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c41.dat ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c411.dat =================================================================== (Binary files differ) Property changes on: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c411.dat ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c420.dat =================================================================== (Binary files differ) Property changes on: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c420.dat ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c431.dat =================================================================== (Binary files differ) Property changes on: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c431.dat ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c440.dat =================================================================== (Binary files differ) Property changes on: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c440.dat ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c451.dat =================================================================== (Binary files differ) Property changes on: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c451.dat ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c460.dat =================================================================== (Binary files differ) Property changes on: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c460.dat ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c471.dat =================================================================== (Binary files differ) Property changes on: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c471.dat ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c480.dat =================================================================== (Binary files differ) Property changes on: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c480.dat ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c491.dat =================================================================== (Binary files differ) Property changes on: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c491.dat ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c4a0.dat =================================================================== (Binary files differ) Property changes on: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c4a0.dat ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c4b1.dat =================================================================== (Binary files differ) Property changes on: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c4b1.dat ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c4c0.dat =================================================================== (Binary files differ) Property changes on: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c4c0.dat ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c4d0.dat =================================================================== (Binary files differ) Property changes on: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c4d0.dat ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c4e0.dat =================================================================== (Binary files differ) Property changes on: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c4e0.dat ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c4f1.dat =================================================================== (Binary files differ) Property changes on: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c4f1.dat ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c500.dat =================================================================== (Binary files differ) Property changes on: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c500.dat ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c51.dat =================================================================== (Binary files differ) Property changes on: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c51.dat ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c511.dat =================================================================== (Binary files differ) Property changes on: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c511.dat ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c520.dat =================================================================== (Binary files differ) Property changes on: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c520.dat ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c531.dat =================================================================== (Binary files differ) Property changes on: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c531.dat ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c540.dat =================================================================== (Binary files differ) Property changes on: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c540.dat ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c551.dat =================================================================== (Binary files differ) Property changes on: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c551.dat ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c560.dat =================================================================== (Binary files differ) Property changes on: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c560.dat ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c571.dat =================================================================== (Binary files differ) Property changes on: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c571.dat ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c580.dat =================================================================== (Binary files differ) Property changes on: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c580.dat ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c591.dat =================================================================== (Binary files differ) Property changes on: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c591.dat ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c5a0.dat =================================================================== (Binary files differ) Property changes on: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c5a0.dat ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c5b1.dat =================================================================== (Binary files differ) Property changes on: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c5b1.dat ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c5c0.dat =================================================================== (Binary files differ) Property changes on: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c5c0.dat ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c5d1.dat =================================================================== (Binary files differ) Property changes on: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c5d1.dat ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c5e0.dat =================================================================== (Binary files differ) Property changes on: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c5e0.dat ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c5f1.dat =================================================================== (Binary files differ) Property changes on: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c5f1.dat ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c60.dat =================================================================== (Binary files differ) Property changes on: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c60.dat ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c600.dat =================================================================== (Binary files differ) Property changes on: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c600.dat ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c611.dat =================================================================== (Binary files differ) Property changes on: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c611.dat ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c620.dat =================================================================== (Binary files differ) Property changes on: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c620.dat ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c631.dat =================================================================== (Binary files differ) Property changes on: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c631.dat ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c640.dat =================================================================== (Binary files differ) Property changes on: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c640.dat ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c651.dat =================================================================== (Binary files differ) Property changes on: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c651.dat ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c660.dat =================================================================== (Binary files differ) Property changes on: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c660.dat ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c671.dat =================================================================== (Binary files differ) Property changes on: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c671.dat ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c680.dat =================================================================== (Binary files differ) Property changes on: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c680.dat ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c691.dat =================================================================== (Binary files differ) Property changes on: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c691.dat ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c6a0.dat =================================================================== (Binary files differ) Property changes on: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c6a0.dat ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c6b1.dat =================================================================== (Binary files differ) Property changes on: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c6b1.dat ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c6c0.dat =================================================================== (Binary files differ) Property changes on: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c6c0.dat ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c6d1.dat =================================================================== (Binary files differ) Property changes on: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c6d1.dat ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c6e0.dat =================================================================== (Binary files differ) Property changes on: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c6e0.dat ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c6f1.dat =================================================================== (Binary files differ) Property changes on: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c6f1.dat ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c700.dat =================================================================== (Binary files differ) Property changes on: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c700.dat ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c71.dat =================================================================== (Binary files differ) Property changes on: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c71.dat ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c711.dat =================================================================== (Binary files differ) Property changes on: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c711.dat ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c720.dat =================================================================== (Binary files differ) Property changes on: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c720.dat ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c731.dat =================================================================== (Binary files differ) Property changes on: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c731.dat ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c740.dat =================================================================== (Binary files differ) Property changes on: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c740.dat ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c751.dat =================================================================== (Binary files differ) Property changes on: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c751.dat ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c760.dat =================================================================== (Binary files differ) Property changes on: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c760.dat ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c771.dat =================================================================== (Binary files differ) Property changes on: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c771.dat ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c780.dat =================================================================== (Binary files differ) Property changes on: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c780.dat ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c791.dat =================================================================== (Binary files differ) Property changes on: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c791.dat ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c7a0.dat =================================================================== (Binary files differ) Property changes on: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c7a0.dat ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c7b1.dat =================================================================== (Binary files differ) Property changes on: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c7b1.dat ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c7c0.dat =================================================================== (Binary files differ) Property changes on: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c7c0.dat ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c7d1.dat =================================================================== (Binary files differ) Property changes on: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c7d1.dat ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c7e0.dat =================================================================== (Binary files differ) Property changes on: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c7e0.dat ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c7f1.dat =================================================================== (Binary files differ) Property changes on: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c7f1.dat ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c800.dat =================================================================== (Binary files differ) Property changes on: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c800.dat ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c81.dat =================================================================== (Binary files differ) Property changes on: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c81.dat ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c811.dat =================================================================== (Binary files differ) Property changes on: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c811.dat ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c820.dat =================================================================== (Binary files differ) Property changes on: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c820.dat ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c831.dat =================================================================== (Binary files differ) Property changes on: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c831.dat ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c840.dat =================================================================== (Binary files differ) Property changes on: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c840.dat ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c851.dat =================================================================== (Binary files differ) Property changes on: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c851.dat ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c860.dat =================================================================== (Binary files differ) Property changes on: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c860.dat ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c871.dat =================================================================== (Binary files differ) Property changes on: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c871.dat ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c880.dat =================================================================== (Binary files differ) Property changes on: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c880.dat ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c891.dat =================================================================== (Binary files differ) Property changes on: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c891.dat ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c8a0.dat =================================================================== (Binary files differ) Property changes on: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c8a0.dat ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c8b1.dat =================================================================== (Binary files differ) Property changes on: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c8b1.dat ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c8c0.dat =================================================================== (Binary files differ) Property changes on: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c8c0.dat ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c8d1.dat =================================================================== (Binary files differ) Property changes on: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c8d1.dat ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c8e0.dat =================================================================== (Binary files differ) Property changes on: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c8e0.dat ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c8f1.dat =================================================================== (Binary files differ) Property changes on: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c8f1.dat ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c90.dat =================================================================== (Binary files differ) Property changes on: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c90.dat ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c900.dat =================================================================== (Binary files differ) Property changes on: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c900.dat ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c910.dat =================================================================== (Binary files differ) Property changes on: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c910.dat ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c921.dat =================================================================== (Binary files differ) Property changes on: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c921.dat ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c930.dat =================================================================== (Binary files differ) Property changes on: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c930.dat ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c941.dat =================================================================== (Binary files differ) Property changes on: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/c941.dat ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/ca1.dat =================================================================== (Binary files differ) Property changes on: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/ca1.dat ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/cb1.dat =================================================================== (Binary files differ) Property changes on: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/cb1.dat ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/cc0.dat =================================================================== (Binary files differ) Property changes on: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/cc0.dat ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/cd1.dat =================================================================== (Binary files differ) Property changes on: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/cd1.dat ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/ce1.dat =================================================================== (Binary files differ) Property changes on: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/ce1.dat ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/cf0.dat =================================================================== (Binary files differ) Property changes on: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/seg0/cf0.dat ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: pompei/trunk/src/main/webapp/WEB-INF/db/pompei/service.properties =================================================================== --- pompei/trunk/src/main/webapp/WEB-INF/db/pompei/service.properties 2007-07-10 12:32:04 UTC (rev 216) +++ pompei/trunk/src/main/webapp/WEB-INF/db/pompei/service.properties 2007-07-10 12:34:38 UTC (rev 217) @@ -0,0 +1,22 @@ +#C:\development\ework-jdk1.5\pompei\src\main\webapp\WEB-INF\db\pompei +# ***************************************************************************** +# *** ?????????????????? *** +# *** ??????????????????????????????????? *** +# ******************************************************************** +#Sat Jul 07 14:49:07 JST 2007 +SysschemasIndex2Identifier=225 +SyscolumnsIdentifier=144 +SysconglomeratesIndex1Identifier=49 +SysconglomeratesIdentifier=32 +SyscolumnsIndex2Identifier=177 +SysschemasIndex1Identifier=209 +SysconglomeratesIndex3Identifier=81 +SystablesIndex2Identifier=129 +SyscolumnsIndex1Identifier=161 +derby.serviceProtocol=org.apache.derby.database.Database +SysschemasIdentifier=192 +derby.storage.propertiesId=16 +SysconglomeratesIndex2Identifier=65 +derby.serviceLocale=ja_JP +SystablesIdentifier=96 +SystablesIndex1Identifier=113 From svnnotify △ sourceforge.jp Tue Jul 10 21:40:14 2007 From: svnnotify △ sourceforge.jp (svnnotify △ sourceforge.jp) Date: Tue, 10 Jul 2007 21:40:14 +0900 Subject: [pal-cvs 2486] [218] added dbflute for pompei Message-ID: <20070710124015.065FB2AC010@users.sourceforge.jp> Revision: 218 http://svn.sourceforge.jp/cgi-bin/viewcvs.cgi?root=pal&view=rev&rev=218 Author: takeharu Date: 2007-07-10 21:40:14 +0900 (Tue, 10 Jul 2007) Log Message: ----------- added dbflute for pompei Added Paths: ----------- pompei/trunk/dbflute/ pompei/trunk/dbflute/_project.bat pompei/trunk/dbflute/_project.sh pompei/trunk/dbflute/build-pompei.properties pompei/trunk/dbflute/dfprop/ pompei/trunk/dbflute/dfprop/databaseInfoMap.dfprop pompei/trunk/dbflute/doc.bat pompei/trunk/dbflute/doc.sh pompei/trunk/dbflute/generate.bat pompei/trunk/dbflute/generate.sh pompei/trunk/dbflute/jdbc.bat pompei/trunk/dbflute/jdbc.sh pompei/trunk/dbflute/log/ pompei/trunk/dbflute/log/readme.txt pompei/trunk/dbflute/output/ pompei/trunk/dbflute/output/doc/ pompei/trunk/dbflute/output/doc/readme.txt pompei/trunk/dbflute/outside-sql-test.bat pompei/trunk/dbflute/outside-sql-test.sh pompei/trunk/dbflute/playsql/ pompei/trunk/dbflute/playsql/replace-schema.sql pompei/trunk/dbflute/replace-schema.bat pompei/trunk/dbflute/replace-schema.sh pompei/trunk/dbflute/schema/ pompei/trunk/dbflute/schema/project-schema-n2commerce.xml pompei/trunk/dbflute/schema/project-schema-pompei.xml pompei/trunk/dbflute/schema/readme.txt pompei/trunk/dbflute/sql2entity.bat pompei/trunk/dbflute/sql2entity.sh pompei/trunk/dbflute/velocity.log.1 -------------- next part -------------- Added: pompei/trunk/dbflute/_project.bat =================================================================== --- pompei/trunk/dbflute/_project.bat 2007-07-10 12:34:38 UTC (rev 217) +++ pompei/trunk/dbflute/_project.bat 2007-07-10 12:40:14 UTC (rev 218) @@ -0,0 +1,5 @@ + △ echo off + +set MY_PROJECT_NAME=pompei + +set DBFLUTE_HOME=..\mydbflute\dbflute-0.5.2 \ No newline at end of file Added: pompei/trunk/dbflute/_project.sh =================================================================== --- pompei/trunk/dbflute/_project.sh 2007-07-10 12:34:38 UTC (rev 217) +++ pompei/trunk/dbflute/_project.sh 2007-07-10 12:40:14 UTC (rev 218) @@ -0,0 +1,5 @@ +#!/bin/sh + +export MY_PROJECT_NAME=minimumProperties + +#export DBFLUTE_HOME=../mydbflute/dbflute-x.x.x Added: pompei/trunk/dbflute/build-pompei.properties =================================================================== --- pompei/trunk/dbflute/build-pompei.properties 2007-07-10 12:34:38 UTC (rev 217) +++ pompei/trunk/dbflute/build-pompei.properties 2007-07-10 12:40:14 UTC (rev 218) @@ -0,0 +1,156 @@ +# ======================================================================================= +# for All +# ======= + +# ------------------------------------------------------------------- +# P R O J E C T +# ------------------------------------------------------------------- +# @FirstProperty +# @Required +torque.project = pompei + +# ------------------------------------------------------------------- +# T A R G E T D A T A B A S E +# ------------------------------------------------------------------- +# This is the target database, only considered when generating +# the SQL for your Torque project. Your possible choices are: +# +# axion, cloudscape, db2, db2400, hypersonic, interbase, mssql, +# mysql, oracle, postgresql, sapdb, sybase, firebird, derby, h2 +# ------------------------------------------------------------------- +# @FirstProperty +# @Required +torque.database = derby + +# ------------------------------------------------------------------- +# T A R G E T L A N G U A G E +# ------------------------------------------------------------------- +# (Default 'java') +# The target language. Your possible choices are: +# java, csharp +# ------------------------------------------------------------------- +# @FirstProperty +#torque.targetLanguage = java + + + +# ======================================================================================= +# for OM task +# =========== + +# _/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/ +# Basic +# _/_/_/_/ +# /--------------------------------------------------------------------------- +# [Output Directory] +# java.dir: (Default '../src/main/java') +# The base output directory. +# +# If this value is '../src/main/java' and your project stype is under maven, +# you don't need to set up this property! +# +# {project} +# | +# |-dbflute_ldb +# | |-build-ldb.properties +# | |-... +# | +# |-src/main/java // *Here! +# |-src/main/resources +# |-... +# +# +# @FirstProperty +#torque.java.dir = ../src/main/java +# ----------------/ + +# _/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/ +# Package +# _/_/ +# /--------------------------------------------------------------------------- +# [EntityDao Package] +# packageBase: (Default '') +# The base directory of package. +# +# *If this property is specified and other package properties is not specified, +# Then The packages of generated class are as follows: +# +# ex) packageBase = org.seasar.dbflute.example.dbflute.ldb +# baseCommonPackage --> org.seasar.dbflute.example.dbflute.ldb.allcommon +# baseBehaviorPackage --> org.seasar.dbflute.example.dbflute.ldb.bsbhv +# baseDaoPackage --> org.seasar.dbflute.example.dbflute.ldb.bsdao +# baseEntityPackage --> org.seasar.dbflute.example.dbflute.ldb.bsentity +# conditionBeanPackage --> org.seasar.dbflute.example.dbflute.ldb.cbean +# extendedBehaviorPackage --> org.seasar.dbflute.example.dbflute.ldb.exbhv +# extendedDaoPackage --> org.seasar.dbflute.example.dbflute.ldb.exdao +# extendedEntityPackage --> org.seasar.dbflute.example.dbflute.ldb.exentity +# +# *If this property is not specified, you should specify the other package properties. +# +# +# baseCommonPackage: (Default Java:'allcommon' C#:'allcommon') +# baseBehaviorPackage: (Default Java:'bsbhv' C#:'bsbhv') +# baseDaoPackage: (Default Java:'bsdao' C#:'bsdao') +# baseEntityPackage: (Default Java:'bsentity' C#:'bsentity') +# conditionBeanPackage: (Default Java:'cbean' C#:'cbean') +# extendedBehaviorPackage: (Default Java:'exbhv' C#:'exbhv') +# extendedDaoPackage: (Default Java:'exdao' C#:'exdao') +# extendedEntityPackage: (Default Java:'exentity' C#:'exentity') +# +# @FirstProperty +torque.packageBase = jp.sf.pal.pompei +# ----------------/ + +# _/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/ +# S2Dao Adjustment +# _/_/_/_/_/_/ +# /--------------------------------------------------------------------------- +# [S2Dao Version] +# s2daoVersion: (Default [The latest version]) +# +# @JavaOnly +torque.s2daoVersion = 1.0.43 +# ----------------/ + + + +# ======================================================================================= +# for JDBC task +# ============= + +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# [Database Informaition] +# +# * * * * * * * * * * * * * * * * * * * * * * * * * +# You shuold use './dfprop/databaseInfoMap.dfprop' +# Look the file! +# * * * * * * * * * * * * * * * * * * * * * * * * * +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + +# _/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/ +# Adavance +# _/_/ + +# /--------------------------------------------------------------------------- +# [Sequence] +# sequenceDefinitionMap: (Default 'map:{}') +# The method 'XxxDao#selectNextVal()' is generated for its table primary key. +# +# ex) public String selectNextVal_SQL = "select gen_id(BOOK_BOOK_ID_INC, 1) from RDB$DATABASE"; +# public java.math.BigDecimal selectNextVal(); +# // This example is for the database of Firebird +# +# sequenceReturnType: (Default 'java.math.BigDecimal') +# The return type of The method 'XxxDao#selectNextVal()'. +# + +# +# *Apache Derby does not support Sequence-Object. +# But I want to test this property. +# +torque.sequenceDefinitionMap = map:{ \ + prodcts = PRODUCTS_PRODUCTS_ID_INC \ + } + +#torque.sequenceReturnType = java.lang.Integer + Added: pompei/trunk/dbflute/dfprop/databaseInfoMap.dfprop =================================================================== --- pompei/trunk/dbflute/dfprop/databaseInfoMap.dfprop 2007-07-10 12:34:38 UTC (rev 217) +++ pompei/trunk/dbflute/dfprop/databaseInfoMap.dfprop 2007-07-10 12:40:14 UTC (rev 218) @@ -0,0 +1,18 @@ +# /--------------------------------------------------------------------------- +# [Database Information] +# databaseInfoMap: +# driver -- The class name of JDBC-Driver. +# url -- The url for connecting database. +# schema -- The schema name. +# user -- The database user name. +# password -- The database password. +# +# @FirstProperty +map:{ + ; driver = org.apache.derby.jdbc.EmbeddedDriver + ; url = jdbc:derby:../db/pompei; + ; schema = APP + ; user = + ; password = +} +# ----------------/ \ No newline at end of file Added: pompei/trunk/dbflute/doc.bat =================================================================== --- pompei/trunk/dbflute/doc.bat 2007-07-10 12:34:38 UTC (rev 217) +++ pompei/trunk/dbflute/doc.bat 2007-07-10 12:40:14 UTC (rev 218) @@ -0,0 +1,17 @@ + △ echo off + +call _project.bat + +rem /nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn +rem Specify the file path to be used as build-properties. +rem nnnnnnnnnn/ +set MY_PROPERTIES_PATH=build-%MY_PROJECT_NAME%.properties + +rem /nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn +rem Execute {Document}. +rem nnnnnnnnnn/ +call %DBFLUTE_HOME%\etc\cmd\_df-doc.cmd %MY_PROPERTIES_PATH% + +pause + + Added: pompei/trunk/dbflute/doc.sh =================================================================== --- pompei/trunk/dbflute/doc.sh 2007-07-10 12:34:38 UTC (rev 217) +++ pompei/trunk/dbflute/doc.sh 2007-07-10 12:40:14 UTC (rev 218) @@ -0,0 +1,14 @@ +#!/bin/sh + +. _project.sh + +echo "/nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn" +echo "Specify the file path to be used as build-properties." +echo "nnnnnnnnnn/" +export MY_PROPERTIES_PATH=build-${MY_PROJECT_NAME}.properties + +echo "/nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn" +echo "Execute {Document}." +echo "nnnnnnnnnn/" +sh $DBFLUTE_HOME/etc/cmd/_df-doc.sh $MY_PROPERTIES_PATH + Added: pompei/trunk/dbflute/generate.bat =================================================================== --- pompei/trunk/dbflute/generate.bat 2007-07-10 12:34:38 UTC (rev 217) +++ pompei/trunk/dbflute/generate.bat 2007-07-10 12:40:14 UTC (rev 218) @@ -0,0 +1,17 @@ + △ echo off + +call _project.bat + +rem /nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn +rem Specify the file path to be used as build-properties. +rem nnnnnnnnnn/ +set MY_PROPERTIES_PATH=build-%MY_PROJECT_NAME%.properties + +rem /nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn +rem Execute {Generate}. +rem nnnnnnnnnn/ +call %DBFLUTE_HOME%\etc\cmd\_df-generate.cmd %MY_PROPERTIES_PATH% + +pause + + Added: pompei/trunk/dbflute/generate.sh =================================================================== --- pompei/trunk/dbflute/generate.sh 2007-07-10 12:34:38 UTC (rev 217) +++ pompei/trunk/dbflute/generate.sh 2007-07-10 12:40:14 UTC (rev 218) @@ -0,0 +1,16 @@ +#!/bin/sh + +. _project.sh + +echo "/nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn" +echo "Specify the file path to be used as build-properties." +echo "nnnnnnnnnn/" +export MY_PROPERTIES_PATH=build-${MY_PROJECT_NAME}.properties + +echo "/nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn" +echo "Execute {Generate}." +echo "nnnnnnnnnn/" +sh $DBFLUTE_HOME/etc/cmd/_df-generate.sh $MY_PROPERTIES_PATH + + + Added: pompei/trunk/dbflute/jdbc.bat =================================================================== --- pompei/trunk/dbflute/jdbc.bat 2007-07-10 12:34:38 UTC (rev 217) +++ pompei/trunk/dbflute/jdbc.bat 2007-07-10 12:40:14 UTC (rev 218) @@ -0,0 +1,15 @@ + △ echo off +call _project.bat + +rem /nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn +rem Specify the file path to be used as build-properties. +rem nnnnnnnnnn/ +set MY_PROPERTIES_PATH=build-%MY_PROJECT_NAME%.properties +rem /nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn +rem Execute {JDBC and Document}. +rem nnnnnnnnnn/ +call %DBFLUTE_HOME%\etc\cmd\_df-jdbc.cmd %MY_PROPERTIES_PATH% + +pause + + Added: pompei/trunk/dbflute/jdbc.sh =================================================================== --- pompei/trunk/dbflute/jdbc.sh 2007-07-10 12:34:38 UTC (rev 217) +++ pompei/trunk/dbflute/jdbc.sh 2007-07-10 12:40:14 UTC (rev 218) @@ -0,0 +1,15 @@ +#!/bin/sh + +. _project.sh + +echo "/nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn" +echo "Specify the file path to be used as build-properties." +echo "nnnnnnnnnn/" +export MY_PROPERTIES_PATH="build-${MY_PROJECT_NAME}.properties" + +echo "/nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn" +echo "Execute {JDBC and Document}." +echo "nnnnnnnnnn/" +sh ${DBFLUTE_HOME}/etc/cmd/_df-jdbc.sh ${MY_PROPERTIES_PATH} + + Added: pompei/trunk/dbflute/log/readme.txt =================================================================== --- pompei/trunk/dbflute/log/readme.txt 2007-07-10 12:34:38 UTC (rev 217) +++ pompei/trunk/dbflute/log/readme.txt 2007-07-10 12:40:14 UTC (rev 218) @@ -0,0 +1 @@ +Directory for LogFile Added: pompei/trunk/dbflute/output/doc/readme.txt =================================================================== --- pompei/trunk/dbflute/output/doc/readme.txt 2007-07-10 12:34:38 UTC (rev 217) +++ pompei/trunk/dbflute/output/doc/readme.txt 2007-07-10 12:40:14 UTC (rev 218) @@ -0,0 +1 @@ +Directory for Document Added: pompei/trunk/dbflute/outside-sql-test.bat =================================================================== --- pompei/trunk/dbflute/outside-sql-test.bat 2007-07-10 12:34:38 UTC (rev 217) +++ pompei/trunk/dbflute/outside-sql-test.bat 2007-07-10 12:40:14 UTC (rev 218) @@ -0,0 +1,17 @@ + △ echo off + +call _project.bat + +rem /nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn +rem Specify the file path to be used as build-properties. +rem nnnnnnnnnn/ +set MY_PROPERTIES_PATH=build-%MY_PROJECT_NAME%.properties + +rem /nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn +rem Execute {Outsite-Sql-Test}. +rem nnnnnnnnnn/ +call %DBFLUTE_HOME%\etc\cmd\_df-outside-sql-test.cmd %MY_PROPERTIES_PATH% + +pause + + Added: pompei/trunk/dbflute/outside-sql-test.sh =================================================================== --- pompei/trunk/dbflute/outside-sql-test.sh 2007-07-10 12:34:38 UTC (rev 217) +++ pompei/trunk/dbflute/outside-sql-test.sh 2007-07-10 12:40:14 UTC (rev 218) @@ -0,0 +1,15 @@ +#!/bin/sh + +. _project.sh + +echo "/nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn" +echo "Specify the file path to be used as build-properties." +echo "nnnnnnnnnn/" +export MY_PROPERTIES_PATH=build-${MY_PROJECT_NAME}.properties + +echo "/nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn" +echo "Execute {Outsite-Sql-Test}." +echo "nnnnnnnnnn/" +sh $DBFLUTE_HOME/etc/cmd/_df-outside-sql-test.sh $MY_PROPERTIES_PATH + + Added: pompei/trunk/dbflute/playsql/replace-schema.sql =================================================================== --- pompei/trunk/dbflute/playsql/replace-schema.sql 2007-07-10 12:34:38 UTC (rev 217) +++ pompei/trunk/dbflute/playsql/replace-schema.sql 2007-07-10 12:40:14 UTC (rev 218) @@ -0,0 +1,418 @@ +ALTER TABLE BLACK_ACTION DROP CONSTRAINT FK_BLACK_ACTION_BLACK_LIST +; + +ALTER TABLE BLACK_ACTION DROP CONSTRAINT FK_BLACK_ACTION_LOOKUP +; + +ALTER TABLE BLACK_LIST DROP CONSTRAINT FK_BLACK_LIST_LB_USER +; + +ALTER TABLE BOOK DROP CONSTRAINT FK_BOOK_AUTHOR +; + +ALTER TABLE BOOK DROP CONSTRAINT FK_BOOK_PUBLISHER +; + +ALTER TABLE BOOK DROP CONSTRAINT FK_BOOK_GENRE +; + +ALTER TABLE COLLECTION DROP CONSTRAINT FK_COLLECTION_BOOK +; + +ALTER TABLE COLLECTION DROP CONSTRAINT FK_COLLECTION_LIBRARY +; + +ALTER TABLE COLLECTION_STATUS DROP CONSTRAINT FK_COLLECTION_STATUS_COLLECTION +; + +ALTER TABLE COLLECTION_STATUS DROP CONSTRAINT FK_COLLECTION_STATUS_LOOKUP +; + +ALTER TABLE GENRE DROP CONSTRAINT FK_GENRE_GENRE +; + +ALTER TABLE LB_USER DROP CONSTRAINT FK_LB_USER_LIBRARY +; + +ALTER TABLE LENDING DROP CONSTRAINT FK_LENDING_LIBRARY +; + +ALTER TABLE LENDING DROP CONSTRAINT FK_LENDING_LB_USER +; + +ALTER TABLE LENDING_COLLECTION DROP CONSTRAINT FK_LENDING_COLLECTION_LENDING +; + +ALTER TABLE LENDING_COLLECTION DROP CONSTRAINT FK_LENDING_COLLECTION_COL +; + +ALTER TABLE NEXT_LIBRARY DROP CONSTRAINT FK_NEXT_LIBRARY_LIBRARY_ID +; + +ALTER TABLE NEXT_LIBRARY DROP CONSTRAINT FK_NEXT_LIBRARY_NEXT_LIBRARY_ID +; + + +DROP TABLE AUTHOR +; +DROP TABLE BLACK_ACTION +; +DROP TABLE BLACK_ACTION_LOOKUP +; +DROP TABLE BLACK_LIST +; +DROP TABLE BOOK +; +DROP TABLE COLLECTION +; +DROP TABLE COLLECTION_STATUS +; +DROP TABLE COLLECTION_STATUS_LOOKUP +; +DROP TABLE GARBAGE +; +DROP TABLE GENRE +; +DROP TABLE LB_USER +; +DROP TABLE LENDING +; +DROP TABLE LENDING_COLLECTION +; +DROP TABLE LIBRARY +; +DROP TABLE NEXT_LIBRARY +; +DROP TABLE PUBLISHER +; + +CREATE TABLE AUTHOR ( + AUTHOR_ID integer NOT NULL GENERATED BY DEFAULT AS IDENTITY (START WITH 1, INCREMENT BY 1), + AUTHOR_NAME varchar(80) NOT NULL, + R_TIME timestamp DEFAULT CURRENT_TIMESTAMP NOT NULL, + U_TIME timestamp DEFAULT CURRENT_TIMESTAMP NOT NULL, + R_STAFF varchar(50) DEFAULT 'DefaultStaff' NOT NULL, + U_STAFF varchar(50) DEFAULT 'DefaultStaff' NOT NULL +) +; + +CREATE TABLE BLACK_ACTION ( + BLACK_ACTION_ID integer NOT NULL GENERATED BY DEFAULT AS IDENTITY (START WITH 1, INCREMENT BY 1), + BLACK_LIST_ID integer NOT NULL, + BLACK_ACTION_CODE char(3) NOT NULL, + BLACK_LEVEL smallint NOT NULL, + EVIDENCE_PHOTOGRAPH blob, + R_TIME timestamp DEFAULT CURRENT_TIMESTAMP NOT NULL, + U_TIME timestamp DEFAULT CURRENT_TIMESTAMP NOT NULL, + R_STAFF varchar(50) DEFAULT 'DefaultStaff' NOT NULL, + U_STAFF varchar(50) DEFAULT 'DefaultStaff' NOT NULL +) +; + +CREATE TABLE BLACK_ACTION_LOOKUP ( + BLACK_ACTION_CODE char(3) NOT NULL, + BLACK_ACTION_NAME varchar(80) NOT NULL, + R_TIME timestamp DEFAULT CURRENT_TIMESTAMP NOT NULL, + U_TIME timestamp DEFAULT CURRENT_TIMESTAMP NOT NULL, + R_STAFF varchar(50) DEFAULT 'DefaultStaff' NOT NULL, + U_STAFF varchar(50) DEFAULT 'DefaultStaff' NOT NULL +) +; + +CREATE TABLE BLACK_LIST ( + BLACK_LIST_ID integer NOT NULL GENERATED BY DEFAULT AS IDENTITY (START WITH 1, INCREMENT BY 1), + LB_USER_ID integer NOT NULL, + BLACK_RANK char(3) NOT NULL, + R_TIME timestamp DEFAULT CURRENT_TIMESTAMP NOT NULL, + U_TIME timestamp DEFAULT CURRENT_TIMESTAMP NOT NULL, + R_STAFF varchar(50) DEFAULT 'DefaultStaff' NOT NULL, + U_STAFF varchar(50) DEFAULT 'DefaultStaff' NOT NULL +) +; + +CREATE TABLE BOOK ( + BOOK_ID integer NOT NULL GENERATED BY DEFAULT AS IDENTITY (START WITH 1, INCREMENT BY 1), + ISBN_NO varchar(20) NOT NULL, + BOOK_NAME varchar(80) NOT NULL, + AUTHOR_ID integer NOT NULL, + PUBLISHER_ID integer NOT NULL, + MAX_LENDING_DATE_COUNT smallint NOT NULL, + GENRE_CODE varchar(12), + OPENING_PART clob, + R_TIME timestamp DEFAULT CURRENT_TIMESTAMP NOT NULL, + U_TIME timestamp DEFAULT CURRENT_TIMESTAMP NOT NULL, + R_STAFF varchar(50) DEFAULT 'DefaultStaff' NOT NULL, + U_STAFF varchar(50) DEFAULT 'DefaultStaff' NOT NULL +) +; + +CREATE TABLE COLLECTION ( + COLLECTION_ID integer NOT NULL, + LIBRARY_ID smallint NOT NULL, + BOOK_ID integer NOT NULL, + ARRIVAL_DATE timestamp NOT NULL, + R_TIME timestamp DEFAULT CURRENT_TIMESTAMP NOT NULL, + U_TIME timestamp DEFAULT CURRENT_TIMESTAMP NOT NULL, + R_STAFF varchar(50) DEFAULT 'DefaultStaff' NOT NULL, + U_STAFF varchar(50) DEFAULT 'DefaultStaff' NOT NULL +) +; + +CREATE TABLE COLLECTION_STATUS ( + COLLECTION_ID integer NOT NULL, + COLLECTION_STATUS_CODE char(3) NOT NULL, + R_TIME timestamp DEFAULT CURRENT_TIMESTAMP NOT NULL, + U_TIME timestamp DEFAULT CURRENT_TIMESTAMP NOT NULL, + R_STAFF varchar(50) DEFAULT 'DefaultStaff' NOT NULL, + U_STAFF varchar(50) DEFAULT 'DefaultStaff' NOT NULL +) +; + +CREATE TABLE COLLECTION_STATUS_LOOKUP ( + COLLECTION_STATUS_CODE char(3) NOT NULL, + COLLECTION_STATUS_NAME varchar(80) NOT NULL, + R_TIME timestamp DEFAULT CURRENT_TIMESTAMP NOT NULL, + U_TIME timestamp DEFAULT CURRENT_TIMESTAMP NOT NULL, + R_STAFF varchar(50) DEFAULT 'DefaultStaff' NOT NULL, + U_STAFF varchar(50) DEFAULT 'DefaultStaff' NOT NULL +) +; + +CREATE TABLE GARBAGE ( + GARBAGE_MEMO varchar(50), + GARBAGE_TIME timestamp +) +; + +CREATE TABLE GENRE ( + GENRE_CODE varchar(12) NOT NULL, + GENRE_NAME varchar(80) NOT NULL, + PARENT_GENRE_CODE varchar(12), + R_TIME timestamp DEFAULT CURRENT_TIMESTAMP NOT NULL, + U_TIME timestamp DEFAULT CURRENT_TIMESTAMP NOT NULL, + R_STAFF varchar(50) DEFAULT 'DefaultStaff' NOT NULL, + U_STAFF varchar(50) DEFAULT 'DefaultStaff' NOT NULL +) +; + +CREATE TABLE LB_USER ( + LB_USER_ID integer NOT NULL GENERATED BY DEFAULT AS IDENTITY (START WITH 1, INCREMENT BY 1), + LB_USER_NAME varchar(80) NOT NULL, + LIBRARY_ID smallint NOT NULL, + USER_PASSWORD varchar(50) NOT NULL, + R_TIME timestamp DEFAULT CURRENT_TIMESTAMP NOT NULL, + U_TIME timestamp DEFAULT CURRENT_TIMESTAMP NOT NULL, + R_STAFF varchar(50) DEFAULT 'DefaultStaff' NOT NULL, + U_STAFF varchar(50) DEFAULT 'DefaultStaff' NOT NULL +) +; + +CREATE TABLE LENDING ( + LENDING_ID integer NOT NULL GENERATED BY DEFAULT AS IDENTITY (START WITH 1, INCREMENT BY 1), + LIBRARY_ID smallint NOT NULL, + LB_USER_ID integer NOT NULL, + LENDING_DATE timestamp NOT NULL, + R_TIME timestamp DEFAULT CURRENT_TIMESTAMP NOT NULL, + U_TIME timestamp DEFAULT CURRENT_TIMESTAMP NOT NULL, + R_STAFF varchar(50) DEFAULT 'DefaultStaff' NOT NULL, + U_STAFF varchar(50) DEFAULT 'DefaultStaff' NOT NULL +) +; + +CREATE TABLE LENDING_COLLECTION ( + LENDING_ID integer NOT NULL, + COLLECTION_ID integer NOT NULL, + RETURN_LIMIT_DATE timestamp NOT NULL, + R_TIME timestamp DEFAULT CURRENT_TIMESTAMP NOT NULL, + U_TIME timestamp DEFAULT CURRENT_TIMESTAMP NOT NULL, + R_STAFF varchar(50) DEFAULT 'DefaultStaff' NOT NULL, + U_STAFF varchar(50) DEFAULT 'DefaultStaff' NOT NULL +) +; + +CREATE TABLE LIBRARY ( + LIBRARY_ID smallint NOT NULL GENERATED BY DEFAULT AS IDENTITY (START WITH 1, INCREMENT BY 1), + LIBRARY_NAME varchar(80) NOT NULL, + R_TIME timestamp DEFAULT CURRENT_TIMESTAMP NOT NULL, + U_TIME timestamp DEFAULT CURRENT_TIMESTAMP NOT NULL, + R_STAFF varchar(50) DEFAULT 'DefaultStaff' NOT NULL, + U_STAFF varchar(50) DEFAULT 'DefaultStaff' NOT NULL +) +; + +CREATE TABLE NEXT_LIBRARY ( + LIBRARY_ID smallint NOT NULL, + NEXT_LIBRARY_ID smallint NOT NULL, + DISTANCE_KM integer NOT NULL, + R_TIME timestamp DEFAULT CURRENT_TIMESTAMP NOT NULL, + U_TIME timestamp DEFAULT CURRENT_TIMESTAMP NOT NULL, + R_STAFF varchar(50) DEFAULT 'DefaultStaff' NOT NULL, + U_STAFF varchar(50) DEFAULT 'DefaultStaff' NOT NULL +) +; + +CREATE TABLE PUBLISHER ( + PUBLISHER_ID integer NOT NULL GENERATED BY DEFAULT AS IDENTITY (START WITH 1, INCREMENT BY 1), + PUBLISHER_NAME varchar(80) NOT NULL, + R_TIME timestamp DEFAULT CURRENT_TIMESTAMP NOT NULL, + U_TIME timestamp DEFAULT CURRENT_TIMESTAMP NOT NULL, + R_STAFF varchar(50) DEFAULT 'DefaultStaff' NOT NULL, + U_STAFF varchar(50) DEFAULT 'DefaultStaff' NOT NULL +) +; + + +ALTER TABLE AUTHOR ADD CONSTRAINT PK_AUTHOR + PRIMARY KEY (AUTHOR_ID) +; + +ALTER TABLE BLACK_ACTION ADD CONSTRAINT PK_BLACK_ACTION + PRIMARY KEY (BLACK_ACTION_ID) +; + +ALTER TABLE BLACK_ACTION_LOOKUP ADD CONSTRAINT PK_BLACK_ACTION_LOOKUP + PRIMARY KEY (BLACK_ACTION_CODE) +; + +ALTER TABLE BLACK_LIST ADD CONSTRAINT PK_BLACK_LIST + PRIMARY KEY (BLACK_LIST_ID) +; + +ALTER TABLE BOOK ADD CONSTRAINT PK_BOOK + PRIMARY KEY (BOOK_ID) +; + +ALTER TABLE COLLECTION ADD CONSTRAINT PK_COLLECTION + PRIMARY KEY (COLLECTION_ID) +; + +ALTER TABLE COLLECTION_STATUS ADD CONSTRAINT PK_COLLECTION_STATUS + PRIMARY KEY (COLLECTION_ID) +; + +ALTER TABLE COLLECTION_STATUS_LOOKUP ADD CONSTRAINT PK_COLLECTION_STATUS_LOOKUP + PRIMARY KEY (COLLECTION_STATUS_CODE) +; + +ALTER TABLE GENRE ADD CONSTRAINT PK_GENRE + PRIMARY KEY (GENRE_CODE) +; + +ALTER TABLE LB_USER ADD CONSTRAINT PK_LB_USER + PRIMARY KEY (LB_USER_ID) +; + +ALTER TABLE LENDING ADD CONSTRAINT PK_LENDING + PRIMARY KEY (LENDING_ID) +; + +ALTER TABLE LENDING_COLLECTION ADD CONSTRAINT PK_LENDING_COLLECTION + PRIMARY KEY (LENDING_ID, COLLECTION_ID) +; + +ALTER TABLE LIBRARY ADD CONSTRAINT PK_LIBRARY + PRIMARY KEY (LIBRARY_ID) +; + +ALTER TABLE NEXT_LIBRARY ADD CONSTRAINT PK_NEXT_LIBRARY + PRIMARY KEY (LIBRARY_ID, NEXT_LIBRARY_ID) +; + +ALTER TABLE PUBLISHER ADD CONSTRAINT PK_PUBLISHER + PRIMARY KEY (PUBLISHER_ID) +; + + +ALTER TABLE BOOK + ADD CONSTRAINT UQ_BOOK_ISBN_NO UNIQUE (ISBN_NO) +; + +ALTER TABLE COLLECTION + ADD CONSTRAINT UQ_COLLECTION_Primary UNIQUE (LIBRARY_ID, BOOK_ID) +; + +ALTER TABLE LENDING + ADD CONSTRAINT UQ_LENDING_Primary UNIQUE (LIBRARY_ID, LB_USER_ID) +; + +ALTER TABLE BLACK_LIST + ADD CONSTRAINT UQ_BLACK_LIST_LB_USER_ID UNIQUE (LB_USER_ID) +; + +ALTER TABLE LIBRARY + ADD CONSTRAINT UQ_LIBRARY_LIBRARY_NAME UNIQUE (LIBRARY_NAME) +; + + + +ALTER TABLE BLACK_ACTION ADD CONSTRAINT FK_BLACK_ACTION_BLACK_LIST + FOREIGN KEY (BLACK_LIST_ID) REFERENCES BLACK_LIST (BLACK_LIST_ID) +; + +ALTER TABLE BLACK_ACTION ADD CONSTRAINT FK_BLACK_ACTION_LOOKUP + FOREIGN KEY (BLACK_ACTION_CODE) REFERENCES BLACK_ACTION_LOOKUP (BLACK_ACTION_CODE) +; + +ALTER TABLE BLACK_LIST ADD CONSTRAINT FK_BLACK_LIST_LB_USER + FOREIGN KEY (LB_USER_ID) REFERENCES LB_USER (LB_USER_ID) +; + +ALTER TABLE BOOK ADD CONSTRAINT FK_BOOK_AUTHOR + FOREIGN KEY (AUTHOR_ID) REFERENCES AUTHOR (AUTHOR_ID) +; + +ALTER TABLE BOOK ADD CONSTRAINT FK_BOOK_PUBLISHER + FOREIGN KEY (PUBLISHER_ID) REFERENCES PUBLISHER (PUBLISHER_ID) +; + +ALTER TABLE BOOK ADD CONSTRAINT FK_BOOK_GENRE + FOREIGN KEY (GENRE_CODE) REFERENCES GENRE (GENRE_CODE) +; + +ALTER TABLE COLLECTION ADD CONSTRAINT FK_COLLECTION_BOOK + FOREIGN KEY (BOOK_ID) REFERENCES BOOK (BOOK_ID) +; + +ALTER TABLE COLLECTION ADD CONSTRAINT FK_COLLECTION_LIBRARY + FOREIGN KEY (LIBRARY_ID) REFERENCES LIBRARY (LIBRARY_ID) +; + +ALTER TABLE COLLECTION_STATUS ADD CONSTRAINT FK_COLLECTION_STATUS_COLLECTION + FOREIGN KEY (COLLECTION_ID) REFERENCES COLLECTION (COLLECTION_ID) +; + +ALTER TABLE COLLECTION_STATUS ADD CONSTRAINT FK_COLLECTION_STATUS_LOOKUP + FOREIGN KEY (COLLECTION_STATUS_CODE) REFERENCES COLLECTION_STATUS_LOOKUP (COLLECTION_STATUS_CODE) +; + +ALTER TABLE GENRE ADD CONSTRAINT FK_GENRE_GENRE + FOREIGN KEY (PARENT_GENRE_CODE) REFERENCES GENRE (GENRE_CODE) +; + +ALTER TABLE LB_USER ADD CONSTRAINT FK_LB_USER_LIBRARY + FOREIGN KEY (LIBRARY_ID) REFERENCES LIBRARY (LIBRARY_ID) +; + +ALTER TABLE LENDING ADD CONSTRAINT FK_LENDING_LIBRARY + FOREIGN KEY (LIBRARY_ID) REFERENCES LIBRARY (LIBRARY_ID) +; + +ALTER TABLE LENDING ADD CONSTRAINT FK_LENDING_LB_USER + FOREIGN KEY (LB_USER_ID) REFERENCES LB_USER (LB_USER_ID) +; + +ALTER TABLE LENDING_COLLECTION ADD CONSTRAINT FK_LENDING_COLLECTION_LENDING + FOREIGN KEY (LENDING_ID) REFERENCES LENDING (LENDING_ID) +; + +ALTER TABLE LENDING_COLLECTION ADD CONSTRAINT FK_LENDING_COLLECTION_COL + FOREIGN KEY (COLLECTION_ID) REFERENCES COLLECTION (COLLECTION_ID) +; + +ALTER TABLE NEXT_LIBRARY ADD CONSTRAINT FK_NEXT_LIBRARY_LIBRARY_ID + FOREIGN KEY (LIBRARY_ID) REFERENCES LIBRARY (LIBRARY_ID) +; + +ALTER TABLE NEXT_LIBRARY ADD CONSTRAINT FK_NEXT_LIBRARY_NEXT_LIBRARY_ID + FOREIGN KEY (NEXT_LIBRARY_ID) REFERENCES LIBRARY (LIBRARY_ID) +; Added: pompei/trunk/dbflute/replace-schema.bat =================================================================== --- pompei/trunk/dbflute/replace-schema.bat 2007-07-10 12:34:38 UTC (rev 217) +++ pompei/trunk/dbflute/replace-schema.bat 2007-07-10 12:40:14 UTC (rev 218) @@ -0,0 +1,17 @@ + △ echo off + +call _project.bat + +rem /nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn +rem Specify the file path to be used as build-properties. +rem nnnnnnnnnn/ +set MY_PROPERTIES_PATH=build-%MY_PROJECT_NAME%.properties + +rem /nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn +rem Execute {Replace-Schema}. +rem nnnnnnnnnn/ +call %DBFLUTE_HOME%\etc\cmd\_df-replace-schema.cmd %MY_PROPERTIES_PATH% + +pause + + Added: pompei/trunk/dbflute/replace-schema.sh =================================================================== --- pompei/trunk/dbflute/replace-schema.sh 2007-07-10 12:34:38 UTC (rev 217) +++ pompei/trunk/dbflute/replace-schema.sh 2007-07-10 12:40:14 UTC (rev 218) @@ -0,0 +1,15 @@ +#!/bin/sh + +. _project.sh + +echo "/nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn" +echo "Specify the file path to be used as build-properties." +echo "nnnnnnnnnn/" +export MY_PROPERTIES_PATH=build-${MY_PROJECT_NAME}.properties + +echo "/nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn" +echo "Execute {Replace-Schema}." +echo "nnnnnnnnnn/" +sh $DBFLUTE_HOME/etc/cmd/_df-replace-schema.sh $MY_PROPERTIES_PATH + + Added: pompei/trunk/dbflute/schema/project-schema-n2commerce.xml =================================================================== --- pompei/trunk/dbflute/schema/project-schema-n2commerce.xml 2007-07-10 12:34:38 UTC (rev 217) +++ pompei/trunk/dbflute/schema/project-schema-n2commerce.xml 2007-07-10 12:40:14 UTC (rev 218) @@ -0,0 +1,723 @@ + + + + + + + + + + + + + + + + + + +
+ + + + +
+ + + + + + + + + + + + + +
+ + + + + + +
+ + + + + + + +
+ + + + +
+ + + + + + + + + + + + +
+ + + + + + +
+ + + +
+ + + +
+ + + + + + +
+ + + + + + + + + + + +
+ + + + + + + + + + + + +
+ + + + + + + +
+ + + + + + + +
+ + + + + + +
+ + + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + +
+ + + + + + + + +
+ + + + + + + +
+ + + + +
+ + + + + + + +
+ + + + + + + + + + + + + + +
+ + + + + + + +
+ + + + + +
+ + + + + + + +
+ + + + +
+ + + + +
+ + + + +
+ + + + +
+ + + +
+ + + + + + + + + +
+ + + + +
+ + + + +
+ + + + + + + + + +
+ + + + + + +
+ + + + + + + + + +
+ + + + + + + + +
+ + + + + +
+ + + + + + + +
+
Added: pompei/trunk/dbflute/schema/project-schema-pompei.xml =================================================================== --- pompei/trunk/dbflute/schema/project-schema-pompei.xml 2007-07-10 12:34:38 UTC (rev 217) +++ pompei/trunk/dbflute/schema/project-schema-pompei.xml 2007-07-10 12:40:14 UTC (rev 218) @@ -0,0 +1,752 @@ + + + + + + + + + + + + + + + + + + +
+ + + + +
+ + + + + + + + + + + + + +
+ + + + + + +
+ + + + + + + +
+ + + + +
+ + + + + + + + + + + + +
+ + + + + + +
+ + + +
+ + + +
+ + + + + + +
+ + + + + + + + + + + +
+ + + + + + + + + + + + +
+ + + + + + + +
+ + + + + + +
+ + + + + + + +
+ + + + + + +
+ + + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + +
+ + + + + + + + +
+ + + + + + + +
+ + + + +
+ + + + + + + +
+ + + + + + + + +
+ + + + + + + + + + + + + + +
+ + + + + + + +
+ + + + + +
+ + + + + + + +
+ + + + +
+ + + + +
+ + + + +
+ + + + +
+ + + +
+ + + + + + + + + +
+ + + + +
+ + + + +
+ + + + + + + + + +
+ + + + + + +
+ + + + + + + + + +
+ + + + + + + + +
+ + + + + +
+ + + + + + + +
+
Added: pompei/trunk/dbflute/schema/readme.txt =================================================================== --- pompei/trunk/dbflute/schema/readme.txt 2007-07-10 12:34:38 UTC (rev 217) +++ pompei/trunk/dbflute/schema/readme.txt 2007-07-10 12:40:14 UTC (rev 218) @@ -0,0 +1 @@ +Directory for SchemaFile Added: pompei/trunk/dbflute/sql2entity.bat =================================================================== --- pompei/trunk/dbflute/sql2entity.bat 2007-07-10 12:34:38 UTC (rev 217) +++ pompei/trunk/dbflute/sql2entity.bat 2007-07-10 12:40:14 UTC (rev 218) @@ -0,0 +1,17 @@ + △ echo off + +call _project.bat + +rem /nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn +rem Specify the file path to be used as build-properties. +rem nnnnnnnnnn/ +set MY_PROPERTIES_PATH=build-%MY_PROJECT_NAME%.properties + +rem /nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn +rem Execute {Invoke Sql Directory}. +rem nnnnnnnnnn/ +call %DBFLUTE_HOME%\etc\cmd\_df-sql2entity.cmd %MY_PROPERTIES_PATH% + +pause + + Added: pompei/trunk/dbflute/sql2entity.sh =================================================================== --- pompei/trunk/dbflute/sql2entity.sh 2007-07-10 12:34:38 UTC (rev 217) +++ pompei/trunk/dbflute/sql2entity.sh 2007-07-10 12:40:14 UTC (rev 218) @@ -0,0 +1,15 @@ +#!/bin/sh + +. _project.sh + +echo "/nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn" +echo "Specify the file path to be used as build-properties." +echo "nnnnnnnnnn/" +export MY_PROPERTIES_PATH=build-${MY_PROJECT_NAME}.properties + +echo "/nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn" +echo "Execute {Invoke Sql Directory}." +echo "nnnnnnnnnn/" +sh $DBFLUTE_HOME/etc/cmd/_df-sql2entity.sh $MY_PROPERTIES_PATH + + Added: pompei/trunk/dbflute/velocity.log.1 =================================================================== --- pompei/trunk/dbflute/velocity.log.1 2007-07-10 12:34:38 UTC (rev 217) +++ pompei/trunk/dbflute/velocity.log.1 2007-07-10 12:40:14 UTC (rev 218) @@ -0,0 +1,602 @@ +2007-07-10 00:59:31,750 - org.apache.velocity.runtime.exception.ReferenceException: reference : template = om/java/cbean/AbstractBsConditionQuery.vm [line 612,column 71] : $fromDate is not a valid reference. +2007-07-10 00:59:31,750 - org.apache.velocity.runtime.exception.ReferenceException: reference : template = om/java/cbean/AbstractBsConditionQuery.vm [line 612,column 99] : $toDate is not a valid reference. +2007-07-10 00:59:31,750 - ResourceManager : found om/java/cbean/BsConditionInlineQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 00:59:31,812 - ResourceManager : found om/java/cbean/BsConditionQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 00:59:31,812 - ResourceManager : found om/java/cbean/NestSelectSetupper.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 00:59:31,859 - ResourceManager : found om/java/bsbhv/BaseBhv.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 00:59:31,921 - ResourceManager : found om/java/bsdao/BaseDao.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 00:59:31,953 - ResourceManager : found om/java/bsentity/BaseEntity.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 00:59:31,984 - ResourceManager : found om/java/bsentity/dbmeta/DBMetaImpl.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 00:59:32,015 - ResourceManager : found om/java/cbean/BsConditionBean.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 00:59:32,187 - ResourceManager : found om/java/cbean/AbstractBsConditionQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 00:59:32,203 - org.apache.velocity.runtime.exception.ReferenceException: reference : template = om/java/cbean/AbstractBsConditionQuery.vm [line 612,column 71] : $fromDate is not a valid reference. +2007-07-10 00:59:32,203 - org.apache.velocity.runtime.exception.ReferenceException: reference : template = om/java/cbean/AbstractBsConditionQuery.vm [line 612,column 99] : $toDate is not a valid reference. +2007-07-10 00:59:32,203 - org.apache.velocity.runtime.exception.ReferenceException: reference : template = om/java/cbean/AbstractBsConditionQuery.vm [line 612,column 71] : $fromDate is not a valid reference. +2007-07-10 00:59:32,203 - org.apache.velocity.runtime.exception.ReferenceException: reference : template = om/java/cbean/AbstractBsConditionQuery.vm [line 612,column 99] : $toDate is not a valid reference. +2007-07-10 00:59:32,203 - ResourceManager : found om/java/cbean/BsConditionInlineQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 00:59:32,234 - ResourceManager : found om/java/cbean/BsConditionQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 00:59:32,250 - ResourceManager : found om/java/cbean/NestSelectSetupper.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 00:59:32,281 - ResourceManager : found om/java/bsbhv/BaseBhv.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 00:59:32,328 - ResourceManager : found om/java/bsdao/BaseDao.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 00:59:32,359 - ResourceManager : found om/java/bsentity/BaseEntity.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 00:59:32,390 - ResourceManager : found om/java/bsentity/dbmeta/DBMetaImpl.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 00:59:32,453 - ResourceManager : found om/java/cbean/BsConditionBean.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 00:59:32,484 - ResourceManager : found om/java/cbean/AbstractBsConditionQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 00:59:32,531 - org.apache.velocity.runtime.exception.ReferenceException: reference : template = om/java/cbean/AbstractBsConditionQuery.vm [line 612,column 71] : $fromDate is not a valid reference. +2007-07-10 00:59:32,531 - org.apache.velocity.runtime.exception.ReferenceException: reference : template = om/java/cbean/AbstractBsConditionQuery.vm [line 612,column 99] : $toDate is not a valid reference. +2007-07-10 00:59:32,531 - org.apache.velocity.runtime.exception.ReferenceException: reference : template = om/java/cbean/AbstractBsConditionQuery.vm [line 612,column 71] : $fromDate is not a valid reference. +2007-07-10 00:59:32,531 - org.apache.velocity.runtime.exception.ReferenceException: reference : template = om/java/cbean/AbstractBsConditionQuery.vm [line 612,column 99] : $toDate is not a valid reference. +2007-07-10 00:59:32,531 - ResourceManager : found om/java/cbean/BsConditionInlineQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 00:59:32,578 - ResourceManager : found om/java/cbean/BsConditionQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 00:59:32,609 - ResourceManager : found om/java/cbean/NestSelectSetupper.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 00:59:32,656 - ResourceManager : found om/java/bsbhv/BaseBhv.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 00:59:32,687 - ResourceManager : found om/java/bsdao/BaseDao.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 00:59:32,718 - ResourceManager : found om/java/bsentity/BaseEntity.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 00:59:32,765 - ResourceManager : found om/java/bsentity/dbmeta/DBMetaImpl.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 00:59:32,828 - ResourceManager : found om/java/cbean/BsConditionBean.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 00:59:32,859 - ResourceManager : found om/java/cbean/AbstractBsConditionQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 00:59:32,890 - ResourceManager : found om/java/cbean/BsConditionInlineQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 00:59:32,937 - ResourceManager : found om/java/cbean/BsConditionQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 00:59:32,984 - ResourceManager : found om/java/cbean/NestSelectSetupper.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 00:59:33,031 - ResourceManager : found om/java/bsbhv/BaseBhv.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 00:59:33,046 - ResourceManager : found om/java/bsdao/BaseDao.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 00:59:33,093 - ResourceManager : found om/java/bsentity/BaseEntity.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 00:59:33,109 - ResourceManager : found om/java/bsentity/dbmeta/DBMetaImpl.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 00:59:33,156 - ResourceManager : found om/java/cbean/BsConditionBean.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 00:59:33,187 - ResourceManager : found om/java/cbean/AbstractBsConditionQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 00:59:33,218 - ResourceManager : found om/java/cbean/BsConditionInlineQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 00:59:33,250 - ResourceManager : found om/java/cbean/BsConditionQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 00:59:33,281 - ResourceManager : found om/java/cbean/NestSelectSetupper.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 00:59:33,328 - ResourceManager : found om/java/bsbhv/BaseBhv.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 00:59:33,375 - ResourceManager : found om/java/bsdao/BaseDao.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 00:59:33,390 - ResourceManager : found om/java/bsentity/BaseEntity.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 00:59:33,437 - ResourceManager : found om/java/bsentity/dbmeta/DBMetaImpl.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 00:59:33,468 - ResourceManager : found om/java/cbean/BsConditionBean.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 00:59:33,515 - ResourceManager : found om/java/cbean/AbstractBsConditionQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 00:59:33,562 - org.apache.velocity.runtime.exception.ReferenceException: reference : template = om/java/cbean/AbstractBsConditionQuery.vm [line 612,column 71] : $fromDate is not a valid reference. +2007-07-10 00:59:33,562 - org.apache.velocity.runtime.exception.ReferenceException: reference : template = om/java/cbean/AbstractBsConditionQuery.vm [line 612,column 99] : $toDate is not a valid reference. +2007-07-10 00:59:33,562 - org.apache.velocity.runtime.exception.ReferenceException: reference : template = om/java/cbean/AbstractBsConditionQuery.vm [line 612,column 71] : $fromDate is not a valid reference. +2007-07-10 00:59:33,562 - org.apache.velocity.runtime.exception.ReferenceException: reference : template = om/java/cbean/AbstractBsConditionQuery.vm [line 612,column 99] : $toDate is not a valid reference. +2007-07-10 00:59:33,562 - ResourceManager : found om/java/cbean/BsConditionInlineQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 00:59:33,609 - ResourceManager : found om/java/cbean/BsConditionQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 00:59:33,640 - ResourceManager : found om/java/cbean/NestSelectSetupper.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:46,593 - SimpleLog4JLogSystem initialized using logfile 'velocity.log' +2007-07-10 01:00:46,593 - ************************************************************** +2007-07-10 01:00:46,593 - Starting Jakarta Velocity v1.3.1 +2007-07-10 01:00:46,593 - RuntimeInstance initializing. +2007-07-10 01:00:46,593 - Default Properties File: org\apache\velocity\runtime\defaults\velocity.properties +2007-07-10 01:00:46,593 - Trying to use logger class org.apache.velocity.runtime.log.AvalonLogSystem +2007-07-10 01:00:46,593 - Couldn't find class org.apache.velocity.runtime.log.AvalonLogSystem or necessary supporting classes in classpath. Exception : java.lang.NoClassDefFoundError: org/apache/log/format/Formatter +2007-07-10 01:00:46,593 - Trying to use logger class org.apache.velocity.runtime.log.SimpleLog4JLogSystem +2007-07-10 01:00:46,593 - Using logger class org.apache.velocity.runtime.log.SimpleLog4JLogSystem +2007-07-10 01:00:46,593 - Default ResourceManager initializing. (class org.apache.velocity.runtime.resource.ResourceManagerImpl) +2007-07-10 01:00:46,609 - Resource Loader Instantiated: org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:46,609 - FileResourceLoader : initialization starting. +2007-07-10 01:00:46,609 - FileResourceLoader : adding path 'C:\development\ework-jdk1.5\pompei\mydbflute\dbflute-0.5.2\templates' +2007-07-10 01:00:46,609 - FileResourceLoader : initialization complete. +2007-07-10 01:00:46,609 - ResourceCache : initialized. (class org.apache.velocity.runtime.resource.ResourceCacheImpl) +2007-07-10 01:00:46,609 - Default ResourceManager initialization complete. +2007-07-10 01:00:46,609 - Loaded System Directive: org.apache.velocity.runtime.directive.Literal +2007-07-10 01:00:46,609 - Loaded System Directive: org.apache.velocity.runtime.directive.Macro +2007-07-10 01:00:46,609 - Loaded System Directive: org.apache.velocity.runtime.directive.Parse +2007-07-10 01:00:46,625 - Loaded System Directive: org.apache.velocity.runtime.directive.Include +2007-07-10 01:00:46,625 - Loaded System Directive: org.apache.velocity.runtime.directive.Foreach +2007-07-10 01:00:46,765 - Created: 20 parsers. +2007-07-10 01:00:46,765 - Velocimacro : initialization starting. +2007-07-10 01:00:46,765 - Velocimacro : adding VMs from VM library template : VM_global_library.vm +2007-07-10 01:00:46,781 - ResourceManager : unable to find resource 'VM_global_library.vm' in any resource loader. +2007-07-10 01:00:46,781 - Velocimacro : error using VM library template VM_global_library.vm : org.apache.velocity.exception.ResourceNotFoundException: Unable to find resource 'VM_global_library.vm' +2007-07-10 01:00:46,781 - Velocimacro : VM library template macro registration complete. +2007-07-10 01:00:46,781 - Velocimacro : allowInline = true : VMs can be defined inline in templates +2007-07-10 01:00:46,781 - Velocimacro : allowInlineToOverride = false : VMs defined inline may NOT replace previous VM definitions +2007-07-10 01:00:46,781 - Velocimacro : allowInlineLocal = false : VMs defined inline will be global in scope if allowed. +2007-07-10 01:00:46,781 - Velocimacro : messages on : VM system will output logging messages +2007-07-10 01:00:46,781 - Velocimacro : autoload off : VM system will not automatically reload global library macros +2007-07-10 01:00:46,781 - Velocimacro : initialization complete. +2007-07-10 01:00:46,781 - Velocity successfully started. +2007-07-10 01:00:47,390 - ResourceManager : found om/Control.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:47,484 - ResourceManager : found om/java/allcommon/annotation/OutsideSql.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:47,500 - ResourceManager : found om/java/allcommon/bhv/BehaviorReadable.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:47,500 - ResourceManager : found om/java/allcommon/bhv/BehaviorWritable.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:47,515 - ResourceManager : found om/java/allcommon/bhv/AbstractBehaviorReadable.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:47,531 - ResourceManager : found om/java/allcommon/bhv/AbstractBehaviorWritable.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:47,546 - ResourceManager : found om/java/allcommon/bhv/batch/TokenFileReflectionOption.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:47,546 - ResourceManager : found om/java/allcommon/bhv/batch/TokenFileReflectionResult.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:47,562 - ResourceManager : found om/java/allcommon/bhv/batch/TokenFileReflectionFailure.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:47,562 - ResourceManager : found om/java/allcommon/bhv/batch/TokenFileOutputOption.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:47,578 - ResourceManager : found om/java/allcommon/bhv/batch/TokenFileOutputResult.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:47,578 - ResourceManager : found om/java/allcommon/bhv/load/LoadRefererOption.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:47,578 - ResourceManager : found om/java/allcommon/bhv/setup/ConditionBeanSetupper.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:47,593 - ResourceManager : found om/java/allcommon/bhv/setup/EntityListSetupper.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:47,593 - ResourceManager : found om/java/allcommon/bhv/setup/ValueLabelSetupper.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:47,593 - ResourceManager : found om/java/allcommon/bhv/setup/ValueLabelBox.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:47,609 - ResourceManager : found om/java/allcommon/AccessContext.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:47,609 - ResourceManager : found om/java/allcommon/DaoReadable.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:47,609 - ResourceManager : found om/java/allcommon/DaoWritable.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:47,625 - ResourceManager : found om/java/allcommon/Entity.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:47,625 - ResourceManager : found om/java/allcommon/EntityDefinedCommonColumn.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:47,640 - ResourceManager : found om/java/allcommon/cbean/FetchNarrowingBeanContext.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:47,656 - ResourceManager : found om/java/allcommon/cbean/FetchNarrowingBean.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:47,656 - ResourceManager : found om/java/allcommon/cbean/SimpleOrderByBean.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:47,656 - ResourceManager : found om/java/allcommon/cbean/SimplePagingBean.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:47,671 - ResourceManager : found om/java/allcommon/cbean/PagingResultBean.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:47,671 - ResourceManager : found om/java/allcommon/cbean/ListResultBean.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:47,687 - ResourceManager : found om/java/allcommon/cbean/ConditionBeanContext.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:48,281 - ResourceManager : found om/java/allcommon/cbean/ConditionBean.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:48,281 - ResourceManager : found om/java/allcommon/cbean/ConditionQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:48,281 - ResourceManager : found om/java/allcommon/cbean/PagingBean.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:48,296 - ResourceManager : found om/java/allcommon/cbean/OrderByBean.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:48,296 - ResourceManager : found om/java/allcommon/cbean/SelectResource.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:48,296 - ResourceManager : found om/java/allcommon/cbean/AbstractConditionBean.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:48,312 - ResourceManager : found om/java/allcommon/cbean/AbstractConditionQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:48,328 - ResourceManager : found om/java/allcommon/cbean/ckey/ConditionKey.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:48,328 - ResourceManager : found om/java/allcommon/cbean/ckey/ConditionKey_equal.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:48,343 - ResourceManager : found om/java/allcommon/cbean/ckey/ConditionKey_notEqual.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:48,343 - ResourceManager : found om/java/allcommon/cbean/ckey/ConditionKey_greaterThan.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:48,343 - ResourceManager : found om/java/allcommon/cbean/ckey/ConditionKey_lessThan.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:48,359 - ResourceManager : found om/java/allcommon/cbean/ckey/ConditionKey_greaterEqual.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:48,359 - ResourceManager : found om/java/allcommon/cbean/ckey/ConditionKey_lessEqual.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:48,359 - ResourceManager : found om/java/allcommon/cbean/ckey/ConditionKey_prefixSearch.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:48,375 - ResourceManager : found om/java/allcommon/cbean/ckey/ConditionKey_likeSearch.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:48,375 - ResourceManager : found om/java/allcommon/cbean/ckey/ConditionKey_inScope.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:48,390 - ResourceManager : found om/java/allcommon/cbean/ckey/ConditionKey_notInScope.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:48,390 - ResourceManager : found om/java/allcommon/cbean/ckey/ConditionKey_isNull.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:48,390 - ResourceManager : found om/java/allcommon/cbean/ckey/ConditionKey_isNotNull.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:48,406 - ResourceManager : found om/java/allcommon/cbean/coption/ConditionOption.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:48,406 - ResourceManager : found om/java/allcommon/cbean/coption/SimpleStringOption.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:48,406 - ResourceManager : found om/java/allcommon/cbean/coption/FromToOption.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:48,421 - ResourceManager : found om/java/allcommon/cbean/coption/LikeSearchOption.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:48,421 - ResourceManager : found om/java/allcommon/cbean/coption/InScopeOption.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:48,421 - ResourceManager : found om/java/allcommon/cbean/coption/parts/SplitOptionParts.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:48,437 - ResourceManager : found om/java/allcommon/cbean/coption/parts/ToUpperLowerCaseOptionParts.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:48,437 - ResourceManager : found om/java/allcommon/cbean/coption/parts/ToSingleByteOptionParts.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:48,453 - ResourceManager : found om/java/allcommon/cbean/coption/parts/local/JapaneseOptionPartsAgent.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:48,453 - ResourceManager : found om/java/allcommon/cbean/cvalue/ConditionValue.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:48,468 - ResourceManager : found om/java/allcommon/cbean/grouping/GroupingOption.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:48,468 - ResourceManager : found om/java/allcommon/cbean/grouping/GroupingRowEndDeterminer.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:48,468 - ResourceManager : found om/java/allcommon/cbean/grouping/GroupingRowResource.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:48,484 - ResourceManager : found om/java/allcommon/cbean/grouping/GroupingRowSetupper.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:48,484 - ResourceManager : found om/java/allcommon/cbean/mapping/EntityDtoMapper.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:48,484 - ResourceManager : found om/java/allcommon/cbean/sqlclause/SqlClause.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:48,500 - ResourceManager : found om/java/allcommon/cbean/sqlclause/AbstractSqlClause.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:48,500 - ResourceManager : found om/java/allcommon/cbean/sqlclause/SqlClause_derby.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:48,515 - ResourceManager : found om/java/allcommon/cbean/sqlclause/SqlClause_oracle.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:48,515 - ResourceManager : found om/java/allcommon/cbean/sqlclause/SqlClause_firebird.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:48,515 - ResourceManager : found om/java/allcommon/cbean/sqlclause/SqlClause_mysql.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:48,531 - ResourceManager : found om/java/allcommon/cbean/sqlclause/SqlClause_postgresql.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:48,531 - ResourceManager : found om/java/allcommon/cbean/sqlclause/SqlClause_mssql.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:48,531 - ResourceManager : found om/java/allcommon/cbean/sqlclause/SqlClause_db2.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:48,531 - ResourceManager : found om/java/allcommon/cbean/sqlclause/SqlClause_interbase.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:48,546 - ResourceManager : found om/java/allcommon/cbean/sqlclause/SqlClause_default.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:48,546 - ResourceManager : found om/java/allcommon/cbean/sqlclause/OrderByClause.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:48,546 - ResourceManager : found om/java/allcommon/cbean/sqlclause/OrderByElement.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:48,562 - ResourceManager : found om/java/allcommon/dbmeta/DBMeta.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:48,578 - ResourceManager : found om/java/allcommon/dbmeta/AbstractDBMeta.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:48,578 - ResourceManager : found om/java/allcommon/dbmeta/DBMetaInstanceHandler.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:48,593 - ResourceManager : found om/java/allcommon/exception/RecordHasAlreadyBeenDeletedException.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:48,609 - ResourceManager : found om/java/allcommon/exception/RecordHasOverlappedException.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:48,609 - ResourceManager : found om/java/allcommon/exception/SelectedCountExceedMaxCountException.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:48,625 - ResourceManager : found om/java/allcommon/helper/MapListString.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:48,734 - ResourceManager : found om/java/allcommon/helper/MapListStringImpl.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:48,750 - ResourceManager : found om/java/allcommon/helper/MapStringBuilder.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:48,750 - ResourceManager : found om/java/allcommon/helper/MapStringBuilderImpl.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:48,750 - ResourceManager : found om/java/allcommon/helper/character/GeneralCharacter.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:48,765 - ResourceManager : found om/java/allcommon/helper/character/impl/GeneralCharacterImpl.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:48,765 - ResourceManager : found om/java/allcommon/helper/character/JapaneseCharacter.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:48,765 - ResourceManager : found om/java/allcommon/helper/character/impl/JapaneseCharacterImpl.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:48,781 - ResourceManager : found om/java/allcommon/helper/token/line/LineToken.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:48,781 - ResourceManager : found om/java/allcommon/helper/token/line/impl/LineTokenImpl.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:48,781 - ResourceManager : found om/java/allcommon/helper/token/line/LineTokenizingOption.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:48,781 - ResourceManager : found om/java/allcommon/helper/token/line/LineMakingOption.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:48,796 - ResourceManager : found om/java/allcommon/helper/token/file/FileToken.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:48,796 - ResourceManager : found om/java/allcommon/helper/token/file/impl/FileTokenImpl.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:48,812 - ResourceManager : found om/java/allcommon/helper/token/file/FileTokenizingOption.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:48,812 - ResourceManager : found om/java/allcommon/helper/token/file/FileTokenizingRowResource.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:48,812 - ResourceManager : found om/java/allcommon/helper/token/file/FileTokenizingCallback.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:48,812 - ResourceManager : found om/java/allcommon/helper/token/file/FileTokenizingHeaderInfo.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:48,828 - ResourceManager : found om/java/allcommon/helper/token/file/FileMakingOption.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:48,828 - ResourceManager : found om/java/allcommon/helper/token/file/FileMakingRowResource.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:48,828 - ResourceManager : found om/java/allcommon/helper/token/file/FileMakingCallback.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:48,843 - ResourceManager : found om/java/allcommon/helper/token/file/FileMakingHeaderInfo.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:48,843 - ResourceManager : found om/java/allcommon/helper/token/file/FileMakingSimpleFacade.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:48,843 - ResourceManager : found om/java/allcommon/helper/token/file/impl/FileMakingSimpleFacadeImpl.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:48,859 - ResourceManager : found om/java/allcommon/DaoDicon.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:48,906 - ResourceManager : found om/java/allcommon/DaoSelector.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:48,906 - ResourceManager : found om/java/allcommon/CacheDaoSelector.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:48,906 - ResourceManager : found om/java/allcommon/GenMetaData.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:48,921 - ResourceManager : found om/java/allcommon/interceptor/CommonColumnSetupAbstractInterceptor.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:48,937 - ResourceManager : found om/java/allcommon/interceptor/CommonColumnSetupBeforeInsertInterceptor.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:48,953 - ResourceManager : found om/java/allcommon/interceptor/CommonColumnSetupBeforeUpdateInterceptor.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:48,953 - ResourceManager : found om/java/allcommon/interceptor/CommonColumnSetupBeforeDeleteInterceptor.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:48,968 - ResourceManager : found om/java/allcommon/jdbc/history/PreparedExecutionBean.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:48,968 - ResourceManager : found om/java/allcommon/jdbc/history/PreparedParameterElement.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:48,968 - ResourceManager : found om/java/allcommon/jdbc/history/StatementHistory.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:48,968 - ResourceManager : found om/java/allcommon/jdbc/history/StatementHistoryWitness.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:48,984 - ResourceManager : found om/java/allcommon/jdbc/history/TraceablePreparedStatement.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:48,984 - ResourceManager : found om/java/allcommon/s2dao/S2DaoInterceptor.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:49,000 - ResourceManager : found om/java/allcommon/s2dao/S2DaoMetaDataExtension.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:49,000 - org.apache.velocity.runtime.exception.ReferenceException: reference : template = om/java/allcommon/s2dao/S2DaoMetaDataExtension.vm [line 287,column 28] : $dto.selectHint is not a valid reference. +2007-07-10 01:00:49,000 - org.apache.velocity.runtime.exception.ReferenceException: reference : template = om/java/allcommon/s2dao/S2DaoMetaDataExtension.vm [line 354,column 28] : $dto.selectHint is not a valid reference. +2007-07-10 01:00:49,000 - ResourceManager : found om/java/allcommon/s2dao/S2DaoMetaDataFactoryImpl.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:49,015 - ResourceManager : found om/java/allcommon/s2dao/S2BeanMetaDataFactoryImpl.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:49,015 - ResourceManager : found om/java/allcommon/s2dao/S2DaoSelectDynamicCommand.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:49,015 - ResourceManager : found om/java/allcommon/s2dao/S2DaoStatementFactory.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:49,015 - ResourceManager : found om/java/allcommon/s2dao/FetchNarrowingResultSetFactory.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:49,015 - ResourceManager : found om/java/allcommon/s2dao/FetchNarrowingResultSetWrapper.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:49,062 - ResourceManager : found om/java/bsbhv/BaseBhv.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:49,093 - ResourceManager : found om/java/bsdao/BaseDao.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:49,109 - ResourceManager : found om/java/bsentity/BaseEntity.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:49,140 - ResourceManager : found om/java/bsentity/dbmeta/DBMetaImpl.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:49,171 - ResourceManager : found om/java/cbean/BsConditionBean.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:49,187 - ResourceManager : found om/java/cbean/AbstractBsConditionQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:49,218 - ResourceManager : found om/java/cbean/BsConditionInlineQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:49,234 - ResourceManager : found om/java/cbean/BsConditionQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:49,250 - ResourceManager : found om/java/cbean/NestSelectSetupper.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:49,265 - ResourceManager : found om/java/bsbhv/BaseBhv.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:49,281 - ResourceManager : found om/java/bsdao/BaseDao.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:49,296 - ResourceManager : found om/java/bsentity/BaseEntity.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:49,312 - ResourceManager : found om/java/bsentity/dbmeta/DBMetaImpl.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:49,328 - ResourceManager : found om/java/cbean/BsConditionBean.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:49,343 - ResourceManager : found om/java/cbean/AbstractBsConditionQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:49,359 - ResourceManager : found om/java/cbean/BsConditionInlineQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:49,531 - ResourceManager : found om/java/cbean/BsConditionQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:49,531 - ResourceManager : found om/java/cbean/NestSelectSetupper.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:49,546 - ResourceManager : found om/java/bsbhv/BaseBhv.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:49,562 - ResourceManager : found om/java/bsdao/BaseDao.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:49,578 - ResourceManager : found om/java/bsentity/BaseEntity.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:49,609 - ResourceManager : found om/java/bsentity/dbmeta/DBMetaImpl.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:49,640 - ResourceManager : found om/java/cbean/BsConditionBean.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:49,656 - ResourceManager : found om/java/cbean/AbstractBsConditionQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:49,671 - org.apache.velocity.runtime.exception.ReferenceException: reference : template = om/java/cbean/AbstractBsConditionQuery.vm [line 612,column 71] : $fromDate is not a valid reference. +2007-07-10 01:00:49,671 - org.apache.velocity.runtime.exception.ReferenceException: reference : template = om/java/cbean/AbstractBsConditionQuery.vm [line 612,column 99] : $toDate is not a valid reference. +2007-07-10 01:00:49,671 - org.apache.velocity.runtime.exception.ReferenceException: reference : template = om/java/cbean/AbstractBsConditionQuery.vm [line 612,column 71] : $fromDate is not a valid reference. +2007-07-10 01:00:49,671 - org.apache.velocity.runtime.exception.ReferenceException: reference : template = om/java/cbean/AbstractBsConditionQuery.vm [line 612,column 99] : $toDate is not a valid reference. +2007-07-10 01:00:49,671 - org.apache.velocity.runtime.exception.ReferenceException: reference : template = om/java/cbean/AbstractBsConditionQuery.vm [line 612,column 71] : $fromDate is not a valid reference. +2007-07-10 01:00:49,671 - org.apache.velocity.runtime.exception.ReferenceException: reference : template = om/java/cbean/AbstractBsConditionQuery.vm [line 612,column 99] : $toDate is not a valid reference. +2007-07-10 01:00:49,671 - org.apache.velocity.runtime.exception.ReferenceException: reference : template = om/java/cbean/AbstractBsConditionQuery.vm [line 612,column 71] : $fromDate is not a valid reference. +2007-07-10 01:00:49,671 - org.apache.velocity.runtime.exception.ReferenceException: reference : template = om/java/cbean/AbstractBsConditionQuery.vm [line 612,column 99] : $toDate is not a valid reference. +2007-07-10 01:00:49,671 - ResourceManager : found om/java/cbean/BsConditionInlineQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:49,687 - ResourceManager : found om/java/cbean/BsConditionQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:49,703 - ResourceManager : found om/java/cbean/NestSelectSetupper.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:49,718 - ResourceManager : found om/java/bsbhv/BaseBhv.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:49,734 - ResourceManager : found om/java/bsdao/BaseDao.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:49,750 - ResourceManager : found om/java/bsentity/BaseEntity.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:49,765 - ResourceManager : found om/java/bsentity/dbmeta/DBMetaImpl.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:49,781 - ResourceManager : found om/java/cbean/BsConditionBean.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:49,796 - ResourceManager : found om/java/cbean/AbstractBsConditionQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:49,796 - org.apache.velocity.runtime.exception.ReferenceException: reference : template = om/java/cbean/AbstractBsConditionQuery.vm [line 612,column 71] : $fromDate is not a valid reference. +2007-07-10 01:00:49,796 - org.apache.velocity.runtime.exception.ReferenceException: reference : template = om/java/cbean/AbstractBsConditionQuery.vm [line 612,column 99] : $toDate is not a valid reference. +2007-07-10 01:00:49,812 - ResourceManager : found om/java/cbean/BsConditionInlineQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:49,828 - ResourceManager : found om/java/cbean/BsConditionQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:49,828 - ResourceManager : found om/java/cbean/NestSelectSetupper.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:49,859 - ResourceManager : found om/java/bsbhv/BaseBhv.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:49,859 - ResourceManager : found om/java/bsdao/BaseDao.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:49,875 - ResourceManager : found om/java/bsentity/BaseEntity.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:50,015 - ResourceManager : found om/java/bsentity/dbmeta/DBMetaImpl.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:50,015 - ResourceManager : found om/java/cbean/BsConditionBean.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:50,031 - ResourceManager : found om/java/cbean/AbstractBsConditionQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:50,046 - org.apache.velocity.runtime.exception.ReferenceException: reference : template = om/java/cbean/AbstractBsConditionQuery.vm [line 612,column 71] : $fromDate is not a valid reference. +2007-07-10 01:00:50,046 - org.apache.velocity.runtime.exception.ReferenceException: reference : template = om/java/cbean/AbstractBsConditionQuery.vm [line 612,column 99] : $toDate is not a valid reference. +2007-07-10 01:00:50,046 - org.apache.velocity.runtime.exception.ReferenceException: reference : template = om/java/cbean/AbstractBsConditionQuery.vm [line 612,column 71] : $fromDate is not a valid reference. +2007-07-10 01:00:50,046 - org.apache.velocity.runtime.exception.ReferenceException: reference : template = om/java/cbean/AbstractBsConditionQuery.vm [line 612,column 99] : $toDate is not a valid reference. +2007-07-10 01:00:50,046 - ResourceManager : found om/java/cbean/BsConditionInlineQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:50,062 - ResourceManager : found om/java/cbean/BsConditionQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:50,078 - ResourceManager : found om/java/cbean/NestSelectSetupper.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:50,093 - ResourceManager : found om/java/bsbhv/BaseBhv.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:50,109 - ResourceManager : found om/java/bsdao/BaseDao.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:50,109 - ResourceManager : found om/java/bsentity/BaseEntity.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:50,156 - ResourceManager : found om/java/bsentity/dbmeta/DBMetaImpl.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:50,187 - ResourceManager : found om/java/cbean/BsConditionBean.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:50,203 - ResourceManager : found om/java/cbean/AbstractBsConditionQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:50,218 - ResourceManager : found om/java/cbean/BsConditionInlineQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:50,234 - ResourceManager : found om/java/cbean/BsConditionQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:50,234 - ResourceManager : found om/java/cbean/NestSelectSetupper.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:50,265 - ResourceManager : found om/java/bsbhv/BaseBhv.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:50,265 - ResourceManager : found om/java/bsdao/BaseDao.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:50,281 - ResourceManager : found om/java/bsentity/BaseEntity.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:50,296 - ResourceManager : found om/java/bsentity/dbmeta/DBMetaImpl.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:50,312 - ResourceManager : found om/java/cbean/BsConditionBean.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:50,343 - ResourceManager : found om/java/cbean/AbstractBsConditionQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:50,343 - org.apache.velocity.runtime.exception.ReferenceException: reference : template = om/java/cbean/AbstractBsConditionQuery.vm [line 612,column 71] : $fromDate is not a valid reference. +2007-07-10 01:00:50,343 - org.apache.velocity.runtime.exception.ReferenceException: reference : template = om/java/cbean/AbstractBsConditionQuery.vm [line 612,column 99] : $toDate is not a valid reference. +2007-07-10 01:00:50,343 - org.apache.velocity.runtime.exception.ReferenceException: reference : template = om/java/cbean/AbstractBsConditionQuery.vm [line 612,column 71] : $fromDate is not a valid reference. +2007-07-10 01:00:50,343 - org.apache.velocity.runtime.exception.ReferenceException: reference : template = om/java/cbean/AbstractBsConditionQuery.vm [line 612,column 99] : $toDate is not a valid reference. +2007-07-10 01:00:50,359 - ResourceManager : found om/java/cbean/BsConditionInlineQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:50,375 - ResourceManager : found om/java/cbean/BsConditionQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:50,375 - ResourceManager : found om/java/cbean/NestSelectSetupper.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:50,406 - ResourceManager : found om/java/bsbhv/BaseBhv.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:50,406 - ResourceManager : found om/java/bsdao/BaseDao.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:50,421 - ResourceManager : found om/java/bsentity/BaseEntity.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:50,437 - ResourceManager : found om/java/bsentity/dbmeta/DBMetaImpl.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:50,453 - ResourceManager : found om/java/cbean/BsConditionBean.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:50,578 - ResourceManager : found om/java/cbean/AbstractBsConditionQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:50,593 - ResourceManager : found om/java/cbean/BsConditionInlineQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:50,609 - ResourceManager : found om/java/cbean/BsConditionQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:50,625 - ResourceManager : found om/java/cbean/NestSelectSetupper.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:50,640 - ResourceManager : found om/java/bsbhv/BaseBhv.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:50,656 - ResourceManager : found om/java/bsdao/BaseDao.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:50,656 - ResourceManager : found om/java/bsentity/BaseEntity.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:50,671 - ResourceManager : found om/java/bsentity/dbmeta/DBMetaImpl.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:50,687 - ResourceManager : found om/java/cbean/BsConditionBean.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:50,703 - ResourceManager : found om/java/cbean/AbstractBsConditionQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:50,718 - ResourceManager : found om/java/cbean/BsConditionInlineQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:50,734 - ResourceManager : found om/java/cbean/BsConditionQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:50,734 - ResourceManager : found om/java/cbean/NestSelectSetupper.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:50,765 - ResourceManager : found om/java/bsbhv/BaseBhv.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:50,765 - ResourceManager : found om/java/bsdao/BaseDao.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:50,781 - ResourceManager : found om/java/bsentity/BaseEntity.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:50,796 - ResourceManager : found om/java/bsentity/dbmeta/DBMetaImpl.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:50,812 - ResourceManager : found om/java/cbean/BsConditionBean.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:50,828 - ResourceManager : found om/java/cbean/AbstractBsConditionQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:50,828 - ResourceManager : found om/java/cbean/BsConditionInlineQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:50,843 - ResourceManager : found om/java/cbean/BsConditionQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:50,859 - ResourceManager : found om/java/cbean/NestSelectSetupper.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:50,875 - ResourceManager : found om/java/bsbhv/BaseBhv.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:50,875 - ResourceManager : found om/java/bsdao/BaseDao.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:50,890 - ResourceManager : found om/java/bsentity/BaseEntity.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:50,906 - ResourceManager : found om/java/bsentity/dbmeta/DBMetaImpl.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:50,921 - ResourceManager : found om/java/cbean/BsConditionBean.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:50,937 - ResourceManager : found om/java/cbean/AbstractBsConditionQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:50,953 - ResourceManager : found om/java/cbean/BsConditionInlineQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:51,078 - ResourceManager : found om/java/cbean/BsConditionQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:51,078 - ResourceManager : found om/java/cbean/NestSelectSetupper.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:51,109 - ResourceManager : found om/java/bsbhv/BaseBhv.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:51,125 - ResourceManager : found om/java/bsdao/BaseDao.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:51,125 - ResourceManager : found om/java/bsentity/BaseEntity.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:51,156 - ResourceManager : found om/java/bsentity/dbmeta/DBMetaImpl.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:51,171 - ResourceManager : found om/java/cbean/BsConditionBean.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:51,187 - ResourceManager : found om/java/cbean/AbstractBsConditionQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:51,187 - org.apache.velocity.runtime.exception.ReferenceException: reference : template = om/java/cbean/AbstractBsConditionQuery.vm [line 612,column 71] : $fromDate is not a valid reference. +2007-07-10 01:00:51,187 - org.apache.velocity.runtime.exception.ReferenceException: reference : template = om/java/cbean/AbstractBsConditionQuery.vm [line 612,column 99] : $toDate is not a valid reference. +2007-07-10 01:00:51,203 - ResourceManager : found om/java/cbean/BsConditionInlineQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:51,218 - ResourceManager : found om/java/cbean/BsConditionQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:51,218 - ResourceManager : found om/java/cbean/NestSelectSetupper.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:51,250 - ResourceManager : found om/java/bsbhv/BaseBhv.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:51,250 - ResourceManager : found om/java/bsdao/BaseDao.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:51,265 - ResourceManager : found om/java/bsentity/BaseEntity.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:51,281 - ResourceManager : found om/java/bsentity/dbmeta/DBMetaImpl.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:51,312 - ResourceManager : found om/java/cbean/BsConditionBean.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:51,328 - ResourceManager : found om/java/cbean/AbstractBsConditionQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:51,328 - org.apache.velocity.runtime.exception.ReferenceException: reference : template = om/java/cbean/AbstractBsConditionQuery.vm [line 612,column 71] : $fromDate is not a valid reference. +2007-07-10 01:00:51,328 - org.apache.velocity.runtime.exception.ReferenceException: reference : template = om/java/cbean/AbstractBsConditionQuery.vm [line 612,column 99] : $toDate is not a valid reference. +2007-07-10 01:00:51,328 - ResourceManager : found om/java/cbean/BsConditionInlineQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:51,359 - ResourceManager : found om/java/cbean/BsConditionQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:51,359 - ResourceManager : found om/java/cbean/NestSelectSetupper.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:51,375 - ResourceManager : found om/java/bsbhv/BaseBhv.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:51,390 - ResourceManager : found om/java/bsdao/BaseDao.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:51,406 - ResourceManager : found om/java/bsentity/BaseEntity.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:51,421 - ResourceManager : found om/java/bsentity/dbmeta/DBMetaImpl.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:51,437 - ResourceManager : found om/java/cbean/BsConditionBean.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:51,453 - ResourceManager : found om/java/cbean/AbstractBsConditionQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:51,453 - ResourceManager : found om/java/cbean/BsConditionInlineQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:51,468 - ResourceManager : found om/java/cbean/BsConditionQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:51,484 - ResourceManager : found om/java/cbean/NestSelectSetupper.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:51,500 - ResourceManager : found om/java/bsbhv/BaseBhv.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:51,515 - ResourceManager : found om/java/bsdao/BaseDao.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:51,531 - ResourceManager : found om/java/bsentity/BaseEntity.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:51,546 - ResourceManager : found om/java/bsentity/dbmeta/DBMetaImpl.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:51,687 - ResourceManager : found om/java/cbean/BsConditionBean.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:51,718 - ResourceManager : found om/java/cbean/AbstractBsConditionQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:51,718 - ResourceManager : found om/java/cbean/BsConditionInlineQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:51,734 - ResourceManager : found om/java/cbean/BsConditionQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:51,750 - ResourceManager : found om/java/cbean/NestSelectSetupper.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:51,781 - ResourceManager : found om/java/bsbhv/BaseBhv.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:51,781 - ResourceManager : found om/java/bsdao/BaseDao.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:51,796 - ResourceManager : found om/java/bsentity/BaseEntity.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:51,812 - ResourceManager : found om/java/bsentity/dbmeta/DBMetaImpl.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:51,828 - ResourceManager : found om/java/cbean/BsConditionBean.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:51,859 - ResourceManager : found om/java/cbean/AbstractBsConditionQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:51,859 - org.apache.velocity.runtime.exception.ReferenceException: reference : template = om/java/cbean/AbstractBsConditionQuery.vm [line 612,column 71] : $fromDate is not a valid reference. +2007-07-10 01:00:51,859 - org.apache.velocity.runtime.exception.ReferenceException: reference : template = om/java/cbean/AbstractBsConditionQuery.vm [line 612,column 99] : $toDate is not a valid reference. +2007-07-10 01:00:51,859 - org.apache.velocity.runtime.exception.ReferenceException: reference : template = om/java/cbean/AbstractBsConditionQuery.vm [line 612,column 71] : $fromDate is not a valid reference. +2007-07-10 01:00:51,859 - org.apache.velocity.runtime.exception.ReferenceException: reference : template = om/java/cbean/AbstractBsConditionQuery.vm [line 612,column 99] : $toDate is not a valid reference. +2007-07-10 01:00:51,859 - org.apache.velocity.runtime.exception.ReferenceException: reference : template = om/java/cbean/AbstractBsConditionQuery.vm [line 612,column 71] : $fromDate is not a valid reference. +2007-07-10 01:00:51,859 - org.apache.velocity.runtime.exception.ReferenceException: reference : template = om/java/cbean/AbstractBsConditionQuery.vm [line 612,column 99] : $toDate is not a valid reference. +2007-07-10 01:00:51,859 - ResourceManager : found om/java/cbean/BsConditionInlineQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:51,875 - ResourceManager : found om/java/cbean/BsConditionQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:51,875 - ResourceManager : found om/java/cbean/NestSelectSetupper.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:51,906 - ResourceManager : found om/java/bsbhv/BaseBhv.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:51,921 - ResourceManager : found om/java/bsdao/BaseDao.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:51,921 - ResourceManager : found om/java/bsentity/BaseEntity.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:51,953 - ResourceManager : found om/java/bsentity/dbmeta/DBMetaImpl.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:51,953 - ResourceManager : found om/java/cbean/BsConditionBean.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:51,968 - ResourceManager : found om/java/cbean/AbstractBsConditionQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:51,968 - org.apache.velocity.runtime.exception.ReferenceException: reference : template = om/java/cbean/AbstractBsConditionQuery.vm [line 612,column 71] : $fromDate is not a valid reference. +2007-07-10 01:00:51,968 - org.apache.velocity.runtime.exception.ReferenceException: reference : template = om/java/cbean/AbstractBsConditionQuery.vm [line 612,column 99] : $toDate is not a valid reference. +2007-07-10 01:00:51,984 - org.apache.velocity.runtime.exception.ReferenceException: reference : template = om/java/cbean/AbstractBsConditionQuery.vm [line 612,column 71] : $fromDate is not a valid reference. +2007-07-10 01:00:51,984 - org.apache.velocity.runtime.exception.ReferenceException: reference : template = om/java/cbean/AbstractBsConditionQuery.vm [line 612,column 99] : $toDate is not a valid reference. +2007-07-10 01:00:51,984 - ResourceManager : found om/java/cbean/BsConditionInlineQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:52,000 - ResourceManager : found om/java/cbean/BsConditionQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:52,000 - ResourceManager : found om/java/cbean/NestSelectSetupper.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:52,031 - ResourceManager : found om/java/bsbhv/BaseBhv.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:52,046 - ResourceManager : found om/java/bsdao/BaseDao.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:52,046 - ResourceManager : found om/java/bsentity/BaseEntity.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:52,062 - ResourceManager : found om/java/bsentity/dbmeta/DBMetaImpl.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:52,078 - ResourceManager : found om/java/cbean/BsConditionBean.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:52,093 - ResourceManager : found om/java/cbean/AbstractBsConditionQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:52,109 - ResourceManager : found om/java/cbean/BsConditionInlineQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:52,125 - ResourceManager : found om/java/cbean/BsConditionQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:52,140 - ResourceManager : found om/java/cbean/NestSelectSetupper.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:52,156 - ResourceManager : found om/java/bsbhv/BaseBhv.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:52,171 - ResourceManager : found om/java/bsdao/BaseDao.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:52,171 - ResourceManager : found om/java/bsentity/BaseEntity.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:52,312 - ResourceManager : found om/java/bsentity/dbmeta/DBMetaImpl.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:52,328 - ResourceManager : found om/java/cbean/BsConditionBean.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:52,343 - ResourceManager : found om/java/cbean/AbstractBsConditionQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:52,343 - org.apache.velocity.runtime.exception.ReferenceException: reference : template = om/java/cbean/AbstractBsConditionQuery.vm [line 612,column 71] : $fromDate is not a valid reference. +2007-07-10 01:00:52,343 - org.apache.velocity.runtime.exception.ReferenceException: reference : template = om/java/cbean/AbstractBsConditionQuery.vm [line 612,column 99] : $toDate is not a valid reference. +2007-07-10 01:00:52,343 - org.apache.velocity.runtime.exception.ReferenceException: reference : template = om/java/cbean/AbstractBsConditionQuery.vm [line 612,column 71] : $fromDate is not a valid reference. +2007-07-10 01:00:52,343 - org.apache.velocity.runtime.exception.ReferenceException: reference : template = om/java/cbean/AbstractBsConditionQuery.vm [line 612,column 99] : $toDate is not a valid reference. +2007-07-10 01:00:52,359 - ResourceManager : found om/java/cbean/BsConditionInlineQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:52,375 - ResourceManager : found om/java/cbean/BsConditionQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:52,375 - ResourceManager : found om/java/cbean/NestSelectSetupper.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:52,406 - ResourceManager : found om/java/bsbhv/BaseBhv.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:52,406 - ResourceManager : found om/java/bsdao/BaseDao.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:52,421 - ResourceManager : found om/java/bsentity/BaseEntity.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:52,437 - ResourceManager : found om/java/bsentity/dbmeta/DBMetaImpl.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:52,453 - ResourceManager : found om/java/cbean/BsConditionBean.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:52,468 - ResourceManager : found om/java/cbean/AbstractBsConditionQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:52,468 - org.apache.velocity.runtime.exception.ReferenceException: reference : template = om/java/cbean/AbstractBsConditionQuery.vm [line 612,column 71] : $fromDate is not a valid reference. +2007-07-10 01:00:52,468 - org.apache.velocity.runtime.exception.ReferenceException: reference : template = om/java/cbean/AbstractBsConditionQuery.vm [line 612,column 99] : $toDate is not a valid reference. +2007-07-10 01:00:52,468 - ResourceManager : found om/java/cbean/BsConditionInlineQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:52,484 - ResourceManager : found om/java/cbean/BsConditionQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:52,500 - ResourceManager : found om/java/cbean/NestSelectSetupper.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:52,515 - ResourceManager : found om/java/bsbhv/BaseBhv.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:52,531 - ResourceManager : found om/java/bsdao/BaseDao.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:52,531 - ResourceManager : found om/java/bsentity/BaseEntity.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:52,546 - ResourceManager : found om/java/bsentity/dbmeta/DBMetaImpl.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:52,562 - ResourceManager : found om/java/cbean/BsConditionBean.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:52,578 - ResourceManager : found om/java/cbean/AbstractBsConditionQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:52,578 - org.apache.velocity.runtime.exception.ReferenceException: reference : template = om/java/cbean/AbstractBsConditionQuery.vm [line 612,column 71] : $fromDate is not a valid reference. +2007-07-10 01:00:52,578 - org.apache.velocity.runtime.exception.ReferenceException: reference : template = om/java/cbean/AbstractBsConditionQuery.vm [line 612,column 99] : $toDate is not a valid reference. +2007-07-10 01:00:52,593 - org.apache.velocity.runtime.exception.ReferenceException: reference : template = om/java/cbean/AbstractBsConditionQuery.vm [line 612,column 71] : $fromDate is not a valid reference. +2007-07-10 01:00:52,593 - org.apache.velocity.runtime.exception.ReferenceException: reference : template = om/java/cbean/AbstractBsConditionQuery.vm [line 612,column 99] : $toDate is not a valid reference. +2007-07-10 01:00:52,593 - ResourceManager : found om/java/cbean/BsConditionInlineQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:52,609 - ResourceManager : found om/java/cbean/BsConditionQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:52,609 - ResourceManager : found om/java/cbean/NestSelectSetupper.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:52,640 - ResourceManager : found om/java/bsbhv/BaseBhv.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:52,640 - ResourceManager : found om/java/bsdao/BaseDao.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:52,656 - ResourceManager : found om/java/bsentity/BaseEntity.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:52,687 - ResourceManager : found om/java/bsentity/dbmeta/DBMetaImpl.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:52,703 - ResourceManager : found om/java/cbean/BsConditionBean.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:52,718 - ResourceManager : found om/java/cbean/AbstractBsConditionQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:52,734 - org.apache.velocity.runtime.exception.ReferenceException: reference : template = om/java/cbean/AbstractBsConditionQuery.vm [line 612,column 71] : $fromDate is not a valid reference. +2007-07-10 01:00:52,734 - org.apache.velocity.runtime.exception.ReferenceException: reference : template = om/java/cbean/AbstractBsConditionQuery.vm [line 612,column 99] : $toDate is not a valid reference. +2007-07-10 01:00:52,734 - org.apache.velocity.runtime.exception.ReferenceException: reference : template = om/java/cbean/AbstractBsConditionQuery.vm [line 612,column 71] : $fromDate is not a valid reference. +2007-07-10 01:00:52,734 - org.apache.velocity.runtime.exception.ReferenceException: reference : template = om/java/cbean/AbstractBsConditionQuery.vm [line 612,column 99] : $toDate is not a valid reference. +2007-07-10 01:00:52,734 - org.apache.velocity.runtime.exception.ReferenceException: reference : template = om/java/cbean/AbstractBsConditionQuery.vm [line 612,column 71] : $fromDate is not a valid reference. +2007-07-10 01:00:52,734 - org.apache.velocity.runtime.exception.ReferenceException: reference : template = om/java/cbean/AbstractBsConditionQuery.vm [line 612,column 99] : $toDate is not a valid reference. +2007-07-10 01:00:52,750 - ResourceManager : found om/java/cbean/BsConditionInlineQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:52,765 - ResourceManager : found om/java/cbean/BsConditionQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:52,781 - ResourceManager : found om/java/cbean/NestSelectSetupper.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:52,796 - ResourceManager : found om/java/bsbhv/BaseBhv.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:52,812 - ResourceManager : found om/java/bsdao/BaseDao.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:52,828 - ResourceManager : found om/java/bsentity/BaseEntity.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:52,843 - ResourceManager : found om/java/bsentity/dbmeta/DBMetaImpl.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:52,859 - ResourceManager : found om/java/cbean/BsConditionBean.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:52,859 - ResourceManager : found om/java/cbean/AbstractBsConditionQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:52,875 - ResourceManager : found om/java/cbean/BsConditionInlineQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:53,015 - ResourceManager : found om/java/cbean/BsConditionQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:53,015 - ResourceManager : found om/java/cbean/NestSelectSetupper.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:53,031 - ResourceManager : found om/java/bsbhv/BaseBhv.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:53,046 - ResourceManager : found om/java/bsdao/BaseDao.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:53,062 - ResourceManager : found om/java/bsentity/BaseEntity.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:53,078 - ResourceManager : found om/java/bsentity/dbmeta/DBMetaImpl.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:53,093 - ResourceManager : found om/java/cbean/BsConditionBean.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:53,109 - ResourceManager : found om/java/cbean/AbstractBsConditionQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:53,125 - ResourceManager : found om/java/cbean/BsConditionInlineQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:53,140 - ResourceManager : found om/java/cbean/BsConditionQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:53,140 - ResourceManager : found om/java/cbean/NestSelectSetupper.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:53,171 - ResourceManager : found om/java/bsbhv/BaseBhv.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:53,171 - ResourceManager : found om/java/bsdao/BaseDao.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:53,187 - ResourceManager : found om/java/bsentity/BaseEntity.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:53,203 - ResourceManager : found om/java/bsentity/dbmeta/DBMetaImpl.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:53,218 - ResourceManager : found om/java/cbean/BsConditionBean.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:53,234 - ResourceManager : found om/java/cbean/AbstractBsConditionQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:53,250 - ResourceManager : found om/java/cbean/BsConditionInlineQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:53,265 - ResourceManager : found om/java/cbean/BsConditionQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:53,265 - ResourceManager : found om/java/cbean/NestSelectSetupper.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:53,281 - ResourceManager : found om/java/bsbhv/BaseBhv.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:53,296 - ResourceManager : found om/java/bsdao/BaseDao.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:53,312 - ResourceManager : found om/java/bsentity/BaseEntity.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:53,328 - ResourceManager : found om/java/bsentity/dbmeta/DBMetaImpl.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:53,328 - ResourceManager : found om/java/cbean/BsConditionBean.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:53,343 - ResourceManager : found om/java/cbean/AbstractBsConditionQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:53,359 - ResourceManager : found om/java/cbean/BsConditionInlineQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:53,375 - ResourceManager : found om/java/cbean/BsConditionQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:53,375 - ResourceManager : found om/java/cbean/NestSelectSetupper.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:53,406 - ResourceManager : found om/java/bsbhv/BaseBhv.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:53,406 - ResourceManager : found om/java/bsdao/BaseDao.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:53,421 - ResourceManager : found om/java/bsentity/BaseEntity.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:53,437 - ResourceManager : found om/java/bsentity/dbmeta/DBMetaImpl.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:53,453 - ResourceManager : found om/java/cbean/BsConditionBean.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:53,468 - ResourceManager : found om/java/cbean/AbstractBsConditionQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:53,468 - org.apache.velocity.runtime.exception.ReferenceException: reference : template = om/java/cbean/AbstractBsConditionQuery.vm [line 612,column 71] : $fromDate is not a valid reference. +2007-07-10 01:00:53,468 - org.apache.velocity.runtime.exception.ReferenceException: reference : template = om/java/cbean/AbstractBsConditionQuery.vm [line 612,column 99] : $toDate is not a valid reference. +2007-07-10 01:00:53,484 - ResourceManager : found om/java/cbean/BsConditionInlineQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:53,500 - ResourceManager : found om/java/cbean/BsConditionQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:53,500 - ResourceManager : found om/java/cbean/NestSelectSetupper.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:53,515 - ResourceManager : found om/java/bsbhv/BaseBhv.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:53,531 - ResourceManager : found om/java/bsdao/BaseDao.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:53,546 - ResourceManager : found om/java/bsentity/BaseEntity.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:53,562 - ResourceManager : found om/java/bsentity/dbmeta/DBMetaImpl.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:53,578 - ResourceManager : found om/java/cbean/BsConditionBean.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:53,609 - ResourceManager : found om/java/cbean/AbstractBsConditionQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:53,609 - ResourceManager : found om/java/cbean/BsConditionInlineQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:53,640 - ResourceManager : found om/java/cbean/BsConditionQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:53,640 - ResourceManager : found om/java/cbean/NestSelectSetupper.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:53,671 - ResourceManager : found om/java/bsbhv/BaseBhv.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:53,671 - ResourceManager : found om/java/bsdao/BaseDao.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:53,687 - ResourceManager : found om/java/bsentity/BaseEntity.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:53,828 - ResourceManager : found om/java/bsentity/dbmeta/DBMetaImpl.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:53,843 - ResourceManager : found om/java/cbean/BsConditionBean.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:53,859 - ResourceManager : found om/java/cbean/AbstractBsConditionQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:53,875 - org.apache.velocity.runtime.exception.ReferenceException: reference : template = om/java/cbean/AbstractBsConditionQuery.vm [line 612,column 71] : $fromDate is not a valid reference. +2007-07-10 01:00:53,875 - org.apache.velocity.runtime.exception.ReferenceException: reference : template = om/java/cbean/AbstractBsConditionQuery.vm [line 612,column 99] : $toDate is not a valid reference. +2007-07-10 01:00:53,875 - org.apache.velocity.runtime.exception.ReferenceException: reference : template = om/java/cbean/AbstractBsConditionQuery.vm [line 612,column 71] : $fromDate is not a valid reference. +2007-07-10 01:00:53,875 - org.apache.velocity.runtime.exception.ReferenceException: reference : template = om/java/cbean/AbstractBsConditionQuery.vm [line 612,column 99] : $toDate is not a valid reference. +2007-07-10 01:00:53,875 - org.apache.velocity.runtime.exception.ReferenceException: reference : template = om/java/cbean/AbstractBsConditionQuery.vm [line 612,column 71] : $fromDate is not a valid reference. +2007-07-10 01:00:53,875 - org.apache.velocity.runtime.exception.ReferenceException: reference : template = om/java/cbean/AbstractBsConditionQuery.vm [line 612,column 99] : $toDate is not a valid reference. +2007-07-10 01:00:53,875 - ResourceManager : found om/java/cbean/BsConditionInlineQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:53,890 - ResourceManager : found om/java/cbean/BsConditionQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:53,906 - ResourceManager : found om/java/cbean/NestSelectSetupper.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:53,921 - ResourceManager : found om/java/bsbhv/BaseBhv.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:53,937 - ResourceManager : found om/java/bsdao/BaseDao.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:53,937 - ResourceManager : found om/java/bsentity/BaseEntity.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:53,953 - ResourceManager : found om/java/bsentity/dbmeta/DBMetaImpl.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:53,968 - ResourceManager : found om/java/cbean/BsConditionBean.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:53,984 - ResourceManager : found om/java/cbean/AbstractBsConditionQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:54,000 - ResourceManager : found om/java/cbean/BsConditionInlineQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:54,015 - ResourceManager : found om/java/cbean/BsConditionQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:54,015 - ResourceManager : found om/java/cbean/NestSelectSetupper.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:54,031 - ResourceManager : found om/java/bsbhv/BaseBhv.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:54,046 - ResourceManager : found om/java/bsdao/BaseDao.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:54,046 - ResourceManager : found om/java/bsentity/BaseEntity.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:54,062 - ResourceManager : found om/java/bsentity/dbmeta/DBMetaImpl.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:54,078 - ResourceManager : found om/java/cbean/BsConditionBean.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:54,093 - ResourceManager : found om/java/cbean/AbstractBsConditionQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:54,109 - ResourceManager : found om/java/cbean/BsConditionInlineQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:54,125 - ResourceManager : found om/java/cbean/BsConditionQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:54,125 - ResourceManager : found om/java/cbean/NestSelectSetupper.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:54,156 - ResourceManager : found om/java/bsbhv/BaseBhv.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:54,171 - ResourceManager : found om/java/bsdao/BaseDao.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:54,187 - ResourceManager : found om/java/bsentity/BaseEntity.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:54,203 - ResourceManager : found om/java/bsentity/dbmeta/DBMetaImpl.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:54,218 - ResourceManager : found om/java/cbean/BsConditionBean.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:54,234 - ResourceManager : found om/java/cbean/AbstractBsConditionQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:54,234 - ResourceManager : found om/java/cbean/BsConditionInlineQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:54,250 - ResourceManager : found om/java/cbean/BsConditionQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:54,265 - ResourceManager : found om/java/cbean/NestSelectSetupper.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:54,281 - ResourceManager : found om/java/bsbhv/BaseBhv.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:54,296 - ResourceManager : found om/java/bsdao/BaseDao.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:54,296 - ResourceManager : found om/java/bsentity/BaseEntity.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:54,312 - ResourceManager : found om/java/bsentity/dbmeta/DBMetaImpl.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:54,328 - ResourceManager : found om/java/cbean/BsConditionBean.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:54,343 - ResourceManager : found om/java/cbean/AbstractBsConditionQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:54,343 - org.apache.velocity.runtime.exception.ReferenceException: reference : template = om/java/cbean/AbstractBsConditionQuery.vm [line 612,column 71] : $fromDate is not a valid reference. +2007-07-10 01:00:54,343 - org.apache.velocity.runtime.exception.ReferenceException: reference : template = om/java/cbean/AbstractBsConditionQuery.vm [line 612,column 99] : $toDate is not a valid reference. +2007-07-10 01:00:54,359 - ResourceManager : found om/java/cbean/BsConditionInlineQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:54,359 - ResourceManager : found om/java/cbean/BsConditionQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:54,375 - ResourceManager : found om/java/cbean/NestSelectSetupper.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:54,390 - ResourceManager : found om/java/bsbhv/BaseBhv.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:54,406 - ResourceManager : found om/java/bsdao/BaseDao.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:54,406 - ResourceManager : found om/java/bsentity/BaseEntity.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:54,421 - ResourceManager : found om/java/bsentity/dbmeta/DBMetaImpl.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:54,437 - ResourceManager : found om/java/cbean/BsConditionBean.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:54,453 - ResourceManager : found om/java/cbean/AbstractBsConditionQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:54,453 - ResourceManager : found om/java/cbean/BsConditionInlineQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:54,468 - ResourceManager : found om/java/cbean/BsConditionQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:54,484 - ResourceManager : found om/java/cbean/NestSelectSetupper.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:54,500 - ResourceManager : found om/java/bsbhv/BaseBhv.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:54,515 - ResourceManager : found om/java/bsdao/BaseDao.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:54,531 - ResourceManager : found om/java/bsentity/BaseEntity.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:54,531 - ResourceManager : found om/java/bsentity/dbmeta/DBMetaImpl.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:54,687 - ResourceManager : found om/java/cbean/BsConditionBean.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:54,687 - ResourceManager : found om/java/cbean/AbstractBsConditionQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:54,703 - ResourceManager : found om/java/cbean/BsConditionInlineQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:54,718 - ResourceManager : found om/java/cbean/BsConditionQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:54,718 - ResourceManager : found om/java/cbean/NestSelectSetupper.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:54,750 - ResourceManager : found om/java/bsbhv/BaseBhv.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:54,750 - ResourceManager : found om/java/bsdao/BaseDao.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:54,765 - ResourceManager : found om/java/bsentity/BaseEntity.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2007-07-10 01:00:54,781 - ResourceManager : found om/java/bsentity/dbmeta/DBMetaImpl.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader From svnnotify △ sourceforge.jp Tue Jul 10 21:47:32 2007 From: svnnotify △ sourceforge.jp (svnnotify △ sourceforge.jp) Date: Tue, 10 Jul 2007 21:47:32 +0900 Subject: [pal-cvs 2487] [219] deleted test source Message-ID: <20070710124733.041E02AC030@users.sourceforge.jp> Revision: 219 http://svn.sourceforge.jp/cgi-bin/viewcvs.cgi?root=pal&view=rev&rev=219 Author: takeharu Date: 2007-07-10 21:47:32 +0900 (Tue, 10 Jul 2007) Log Message: ----------- deleted test source Removed Paths: ------------- pompei/trunk/src/main/java/jp/sf/pal/pompei/web/test/ -------------- next part -------------- From svnnotify △ sourceforge.jp Tue Jul 10 21:50:37 2007 From: svnnotify △ sourceforge.jp (svnnotify △ sourceforge.jp) Date: Tue, 10 Jul 2007 21:50:37 +0900 Subject: [pal-cvs 2488] [220] added mydbflute Message-ID: <20070710125037.7E3362AC010@users.sourceforge.jp> Revision: 220 http://svn.sourceforge.jp/cgi-bin/viewcvs.cgi?root=pal&view=rev&rev=220 Author: takeharu Date: 2007-07-10 21:49:16 +0900 (Tue, 10 Jul 2007) Log Message: ----------- added mydbflute Added Paths: ----------- pompei/trunk/mydbflute/ pompei/trunk/mydbflute/dbflute-0.5.2/ pompei/trunk/mydbflute/dbflute-0.5.2/etc/ pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/ pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/fullProperties/ pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/fullProperties/_project.bat pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/fullProperties/_project.sh pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/fullProperties/build-ldb.properties pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/fullProperties/dfprop/ pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/fullProperties/dfprop/databaseInfoMap.dfprop pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/fullProperties/doc.bat pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/fullProperties/doc.sh pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/fullProperties/generate.bat pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/fullProperties/generate.sh pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/fullProperties/jdbc.bat pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/fullProperties/jdbc.sh pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/fullProperties/log/ pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/fullProperties/log/readme.txt pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/fullProperties/output/ pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/fullProperties/output/doc/ pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/fullProperties/output/doc/readme.txt pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/fullProperties/outside-sql-test.bat pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/fullProperties/outside-sql-test.sh pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/fullProperties/playsql/ pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/fullProperties/playsql/replace-schema.sql pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/fullProperties/replace-schema.bat pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/fullProperties/replace-schema.sh pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/fullProperties/schema/ pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/fullProperties/schema/readme.txt pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/fullProperties/sql2entity.bat pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/fullProperties/sql2entity.sh pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/minimumProperties/ pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/minimumProperties/_project.bat pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/minimumProperties/_project.sh pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/minimumProperties/build-minimumProperties.properties pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/minimumProperties/dfprop/ pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/minimumProperties/dfprop/databaseInfoMap.dfprop pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/minimumProperties/doc.bat pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/minimumProperties/doc.sh pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/minimumProperties/generate.bat pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/minimumProperties/generate.sh pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/minimumProperties/jdbc.bat pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/minimumProperties/jdbc.sh pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/minimumProperties/log/ pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/minimumProperties/log/readme.txt pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/minimumProperties/output/ pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/minimumProperties/output/doc/ pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/minimumProperties/output/doc/readme.txt pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/minimumProperties/outside-sql-test.bat pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/minimumProperties/outside-sql-test.sh pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/minimumProperties/playsql/ pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/minimumProperties/playsql/replace-schema.sql pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/minimumProperties/replace-schema.bat pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/minimumProperties/replace-schema.sh pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/minimumProperties/schema/ pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/minimumProperties/schema/readme.txt pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/minimumProperties/sql2entity.bat pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/minimumProperties/sql2entity.sh pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/otherORMapper/ pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/otherORMapper/_project.bat pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/otherORMapper/_project.sh pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/otherORMapper/build-otherORMapper.properties pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/otherORMapper/doc.sh pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/otherORMapper/jdbc.sh pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/otherORMapper/jdbc_and_doc.bat pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/otherORMapper/log/ pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/otherORMapper/log/readme.txt pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/otherORMapper/output/ pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/otherORMapper/output/doc/ pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/otherORMapper/output/doc/project-schema-otherORMapper.html pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/otherORMapper/output/doc/readme.txt pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/otherORMapper/output/src/ pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/otherORMapper/output/src/dbflute/ pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/otherORMapper/output/src/dbflute/ldb/ pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/otherORMapper/output/src/dbflute/ldb/BookCollectionStatistic.java pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/otherORMapper/output/src/dbflute/ldb/BsBookCollectionStatistic.java pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/otherORMapper/playsql/ pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/otherORMapper/playsql/replace-schema.sql pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/otherORMapper/playsql/sql2entity/ pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/otherORMapper/playsql/sql2entity/LdBookDao_selectBookCollectionStatistic.sql pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/otherORMapper/schema/ pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/otherORMapper/schema/project-schema-otherORMapper.xml pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/otherORMapper/schema/readme.txt pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/otherORMapper/sql2entity.bat pompei/trunk/mydbflute/dbflute-0.5.2/etc/cmd/ pompei/trunk/mydbflute/dbflute-0.5.2/etc/cmd/_copy-properties.cmd pompei/trunk/mydbflute/dbflute-0.5.2/etc/cmd/_copy-properties.sh pompei/trunk/mydbflute/dbflute-0.5.2/etc/cmd/_df-copy-properties.cmd pompei/trunk/mydbflute/dbflute-0.5.2/etc/cmd/_df-copy-properties.sh pompei/trunk/mydbflute/dbflute-0.5.2/etc/cmd/_df-datadump.cmd pompei/trunk/mydbflute/dbflute-0.5.2/etc/cmd/_df-datadump.sh pompei/trunk/mydbflute/dbflute-0.5.2/etc/cmd/_df-doc.cmd pompei/trunk/mydbflute/dbflute-0.5.2/etc/cmd/_df-doc.sh pompei/trunk/mydbflute/dbflute-0.5.2/etc/cmd/_df-generate.cmd pompei/trunk/mydbflute/dbflute-0.5.2/etc/cmd/_df-generate.sh pompei/trunk/mydbflute/dbflute-0.5.2/etc/cmd/_df-invoke-replace-schema.cmd pompei/trunk/mydbflute/dbflute-0.5.2/etc/cmd/_df-invoke-replace-schema.sh pompei/trunk/mydbflute/dbflute-0.5.2/etc/cmd/_df-invoke-sql-directory.cmd pompei/trunk/mydbflute/dbflute-0.5.2/etc/cmd/_df-invoke-sql-directory.sh pompei/trunk/mydbflute/dbflute-0.5.2/etc/cmd/_df-jdbc.cmd pompei/trunk/mydbflute/dbflute-0.5.2/etc/cmd/_df-jdbc.sh pompei/trunk/mydbflute/dbflute-0.5.2/etc/cmd/_df-outside-sql-test.cmd pompei/trunk/mydbflute/dbflute-0.5.2/etc/cmd/_df-outside-sql-test.sh pompei/trunk/mydbflute/dbflute-0.5.2/etc/cmd/_df-playsql.cmd pompei/trunk/mydbflute/dbflute-0.5.2/etc/cmd/_df-playsql.sh pompei/trunk/mydbflute/dbflute-0.5.2/etc/cmd/_df-replace-schema.cmd pompei/trunk/mydbflute/dbflute-0.5.2/etc/cmd/_df-replace-schema.sh pompei/trunk/mydbflute/dbflute-0.5.2/etc/cmd/_df-sql2entity.cmd pompei/trunk/mydbflute/dbflute-0.5.2/etc/cmd/_df-sql2entity.sh -------------- next part -------------- Added: pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/fullProperties/_project.bat =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/fullProperties/_project.bat 2007-07-10 12:47:32 UTC (rev 219) +++ pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/fullProperties/_project.bat 2007-07-10 12:49:16 UTC (rev 220) @@ -0,0 +1,5 @@ + △ echo off + +set MY_PROJECT_NAME=ldb + +rem set DBFLUTE_HOME=..\mydbflute\dbflute-x.x.x Added: pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/fullProperties/_project.sh =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/fullProperties/_project.sh 2007-07-10 12:47:32 UTC (rev 219) +++ pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/fullProperties/_project.sh 2007-07-10 12:49:16 UTC (rev 220) @@ -0,0 +1,5 @@ +#!/bin/sh + +export MY_PROJECT_NAME=ldb + +#export DBFLUTE_HOME=../mydbflute/dbflute-x.x.x Added: pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/fullProperties/build-ldb.properties =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/fullProperties/build-ldb.properties 2007-07-10 12:47:32 UTC (rev 219) +++ pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/fullProperties/build-ldb.properties 2007-07-10 12:49:16 UTC (rev 220) @@ -0,0 +1,753 @@ +# ======================================================================================= +# for All +# ======= + +# ------------------------------------------------------------------- +# P R O J E C T +# ------------------------------------------------------------------- +# @FirstProperty +# @Required +torque.project = ldb + +# ------------------------------------------------------------------- +# T A R G E T D A T A B A S E +# ------------------------------------------------------------------- +# This is the target database, only considered when generating +# the SQL for your Torque project. Your possible choices are: +# +# axion, cloudscape, db2, db2400, hypersonic, interbase, mssql, +# mysql, oracle, postgresql, sapdb, sybase, firebird, derby, h2 +# ------------------------------------------------------------------- +# @FirstProperty +# @Required +torque.database = derby + +# ------------------------------------------------------------------- +# T A R G E T L A N G U A G E +# ------------------------------------------------------------------- +# (Default 'java') +# The target language. Your possible choices are: +# java, csharp +# ------------------------------------------------------------------- +# @FirstProperty +#torque.targetLanguage = java + +# ------------------------------------------------------------------- +# T E M P L A T E E N C O D I N G +# ------------------------------------------------------------------- +# (Default 'UTF-8') +# The encoding of Velocity template file. +# ------------------------------------------------------------------- +#torque.templateFileEncoding = UTF-8 + +# ------------------------------------------------------------------- +# S O U R C E F I L E E N C O D I N G +# ------------------------------------------------------------------- +# (Default 'UTF-8') +# The encoding of source file. +# ------------------------------------------------------------------- +#torque.sourceFileEncoding = UTF-8 + + + +# ======================================================================================= +# for OM task +# =========== + +# _/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/ +# Basic +# _/_/_/_/ +# /--------------------------------------------------------------------------- +# [Output Directory] +# java.dir: (Default '../src/main/java') +# The base output directory. +# +# If this value is '../src/main/java' and your project stype is under maven, +# you don't need to set up this property! +# +# {project} +# | +# |-dbflute_ldb +# | |-build-ldb.properties +# | |-... +# | +# |-src/main/java // *Here! +# |-src/main/resources +# |-... +# +# +# @FirstProperty +#torque.java.dir = ../src/main/java +# ----------------/ + +# /--------------------------------------------------------------------------- +# [Class Author] +# classAuthor: (Default 'DBFlute(AutoGenerator)') +# The value of the author tag in class javadoc. +# All classes are target. +# +#torque.classAuthor = DBFlute(AutoGenerator) +# ----------------/ + +# /--------------------------------------------------------------------------- +# [Naming] +# isJavaNameOfTableSameAsDbName: (Default 'false') +# [true] +# Java name of table is same as db name. +# ex) If the table name is 'OrderDetail', then the java name is 'OrderDetail'. +# +# [false] +# ex) If the table name is 'ORDER_DETAIL', then the java name is 'OrderDetail'. +# ex) If the table name is 'OrderDetail', then the java name is 'Orderdetail'. +# +# isJavaNameOfColumnSameAsDbName: (Default 'false') +# [true] +# Java name of column is same as db name. +# ex) If the table name is 'OrderDetail', then the java name is 'OrderDetail'. +# +# [false] +# ex) If the table name is 'ORDER_DETAIL', then the java name is 'OrderDetail'. +# ex) If the table name is 'OrderDetail', then the java name is 'Orderdetail'. +# +# @FirstProperty +#torque.isJavaNameOfTableSameAsDbName = false +# +# @FirstProperty +#torque.isJavaNameOfColumnSameAsDbName = false +# ----------------/ + +# /--------------------------------------------------------------------------- +# [Naming] +# isJavaNameOfTableSameAsDbName: (Default 'false') +# [true] +# Java name of table is same as db name. +# ex) If the table name is 'OrderDetail', then the java name is 'OrderDetail'. +# +# [false] +# ex) If the table name is 'ORDER_DETAIL', then the java name is 'OrderDetail'. +# ex) If the table name is 'OrderDetail', then the java name is 'Orderdetail'. +# +# isJavaNameOfColumnSameAsDbName: (Default 'false') +# [true] +# Java name of column is same as db name. +# ex) If the table name is 'OrderDetail', then the java name is 'OrderDetail'. +# +# [false] +# ex) If the table name is 'ORDER_DETAIL', then the java name is 'OrderDetail'. +# ex) If the table name is 'OrderDetail', then the java name is 'Orderdetail'. +# +# @FirstProperty +#torque.isJavaNameOfTableSameAsDbName = false +# +# @FirstProperty +#torque.isJavaNameOfColumnSameAsDbName = false +# ----------------/ + +# _/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/ +# Prefix +# _/_/_/_/ +# /--------------------------------------------------------------------------- +# [PrefixAndSuffix] +# projectPrefix: (Default null) +# If the property is 'Ld', all class names are 'LdXxx'. +# +# @FirstProperty +torque.projectPrefix = Ld +# ----------------/ + +# _/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/ +# Dicon +# _/_/ +# /--------------------------------------------------------------------------- +# [DBFluteDicon Information] +# dbfluteDiconNamespace: (Default 'dbflute') +# The namespace of dbflute dicon. +# +# dbfluteDiconPackageName: (Default '../resources') +# The package name of dbflute dicon. +# +# dbfluteDiconFileName: (Default 'dbflute.dicon') +# The file name of dbflute dicon. (Required) +# +# j2eeDiconResourceName: (Default Java:'j2ee.dicon' C#:'ado.dicon') +# The resource name of J2EE dicon. +# +# requiredTxComponentName: (Default Java:'requiredTx' C#:'LocalRequiredTx') +# The component name of 'requiredTx'-component. +# +# requiresNewTxComponentName: (Default Java:'requiresNewTx' C#:'LocalRequiresNewTx') +# The component name of 'requiresNewTx'-component. +# +# dbfluteDiconBeforeJ2eeIncludeDefinitionMap: (Default 'map:{}') +# The definition map of dbflute dicon include path before j2ee including. +# ex) map:{ dbflute/jdbc-xxx.dicon = dummy } +# +# dbfluteDiconOtherIncludeDefinitionMap: (Default 'map:{}') +# The definition map of dbflute dicon other include path. +# ex) map:{ dbflute/common.dicon = dummy } +# +# originalDBFluteComponentMap: (Default 'map:{}') +# The map of the original dbflute component. +# If componentName have '*' as prefix, the component should be Dao. +# ex) map:{ \ +# ; *bookAuthorDao = map:{ className=org.seasar.dbflute.example.approot.dao.ldb.nongenerate.dao.BookAuthorDao } \ +# ; blackListHandler = map:{ className=org.seasar.dbflute.example.approot.dao.ldb.nongenerate.handler.BlackListHandlerImpl } \ +# } +# +# originalBehaviorAspectMap: (Default 'map:{}') +# The map of the original behavior aspect. +# ex) map:{ interceptorName = map:{ \ +# className=org.seasar.dbflute.InterceptorClassName \ +# ; pointcut=selectList.*, selectEntity.* \ +# } \ +# } +# +# isAvailableBehaviorRequiresNewTx: (Default true) +# Is available the behavior setting about requiresNewTx in dbflute.dicon? +# +# isAvailableBehaviorRequiredTx: (Default true) +# Is available the behavior setting about requiredTx in dbflute.dicon? +# +# +# *Attension: +# It is necessary that main dicon of application includes dbflute dicon. +# ex) App dicon includes dbflute dicon. +# +# @FirstProperty +torque.dbfluteDiconNamespace = dbflute +torque.dbfluteDiconPackageName = ../resources +torque.dbfluteDiconFileName = dbflute-ldb.dicon +torque.j2eeDiconResourceName = j2ee-ldb.dicon +torque.requiredTxComponentName = requiredTx +torque.requiresNewTxComponentName = requiresNewTx +torque.dbfluteDiconBeforeJ2eeIncludeDefinitionMap = map:{} +torque.dbfluteDiconOtherIncludeDefinitionMap = map:{} +torque.originalDBFluteComponentMap = map:{ \ + ; *libraryDetailDao = map:{ className=dbflute.ldb.nongenerate.dao.LibraryDetailDao } \ + ; blackListHandler = map:{ className=dbflute.ldb.nongenerate.handler.BlackListHandlerImpl } \ + } +torque.originalBehaviorAspectMap = map:{} +torque.isAvailableBehaviorRequiresNewTx = true +torque.isAvailableBehaviorRequiredTx = true +# ----------------/ + +# _/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/ +# Package +# _/_/ +# /--------------------------------------------------------------------------- +# [EntityDao Package] +# packageBase: (Default '') +# The base directory of package. +# +# *If this property is specified and other package properties is not specified, +# Then The packages of generated class are as follows: +# +# ex) packageBase = org.seasar.dbflute.example.dbflute.ldb +# baseCommonPackage --> org.seasar.dbflute.example.dbflute.ldb.allcommon +# baseBehaviorPackage --> org.seasar.dbflute.example.dbflute.ldb.bsbhv +# baseDaoPackage --> org.seasar.dbflute.example.dbflute.ldb.bsdao +# baseEntityPackage --> org.seasar.dbflute.example.dbflute.ldb.bsentity +# conditionBeanPackage --> org.seasar.dbflute.example.dbflute.ldb.cbean +# extendedBehaviorPackage --> org.seasar.dbflute.example.dbflute.ldb.exbhv +# extendedDaoPackage --> org.seasar.dbflute.example.dbflute.ldb.exdao +# extendedEntityPackage --> org.seasar.dbflute.example.dbflute.ldb.exentity +# +# *If this property is not specified, you should specify the other package properties. +# +# +# baseCommonPackage: (Default Java:'allcommon' C#:'allcommon') +# baseBehaviorPackage: (Default Java:'bsbhv' C#:'bsbhv') +# baseDaoPackage: (Default Java:'bsdao' C#:'bsdao') +# baseEntityPackage: (Default Java:'bsentity' C#:'bsentity') +# conditionBeanPackage: (Default Java:'cbean' C#:'cbean') +# extendedBehaviorPackage: (Default Java:'exbhv' C#:'exbhv') +# extendedDaoPackage: (Default Java:'exdao' C#:'exdao') +# extendedEntityPackage: (Default Java:'exentity' C#:'exentity') +# +# @FirstProperty +torque.packageBase = dbflute.ldb +# ----------------/ + +# _/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/ +# S2Dao Adjustment +# _/_/_/_/_/_/ +# /--------------------------------------------------------------------------- +# [S2Dao Version] +# s2daoVersion: (Default [The latest version]) +# +# @JavaOnly +torque.s2daoVersion = 1.0.43 +# ----------------/ + +# /--------------------------------------------------------------------------- +# [OtherConnectionDaoInitialization] +# isAvailableOtherConnectionDaoInitialization: (Default 'false') +# this property is valid only when isVersionAfter1040 is true. +# +# @JavaOnly +torque.isAvailableOtherConnectionDaoInitialization = true +# ----------------/ + +# /--------------------------------------------------------------------------- +# [DaoMethodLazyInitializing] (Default 'false') +# [true] +# S2Dao initialize per dao method. +# +# [false] +# S2Dao initialize per dao Interface(default behavior). +# +# @JavaOnly +torque.isAvailableDaoMethodLazyInitializing = true +# ----------------/ + +# _/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/ +# Adavance +# _/_/ + +# /--------------------------------------------------------------------------- +# [Sequence] +# sequenceDefinitionMap: (Default 'map:{}') +# The method 'XxxDao#selectNextVal()' is generated for its table primary key. +# +# ex) public String selectNextVal_SQL = "select gen_id(BOOK_BOOK_ID_INC, 1) from RDB$DATABASE"; +# public java.math.BigDecimal selectNextVal(); +# // This example is for the database of Firebird +# +# sequenceReturnType: (Default 'java.math.BigDecimal') +# The return type of The method 'XxxDao#selectNextVal()'. +# + +# +# *Apache Derby does not support Sequence-Object. +# But I want to test this property. +# +torque.sequenceDefinitionMap = map:{ \ + author = AUTHOR_AUTHOR_ID_INC \ + ; BOOK = BOOK_BOOK_ID_INC \ + ; LbUser = LB_USER_ID_INC \ + } + +#torque.sequenceReturnType = java.lang.Integer + +# /--------------------------------------------------------------------------- +# [Identity] +# identityDefinitionMap: (NotRequired - Default 'map:{}') +# ID annotation of s2dao is generated for its table primary key. +# +# ex) public static final String bookId_ID = "identity"; +# +# *Identity must be auto-registered by JDBC auto-increment information. +# +#torque.identityDefinitionMap = map:{ \ +# AUTHOR = AUTHOR_ID \ +# ; BOOK = BOOK_ID \ +# ; COLLECTION = COLLECTION_ID \ +# } + +# ----------------/ + +# /-------------------------------------------------------------------------- +# [Optimistic Lock] +# updateDateFieldName: (Default null) +# The field name of update-date. +# For example, if this property is 'UPDATE_DATE', +# the annotation is generated as follows: +# public static final String TIMESTAMP_PROPERTY = "updateDate"; +# +# updateDateExceptTableList: (Default list:{}) +# The tables are out-of-target of 'updateDateFieldName'. +# ex) list:{ prefix:LB_ } +# +# versionNoFieldName: (Default null) +# The field name of version-no. +# For example, if this property id 'VERSION_NO' +# the annotation is generated as follows: +# public static final String VERSION_NO_PROPERTY = "versionNo"; +# +torque.updateDateFieldName = U_TIMESTAMP +torque.updateDateExceptTableList = list:{ prefix:LB_ } +#torque.versionNoFieldName = null +# ----------------/ + +# /--------------------------------------------------------------------------- +# [Common Column] +# commonColumnMap: (Default 'map:{}') +# The map of common column. +# Default value is enmpty-map. +# For example, The date you registered the record, The user who updated the record and so on... +# +# ex) map:{ \ +# ; R_USER=VARCHAR; R_MODULE=VARCHAR; R_TIMESTAMP=TIMESTAMP \ +# ; U_USER=VARCHAR; U_MODULE=VARCHAR; U_TIMESTAMP=TIMESTAMP \ +# } +# +# commonColumnSetupInterceptorAspectPoint: (Default 'behavior') +# The aspect point of common-column-setup-interceptor. {behavior or dao} +# +# If the value is 'behavior', the interceptor is related to behavior. +# Its pointcut is as follows: +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# delegateInsert.*, delegateCreate.*, delegateAdd.* +# , delegateUpdate.*, delegateModify.*, delegateStore.* +# , delegateDelete.*, delegateRemove.* +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# +# If the value is 'dao', the interceptor is related to dao. +# its pointcut is as follows: +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# insert.*, create.*, add.*, update.*, modify.*, store.* +# , delete.*, remove.* +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# +# commonColumnSetupBeforeInsertInterceptorLogicMap: (Default 'map:{}') +# commonColumnSetupBeforeUpdateInterceptorLogicMap: (Default 'map:{}') +# commonColumnSetupBeforeDeleteInterceptorLogicMap: (Default 'map:{}') +# ex) map:{ \ +# ; R_USER = ...allcommon.AccessContext.getAccessUserOnThread() \ +# ; R_MODULE = ...allcommon.AccessContext.getAccessModuleOnThread() \ +# ; R_TIMESTAMP = ...allcommon.AccessContext.getAccessTimestampOnThread() \ +# ; U_USER = entity.getRUser() \ +# ; U_MODULE = entity.getRUser() \ +# } +# ex) map:{ \ +# ; U_USER = ...allcommon.AccessContext.getAccessUserOnThread() \ +# ; U_MODULE = ...allcommon.AccessContext.getAccessModuleOnThread() \ +# } +# +torque.commonColumnMap = map:{ \ + ; R_USER=VARCHAR; R_MODULE=VARCHAR; R_TIMESTAMP=TIMESTAMP \ + ; U_USER=VARCHAR; U_MODULE=VARCHAR; U_TIMESTAMP=TIMESTAMP \ + } +torque.commonColumnSetupInterceptorAspectPoint = behavior +torque.commonColumnSetupBeforeInsertInterceptorLogicMap = map:{ \ + ; R_USER = dbflute.ldb.allcommon.LdAccessContext.getAccessUserOnThread() \ + ; R_MODULE = dbflute.ldb.allcommon.LdAccessContext.getAccessModuleOnThread() \ + ; R_TIMESTAMP = dbflute.ldb.allcommon.LdAccessContext.getAccessTimestampOnThread() \ + ; U_USER = entity.getRUser() \ + ; U_MODULE = entity.getRUser() \ + } + +torque.commonColumnSetupBeforeUpdateInterceptorLogicMap = map:{ \ + ; U_USER = dbflute.ldb.allcommon.LdAccessContext.getAccessUserOnThread() \ + ; U_MODULE = dbflute.ldb.allcommon.LdAccessContext.getAccessModuleOnThread() \ + } + +torque.commonColumnSetupBeforeDeleteInterceptorLogicMap = map:{} +# ----------------/ + +# _/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/ +# Select Param +# _/_/_/_/_/_/ + +# /--------------------------------------------------------------------------- +# [SelectQueryTimeout] +# selectQueryTimeout: (Default '-1') +# This value is argument for Statement#setQueryTimeout(). +# +#torque.selectQueryTimeout = -1 +# ----------------/ + +# /--------------------------------------------------------------------------- +# [StatementResultSetType] +# statementResultSetType: (Default '') +# Result set type of statement. +# +# *If you specify this property, you should do as follows: +# ex) at jdbc.dicon +# +# x +# o +# +# @JavaOnly +torque.statementResultSetType = ResultSet.TYPE_SCROLL_INSENSITIVE +# ----------------/ + +# /--------------------------------------------------------------------------- +# [StatementResultSetConcurrency] (Default '') +# Result set concurrency of statement. +# +# *If you specify this property, you should do as follows: +# ex) at jdbc.dicon +# +# x +# o +# +# @JavaOnly +torque.statementResultSetConcurrency = ResultSet.CONCUR_READ_ONLY +# ----------------/ + +# _/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/ +# Method Making +# _/_/_/_/ +# /--------------------------------------------------------------------------- +# [Make Deprecated] +# isMakeDeprecated: (Default 'false') +# [true] +# Make deprecated method and class and so on... +# *You shuold set this property FALSE! +# +# isMakeBehaviorForUpdate (Default 'false') +# [true] +# Make for-update method of behavior. +# +# isMakeConditionQueryEqualEmptyString: (Default 'false') +# [true] +# Make equal empty-string method of condition-query. +# +# isMakeConditionQueryNumericArgumentLong: (Default 'false') +# [true] +# Make numeric argument long method of condition-query. +# +torque.isMakeDeprecated = true +torque.isMakeBehaviorForUpdate = true +torque.isMakeConditionQueryEqualEmptyString = true + +# @JavaOnly +torque.isMakeConditionQueryNumericArgumentLong = true +# ----------------/ + +# _/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/ +# Extract Component +# _/_/_/_/_/_/ + +# /--------------------------------------------------------------------------- +# [ExtractAccept Protocol] +# extractAcceptStartBrace: (NotRequired - Default '@{') +# extractAcceptEndBrace: (NotRequired - Default '@}') +# extractAcceptDelimiter: (NotRequired - Default '@;') +# extractAcceptEqual: (NotRequired - Default '@=') +torque.extractAcceptStartBrace = @{ +torque.extractAcceptEndBrace = @} +torque.extractAcceptDelimiter = @; +torque.extractAcceptEqual = @= +# ----------------/ + +# /--------------------------------------------------------------------------- +# [Include Query] (NotRequired - Default 'map:{}') +# +#torque.includeQueryMap = map:{ +# ; String = map:{ NotInScope = map:{ PRO_PURCHASE_PARTS = list:{ PURCHASE_PARTS_ID ; OTS_PURCHASE_CODE } } +#} +# ----------------/ + +# _/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/ +# Other Property +# _/_/_/_/_/_/ +# /--------------------------------------------------------------------------- +# [NonPrimaryKeyWritable] (Default 'false') +# [true] +# Generate writable method at Non PrimaryKey Table. +# +# [false] +# Non. +# +# @JavaOnly +torque.isAvailableNonPrimaryKeyWritable = true +# ----------------/ + +# /--------------------------------------------------------------------------- +# [MultipleFKPropertyMap] +# multipleFKPropertyMap: (Default 'map:{}') +# +# @JavaOnly +torque.multipleFKPropertyMap = map:{ \ + ; NEXT_LIBRARY = map:{ \ + ; LIBRARY_ID = map:{columnAliasName = baseId} \ + ; NEXT_LIBRARY_ID = map:{columnAliasName = nextId} \ + } \ +} +# ----------------/ + + + +# ======================================================================================= +# for JDBC task +# ============= + +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# [Database Informaition] +# +# * * * * * * * * * * * * * * * * * * * * * * * * * +# You shuold use './dfprop/databaseInfoMap.dfprop' +# Look the file! +# * * * * * * * * * * * * * * * * * * * * * * * * * +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + +# Target database types: (NotNull - list:{TABLE;VIEW;...}) +# Default value is 'list:{TABLE;VIEW}'. +# +torque.database.type.list = list:{TABLE;VIEW} + +# /--------------------------------------------------------------------------- +# [Target Database Object] +# database.type.list: (Default 'list:{TABLE;VIEW}') +# +# table.except.list: (NotNull 'list:{}') +# Unnecessary tables. +# +# For example, if you want to except the table that the name starts with 'D_', +# you should set this property as follows: +# ex) list:{prefix:D_} +# +# And other example: +# ex) list:{prefix:D_; suffix:_Test; sysobjects; dtproperties} +# +# table.target.list: (Default 'list:{}' --> All tables are target) +# Target tables. +# If this property is empty-list, the property of [Unnecessary tables] is valid. +# +# For example, if you want to contains the table that the name starts with 'D_', +# you should set this property as follows: +# ex) list:{prefix:D_} +# +# And other example: +# ex) list:{prefix:D_; suffix:_Test; sysobjects; dtproperties} +# +# If the table defined at this property is defined at [Unnecessary tables] too, +# the table is target of generating. +# +# @FirstProperty +#torque.database.type.list = list:{TABLE;VIEW} +#torque.table.except.list = list:{} +#torque.table.target.list = list:{} +# ----------------/ + + +# ======================================================================================= +# for Internal +# ============ +# Normally you don't need to change these properties. + +# +# [JDBC to java-native mapping] (NotRequired - Default 'map:{}') +# +# ex) map:{INTEGER=java.lang.Integer;TIMESTAMP=java.util.Date} +# ex) map:{} // If you don't want to change... +# +# Default mapping as follows: +# * ------------------------------------------------------------------ +# * DBFlute Type | Java Type | CSharp Type | +# * ------------------------------------------------------------------ +# * CHAR | java.lang.String | String | +# * VARCHAR | java.lang.String | String | +# * LONGVARCHAR | java.lang.String | String | +# * NUMERIC | java.math.BigDecimal | Nullables.NullableDecimal | +# * DECIMAL | java.math.BigDecimal | Nullables.NullableDecimal | +# * BIT | java.lang.Boolean | Nullables.NullableBoolean | +# * TINYINT | java.math.BigDecimal | Nullables.NullableDecimal | +# * SMALLINT | java.math.BigDecimal | Nullables.NullableDecimal | +# * INTEGER | java.math.BigDecimal | Nullables.NullableDecimal | +# * BIGINT | java.math.BigDecimal | Nullables.NullableDecimal | +# * REAL | java.math.BigDecimal | Nullables.NullableDecimal | +# * FLOAT | java.math.BigDecimal | Nullables.NullableDecimal | +# * DOUBLE | java.math.BigDecimal | Nullables.NullableDecimal | +# * BINARY | byte[] | byte[] | +# * VARBINARY | byte[] | byte[] | +# * LONGVARBINARY | byte[] | byte[] | +# * DATE | java.util.Date | Nullables.NullableDateTime| +# * TIME | java.sql.Time | Nullables.NullableDateTime| +# * TIMESTAMP | java.sql.Timestamp | Nullables.NullableDateTime| +# * +# * ------------------------------------------------------------------ +# * A couple variations have been introduced to cover cases +# * that may arise, but are not covered above. +# * BOOLEANCHAR | java.lang.Boolean | +# * BOOLEANINT | OR java.lang.Boolean | +# * +torque.jdbcToJavaNativeMap = map:{} + +# [The list of java-native that treated as String] (NotRequired - Default 'list:{}') +# *This property overrides all-default-value. +# +# Default list as follows: (When you set this empty) +# Java{String} / CSharp{String} +# +torque.javaNativeStringList = list:{} + +# [The list of java-native that treated as Boolean] (NotRequired - Default 'list:{}') +# *This property overrides all-default-value. +# +# Default list as follows: (When you set this empty) +# Java{Boolean} / CSharp{Nullables.NullableBoolean} +# +torque.javaNativeBooleanList = list:{} + +# [The list of java-native that treated as Number] (NotRequired - Default 'list:{}') +# *This property overrides all-default-value. +# +# Default list as follows: (When you set this empty) +# Java{Byte, Short, Integer, Long, Float, Double, BigDecimal, BigInteger} / CSharp{Nullables.NullableDecimal} +# +torque.javaNativeNumberList = list:{} + +# [The list of java-native that treated as Date] (NotRequired - Default 'list:{}') +# *This property overrides all-default-value. +# +# Default list as follows: (When you set this empty) +# Java{Date, Time, Timestamp} / CSharp{Nullables.NullableDateTime} +# +torque.javaNativeDateList = list:{} + +# [The list of java-native that treated as Binary] (NotRequired - Default 'list:{}') +# *This property overrides all-default-value. +# +# Default list as follows: (When you set this empty) +# byte[] +# +torque.javaNativeBinaryList = list:{} + + +# /--------------------------------------------------------------------------- +# [ToLowerInGeneratorUnderscoreMethod] (NotRequired - Default 'true') +# [true] +# +# [false] +# +torque.isAvailableToLowerInGeneratorUnderscoreMethod = true +# ----------------/ + + + + +# ======================================================================================= +# for PlaySql +# =========== +# /--------------------------------------------------------------------------- +# [Replace Schema] (NotRequired - Default 'map:{}') +# invokeReplaceSchemaDefinitionMap: (NotRequired - Default 'map:{}') +# +# ex) torque.replaceSchemaDefinitionMap = map:{ \ +# isAutoCommit = false \ +# ; isRollbackOnly = false \ +# ; isErrorContinue = false \ +# ; sqlFile = ./playsql/replace-schema.sql \ +# } +# +# invokeSqlDirectoryDefinitionMap: (NotRequired - Default 'map:{}') +# +# ex) torque.sqlDirectoryDefinitionMap = map:{ \ +# isAutoCommit = false \ +# ; isRollbackOnly = false \ +# ; isErrorContinue = false \ +# ; sqlDirectory = ./playsql \ +# } +# +#torque.replaceSchemaDefinitionMap = map:{ \ +# isAutoCommit = false \ +# ; isRollbackOnly = false \ +# ; isErrorContinue = true \ +# ; sqlFile = ./playsql/replace-schema.sql \ +#} +# +# torque.sql2EntityDefinitionMap = map:{ \ +# ; sqlDirectory = ./playsql/testsql \ +# ; isPlainEntity = true \ +# } +# +# +#torque.sql2EntityDefinitionMap = map:{ \ +# ; isPlainEntity = true \ +#} + Added: pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/fullProperties/dfprop/databaseInfoMap.dfprop =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/fullProperties/dfprop/databaseInfoMap.dfprop 2007-07-10 12:47:32 UTC (rev 219) +++ pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/fullProperties/dfprop/databaseInfoMap.dfprop 2007-07-10 12:49:16 UTC (rev 220) @@ -0,0 +1,7 @@ +map:{ + ; driver = {Please write your setting! at './dfprop/databaseInfoMap.dfprop'} + ; url = ... + ; schema = ... + ; user = ... + ; password = ... +} \ No newline at end of file Added: pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/fullProperties/doc.bat =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/fullProperties/doc.bat 2007-07-10 12:47:32 UTC (rev 219) +++ pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/fullProperties/doc.bat 2007-07-10 12:49:16 UTC (rev 220) @@ -0,0 +1,17 @@ + △ echo off + +call _project.bat + +rem /nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn +rem Specify the file path to be used as build-properties. +rem nnnnnnnnnn/ +set MY_PROPERTIES_PATH=build-%MY_PROJECT_NAME%.properties + +rem /nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn +rem Execute {Document}. +rem nnnnnnnnnn/ +call %DBFLUTE_HOME%\etc\cmd\_df-doc.cmd %MY_PROPERTIES_PATH% + +pause + + Added: pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/fullProperties/doc.sh =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/fullProperties/doc.sh 2007-07-10 12:47:32 UTC (rev 219) +++ pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/fullProperties/doc.sh 2007-07-10 12:49:16 UTC (rev 220) @@ -0,0 +1,14 @@ +#!/bin/sh + +. _project.sh + +echo "/nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn" +echo "Specify the file path to be used as build-properties." +echo "nnnnnnnnnn/" +export MY_PROPERTIES_PATH=build-${MY_PROJECT_NAME}.properties + +echo "/nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn" +echo "Execute {Document}." +echo "nnnnnnnnnn/" +sh $DBFLUTE_HOME/etc/cmd/_df-doc.sh $MY_PROPERTIES_PATH + Added: pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/fullProperties/generate.bat =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/fullProperties/generate.bat 2007-07-10 12:47:32 UTC (rev 219) +++ pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/fullProperties/generate.bat 2007-07-10 12:49:16 UTC (rev 220) @@ -0,0 +1,17 @@ + △ echo off + +call _project.bat + +rem /nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn +rem Specify the file path to be used as build-properties. +rem nnnnnnnnnn/ +set MY_PROPERTIES_PATH=build-%MY_PROJECT_NAME%.properties + +rem /nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn +rem Execute {Generate}. +rem nnnnnnnnnn/ +call %DBFLUTE_HOME%\etc\cmd\_df-generate.cmd %MY_PROPERTIES_PATH% + +pause + + Added: pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/fullProperties/generate.sh =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/fullProperties/generate.sh 2007-07-10 12:47:32 UTC (rev 219) +++ pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/fullProperties/generate.sh 2007-07-10 12:49:16 UTC (rev 220) @@ -0,0 +1,16 @@ +#!/bin/sh + +. _project.sh + +echo "/nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn" +echo "Specify the file path to be used as build-properties." +echo "nnnnnnnnnn/" +export MY_PROPERTIES_PATH=build-${MY_PROJECT_NAME}.properties + +echo "/nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn" +echo "Execute {Generate}." +echo "nnnnnnnnnn/" +sh $DBFLUTE_HOME/etc/cmd/_df-generate.sh $MY_PROPERTIES_PATH + + + Added: pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/fullProperties/jdbc.bat =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/fullProperties/jdbc.bat 2007-07-10 12:47:32 UTC (rev 219) +++ pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/fullProperties/jdbc.bat 2007-07-10 12:49:16 UTC (rev 220) @@ -0,0 +1,17 @@ + △ echo off + +call _project.bat + +rem /nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn +rem Specify the file path to be used as build-properties. +rem nnnnnnnnnn/ +set MY_PROPERTIES_PATH=build-%MY_PROJECT_NAME%.properties + +rem /nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn +rem Execute {JDBC and Document}. +rem nnnnnnnnnn/ +call %DBFLUTE_HOME%\etc\cmd\_df-jdbc.cmd %MY_PROPERTIES_PATH% + +pause + + Added: pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/fullProperties/jdbc.sh =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/fullProperties/jdbc.sh 2007-07-10 12:47:32 UTC (rev 219) +++ pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/fullProperties/jdbc.sh 2007-07-10 12:49:16 UTC (rev 220) @@ -0,0 +1,15 @@ +#!/bin/sh + +. _project.sh + +echo "/nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn" +echo "Specify the file path to be used as build-properties." +echo "nnnnnnnnnn/" +export MY_PROPERTIES_PATH="build-${MY_PROJECT_NAME}.properties" + +echo "/nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn" +echo "Execute {JDBC and Document}." +echo "nnnnnnnnnn/" +sh ${DBFLUTE_HOME}/etc/cmd/_df-jdbc.sh ${MY_PROPERTIES_PATH} + + Added: pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/fullProperties/log/readme.txt =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/fullProperties/log/readme.txt 2007-07-10 12:47:32 UTC (rev 219) +++ pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/fullProperties/log/readme.txt 2007-07-10 12:49:16 UTC (rev 220) @@ -0,0 +1 @@ +Directory for LogFile Added: pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/fullProperties/output/doc/readme.txt =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/fullProperties/output/doc/readme.txt 2007-07-10 12:47:32 UTC (rev 219) +++ pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/fullProperties/output/doc/readme.txt 2007-07-10 12:49:16 UTC (rev 220) @@ -0,0 +1 @@ +Directory for Document Added: pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/fullProperties/outside-sql-test.bat =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/fullProperties/outside-sql-test.bat 2007-07-10 12:47:32 UTC (rev 219) +++ pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/fullProperties/outside-sql-test.bat 2007-07-10 12:49:16 UTC (rev 220) @@ -0,0 +1,17 @@ + △ echo off + +call _project.bat + +rem /nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn +rem Specify the file path to be used as build-properties. +rem nnnnnnnnnn/ +set MY_PROPERTIES_PATH=build-%MY_PROJECT_NAME%.properties + +rem /nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn +rem Execute {Outsite-Sql-Test}. +rem nnnnnnnnnn/ +call %DBFLUTE_HOME%\etc\cmd\_df-outside-sql-test.cmd %MY_PROPERTIES_PATH% + +pause + + Added: pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/fullProperties/outside-sql-test.sh =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/fullProperties/outside-sql-test.sh 2007-07-10 12:47:32 UTC (rev 219) +++ pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/fullProperties/outside-sql-test.sh 2007-07-10 12:49:16 UTC (rev 220) @@ -0,0 +1,15 @@ +#!/bin/sh + +. _project.sh + +echo "/nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn" +echo "Specify the file path to be used as build-properties." +echo "nnnnnnnnnn/" +export MY_PROPERTIES_PATH=build-${MY_PROJECT_NAME}.properties + +echo "/nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn" +echo "Execute {Outsite-Sql-Test}." +echo "nnnnnnnnnn/" +sh $DBFLUTE_HOME/etc/cmd/_df-outside-sql-test.sh $MY_PROPERTIES_PATH + + Added: pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/fullProperties/playsql/replace-schema.sql =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/fullProperties/playsql/replace-schema.sql 2007-07-10 12:47:32 UTC (rev 219) +++ pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/fullProperties/playsql/replace-schema.sql 2007-07-10 12:49:16 UTC (rev 220) @@ -0,0 +1,418 @@ +ALTER TABLE BLACK_ACTION DROP CONSTRAINT FK_BLACK_ACTION_BLACK_LIST +; + +ALTER TABLE BLACK_ACTION DROP CONSTRAINT FK_BLACK_ACTION_LOOKUP +; + +ALTER TABLE BLACK_LIST DROP CONSTRAINT FK_BLACK_LIST_LB_USER +; + +ALTER TABLE BOOK DROP CONSTRAINT FK_BOOK_AUTHOR +; + +ALTER TABLE BOOK DROP CONSTRAINT FK_BOOK_PUBLISHER +; + +ALTER TABLE BOOK DROP CONSTRAINT FK_BOOK_GENRE +; + +ALTER TABLE COLLECTION DROP CONSTRAINT FK_COLLECTION_BOOK +; + +ALTER TABLE COLLECTION DROP CONSTRAINT FK_COLLECTION_LIBRARY +; + +ALTER TABLE COLLECTION_STATUS DROP CONSTRAINT FK_COLLECTION_STATUS_COLLECTION +; + +ALTER TABLE COLLECTION_STATUS DROP CONSTRAINT FK_COLLECTION_STATUS_LOOKUP +; + +ALTER TABLE GENRE DROP CONSTRAINT FK_GENRE_GENRE +; + +ALTER TABLE LB_USER DROP CONSTRAINT FK_LB_USER_LIBRARY +; + +ALTER TABLE LENDING DROP CONSTRAINT FK_LENDING_LIBRARY +; + +ALTER TABLE LENDING DROP CONSTRAINT FK_LENDING_LB_USER +; + +ALTER TABLE LENDING_COLLECTION DROP CONSTRAINT FK_LENDING_COLLECTION_LENDING +; + +ALTER TABLE LENDING_COLLECTION DROP CONSTRAINT FK_LENDING_COLLECTION_COL +; + +ALTER TABLE NEXT_LIBRARY DROP CONSTRAINT FK_NEXT_LIBRARY_LIBRARY_ID +; + +ALTER TABLE NEXT_LIBRARY DROP CONSTRAINT FK_NEXT_LIBRARY_NEXT_LIBRARY_ID +; + + +DROP TABLE AUTHOR +; +DROP TABLE BLACK_ACTION +; +DROP TABLE BLACK_ACTION_LOOKUP +; +DROP TABLE BLACK_LIST +; +DROP TABLE BOOK +; +DROP TABLE COLLECTION +; +DROP TABLE COLLECTION_STATUS +; +DROP TABLE COLLECTION_STATUS_LOOKUP +; +DROP TABLE GARBAGE +; +DROP TABLE GENRE +; +DROP TABLE LB_USER +; +DROP TABLE LENDING +; +DROP TABLE LENDING_COLLECTION +; +DROP TABLE LIBRARY +; +DROP TABLE NEXT_LIBRARY +; +DROP TABLE PUBLISHER +; + +CREATE TABLE AUTHOR ( + AUTHOR_ID integer NOT NULL GENERATED BY DEFAULT AS IDENTITY (START WITH 1, INCREMENT BY 1), + AUTHOR_NAME varchar(80) NOT NULL, + R_TIME timestamp DEFAULT CURRENT_TIMESTAMP NOT NULL, + U_TIME timestamp DEFAULT CURRENT_TIMESTAMP NOT NULL, + R_STAFF varchar(50) DEFAULT 'DefaultStaff' NOT NULL, + U_STAFF varchar(50) DEFAULT 'DefaultStaff' NOT NULL +) +; + +CREATE TABLE BLACK_ACTION ( + BLACK_ACTION_ID integer NOT NULL GENERATED BY DEFAULT AS IDENTITY (START WITH 1, INCREMENT BY 1), + BLACK_LIST_ID integer NOT NULL, + BLACK_ACTION_CODE char(3) NOT NULL, + BLACK_LEVEL smallint NOT NULL, + EVIDENCE_PHOTOGRAPH blob, + R_TIME timestamp DEFAULT CURRENT_TIMESTAMP NOT NULL, + U_TIME timestamp DEFAULT CURRENT_TIMESTAMP NOT NULL, + R_STAFF varchar(50) DEFAULT 'DefaultStaff' NOT NULL, + U_STAFF varchar(50) DEFAULT 'DefaultStaff' NOT NULL +) +; + +CREATE TABLE BLACK_ACTION_LOOKUP ( + BLACK_ACTION_CODE char(3) NOT NULL, + BLACK_ACTION_NAME varchar(80) NOT NULL, + R_TIME timestamp DEFAULT CURRENT_TIMESTAMP NOT NULL, + U_TIME timestamp DEFAULT CURRENT_TIMESTAMP NOT NULL, + R_STAFF varchar(50) DEFAULT 'DefaultStaff' NOT NULL, + U_STAFF varchar(50) DEFAULT 'DefaultStaff' NOT NULL +) +; + +CREATE TABLE BLACK_LIST ( + BLACK_LIST_ID integer NOT NULL GENERATED BY DEFAULT AS IDENTITY (START WITH 1, INCREMENT BY 1), + LB_USER_ID integer NOT NULL, + BLACK_RANK char(3) NOT NULL, + R_TIME timestamp DEFAULT CURRENT_TIMESTAMP NOT NULL, + U_TIME timestamp DEFAULT CURRENT_TIMESTAMP NOT NULL, + R_STAFF varchar(50) DEFAULT 'DefaultStaff' NOT NULL, + U_STAFF varchar(50) DEFAULT 'DefaultStaff' NOT NULL +) +; + +CREATE TABLE BOOK ( + BOOK_ID integer NOT NULL GENERATED BY DEFAULT AS IDENTITY (START WITH 1, INCREMENT BY 1), + ISBN_NO varchar(20) NOT NULL, + BOOK_NAME varchar(80) NOT NULL, + AUTHOR_ID integer NOT NULL, + PUBLISHER_ID integer NOT NULL, + MAX_LENDING_DATE_COUNT smallint NOT NULL, + GENRE_CODE varchar(12), + OPENING_PART clob, + R_TIME timestamp DEFAULT CURRENT_TIMESTAMP NOT NULL, + U_TIME timestamp DEFAULT CURRENT_TIMESTAMP NOT NULL, + R_STAFF varchar(50) DEFAULT 'DefaultStaff' NOT NULL, + U_STAFF varchar(50) DEFAULT 'DefaultStaff' NOT NULL +) +; + +CREATE TABLE COLLECTION ( + COLLECTION_ID integer NOT NULL, + LIBRARY_ID smallint NOT NULL, + BOOK_ID integer NOT NULL, + ARRIVAL_DATE timestamp NOT NULL, + R_TIME timestamp DEFAULT CURRENT_TIMESTAMP NOT NULL, + U_TIME timestamp DEFAULT CURRENT_TIMESTAMP NOT NULL, + R_STAFF varchar(50) DEFAULT 'DefaultStaff' NOT NULL, + U_STAFF varchar(50) DEFAULT 'DefaultStaff' NOT NULL +) +; + +CREATE TABLE COLLECTION_STATUS ( + COLLECTION_ID integer NOT NULL, + COLLECTION_STATUS_CODE char(3) NOT NULL, + R_TIME timestamp DEFAULT CURRENT_TIMESTAMP NOT NULL, + U_TIME timestamp DEFAULT CURRENT_TIMESTAMP NOT NULL, + R_STAFF varchar(50) DEFAULT 'DefaultStaff' NOT NULL, + U_STAFF varchar(50) DEFAULT 'DefaultStaff' NOT NULL +) +; + +CREATE TABLE COLLECTION_STATUS_LOOKUP ( + COLLECTION_STATUS_CODE char(3) NOT NULL, + COLLECTION_STATUS_NAME varchar(80) NOT NULL, + R_TIME timestamp DEFAULT CURRENT_TIMESTAMP NOT NULL, + U_TIME timestamp DEFAULT CURRENT_TIMESTAMP NOT NULL, + R_STAFF varchar(50) DEFAULT 'DefaultStaff' NOT NULL, + U_STAFF varchar(50) DEFAULT 'DefaultStaff' NOT NULL +) +; + +CREATE TABLE GARBAGE ( + GARBAGE_MEMO varchar(50), + GARBAGE_TIME timestamp +) +; + +CREATE TABLE GENRE ( + GENRE_CODE varchar(12) NOT NULL, + GENRE_NAME varchar(80) NOT NULL, + PARENT_GENRE_CODE varchar(12), + R_TIME timestamp DEFAULT CURRENT_TIMESTAMP NOT NULL, + U_TIME timestamp DEFAULT CURRENT_TIMESTAMP NOT NULL, + R_STAFF varchar(50) DEFAULT 'DefaultStaff' NOT NULL, + U_STAFF varchar(50) DEFAULT 'DefaultStaff' NOT NULL +) +; + +CREATE TABLE LB_USER ( + LB_USER_ID integer NOT NULL GENERATED BY DEFAULT AS IDENTITY (START WITH 1, INCREMENT BY 1), + LB_USER_NAME varchar(80) NOT NULL, + LIBRARY_ID smallint NOT NULL, + USER_PASSWORD varchar(50) NOT NULL, + R_TIME timestamp DEFAULT CURRENT_TIMESTAMP NOT NULL, + U_TIME timestamp DEFAULT CURRENT_TIMESTAMP NOT NULL, + R_STAFF varchar(50) DEFAULT 'DefaultStaff' NOT NULL, + U_STAFF varchar(50) DEFAULT 'DefaultStaff' NOT NULL +) +; + +CREATE TABLE LENDING ( + LENDING_ID integer NOT NULL GENERATED BY DEFAULT AS IDENTITY (START WITH 1, INCREMENT BY 1), + LIBRARY_ID smallint NOT NULL, + LB_USER_ID integer NOT NULL, + LENDING_DATE timestamp NOT NULL, + R_TIME timestamp DEFAULT CURRENT_TIMESTAMP NOT NULL, + U_TIME timestamp DEFAULT CURRENT_TIMESTAMP NOT NULL, + R_STAFF varchar(50) DEFAULT 'DefaultStaff' NOT NULL, + U_STAFF varchar(50) DEFAULT 'DefaultStaff' NOT NULL +) +; + +CREATE TABLE LENDING_COLLECTION ( + LENDING_ID integer NOT NULL, + COLLECTION_ID integer NOT NULL, + RETURN_LIMIT_DATE timestamp NOT NULL, + R_TIME timestamp DEFAULT CURRENT_TIMESTAMP NOT NULL, + U_TIME timestamp DEFAULT CURRENT_TIMESTAMP NOT NULL, + R_STAFF varchar(50) DEFAULT 'DefaultStaff' NOT NULL, + U_STAFF varchar(50) DEFAULT 'DefaultStaff' NOT NULL +) +; + +CREATE TABLE LIBRARY ( + LIBRARY_ID smallint NOT NULL GENERATED BY DEFAULT AS IDENTITY (START WITH 1, INCREMENT BY 1), + LIBRARY_NAME varchar(80) NOT NULL, + R_TIME timestamp DEFAULT CURRENT_TIMESTAMP NOT NULL, + U_TIME timestamp DEFAULT CURRENT_TIMESTAMP NOT NULL, + R_STAFF varchar(50) DEFAULT 'DefaultStaff' NOT NULL, + U_STAFF varchar(50) DEFAULT 'DefaultStaff' NOT NULL +) +; + +CREATE TABLE NEXT_LIBRARY ( + LIBRARY_ID smallint NOT NULL, + NEXT_LIBRARY_ID smallint NOT NULL, + DISTANCE_KM integer NOT NULL, + R_TIME timestamp DEFAULT CURRENT_TIMESTAMP NOT NULL, + U_TIME timestamp DEFAULT CURRENT_TIMESTAMP NOT NULL, + R_STAFF varchar(50) DEFAULT 'DefaultStaff' NOT NULL, + U_STAFF varchar(50) DEFAULT 'DefaultStaff' NOT NULL +) +; + +CREATE TABLE PUBLISHER ( + PUBLISHER_ID integer NOT NULL GENERATED BY DEFAULT AS IDENTITY (START WITH 1, INCREMENT BY 1), + PUBLISHER_NAME varchar(80) NOT NULL, + R_TIME timestamp DEFAULT CURRENT_TIMESTAMP NOT NULL, + U_TIME timestamp DEFAULT CURRENT_TIMESTAMP NOT NULL, + R_STAFF varchar(50) DEFAULT 'DefaultStaff' NOT NULL, + U_STAFF varchar(50) DEFAULT 'DefaultStaff' NOT NULL +) +; + + +ALTER TABLE AUTHOR ADD CONSTRAINT PK_AUTHOR + PRIMARY KEY (AUTHOR_ID) +; + +ALTER TABLE BLACK_ACTION ADD CONSTRAINT PK_BLACK_ACTION + PRIMARY KEY (BLACK_ACTION_ID) +; + +ALTER TABLE BLACK_ACTION_LOOKUP ADD CONSTRAINT PK_BLACK_ACTION_LOOKUP + PRIMARY KEY (BLACK_ACTION_CODE) +; + +ALTER TABLE BLACK_LIST ADD CONSTRAINT PK_BLACK_LIST + PRIMARY KEY (BLACK_LIST_ID) +; + +ALTER TABLE BOOK ADD CONSTRAINT PK_BOOK + PRIMARY KEY (BOOK_ID) +; + +ALTER TABLE COLLECTION ADD CONSTRAINT PK_COLLECTION + PRIMARY KEY (COLLECTION_ID) +; + +ALTER TABLE COLLECTION_STATUS ADD CONSTRAINT PK_COLLECTION_STATUS + PRIMARY KEY (COLLECTION_ID) +; + +ALTER TABLE COLLECTION_STATUS_LOOKUP ADD CONSTRAINT PK_COLLECTION_STATUS_LOOKUP + PRIMARY KEY (COLLECTION_STATUS_CODE) +; + +ALTER TABLE GENRE ADD CONSTRAINT PK_GENRE + PRIMARY KEY (GENRE_CODE) +; + +ALTER TABLE LB_USER ADD CONSTRAINT PK_LB_USER + PRIMARY KEY (LB_USER_ID) +; + +ALTER TABLE LENDING ADD CONSTRAINT PK_LENDING + PRIMARY KEY (LENDING_ID) +; + +ALTER TABLE LENDING_COLLECTION ADD CONSTRAINT PK_LENDING_COLLECTION + PRIMARY KEY (LENDING_ID, COLLECTION_ID) +; + +ALTER TABLE LIBRARY ADD CONSTRAINT PK_LIBRARY + PRIMARY KEY (LIBRARY_ID) +; + +ALTER TABLE NEXT_LIBRARY ADD CONSTRAINT PK_NEXT_LIBRARY + PRIMARY KEY (LIBRARY_ID, NEXT_LIBRARY_ID) +; + +ALTER TABLE PUBLISHER ADD CONSTRAINT PK_PUBLISHER + PRIMARY KEY (PUBLISHER_ID) +; + + +ALTER TABLE BOOK + ADD CONSTRAINT UQ_BOOK_ISBN_NO UNIQUE (ISBN_NO) +; + +ALTER TABLE COLLECTION + ADD CONSTRAINT UQ_COLLECTION_Primary UNIQUE (LIBRARY_ID, BOOK_ID) +; + +ALTER TABLE LENDING + ADD CONSTRAINT UQ_LENDING_Primary UNIQUE (LIBRARY_ID, LB_USER_ID) +; + +ALTER TABLE BLACK_LIST + ADD CONSTRAINT UQ_BLACK_LIST_LB_USER_ID UNIQUE (LB_USER_ID) +; + +ALTER TABLE LIBRARY + ADD CONSTRAINT UQ_LIBRARY_LIBRARY_NAME UNIQUE (LIBRARY_NAME) +; + + + +ALTER TABLE BLACK_ACTION ADD CONSTRAINT FK_BLACK_ACTION_BLACK_LIST + FOREIGN KEY (BLACK_LIST_ID) REFERENCES BLACK_LIST (BLACK_LIST_ID) +; + +ALTER TABLE BLACK_ACTION ADD CONSTRAINT FK_BLACK_ACTION_LOOKUP + FOREIGN KEY (BLACK_ACTION_CODE) REFERENCES BLACK_ACTION_LOOKUP (BLACK_ACTION_CODE) +; + +ALTER TABLE BLACK_LIST ADD CONSTRAINT FK_BLACK_LIST_LB_USER + FOREIGN KEY (LB_USER_ID) REFERENCES LB_USER (LB_USER_ID) +; + +ALTER TABLE BOOK ADD CONSTRAINT FK_BOOK_AUTHOR + FOREIGN KEY (AUTHOR_ID) REFERENCES AUTHOR (AUTHOR_ID) +; + +ALTER TABLE BOOK ADD CONSTRAINT FK_BOOK_PUBLISHER + FOREIGN KEY (PUBLISHER_ID) REFERENCES PUBLISHER (PUBLISHER_ID) +; + +ALTER TABLE BOOK ADD CONSTRAINT FK_BOOK_GENRE + FOREIGN KEY (GENRE_CODE) REFERENCES GENRE (GENRE_CODE) +; + +ALTER TABLE COLLECTION ADD CONSTRAINT FK_COLLECTION_BOOK + FOREIGN KEY (BOOK_ID) REFERENCES BOOK (BOOK_ID) +; + +ALTER TABLE COLLECTION ADD CONSTRAINT FK_COLLECTION_LIBRARY + FOREIGN KEY (LIBRARY_ID) REFERENCES LIBRARY (LIBRARY_ID) +; + +ALTER TABLE COLLECTION_STATUS ADD CONSTRAINT FK_COLLECTION_STATUS_COLLECTION + FOREIGN KEY (COLLECTION_ID) REFERENCES COLLECTION (COLLECTION_ID) +; + +ALTER TABLE COLLECTION_STATUS ADD CONSTRAINT FK_COLLECTION_STATUS_LOOKUP + FOREIGN KEY (COLLECTION_STATUS_CODE) REFERENCES COLLECTION_STATUS_LOOKUP (COLLECTION_STATUS_CODE) +; + +ALTER TABLE GENRE ADD CONSTRAINT FK_GENRE_GENRE + FOREIGN KEY (PARENT_GENRE_CODE) REFERENCES GENRE (GENRE_CODE) +; + +ALTER TABLE LB_USER ADD CONSTRAINT FK_LB_USER_LIBRARY + FOREIGN KEY (LIBRARY_ID) REFERENCES LIBRARY (LIBRARY_ID) +; + +ALTER TABLE LENDING ADD CONSTRAINT FK_LENDING_LIBRARY + FOREIGN KEY (LIBRARY_ID) REFERENCES LIBRARY (LIBRARY_ID) +; + +ALTER TABLE LENDING ADD CONSTRAINT FK_LENDING_LB_USER + FOREIGN KEY (LB_USER_ID) REFERENCES LB_USER (LB_USER_ID) +; + +ALTER TABLE LENDING_COLLECTION ADD CONSTRAINT FK_LENDING_COLLECTION_LENDING + FOREIGN KEY (LENDING_ID) REFERENCES LENDING (LENDING_ID) +; + +ALTER TABLE LENDING_COLLECTION ADD CONSTRAINT FK_LENDING_COLLECTION_COL + FOREIGN KEY (COLLECTION_ID) REFERENCES COLLECTION (COLLECTION_ID) +; + +ALTER TABLE NEXT_LIBRARY ADD CONSTRAINT FK_NEXT_LIBRARY_LIBRARY_ID + FOREIGN KEY (LIBRARY_ID) REFERENCES LIBRARY (LIBRARY_ID) +; + +ALTER TABLE NEXT_LIBRARY ADD CONSTRAINT FK_NEXT_LIBRARY_NEXT_LIBRARY_ID + FOREIGN KEY (NEXT_LIBRARY_ID) REFERENCES LIBRARY (LIBRARY_ID) +; Added: pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/fullProperties/replace-schema.bat =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/fullProperties/replace-schema.bat 2007-07-10 12:47:32 UTC (rev 219) +++ pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/fullProperties/replace-schema.bat 2007-07-10 12:49:16 UTC (rev 220) @@ -0,0 +1,17 @@ + △ echo off + +call _project.bat + +rem /nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn +rem Specify the file path to be used as build-properties. +rem nnnnnnnnnn/ +set MY_PROPERTIES_PATH=build-%MY_PROJECT_NAME%.properties + +rem /nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn +rem Execute {Replace-Schema}. +rem nnnnnnnnnn/ +call %DBFLUTE_HOME%\etc\cmd\_df-replace-schema.cmd %MY_PROPERTIES_PATH% + +pause + + Added: pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/fullProperties/replace-schema.sh =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/fullProperties/replace-schema.sh 2007-07-10 12:47:32 UTC (rev 219) +++ pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/fullProperties/replace-schema.sh 2007-07-10 12:49:16 UTC (rev 220) @@ -0,0 +1,15 @@ +#!/bin/sh + +. _project.sh + +echo "/nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn" +echo "Specify the file path to be used as build-properties." +echo "nnnnnnnnnn/" +export MY_PROPERTIES_PATH=build-${MY_PROJECT_NAME}.properties + +echo "/nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn" +echo "Execute {Replace-Schema}." +echo "nnnnnnnnnn/" +sh $DBFLUTE_HOME/etc/cmd/_df-replace-schema.sh $MY_PROPERTIES_PATH + + Added: pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/fullProperties/schema/readme.txt =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/fullProperties/schema/readme.txt 2007-07-10 12:47:32 UTC (rev 219) +++ pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/fullProperties/schema/readme.txt 2007-07-10 12:49:16 UTC (rev 220) @@ -0,0 +1 @@ +Directory for SchemaFile Added: pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/fullProperties/sql2entity.bat =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/fullProperties/sql2entity.bat 2007-07-10 12:47:32 UTC (rev 219) +++ pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/fullProperties/sql2entity.bat 2007-07-10 12:49:16 UTC (rev 220) @@ -0,0 +1,17 @@ + △ echo off + +call _project.bat + +rem /nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn +rem Specify the file path to be used as build-properties. +rem nnnnnnnnnn/ +set MY_PROPERTIES_PATH=build-%MY_PROJECT_NAME%.properties + +rem /nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn +rem Execute {Invoke Sql Directory}. +rem nnnnnnnnnn/ +call %DBFLUTE_HOME%\etc\cmd\_df-sql2entity.cmd %MY_PROPERTIES_PATH% + +pause + + Added: pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/fullProperties/sql2entity.sh =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/fullProperties/sql2entity.sh 2007-07-10 12:47:32 UTC (rev 219) +++ pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/fullProperties/sql2entity.sh 2007-07-10 12:49:16 UTC (rev 220) @@ -0,0 +1,15 @@ +#!/bin/sh + +. _project.sh + +echo "/nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn" +echo "Specify the file path to be used as build-properties." +echo "nnnnnnnnnn/" +export MY_PROPERTIES_PATH=build-${MY_PROJECT_NAME}.properties + +echo "/nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn" +echo "Execute {Invoke Sql Directory}." +echo "nnnnnnnnnn/" +sh $DBFLUTE_HOME/etc/cmd/_df-sql2entity.sh $MY_PROPERTIES_PATH + + Added: pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/minimumProperties/_project.bat =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/minimumProperties/_project.bat 2007-07-10 12:47:32 UTC (rev 219) +++ pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/minimumProperties/_project.bat 2007-07-10 12:49:16 UTC (rev 220) @@ -0,0 +1,5 @@ + △ echo off + +set MY_PROJECT_NAME=minimumProperties + +rem set DBFLUTE_HOME=..\mydbflute\dbflute-x.x.x Added: pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/minimumProperties/_project.sh =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/minimumProperties/_project.sh 2007-07-10 12:47:32 UTC (rev 219) +++ pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/minimumProperties/_project.sh 2007-07-10 12:49:16 UTC (rev 220) @@ -0,0 +1,5 @@ +#!/bin/sh + +export MY_PROJECT_NAME=minimumProperties + +#export DBFLUTE_HOME=../mydbflute/dbflute-x.x.x Added: pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/minimumProperties/build-minimumProperties.properties =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/minimumProperties/build-minimumProperties.properties 2007-07-10 12:47:32 UTC (rev 219) +++ pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/minimumProperties/build-minimumProperties.properties 2007-07-10 12:49:16 UTC (rev 220) @@ -0,0 +1,128 @@ +# ======================================================================================= +# for All +# ======= + +# ------------------------------------------------------------------- +# P R O J E C T +# ------------------------------------------------------------------- +# @FirstProperty +# @Required +torque.project = minimumProperties + +# ------------------------------------------------------------------- +# T A R G E T D A T A B A S E +# ------------------------------------------------------------------- +# This is the target database, only considered when generating +# the SQL for your Torque project. Your possible choices are: +# +# axion, cloudscape, db2, db2400, hypersonic, interbase, mssql, +# mysql, oracle, postgresql, sapdb, sybase, firebird, derby, h2 +# ------------------------------------------------------------------- +# @FirstProperty +# @Required +torque.database = derby + +# ------------------------------------------------------------------- +# T A R G E T L A N G U A G E +# ------------------------------------------------------------------- +# (Default 'java') +# The target language. Your possible choices are: +# java, csharp +# ------------------------------------------------------------------- +# @FirstProperty +#torque.targetLanguage = java + + + +# ======================================================================================= +# for OM task +# =========== + +# _/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/ +# Basic +# _/_/_/_/ +# /--------------------------------------------------------------------------- +# [Output Directory] +# java.dir: (Default '../src/main/java') +# The base output directory. +# +# If this value is '../src/main/java' and your project stype is under maven, +# you don't need to set up this property! +# +# {project} +# | +# |-dbflute_ldb +# | |-build-ldb.properties +# | |-... +# | +# |-src/main/java // *Here! +# |-src/main/resources +# |-... +# +# +# @FirstProperty +#torque.java.dir = ../src/main/java +# ----------------/ + +# _/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/ +# Package +# _/_/ +# /--------------------------------------------------------------------------- +# [EntityDao Package] +# packageBase: (Default '') +# The base directory of package. +# +# *If this property is specified and other package properties is not specified, +# Then The packages of generated class are as follows: +# +# ex) packageBase = org.seasar.dbflute.example.dbflute.ldb +# baseCommonPackage --> org.seasar.dbflute.example.dbflute.ldb.allcommon +# baseBehaviorPackage --> org.seasar.dbflute.example.dbflute.ldb.bsbhv +# baseDaoPackage --> org.seasar.dbflute.example.dbflute.ldb.bsdao +# baseEntityPackage --> org.seasar.dbflute.example.dbflute.ldb.bsentity +# conditionBeanPackage --> org.seasar.dbflute.example.dbflute.ldb.cbean +# extendedBehaviorPackage --> org.seasar.dbflute.example.dbflute.ldb.exbhv +# extendedDaoPackage --> org.seasar.dbflute.example.dbflute.ldb.exdao +# extendedEntityPackage --> org.seasar.dbflute.example.dbflute.ldb.exentity +# +# *If this property is not specified, you should specify the other package properties. +# +# +# baseCommonPackage: (Default Java:'allcommon' C#:'allcommon') +# baseBehaviorPackage: (Default Java:'bsbhv' C#:'bsbhv') +# baseDaoPackage: (Default Java:'bsdao' C#:'bsdao') +# baseEntityPackage: (Default Java:'bsentity' C#:'bsentity') +# conditionBeanPackage: (Default Java:'cbean' C#:'cbean') +# extendedBehaviorPackage: (Default Java:'exbhv' C#:'exbhv') +# extendedDaoPackage: (Default Java:'exdao' C#:'exdao') +# extendedEntityPackage: (Default Java:'exentity' C#:'exentity') +# +# @FirstProperty +torque.packageBase = org.seasar.dbflute.example.dbflute.ldb +# ----------------/ + +# _/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/ +# S2Dao Adjustment +# _/_/_/_/_/_/ +# /--------------------------------------------------------------------------- +# [S2Dao Version] +# s2daoVersion: (Default [The latest version]) +# +# @JavaOnly +torque.s2daoVersion = 1.0.43 +# ----------------/ + + + +# ======================================================================================= +# for JDBC task +# ============= + +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# [Database Informaition] +# +# * * * * * * * * * * * * * * * * * * * * * * * * * +# You shuold use './dfprop/databaseInfoMap.dfprop' +# Look the file! +# * * * * * * * * * * * * * * * * * * * * * * * * * +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Added: pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/minimumProperties/dfprop/databaseInfoMap.dfprop =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/minimumProperties/dfprop/databaseInfoMap.dfprop 2007-07-10 12:47:32 UTC (rev 219) +++ pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/minimumProperties/dfprop/databaseInfoMap.dfprop 2007-07-10 12:49:16 UTC (rev 220) @@ -0,0 +1,18 @@ +# /--------------------------------------------------------------------------- +# [Database Information] +# databaseInfoMap: +# driver -- The class name of JDBC-Driver. +# url -- The url for connecting database. +# schema -- The schema name. +# user -- The database user name. +# password -- The database password. +# +# @FirstProperty +map:{ + ; driver = {Please write your setting! at './dfprop/databaseInfoMap.dfprop'} + ; url = ... + ; schema = ... + ; user = ... + ; password = ... +} +# ----------------/ \ No newline at end of file Added: pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/minimumProperties/doc.bat =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/minimumProperties/doc.bat 2007-07-10 12:47:32 UTC (rev 219) +++ pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/minimumProperties/doc.bat 2007-07-10 12:49:16 UTC (rev 220) @@ -0,0 +1,17 @@ + △ echo off + +call _project.bat + +rem /nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn +rem Specify the file path to be used as build-properties. +rem nnnnnnnnnn/ +set MY_PROPERTIES_PATH=build-%MY_PROJECT_NAME%.properties + +rem /nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn +rem Execute {Document}. +rem nnnnnnnnnn/ +call %DBFLUTE_HOME%\etc\cmd\_df-doc.cmd %MY_PROPERTIES_PATH% + +pause + + Added: pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/minimumProperties/doc.sh =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/minimumProperties/doc.sh 2007-07-10 12:47:32 UTC (rev 219) +++ pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/minimumProperties/doc.sh 2007-07-10 12:49:16 UTC (rev 220) @@ -0,0 +1,14 @@ +#!/bin/sh + +. _project.sh + +echo "/nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn" +echo "Specify the file path to be used as build-properties." +echo "nnnnnnnnnn/" +export MY_PROPERTIES_PATH=build-${MY_PROJECT_NAME}.properties + +echo "/nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn" +echo "Execute {Document}." +echo "nnnnnnnnnn/" +sh $DBFLUTE_HOME/etc/cmd/_df-doc.sh $MY_PROPERTIES_PATH + Added: pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/minimumProperties/generate.bat =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/minimumProperties/generate.bat 2007-07-10 12:47:32 UTC (rev 219) +++ pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/minimumProperties/generate.bat 2007-07-10 12:49:16 UTC (rev 220) @@ -0,0 +1,17 @@ + △ echo off + +call _project.bat + +rem /nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn +rem Specify the file path to be used as build-properties. +rem nnnnnnnnnn/ +set MY_PROPERTIES_PATH=build-%MY_PROJECT_NAME%.properties + +rem /nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn +rem Execute {Generate}. +rem nnnnnnnnnn/ +call %DBFLUTE_HOME%\etc\cmd\_df-generate.cmd %MY_PROPERTIES_PATH% + +pause + + Added: pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/minimumProperties/generate.sh =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/minimumProperties/generate.sh 2007-07-10 12:47:32 UTC (rev 219) +++ pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/minimumProperties/generate.sh 2007-07-10 12:49:16 UTC (rev 220) @@ -0,0 +1,16 @@ +#!/bin/sh + +. _project.sh + +echo "/nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn" +echo "Specify the file path to be used as build-properties." +echo "nnnnnnnnnn/" +export MY_PROPERTIES_PATH=build-${MY_PROJECT_NAME}.properties + +echo "/nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn" +echo "Execute {Generate}." +echo "nnnnnnnnnn/" +sh $DBFLUTE_HOME/etc/cmd/_df-generate.sh $MY_PROPERTIES_PATH + + + Added: pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/minimumProperties/jdbc.bat =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/minimumProperties/jdbc.bat 2007-07-10 12:47:32 UTC (rev 219) +++ pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/minimumProperties/jdbc.bat 2007-07-10 12:49:16 UTC (rev 220) @@ -0,0 +1,17 @@ + △ echo off + +call _project.bat + +rem /nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn +rem Specify the file path to be used as build-properties. +rem nnnnnnnnnn/ +set MY_PROPERTIES_PATH=build-%MY_PROJECT_NAME%.properties + +rem /nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn +rem Execute {JDBC and Document}. +rem nnnnnnnnnn/ +call %DBFLUTE_HOME%\etc\cmd\_df-jdbc.cmd %MY_PROPERTIES_PATH% + +pause + + Added: pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/minimumProperties/jdbc.sh =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/minimumProperties/jdbc.sh 2007-07-10 12:47:32 UTC (rev 219) +++ pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/minimumProperties/jdbc.sh 2007-07-10 12:49:16 UTC (rev 220) @@ -0,0 +1,15 @@ +#!/bin/sh + +. _project.sh + +echo "/nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn" +echo "Specify the file path to be used as build-properties." +echo "nnnnnnnnnn/" +export MY_PROPERTIES_PATH="build-${MY_PROJECT_NAME}.properties" + +echo "/nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn" +echo "Execute {JDBC and Document}." +echo "nnnnnnnnnn/" +sh ${DBFLUTE_HOME}/etc/cmd/_df-jdbc.sh ${MY_PROPERTIES_PATH} + + Added: pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/minimumProperties/log/readme.txt =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/minimumProperties/log/readme.txt 2007-07-10 12:47:32 UTC (rev 219) +++ pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/minimumProperties/log/readme.txt 2007-07-10 12:49:16 UTC (rev 220) @@ -0,0 +1 @@ +Directory for LogFile Added: pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/minimumProperties/output/doc/readme.txt =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/minimumProperties/output/doc/readme.txt 2007-07-10 12:47:32 UTC (rev 219) +++ pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/minimumProperties/output/doc/readme.txt 2007-07-10 12:49:16 UTC (rev 220) @@ -0,0 +1 @@ +Directory for Document Added: pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/minimumProperties/outside-sql-test.bat =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/minimumProperties/outside-sql-test.bat 2007-07-10 12:47:32 UTC (rev 219) +++ pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/minimumProperties/outside-sql-test.bat 2007-07-10 12:49:16 UTC (rev 220) @@ -0,0 +1,17 @@ + △ echo off + +call _project.bat + +rem /nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn +rem Specify the file path to be used as build-properties. +rem nnnnnnnnnn/ +set MY_PROPERTIES_PATH=build-%MY_PROJECT_NAME%.properties + +rem /nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn +rem Execute {Outsite-Sql-Test}. +rem nnnnnnnnnn/ +call %DBFLUTE_HOME%\etc\cmd\_df-outside-sql-test.cmd %MY_PROPERTIES_PATH% + +pause + + Added: pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/minimumProperties/outside-sql-test.sh =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/minimumProperties/outside-sql-test.sh 2007-07-10 12:47:32 UTC (rev 219) +++ pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/minimumProperties/outside-sql-test.sh 2007-07-10 12:49:16 UTC (rev 220) @@ -0,0 +1,15 @@ +#!/bin/sh + +. _project.sh + +echo "/nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn" +echo "Specify the file path to be used as build-properties." +echo "nnnnnnnnnn/" +export MY_PROPERTIES_PATH=build-${MY_PROJECT_NAME}.properties + +echo "/nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn" +echo "Execute {Outsite-Sql-Test}." +echo "nnnnnnnnnn/" +sh $DBFLUTE_HOME/etc/cmd/_df-outside-sql-test.sh $MY_PROPERTIES_PATH + + Added: pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/minimumProperties/playsql/replace-schema.sql =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/minimumProperties/playsql/replace-schema.sql 2007-07-10 12:47:32 UTC (rev 219) +++ pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/minimumProperties/playsql/replace-schema.sql 2007-07-10 12:49:16 UTC (rev 220) @@ -0,0 +1,418 @@ +ALTER TABLE BLACK_ACTION DROP CONSTRAINT FK_BLACK_ACTION_BLACK_LIST +; + +ALTER TABLE BLACK_ACTION DROP CONSTRAINT FK_BLACK_ACTION_LOOKUP +; + +ALTER TABLE BLACK_LIST DROP CONSTRAINT FK_BLACK_LIST_LB_USER +; + +ALTER TABLE BOOK DROP CONSTRAINT FK_BOOK_AUTHOR +; + +ALTER TABLE BOOK DROP CONSTRAINT FK_BOOK_PUBLISHER +; + +ALTER TABLE BOOK DROP CONSTRAINT FK_BOOK_GENRE +; + +ALTER TABLE COLLECTION DROP CONSTRAINT FK_COLLECTION_BOOK +; + +ALTER TABLE COLLECTION DROP CONSTRAINT FK_COLLECTION_LIBRARY +; + +ALTER TABLE COLLECTION_STATUS DROP CONSTRAINT FK_COLLECTION_STATUS_COLLECTION +; + +ALTER TABLE COLLECTION_STATUS DROP CONSTRAINT FK_COLLECTION_STATUS_LOOKUP +; + +ALTER TABLE GENRE DROP CONSTRAINT FK_GENRE_GENRE +; + +ALTER TABLE LB_USER DROP CONSTRAINT FK_LB_USER_LIBRARY +; + +ALTER TABLE LENDING DROP CONSTRAINT FK_LENDING_LIBRARY +; + +ALTER TABLE LENDING DROP CONSTRAINT FK_LENDING_LB_USER +; + +ALTER TABLE LENDING_COLLECTION DROP CONSTRAINT FK_LENDING_COLLECTION_LENDING +; + +ALTER TABLE LENDING_COLLECTION DROP CONSTRAINT FK_LENDING_COLLECTION_COL +; + +ALTER TABLE NEXT_LIBRARY DROP CONSTRAINT FK_NEXT_LIBRARY_LIBRARY_ID +; + +ALTER TABLE NEXT_LIBRARY DROP CONSTRAINT FK_NEXT_LIBRARY_NEXT_LIBRARY_ID +; + + +DROP TABLE AUTHOR +; +DROP TABLE BLACK_ACTION +; +DROP TABLE BLACK_ACTION_LOOKUP +; +DROP TABLE BLACK_LIST +; +DROP TABLE BOOK +; +DROP TABLE COLLECTION +; +DROP TABLE COLLECTION_STATUS +; +DROP TABLE COLLECTION_STATUS_LOOKUP +; +DROP TABLE GARBAGE +; +DROP TABLE GENRE +; +DROP TABLE LB_USER +; +DROP TABLE LENDING +; +DROP TABLE LENDING_COLLECTION +; +DROP TABLE LIBRARY +; +DROP TABLE NEXT_LIBRARY +; +DROP TABLE PUBLISHER +; + +CREATE TABLE AUTHOR ( + AUTHOR_ID integer NOT NULL GENERATED BY DEFAULT AS IDENTITY (START WITH 1, INCREMENT BY 1), + AUTHOR_NAME varchar(80) NOT NULL, + R_TIME timestamp DEFAULT CURRENT_TIMESTAMP NOT NULL, + U_TIME timestamp DEFAULT CURRENT_TIMESTAMP NOT NULL, + R_STAFF varchar(50) DEFAULT 'DefaultStaff' NOT NULL, + U_STAFF varchar(50) DEFAULT 'DefaultStaff' NOT NULL +) +; + +CREATE TABLE BLACK_ACTION ( + BLACK_ACTION_ID integer NOT NULL GENERATED BY DEFAULT AS IDENTITY (START WITH 1, INCREMENT BY 1), + BLACK_LIST_ID integer NOT NULL, + BLACK_ACTION_CODE char(3) NOT NULL, + BLACK_LEVEL smallint NOT NULL, + EVIDENCE_PHOTOGRAPH blob, + R_TIME timestamp DEFAULT CURRENT_TIMESTAMP NOT NULL, + U_TIME timestamp DEFAULT CURRENT_TIMESTAMP NOT NULL, + R_STAFF varchar(50) DEFAULT 'DefaultStaff' NOT NULL, + U_STAFF varchar(50) DEFAULT 'DefaultStaff' NOT NULL +) +; + +CREATE TABLE BLACK_ACTION_LOOKUP ( + BLACK_ACTION_CODE char(3) NOT NULL, + BLACK_ACTION_NAME varchar(80) NOT NULL, + R_TIME timestamp DEFAULT CURRENT_TIMESTAMP NOT NULL, + U_TIME timestamp DEFAULT CURRENT_TIMESTAMP NOT NULL, + R_STAFF varchar(50) DEFAULT 'DefaultStaff' NOT NULL, + U_STAFF varchar(50) DEFAULT 'DefaultStaff' NOT NULL +) +; + +CREATE TABLE BLACK_LIST ( + BLACK_LIST_ID integer NOT NULL GENERATED BY DEFAULT AS IDENTITY (START WITH 1, INCREMENT BY 1), + LB_USER_ID integer NOT NULL, + BLACK_RANK char(3) NOT NULL, + R_TIME timestamp DEFAULT CURRENT_TIMESTAMP NOT NULL, + U_TIME timestamp DEFAULT CURRENT_TIMESTAMP NOT NULL, + R_STAFF varchar(50) DEFAULT 'DefaultStaff' NOT NULL, + U_STAFF varchar(50) DEFAULT 'DefaultStaff' NOT NULL +) +; + +CREATE TABLE BOOK ( + BOOK_ID integer NOT NULL GENERATED BY DEFAULT AS IDENTITY (START WITH 1, INCREMENT BY 1), + ISBN_NO varchar(20) NOT NULL, + BOOK_NAME varchar(80) NOT NULL, + AUTHOR_ID integer NOT NULL, + PUBLISHER_ID integer NOT NULL, + MAX_LENDING_DATE_COUNT smallint NOT NULL, + GENRE_CODE varchar(12), + OPENING_PART clob, + R_TIME timestamp DEFAULT CURRENT_TIMESTAMP NOT NULL, + U_TIME timestamp DEFAULT CURRENT_TIMESTAMP NOT NULL, + R_STAFF varchar(50) DEFAULT 'DefaultStaff' NOT NULL, + U_STAFF varchar(50) DEFAULT 'DefaultStaff' NOT NULL +) +; + +CREATE TABLE COLLECTION ( + COLLECTION_ID integer NOT NULL, + LIBRARY_ID smallint NOT NULL, + BOOK_ID integer NOT NULL, + ARRIVAL_DATE timestamp NOT NULL, + R_TIME timestamp DEFAULT CURRENT_TIMESTAMP NOT NULL, + U_TIME timestamp DEFAULT CURRENT_TIMESTAMP NOT NULL, + R_STAFF varchar(50) DEFAULT 'DefaultStaff' NOT NULL, + U_STAFF varchar(50) DEFAULT 'DefaultStaff' NOT NULL +) +; + +CREATE TABLE COLLECTION_STATUS ( + COLLECTION_ID integer NOT NULL, + COLLECTION_STATUS_CODE char(3) NOT NULL, + R_TIME timestamp DEFAULT CURRENT_TIMESTAMP NOT NULL, + U_TIME timestamp DEFAULT CURRENT_TIMESTAMP NOT NULL, + R_STAFF varchar(50) DEFAULT 'DefaultStaff' NOT NULL, + U_STAFF varchar(50) DEFAULT 'DefaultStaff' NOT NULL +) +; + +CREATE TABLE COLLECTION_STATUS_LOOKUP ( + COLLECTION_STATUS_CODE char(3) NOT NULL, + COLLECTION_STATUS_NAME varchar(80) NOT NULL, + R_TIME timestamp DEFAULT CURRENT_TIMESTAMP NOT NULL, + U_TIME timestamp DEFAULT CURRENT_TIMESTAMP NOT NULL, + R_STAFF varchar(50) DEFAULT 'DefaultStaff' NOT NULL, + U_STAFF varchar(50) DEFAULT 'DefaultStaff' NOT NULL +) +; + +CREATE TABLE GARBAGE ( + GARBAGE_MEMO varchar(50), + GARBAGE_TIME timestamp +) +; + +CREATE TABLE GENRE ( + GENRE_CODE varchar(12) NOT NULL, + GENRE_NAME varchar(80) NOT NULL, + PARENT_GENRE_CODE varchar(12), + R_TIME timestamp DEFAULT CURRENT_TIMESTAMP NOT NULL, + U_TIME timestamp DEFAULT CURRENT_TIMESTAMP NOT NULL, + R_STAFF varchar(50) DEFAULT 'DefaultStaff' NOT NULL, + U_STAFF varchar(50) DEFAULT 'DefaultStaff' NOT NULL +) +; + +CREATE TABLE LB_USER ( + LB_USER_ID integer NOT NULL GENERATED BY DEFAULT AS IDENTITY (START WITH 1, INCREMENT BY 1), + LB_USER_NAME varchar(80) NOT NULL, + LIBRARY_ID smallint NOT NULL, + USER_PASSWORD varchar(50) NOT NULL, + R_TIME timestamp DEFAULT CURRENT_TIMESTAMP NOT NULL, + U_TIME timestamp DEFAULT CURRENT_TIMESTAMP NOT NULL, + R_STAFF varchar(50) DEFAULT 'DefaultStaff' NOT NULL, + U_STAFF varchar(50) DEFAULT 'DefaultStaff' NOT NULL +) +; + +CREATE TABLE LENDING ( + LENDING_ID integer NOT NULL GENERATED BY DEFAULT AS IDENTITY (START WITH 1, INCREMENT BY 1), + LIBRARY_ID smallint NOT NULL, + LB_USER_ID integer NOT NULL, + LENDING_DATE timestamp NOT NULL, + R_TIME timestamp DEFAULT CURRENT_TIMESTAMP NOT NULL, + U_TIME timestamp DEFAULT CURRENT_TIMESTAMP NOT NULL, + R_STAFF varchar(50) DEFAULT 'DefaultStaff' NOT NULL, + U_STAFF varchar(50) DEFAULT 'DefaultStaff' NOT NULL +) +; + +CREATE TABLE LENDING_COLLECTION ( + LENDING_ID integer NOT NULL, + COLLECTION_ID integer NOT NULL, + RETURN_LIMIT_DATE timestamp NOT NULL, + R_TIME timestamp DEFAULT CURRENT_TIMESTAMP NOT NULL, + U_TIME timestamp DEFAULT CURRENT_TIMESTAMP NOT NULL, + R_STAFF varchar(50) DEFAULT 'DefaultStaff' NOT NULL, + U_STAFF varchar(50) DEFAULT 'DefaultStaff' NOT NULL +) +; + +CREATE TABLE LIBRARY ( + LIBRARY_ID smallint NOT NULL GENERATED BY DEFAULT AS IDENTITY (START WITH 1, INCREMENT BY 1), + LIBRARY_NAME varchar(80) NOT NULL, + R_TIME timestamp DEFAULT CURRENT_TIMESTAMP NOT NULL, + U_TIME timestamp DEFAULT CURRENT_TIMESTAMP NOT NULL, + R_STAFF varchar(50) DEFAULT 'DefaultStaff' NOT NULL, + U_STAFF varchar(50) DEFAULT 'DefaultStaff' NOT NULL +) +; + +CREATE TABLE NEXT_LIBRARY ( + LIBRARY_ID smallint NOT NULL, + NEXT_LIBRARY_ID smallint NOT NULL, + DISTANCE_KM integer NOT NULL, + R_TIME timestamp DEFAULT CURRENT_TIMESTAMP NOT NULL, + U_TIME timestamp DEFAULT CURRENT_TIMESTAMP NOT NULL, + R_STAFF varchar(50) DEFAULT 'DefaultStaff' NOT NULL, + U_STAFF varchar(50) DEFAULT 'DefaultStaff' NOT NULL +) +; + +CREATE TABLE PUBLISHER ( + PUBLISHER_ID integer NOT NULL GENERATED BY DEFAULT AS IDENTITY (START WITH 1, INCREMENT BY 1), + PUBLISHER_NAME varchar(80) NOT NULL, + R_TIME timestamp DEFAULT CURRENT_TIMESTAMP NOT NULL, + U_TIME timestamp DEFAULT CURRENT_TIMESTAMP NOT NULL, + R_STAFF varchar(50) DEFAULT 'DefaultStaff' NOT NULL, + U_STAFF varchar(50) DEFAULT 'DefaultStaff' NOT NULL +) +; + + +ALTER TABLE AUTHOR ADD CONSTRAINT PK_AUTHOR + PRIMARY KEY (AUTHOR_ID) +; + +ALTER TABLE BLACK_ACTION ADD CONSTRAINT PK_BLACK_ACTION + PRIMARY KEY (BLACK_ACTION_ID) +; + +ALTER TABLE BLACK_ACTION_LOOKUP ADD CONSTRAINT PK_BLACK_ACTION_LOOKUP + PRIMARY KEY (BLACK_ACTION_CODE) +; + +ALTER TABLE BLACK_LIST ADD CONSTRAINT PK_BLACK_LIST + PRIMARY KEY (BLACK_LIST_ID) +; + +ALTER TABLE BOOK ADD CONSTRAINT PK_BOOK + PRIMARY KEY (BOOK_ID) +; + +ALTER TABLE COLLECTION ADD CONSTRAINT PK_COLLECTION + PRIMARY KEY (COLLECTION_ID) +; + +ALTER TABLE COLLECTION_STATUS ADD CONSTRAINT PK_COLLECTION_STATUS + PRIMARY KEY (COLLECTION_ID) +; + +ALTER TABLE COLLECTION_STATUS_LOOKUP ADD CONSTRAINT PK_COLLECTION_STATUS_LOOKUP + PRIMARY KEY (COLLECTION_STATUS_CODE) +; + +ALTER TABLE GENRE ADD CONSTRAINT PK_GENRE + PRIMARY KEY (GENRE_CODE) +; + +ALTER TABLE LB_USER ADD CONSTRAINT PK_LB_USER + PRIMARY KEY (LB_USER_ID) +; + +ALTER TABLE LENDING ADD CONSTRAINT PK_LENDING + PRIMARY KEY (LENDING_ID) +; + +ALTER TABLE LENDING_COLLECTION ADD CONSTRAINT PK_LENDING_COLLECTION + PRIMARY KEY (LENDING_ID, COLLECTION_ID) +; + +ALTER TABLE LIBRARY ADD CONSTRAINT PK_LIBRARY + PRIMARY KEY (LIBRARY_ID) +; + +ALTER TABLE NEXT_LIBRARY ADD CONSTRAINT PK_NEXT_LIBRARY + PRIMARY KEY (LIBRARY_ID, NEXT_LIBRARY_ID) +; + +ALTER TABLE PUBLISHER ADD CONSTRAINT PK_PUBLISHER + PRIMARY KEY (PUBLISHER_ID) +; + + +ALTER TABLE BOOK + ADD CONSTRAINT UQ_BOOK_ISBN_NO UNIQUE (ISBN_NO) +; + +ALTER TABLE COLLECTION + ADD CONSTRAINT UQ_COLLECTION_Primary UNIQUE (LIBRARY_ID, BOOK_ID) +; + +ALTER TABLE LENDING + ADD CONSTRAINT UQ_LENDING_Primary UNIQUE (LIBRARY_ID, LB_USER_ID) +; + +ALTER TABLE BLACK_LIST + ADD CONSTRAINT UQ_BLACK_LIST_LB_USER_ID UNIQUE (LB_USER_ID) +; + +ALTER TABLE LIBRARY + ADD CONSTRAINT UQ_LIBRARY_LIBRARY_NAME UNIQUE (LIBRARY_NAME) +; + + + +ALTER TABLE BLACK_ACTION ADD CONSTRAINT FK_BLACK_ACTION_BLACK_LIST + FOREIGN KEY (BLACK_LIST_ID) REFERENCES BLACK_LIST (BLACK_LIST_ID) +; + +ALTER TABLE BLACK_ACTION ADD CONSTRAINT FK_BLACK_ACTION_LOOKUP + FOREIGN KEY (BLACK_ACTION_CODE) REFERENCES BLACK_ACTION_LOOKUP (BLACK_ACTION_CODE) +; + +ALTER TABLE BLACK_LIST ADD CONSTRAINT FK_BLACK_LIST_LB_USER + FOREIGN KEY (LB_USER_ID) REFERENCES LB_USER (LB_USER_ID) +; + +ALTER TABLE BOOK ADD CONSTRAINT FK_BOOK_AUTHOR + FOREIGN KEY (AUTHOR_ID) REFERENCES AUTHOR (AUTHOR_ID) +; + +ALTER TABLE BOOK ADD CONSTRAINT FK_BOOK_PUBLISHER + FOREIGN KEY (PUBLISHER_ID) REFERENCES PUBLISHER (PUBLISHER_ID) +; + +ALTER TABLE BOOK ADD CONSTRAINT FK_BOOK_GENRE + FOREIGN KEY (GENRE_CODE) REFERENCES GENRE (GENRE_CODE) +; + +ALTER TABLE COLLECTION ADD CONSTRAINT FK_COLLECTION_BOOK + FOREIGN KEY (BOOK_ID) REFERENCES BOOK (BOOK_ID) +; + +ALTER TABLE COLLECTION ADD CONSTRAINT FK_COLLECTION_LIBRARY + FOREIGN KEY (LIBRARY_ID) REFERENCES LIBRARY (LIBRARY_ID) +; + +ALTER TABLE COLLECTION_STATUS ADD CONSTRAINT FK_COLLECTION_STATUS_COLLECTION + FOREIGN KEY (COLLECTION_ID) REFERENCES COLLECTION (COLLECTION_ID) +; + +ALTER TABLE COLLECTION_STATUS ADD CONSTRAINT FK_COLLECTION_STATUS_LOOKUP + FOREIGN KEY (COLLECTION_STATUS_CODE) REFERENCES COLLECTION_STATUS_LOOKUP (COLLECTION_STATUS_CODE) +; + +ALTER TABLE GENRE ADD CONSTRAINT FK_GENRE_GENRE + FOREIGN KEY (PARENT_GENRE_CODE) REFERENCES GENRE (GENRE_CODE) +; + +ALTER TABLE LB_USER ADD CONSTRAINT FK_LB_USER_LIBRARY + FOREIGN KEY (LIBRARY_ID) REFERENCES LIBRARY (LIBRARY_ID) +; + +ALTER TABLE LENDING ADD CONSTRAINT FK_LENDING_LIBRARY + FOREIGN KEY (LIBRARY_ID) REFERENCES LIBRARY (LIBRARY_ID) +; + +ALTER TABLE LENDING ADD CONSTRAINT FK_LENDING_LB_USER + FOREIGN KEY (LB_USER_ID) REFERENCES LB_USER (LB_USER_ID) +; + +ALTER TABLE LENDING_COLLECTION ADD CONSTRAINT FK_LENDING_COLLECTION_LENDING + FOREIGN KEY (LENDING_ID) REFERENCES LENDING (LENDING_ID) +; + +ALTER TABLE LENDING_COLLECTION ADD CONSTRAINT FK_LENDING_COLLECTION_COL + FOREIGN KEY (COLLECTION_ID) REFERENCES COLLECTION (COLLECTION_ID) +; + +ALTER TABLE NEXT_LIBRARY ADD CONSTRAINT FK_NEXT_LIBRARY_LIBRARY_ID + FOREIGN KEY (LIBRARY_ID) REFERENCES LIBRARY (LIBRARY_ID) +; + +ALTER TABLE NEXT_LIBRARY ADD CONSTRAINT FK_NEXT_LIBRARY_NEXT_LIBRARY_ID + FOREIGN KEY (NEXT_LIBRARY_ID) REFERENCES LIBRARY (LIBRARY_ID) +; Added: pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/minimumProperties/replace-schema.bat =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/minimumProperties/replace-schema.bat 2007-07-10 12:47:32 UTC (rev 219) +++ pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/minimumProperties/replace-schema.bat 2007-07-10 12:49:16 UTC (rev 220) @@ -0,0 +1,17 @@ + △ echo off + +call _project.bat + +rem /nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn +rem Specify the file path to be used as build-properties. +rem nnnnnnnnnn/ +set MY_PROPERTIES_PATH=build-%MY_PROJECT_NAME%.properties + +rem /nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn +rem Execute {Replace-Schema}. +rem nnnnnnnnnn/ +call %DBFLUTE_HOME%\etc\cmd\_df-replace-schema.cmd %MY_PROPERTIES_PATH% + +pause + + Added: pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/minimumProperties/replace-schema.sh =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/minimumProperties/replace-schema.sh 2007-07-10 12:47:32 UTC (rev 219) +++ pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/minimumProperties/replace-schema.sh 2007-07-10 12:49:16 UTC (rev 220) @@ -0,0 +1,15 @@ +#!/bin/sh + +. _project.sh + +echo "/nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn" +echo "Specify the file path to be used as build-properties." +echo "nnnnnnnnnn/" +export MY_PROPERTIES_PATH=build-${MY_PROJECT_NAME}.properties + +echo "/nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn" +echo "Execute {Replace-Schema}." +echo "nnnnnnnnnn/" +sh $DBFLUTE_HOME/etc/cmd/_df-replace-schema.sh $MY_PROPERTIES_PATH + + Added: pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/minimumProperties/schema/readme.txt =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/minimumProperties/schema/readme.txt 2007-07-10 12:47:32 UTC (rev 219) +++ pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/minimumProperties/schema/readme.txt 2007-07-10 12:49:16 UTC (rev 220) @@ -0,0 +1 @@ +Directory for SchemaFile Added: pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/minimumProperties/sql2entity.bat =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/minimumProperties/sql2entity.bat 2007-07-10 12:47:32 UTC (rev 219) +++ pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/minimumProperties/sql2entity.bat 2007-07-10 12:49:16 UTC (rev 220) @@ -0,0 +1,17 @@ + △ echo off + +call _project.bat + +rem /nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn +rem Specify the file path to be used as build-properties. +rem nnnnnnnnnn/ +set MY_PROPERTIES_PATH=build-%MY_PROJECT_NAME%.properties + +rem /nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn +rem Execute {Invoke Sql Directory}. +rem nnnnnnnnnn/ +call %DBFLUTE_HOME%\etc\cmd\_df-sql2entity.cmd %MY_PROPERTIES_PATH% + +pause + + Added: pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/minimumProperties/sql2entity.sh =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/minimumProperties/sql2entity.sh 2007-07-10 12:47:32 UTC (rev 219) +++ pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/minimumProperties/sql2entity.sh 2007-07-10 12:49:16 UTC (rev 220) @@ -0,0 +1,15 @@ +#!/bin/sh + +. _project.sh + +echo "/nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn" +echo "Specify the file path to be used as build-properties." +echo "nnnnnnnnnn/" +export MY_PROPERTIES_PATH=build-${MY_PROJECT_NAME}.properties + +echo "/nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn" +echo "Execute {Invoke Sql Directory}." +echo "nnnnnnnnnn/" +sh $DBFLUTE_HOME/etc/cmd/_df-sql2entity.sh $MY_PROPERTIES_PATH + + Added: pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/otherORMapper/_project.bat =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/otherORMapper/_project.bat 2007-07-10 12:47:32 UTC (rev 219) +++ pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/otherORMapper/_project.bat 2007-07-10 12:49:16 UTC (rev 220) @@ -0,0 +1,5 @@ + △ echo off + +set MY_PROJECT_NAME=minimumProperties + +rem set DBFLUTE_HOME=..\mydbflute\dbflute-x.x.x Added: pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/otherORMapper/_project.sh =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/otherORMapper/_project.sh 2007-07-10 12:47:32 UTC (rev 219) +++ pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/otherORMapper/_project.sh 2007-07-10 12:49:16 UTC (rev 220) @@ -0,0 +1,5 @@ +#!/bin/sh + +export MY_PROJECT_NAME=ldb + +#export DBFLUTE_HOME=../mydbflute/dbflute-x.x.x Added: pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/otherORMapper/build-otherORMapper.properties =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/otherORMapper/build-otherORMapper.properties 2007-07-10 12:47:32 UTC (rev 219) +++ pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/otherORMapper/build-otherORMapper.properties 2007-07-10 12:49:16 UTC (rev 220) @@ -0,0 +1,50 @@ + +# ======================================================================================= +# for All +# ======= + +# ------------------------------------------------------------------- +# P R O J E C T +# ------------------------------------------------------------------- +# (Required) + +torque.project = otherORMapper + + +# ------------------------------------------------------------------- +# T A R G E T D A T A B A S E +# ------------------------------------------------------------------- +# This is the target database, only considered when generating +# the SQL for your Torque project. Your possible choices are: +# +# axion, cloudscape, db2, db2400, hypersonic, interbase, mssql, +# mysql, oracle, postgresql, sapdb, sybase, firebird, derby +# ------------------------------------------------------------------- +# (Required) + +torque.database = derby + + + +# ======================================================================================= +# for JDBC task +# ============= +# +# *Attension: If you use oracle and db2 and derby, schema must be UpperCase. +# +torque.database.driver = org.apache.derby.jdbc.EmbeddedDriver +torque.database.url = jdbc:derby:/pj/ws/dbflute_ldb/src/test/resources/data-derby +torque.database.schema = LDB +torque.database.user = ldb +torque.database.password = ldb + + +# ======================================================================================= +# for Sql2Entity task +# =================== +torque.sql2EntityDefinitionMap = map:{ \ + ; sqlDirectory = ./playsql/sql2entity \ + ; isPlainEntity = true \ + ; outputDirectory = ./output/src \ + ; packageString = dbflute.ldb \ +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/otherORMapper/doc.sh =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/otherORMapper/doc.sh 2007-07-10 12:47:32 UTC (rev 219) +++ pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/otherORMapper/doc.sh 2007-07-10 12:49:16 UTC (rev 220) @@ -0,0 +1,14 @@ +#!/bin/sh + +. _project.sh + +echo "/nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn" +echo "Specify the file path to be used as build-properties." +echo "nnnnnnnnnn/" +export MY_PROPERTIES_PATH=build-${MY_PROJECT_NAME}.properties + +echo "/nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn" +echo "Execute {Document}." +echo "nnnnnnnnnn/" +sh $DBFLUTE_HOME/etc/cmd/_df-doc.sh $MY_PROPERTIES_PATH + Added: pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/otherORMapper/jdbc.sh =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/otherORMapper/jdbc.sh 2007-07-10 12:47:32 UTC (rev 219) +++ pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/otherORMapper/jdbc.sh 2007-07-10 12:49:16 UTC (rev 220) @@ -0,0 +1,15 @@ +#!/bin/sh + +. _project.sh + +echo "/nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn" +echo "Specify the file path to be used as build-properties." +echo "nnnnnnnnnn/" +export MY_PROPERTIES_PATH="build-${MY_PROJECT_NAME}.properties" + +echo "/nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn" +echo "Execute {JDBC and Document}." +echo "nnnnnnnnnn/" +sh ${DBFLUTE_HOME}/etc/cmd/_df-jdbc.sh ${MY_PROPERTIES_PATH} + + Added: pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/otherORMapper/jdbc_and_doc.bat =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/otherORMapper/jdbc_and_doc.bat 2007-07-10 12:47:32 UTC (rev 219) +++ pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/otherORMapper/jdbc_and_doc.bat 2007-07-10 12:49:16 UTC (rev 220) @@ -0,0 +1,22 @@ + △ echo off + +call _project.bat + +rem /nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn +rem Specify the file path to be used as build-properties. +rem nnnnnnnnnn/ +set MY_PROPERTIES_PATH=build-%MY_PROJECT_NAME%.properties + +rem /nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn +rem Execute {JDBC and Document}. +rem nnnnnnnnnn/ +call %DBFLUTE_HOME%\etc\cmd\_df-jdbc.cmd %MY_PROPERTIES_PATH% + +rem /nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn +rem Execute {JDBC and Document}. +rem nnnnnnnnnn/ +call %DBFLUTE_HOME%\etc\cmd\_df-doc.cmd %MY_PROPERTIES_PATH% + +pause + + Added: pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/otherORMapper/log/readme.txt =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/otherORMapper/log/readme.txt 2007-07-10 12:47:32 UTC (rev 219) +++ pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/otherORMapper/log/readme.txt 2007-07-10 12:49:16 UTC (rev 220) @@ -0,0 +1 @@ +Directory for LogFile Added: pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/otherORMapper/output/doc/project-schema-otherORMapper.html =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/otherORMapper/output/doc/project-schema-otherORMapper.html 2007-07-10 12:47:32 UTC (rev 219) +++ pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/otherORMapper/output/doc/project-schema-otherORMapper.html 2007-07-10 12:49:16 UTC (rev 220) @@ -0,0 +1,2320 @@ + + + +
+ project-schema-otherORMapper + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table NameEntity NameForeign TableRefferer Table
AUTHORAuthorBOOK
BLACK_ACTIONBlackActionBLACK_LIST, BLACK_ACTION_LOOKUP
BLACK_ACTION_LOOKUPBlackActionLookupBLACK_ACTION
BLACK_LISTBlackListLB_USERBLACK_ACTION
BOOKBookAUTHOR, PUBLISHER, GENRECOLLECTION
COLLECTIONCollectionLIBRARY, BOOKCOLLECTION_STATUS, LENDING_COLLECTION
COLLECTION_STATUSCollectionStatusCOLLECTION, COLLECTION_STATUS_LOOKUP
COLLECTION_STATUS_LOOKUPCollectionStatusLookupCOLLECTION_STATUS
GARBAGEGarbage
GENREGenreGENREBOOK, GENRE
LB_USERLbUserBLACK_LIST, LIBRARY_USER
LENDINGLendingLIBRARY_USERLENDING_COLLECTION
LENDING_COLLECTIONLendingCollectionCOLLECTION, LENDING
LIBRARYLibraryCOLLECTION, LIBRARY_USER, NEXT_LIBRARY, NEXT_LIBRARY
LIBRARY_USERLibraryUserLIBRARY, LB_USERLENDING
NEXT_LIBRARYNextLibraryLIBRARY, LIBRARY
PUBLISHERPublisherBOOK
+ + +

AUTHOR

+ +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameType of dbflutePKAutoIncNotNullSizeDefaultForeignTableReffererTableCapPropNameType of javaClassification
AUTHOR_IDINTEGER
o
o
o
  GENERATED_BY_DEFAULT BOOK AuthorIdjava.math.BigDecimal  
AUTHOR_NAMEVARCHAR
 
 
o
(80)    AuthorNameString  
AUTHOR_AGESMALLINT
 
 
 
     AuthorAgejava.math.BigDecimal  
R_TIMETIMESTAMP
 
 
o
  CURRENT_TIMESTAMP  RTimejava.sql.Timestamp  
U_TIMETIMESTAMP
 
 
o
  CURRENT_TIMESTAMP  UTimejava.sql.Timestamp  
R_USERVARCHAR
 
 
o
(50) default-user  RUserString  
U_USERVARCHAR
 
 
o
(50) default-user  UUserString  
+ + +
+

BLACK_ACTION

+ +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameType of dbflutePKAutoIncNotNullSizeDefaultForeignTableReffererTableCapPropNameType of javaClassification
BLACK_ACTION_IDINTEGER
o
o
o
  GENERATED_BY_DEFAULT  BlackActionIdjava.math.BigDecimal  
BLACK_LIST_IDINTEGER
 
 
o
   BLACK_LIST  BlackListIdjava.math.BigDecimal  
BLACK_ACTION_CODECHAR
 
 
o
(3)  BLACK_ACTION_LOOKUP  BlackActionCodeString  
BLACK_LEVELSMALLINT
 
 
o
     BlackLeveljava.math.BigDecimal  
ACTION_DATETIMESTAMP
 
 
 
     ActionDatejava.sql.Timestamp  
EVIDENCE_PHOTOGRAPHBLOB
 
 
 
     EvidencePhotographbyte[]  
R_TIMETIMESTAMP
 
 
o
  CURRENT_TIMESTAMP  RTimejava.sql.Timestamp  
U_TIMETIMESTAMP
 
 
o
  CURRENT_TIMESTAMP  UTimejava.sql.Timestamp  
R_USERVARCHAR
 
 
o
(50) default-user  RUserString  
U_USERVARCHAR
 
 
o
(50) default-user  UUserString  
+ + +
+

BLACK_ACTION_LOOKUP

+ +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameType of dbflutePKAutoIncNotNullSizeDefaultForeignTableReffererTableCapPropNameType of javaClassification
BLACK_ACTION_CODECHAR
o
 
o
(3)   BLACK_ACTION BlackActionCodeString  
BLACK_ACTION_NAMEVARCHAR
 
 
o
(80)    BlackActionNameString  
R_TIMETIMESTAMP
 
 
o
  CURRENT_TIMESTAMP  RTimejava.sql.Timestamp  
U_TIMETIMESTAMP
 
 
o
  CURRENT_TIMESTAMP  UTimejava.sql.Timestamp  
R_USERVARCHAR
 
 
o
(50) default-user  RUserString  
U_USERVARCHAR
 
 
o
(50) default-user  UUserString  
+ + +
+

BLACK_LIST

+ +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameType of dbflutePKAutoIncNotNullSizeDefaultForeignTableReffererTableCapPropNameType of javaClassification
BLACK_LIST_IDINTEGER
o
o
o
  GENERATED_BY_DEFAULT BLACK_ACTION BlackListIdjava.math.BigDecimal  
LB_USER_IDINTEGER
 
 
o
   LB_USER  LbUserIdjava.math.BigDecimal  
BLACK_RANKCHAR
 
 
o
(3)    BlackRankString  
R_TIMETIMESTAMP
 
 
o
  CURRENT_TIMESTAMP  RTimejava.sql.Timestamp  
U_TIMETIMESTAMP
 
 
o
  CURRENT_TIMESTAMP  UTimejava.sql.Timestamp  
R_USERVARCHAR
 
 
o
(50) default-user  RUserString  
U_USERVARCHAR
 
 
o
(50) default-user  UUserString  
+ + +
+

BOOK

+ +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameType of dbflutePKAutoIncNotNullSizeDefaultForeignTableReffererTableCapPropNameType of javaClassification
BOOK_IDINTEGER
o
o
o
  GENERATED_BY_DEFAULT COLLECTION BookIdjava.math.BigDecimal  
ISBN_NOVARCHAR
 
 
o
(20)    IsbnNoString  
BOOK_NAMEVARCHAR
 
 
o
(80)    BookNameString  
AUTHOR_IDINTEGER
 
 
o
   AUTHOR  AuthorIdjava.math.BigDecimal  
PUBLISHER_IDINTEGER
 
 
o
   PUBLISHER  PublisherIdjava.math.BigDecimal  
MAX_LENDING_DATE_COUNTSMALLINT
 
 
o
     MaxLendingDateCountjava.math.BigDecimal  
GENRE_CODEVARCHAR
 
 
 
(12)  GENRE  GenreCodeString  
OPENING_PARTCLOB
 
 
 
     OpeningPartString  
OUT_OF_USER_SELECT_YNCHAR
 
 
o
(1)    OutOfUserSelectYnString  
OUT_OF_USER_SELECT_REASONVARCHAR
 
 
 
(200)    OutOfUserSelectReasonString  
R_TIMETIMESTAMP
 
 
o
  CURRENT_TIMESTAMP  RTimejava.sql.Timestamp  
U_TIMETIMESTAMP
 
 
o
  CURRENT_TIMESTAMP  UTimejava.sql.Timestamp  
R_USERVARCHAR
 
 
o
(50) default-user  RUserString  
U_USERVARCHAR
 
 
o
(50) default-user  UUserString  
+ + +
+

COLLECTION

+ +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameType of dbflutePKAutoIncNotNullSizeDefaultForeignTableReffererTableCapPropNameType of javaClassification
COLLECTION_IDINTEGER
o
o
o
  GENERATED_BY_DEFAULT COLLECTION_STATUS, LENDING_COLLECTION CollectionIdjava.math.BigDecimal  
LIBRARY_IDSMALLINT
 
 
o
   LIBRARY  LibraryIdjava.math.BigDecimal  
BOOK_IDINTEGER
 
 
o
   BOOK  BookIdjava.math.BigDecimal  
ARRIVAL_DATETIMESTAMP
 
 
o
     ArrivalDatejava.sql.Timestamp  
R_TIMETIMESTAMP
 
 
o
  CURRENT_TIMESTAMP  RTimejava.sql.Timestamp  
U_TIMETIMESTAMP
 
 
o
  CURRENT_TIMESTAMP  UTimejava.sql.Timestamp  
R_USERVARCHAR
 
 
o
(50) default-user  RUserString  
U_USERVARCHAR
 
 
o
(50) default-user  UUserString  
+ + +
+

COLLECTION_STATUS

+ +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameType of dbflutePKAutoIncNotNullSizeDefaultForeignTableReffererTableCapPropNameType of javaClassification
COLLECTION_IDINTEGER
o
 
o
   COLLECTION  CollectionIdjava.math.BigDecimal  
COLLECTION_STATUS_CODECHAR
 
 
o
(3)  COLLECTION_STATUS_LOOKUP  CollectionStatusCodeString  
R_TIMETIMESTAMP
 
 
o
  CURRENT_TIMESTAMP  RTimejava.sql.Timestamp  
U_TIMETIMESTAMP
 
 
o
  CURRENT_TIMESTAMP  UTimejava.sql.Timestamp  
R_USERVARCHAR
 
 
o
(50) default-user  RUserString  
U_USERVARCHAR
 
 
o
(50) default-user  UUserString  
+ + +
+

COLLECTION_STATUS_LOOKUP

+ +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameType of dbflutePKAutoIncNotNullSizeDefaultForeignTableReffererTableCapPropNameType of javaClassification
COLLECTION_STATUS_CODECHAR
o
 
o
(3)   COLLECTION_STATUS CollectionStatusCodeString  
COLLECTION_STATUS_NAMEVARCHAR
 
 
o
(80)    CollectionStatusNameString  
R_TIMETIMESTAMP
 
 
o
  CURRENT_TIMESTAMP  RTimejava.sql.Timestamp  
U_TIMETIMESTAMP
 
 
o
  CURRENT_TIMESTAMP  UTimejava.sql.Timestamp  
R_USERVARCHAR
 
 
o
(50) default-user  RUserString  
U_USERVARCHAR
 
 
o
(50) default-user  UUserString  
+ + +
+

GARBAGE

+ +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameType of dbflutePKAutoIncNotNullSizeDefaultForeignTableReffererTableCapPropNameType of javaClassification
GARBAGE_MEMOVARCHAR
 
 
 
(50)    GarbageMemoString  
GARBAGE_TIMETIMESTAMP
 
 
 
     GarbageTimejava.sql.Timestamp  
+ + +
+

GENRE

+ +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameType of dbflutePKAutoIncNotNullSizeDefaultForeignTableReffererTableCapPropNameType of javaClassification
GENRE_CODEVARCHAR
o
 
o
(12)   BOOK, GENRE GenreCodeString  
GENRE_NAMEVARCHAR
 
 
o
(80)    GenreNameString  
PARENT_GENRE_CODEVARCHAR
 
 
 
(12)  GENRE  ParentGenreCodeString  
R_TIMETIMESTAMP
 
 
o
  CURRENT_TIMESTAMP  RTimejava.sql.Timestamp  
U_TIMETIMESTAMP
 
 
o
  CURRENT_TIMESTAMP  UTimejava.sql.Timestamp  
R_USERVARCHAR
 
 
o
(50) default-user  RUserString  
U_USERVARCHAR
 
 
o
(50) default-user  UUserString  
+ + +
+

LB_USER

+ +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameType of dbflutePKAutoIncNotNullSizeDefaultForeignTableReffererTableCapPropNameType of javaClassification
LB_USER_IDINTEGER
o
o
o
  GENERATED_BY_DEFAULT BLACK_LIST, LIBRARY_USER LbUserIdjava.math.BigDecimal  
LB_USER_NAMEVARCHAR
 
 
o
(80)    LbUserNameString  
USER_PASSWORDVARCHAR
 
 
o
(50)    UserPasswordString  
R_TIMETIMESTAMP
 
 
o
  CURRENT_TIMESTAMP  RTimejava.sql.Timestamp  
U_TIMETIMESTAMP
 
 
o
  CURRENT_TIMESTAMP  UTimejava.sql.Timestamp  
R_USERVARCHAR
 
 
o
(50) default-user  RUserString  
U_USERVARCHAR
 
 
o
(50) default-user  UUserString  
+ + +
+

LENDING

+ +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameType of dbflutePKAutoIncNotNullSizeDefaultForeignTableReffererTableCapPropNameType of javaClassification
LIBRARY_IDSMALLINT
o
 
o
   LIBRARY_USER LENDING_COLLECTION LibraryIdjava.math.BigDecimal  
LB_USER_IDINTEGER
o
 
o
   LIBRARY_USER LENDING_COLLECTION LbUserIdjava.math.BigDecimal  
LENDING_DATETIMESTAMP
o
 
o
    LENDING_COLLECTION LendingDatejava.sql.Timestamp  
R_TIMETIMESTAMP
 
 
o
  CURRENT_TIMESTAMP  RTimejava.sql.Timestamp  
U_TIMETIMESTAMP
 
 
o
  CURRENT_TIMESTAMP  UTimejava.sql.Timestamp  
R_USERVARCHAR
 
 
o
(50) default-user  RUserString  
U_USERVARCHAR
 
 
o
(50) default-user  UUserString  
+ + +
+

LENDING_COLLECTION

+ +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameType of dbflutePKAutoIncNotNullSizeDefaultForeignTableReffererTableCapPropNameType of javaClassification
LIBRARY_IDSMALLINT
o
 
o
   LENDING  LibraryIdjava.math.BigDecimal  
LB_USER_IDINTEGER
o
 
o
   LENDING  LbUserIdjava.math.BigDecimal  
LENDING_DATETIMESTAMP
o
 
o
   LENDING  LendingDatejava.sql.Timestamp  
COLLECTION_IDINTEGER
o
 
o
   COLLECTION  CollectionIdjava.math.BigDecimal  
RETURN_LIMIT_DATETIMESTAMP
 
 
o
     ReturnLimitDatejava.sql.Timestamp  
R_TIMETIMESTAMP
 
 
o
  CURRENT_TIMESTAMP  RTimejava.sql.Timestamp  
U_TIMETIMESTAMP
 
 
o
  CURRENT_TIMESTAMP  UTimejava.sql.Timestamp  
R_USERVARCHAR
 
 
o
(50) default-user  RUserString  
U_USERVARCHAR
 
 
o
(50) default-user  UUserString  
+ + +
+

LIBRARY

+ +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameType of dbflutePKAutoIncNotNullSizeDefaultForeignTableReffererTableCapPropNameType of javaClassification
LIBRARY_IDSMALLINT
o
o
o
  GENERATED_BY_DEFAULT COLLECTION, LIBRARY_USER, NEXT_LIBRARY, NEXT_LIBRARY LibraryIdjava.math.BigDecimal  
LIBRARY_NAMEVARCHAR
 
 
o
(80)    LibraryNameString  
R_TIMETIMESTAMP
 
 
o
  CURRENT_TIMESTAMP  RTimejava.sql.Timestamp  
U_TIMETIMESTAMP
 
 
o
  CURRENT_TIMESTAMP  UTimejava.sql.Timestamp  
R_USERVARCHAR
 
 
o
(50) default-user  RUserString  
U_USERVARCHAR
 
 
o
(50) default-user  UUserString  
+ + +
+

LIBRARY_USER

+ +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameType of dbflutePKAutoIncNotNullSizeDefaultForeignTableReffererTableCapPropNameType of javaClassification
LIBRARY_IDSMALLINT
o
 
o
   LIBRARY LENDING LibraryIdjava.math.BigDecimal  
LB_USER_IDINTEGER
o
 
o
   LB_USER LENDING LbUserIdjava.math.BigDecimal  
R_TIMETIMESTAMP
 
 
o
  CURRENT_TIMESTAMP  RTimejava.sql.Timestamp  
U_TIMETIMESTAMP
 
 
o
  CURRENT_TIMESTAMP  UTimejava.sql.Timestamp  
R_USERVARCHAR
 
 
o
(50) default-user  RUserString  
U_USERVARCHAR
 
 
o
(50) default-user  UUserString  
+ + +
+

NEXT_LIBRARY

+ +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameType of dbflutePKAutoIncNotNullSizeDefaultForeignTableReffererTableCapPropNameType of javaClassification
LIBRARY_IDSMALLINT
o
 
o
   LIBRARY  LibraryIdjava.math.BigDecimal  
NEXT_LIBRARY_IDSMALLINT
o
 
o
   LIBRARY  NextLibraryIdjava.math.BigDecimal  
DISTANCE_KMINTEGER
 
 
o
     DistanceKmjava.math.BigDecimal  
R_TIMETIMESTAMP
 
 
o
  CURRENT_TIMESTAMP  RTimejava.sql.Timestamp  
U_TIMETIMESTAMP
 
 
o
  CURRENT_TIMESTAMP  UTimejava.sql.Timestamp  
R_USERVARCHAR
 
 
o
(50) default-user  RUserString  
U_USERVARCHAR
 
 
o
(50) default-user  UUserString  
+ + +
+

PUBLISHER

+ +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameType of dbflutePKAutoIncNotNullSizeDefaultForeignTableReffererTableCapPropNameType of javaClassification
PUBLISHER_IDINTEGER
o
o
o
  GENERATED_BY_DEFAULT BOOK PublisherIdjava.math.BigDecimal  
PUBLISHER_NAMEVARCHAR
 
 
o
(80)    PublisherNameString  
R_TIMETIMESTAMP
 
 
o
  CURRENT_TIMESTAMP  RTimejava.sql.Timestamp  
U_TIMETIMESTAMP
 
 
o
  CURRENT_TIMESTAMP  UTimejava.sql.Timestamp  
R_USERVARCHAR
 
 
o
(50) default-user  RUserString  
U_USERVARCHAR
 
 
o
(50) default-user  UUserString  
+ + + + + Added: pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/otherORMapper/output/doc/readme.txt =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/otherORMapper/output/doc/readme.txt 2007-07-10 12:47:32 UTC (rev 219) +++ pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/otherORMapper/output/doc/readme.txt 2007-07-10 12:49:16 UTC (rev 220) @@ -0,0 +1 @@ +Directory for Document Added: pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/otherORMapper/output/src/dbflute/ldb/BookCollectionStatistic.java =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/otherORMapper/output/src/dbflute/ldb/BookCollectionStatistic.java 2007-07-10 12:47:32 UTC (rev 219) +++ pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/otherORMapper/output/src/dbflute/ldb/BookCollectionStatistic.java 2007-07-10 12:49:16 UTC (rev 220) @@ -0,0 +1,13 @@ +package dbflute.ldb; + + +/** + * The entity of BookCollectionStatistic. + * + * @author DBFlute(AutoGenerator) + */ +public class BookCollectionStatistic extends dbflute.ldb.BsBookCollectionStatistic { + + /** Serial version UID. (Default) */ + private static final long serialVersionUID = 1L; +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/otherORMapper/output/src/dbflute/ldb/BsBookCollectionStatistic.java =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/otherORMapper/output/src/dbflute/ldb/BsBookCollectionStatistic.java 2007-07-10 12:47:32 UTC (rev 219) +++ pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/otherORMapper/output/src/dbflute/ldb/BsBookCollectionStatistic.java 2007-07-10 12:49:16 UTC (rev 220) @@ -0,0 +1,146 @@ +package dbflute.ldb; + +/** + * The entity of BookCollectionStatistic. + * + * @author DBFlute(AutoGenerator) + */ +public class BsBookCollectionStatistic implements java.io.Serializable { + + /** Serial version UID. (Default) */ + private static final long serialVersionUID = 1L; + + // ===================================================================================== + // Attribute + // ========= + + /** The value of bookId. */ + protected java.math.BigDecimal _bookId; + + /** The value of bookName. */ + protected String _bookName; + + /** The value of collectionCount. */ + protected java.math.BigDecimal _collectionCount; + + // ===================================================================================== + // Accessor + // ======== + + /** + * Get the value of bookId. + * + * @return The value of bookId. (Nullable) + */ + public java.math.BigDecimal getBookId() { + return _bookId; + } + + /** + * Set the value of bookId. + * + * @param bookId The value of bookId. (Nullable) + */ + public void setBookId(java.math.BigDecimal bookId) { + _bookId = bookId; + } + + /** + * Get the value of bookName. + * + * @return The value of bookName. (Nullable) + */ + public String getBookName() { + return _bookName; + } + + /** + * Set the value of bookName. + * + * @param bookName The value of bookName. (Nullable) + */ + public void setBookName(String bookName) { + _bookName = bookName; + } + + /** + * Get the value of collectionCount. + * + * @return The value of collectionCount. (Nullable) + */ + public java.math.BigDecimal getCollectionCount() { + return _collectionCount; + } + + /** + * Set the value of collectionCount. + * + * @param collectionCount The value of collectionCount. (Nullable) + */ + public void setCollectionCount(java.math.BigDecimal collectionCount) { + _collectionCount = collectionCount; + } + + // ===================================================================================== + // Basic Override + // ============== + + /** + * This method overrides the method that is declared at super. + * If the primary-key of the other is same as this one, returns true. + * + * @param other Other entity. + * @return Comparing result. + */ + public boolean equals(Object other) { + if (other == null) { + return false; + } + if (!(other instanceof BsBookCollectionStatistic)) { + return false; + } + final BsBookCollectionStatistic otherEntity = (BsBookCollectionStatistic)other; + + if (getBookId() == null || !getBookId().equals(otherEntity.getBookId())) { + return false; + } + + return true; + } + + /** + * This method overrides the method that is declared at super. + * Calculates hash-code from primary-key. + * + * @return Hash-code from primary-keys. + */ + public int hashCode() { + int result = 0; + + if (this.getBookId() != null) { + result = result + getBookId().hashCode(); + } + + return result; + } + + /** + * This method overrides the method that is declared at super. + * + * @return Column-value map-string. (NotNull) + */ + public String toString() { + final String delimiter = ","; + final StringBuffer sb = new StringBuffer(); + + sb.append(delimiter).append(getBookId()); + + sb.append(delimiter).append(getBookName()); + + sb.append(delimiter).append(getCollectionCount()); + + sb.delete(0, delimiter.length()); + sb.insert(0, "{").append("}"); + return sb.toString(); + } +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/otherORMapper/playsql/replace-schema.sql =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/otherORMapper/playsql/replace-schema.sql 2007-07-10 12:47:32 UTC (rev 219) +++ pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/otherORMapper/playsql/replace-schema.sql 2007-07-10 12:49:16 UTC (rev 220) @@ -0,0 +1,418 @@ +ALTER TABLE BLACK_ACTION DROP CONSTRAINT FK_BLACK_ACTION_BLACK_LIST +; + +ALTER TABLE BLACK_ACTION DROP CONSTRAINT FK_BLACK_ACTION_LOOKUP +; + +ALTER TABLE BLACK_LIST DROP CONSTRAINT FK_BLACK_LIST_LB_USER +; + +ALTER TABLE BOOK DROP CONSTRAINT FK_BOOK_AUTHOR +; + +ALTER TABLE BOOK DROP CONSTRAINT FK_BOOK_PUBLISHER +; + +ALTER TABLE BOOK DROP CONSTRAINT FK_BOOK_GENRE +; + +ALTER TABLE COLLECTION DROP CONSTRAINT FK_COLLECTION_BOOK +; + +ALTER TABLE COLLECTION DROP CONSTRAINT FK_COLLECTION_LIBRARY +; + +ALTER TABLE COLLECTION_STATUS DROP CONSTRAINT FK_COLLECTION_STATUS_COLLECTION +; + +ALTER TABLE COLLECTION_STATUS DROP CONSTRAINT FK_COLLECTION_STATUS_LOOKUP +; + +ALTER TABLE GENRE DROP CONSTRAINT FK_GENRE_GENRE +; + +ALTER TABLE LB_USER DROP CONSTRAINT FK_LB_USER_LIBRARY +; + +ALTER TABLE LENDING DROP CONSTRAINT FK_LENDING_LIBRARY +; + +ALTER TABLE LENDING DROP CONSTRAINT FK_LENDING_LB_USER +; + +ALTER TABLE LENDING_COLLECTION DROP CONSTRAINT FK_LENDING_COLLECTION_LENDING +; + +ALTER TABLE LENDING_COLLECTION DROP CONSTRAINT FK_LENDING_COLLECTION_COL +; + +ALTER TABLE NEXT_LIBRARY DROP CONSTRAINT FK_NEXT_LIBRARY_LIBRARY_ID +; + +ALTER TABLE NEXT_LIBRARY DROP CONSTRAINT FK_NEXT_LIBRARY_NEXT_LIBRARY_ID +; + + +DROP TABLE AUTHOR +; +DROP TABLE BLACK_ACTION +; +DROP TABLE BLACK_ACTION_LOOKUP +; +DROP TABLE BLACK_LIST +; +DROP TABLE BOOK +; +DROP TABLE COLLECTION +; +DROP TABLE COLLECTION_STATUS +; +DROP TABLE COLLECTION_STATUS_LOOKUP +; +DROP TABLE GARBAGE +; +DROP TABLE GENRE +; +DROP TABLE LB_USER +; +DROP TABLE LENDING +; +DROP TABLE LENDING_COLLECTION +; +DROP TABLE LIBRARY +; +DROP TABLE NEXT_LIBRARY +; +DROP TABLE PUBLISHER +; + +CREATE TABLE AUTHOR ( + AUTHOR_ID integer NOT NULL GENERATED BY DEFAULT AS IDENTITY (START WITH 1, INCREMENT BY 1), + AUTHOR_NAME varchar(80) NOT NULL, + R_TIME timestamp DEFAULT CURRENT_TIMESTAMP NOT NULL, + U_TIME timestamp DEFAULT CURRENT_TIMESTAMP NOT NULL, + R_STAFF varchar(50) DEFAULT 'DefaultStaff' NOT NULL, + U_STAFF varchar(50) DEFAULT 'DefaultStaff' NOT NULL +) +; + +CREATE TABLE BLACK_ACTION ( + BLACK_ACTION_ID integer NOT NULL GENERATED BY DEFAULT AS IDENTITY (START WITH 1, INCREMENT BY 1), + BLACK_LIST_ID integer NOT NULL, + BLACK_ACTION_CODE char(3) NOT NULL, + BLACK_LEVEL smallint NOT NULL, + EVIDENCE_PHOTOGRAPH blob, + R_TIME timestamp DEFAULT CURRENT_TIMESTAMP NOT NULL, + U_TIME timestamp DEFAULT CURRENT_TIMESTAMP NOT NULL, + R_STAFF varchar(50) DEFAULT 'DefaultStaff' NOT NULL, + U_STAFF varchar(50) DEFAULT 'DefaultStaff' NOT NULL +) +; + +CREATE TABLE BLACK_ACTION_LOOKUP ( + BLACK_ACTION_CODE char(3) NOT NULL, + BLACK_ACTION_NAME varchar(80) NOT NULL, + R_TIME timestamp DEFAULT CURRENT_TIMESTAMP NOT NULL, + U_TIME timestamp DEFAULT CURRENT_TIMESTAMP NOT NULL, + R_STAFF varchar(50) DEFAULT 'DefaultStaff' NOT NULL, + U_STAFF varchar(50) DEFAULT 'DefaultStaff' NOT NULL +) +; + +CREATE TABLE BLACK_LIST ( + BLACK_LIST_ID integer NOT NULL GENERATED BY DEFAULT AS IDENTITY (START WITH 1, INCREMENT BY 1), + LB_USER_ID integer NOT NULL, + BLACK_RANK char(3) NOT NULL, + R_TIME timestamp DEFAULT CURRENT_TIMESTAMP NOT NULL, + U_TIME timestamp DEFAULT CURRENT_TIMESTAMP NOT NULL, + R_STAFF varchar(50) DEFAULT 'DefaultStaff' NOT NULL, + U_STAFF varchar(50) DEFAULT 'DefaultStaff' NOT NULL +) +; + +CREATE TABLE BOOK ( + BOOK_ID integer NOT NULL GENERATED BY DEFAULT AS IDENTITY (START WITH 1, INCREMENT BY 1), + ISBN_NO varchar(20) NOT NULL, + BOOK_NAME varchar(80) NOT NULL, + AUTHOR_ID integer NOT NULL, + PUBLISHER_ID integer NOT NULL, + MAX_LENDING_DATE_COUNT smallint NOT NULL, + GENRE_CODE varchar(12), + OPENING_PART clob, + R_TIME timestamp DEFAULT CURRENT_TIMESTAMP NOT NULL, + U_TIME timestamp DEFAULT CURRENT_TIMESTAMP NOT NULL, + R_STAFF varchar(50) DEFAULT 'DefaultStaff' NOT NULL, + U_STAFF varchar(50) DEFAULT 'DefaultStaff' NOT NULL +) +; + +CREATE TABLE COLLECTION ( + COLLECTION_ID integer NOT NULL, + LIBRARY_ID smallint NOT NULL, + BOOK_ID integer NOT NULL, + ARRIVAL_DATE timestamp NOT NULL, + R_TIME timestamp DEFAULT CURRENT_TIMESTAMP NOT NULL, + U_TIME timestamp DEFAULT CURRENT_TIMESTAMP NOT NULL, + R_STAFF varchar(50) DEFAULT 'DefaultStaff' NOT NULL, + U_STAFF varchar(50) DEFAULT 'DefaultStaff' NOT NULL +) +; + +CREATE TABLE COLLECTION_STATUS ( + COLLECTION_ID integer NOT NULL, + COLLECTION_STATUS_CODE char(3) NOT NULL, + R_TIME timestamp DEFAULT CURRENT_TIMESTAMP NOT NULL, + U_TIME timestamp DEFAULT CURRENT_TIMESTAMP NOT NULL, + R_STAFF varchar(50) DEFAULT 'DefaultStaff' NOT NULL, + U_STAFF varchar(50) DEFAULT 'DefaultStaff' NOT NULL +) +; + +CREATE TABLE COLLECTION_STATUS_LOOKUP ( + COLLECTION_STATUS_CODE char(3) NOT NULL, + COLLECTION_STATUS_NAME varchar(80) NOT NULL, + R_TIME timestamp DEFAULT CURRENT_TIMESTAMP NOT NULL, + U_TIME timestamp DEFAULT CURRENT_TIMESTAMP NOT NULL, + R_STAFF varchar(50) DEFAULT 'DefaultStaff' NOT NULL, + U_STAFF varchar(50) DEFAULT 'DefaultStaff' NOT NULL +) +; + +CREATE TABLE GARBAGE ( + GARBAGE_MEMO varchar(50), + GARBAGE_TIME timestamp +) +; + +CREATE TABLE GENRE ( + GENRE_CODE varchar(12) NOT NULL, + GENRE_NAME varchar(80) NOT NULL, + PARENT_GENRE_CODE varchar(12), + R_TIME timestamp DEFAULT CURRENT_TIMESTAMP NOT NULL, + U_TIME timestamp DEFAULT CURRENT_TIMESTAMP NOT NULL, + R_STAFF varchar(50) DEFAULT 'DefaultStaff' NOT NULL, + U_STAFF varchar(50) DEFAULT 'DefaultStaff' NOT NULL +) +; + +CREATE TABLE LB_USER ( + LB_USER_ID integer NOT NULL GENERATED BY DEFAULT AS IDENTITY (START WITH 1, INCREMENT BY 1), + LB_USER_NAME varchar(80) NOT NULL, + LIBRARY_ID smallint NOT NULL, + USER_PASSWORD varchar(50) NOT NULL, + R_TIME timestamp DEFAULT CURRENT_TIMESTAMP NOT NULL, + U_TIME timestamp DEFAULT CURRENT_TIMESTAMP NOT NULL, + R_STAFF varchar(50) DEFAULT 'DefaultStaff' NOT NULL, + U_STAFF varchar(50) DEFAULT 'DefaultStaff' NOT NULL +) +; + +CREATE TABLE LENDING ( + LENDING_ID integer NOT NULL GENERATED BY DEFAULT AS IDENTITY (START WITH 1, INCREMENT BY 1), + LIBRARY_ID smallint NOT NULL, + LB_USER_ID integer NOT NULL, + LENDING_DATE timestamp NOT NULL, + R_TIME timestamp DEFAULT CURRENT_TIMESTAMP NOT NULL, + U_TIME timestamp DEFAULT CURRENT_TIMESTAMP NOT NULL, + R_STAFF varchar(50) DEFAULT 'DefaultStaff' NOT NULL, + U_STAFF varchar(50) DEFAULT 'DefaultStaff' NOT NULL +) +; + +CREATE TABLE LENDING_COLLECTION ( + LENDING_ID integer NOT NULL, + COLLECTION_ID integer NOT NULL, + RETURN_LIMIT_DATE timestamp NOT NULL, + R_TIME timestamp DEFAULT CURRENT_TIMESTAMP NOT NULL, + U_TIME timestamp DEFAULT CURRENT_TIMESTAMP NOT NULL, + R_STAFF varchar(50) DEFAULT 'DefaultStaff' NOT NULL, + U_STAFF varchar(50) DEFAULT 'DefaultStaff' NOT NULL +) +; + +CREATE TABLE LIBRARY ( + LIBRARY_ID smallint NOT NULL GENERATED BY DEFAULT AS IDENTITY (START WITH 1, INCREMENT BY 1), + LIBRARY_NAME varchar(80) NOT NULL, + R_TIME timestamp DEFAULT CURRENT_TIMESTAMP NOT NULL, + U_TIME timestamp DEFAULT CURRENT_TIMESTAMP NOT NULL, + R_STAFF varchar(50) DEFAULT 'DefaultStaff' NOT NULL, + U_STAFF varchar(50) DEFAULT 'DefaultStaff' NOT NULL +) +; + +CREATE TABLE NEXT_LIBRARY ( + LIBRARY_ID smallint NOT NULL, + NEXT_LIBRARY_ID smallint NOT NULL, + DISTANCE_KM integer NOT NULL, + R_TIME timestamp DEFAULT CURRENT_TIMESTAMP NOT NULL, + U_TIME timestamp DEFAULT CURRENT_TIMESTAMP NOT NULL, + R_STAFF varchar(50) DEFAULT 'DefaultStaff' NOT NULL, + U_STAFF varchar(50) DEFAULT 'DefaultStaff' NOT NULL +) +; + +CREATE TABLE PUBLISHER ( + PUBLISHER_ID integer NOT NULL GENERATED BY DEFAULT AS IDENTITY (START WITH 1, INCREMENT BY 1), + PUBLISHER_NAME varchar(80) NOT NULL, + R_TIME timestamp DEFAULT CURRENT_TIMESTAMP NOT NULL, + U_TIME timestamp DEFAULT CURRENT_TIMESTAMP NOT NULL, + R_STAFF varchar(50) DEFAULT 'DefaultStaff' NOT NULL, + U_STAFF varchar(50) DEFAULT 'DefaultStaff' NOT NULL +) +; + + +ALTER TABLE AUTHOR ADD CONSTRAINT PK_AUTHOR + PRIMARY KEY (AUTHOR_ID) +; + +ALTER TABLE BLACK_ACTION ADD CONSTRAINT PK_BLACK_ACTION + PRIMARY KEY (BLACK_ACTION_ID) +; + +ALTER TABLE BLACK_ACTION_LOOKUP ADD CONSTRAINT PK_BLACK_ACTION_LOOKUP + PRIMARY KEY (BLACK_ACTION_CODE) +; + +ALTER TABLE BLACK_LIST ADD CONSTRAINT PK_BLACK_LIST + PRIMARY KEY (BLACK_LIST_ID) +; + +ALTER TABLE BOOK ADD CONSTRAINT PK_BOOK + PRIMARY KEY (BOOK_ID) +; + +ALTER TABLE COLLECTION ADD CONSTRAINT PK_COLLECTION + PRIMARY KEY (COLLECTION_ID) +; + +ALTER TABLE COLLECTION_STATUS ADD CONSTRAINT PK_COLLECTION_STATUS + PRIMARY KEY (COLLECTION_ID) +; + +ALTER TABLE COLLECTION_STATUS_LOOKUP ADD CONSTRAINT PK_COLLECTION_STATUS_LOOKUP + PRIMARY KEY (COLLECTION_STATUS_CODE) +; + +ALTER TABLE GENRE ADD CONSTRAINT PK_GENRE + PRIMARY KEY (GENRE_CODE) +; + +ALTER TABLE LB_USER ADD CONSTRAINT PK_LB_USER + PRIMARY KEY (LB_USER_ID) +; + +ALTER TABLE LENDING ADD CONSTRAINT PK_LENDING + PRIMARY KEY (LENDING_ID) +; + +ALTER TABLE LENDING_COLLECTION ADD CONSTRAINT PK_LENDING_COLLECTION + PRIMARY KEY (LENDING_ID, COLLECTION_ID) +; + +ALTER TABLE LIBRARY ADD CONSTRAINT PK_LIBRARY + PRIMARY KEY (LIBRARY_ID) +; + +ALTER TABLE NEXT_LIBRARY ADD CONSTRAINT PK_NEXT_LIBRARY + PRIMARY KEY (LIBRARY_ID, NEXT_LIBRARY_ID) +; + +ALTER TABLE PUBLISHER ADD CONSTRAINT PK_PUBLISHER + PRIMARY KEY (PUBLISHER_ID) +; + + +ALTER TABLE BOOK + ADD CONSTRAINT UQ_BOOK_ISBN_NO UNIQUE (ISBN_NO) +; + +ALTER TABLE COLLECTION + ADD CONSTRAINT UQ_COLLECTION_Primary UNIQUE (LIBRARY_ID, BOOK_ID) +; + +ALTER TABLE LENDING + ADD CONSTRAINT UQ_LENDING_Primary UNIQUE (LIBRARY_ID, LB_USER_ID) +; + +ALTER TABLE BLACK_LIST + ADD CONSTRAINT UQ_BLACK_LIST_LB_USER_ID UNIQUE (LB_USER_ID) +; + +ALTER TABLE LIBRARY + ADD CONSTRAINT UQ_LIBRARY_LIBRARY_NAME UNIQUE (LIBRARY_NAME) +; + + + +ALTER TABLE BLACK_ACTION ADD CONSTRAINT FK_BLACK_ACTION_BLACK_LIST + FOREIGN KEY (BLACK_LIST_ID) REFERENCES BLACK_LIST (BLACK_LIST_ID) +; + +ALTER TABLE BLACK_ACTION ADD CONSTRAINT FK_BLACK_ACTION_LOOKUP + FOREIGN KEY (BLACK_ACTION_CODE) REFERENCES BLACK_ACTION_LOOKUP (BLACK_ACTION_CODE) +; + +ALTER TABLE BLACK_LIST ADD CONSTRAINT FK_BLACK_LIST_LB_USER + FOREIGN KEY (LB_USER_ID) REFERENCES LB_USER (LB_USER_ID) +; + +ALTER TABLE BOOK ADD CONSTRAINT FK_BOOK_AUTHOR + FOREIGN KEY (AUTHOR_ID) REFERENCES AUTHOR (AUTHOR_ID) +; + +ALTER TABLE BOOK ADD CONSTRAINT FK_BOOK_PUBLISHER + FOREIGN KEY (PUBLISHER_ID) REFERENCES PUBLISHER (PUBLISHER_ID) +; + +ALTER TABLE BOOK ADD CONSTRAINT FK_BOOK_GENRE + FOREIGN KEY (GENRE_CODE) REFERENCES GENRE (GENRE_CODE) +; + +ALTER TABLE COLLECTION ADD CONSTRAINT FK_COLLECTION_BOOK + FOREIGN KEY (BOOK_ID) REFERENCES BOOK (BOOK_ID) +; + +ALTER TABLE COLLECTION ADD CONSTRAINT FK_COLLECTION_LIBRARY + FOREIGN KEY (LIBRARY_ID) REFERENCES LIBRARY (LIBRARY_ID) +; + +ALTER TABLE COLLECTION_STATUS ADD CONSTRAINT FK_COLLECTION_STATUS_COLLECTION + FOREIGN KEY (COLLECTION_ID) REFERENCES COLLECTION (COLLECTION_ID) +; + +ALTER TABLE COLLECTION_STATUS ADD CONSTRAINT FK_COLLECTION_STATUS_LOOKUP + FOREIGN KEY (COLLECTION_STATUS_CODE) REFERENCES COLLECTION_STATUS_LOOKUP (COLLECTION_STATUS_CODE) +; + +ALTER TABLE GENRE ADD CONSTRAINT FK_GENRE_GENRE + FOREIGN KEY (PARENT_GENRE_CODE) REFERENCES GENRE (GENRE_CODE) +; + +ALTER TABLE LB_USER ADD CONSTRAINT FK_LB_USER_LIBRARY + FOREIGN KEY (LIBRARY_ID) REFERENCES LIBRARY (LIBRARY_ID) +; + +ALTER TABLE LENDING ADD CONSTRAINT FK_LENDING_LIBRARY + FOREIGN KEY (LIBRARY_ID) REFERENCES LIBRARY (LIBRARY_ID) +; + +ALTER TABLE LENDING ADD CONSTRAINT FK_LENDING_LB_USER + FOREIGN KEY (LB_USER_ID) REFERENCES LB_USER (LB_USER_ID) +; + +ALTER TABLE LENDING_COLLECTION ADD CONSTRAINT FK_LENDING_COLLECTION_LENDING + FOREIGN KEY (LENDING_ID) REFERENCES LENDING (LENDING_ID) +; + +ALTER TABLE LENDING_COLLECTION ADD CONSTRAINT FK_LENDING_COLLECTION_COL + FOREIGN KEY (COLLECTION_ID) REFERENCES COLLECTION (COLLECTION_ID) +; + +ALTER TABLE NEXT_LIBRARY ADD CONSTRAINT FK_NEXT_LIBRARY_LIBRARY_ID + FOREIGN KEY (LIBRARY_ID) REFERENCES LIBRARY (LIBRARY_ID) +; + +ALTER TABLE NEXT_LIBRARY ADD CONSTRAINT FK_NEXT_LIBRARY_NEXT_LIBRARY_ID + FOREIGN KEY (NEXT_LIBRARY_ID) REFERENCES LIBRARY (LIBRARY_ID) +; Added: pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/otherORMapper/playsql/sql2entity/LdBookDao_selectBookCollectionStatistic.sql =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/otherORMapper/playsql/sql2entity/LdBookDao_selectBookCollectionStatistic.sql 2007-07-10 12:47:32 UTC (rev 219) +++ pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/otherORMapper/playsql/sql2entity/LdBookDao_selectBookCollectionStatistic.sql 2007-07-10 12:49:16 UTC (rev 220) @@ -0,0 +1,13 @@ + +--#BookCollectionStatistic#-- +--*BOOK_ID*-- + +select book.BOOK_ID + , book.BOOK_NAME + , (select count(*) from COLLECTION where BOOK_ID = book.BOOK_ID) as COLLECTION_COUNT + from BOOK book + /*BEGIN*/where + /*IF bookName != null*/book.BOOK_NAME like /*bookName*/'S2Dao' || '%'/*END*/ + /*END*/ + order by COLLECTION_COUNT desc +; Added: pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/otherORMapper/schema/project-schema-otherORMapper.xml =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/otherORMapper/schema/project-schema-otherORMapper.xml 2007-07-10 12:47:32 UTC (rev 219) +++ pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/otherORMapper/schema/project-schema-otherORMapper.xml 2007-07-10 12:49:16 UTC (rev 220) @@ -0,0 +1,308 @@ + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + +
+ + + + + + + +
+ + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + +
+ + + + + + + +
+ + + +
+ + + + + + + + + + + +
+ + + + + + + + +
+ + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + +
+ + + + + + + + + + + + + +
+ + + + + + + + + + + + + + +
+ + + + + + + +
+
Added: pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/otherORMapper/schema/readme.txt =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/otherORMapper/schema/readme.txt 2007-07-10 12:47:32 UTC (rev 219) +++ pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/otherORMapper/schema/readme.txt 2007-07-10 12:49:16 UTC (rev 220) @@ -0,0 +1 @@ +Directory for SchemaFile Added: pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/otherORMapper/sql2entity.bat =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/otherORMapper/sql2entity.bat 2007-07-10 12:47:32 UTC (rev 219) +++ pompei/trunk/mydbflute/dbflute-0.5.2/etc/client_directory-template/otherORMapper/sql2entity.bat 2007-07-10 12:49:16 UTC (rev 220) @@ -0,0 +1,17 @@ + △ echo off + +call _project.bat + +rem /nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn +rem Specify the file path to be used as build-properties. +rem nnnnnnnnnn/ +set MY_PROPERTIES_PATH=build-%MY_PROJECT_NAME%.properties + +rem /nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn +rem Execute {Invoke Sql Directory}. +rem nnnnnnnnnn/ +call %DBFLUTE_HOME%\etc\cmd\_df-sql2entity.cmd %MY_PROPERTIES_PATH% + +pause + + Added: pompei/trunk/mydbflute/dbflute-0.5.2/etc/cmd/_copy-properties.cmd =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/etc/cmd/_copy-properties.cmd 2007-07-10 12:47:32 UTC (rev 219) +++ pompei/trunk/mydbflute/dbflute-0.5.2/etc/cmd/_copy-properties.cmd 2007-07-10 12:49:16 UTC (rev 220) @@ -0,0 +1,7 @@ + + +set NATIVE_PROPERTIES_PATH=%1 + +copy %NATIVE_PROPERTIES_PATH% %S2DAOGEN_HOME%\build.properties + + Added: pompei/trunk/mydbflute/dbflute-0.5.2/etc/cmd/_copy-properties.sh =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/etc/cmd/_copy-properties.sh 2007-07-10 12:47:32 UTC (rev 219) +++ pompei/trunk/mydbflute/dbflute-0.5.2/etc/cmd/_copy-properties.sh 2007-07-10 12:49:16 UTC (rev 220) @@ -0,0 +1,7 @@ +#!/bin/sh + +NATIVE_PROPERTIES_PATH=$1 + +cp $NATIVE_PROPERTIES_PATH $S2DAOGEN_HOME/build.properties + + Added: pompei/trunk/mydbflute/dbflute-0.5.2/etc/cmd/_df-copy-properties.cmd =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/etc/cmd/_df-copy-properties.cmd 2007-07-10 12:47:32 UTC (rev 219) +++ pompei/trunk/mydbflute/dbflute-0.5.2/etc/cmd/_df-copy-properties.cmd 2007-07-10 12:49:16 UTC (rev 220) @@ -0,0 +1,5 @@ + +set NATIVE_PROPERTIES_PATH=%1 +echo %NATIVE_PROPERTIES_PATH% +echo %DBFLUTE_HOME% +copy %NATIVE_PROPERTIES_PATH% %DBFLUTE_HOME%\build.properties Added: pompei/trunk/mydbflute/dbflute-0.5.2/etc/cmd/_df-copy-properties.sh =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/etc/cmd/_df-copy-properties.sh 2007-07-10 12:47:32 UTC (rev 219) +++ pompei/trunk/mydbflute/dbflute-0.5.2/etc/cmd/_df-copy-properties.sh 2007-07-10 12:49:16 UTC (rev 220) @@ -0,0 +1,5 @@ +#!/bin/sh + +NATIVE_PROPERTIES_PATH=$1 + +cp $NATIVE_PROPERTIES_PATH $DBFLUTE_HOME/build.properties Added: pompei/trunk/mydbflute/dbflute-0.5.2/etc/cmd/_df-datadump.cmd =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/etc/cmd/_df-datadump.cmd 2007-07-10 12:47:32 UTC (rev 219) +++ pompei/trunk/mydbflute/dbflute-0.5.2/etc/cmd/_df-datadump.cmd 2007-07-10 12:49:16 UTC (rev 220) @@ -0,0 +1,8 @@ + + +set NATIVE_PROPERTIES_PATH=%1 + +call %DBFLUTE_HOME%\etc\cmd\_df-copy-properties.cmd %NATIVE_PROPERTIES_PATH% + +call ant -f %DBFLUTE_HOME%\build-torque.xml datadump + Added: pompei/trunk/mydbflute/dbflute-0.5.2/etc/cmd/_df-datadump.sh =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/etc/cmd/_df-datadump.sh 2007-07-10 12:47:32 UTC (rev 219) +++ pompei/trunk/mydbflute/dbflute-0.5.2/etc/cmd/_df-datadump.sh 2007-07-10 12:49:16 UTC (rev 220) @@ -0,0 +1,8 @@ +#!/bin/sh + +NATIVE_PROPERTIES_PATH=$1 + +sh $DBFLUTE_HOME/etc/cmd/_df-copy-properties.sh $NATIVE_PROPERTIES_PATH + +ant -f $DBFLUTE_HOME/build-torque.xml datadump + Added: pompei/trunk/mydbflute/dbflute-0.5.2/etc/cmd/_df-doc.cmd =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/etc/cmd/_df-doc.cmd 2007-07-10 12:47:32 UTC (rev 219) +++ pompei/trunk/mydbflute/dbflute-0.5.2/etc/cmd/_df-doc.cmd 2007-07-10 12:49:16 UTC (rev 220) @@ -0,0 +1,10 @@ + + +set NATIVE_PROPERTIES_PATH=%1 + +call %DBFLUTE_HOME%\etc\cmd\_df-copy-properties.cmd %NATIVE_PROPERTIES_PATH% + +call ant -f %DBFLUTE_HOME%\build-torque.xml doc + +mkdir .\output\doc +copy %DBFLUTE_HOME%\output\doc\project-schema-%MY_PROJECT_NAME%.html .\output\doc\project-schema-%MY_PROJECT_NAME%.html Added: pompei/trunk/mydbflute/dbflute-0.5.2/etc/cmd/_df-doc.sh =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/etc/cmd/_df-doc.sh 2007-07-10 12:47:32 UTC (rev 219) +++ pompei/trunk/mydbflute/dbflute-0.5.2/etc/cmd/_df-doc.sh 2007-07-10 12:49:16 UTC (rev 220) @@ -0,0 +1,10 @@ +#!/bin/sh + +NATIVE_PROPERTIES_PATH=$1 + +sh $DBFLUTE_HOME/etc/cmd/_df-copy-properties.sh $NATIVE_PROPERTIES_PATH + +ant -f $DBFLUTE_HOME/build-torque.xml doc + +mkdir ./output/doc +cp $DBFLUTE_HOME/output/doc/project-schema-${MY_PROJECT_NAME}.html ./output/doc/project-schema-${MY_PROJECT_NAME}.html Added: pompei/trunk/mydbflute/dbflute-0.5.2/etc/cmd/_df-generate.cmd =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/etc/cmd/_df-generate.cmd 2007-07-10 12:47:32 UTC (rev 219) +++ pompei/trunk/mydbflute/dbflute-0.5.2/etc/cmd/_df-generate.cmd 2007-07-10 12:49:16 UTC (rev 220) @@ -0,0 +1,10 @@ + + +set NATIVE_PROPERTIES_PATH=%1 + +call %DBFLUTE_HOME%\etc\cmd\_df-copy-properties.cmd %NATIVE_PROPERTIES_PATH% + +call ant -f %DBFLUTE_HOME%\build-torque.xml om + + + Added: pompei/trunk/mydbflute/dbflute-0.5.2/etc/cmd/_df-generate.sh =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/etc/cmd/_df-generate.sh 2007-07-10 12:47:32 UTC (rev 219) +++ pompei/trunk/mydbflute/dbflute-0.5.2/etc/cmd/_df-generate.sh 2007-07-10 12:49:16 UTC (rev 220) @@ -0,0 +1,10 @@ +#!/bin/sh + +NATIVE_PROPERTIES_PATH=$1 + +sh $DBFLUTE_HOME/etc/cmd/_df-copy-properties.sh $NATIVE_PROPERTIES_PATH + +ant -f $DBFLUTE_HOME/build-torque.xml om + + + Added: pompei/trunk/mydbflute/dbflute-0.5.2/etc/cmd/_df-invoke-replace-schema.cmd =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/etc/cmd/_df-invoke-replace-schema.cmd 2007-07-10 12:47:32 UTC (rev 219) +++ pompei/trunk/mydbflute/dbflute-0.5.2/etc/cmd/_df-invoke-replace-schema.cmd 2007-07-10 12:49:16 UTC (rev 220) @@ -0,0 +1,8 @@ + + +set NATIVE_PROPERTIES_PATH=%1 + +call %DBFLUTE_HOME%\etc\cmd\_df-copy-properties.cmd %NATIVE_PROPERTIES_PATH% + +call ant -f %DBFLUTE_HOME%\build-torque.xml replace-schema + Added: pompei/trunk/mydbflute/dbflute-0.5.2/etc/cmd/_df-invoke-replace-schema.sh =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/etc/cmd/_df-invoke-replace-schema.sh 2007-07-10 12:47:32 UTC (rev 219) +++ pompei/trunk/mydbflute/dbflute-0.5.2/etc/cmd/_df-invoke-replace-schema.sh 2007-07-10 12:49:16 UTC (rev 220) @@ -0,0 +1,8 @@ +#!/bin/sh + +NATIVE_PROPERTIES_PATH=$1 + +sh $DBFLUTE_HOME/etc/cmd/_df-copy-properties.sh $NATIVE_PROPERTIES_PATH + +ant -f $DBFLUTE_HOME/build-torque.xml replace-schema + Added: pompei/trunk/mydbflute/dbflute-0.5.2/etc/cmd/_df-invoke-sql-directory.cmd =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/etc/cmd/_df-invoke-sql-directory.cmd 2007-07-10 12:47:32 UTC (rev 219) +++ pompei/trunk/mydbflute/dbflute-0.5.2/etc/cmd/_df-invoke-sql-directory.cmd 2007-07-10 12:49:16 UTC (rev 220) @@ -0,0 +1,8 @@ + + +set NATIVE_PROPERTIES_PATH=%1 + +call %DBFLUTE_HOME%\etc\cmd\_df-copy-properties.cmd %NATIVE_PROPERTIES_PATH% + +call ant -f %DBFLUTE_HOME%\build-torque.xml invoke-sql-directory + Added: pompei/trunk/mydbflute/dbflute-0.5.2/etc/cmd/_df-invoke-sql-directory.sh =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/etc/cmd/_df-invoke-sql-directory.sh 2007-07-10 12:47:32 UTC (rev 219) +++ pompei/trunk/mydbflute/dbflute-0.5.2/etc/cmd/_df-invoke-sql-directory.sh 2007-07-10 12:49:16 UTC (rev 220) @@ -0,0 +1,8 @@ +#!/bin/sh + +NATIVE_PROPERTIES_PATH=$1 + +sh $DBFLUTE_HOME/etc/cmd/_df-copy-properties.sh $NATIVE_PROPERTIES_PATH + +ant -f $DBFLUTE_HOME/build-torque.xml invoke-sql-directory + Added: pompei/trunk/mydbflute/dbflute-0.5.2/etc/cmd/_df-jdbc.cmd =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/etc/cmd/_df-jdbc.cmd 2007-07-10 12:47:32 UTC (rev 219) +++ pompei/trunk/mydbflute/dbflute-0.5.2/etc/cmd/_df-jdbc.cmd 2007-07-10 12:49:16 UTC (rev 220) @@ -0,0 +1,9 @@ +set NATIVE_PROPERTIES_PATH=%1 + +call %DBFLUTE_HOME%\etc\cmd\_df-copy-properties.cmd %NATIVE_PROPERTIES_PATH% + +echo checkpoint + +call ant -f %DBFLUTE_HOME%\build-torque.xml jdbc + +copy .\schema\project-schema-%MY_PROJECT_NAME%.xml %DBFLUTE_HOME%\schema\project-schema-%MY_PROJECT_NAME%.xml Added: pompei/trunk/mydbflute/dbflute-0.5.2/etc/cmd/_df-jdbc.sh =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/etc/cmd/_df-jdbc.sh 2007-07-10 12:47:32 UTC (rev 219) +++ pompei/trunk/mydbflute/dbflute-0.5.2/etc/cmd/_df-jdbc.sh 2007-07-10 12:49:16 UTC (rev 220) @@ -0,0 +1,9 @@ +#!/bin/sh + +NATIVE_PROPERTIES_PATH=$1 + +sh $DBFLUTE_HOME/etc/cmd/_df-copy-properties.sh $NATIVE_PROPERTIES_PATH + +ant -f $DBFLUTE_HOME/build-torque.xml jdbc + +cp ./schema/project-schema-${MY_PROJECT_NAME}.xml $DBFLUTE_HOME/schema/project-schema-${MY_PROJECT_NAME}.xml Added: pompei/trunk/mydbflute/dbflute-0.5.2/etc/cmd/_df-outside-sql-test.cmd =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/etc/cmd/_df-outside-sql-test.cmd 2007-07-10 12:47:32 UTC (rev 219) +++ pompei/trunk/mydbflute/dbflute-0.5.2/etc/cmd/_df-outside-sql-test.cmd 2007-07-10 12:49:16 UTC (rev 220) @@ -0,0 +1,8 @@ + + +set NATIVE_PROPERTIES_PATH=%1 + +call %DBFLUTE_HOME%\etc\cmd\_df-copy-properties.cmd %NATIVE_PROPERTIES_PATH% + +call ant -f %DBFLUTE_HOME%\build-torque.xml outside-sql-test + Added: pompei/trunk/mydbflute/dbflute-0.5.2/etc/cmd/_df-outside-sql-test.sh =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/etc/cmd/_df-outside-sql-test.sh 2007-07-10 12:47:32 UTC (rev 219) +++ pompei/trunk/mydbflute/dbflute-0.5.2/etc/cmd/_df-outside-sql-test.sh 2007-07-10 12:49:16 UTC (rev 220) @@ -0,0 +1,8 @@ +#!/bin/sh + +NATIVE_PROPERTIES_PATH=$1 + +sh $DBFLUTE_HOME/etc/cmd/_df-copy-properties.sh $NATIVE_PROPERTIES_PATH + +ant -f $DBFLUTE_HOME/build-torque.xml outside-sql-test + Added: pompei/trunk/mydbflute/dbflute-0.5.2/etc/cmd/_df-playsql.cmd =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/etc/cmd/_df-playsql.cmd 2007-07-10 12:47:32 UTC (rev 219) +++ pompei/trunk/mydbflute/dbflute-0.5.2/etc/cmd/_df-playsql.cmd 2007-07-10 12:49:16 UTC (rev 220) @@ -0,0 +1,10 @@ + + +set NATIVE_PROPERTIES_PATH=%1 + +call %DBFLUTE_HOME%\etc\cmd\_df-copy-properties.cmd %NATIVE_PROPERTIES_PATH% + +copy .\playsql\playsql-%MY_PROJECT_NAME%.sql %DBFLUTE_HOME%\playsql\playsql-%MY_PROJECT_NAME%.sql + +call ant -f %DBFLUTE_HOME%\build-torque.xml playsql + Added: pompei/trunk/mydbflute/dbflute-0.5.2/etc/cmd/_df-playsql.sh =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/etc/cmd/_df-playsql.sh 2007-07-10 12:47:32 UTC (rev 219) +++ pompei/trunk/mydbflute/dbflute-0.5.2/etc/cmd/_df-playsql.sh 2007-07-10 12:49:16 UTC (rev 220) @@ -0,0 +1,10 @@ +#!/bin/sh + +NATIVE_PROPERTIES_PATH=$1 + +sh $DBFLUTE_HOME/etc/cmd/_df-copy-properties.sh $NATIVE_PROPERTIES_PATH + +cp ./playsql/playsql-${MY_PROJECT_NAME}.sql $DBFLUTE_HOME/playsql/playsql-${MY_PROJECT_NAME}.sql + +ant -f $DBFLUTE_HOME/build-torque.xml playsql + Added: pompei/trunk/mydbflute/dbflute-0.5.2/etc/cmd/_df-replace-schema.cmd =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/etc/cmd/_df-replace-schema.cmd 2007-07-10 12:47:32 UTC (rev 219) +++ pompei/trunk/mydbflute/dbflute-0.5.2/etc/cmd/_df-replace-schema.cmd 2007-07-10 12:49:16 UTC (rev 220) @@ -0,0 +1,9 @@ + + +set NATIVE_PROPERTIES_PATH=%1 + +call %DBFLUTE_HOME%\etc\cmd\_df-copy-properties.cmd %NATIVE_PROPERTIES_PATH% + +SET /P answer=Database will be initialized. Are you ready??y/n? +IF "%answer%"=="y" call ant -f %DBFLUTE_HOME%\build-torque.xml replace-schema + Added: pompei/trunk/mydbflute/dbflute-0.5.2/etc/cmd/_df-replace-schema.sh =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/etc/cmd/_df-replace-schema.sh 2007-07-10 12:47:32 UTC (rev 219) +++ pompei/trunk/mydbflute/dbflute-0.5.2/etc/cmd/_df-replace-schema.sh 2007-07-10 12:49:16 UTC (rev 220) @@ -0,0 +1,12 @@ +#!/bin/sh + +NATIVE_PROPERTIES_PATH=$1 + +sh $DBFLUTE_HOME/etc/cmd/_df-copy-properties.sh $NATIVE_PROPERTIES_PATH + +# {From Mr.Akikusa} +read -p "Database will be initialized. Are you ready??y/n?" answer +if [ $answer = "y" ] ;then + ant -f $DBFLUTE_HOME/build-torque.xml replace-schema +fi + Added: pompei/trunk/mydbflute/dbflute-0.5.2/etc/cmd/_df-sql2entity.cmd =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/etc/cmd/_df-sql2entity.cmd 2007-07-10 12:47:32 UTC (rev 219) +++ pompei/trunk/mydbflute/dbflute-0.5.2/etc/cmd/_df-sql2entity.cmd 2007-07-10 12:49:16 UTC (rev 220) @@ -0,0 +1,8 @@ + + +set NATIVE_PROPERTIES_PATH=%1 + +call %DBFLUTE_HOME%\etc\cmd\_df-copy-properties.cmd %NATIVE_PROPERTIES_PATH% + +call ant -f %DBFLUTE_HOME%\build-torque.xml sql2entity + Added: pompei/trunk/mydbflute/dbflute-0.5.2/etc/cmd/_df-sql2entity.sh =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/etc/cmd/_df-sql2entity.sh 2007-07-10 12:47:32 UTC (rev 219) +++ pompei/trunk/mydbflute/dbflute-0.5.2/etc/cmd/_df-sql2entity.sh 2007-07-10 12:49:16 UTC (rev 220) @@ -0,0 +1,8 @@ +#!/bin/sh + +NATIVE_PROPERTIES_PATH=$1 + +sh $DBFLUTE_HOME/etc/cmd/_df-copy-properties.sh $NATIVE_PROPERTIES_PATH + +ant -f $DBFLUTE_HOME/build-torque.xml sql2entity + From svnnotify △ sourceforge.jp Tue Jul 10 21:55:48 2007 From: svnnotify △ sourceforge.jp (svnnotify △ sourceforge.jp) Date: Tue, 10 Jul 2007 21:55:48 +0900 Subject: [pal-cvs 2489] [221] added mydbflute Message-ID: <20070710125548.238732AC010@users.sourceforge.jp> Revision: 221 http://svn.sourceforge.jp/cgi-bin/viewcvs.cgi?root=pal&view=rev&rev=221 Author: takeharu Date: 2007-07-10 21:55:47 +0900 (Tue, 10 Jul 2007) Log Message: ----------- added mydbflute Added Paths: ----------- pompei/trunk/mydbflute/dbflute-0.5.2/log/ pompei/trunk/mydbflute/dbflute-0.5.2/log/readme.txt -------------- next part -------------- Added: pompei/trunk/mydbflute/dbflute-0.5.2/log/readme.txt =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/log/readme.txt 2007-07-10 12:49:16 UTC (rev 220) +++ pompei/trunk/mydbflute/dbflute-0.5.2/log/readme.txt 2007-07-10 12:55:47 UTC (rev 221) @@ -0,0 +1 @@ +Directory for LogFile From svnnotify △ sourceforge.jp Tue Jul 10 21:56:09 2007 From: svnnotify △ sourceforge.jp (svnnotify △ sourceforge.jp) Date: Tue, 10 Jul 2007 21:56:09 +0900 Subject: [pal-cvs 2490] [222] added mydbflute Message-ID: <20070710125609.0FD7B2AC02E@users.sourceforge.jp> Revision: 222 http://svn.sourceforge.jp/cgi-bin/viewcvs.cgi?root=pal&view=rev&rev=222 Author: takeharu Date: 2007-07-10 21:56:08 +0900 (Tue, 10 Jul 2007) Log Message: ----------- added mydbflute Added Paths: ----------- pompei/trunk/mydbflute/dbflute-0.5.2/output/ pompei/trunk/mydbflute/dbflute-0.5.2/output/doc/ pompei/trunk/mydbflute/dbflute-0.5.2/output/doc/readme.txt -------------- next part -------------- Added: pompei/trunk/mydbflute/dbflute-0.5.2/output/doc/readme.txt =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/output/doc/readme.txt 2007-07-10 12:55:47 UTC (rev 221) +++ pompei/trunk/mydbflute/dbflute-0.5.2/output/doc/readme.txt 2007-07-10 12:56:08 UTC (rev 222) @@ -0,0 +1 @@ +Directory for Document From svnnotify △ sourceforge.jp Tue Jul 10 21:56:50 2007 From: svnnotify △ sourceforge.jp (svnnotify △ sourceforge.jp) Date: Tue, 10 Jul 2007 21:56:50 +0900 Subject: [pal-cvs 2491] [223] added mydbflute Message-ID: <20070710125650.E1E982AC010@users.sourceforge.jp> Revision: 223 http://svn.sourceforge.jp/cgi-bin/viewcvs.cgi?root=pal&view=rev&rev=223 Author: takeharu Date: 2007-07-10 21:56:50 +0900 (Tue, 10 Jul 2007) Log Message: ----------- added mydbflute Added Paths: ----------- pompei/trunk/mydbflute/dbflute-0.5.2/schema/ pompei/trunk/mydbflute/dbflute-0.5.2/schema/project-schema-n2commerce.xml pompei/trunk/mydbflute/dbflute-0.5.2/schema/project-schema-pompei.xml pompei/trunk/mydbflute/dbflute-0.5.2/schema/readme.txt -------------- next part -------------- Added: pompei/trunk/mydbflute/dbflute-0.5.2/schema/project-schema-n2commerce.xml =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/schema/project-schema-n2commerce.xml 2007-07-10 12:56:08 UTC (rev 222) +++ pompei/trunk/mydbflute/dbflute-0.5.2/schema/project-schema-n2commerce.xml 2007-07-10 12:56:50 UTC (rev 223) @@ -0,0 +1,723 @@ + + + + + + + + + + + + + + + + + + +
+ + + + +
+ + + + + + + + + + + + + +
+ + + + + + +
+ + + + + + + +
+ + + + +
+ + + + + + + + + + + + +
+ + + + + + +
+ + + +
+ + + +
+ + + + + + +
+ + + + + + + + + + + +
+ + + + + + + + + + + + +
+ + + + + + + +
+ + + + + + + +
+ + + + + + +
+ + + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + +
+ + + + + + + + +
+ + + + + + + +
+ + + + +
+ + + + + + + +
+ + + + + + + + + + + + + + +
+ + + + + + + +
+ + + + + +
+ + + + + + + +
+ + + + +
+ + + + +
+ + + + +
+ + + + +
+ + + +
+ + + + + + + + + +
+ + + + +
+ + + + +
+ + + + + + + + + +
+ + + + + + +
+ + + + + + + + + +
+ + + + + + + + +
+ + + + + +
+ + + + + + + +
+
Added: pompei/trunk/mydbflute/dbflute-0.5.2/schema/project-schema-pompei.xml =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/schema/project-schema-pompei.xml 2007-07-10 12:56:08 UTC (rev 222) +++ pompei/trunk/mydbflute/dbflute-0.5.2/schema/project-schema-pompei.xml 2007-07-10 12:56:50 UTC (rev 223) @@ -0,0 +1,752 @@ + + + + + + + + + + + + + + + + + + +
+ + + + +
+ + + + + + + + + + + + + +
+ + + + + + +
+ + + + + + + +
+ + + + +
+ + + + + + + + + + + + +
+ + + + + + +
+ + + +
+ + + +
+ + + + + + +
+ + + + + + + + + + + +
+ + + + + + + + + + + + +
+ + + + + + + +
+ + + + + + +
+ + + + + + + +
+ + + + + + +
+ + + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + +
+ + + + + + + + +
+ + + + + + + +
+ + + + +
+ + + + + + + +
+ + + + + + + + +
+ + + + + + + + + + + + + + +
+ + + + + + + +
+ + + + + +
+ + + + + + + +
+ + + + +
+ + + + +
+ + + + +
+ + + + +
+ + + +
+ + + + + + + + + +
+ + + + +
+ + + + +
+ + + + + + + + + +
+ + + + + + +
+ + + + + + + + + +
+ + + + + + + + +
+ + + + + +
+ + + + + + + +
+
Added: pompei/trunk/mydbflute/dbflute-0.5.2/schema/readme.txt =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/schema/readme.txt 2007-07-10 12:56:08 UTC (rev 222) +++ pompei/trunk/mydbflute/dbflute-0.5.2/schema/readme.txt 2007-07-10 12:56:50 UTC (rev 223) @@ -0,0 +1 @@ +Directory for SchemaFile From svnnotify △ sourceforge.jp Tue Jul 10 22:00:04 2007 From: svnnotify △ sourceforge.jp (svnnotify △ sourceforge.jp) Date: Tue, 10 Jul 2007 22:00:04 +0900 Subject: [pal-cvs 2492] [224] added mydbflute Message-ID: <20070710130006.463B82AC010@users.sourceforge.jp> Revision: 224 http://svn.sourceforge.jp/cgi-bin/viewcvs.cgi?root=pal&view=rev&rev=224 Author: takeharu Date: 2007-07-10 21:57:38 +0900 (Tue, 10 Jul 2007) Log Message: ----------- added mydbflute Added Paths: ----------- pompei/trunk/mydbflute/dbflute-0.5.2/lib/ pompei/trunk/mydbflute/dbflute-0.5.2/lib/forExecute/ pompei/trunk/mydbflute/dbflute-0.5.2/lib/forExecute/aopalliance-1.0.jar pompei/trunk/mydbflute/dbflute-0.5.2/lib/forExecute/commons-beanutils-1.6.1.jar pompei/trunk/mydbflute/dbflute-0.5.2/lib/forExecute/commons-collections-2.1.jar pompei/trunk/mydbflute/dbflute-0.5.2/lib/forExecute/commons-configuration-1.0-dev-3.20030607.194155.jar pompei/trunk/mydbflute/dbflute-0.5.2/lib/forExecute/commons-dbcp-20030825.184428.jar pompei/trunk/mydbflute/dbflute-0.5.2/lib/forExecute/commons-lang-1.0.1.jar pompei/trunk/mydbflute/dbflute-0.5.2/lib/forExecute/commons-logging-1.1.jar pompei/trunk/mydbflute/dbflute-0.5.2/lib/forExecute/commons-pool-20030825.183949.jar pompei/trunk/mydbflute/dbflute-0.5.2/lib/forExecute/db2java.zip pompei/trunk/mydbflute/dbflute-0.5.2/lib/forExecute/dbflute.jar pompei/trunk/mydbflute/dbflute-0.5.2/lib/forExecute/derby.jar pompei/trunk/mydbflute/dbflute-0.5.2/lib/forExecute/h2-2007-04-29.jar pompei/trunk/mydbflute/dbflute-0.5.2/lib/forExecute/javassist-3.4.ga.jar pompei/trunk/mydbflute/dbflute-0.5.2/lib/forExecute/jaybird-full-2.0.1.jar pompei/trunk/mydbflute/dbflute-0.5.2/lib/forExecute/jconn2.jar pompei/trunk/mydbflute/dbflute-0.5.2/lib/forExecute/jconn3.jar pompei/trunk/mydbflute/dbflute-0.5.2/lib/forExecute/log4j-1.2.13.jar pompei/trunk/mydbflute/dbflute-0.5.2/lib/forExecute/mysql-connector-java-5.0.4-bin.jar pompei/trunk/mydbflute/dbflute-0.5.2/lib/forExecute/ognl-2.6.7.jar pompei/trunk/mydbflute/dbflute-0.5.2/lib/forExecute/ojdbc14.jar pompei/trunk/mydbflute/dbflute-0.5.2/lib/forExecute/poi-2.5.1-final-20040804.jar pompei/trunk/mydbflute/dbflute-0.5.2/lib/forExecute/postgresql-8.1-407.jdbc3.jar pompei/trunk/mydbflute/dbflute-0.5.2/lib/forExecute/s2-extension-2.4.12.jar pompei/trunk/mydbflute/dbflute-0.5.2/lib/forExecute/s2-framework-2.4.12.jar pompei/trunk/mydbflute/dbflute-0.5.2/lib/forExecute/sqljdbc.jar pompei/trunk/mydbflute/dbflute-0.5.2/lib/forExecute/velocity-1.3.1.jar pompei/trunk/mydbflute/dbflute-0.5.2/lib/forExecute/village-2.0-dev-20030825.jar -------------- next part -------------- Added: pompei/trunk/mydbflute/dbflute-0.5.2/lib/forExecute/aopalliance-1.0.jar =================================================================== (Binary files differ) Property changes on: pompei/trunk/mydbflute/dbflute-0.5.2/lib/forExecute/aopalliance-1.0.jar ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: pompei/trunk/mydbflute/dbflute-0.5.2/lib/forExecute/commons-beanutils-1.6.1.jar =================================================================== (Binary files differ) Property changes on: pompei/trunk/mydbflute/dbflute-0.5.2/lib/forExecute/commons-beanutils-1.6.1.jar ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: pompei/trunk/mydbflute/dbflute-0.5.2/lib/forExecute/commons-collections-2.1.jar =================================================================== (Binary files differ) Property changes on: pompei/trunk/mydbflute/dbflute-0.5.2/lib/forExecute/commons-collections-2.1.jar ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: pompei/trunk/mydbflute/dbflute-0.5.2/lib/forExecute/commons-configuration-1.0-dev-3.20030607.194155.jar =================================================================== (Binary files differ) Property changes on: pompei/trunk/mydbflute/dbflute-0.5.2/lib/forExecute/commons-configuration-1.0-dev-3.20030607.194155.jar ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: pompei/trunk/mydbflute/dbflute-0.5.2/lib/forExecute/commons-dbcp-20030825.184428.jar =================================================================== (Binary files differ) Property changes on: pompei/trunk/mydbflute/dbflute-0.5.2/lib/forExecute/commons-dbcp-20030825.184428.jar ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: pompei/trunk/mydbflute/dbflute-0.5.2/lib/forExecute/commons-lang-1.0.1.jar =================================================================== (Binary files differ) Property changes on: pompei/trunk/mydbflute/dbflute-0.5.2/lib/forExecute/commons-lang-1.0.1.jar ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: pompei/trunk/mydbflute/dbflute-0.5.2/lib/forExecute/commons-logging-1.1.jar =================================================================== (Binary files differ) Property changes on: pompei/trunk/mydbflute/dbflute-0.5.2/lib/forExecute/commons-logging-1.1.jar ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: pompei/trunk/mydbflute/dbflute-0.5.2/lib/forExecute/commons-pool-20030825.183949.jar =================================================================== (Binary files differ) Property changes on: pompei/trunk/mydbflute/dbflute-0.5.2/lib/forExecute/commons-pool-20030825.183949.jar ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: pompei/trunk/mydbflute/dbflute-0.5.2/lib/forExecute/db2java.zip =================================================================== (Binary files differ) Property changes on: pompei/trunk/mydbflute/dbflute-0.5.2/lib/forExecute/db2java.zip ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: pompei/trunk/mydbflute/dbflute-0.5.2/lib/forExecute/dbflute.jar =================================================================== (Binary files differ) Property changes on: pompei/trunk/mydbflute/dbflute-0.5.2/lib/forExecute/dbflute.jar ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: pompei/trunk/mydbflute/dbflute-0.5.2/lib/forExecute/derby.jar =================================================================== (Binary files differ) Property changes on: pompei/trunk/mydbflute/dbflute-0.5.2/lib/forExecute/derby.jar ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: pompei/trunk/mydbflute/dbflute-0.5.2/lib/forExecute/h2-2007-04-29.jar =================================================================== (Binary files differ) Property changes on: pompei/trunk/mydbflute/dbflute-0.5.2/lib/forExecute/h2-2007-04-29.jar ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: pompei/trunk/mydbflute/dbflute-0.5.2/lib/forExecute/javassist-3.4.ga.jar =================================================================== (Binary files differ) Property changes on: pompei/trunk/mydbflute/dbflute-0.5.2/lib/forExecute/javassist-3.4.ga.jar ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: pompei/trunk/mydbflute/dbflute-0.5.2/lib/forExecute/jaybird-full-2.0.1.jar =================================================================== (Binary files differ) Property changes on: pompei/trunk/mydbflute/dbflute-0.5.2/lib/forExecute/jaybird-full-2.0.1.jar ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: pompei/trunk/mydbflute/dbflute-0.5.2/lib/forExecute/jconn2.jar =================================================================== (Binary files differ) Property changes on: pompei/trunk/mydbflute/dbflute-0.5.2/lib/forExecute/jconn2.jar ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: pompei/trunk/mydbflute/dbflute-0.5.2/lib/forExecute/jconn3.jar =================================================================== (Binary files differ) Property changes on: pompei/trunk/mydbflute/dbflute-0.5.2/lib/forExecute/jconn3.jar ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: pompei/trunk/mydbflute/dbflute-0.5.2/lib/forExecute/log4j-1.2.13.jar =================================================================== (Binary files differ) Property changes on: pompei/trunk/mydbflute/dbflute-0.5.2/lib/forExecute/log4j-1.2.13.jar ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: pompei/trunk/mydbflute/dbflute-0.5.2/lib/forExecute/mysql-connector-java-5.0.4-bin.jar =================================================================== (Binary files differ) Property changes on: pompei/trunk/mydbflute/dbflute-0.5.2/lib/forExecute/mysql-connector-java-5.0.4-bin.jar ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: pompei/trunk/mydbflute/dbflute-0.5.2/lib/forExecute/ognl-2.6.7.jar =================================================================== (Binary files differ) Property changes on: pompei/trunk/mydbflute/dbflute-0.5.2/lib/forExecute/ognl-2.6.7.jar ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: pompei/trunk/mydbflute/dbflute-0.5.2/lib/forExecute/ojdbc14.jar =================================================================== (Binary files differ) Property changes on: pompei/trunk/mydbflute/dbflute-0.5.2/lib/forExecute/ojdbc14.jar ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: pompei/trunk/mydbflute/dbflute-0.5.2/lib/forExecute/poi-2.5.1-final-20040804.jar =================================================================== (Binary files differ) Property changes on: pompei/trunk/mydbflute/dbflute-0.5.2/lib/forExecute/poi-2.5.1-final-20040804.jar ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: pompei/trunk/mydbflute/dbflute-0.5.2/lib/forExecute/postgresql-8.1-407.jdbc3.jar =================================================================== (Binary files differ) Property changes on: pompei/trunk/mydbflute/dbflute-0.5.2/lib/forExecute/postgresql-8.1-407.jdbc3.jar ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: pompei/trunk/mydbflute/dbflute-0.5.2/lib/forExecute/s2-extension-2.4.12.jar =================================================================== (Binary files differ) Property changes on: pompei/trunk/mydbflute/dbflute-0.5.2/lib/forExecute/s2-extension-2.4.12.jar ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: pompei/trunk/mydbflute/dbflute-0.5.2/lib/forExecute/s2-framework-2.4.12.jar =================================================================== (Binary files differ) Property changes on: pompei/trunk/mydbflute/dbflute-0.5.2/lib/forExecute/s2-framework-2.4.12.jar ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: pompei/trunk/mydbflute/dbflute-0.5.2/lib/forExecute/sqljdbc.jar =================================================================== (Binary files differ) Property changes on: pompei/trunk/mydbflute/dbflute-0.5.2/lib/forExecute/sqljdbc.jar ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: pompei/trunk/mydbflute/dbflute-0.5.2/lib/forExecute/velocity-1.3.1.jar =================================================================== (Binary files differ) Property changes on: pompei/trunk/mydbflute/dbflute-0.5.2/lib/forExecute/velocity-1.3.1.jar ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: pompei/trunk/mydbflute/dbflute-0.5.2/lib/forExecute/village-2.0-dev-20030825.jar =================================================================== (Binary files differ) Property changes on: pompei/trunk/mydbflute/dbflute-0.5.2/lib/forExecute/village-2.0-dev-20030825.jar ___________________________________________________________________ Name: svn:mime-type + application/octet-stream From svnnotify △ sourceforge.jp Tue Jul 10 22:05:11 2007 From: svnnotify △ sourceforge.jp (svnnotify △ sourceforge.jp) Date: Tue, 10 Jul 2007 22:05:11 +0900 Subject: [pal-cvs 2493] [225] added mydbflute Message-ID: <20070710130511.71E002AC031@users.sourceforge.jp> Revision: 225 http://svn.sourceforge.jp/cgi-bin/viewcvs.cgi?root=pal&view=rev&rev=225 Author: takeharu Date: 2007-07-10 22:01:46 +0900 (Tue, 10 Jul 2007) Log Message: ----------- added mydbflute Added Paths: ----------- pompei/trunk/mydbflute/dbflute-0.5.2/templates/ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/ojb/ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/ojb/model/ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/ojb/model/Control.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/ojb/model/Object.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/ojb/model_broken/ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/ojb/model_broken/Control.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/ojb/model_broken/ExtensionInterface.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/ojb/model_broken/ExtensionObject.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/ojb/model_broken/ExtensionProxyInterface.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/ojb/model_broken/Interface.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/ojb/model_broken/Object.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/ojb/model_broken/ProxyInterface.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/ojb/repository/ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/ojb/repository/Control.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/ojb/repository/MainRepository.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/ojb/repository/Repository.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/Control.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/axion/ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/axion/columns.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/axion/db.props pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/axion/drop.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/axion/foreignkey.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/axion/index.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/axion/primarykey.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/axion/table.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/axion/tablefk.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/axion/unique.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/cloudscape/ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/cloudscape/columns.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/cloudscape/db.props pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/cloudscape/drop.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/cloudscape/foreignkey.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/cloudscape/index.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/cloudscape/primarykey.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/cloudscape/table.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/cloudscape/tablefk.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/cloudscape/unique.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/db2/ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/db2/columns.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/db2/db.props pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/db2/drop.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/db2/foreignkey.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/db2/index.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/db2/primarykey.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/db2/sequence.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/db2/table.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/db2/tablefk.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/db2/unique.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/db2400/ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/db2400/columns.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/db2400/db.props pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/db2400/drop.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/db2400/foreignkey.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/db2400/index.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/db2400/primarykey.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/db2400/sequence.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/db2400/table.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/db2400/tablefk.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/db2400/unique.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/derby/ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/derby/columns.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/derby/db.props pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/derby/drop.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/derby/foreignkey.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/derby/index.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/derby/primarykey.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/derby/table.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/derby/tablefk.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/derby/unique.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/firebird/ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/firebird/columns.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/firebird/db.props pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/firebird/drop.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/firebird/foreignkey.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/firebird/index.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/firebird/primarykey.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/firebird/table.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/firebird/tablefk.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/firebird/unique.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/hypersonic/ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/hypersonic/columns.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/hypersonic/db.props pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/hypersonic/drop.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/hypersonic/foreignkey.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/hypersonic/index.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/hypersonic/primarykey.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/hypersonic/table.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/hypersonic/tablefk.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/hypersonic/unique.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/interbase/ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/interbase/columns.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/interbase/db.props pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/interbase/drop.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/interbase/foreignkey.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/interbase/index.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/interbase/primarykey.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/interbase/table.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/interbase/tablefk.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/interbase/unique.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/msaccess/ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/msaccess/columns.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/msaccess/db.props pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/msaccess/drop.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/msaccess/foreignkey.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/msaccess/index.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/msaccess/primarykey.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/msaccess/table.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/msaccess/tablefk.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/msaccess/unique.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/mssql/ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/mssql/columns.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/mssql/db.props pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/mssql/drop.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/mssql/foreignkey.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/mssql/index.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/mssql/primarykey.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/mssql/table.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/mssql/tablefk.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/mssql/unique.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/mysql/ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/mysql/columns.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/mysql/db.props pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/mysql/drop.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/mysql/foreignkey.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/mysql/index.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/mysql/primarykey.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/mysql/table.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/mysql/tablefk.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/mysql/unique.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/oracle/ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/oracle/columns.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/oracle/db.props pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/oracle/drop.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/oracle/foreignkey.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/oracle/index.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/oracle/primarykey.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/oracle/sequence.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/oracle/table.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/oracle/tablefk.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/oracle/unique.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/postgresql/ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/postgresql/columns.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/postgresql/db.props pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/postgresql/drop.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/postgresql/foreignkey.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/postgresql/index.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/postgresql/primarykey.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/postgresql/sequence.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/postgresql/table.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/postgresql/tablefk.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/postgresql/unique.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/sapdb/ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/sapdb/columns.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/sapdb/db.props pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/sapdb/drop.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/sapdb/foreignkey.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/sapdb/index.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/sapdb/primarykey.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/sapdb/sequence.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/sapdb/table.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/sapdb/tablefk.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/sapdb/unique.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/sybase/ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/sybase/columns.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/sybase/db.props pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/sybase/drop.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/sybase/foreignkey.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/sybase/index.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/sybase/primarykey.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/sybase/table.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/sybase/tablefk.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/sybase/unique.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/db-init/ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/db-init/Control.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/db-init/axion/ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/db-init/axion/createdb.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/db-init/db2400/ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/db-init/db2400/createdb.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/db-init/hypersonic/ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/db-init/hypersonic/createdb.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/db-init/mssql/ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/db-init/mssql/createdb.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/db-init/mysql/ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/db-init/mysql/createdb.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/db-init/oracle/ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/db-init/oracle/createdb.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/db-init/postgresql/ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/db-init/postgresql/createdb.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/db-init/sapdb/ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/db-init/sapdb/createdb.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/db-init/sybase/ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/db-init/sybase/createdb.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/id-table/ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/id-table/Control.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/id-table/idtable.axion pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/id-table/idtable.cloudscape pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/id-table/idtable.db2 pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/id-table/idtable.db2400 pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/id-table/idtable.hypersonic pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/id-table/idtable.interbase pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/id-table/idtable.mssql pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/id-table/idtable.mysql pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/id-table/idtable.oracle pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/id-table/idtable.postgresql pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/id-table/idtable.sapdb pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/id-table/idtable.sybase pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/id-table/scheduler.props pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/id-table/turbine.props pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/load/ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/load/Control.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/load/axion/ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/load/axion/row.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/load/axion/val.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/load/db2/ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/load/db2/row.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/load/db2/val.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/load/db2400/ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/load/db2400/row.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/load/db2400/val.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/load/hypersonic/ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/load/hypersonic/row.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/load/hypersonic/val.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/load/msaccess/ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/load/msaccess/row.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/load/msaccess/val.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/load/mssql/ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/load/mssql/row.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/load/mssql/val.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/load/mysql/ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/load/mysql/row.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/load/mysql/val.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/load/oracle/ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/load/oracle/row.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/load/oracle/val.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/load/postgresql/ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/load/postgresql/row.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/load/postgresql/val.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/load/sapdb/ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/load/sapdb/row.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/load/sapdb/val.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/load/sybase/ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/load/sybase/row.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/load/sybase/val.vm -------------- next part -------------- Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/ojb/model/Control.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/ojb/model/Control.vm 2007-07-10 12:57:38 UTC (rev 224) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/ojb/model/Control.vm 2007-07-10 13:01:46 UTC (rev 225) @@ -0,0 +1,26 @@ +#set ($basePath = $generator.OutputPath) + +#foreach ($dataModel in $dataModels) + #foreach ($database in $dataModel.Databases) + + #if ($database.Package) + #set ($package = $database.Package) + #else + #set ($package = $targetPackage) + #end + + #set ( $path = $strings.getPackageAsPath($package) ) + $files.mkdir("$outputDirectory/$path") + + #foreach ($tbl in $database.Tables) + #if (!$tbl.isForReferenceOnly()) + $tbl.Name + #set ( $firstcap=$tbl.JavaName ) + + #set ( $fname = "${firstcap}.java" ) + #set ( $path = "${strings.getPackageAsPath($package)}$fname" ) + $generator.parse("ojb/model/Object.vm",$path,"table",$tbl) + #end + #end + #end +#end Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/ojb/model/Object.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/ojb/model/Object.vm 2007-07-10 12:57:38 UTC (rev 224) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/ojb/model/Object.vm 2007-07-10 13:01:46 UTC (rev 225) @@ -0,0 +1,47 @@ +package ${package}; + +#if ($table.BaseClass) + #set ($extendsBaseClass = "extends $table.BaseClass" ) +#else + #set ($extendsBaseClass = "" ) +#end + +import java.io.Serializable; +import java.util.Date; +import java.math.BigDecimal; + +/** + * ${table.JavaName} +#if ($addTimeStamp) + * This class was autogenerated by Torque on: + * + * [$now] + * +#end + */ +public class ${table.JavaName} +{ + #foreach ($col in $table.Columns) + private $col.JavaPrimitive $col.UncapitalisedJavaName; + #end + + #foreach ($col in $table.Columns) + + /** + * Get the $col.JavaName + * @return $col.JavaPrimitive + */ + public $col.JavaPrimitive get${col.JavaName}() + { + return $col.UncapitalisedJavaName; + } + + /** + * Set the value of $cfc + */ + public void set${col.JavaName}($col.JavaPrimitive v) + { + this.$col.UncapitalisedJavaName = v; + } + #end +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/ojb/model_broken/Control.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/ojb/model_broken/Control.vm 2007-07-10 12:57:38 UTC (rev 224) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/ojb/model_broken/Control.vm 2007-07-10 13:01:46 UTC (rev 225) @@ -0,0 +1,60 @@ +#set ( $basePath = ${generator.OutputPath} ) + +#foreach ($dataModel in $dataModels) + #foreach ($database in $dataModel.Databases) + + #if ($database.Package) + #set ($package = $database.Package) + #else + #set ($package = $targetPackage) + #end + + #set ( $path = $strings.getPackageAsPath($package) ) + $files.mkdir("$outputDirectory/$path") + + #foreach ($tbl in $database.Tables) + $tbl.Name + #set ( $firstcap=$tbl.JavaName ) + + #set ( $fname = "${firstcap}.java" ) + #set ( $path = "${strings.getPackageAsPath($package)}$fname" ) + + #if (!$files.file($basePath,$path).exists()) + $generator.parse("ojb/model/ExtensionObject.vm",$path,"table",$tbl) + #end + + #set ( $fname = "${basePrefix}${firstcap}.java" ) + #set ( $path = "${strings.getPackageAsPath($package)}$fname" ) + $generator.parse("ojb/model/Object.vm",$path,"table",$tbl) + + #if ( $ojbUseProxy == true ) + + #set ( $fname = "${firstcap}ProxyInterface.java" ) + #set ( $path = "${strings.getPackageAsPath($package)}$fname" ) + #if (!$files.file($basePath,$path).exists()) + $generator.parse("ojb/model/ExtensionProxyInterface.vm",$path,"table",$tbl) + #end + + #set ( $fname = "${basePrefix}${firstcap}ProxyInterface.java" ) + #set ( $path = "${strings.getPackageAsPath($package)}$fname" ) + $generator.parse("ojb/model/ProxyInterface.vm",$path,"table",$tbl) + + #end + + #if ($ojbUseInterface == true ) + + #set ( $fname = "${firstcap}Interface.java" ) + #set ( $path = "${strings.getPackageAsPath($package)}$fname" ) + #if (!$files.file($basePath,$path).exists()) + $generator.parse("ojb/model/ExtensionInterface.vm",$path,"table",$tbl) + #end + + #set ( $fname = "${basePrefix}${firstcap}Interface.java" ) + #set ( $path = "${strings.getPackageAsPath($package)}$fname" ) + $generator.parse("ojb/model/Interface.vm",$path,"table",$tbl) + + #end + #end + #end + +#end Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/ojb/model_broken/ExtensionInterface.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/ojb/model_broken/ExtensionInterface.vm 2007-07-10 12:57:38 UTC (rev 224) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/ojb/model_broken/ExtensionInterface.vm 2007-07-10 13:01:46 UTC (rev 225) @@ -0,0 +1,26 @@ +#set ($interface = "") +#if ($table.Interface) + #set ($interface = ", $table.Interface") +#end + +package $package; + +#if ($table.isAbstract()) + #set ($abstract = "abstract") +#end + +/** +#if ($addTimeStamp) + * The skeleton for this interface was autogenerated by Torque on: + * + * [$now] + * +#end + * You should add additional methods to this interface to meet the + * application requirements. This class will only be generated as + * long as it does not already exist in the output directory. + */ +public interface ${table.JavaName}Interface + extends ${basePrefix}${table.JavaName}Interface +{ +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/ojb/model_broken/ExtensionObject.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/ojb/model_broken/ExtensionObject.vm 2007-07-10 12:57:38 UTC (rev 224) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/ojb/model_broken/ExtensionObject.vm 2007-07-10 13:01:46 UTC (rev 225) @@ -0,0 +1,29 @@ +#set ($interface = "") +#if ($table.Interface) + #set ($interface = ", $table.Interface") +#end + +package $package; + +#if ($table.isAbstract()) + #set ($abstract = "abstract") +#end + +import org.apache.torque.om.Persistent; + +/** +#if ($addTimeStamp) + * The skeleton for this class was autogenerated by Torque on: + * + * [$now] + * +#end + * You should add additional methods to this class to meet the + * application requirements. This class will only be generated as + * long as it does not already exist in the output directory. + */ +public $!abstract class $table.JavaName + extends $basePrefix$table.JavaName + implements ${table.JavaName}Interface +{ +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/ojb/model_broken/ExtensionProxyInterface.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/ojb/model_broken/ExtensionProxyInterface.vm 2007-07-10 12:57:38 UTC (rev 224) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/ojb/model_broken/ExtensionProxyInterface.vm 2007-07-10 13:01:46 UTC (rev 225) @@ -0,0 +1,23 @@ +#set ($interface = "") +#if ($table.Interface) + #set ($interface = ", $table.Interface") +#end + +package $package; + + +/** +#if ($addTimeStamp) + * The skeleton for this interface was autogenerated by Torque on: + * + * [$now] + * +#end + * You should add additional methods to this interface to meet the + * application requirements. This class will only be generated as + * long as it does not already exist in the output directory. + */ +public interface ${table.JavaName}ProxyInterface + extends ${basePrefix}${table.JavaName}ProxyInterface +{ +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/ojb/model_broken/Interface.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/ojb/model_broken/Interface.vm 2007-07-10 12:57:38 UTC (rev 224) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/ojb/model_broken/Interface.vm 2007-07-10 13:01:46 UTC (rev 225) @@ -0,0 +1,39 @@ +package ${package}; + +import java.io.Serializable; +import java.util.Date; +import java.math.BigDecimal; + +/** +#if ($addTimeStamp) + * This interface was autogenerated by Torque on: + * + * [$now] + * +#end + * You should not use this interface directly. It should not even be + * extended all references should be to ${table.JavaName}Interface + */ +public interface ${basePrefix}${table.JavaName}Interface extends Serializable +{ + + #foreach ($col in $table.Columns) + #set ( $cfc=$col.JavaName ) + #set ( $cfc=$cfc.replaceFirst(".", $cfc.substring(0,1).toUpperCase()) ) + #set ( $clo=$col.Name.toLowerCase() ) + #set ( $cjtype = $col.JavaPrimitive ) + + /** + * Get the $cfc + * @return $cjtype + */ + public $cjtype get${cfc}(); + + /** + * Set the value of $cfc + */ + public void set${cfc}($cjtype v ); + + #end + +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/ojb/model_broken/Object.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/ojb/model_broken/Object.vm 2007-07-10 12:57:38 UTC (rev 224) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/ojb/model_broken/Object.vm 2007-07-10 13:01:46 UTC (rev 225) @@ -0,0 +1,77 @@ +package ${package}; + +#if ($table.BaseClass) + #set ($extendsBaseClass = "extends $table.BaseClass" ) +#else + #set ($extendsBaseClass = "" ) +#end + + #if ($table.Interface) + #if ($ojbUseInterface == true) + #set ($interface = "Serializable, ${basePrefix}${table.JavaName}Interface, $table.Interface" ) + #else + #set ($interface = "Serializable, $table.Interface" ) + #end +#else + #if ($ojbUseInterface == true) + #set ($interface = "Serializable, ${basePrefix}${table.JavaName}Interface" ) + #else + #set ($interface = "Serializable" ) + #end + #end + +import java.io.Serializable; +import java.util.Date; +import java.math.BigDecimal; + +/** +#if ($addTimeStamp) + * This class was autogenerated by Torque on: + * + * [$now] + * +#end + * You should not use this class directly. It should not even be + * extended all references should be to $table.JavaName + */ +public class ${basePrefix}${table.JavaName} $extendsBaseClass + implements $interface +{ + + #foreach ($col in $table.Columns) + #set ( $cjtype = $col.JavaPrimitive ) + #set ( $clo=$col.Name.toLowerCase() ) + #set ( $defaultValue = "null" ) + #if ( $cjtype == "boolean") + #set ( $defaultValue = "false" ) + #elseif ($cjtype == "int") + #set ( $defaultValue = "0" ) + #end + private $cjtype $clo = $defaultValue; + #end + + #foreach ($col in $table.Columns) + #set ( $cfc=$col.JavaName ) + #set ( $cfc=$cfc.replaceFirst(".", $cfc.substring(0,1).toUpperCase()) ) + #set ( $clo=$col.Name.toLowerCase() ) + #set ( $cjtype = $col.JavaPrimitive ) + + /** + * Get the $cfc + * @return $cjtype + */ + public $cjtype get${cfc}() + { + return $clo; + } + + /** + * Set the value of $cfc + */ + public void set${cfc}($cjtype v ) + { + this.$clo = v; + } + + #end +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/ojb/model_broken/ProxyInterface.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/ojb/model_broken/ProxyInterface.vm 2007-07-10 12:57:38 UTC (rev 224) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/ojb/model_broken/ProxyInterface.vm 2007-07-10 13:01:46 UTC (rev 225) @@ -0,0 +1,33 @@ +package ${package}; + +import java.io.Serializable; +import java.util.Date; + +/** +#if ($addTimeStamp) + * This interface was autogenerated by Torque on: + * + * [$now] + * +#end + * You should not use this proxy interface directly. It should + * not even be extended all references should be to + * ${table.JavaName}ProxyInterface + */ +public interface ${basePrefix}${table.JavaName}ProxyInterface extends Serializable +{ + + #foreach ($col in $table.PrimaryKey) + #set ( $cfc=$col.JavaName ) + #set ( $cfc=$cfc.replaceFirst(".", $cfc.substring(0,1).toUpperCase()) ) + #set ( $clo=$col.Name.toLowerCase() ) + #set ( $cjtype = $col.JavaPrimitive ) + + /** + * Get the $cfc + * @return $cjtype + */ + public $cjtype get${cfc}(); + + #end +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/ojb/repository/Control.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/ojb/repository/Control.vm 2007-07-10 12:57:38 UTC (rev 224) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/ojb/repository/Control.vm 2007-07-10 13:01:46 UTC (rev 225) @@ -0,0 +1,19 @@ +#set ( $mrname = "ojb/repository/MainRepository.vm" ) +#set ( $rname = "ojb/repository/Repository.vm" ) +#set ( $basepath = $generator.OutputPath) + +#foreach ($dataModel in $dataModels) + #if($velocityCount==1) + $generator.parse("ojb/repository/MainRepository.vm","repository.xml","dataModel",$dataModel) + #end +#end + +#foreach ($dataModel in $dataModels) + #if ($project) + #set ( $outFile = "repository_${dataModel.shortName}.xml" ) + #set ( $modelCount = $velocityCount ) + + File to be created: $outFile + $generator.parse($rname,$outFile,"dataModel",$dataModel) + #end +#end Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/ojb/repository/MainRepository.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/ojb/repository/MainRepository.vm 2007-07-10 12:57:38 UTC (rev 224) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/ojb/repository/MainRepository.vm 2007-07-10 13:01:46 UTC (rev 225) @@ -0,0 +1,57 @@ + + + + + + +#foreach ($dataModel in $dataModels) + +#end +]> + + + + + + + + + + + + + + + &internal; + + +#foreach ($dataModel in $dataModels) + &${dataModel.shortName}; +#end + + + + Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/ojb/repository/Repository.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/ojb/repository/Repository.vm 2007-07-10 12:57:38 UTC (rev 224) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/ojb/repository/Repository.vm 2007-07-10 13:01:46 UTC (rev 225) @@ -0,0 +1,106 @@ +#set ( $database = $dataModel.database ) +#set ( $unknownTorqueTypes = [ 'NULL', 'OTHER', 'JAVA_OBJECT', 'DISTINCT', 'STRUCT', 'ARRAY', 'REF', 'BOOLEANINT', 'BOOLEANCHAR' ] ) +#set ( $mappedJdbcTypes = ['INTEGER', 'BLOB', 'BLOB', 'BLOB', 'BLOB', 'BLOB', 'BLOB', 'INTEGER', 'CHAR' ] ) +#set ( $fieldsWithNoSize = ['INTEGER', 'BLOB', 'CLOB', 'DATE', 'TIME', 'TIMESTAMP', 'BINARY', 'BIGINT', 'SMALLINT', 'TINYINT' ] ) +#if ($database.Package) + #set ($package = $database.Package) +#else + #set ($package = $targetPackage) +#end + +#foreach ($table in $database.tables) + + + + #set ( $indices = [ "" ] ) + #foreach ($index in $table.getIndices()) + #set ( $indexColumnListString = $index.getColumnList() ) + #set ( $indexColumnList = $indexColumnListString.split(",") ) + #foreach ( $indexedColumn in $indexColumnList ) + #set ( $result = $indices.add($indexedColumn) ) + #end + #end + #foreach ($col in $table.Columns) + + + #set ( $mappingPos = $unknownTorqueTypes.indexOf($col.TorqueType) ) + #set ( $size = "" ) + #set ( $precision = "" ) + #set ( $colType = $col.getType() ) + #set ( $colTypeClass = $colType.getClass() ) + #set ( $colTypeClassName = $colTypeClass.getName() ) + ## === determine the type of the field. OJB recognizes less types than Torque, thus unkown types must be mapped + #if ($mappingPos != -1) + #set ( $jdbcFieldType = $mappedJdbcTypes.get($mappingPos) ) + #if ( $mappedJdbcTypes.get($mappingPos) == "CHAR" ) + #set ( $size = "1" ) + #else + #set ( $size = "" ) + #end + #else ## == no mapping is required + #set ( $jdbcFieldType = $col.TorqueType ) + ## === split the size field into length and precision + #if ($col.size != "") + #set ( $sizeList = $size.split(",") ) + #set ( $foundPart = 0 ) + ## == unfortunatedly $sizeList.get(0) dows not work so I did this hack + #foreach ( $part in $sizeList) + #if ($foundPart == 0) + #set ( $size = $part ) + #set ( $foundPart = 1 ) + #elseif ($foundPart == 1) + #set ( $precision = $part ) + #set ( $foundPart = 2 ) + #end + #end + #end + #end + + + + #end + +#end Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/Control.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/Control.vm 2007-07-10 12:57:38 UTC (rev 224) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/Control.vm 2007-07-10 13:01:46 UTC (rev 225) @@ -0,0 +1,40 @@ +#set ( $basepath = "sql/base/$targetDatabase" ) +#set ( $dbprops = $properties.load("sql/base/$targetDatabase/db.props") ) +#set ( $fname= "sql/base/$targetDatabase/table.vm" ) +#set ( $fnamekeys= "sql/base/$targetDatabase/tablefk.vm" ) +#set ( $idname = "sql/id-table/idtable.$targetDatabase" ) + +#foreach ($dataModel in $dataModels) + + #set ( $outFile = "${dataModel.name}.sql" ) + + File to be created: $outFile + + #set ( $database = $dataModel.database ) + #foreach ($tbl in $database.tables) + Primary Key:#if ($tbl.hasPrimaryKey()) Yes #else No #end + #if (!$tbl.isSkipSql()) + $generator.parse($fname,$outFile,"table",$tbl) + #end + #end + + #foreach ($tbl in $database.tables) + #if (!$tbl.isSkipSql()) + $generator.parse($fnamekeys,$outFile,"tablefk",$tbl) + #end + #end + + #if ($idmodel) + + Creating id-table + + #set ($tbl = $idmodel.database.getTable("ID_TABLE")) + $generator.parse($fname,$outFile,"table",$tbl) + + ## Generate inserts into ID-TABLE for initial ids. + #set ( $initialID = 1 ) + $generator.parse($idname, $outFile, "tables", $database.tables) + + #end + +#end Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/axion/columns.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/axion/columns.vm 2007-07-10 12:57:38 UTC (rev 224) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/axion/columns.vm 2007-07-10 13:01:46 UTC (rev 225) @@ -0,0 +1,13 @@ +#foreach ($col in $table.Columns) + #set ( $type = $dbprops.get($col.Type) ) + #set ( $size = $col.printSize() ) + #set ( $default = $col.DefaultSetting ) + #set ( $nullString = $strings.select($col.isNotNull(), $dbprops.get("NOTNULL"),"") ) + #if ($col.isAutoIncrement() && $table.IdMethod == "native") + #set ( $autoIncrement = $dbprops.get("AUTOINCREMENT") ) + #else + #set ( $autoIncrement = " " ) + #end + #set ( $entry = "$col.Name $type $autoIncrement," ) + $strings.sub($strings.collapseSpaces($entry)," ,",",") +#end Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/axion/db.props =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/axion/db.props 2007-07-10 12:57:38 UTC (rev 224) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/axion/db.props 2007-07-10 13:01:46 UTC (rev 225) @@ -0,0 +1,40 @@ +# JDBC to Axion mappings. + +BIT = BIT +TINYINT = TINYINT +SMALLINT = SMALLINT +INTEGER = INTEGER +BIGINT = BIGINT +FLOAT = FLOAT +REAL = REAL +DOUBLE = DOUBLE +NUMERIC = NUMERIC +DECIMAL = INTEGER +CHAR = VARCHAR +VARCHAR = varchar +LONGVARCHAR = VARCHAR +DATE = date +TIME = time +TIMESTAMP = timestamp +BINARY = BINARY +VARBINARY = BINARY +LONGVARBINARY = LONGVARBINARY +NULL = NULL +OTHER = OTHER +JAVA_OBJECT = +DISTINCT = +STRUCT = +ARRAY = +BLOB = +CLOB = +REF = + +AUTOINCREMENT = IDENTITY +NOTNULL = NOT NULL + +primaryKeyInsideTableDirective = true +indexInsideTableDirective = false + +removeNotNullWithAutoIncrement = false + +suppressDefaults = true Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/axion/drop.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/axion/drop.vm 2007-07-10 12:57:38 UTC (rev 224) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/axion/drop.vm 2007-07-10 13:01:46 UTC (rev 225) @@ -0,0 +1 @@ +drop table if exists $table.Name; Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/axion/foreignkey.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/axion/foreignkey.vm 2007-07-10 12:57:38 UTC (rev 224) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/axion/foreignkey.vm 2007-07-10 13:01:46 UTC (rev 225) @@ -0,0 +1,3 @@ +#foreach ($fk in $table.ForeignKeys) +## FOREIGN KEY ($fk.LocalColumnNames) REFERENCES $fk.ForeignTableName ($fk.ForeignColumnNames), +#end Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/axion/index.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/axion/index.vm 2007-07-10 12:57:38 UTC (rev 224) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/axion/index.vm 2007-07-10 13:01:46 UTC (rev 225) @@ -0,0 +1,3 @@ +#foreach ($index in $table.Indices) +CREATE #if($index.Unique)UNIQUE#end INDEX $index.Name ON $table.Name ($index.ColumnList); +#end Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/axion/primarykey.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/axion/primarykey.vm 2007-07-10 12:57:38 UTC (rev 224) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/axion/primarykey.vm 2007-07-10 13:01:46 UTC (rev 225) @@ -0,0 +1,3 @@ +#if ($table.hasPrimaryKey()) +## PRIMARY KEY($table.printPrimaryKey()), +#end Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/axion/table.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/axion/table.vm 2007-07-10 12:57:38 UTC (rev 224) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/axion/table.vm 2007-07-10 13:01:46 UTC (rev 225) @@ -0,0 +1,20 @@ + +----------------------------------------------------------------------------- +-- $table.Name +----------------------------------------------------------------------------- +##$generator.parse("$basepath/drop.vm", "", "table", $tbl) +CREATE TABLE $table.Name +( +#set ( $cols = $generator.parse("$basepath/columns.vm", "", "table", $tbl) ) +#set ( $pk = $generator.parse("$basepath/primarykey.vm", "", "table", $tbl) ) +##set ( $fk = $generator.parse("$basepath/foreignkey.vm", "", "table", $tbl) ) +#set ( $unique = $generator.parse("$basepath/unique.vm", "", "table", $tbl) ) +#set ( $index = $generator.parse("$basepath/index.vm", "", "table", $tbl) ) +#if($strings.allEmpty([$pk,$fk,$unique,$index]))$strings.chop($cols,2)#else$cols#end +#if($strings.allEmpty([$fk,$unique,$index]) && $pk.length()>0)$strings.chop($pk,2)#else$pk#end +##if($strings.allEmpty([$unique,$index]) && $fk.length() >0)$strings.chop($fk,2)#else$fk#end +#if($unique.length()>0)$strings.chop($unique,2)#else$unique#end + +); + +#if($index.length() > 0)$strings.chop($index,1)#end Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/axion/tablefk.vm =================================================================== Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/axion/unique.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/axion/unique.vm 2007-07-10 12:57:38 UTC (rev 224) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/axion/unique.vm 2007-07-10 13:01:46 UTC (rev 225) @@ -0,0 +1,3 @@ +#foreach ($unique in $table.Unices) +## UNIQUE ($unique.ColumnList), +#end Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/cloudscape/columns.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/cloudscape/columns.vm 2007-07-10 12:57:38 UTC (rev 224) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/cloudscape/columns.vm 2007-07-10 13:01:46 UTC (rev 225) @@ -0,0 +1,13 @@ +#foreach ($col in $table.Columns) + #set ( $type = $dbprops.get($col.Type) ) + #set ( $size = $col.printSize() ) + #set ( $default = $col.DefaultSetting ) + #set ( $nullString = $strings.select($col.isNotNull(), $dbprops.get("NOTNULL"),"") ) + #if ($col.isAutoIncrement() && $table.IdMethod == "native") + #set ( $autoIncrement = $dbprops.get("AUTOINCREMENT") ) + #else + #set ( $autoIncrement = " " ) + #end + #set ( $entry = "$col.Name $type $size $autoIncrement," ) + $strings.sub($strings.collapseSpaces($entry)," ,",",") +#end Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/cloudscape/db.props =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/cloudscape/db.props 2007-07-10 12:57:38 UTC (rev 224) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/cloudscape/db.props 2007-07-10 13:01:46 UTC (rev 225) @@ -0,0 +1,41 @@ +# Taken from java.sql.Types in the IBM 1.3 JDK +# JDBC to Cloudscape mappings. + +BIT = BIT +TINYINT = TINYINT +SMALLINT = SMALLINT +INTEGER = INT +BIGINT = LONGINT +FLOAT = FLOAT +REAL = REAL +DOUBLE = DOUBLE PRECISION +NUMERIC = NUMERIC +DECIMAL = DECIMAL +CHAR = CHAR +VARCHAR = VARCHAR +LONGVARCHAR = LONG VARCHAR +DATE = DATE +TIME = TIME +TIMESTAMP = TIMESTAMP +BINARY = LONG BINARY +VARBINARY = LONG BINARY +LONGVARBINARY = LONG VARBINARY +NULL = +OTHER = +JAVA_OBJECT = SERIALIZE +DISTINCT = +STRUCT = +ARRAY = +BLOB = +CLOB = +REF = + +AUTOINCREMENT = DEFAULT AUTOINCREMENT +NOTNULL = NOT NULL + +primaryKeyInsideTableDirective = true +indexInsideTableDirective = false + +removeNotNullWithAutoIncrement = false + +suppressDefaults = true Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/cloudscape/drop.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/cloudscape/drop.vm 2007-07-10 12:57:38 UTC (rev 224) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/cloudscape/drop.vm 2007-07-10 13:01:46 UTC (rev 225) @@ -0,0 +1 @@ +drop table if exists $table.Name; Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/cloudscape/foreignkey.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/cloudscape/foreignkey.vm 2007-07-10 12:57:38 UTC (rev 224) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/cloudscape/foreignkey.vm 2007-07-10 13:01:46 UTC (rev 225) @@ -0,0 +1,3 @@ +#foreach ($fk in $table.ForeignKeys) + FOREIGN KEY ($fk.LocalColumnNames) REFERENCES $fk.ForeignTableName ($fk.ForeignColumnNames), +#end Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/cloudscape/index.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/cloudscape/index.vm 2007-07-10 12:57:38 UTC (rev 224) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/cloudscape/index.vm 2007-07-10 13:01:46 UTC (rev 225) @@ -0,0 +1,3 @@ +#foreach ($index in $table.Indices) +CREATE #if($index.Unique)UNIQUE#end INDEX $index.Name ON $table.Name ($index.ColumnList); +#end Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/cloudscape/primarykey.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/cloudscape/primarykey.vm 2007-07-10 12:57:38 UTC (rev 224) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/cloudscape/primarykey.vm 2007-07-10 13:01:46 UTC (rev 225) @@ -0,0 +1,3 @@ +#if ($table.hasPrimaryKey()) + PRIMARY KEY($table.printPrimaryKey()), +#end \ No newline at end of file Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/cloudscape/table.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/cloudscape/table.vm 2007-07-10 12:57:38 UTC (rev 224) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/cloudscape/table.vm 2007-07-10 13:01:46 UTC (rev 225) @@ -0,0 +1,20 @@ + +----------------------------------------------------------------------------- +-- $table.Name +----------------------------------------------------------------------------- +##$generator.parse("$basepath/drop.vm", "", "table", $tbl) +CREATE TABLE $table.Name +( +#set ( $cols = $generator.parse("$basepath/columns.vm", "", "table", $tbl) ) +#set ( $pk = $generator.parse("$basepath/primarykey.vm", "", "table", $tbl) ) +##set ( $fk = $generator.parse("$basepath/foreignkey.vm", "", "table", $tbl) ) +#set ( $unique = $generator.parse("$basepath/unique.vm", "", "table", $tbl) ) +#set ( $index = $generator.parse("$basepath/index.vm", "", "table", $tbl) ) +#if($strings.allEmpty([$pk,$unique]))$strings.chop($cols,1)#else$cols#end +#if($strings.allEmpty([$unique]) && $pk.length()>0)$strings.chop($pk,2)#else$pk#end +##if($strings.allEmpty([$unique,$index]) && $fk.length() >0)$strings.chop($fk,2)#else$fk#end +#if($unique.length()>0)$strings.chop($unique,2)#else$unique#end + +); + +#if($index.length() > 0)$strings.chop($index,1)#end Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/cloudscape/tablefk.vm =================================================================== Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/cloudscape/unique.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/cloudscape/unique.vm 2007-07-10 12:57:38 UTC (rev 224) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/cloudscape/unique.vm 2007-07-10 13:01:46 UTC (rev 225) @@ -0,0 +1,3 @@ +#foreach ($unique in $table.Unices) + UNIQUE ($unique.ColumnList), +#end Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/db2/columns.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/db2/columns.vm 2007-07-10 12:57:38 UTC (rev 224) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/db2/columns.vm 2007-07-10 13:01:46 UTC (rev 225) @@ -0,0 +1,24 @@ +#foreach ($col in $table.Columns) + #set ( $type = $dbprops.get($col.Type) ) + #set ( $size = $col.printSize() ) + #if ( $type == "INTEGER" ) + #set ( $size = "" ) + #end + #set ( $rawsize = $col.Size ) + #set ( $torquetype = $col.TorqueType ) + #set ( $default = $col.DefaultSetting ) + #if ($col.isAutoIncrement() && $table.IdMethod == "native") + #set ( $autoIncrement = $dbprops.get("AUTOINCREMENT") ) + #else + #set ( $autoIncrement = " " ) + #end + #set ( $nullString = $strings.select($col.isNotNull(), $dbprops.get("NOTNULL"),"") ) + #if ( $torquetype == "BINARY" ) + #set ( $entry = "$col.Name CHAR($rawsize) FOR BIT DATA $default $nullString $autoIncrement," ) + #elseif ( $torquetype == "VARBINARY" ) + #set ( $entry = "$col.Name VARCHAR($rawsize) FOR BIT DATA $default $nullString $autoIncrement," ) + #else + #set ( $entry = "$col.Name $type $size $default $nullString $autoIncrement," ) + #end + $strings.sub($strings.collapseSpaces($entry)," ,",",") +#end Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/db2/db.props =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/db2/db.props 2007-07-10 12:57:38 UTC (rev 224) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/db2/db.props 2007-07-10 13:01:46 UTC (rev 225) @@ -0,0 +1,41 @@ +# Taken from java.sql.Types in the IBM 1.3 JDK +# JDBC to DB2 mappings. + +BIT = +TINYINT = +SMALLINT = SMALLINT +INTEGER = INTEGER +BIGINT = BIGINT +FLOAT = FLOAT +REAL = REAL +DOUBLE = DOUBLE +NUMERIC = NUMERIC +DECIMAL = DECIMAL +CHAR = VARCHAR +VARCHAR = VARCHAR +LONGVARCHAR = LONG VARCHAR +DATE = DATE +TIME = TIME +TIMESTAMP = TIMESTAMP +BINARY = CHAR(n) FOR BIT DATA +# For DB2/400, VARBINARY must be changed to VARCHAR (32000) FOR BIT DATA +VARBINARY = VARCHAR(n) FOR BIT DATA +LONGVARBINARY = LONG VARCHAR FOR BIT DATA +NULL = NULL +OTHER = +JAVA_OBJECT = +DISTINCT = DISTINCT +STRUCT = +ARRAY = +BLOB = BLOB +CLOB = CLOB +REF = + +AUTOINCREMENT = GENERATED ALWAYS AS IDENTITY +NOTNULL = NOT NULL + +removeNotNullWithAutoIncrement = true + +suppressDefaults = false +maxColumnNameLength = 18 + Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/db2/drop.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/db2/drop.vm 2007-07-10 12:57:38 UTC (rev 224) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/db2/drop.vm 2007-07-10 13:01:46 UTC (rev 225) @@ -0,0 +1,6 @@ +drop table $table.Name; +#set ($seqName = "~~novalue~~") +#set ($seqName = $table.SequenceName) +#if(!$seqName == "~~novalue~~") +drop sequence $seqName restrict; +#end Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/db2/foreignkey.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/db2/foreignkey.vm 2007-07-10 12:57:38 UTC (rev 224) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/db2/foreignkey.vm 2007-07-10 13:01:46 UTC (rev 225) @@ -0,0 +1,16 @@ + +----------------------------------------------------------------------------- +-- $table.Name: FOREIGN KEYS +----------------------------------------------------------------------------- +#foreach ($fk in $table.ForeignKeys) +ALTER TABLE $table.Name + ADD CONSTRAINT $fk.Name FOREIGN KEY ($fk.LocalColumnNames) + REFERENCES $fk.ForeignTableName ($fk.ForeignColumnNames) +#if ($fk.hasOnUpdate()) + ON UPDATE $fk.OnUpdate +#end +#if ($fk.hasOnDelete()) + ON DELETE $fk.OnDelete +#end +; +#end Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/db2/index.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/db2/index.vm 2007-07-10 12:57:38 UTC (rev 224) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/db2/index.vm 2007-07-10 13:01:46 UTC (rev 225) @@ -0,0 +1,3 @@ +#foreach ($index in $table.Indices) +CREATE #if($index.Unique)UNIQUE#end INDEX $index.Name ON $table.Name ($index.ColumnList); +#end Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/db2/primarykey.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/db2/primarykey.vm 2007-07-10 12:57:38 UTC (rev 224) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/db2/primarykey.vm 2007-07-10 13:01:46 UTC (rev 225) @@ -0,0 +1,4 @@ +#if ($table.hasPrimaryKey()) +ALTER TABLE $table.Name + ADD PRIMARY KEY ($table.printPrimaryKey()); +#end \ No newline at end of file Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/db2/sequence.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/db2/sequence.vm 2007-07-10 12:57:38 UTC (rev 224) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/db2/sequence.vm 2007-07-10 13:01:46 UTC (rev 225) @@ -0,0 +1,3 @@ +#if ($table.IdMethod == "native") +CREATE SEQUENCE $table.SequenceName; +#end Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/db2/table.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/db2/table.vm 2007-07-10 12:57:38 UTC (rev 224) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/db2/table.vm 2007-07-10 13:01:46 UTC (rev 225) @@ -0,0 +1,25 @@ + +----------------------------------------------------------------------------- +-- $table.Name +----------------------------------------------------------------------------- +$generator.parse("$basepath/drop.vm", "", "table", $tbl) +CREATE TABLE $table.Name +( +#set ( $cols = $generator.parse("$basepath/columns.vm", "", "table", $tbl) ) +#set ( $unique = $generator.parse("$basepath/unique.vm", "", "table", $tbl) ) +#if($strings.allEmpty([$unique]))$strings.chop($cols,2)#else$cols#end +#if($unique.length()>0)$strings.chop($unique,2)#end + +); + +#set ( $pk = $generator.parse("$basepath/primarykey.vm", "", "table", $tbl) ) +#if($pk.length()>0)$pk#end + +##set ( $fk = $generator.parse("$basepath/foreignkey.vm", "", "table", $tbl) ) +##if ($fk.length()>0)$fk#end + +#set ( $index = $generator.parse("$basepath/index.vm", "", "table", $tbl) ) +#if($index.length() > 0)$index#end + +##set $sequence = $generator.parse("$basepath/sequence.vm", "", "table", $tbl) +##if ($sequence.length()>0)$sequence#end Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/db2/tablefk.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/db2/tablefk.vm 2007-07-10 12:57:38 UTC (rev 224) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/db2/tablefk.vm 2007-07-10 13:01:46 UTC (rev 225) @@ -0,0 +1,3 @@ +#set ( $fk = $generator.parse("$basepath/foreignkey.vm", "", "table", $tbl) ) +#if ($fk.length()>0)$fk#end + Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/db2/unique.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/db2/unique.vm 2007-07-10 12:57:38 UTC (rev 224) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/db2/unique.vm 2007-07-10 13:01:46 UTC (rev 225) @@ -0,0 +1,3 @@ +#foreach ($unique in $table.Unices) + UNIQUE ($unique.ColumnList), +#end Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/db2400/columns.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/db2400/columns.vm 2007-07-10 12:57:38 UTC (rev 224) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/db2400/columns.vm 2007-07-10 13:01:46 UTC (rev 225) @@ -0,0 +1,13 @@ +#foreach ($col in $table.Columns) + #set ( $type = $dbprops.get($col.Type) ) + #set ( $size = $col.printSize() ) + #set ( $default = $col.DefaultSetting ) + #if ($col.isAutoIncrement() && $table.IdMethod == "native") + #set ( $autoIncrement = $dbprops.get("AUTOINCREMENT") ) + #else + #set ( $autoIncrement = " " ) + #end + #set ( $nullString = $strings.select($col.isNotNull(), $dbprops.get("NOTNULL"),"") ) + #set ( $entry = "$col.Name $type $size $default $nullString $autoIncrement," ) + $strings.sub($strings.collapseSpaces($entry)," ,",",") +#end Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/db2400/db.props =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/db2400/db.props 2007-07-10 12:57:38 UTC (rev 224) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/db2400/db.props 2007-07-10 13:01:46 UTC (rev 225) @@ -0,0 +1,38 @@ +# Taken from java.sql.Types in the IBM 1.3 JDK +# JDBC to DB2/400 mappings. + +BIT = +TINYINT = SMALLINT +SMALLINT = SMALLINT +INTEGER = INT +BIGINT = BIGINT +FLOAT = FLOAT +REAL = REAL +DOUBLE = DOUBLE PRECISION +NUMERIC = NUMERIC +DECIMAL = DEC +CHAR = VARCHAR +VARCHAR = VARCHAR +LONGVARCHAR = LONG VARCHAR +DATE = DATE +TIME = TIME +TIMESTAMP = TIMESTAMP +BINARY = +VARBINARY = VARCHAR (32000) FOR BIT DATA +LONGVARBINARY =LONG VARCHAR FOR BIT DATA +NULL = +OTHER = +JAVA_OBJECT = +DISTINCT = +STRUCT = +ARRAY = +BLOB = +CLOB = +REF = + +AUTOINCREMENT = +NOTNULL = NOT NULL + +removeNotNullWithAutoIncrement = true +maxColumnNameLength = 30 +suppressDefaults = false Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/db2400/drop.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/db2400/drop.vm 2007-07-10 12:57:38 UTC (rev 224) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/db2400/drop.vm 2007-07-10 13:01:46 UTC (rev 225) @@ -0,0 +1,13 @@ +drop table $table.Name; +#* + +DB2 looks like oracle but I'm not sure +about the sequences. + +#foreach ($col in $table.Columns) +#if ($col.isAutoIncrement()) +drop sequence if exists ${table.Name}_SEQ; +#end +#end +*# + Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/db2400/foreignkey.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/db2400/foreignkey.vm 2007-07-10 12:57:38 UTC (rev 224) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/db2400/foreignkey.vm 2007-07-10 13:01:46 UTC (rev 225) @@ -0,0 +1,5 @@ +#foreach ($fk in $table.ForeignKeys) +ALTER TABLE $table.Name + ADD CONSTRAINT ${table.Name}_FK_${velocityCount} FOREIGN KEY ($fk.LocalColumnNames) + REFERENCES $fk.ForeignTableName ($fk.ForeignColumnNames); +#end Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/db2400/index.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/db2400/index.vm 2007-07-10 12:57:38 UTC (rev 224) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/db2400/index.vm 2007-07-10 13:01:46 UTC (rev 225) @@ -0,0 +1,4 @@ +#foreach ($index in $table.Indices) +CREATE #if($index.IsUnique)UNIQUE#end INDEX $index.Name ON $table.Name ($index.ColumnList); +#end + Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/db2400/primarykey.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/db2400/primarykey.vm 2007-07-10 12:57:38 UTC (rev 224) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/db2400/primarykey.vm 2007-07-10 13:01:46 UTC (rev 225) @@ -0,0 +1,5 @@ +#if ($table.hasPrimaryKey()) +ALTER TABLE $table.Name + ADD CONSTRAINT ${table.Name}_PK +PRIMARY KEY ($table.printPrimaryKey()); +#end Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/db2400/sequence.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/db2400/sequence.vm 2007-07-10 12:57:38 UTC (rev 224) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/db2400/sequence.vm 2007-07-10 13:01:46 UTC (rev 225) @@ -0,0 +1,3 @@ +#if ($table.IdMethod == "sequence") +CREATE SEQUENCE $table.SequenceName; +#end Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/db2400/table.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/db2400/table.vm 2007-07-10 12:57:38 UTC (rev 224) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/db2400/table.vm 2007-07-10 13:01:46 UTC (rev 225) @@ -0,0 +1,26 @@ + +----------------------------------------------------------------------------- +-- $table.Name +----------------------------------------------------------------------------- +$generator.parse("$basepath/drop.vm", "", "table", $tbl) +CREATE TABLE $table.Name +( +#set ( $cols = $generator.parse("$basepath/columns.vm", "", "table", $tbl) ) +#set ( $unique = $generator.parse("$basepath/unique.vm", "", "table", $tbl) ) +#if($strings.allEmpty([$unique]))$strings.chop($cols,2)#else$cols#end +#if($unique.length()>0)$strings.chop($unique,2)#end + +); + +#set ( $pk = $generator.parse("$basepath/primarykey.vm", "", "table", $tbl) ) +#if($pk.length()>0)$pk#end + +#set ( $fk = $generator.parse("$basepath/foreignkey.vm", "", "table", $tbl) ) +#if ($fk.length()>0)$fk#end + +#set ( $index = $generator.parse("$basepath/index.vm", "", "table", $tbl) ) +#if($index.length() > 0)$index#end + +##set $sequence = $generator.parse("$basepath/sequence.vm", "", "table", $tbl) +##if ($sequence.length()>0)$sequence#end + Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/db2400/tablefk.vm =================================================================== Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/db2400/unique.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/db2400/unique.vm 2007-07-10 12:57:38 UTC (rev 224) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/db2400/unique.vm 2007-07-10 13:01:46 UTC (rev 225) @@ -0,0 +1,3 @@ +#foreach ($unique in $table.Unices) + UNIQUE ($unique.ColumnList), +#end Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/derby/columns.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/derby/columns.vm 2007-07-10 12:57:38 UTC (rev 224) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/derby/columns.vm 2007-07-10 13:01:46 UTC (rev 225) @@ -0,0 +1,13 @@ +#foreach ($col in $table.Columns) + #set ( $type = $dbprops.get($col.Type) ) + #set ( $size = $col.printSize() ) + #set ( $default = $col.DefaultSetting ) + #set ( $nullString = $strings.select($col.isNotNull(), $dbprops.get("NOTNULL"),"") ) + #if ($col.isAutoIncrement() && $table.IdMethod == "native") + #set ( $autoIncrement = $dbprops.get("AUTOINCREMENT") ) + #else + #set ( $autoIncrement = " " ) + #end + #set ( $entry = "$col.Name $type $size $autoIncrement," ) + $strings.sub($strings.collapseSpaces($entry)," ,",",") +#end Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/derby/db.props =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/derby/db.props 2007-07-10 12:57:38 UTC (rev 224) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/derby/db.props 2007-07-10 13:01:46 UTC (rev 225) @@ -0,0 +1,41 @@ +# Taken from java.sql.Types in the IBM 1.3 JDK +# JDBC to Cloudscape mappings. + +BIT = BIT +TINYINT = TINYINT +SMALLINT = SMALLINT +INTEGER = INT +BIGINT = LONGINT +FLOAT = FLOAT +REAL = REAL +DOUBLE = DOUBLE PRECISION +NUMERIC = NUMERIC +DECIMAL = DECIMAL +CHAR = CHAR +VARCHAR = VARCHAR +LONGVARCHAR = LONG VARCHAR +DATE = DATE +TIME = TIME +TIMESTAMP = TIMESTAMP +BINARY = LONG BINARY +VARBINARY = LONG BINARY +LONGVARBINARY = LONG VARBINARY +NULL = +OTHER = +JAVA_OBJECT = SERIALIZE +DISTINCT = +STRUCT = +ARRAY = +BLOB = +CLOB = +REF = + +AUTOINCREMENT = DEFAULT AUTOINCREMENT +NOTNULL = NOT NULL + +primaryKeyInsideTableDirective = true +indexInsideTableDirective = false + +removeNotNullWithAutoIncrement = false + +suppressDefaults = true Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/derby/drop.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/derby/drop.vm 2007-07-10 12:57:38 UTC (rev 224) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/derby/drop.vm 2007-07-10 13:01:46 UTC (rev 225) @@ -0,0 +1 @@ +drop table if exists $table.Name; Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/derby/foreignkey.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/derby/foreignkey.vm 2007-07-10 12:57:38 UTC (rev 224) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/derby/foreignkey.vm 2007-07-10 13:01:46 UTC (rev 225) @@ -0,0 +1,3 @@ +#foreach ($fk in $table.ForeignKeys) + FOREIGN KEY ($fk.LocalColumnNames) REFERENCES $fk.ForeignTableName ($fk.ForeignColumnNames), +#end Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/derby/index.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/derby/index.vm 2007-07-10 12:57:38 UTC (rev 224) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/derby/index.vm 2007-07-10 13:01:46 UTC (rev 225) @@ -0,0 +1,3 @@ +#foreach ($index in $table.Indices) +CREATE #if($index.Unique)UNIQUE#end INDEX $index.Name ON $table.Name ($index.ColumnList); +#end Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/derby/primarykey.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/derby/primarykey.vm 2007-07-10 12:57:38 UTC (rev 224) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/derby/primarykey.vm 2007-07-10 13:01:46 UTC (rev 225) @@ -0,0 +1,3 @@ +#if ($table.hasPrimaryKey()) + PRIMARY KEY($table.printPrimaryKey()), +#end \ No newline at end of file Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/derby/table.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/derby/table.vm 2007-07-10 12:57:38 UTC (rev 224) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/derby/table.vm 2007-07-10 13:01:46 UTC (rev 225) @@ -0,0 +1,20 @@ + +----------------------------------------------------------------------------- +-- $table.Name +----------------------------------------------------------------------------- +##$generator.parse("$basepath/drop.vm", "", "table", $tbl) +CREATE TABLE $table.Name +( +#set ( $cols = $generator.parse("$basepath/columns.vm", "", "table", $tbl) ) +#set ( $pk = $generator.parse("$basepath/primarykey.vm", "", "table", $tbl) ) +##set ( $fk = $generator.parse("$basepath/foreignkey.vm", "", "table", $tbl) ) +#set ( $unique = $generator.parse("$basepath/unique.vm", "", "table", $tbl) ) +#set ( $index = $generator.parse("$basepath/index.vm", "", "table", $tbl) ) +#if($strings.allEmpty([$pk,$unique]))$strings.chop($cols,1)#else$cols#end +#if($strings.allEmpty([$unique]) && $pk.length()>0)$strings.chop($pk,2)#else$pk#end +##if($strings.allEmpty([$unique,$index]) && $fk.length() >0)$strings.chop($fk,2)#else$fk#end +#if($unique.length()>0)$strings.chop($unique,2)#else$unique#end + +); + +#if($index.length() > 0)$strings.chop($index,1)#end Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/derby/tablefk.vm =================================================================== Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/derby/unique.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/derby/unique.vm 2007-07-10 12:57:38 UTC (rev 224) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/derby/unique.vm 2007-07-10 13:01:46 UTC (rev 225) @@ -0,0 +1,3 @@ +#foreach ($unique in $table.Unices) + UNIQUE ($unique.ColumnList), +#end Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/firebird/columns.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/firebird/columns.vm 2007-07-10 12:57:38 UTC (rev 224) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/firebird/columns.vm 2007-07-10 13:01:46 UTC (rev 225) @@ -0,0 +1,14 @@ +#foreach ($col in $table.Columns) + #set ( $type = $dbprops.get($col.Type) ) + #set ( $size = $col.printSize() ) + #set ( $default = $col.DefaultSetting ) + #set ( $nullString = $strings.select($col.isNotNull(), $dbprops.get("NOTNULL"),"") ) + #if ($col.isAutoIncrement() && $table.IdMethod == "native") + #set ( $autoIncrement = $dbprops.get("AUTOINCREMENT") ) + #else + #set ( $autoIncrement = " " ) + #end + #set ( $colName = $strings.concat(['"',$col.Name,'"']) ) + #set ( $entry = "$colName $type $size $default $nullString $autoIncrement," ) + $strings.sub($strings.collapseSpaces($entry)," ,",",") +#end Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/firebird/db.props =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/firebird/db.props 2007-07-10 12:57:38 UTC (rev 224) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/firebird/db.props 2007-07-10 13:01:46 UTC (rev 225) @@ -0,0 +1,41 @@ +# Taken from java.sql.Types in the IBM 1.3 JDK +# JDBC to Interbase mappings. + +BIT = +TINYINT = +SMALLINT = +INTEGER = INTEGER +BIGINT = +FLOAT = +REAL = +DOUBLE = +NUMERIC = +DECIMAL = +CHAR = VARCHAR +VARCHAR = VARCHAR +LONGVARCHAR = VARCHAR +DATE = +TIME = +TIMESTAMP = timestamp +BINARY = +VARBINARY = BLOB +LONGVARBINARY = +NULL = +OTHER = +JAVA_OBJECT = +DISTINCT = +STRUCT = +ARRAY = +BLOB = +CLOB = +REF = + +AUTOINCREMENT = IDENTITY +NOTNULL = NOT NULL + +primaryKeyInsideTableDirective = true +indexInsideTableDirective = false + +removeNotNullWithAutoIncrement = false + +suppressDefaults = true Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/firebird/drop.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/firebird/drop.vm 2007-07-10 12:57:38 UTC (rev 224) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/firebird/drop.vm 2007-07-10 13:01:46 UTC (rev 225) @@ -0,0 +1 @@ +drop table if exists $table.Name; Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/firebird/foreignkey.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/firebird/foreignkey.vm 2007-07-10 12:57:38 UTC (rev 224) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/firebird/foreignkey.vm 2007-07-10 13:01:46 UTC (rev 225) @@ -0,0 +1,3 @@ +#foreach ($fk in $table.ForeignKeys) + FOREIGN KEY ($fk.LocalColumnNames) REFERENCES $fk.ForeignTableName ($fk.ForeignColumnNames), +#end Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/firebird/index.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/firebird/index.vm 2007-07-10 12:57:38 UTC (rev 224) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/firebird/index.vm 2007-07-10 13:01:46 UTC (rev 225) @@ -0,0 +1,3 @@ +#foreach ($index in $table.Indices) +CREATE #if($index.Unique)UNIQUE#end INDEX $index.Name ON $table.Name ($index.ColumnList); +#end Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/firebird/primarykey.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/firebird/primarykey.vm 2007-07-10 12:57:38 UTC (rev 224) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/firebird/primarykey.vm 2007-07-10 13:01:46 UTC (rev 225) @@ -0,0 +1,3 @@ +#if ($table.hasPrimaryKey()) + PRIMARY KEY($table.printPrimaryKey()), +#end \ No newline at end of file Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/firebird/table.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/firebird/table.vm 2007-07-10 12:57:38 UTC (rev 224) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/firebird/table.vm 2007-07-10 13:01:46 UTC (rev 225) @@ -0,0 +1,20 @@ + +/* -------------------------------------------------------------------------- +$table.Name +-------------------------------------------------------------------------- */ +##$generator.parse("$basepath/drop.vm", "", "table", $tbl) +CREATE TABLE $table.Name +( +#set ( $cols = $generator.parse("$basepath/columns.vm", "", "table", $tbl) ) +#set ( $pk = $generator.parse("$basepath/primarykey.vm", "", "table", $tbl) ) +##set ( $fk = $generator.parse("$basepath/foreignkey.vm", "", "table", $tbl) ) +#set ( $unique = $generator.parse("$basepath/unique.vm", "", "table", $tbl) ) +#set ( $index = $generator.parse("$basepath/index.vm", "", "table", $tbl) ) +#if($strings.allEmpty([$pk,$unique]))$strings.chop($cols,1)#else$cols#end +#if($strings.allEmpty([$unique]) && $pk.length()>0)$strings.chop($pk,2)#else$pk#end +##if($strings.allEmpty([$unique,$index]) && $fk.length() >0)$strings.chop($fk,2)#else$fk#end +#if($unique.length()>0)$strings.chop($unique,2)#else$unique#end + +); + +#if($index.length() > 0)$strings.chop($index,1)#end Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/firebird/tablefk.vm =================================================================== Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/firebird/unique.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/firebird/unique.vm 2007-07-10 12:57:38 UTC (rev 224) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/firebird/unique.vm 2007-07-10 13:01:46 UTC (rev 225) @@ -0,0 +1,3 @@ +#foreach ($unique in $table.Unices) + UNIQUE ($unique.ColumnList), +#end Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/hypersonic/columns.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/hypersonic/columns.vm 2007-07-10 12:57:38 UTC (rev 224) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/hypersonic/columns.vm 2007-07-10 13:01:46 UTC (rev 225) @@ -0,0 +1,13 @@ +#foreach ($col in $table.Columns) + #set ( $type = $dbprops.get($col.Type) ) + #set ( $size = $col.printSize() ) + #set ( $default = $col.DefaultSetting ) + #set ( $nullString = $strings.select($col.isNotNull(), $dbprops.get("NOTNULL"),"") ) + #if ($col.isAutoIncrement() && $table.IdMethod == "native") + #set ( $autoIncrement = $dbprops.get("AUTOINCREMENT") ) + #else + #set ( $autoIncrement = " " ) + #end + #set ( $entry = "$col.Name $type $size $autoIncrement," ) + $strings.sub($strings.collapseSpaces($entry)," ,",",") +#end Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/hypersonic/db.props =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/hypersonic/db.props 2007-07-10 12:57:38 UTC (rev 224) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/hypersonic/db.props 2007-07-10 13:01:46 UTC (rev 225) @@ -0,0 +1,43 @@ +# Taken from java.sql.Types in the IBM 1.3 JDK +# JDBC to Hypersonic mappings. + +BIT = BIT +TINYINT = TINYINT +SMALLINT = SMALLINT +INTEGER = integer +BIGINT = BIGINT +FLOAT = FLOAT +REAL = REAL +DOUBLE = DOUBLE +NUMERIC = NUMERIC +DECIMAL = DECIMAL +CHAR = VARCHAR +VARCHAR = VARCHAR +LONGVARCHAR = VARCHAR +DATE = date +TIME = time +TIMESTAMP = timestamp +BINARY = BINARY +VARBINARY = BINARY +LONGVARBINARY = LONGVARBINARY +NULL = NULL +OTHER = OTHER +JAVA_OBJECT = +DISTINCT = +STRUCT = +ARRAY = +BLOB = +CLOB = +REF = + +AUTOINCREMENT = IDENTITY +NOTNULL = NOT NULL + +idMethod=identity + +primaryKeyInsideTableDirective = true +indexInsideTableDirective = false + +removeNotNullWithAutoIncrement = false + +suppressDefaults = true Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/hypersonic/drop.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/hypersonic/drop.vm 2007-07-10 12:57:38 UTC (rev 224) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/hypersonic/drop.vm 2007-07-10 13:01:46 UTC (rev 225) @@ -0,0 +1 @@ +drop table if exists $table.Name; Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/hypersonic/foreignkey.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/hypersonic/foreignkey.vm 2007-07-10 12:57:38 UTC (rev 224) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/hypersonic/foreignkey.vm 2007-07-10 13:01:46 UTC (rev 225) @@ -0,0 +1,5 @@ +#foreach ($fk in $table.ForeignKeys) + ALTER TABLE $table.Name + ADD CONSTRAINT $fk.Name FOREIGN KEY ($fk.LocalColumnNames) + REFERENCES $fk.ForeignTableName ($fk.ForeignColumnNames); +#end Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/hypersonic/index.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/hypersonic/index.vm 2007-07-10 12:57:38 UTC (rev 224) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/hypersonic/index.vm 2007-07-10 13:01:46 UTC (rev 225) @@ -0,0 +1,3 @@ +#foreach ($index in $table.Indices) +CREATE #if($index.Unique)UNIQUE#end INDEX $index.Name ON $table.Name ($index.ColumnList); +#end Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/hypersonic/primarykey.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/hypersonic/primarykey.vm 2007-07-10 12:57:38 UTC (rev 224) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/hypersonic/primarykey.vm 2007-07-10 13:01:46 UTC (rev 225) @@ -0,0 +1,3 @@ +#if ($table.hasPrimaryKey()) + PRIMARY KEY($table.printPrimaryKey()), +#end Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/hypersonic/table.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/hypersonic/table.vm 2007-07-10 12:57:38 UTC (rev 224) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/hypersonic/table.vm 2007-07-10 13:01:46 UTC (rev 225) @@ -0,0 +1,20 @@ + +----------------------------------------------------------------------------- +-- $table.Name +----------------------------------------------------------------------------- +##$generator.parse("$basepath/drop.vm", "", "table", $tbl) +CREATE TABLE $table.Name +( +#set ( $cols = $generator.parse("$basepath/columns.vm", "", "table", $tbl) ) +#set ( $pk = $generator.parse("$basepath/primarykey.vm", "", "table", $tbl) ) +##set ( $fk = $generator.parse("$basepath/foreignkey.vm", "", "table", $tbl) ) +#set ( $unique = $generator.parse("$basepath/unique.vm", "", "table", $tbl) ) +#set ( $index = $generator.parse("$basepath/index.vm", "", "table", $tbl) ) +#if($strings.allEmpty([$pk,$fk,$unique]))$strings.chop($cols,2)#else$cols#end +#if($strings.allEmpty([$fk,$unique]) && $pk.length()>0)$strings.chop($pk,2)#else$pk#end +##if($strings.allEmpty([$unique,$index]) && $fk.length() >0)$strings.chop($fk,2)#else$fk#end +#if($unique.length()>0)$strings.chop($unique,2)#else$unique#end + +); + +#if($index.length() > 0)$strings.chop($index,1)#end Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/hypersonic/tablefk.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/hypersonic/tablefk.vm 2007-07-10 12:57:38 UTC (rev 224) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/hypersonic/tablefk.vm 2007-07-10 13:01:46 UTC (rev 225) @@ -0,0 +1,4 @@ +#set ( $fk = $generator.parse("$basepath/foreignkey.vm", "", "table", $tbl) ) +#if ($fk.length()>0)$fk#end + + Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/hypersonic/unique.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/hypersonic/unique.vm 2007-07-10 12:57:38 UTC (rev 224) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/hypersonic/unique.vm 2007-07-10 13:01:46 UTC (rev 225) @@ -0,0 +1,3 @@ +#foreach ($unique in $table.Unices) + UNIQUE ($unique.ColumnList), +#end Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/interbase/columns.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/interbase/columns.vm 2007-07-10 12:57:38 UTC (rev 224) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/interbase/columns.vm 2007-07-10 13:01:46 UTC (rev 225) @@ -0,0 +1,14 @@ +#foreach ($col in $table.Columns) + #set ( $type = $dbprops.get($col.Type) ) + #set ( $size = $col.printSize() ) + #set ( $default = $col.DefaultSetting ) + #set ( $nullString = $strings.select($col.isNotNull(), $dbprops.get("NOTNULL"),"") ) + #if ($col.isAutoIncrement() && $table.IdMethod == "native") + #set ( $autoIncrement = $dbprops.get("AUTOINCREMENT") ) + #else + #set ( $autoIncrement = " " ) + #end + #set ( $colName = $strings.concat(['"',$col.Name,'"']) ) + #set ( $entry = "$colName $type $size $default $nullString $autoIncrement," ) + $strings.sub($strings.collapseSpaces($entry)," ,",",") +#end Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/interbase/db.props =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/interbase/db.props 2007-07-10 12:57:38 UTC (rev 224) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/interbase/db.props 2007-07-10 13:01:46 UTC (rev 225) @@ -0,0 +1,41 @@ +# Taken from java.sql.Types in the IBM 1.3 JDK +# JDBC to Interbase mappings. + +BIT = +TINYINT = +SMALLINT = +INTEGER = INTEGER +BIGINT = +FLOAT = +REAL = +DOUBLE = +NUMERIC = +DECIMAL = +CHAR = VARCHAR +VARCHAR = VARCHAR +LONGVARCHAR = VARCHAR +DATE = +TIME = +TIMESTAMP = timestamp +BINARY = +VARBINARY = BLOB +LONGVARBINARY = +NULL = +OTHER = +JAVA_OBJECT = +DISTINCT = +STRUCT = +ARRAY = +BLOB = +CLOB = +REF = + +AUTOINCREMENT = IDENTITY +NOTNULL = NOT NULL + +primaryKeyInsideTableDirective = true +indexInsideTableDirective = false + +removeNotNullWithAutoIncrement = false + +suppressDefaults = true Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/interbase/drop.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/interbase/drop.vm 2007-07-10 12:57:38 UTC (rev 224) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/interbase/drop.vm 2007-07-10 13:01:46 UTC (rev 225) @@ -0,0 +1 @@ +drop table if exists $table.Name; Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/interbase/foreignkey.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/interbase/foreignkey.vm 2007-07-10 12:57:38 UTC (rev 224) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/interbase/foreignkey.vm 2007-07-10 13:01:46 UTC (rev 225) @@ -0,0 +1,3 @@ +#foreach ($fk in $table.ForeignKeys) + FOREIGN KEY ($fk.LocalColumnNames) REFERENCES $fk.ForeignTableName ($fk.ForeignColumnNames), +#end Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/interbase/index.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/interbase/index.vm 2007-07-10 12:57:38 UTC (rev 224) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/interbase/index.vm 2007-07-10 13:01:46 UTC (rev 225) @@ -0,0 +1,3 @@ +#foreach ($index in $table.Indices) +CREATE #if($index.Unique)UNIQUE#end INDEX $index.Name ON $table.Name ($index.ColumnList); +#end Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/interbase/primarykey.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/interbase/primarykey.vm 2007-07-10 12:57:38 UTC (rev 224) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/interbase/primarykey.vm 2007-07-10 13:01:46 UTC (rev 225) @@ -0,0 +1,3 @@ +#if ($table.hasPrimaryKey()) + PRIMARY KEY($table.printPrimaryKey()), +#end \ No newline at end of file Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/interbase/table.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/interbase/table.vm 2007-07-10 12:57:38 UTC (rev 224) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/interbase/table.vm 2007-07-10 13:01:46 UTC (rev 225) @@ -0,0 +1,20 @@ + +/* -------------------------------------------------------------------------- +$table.Name +-------------------------------------------------------------------------- */ +##$generator.parse("$basepath/drop.vm", "", "table", $tbl) +CREATE TABLE $table.Name +( +#set ( $cols = $generator.parse("$basepath/columns.vm", "", "table", $tbl) ) +#set ( $pk = $generator.parse("$basepath/primarykey.vm", "", "table", $tbl) ) +##set ( $fk = $generator.parse("$basepath/foreignkey.vm", "", "table", $tbl) ) +#set ( $unique = $generator.parse("$basepath/unique.vm", "", "table", $tbl) ) +#set ( $index = $generator.parse("$basepath/index.vm", "", "table", $tbl) ) +#if($strings.allEmpty([$pk,$unique]))$strings.chop($cols,1)#else$cols#end +#if($strings.allEmpty([$unique]) && $pk.length()>0)$strings.chop($pk,2)#else$pk#end +##if($strings.allEmpty([$unique,$index]) && $fk.length() >0)$strings.chop($fk,2)#else$fk#end +#if($unique.length()>0)$strings.chop($unique,2)#else$unique#end + +); + +#if($index.length() > 0)$strings.chop($index,1)#end Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/interbase/tablefk.vm =================================================================== Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/interbase/unique.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/interbase/unique.vm 2007-07-10 12:57:38 UTC (rev 224) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/interbase/unique.vm 2007-07-10 13:01:46 UTC (rev 225) @@ -0,0 +1,3 @@ +#foreach ($unique in $table.Unices) + UNIQUE ($unique.ColumnList), +#end Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/msaccess/columns.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/msaccess/columns.vm 2007-07-10 12:57:38 UTC (rev 224) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/msaccess/columns.vm 2007-07-10 13:01:46 UTC (rev 225) @@ -0,0 +1,13 @@ +#foreach ($col in $table.Columns) + #set ( $type = $dbprops.get($col.Type) ) + #set ( $size = $col.printSize() ) + #set ( $default = $col.DefaultSetting ) + #set ( $nullString = $strings.select($col.isNotNull(), $dbprops.get("NOTNULL"),"") ) + #if ($col.isAutoIncrement() && $table.IdMethod == "native") + #set ( $autoIncrement = $dbprops.get("AUTOINCREMENT") ) + #else + #set ( $autoIncrement = " " ) + #end + #set ( $entry = "$col.Name $type $size $autoIncrement," ) + $strings.sub($strings.collapseSpaces($entry)," ,",",") +#end Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/msaccess/db.props =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/msaccess/db.props 2007-07-10 12:57:38 UTC (rev 224) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/msaccess/db.props 2007-07-10 13:01:46 UTC (rev 225) @@ -0,0 +1,41 @@ +# Taken from java.sql.Types in the IBM 1.3 JDK +# JDBC to MSAccess. + +BIT = BIT +TINYINT = TINYINT +SMALLINT = SMALLINT +INTEGER = integer +BIGINT = BIGINT +FLOAT = FLOAT +REAL = REAL +DOUBLE = DOUBLE +NUMERIC = NUMERIC +DECIMAL = DECIMAL +CHAR = VARCHAR +VARCHAR = VARCHAR +LONGVARCHAR = MEMO +DATE = date +TIME = time +TIMESTAMP = timestamp +BINARY = BINARY +VARBINARY = BINARY +LONGVARBINARY = BINARY +NULL = NULL +OTHER = OTHER +JAVA_OBJECT = +DISTINCT = +STRUCT = +ARRAY = +BLOB = +CLOB = +REF = + +AUTOINCREMENT = IDENTITY +NOTNULL = NOT NULL + +primaryKeyInsideTableDirective = true +indexInsideTableDirective = false + +removeNotNullWithAutoIncrement = false + +suppressDefaults = true Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/msaccess/drop.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/msaccess/drop.vm 2007-07-10 12:57:38 UTC (rev 224) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/msaccess/drop.vm 2007-07-10 13:01:46 UTC (rev 225) @@ -0,0 +1 @@ +drop table $table.Name; Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/msaccess/foreignkey.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/msaccess/foreignkey.vm 2007-07-10 12:57:38 UTC (rev 224) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/msaccess/foreignkey.vm 2007-07-10 13:01:46 UTC (rev 225) @@ -0,0 +1,3 @@ +#foreach ($fk in $table.ForeignKeys) + FOREIGN KEY ($fk.LocalColumnNames) REFERENCES $fk.ForeignTableName ($fk.ForeignColumnNames), +#end Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/msaccess/index.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/msaccess/index.vm 2007-07-10 12:57:38 UTC (rev 224) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/msaccess/index.vm 2007-07-10 13:01:46 UTC (rev 225) @@ -0,0 +1,3 @@ +#foreach ($index in $table.Indices) +CREATE #if($index.Unique)UNIQUE#end INDEX $index.Name ON $table.Name ($index.ColumnList); +#end Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/msaccess/primarykey.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/msaccess/primarykey.vm 2007-07-10 12:57:38 UTC (rev 224) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/msaccess/primarykey.vm 2007-07-10 13:01:46 UTC (rev 225) @@ -0,0 +1,3 @@ +#if ($table.hasPrimaryKey()) + PRIMARY KEY($table.printPrimaryKey()), +#end Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/msaccess/table.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/msaccess/table.vm 2007-07-10 12:57:38 UTC (rev 224) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/msaccess/table.vm 2007-07-10 13:01:46 UTC (rev 225) @@ -0,0 +1,20 @@ + +----------------------------------------------------------------------------- +-- $table.Name +----------------------------------------------------------------------------- +$generator.parse("$basepath/drop.vm", "", "table", $tbl) +CREATE TABLE $table.Name +( +#set ( $cols = $generator.parse("$basepath/columns.vm", "", "table", $tbl) ) +#set ( $pk = $generator.parse("$basepath/primarykey.vm", "", "table", $tbl) ) +##set ( $fk = $generator.parse("$basepath/foreignkey.vm", "", "table", $tbl) ) +#set ( $unique = $generator.parse("$basepath/unique.vm", "", "table", $tbl) ) +#set ( $index = $generator.parse("$basepath/index.vm", "", "table", $tbl) ) +#if($strings.allEmpty([$pk,$fk,$unique,$index]))$strings.chop($cols,2)#else$cols#end +#if($strings.allEmpty([$fk,$unique,$index]) && $pk.length()>0)$strings.chop($pk,2)#else$pk#end +##if($strings.allEmpty([$unique,$index]) && $fk.length() >0)$strings.chop($fk,2)#else$fk#end +#if($unique.length()>0)$strings.chop($unique,2)#else$unique#end + +); + +#if($index.length() > 0)$strings.chop($index,1)#end Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/msaccess/tablefk.vm =================================================================== Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/msaccess/unique.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/msaccess/unique.vm 2007-07-10 12:57:38 UTC (rev 224) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/msaccess/unique.vm 2007-07-10 13:01:46 UTC (rev 225) @@ -0,0 +1,3 @@ +#foreach ($unique in $table.Unices) + UNIQUE ($unique.ColumnList), +#end Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/mssql/columns.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/mssql/columns.vm 2007-07-10 12:57:38 UTC (rev 224) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/mssql/columns.vm 2007-07-10 13:01:46 UTC (rev 225) @@ -0,0 +1,18 @@ +#foreach ($col in $table.Columns) + #set ( $type = $dbprops.get($col.Type) ) + #if ($type == "INT" || $type == "TEXT") + #set ( $size = "" ) + #else + #set ( $size = $col.printSize() ) + #end + #set ( $default = $col.DefaultSetting ) + #set ( $nullString = $strings.select($col.isNotNull(), $dbprops.get("NOTNULL"),$dbprops.get("NULL")) ) + #if ($col.isAutoIncrement() && $table.IdMethod == "native") + #set ( $autoIncrement = $dbprops.get("AUTOINCREMENT") ) + #else + #set ( $autoIncrement = " " ) + #end + #set ( $entry = "$col.Name $type $size $default $nullString $autoIncrement," ) + $strings.sub($strings.collapseSpaces($entry)," ,",",") +#end + Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/mssql/db.props =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/mssql/db.props 2007-07-10 12:57:38 UTC (rev 224) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/mssql/db.props 2007-07-10 13:01:46 UTC (rev 225) @@ -0,0 +1,35 @@ +BIT = BIT +TINYINT = TINYINT +SMALLINT = SMALLINT +INTEGER = INT +BIGINT = BIGINT +FLOAT = FLOAT +REAL = REAL +DOUBLE = FLOAT +NUMERIC = NUMERIC +DECIMAL = DECIMAL +CHAR = CHAR +VARCHAR = VARCHAR +LONGVARCHAR = TEXT +DATE = DATETIME +TIME = DATETIME +TIMESTAMP = DATETIME +BINARY = BINARY(7132) +VARBINARY = IMAGE +LONGVARBINARY = IMAGE +NULL = NULL +OTHER = +JAVA_OBJECT = +DISTINCT = +STRUCT = +ARRAY = +BLOB = +CLOB = +REF = + +AUTOINCREMENT = IDENTITY (1,1) +NOTNULL = NOT NULL + +removeNotNullWithAutoIncrement = false +suppressDefaults = false +maxColumnNameLength = 30 Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/mssql/drop.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/mssql/drop.vm 2007-07-10 12:57:38 UTC (rev 224) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/mssql/drop.vm 2007-07-10 13:01:46 UTC (rev 225) @@ -0,0 +1,29 @@ +#foreach ($fk in $table.ForeignKeys) +IF EXISTS (SELECT 1 FROM sysobjects WHERE type ='RI' AND name='$fk.Name') + ALTER TABLE $table.Name DROP CONSTRAINT $fk.Name; +#end +IF EXISTS (SELECT 1 FROM sysobjects WHERE type = 'U' AND name = '$table.Name') +BEGIN + DECLARE @reftable_${velocityCount} nvarchar(60), @constraintname_${velocityCount} nvarchar(60) + DECLARE refcursor CURSOR FOR + select reftables.name tablename, cons.name constraintname + from sysobjects tables, + sysobjects reftables, + sysobjects cons, + sysreferences ref + where tables.id = ref.rkeyid + and cons.id = ref.constid + and reftables.id = ref.fkeyid + and tables.name = '$table.Name' + OPEN refcursor + FETCH NEXT from refcursor into @reftable_${velocityCount}, @constraintname_${velocityCount} + while @@FETCH_STATUS = 0 + BEGIN + exec ('alter table '+ △ reftable_${velocityCount}+' drop constraint '+ △ constraintname_${velocityCount}) + FETCH NEXT from refcursor into @reftable_${velocityCount}, @constraintname_${velocityCount} + END + CLOSE refcursor + DEALLOCATE refcursor + DROP TABLE $table.Name +END + Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/mssql/foreignkey.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/mssql/foreignkey.vm 2007-07-10 12:57:38 UTC (rev 224) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/mssql/foreignkey.vm 2007-07-10 13:01:46 UTC (rev 225) @@ -0,0 +1,16 @@ +#foreach ($fk in $table.ForeignKeys) +BEGIN +ALTER TABLE $table.Name + ADD CONSTRAINT $fk.Name FOREIGN KEY ($fk.LocalColumnNames) + REFERENCES $fk.ForeignTableName ($fk.ForeignColumnNames) +#if ($fk.hasOnUpdate()) + ON UPDATE $fk.OnUpdate +#end +#if ($fk.hasOnDelete()) + ON DELETE $fk.OnDelete +#end +END +; + +#end + Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/mssql/index.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/mssql/index.vm 2007-07-10 12:57:38 UTC (rev 224) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/mssql/index.vm 2007-07-10 13:01:46 UTC (rev 225) @@ -0,0 +1,4 @@ +#foreach ($index in $table.Indices) +CREATE #if($index.Unique)UNIQUE#end INDEX $index.Name ON $table.Name ($index.ColumnList); +#end + Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/mssql/primarykey.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/mssql/primarykey.vm 2007-07-10 12:57:38 UTC (rev 224) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/mssql/primarykey.vm 2007-07-10 13:01:46 UTC (rev 225) @@ -0,0 +1,3 @@ +#if ($table.hasPrimaryKey()) + CONSTRAINT ${table.Name}_PK PRIMARY KEY($table.printPrimaryKey()), +#end Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/mssql/table.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/mssql/table.vm 2007-07-10 12:57:38 UTC (rev 224) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/mssql/table.vm 2007-07-10 13:01:46 UTC (rev 225) @@ -0,0 +1,20 @@ + +/* ---------------------------------------------------------------------- */ +/* $table.Name */ +/* ---------------------------------------------------------------------- */ + +$generator.parse("$basepath/drop.vm", "", "table", $tbl) +CREATE TABLE $table.Name +( +#set ( $cols = $generator.parse("$basepath/columns.vm", "", "table", $tbl) ) +#set ( $pk = $generator.parse("$basepath/primarykey.vm", "", "table", $tbl) ) +#set ( $unique = $generator.parse("$basepath/unique.vm", "", "table", $tbl) ) +#if($strings.allEmpty([$pk,$unique]))$strings.chop($cols,1)#else$cols#end +#if($strings.allEmpty([$unique]) && $pk.length()>0)$strings.chop($pk,2)#else$pk#end +#if($unique.length()>0)$strings.chop($unique,2)#end +); + +#set ( $index = $generator.parse("$basepath/index.vm", "", "table", $tbl) ) +#if($index.length() > 0)$index#end + + Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/mssql/tablefk.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/mssql/tablefk.vm 2007-07-10 12:57:38 UTC (rev 224) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/mssql/tablefk.vm 2007-07-10 13:01:46 UTC (rev 225) @@ -0,0 +1,8 @@ + +/* ---------------------------------------------------------------------- */ +/* $table.Name */ +/* ---------------------------------------------------------------------- */ + +#set ( $fk = $generator.parse("$basepath/foreignkey.vm", "", "table", $tbl) ) +#if($fk.length() >0)$fk#end + Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/mssql/unique.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/mssql/unique.vm 2007-07-10 12:57:38 UTC (rev 224) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/mssql/unique.vm 2007-07-10 13:01:46 UTC (rev 225) @@ -0,0 +1,3 @@ +#foreach ($unique in $table.Unices) + UNIQUE ($unique.ColumnList), +#end Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/mysql/columns.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/mysql/columns.vm 2007-07-10 12:57:38 UTC (rev 224) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/mysql/columns.vm 2007-07-10 13:01:46 UTC (rev 225) @@ -0,0 +1,17 @@ +#foreach ($col in $table.Columns) + #set ( $type = $dbprops.get($col.Type) ) + #if ( $type == 'MEDIUMTEXT' || $type == 'LONGTEXT' || $type == 'BLOB' || $type == 'MEDIUMBLOB' || $type == 'LONGBLOB' ) + #set ( $size = '' ) + #else + #set ( $size = $col.printSize() ) + #end + #set ( $default = $col.DefaultSetting ) + #set ( $nullString = $strings.select($col.isNotNull(), $dbprops.get("NOTNULL"),"") ) + #if ($col.isAutoIncrement() && $table.IdMethod == "native") + #set ( $autoIncrement = $dbprops.get("AUTOINCREMENT") ) + #else + #set ( $autoIncrement = " " ) + #end + #set ( $entry = "$col.Name $type $size $default $nullString $autoIncrement," ) + $strings.sub($strings.collapseSpaces($entry)," ,",",") +#end Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/mysql/db.props =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/mysql/db.props 2007-07-10 12:57:38 UTC (rev 224) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/mysql/db.props 2007-07-10 13:01:46 UTC (rev 225) @@ -0,0 +1,47 @@ +# Taken from java.sql.Types in the IBM 1.3 JDK +# JDBC to MySQL mappings. +# +# A good MySQL resource for determining these mappings is at +# http://www.mysql.com/doc/C/o/Column_types.html + +BIT = BIT +TINYINT = TINYINT +SMALLINT = SMALLINT +INTEGER = INTEGER +BIGINT = BIGINT +FLOAT = FLOAT +REAL = REAL +DOUBLE = DOUBLE +NUMERIC = DECIMAL +DECIMAL = DECIMAL +CHAR = CHAR +VARCHAR = VARCHAR +LONGVARCHAR = MEDIUMTEXT +DATE = DATETIME +TIME = TIME +TIMESTAMP = TIMESTAMP +BINARY = BLOB +VARBINARY = MEDIUMBLOB +LONGVARBINARY = LONGBLOB +NULL = NULL +OTHER = +JAVA_OBJECT = +DISTINCT = +STRUCT = +ARRAY = +BLOB = LONGBLOB +CLOB = LONGTEXT +REF = + +AUTOINCREMENT = AUTO_INCREMENT +NOTNULL = NOT NULL + +removeNotNullWithAutoIncrement = false +suppressDefaults = false +maxColumnNameLength = 64 + + +# See mysql docs for valid table type names. +# For example, if you wanted to use the transactional type InnoDB, +# then specify "tableType = InnoDB" +#tableType = MyISAM Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/mysql/drop.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/mysql/drop.vm 2007-07-10 12:57:38 UTC (rev 224) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/mysql/drop.vm 2007-07-10 13:01:46 UTC (rev 225) @@ -0,0 +1 @@ +drop table if exists $table.Name; Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/mysql/foreignkey.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/mysql/foreignkey.vm 2007-07-10 12:57:38 UTC (rev 224) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/mysql/foreignkey.vm 2007-07-10 13:01:46 UTC (rev 225) @@ -0,0 +1,10 @@ +#foreach ($fk in $table.ForeignKeys) + FOREIGN KEY ($fk.LocalColumnNames) REFERENCES $fk.ForeignTableName ($fk.ForeignColumnNames) + #if ($fk.hasOnUpdate()) + ON UPDATE $fk.OnUpdate + #end + #if ($fk.hasOnDelete()) + ON DELETE $fk.OnDelete + #end +, +#end Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/mysql/index.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/mysql/index.vm 2007-07-10 12:57:38 UTC (rev 224) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/mysql/index.vm 2007-07-10 13:01:46 UTC (rev 225) @@ -0,0 +1,3 @@ +#foreach ($index in $table.Indices) + INDEX $index.Name ($index.ColumnList), +#end Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/mysql/primarykey.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/mysql/primarykey.vm 2007-07-10 12:57:38 UTC (rev 224) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/mysql/primarykey.vm 2007-07-10 13:01:46 UTC (rev 225) @@ -0,0 +1,3 @@ +#if ($table.hasPrimaryKey()) + PRIMARY KEY($table.printPrimaryKey()), +#end Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/mysql/table.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/mysql/table.vm 2007-07-10 12:57:38 UTC (rev 224) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/mysql/table.vm 2007-07-10 13:01:46 UTC (rev 225) @@ -0,0 +1,19 @@ + +# ----------------------------------------------------------------------- +# $table.Name +# ----------------------------------------------------------------------- +$generator.parse("$basepath/drop.vm", "", "table", $tbl) +CREATE TABLE $table.Name +( +#set ( $cols = $generator.parse("$basepath/columns.vm", "", "table", $tbl) ) +#set ( $pk = $generator.parse("$basepath/primarykey.vm", "", "table", $tbl) ) +#set ( $fk = $generator.parse("$basepath/foreignkey.vm", "", "table", $tbl) ) +#set ( $unique = $generator.parse("$basepath/unique.vm", "", "table", $tbl) ) +#set ( $index = $generator.parse("$basepath/index.vm", "", "table", $tbl) ) +#if($strings.allEmpty([$pk,$fk,$unique,$index]))$strings.chop($cols,2)#else$cols#end +#if($strings.allEmpty([$fk,$unique,$index]) && $pk.length()>0)$strings.chop($pk,2)#else$pk#end +#if($strings.allEmpty([$unique,$index]) && $fk.length() >0)$strings.chop($fk,2)#else$fk#end +#if($strings.allEmpty([$index]) && $unique.length()>0)$strings.chop($unique,2)#else$unique#end +#if($index.length() > 0)$strings.chop($index,2)#end + +)#if($dbprops.get("tableType")) Type=$dbprops.get("tableType")#end; Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/mysql/tablefk.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/mysql/tablefk.vm 2007-07-10 12:57:38 UTC (rev 224) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/mysql/tablefk.vm 2007-07-10 13:01:46 UTC (rev 225) @@ -0,0 +1 @@ + Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/mysql/unique.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/mysql/unique.vm 2007-07-10 12:57:38 UTC (rev 224) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/mysql/unique.vm 2007-07-10 13:01:46 UTC (rev 225) @@ -0,0 +1,3 @@ +#foreach ($unique in $table.Unices) + UNIQUE ($unique.ColumnList), +#end Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/oracle/columns.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/oracle/columns.vm 2007-07-10 12:57:38 UTC (rev 224) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/oracle/columns.vm 2007-07-10 13:01:46 UTC (rev 225) @@ -0,0 +1,8 @@ +#foreach ($col in $table.Columns) + #set ( $type = $dbprops.get($col.Type) ) + #set ( $size = $col.printSize() ) + #set ( $default = $col.DefaultSetting ) + #set ( $nullString = $strings.select($col.isNotNull(), $dbprops.get("NOTNULL"),"") ) + #set ( $entry = "$col.Name $type $size $default $nullString," ) + $strings.sub($strings.collapseSpaces($entry)," ,",",") +#end Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/oracle/db.props =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/oracle/db.props 2007-07-10 12:57:38 UTC (rev 224) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/oracle/db.props 2007-07-10 13:01:46 UTC (rev 225) @@ -0,0 +1,49 @@ +# Taken from java.sql.Types in the IBM 1.3 JDK +# JDBC to Oracle mappings. +# +# Good Oracle resources for determining these mappings include: +# http://technet.oracle.com/doc/oracle8i_816/java.816/a81354/basic3.htm +# http://technet.oracle.com/docs/tech/migration/workbench/doc_library/MSAccess/ch3.htm + +BIT = NUMBER (1, 0) +TINYINT = NUMBER (3, 0) +SMALLINT = NUMBER (5, 0) +INTEGER = NUMBER +BIGINT = NUMBER (20, 0) +FLOAT = FLOAT +REAL = NUMBER +DOUBLE = FLOAT +NUMERIC = NUMBER +DECIMAL = NUMBER +CHAR = CHAR +VARCHAR = VARCHAR2 +LONGVARCHAR = VARCHAR2 (2000) +DATE = DATE +TIME = DATE +TIMESTAMP = DATE +BINARY = LONG RAW +VARBINARY = BLOB +LONGVARBINARY = LONG RAW +NULL = +OTHER = +JAVA_OBJECT = +DISTINCT = +STRUCT = +ARRAY = +BLOB = BLOB +CLOB = CLOB +REF = + +NOTNULL = NOT NULL + +primaryKeyInsideTableDirective = true +foreignKeyInsideTableDirective = true +indexInsideTableDirective = false + +removeNotNullWithAutoIncrement = false + +suppressDefaults = false + +maxColumnNameLength = 30 + +idMethod = sequence Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/oracle/drop.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/oracle/drop.vm 2007-07-10 12:57:38 UTC (rev 224) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/oracle/drop.vm 2007-07-10 13:01:46 UTC (rev 225) @@ -0,0 +1,4 @@ +DROP TABLE $table.Name CASCADE CONSTRAINTS; +#if ($table.IdMethod == "native") +DROP SEQUENCE $table.SequenceName; +#end Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/oracle/foreignkey.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/oracle/foreignkey.vm 2007-07-10 12:57:38 UTC (rev 224) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/oracle/foreignkey.vm 2007-07-10 13:01:46 UTC (rev 225) @@ -0,0 +1,13 @@ +#foreach ($fk in $table.ForeignKeys) +ALTER TABLE $table.Name + ADD CONSTRAINT $fk.Name FOREIGN KEY ($fk.LocalColumnNames) + REFERENCES $fk.ForeignTableName ($fk.ForeignColumnNames) +#if ($fk.hasOnUpdate() && !$fk.OnUpdate.equalsIgnoreCase("cascade")) +ON UPDATE $fk.OnUpdate +#end +#if ($fk.hasOnDelete()) +ON DELETE $fk.OnDelete +#end +; + +#end Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/oracle/index.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/oracle/index.vm 2007-07-10 12:57:38 UTC (rev 224) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/oracle/index.vm 2007-07-10 13:01:46 UTC (rev 225) @@ -0,0 +1,3 @@ +#foreach ($index in $table.Indices) +CREATE#if ($index.Unique)UNIQUE#end INDEX $index.Name ON $table.Name ($index.ColumnList); +#end Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/oracle/primarykey.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/oracle/primarykey.vm 2007-07-10 12:57:38 UTC (rev 224) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/oracle/primarykey.vm 2007-07-10 13:01:46 UTC (rev 225) @@ -0,0 +1,7 @@ +#set ($length = $table.Name.length()) +#if ($length > 27)#set ($length=27)#end +#if ($table.hasPrimaryKey()) +ALTER TABLE $table.Name + ADD CONSTRAINT ${table.Name.substring(0,$length)}_PK +PRIMARY KEY ($table.printPrimaryKey()); +#end Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/oracle/sequence.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/oracle/sequence.vm 2007-07-10 12:57:38 UTC (rev 224) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/oracle/sequence.vm 2007-07-10 13:01:46 UTC (rev 225) @@ -0,0 +1,3 @@ +#if ($table.IdMethod == "native") +CREATE SEQUENCE $table.SequenceName INCREMENT BY 1 START WITH 1 NOMAXVALUE NOCYCLE NOCACHE ORDER; +#end Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/oracle/table.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/oracle/table.vm 2007-07-10 12:57:38 UTC (rev 224) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/oracle/table.vm 2007-07-10 13:01:46 UTC (rev 225) @@ -0,0 +1,22 @@ + +----------------------------------------------------------------------------- +-- $table.Name +----------------------------------------------------------------------------- +$generator.parse("$basepath/drop.vm", "", "table", $tbl) +CREATE TABLE $table.Name +( +#set ( $cols = $generator.parse("$basepath/columns.vm", "", "table", $tbl) ) +#set ( $unique = $generator.parse("$basepath/unique.vm", "", "table", $tbl) ) +#if($strings.allEmpty([$unique]))$strings.chop($cols,2)#else$cols#end +#if($unique.length()>0)$strings.chop($unique,2)#end + +); + +#set ( $pk = $generator.parse("$basepath/primarykey.vm", "", "table", $tbl) ) +#if($pk.length()>0)$pk#end + +#set ( $index = $generator.parse("$basepath/index.vm", "", "table", $tbl) ) +#if($index.length() > 0)$index#end + +#set ( $sequence = $generator.parse("$basepath/sequence.vm", "", "table", $tbl) ) +#if ($sequence.length()>0)$sequence#end Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/oracle/tablefk.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/oracle/tablefk.vm 2007-07-10 12:57:38 UTC (rev 224) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/oracle/tablefk.vm 2007-07-10 13:01:46 UTC (rev 225) @@ -0,0 +1,4 @@ +#set ( $fk = $generator.parse("$basepath/foreignkey.vm", "", "table", $tbl) ) +#if ($fk.length()>0)$fk#end + + Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/oracle/unique.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/oracle/unique.vm 2007-07-10 12:57:38 UTC (rev 224) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/oracle/unique.vm 2007-07-10 13:01:46 UTC (rev 225) @@ -0,0 +1,3 @@ +#foreach ($unique in $table.Unices) + CONSTRAINT $unique.Name UNIQUE ($unique.ColumnList), +#end Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/postgresql/columns.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/postgresql/columns.vm 2007-07-10 12:57:38 UTC (rev 224) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/postgresql/columns.vm 2007-07-10 13:01:46 UTC (rev 225) @@ -0,0 +1,47 @@ +#foreach ($col in $table.Columns) + #if ($col.TorqueType.indexOf("BOOLEAN") != -1) + #set ( $type = $dbprops.get($col.TorqueType) ) + #else + #set ( $type = $dbprops.get($col.Type) ) + #end + #if ($col.TorqueType.indexOf("INT") == -1) + #set ( $size = $col.printSize() ) + #else + #set ( $size = "" ) + #end + #if (($table.IdMethod == "native") && ($col.isPrimaryKey())) + #set ( $default = "DEFAULT nextval('$table.SequenceName')" ) + #else + #set ( $default = $col.DefaultSetting ) + #end + #set ( $nullString = $strings.select($col.isNotNull(), $dbprops.get("NOTNULL"),"") ) + #set ( $entry = "$col.Name $type $size $default $nullString" ) + #if ($col.isAutoIncrement() && $table.IdMethod == "native") + #set ( $autoIncrement = $dbprops.get("AUTOINCREMENT") ) + #else + #set ( $autoIncrement = " " ) + #end + #set ( $entry = $strings.select($col.isAutoIncrement(), "$col.Name $autoIncrement", $entry) ) +## +## the following works if you want to inline your foreign keys +## if you turn it on, be sure to comment out foreignkey.vm +#if (false) + #if ($col.isForeignKey()) + #set ($fk = $col.ForeignKey) + #set ($entry = "$entry REFERENCES $fk.ForeignTableName ($fk.ForeignColumnNames)") + #if ($fk.hasOnUpdate()) + #set ($entry = "$entry ON UPDATE $fk.OnUpdate ") + #end + #if ($fk.hasOnDelete()) + #set ($entry = "$entry ON DELETE $fk.OnDelete ") + #end + #end +#end +## add a nice comment +#if ($col.isForeignKey()) + #set ($fk = $col.ForeignKey) + -- REFERENCES $fk.ForeignTableName ($fk.ForeignColumnNames) +#end +#set ( $entry = $strings.collapseSpaces("$entry,") ) + $strings.sub($entry," ,",",") +#end Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/postgresql/db.props =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/postgresql/db.props 2007-07-10 12:57:38 UTC (rev 224) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/postgresql/db.props 2007-07-10 13:01:46 UTC (rev 225) @@ -0,0 +1,50 @@ +# Taken from java.sql.Types in the IBM 1.3 JDK +# JDBC to PostgreSQL mappings. +# +# See http://www.postgresql.org/idocs/index.php?datatype.html for more +# information on PostgreSQL data types. + +BIT = boolean +TINYINT = int2 +SMALLINT = int2 +INTEGER = integer +BIGINT = int8 +FLOAT = float +REAL = float +BOOLEANCHAR = char +BOOLEANINT = int2 + +DOUBLE = double precision +# numeric(precision, scale) / decimal(precision, scale) +NUMERIC = numeric +DECIMAL = decimal +CHAR = char +VARCHAR = varchar +LONGVARCHAR = bytea +DATE = date +TIME = time +TIMESTAMP = timestamp +BINARY = bytea +VARBINARY = bytea +LONGVARBINARY = bytea +NULL = +OTHER = +JAVA_OBJECT = +DISTINCT = +STRUCT = +ARRAY = +BLOB = +CLOB = text +REF = + +AUTOINCREMENT = serial +NOTNULL = NOT NULL + +primaryKeyInsideTableDirective = true +indexInsideTableDirective = false + +removeNotNullWithAutoIncrement = true + +suppressDefaults = false +idMethod=sequence + Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/postgresql/drop.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/postgresql/drop.vm 2007-07-10 12:57:38 UTC (rev 224) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/postgresql/drop.vm 2007-07-10 13:01:46 UTC (rev 225) @@ -0,0 +1,4 @@ +DROP TABLE $table.Name; +#if ($table.IdMethod == "native") +DROP SEQUENCE $table.SequenceName; +#end Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/postgresql/foreignkey.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/postgresql/foreignkey.vm 2007-07-10 12:57:38 UTC (rev 224) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/postgresql/foreignkey.vm 2007-07-10 13:01:46 UTC (rev 225) @@ -0,0 +1,18 @@ +## +## The following will only work for non-circular references +## if you have a dependancy chain, you will need to use +## ADD CONSTRAINT syntax (with INITIALLY DEFERRED) +## which is sticky and version dependant +## +#foreach ($fk in $table.ForeignKeys) +ALTER TABLE $table.Name + ADD CONSTRAINT $fk.Name FOREIGN KEY ($fk.LocalColumnNames) + REFERENCES $fk.ForeignTableName ($fk.ForeignColumnNames) +#if ($fk.hasOnUpdate()) + ON UPDATE $fk.OnUpdate +#end +#if ($fk.hasOnDelete()) + ON DELETE $fk.OnDelete +#end +; +#end Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/postgresql/index.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/postgresql/index.vm 2007-07-10 12:57:38 UTC (rev 224) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/postgresql/index.vm 2007-07-10 13:01:46 UTC (rev 225) @@ -0,0 +1,4 @@ +#foreach ($index in $table.Indices) +CREATE#if($index.Unique) UNIQUE#end INDEX $index.Name ON $table.Name ($index.ColumnList); +#end + Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/postgresql/primarykey.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/postgresql/primarykey.vm 2007-07-10 12:57:38 UTC (rev 224) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/postgresql/primarykey.vm 2007-07-10 13:01:46 UTC (rev 225) @@ -0,0 +1,3 @@ +#if ($table.hasPrimaryKey()) + PRIMARY KEY ($table.printPrimaryKey()), +#end Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/postgresql/sequence.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/postgresql/sequence.vm 2007-07-10 12:57:38 UTC (rev 224) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/postgresql/sequence.vm 2007-07-10 13:01:46 UTC (rev 225) @@ -0,0 +1,3 @@ +#if ($table.IdMethod == "native") +CREATE SEQUENCE $table.SequenceName; +#end Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/postgresql/table.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/postgresql/table.vm 2007-07-10 12:57:38 UTC (rev 224) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/postgresql/table.vm 2007-07-10 13:01:46 UTC (rev 225) @@ -0,0 +1,21 @@ + +----------------------------------------------------------------------------- +-- $table.Name +----------------------------------------------------------------------------- +$generator.parse("$basepath/drop.vm", "", "table", $tbl) +#set ( $sequence = $generator.parse("$basepath/sequence.vm", "", "table", $tbl) ) +#if ($sequence.length()>0)$sequence#end + +CREATE TABLE $table.Name +( +#set ( $cols = $generator.parse("$basepath/columns.vm", "", "table",$tbl) ) +#set ( $pk = $generator.parse("$basepath/primarykey.vm", "", "table", $tbl) ) +#set ( $unique = $generator.parse("$basepath/unique.vm", "", "table", $tbl) ) +#set ( $index = $generator.parse("$basepath/index.vm", "", "table", $tbl) ) +#if($strings.allEmpty([$pk,$unique]))$strings.chop($cols,2)#else$cols#end +#if($strings.allEmpty([$unique]) && $pk.length()>0)$strings.chop($pk,2)#else$pk#end +#if($unique.length() > 0)$strings.chop($unique,2)#end + +); +#if($index.length() > 0)$strings.chop($index,1)#end + Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/postgresql/tablefk.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/postgresql/tablefk.vm 2007-07-10 12:57:38 UTC (rev 224) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/postgresql/tablefk.vm 2007-07-10 13:01:46 UTC (rev 225) @@ -0,0 +1,7 @@ + +---------------------------------------------------------------------- +-- $table.Name +---------------------------------------------------------------------- + +#set ( $fk = $generator.parse("$basepath/foreignkey.vm", "", "table", $tbl) ) +#if($fk.length() >0)$fk#end Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/postgresql/unique.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/postgresql/unique.vm 2007-07-10 12:57:38 UTC (rev 224) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/postgresql/unique.vm 2007-07-10 13:01:46 UTC (rev 225) @@ -0,0 +1,3 @@ +#foreach ($unique in $table.Unices) + CONSTRAINT $unique.Name UNIQUE ($unique.ColumnList), +#end Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/sapdb/columns.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/sapdb/columns.vm 2007-07-10 12:57:38 UTC (rev 224) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/sapdb/columns.vm 2007-07-10 13:01:46 UTC (rev 225) @@ -0,0 +1,8 @@ +#foreach ($col in $table.Columns) + #set ( $type = $dbprops.get($col.Type) ) + #set ( $size = $col.printSize() ) + #set ( $default = $col.DefaultSetting ) + #set ( $nullString = $strings.select($col.isNotNull(), $dbprops.get("NOTNULL"),"") ) + #set ( $entry = "$col.Name $type $size $default $nullString," ) + $strings.sub($strings.collapseSpaces($entry)," ,",",") +#end Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/sapdb/db.props =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/sapdb/db.props 2007-07-10 12:57:38 UTC (rev 224) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/sapdb/db.props 2007-07-10 13:01:46 UTC (rev 225) @@ -0,0 +1,48 @@ +# Taken from java.sql.Types in the IBM 1.3 JDK +# JDBC to SapDB mappings. + +BIT = FIXED(1,0) +TINYINT = CHAR BYTE +SMALLINT = SMALLINT +INTEGER = INTEGER +BIGINT = FIXED(38,0) +FLOAT = FLOAT +REAL = REAL +DOUBLE = DOUBLE PRECISION +NUMERIC = DECIMAL +DECIMAL = DECIMAL +CHAR = CHAR +VARCHAR = VARCHAR +LONGVARCHAR = LONG VARCHAR +DATE = DATE +TIME = TIME +TIMESTAMP = TIMESTAMP +BINARY = CHAR(254) BYTE +VARBINARY = LONG BYTE +LONGVARBINARY = LONG BYTE +NULL = NULL +OTHER = +JAVA_OBJECT = LONG BYTE +DISTINCT = DISTINCT +STRUCT = +ARRAY = +BLOB = LONG BYTE +CLOB = LONG UNICODE +REF = +BOOLEAN = BOOLEAN +BOOLEANINT = SMALLINT +BOOLEANCHAR = CHAR + + +AUTOINCREMENT = DEFAULT SERIAL +NOTNULL = NOT NULL + +primaryKeyInsideTableDirective = true +foreignKeyInsideTableDirective = true +indexInsideTableDirective = false + +removeNotNullWithAutoIncrement = false + +suppressDefaults = false + +idMethod=sequence Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/sapdb/drop.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/sapdb/drop.vm 2007-07-10 12:57:38 UTC (rev 224) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/sapdb/drop.vm 2007-07-10 13:01:46 UTC (rev 225) @@ -0,0 +1,4 @@ +drop table $table.Name cascade ; +#if ($table.IdMethod == "native") +drop sequence $table.SequenceName; +#end Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/sapdb/foreignkey.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/sapdb/foreignkey.vm 2007-07-10 12:57:38 UTC (rev 224) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/sapdb/foreignkey.vm 2007-07-10 13:01:46 UTC (rev 225) @@ -0,0 +1,7 @@ +#foreach ($fk in $table.ForeignKeys) +ALTER TABLE $table.Name + FOREIGN KEY $fk.Name ($fk.LocalColumnNames) + REFERENCES $fk.ForeignTableName ($fk.ForeignColumnNames) +; + +#end Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/sapdb/index.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/sapdb/index.vm 2007-07-10 12:57:38 UTC (rev 224) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/sapdb/index.vm 2007-07-10 13:01:46 UTC (rev 225) @@ -0,0 +1,3 @@ +#foreach ($index in $table.Indices) +CREATE #if($index.Unique)UNIQUE#end INDEX $index.Name ON $table.Name ($index.ColumnList); +#end Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/sapdb/primarykey.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/sapdb/primarykey.vm 2007-07-10 12:57:38 UTC (rev 224) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/sapdb/primarykey.vm 2007-07-10 13:01:46 UTC (rev 225) @@ -0,0 +1,4 @@ +#if ($table.hasPrimaryKey()) +ALTER TABLE $table.Name + ADD PRIMARY KEY ($table.printPrimaryKey()) ; +#end \ No newline at end of file Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/sapdb/sequence.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/sapdb/sequence.vm 2007-07-10 12:57:38 UTC (rev 224) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/sapdb/sequence.vm 2007-07-10 13:01:46 UTC (rev 225) @@ -0,0 +1,3 @@ +#if ($table.IdMethod == "native") +CREATE SEQUENCE $table.SequenceName; +#end Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/sapdb/table.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/sapdb/table.vm 2007-07-10 12:57:38 UTC (rev 224) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/sapdb/table.vm 2007-07-10 13:01:46 UTC (rev 225) @@ -0,0 +1,22 @@ + +----------------------------------------------------------------------------- +-- $table.Name +----------------------------------------------------------------------------- +$generator.parse("$basepath/drop.vm", "", "table", $tbl) +CREATE TABLE $table.Name +( +#set ( $cols = $generator.parse("$basepath/columns.vm", "", "table", $tbl) ) +#set ( $unique = $generator.parse("$basepath/unique.vm", "", "table", $tbl) ) +#if($strings.allEmpty([$unique]))$strings.chop($cols,2)#else$cols#end +#if($unique.length()>0)$strings.chop($unique,2)#end + +); + +#set ( $pk = $generator.parse("$basepath/primarykey.vm", "", "table", $tbl) ) +#if($pk.length()>0)$pk#end + +#set ( $index = $generator.parse("$basepath/index.vm", "", "table", $tbl) ) +#if($index.length() > 0)$index#end + +#set ( $sequence = $generator.parse("$basepath/sequence.vm", "", "table", $tbl) ) +#if ($sequence.length()>0)$sequence#end Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/sapdb/tablefk.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/sapdb/tablefk.vm 2007-07-10 12:57:38 UTC (rev 224) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/sapdb/tablefk.vm 2007-07-10 13:01:46 UTC (rev 225) @@ -0,0 +1,3 @@ +#set ( $fk = $generator.parse("$basepath/foreignkey.vm", "", "table", $tbl) ) +#if ($fk.length()>0)$fk#end + Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/sapdb/unique.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/sapdb/unique.vm 2007-07-10 12:57:38 UTC (rev 224) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/sapdb/unique.vm 2007-07-10 13:01:46 UTC (rev 225) @@ -0,0 +1,3 @@ +#foreach ($unique in $table.Unices) + UNIQUE ($unique.ColumnList), +#end Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/sybase/columns.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/sybase/columns.vm 2007-07-10 12:57:38 UTC (rev 224) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/sybase/columns.vm 2007-07-10 13:01:46 UTC (rev 225) @@ -0,0 +1,25 @@ +#foreach ($col in $table.Columns) + #set ( $type = $dbprops.get($col.Type) ) + #if ($type == "INT" || $type == "TEXT") + #set ( $size = "" ) + #else + #set ( $size = $col.printSize() ) + #end + #if ( $dbprops.get("suppressDefaults") == "true" ) + #set ( $default = "" ) + #else + #set ( $default = $col.DefaultSetting ) + #end + #if ( ($dbprops.get("removeNotNullWithAutoIncrement") == "true") && $col.isAutoIncrement() && $col.isNotNull() ) + #set ( $nullString = "" ) + #else + #set ( $nullString = $strings.select($col.isNotNull(), $dbprops.get("NOTNULL"),"NULL") ) + #end + #if ($col.isAutoIncrement() && $table.IdMethod == "native") + #set ( $autoIncrement = $dbprops.get("AUTOINCREMENT") ) + #else + #set ( $autoIncrement = " " ) + #end + #set ( $entry = "$col.Name $type $size $default $nullString $autoIncrement," ) + $strings.sub($strings.collapseSpaces($entry)," ,",",") +#end Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/sybase/db.props =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/sybase/db.props 2007-07-10 12:57:38 UTC (rev 224) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/sybase/db.props 2007-07-10 13:01:46 UTC (rev 225) @@ -0,0 +1,69 @@ +# Taken from java.sql.Types in the IBM 1.3 JDK +# JDBC to Sybase mappings. + +BIT = BIT +TINYINT = TINYINT +SMALLINT = SMALLINT +INTEGER = INT +BIGINT = BIGINT +FLOAT = FLOAT +REAL = REAL +DOUBLE = FLOAT +NUMERIC = NUMERIC +DECIMAL = DECIMAL +CHAR = CHAR +VARCHAR = VARCHAR +LONGVARCHAR = TEXT +DATE = DATETIME +TIME = TIMESTAMP +TIMESTAMP = DATETIME +BINARY = BINARY +VARBINARY = IMAGE +LONGVARBINARY = IMAGE +NULL = NULL +OTHER = +JAVA_OBJECT = +DISTINCT = +STRUCT = +ARRAY = +BLOB = +CLOB = +REF = + +# +# This is the autoincrement value if using native methods for +# incrementing keys. Most likely IDENTITIY wrt Sybase ASE. +# Leaving the value blank should be used when Torque's IDBroker +# is used to autoincrement keys. +# +# Default: [blank] +# +AUTOINCREMENT = + +# +# If true, the NOT NULL values will not be printed in generated +# SQL files if the column is set to autoincrement. Should be true +# when the internal IDENTITY attribute ( above ) is used in a column +# for autoincrementing keys. +# +# Default: false +# +removeNotNullWithAutoIncrement = false + +# +# If true, defaults are not included in generated SQL. +# +# Default: false +# +suppressDefaults = false + +# +# The string to place in the generated SQL for columns which cannot +# be NULL. +# +# Default: NOT NULL +# +NOTNULL = NOT NULL + +maxColumnNameLength = 30 + Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/sybase/drop.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/sybase/drop.vm 2007-07-10 12:57:38 UTC (rev 224) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/sybase/drop.vm 2007-07-10 13:01:46 UTC (rev 225) @@ -0,0 +1,9 @@ +#foreach ($fk in $table.ForeignKeys) +IF EXISTS (SELECT 1 FROM sysobjects WHERE type ='RI' AND name='$fk.Name') + ALTER TABLE $table.Name DROP CONSTRAINT $fk.Name; +#end +IF EXISTS (SELECT 1 FROM sysobjects WHERE type = 'U' AND name = '$table.Name') +BEGIN + DROP TABLE $table.Name +END +; Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/sybase/foreignkey.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/sybase/foreignkey.vm 2007-07-10 12:57:38 UTC (rev 224) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/sybase/foreignkey.vm 2007-07-10 13:01:46 UTC (rev 225) @@ -0,0 +1,9 @@ +#foreach ($fk in $table.ForeignKeys) +BEGIN +ALTER TABLE $table.Name + ADD CONSTRAINT $fk.Name FOREIGN KEY ($fk.LocalColumnNames) + REFERENCES $fk.ForeignTableName ($fk.ForeignColumnNames) +END +; + +#end Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/sybase/index.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/sybase/index.vm 2007-07-10 12:57:38 UTC (rev 224) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/sybase/index.vm 2007-07-10 13:01:46 UTC (rev 225) @@ -0,0 +1,3 @@ +#foreach ($index in $table.Indices) +CREATE #if($index.Unique)UNIQUE#end INDEX $index.Name ON $table.Name ($index.ColumnList); +#end Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/sybase/primarykey.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/sybase/primarykey.vm 2007-07-10 12:57:38 UTC (rev 224) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/sybase/primarykey.vm 2007-07-10 13:01:46 UTC (rev 225) @@ -0,0 +1,3 @@ +#if ($table.hasPrimaryKey()) + CONSTRAINT ${table.Name}_PK PRIMARY KEY($table.printPrimaryKey()), +#end Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/sybase/table.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/sybase/table.vm 2007-07-10 12:57:38 UTC (rev 224) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/sybase/table.vm 2007-07-10 13:01:46 UTC (rev 225) @@ -0,0 +1,19 @@ + +/* ---------------------------------------------------------------------- */ +/* $table.Name */ +/* ---------------------------------------------------------------------- */ + +$generator.parse("$basepath/drop.vm", "", "table", $tbl) +CREATE TABLE $table.Name +( +#set ( $cols = $generator.parse("$basepath/columns.vm", "", "table", $tbl) ) +#set ( $pk = $generator.parse("$basepath/primarykey.vm", "", "table", $tbl) ) +#set ( $unique = $generator.parse("$basepath/unique.vm", "", "table", $tbl) ) +#if($strings.allEmpty([$pk,$unique]))$strings.chop($cols,1)#else$cols#end +#if($strings.allEmpty([$unique]) && $pk.length()>0)$strings.chop($pk,2)#else$pk#end +#if($unique.length()>0)$strings.chop($unique,2)#end + +); + +#set ( $index = $generator.parse("$basepath/index.vm", "", "table", $tbl) ) +#if($index.length() > 0)$index#end Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/sybase/tablefk.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/sybase/tablefk.vm 2007-07-10 12:57:38 UTC (rev 224) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/sybase/tablefk.vm 2007-07-10 13:01:46 UTC (rev 225) @@ -0,0 +1,8 @@ + +/* ---------------------------------------------------------------------- */ +/* $table.Name */ +/* ---------------------------------------------------------------------- */ + +#set ( $fk = $generator.parse("$basepath/foreignkey.vm", "", "table", $tbl) ) +#if($fk.length() >0)$fk#end + Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/sybase/unique.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/sybase/unique.vm 2007-07-10 12:57:38 UTC (rev 224) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/base/sybase/unique.vm 2007-07-10 13:01:46 UTC (rev 225) @@ -0,0 +1,3 @@ +#foreach ($unique in $table.Unices) + UNIQUE ($unique.ColumnList), +#end Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/db-init/Control.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/db-init/Control.vm 2007-07-10 12:57:38 UTC (rev 224) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/db-init/Control.vm 2007-07-10 13:01:46 UTC (rev 225) @@ -0,0 +1,2 @@ +#set ( $fname = "sql/db-init/$targetDatabase/createdb.vm" ) +$generator.parse($fname,"") Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/db-init/axion/createdb.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/db-init/axion/createdb.vm 2007-07-10 12:57:38 UTC (rev 224) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/db-init/axion/createdb.vm 2007-07-10 13:01:46 UTC (rev 225) @@ -0,0 +1 @@ + Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/db-init/db2400/createdb.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/db-init/db2400/createdb.vm 2007-07-10 12:57:38 UTC (rev 224) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/db-init/db2400/createdb.vm 2007-07-10 13:01:46 UTC (rev 225) @@ -0,0 +1,8 @@ +## Not implemented for DB2/400... yet ;-) + +#* +#foreach ($databaseName in $databaseNames) +drop database if exists $databaseName; +create database $databaseName; +#end +*# Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/db-init/hypersonic/createdb.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/db-init/hypersonic/createdb.vm 2007-07-10 12:57:38 UTC (rev 224) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/db-init/hypersonic/createdb.vm 2007-07-10 13:01:46 UTC (rev 225) @@ -0,0 +1 @@ +ECHO Not implemented Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/db-init/mssql/createdb.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/db-init/mssql/createdb.vm 2007-07-10 12:57:38 UTC (rev 224) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/db-init/mssql/createdb.vm 2007-07-10 13:01:46 UTC (rev 225) @@ -0,0 +1 @@ +ECHO Not implemented Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/db-init/mysql/createdb.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/db-init/mysql/createdb.vm 2007-07-10 12:57:38 UTC (rev 224) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/db-init/mysql/createdb.vm 2007-07-10 13:01:46 UTC (rev 225) @@ -0,0 +1,4 @@ +#foreach ($databaseName in $databaseNames) +drop database if exists $databaseName; +create database $databaseName; +#end Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/db-init/oracle/createdb.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/db-init/oracle/createdb.vm 2007-07-10 12:57:38 UTC (rev 224) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/db-init/oracle/createdb.vm 2007-07-10 13:01:46 UTC (rev 225) @@ -0,0 +1,4 @@ +#foreach ($databaseName in $databaseNames) +-- drop database $databaseName; +-- create database $databaseName; +#end Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/db-init/postgresql/createdb.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/db-init/postgresql/createdb.vm 2007-07-10 12:57:38 UTC (rev 224) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/db-init/postgresql/createdb.vm 2007-07-10 13:01:46 UTC (rev 225) @@ -0,0 +1,4 @@ +#foreach ($databaseName in $databaseNames) +drop database $databaseName; +create database $databaseName; +#end Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/db-init/sapdb/createdb.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/db-init/sapdb/createdb.vm 2007-07-10 12:57:38 UTC (rev 224) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/db-init/sapdb/createdb.vm 2007-07-10 13:01:46 UTC (rev 225) @@ -0,0 +1,4 @@ +#foreach ($databaseName in $databaseNames) +-- drop database $databaseName; +-- create database $databaseName; +#end Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/db-init/sybase/createdb.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/db-init/sybase/createdb.vm 2007-07-10 12:57:38 UTC (rev 224) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/db-init/sybase/createdb.vm 2007-07-10 13:01:46 UTC (rev 225) @@ -0,0 +1,10 @@ +#foreach ($databaseName in $databaseNames) +USE MASTER +; + +DROP DATABASE $databaseName +; + +CREATE DATABASE $databaseName +; +#end Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/id-table/Control.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/id-table/Control.vm 2007-07-10 12:57:38 UTC (rev 224) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/id-table/Control.vm 2007-07-10 13:01:46 UTC (rev 225) @@ -0,0 +1,6 @@ +#set ( $fname = "sql/id-table/idtable.$targetDatabase" ) +#foreach ($dataModel in $dataModels) +#set ( $outFile = "${dataModel.name}-idtable-init.sql" ) +$generator.parse($fname,"$outFile","tables",$dataModel.database.tables) +#set ( $initialID = $initialID + 1000 ) +#end Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/id-table/idtable.axion =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/id-table/idtable.axion 2007-07-10 12:57:38 UTC (rev 224) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/id-table/idtable.axion 2007-07-10 13:01:46 UTC (rev 225) @@ -0,0 +1,4 @@ +#foreach ($tbl in $tables) +insert into ID_TABLE (id_table_id, table_name, next_id, quantity) VALUES ($initialID, '$tbl.Name', $initialIDValue, $initialIDStep); +#set ( $initialID = $initialID + 1 ) +#end Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/id-table/idtable.cloudscape =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/id-table/idtable.cloudscape 2007-07-10 12:57:38 UTC (rev 224) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/id-table/idtable.cloudscape 2007-07-10 13:01:46 UTC (rev 225) @@ -0,0 +1,4 @@ +#foreach ($tbl in $tables) +insert into ID_TABLE (id_table_id, table_name, next_id, quantity) VALUES ($initialID, '$tbl.Name', $initialIDValue, $initialIDStep); +#set ( $initialID = $initialID + 1 ) +#end Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/id-table/idtable.db2 =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/id-table/idtable.db2 2007-07-10 12:57:38 UTC (rev 224) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/id-table/idtable.db2 2007-07-10 13:01:46 UTC (rev 225) @@ -0,0 +1,4 @@ +#foreach ($tbl in $tables) +insert into ID_TABLE (id_table_id, table_name, next_id, quantity) VALUES ($initialID, '$tbl.Name', $initialIDValue, $initialIDStep); +#set ( $initialID = $initialID + 1 ) +#end Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/id-table/idtable.db2400 =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/id-table/idtable.db2400 2007-07-10 12:57:38 UTC (rev 224) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/id-table/idtable.db2400 2007-07-10 13:01:46 UTC (rev 225) @@ -0,0 +1,5 @@ +#foreach ($tbl in $tables) +insert into ID_TABLE (id_table_id, table_name, next_id, quantity) VALUES ($initialID, '$tbl.Name', $initialIDValue, $initialIDStep); +#set ( $initialID = $initialID + 1 ) +#end + Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/id-table/idtable.hypersonic =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/id-table/idtable.hypersonic 2007-07-10 12:57:38 UTC (rev 224) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/id-table/idtable.hypersonic 2007-07-10 13:01:46 UTC (rev 225) @@ -0,0 +1,4 @@ +#foreach ($tbl in $tables) +insert into ID_TABLE (id_table_id, table_name, next_id, quantity) VALUES ($initialID, '$tbl.Name', $initialIDValue, $initialIDStep); +#set ( $initialID = $initialID + 1 ) +#end Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/id-table/idtable.interbase =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/id-table/idtable.interbase 2007-07-10 12:57:38 UTC (rev 224) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/id-table/idtable.interbase 2007-07-10 13:01:46 UTC (rev 225) @@ -0,0 +1,4 @@ +#foreach ($tbl in $tables) +insert into ID_TABLE (id_table_id, table_name, next_id, quantity) VALUES ($initialID, '$tbl.Name', $initialIDValue, $initialIDStep); +#set ( $initialID = $initialID + 1 ) +#end Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/id-table/idtable.mssql =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/id-table/idtable.mssql 2007-07-10 12:57:38 UTC (rev 224) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/id-table/idtable.mssql 2007-07-10 13:01:46 UTC (rev 225) @@ -0,0 +1,4 @@ +#foreach ($tbl in $tables) +insert into ID_TABLE (id_table_id, table_name, next_id, quantity) VALUES ($initialID, '$tbl.Name', $initialIDValue, $initialIDStep); +#set ( $initialID = $initialID + 1 ) +#end Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/id-table/idtable.mysql =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/id-table/idtable.mysql 2007-07-10 12:57:38 UTC (rev 224) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/id-table/idtable.mysql 2007-07-10 13:01:46 UTC (rev 225) @@ -0,0 +1,4 @@ +#foreach ($tbl in $tables) +insert into ID_TABLE (id_table_id, table_name, next_id, quantity) VALUES ($initialID, '$tbl.Name', $initialIDValue, $initialIDStep); +#set ( $initialID = $initialID + 1 ) +#end Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/id-table/idtable.oracle =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/id-table/idtable.oracle 2007-07-10 12:57:38 UTC (rev 224) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/id-table/idtable.oracle 2007-07-10 13:01:46 UTC (rev 225) @@ -0,0 +1,4 @@ +#foreach ($tbl in $tables) +insert into ID_TABLE (id_table_id, table_name, next_id, quantity) VALUES ($initialID, '$tbl.Name', $initialIDValue, $initialIDStep); +#set ( $initialID = $initialID + 1 ) +#end Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/id-table/idtable.postgresql =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/id-table/idtable.postgresql 2007-07-10 12:57:38 UTC (rev 224) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/id-table/idtable.postgresql 2007-07-10 13:01:46 UTC (rev 225) @@ -0,0 +1,4 @@ +#foreach ($tbl in $tables) +insert into ID_TABLE (id_table_id, table_name, next_id, quantity) VALUES ($initialID, '$tbl.Name', $initialIDValue, $initialIDStep); +#set ( $initialID = $initialID + 1 ) +#end Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/id-table/idtable.sapdb =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/id-table/idtable.sapdb 2007-07-10 12:57:38 UTC (rev 224) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/id-table/idtable.sapdb 2007-07-10 13:01:46 UTC (rev 225) @@ -0,0 +1,5 @@ +#foreach ($tbl in $tables) +insert into ID_TABLE (id_table_id, table_name, next_id, quantity) VALUES ($initialID, '$tbl.Name', $initialIDValue, $initialIDStep); +#set ( $initialID = $initialID + 1 ) +#end + Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/id-table/idtable.sybase =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/id-table/idtable.sybase 2007-07-10 12:57:38 UTC (rev 224) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/id-table/idtable.sybase 2007-07-10 13:01:46 UTC (rev 225) @@ -0,0 +1,4 @@ +#foreach ($tbl in $tables) +insert into ID_TABLE (ID_TABLE_ID, TABLE_NAME, NEXT_ID, QUANTITY) VALUES ($initialID, '$tbl.Name', $initialIDValue, $initialIDStep); +#set ( $initialID = $initialID + 1 ) +#end Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/id-table/scheduler.props =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/id-table/scheduler.props 2007-07-10 12:57:38 UTC (rev 224) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/id-table/scheduler.props 2007-07-10 13:01:46 UTC (rev 225) @@ -0,0 +1,12 @@ +# ------------------------------------------------------------------------- +# The values for the ID_TABLE_ID column in the ID_TABLE will have +# reserved values from 1-100 for scheduler tables. The rest will +# be for tables used for projects. +# ------------------------------------------------------------------------- +initialID = 20 + +# +# Setting for initial Value and Step +# +initialIDValue = 1000 +initialIDStep = 10 Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/id-table/turbine.props =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/id-table/turbine.props 2007-07-10 12:57:38 UTC (rev 224) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/id-table/turbine.props 2007-07-10 13:01:46 UTC (rev 225) @@ -0,0 +1,12 @@ +# ------------------------------------------------------------------------- +# The values for the ID_TABLE_ID column in the ID_TABLE will have +# reserved values from 1-100 for turbine tables. The rest will +# be for tables used for projects. +# ------------------------------------------------------------------------- +initialID = 1 + +# +# Setting for initial Value and Step +# +initialIDValue = 1000 +initialIDStep = 10 Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/load/Control.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/load/Control.vm 2007-07-10 12:57:38 UTC (rev 224) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/load/Control.vm 2007-07-10 13:01:46 UTC (rev 225) @@ -0,0 +1,5 @@ +#set ( $fname= "sql/load/${targetDatabase}/row.vm" ) + +#foreach ($r in $data) +$generator.parse($fname,"","row",$r) +#end Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/load/axion/row.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/load/axion/row.vm 2007-07-10 12:57:38 UTC (rev 224) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/load/axion/row.vm 2007-07-10 13:01:46 UTC (rev 225) @@ -0,0 +1,4 @@ +INSERT INTO $row.Table.Name (## +#set ($comma="")#foreach($col in $row.ColumnValues)$comma${col.Column.Name}#set($comma=",")#end) + VALUES (#set ($comma="")#foreach($col in $row.ColumnValues)$comma${generator.parse("sql/load/hypersonic/val.vm", "", "column", $col)}#set ($comma=",")#end); + Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/load/axion/val.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/load/axion/val.vm 2007-07-10 12:57:38 UTC (rev 224) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/load/axion/val.vm 2007-07-10 13:01:46 UTC (rev 225) @@ -0,0 +1 @@ +#if($column.Column.needEscapedValue())$column.EscapedValue#else$column.Value#end Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/load/db2/row.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/load/db2/row.vm 2007-07-10 12:57:38 UTC (rev 224) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/load/db2/row.vm 2007-07-10 13:01:46 UTC (rev 225) @@ -0,0 +1,3 @@ +INSERT INTO $row.Table.Name (## +#set ($comma="")#foreach($col in $row.ColumnValues)$comma${col.Column.Name}#set($comma=",")#end) + VALUES (#set ($comma="")#foreach($col in $row.ColumnValues)$comma${generator.parse("sql/load/mysql/val.vm", "", "column", $col)}#set ($comma=",")#end); Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/load/db2/val.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/load/db2/val.vm 2007-07-10 12:57:38 UTC (rev 224) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/load/db2/val.vm 2007-07-10 13:01:46 UTC (rev 225) @@ -0,0 +1 @@ +#if($column.Column.needEscapedValue())$column.EscapedValue#else$column.Value#end Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/load/db2400/row.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/load/db2400/row.vm 2007-07-10 12:57:38 UTC (rev 224) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/load/db2400/row.vm 2007-07-10 13:01:46 UTC (rev 225) @@ -0,0 +1,3 @@ +INSERT INTO $row.Table.Name (## +#set ($comma="")#foreach($col in $row.ColumnValues)$comma${col.Column.Name}#set($comma=",")#end) + VALUES (#set ($comma="")#foreach($col in $row.ColumnValues)$comma${generator.parse("sql/load/mysql/val.vm", "", "column", $col)}#set ($comma=",")#end); Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/load/db2400/val.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/load/db2400/val.vm 2007-07-10 12:57:38 UTC (rev 224) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/load/db2400/val.vm 2007-07-10 13:01:46 UTC (rev 225) @@ -0,0 +1 @@ +#if($column.Column.needEscapedValue())$column.EscapedValue#else$column.Value#end Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/load/hypersonic/row.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/load/hypersonic/row.vm 2007-07-10 12:57:38 UTC (rev 224) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/load/hypersonic/row.vm 2007-07-10 13:01:46 UTC (rev 225) @@ -0,0 +1,4 @@ +INSERT INTO $row.Table.Name (## +#set ($comma="")#foreach($col in $row.ColumnValues)$comma${col.Column.Name}#set($comma=",")#end) + VALUES (#set ($comma="")#foreach($col in $row.ColumnValues)$comma${generator.parse("sql/load/hypersonic/val.vm", "", "column", $col)}#set ($comma=",")#end); + Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/load/hypersonic/val.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/load/hypersonic/val.vm 2007-07-10 12:57:38 UTC (rev 224) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/load/hypersonic/val.vm 2007-07-10 13:01:46 UTC (rev 225) @@ -0,0 +1 @@ +#if($column.Column.needEscapedValue())$column.EscapedValue#else$column.Value#end Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/load/msaccess/row.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/load/msaccess/row.vm 2007-07-10 12:57:38 UTC (rev 224) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/load/msaccess/row.vm 2007-07-10 13:01:46 UTC (rev 225) @@ -0,0 +1,3 @@ +INSERT INTO $row.Table.Name (## +#set ($comma="")#foreach($col in $row.ColumnValues)$comma${col.Column.Name}#set($comma=",")#end) + VALUES (#set ($comma="")#foreach($col in $row.ColumnValues)$comma${generator.parse("sql/load/msaccess/val.vm", "", "column", $col)}#set ($comma=",")#end); Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/load/msaccess/val.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/load/msaccess/val.vm 2007-07-10 12:57:38 UTC (rev 224) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/load/msaccess/val.vm 2007-07-10 13:01:46 UTC (rev 225) @@ -0,0 +1 @@ +#if($column.Column.needEscapedValue())$column.EscapedValue#else$column.Value#end Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/load/mssql/row.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/load/mssql/row.vm 2007-07-10 12:57:38 UTC (rev 224) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/load/mssql/row.vm 2007-07-10 13:01:46 UTC (rev 225) @@ -0,0 +1,4 @@ +INSERT INTO $row.Table.Name (## +#set ($comma="")#foreach($col in $row.ColumnValues)$comma${col.Column.Name}#set($comma=",")#end) + VALUES (#set ($comma="")#foreach($col in $row.ColumnValues)$comma${generator.parse("sql/load/mssql/val.vm", "", "column", $col)}#set ($comma=",")#end); + Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/load/mssql/val.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/load/mssql/val.vm 2007-07-10 12:57:38 UTC (rev 224) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/load/mssql/val.vm 2007-07-10 13:01:46 UTC (rev 225) @@ -0,0 +1 @@ +#if($column.Column.needEscapedValue())$column.EscapedValue#else$column.Value#end Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/load/mysql/row.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/load/mysql/row.vm 2007-07-10 12:57:38 UTC (rev 224) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/load/mysql/row.vm 2007-07-10 13:01:46 UTC (rev 225) @@ -0,0 +1,3 @@ +INSERT INTO $row.Table.Name (## +#set ($comma="")#foreach($col in $row.ColumnValues)$comma${col.Column.Name}#set($comma=",")#end) + VALUES (#set ($comma="")#foreach($col in $row.ColumnValues)$comma${generator.parse("sql/load/mysql/val.vm", "", "column", $col)}#set ($comma=",")#end); Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/load/mysql/val.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/load/mysql/val.vm 2007-07-10 12:57:38 UTC (rev 224) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/load/mysql/val.vm 2007-07-10 13:01:46 UTC (rev 225) @@ -0,0 +1 @@ +#if($column.Column.needEscapedValue())$column.EscapedValue#else$column.Value#end Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/load/oracle/row.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/load/oracle/row.vm 2007-07-10 12:57:38 UTC (rev 224) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/load/oracle/row.vm 2007-07-10 13:01:46 UTC (rev 225) @@ -0,0 +1,3 @@ +INSERT INTO $row.Table.Name (## +#set ($comma="")#foreach($col in $row.ColumnValues)$comma${col.Column.Name}#set($comma=",")#end) + VALUES (#set ($comma="")#foreach($col in $row.ColumnValues)$comma${generator.parse("sql/load/oracle/val.vm", "", "column", $col)}#set ($comma=",")#end); Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/load/oracle/val.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/load/oracle/val.vm 2007-07-10 12:57:38 UTC (rev 224) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/load/oracle/val.vm 2007-07-10 13:01:46 UTC (rev 225) @@ -0,0 +1 @@ +#if($column.Column.needEscapedValue())$column.EscapedValue#else$column.Value#end Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/load/postgresql/row.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/load/postgresql/row.vm 2007-07-10 12:57:38 UTC (rev 224) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/load/postgresql/row.vm 2007-07-10 13:01:46 UTC (rev 225) @@ -0,0 +1,4 @@ +INSERT INTO $row.Table.Name (## +#set ($comma="")#foreach($col in $row.ColumnValues)$comma${col.Column.Name}#set($comma=",")#end) + VALUES (#set ($comma="")#foreach($col in $row.ColumnValues)$comma${generator.parse("sql/load/postgresql/val.vm", "", "column", $col)}#set ($comma=",")#end); + Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/load/postgresql/val.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/load/postgresql/val.vm 2007-07-10 12:57:38 UTC (rev 224) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/load/postgresql/val.vm 2007-07-10 13:01:46 UTC (rev 225) @@ -0,0 +1 @@ +#if($column.Column.needEscapedValue())$column.EscapedValue#else$column.Value#end Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/load/sapdb/row.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/load/sapdb/row.vm 2007-07-10 12:57:38 UTC (rev 224) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/load/sapdb/row.vm 2007-07-10 13:01:46 UTC (rev 225) @@ -0,0 +1,3 @@ +INSERT INTO $row.Table.Name (## +#set ($comma="")#foreach($col in $row.ColumnValues)$comma${col.Column.Name}#set($comma=",")#end) + VALUES (#set ($comma="")#foreach($col in $row.ColumnValues)$comma${generator.parse("sql/load/sapdb/val.vm", "", "column", $col)}#set ($comma=",")#end); Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/load/sapdb/val.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/load/sapdb/val.vm 2007-07-10 12:57:38 UTC (rev 224) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/load/sapdb/val.vm 2007-07-10 13:01:46 UTC (rev 225) @@ -0,0 +1 @@ +#if($column.Column.needEscapedValue())$column.EscapedValue#else$column.Value#end Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/load/sybase/row.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/load/sybase/row.vm 2007-07-10 12:57:38 UTC (rev 224) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/load/sybase/row.vm 2007-07-10 13:01:46 UTC (rev 225) @@ -0,0 +1,3 @@ +INSERT INTO $row.Table.Name (## +#set ($comma="")#foreach($col in $row.ColumnValues)$comma${col.Column.Name}#set($comma=",")#end) + VALUES (#set ($comma="")#foreach($col in $row.ColumnValues)$comma${generator.parse("sql/load/sybase/val.vm", "", "column", $col)}#set ($comma=",")#end); Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/load/sybase/val.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/load/sybase/val.vm 2007-07-10 12:57:38 UTC (rev 224) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/_unused/sql/load/sybase/val.vm 2007-07-10 13:01:46 UTC (rev 225) @@ -0,0 +1 @@ +#if($column.Column.needEscapedValue())$column.EscapedValue#else$column.Value#end From svnnotify △ sourceforge.jp Tue Jul 10 22:19:09 2007 From: svnnotify △ sourceforge.jp (svnnotify △ sourceforge.jp) Date: Tue, 10 Jul 2007 22:19:09 +0900 Subject: [pal-cvs 2494] [226] added mydbflute Message-ID: <20070710131909.415E02AC01C@users.sourceforge.jp> Revision: 226 http://svn.sourceforge.jp/cgi-bin/viewcvs.cgi?root=pal&view=rev&rev=226 Author: takeharu Date: 2007-07-10 22:19:08 +0900 (Tue, 10 Jul 2007) Log Message: ----------- added mydbflute Added Paths: ----------- pompei/trunk/mydbflute/dbflute-0.5.2/build-torque.xml pompei/trunk/mydbflute/dbflute-0.5.2/build.properties pompei/trunk/mydbflute/dbflute-0.5.2/templates/readme.txt -------------- next part -------------- Added: pompei/trunk/mydbflute/dbflute-0.5.2/build-torque.xml =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/build-torque.xml 2007-07-10 13:01:46 UTC (rev 225) +++ pompei/trunk/mydbflute/dbflute-0.5.2/build-torque.xml 2007-07-10 13:19:08 UTC (rev 226) @@ -0,0 +1,543 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Added: pompei/trunk/mydbflute/dbflute-0.5.2/build.properties =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/build.properties 2007-07-10 13:01:46 UTC (rev 225) +++ pompei/trunk/mydbflute/dbflute-0.5.2/build.properties 2007-07-10 13:19:08 UTC (rev 226) @@ -0,0 +1,156 @@ +# ======================================================================================= +# for All +# ======= + +# ------------------------------------------------------------------- +# P R O J E C T +# ------------------------------------------------------------------- +# @FirstProperty +# @Required +torque.project = pompei + +# ------------------------------------------------------------------- +# T A R G E T D A T A B A S E +# ------------------------------------------------------------------- +# This is the target database, only considered when generating +# the SQL for your Torque project. Your possible choices are: +# +# axion, cloudscape, db2, db2400, hypersonic, interbase, mssql, +# mysql, oracle, postgresql, sapdb, sybase, firebird, derby, h2 +# ------------------------------------------------------------------- +# @FirstProperty +# @Required +torque.database = derby + +# ------------------------------------------------------------------- +# T A R G E T L A N G U A G E +# ------------------------------------------------------------------- +# (Default 'java') +# The target language. Your possible choices are: +# java, csharp +# ------------------------------------------------------------------- +# @FirstProperty +#torque.targetLanguage = java + + + +# ======================================================================================= +# for OM task +# =========== + +# _/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/ +# Basic +# _/_/_/_/ +# /--------------------------------------------------------------------------- +# [Output Directory] +# java.dir: (Default '../src/main/java') +# The base output directory. +# +# If this value is '../src/main/java' and your project stype is under maven, +# you don't need to set up this property! +# +# {project} +# | +# |-dbflute_ldb +# | |-build-ldb.properties +# | |-... +# | +# |-src/main/java // *Here! +# |-src/main/resources +# |-... +# +# +# @FirstProperty +#torque.java.dir = ../src/main/java +# ----------------/ + +# _/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/ +# Package +# _/_/ +# /--------------------------------------------------------------------------- +# [EntityDao Package] +# packageBase: (Default '') +# The base directory of package. +# +# *If this property is specified and other package properties is not specified, +# Then The packages of generated class are as follows: +# +# ex) packageBase = org.seasar.dbflute.example.dbflute.ldb +# baseCommonPackage --> org.seasar.dbflute.example.dbflute.ldb.allcommon +# baseBehaviorPackage --> org.seasar.dbflute.example.dbflute.ldb.bsbhv +# baseDaoPackage --> org.seasar.dbflute.example.dbflute.ldb.bsdao +# baseEntityPackage --> org.seasar.dbflute.example.dbflute.ldb.bsentity +# conditionBeanPackage --> org.seasar.dbflute.example.dbflute.ldb.cbean +# extendedBehaviorPackage --> org.seasar.dbflute.example.dbflute.ldb.exbhv +# extendedDaoPackage --> org.seasar.dbflute.example.dbflute.ldb.exdao +# extendedEntityPackage --> org.seasar.dbflute.example.dbflute.ldb.exentity +# +# *If this property is not specified, you should specify the other package properties. +# +# +# baseCommonPackage: (Default Java:'allcommon' C#:'allcommon') +# baseBehaviorPackage: (Default Java:'bsbhv' C#:'bsbhv') +# baseDaoPackage: (Default Java:'bsdao' C#:'bsdao') +# baseEntityPackage: (Default Java:'bsentity' C#:'bsentity') +# conditionBeanPackage: (Default Java:'cbean' C#:'cbean') +# extendedBehaviorPackage: (Default Java:'exbhv' C#:'exbhv') +# extendedDaoPackage: (Default Java:'exdao' C#:'exdao') +# extendedEntityPackage: (Default Java:'exentity' C#:'exentity') +# +# @FirstProperty +torque.packageBase = jp.sf.pal.pompei +# ----------------/ + +# _/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/ +# S2Dao Adjustment +# _/_/_/_/_/_/ +# /--------------------------------------------------------------------------- +# [S2Dao Version] +# s2daoVersion: (Default [The latest version]) +# +# @JavaOnly +torque.s2daoVersion = 1.0.43 +# ----------------/ + + + +# ======================================================================================= +# for JDBC task +# ============= + +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# [Database Informaition] +# +# * * * * * * * * * * * * * * * * * * * * * * * * * +# You shuold use './dfprop/databaseInfoMap.dfprop' +# Look the file! +# * * * * * * * * * * * * * * * * * * * * * * * * * +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + +# _/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/ +# Adavance +# _/_/ + +# /--------------------------------------------------------------------------- +# [Sequence] +# sequenceDefinitionMap: (Default 'map:{}') +# The method 'XxxDao#selectNextVal()' is generated for its table primary key. +# +# ex) public String selectNextVal_SQL = "select gen_id(BOOK_BOOK_ID_INC, 1) from RDB$DATABASE"; +# public java.math.BigDecimal selectNextVal(); +# // This example is for the database of Firebird +# +# sequenceReturnType: (Default 'java.math.BigDecimal') +# The return type of The method 'XxxDao#selectNextVal()'. +# + +# +# *Apache Derby does not support Sequence-Object. +# But I want to test this property. +# +torque.sequenceDefinitionMap = map:{ \ + prodcts = PRODUCTS_PRODUCTS_ID_INC \ + } + +#torque.sequenceReturnType = java.lang.Integer + Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/readme.txt =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/readme.txt 2007-07-10 13:01:46 UTC (rev 225) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/readme.txt 2007-07-10 13:19:08 UTC (rev 226) @@ -0,0 +1,26 @@ + + +# ======================================================================================== +# [./doc] +# ======= + +It is the directory that save velocity template for document task. + + + [./doc/Control.vm] : Velocity template of main. + [./doc/html/datamodel.vm] : Velocity template of data model as html. + [./doc/html/table.vm] : Velocity template of table list as html. + + + + + + +# ======================================================================================== +# [./om] +# ====== + +It is the directory that save velocity template for om task. (VERY IMPORTANT) +This directory see [./sql]. + + From svnnotify △ sourceforge.jp Tue Jul 10 22:19:34 2007 From: svnnotify △ sourceforge.jp (svnnotify △ sourceforge.jp) Date: Tue, 10 Jul 2007 22:19:34 +0900 Subject: [pal-cvs 2495] [227] added mydbflute Message-ID: <20070710131934.C6F1B2AC02E@users.sourceforge.jp> Revision: 227 http://svn.sourceforge.jp/cgi-bin/viewcvs.cgi?root=pal&view=rev&rev=227 Author: takeharu Date: 2007-07-10 22:19:34 +0900 (Tue, 10 Jul 2007) Log Message: ----------- added mydbflute Added Paths: ----------- pompei/trunk/mydbflute/dbflute-0.5.2/templates/data/ pompei/trunk/mydbflute/dbflute-0.5.2/templates/data/Control.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/data/dataset.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/data/dump/ pompei/trunk/mydbflute/dbflute-0.5.2/templates/data/dump/Control.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/data/dump/bottom.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/data/dump/row.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/data/dump/top.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/data/table.vm -------------- next part -------------- Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/data/Control.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/data/Control.vm 2007-07-10 13:19:08 UTC (rev 226) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/data/Control.vm 2007-07-10 13:19:34 UTC (rev 227) @@ -0,0 +1,22 @@ +#set ( $hfname= "data/dataset.vm" ) +#set ( $fname= "data/table.vm" ) + +#foreach ($dataModel in $dataModels) +#foreach ($database in $dataModel.Databases) + #if ($project) + #if ($dataModel.MultipleDatabases) + #set ( $outFile = "${project}-${database.Name}-data.dtd" ) + #else + #set ( $outFile = "${project}-data.dtd" ) + #end + $generator.parse($hfname,$outFile,"tables",$database.Tables) + #foreach ($tbl in $database.Tables) + $generator.parse($fname,$outFile,"table",$tbl) + #end + #else + #foreach ($tbl in $database.Tables) + $generator.parse($fname,"","table",$tbl) + #end + #end +#end +#end Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/data/dataset.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/data/dataset.vm 2007-07-10 13:19:08 UTC (rev 226) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/data/dataset.vm 2007-07-10 13:19:34 UTC (rev 227) @@ -0,0 +1,9 @@ +1)| +#end + ${tbl.JavaName}#end +)*> + + Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/data/dump/Control.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/data/dump/Control.vm 2007-07-10 13:19:08 UTC (rev 226) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/data/dump/Control.vm 2007-07-10 13:19:34 UTC (rev 227) @@ -0,0 +1,37 @@ +#set ( $tfname= "data/dump/top.vm" ) +#set ( $fname= "data/dump/row.vm" ) +#set ( $bfname= "data/dump/bottom.vm" ) +#set ($q = '"') + +#foreach ($dataModel in $dataModels) +#foreach ($database in $dataModel.Databases) + +#if ($project) + #if ($database.Name) + #set ($outFile="${project}-${database.Name}-${dataset}-data.xml") + #else + #set ( $outFile = "${project}-${dataset}-data.xml" ) + #end +#else + #set ( $outFile = "" ) +#end + +$generator.parse($tfname,$outFile,"dataset",$dataset) +#foreach ($tbl in $database.Tables) +fetching table $tbl.Name + #foreach ($r in $tableTool.fetch($tbl.Name)).## + #set ($rout = "<$tbl.JavaName") + #foreach ($col in $tbl.Columns) + #if ($r.get($col.Name)) + #set ($cval = $r.get($col.Name)) + #set ($rout = "$rout ${col.JavaName}=$q$escape.getText($cval)$q") + #end + #end + #set ($rout = "$rout/>") + $generator.parse($fname,$outFile,"row", $rout) + #end +#end +$generator.parse($bfname,$outFile,"tables",$database.Tables) + +#end +#end Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/data/dump/bottom.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/data/dump/bottom.vm 2007-07-10 13:19:08 UTC (rev 226) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/data/dump/bottom.vm 2007-07-10 13:19:34 UTC (rev 227) @@ -0,0 +1 @@ + Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/data/dump/row.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/data/dump/row.vm 2007-07-10 13:19:08 UTC (rev 226) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/data/dump/row.vm 2007-07-10 13:19:34 UTC (rev 227) @@ -0,0 +1 @@ + $row Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/data/dump/top.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/data/dump/top.vm 2007-07-10 13:19:08 UTC (rev 226) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/data/dump/top.vm 2007-07-10 13:19:34 UTC (rev 227) @@ -0,0 +1,4 @@ + + + + Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/data/table.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/data/table.vm 2007-07-10 13:19:08 UTC (rev 226) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/data/table.vm 2007-07-10 13:19:34 UTC (rev 227) @@ -0,0 +1,8 @@ + + + From svnnotify △ sourceforge.jp Tue Jul 10 22:19:59 2007 From: svnnotify △ sourceforge.jp (svnnotify △ sourceforge.jp) Date: Tue, 10 Jul 2007 22:19:59 +0900 Subject: [pal-cvs 2496] [228] added mydbflute Message-ID: <20070710131959.4411F2AC010@users.sourceforge.jp> Revision: 228 http://svn.sourceforge.jp/cgi-bin/viewcvs.cgi?root=pal&view=rev&rev=228 Author: takeharu Date: 2007-07-10 22:19:59 +0900 (Tue, 10 Jul 2007) Log Message: ----------- added mydbflute Added Paths: ----------- pompei/trunk/mydbflute/dbflute-0.5.2/templates/doc/ pompei/trunk/mydbflute/dbflute-0.5.2/templates/doc/Control.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/doc/anakia/ pompei/trunk/mydbflute/dbflute-0.5.2/templates/doc/anakia/datamodel.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/doc/anakia/table.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/doc/html/ pompei/trunk/mydbflute/dbflute-0.5.2/templates/doc/html/datamodel.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/doc/html/table.vm -------------- next part -------------- Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/doc/Control.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/doc/Control.vm 2007-07-10 13:19:34 UTC (rev 227) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/doc/Control.vm 2007-07-10 13:19:59 UTC (rev 228) @@ -0,0 +1,14 @@ +#set ( $basepath = $generator.OutputPath) + +#foreach ($dataModel in $dataModels) + + #if ($outputFormat=="html") + #set ( $outFile = "${dataModel.name}.html" ) + #else + #set ( $outFile = "${dataModel.name}.xml" ) + #end + + File to be created: $outFile + + $generator.parse("doc/$outputFormat/datamodel.vm",$outFile,"dataModel",$dataModel) +#end Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/doc/anakia/datamodel.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/doc/anakia/datamodel.vm 2007-07-10 13:19:34 UTC (rev 227) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/doc/anakia/datamodel.vm 2007-07-10 13:19:59 UTC (rev 228) @@ -0,0 +1,34 @@ +#set ( $database = $dataModel.database ) + + + + + $dataModel.name + + + + +

+ + + + + + + #foreach ($tbl in $database.tables) + + + + + + #end +
Table NameOM ClassDescription
$tbl.Name$tbl.JavaName$!tbl.Description
+

+ + #foreach ($tbl in $database.tables) + $generator.parse("doc/anakia/table.vm",$outFile,"table",$tbl) + #end + +

+ + Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/doc/anakia/table.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/doc/anakia/table.vm 2007-07-10 13:19:34 UTC (rev 227) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/doc/anakia/table.vm 2007-07-10 13:19:59 UTC (rev 228) @@ -0,0 +1,37 @@ + +

+ $!table.Description +

+ + + + + + + + + + + + + + #foreach ($col in $table.Columns) + + + + + #if ($col.DefaultValue && !$col.DefaultValue.equalsIgnoreCase("NULL") ) + + #else + + #end + + + + + + + #end +
NameTypeSizeDefaultJavaNamePKFKnot nullDescription
$col.Name$col.Type$col.printSize()$escape.getText($col.DefaultValue)$col.JavaName#if ($col.isPrimaryKey()==true)X#end#if ($col.isForeignKey()==true)X#end#if ($col.isNotNull()==true)X#end$!col.Description
+ +
Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/doc/html/datamodel.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/doc/html/datamodel.vm 2007-07-10 13:19:34 UTC (rev 227) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/doc/html/datamodel.vm 2007-07-10 13:19:59 UTC (rev 228) @@ -0,0 +1,37 @@ +#set ( $database = $dataModel.database ) +${database.initializeClassificationDeployment()} + + +
+ $dataModel.name + +
+ + + + + + + + + + #foreach ($tbl in $database.tables) + + + + + + + #end +
Table NameEntity NameForeign TableRefferer Table
$tbl.Name$tbl.JavaName$tbl.ForeignTableNameCommaStringWithHtmlHref$tbl.ReferrerTableNameCommaStringWithHtmlHref
+ + #foreach ($tbl in $database.tables) + $generator.parse("doc/html/table.vm",$outFile,"table",$tbl) + #end + + + Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/doc/html/table.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/doc/html/table.vm 2007-07-10 13:19:34 UTC (rev 227) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/doc/html/table.vm 2007-07-10 13:19:59 UTC (rev 228) @@ -0,0 +1,48 @@ +
+

$table.Name

+$!table.Description +

+ + + + + + + + + + + + + + + + +#foreach ($col in $table.Columns) + + + + + + + + + + + + + + + +#end +
PKINCUQNameTypeSizeNotNullDefaultForeignTableReffererTableCapPropName${table.database.targetLanguageInitCap}TypeClassification
#if ($col.isPrimaryKey()==true)o#else  #end
#if ($col.isAutoIncrement()==true)o#else  #end
#if ($col.isUnique()==true)o#else  #end
$col.Name$col.dbType#if ($col.printSize() && $col.printSize().length() > 0) $col.printSize() #else  #end
#if ($col.isNotNull()==true)o#else  #end
#if ($col.DefaultValue) $col.DefaultValue#else  #end${col.ForeignTableName} ${col.ReferrerCommaStringWithHtmlHref} $col.JavaName$col.JavaNative#if ($col.hasClassification()==true)${col.ClassificationName}#else  #end
+ From svnnotify △ sourceforge.jp Tue Jul 10 22:25:28 2007 From: svnnotify △ sourceforge.jp (svnnotify △ sourceforge.jp) Date: Tue, 10 Jul 2007 22:25:28 +0900 Subject: [pal-cvs 2497] [229] added mydbflute Message-ID: <20070710132528.22FD12AC030@users.sourceforge.jp> Revision: 229 http://svn.sourceforge.jp/cgi-bin/viewcvs.cgi?root=pal&view=rev&rev=229 Author: takeharu Date: 2007-07-10 22:21:18 +0900 (Tue, 10 Jul 2007) Log Message: ----------- added mydbflute Added Paths: ----------- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/Control.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/CacheDaoSelector.vmnet pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/ClassificationDefinition.vmnet pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/DaoDicon.vmnet pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/DaoReadable.vmnet pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/DaoSelector.vmnet pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/DaoWritable.vmnet pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/Entity.vmnet pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/EntityDefinedCommonColumn.vmnet pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/GenMetaData.vmnet pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/annotation/ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/annotation/OutsideSql.vmnet pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/bhv/ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/bhv/AbstractBehaviorReadable.vmnet pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/bhv/AbstractBehaviorWritable.vmnet pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/bhv/BehaviorReadable.vmnet pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/bhv/BehaviorWritable.vmnet pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/cbean/ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/cbean/AbstractConditionBean.vmnet pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/cbean/AbstractConditionQuery.vmnet pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/cbean/ConditionBean.vmnet pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/cbean/ConditionBeanContext.vmnet pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/cbean/ConditionQuery.vmnet pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/cbean/FetchNarrowingBean.vmnet pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/cbean/FetchNarrowingBeanContext.vmnet pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/cbean/ListResultBean.vmnet pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/cbean/OrderByBean.vmnet pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/cbean/PagingBean.vmnet pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/cbean/PagingResultBean.vmnet pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/cbean/SelectResource.vmnet pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/cbean/SimpleOrderByBean.vmnet pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/cbean/SimplePagingBean.vmnet pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/cbean/ckey/ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/cbean/ckey/ConditionKey.vmnet pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/cbean/ckey/ConditionKey_equal.vmnet pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/cbean/ckey/ConditionKey_greaterEqual.vmnet pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/cbean/ckey/ConditionKey_greaterThan.vmnet pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/cbean/ckey/ConditionKey_inScope.vmnet pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/cbean/ckey/ConditionKey_isNotNull.vmnet pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/cbean/ckey/ConditionKey_isNull.vmnet pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/cbean/ckey/ConditionKey_lessEqual.vmnet pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/cbean/ckey/ConditionKey_lessThan.vmnet pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/cbean/ckey/ConditionKey_notEqual.vmnet pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/cbean/ckey/ConditionKey_notInScope.vmnet pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/cbean/ckey/ConditionKey_prefixSearch.vmnet pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/cbean/cvalue/ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/cbean/cvalue/ConditionValue.vmnet pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/cbean/sqlclause/ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/cbean/sqlclause/AbstractSqlClause.vmnet pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/cbean/sqlclause/OrderByClause.vmnet pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/cbean/sqlclause/OrderByElement.vmnet pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/cbean/sqlclause/SqlClause.vmnet pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/cbean/sqlclause/SqlClause_db2.vmnet pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/cbean/sqlclause/SqlClause_default.vmnet pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/cbean/sqlclause/SqlClause_derby.vmnet pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/cbean/sqlclause/SqlClause_firebird.vmnet pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/cbean/sqlclause/SqlClause_interbase.vmnet pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/cbean/sqlclause/SqlClause_mssql.vmnet pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/cbean/sqlclause/SqlClause_mysql.vmnet pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/cbean/sqlclause/SqlClause_oracle.vmnet pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/cbean/sqlclause/SqlClause_postgresql.vmnet pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/dbmeta/ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/dbmeta/AbstractDBMeta.vmnet pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/dbmeta/DBMeta.vmnet pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/dbmeta/DBMetaInstanceHandler.vmnet pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/exception/ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/exception/DaoExceptionContext.vmnet pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/exception/RecordHasAlreadyBeenDeletedException.vmnet pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/exception/RecordHasOverlappedException.vmnet pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/exception/SelectedCountExceedMaxCountException.vmnet pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/helper/ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/helper/MapListString.vmnet pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/helper/MapListStringImpl.vmnet pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/helper/MapStringBuilder.vmnet pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/helper/MapStringBuilderImpl.vmnet pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/interceptor/ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/interceptor/CommonColumnSetupAbstractInterceptor.vmnet pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/interceptor/CommonColumnSetupBeforeDeleteInterceptor.vmnet pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/interceptor/CommonColumnSetupBeforeInsertInterceptor.vmnet pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/interceptor/CommonColumnSetupBeforeUpdateInterceptor.vmnet pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/s2dao/ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/s2dao/FetchNarrowingResultSetFactory.vmnet pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/s2dao/FetchNarrowingResultSetWrapper.vmnet pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/s2dao/S2DaoInterceptor.vmnet pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/s2dao/S2DaoMetaDataExtension.vmnet pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/s2dao/S2DaoMetaDataFactoryImpl.vmnet pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/s2dao/S2DaoSelectDynamicCommand.vmnet pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/bsbhv/ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/bsbhv/BaseBhv.vmnet pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/bsbhv/BaseBhvImpl.vmnet pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/bsdao/ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/bsdao/BaseDao.vmnet pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/bsdao/BsParameterBean.vmnet pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/bsdao/customize/ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/bsdao/customize/BaseCustomizeDao.vmnet pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/bsentity/ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/bsentity/BaseEntity.vmnet pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/bsentity/PlainBaseEntity.vmnet pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/bsentity/dbmeta/ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/bsentity/dbmeta/DBMetaImpl.vmnet pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/cbean/ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/cbean/AbstractBsConditionQuery.vmnet pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/cbean/BsConditionBean.vmnet pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/cbean/BsConditionInlineQuery.vmnet pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/cbean/BsConditionQuery.vmnet pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/cbean/ExConditionBean.vmnet pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/cbean/ExConditionQuery.vmnet pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/cbean/NestSelectSetupper.vmnet pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/exbhv/ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/exbhv/ExtendedBhv.vmnet pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/exbhv/ExtendedBhvImpl.vmnet pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/exdao/ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/exdao/ExParameterBean.vmnet pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/exdao/ExtendedDao.vmnet pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/exentity/ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/exentity/ExtendedEntity.vmnet pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/sbean/ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/sbean/ArgumentBean.vmnet pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/sbean/SqlParameterBeanBs.vmnet pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/sbean/SqlParameterBeanEx.vmnet pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/AccessContext.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/CacheDaoSelector.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/ClassificationDefinition.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/DaoDicon.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/DaoReadable.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/DaoSelector.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/DaoWritable.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/Entity.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/EntityDefinedCommonColumn.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/GenMetaData.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/annotation/ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/annotation/OutsideSql.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/bhv/ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/bhv/AbstractBehaviorReadable.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/bhv/AbstractBehaviorWritable.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/bhv/BehaviorReadable.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/bhv/BehaviorWritable.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/bhv/batch/ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/bhv/batch/TokenFileOutputOption.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/bhv/batch/TokenFileOutputResult.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/bhv/batch/TokenFileReflectionFailure.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/bhv/batch/TokenFileReflectionOption.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/bhv/batch/TokenFileReflectionResult.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/bhv/load/ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/bhv/load/LoadRefererOption.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/bhv/setup/ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/bhv/setup/ConditionBeanSetupper.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/bhv/setup/EntityListSetupper.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/bhv/setup/ValueLabelBox.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/bhv/setup/ValueLabelSetupper.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/AbstractConditionBean.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/AbstractConditionQuery.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/ConditionBean.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/ConditionBeanContext.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/ConditionQuery.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/FetchNarrowingBean.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/FetchNarrowingBeanContext.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/ListResultBean.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/OrderByBean.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/PagingBean.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/PagingResultBean.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/SelectResource.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/SimpleOrderByBean.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/SimplePagingBean.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/ckey/ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/ckey/ConditionKey.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/ckey/ConditionKey_equal.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/ckey/ConditionKey_greaterEqual.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/ckey/ConditionKey_greaterThan.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/ckey/ConditionKey_inScope.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/ckey/ConditionKey_isNotNull.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/ckey/ConditionKey_isNull.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/ckey/ConditionKey_lessEqual.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/ckey/ConditionKey_lessThan.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/ckey/ConditionKey_likeSearch.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/ckey/ConditionKey_notEqual.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/ckey/ConditionKey_notInScope.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/ckey/ConditionKey_prefixSearch.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/coption/ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/coption/ConditionOption.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/coption/FromToOption.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/coption/InScopeOption.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/coption/LikeSearchOption.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/coption/SimpleStringOption.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/coption/parts/ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/coption/parts/SplitOptionParts.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/coption/parts/ToSingleByteOptionParts.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/coption/parts/ToUpperLowerCaseOptionParts.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/coption/parts/local/ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/coption/parts/local/JapaneseOptionPartsAgent.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/cvalue/ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/cvalue/ConditionValue.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/grouping/ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/grouping/GroupingOption.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/grouping/GroupingRowEndDeterminer.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/grouping/GroupingRowResource.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/grouping/GroupingRowSetupper.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/mapping/ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/mapping/EntityDtoMapper.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/sqlclause/ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/sqlclause/AbstractSqlClause.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/sqlclause/OrderByClause.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/sqlclause/OrderByElement.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/sqlclause/SqlClause.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/sqlclause/SqlClause_db2.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/sqlclause/SqlClause_default.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/sqlclause/SqlClause_derby.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/sqlclause/SqlClause_firebird.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/sqlclause/SqlClause_interbase.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/sqlclause/SqlClause_mssql.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/sqlclause/SqlClause_mysql.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/sqlclause/SqlClause_oracle.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/sqlclause/SqlClause_postgresql.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/dbmeta/ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/dbmeta/AbstractDBMeta.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/dbmeta/DBMeta.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/dbmeta/DBMetaInstanceHandler.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/exception/ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/exception/DaoExceptionContext.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/exception/RecordHasAlreadyBeenDeletedException.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/exception/RecordHasOverlappedException.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/exception/SelectedCountExceedMaxCountException.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/helper/ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/helper/MapListString.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/helper/MapListStringImpl.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/helper/MapStringBuilder.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/helper/MapStringBuilderImpl.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/helper/character/ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/helper/character/GeneralCharacter.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/helper/character/JapaneseCharacter.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/helper/character/impl/ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/helper/character/impl/GeneralCharacterImpl.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/helper/character/impl/JapaneseCharacterImpl.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/helper/token/ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/helper/token/file/ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/helper/token/file/FileMakingCallback.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/helper/token/file/FileMakingHeaderInfo.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/helper/token/file/FileMakingOption.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/helper/token/file/FileMakingRowResource.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/helper/token/file/FileMakingSimpleFacade.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/helper/token/file/FileToken.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/helper/token/file/FileTokenizingCallback.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/helper/token/file/FileTokenizingHeaderInfo.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/helper/token/file/FileTokenizingOption.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/helper/token/file/FileTokenizingRowResource.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/helper/token/file/impl/ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/helper/token/file/impl/FileMakingSimpleFacadeImpl.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/helper/token/file/impl/FileTokenImpl.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/helper/token/line/ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/helper/token/line/LineMakingOption.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/helper/token/line/LineToken.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/helper/token/line/LineTokenizingOption.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/helper/token/line/impl/ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/helper/token/line/impl/LineTokenImpl.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/interceptor/ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/interceptor/CommonColumnSetupAbstractInterceptor.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/interceptor/CommonColumnSetupBeforeDeleteInterceptor.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/interceptor/CommonColumnSetupBeforeInsertInterceptor.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/interceptor/CommonColumnSetupBeforeUpdateInterceptor.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/jdbc/ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/jdbc/history/ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/jdbc/history/PreparedExecutionBean.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/jdbc/history/PreparedParameterElement.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/jdbc/history/StatementHistory.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/jdbc/history/StatementHistoryWitness.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/jdbc/history/TraceablePreparedStatement.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/s2dao/ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/s2dao/FetchNarrowingResultSetFactory.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/s2dao/FetchNarrowingResultSetWrapper.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/s2dao/S2BeanMetaDataFactoryImpl.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/s2dao/S2DaoInterceptor.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/s2dao/S2DaoMetaDataExtension.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/s2dao/S2DaoMetaDataFactoryImpl.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/s2dao/S2DaoSelectDynamicCommand.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/s2dao/S2DaoStatementFactory.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/s2dao/history/ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/bsbhv/ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/bsbhv/BaseBhv.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/bsdao/ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/bsdao/BaseDao.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/bsdao/BsParameterBean.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/bsdao/customize/ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/bsdao/customize/BaseCustomizeDao.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/bsentity/ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/bsentity/BaseEntity.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/bsentity/PlainBaseEntity.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/bsentity/dbmeta/ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/bsentity/dbmeta/DBMetaImpl.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/cbean/ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/cbean/AbstractBsConditionQuery.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/cbean/BsConditionBean.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/cbean/BsConditionInlineQuery.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/cbean/BsConditionQuery.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/cbean/ExConditionBean.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/cbean/ExConditionQuery.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/cbean/NestSelectSetupper.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/exbhv/ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/exbhv/ExtendedBhv.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/exdao/ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/exdao/ExParameterBean.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/exdao/ExtendedDao.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/exentity/ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/exentity/ExtendedEntity.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/sbean/ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/sbean/ArgumentBean.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/sbean/SqlParameterBeanBs.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/sbean/SqlParameterBeanEx.vm pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/sql2entity-Control.vm -------------- next part -------------- Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/Control.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/Control.vm 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/Control.vm 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,1457 @@ + + +targetdatabase = $targetDatabase + +## +## Loop by data-model. +## +#foreach ($dataModel in $dataModels) + + ## + ## Loop by database. + ## + #foreach ($database in $dataModel.Databases) + + ## - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + ## Initialize CustomizeDao and AdditionalForeignKey and ClassificationDeployment and IncludeQuery. + ## - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + ${database.initializeCustomizeDao()} + ${database.initializeAdditionalForeignKey()} + ${database.initializeClassificationDeployment()} + ${database.initializeIncludeQuery()} + + ## ***************************************************************************************************************** + ## Global Paramter + ## *************** + ## =================================================================================== + ## Language + ## ======== + #set ($glTargetLanguage = ${database.targetLanguage}) + + ## =================================================================================== + ## Extension + ## ========= + #set ($glTemplateFileExtension = ${database.templateFileExtension}) + #set ($glClassFileExtension = ${database.classFileExtension}) + + ## ----------------------------------------------------- + ## Prefix + ## ------ + #set ($glProjectPrefix = ${database.projectPrefix}) + #set ($glBasePrefix = ${database.basePrefix}) + #set ($glBaseSuffixForEntity = ${database.baseSuffixForEntity}) + + ## ----------------------------------------------------- + ## Dicon + ## ----- + #set ($glDaoDiconNamespace = "${database.daoDiconNamespace}") + #set ($glDaoDiconFileName = "${database.daoDiconFileName}") + #set ($glJdbcDiconResourceName = "${database.jdbcDiconResourceName}") + + ## ----------------------------------------------------- + ## Class Name + ## ---------- + ## [Allcommon-Base-AccessContext] + #set ($glAccessContextName = "${glProjectPrefix}AccessContext") + + ## [Allcommon-Base-Dao] + #set ($glDaoReadableInterfaceName = "${glProjectPrefix}DaoReadable") + #set ($glDaoWritableInterfaceName = "${glProjectPrefix}DaoWritable") + + ## [Allcommon-Base-Entity] + #set ($glEntityInterfaceName = "${glProjectPrefix}Entity") + #set ($glEntityDefinedCommonColumnInterfaceName = "${glProjectPrefix}EntityDefinedCommonColumn") + + ## [Allcommon-Base-DaoSelector] + #set ($glDaoSelectorInterfaceName = "${glProjectPrefix}DaoSelector") + #set ($glCacheDaoSelectorName = "${glProjectPrefix}CacheDaoSelector") + + ## [Allcommon-Base-GenMetaData] + #set ($glGenMetaDataClassName = "${glProjectPrefix}GenMetaData") + + ## [Allcommon-Base-ClassificationDefinition] + #set ($glClassificationDefinition = "${glProjectPrefix}ClassificationDefinition") + + ## [Allcommon-Behavior] + #set ($glBehaviorReadableAbstractName = "${glProjectPrefix}AbstractBehaviorReadable") + #set ($glBehaviorWritableAbstractName = "${glProjectPrefix}AbstractBehaviorWritable") + #set ($glBehaviorReadableInterfaceName = "${glProjectPrefix}BehaviorReadable") + #set ($glBehaviorWritableInterfaceName = "${glProjectPrefix}BehaviorWritable") + + ## [Allcommon-Behavior-Batch] + #set ($glTokenFileReflectionOptionName = "${glProjectPrefix}TokenFileReflectionOption") + #set ($glTokenFileReflectionResultName = "${glProjectPrefix}TokenFileReflectionResult") + #set ($glTokenFileReflectionFailureName = "${glProjectPrefix}TokenFileReflectionFailure") + #set ($glTokenFileOutputOptionName = "${glProjectPrefix}TokenFileOutputOption") + #set ($glTokenFileOutputResultName = "${glProjectPrefix}TokenFileOutputResult") + + ## [Allcommon-Behavior-Load] + #set ($glLoadRefererOptionName = "${glProjectPrefix}LoadRefererOption") + + ## [Allcommon-Behavior-Setup] + #set ($glConditionBeanSetupperName = "${glProjectPrefix}ConditionBeanSetupper") + #set ($glEntityListSetupperName = "${glProjectPrefix}EntityListSetupper") + #set ($glValueLabelSetupperName = "${glProjectPrefix}ValueLabelSetupper") + #set ($glValueLabelBoxName = "${glProjectPrefix}ValueLabelBox") + + ## [Allcommon-ConditionBean] + #set ($glFetchNarrowingBeanInterfaceName = "${glProjectPrefix}FetchNarrowingBean") + #set ($glSimplePagingBeanName = "${glProjectPrefix}SimplePagingBean") + #set ($glSimpleOrderByBeanName = "${glProjectPrefix}SimpleOrderByBean") + #set ($glConditionBeanInterfaceName = "${glProjectPrefix}ConditionBean") + #set ($glConditionQueryInterfaceName = "${glProjectPrefix}ConditionQuery") + #set ($glOrderByBeanInterfaceName = "${glProjectPrefix}OrderByBean") + #set ($glPagingBeanInterfaceName = "${glProjectPrefix}PagingBean") + #set ($glSelectResourceInterfaceName = "${glProjectPrefix}SelectResource") + #set ($glFetchNarrowingBeanContextName = "${glProjectPrefix}FetchNarrowingBeanContext") + #set ($glPagingResultBeanName = "${glProjectPrefix}PagingResultBean") + #set ($glListResultBeanName = "${glProjectPrefix}ListResultBean") + #set ($glConditionBeanContextName = "${glProjectPrefix}ConditionBeanContext") + #set ($glConditionBeanAbstractName = "${glProjectPrefix}AbstractConditionBean") + #set ($glConditionQueryAbstractName = "${glProjectPrefix}AbstractConditionQuery") + #set ($glConditionKeyName = "${glProjectPrefix}ConditionKey") + #set ($glConditionValueName = "${glProjectPrefix}ConditionValue") + + ## [Allcommon-ConditionBean-Option] + #set ($glConditionOptionInterfaceName = "${glProjectPrefix}ConditionOption") + #set ($glConditionOptionSimpleStringName = "${glProjectPrefix}SimpleStringOption") + #set ($glConditionOptionFromToName = "${glProjectPrefix}FromToOption") + #set ($glConditionOptionLikeSearchName = "${glProjectPrefix}LikeSearchOption") + #set ($glConditionOptionInScopeName = "${glProjectPrefix}InScopeOption") + #set ($glConditionOptionPartsSplitName = "${glProjectPrefix}SplitOptionParts") + #set ($glConditionOptionPartsToUpperLowerCaseName = "${glProjectPrefix}ToUpperLowerCaseOptionParts") + #set ($glConditionOptionPartsToSingleByteName = "${glProjectPrefix}ToSingleByteOptionParts") + #set ($glConditionOptionPartsAgentJapaneseName = "${glProjectPrefix}JapaneseOptionPartsAgent") + + ## [Allcommon-ConditionBean-Grouping] + #set ($glGroupingOptionName = "${glProjectPrefix}GroupingOption") + #set ($glGroupingRowEndDeterminerName = "${glProjectPrefix}GroupingRowEndDeterminer") + #set ($glGroupingRowResourceName = "${glProjectPrefix}GroupingRowResource") + #set ($glGroupingRowSetupperName = "${glProjectPrefix}GroupingRowSetupper") + + ## [Allcommon-ConditionBean-Mapping] + #set ($glEntityDtoMapperName = "${glProjectPrefix}EntityDtoMapper") + + ## [Allcommon-ConditionBean-SqlClause] + #set ($glSqlClauseName = "${glProjectPrefix}SqlClause") + #set ($glSqlClauseInterfaceName = "${glProjectPrefix}SqlClause") + #set ($glSqlClauseAbstractName = "${glProjectPrefix}AbstractSqlClause") + #set ($glOrderByClauseName = "${glProjectPrefix}OrderByClause") + #set ($glOrderByElementName = "${glProjectPrefix}OrderByElement") + + ## [Allcommon-DBMeta] + #set ($glDBMetaInterfaceName = "${glProjectPrefix}DBMeta") + #set ($glDBMetaAbstractName = "${glProjectPrefix}AbstractDBMeta") + #set ($glDBMetaInstanceHandlerName = "${glProjectPrefix}DBMetaInstanceHandler") + + ## [Allcommon-Exception] + #set ($glDaoExceptionContextName = "${glProjectPrefix}DaoExceptionContext") + #set ($glRecordHasOverlappedException = "${glProjectPrefix}RecordHasOverlappedException") + #set ($glRecordHasAlreadyBeenDeletedException = "${glProjectPrefix}RecordHasAlreadyBeenDeletedException") + #set ($glSelectedCountExceedMaxCountExceptionName = "${glProjectPrefix}SelectedCountExceedMaxCountException") + + ## [Allcommon-Helper] + #set ($glMapListStringName = "${glProjectPrefix}MapListString") + #set ($glMapListStringImplName = "${glProjectPrefix}MapListStringImpl") + #set ($glMapStringBuilderName = "${glProjectPrefix}MapStringBuilder") + #set ($glMapStringBuilderImplName = "${glProjectPrefix}MapStringBuilderImpl") + + #set ($glGeneralCharacterName = "${glProjectPrefix}GeneralCharacter") + #set ($glGeneralCharacterImplName = "${glProjectPrefix}GeneralCharacterImpl") + + #set ($glJapaneseCharacterName = "${glProjectPrefix}JapaneseCharacter") + #set ($glJapaneseCharacterImplName = "${glProjectPrefix}JapaneseCharacterImpl") + + #set ($glLineTokenName = "${glProjectPrefix}LineToken") + #set ($glLineTokenImplName = "${glProjectPrefix}LineTokenImpl") + #set ($glLineTokenizingOptionName = "${glProjectPrefix}LineTokenizingOption") + #set ($glLineMakingOptionName = "${glProjectPrefix}LineMakingOption") + + #set ($glFileTokenName = "${glProjectPrefix}FileToken") + #set ($glFileTokenImplName = "${glProjectPrefix}FileTokenImpl") + + #set ($glFileTokenizingOptionName = "${glProjectPrefix}FileTokenizingOption") + #set ($glFileTokenizingRowResourceName = "${glProjectPrefix}FileTokenizingRowResource") + #set ($glFileTokenizingCallbackName = "${glProjectPrefix}FileTokenizingCallback") + #set ($glFileTokenizingHeaderInfoName = "${glProjectPrefix}FileTokenizingHeaderInfo") + + #set ($glFileMakingOptionName = "${glProjectPrefix}FileMakingOption") + #set ($glFileMakingRowResourceName = "${glProjectPrefix}FileMakingRowResource") + #set ($glFileMakingCallbackName = "${glProjectPrefix}FileMakingCallback") + #set ($glFileMakingHeaderInfoName = "${glProjectPrefix}FileMakingHeaderInfo") + #set ($glFileMakingSimpleFacadeName = "${glProjectPrefix}FileMakingSimpleFacade") + #set ($glFileMakingSimpleFacadeImplName = "${glProjectPrefix}FileMakingSimpleFacadeImpl") + + ## [Allcommon-Interceptor] + #set ($glCommonColumnSetupAbstractInterceptor = "${glProjectPrefix}CommonColumnSetupAbstractInterceptor") + #set ($glCommonColumnSetupBeforeInsertInterceptor = "${glProjectPrefix}CommonColumnSetupBeforeInsertInterceptor") + #set ($glCommonColumnSetupBeforeUpdateInterceptor = "${glProjectPrefix}CommonColumnSetupBeforeUpdateInterceptor") + #set ($glCommonColumnSetupBeforeDeleteInterceptor = "${glProjectPrefix}CommonColumnSetupBeforeDeleteInterceptor") + + ## [Allcommon-JDBC-History] + #set ($glPreparedExecutionBeanName = "${glProjectPrefix}PreparedExecutionBean") + #set ($glPreparedParameterElementName = "${glProjectPrefix}PreparedParameterElement") + #set ($glStatementHistoryName = "${glProjectPrefix}StatementHistory") + #set ($glStatementHistoryWitnessName = "${glProjectPrefix}StatementHistoryWitness") + #set ($glTraceablePreparedStatementName = "${glProjectPrefix}TraceablePreparedStatement") + + ## [Allcommon-S2Dao] + #set ($glSelectDynamicCommand = "${glProjectPrefix}S2DaoSelectDynamicCommand") + #set ($glDaoInterceptor = "${glProjectPrefix}S2DaoInterceptor") + #set ($glDaoMetaDataExtension = "${glProjectPrefix}S2DaoMetaDataExtension") + #set ($glDaoMetaDataFactoryImpl = "${glProjectPrefix}S2DaoMetaDataFactoryImpl") + #set ($glBeanMetaDataFactoryImpl = "${glProjectPrefix}S2BeanMetaDataFactoryImpl") + #set ($glDaoStatementFactory = "${glProjectPrefix}S2DaoStatementFactory") + #set ($glFetchNarrowingResultSetFactory = "${glProjectPrefix}FetchNarrowingResultSetFactory") + #set ($glFetchNarrowingResultSetWrapper = "${glProjectPrefix}FetchNarrowingResultSetWrapper") + #set ($glOutsideSqlAnnotation = "OutsideSql") + + ## ----------------------------------------------------- + ## Variable Name + ## ------------- + #set ($glConditionBeanInitialName = "CB") + #set ($glConditionQueryInitialName = "CQ") + #set ($glAttachedCBArgsVariableName = "cb") + #set ($glParentVariablePrefix = "_parent") + #set ($glChildrenVariablePrefix = "_children") + + ## ----------------------------------------------------- + ## Package Name + ## ------------ + ## [Common] + #set ($glPackageBaseCommon = "${database.baseCommonPackage}") + #set ($glPackageBaseCommonAnnotation = "${database.baseCommonPackage}.annotation") + #set ($glPackageBaseCommonBhv = "${database.baseCommonPackage}.bhv") + #set ($glPackageBaseCommonBhvBatch = "${database.baseCommonPackage}.bhv.batch") + #set ($glPackageBaseCommonBhvLoad = "${database.baseCommonPackage}.bhv.load") + #set ($glPackageBaseCommonBhvSetup = "${database.baseCommonPackage}.bhv.setup") + #set ($glPackageBaseCommonCBean = "${database.baseCommonPackage}.cbean") + #set ($glPackageBaseCommonCKey = "${database.baseCommonPackage}.cbean.ckey") + #set ($glPackageBaseCommonCBeanMapping = "${database.baseCommonPackage}.cbean.mapping") + #set ($glPackageBaseCommonCBeanGrouping = "${database.baseCommonPackage}.cbean.grouping") + #set ($glPackageBaseCommonSqlClause = "${database.baseCommonPackage}.cbean.sqlclause") + #set ($glPackageBaseCommonCValue = "${database.baseCommonPackage}.cbean.cvalue") + #set ($glPackageBaseCommonCOption = "${database.baseCommonPackage}.cbean.coption") + #set ($glPackageBaseCommonCOptionParts = "${database.baseCommonPackage}.cbean.coption.parts") + #set ($glPackageBaseCommonCOptionPartsLocal = "${database.baseCommonPackage}.cbean.coption.parts.local") + #set ($glPackageBaseCommonDBMeta = "${database.baseCommonPackage}.dbmeta") + #set ($glPackageBaseCommonException = "${database.baseCommonPackage}.exception") + #set ($glPackageBaseCommonHelper = "${database.baseCommonPackage}.helper") + #set ($glPackageBaseCommonHelperCharacter = "${database.baseCommonPackage}.helper.character") + #set ($glPackageBaseCommonHelperCharacterImpl = "${database.baseCommonPackage}.helper.character.impl") + #set ($glPackageBaseCommonHelperToken = "${database.baseCommonPackage}.helper.token") + #set ($glPackageBaseCommonHelperTokenLine = "${database.baseCommonPackage}.helper.token.line") + #set ($glPackageBaseCommonHelperTokenLineImpl = "${database.baseCommonPackage}.helper.token.line.impl") + #set ($glPackageBaseCommonHelperTokenFile = "${database.baseCommonPackage}.helper.token.file") + #set ($glPackageBaseCommonHelperTokenFileImpl = "${database.baseCommonPackage}.helper.token.file.impl") + #set ($glPackageBaseCommonInterceptor = "${database.baseCommonPackage}.interceptor") + #set ($glPackageBaseCommonJdbcHistory = "${database.baseCommonPackage}.jdbc.history") + #set ($glPackageBaseCommonS2Dao = "${database.baseCommonPackage}.s2dao") + + ## [Main] + #set ($glPackageBaseBhv = "${database.baseBehaviorPackage}") + #set ($glPackageBaseDao = "${database.baseDaoPackage}" ) + #set ($glPackageBaseCustomizeDao = "${database.baseDaoPackage}.customize" ) + #set ($glPackageBaseEntity = "${database.baseEntityPackage}") + #set ($glPackageBaseCustomizeEntity = "${database.baseEntityPackage}.customize" ) + #set ($glPackageExtendedBhv = "${database.extendedBehaviorPackage}") + #set ($glPackageExtendedDao = "${database.extendedDaoPackage}") + #set ($glPackageExtendedCustomizeDao = "${database.extendedDaoPackage}.customize" ) + #set ($glPackageExtendedEntity = "${database.extendedEntityPackage}") + #set ($glPackageExtendedCustomizeEntity = "${database.extendedEntityPackage}.customize" ) + #set ($glPackageBaseCB = "${database.conditionBeanPackage}.bs") + #set ($glPackageCB = "${database.conditionBeanPackage}") + #set ($glPackageBaseCQ = "${database.conditionBeanPackage}.cq.bs") + #set ($glPackageCQ = "${database.conditionBeanPackage}.cq") + #set ($glPackageCIQ = "${database.conditionBeanPackage}.cq.ciq") + #set ($glPackageNss = "${database.conditionBeanPackage}.nss") + #set ($glPackageBaseDBMeta = "${glPackageBaseEntity}.dbmeta") + #set ($glPackageBaseCustomizeDBMeta = "${glPackageBaseCustomizeEntity}.dbmeta") + #set ($glPackageBaseSqlParameterBean = "${database.SqlParameterBeanPackage}.bsparam") + #set ($glPackageExtendedSqlParameterBean = "${database.SqlParameterBeanPackage}.exparam") + #set ($glPackageArgumentBean = "${database.ArgumentBeanPackage}") + + ## ***************************************************************************************************************** + ## Parsing + ## ******* + ## =================================================================================== + ## annotation + ## ========== + #if (($database.isTargetLanguageJava() && $database.isAvailableGenerics()) || $database.isTargetLanguageCSharp()) + ## Setup java directory for allcommon. + $database.setupJavaDir_for_allcommon() + + #set ($path = $strings.getPackageAsPath(${glPackageBaseCommonAnnotation})) + $database.makeDirectory($path) + + $database.debug("public void parseAllcommonAnnotation) {") + $database.debug(" parseOutsideSql();") + + #set ( $path = "${strings.getPackageAsPath(${glPackageBaseCommonAnnotation})}${glOutsideSqlAnnotation}.${glClassFileExtension}" ) + $generator.parse("om/${glTargetLanguage}/allcommon/annotation/OutsideSql.${glTemplateFileExtension}",$path,"", "") + + $database.debug("}") + #end + + ## =================================================================================== + ## behavior + ## ======== + ## Setup java directory for allcommon. + $database.setupJavaDir_for_allcommon() + + #set ($path = $strings.getPackageAsPath(${glPackageBaseCommonBhv})) + $database.makeDirectory($path) + + $database.debug("public void parseAllcommonBehavior) {") + $database.debug(" parseBehaviorReadable()") + #set ( $path = "${strings.getPackageAsPath(${glPackageBaseCommonBhv})}${glBehaviorReadableInterfaceName}.${glClassFileExtension}" ) + $generator.parse("om/${glTargetLanguage}/allcommon/bhv/BehaviorReadable.${glTemplateFileExtension}",$path ,"", "") + $database.debug(" parseBehaviorWritable()") + #set ( $path = "${strings.getPackageAsPath(${glPackageBaseCommonBhv})}${glBehaviorWritableInterfaceName}.${glClassFileExtension}" ) + $generator.parse("om/${glTargetLanguage}/allcommon/bhv/BehaviorWritable.${glTemplateFileExtension}",$path ,"", "") + $database.debug(" parseAbstractBehaviorReadable()") + #set ( $path = "${strings.getPackageAsPath(${glPackageBaseCommonBhv})}${glBehaviorReadableAbstractName}.${glClassFileExtension}" ) + $generator.parse("om/${glTargetLanguage}/allcommon/bhv/AbstractBehaviorReadable.${glTemplateFileExtension}",$path ,"", "") + $database.debug(" parseAbstractBehaviorWritable()") + #set ( $path = "${strings.getPackageAsPath(${glPackageBaseCommonBhv})}${glBehaviorWritableAbstractName}.${glClassFileExtension}" ) + $generator.parse("om/${glTargetLanguage}/allcommon/bhv/AbstractBehaviorWritable.${glTemplateFileExtension}",$path ,"", "") + + #if ($database.isTargetLanguageJava()) + #set ($path = $strings.getPackageAsPath(${glPackageBaseCommonBhvBatch})) + $database.makeDirectory($path) + + $database.debug(" parseTokenFileReflectionOption()") + #set ( $path = "${strings.getPackageAsPath(${glPackageBaseCommonBhvBatch})}${glTokenFileReflectionOptionName}.${glClassFileExtension}" ) + $generator.parse("om/${glTargetLanguage}/allcommon/bhv/batch/TokenFileReflectionOption.${glTemplateFileExtension}",$path ,"", "") + + $database.debug(" parseTokenFileReflectionResult()") + #set ( $path = "${strings.getPackageAsPath(${glPackageBaseCommonBhvBatch})}${glTokenFileReflectionResultName}.${glClassFileExtension}" ) + $generator.parse("om/${glTargetLanguage}/allcommon/bhv/batch/TokenFileReflectionResult.${glTemplateFileExtension}",$path ,"", "") + + $database.debug(" parseTokenFileReflectionFailure()") + #set ( $path = "${strings.getPackageAsPath(${glPackageBaseCommonBhvBatch})}${glTokenFileReflectionFailureName}.${glClassFileExtension}" ) + $generator.parse("om/${glTargetLanguage}/allcommon/bhv/batch/TokenFileReflectionFailure.${glTemplateFileExtension}",$path ,"", "") + + $database.debug(" parseTokenFileOutputOption()") + #set ( $path = "${strings.getPackageAsPath(${glPackageBaseCommonBhvBatch})}${glTokenFileOutputOptionName}.${glClassFileExtension}" ) + $generator.parse("om/${glTargetLanguage}/allcommon/bhv/batch/TokenFileOutputOption.${glTemplateFileExtension}",$path ,"", "") + + $database.debug(" parseTokenFileOutputResult()") + #set ( $path = "${strings.getPackageAsPath(${glPackageBaseCommonBhvBatch})}${glTokenFileOutputResultName}.${glClassFileExtension}" ) + $generator.parse("om/${glTargetLanguage}/allcommon/bhv/batch/TokenFileOutputResult.${glTemplateFileExtension}",$path ,"", "") + + #if ($database.isAvailableGenerics()) + #set ($path = $strings.getPackageAsPath(${glPackageBaseCommonBhvLoad})) + $database.makeDirectory($path) + + $database.debug(" parseLoadRefererOption()") + #set ( $path = "${strings.getPackageAsPath(${glPackageBaseCommonBhvLoad})}${glLoadRefererOptionName}.${glClassFileExtension}" ) + $generator.parse("om/${glTargetLanguage}/allcommon/bhv/load/LoadRefererOption.${glTemplateFileExtension}",$path ,"", "") + + #set ($path = $strings.getPackageAsPath(${glPackageBaseCommonBhvSetup})) + $database.makeDirectory($path) + + $database.debug(" parseConditionBeanSetupper()") + #set ( $path = "${strings.getPackageAsPath(${glPackageBaseCommonBhvSetup})}${glConditionBeanSetupperName}.${glClassFileExtension}" ) + $generator.parse("om/${glTargetLanguage}/allcommon/bhv/setup/ConditionBeanSetupper.${glTemplateFileExtension}",$path ,"", "") + + $database.debug(" parseEntityListSetupper()") + #set ( $path = "${strings.getPackageAsPath(${glPackageBaseCommonBhvSetup})}${glEntityListSetupperName}.${glClassFileExtension}" ) + $generator.parse("om/${glTargetLanguage}/allcommon/bhv/setup/EntityListSetupper.${glTemplateFileExtension}",$path ,"", "") + + $database.debug(" parseValueLabelSetupper()") + #set ( $path = "${strings.getPackageAsPath(${glPackageBaseCommonBhvSetup})}${glValueLabelSetupperName}.${glClassFileExtension}" ) + $generator.parse("om/${glTargetLanguage}/allcommon/bhv/setup/ValueLabelSetupper.${glTemplateFileExtension}",$path ,"", "") + + $database.debug(" parseValueLabelBox()") + #set ( $path = "${strings.getPackageAsPath(${glPackageBaseCommonBhvSetup})}${glValueLabelBoxName}.${glClassFileExtension}" ) + $generator.parse("om/${glTargetLanguage}/allcommon/bhv/setup/ValueLabelBox.${glTemplateFileExtension}",$path ,"", "") + #end + #end + $database.debug("}") + + ## =================================================================================== + ## access-context + ## ============== + ## Setup java directory for allcommon. + $database.setupJavaDir_for_allcommon() + + #if ($database.isTargetLanguageJava()) + $database.debug(" parseAccessContext()") + #set ( $path = "${strings.getPackageAsPath(${glPackageBaseCommon})}${glAccessContextName}.${glClassFileExtension}" ) + $generator.parse("om/${glTargetLanguage}/allcommon/AccessContext.${glTemplateFileExtension}",$path ,"", "") + #end + + ## ----------------------------------------------------- + ## allcommon dao + ## ------------- + ## Setup java directory for allcommon. + $database.setupJavaDir_for_allcommon() + + $database.debug(" parseDaoReadable") + #set ( $path = "${strings.getPackageAsPath(${glPackageBaseCommon})}${glDaoReadableInterfaceName}.${glClassFileExtension}" ) + $generator.parse("om/${glTargetLanguage}/allcommon/DaoReadable.${glTemplateFileExtension}",$path ,"", "") + + $database.debug(" parseDaoWritable") + #set ( $path = "${strings.getPackageAsPath(${glPackageBaseCommon})}${glDaoWritableInterfaceName}.${glClassFileExtension}" ) + $generator.parse("om/${glTargetLanguage}/allcommon/DaoWritable.${glTemplateFileExtension}",$path ,"", "") + + ## ----------------------------------------------------- + ## allcommon entity + ## ---------------- + ## Setup java directory for allcommon. + $database.setupJavaDir_for_allcommon() + + $database.debug("public void parseEntityInterface() {") + $database.debug(" parseEntity();") + #set ( $path = "${strings.getPackageAsPath(${glPackageBaseCommon})}${glEntityInterfaceName}.${glClassFileExtension}" ) + $generator.parse("om/${glTargetLanguage}/allcommon/Entity.${glTemplateFileExtension}",$path ,"", "") + + $database.debug(" parseEntityDefinedCommonColumn();") + #set ( $path = "${strings.getPackageAsPath(${glPackageBaseCommon})}${glEntityDefinedCommonColumnInterfaceName}.${glClassFileExtension}" ) + $generator.parse("om/${glTargetLanguage}/allcommon/EntityDefinedCommonColumn.${glTemplateFileExtension}",$path ,"", "") + $database.debug("}") + + ## ----------------------------------------------------- + ## allcommon condition-bean + ## ------------------------ + ## Setup java directory for allcommon. + $database.setupJavaDir_for_allcommon() + + #set ($path = $strings.getPackageAsPath(${glPackageBaseCommonCBean})) + $database.makeDirectory($path) + + $database.debug("public void parseConditionBeanFramework() {") + $database.debug(" parseFetchNarrowingBeanContext()") + #set ( $path = "${strings.getPackageAsPath(${glPackageBaseCommonCBean})}${glFetchNarrowingBeanContextName}.${glClassFileExtension}" ) + $generator.parse("om/${glTargetLanguage}/allcommon/cbean/FetchNarrowingBeanContext.${glTemplateFileExtension}",$path ,"", "") + + $database.debug(" parseFetchNarrowingBean()") + #set ( $path = "${strings.getPackageAsPath(${glPackageBaseCommonCBean})}${glFetchNarrowingBeanInterfaceName}.${glClassFileExtension}" ) + $generator.parse("om/${glTargetLanguage}/allcommon/cbean/FetchNarrowingBean.${glTemplateFileExtension}",$path ,"", "") + + $database.debug(" parseSimpleOrderByBean()") + #set ( $path = "${strings.getPackageAsPath(${glPackageBaseCommonCBean})}${glSimpleOrderByBeanName}.${glClassFileExtension}" ) + $generator.parse("om/${glTargetLanguage}/allcommon/cbean/SimpleOrderByBean.${glTemplateFileExtension}",$path ,"", "") + + $database.debug(" parseSimplePagingBean()") + #set ( $path = "${strings.getPackageAsPath(${glPackageBaseCommonCBean})}${glSimplePagingBeanName}.${glClassFileExtension}" ) + $generator.parse("om/${glTargetLanguage}/allcommon/cbean/SimplePagingBean.${glTemplateFileExtension}",$path ,"", "") + + $database.debug(" parsePagingResultBean()") + #set ( $path = "${strings.getPackageAsPath(${glPackageBaseCommonCBean})}${glPagingResultBeanName}.${glClassFileExtension}" ) + $generator.parse("om/${glTargetLanguage}/allcommon/cbean/PagingResultBean.${glTemplateFileExtension}",$path ,"", "") + + $database.debug(" parseListResultBean()") + #set ( $path = "${strings.getPackageAsPath(${glPackageBaseCommonCBean})}${glListResultBeanName}.${glClassFileExtension}" ) + $generator.parse("om/${glTargetLanguage}/allcommon/cbean/ListResultBean.${glTemplateFileExtension}",$path ,"", "") + + $database.debug(" parseConditionBeanContext()") + #set ( $path = "${strings.getPackageAsPath(${glPackageBaseCommonCBean})}${glConditionBeanContextName}.${glClassFileExtension}" ) + $generator.parse("om/${glTargetLanguage}/allcommon/cbean/ConditionBeanContext.${glTemplateFileExtension}",$path ,"", "") + + $database.debug(" parseConditionBean()") + #set ( $path = "${strings.getPackageAsPath(${glPackageBaseCommonCBean})}${glConditionBeanInterfaceName}.${glClassFileExtension}" ) + $generator.parse("om/${glTargetLanguage}/allcommon/cbean/ConditionBean.${glTemplateFileExtension}",$path ,"", "") + + $database.debug(" parseConditionQuery()") + #set ( $path = "${strings.getPackageAsPath(${glPackageBaseCommonCBean})}${glConditionQueryInterfaceName}.${glClassFileExtension}" ) + $generator.parse("om/${glTargetLanguage}/allcommon/cbean/ConditionQuery.${glTemplateFileExtension}",$path ,"", "") + + $database.debug(" parsePagingBean()") + #set ( $path = "${strings.getPackageAsPath(${glPackageBaseCommonCBean})}${glPagingBeanInterfaceName}.${glClassFileExtension}" ) + $generator.parse("om/${glTargetLanguage}/allcommon/cbean/PagingBean.${glTemplateFileExtension}",$path ,"", "") + + $database.debug(" parseOrderByBean()") + #set ( $path = "${strings.getPackageAsPath(${glPackageBaseCommonCBean})}${glOrderByBeanInterfaceName}.${glClassFileExtension}" ) + $generator.parse("om/${glTargetLanguage}/allcommon/cbean/OrderByBean.${glTemplateFileExtension}",$path ,"", "") + + $database.debug(" parseSelectResource()") + #set ( $path = "${strings.getPackageAsPath(${glPackageBaseCommonCBean})}${glSelectResourceInterfaceName}.${glClassFileExtension}" ) + $generator.parse("om/${glTargetLanguage}/allcommon/cbean/SelectResource.${glTemplateFileExtension}",$path ,"", "") + + ## Setup java directory. + $database.setupJavaDir_for_abstractCBean() + + #set ($path = $strings.getPackageAsPath(${glPackageBaseCommonCBean})) + $database.makeDirectory($path) + + $database.debug(" parseAbstractConditionBean") + #set ( $path = "${strings.getPackageAsPath(${glPackageBaseCommonCBean})}${glConditionBeanAbstractName}.${glClassFileExtension}" ) + $generator.parse("om/${glTargetLanguage}/allcommon/cbean/AbstractConditionBean.${glTemplateFileExtension}",$path ,"", "") + + $database.debug(" parseAbstractConditionQuery") + #set ( $path = "${strings.getPackageAsPath(${glPackageBaseCommonCBean})}${glConditionQueryAbstractName}.${glClassFileExtension}" ) + $generator.parse("om/${glTargetLanguage}/allcommon/cbean/AbstractConditionQuery.${glTemplateFileExtension}",$path ,"", "") + + ## ----------------------------------------------------- + ## allcommon condition-bean condition-key + ## -------------------------------------- + ## Setup java directory for allcommon. + $database.setupJavaDir_for_allcommon() + + #set ($path = $strings.getPackageAsPath(${glPackageBaseCommonCKey})) + $database.makeDirectory($path) + + $database.debug(" parseConditionKey") + #set ( $path = "${strings.getPackageAsPath(${glPackageBaseCommonCKey})}${glConditionKeyName}.${glClassFileExtension}" ) + $generator.parse("om/${glTargetLanguage}/allcommon/cbean/ckey/ConditionKey.${glTemplateFileExtension}",$path ,"", "") + + $database.debug(" parseConditionKey_equal") + #set ( $path = "${strings.getPackageAsPath(${glPackageBaseCommonCKey})}${glConditionKeyName}Equal.${glClassFileExtension}" ) + $generator.parse("om/${glTargetLanguage}/allcommon/cbean/ckey/ConditionKey_equal.${glTemplateFileExtension}",$path ,"", "") + + $database.debug(" parseConditionKey_notEqual") + #set ( $path = "${strings.getPackageAsPath(${glPackageBaseCommonCKey})}${glConditionKeyName}NotEqual.${glClassFileExtension}" ) + $generator.parse("om/${glTargetLanguage}/allcommon/cbean/ckey/ConditionKey_notEqual.${glTemplateFileExtension}",$path ,"", "") + + $database.debug(" parseConditionKey_greaterThan") + #set ( $path = "${strings.getPackageAsPath(${glPackageBaseCommonCKey})}${glConditionKeyName}GreaterThan.${glClassFileExtension}" ) + $generator.parse("om/${glTargetLanguage}/allcommon/cbean/ckey/ConditionKey_greaterThan.${glTemplateFileExtension}",$path ,"", "") + + $database.debug(" parseConditionKey_lessThan") + #set ( $path = "${strings.getPackageAsPath(${glPackageBaseCommonCKey})}${glConditionKeyName}LessThan.${glClassFileExtension}" ) + $generator.parse("om/${glTargetLanguage}/allcommon/cbean/ckey/ConditionKey_lessThan.${glTemplateFileExtension}",$path ,"", "") + + $database.debug(" parseConditionKey_greaterEqual") + #set ( $path = "${strings.getPackageAsPath(${glPackageBaseCommonCKey})}${glConditionKeyName}GreaterEqual.${glClassFileExtension}" ) + $generator.parse("om/${glTargetLanguage}/allcommon/cbean/ckey/ConditionKey_greaterEqual.${glTemplateFileExtension}",$path ,"", "") + + $database.debug(" parseConditionKey_lessEqual") + #set ( $path = "${strings.getPackageAsPath(${glPackageBaseCommonCKey})}${glConditionKeyName}LessEqual.${glClassFileExtension}" ) + $generator.parse("om/${glTargetLanguage}/allcommon/cbean/ckey/ConditionKey_lessEqual.${glTemplateFileExtension}",$path ,"", "") + + $database.debug(" parseConditionKey_prefixSearch") + #set ( $path = "${strings.getPackageAsPath(${glPackageBaseCommonCKey})}${glConditionKeyName}PrefixSearch.${glClassFileExtension}" ) + $generator.parse("om/${glTargetLanguage}/allcommon/cbean/ckey/ConditionKey_prefixSearch.${glTemplateFileExtension}",$path ,"", "") + + #if ($database.isTargetLanguageJava()) + $database.debug(" parseConditionKey_likeSearch") + #set ( $path = "${strings.getPackageAsPath(${glPackageBaseCommonCKey})}${glConditionKeyName}LikeSearch.${glClassFileExtension}" ) + $generator.parse("om/${glTargetLanguage}/allcommon/cbean/ckey/ConditionKey_likeSearch.${glTemplateFileExtension}",$path ,"", "") + #end + + $database.debug(" parseConditionKey_inScope") + #set ( $path = "${strings.getPackageAsPath(${glPackageBaseCommonCKey})}${glConditionKeyName}InScope.${glClassFileExtension}" ) + $generator.parse("om/${glTargetLanguage}/allcommon/cbean/ckey/ConditionKey_inScope.${glTemplateFileExtension}",$path ,"", "") + + $database.debug(" parseConditionKey_notInScope") + #set ( $path = "${strings.getPackageAsPath(${glPackageBaseCommonCKey})}${glConditionKeyName}NotInScope.${glClassFileExtension}" ) + $generator.parse("om/${glTargetLanguage}/allcommon/cbean/ckey/ConditionKey_notInScope.${glTemplateFileExtension}",$path ,"", "") + + $database.debug(" parseConditionKey_isNull") + #set ( $path = "${strings.getPackageAsPath(${glPackageBaseCommonCKey})}${glConditionKeyName}IsNull.${glClassFileExtension}" ) + $generator.parse("om/${glTargetLanguage}/allcommon/cbean/ckey/ConditionKey_isNull.${glTemplateFileExtension}",$path ,"", "") + + $database.debug(" parseConditionKey_isNotNull") + #set ( $path = "${strings.getPackageAsPath(${glPackageBaseCommonCKey})}${glConditionKeyName}IsNotNull.${glClassFileExtension}" ) + $generator.parse("om/${glTargetLanguage}/allcommon/cbean/ckey/ConditionKey_isNotNull.${glTemplateFileExtension}",$path ,"", "") + + #if ($database.isTargetLanguageJava()) + ## ----------------------------------------------------- + ## allcommon condition-bean condition-option + ## ----------------------------------------- + ## Setup java directory for allcommon. + $database.setupJavaDir_for_allcommon() + + #set ($path = $strings.getPackageAsPath(${glPackageBaseCommonCOption})) + $database.makeDirectory($path) + + $database.debug(" parseConditionOption") + #set ( $path = "${strings.getPackageAsPath(${glPackageBaseCommonCOption})}${glConditionOptionInterfaceName}.${glClassFileExtension}" ) + $generator.parse("om/${glTargetLanguage}/allcommon/cbean/coption/ConditionOption.${glTemplateFileExtension}",$path ,"", "") + + $database.debug(" parseSimpleStringOption") + #set ( $path = "${strings.getPackageAsPath(${glPackageBaseCommonCOption})}${glConditionOptionSimpleStringName}.${glClassFileExtension}" ) + $generator.parse("om/${glTargetLanguage}/allcommon/cbean/coption/SimpleStringOption.${glTemplateFileExtension}",$path ,"", "") + + $database.debug(" parseFromToOption") + #set ( $path = "${strings.getPackageAsPath(${glPackageBaseCommonCOption})}${glConditionOptionFromToName}.${glClassFileExtension}" ) + $generator.parse("om/${glTargetLanguage}/allcommon/cbean/coption/FromToOption.${glTemplateFileExtension}",$path ,"", "") + + $database.debug(" parseLikeSearchOption") + #set ( $path = "${strings.getPackageAsPath(${glPackageBaseCommonCOption})}${glConditionOptionLikeSearchName}.${glClassFileExtension}" ) + $generator.parse("om/${glTargetLanguage}/allcommon/cbean/coption/LikeSearchOption.${glTemplateFileExtension}",$path ,"", "") + + $database.debug(" parseInScopeOption") + #set ( $path = "${strings.getPackageAsPath(${glPackageBaseCommonCOption})}${glConditionOptionInScopeName}.${glClassFileExtension}" ) + $generator.parse("om/${glTargetLanguage}/allcommon/cbean/coption/InScopeOption.${glTemplateFileExtension}",$path ,"", "") + + #set ($path = $strings.getPackageAsPath(${glPackageBaseCommonCOptionParts})) + $database.makeDirectory($path) + + $database.debug(" parseSplitOptionParts") + #set ( $path = "${strings.getPackageAsPath(${glPackageBaseCommonCOptionParts})}${glConditionOptionPartsSplitName}.${glClassFileExtension}" ) + $generator.parse("om/${glTargetLanguage}/allcommon/cbean/coption/parts/SplitOptionParts.${glTemplateFileExtension}",$path ,"", "") + + $database.debug(" parseToUpperLowerCaseOptionParts") + #set ( $path = "${strings.getPackageAsPath(${glPackageBaseCommonCOptionParts})}${glConditionOptionPartsToUpperLowerCaseName}.${glClassFileExtension}" ) + $generator.parse("om/${glTargetLanguage}/allcommon/cbean/coption/parts/ToUpperLowerCaseOptionParts.${glTemplateFileExtension}",$path ,"", "") + + $database.debug(" parseToSingleByteOptionParts") + #set ( $path = "${strings.getPackageAsPath(${glPackageBaseCommonCOptionParts})}${glConditionOptionPartsToSingleByteName}.${glClassFileExtension}" ) + $generator.parse("om/${glTargetLanguage}/allcommon/cbean/coption/parts/ToSingleByteOptionParts.${glTemplateFileExtension}",$path ,"", "") + + #set ($path = $strings.getPackageAsPath(${glPackageBaseCommonCOptionPartsLocal})) + $database.makeDirectory($path) + + $database.debug(" parseJapaneseOptionPartsAgent") + #set ( $path = "${strings.getPackageAsPath(${glPackageBaseCommonCOptionPartsLocal})}${glConditionOptionPartsAgentJapaneseName}.${glClassFileExtension}" ) + $generator.parse("om/${glTargetLanguage}/allcommon/cbean/coption/parts/local/JapaneseOptionPartsAgent.${glTemplateFileExtension}",$path ,"", "") + #end + + ## ------------------------------------------------------- + ## allcommon condition-bean condition-value + ## ---------------------------------------- + ## Setup java directory for allcommon. + $database.setupJavaDir_for_allcommon() + + #set ($path = $strings.getPackageAsPath(${glPackageBaseCommonCValue})) + $database.makeDirectory($path) + + $database.debug(" parseConditionValue") + #set ( $path = "${strings.getPackageAsPath(${glPackageBaseCommonCValue})}${glConditionValueName}.${glClassFileExtension}" ) + $generator.parse("om/${glTargetLanguage}/allcommon/cbean/cvalue/ConditionValue.${glTemplateFileExtension}",$path ,"", "") + + ## ------------------------------------------------------- + ## allcommon condition-bean grouping + ## --------------------------------- + ## Setup java directory for allcommon. + $database.setupJavaDir_for_allcommon() + + #if ($database.isTargetLanguageJava() && $database.isAvailableGenerics()) + #set ($path = $strings.getPackageAsPath(${glPackageBaseCommonCBeanGrouping})) + $database.makeDirectory($path) + + $database.debug(" parseGroupingOption();") + #set ( $path = "${strings.getPackageAsPath(${glPackageBaseCommonCBeanGrouping})}${glGroupingOptionName}.${glClassFileExtension}" ) + $generator.parse("om/${glTargetLanguage}/allcommon/cbean/grouping/GroupingOption.${glTemplateFileExtension}",$path ,"", "") + + $database.debug(" parseGroupingRowEndDeterminer();") + #set ( $path = "${strings.getPackageAsPath(${glPackageBaseCommonCBeanGrouping})}${glGroupingRowEndDeterminerName}.${glClassFileExtension}" ) + $generator.parse("om/${glTargetLanguage}/allcommon/cbean/grouping/GroupingRowEndDeterminer.${glTemplateFileExtension}",$path ,"", "") + + $database.debug(" parseGroupingRowResource();") + #set ( $path = "${strings.getPackageAsPath(${glPackageBaseCommonCBeanGrouping})}${glGroupingRowResourceName}.${glClassFileExtension}" ) + $generator.parse("om/${glTargetLanguage}/allcommon/cbean/grouping/GroupingRowResource.${glTemplateFileExtension}",$path ,"", "") + + $database.debug(" parseGroupingRowSetupper();") + #set ( $path = "${strings.getPackageAsPath(${glPackageBaseCommonCBeanGrouping})}${glGroupingRowSetupperName}.${glClassFileExtension}" ) + $generator.parse("om/${glTargetLanguage}/allcommon/cbean/grouping/GroupingRowSetupper.${glTemplateFileExtension}",$path ,"", "") + + #set ($path = $strings.getPackageAsPath(${glPackageBaseCommonCBeanMapping})) + $database.makeDirectory($path) + + $database.debug(" parseEntityDtoMapper();") + #set ( $path = "${strings.getPackageAsPath(${glPackageBaseCommonCBeanMapping})}${glEntityDtoMapperName}.${glClassFileExtension}" ) + $generator.parse("om/${glTargetLanguage}/allcommon/cbean/mapping/EntityDtoMapper.${glTemplateFileExtension}",$path ,"", "") + #end + + ## ------------------------------------------------------- + ## allcommon condition-bean sql-clause + ## ----------------------------------- + ## Setup java directory for allcommon. + $database.setupJavaDir_for_allcommon() + + #set ($path = $strings.getPackageAsPath(${glPackageBaseCommonSqlClause})) + $database.makeDirectory($path) + + $database.debug(" parseSqlClause") + #set ( $path = "${strings.getPackageAsPath(${glPackageBaseCommonSqlClause})}${glSqlClauseInterfaceName}.${glClassFileExtension}" ) + $generator.parse("om/${glTargetLanguage}/allcommon/cbean/sqlclause/SqlClause.${glTemplateFileExtension}",$path ,"" ,"") + + $database.debug(" parseAbstractSqlClause") + #set ( $path = "${strings.getPackageAsPath(${glPackageBaseCommonSqlClause})}${glSqlClauseAbstractName}.${glClassFileExtension}" ) + $generator.parse("om/${glTargetLanguage}/allcommon/cbean/sqlclause/AbstractSqlClause.${glTemplateFileExtension}",$path ,"" ,"") + + #if ($database.isTargetLanguageJava()) + $database.debug(" parseSqlClause_derby") + #set ( $path = "${strings.getPackageAsPath(${glPackageBaseCommonSqlClause})}${glSqlClauseInterfaceName}Derby.${glClassFileExtension}" ) + $generator.parse("om/${glTargetLanguage}/allcommon/cbean/sqlclause/SqlClause_derby.${glTemplateFileExtension}",$path ,"" ,"") + + $database.debug(" parseSqlClause_oracle") + #set ( $path = "${strings.getPackageAsPath(${glPackageBaseCommonSqlClause})}${glSqlClauseInterfaceName}Oracle.${glClassFileExtension}" ) + $generator.parse("om/${glTargetLanguage}/allcommon/cbean/sqlclause/SqlClause_oracle.${glTemplateFileExtension}",$path ,"" ,"") + + $database.debug(" parseSqlClause_firebird") + #set ( $path = "${strings.getPackageAsPath(${glPackageBaseCommonSqlClause})}${glSqlClauseInterfaceName}Firebird.${glClassFileExtension}" ) + $generator.parse("om/${glTargetLanguage}/allcommon/cbean/sqlclause/SqlClause_firebird.${glTemplateFileExtension}",$path ,"" ,"") + + $database.debug(" parseSqlClause_mysql") + #set ( $path = "${strings.getPackageAsPath(${glPackageBaseCommonSqlClause})}${glSqlClauseInterfaceName}MySql.${glClassFileExtension}" ) + $generator.parse("om/${glTargetLanguage}/allcommon/cbean/sqlclause/SqlClause_mysql.${glTemplateFileExtension}",$path ,"" ,"") + + $database.debug(" parseSqlClause_postgresql") + #set ( $path = "${strings.getPackageAsPath(${glPackageBaseCommonSqlClause})}${glSqlClauseInterfaceName}PostgreSql.${glClassFileExtension}" ) + $generator.parse("om/${glTargetLanguage}/allcommon/cbean/sqlclause/SqlClause_postgresql.${glTemplateFileExtension}",$path ,"" ,"") + + $database.debug(" parseSqlClause_mssql") + #set ( $path = "${strings.getPackageAsPath(${glPackageBaseCommonSqlClause})}${glSqlClauseInterfaceName}SqlServer.${glClassFileExtension}" ) + $generator.parse("om/${glTargetLanguage}/allcommon/cbean/sqlclause/SqlClause_mssql.${glTemplateFileExtension}",$path ,"" ,"") + + $database.debug(" parseSqlClause_db2") + #set ( $path = "${strings.getPackageAsPath(${glPackageBaseCommonSqlClause})}${glSqlClauseInterfaceName}Db2.${glClassFileExtension}" ) + $generator.parse("om/${glTargetLanguage}/allcommon/cbean/sqlclause/SqlClause_db2.${glTemplateFileExtension}",$path ,"" ,"") + + $database.debug(" parseSqlClause_interbase") + #set ( $path = "${strings.getPackageAsPath(${glPackageBaseCommonSqlClause})}${glSqlClauseInterfaceName}Interbase.${glClassFileExtension}" ) + $generator.parse("om/${glTargetLanguage}/allcommon/cbean/sqlclause/SqlClause_interbase.${glTemplateFileExtension}",$path ,"" ,"") + + $database.debug(" parseSqlClause_default") + #set ( $path = "${strings.getPackageAsPath(${glPackageBaseCommonSqlClause})}${glSqlClauseInterfaceName}Default.${glClassFileExtension}" ) + $generator.parse("om/${glTargetLanguage}/allcommon/cbean/sqlclause/SqlClause_default.${glTemplateFileExtension}",$path ,"" ,"") + #end + #if ($database.isTargetLanguageCSharp()) + $database.debug(" parseSqlClause_${database.DatabaseType}") + #set ( $path = "${strings.getPackageAsPath(${glPackageBaseCommonSqlClause})}${glSqlClauseInterfaceName}${database.DaoGenDbName}.${glClassFileExtension}" ) + $generator.parse("om/${glTargetLanguage}/allcommon/cbean/sqlclause/SqlClause_${database.DatabaseType}.${glTemplateFileExtension}",$path ,"" ,"") + #end + + $database.debug(" parseOrderByClause") + #set ( $path = "${strings.getPackageAsPath(${glPackageBaseCommonSqlClause})}${glOrderByClauseName}.${glClassFileExtension}" ) + $generator.parse("om/${glTargetLanguage}/allcommon/cbean/sqlclause/OrderByClause.${glTemplateFileExtension}",$path ,"" ,"") + + $database.debug(" parseOrderByElement") + #set ( $path = "${strings.getPackageAsPath(${glPackageBaseCommonSqlClause})}${glOrderByElementName}.${glClassFileExtension}" ) + $generator.parse("om/${glTargetLanguage}/allcommon/cbean/sqlclause/OrderByElement.${glTemplateFileExtension}",$path ,"" ,"") + + $database.debug("}") + + ## ------------------------------------------------------- + ## allcommon dbmeta + ## ---------------- + ## Setup java directory. + $database.setupJavaDir_for_allcommon() + + #set ($path = $strings.getPackageAsPath(${glPackageBaseCommonDBMeta})) + $database.makeDirectory($path) + + $database.debug("public void parseDBMetaClass() {") + $database.debug(" parseDBMeta();") + #set ( $path = "${strings.getPackageAsPath(${glPackageBaseCommonDBMeta})}${glDBMetaInterfaceName}.${glClassFileExtension}" ) + $generator.parse("om/${glTargetLanguage}/allcommon/dbmeta/DBMeta.${glTemplateFileExtension}",$path,"", "") + + $database.debug(" parseAbstractDBMeta();") + #set ( $path = "${strings.getPackageAsPath(${glPackageBaseCommonDBMeta})}${glDBMetaAbstractName}.${glClassFileExtension}" ) + $generator.parse("om/${glTargetLanguage}/allcommon/dbmeta/AbstractDBMeta.${glTemplateFileExtension}",$path,"", "") + + ## Setup java directory. + $database.setupJavaDir_for_dbmetaInstanceHandler() + + #set ($path = $strings.getPackageAsPath(${glPackageBaseCommonDBMeta})) + $database.makeDirectory($path) + + $database.debug(" parseDBMetaInstanceHandler();") + #set ( $path = "${strings.getPackageAsPath(${glPackageBaseCommonDBMeta})}${glDBMetaInstanceHandlerName}.${glClassFileExtension}" ) + $generator.parse("om/${glTargetLanguage}/allcommon/dbmeta/DBMetaInstanceHandler.${glTemplateFileExtension}",$path,"", "") + + ## ------------------------------------------------------- + ## allcommon exception + ## ------------------- + ## Setup java directory for allcommon. + $database.setupJavaDir_for_allcommon() + + #set ($path = $strings.getPackageAsPath(${glPackageBaseCommonException})) + $database.makeDirectory($path) + + $database.debug("public void parseExceptionClass() {") +## #if ($database.isTargetLanguageCSharp()) +## $database.debug(" parseDaoExceptionContext();") +## #set ( $path = "${strings.getPackageAsPath(${glPackageBaseCommonException})}${glDaoExceptionContextName}.${glClassFileExtension}" ) +## $generator.parse("om/${glTargetLanguage}/allcommon/exception/DaoExceptionContext.${glTemplateFileExtension}",$path,"", "") +## #end + + $database.debug(" parseRecordHasAlreadyBeenDeletedException();") + #set ( $path = "${strings.getPackageAsPath(${glPackageBaseCommonException})}${glRecordHasAlreadyBeenDeletedException}.${glClassFileExtension}" ) + $generator.parse("om/${glTargetLanguage}/allcommon/exception/RecordHasAlreadyBeenDeletedException.${glTemplateFileExtension}",$path,"", "") + + $database.debug(" parseRecordHasOverlappedException();") + #set ( $path = "${strings.getPackageAsPath(${glPackageBaseCommonException})}${glRecordHasOverlappedException}.${glClassFileExtension}" ) + $generator.parse("om/${glTargetLanguage}/allcommon/exception/RecordHasOverlappedException.${glTemplateFileExtension}",$path,"", "") + + $database.debug(" parseSelectedCountExceedMaxCountException();") + #set ( $path = "${strings.getPackageAsPath(${glPackageBaseCommonException})}${glSelectedCountExceedMaxCountExceptionName}.${glClassFileExtension}" ) + $generator.parse("om/${glTargetLanguage}/allcommon/exception/SelectedCountExceedMaxCountException.${glTemplateFileExtension}",$path,"", "") + $database.debug("}") + + ## ------------------------------------------------------- + ## allcommon helper + ## ---------------- + ## Setup java directory for allcommon. + $database.setupJavaDir_for_allcommon() + + #set ($path = $strings.getPackageAsPath(${glPackageBaseCommonHelper})) + $database.makeDirectory($path) + + $database.debug("public void parseHelperClass() {") + + $database.debug(" parseMapListString();") + #set ( $path = "${strings.getPackageAsPath(${glPackageBaseCommonHelper})}${glMapListStringName}.${glClassFileExtension}" ) + $generator.parse("om/${glTargetLanguage}/allcommon/helper/MapListString.${glTemplateFileExtension}",$path,"", "") + + $database.debug(" parseMapListStringImpl();") + #set ( $path = "${strings.getPackageAsPath(${glPackageBaseCommonHelper})}${glMapListStringImplName}.${glClassFileExtension}" ) + $generator.parse("om/${glTargetLanguage}/allcommon/helper/MapListStringImpl.${glTemplateFileExtension}",$path,"", "") + + $database.debug(" parseMapStringBuilder();") + #set ( $path = "${strings.getPackageAsPath(${glPackageBaseCommonHelper})}${glMapStringBuilderName}.${glClassFileExtension}" ) + $generator.parse("om/${glTargetLanguage}/allcommon/helper/MapStringBuilder.${glTemplateFileExtension}",$path,"", "") + + $database.debug(" parseMapStringBuilderImpl();") + #set ( $path = "${strings.getPackageAsPath(${glPackageBaseCommonHelper})}${glMapStringBuilderImplName}.${glClassFileExtension}" ) + $generator.parse("om/${glTargetLanguage}/allcommon/helper/MapStringBuilderImpl.${glTemplateFileExtension}",$path,"", "") + + #if ($database.isTargetLanguageJava()) + #set ($path = $strings.getPackageAsPath(${glPackageBaseCommonHelperCharacter})) + $database.makeDirectory($path) + + #set ($path = $strings.getPackageAsPath(${glPackageBaseCommonHelperCharacterImpl})) + $database.makeDirectory($path) + + $database.debug(" parseGeneralCharacter();") + #set ( $path = "${strings.getPackageAsPath(${glPackageBaseCommonHelperCharacter})}${glGeneralCharacterName}.${glClassFileExtension}" ) + $generator.parse("om/${glTargetLanguage}/allcommon/helper/character/GeneralCharacter.${glTemplateFileExtension}",$path,"", "") + + $database.debug(" parseGeneralCharacterImpl();") + #set ( $path = "${strings.getPackageAsPath(${glPackageBaseCommonHelperCharacterImpl})}${glGeneralCharacterImplName}.${glClassFileExtension}" ) + $generator.parse("om/${glTargetLanguage}/allcommon/helper/character/impl/GeneralCharacterImpl.${glTemplateFileExtension}",$path,"", "") + + $database.debug(" parseJapaneseCharacter();") + #set ( $path = "${strings.getPackageAsPath(${glPackageBaseCommonHelperCharacter})}${glJapaneseCharacterName}.${glClassFileExtension}" ) + $generator.parse("om/${glTargetLanguage}/allcommon/helper/character/JapaneseCharacter.${glTemplateFileExtension}",$path,"", "") + + $database.debug(" parseJapaneseCharacterImpl();") + #set ( $path = "${strings.getPackageAsPath(${glPackageBaseCommonHelperCharacterImpl})}${glJapaneseCharacterImplName}.${glClassFileExtension}" ) + $generator.parse("om/${glTargetLanguage}/allcommon/helper/character/impl/JapaneseCharacterImpl.${glTemplateFileExtension}",$path,"", "") + + #set ($path = $strings.getPackageAsPath(${glPackageBaseCommonHelperToken})) + $database.makeDirectory($path) + + #set ($path = $strings.getPackageAsPath(${glPackageBaseCommonHelperTokenLine})) + $database.makeDirectory($path) + + #set ($path = $strings.getPackageAsPath(${glPackageBaseCommonHelperTokenLineImpl})) + $database.makeDirectory($path) + + #set ($path = $strings.getPackageAsPath(${glPackageBaseCommonHelperTokenFile})) + $database.makeDirectory($path) + + #set ($path = $strings.getPackageAsPath(${glPackageBaseCommonHelperTokenFileImpl})) + $database.makeDirectory($path) + + $database.debug(" parseLineToken();") + #set ( $path = "${strings.getPackageAsPath(${glPackageBaseCommonHelperTokenLine})}${glLineTokenName}.${glClassFileExtension}" ) + $generator.parse("om/${glTargetLanguage}/allcommon/helper/token/line/LineToken.${glTemplateFileExtension}",$path,"", "") + + $database.debug(" parseLineTokenImpl();") + #set ( $path = "${strings.getPackageAsPath(${glPackageBaseCommonHelperTokenLineImpl})}${glLineTokenImplName}.${glClassFileExtension}" ) + $generator.parse("om/${glTargetLanguage}/allcommon/helper/token/line/impl/LineTokenImpl.${glTemplateFileExtension}",$path,"", "") + + $database.debug(" parseLineTokenizingOption();") + #set ( $path = "${strings.getPackageAsPath(${glPackageBaseCommonHelperTokenLine})}${glLineTokenizingOptionName}.${glClassFileExtension}" ) + $generator.parse("om/${glTargetLanguage}/allcommon/helper/token/line/LineTokenizingOption.${glTemplateFileExtension}",$path,"", "") + + $database.debug(" parseLineMakingOption();") + #set ( $path = "${strings.getPackageAsPath(${glPackageBaseCommonHelperTokenLine})}${glLineMakingOptionName}.${glClassFileExtension}" ) + $generator.parse("om/${glTargetLanguage}/allcommon/helper/token/line/LineMakingOption.${glTemplateFileExtension}",$path,"", "") + + $database.debug(" parseFileToken();") + #set ( $path = "${strings.getPackageAsPath(${glPackageBaseCommonHelperTokenFile})}${glFileTokenName}.${glClassFileExtension}" ) + $generator.parse("om/${glTargetLanguage}/allcommon/helper/token/file/FileToken.${glTemplateFileExtension}",$path,"", "") + + $database.debug(" parseFileTokenImpl();") + #set ( $path = "${strings.getPackageAsPath(${glPackageBaseCommonHelperTokenFileImpl})}${glFileTokenImplName}.${glClassFileExtension}" ) + $generator.parse("om/${glTargetLanguage}/allcommon/helper/token/file/impl/FileTokenImpl.${glTemplateFileExtension}",$path,"", "") + + $database.debug(" parseFileTokenizingOption();") + #set ( $path = "${strings.getPackageAsPath(${glPackageBaseCommonHelperTokenFile})}${glFileTokenizingOptionName}.${glClassFileExtension}" ) + $generator.parse("om/${glTargetLanguage}/allcommon/helper/token/file/FileTokenizingOption.${glTemplateFileExtension}",$path,"", "") + + $database.debug(" parseFileTokenizingRowResource();") + #set ( $path = "${strings.getPackageAsPath(${glPackageBaseCommonHelperTokenFile})}${glFileTokenizingRowResourceName}.${glClassFileExtension}" ) + $generator.parse("om/${glTargetLanguage}/allcommon/helper/token/file/FileTokenizingRowResource.${glTemplateFileExtension}",$path,"", "") + + $database.debug(" parseFileTokenizingCallback();") + #set ( $path = "${strings.getPackageAsPath(${glPackageBaseCommonHelperTokenFile})}${glFileTokenizingCallbackName}.${glClassFileExtension}" ) + $generator.parse("om/${glTargetLanguage}/allcommon/helper/token/file/FileTokenizingCallback.${glTemplateFileExtension}",$path,"", "") + + $database.debug(" parseFileTokenizingHeaderInfo();") + #set ( $path = "${strings.getPackageAsPath(${glPackageBaseCommonHelperTokenFile})}${glFileTokenizingHeaderInfoName}.${glClassFileExtension}" ) + $generator.parse("om/${glTargetLanguage}/allcommon/helper/token/file/FileTokenizingHeaderInfo.${glTemplateFileExtension}",$path,"", "") + + $database.debug(" parseFileMakingOption();") + #set ( $path = "${strings.getPackageAsPath(${glPackageBaseCommonHelperTokenFile})}${glFileMakingOptionName}.${glClassFileExtension}" ) + $generator.parse("om/${glTargetLanguage}/allcommon/helper/token/file/FileMakingOption.${glTemplateFileExtension}",$path,"", "") + + $database.debug(" parseFileMakingRowResource();") + #set ( $path = "${strings.getPackageAsPath(${glPackageBaseCommonHelperTokenFile})}${glFileMakingRowResourceName}.${glClassFileExtension}" ) + $generator.parse("om/${glTargetLanguage}/allcommon/helper/token/file/FileMakingRowResource.${glTemplateFileExtension}",$path,"", "") + + $database.debug(" parseFileMakingCallback();") + #set ( $path = "${strings.getPackageAsPath(${glPackageBaseCommonHelperTokenFile})}${glFileMakingCallbackName}.${glClassFileExtension}" ) + $generator.parse("om/${glTargetLanguage}/allcommon/helper/token/file/FileMakingCallback.${glTemplateFileExtension}",$path,"", "") + + $database.debug(" parseFileMakingHeaderInfo();") + #set ( $path = "${strings.getPackageAsPath(${glPackageBaseCommonHelperTokenFile})}${glFileMakingHeaderInfoName}.${glClassFileExtension}" ) + $generator.parse("om/${glTargetLanguage}/allcommon/helper/token/file/FileMakingHeaderInfo.${glTemplateFileExtension}",$path,"", "") + + $database.debug(" parseFileMakingSimpleFacade();") + #set ( $path = "${strings.getPackageAsPath(${glPackageBaseCommonHelperTokenFile})}${glFileMakingSimpleFacadeName}.${glClassFileExtension}" ) + $generator.parse("om/${glTargetLanguage}/allcommon/helper/token/file/FileMakingSimpleFacade.${glTemplateFileExtension}",$path,"", "") + + $database.debug(" parseFileMakingSimpleFacadeImpl();") + #set ( $path = "${strings.getPackageAsPath(${glPackageBaseCommonHelperTokenFileImpl})}${glFileMakingSimpleFacadeImplName}.${glClassFileExtension}" ) + $generator.parse("om/${glTargetLanguage}/allcommon/helper/token/file/impl/FileMakingSimpleFacadeImpl.${glTemplateFileExtension}",$path,"", "") + #end + + $database.debug("}") + + ## ------------------------------------------------------- + ## allcommon classification + ## ------------------------ + ## Setup java directory for allcommon. + $database.setupJavaDir_for_allcommon() + + #set ($path = $strings.getPackageAsPath(${glPackageBaseCommon})) + $database.makeDirectory($path) + + #if ($database.hasClassificationDefinitionMap()) + $database.debug("parseClassification();") + #set ( $path = "${strings.getPackageAsPath(${glPackageBaseCommon})}${glClassificationDefinition}.${glClassFileExtension}" ) + $generator.parse("om/${glTargetLanguage}/allcommon/ClassificationDefinition.${glTemplateFileExtension}",$path ,"" ,"") + #end + + ## ------------------------------------------------------- + ## allcommon container + ## ------------------- + ## Setup java directory for daoDicon. + $database.setupJavaDir_for_daoDicon() + + $database.debug("parseDaoDicon() {") + #foreach ($daoDiconPackageName in $database.daoDiconPackageNameList) + #set ($path = "${daoDiconPackageName}" ) + $database.makeDirectory($path) + + #set ($path = "${daoDiconPackageName}/${glDaoDiconFileName}" ) + $database.debug(" ${path}") + $generator.parse("om/${glTargetLanguage}/allcommon/DaoDicon.${glTemplateFileExtension}", $path, "", "") + #end + $database.debug("}") + + ## ------------------------------------------------------- + ## allcommon dao-selector + ## ---------------------- + ## Setup java directory for daoSelector. + $database.setupJavaDir_for_daoSelector() + + #set ($path = $strings.getPackageAsPath(${glPackageBaseCommon})) + $database.makeDirectory($path) + + $database.debug("public void parseDaoSelector() {") + $database.debug(" parseDaoSelector();") + #set ( $path = "${strings.getPackageAsPath(${glPackageBaseCommon})}${glDaoSelectorInterfaceName}.${glClassFileExtension}" ) + $generator.parse("om/${glTargetLanguage}/allcommon/DaoSelector.${glTemplateFileExtension}",$path ,"", "") + + ## ----------------------------------------------------------------------------------------------------- + ## Parse cache dao-selector + ## ------------------------ + ## Setup java directory for cacheDaoSelector. + $database.setupJavaDir_for_cacheDaoSelector() + + #set ($path = $strings.getPackageAsPath(${glPackageBaseCommon})) + $database.makeDirectory($path) + + $database.debug(" parseCacheDaoSelector();") + #set ( $path = "${strings.getPackageAsPath(${glPackageBaseCommon})}${glCacheDaoSelectorName}.${glClassFileExtension}" ) + $generator.parse("om/${glTargetLanguage}/allcommon/CacheDaoSelector.${glTemplateFileExtension}",$path ,"", "") + $database.debug("}") + + ## ----------------------------------------------------------------------------------------------------- + ## Parse gen meta data + ## ------------------- + ## Setup java directory for genMetaData. + $database.setupJavaDir_for_genMetaData() + + #set ($path = $strings.getPackageAsPath(${glPackageBaseCommon})) + $database.makeDirectory($path) + + $database.debug("parseGenMetaData();") + #set ( $path = "${strings.getPackageAsPath(${glPackageBaseCommon})}${glGenMetaDataClassName}.${glClassFileExtension}" ) + $generator.parse("om/${glTargetLanguage}/allcommon/GenMetaData.${glTemplateFileExtension}",$path ,"" ,"") + + ## ----------------------------------------------------------------------------------------------------- + ## Parse interceptor class + ## ----------------------- + ## Setup java directory for Interceptor. + $database.setupJavaDir_for_interceptor() + + #set ($path = $strings.getPackageAsPath(${glPackageBaseCommonInterceptor})) + $database.makeDirectory($path) + + $database.debug("public void parseInterceptorClass() {") + $database.debug(" parseCommonColumnSetupAbstractInterceptor();") + #set ( $path = "${strings.getPackageAsPath(${glPackageBaseCommonInterceptor})}${glCommonColumnSetupAbstractInterceptor}.${glClassFileExtension}" ) + $generator.parse("om/${glTargetLanguage}/allcommon/interceptor/CommonColumnSetupAbstractInterceptor.${glTemplateFileExtension}",$path,"", "") + + $database.debug(" parseCommonColumnSetupBeforeInsertInterceptor();") + #set ( $path = "${strings.getPackageAsPath(${glPackageBaseCommonInterceptor})}${glCommonColumnSetupBeforeInsertInterceptor}.${glClassFileExtension}" ) + $generator.parse("om/${glTargetLanguage}/allcommon/interceptor/CommonColumnSetupBeforeInsertInterceptor.${glTemplateFileExtension}",$path,"", "") + + $database.debug(" parseCommonColumnSetupBeforeUpdateInterceptor();") + #set ( $path = "${strings.getPackageAsPath(${glPackageBaseCommonInterceptor})}${glCommonColumnSetupBeforeUpdateInterceptor}.${glClassFileExtension}" ) + $generator.parse("om/${glTargetLanguage}/allcommon/interceptor/CommonColumnSetupBeforeUpdateInterceptor.${glTemplateFileExtension}",$path,"", "") + + $database.debug(" parseCommonColumnSetupBeforeDeleteInterceptor();") + #set ( $path = "${strings.getPackageAsPath(${glPackageBaseCommonInterceptor})}${glCommonColumnSetupBeforeDeleteInterceptor}.${glClassFileExtension}" ) + $generator.parse("om/${glTargetLanguage}/allcommon/interceptor/CommonColumnSetupBeforeDeleteInterceptor.${glTemplateFileExtension}",$path,"", "") + $database.debug("}") + + + ## ----------------------------------------------------------------------------------------------------- + ## Parse jdbc class + ## ---------------- + #if ($database.isTargetLanguageJava() && $database.isAvailableGenerics()) + $database.setupJavaDir_for_allcommon() + + #set ($path = $strings.getPackageAsPath(${glPackageBaseCommonJdbcHistory})) + $database.makeDirectory($path) + + $database.debug(" parsePreparedExecutionBeanName();") + #set ( $path = "${strings.getPackageAsPath(${glPackageBaseCommonJdbcHistory})}${glPreparedExecutionBeanName}.${glClassFileExtension}" ) + $generator.parse("om/${glTargetLanguage}/allcommon/jdbc/history/PreparedExecutionBean.${glTemplateFileExtension}",$path,"", "") + + $database.debug(" parsePreparedParameterElement();") + #set ( $path = "${strings.getPackageAsPath(${glPackageBaseCommonJdbcHistory})}${glPreparedParameterElementName}.${glClassFileExtension}" ) + $generator.parse("om/${glTargetLanguage}/allcommon/jdbc/history/PreparedParameterElement.${glTemplateFileExtension}",$path,"", "") + + $database.debug(" parseStatementHistory();") + #set ( $path = "${strings.getPackageAsPath(${glPackageBaseCommonJdbcHistory})}${glStatementHistoryName}.${glClassFileExtension}" ) + $generator.parse("om/${glTargetLanguage}/allcommon/jdbc/history/StatementHistory.${glTemplateFileExtension}",$path,"", "") + + $database.debug(" parseStatementHistoryWitness();") + #set ( $path = "${strings.getPackageAsPath(${glPackageBaseCommonJdbcHistory})}${glStatementHistoryWitnessName}.${glClassFileExtension}" ) + $generator.parse("om/${glTargetLanguage}/allcommon/jdbc/history/StatementHistoryWitness.${glTemplateFileExtension}",$path,"", "") + + $database.debug(" parseTraceablePreparedStatement();") + #set ( $path = "${strings.getPackageAsPath(${glPackageBaseCommonJdbcHistory})}${glTraceablePreparedStatementName}.${glClassFileExtension}" ) + $generator.parse("om/${glTargetLanguage}/allcommon/jdbc/history/TraceablePreparedStatement.${glTemplateFileExtension}",$path,"", "") + #end + + ## ----------------------------------------------------------------------------------------------------- + ## Parse extended s2dao class + ## -------------------------- + ## Setup java directory for s2daoObject. + $database.setupJavaDir_for_s2daoObject() + + #set ($path = $strings.getPackageAsPath(${glPackageBaseCommonS2Dao})) + $database.makeDirectory($path) + + #set ( $path = "${strings.getPackageAsPath(${glPackageBaseCommonS2Dao})}${glDaoInterceptor}.${glClassFileExtension}" ) + $generator.parse("om/${glTargetLanguage}/allcommon/s2dao/S2DaoInterceptor.${glTemplateFileExtension}",$path,"", "") + + #set ( $path = "${strings.getPackageAsPath(${glPackageBaseCommonS2Dao})}${glDaoMetaDataExtension}.${glClassFileExtension}" ) + $generator.parse("om/${glTargetLanguage}/allcommon/s2dao/S2DaoMetaDataExtension.${glTemplateFileExtension}",$path,"", "") + + #set ( $path = "${strings.getPackageAsPath(${glPackageBaseCommonS2Dao})}${glDaoMetaDataFactoryImpl}.${glClassFileExtension}" ) + $generator.parse("om/${glTargetLanguage}/allcommon/s2dao/S2DaoMetaDataFactoryImpl.${glTemplateFileExtension}",$path,"", "") + + #if ($database.isTargetLanguageJava() && $database.isVersionAfter1040()) + #set ( $path = "${strings.getPackageAsPath(${glPackageBaseCommonS2Dao})}${glBeanMetaDataFactoryImpl}.${glClassFileExtension}" ) + $generator.parse("om/${glTargetLanguage}/allcommon/s2dao/S2BeanMetaDataFactoryImpl.${glTemplateFileExtension}",$path,"", "") + #end + + #set ( $path = "${strings.getPackageAsPath(${glPackageBaseCommonS2Dao})}${glSelectDynamicCommand}.${glClassFileExtension}" ) + $generator.parse("om/${glTargetLanguage}/allcommon/s2dao/S2DaoSelectDynamicCommand.${glTemplateFileExtension}",$path,"", "") + + #if ($database.isTargetLanguageJava()) + #set ( $path = "${strings.getPackageAsPath(${glPackageBaseCommonS2Dao})}${glDaoStatementFactory}.${glClassFileExtension}" ) + $generator.parse("om/${glTargetLanguage}/allcommon/s2dao/S2DaoStatementFactory.${glTemplateFileExtension}",$path,"", "") + #end + + #set ( $path = "${strings.getPackageAsPath(${glPackageBaseCommonS2Dao})}${glFetchNarrowingResultSetFactory}.${glClassFileExtension}" ) + $generator.parse("om/${glTargetLanguage}/allcommon/s2dao/FetchNarrowingResultSetFactory.${glTemplateFileExtension}",$path,"", "") + + #set ( $path = "${strings.getPackageAsPath(${glPackageBaseCommonS2Dao})}${glFetchNarrowingResultSetWrapper}.${glClassFileExtension}" ) + $generator.parse("om/${glTargetLanguage}/allcommon/s2dao/FetchNarrowingResultSetWrapper.${glTemplateFileExtension}",$path,"", "") + + ## ----------------------------------------------------------------------------------------------------- + ## Parse cutomize dao + ## ------------------ + #if ($database.isAvailableCustomizeDaoGeneration()) + ## Setup java directory. + $database.setupJavaDir_for_baseCustomizeDao() + + #set ($path = $strings.getPackageAsPath(${glPackageBaseCustomizeDao})) + $database.makeDirectory($path) + #set ($path = $strings.getPackageAsPath(${glPackageBaseCustomizeEntity})) + $database.makeDirectory($path) + #set ($path = $strings.getPackageAsPath(${glPackageBaseCustomizeDBMeta})) + $database.makeDirectory($path) + + ## Setup java directory. + $database.setupJavaDir_for_extendedCustomizeDao() + + #set ($path = $strings.getPackageAsPath(${glPackageExtendedCustomizeDao})) + $database.makeDirectory($path) + #set ($path = $strings.getPackageAsPath(${glPackageExtendedCustomizeEntity})) + $database.makeDirectory($path) + + $database.debug("public void parseCustomizeDao() {") + $database.debug(" final List tableNameList = getCustomizeTableList();") + $database.debug(" for (String tableName : tableNameList) {") + #foreach ($table in $database.CustomizeTableList) + #set ($myBaseDaoClassName = "${glProjectPrefix}${glBasePrefix}${table.JavaName}Dao") + #set ($myBaseDaoPackageName = "${glPackageBaseCustomizeDao}") + #set ($myExtendedDaoClassName = "${glProjectPrefix}${table.JavaName}Dao") + #set ($myExtendedDaoPackageName = "${glPackageExtendedCustomizeDao}") + #set ($myBaseObjectClassName = "${glProjectPrefix}${glBasePrefix}${table.JavaName}${glBaseSuffixForEntity}") + #set ($myBaseEntityPackageName = "${glPackageBaseCustomizeEntity}") + #set ($myExtendedObjectClassName = "${glProjectPrefix}${table.JavaName}") + #set ($myExtendedEntityPackageName = "${glPackageExtendedCustomizeEntity}") + #set ($myDBMetaClassName = "${glProjectPrefix}${table.JavaName}Dbm") + #set ($myDBMetaPackageName = "${glPackageBaseCustomizeDBMeta}") + + #set ($isExistBehavior = false) + #set ($isExistDao = true) + #set ($isExistConditionBean = false) + + ## Setup java directory. + $database.setupJavaDir_for_baseCustomizeDao() + + $database.debug(" parseCustomizeBaseDao(tableName); // ${myBaseDaoClassName}") + #set ( $path = "${strings.getPackageAsPath(${myBaseDaoPackageName})}${myBaseDaoClassName}.${glClassFileExtension}" ) + $generator.parse("om/${glTargetLanguage}/bsdao/customize/BaseCustomizeDao.${glTemplateFileExtension}",$path ,"" ,"") + + $database.debug(" parseCustomizeBaseEntity(tableName); // ${myBaseObjectClassName}") + #set ( $path = "${strings.getPackageAsPath(${myBaseEntityPackageName})}${myBaseObjectClassName}.${glClassFileExtension}" ) + $generator.parse("om/${glTargetLanguage}/bsentity/BaseEntity.${glTemplateFileExtension}",$path ,"" ,"") + + $database.debug(" parseCustomizeDBMeta(tableName); // ${myDBMetaClassName}") + #set ( $path = "${strings.getPackageAsPath(${myDBMetaPackageName})}${myDBMetaClassName}.${glClassFileExtension}" ) + $generator.parse("om/${glTargetLanguage}/bsentity/dbmeta/DBMetaImpl.${glTemplateFileExtension}",$path,"", "") + + ## Setup java directory. + $database.setupJavaDir_for_extendedCustomizeDao() + + #set ( $path = "${strings.getPackageAsPath(${myExtendedDaoPackageName})}${myExtendedDaoClassName}.${glClassFileExtension}" ) + #if (!$files.file(${generator.OutputPath},$path).exists()) + $database.debug(" parseArgumentExtendedDai(tableName); // ${myExtendedDaoClassName}") + $generator.parse("om/${glTargetLanguage}/exdao/ExtendedDao.${glTemplateFileExtension}",$path ,"" ,"") + #end + + #set ( $path = "${strings.getPackageAsPath(${myExtendedEntityPackageName})}${myExtendedObjectClassName}.${glClassFileExtension}" ) + #if (!$files.file(${generator.OutputPath},$path).exists()) + $database.debug(" parseArgumentExtendedEntity(tableName); // ${myExtendedDaoClassName}") + $generator.parse("om/${glTargetLanguage}/exentity/ExtendedEntity.${glTemplateFileExtension}",$path ,"" ,"") + #end + + #end + $database.debug(" }") + $database.debug("}") + #end + + ## ----------------------------------------------------------------------------------------------------- + ## Parse sqlParameter bean + ## ----------------------- + #if ($database.isAvailableSqlParameterBeanGeneration()) + ## Setup java directory. + $database.setupJavaDir_for_baseSqlParameter() + + #set ($path = $strings.getPackageAsPath(${glPackageBaseSqlParameterBean})) + $database.makeDirectory($path) + + ## Setup java directory. + $database.setupJavaDir_for_extendedSqlParameter() + + #set ($path = $strings.getPackageAsPath(${glPackageExtendedSqlParameterBean})) + $database.makeDirectory($path) + + $database.debug("public void parseSqlParameterBean() {") + $database.debug(" // Package is ${glPackageSqlParameterBean}") + $database.debug(" final List classNameList = getSqlParameterBeanClassNameList();") + $database.debug(" for (String className : classNameList) {") + #foreach ($sqlParameterBeanClassName in $database.SqlParameterBeanClassNameList) + + #set ($propertyDefinitionMap = ${database.getSqlParameterBeanDefinitionMap().get($sqlParameterBeanClassName)}) + #set ($mySqlParameterBeanName = "${sqlParameterBeanClassName}") + #set ($myBaseSqlParameterClassName = "${glProjectPrefix}${glBasePrefix}${sqlParameterBeanClassName}") + #set ($myExtendedSqlParameterClassName = "${glProjectPrefix}${sqlParameterBeanClassName}") + + ## Setup java directory. + $database.setupJavaDir_for_baseSqlParameter() + + $database.debug(" parseSqlParameterBean('${mySqlParameterBeanClassName}');") + #set ( $path = "${strings.getPackageAsPath(${glPackageBaseSqlParameterBean})}${myBaseSqlParameterClassName}.${glClassFileExtension}" ) + $generator.parse("om/${glTargetLanguage}/sbean/SqlParameterBeanBs.${glTemplateFileExtension}",$path ,"" ,"") + + ## Setup java directory. + $database.setupJavaDir_for_extendedSqlParameter() + + $database.debug(" parseSqlParameterBean('${myExtendedSqlParameterClassName}');") + #set ( $path = "${strings.getPackageAsPath(${glPackageExtendedSqlParameterBean})}${myExtendedSqlParameterClassName}.${glClassFileExtension}" ) + #if (!$files.file(${generator.OutputPath},$path).exists()) + $generator.parse("om/${glTargetLanguage}/sbean/SqlParameterBeanEx.${glTemplateFileExtension}",$path ,"" ,"") + #end + #end + $database.debug(" }") + $database.debug("}") + #end + + ## ----------------------------------------------------------------------------------------------------- + ## Parse arguemnt bean + ## ------------------- + #if ($database.isAvailableArgumentBeanGeneration()) + ## Setup java directory. + $database.setupJavaDir_for_argumentBean() + + #set ($path = $strings.getPackageAsPath(${glPackageArgumentBean})) + $database.makeDirectory($path) + + $database.debug("public void parseArgumentBean() {") + $database.debug(" // Package is ${glPackageArgumentBean}") + $database.debug(" final List classNameList = getArgumentBeanClassNameList();") + $database.debug(" for (String className : classNameList) {") + #foreach ($argumentBeanClassName in $database.ArgumentBeanClassNameList) + + #set ($propertyDefinitionMap = ${database.getArgumentBeanDefinitionMap().get($argumentBeanClassName)}) + #set ($myArgumentBeanName = "${argumentBeanClassName}") + #set ($myArgumentBeanClassName = "${glProjectPrefix}${argumentBeanClassName}") + + ## Setup java directory. + $database.setupJavaDir_for_argumentBean() + + $database.debug(" parseArgumentBean('${myArgumentBeanClassName}');") + #set ( $path = "${strings.getPackageAsPath(${glPackageArgumentBean})}${myArgumentBeanClassName}.${glClassFileExtension}" ) + $generator.parse("om/${glTargetLanguage}/sbean/ArgumentBean.${glTemplateFileExtension}",$path ,"" ,"") + #end + $database.debug(" }") + $database.debug("}") + #end + + ## ----------------------------------------------------------------------------------------------------- + ## Parse table object + ## ------------------ + ## Setup java directory for base. + $database.setupJavaDir_for_base() + + ## for Sql2Entity + #set ($isSql2Entity = false) + + #if ($database.isAvailableBehaviorGeneration()) + #set ($path = $strings.getPackageAsPath(${glPackageBaseBhv})) + $database.makeDirectory($path) + #end + #set ($path = $strings.getPackageAsPath(${glPackageBaseDao})) + $database.makeDirectory($path) + #set ($path = $strings.getPackageAsPath(${glPackageBaseEntity})) + $database.makeDirectory($path) + #set ($path = $strings.getPackageAsPath(${glPackageBaseDBMeta})) + $database.makeDirectory($path) + + ## Setup java directory for cbean. + $database.setupJavaDir_for_base_cbean() + + #set ($path = $strings.getPackageAsPath(${glPackageBaseCB})) + $database.makeDirectory($path) + + #set ($path = $strings.getPackageAsPath(${glPackageBaseCQ})) + $database.makeDirectory($path) + + #set ($path = $strings.getPackageAsPath(${glPackageCIQ})) + $database.makeDirectory($path) + + #set ($path = $strings.getPackageAsPath(${glPackageCQ})) + $database.makeDirectory($path) + + #set ($path = $strings.getPackageAsPath(${glPackageNss})) + $database.makeDirectory($path) + + ## Setup java directory for cbean. + $database.setupJavaDir_for_extended_cbean() + + #set ($path = $strings.getPackageAsPath(${glPackageCB})) + $database.makeDirectory($path) + + ## Setup java directory for extended. + $database.setupJavaDir_for_extended() + + #if ($database.isAvailableBehaviorGeneration()) + #set ($path = $strings.getPackageAsPath(${glPackageExtendedBhv})) + $database.makeDirectory($path) + #end + #set ($path = $strings.getPackageAsPath(${glPackageExtendedDao})) + $database.makeDirectory($path) + #set ($path = $strings.getPackageAsPath(${glPackageExtendedEntity})) + $database.makeDirectory($path) + + $database.debug("public void parseTableList() {") + $database.debug(" final List tableList = getTableList();") + $database.debug(" for (Table tbl : tableList) {") + ## + ## Loop by tables. + ## + #foreach ($table in $database.Tables) + #if (!$table.isForReferenceOnly()) + + $database.debug(" parseTable(tbl); // ${table.Name} : ${table.JavaName}") + ## + ## Java name of the current table. + ## + #set ($myBaseBhvClassName = "${glProjectPrefix}${glBasePrefix}${table.JavaName}Bhv") + #set ($myBaseBhvPackageName = "${glPackageBaseBhv}") + #set ($myExtendedBhvClassName = "${glProjectPrefix}${table.JavaName}Bhv") + #set ($myExtendedBhvPackageName = "${glPackageExtendedBhv}") + + #set ($myBaseDaoClassName = "${glProjectPrefix}${glBasePrefix}${table.JavaName}Dao") + #set ($myBaseDaoPackageName = "${glPackageBaseDao}") + + #set ($myExtendedDaoClassName = "${glProjectPrefix}${table.JavaName}Dao") + #set ($myExtendedDaoPackageName = "${glPackageExtendedDao}") + + #set ($myBaseObjectClassName = "${glProjectPrefix}${glBasePrefix}${table.JavaName}${glBaseSuffixForEntity}") + #set ($myBaseEntityPackageName = "${glPackageBaseEntity}") + + #set ($myExtendedObjectClassName = "${glProjectPrefix}${table.JavaName}") + #set ($myExtendedEntityPackageName = "${glPackageExtendedEntity}") + + #set ($myBaseConditionBeanClassName = "${myBaseObjectClassName}${glConditionBeanInitialName}") + #set ($myConditionBeanClassName = "${myExtendedObjectClassName}${glConditionBeanInitialName}") + #set ($myAbstractBaseConditionQueryClassName = "${glProjectPrefix}Abstract${glBasePrefix}${table.JavaName}${glConditionQueryInitialName}") + #set ($myBaseConditionQueryClassName = "${myBaseObjectClassName}${glConditionQueryInitialName}") + #set ($myConditionQueryClassName = "${myExtendedObjectClassName}${glConditionQueryInitialName}") + #set ($myConditionInlineQueryClassName = "${myExtendedObjectClassName}CIQ") + #set ($myNestSelectSetupperClassName = "${myExtendedObjectClassName}Nss") + + #set ($myDBMetaClassName = "${glProjectPrefix}${table.JavaName}Dbm") + #set ($myDBMetaPackageName = "${glPackageBaseDBMeta}") + + #set ($myAttachedCBArgsString = "${glPackageCB}.${myConditionBeanClassName} ${glAttachedCBArgsVariableName}") + + #set ($myEntityVariableName = "${table.uncapitalisedJavaName}") + #set ($myEntityListVariableName = "${table.uncapitalisedJavaName}List") + #set ($myCBVariableName = "${table.uncapitalisedJavaName}") + #set ($myBehaviorVariableName = "${table.uncapitalisedJavaName}Bhv") + + #set ($isExistBehavior = false) + #if ($database.isAvailableBehaviorGeneration()) + #set ($isExistBehavior = true) + #end + #set ($isExistDao = true) + #set ($isExistConditionBean = true) + + ## Setup java directory for base. + $database.setupJavaDir_for_base() + + #if ($database.isAvailableBehaviorGeneration()) + #if ($database.isTargetLanguageCSharp()) + #set ($myBaseBhvInterfaceName = "${glProjectPrefix}${glBasePrefix}${table.JavaName}Bhv") + #set ($myExtendedBhvInterfaceName = "${glProjectPrefix}${table.JavaName}Bhv") + #set ($myBaseBhvClassName = "${glProjectPrefix}${glBasePrefix}${table.JavaName}BhvImpl") + #set ($myExtendedBhvClassName = "${glProjectPrefix}${table.JavaName}BhvImpl") + + #set ( $path = "${strings.getPackageAsPath(${glPackageBaseBhv})}${myBaseBhvClassName}.${glClassFileExtension}" ) + $generator.parse("om/${glTargetLanguage}/bsbhv/BaseBhvImpl.${glTemplateFileExtension}", $path, "table", $table) + + #set ( $path = "${strings.getPackageAsPath(${glPackageBaseBhv})}${myBaseBhvInterfaceName}.${glClassFileExtension}" ) + $generator.parse("om/${glTargetLanguage}/bsbhv/BaseBhv.${glTemplateFileExtension}", $path, "table", $table) + #else + #set ( $path = "${strings.getPackageAsPath(${glPackageBaseBhv})}${myBaseBhvClassName}.${glClassFileExtension}" ) + $generator.parse("om/${glTargetLanguage}/bsbhv/BaseBhv.${glTemplateFileExtension}", $path, "table", $table) + #end + #end + + #set ( $path = "${strings.getPackageAsPath(${glPackageBaseDao})}${myBaseDaoClassName}.${glClassFileExtension}" ) + $generator.parse("om/${glTargetLanguage}/bsdao/BaseDao.${glTemplateFileExtension}", $path, "table", $table) + + #set ( $path = "${strings.getPackageAsPath(${glPackageBaseEntity})}${myBaseObjectClassName}.${glClassFileExtension}" ) + $generator.parse("om/${glTargetLanguage}/bsentity/BaseEntity.${glTemplateFileExtension}", $path, "table", $table) + + #set ( $path = "${strings.getPackageAsPath(${glPackageBaseDBMeta})}${myDBMetaClassName}.${glClassFileExtension}" ) + $generator.parse("om/${glTargetLanguage}/bsentity/dbmeta/DBMetaImpl.${glTemplateFileExtension}",$path,"", "") + + ## Setup java directory for extended. + $database.setupJavaDir_for_extended() + + #if (!$database.isStopGenerateExtendedBhv()) + #if ($database.isAvailableBehaviorGeneration()) + #if ($database.isTargetLanguageCSharp()) + #set ($myBaseBhvInterfaceName = "${glProjectPrefix}${glBasePrefix}${table.JavaName}Bhv") + #set ($myExtendedBhvInterfaceName = "${glProjectPrefix}${table.JavaName}Bhv") + #set ($myBaseBhvClassName = "${glProjectPrefix}${glBasePrefix}${table.JavaName}BhvImpl") + #set ($myExtendedBhvClassName = "${glProjectPrefix}${table.JavaName}BhvImpl") + + #set ( $path = "${strings.getPackageAsPath(${glPackageExtendedBhv})}${myExtendedBhvClassName}.${glClassFileExtension}" ) + #if (!$files.file(${generator.OutputPath},$path).exists()) + $generator.parse("om/${glTargetLanguage}/exbhv/ExtendedBhvImpl.${glTemplateFileExtension}", $path, "table", $table) + #end + + #set ( $path = "${strings.getPackageAsPath(${glPackageExtendedBhv})}${myExtendedBhvInterfaceName}.${glClassFileExtension}" ) + #if (!$files.file(${generator.OutputPath},$path).exists()) + $generator.parse("om/${glTargetLanguage}/exbhv/ExtendedBhv.${glTemplateFileExtension}", $path, "table", $table) + #end + #else + #set ( $path = "${strings.getPackageAsPath(${glPackageExtendedBhv})}${myExtendedBhvClassName}.${glClassFileExtension}" ) + #if (!$files.file(${generator.OutputPath},$path).exists()) + $generator.parse("om/${glTargetLanguage}/exbhv/ExtendedBhv.${glTemplateFileExtension}", $path, "table", $table) + #end + #end + #end + #end + + #if (!$database.isStopGenerateExtendedDao()) + #set ( $path = "${strings.getPackageAsPath(${glPackageExtendedDao})}${myExtendedDaoClassName}.${glClassFileExtension}" ) + #if (!$files.file(${generator.OutputPath},$path).exists()) + $generator.parse("om/${glTargetLanguage}/exdao/ExtendedDao.${glTemplateFileExtension}", $path, "table", $table) + #end + #end + + #if (!$database.isStopGenerateExtendedEntity()) + #set ( $path = "${strings.getPackageAsPath(${glPackageExtendedEntity})}${myExtendedObjectClassName}.${glClassFileExtension}" ) + #if (!$files.file(${generator.OutputPath},$path).exists()) + $generator.parse("om/${glTargetLanguage}/exentity/ExtendedEntity.${glTemplateFileExtension}", $path, "table", $table) + #end + #end + + ## Setup java directory for base-cbean. + $database.setupJavaDir_for_base_cbean() + + #set ( $path = "${strings.getPackageAsPath(${glPackageBaseCB})}${myBaseConditionBeanClassName}.${glClassFileExtension}" ) + $generator.parse("om/${glTargetLanguage}/cbean/BsConditionBean.${glTemplateFileExtension}", $path, "table", $table) + + #set ( $path = "${strings.getPackageAsPath(${glPackageBaseCQ})}${myAbstractBaseConditionQueryClassName}.${glClassFileExtension}" ) + $generator.parse("om/${glTargetLanguage}/cbean/AbstractBsConditionQuery.${glTemplateFileExtension}", $path, "table", $table) + + #set ( $path = "${strings.getPackageAsPath(${glPackageCIQ})}${myConditionInlineQueryClassName}.${glClassFileExtension}" ) + $generator.parse("om/${glTargetLanguage}/cbean/BsConditionInlineQuery.${glTemplateFileExtension}", $path, "table", $table) + + #if ($database.isJavaDirOnlyOne()) + #set ( $path = "${strings.getPackageAsPath(${glPackageBaseCQ})}${myBaseConditionQueryClassName}.${glClassFileExtension}" ) + $generator.parse("om/${glTargetLanguage}/cbean/BsConditionQuery.${glTemplateFileExtension}", $path, "table", $table) + #else + #set ( $path = "${strings.getPackageAsPath(${glPackageCQ})}${myConditionQueryClassName}.${glClassFileExtension}" ) + $generator.parse("om/${glTargetLanguage}/cbean/BsConditionQuery.${glTemplateFileExtension}", $path, "table", $table) + #end + + #set ( $path = "${strings.getPackageAsPath(${glPackageNss})}${myNestSelectSetupperClassName}.${glClassFileExtension}" ) + $generator.parse("om/${glTargetLanguage}/cbean/NestSelectSetupper.${glTemplateFileExtension}", $path, "table", $table) + + ## Setup java directory for extended-cbean. + $database.setupJavaDir_for_extended_cbean() + + #set ( $path = "${strings.getPackageAsPath(${glPackageCB})}${myConditionBeanClassName}.${glClassFileExtension}" ) + #if (!$files.file(${generator.OutputPath},$path).exists()) + $generator.parse("om/${glTargetLanguage}/cbean/ExConditionBean.${glTemplateFileExtension}", $path, "table", $table) + #end + + #if ($database.isJavaDirOnlyOne()) + #set ( $path = "${strings.getPackageAsPath(${glPackageCQ})}${myConditionQueryClassName}.${glClassFileExtension}" ) + #if (!$files.file(${generator.OutputPath},$path).exists()) + $generator.parse("om/${glTargetLanguage}/cbean/ExConditionQuery.${glTemplateFileExtension}", $path, "table", $table) + #end + #end + #end + #end + $database.debug(" }") + $database.debug("}") + #end +#end Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/CacheDaoSelector.vmnet =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/CacheDaoSelector.vmnet 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/CacheDaoSelector.vmnet 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,257 @@ + +using System; +using System.Collections; + +#if ($database.isAvailableBehaviorGeneration()) + +using ${glPackageBaseCommonBhv}; +#end + +using ${glPackageBaseCommonDBMeta}; + +namespace ${glPackageBaseCommon} { + + /** + * The implementation of dao-selector. + * + * @author ${database.ClassAuthor} + */ + public class ${glCacheDaoSelectorName} : ${glDaoSelectorInterfaceName} { + + protected Seasar.Framework.Container.IS2Container _container; + public Seasar.Framework.Container.IS2Container Container { + get { return _container; } + set { _container = value; } + } + + /** + * Get dao-readable by dao type. + * + * @param daoType Dao type. (NotNull) + * @return Dao-readable. (NotNull) + */ + public ${glDaoReadableInterfaceName} GetRDao(Type daoType) { + AssertObjectNotNull("daoType", daoType); + return GetRDaoObject(daoType); + } + + /** + * Get dao-readable by entity. + * + * @param entity Entity. (NotNull) + * @return Dao-readable. (NotNull) + */ + public ${glDaoReadableInterfaceName} GetRDao(${glEntityInterfaceName} entity) { + AssertObjectNotNull("entity", entity); + return GetRDao(entity.DBMeta.GetDaoType()); + } + + /** + * Get dao-readable by table multi-name. + * + * @param tableMultiName Table multi-name. (NotNull) + * @return Dao-readable. (NotNull) + */ + public ${glDaoReadableInterfaceName} GetRDao(String tableMultiName) { + AssertStringNotNullAndNotTrimmedEmpty("tableMultiName", tableMultiName); + ${glDBMetaInterfaceName} dbmeta = ${glDBMetaInstanceHandlerName}.GetInstanceByTableMultiName(tableMultiName); + return GetRDao(dbmeta.GetDaoType()); + } + + /** + * Get dao-writable by dao type. + * + * @param daoType Dao type. (NotNull) + * @return Dao-writable. (NotNull) + */ + public ${glDaoWritableInterfaceName} GetWDao(Type daoType) { + AssertObjectNotNull("daoType", daoType); + return (${glDaoWritableInterfaceName})GetRDao(daoType); + } + + /** + * Get dao-writable by entity. + * + * @param entity Entity. (NotNull) + * @return Dao-writable. (NotNull) + */ + public ${glDaoWritableInterfaceName} GetWDao(${glEntityInterfaceName} entity) { + AssertObjectNotNull("entity", entity); + return (${glDaoWritableInterfaceName})GetRDao(entity); + } + + /** + * Get dao-writable by table multi-name. + * + * @param tableMultiName Table multi-name. (NotNull) + * @return Dao-writable. (NotNull) + */ + public ${glDaoWritableInterfaceName} GetWDao(String tableMultiName) { + AssertStringNotNullAndNotTrimmedEmpty("tableMultiName", tableMultiName); + return (${glDaoWritableInterfaceName})GetRDao(tableMultiName); + } + + protected System.Collections.Generic.IDictionary _daoCacheMap; + protected ${glDaoReadableInterfaceName} GetRDaoObject(Type daoType) { + ${glDaoReadableInterfaceName} result = null; + if (_daoCacheMap == null) { + _daoCacheMap = new System.Collections.Generic.Dictionary(); + } + if (_daoCacheMap.ContainsKey(daoType)) { + result = _daoCacheMap[daoType]; + } + if (result == null) { + result = (${glDaoReadableInterfaceName})_container.GetComponent(daoType); + _daoCacheMap.Add(daoType, result); + } + return result; + } +#if ($database.isAvailableBehaviorGeneration()) + + /** + * Get bhv-readable by bhv type. + * + * @param bhvType Bhv type. (NotNull) + * @return Bhv-readable. (NotNull) + */ + public ${glBehaviorReadableInterfaceName} GetRBhv(Type bhvType) { + AssertObjectNotNull("bhvType", bhvType); + return GetRBhvObject(bhvType); + } + + /** + * Get bhv-readable by entity. + * + * @param entity Entity. (NotNull) + * @return Bhv-readable. (NotNull) + */ + public ${glBehaviorReadableInterfaceName} GetRBhv(${glEntityInterfaceName} entity) { + AssertObjectNotNull("entity", entity); + return GetRBhv(GetBhvType(entity.DBMeta)); + } + + /** + * Get bhv-readable by table multi-name. + * + * @param tableMultiName Table multi-name. (NotNull) + * @return Bhv-readable. (NotNull) + */ + public ${glBehaviorReadableInterfaceName} GetRBhv(String tableMultiName) { + AssertStringNotNullAndNotTrimmedEmpty("tableMultiName", tableMultiName); + ${glDBMetaInterfaceName} dbmeta = ${glDBMetaInstanceHandlerName}.GetInstanceByTableMultiName(tableMultiName); + return GetRBhv(GetBhvType(dbmeta)); + } + + /** + * Get bhv-writable by bhv type. + * + * @param bhvType Bhv type. (NotNull) + * @return Bhv-writable. (NotNull) + */ + public ${glBehaviorWritableInterfaceName} GetWBhv(Type bhvType) { + AssertObjectNotNull("bhvType", bhvType); + return (${glBehaviorWritableInterfaceName})GetRBhv(bhvType); + } + + /** + * Get bhv-writable by entity. + * + * @param entity Entity. (NotNull) + * @return Bhv-writable. (NotNull) + */ + public ${glBehaviorWritableInterfaceName} GetWBhv(${glEntityInterfaceName} entity) { + AssertObjectNotNull("entity", entity); + return (${glBehaviorWritableInterfaceName})GetRBhv(entity); + } + + /** + * Get bhv-writable by table multi-name. + * + * @param tableMultiName Table multi-name. (NotNull) + * @return Bhv-writable. (NotNull) + */ + public ${glBehaviorWritableInterfaceName} GetWBhv(String tableMultiName) { + AssertStringNotNullAndNotTrimmedEmpty("tableMultiName", tableMultiName); + return (${glBehaviorWritableInterfaceName})GetRBhv(tableMultiName); + } + + /** + * Get bhv-type by dbmeta. + * + * @param dbmeta Dbmeta. (NotNull) + * @return Bhv-type. (NotNull) + */ + protected Type GetBhvType(${glDBMetaInterfaceName} dbmeta) { + SetupDaoBhvMap(); + return (Type)_daoBhvMap[dbmeta.GetDaoType()]; + } + + protected System.Collections.Generic.IDictionary _bhvCacheMap; + protected ${glBehaviorReadableInterfaceName} GetRBhvObject(Type bhvType) { + ${glBehaviorReadableInterfaceName} result = null; + if (_bhvCacheMap == null) { + _bhvCacheMap = new System.Collections.Generic.Dictionary(); + } + if (_bhvCacheMap.ContainsKey(bhvType)) { + result = _bhvCacheMap[bhvType]; + } + if (result == null) { + result = (${glBehaviorReadableInterfaceName})_container.GetComponent(bhvType); + _bhvCacheMap.Add(bhvType, result); + } + return result; + } + + protected System.Collections.Generic.IDictionary _daoBhvMap; + protected void SetupDaoBhvMap() { + if (_daoBhvMap == null) { + _daoBhvMap = new System.Collections.Generic.Dictionary(); + #foreach ($table in $database.Tables) + + _daoBhvMap.Add(typeof(${glPackageExtendedDao}.${glProjectPrefix}${table.JavaName}Dao), typeof(${glPackageExtendedBhv}.${glProjectPrefix}${table.JavaName}Bhv)); + #end + + } + } +#end + + // ---------------------------------------------------------------- + // Assert Object + // ------------- + /** + * Assert that the object is not null. + * + * @param variableName Variable name. (NotNull) + * @param value Value. (NotNull) + * @exception IllegalArgumentException + */ + protected void AssertObjectNotNull(String variableName, Object value) { + if (variableName == null) { + String msg = "The value should not be null: variableName=" + variableName + " value=" + value; + throw new SystemException(msg); + } + if (value == null) { + String msg = "The value should not be null: variableName=" + variableName; + throw new SystemException(msg); + } + } + + // ---------------------------------------------------------------- + // Assert String + // ------------- + /** + * Assert that the entity is not null and not trimmed empty. + * + * @param variableName Variable name. (NotNull) + * @param value Value. (NotNull) + */ + protected void AssertStringNotNullAndNotTrimmedEmpty(String variableName, String value) { + AssertObjectNotNull("variableName", variableName); + AssertObjectNotNull(variableName, value); + if (value.Trim().Length ==0) { + String msg = "The value should not be empty: variableName=" + variableName + " value=" + value; + throw new SystemException(msg); + } + } + } +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/ClassificationDefinition.vmnet =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/ClassificationDefinition.vmnet 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/ClassificationDefinition.vmnet 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,75 @@ +#set ($myClassName = "${glClassificationDefinition}") + +using System; +using System.Collections; + +namespace ${glPackageBaseCommon} { + + /// + /// The definition class that has classification. + /// Author: ${database.ClassAuthor} + /// + public static class ${myClassName} { + + // ===================================================================================== + // Classification-Code-Definition + // ============================== +#foreach ($classificationName in $database.ClassificationNameList) + #set ($classificationMapList = $database.ClassificationDefinitionMap.get($classificationName)) + #foreach ($classificationMap in $classificationMapList) + + /// + /// The classification code of ${classificationMap.get('name')}. + /// ${classificationMap.get('comment')} + // + public const String CODE_${classificationName}_${classificationMap.get('name')} = "$classificationMap.get('code')"; + #end +#end + + // ===================================================================================== + // Classification-CodeNameMap-Definition + // ===================================== +#foreach ($classificationName in $database.ClassificationNameListValidNameOnly) + #set ($classificationMapList = $database.ClassificationDefinitionMap.get($classificationName)) + + /** The classification code-name map of ${classificationName}. */ + public static readonly System.Collections.IDictionary CODE_NAME_MAP_${classificationName}; + +#end +#foreach ($classificationName in $database.ClassificationNameListValidAliasOnly) + #set ($classificationMapList = $database.ClassificationDefinitionMap.get($classificationName)) + + /** The classification code-alias map of ${classificationName}. */ + public static readonly System.Collections.IDictionary CODE_ALIAS_MAP_${classificationName}; +#end + + static ${myClassName}() { +#foreach ($classificationName in $database.ClassificationNameListValidNameOnly) + #set ($classificationMapList = $database.ClassificationDefinitionMap.get($classificationName)) + + { + System.Collections.IDictionary map = new System.Collections.Hashtable(); + #foreach ($classificationMap in $classificationMapList) + + map.Add(CODE_${classificationName}_${classificationMap.get('name')}, "${classificationMap.get('name')}"); + #end + + CODE_NAME_MAP_${classificationName} = map;//java.util.Collections.unmodifiableMap(map); + } +#end +#foreach ($classificationName in $database.ClassificationNameListValidAliasOnly) + #set ($classificationMapList = $database.ClassificationDefinitionMap.get($classificationName)) + { + System.Collections.IDictionary map = new System.Collections.Hashtable(); + #foreach ($classificationMap in $classificationMapList) + + map.Add(CODE_${classificationName}_${classificationMap.get('name')}, "${classificationMap.get('alias')}"); + #end + + CODE_ALIAS_MAP_${classificationName} = map;//java.util.Collections.unmodifiableMap(map); + } +#end + + } + } +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/DaoDicon.vmnet =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/DaoDicon.vmnet 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/DaoDicon.vmnet 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,125 @@ + + + + +#foreach ($includePath in $database.DBFluteDiconBeforeJ2eeIncludePathList) + + +#end + + +#foreach ($includePath in $database.DBFluteDiconOtherIncludePathList) + + +#end + + + + + + + + + + + + + + + + + + + + + #foreach ($componentName in $database.getOriginalDaoComponentComponentNameList()) + #set ($className = ${database.getOriginalDaoComponentClassName($componentName)}) + #if ($database.isDaoComponent($componentName)) + + + ${glDaoDiconNamespace}.interceptor + + #else + + + #end + #end + + + + #foreach ($componentName in $database.getOriginalBehaviorAspectComponentNameList()) + #set ($className = ${database.getOriginalBehaviorAspectClassName($componentName)}) + + + #end + + +#foreach ($table in $database.Tables) + + + + #if (${database.isAvailableCommonColumnSetupInterceptorToDao()}) + + + ${glDaoDiconNamespace}.commonColumnSetupBeforeInsertInterceptor + ${glDaoDiconNamespace}.commonColumnSetupBeforeUpdateInterceptor + ${glDaoDiconNamespace}.commonColumnSetupBeforeDeleteInterceptor + ${glDaoDiconNamespace}.interceptor + + #else + + + ${glDaoDiconNamespace}.interceptor + + #end + #if (${database.isAvailableBehaviorGeneration()}) + #if (${database.isAvailableCommonColumnSetupInterceptorToBehavior()}) + + +#if (${database.isAvailableBehaviorRequiresNewTx()}) + ${database.RequiresNewTxComponentName} +#end +#if (${database.isAvailableBehaviorRequiredTx()}) + ${database.RequiredTxComponentName} +#end + ${glDaoDiconNamespace}.commonColumnSetupBeforeInsertInterceptor + ${glDaoDiconNamespace}.commonColumnSetupBeforeUpdateInterceptor + ${glDaoDiconNamespace}.commonColumnSetupBeforeDeleteInterceptor + #foreach ($componentName in $database.getOriginalBehaviorAspectComponentNameList()) + #set ($pointcut = ${database.getOriginalBehaviorAspectPointcut($componentName)}) + + ${glDaoDiconNamespace}.${componentName} + #end + + + #else + + +#if (${database.isAvailableBehaviorRequiresNewTx()}) + ${database.RequiresNewTxComponentName} +#end +#if (${database.isAvailableBehaviorRequiredTx()}) + ${database.RequiredTxComponentName} +#end + #foreach ($componentName in $database.getOriginalBehaviorAspectComponentNameList()) + #set ($pointcut = ${database.getOriginalBehaviorAspectPointcut($componentName)}) + + ${glDaoDiconNamespace}.${componentName} + #end + + + #end + #end +#end + +#foreach ($table in $database.CustomizeTableList) + + + + + ${glDaoDiconNamespace}.interceptor + +#end + + Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/DaoReadable.vmnet =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/DaoReadable.vmnet 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/DaoReadable.vmnet 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,16 @@ + +using System; +using System.Collections; + +namespace ${glPackageBaseCommon} { + + /// + /// The interface of dao-readable. + /// Author: ${database.ClassAuthor} + /// + public interface ${glDaoReadableInterfaceName} { + // [Developer's comment] (2006/06/08) + // It cannot be done for the convenience of s2dao though I want to define methods for condition-bean here. + // DTO argument as Interface is not accepted. + } +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/DaoSelector.vmnet =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/DaoSelector.vmnet 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/DaoSelector.vmnet 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,117 @@ + +using System; +using System.Collections; +#if ($database.isAvailableBehaviorGeneration()) + +using ${glPackageBaseCommonBhv}; +#end + +namespace ${glPackageBaseCommon} { + + /** + * The interface of dao-selector. + * + * @author ${database.ClassAuthor} + */ + public interface ${glDaoSelectorInterfaceName} { + + /** + * Get dao-readable by dao type. + * + * @param daoType Dao type. (NotNull) + * @return Dao-readable. (NotNull) + */ + ${glDaoReadableInterfaceName} GetRDao(Type daoType); + + /** + * Get dao-readable by entity. + * + * @param entity Entity. (NotNull) + * @return Dao-readable. (NotNull) + */ + ${glDaoReadableInterfaceName} GetRDao(${glEntityInterfaceName} entity); + + /** + * Get dao-readable by entity. + * + * @param tableMultiName Table multi-name. (NotNull) + * @return Dao-readable. (NotNull) + */ + ${glDaoReadableInterfaceName} GetRDao(String tableMultiName); + + /** + * Get dao-writable by dao type. + * + * @param daoType Dao type. (NotNull) + * @return Dao-writable. (NotNull) + */ + ${glDaoWritableInterfaceName} GetWDao(Type daoType); + + /** + * Get dao-writable by entity. + * + * @param entity Entity. (NotNull) + * @return Dao-writable. (NotNull) + */ + ${glDaoWritableInterfaceName} GetWDao(${glEntityInterfaceName} entity); + + /** + * Get dao-writable by entity. + * + * @param tableMultiName Table multi-name. (NotNull) + * @return Dao-writable. (NotNull) + */ + ${glDaoWritableInterfaceName} GetWDao(String tableMultiName); + #if ($database.isAvailableBehaviorGeneration()) + + /** + * Get bhv-readable by bhv type. + * + * @param bhvType Bhv type. (NotNull) + * @return Bhv-readable. (NotNull) + */ + ${glBehaviorReadableInterfaceName} GetRBhv(Type bhvType); + + /** + * Get bhv-readable by entity. + * + * @param entity Entity. (NotNull) + * @return Bhv-readable. (NotNull) + */ + ${glBehaviorReadableInterfaceName} GetRBhv(${glEntityInterfaceName} entity); + + /** + * Get bhv-readable by table multi-name. + * + * @param tableMultiName Table multi-name. (NotNull) + * @return Bhv-readable. (NotNull) + */ + ${glBehaviorReadableInterfaceName} GetRBhv(String tableMultiName); + + /** + * Get bhv-writable by bhv type. + * + * @param bhvType Bhv type. (NotNull) + * @return Bhv-writable. (NotNull) + */ + ${glBehaviorWritableInterfaceName} GetWBhv(Type bhvType); + + /** + * Get bhv-writable by entity. + * + * @param entity Entity. (NotNull) + * @return Bhv-writable. (NotNull) + */ + ${glBehaviorWritableInterfaceName} GetWBhv(${glEntityInterfaceName} entity); + + /** + * Get bhv-writable by table multi-name. + * + * @param tableMultiName Table multi-name. (NotNull) + * @return Bhv-writable. (NotNull) + */ + ${glBehaviorWritableInterfaceName} GetWBhv(String tableMultiName); + #end + + } +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/DaoWritable.vmnet =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/DaoWritable.vmnet 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/DaoWritable.vmnet 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,58 @@ + +using System; +using System.Collections; + +namespace ${glPackageBaseCommon} { + + /// + /// The interface of dao-writable. + /// Author: ${database.ClassAuthor} + /// + public interface ${glDaoWritableInterfaceName} : ${glDaoReadableInterfaceName} { + + /// + /// Insert one entity that the type is entity-interface. + /// + /// Entity that the type is entity-interface. (NotNull) + /// Inserted count. + int Create(${glEntityInterfaceName} entity); + + /// + /// Update one entity that the type is entity-interface. + /// + /// Entity that the type is entity-interface. (NotNull) + /// Updated count. + int Modify(${glEntityInterfaceName} entity); + + /// + /// Delete one entity that the type is entity-interface. + /// + /// Entity that the type is entity-interface. (NotNull) + /// Deleted count. + int Remove(${glEntityInterfaceName} entity); + + /// + /// Insert several entities that the type is entity-interface. + /// + /// Entity-list that the type is entity-interface. (NotNull) + /// Inserted count. +/// TODO: This method has not been supported yet at S2Dao-dotNet. (2006/06/09) +// int CreateList(System.Collections.IList entityList); + + /// + /// Update several entities that the type is entity-interface. + /// + /// Entity-list that the type is entity-interface. (NotNull) + /// Updated count. +/// TODO: This method has not been supported yet at S2Dao-dotNet. (2006/06/09) +// int ModifyList(System.Collections.IList entityList); + + /// + /// Delete several entities that the type is entity-interface. + /// + /// Entity-list that the type is entity-interface. (NotNull) + /// Deleted count. +/// TODO: This method has not been supported yet at S2Dao-dotNet. (2006/06/09) +// int RemoveList(System.Collections.IList entityList); + } +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/Entity.vmnet =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/Entity.vmnet 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/Entity.vmnet 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,92 @@ + +using System; +using System.Collections; + +using ${glPackageBaseCommonDBMeta}; + +namespace ${glPackageBaseCommon} { + + /// + /// The interface of entity. + /// Author: ${database.ClassAuthor} + /// + public interface ${glEntityInterfaceName} { + + // ===================================================================================== + // TableName + // ========= + /// + /// The property of table db-Name. (readonly) + /// + String TableDbName { get; } + + /// + /// The property of table cap-prop-Name. (readonly) + /// + String TableCapPropName { get; } + + /// + /// The property of table uncap-prop-Name. (readonly) + /// + String TableUncapPropName { get; } + + // ===================================================================================== + // DBMeta + // ====== + /// + /// The property of DBMeta. (readonly) + /// + ${glDBMetaInterfaceName} DBMeta { get; } + + // ===================================================================================== + // Accept Map-String + // ================= + /// + /// Accept primary-key map. + /// + /// Primary-key map. (NotNull and NotEmpty) + void AcceptPrimaryKeyMap(System.Collections.Generic.IDictionary primaryKeyMap); + + /// + /// Accept primary-key map-string. + /// + /// Primary-key map-string. (NotNull) + void AcceptPrimaryKeyMapString(String primaryKeyMapString); + + /// + /// Accept column-value map. + /// + /// Column-value map. (NotNull and NotEmpty) + void AcceptColumnValueMap(System.Collections.Generic.IDictionary columnValueMap); + + /// + /// Accept column-value map-string. + /// + /// Column-value map-string. (NotNull) + void AcceptColumnValueMapString(String columnValueMapString); + + // ===================================================================================== + // Extract Map-String + // ================== + /// + /// Extract primary-key map-string. Delimiter is atmark and semicolon {@;}. + /// + /// Primary-key map-string. + String ExtractPrimaryKeyMapString(); + + /// + /// Extract column-value map-string. Delimiter is atmark and semicolon {@;}. + /// + /// Column-value map-string. + String ExtractColumnValueMapString(); + + // ===================================================================================== + // Determination + // ============= + /// + /// Has primary-key value? + /// + /// Determinationg. + bool HasPrimaryKeyValue { get; } + } +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/EntityDefinedCommonColumn.vmnet =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/EntityDefinedCommonColumn.vmnet 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/EntityDefinedCommonColumn.vmnet 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,63 @@ + +using System; +using System.Collections; + +namespace ${glPackageBaseCommon} { + + /// + /// The interface of entity defined common column. + /// Author: ${database.ClassAuthor} + /// + public interface ${glEntityDefinedCommonColumnInterfaceName} : ${glEntityInterfaceName} { +#foreach ($columnName in ${database.CommonColumnNameList}) + #set ($commonColumnMap = ${database.CommonColumnMap}) + #set ($columnType = ${commonColumnMap.get(${columnName})}) + #set ($javaNative = ${database.convertJavaNativeByJdbcType(${columnType})}) + #set ($javaName = ${database.convertJavaNameByJdbcNameAsColumn(${columnName})}) + #set ($uncapitalisedJavaName = ${database.convertUncapitalisedJavaNameByJdbcNameAsColumn(${columnName})}) + + /// + /// The property of ${uncapitalisedJavaName}. + /// + ${javaNative} ${javaName} { get; set; } + + /// + /// Has the setter of ${javaName} been invoked? + /// + bool IsSetterInvoked${javaName}(); + #if (${database.isAllClassificationColumn($columnName)}) + #set ($classificationName = $database.getAllClassificationName($columnName)) + #set ($classificationList = $database.getClassificationMapList($classificationName)) + #foreach ($classificationMap in $classificationList) + + /// + /// Classify the value of ${uncapitalisedJavaName} as ${classificationMap.get('name')}. + /// + void Classify${javaName}${classificationMap.get('name')}(); + + /// + /// Is the value of ${uncapitalisedJavaName} '${classificationMap.get('name')}'? + /// The difference of capital letters and small letters is NOT distinguished. + /// If the value is null, this method returns false! + /// + /// Determanation. + bool Is${javaName}${classificationMap.get('name')}(); + + /// + /// Is the value of ${uncapitalisedJavaName} '${classificationMap.get('name')}'? + /// The difference of capital letters and small letters is NOT distinguished. + /// If the value is null, this method throws exception! + /// + /// Determanation. + bool Is${javaName}${classificationMap.get('name')}IfNullException(); + #end + #end +#end + + /// + /// Extract common-column-value map-string. + /// + /// Common-column-value map-string. + String ExtractCommonColumnValueMapString(); + } +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/GenMetaData.vmnet =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/GenMetaData.vmnet 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/GenMetaData.vmnet 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,354 @@ +#set ($myClassName = "${glGenMetaDataClassName}") + +using System; +using System.Collections; + +namespace ${glPackageBaseCommon} { + + /// + /// The sigleton class that has generate-meta-data(GenMetaData). + /// Author: ${database.ClassAuthor} + /// + public class ${myClassName} { + + /// Singleton instance. + private static readonly ${myClassName} _instance = new ${myClassName}(); + + /// + /// Constructor + /// + private ${myClassName}() { + } + + /// + /// Get instance. + /// + /// Singleton instance. + public static ${myClassName} GetInstance() { + return _instance; + } + + // ========================================================================================= + // Generated method name + // ===================== + public String GetMethodNameOfGetCountAll() { + return "GetCountAll"; + } + + public String GetMethodNameOfGetListAll() { + return "GetListAll"; + } + + public String GetMethodNameOfGetEntity() { + return "GetEntity"; + } + + public String GetMethodNameOfSelectCountIgnoreFetchScope() { + return "SelectCountIgnoreFetchScope"; + } + + public String GetMethodNameOfSelectEntity() { + return "SelectEntity"; + } + + public String GetMethodNameOfSelectList() { + return "SelectList"; + } + + // ========================================================================================= + // Only when having generated, the effective one + // ============================================= + // ------------------------------------------------------------------------------- + // Basic + // ----- + /// + /// Get the property-value of targetLanguage. + /// + /// The property-value. + public String GetTargetLanguage() { + return "${database.TargetLanguage}"; + } + + /// + /// Get the property-value of templateFileExtension. + /// + /// The property-value. + public String GetTemplateFileExtension() { + return "${database.TemplateFileExtension}"; + } + + /// + /// Get the property-value of classFileExtension. + /// + /// The property-value. + public String GetClassFileExtension() { + return "${database.ClassFileExtension}"; + } + + /// + /// Get the property-value of templateFileEncoding. + /// + /// The property-value. + public String GetTemplateEncoding() { + return "${database.TemplateFileEncoding}"; + } + + /// + /// Get the property-value of classAuthor. + /// + /// The property-value. + public String GetClassAuthor() { + return "${database.ClassAuthor}"; + } + + // ------------------------------------------------------------------------------- + // Available + // --------- + /// + /// Is java name of table same as db name? Answer is ${database.isJavaNameOfTableSameAsDbName()}! + /// + /// The property-value. + public bool IsJavaNameOfTableSameAsDbName() { + return ${database.isJavaNameOfTableSameAsDbName()}; + } + + /// + /// Is java name of column same as db name? Answer is ${database.isJavaNameOfColumnSameAsDbName()}! + /// + /// The property-value. + public bool IsJavaNameOfColumnSameAsDbName() { + return ${database.isJavaNameOfColumnSameAsDbName()}; + } + + /// + /// Is available behavior generation? Answer is ${database.isAvailableBehaviorGeneration()}! + /// + /// The property-value. + public bool isAvailableBehaviorGeneration() { + return ${database.isAvailableBehaviorGeneration()}; + } + + /// + /// Is available common-column-setup interceptor to behavior? Answer is ${database.isAvailableCommonColumnSetupInterceptorToBehavior()}! + /// + /// The property-value. + public bool IsAvailableCommonColumnSetupInterceptorToBehavior() { + return ${database.isAvailableCommonColumnSetupInterceptorToBehavior()}; + } + + /// + /// Is available common-column-setup interceptor to dao? Answer is ${database.isAvailableCommonColumnSetupInterceptorToDao()}! + /// + /// The property-value. + public bool IsAvailableCommonColumnSetupInterceptorToDao() { + return ${database.isAvailableCommonColumnSetupInterceptorToDao()}; + } + + /// + /// Is available generics? Answer is ${database.isAvailableGenerics()}! + /// + /// The property-value. + public bool IsAvailableGenerics() { + return ${database.isAvailableGenerics()}; + } + + // ------------------------------------------------------------------------------- + // Prefix + // ------ + /// + /// Get the property-value of projectPrefix. + /// + /// The property-value. + public String GetProjectPrefix() { + return "${database.ProjectPrefix}"; + } + + /// + /// Get the property-value of basePrefix. + /// + /// The property-value. + public String GetBasePrefix() { + return "${database.BasePrefix}"; + } + + // ------------------------------------------------------------------------------- + // DaoDicon + // -------- + /// + /// Get the property-value of daoDiconNamespace. + /// + /// The property-value. + public String GetDaoDiconNamespace() { + return "${database.DaoDiconNamespace}"; + } + + /// + /// Get the property-value of daoDiconPackageName. + /// + /// The property-value. + public String GetDaoDiconPackageName() { + return "${database.DaoDiconPackageName}"; + } + + /// + /// Get the property-value of daoDiconFileName. + /// + /// The property-value. + public String GetDaoDiconFileName() { + return "${database.DaoDiconFileName}"; + } + + /// + /// Get the property-value of jdbcDiconResourceName. + /// + /// The property-value. + public String GetJdbcDiconResourceName() { + return "${database.JdbcDiconResourceName}"; + } + + /// + /// Get the property-value of requiredTxComponentName. + /// + /// The property-value. + public String GetRequiredTxComponentName() { + return "${database.requiredTxComponentName}"; + } + + // ------------------------------------------------------------------------------- + // Package + // ------- + /// + /// Get the property-value of baseCommonPackage. + /// + /// The property-value. + public String GetBaseCommonPackage() { + return "${database.BaseCommonPackage}"; + } + + /// + /// Get the property-value of baseBehaviorPackage. + /// + /// The property-value. + public String GetBaseBehaviorPackage() { + return "${database.BaseBehaviorPackage}"; + } + + /// + /// Get the property-value of baseDaoPackage. + /// + /// The property-value. + public String GetBaseDaoPackage() { + return "${database.BaseDaoPackage}"; + } + + /// + /// Get the property-value of baseEntityPackage. + /// + /// The property-value. + public String GetBaseEntityPackage() { + return "${database.BaseEntityPackage}"; + } + + /// + /// Get the property-value of conditionBeanPackage. + /// + /// The property-value. + public String GetConditionBeanPackage() { + return "${database.ConditionBeanPackage}"; + } + + /// + /// Get the property-value of extendedDaoPackage. + /// + /// The property-value. + public String GetExtendedDaoPackage() { + return "${database.ExtendedDaoPackage}"; + } + + /// + /// Get the property-value of extendedBehaviorPackage. + /// + /// The property-value. + public String GetExtendedBehaviorPackage() { + return "${database.ExtendedBehaviorPackage}"; + } + + /// + /// Get the property-value of extendedEntityPackage. + /// + /// The property-value. + public String GetExtendedEntityPackage() { + return "${database.ExtendedEntityPackage}"; + } + + // ------------------------------------------------------------------------------- + // Optimistic Lock + // --------------- + /// + /// Get the property-value of updateDateFieldName. + /// + /// The property-value. + public String GetUpdateDateFieldName() { + return "${database.UpdateDateFieldName}"; + } + + /// + /// Get the property-value of versionNoFieldName. + /// + /// The property-value. + public String GetVersionNoFieldName() { + return "${database.VersionNoFieldName}"; + } + + + // ------------------------------------------------------------------------------- + // Select Param + // ------------ + /// + /// Get the property-value of selectQueryTimeout. + /// + /// The property-value. + public int GetSelectQueryTimeout() { + return ${database.SelectQueryTimeout}; + } + + // ------------------------------------------------------------------------------- + // Extract + // ------- + /** + * Get the value of 'extractAcceptStartBrace'. + * + * @return The property-value. (NotNull) + */ + public String GetExtractAcceptStartBrace() { + return "${database.extractAcceptStartBrace}"; + } + + /** + * Get the value of 'extractAcceptEndBrace'. + * + * @return The property-value. (NotNull) + */ + public String GetExtractAcceptEndBrace() { + return "${database.extractAcceptEndBrace}"; + } + + /** + * Get the value of 'extractAcceptDelimiter'. + * + * @return The property-value. (NotNull) + */ + public String GetExtractAcceptDelimiter() { + return "${database.extractAcceptDelimiter}"; + } + + /** + * Get the value of 'extractAcceptEqual'. + * + * @return The property-value. (NotNull) + */ + public String GetExtractAcceptEqual() { + return "${database.extractAcceptEqual}"; + } + } +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/annotation/OutsideSql.vmnet =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/annotation/OutsideSql.vmnet 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/annotation/OutsideSql.vmnet 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,10 @@ + +using System; + +namespace ${glPackageBaseCommonAnnotation} { + [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] + public class ${glOutsideSqlAnnotation} : Attribute { + public ${glOutsideSqlAnnotation}() { + } + } +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/bhv/AbstractBehaviorReadable.vmnet =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/bhv/AbstractBehaviorReadable.vmnet 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/bhv/AbstractBehaviorReadable.vmnet 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,600 @@ +#set ($myClassName = "${glBehaviorReadableAbstractName}") + +using System; +using System.Collections; + +using ${glPackageBaseCommon}; +using ${glPackageBaseCommonCBean}; +using ${glPackageBaseCommonDBMeta}; + +namespace ${glPackageBaseCommonBhv} { + + /** + * The abstract class of behavior-readable. + * + * @author ${database.ClassAuthor} + */ + public abstract class $myClassName : ${glBehaviorReadableInterfaceName} { + + // ===================================================================================== + // Definition + // ========== + /** Map-string map-mark. */ + protected static readonly String MAP_STRING_MAP_MARK = "map:"; + + /** Map-string list-mark. */ + protected static readonly String MAP_STRING_LIST_MARK = "list:"; + + /** Map-string start-brace. */ + protected static readonly String MAP_STRING_START_BRACE = "${database.extractAcceptStartBrace}"; + + /** Map-string end-brace. */ + protected static readonly String MAP_STRING_END_BRACE = "${database.extractAcceptEndBrace}"; + + /** Map-string delimiter. */ + protected static readonly String MAP_STRING_DELIMITER = "${database.extractAcceptDelimiter}"; + + /** Map-string equal. */ + protected static readonly String MAP_STRING_EQUAL = "${database.extractAcceptEqual}"; + + // ===================================================================================== + // Attribute + // ========= + #region Attribute + /// Dao-selector instance. + protected ${glDaoSelectorInterfaceName} _daoSelector; + #endregion + + // ===================================================================================== + // Constructor + // =========== + #region Constructor + /** + * Constructor. + */ + public ${myClassName}() { + } + #endregion + + // ===================================================================================== + // TableName + // ========= + /// + /// The property of table db-Name. (readonly) + /// + abstract public String TableDbName { get; } + + // ===================================================================================== + // DBMeta + // ====== + /// + /// The property of DBMeta. (readonly) + /// + abstract public ${glDBMetaInterfaceName} DBMeta { get; } + + // ===================================================================================== + // Self Dispatcher + // =============== + #region Self Dispatcher + /// + /// Behavior's self dispatcher as readable + /// + /// ${glBehaviorReadableInterfaceName} + abstract protected ${glBehaviorReadableInterfaceName} SelfReadable { get; } + #endregion + + // ===================================================================================== + // Dao Accessor + // ============ + #region Dao Accessor + /** + * ${database.ImplementComment} + * + * @return Dao-readable. (NotNull) + */ + abstract public ${glDaoReadableInterfaceName} GetDaoReadable(); + #endregion + + // ===================================================================================== + // New Instance + // ============ + #region New Instance + /// + /// New entity. + /// + /// Entity. (NotNull) + abstract public ${glEntityInterfaceName} NewEntity(); + + /// + /// New condition-bean. + /// + /// Condition-bean. (NotNull) + abstract public ${glConditionBeanInterfaceName} NewConditionBean(); + #endregion + + // ===================================================================================== + // Dao Selector + // ============ + #region Dao Selector + + /// + /// The property of dao-selector. + /// + public ${glDaoSelectorInterfaceName} DaoSelector { + get { return _daoSelector; } + set { _daoSelector = value; } + } + #endregion + + // ===================================================================================== + // Delegate Method + // =============== + #region Delegate-Method + + /** + * ${database.ImplementComment} + * + * @param cb Condition-bean that the type is condition-bean-interface. (NotNull) + * @return Read count. (NotNull) + */ + int ${glBehaviorReadableInterfaceName}.CallGetCountAll() { + return DoCallGetCountAll(); + } + abstract protected int DoCallGetCountAll(); + + /** + * ${database.ImplementComment} + * + * @param cb Condition-bean that the type is condition-bean-interface. (NotNull) + * @return Read count. (NotNull) + */ + IList ${glBehaviorReadableInterfaceName}.CallGetListAll() { + return DoCallGetListAll(); + } + abstract protected IList DoCallGetListAll(); + + /** + * ${database.ImplementComment} + * + * @param cb Condition-bean that the type is condition-bean-interface. (NotNull) + * @return Read count. (NotNull) + */ + int ${glBehaviorReadableInterfaceName}.CallReadCount(${glConditionBeanInterfaceName} cb) { + return DoCallReadCount(cb); + } + abstract protected int DoCallReadCount(${glConditionBeanInterfaceName} cb); +#if ($database.isMakeDeprecated()) + + /** + * ${database.ImplementComment} + * + * @param cb Condition-bean that the type is condition-bean-interface. (NotNull) + * @return Read count. (NotNull) + */ + [Obsolete("This method is deprecated. Please use CallReadCount()")] + int ${glBehaviorReadableInterfaceName}.CallReadCountIgnoreFetchScope(${glConditionBeanInterfaceName} cb) { + return DoCallReadCountIgnoreFetchScope(cb); + } + abstract protected int DoCallReadCountIgnoreFetchScope(${glConditionBeanInterfaceName} cb); +#end + + /** + * ${database.ImplementComment} + * + * @param cb Condition-bean that the type is condition-bean-interface. (NotNull) + * @return Read entity. If the select result is zero, it returns null. (Nullable) + */ + ${glEntityInterfaceName} ${glBehaviorReadableInterfaceName}.CallReadEntity(${glConditionBeanInterfaceName} cb) { + return DoCallReadEntity(cb); + } + abstract protected ${glEntityInterfaceName} DoCallReadEntity(${glConditionBeanInterfaceName} cb); + + /** + * ${database.ImplementComment} + * + * @param cb Condition-bean that the type is condition-bean-interface. (NotNull) + * @return Read list. If the select result is zero, it returns empty list. (NotNull) + */ + IList ${glBehaviorReadableInterfaceName}.CallReadList(${glConditionBeanInterfaceName} cb) { + return DoCallReadList(cb); + } + abstract protected IList DoCallReadList(${glConditionBeanInterfaceName} cb); + + + +#if ($database.isMakeDeprecated()) + + /** + * ${database.ImplementComment} + * + * @param cb Condition-bean that the type is condition-bean-interface. (NotNull) + * @return Read count. (NotNull) + */ + [Obsolete("This method is deprecated. Please use CallReadAllList()")] + IList ${glBehaviorReadableInterfaceName}.DelegateReadAllList() { + return DoDelegateReadAllList(); + } + abstract protected IList DoDelegateReadAllList(); +#if ($database.isMakeDeprecated()) + + /** + * ${database.ImplementComment} + * + * @param cb Condition-bean that the type is condition-bean-interface. (NotNull) + * @return Read count. (NotNull) + */ + [Obsolete("This method is deprecated. Please don't use!")] + int ${glBehaviorReadableInterfaceName}.DelegateReadCountIgnoreFetchScope(${glConditionBeanInterfaceName} cb) { + return DoDelegateReadCountIgnoreFetchScope(cb); + } + abstract protected int DoDelegateReadCountIgnoreFetchScope(${glConditionBeanInterfaceName} cb); +#end + + /** + * ${database.ImplementComment} + * + * @param cb Condition-bean that the type is condition-bean-interface. (NotNull) + * @return Read entity. If the select result is zero, it returns null. (Nullable) + */ + [Obsolete("This method is deprecated. Please use CallReadEntity()")] + ${glEntityInterfaceName} ${glBehaviorReadableInterfaceName}.DelegateReadEntity(${glConditionBeanInterfaceName} cb) { + return DoDelegateReadEntity(cb); + } + abstract protected ${glEntityInterfaceName} DoDelegateReadEntity(${glConditionBeanInterfaceName} cb); + + /** + * ${database.ImplementComment} + * + * @param cb Condition-bean that the type is condition-bean-interface. (NotNull) + * @return Read list. If the select result is zero, it returns empty list. (NotNull) + */ + [Obsolete("This method is deprecated. Please use CallReadList()")] + IList ${glBehaviorReadableInterfaceName}.DelegateReadList(${glConditionBeanInterfaceName} cb) { + return DoDelegateReadList(cb); + } + abstract protected IList DoDelegateReadList(${glConditionBeanInterfaceName} cb); + +#end + + #endregion + + // ===================================================================================== + // Basic Get All + // ============= + /** + * Get count all. + * + * @return Count all. + */ + public int GetCountAll() { + return this.SelfReadable.CallGetCountAll(); + } + + // ===================================================================================== + // Basic Select + // ============ + #region Basic Select + /// + /// ${database.ImplementComment} + /// + /// Condition-bean. (NotNull) + /// Read count. + public int ReadCount(${glConditionBeanInterfaceName} cb) { + AssertConditionBeanNotNull(cb); + return this.SelfReadable.CallReadCount(cb); + } + + /// + /// ${database.ImplementComment} + /// + /// Condition-bean. (NotNull) + /// Read entity. (Nullable) + /// + /// + public ${glEntityInterfaceName} ReadEntity(${glConditionBeanInterfaceName} cb) { + AssertConditionBeanNotNull(cb); + System.Collections.IList ls = this.SelfReadable.CallReadList(cb); + if (ls.Count == 0) { + return null; + } + AssertRecordHasBeenSelectedAsOne(ls, cb); + return (${glEntityInterfaceName})ls[0]; + } + + /// + /// ${database.ImplementComment} + /// + /// Condition-bean. (NotNull) + /// Read entity. (NotNull) + /// + /// + public ${glEntityInterfaceName} ReadEntityWithDeletedCheck(${glConditionBeanInterfaceName} cb) { + AssertConditionBeanNotNull(cb); + System.Collections.IList ls = this.SelfReadable.CallReadList(cb); + AssertRecordHasNotBeenDeleted(ls, cb); + AssertRecordHasBeenSelectedAsOne(ls, cb); + return (${glEntityInterfaceName})ls[0]; + } + + /// + /// ${database.ImplementComment} + /// + /// Condition-bean. (NotNull) + /// List-result-bean. (NotNull) + public ${glListResultBeanName} ReadList(${glConditionBeanInterfaceName} cb) { + AssertConditionBeanNotNull(cb); + return new ResultBeanBuilder(this).BuildListResultBean(cb, this.SelfReadable.CallReadList(cb)); + } + + /// + /// ${database.ImplementComment} + /// + /// Condition-bean. (NotNull) + /// Read page. (NotNull) + public ${glPagingResultBeanName} ReadPage(${glConditionBeanInterfaceName} cb) { + AssertConditionBeanNotNull(cb); + return this.SelfReadable.ReadPage(cb, new SelectPageSimpleInvoker(this)); + } + + /// + /// ${database.ImplementComment} + /// + /// Condition-bean. (NotNull) + /// Select-page-invoker. (NotNull) + /// Read page. (NotNull) + public ${glPagingResultBeanName} ReadPage(${glConditionBeanInterfaceName} cb, SelectPageInvoker invoker) { + AssertConditionBeanNotNull(cb); + return invoker.InvokeSelectPage(new SelectPageSimpleCallback(cb, this)); + } + + + /** + * Assert that record has not been deleted. + * + * @param entity Selected entity. + * @param searchKey Search-key for Logging. + * @exception ${glPackageBaseCommonException}.${glRecordHasAlreadyBeenDeletedException} + */ + protected void AssertRecordHasNotBeenDeleted(${glPackageBaseCommon}.${glEntityInterfaceName} entity, Object searchKey4log) { + if (entity == null) { + String msg = "The record has already been deleted by other thread: searchKey=" + searchKey4log; + throw new ${glPackageBaseCommonException}.${glRecordHasAlreadyBeenDeletedException}(msg); + } + } + + /** + * Assert that record has not been deleted. + * + * @param ls List. + * @param searchKey Search-key for Logging. + * @exception ${glPackageBaseCommonException}.${glRecordHasAlreadyBeenDeletedException} + */ + protected void AssertRecordHasNotBeenDeleted(System.Collections.IList ls, Object searchKey4log) { + if (ls == null || ls.Count == 0) { + String msg = "The record has already been deleted by other thread: searchKey=" + searchKey4log; + throw new ${glPackageBaseCommonException}.${glRecordHasAlreadyBeenDeletedException}(msg); + } + } + + /** + * Assert that record has been selected as one. + * + * @param ls List. + * @param searchKey Search-key for Logging. + * @exception ${glPackageBaseCommonException}.${glRecordHasAlreadyBeenDeletedException} + * @exception ${glPackageBaseCommonException}.${glRecordHasOverlappedException} + */ + protected void AssertRecordHasBeenSelectedAsOne(System.Collections.IList ls, Object searchKey4log) { + if (ls == null || ls.Count == 0) { + String msg = "The record has already been deleted by other thread: searchKey=" + searchKey4log; + throw new ${glPackageBaseCommonException}.${glRecordHasAlreadyBeenDeletedException}(msg); + } + if (ls.Count != 1) { + String msg = "This selected contents should be only one: searchKey=" + searchKey4log; + msg = msg + " resultCount=" + ls.Count; + throw new ${glPackageBaseCommonException}.${glRecordHasOverlappedException}(msg); + } + } + + /** + * Assert that selected count has not exceeded max count. + * + * @param selectedCount Selected count. + * @param maxCount Max count. + * @param clauseObject Clause object for exception message. + * @exception ${glPackageBaseCommonException}.${glSelectedCountExceedMaxCountExceptionName} + */ + protected void AssertSelectedCountHasNotExceededMaxCount(int selectedCount, int maxCount, Object clauseObject) { + AssertObjectNotNull("selectedCount", selectedCount); + AssertObjectNotNull("maxCount", maxCount); + if (selectedCount > maxCount) { + String msg = "Selected count[" + selectedCount + "] has exceeded max count[" + maxCount + "]: clauseObject=" + clauseObject; + throw new ${glPackageBaseCommonException}.${glSelectedCountExceedMaxCountExceptionName}(msg, selectedCount, maxCount); + } + } + #endregion + + // ===================================================================================== + // Various Select + // ============== + #region Various Select + #if ($database.isMakeDeprecated()) + + /** + * ${database.ImplementComment} + * + * @param cb Condition-bean. + * @param maxCount Max count. + * @return Read list. If the select result is zero, it returns empty list. (NotNull) + * @exception ${glPackageBaseCommonException}.${glSelectedCountExceedMaxCountExceptionName} + */ + [Obsolete("This method is deprecated.")] + public ${glListResultBeanName} ReadListAfterCheckingCountIgnoreFetchScope(${glConditionBeanInterfaceName} cb, int maxCount) { + AssertConditionBeanNotNull(cb); + int selectedCount = this.SelfReadable.ReadCount(cb); + AssertSelectedCountHasNotExceededMaxCount(selectedCount, maxCount, cb); + return new ResultBeanBuilder(this).BuildListResultBean(cb, this.SelfReadable.CallReadList(cb)); + } + #end + + /// + /// ${database.ImplementComment} + /// + /// Condition-bean. (NotNull) + /// Fetch-size. + /// Read page as first page. (NotNull) + public ${glPagingResultBeanName} ReadPageAsFirst(${glConditionBeanInterfaceName} cb, int fetchSize) { + AssertConditionBeanNotNull(cb); + cb.FetchFirst(fetchSize); + return this.SelfReadable.ReadPage(cb); + } + + /// + /// ${database.ImplementComment} + /// + /// Condition-bean. (NotNull) + /// Fetch-page-number. + /// Read page as PageNumber page. (NotNull) + public ${glPagingResultBeanName} ReadPageByPageNumber(${glConditionBeanInterfaceName} cb, int fetchPageNumber) { + AssertConditionBeanNotNull(cb); + cb.FetchPage(fetchPageNumber); + return this.SelfReadable.ReadPage(cb); + } + + #endregion + + // ===================================================================================== + // Helper Method + // ============= + #region Helper Method + + // ---------------------------------------------------------------- + // Assert Object + // ------------- + #region Assert Object + + /** + * Assert that the argument is not null. + * + * @param variableName Variable name. (NotNull) + * @param arg Argument. (NotNull) + */ + protected void AssertObjectNotNull(String variableName, Object arg) { + if (variableName == null) { + String msg = "Argument[variableName] should not be null."; + throw new ArgumentNullException(msg); + } + if (arg == null) { + String msg = "Argument[" + variableName + "] should not be null."; + throw new ArgumentNullException(msg); + } + } + + /** + * Assert that the entity is not null. + * + * @param entity Entity. (NotNull) + */ + protected void AssertEntityNotNull(${glEntityInterfaceName} entity) { + AssertObjectNotNull("entity", entity); + } + + /** + * Assert that the condition-bean is not null. + * + * @param cb Condition-bean. (NotNull) + */ + protected void AssertConditionBeanNotNull(${glPackageBaseCommonCBean}.${glConditionBeanInterfaceName} cb) { + AssertObjectNotNull("cb", cb); + } + + /** + * Assert that the entity has primary-key value. + * + * @param entity Entity. (NotNull) + */ + protected void AssertEntityNotNullAndHasPrimaryKeyValue(${glEntityInterfaceName} entity) { + AssertEntityNotNull(entity); + if (!entity.HasPrimaryKeyValue) { + String msg = "The entity must should primary-key: entity=" + entity; + throw new ArgumentOutOfRangeException(msg + entity); + } + } + + #endregion + + // ---------------------------------------------------------------- + // Assert String + // ------------- + #region Assert String + + /** + * Assert that the string is not null and not trimmed empty. + * + * @param variableName Variable name. (NotNull) + * @param arg Argument. (NotNull) + */ + protected void AssertStringNotNullAndNotTrimmedEmpty(String variableName, String value) { + if (variableName == null) { + String msg = "Variable[variableName] should not be null."; + throw new ArgumentNullException(msg); + } + if (value == null) { + String msg = "Variable[" + variableName + "] should not be null."; + throw new ArgumentNullException(msg); + } + if (value.Trim().Length == 0) { + String msg = "Variable[" + variableName + "] should not be empty: [" + value + "]"; + throw new ArgumentOutOfRangeException(msg); + } + } + + #endregion + + + // ---------------------------------------------------------------- + // Assert List + // ----------- + #region Assert List + /** + * Assert that the list is empty. + * + * @param ls List. (NotNull) + */ + protected void AssertListNotNullAndEmpty(String variableName, IList ls) { + AssertObjectNotNull(variableName, ls); + if (!(ls.Count == 0)) { + String msg = "The list[" + variableName + "] should be empty: ls=" + ls.ToString(); + throw new ArgumentOutOfRangeException(msg); + } + } + + /** + * Assert that the list is not empty. + * + * @param ls List. (NotNull) + */ + protected void AssertListNotNullAndNotEmpty(String variableName, IList ls) { + AssertObjectNotNull(variableName, ls); + if (ls.Count == 0) { + String msg = "The list[" + variableName + "] should not be empty: ls=" + ls.ToString(); + throw new ArgumentOutOfRangeException(msg); + } + } + + /** + * Assert that the list having only one. + * + * @param ls List. (NotNull) + */ + protected void AssertListNotNullAndHasOnlyOne(String variableName, IList ls) { + AssertObjectNotNull(variableName, ls); + if (ls.Count != 1) { + String msg = "The list[" + variableName + "] should contain only one object: ls=" + ls.ToString(); + throw new ArgumentOutOfRangeException(msg); + } + } + #endregion + #endregion + } +} \ No newline at end of file Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/bhv/AbstractBehaviorWritable.vmnet =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/bhv/AbstractBehaviorWritable.vmnet 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/bhv/AbstractBehaviorWritable.vmnet 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,470 @@ +#set ($myClassName = "${glBehaviorWritableAbstractName}") + +using System; +using System.Collections; + +using ${glPackageBaseCommon}; +using ${glPackageBaseCommonCBean}; +using ${glPackageBaseCommonHelper}; + +namespace ${glPackageBaseCommonBhv} { + + /** + * The abstract class of behavior-writable. + * + * @author ${database.ClassAuthor} + */ + public abstract class $myClassName : ${glBehaviorReadableAbstractName}, ${glBehaviorWritableInterfaceName} { + + // ===================================================================================== + // Constructor + // =========== + #region Constructor + /** + * Constructor. + */ + public ${myClassName}() { + } + #endregion + + // ===================================================================================== + // Self Dispatcher + // =============== + #region Self Dispatcher + /// + /// Behavior's self dispatcher as writable + /// + /// ${glBehaviorWritableInterfaceName} + abstract protected ${glBehaviorWritableInterfaceName} SelfWritable { get; } + #endregion + + // ===================================================================================== + // Dao Accessor + // ============ + #region Dao Getter + /** + * ${database.ImplementComment} + * + * @return Dao-writable. (NotNull) + */ + abstract public ${glDaoWritableInterfaceName} GetDaoWritable(); + #endregion + + // ===================================================================================== + // Delegate Method + // =============== + #region Delegate-Method + + /** + * ${database.ImplementComment} + * + * @param entity Entity that the type is entity-interface. (NotNull) + * @return Inserted count. + */ + int ${glBehaviorWritableInterfaceName}.CallCreate(${glEntityInterfaceName} entity) { + AssertEntityNotNull(entity); + FilterEntityOfInsert(entity); + AssertEntityOfInsert(entity); + return DoCallCreate(entity); + } + + /// + /// Filter the entity of insert. + /// + /// Entity. (NotNull) + protected virtual void FilterEntityOfInsert(${glPackageBaseCommon}.${glEntityInterfaceName} entity) { + } + + /// + /// Assert the entity of insert. + /// + /// Entity. (NotNull) + protected virtual void AssertEntityOfInsert(${glPackageBaseCommon}.${glEntityInterfaceName} entity) { + } + + abstract protected int DoCallCreate(${glEntityInterfaceName} entity); + + /** + * ${database.ImplementComment} + * + * @param entity Entity that the type is entity-interface. (NotNull) + * @return Updated count. + */ + int ${glBehaviorWritableInterfaceName}.CallModify(${glEntityInterfaceName} entity) { + AssertEntityNotNull(entity); + FilterEntityOfUpdate(entity); + AssertEntityOfUpdate(entity); + return DoCallModify(entity); + } + + /// + /// Filter the entity of update. + /// + /// Entity. (NotNull) + protected virtual void FilterEntityOfUpdate(${glPackageBaseCommon}.${glEntityInterfaceName} entity) { + } + + /// + /// Assert the entity of update. + /// + /// Entity. (NotNull) + protected virtual void AssertEntityOfUpdate(${glPackageBaseCommon}.${glEntityInterfaceName} entity) { + } + + abstract protected int DoCallModify(${glEntityInterfaceName} entity); + + /** + * ${database.ImplementComment} + * + * @param entity Entity that the type is entity-interface. (NotNull) + * @return Deleted count. + */ + int ${glBehaviorWritableInterfaceName}.CallRemove(${glEntityInterfaceName} entity) { + AssertEntityNotNull(entity); + FilterEntityOfDelete(entity); + AssertEntityOfDelete(entity); + return DoCallRemove(entity); + } + + /// + /// Filter the entity of delete. + /// + /// Entity. (NotNull) + protected virtual void FilterEntityOfDelete(${glPackageBaseCommon}.${glEntityInterfaceName} entity) { + } + + /// + /// Assert the entity of delete. + /// + /// Entity. (NotNull) + protected virtual void AssertEntityOfDelete(${glPackageBaseCommon}.${glEntityInterfaceName} entity) { + } + + abstract protected int DoCallRemove(${glEntityInterfaceName} entity); + + +#if ($database.isMakeDeprecated()) + + /** + * ${database.ImplementComment} + * + * @param entity Entity that the type is entity-interface. (NotNull) + * @return Inserted count. + */ + [Obsolete("This method is deprecated. Please use CallCreate()")] + int ${glBehaviorWritableInterfaceName}.DelegateCreate(${glEntityInterfaceName} entity) { + AssertEntityNotNull(entity); + FilterEntityOfInsert(entity); + AssertEntityOfInsert(entity); + return DoDelegateCreate(entity); + } + + abstract protected int DoDelegateCreate(${glEntityInterfaceName} entity); + + /** + * ${database.ImplementComment} + * + * @param entity Entity that the type is entity-interface. (NotNull) + * @return Updated count. + */ + [Obsolete("This method is deprecated. Please use CallModify()")] + int ${glBehaviorWritableInterfaceName}.DelegateModify(${glEntityInterfaceName} entity) { + AssertEntityNotNull(entity); + FilterEntityOfUpdate(entity); + AssertEntityOfUpdate(entity); + return DoDelegateModify(entity); + } + + abstract protected int DoDelegateModify(${glEntityInterfaceName} entity); + + /** + * ${database.ImplementComment} + * + * @param entity Entity that the type is entity-interface. (NotNull) + * @return Deleted count. + */ + [Obsolete("This method is deprecated. Please use CallRemove()")] + int ${glBehaviorWritableInterfaceName}.DelegateRemove(${glEntityInterfaceName} entity) { + AssertEntityNotNull(entity); + FilterEntityOfDelete(entity); + AssertEntityOfDelete(entity); + return DoDelegateRemove(entity); + } + + abstract protected int DoDelegateRemove(${glEntityInterfaceName} entity); +#end + + #endregion + + // ===================================================================================== + // Basic Entity Update + // =================== + #region Basic Entity Update + /// + /// Create. + /// + /// Entity. (NotNull) + public void Create(${glPackageBaseCommon}.${glEntityInterfaceName} entity) { + AssertEntityNotNull(entity); + this.SelfWritable.CallCreate(entity); + } + + /// + /// Modify. + /// + /// Entity. (NotNull) + public void Modify(${glPackageBaseCommon}.${glEntityInterfaceName} entity) { + AssertEntityNotNull(entity); + int modifiedCount = this.SelfWritable.CallModify(entity); + if (modifiedCount != 1) { + throw new Seasar.Dao.NotSingleRowUpdatedRuntimeException(entity, modifiedCount); + } + } + + /** + * ${database.ImplementComment} + * + * @param entity Entity. + * @exception ${glPackageBaseCommonException}.${glRecordHasAlreadyBeenDeletedException} + */ + public void ModifyAfterSelect(${glPackageBaseCommon}.${glEntityInterfaceName} entity) { + AssertEntityNotNullAndHasPrimaryKeyValue(entity); + ${glConditionBeanInterfaceName} ${glAttachedCBArgsVariableName} = this.DBMeta.NewConditionBean(); + ${glAttachedCBArgsVariableName}.AcceptPrimaryKeyMapString(entity.ExtractPrimaryKeyMapString()); + ${glPackageBaseCommon}.${glEntityInterfaceName} currentEntity = this.SelfReadable.ReadEntity(${glAttachedCBArgsVariableName}); + AssertRecordHasNotBeenDeleted(currentEntity, entity.ExtractPrimaryKeyMapString()); + MergeEntity(entity, currentEntity); + this.SelfWritable.Modify(currentEntity); + } + + /// + /// ${database.ImplementComment} + /// + /// Entity. This must contain primary-key value at least. (NotNull) + /// + public void CreateOrModifyAfterSelect(${glPackageBaseCommon}.${glEntityInterfaceName} entity) { + AssertEntityNotNull(entity); + if (!entity.HasPrimaryKeyValue) { + this.SelfWritable.Create(entity); + return; + } + ${glPackageBaseCommon}.${glEntityInterfaceName} currentEntity = null; + try { + ${glConditionBeanInterfaceName} cb = NewConditionBean(); + cb.AcceptPrimaryKeyMapString(entity.ExtractPrimaryKeyMapString()); + currentEntity = ReadEntityWithDeletedCheck(cb); + } catch (${glPackageBaseCommonException}.${glRecordHasAlreadyBeenDeletedException}) { + this.SelfWritable.Create(entity); + return; + } + AssertEntityNotNullAndHasPrimaryKeyValue(entity); + MergeEntity(entity, currentEntity); + this.SelfWritable.Modify(currentEntity); + } + +#if ($database.isMakeBehaviorForUpdate()) + + /** + * ${database.ImplementComment} + * + * @param entity Entity. + * @exception ${glPackageBaseCommonException}.${glRecordHasAlreadyBeenDeletedException} + */ + public void ModifyAfterSelectForUpdate(${glPackageBaseCommon}.${glEntityInterfaceName} entity) { + AssertEntityNotNullAndHasPrimaryKeyValue(entity); + ${glConditionBeanInterfaceName} ${glAttachedCBArgsVariableName} = this.DBMeta.NewConditionBean(); + ${glAttachedCBArgsVariableName}.AcceptPrimaryKeyMapString(entity.ExtractPrimaryKeyMapString()); + ${glAttachedCBArgsVariableName}.LockForUpdate(); + ${glPackageBaseCommon}.${glEntityInterfaceName} currentEntity = this.SelfReadable.ReadEntity(${glAttachedCBArgsVariableName}); + AssertRecordHasNotBeenDeleted(currentEntity, entity.ExtractPrimaryKeyMapString()); + MergeEntity(entity, currentEntity); + this.SelfWritable.Modify(currentEntity); + } + + /// + /// ${database.ImplementComment} + /// + /// Entity. This must contain primary-key value at least. (NotNull) + /// + public void CreateOrModifyAfterSelectForUpdate(${glPackageBaseCommon}.${glEntityInterfaceName} entity) { + AssertEntityNotNull(entity); + if (!entity.HasPrimaryKeyValue) { + this.SelfWritable.Create(entity); + return; + } + ${glPackageBaseCommon}.${glEntityInterfaceName} currentEntity = null; + try { + ${glConditionBeanInterfaceName} cb = NewConditionBean(); + cb.AcceptPrimaryKeyMapString(entity.ExtractPrimaryKeyMapString()); + cb.LockForUpdate(); + currentEntity = ReadEntityWithDeletedCheck(cb); + } catch (${glPackageBaseCommonException}.${glRecordHasAlreadyBeenDeletedException}) { + this.SelfWritable.Create(entity); + return; + } + AssertEntityNotNullAndHasPrimaryKeyValue(entity); + MergeEntity(entity, currentEntity); + this.SelfWritable.Modify(currentEntity); + } +#end + + /** + * Merge entity. + * Copy the column data of sourceEntity that the setter has been invoked to destinationEntity. + * + * @param sourceEntity Source entity. + * @param destinationEntity Destination entity. + */ + abstract protected void MergeEntity(${glPackageBaseCommon}.${glEntityInterfaceName} sourceEntity, ${glPackageBaseCommon}.${glEntityInterfaceName} destinationEntity); + + /// + /// Remove. + /// + /// Entity. (NotNull) + public void Remove(${glPackageBaseCommon}.${glEntityInterfaceName} entity) { + AssertEntityNotNull(entity); + this.SelfWritable.CallRemove(entity); + } + #endregion + + // ===================================================================================== + // Various Update + // ============== + #region Various Update + /// + /// Filter logical-delete entity. + /// + /// Entity. (NotNull) + protected virtual void FilterLogicalDeleteEntity(${glPackageBaseCommon}.${glEntityInterfaceName} entity) { + // Nothing. + } + + /// + /// Filter revival from logical-delete entity. + /// + /// Entity. (NotNull) + protected virtual void FilterRevivalFromLogicalDeleteEntity(${glPackageBaseCommon}.${glEntityInterfaceName} entity) { + // Nothing. + } + #endregion + + // ===================================================================================== + // Various Insert + // ============== + #region Various Insert + /// + /// Filter copy-insert entity. + /// + /// Entity. (NotNull) + protected virtual void FilterCopyInsertEntity(${glPackageBaseCommon}.${glEntityInterfaceName} entity) { + // Nothing. + } + + /// + /// Reflect(insert or update) from separated-file. + /// + /// + /// If transaction already started, The argument 'batchCount' is invalid. (Inherit the transaction) + /// + /// Name of the file. (NotNull and NotEmpty) + /// Encoding of the file. (NotNull and NotEmpty) + /// Delimiter of the file. (NotNull and NotEmpty) + /// Batch-count for transaction. + /// If true, this method continue in spite of throwing the exception. + /// The list of InsertOrUpdateExceptionResult. (NotNull) + /// + /// + public System.Collections.Generic.IList ReflectFromSeparatedFile( + String filename, String encoding, + String delimiter, int batchCount, bool isErrorContinue){ + AssertStringNotNullAndNotTrimmedEmpty("filename", filename); + AssertStringNotNullAndNotTrimmedEmpty("encoding", encoding); + AssertObjectNotNull("delimiter", delimiter); + + System.Collections.Generic.IList exceptionList = new System.Collections.Generic.List(); + + try{ + ${glMapStringBuilderName} builder = new ${glMapStringBuilderImplName}(); + builder.MapStringMapMark = MAP_STRING_MAP_MARK; + builder.MapStringStartBrace = MAP_STRING_START_BRACE; + builder.MapStringEndBrace = MAP_STRING_END_BRACE; + builder.MapStringDelimiter = MAP_STRING_DELIMITER; + builder.MapStringEqual = MAP_STRING_EQUAL; + + System.Collections.Generic.IList<${glEntityInterfaceName}> entityList = new System.Collections.Generic.List<${glEntityInterfaceName}>(); + int count = 0; + + using(System.IO.StreamReader reader = new System.IO.StreamReader( + filename, System.Text.Encoding.GetEncoding(encoding))){ + try{ + while (true) { + ++count; + + String lineString = reader.ReadLine(); + if (lineString == null) { + if (entityList.Count > 0) { + ReflectAfterSelectNew(entityList, isErrorContinue, exceptionList); + entityList.Clear(); + } + break; + } + if (count == 1) { + builder.ColumnNames = lineString.Split(delimiter.ToCharArray()); + continue; + } + + String mapString = builder.BuildByDelimiter(lineString, delimiter); + ${glEntityInterfaceName} entity = DBMeta.NewEntity(); + entity.AcceptColumnValueMapString(mapString); + entityList.Add(entity); + + if (entityList.Count == batchCount) { + ReflectAfterSelectNew(entityList, isErrorContinue, exceptionList); + entityList.Clear(); + } + } + } + finally{ + reader.Close(); + } + } + } + catch (System.IO.FileNotFoundException) { + throw; + } catch (System.IO.IOException) { + throw; + } + + return exceptionList; + } + + /// + /// Reflect(insert or update) from separated-file. + /// + /// The list of entity that is reflection target. (NotNull) + /// If true, this method continue in spite of throwing the exception. + /// The list of InsertOrUpdateExceptionResult. (NotNull) + public void ReflectAfterSelectNew(System.Collections.Generic.IList<${glEntityInterfaceName}> entityList, + bool isErrorContinue, System.Collections.Generic.IList exceptionList) { + + foreach(${glEntityInterfaceName} entity in entityList) { + try { + CreateOrModifyAfterSelect(entity); + } catch (System.Exception e) { + if (isErrorContinue) { + OneEntityExceptionResult result = new OneEntityExceptionResult(); + result.PrimaryKeyMapString = entity.ExtractPrimaryKeyMapString(); + result.Entity = entity; + result.Exception = e; + exceptionList.Add(result); + continue; + } + throw; + } + } + return; + } + + #endregion + } +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/bhv/BehaviorReadable.vmnet =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/bhv/BehaviorReadable.vmnet 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/bhv/BehaviorReadable.vmnet 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,429 @@ + +using System; +using System.Collections; + +using ${glPackageBaseCommon}; +using ${glPackageBaseCommonCBean}; +using ${glPackageBaseCommonDBMeta}; + +namespace ${glPackageBaseCommonBhv} { + + /** + * The interface of behavior-readable. + * + * @author ${database.ClassAuthor} + */ + public interface ${glBehaviorReadableInterfaceName} { + + // ===================================================================================== + // TableName + // ========= + /// + /// The property of table db-Name. (readonly) + /// + String TableDbName { get; } + + // ===================================================================================== + // DBMeta + // ====== + /// + /// The property of DBMeta. (readonly) + /// + ${glDBMetaInterfaceName} DBMeta { get; } + + // ===================================================================================== + // Dao Accessor + // ============ + /** + * Get dao-readable. + * + * @return Dao-readable. (NotNull) + */ + ${glDaoReadableInterfaceName} GetDaoReadable(); + + // ===================================================================================== + // New Instance + // ============ + /// + /// New entity. + /// + /// Entity. (NotNull) + ${glEntityInterfaceName} NewEntity(); + + /// + /// New condition-bean. + /// + /// Condition-bean. (NotNull) + ${glConditionBeanInterfaceName} NewConditionBean(); + + // ===================================================================================== + // Delegate-Method + // =============== + /** + * Get count all. (Call-Method) + * + * @return Count all. (NotNull) + */ + int CallGetCountAll(); + + /** + * Read all list. (Call-Method) + * + * @return Read all list. (NotNull) + */ + IList CallGetListAll(); + + /** + * Read count by condition-bean. (Delegate-Method) + * Ignore fetchFirst() and fetchScope() and fetchPage(). But the fetch status of the condition-bean remains as it is. + * + * @param cb Condition-bean. (NotNull) + * @return Read count. (NotNull) + */ + int CallReadCount(${glConditionBeanInterfaceName} cb); +#if ($database.isMakeDeprecated()) + + /** + * Read count by condition-bean. (Delegate-Method) + * Ignore fetchFirst() and fetchScope() and fetchPage(). But the fetch status of the condition-bean remains as it is. + * + * @param cb Condition-bean. (NotNull) + * @return Read count. (NotNull) + */ + [Obsolete("This method is deprecated. Please use CallReadCount()")] + int CallReadCountIgnoreFetchScope(${glConditionBeanInterfaceName} cb); +#end + + /** + * Read entity by condition-bean. (Call-Method) + * + * @param cb Condition-bean. (NotNull) + * @return Read entity. If the select result is zero, it returns null. (Nullable) + */ + ${glEntityInterfaceName} CallReadEntity(${glConditionBeanInterfaceName} cb); + + /** + * Read list by condition-bean. (Call-Method) + * + * @param cb Condition-bean. (NotNull) + * @return Read list. If the select result is zero, it returns empty list. (NotNull) + */ + IList CallReadList(${glConditionBeanInterfaceName} cb); + + + +#if ($database.isMakeDeprecated()) + + /** + * Read all list. (Delegate-Method) + * + * @return Read all list. (NotNull) + */ + [Obsolete("This method is deprecated. Please use CallReadAllList()")] + IList DelegateReadAllList(); +#if ($database.isMakeDeprecated()) + + /** + * Read count by condition-bean. (Delegate-Method) + * Ignore fetchFirst() and fetchScope() and fetchPage(). But the fetch status of the condition-bean remains as it is. + * + * @param cb Condition-bean. (NotNull) + * @return Read count. (NotNull) + */ + [Obsolete("This method is deprecated. Please don't use!")] + int DelegateReadCountIgnoreFetchScope(${glConditionBeanInterfaceName} cb); +#end + + /** + * Read entity by condition-bean. (Delegate-Method) + * + * @param cb Condition-bean. (NotNull) + * @return Read entity. If the select result is zero, it returns null. (Nullable) + */ + [Obsolete("This method is deprecated. Please use CallReadEntity()")] + ${glEntityInterfaceName} DelegateReadEntity(${glConditionBeanInterfaceName} cb); + + /** + * Read list by condition-bean. (Delegate-Method) + * + * @param cb Condition-bean. (NotNull) + * @return Read list. If the select result is zero, it returns empty list. (NotNull) + */ + [Obsolete("This method is deprecated. Please use CallReadList()")] + IList DelegateReadList(${glConditionBeanInterfaceName} cb); + +#end + + // ===================================================================================== + // Basic Get All + // ============= + /** + * Get count all. + * + * @return Count all. + */ + int GetCountAll(); + + // ===================================================================================== + // Basic Select + // ============ + #region Basic Select + /// + /// ${database.ImplementComment} + /// + /// Condition-bean. (NotNull) + /// Read count. + int ReadCount(${glConditionBeanInterfaceName} cb); + + /// + /// ${database.ImplementComment} + /// + /// Condition-bean. (NotNull) + /// Read entity. (Nullable) + /// + /// + ${glEntityInterfaceName} ReadEntity(${glConditionBeanInterfaceName} cb); + + /// + /// Read entity with deleted check. + /// + /// Condition-bean. (NotNull) + /// Read entity. (NotNull) + /// If the result is nothing. + ${glEntityInterfaceName} ReadEntityWithDeletedCheck(${glConditionBeanInterfaceName} cb); + + /// + /// Read list. + /// + /// Condition-bean. (NotNull) + /// List-result-bean. (NotNull) + ${glListResultBeanName} ReadList(${glConditionBeanInterfaceName} cb); + + /// + /// ${database.ImplementComment} + /// + /// Condition-bean. (NotNull) + /// Read page. (NotNull) + ${glPagingResultBeanName} ReadPage(${glConditionBeanInterfaceName} cb); + + /// + /// ${database.ImplementComment} + /// + /// Condition-bean. (NotNull) + /// Select-page-invoker. (NotNull) + /// Read page. (NotNull) + ${glPagingResultBeanName} ReadPage(${glConditionBeanInterfaceName} cb, SelectPageInvoker invoker); + + #endregion + + // ===================================================================================== + // Various Select + // ============== + #region Various Select + #if ($database.isMakeDeprecated()) + + /** + * Read list after checking count. + * + * @param cb Condition-bean. + * @param maxCount Max count. + * @return Read list. If the select result is zero, it returns empty list. (NotNull) + * @exception ${glPackageBaseCommonException}.${glSelectedCountExceedMaxCountExceptionName} + */ + [Obsolete("This method is deprecated.")] + ${glListResultBeanName} ReadListAfterCheckingCountIgnoreFetchScope(${glConditionBeanInterfaceName} cb, int maxCount); + #end + + /// + /// Read page as first page. + /// + /// Condition-bean. (NotNull) + /// Fetch-size. + /// Read page as first page. (NotNull) + ${glPagingResultBeanName} ReadPageAsFirst(${glConditionBeanInterfaceName} cb, int fetchSize); + + /// + /// Read page by page-number. + /// If result-page is 'rb.getAllRecordCount > 0 && rb.getSelectedList().size() == 0', re-select as max-page. + /// + /// Condition-bean. (NotNull) + /// Fetch-page-number. + /// Read page as [fetchPageNumber] page. (NotNull) + ${glPagingResultBeanName} ReadPageByPageNumber(${glConditionBeanInterfaceName} cb, int fetchPageNumber); + #endregion + } + + /// + /// The interface of select-page callback. + /// + /// + /// + public interface SelectPageCallback { + ${glPagingBeanInterfaceName} PagingBean { get; } + int SelectCountIgnoreFetchScope(); + System.Collections.IList SelectList(); + } + + /// + /// The simple-implementation of select-page-as-first callback. + /// + public class SelectPageSimpleCallback : SelectPageCallback { + protected ${glPagingBeanInterfaceName} _pb; + protected ${glBehaviorReadableInterfaceName} _bhv; + public ${glPagingBeanInterfaceName} PagingBean { get { return _pb; } } + public SelectPageSimpleCallback(${glPagingBeanInterfaceName} pb, ${glBehaviorReadableInterfaceName} bhv) { + _pb = pb; + _bhv = bhv; + } + public virtual int SelectCountIgnoreFetchScope() { + // This is default method of select-count-ignore-fetch-scope. + return _bhv.ReadCount((${glConditionBeanInterfaceName})this.PagingBean); + } + public virtual System.Collections.IList SelectList() { + // This is default method of select-list. + return _bhv.ReadList((${glConditionBeanInterfaceName})this.PagingBean); + } + } + + public class ResultBeanBuilder { + + protected ${glBehaviorReadableInterfaceName} _bhv; + public ResultBeanBuilder(${glBehaviorReadableInterfaceName} bhv) { + _bhv = bhv; + } + public ${glBehaviorReadableInterfaceName} Bhv { + get { return _bhv; } + } + + /** + * Build list-reuslt-bean. + * + * @param ob Order-by-bean. (NotNull) + * @param selectedList Selected list. (NotNull) + * @return List-result-bean. (NotNull) + */ + public ${glListResultBeanName} BuildListResultBean(${glOrderByBeanInterfaceName} ob, System.Collections.IList selectedList) { + ${glListResultBeanName} rb = new ${glListResultBeanName}(); + rb.TableDbName = this.Bhv.TableDbName; + rb.AllRecordCount = selectedList.Count; + rb.SelectedList = selectedList; + rb.OrderByClause = ob.SqlComponentOfOrderByClause; + return rb; + } + + /// + /// Build paging-result-bean. + /// + /// Condition-bean. (NotNull) + /// Paging result bean. (NotNull) + public ${glPagingResultBeanName} BuildPagingResultBean(${glPagingBeanInterfaceName} pb, int allRecordCount, System.Collections.IList selectedList) { + ${glPagingResultBeanName} rb = new ${glPagingResultBeanName}(); + rb.TableDbName = this.Bhv.TableDbName; + rb.AllRecordCount = allRecordCount; + rb.SelectedList = selectedList; + rb.PageSize = pb.FetchSize; + rb.CurrentPageNumber = pb.FetchPageNumber; + rb.OrderByClause = pb.SqlComponentOfOrderByClause; + return rb; + } + } + + public interface SelectPageInvoker { + /// + /// Invoke select-page by callback. + /// + /// Callback. (NotNull) + ${glPagingResultBeanName} InvokeSelectPage(SelectPageCallback callback); + } + + public class SelectPageSimpleInvoker : SelectPageInvoker { + + protected ${glBehaviorReadableInterfaceName} _bhv; + public SelectPageSimpleInvoker(${glBehaviorReadableInterfaceName} bhv) { + _bhv = bhv; + } + public ${glBehaviorReadableInterfaceName} Bhv { + get { return _bhv; } + } + + /// + /// Invoke select-page by callback. + /// + /// Callback. (NotNull) + public ${glPagingResultBeanName} InvokeSelectPage(SelectPageCallback callback) { + AssertObjectNotNull("callback", callback); + AssertObjectNotNull("callback.PagingBean", callback.PagingBean); + if (!callback.PagingBean.IsFetchScopeEffective) { + String msg = "When you invoke select page, you should set up fetch-scope of paging bean."; + msg = msg + " But the paging bean is not effective about fetch-scope: " + callback.PagingBean; + throw new SystemException(msg); + } + int allRecordCount = callback.SelectCountIgnoreFetchScope(); + System.Collections.IList selectedList = callback.SelectList(); + ${glPagingResultBeanName} rb = new ResultBeanBuilder(this.Bhv).BuildPagingResultBean(callback.PagingBean, allRecordCount, selectedList); + if (IsNecessaryToReadPageAgain(rb)) { + callback.PagingBean.FetchPage(rb.AllPageCount); + int reAllRecordCount = callback.SelectCountIgnoreFetchScope(); + System.Collections.IList reSelectedList = callback.SelectList(); + return new ResultBeanBuilder(this.Bhv).BuildPagingResultBean(callback.PagingBean, reAllRecordCount, reSelectedList); + } else { + return rb; + } + } + + /// + /// Is it necessary to read page again? + /// + /// Paging-result-bean. (NotNull) + /// Determination. + protected bool IsNecessaryToReadPageAgain(${glPagingResultBeanName} rb) { + return rb.AllRecordCount > 0 && rb.SelectedList.Count == 0; + } + + /** + * Assert that the argument is not null. + * + * @param variableName Variable name. (NotNull) + * @param arg Argument. (NotNull) + */ + protected void AssertObjectNotNull(String variableName, Object arg) { + if (variableName == null) { + String msg = "Argument[variableName] should not be null."; + throw new ArgumentNullException(msg); + } + if (arg == null) { + String msg = "Argument[" + variableName + "] should not be null."; + throw new ArgumentNullException(msg); + } + } + } + + /// + /// The marker interface of simple condition-bean setupper. + /// + public interface SimpleCBSetupper { + } +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/bhv/BehaviorWritable.vmnet =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/bhv/BehaviorWritable.vmnet 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/bhv/BehaviorWritable.vmnet 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,172 @@ + +using System; +using System.Collections; + +using ${glPackageBaseCommon}; + +namespace ${glPackageBaseCommonBhv} { + + /** + * The interface of behavior-writable. + * + * @author ${database.ClassAuthor} + */ + public interface ${glBehaviorWritableInterfaceName} : ${glBehaviorReadableInterfaceName} { + + /** + * Get dao-writable. + * + * @return Dao-writable. (NotNull) + */ + ${glDaoWritableInterfaceName} GetDaoWritable(); + + /** + * Create entity. (Call-Method) + * + * @param entity Entity that the type is entity-interface. (NotNull) + * @return Inserted count. + */ + int CallCreate(${glEntityInterfaceName} entity); + + /** + * Modify entity. (Call-Method) + * + * @param entity Entity that the type is entity-interface. (NotNull) + * @return Updated count. + */ + int CallModify(${glEntityInterfaceName} entity); + + /** + * Remove entity. (Call-Method) + * + * @param entity Entity that the type is entity-interface. (NotNull) + * @return Deleted count. + */ + int CallRemove(${glEntityInterfaceName} entity); + +#if ($database.isMakeDeprecated()) + + /** + * Create entity. (Delegate-Method) + * + * @param entity Entity that the type is entity-interface. (NotNull) + * @return Inserted count. + */ + [Obsolete("This method is deprecated. Please use CallCreate()")] + int DelegateCreate(${glEntityInterfaceName} entity); + + /** + * Modify entity. (Delegate-Method) + * + * @param entity Entity that the type is entity-interface. (NotNull) + * @return Updated count. + */ + [Obsolete("This method is deprecated. Please use CallModify()")] + int DelegateModify(${glEntityInterfaceName} entity); + + /** + * Remove entity. (Delegate-Method) + * + * @param entity Entity that the type is entity-interface. (NotNull) + * @return Deleted count. + */ + [Obsolete("This method is deprecated. Please use CallRemove()")] + int DelegateRemove(${glEntityInterfaceName} entity); +#end + + // ===================================================================================== + // Basic Entity Update + // =================== + #region Basic Entity Update + /// + /// Create. + /// + /// Entity. (NotNull) + void Create(${glPackageBaseCommon}.${glEntityInterfaceName} entity); + + /// + /// Modify. + /// + /// Entity. (NotNull) + void Modify(${glPackageBaseCommon}.${glEntityInterfaceName} entity); + + /** + /// Modify after select. + * + * @param entity Entity. + * @return Updated count. + * @exception ${glPackageBaseCommonException}.${glRecordHasAlreadyBeenDeletedException} + */ + void ModifyAfterSelect(${glPackageBaseCommon}.${glEntityInterfaceName} entity); + + /// + /// Create or modify after select. + /// + /// Entity. This must contain primary-key value at least. (NotNull) + /// + void CreateOrModifyAfterSelect(${glPackageBaseCommon}.${glEntityInterfaceName} entity); +#if ($database.isMakeBehaviorForUpdate()) + + /// + /// Modify after select-for-update. + /// + /// Entity. + /// + void ModifyAfterSelectForUpdate(${glPackageBaseCommon}.${glEntityInterfaceName} entity); + + /// + /// Create or modify after select-for-update. + /// + /// Entity. This must contain primary-key value at least. (NotNull) + void CreateOrModifyAfterSelectForUpdate(${glPackageBaseCommon}.${glEntityInterfaceName} entity); +#end + + /// + /// Remove. + /// + /// Entity. (NotNull) + void Remove(${glPackageBaseCommon}.${glEntityInterfaceName} entity); + + /// + /// Reflect(insert or update) from separated-file. + /// + /// Name of the file. (NotNull and NotEmpty) + /// Encoding of the file. (NotNull and NotEmpty) + /// Delimiter of the file. (NotNull and NotEmpty) + /// Batch-count for transaction. + /// If true, this method continue in spite of throwing the exception. + /// The list of InsertOrUpdateExceptionResult. (NotNull) + /// + /// + System.Collections.Generic.IList ReflectFromSeparatedFile( + String filename, String encoding, String delimiter, + int batchCount, bool isErrorContinue); + + #endregion + } + + + /// + /// Exception result for one entity. + /// + public class OneEntityExceptionResult { + protected String _primaryKeyMapString; + protected ${glEntityInterfaceName} _entity; + protected Exception _exception; + + public String PrimaryKeyMapString{ + get { return _primaryKeyMapString; } + set { _primaryKeyMapString = value; } + } + + public ${glEntityInterfaceName} Entity{ + get { return _entity; } + set { _entity = value; } + } + + public Exception Exception{ + get { return _exception; } + set { _exception = value; } + } + } +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/cbean/AbstractConditionBean.vmnet =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/cbean/AbstractConditionBean.vmnet 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/cbean/AbstractConditionBean.vmnet 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,499 @@ +#set ($myClassName = "${glConditionBeanAbstractName}") + +using System; +using System.Collections; +using System.Text; + +using ${glPackageBaseCommonDBMeta}; +using ${glPackageBaseCommonSqlClause}; + +namespace ${glPackageBaseCommonCBean} { + + /// + /// The condition-bean as abstract. + /// Author: ${database.ClassAuthor} + /// + [System.Serializable] + public abstract class $myClassName : ${glConditionBeanInterfaceName} { + + // ===================================================================================== + // Attribute + // ========= + /** SQL clause instance. */ + protected readonly ${glSqlClauseName} _sqlClause; + + /// Argument-bean. (for SqlComment) + protected Object _argumentBean; + + // ===================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + public ${myClassName}() { + _sqlClause = new ${glSqlClauseName}${database.DaoGenDbName}(GetTableDbName()); + } + + // ===================================================================================== + // Table Name + // ========== + /// + /// ${database.ImplementComment} + /// + abstract public String GetTableDbName(); + + // ===================================================================================== + // PrimaryKey + // ========== + /// + /// ${database.ImplementComment} + /// + /// Primary key map. (NotNull and NotEmpty) + abstract public void AcceptPrimaryKeyMap(System.Collections.Generic.IDictionary primaryKeyMap); + + /// + /// ${database.ImplementComment} + /// + /// Primary key map-string. (NotNull and NotEmpty) + abstract public void AcceptPrimaryKeyMapString(String primaryKeyMapString); + + // ===================================================================================== + // SqlClause + // ========= + /** + * ${database.ImplementComment} + * + * @return Sql clause. (NotNull) + */ + public ${glSqlClauseName} SqlClause { + get { + return _sqlClause; + } + } + + /** + * Get clause string. + * + * @return Sql clause string. (NotNUll) + */ + public String GetClause() { + return this.SqlClause.GetClause(); + } + + // ===================================================================================== + // Query + // ===== + /// + /// The property of condition-query as inteface. + /// + /// Instance of condition-query. (NotNull) + abstract public ${glConditionQueryInterfaceName} ConditionQueryAsInterface { get; } + + // ===================================================================================== + // FetchNarrowing + // ============== + /** + * ${database.ImplementComment} + * + * @return Fetch-narrowing start-index. + */ + public int FetchNarrowingSkipStartIndex { get { return this.SqlClause.FetchNarrowingSkipStartIndex; } } + + /** + * ${database.ImplementComment} + * + * @return Fetch-narrowing size. + */ + public int FetchNarrowingLoopCount { get { return this.SqlClause.FetchNarrowingLoopCount; } } + + /** + * ${database.ImplementComment} + * + * @return Determination. + */ + public bool IsFetchNarrowingSkipStartIndexEffective { get { return !this.SqlClause.IsFetchStartIndexSupported; } } + + /** + * ${database.ImplementComment} + * + * @return Determination. + */ + public bool IsFetchNarrowingLoopCountEffective { get { return !this.SqlClause.IsFetchSizeSupported; } } + + /** + * ${database.ImplementComment} + * + * @return Determiantion. + */ + public bool IsFetchNarrowingEffective { get { return this.SqlClause.IsFetchNarrowingEffective; } } + + // ===================================================================================== + // Paging + // ====== + /** + * ${database.ImplementComment} + * + * @param fetchSize Fetch-size. (NotMinus & NotZero) + * @return this. (NotNUll) + */ + public ${glPagingBeanInterfaceName} FetchFirst(int fetchSize) { + this.SqlClause.FetchFirst(fetchSize); + return this; + } + + /** + * ${database.ImplementComment} + * + * @param fetchStartIndex Fetch-start-index. 0 origin. (NotMinus) + * @param fetchSize Fetch-size. (NotMinus & NotZero) + * @return this. (NotNUll) + */ + public ${glPagingBeanInterfaceName} FetchScope(int fetchStartIndex, int fetchSize) { + this.SqlClause.FetchScope(fetchStartIndex, fetchSize); + return this; + } + + /** + * ${database.ImplementComment} + * + * @param fetchPageNumber Fetch-page-number. 1 origin. (NotMinus & NotZero) + * @return this. (NotNull) + */ + public ${glPagingBeanInterfaceName} FetchPage(int fetchPageNumber) { + this.SqlClause.FetchPage(fetchPageNumber); + return this; + } + + /** + * ${database.ImplementComment} + * + * @return this. (NotNUll) + */ + public ${glConditionBeanInterfaceName} LockForUpdate() { + this.SqlClause.LockForUpdate(); + return this; + } + + public int FetchStartIndex { + get { return this.SqlClause.FetchStartIndex; } + } + + public int FetchSize { + get { return this.SqlClause.FetchSize; } + } + + public int FetchPageNumber { + get { return this.SqlClause.FetchPageNumber; } + } + + /** + * Get page start index. + * + * @return Page start index. 0 origin. (NotMinus) + */ + public int PageStartIndex { + get { return this.SqlClause.PageStartIndex; } + } + + /** + * Get page end index. + * + * @return Page end index. 0 origin. (NotMinus) + */ + public int PageEndIndex { + get { return this.SqlClause.PageEndIndex; } + } + + /** + * Is fetch scope effective? + * + * @return Determination. + */ + public bool IsFetchScopeEffective { + get { return this.SqlClause.IsFetchScopeEffective; } + } + + // ===================================================================================== + // Limit Select + // ============ + /** Is limit-select PK only? */ + protected bool _isLimitSelectPKOnly; + + /** + * Is limit-select PK only? + * + * @return Determination. + */ + public bool IsLimitSelect_PKOnly() { + return _isLimitSelectPKOnly; + } + + /** + * Limit select PK only. + * + * @return this. (NotNull) + */ + public ${glConditionBeanInterfaceName} LimitSelect_PKOnly() { + _isLimitSelectPKOnly = true; + return this; + } + + /** + * Limit select off. + * + * @return this. (NotNull) + */ + public ${glConditionBeanInterfaceName} LimitSelect_Off() { + _isLimitSelectPKOnly = false; + return this; + } + + // ===================================================================================== + // OrderBy + // ======= + /// + /// The property of sql component of order-by clause. + /// + public ${glOrderByClauseName} SqlComponentOfOrderByClause { + get { return this.SqlClause.GetSqlComponentOfOrderByClause(); } + } + + /** + * ${database.ImplementComment} + * + * @return this. (NotNull) + */ + public ${glOrderByBeanInterfaceName} ClearOrderBy() { + this.SqlClause.ClearOrderBy(); + return this; + } + + /** + * ${database.ImplementComment} + * + * @return this. (NotNull) + */ + public ${glOrderByBeanInterfaceName} IgnoreOrderBy() { + this.SqlClause.IgnoreOrderBy(); + return this; + } + + /** + * ${database.ImplementComment} + * + * @return this. (NotNull) + */ + public $glOrderByBeanInterfaceName MakeOrderByEffective() { + this.SqlClause.MakeOrderByEffective(); + return this; + } + + /** + * Setup order-by PrimaryKey asc. {order by primaryKey1 asc, primaryKey2 asc...} + * + * @return this. (NotNUll) + */ + abstract public ${glConditionBeanInterfaceName} AddOrderBy_PK_Asc(); + + /** + * Setup order-by PrimaryKey desc. {order by primaryKey1 desc, primaryKey2 desc...} + * + * @return this. (NotNUll) + */ + abstract public ${glConditionBeanInterfaceName} AddOrderBy_PK_Desc(); + + /** + * Register order-by-asc. + * + * @param orderByProperty Order-by-property. 'aliasName.columnName/aliasName.columnName/...' (NotNull) + * @return this. (NotNull) + */ + public ${glOrderByBeanInterfaceName} RegisterOrderByAsc(String orderByProperty) { + this.SqlClause.RegisterOrderBy(FilterOrderByProperty(orderByProperty), orderByProperty, true); + return this; + } + + /** + * Register order-by-desc. + * + * @param orderByProperty Order-by-property. 'aliasName.columnName/aliasName.columnName/...' (NotNull) + * @return this. (NotNull) + */ + public ${glOrderByBeanInterfaceName} RegisterOrderByDesc(String orderByProperty) { + this.SqlClause.RegisterOrderBy(FilterOrderByProperty(orderByProperty), orderByProperty, false); + return this; + } + + /** + * Reverse order-by or Override order-by asc. + * + * @param orderByProperty Order-by-property. 'aliasName.columnName/aliasName.columnName/...' (NotNull) + * @return this. (NotNull) + */ + public ${glOrderByBeanInterfaceName} ReverseOrderBy_Or_OverrideOrderByAsc(String orderByProperty) { + this.SqlClause.ReverseOrderBy_Or_OverrideOrderBy(FilterOrderByProperty(orderByProperty), orderByProperty, true); + return this; + } + + /** + * Reverse order-by or Override order-by desc. + * + * @param orderByProperty Order-by-property. 'aliasName.columnName/aliasName.columnName/...' (NotNull) + * @return this. (NotNull) + */ + public ${glOrderByBeanInterfaceName} ReverseOrderBy_Or_OverrideOrderByDesc(String orderByProperty) { + this.SqlClause.ReverseOrderBy_Or_OverrideOrderBy(FilterOrderByProperty(orderByProperty), orderByProperty, false); + return this; + } + + protected String FilterOrderByProperty(String orderByProperty) { + String[] orderBySlashArray = orderByProperty.Split('/'); + StringBuilder sb = new StringBuilder(); + ${glDBMetaInterfaceName} dbmeta = ${glDBMetaInstanceHandlerName}.GetInstanceByTableDbName(GetTableDbName()); + ${glConditionQueryInterfaceName} query = this.ConditionQueryAsInterface; + foreach (String orderBySlashElement in orderBySlashArray) { + String[] orderByDotArray = orderBySlashElement.Split('.'); + + if (orderByDotArray.Length == 1) { + if (dbmeta.IsExistMultiName(orderBySlashElement)) { + sb.Append("/").Append(query.GetRealColumnName(dbmeta.GetDbNameByMultiName(orderBySlashElement))); + } else { + sb.Append("/").Append(orderBySlashElement); + } + } else { + ${glDBMetaInterfaceName} foreignDBMeta = dbmeta; + ${glConditionQueryInterfaceName} foreignQuery = query; + int count = 0; + foreach (String orderByDotElement in orderByDotArray) { + count++; + + if (orderByDotArray.Length == count) {// Last Loop! + if (!foreignDBMeta.IsExistMultiName(orderByDotElement)) { + String msg = "The name for order-by is not existing: name=" + orderByDotElement; + msg = msg + " orderBySlashElement=" + orderBySlashElement + " orderByProperty=" + orderByProperty; + throw new SystemException(msg); + } + sb.Append("/").Append(foreignQuery.GetRealColumnName(foreignDBMeta.GetDbNameByMultiName(orderByDotElement))); + break; + } + + foreignDBMeta = foreignDBMeta.GetForeignDBMeta(orderByDotElement); + foreignQuery = foreignQuery.GetForeignConditionQuery(orderByDotElement); + } + } + } + sb.Remove(0, "/".Length); + return sb.ToString(); + } + + // ===================================================================================== + // 'for SqlComment' Method + // ======================= + /** + * Get select-hint. {select [select-hint] * from table...} + * + * @return Select-hint. (NotNull) + */ + public String SelectHint { + get { return this.SqlClause.GetSelectHint(); } + } + + /** + * Get from-base-table-hint. {select * from table [from-base-table-hint] where ...} + * + * @return From-base-table-hint. (NotNull) + */ + public String FromBaseTableHint { + get { return this.SqlClause.GetFromBaseTableHint(); } + } + + /** + * Get from-hint. {select * from table [from-hint] where ...} + * + * @return From-hint. (NotNull) + */ + public String FromHint { + get { return this.SqlClause.GetFromHint(); } + } + + /** + * Get where clause. {order by [base-table].[column] asc, [fk-alias].[column] desc} + * + * @return Where clause. (NotNull) + */ + public String WhereClause { + get { return this.SqlClause.GetWhereClause(); } + } + + /** + * Get order-by clause. {order by [base-table].[column] asc, [fk-alias].[column] desc} + * + * @return Order-by clause. (NotNull) + */ + public String OrderByClause { + get { return this.SqlClause.GetOrderByClause(); } + } + + /** + * Get Sql-suffix. {select * from table where ... order by ... [sql-suffix]} + * + * @return Sql-suffix. (NotNull) + */ + public String SqlSuffix { + get { return this.SqlClause.GetSqlSuffix(); } + } + + /// + /// The property of argumentBean. (for SqlComment) + /// + public Object ArgumentBean { + get { return _argumentBean; } + set { _argumentBean = value; } + } + + // ------------------------------ + // for Internal + // ------------ + /** + * Set up various things for select-count-ignore-fetch-scope. + * This method is for INTERNAL. Don't invoke this! + * + * @return this. (NotNull) + */ + public ${glConditionBeanInterfaceName} SetupSelectCountIgnoreFetchScope() { + _isSelectCountIgnoreFetchScope = true; + this.SqlClause.IgnoreIncludedSelectColumn(); + this.SqlClause.IgnoreOrderBy(); + this.SqlClause.IgnoreFetchScope(); + return this; + } + + /** + * Do after-care for select-count-ignore-fetch-scope. + * This method is for INTERNAL. Don't invoke this! + * + * @return this. (NotNull) + */ + public ${glConditionBeanInterfaceName} AfterCareSelectCountIgnoreFetchScope() { + _isSelectCountIgnoreFetchScope = false; + this.SqlClause.MakeIncludedSelectColumnEffective(); + this.SqlClause.MakeOrderByEffective(); + this.SqlClause.MakeFetchScopeEffective(); + return this; + } + + /** Is set up various things for select-count-ignore-fetch-scope? */ + protected bool _isSelectCountIgnoreFetchScope; + + /** + * Is set up various things for select-count-ignore-fetch-scope? + * This method is for INTERNAL. Don't invoke this! + * + * @return Determination. + */ + public bool IsSelectCountIgnoreFetchScope() { + return _isSelectCountIgnoreFetchScope; + } + } +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/cbean/AbstractConditionQuery.vmnet =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/cbean/AbstractConditionQuery.vmnet 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/cbean/AbstractConditionQuery.vmnet 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,515 @@ +#set ($myClassName = "${glConditionQueryAbstractName}") + +using System; +using System.Collections; +using System.Reflection; +using System.Text; +using ${glPackageBaseCommonCKey}; +using ${glPackageBaseCommonCValue}; +using ${glPackageBaseCommonDBMeta}; +using ${glPackageBaseCommonSqlClause}; + +namespace ${glPackageBaseCommonCBean} { + + /// + /// The abstract class of condition-query. + /// Author: ${database.ClassAuthor} + /// + [System.Serializable] + public abstract class ${myClassName} : ${glConditionQueryInterfaceName} { + + // ===================================================================================== + // Attribute + // ========= + /** Condition value for DUMMY. */ + protected static readonly ${glConditionValueName} DUMMY_CONDITION_VALUE = new ${glConditionValueName}(); + + /** Object for DUMMY. */ + protected static readonly Object DUMMY_OBJECT = new Object(); + + /** SQL clause. */ + protected readonly ${glSqlClauseName} _sqlClause; + + /** My alias name. */ + protected readonly String _aliasName; + + /** Nest level. */ + protected readonly int _nestLevel; + + /** Child query. */ + protected readonly ${glConditionQueryInterfaceName} _childQuery; + + // ===================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param childQuery Child query. (Nullable: If null, this is base instance.) + * @param sqlClause SQL clause instance. (NotNull) + * @param aliasName My alias name. (NotNull) + * @param nestLevel Nest level. + */ + public ${myClassName}(${glConditionQueryInterfaceName} childQuery, ${glSqlClauseName} sqlClause, String aliasName, int nestLevel) { + _childQuery = childQuery; + _sqlClause = sqlClause; + _aliasName = aliasName; + _nestLevel = nestLevel; + } + + // ===================================================================================== + // Table Name + // ========== + /// + /// ${database.ImplementComment} + /// + abstract public String GetTableDbName(); + + // ===================================================================================== + // Getter + // ====== + /** + * Get child query. + * + * @return Child query. (Nullable) + */ + public ${glConditionQueryInterfaceName} GetChildQuery() { + return _childQuery; + } + + /** + * Get sql clause. + * + * @return Sql clause. (NotNull) + */ + public ${glSqlClauseName} GetSqlClause() { + return _sqlClause; + } + + /** + * Get alias name. + * + * @return Alias name. (NotNull) + */ + public String GetAliasName() { + return _aliasName; + } + + /** + * Get nest level. + * + * @return Nest level. + */ + public int GetNestLevel() { + return _nestLevel; + } + + /** + * Get next nest level. + * + * @return Next nest level. + */ + public int GetNextNestLevel() { + return _nestLevel+1; + } + + /** + * Is base query? + * + * @param query Condition query. (NotNull) + * @return Determination. + */ + public bool IsBaseQuery(${glConditionQueryInterfaceName} query) { + return (query.GetChildQuery() == null); + } + + // ===================================================================================== + // RealName + // ======== + /// + /// Get real alias name(that has nest level mark). + /// + /// Real alias name. (NotNull) + public String GetRealAliasName() { + if (GetNestLevel() > 1) { + return GetAliasName() + "_n" + GetNestLevel(); + } else { + return GetAliasName(); + } + } + + /// + /// Get real column name(with real alias name). + /// + /// Column name without alias name. This should not contain comma. + /// Real column name. + public String GetRealColumnName(String columnName) { + AssertColumnName(columnName); + return GetRealAliasName() + "." + columnName; + } + + // ===================================================================================== + // IncludeAsMine + // ============= + /// + /// Register included-select-column. + /// + /// Alias name. This should not contain comma. (NotNull) + /// Real column name. This should not contain comma. (NotNull) + protected void RegisterIncludedSelectColumn(String aliasName, String realColumnName) { + AssertAliasName(aliasName); + AssertColumnName(realColumnName); + GetSqlClause().RegisterIncludedSelectColumn(aliasName, realColumnName); + } + + // ===================================================================================== + // Query + // ===== + /// + /// Register condition of ${col.UncapitalisedJavaName}. + /// + /// Condition key. (NotNull) + /// The value of ${col.UncapitalisedJavaName}. (Nullable) + protected virtual void RegisterQuery(${glConditionKeyName} key, Object value, ${glConditionValueName} cvalue + , String colName, String capPropName, String uncapPropName) { + if (key.IsValidRegistration(cvalue, value, key.GetConditionKey() + " of " + GetRealAliasName() + "." + uncapPropName)) { + key.SetupConditionValue(cvalue, value, GetLocation(capPropName, key));// If C#, CapProp! + GetSqlClause().RegisterWhereClause(GetRealColumnName(colName), key, cvalue); + } + } + + /// + /// Register inline condition of ${col.UncapitalisedJavaName}. + /// + /// Condition key. (NotNull) + /// The value of ${col.UncapitalisedJavaName}. (Nullable) + protected virtual void RegisterInlineQuery(${glConditionKeyName} key, Object value, ${glConditionValueName} cvalue + , String colName, String capPropName, String uncapPropName) { + if (key.IsValidRegistration(cvalue, value, key.GetConditionKey() + " of " + GetRealAliasName() + "." + uncapPropName)) { + key.SetupConditionValue(cvalue, value, GetLocation(capPropName, key));// If C#, CapProp! + if (IsBaseQuery(this)) { + GetSqlClause().RegisterBaseTableInlineWhereClause(colName, key, cvalue); + } else { + GetSqlClause().RegisterOuterJoinInlineWhereClause(GetRealAliasName(), colName, key, cvalue); + } + } + } + + // ===================================================================================== + // SubQuery + // ======== + protected void RegisterInScopeSubQuery(${glConditionQueryInterfaceName} subQuery + , String columnName, String relatedColumnName, String propertyName) { + String realColumnName = GetRealColumnName(columnName); + String subQueryClause = GetInScopeSubQuerySql(subQuery, relatedColumnName, propertyName); + GetSqlClause().RegisterWhereClause(realColumnName + " in (" + subQueryClause + ")"); + } + + protected void RegisterInlineInScopeSubQuery(${glConditionQueryInterfaceName} subQuery + , String columnName, String relatedColumnName, String propertyName) { + String subQueryClause = GetInScopeSubQuerySql(subQuery, relatedColumnName, propertyName); + String finalClause = columnName + " in (" + subQueryClause + ")"; + if (IsBaseQuery(this)) { + GetSqlClause().RegisterBaseTableInlineWhereClause(finalClause); + } else { + GetSqlClause().RegisterOuterJoinInlineWhereClause(GetRealAliasName(), finalClause); + } + } + + protected String GetInScopeSubQuerySql(${glConditionQueryInterfaceName} subQuery + , String relatedColumnName, String propertyName) { + String selectClause = "select " + subQuery.GetAliasName() + "." + relatedColumnName; + String fromClause = subQuery.GetSqlClause().GetFromClause(); + String oldStr = ".ConditionQuery."; + String newStr = "." + GetLocationBase(propertyName) + "."; + String whereClause = subQuery.GetSqlClause().GetWhereClause().Replace(oldStr, newStr); + return selectClause + " " + fromClause + " " + whereClause; + } + + protected void RegisterExistsSubQuery(${glConditionQueryInterfaceName} subQuery + , String columnName, String relatedColumnName, String propertyName) { + String realColumnName = GetRealColumnName(columnName); + String subQueryClause = GetExistsSubQuerySql(subQuery, realColumnName, relatedColumnName, propertyName); + GetSqlClause().RegisterWhereClause("exists (" + subQueryClause + ")"); + } + + // *Unsupport ExistsSubQuery as inline because it's so dangerous. + + protected String GetExistsSubQuerySql(${glConditionQueryInterfaceName} subQuery + , String realColumnName, String relatedColumnName, String propertyName) { + String selectClause = "select " + subQuery.GetAliasName() + "." + relatedColumnName; + String fromClause = subQuery.GetSqlClause().GetFromClause(); + String oldStr = ".ConditionQuery."; + String newStr = "." + GetLocationBase(propertyName) + "."; + String whereClause = subQuery.GetSqlClause().GetWhereClause().Replace(oldStr, newStr); + + // String parentCondition = " and " + relatedColumnName + " = " + realColumnName; + String parentCondition = ""; + if (whereClause.Contains("where")) { + parentCondition = " and " + relatedColumnName + " = " + realColumnName; + } else { + parentCondition = " where " + relatedColumnName + " = " + realColumnName; + } + + return selectClause + " " + fromClause + " " + whereClause + parentCondition; + } + + // ===================================================================================== + // Invoke + // ====== + public ${glConditionValueName} InvokeGetter(String columnMultiName) { + ${glDBMetaInterfaceName} dbmeta = ${glDBMetaInstanceHandlerName}.GetInstanceByTableDbName(GetTableDbName()); + String columnCapPropName = dbmeta.GetCapPropNameByMultiName(columnMultiName); + + String methodName = columnCapPropName; + PropertyInfo propertyInfo = this.GetType().GetProperty(methodName); + if (propertyInfo == null) { + String msg = "The columnCapPropName is not existing in this table: columnCapPropName=" + columnCapPropName + " tableName=" + GetTableDbName(); + msg = msg + " methodName=" + methodName; + throw new SystemException(msg); + } + Object result = propertyInfo.GetValue(this, null); + return (${glConditionValueName})result; + } + + public void InvokeSetterEqual(String columnMultiName, Object value) { + InvokeSetter(columnMultiName, value, "equal"); + } + + public void InvokeSetterNotEqual(String columnMultiName, Object value) { + InvokeSetter(columnMultiName, value, "notEqual"); + } + + public void InvokeSetterGreaterThan(String columnMultiName, Object value) { + InvokeSetter(columnMultiName, value, "greaterThan"); + } + + public void InvokeSetterLessThan(String columnMultiName, Object value) { + InvokeSetter(columnMultiName, value, "lessThan"); + } + + public void InvokeSetterGreaterEqual(String columnMultiName, Object value) { + InvokeSetter(columnMultiName, value, "greaterEqual"); + } + + public void InvokeSetterLessEqual(String columnMultiName, Object value) { + InvokeSetter(columnMultiName, value, "lessEqual"); + } + + protected void InvokeSetter(String columnMultiName, Object value, String conditionKeyName) { + ${glDBMetaInterfaceName} dbmeta = ${glDBMetaInstanceHandlerName}.GetInstanceByTableDbName(GetTableDbName()); + String columnCapPropName = dbmeta.GetCapPropNameByMultiName(columnMultiName); + + String methodName = "Set" + columnCapPropName + "_" + conditionKeyName.Substring(0, 1).ToUpper() + conditionKeyName.Substring(1); + MethodInfo methodInfo = this.GetType().GetMethod(methodName); + if (methodInfo == null) { + String msg = "The columnCapPropName is not existing in this table: columnCapPropName=" + columnCapPropName + " tableName=" + GetTableDbName(); + msg = msg + " methodName=" + methodName; + throw new SystemException(msg); + } + methodInfo.Invoke(this, new Object[]{value}); + } + + public void InvokeAddOrderByAsc(String columnCapPropName) { + InvokeOrderBy(columnCapPropName, true); + } + + public void InvokeAddOrderByDesc(String columnCapPropName) { + InvokeOrderBy(columnCapPropName, false); + } + + protected void InvokeOrderBy(String columnMultiName, bool isAsc) { + ${glDBMetaInterfaceName} dbmeta = ${glDBMetaInstanceHandlerName}.GetInstanceByTableDbName(GetTableDbName()); + String columnCapPropName = dbmeta.GetCapPropNameByMultiName(columnMultiName); + + String ascDesc = null; + if (isAsc) { + ascDesc = "Asc"; + } else { + ascDesc = "Desc"; + } + String methodName = "AddOrderBy_" + columnCapPropName + "_" + ascDesc; + MethodInfo methodInfo = this.GetType().GetMethod(methodName); + if (methodInfo == null) { + String msg = "The columnCapPropName is not existing in this table: columnCapPropName=" + columnCapPropName; + msg = msg + " tableName=" + GetTableDbName() + " methodName=" + methodName; + throw new SystemException(msg); + } + methodInfo.Invoke(this, null); + } + + /// + /// ${database.ImplementComment} + /// + /// Foreign-property-name(Both OK - InitCap or not). (NotNull) + /// Foreign condition-query as interface. + public ${glConditionQueryInterfaceName} GetForeignConditionQuery(String foreignPropertyName) { + String methodName = "Query" + foreignPropertyName.Substring(0, 1) + foreignPropertyName.Substring(1); + MethodInfo methodInfo = this.GetType().GetMethod(methodName); + if (methodInfo == null) { + String msg = "The foreignPropertyName is not existing in this table: foreignPropertyName=" + foreignPropertyName; + msg = msg + " tableName=" + GetTableDbName() + " methodName=" + methodName; + throw new SystemException(msg); + } + return (${glConditionQueryInterfaceName})methodInfo.Invoke(this, null); + } + + /** + * Get location. + * + * @param columnPropertyName Column property name. + * @param key Condition key. + * @return Next nest level. + */ + protected String GetLocation(String columnPropertyName, ${glConditionKeyName} key) { + return GetLocationBase(columnPropertyName) + "." + key.GetConditionKey(); + } + + protected String GetLocationBase() { + StringBuilder sb = new StringBuilder(); + ${glConditionQueryInterfaceName} query = this; + while (true) { + if (query.IsBaseQuery(query)) { + sb.Insert(0, "ConditionQuery."); + break; + } else { + sb.Insert(0, "ConditionQuery" + query.GetAliasName() + "."); + } + query = query.GetChildQuery(); + } + return sb.ToString(); + } + + protected String GetLocationBase(String columnPropertyName) { + return GetLocationBase() + columnPropertyName; + } + + + // ===================================================================================== + // Helper + // ====== + /// + /// Filter removing empty-string. + /// If the value is null or empty-string, returns null. + /// + /// Query-value-string. (Nullable) + /// Filtered value. (Nullable) + protected String FilterRemoveEmptyString(String value) { + return ((value != null && value.Length != 0) ? value : null); + } + + /// + /// Filter removing empty-string from the list. + /// If the list is null or empty-string, returns null. + /// + /// List. (Nullable) + /// Filtered list. (Nullable) + protected IList FilterRemoveEmptyStringFromList(IList ls) { + if (ls == null) { + return null; + } + IList newList = new ArrayList(); + foreach (Object obj in ls) { + if ((obj is String) && "".Equals((String)obj)) { + continue; + } + newList.Add(obj); + } + return newList; + } + + // ---------------------------------------------------------------- + // Assert Object + // ------------- + #region Assert Object + + /** + * Assert that the argument is not null. + * + * @param variableName Variable name. (NotNull) + * @param arg Argument. (NotNull) + */ + protected void AssertObjectNotNull(String variableName, Object arg) { + if (variableName == null) { + String msg = "Argument[variableName] should not be null."; + throw new ArgumentNullException(msg); + } + if (arg == null) { + String msg = "Argument[" + variableName + "] should not be null."; + throw new ArgumentNullException(msg); + } + } + + /** + * Assert that the column-name is not null and is not emtpy and does not contain comma. + * + * @param columnName Column-name. (NotNull) + * @exception IllegalArgumentException + */ + protected void AssertColumnName(String columnName) { + if (columnName == null) { + String msg = "The columnName should not be null."; + throw new ArgumentNullException(msg); + } + if (columnName.Trim().Length == 0) { + String msg = "The columnName should not be empty-string."; + throw new ArgumentOutOfRangeException(msg); + } + if (columnName.Contains(",")) { + String msg = "The columnName should not contain comma ',': " + columnName; + throw new ArgumentOutOfRangeException(msg); + } + } + + /** + * Assert that the alias-name is not null and is not emtpy and does not contain comma. + * + * @param aliasName Alias-name. (NotNull) + * @exception IllegalArgumentException + */ + protected void AssertAliasName(String aliasName) { + if (aliasName == null) { + String msg = "The aliasName should not be null."; + throw new ArgumentNullException(msg); + } + if (aliasName.Trim().Length == 0) { + String msg = "The aliasName should not be empty-string."; + throw new ArgumentOutOfRangeException(msg); + } + if (aliasName.Contains(",")) { + String msg = "The aliasName should not contain comma ',': " + aliasName; + throw new ArgumentOutOfRangeException(msg); + } + } + + #endregion + + // ---------------------------------------------------------------- + // Assert String + // ------------- + #region Assert String + + /** + * Assert that the string is not null and not trimmed empty. + * + * @param variableName Variable name. (NotNull) + * @param arg Argument. (NotNull) + */ + protected void AssertStringNotNullAndNotTrimmedEmpty(String variableName, String value) { + if (variableName == null) { + String msg = "Variable[variableName] should not be null."; + throw new ArgumentNullException(msg); + } + if (value == null) { + String msg = "Variable[" + variableName + "] should not be null."; + throw new ArgumentNullException(msg); + } + if (value.Trim().Length == 0) { + String msg = "Variable[" + variableName + "] should not be empty: [" + value + "]"; + throw new ArgumentOutOfRangeException(msg); + } + } + + #endregion + } +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/cbean/ConditionBean.vmnet =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/cbean/ConditionBean.vmnet 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/cbean/ConditionBean.vmnet 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,144 @@ + +using System; +using System.Collections; +using ${glPackageBaseCommonSqlClause}; + +namespace ${glPackageBaseCommonCBean} { + + /// + /// The condition-bean as interface. + /// Author: ${database.ClassAuthor} + /// + public interface ${glConditionBeanInterfaceName} : ${glPagingBeanInterfaceName} { + + // ===================================================================================== + // Table Name + // ========== + /// + /// Get the value of tableName. (readonly) + /// + String GetTableDbName(); + + // ===================================================================================== + // PrimaryKey + // ========== + /// + /// Accept primary key map. + /// + /// Primary key map. (NotNull and NotEmpty) + void AcceptPrimaryKeyMap(System.Collections.Generic.IDictionary primaryKeyMap); + + /// + /// Accept primary key map-string. Delimiter is atmark and semicolon {@;}. + /// + /// Primary key map-string. (NotNull and NotEmpty) + void AcceptPrimaryKeyMapString(String primaryKeyMapString); + + // ===================================================================================== + // SqlClause + // ========= + /** + * Get sql-clause instance. + * + * @return Sql-clause. (NotNUll) + */ + ${glSqlClauseName} SqlClause { get; } + + /** + * Get clause string. + * + * @return Sql clause string. (NotNUll) + */ + String GetClause(); + + // ===================================================================================== + // Query + // ===== + /// + /// The property of condition-query as inteface. + /// + /// Instance of condition-query. (NotNull) + ${glConditionQueryInterfaceName} ConditionQueryAsInterface { get; } + + // ===================================================================================== + // Limit Select + // ============ + /** + * Is limit-select PK only? + * + * @return Determination. + */ + bool IsLimitSelect_PKOnly(); + + /** + * Limit select PK only. + * + * @return this. (NotNull) + */ + ${glConditionBeanInterfaceName} LimitSelect_PKOnly(); + + /** + * Limit select off. + * + * @return this. (NotNull) + */ + ${glConditionBeanInterfaceName} LimitSelect_Off(); + + // ===================================================================================== + // OrderBy + // ======= + /** + * Add order-by PrimaryKey asc. {order by primaryKey1 asc, primaryKey2 asc...} + * + * @return this. (NotNUll) + */ + ${glConditionBeanInterfaceName} AddOrderBy_PK_Asc(); + + /** + * Add order-by PrimaryKey desc. {order by primaryKey1 desc, primaryKey2 desc...} + * + * @return this. (NotNUll) + */ + ${glConditionBeanInterfaceName} AddOrderBy_PK_Desc(); + + // ===================================================================================== + // Advance + // ======= + /** + * Lock for update. + *

+ * If you invoke this, your SQL lock target records for update. + * It depends whether this method supports this on the database type. + * + * @return this. (NotNUll) + */ + $glConditionBeanInterfaceName LockForUpdate(); + + // ------------------------------ + // for Internal + // ------------ + /** + * Set up various things for select-count-ignore-fetch-scope. + * This method is for INTERNAL. Don't invoke this! + * + * @return this. (NotNull) + */ + ${glConditionBeanInterfaceName} SetupSelectCountIgnoreFetchScope(); + + /** + * Do after-care for select-count-ignore-fetch-scope. + * This method is for INTERNAL. Don't invoke this! + * + * @return this. (NotNull) + */ + ${glConditionBeanInterfaceName} AfterCareSelectCountIgnoreFetchScope(); + + /** + * Is set up various things for select-count-ignore-fetch-scope? + * This method is for INTERNAL. Don't invoke this! + * + * @return Determination. + */ + bool IsSelectCountIgnoreFetchScope(); + } +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/cbean/ConditionBeanContext.vmnet =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/cbean/ConditionBeanContext.vmnet 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/cbean/ConditionBeanContext.vmnet 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,86 @@ + +using System; +using System.Collections; +using System.Reflection; +using System.Text; +using System.Threading; + +namespace ${glPackageBaseCommonCBean} { + +/** + * Condition-bean context. (referring to s2pager) + * + * @author ${database.ClassAuthor} + */ + public static class ${glConditionBeanContextName} { + + /** The thread-local for this. */ + private static LocalDataStoreSlot _conditionBeanBeanSlot = Thread.AllocateDataSlot(); + + /** + * Get fetch-narrowing-bean context on thread. + * + * @return FetchNarrowing-bean. (Nullable) + */ + public static ${glConditionBeanInterfaceName} GetConditionBeanOnThread() { + return (${glConditionBeanInterfaceName})Thread.GetData(_conditionBeanBeanSlot); + } + + /** + * Set fetch-narrowing-bean context on thread. + * + * @param ${glAttachedCBArgsVariableName} FetchNarrowing-bean. (NotNull) + */ + public static void SetConditionBeanOnThread(${glConditionBeanInterfaceName} ${glAttachedCBArgsVariableName}) { + if (${glAttachedCBArgsVariableName} == null) { + String msg = "The argument[${glAttachedCBArgsVariableName}] must not be null."; + throw new ArgumentNullException(msg); + } + Thread.SetData(_conditionBeanBeanSlot, ${glAttachedCBArgsVariableName}); + } + + /** + * Clear fetch-narrowing-bean context on thread. + */ + public static void ClearConditionBeanOnThread() { + Thread.SetData(_conditionBeanBeanSlot, null); + } + + /** + * Is existing fetch-narrowing-bean context on thread? + * + * @return Determination. + */ + public static bool IsExistConditionBeanOnThread() { + return (Thread.GetData(_conditionBeanBeanSlot) != null); + } + + /** + * Is the argument condition-bean? + * + * @param dtoInstance Dto instance. + * @return Determination. + */ + public static bool IsTheArgumentConditionBean(Object dtoInstance) { + if (dtoInstance is ${glConditionBeanInterfaceName}) { + return true; + } else { + return false; + } + } + + /** + * Is the type condition-bean? + * + * @param dtoClass DtoClass. + * @return Determination. + */ + public static bool IsTheTypeConditionBean(Type dtoType) { + if (typeof(${glConditionBeanInterfaceName}).IsAssignableFrom(dtoType)) { + return true; + } else { + return false; + } + } + } +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/cbean/ConditionQuery.vmnet =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/cbean/ConditionQuery.vmnet 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/cbean/ConditionQuery.vmnet 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,102 @@ + +using System; +using System.Collections; +using ${glPackageBaseCommonCValue}; +using ${glPackageBaseCommonSqlClause}; + +namespace ${glPackageBaseCommonCBean} { + + ///

+ /// The condition-bean as interface. + /// Author: ${database.ClassAuthor} + /// + public interface ${glConditionQueryInterfaceName} { + + /// + /// Get the value of tableName. (readonly) + /// + String GetTableDbName(); + + /** + * Get child query. + * + * @return Child query. (Nullable) + */ + ${glConditionQueryInterfaceName} GetChildQuery(); + + /** + * Get sql clause. + * + * @return Sql clause. (NotNull) + */ + ${glSqlClauseName} GetSqlClause(); + + /** + * Get alias name. + * + * @return Alias name. (NotNull) + */ + String GetAliasName(); + + /// + /// Get real alias name(that has nest level mark). + /// + /// Real alias name. (NotNull) + String GetRealAliasName(); + + /// + /// Get real column name(with real alias name). + /// + /// Column name without alias name. + /// Real column name. + String GetRealColumnName(String columnName); + + /** + * Get nest level. + * + * @return Nest level. + */ + int GetNestLevel(); + + /** + * Get next nest level. + * + * @return Next nest level. + */ + int GetNextNestLevel(); + + /** + * Is base query? + * + * @param query Condition query. (NotNull) + * @return Determination. + */ + bool IsBaseQuery(${glConditionQueryInterfaceName} query); + + + // ===================================================================================== + // Invoke + // ====== + ${glConditionValueName} InvokeGetter(String columnMultiName); + + void InvokeSetterEqual(String columnMultiName, Object value); + void InvokeSetterNotEqual(String columnMultiName, Object value); + void InvokeSetterGreaterThan(String columnMultiName, Object value); + void InvokeSetterLessThan(String columnMultiName, Object value); + void InvokeSetterGreaterEqual(String columnMultiName, Object value); + void InvokeSetterLessEqual(String columnMultiName, Object value); + + void InvokeAddOrderByAsc(String columnMultiName); + void InvokeAddOrderByDesc(String columnMultiName); + + // ===================================================================================== + // Foregin Query + // ============= + /// + /// Get foreign condition-query. + /// + /// Foreign-property-name(Both OK - InitCap or not). (NotNull) + /// Foreign condition-query as interface. + ${glConditionQueryInterfaceName} GetForeignConditionQuery(String foreignPropertyName); + } +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/cbean/FetchNarrowingBean.vmnet =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/cbean/FetchNarrowingBean.vmnet 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/cbean/FetchNarrowingBean.vmnet 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,49 @@ + +using System; +using System.Collections; +using ${glPackageBaseCommonSqlClause}; + +namespace ${glPackageBaseCommonCBean} { + + /// + /// The condition-bean as interface. + /// Author: ${database.ClassAuthor} + /// + public interface ${glFetchNarrowingBeanInterfaceName} { + + /** + * Get fetch-narrowing start-index. + * + * @return Fetch-narrowing start-index. + */ + int FetchNarrowingSkipStartIndex { get; } + + /** + * Get fetch-narrowing size. + * + * @return Fetch-narrowing size. + */ + int FetchNarrowingLoopCount { get; } + + /** + * Is fetch start index supported? + * + * @return Determination. + */ + bool IsFetchNarrowingSkipStartIndexEffective { get; } + + /** + * Is fetch size supported? + * + * @return Determination. + */ + bool IsFetchNarrowingLoopCountEffective { get; } + + /** + * Is fetch-narrowing effective? + * + * @return Determiantion. + */ + bool IsFetchNarrowingEffective { get; } + } +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/cbean/FetchNarrowingBeanContext.vmnet =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/cbean/FetchNarrowingBeanContext.vmnet 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/cbean/FetchNarrowingBeanContext.vmnet 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,86 @@ + +using System; +using System.Collections; +using System.Reflection; +using System.Text; +using System.Threading; + +namespace ${glPackageBaseCommonCBean} { + +/** + * FetchNarrowing-Bean context. (referring to s2pager) + * + * @author ${database.ClassAuthor} + */ + public static class ${glFetchNarrowingBeanContextName} { + + /** The thread-local for this. */ + private static LocalDataStoreSlot _fetchNarrowingBeanSlot = Thread.AllocateDataSlot(); + + /** + * Get fetch-narrowing-bean context on thread. + * + * @return FetchNarrowing-bean. (Nullable) + */ + public static ${glFetchNarrowingBeanInterfaceName} GetFetchNarrowingBeanOnThread() { + return (${glFetchNarrowingBeanInterfaceName})Thread.GetData(_fetchNarrowingBeanSlot); + } + + /** + * Set fetch-narrowing-bean context on thread. + * + * @param ${glAttachedCBArgsVariableName} FetchNarrowing-bean. (NotNull) + */ + public static void SetFetchNarrowingBeanOnThread(${glFetchNarrowingBeanInterfaceName} ${glAttachedCBArgsVariableName}) { + if (${glAttachedCBArgsVariableName} == null) { + String msg = "The argument[${glAttachedCBArgsVariableName}] must not be null."; + throw new ArgumentNullException(msg); + } + Thread.SetData(_fetchNarrowingBeanSlot, ${glAttachedCBArgsVariableName}); + } + + /** + * Clear fetch-narrowing-bean context on thread. + */ + public static void ClearFetchNarrowingBeanOnThread() { + Thread.SetData(_fetchNarrowingBeanSlot, null); + } + + /** + * Is existing fetch-narrowing-bean context on thread? + * + * @return Determination. + */ + public static bool IsExistFetchNarrowingBeanOnThread() { + return (Thread.GetData(_fetchNarrowingBeanSlot) != null); + } + + /** + * Is the argument fetch-narrowing-bean? + * + * @param dtoInstance Dto instance. + * @return Determination. + */ + public static bool IsTheArgumentFetchNarrowingBean(Object dtoInstance) { + if (dtoInstance is ${glFetchNarrowingBeanInterfaceName}) { + return true; + } else { + return false; + } + } + + /** + * Is the type fetch-narrowing-bean? + * + * @param dtoClass DtoClass. + * @return Determination. + */ + public static bool IsTheTypeFetchNarrowingBean(Type dtoType) { + if (typeof(${glFetchNarrowingBeanInterfaceName}).IsAssignableFrom(dtoType)) { + return true; + } else { + return false; + } + } + } +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/cbean/ListResultBean.vmnet =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/cbean/ListResultBean.vmnet 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/cbean/ListResultBean.vmnet 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,223 @@ +#set ($myClassName = "${glListResultBeanName}") + +using System; +using System.Text; + +using ${glPackageBaseCommonSqlClause}; + +namespace ${glPackageBaseCommonCBean} { + + /// + /// The list-result-bean of ${myClassName}. + /// Author: ${database.ClassAuthor} + /// + [System.Serializable] + public class ${myClassName} : System.Collections.IList { + + // ===================================================================================== + // Attribute + // ========= + #region Attribute + + /// The value of table db-name. + protected String _tableDbName; + + /// The value of all record count. + protected int _allRecordCount; + + /// Selected list. Default value is empty. + protected System.Collections.IList _selectedList = new System.Collections.ArrayList(); + + /// The value of current page number. + protected ${glOrderByClauseName} _orderByClause = new ${glOrderByClauseName}(); + + /// Has the setter of selected list invoked? + protected bool _isSetterInvokedSelectedList; + + #endregion + + // ===================================================================================== + // Constructor + // =========== + #region Constructor + + /// + /// Constructor. + /// + public ${myClassName}() { + } + + #endregion + + // ===================================================================================== + // Property + // ======== + #region Property + + /// + /// The property of table db-name. + /// + public String TableDbName { + get { return _tableDbName; } + set { _tableDbName = value; } + } + + /// + /// The property of all record count. + /// + public int AllRecordCount { + get { return _allRecordCount; } + set { _allRecordCount = value; } + } + + /// + /// The property of all record count. + /// + public System.Collections.IList SelectedList { + get { return _selectedList; } + set { _isSetterInvokedSelectedList=true; _selectedList = value; } + } + + /// + /// The property of order-by clause. + /// + public ${glOrderByClauseName} OrderByClause + { + get { return _orderByClause; } + set { _orderByClause = value; } + } + #endregion + + + // ===================================================================================== + // Determination + // ============= + #region Determination + /// + /// Has this result selected? + /// + /// Determination. + public bool IsSelectedResult { get { return _isSetterInvokedSelectedList; } } + #endregion + + // ===================================================================================== + // Basic-Override Method + // ===================== + /// + /// This method overrides the method that is declared at super. + /// + /// View-string of all-columns value. + public override String ToString() { + StringBuilder sb = new StringBuilder(); + + sb.Append(" tableDbName=").Append(_tableDbName); + sb.Append(" allRecordCount=").Append(_tableDbName); + sb.Append(" selectedList.Count=").Append(_selectedList.Count); + sb.Append(" orderByClause=").Append(_orderByClause); + + return sb.ToString(); + } + + // ===================================================================================== + // List Elements + // ============= + public virtual int Add(Object value) + { + return _selectedList.Add(value); + } + + public virtual bool Contains(Object value) + { + return _selectedList.Contains(value); + } + + public virtual void Clear() + { + _selectedList.Clear(); + } + + public virtual int IndexOf(Object value) + { + return _selectedList.IndexOf(value); + } + + public virtual void Insert(int index, Object value) + { + _selectedList.Insert(index, value); + } + + + public virtual void Remove(Object value) + { + _selectedList.Remove(value); + } + + + public virtual void RemoveAt(int index) + { + _selectedList.RemoveAt(index); + } + + + public virtual bool IsReadOnly + { + get + { + return _selectedList.IsReadOnly; + } + } + public virtual bool IsFixedSize + { + get + { + return _selectedList.IsFixedSize; + } + } + + public virtual void CopyTo(System.Array array, int index) + { + _selectedList.CopyTo(array, index); + } + + public virtual int Count + { + get + { + return _selectedList.Count; + } + } + + public virtual Object SyncRoot + { + get + { + return _selectedList.SyncRoot; + } + } + + public virtual bool IsSynchronized + { + get + { + return _selectedList.IsSynchronized; + } + } + + public virtual System.Collections.IEnumerator GetEnumerator() + { + return _selectedList.GetEnumerator(); + } + + public virtual Object this[int index] + { + get + { + return _selectedList[index]; + } + set + { + _selectedList[index] = value; + } + } + } +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/cbean/OrderByBean.vmnet =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/cbean/OrderByBean.vmnet 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/cbean/OrderByBean.vmnet 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,79 @@ + +using System; +using System.Collections; +using ${glPackageBaseCommonSqlClause}; + +namespace ${glPackageBaseCommonCBean} { + + /// + /// The condition-bean as interface. + /// Author: ${database.ClassAuthor} + /// + public interface ${glOrderByBeanInterfaceName} : ${glSelectResourceInterfaceName} { + + /// + /// The property of sql component of order-by clause. + /// + ${glOrderByClauseName} SqlComponentOfOrderByClause { get; } + + /** + * Clear order-by. + * + * @return this. (NotNull) + */ + ${glOrderByBeanInterfaceName} ClearOrderBy(); + + /** + * Ignore order-by. + * + * @return this. (NotNull) + */ + ${glOrderByBeanInterfaceName} IgnoreOrderBy(); + + /** + * Make order-by effective. + * + * @return this. (NotNull) + */ + ${glOrderByBeanInterfaceName} MakeOrderByEffective(); + + /** + * Get order-by clause. + * + * @return Order-by clause. (NotNull) + */ + String OrderByClause { get; } + + /** + * Register order-by-asc. + * + * @param columnFullName Column-full-name. ([table-name].[column-name]) (NotNull) + * @return this. (NotNull) + */ + ${glOrderByBeanInterfaceName} RegisterOrderByAsc(String columnFullName); + + /** + * Register order-by-desc. + * + * @param columnFullName Column-full-name. ([table-name].[column-name]) (NotNull) + * @return this. (NotNull) + */ + ${glOrderByBeanInterfaceName} RegisterOrderByDesc(String columnFullName); + + /** + * Reverse order-by or Override order-by asc. + * + * @param columnFullName Column-full-name. [firstColumn/secondColumn/...] (NotNull) + * @return this. (NotNull) + */ + ${glOrderByBeanInterfaceName} ReverseOrderBy_Or_OverrideOrderByAsc(String columnFullName); + + /** + * Reverse order-by or Override order-by desc. + * + * @param columnFullName Column-full-name. [firstColumn/secondColumn/...] (NotNull) + * @return this. (NotNull) + */ + ${glOrderByBeanInterfaceName} ReverseOrderBy_Or_OverrideOrderByDesc(String columnFullName); + } +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/cbean/PagingBean.vmnet =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/cbean/PagingBean.vmnet 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/cbean/PagingBean.vmnet 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,120 @@ + +using System; +using System.Collections; +using ${glPackageBaseCommonSqlClause}; + +namespace ${glPackageBaseCommonCBean} { + + /// + /// The condition-bean as interface. + /// Author: ${database.ClassAuthor} + /// + public interface ${glPagingBeanInterfaceName} : ${glFetchNarrowingBeanInterfaceName}, ${glOrderByBeanInterfaceName} { + + // ===================================================================================== + // Advance + // ======= + /// + /// Fetch first. + /// If you invoke this, your SQL returns [fetch-size] records from first. + /// + /// Fetch-size. (NotMinus & NotZero) + /// this. (NotNull) + $glPagingBeanInterfaceName FetchFirst(int fetchSize); + + /// + /// Fetch scope. + /// If you invoke this, your SQL returns [fetch-size] records from [fetch-start-index]. + /// + /// Fetch-start-index. 0 origin. (NotMinus) + /// Fetch-size. (NotMinus & NotZero) + /// this. (NotNull) + $glPagingBeanInterfaceName FetchScope(int fetchStartIndex, int fetchSize); + + /// + /// Fetch page. + /// When you invoke this, it is normally necessary to invoke 'fetchFirst()' or 'fetchScope()' ahead of that. + /// But you also can use default-fetch-size without invoking 'fetchFirst()' or 'fetchScope()'. + /// If you invoke this, your SQL returns [fetch-size] records from [fetch-start-index] calculated by [fetch-page-number]. + /// + /// Fetch-page-number. 1 origin. (NotMinus & NotZero) + /// this. (NotNull) + ${glPagingBeanInterfaceName} FetchPage(int fetchPageNumber); + + // ===================================================================================== + // Property + // ======== + /** + * Get fetch start index. + * + * @return Fetch start index. + */ + int FetchStartIndex { get; } + + /** + * Get fetch size. + * + * @return Fetch size. + */ + int FetchSize { get; } + + /** + * Get fetch page number. + * + * @return Fetch page number. + */ + int FetchPageNumber { get; } + + /** + * Get page start index. + * + * @return Page start index. 0 origin. (NotMinus) + */ + int PageStartIndex { get; } + + /** + * Get page end index. + * + * @return Page end index. 0 origin. (NotMinus) + */ + int PageEndIndex { get; } + + /** + * Is fetch scope effective? + * + * @return Determination. + */ + bool IsFetchScopeEffective { get; } + + // ===================================================================================== + // Clause + // ====== + /** + * Get select-hint. + * + * @return Select-hint. (NotNull) + */ + String SelectHint { get; } + + /** + * Get from-hint. + * + * @return From-hint. (NotNull) + */ + String FromHint { get; } + + /** + * Get sql-suffix. + * + * @return Sql-suffix. (NotNull) + */ + String SqlSuffix { get; } + + /** + * Get order-by clause. + * + * @return Order-by clause. (NotNull) + */ + new String OrderByClause { get; } + } +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/cbean/PagingResultBean.vmnet =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/cbean/PagingResultBean.vmnet 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/cbean/PagingResultBean.vmnet 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,365 @@ +#set ($myClassName = "${glPagingResultBeanName}") + +using System; +using System.Text; + +using ${glPackageBaseCommonSqlClause}; + +namespace ${glPackageBaseCommonCBean} { + + /// + /// The paging-result-bean of ${myClassName}. + /// Author: ${database.ClassAuthor} + /// + [System.Serializable] + public class ${myClassName} : ${glListResultBeanName} { + + // ===================================================================================== + // Attribute + // ========= + #region Attribute + + /// The value of all page size. + protected int _pageSize; + + /// The value of current page number. + protected int _currentPageNumber; + + /// The value of page-group size. + protected int _pageGroupSize = 0; + + /// The value of page-range size. + protected int _pageRangeSize = 0; + + #endregion + + // ===================================================================================== + // Constructor + // =========== + #region Constructor + + /// + /// Constructor. + /// + public ${myClassName}() { + } + + #endregion + + // ===================================================================================== + // Property + // ======== + #region Property + + /// + /// The property of page size. + /// + public int PageSize { + get { return _pageSize; } + set { _pageSize = value; } + } + + /// + /// The property of current page number. + /// + public int CurrentPageNumber { + get { return _currentPageNumber; } + set { _currentPageNumber = value; } + } + + /// + /// The property of all page count. + /// + public int AllPageCount { + get { return CalculateAllPageCount(_allRecordCount, _pageSize); } + } + + /** + * Get the value of currentStartRecordNumber. + * + * @return The value of currentStartRecordNumber. + */ + public int CurrentStartRecordNumber { + get { return CalculateCurrentStartRecordNumber(_currentPageNumber, _pageSize); } + } + + /** + * Get the value of currentEndRecordNumber. + * + * @return The value of currentEndRecordNumber. + */ + public int CurrentEndRecordNumber { + get { return CalculateCurrentEndRecordNumber(_currentPageNumber, _pageSize); } + } + + /// + /// The property of page-group size. + /// + public int PageGroupSize { + get { return _pageGroupSize; } + set { _pageGroupSize = value; } + } + + /// + /// The property of range-group size. + /// + public int PageRangeSize { + get { return _pageRangeSize; } + set { _pageRangeSize = value; } + } + + #endregion + + // ===================================================================================== + // Calculate + // ========= + #region Calculate + + // ------------------------------------------- + // Page + // ---- + /** + * Calculate all page count. + * + * @param allRecordCount All record count. + * @param pageSize Fetch-size. + * @returns All page count. + */ + protected int CalculateAllPageCount(int allRecordCount, int pageSize) { + if (allRecordCount == 0) { + return 1; + } + int pageCountBase = (allRecordCount / pageSize); + if (allRecordCount % pageSize > 0) { + pageCountBase++; + } + return pageCountBase; + } + + protected int CalculateCurrentStartRecordNumber(int currentPageNumber, int pageSize) { + return ((currentPageNumber - 1) * pageSize) + 1; + } + + protected int CalculateCurrentEndRecordNumber(int currentPageNumber, int pageSize) { + return CalculateCurrentStartRecordNumber(currentPageNumber, pageSize) + _selectedList.Count - 1; + } + + /// + /// Is existing previous page? + /// Using values are currentPageNumber. + /// + /// Determination. + public bool IsExistPrePage() { + return (_allRecordCount > 0 && _currentPageNumber > 1); + } + + /// + /// Is existing next page? + /// Using values are currentPageNumber and allPageCount. + /// + /// Determination. + public bool IsExistNextPage() { + return (_allRecordCount > 0 && _currentPageNumber < this.AllPageCount); + } + + // ------------------------------------------- + // Page Group + // ---------- + /// + /// Calculate current page-group start-page-number. + /// Using values are currentPageNumber and pageGroupSize. + /// + /// Current page-group start-page-number. + public int CalculateCurrentPageGroupStartPageNumber() { + int pageGroupSize = _pageGroupSize; + if (pageGroupSize == 0) { + String msg = "The pageGroupSize should be greater than 1. But the value is zero."; + msg = msg + " pageGroupSize=" + pageGroupSize; + throw new SystemException(msg); + } + if (pageGroupSize == 1) { + String msg = "The pageGroupSize should be greater than 1. But the value is one."; + msg = msg + " pageGroupSize=" + pageGroupSize; + throw new SystemException(msg); + } + int currentPageNumber = _currentPageNumber; + int currentPageGroupNumber = (currentPageNumber / pageGroupSize); + if ((currentPageNumber % pageGroupSize) == 0) + { + currentPageGroupNumber--; + } + int currentPageGroupStartPageNumber = (pageGroupSize * currentPageGroupNumber) + 1; + if (!(currentPageNumber >= currentPageGroupStartPageNumber)) { + String msg = "currentPageNumber should be greater equal currentPageGroupStartPageNumber. But:"; + msg = msg + " currentPageNumber=" + currentPageNumber; + msg = msg + " currentPageGroupStartPageNumber=" + currentPageGroupStartPageNumber; + throw new SystemException(msg); + } + return currentPageGroupStartPageNumber; + } + + /// + /// Get current page-group page-number-list. + /// Using values are currentPageNumber and pageGroupSize and allPageCount. + /// + /// Current page-group page-number-list. + public System.Collections.IList GetCurrentPageGroupPageNumberList() { + int allPageCount = this.AllPageCount; + int currentPageGroupStartPageNumber = CalculateCurrentPageGroupStartPageNumber(); + if (!(currentPageGroupStartPageNumber > 0)) { + String msg = "currentPageGroupStartPageNumber should be greater than 0. {> 0} But:"; + msg = msg + " currentPageGroupStartPageNumber=" + currentPageGroupStartPageNumber; + throw new SystemException(msg); + } + int nextPageGroupStartPageNumber = currentPageGroupStartPageNumber + _pageGroupSize; + + System.Collections.IList resultList = new System.Collections.ArrayList(); + for (int i=currentPageGroupStartPageNumber; i < nextPageGroupStartPageNumber && i <= allPageCount; i++) { + resultList.Add(i); + } + return resultList; + } + + /// + /// Get current page-group page-number-array. + /// Using values are currentPageNumber and pageGroupSize and allPageCount. + /// + /// Current page-group page-number-array. + public int[] GetCurrentPageGroupPageNumberArray() { + return ConvertListToIntArray(GetCurrentPageGroupPageNumberList()); + } + + /// + /// Is existing previous page-group? + /// Using values are currentPageNumber and pageGroupSize. + /// + /// Determination. + public bool IsExistPrePageGroup() { + return (_currentPageNumber > _pageGroupSize); + } + + /// + /// Is existing next page-group? + /// Using values are currentPageNumber and pageGroupSize and allPageCount. + /// + /// Determination. + public bool IsExistNextPageGroup() { + int currentPageGroupStartPageNumber = CalculateCurrentPageGroupStartPageNumber(); + if (!(currentPageGroupStartPageNumber > 0)) { + String msg = "currentPageGroupStartPageNumber should be greater than 0. {> 0} But:"; + msg = msg + " currentPageGroupStartPageNumber=" + currentPageGroupStartPageNumber; + throw new SystemException(msg); + } + int nextPageGroupStartPageNumber = currentPageGroupStartPageNumber + _pageGroupSize; + return (nextPageGroupStartPageNumber <= this.AllPageCount); + } + + // ------------------------------------------- + // Page Range + // ---------- + /// + /// Get current page-range page-number-list. + /// Using values are currentPageNumber and pageRangeSize and allPageCount. + /// + /// Current page-range page-number-list. + public System.Collections.IList GetCurrentPageRangePageNumberList() { + int pageRangeSize = _pageRangeSize; + if (pageRangeSize == 0) { + String msg = "The pageRangeSize should be greater than 1. But the value is zero."; + msg = msg + " pageRangeSize=" + pageRangeSize; + throw new SystemException(msg); + } + int allPageCount = this.AllPageCount; + int currentPageNumber = _currentPageNumber; + + System.Collections.IList resultList = new System.Collections.ArrayList(); + + for (int i = currentPageNumber - pageRangeSize; i < currentPageNumber; i++) { + if (i < 1) { + continue; + } + resultList.Add(i); + } + + resultList.Add(currentPageNumber); + + int endPageNumber = (currentPageNumber + pageRangeSize); + for (int i=currentPageNumber+1 ; i <= endPageNumber; i++) { + if (i > allPageCount) { + break; + } + resultList.Add(i); + } + return resultList; + } + + /// + /// Get current page-range page-number-array. + /// Using values are currentPageNumber and pageRangeSize and allPageCount. + /// + /// Current page-range page-number-array. + public int[] GetCurrentPageRangePageNumberArray() { + return ConvertListToIntArray(GetCurrentPageRangePageNumberList()); + } + + /// + /// Get current page-range page-number-array. + /// Using values are currentPageNumber and pageRangeSize and allPageCount. + /// + /// Current page-range page-number-array. + protected int[] ConvertListToIntArray(System.Collections.IList ls) { + int[] resultArray = new int[ls.Count]; + ls.CopyTo(resultArray, 0); + return resultArray; + } + + /// + /// Is existing previous page-range? + /// Using values are currentPageNumber and pageGroupSize. + /// + /// Determination. + public bool IsExistPrePageRange() { + int[] array = GetCurrentPageRangePageNumberArray(); + if (array.Length == 0) { + return false; + } + return array[0] > 1; + } + + /// + /// Is existing next page-range? + /// Using values are currentPageNumber and pageGroupSize and allPageCount. + /// + /// Determination. + public bool IsExistNextPageRange() { + int[] array = GetCurrentPageRangePageNumberArray(); + if (array.Length == 0) { + return false; + } + return array[array.Length-1] < this.AllPageCount; + } + + #endregion + + // ===================================================================================== + // Basic-Override Method + // ===================== + /// + /// This method overrides the method that is declared at super. + /// + /// View-string of all-columns value. + public override String ToString() { + StringBuilder sb = new StringBuilder(); + + sb.Append(this.CurrentPageNumber).Append("/").Append(this.AllPageCount); + sb.Append(" ").Append(this.AllRecordCount); + sb.Append(" listSize=").Append((this.SelectedList != null ? ""+this.SelectedList.Count : null)); + sb.Append(" pageSize=").Append(this.PageSize); + sb.Append(" page:{").Append(IsExistPrePage()).Append("/").Append(IsExistNextPage()).Append("}"); + sb.Append(" groupSize=").Append(this.PageGroupSize); + sb.Append(" rangeSize=").Append(this.PageRangeSize); + + return sb.ToString(); + } + } +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/cbean/SelectResource.vmnet =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/cbean/SelectResource.vmnet 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/cbean/SelectResource.vmnet 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,14 @@ + +using System; +using System.Collections; +using ${glPackageBaseCommonSqlClause}; + +namespace ${glPackageBaseCommonCBean} { + + /// + /// The select-resource as marker-interface. + /// Author: ${database.ClassAuthor} + /// + public interface ${glSelectResourceInterfaceName} { + } +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/cbean/SimpleOrderByBean.vmnet =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/cbean/SimpleOrderByBean.vmnet 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/cbean/SimpleOrderByBean.vmnet 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,110 @@ + +using System; +using System.Collections; +using ${glPackageBaseCommonSqlClause}; + +namespace ${glPackageBaseCommonCBean} { + + /// + /// The order-by-bean as simple. + /// + /// This bean is supported: + /// o OrderBy + /// + /// - ${glSimpleOrderByBeanName} pb = new ${glSimpleOrderByBeanName}(); + /// - pb.FetchFirst(1); + /// - pb.RegisterOrderByAsc("BOOK_ID"); + /// - ... + /// + /// Author: ${database.ClassAuthor} + /// + public class ${glSimpleOrderByBeanName} : ${glOrderByBeanInterfaceName} { + + // ===================================================================================== + // Attribute + // ========= + /** SQL clause instance. */ + protected readonly ${glSqlClauseName} _sqlClause; + + // ===================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + public ${glSimpleOrderByBeanName}() { + _sqlClause = new ${glSqlClauseName}${database.DaoGenDbName}("Dummy"); + } + + protected ${glSqlClauseName} SqlClause { + get { return _sqlClause; } + } + + /** + * Get order-by clause. + * + * @return Order-by clause. (NotNull) + */ + public String OrderByClause { get { return this.SqlClause.GetOrderByClause(); } } + + // ===================================================================================== + // OrderBy + // ======= + /// + /// The property of sql component of order-by clause. + /// + public ${glOrderByClauseName} SqlComponentOfOrderByClause { + get { return this.SqlClause.GetSqlComponentOfOrderByClause(); } + } + + /** + * ${database.ImplementComment} + * + * @return this. (NotNull) + */ + public ${glOrderByBeanInterfaceName} ClearOrderBy() { + this.SqlClause.ClearOrderBy(); + return this; + } + + /** + * ${database.ImplementComment} + * + * @return this. (NotNull) + */ + public ${glOrderByBeanInterfaceName} IgnoreOrderBy() { + this.SqlClause.IgnoreOrderBy(); + return this; + } + + /** + * ${database.ImplementComment} + * + * @return this. (NotNull) + */ + public ${glOrderByBeanInterfaceName} MakeOrderByEffective() { + this.SqlClause.MakeOrderByEffective(); + return this; + } + + public ${glOrderByBeanInterfaceName} RegisterOrderByAsc(String orderByProperty) { + this.SqlClause.RegisterOrderBy(orderByProperty, null, true); + return this; + } + + public ${glOrderByBeanInterfaceName} RegisterOrderByDesc(String orderByProperty) { + this.SqlClause.RegisterOrderBy(orderByProperty, null, false); + return this; + } + + public ${glOrderByBeanInterfaceName} ReverseOrderBy_Or_OverrideOrderByAsc(String orderByProperty) { + this.SqlClause.ReverseOrderBy_Or_OverrideOrderBy(orderByProperty, null, true); + return this; + } + + public ${glOrderByBeanInterfaceName} ReverseOrderBy_Or_OverrideOrderByDesc(String orderByProperty) { + this.SqlClause.ReverseOrderBy_Or_OverrideOrderBy(orderByProperty, null, false); + return this; + } + } +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/cbean/SimplePagingBean.vmnet =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/cbean/SimplePagingBean.vmnet 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/cbean/SimplePagingBean.vmnet 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,272 @@ + +using System; +using System.Collections; +using ${glPackageBaseCommonSqlClause}; + +namespace ${glPackageBaseCommonCBean} { + + /// + /// The condition-bean as interface. + /// + /// This bean is supported: + /// o FetchNarrowing + /// o Paging + /// o OrderBy + /// + /// - ${glSimplePagingBeanName} pb = new ${glSimplePagingBeanName}(); + /// - pb.FetchFirst(1); + /// - pb.RegisterOrderByAsc("BOOK_ID"); + /// - ... + /// + /// Author: ${database.ClassAuthor} + /// + public class ${glSimplePagingBeanName} : ${glPagingBeanInterfaceName} { + + // ===================================================================================== + // Attribute + // ========= + /** SQL clause instance. */ + protected readonly ${glSqlClauseName} _sqlClause; + + // ===================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + public ${glSimplePagingBeanName}() { + _sqlClause = new ${glSqlClauseName}${database.DaoGenDbName}("Dummy"); + } + + protected ${glSqlClauseName} SqlClause { + get { return _sqlClause; } + } + + // ===================================================================================== + // Paging + // ====== + /// + /// Fetch first. + /// If you invoke this, your SQL returns [fetch-size] records from first. + /// + /// Fetch-size. (NotMinus & NotZero) + /// this. (NotNull) + public ${glPagingBeanInterfaceName} FetchFirst(int fetchSize) { + this.SqlClause.FetchFirst(fetchSize); + return this; + } + + /// + /// Fetch scope. + /// If you invoke this, your SQL returns [fetch-size] records from [fetch-start-index]. + /// + /// Fetch-start-index. 0 origin. (NotMinus) + /// Fetch-size. (NotMinus & NotZero) + /// this. (NotNull) + public ${glPagingBeanInterfaceName} FetchScope(int fetchStartIndex, int fetchSize) { + this.SqlClause.FetchScope(fetchStartIndex, fetchSize); + return this; + } + + /// + /// Fetch page. + /// When you invoke this, it is normally necessary to invoke 'fetchFirst()' or 'fetchScope()' ahead of that. + /// But you also can use default-fetch-size without invoking 'fetchFirst()' or 'fetchScope()'. + /// If you invoke this, your SQL returns [fetch-size] records from [fetch-start-index] calculated by [fetch-page-number]. + /// + /// Fetch-page-number. 1 origin. (NotMinus & NotZero) + /// this. (NotNull) + public ${glPagingBeanInterfaceName} FetchPage(int fetchPageNumber) { + this.SqlClause.FetchPage(fetchPageNumber); + return this; + } + + public int FetchStartIndex { + get { return this.SqlClause.FetchStartIndex; } + } + + public int FetchSize { + get { return this.SqlClause.FetchSize; } + } + + public int FetchPageNumber { + get { return this.SqlClause.FetchPageNumber; } + } + + /** + * Get page start index. + * + * @return Page start index. 0 origin. (NotMinus) + */ + public int PageStartIndex { + get { return this.SqlClause.PageStartIndex; } + } + + /** + * Get page end index. + * + * @return Page end index. 0 origin. (NotMinus) + */ + public int PageEndIndex { + get { return this.SqlClause.PageEndIndex; } + } + + /** + * Is fetch scope effective? + * + * @return Determination. + */ + public bool IsFetchScopeEffective { + get { return this.SqlClause.IsFetchScopeEffective; } + } + + // ===================================================================================== + // FetchNarrowing + // ============== + /** + * ${database.ImplementComment} + * + * @return Fetch-narrowing start-index. + */ + public int FetchNarrowingSkipStartIndex { get { return this.SqlClause.FetchNarrowingSkipStartIndex; } } + + /** + * ${database.ImplementComment} + * + * @return Fetch-narrowing size. + */ + public int FetchNarrowingLoopCount { get { return this.SqlClause.FetchNarrowingLoopCount; } } + + /** + * ${database.ImplementComment} + * + * @return Determination. + */ + public bool IsFetchNarrowingSkipStartIndexEffective { get { return !this.SqlClause.IsFetchStartIndexSupported; } } + + /** + * ${database.ImplementComment} + * + * @return Determination. + */ + public bool IsFetchNarrowingLoopCountEffective { get { return !this.SqlClause.IsFetchSizeSupported; } } + + /** + * ${database.ImplementComment} + * + * @return Determiantion. + */ + public bool IsFetchNarrowingEffective { get { return this.SqlClause.IsFetchNarrowingEffective; } } + + + // ===================================================================================== + // Clause + // ====== + /** + * Get select-hint. + * + * @return Select-hint. (NotNull) + */ + public String SelectHint { get { return this.SqlClause.GetSelectHint(); } } + + /** + * Get from-base-table-hint. {select * from table [from-base-table-hint] where ...} + * + * @return From-base-table-hint. (NotNull) + */ + public String FromBaseTableHint { get { return this.SqlClause.GetFromBaseTableHint(); } } + + /** + * Get from-hint. + * + * @return From-hint. (NotNull) + */ + public String FromHint { get { return this.SqlClause.GetFromHint(); } } + + /** + * Get sql-suffix. + * + * @return Sql-suffix. (NotNull) + */ + public String SqlSuffix { get { return this.SqlClause.GetSqlSuffix(); } } + + /** + * Get order-by clause. + * + * @return Order-by clause. (NotNull) + */ + public String OrderByClause { get { return this.SqlClause.GetOrderByClause(); } } + + // ===================================================================================== + // OrderBy + // ======= + /// + /// The property of sql component of order-by clause. + /// + public ${glOrderByClauseName} SqlComponentOfOrderByClause { + get { return this.SqlClause.GetSqlComponentOfOrderByClause(); } + } + + /** + * ${database.ImplementComment} + * + * @return this. (NotNull) + */ + public ${glOrderByBeanInterfaceName} ClearOrderBy() { + this.SqlClause.ClearOrderBy(); + return this; + } + + /** + * ${database.ImplementComment} + * + * @return this. (NotNull) + */ + public ${glOrderByBeanInterfaceName} IgnoreOrderBy() { + this.SqlClause.IgnoreOrderBy(); + return this; + } + + /** + * ${database.ImplementComment} + * + * @return this. (NotNull) + */ + public ${glOrderByBeanInterfaceName} MakeOrderByEffective() { + this.SqlClause.MakeOrderByEffective(); + return this; + } + + /** + * Register order-by-asc. + * + * @param columnFullName Column-full-name. ([table-name].[column-name]) (NotNull) + * @return this. (NotNull) + */ + public ${glOrderByBeanInterfaceName} RegisterOrderByAsc(String columnFullName) { + this.SqlClause.RegisterOrderBy(columnFullName, null, true); + return this; + } + + /** + * Register order-by-desc. + * + * @param columnFullName Column-full-name. ([table-name].[column-name]) (NotNull) + * @return this. (NotNull) + */ + public ${glOrderByBeanInterfaceName} RegisterOrderByDesc(String columnFullName) { + this.SqlClause.RegisterOrderBy(columnFullName, null, false); + return this; + } + + public ${glOrderByBeanInterfaceName} ReverseOrderBy_Or_OverrideOrderByAsc(String columnFullName) { + this.SqlClause.ReverseOrderBy_Or_OverrideOrderBy(columnFullName, null, true); + return this; + } + + public ${glOrderByBeanInterfaceName} ReverseOrderBy_Or_OverrideOrderByDesc(String columnFullName) { + this.SqlClause.ReverseOrderBy_Or_OverrideOrderBy(columnFullName, null, false); + return this; + } + } +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/cbean/ckey/ConditionKey.vmnet =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/cbean/ckey/ConditionKey.vmnet 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/cbean/ckey/ConditionKey.vmnet 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,227 @@ +#set ($myClassName = "${glConditionKeyName}") + +using System; +using System.Collections; +using ${glPackageBaseCommonCValue}; + +namespace ${glPackageBaseCommonCKey} { + + /// + /// The abstract class of condition-key. + /// Author: ${database.ClassAuthor} + /// + public abstract class ${myClassName} { + + /** Mark of replaced value. */ + public static readonly String MARK_OF_REPLACED_VALUE = "ReplacedValue"; + + /** The condition key of equal. */ + public static readonly ${myClassName} CK_EQUAL = new ${myClassName}Equal(); + + /** The condition key of notEqual. */ + public static readonly ${myClassName} CK_NOT_EQUAL = new ${myClassName}NotEqual(); + + /** The condition key of greaterThan. */ + public static readonly ${myClassName} CK_GREATER_THAN = new ${myClassName}GreaterThan(); + + /** The condition key of lessrThan. */ + public static readonly ${myClassName} CK_LESS_THAN = new ${myClassName}LessThan(); + + /** The condition key of greaterEqual. */ + public static readonly ${myClassName} CK_GREATER_EQUAL = new ${myClassName}GreaterEqual(); + + /** The condition key of lessEqual. */ + public static readonly ${myClassName} CK_LESS_EQUAL = new ${myClassName}LessEqual(); + + /** The condition key of prefixSearch. */ + public static readonly ${myClassName} CK_PREFIX_SEARCH = new ${myClassName}PrefixSearch(); + + /** The condition key of inScope. */ + public static readonly ${myClassName} CK_IN_SCOPE = new ${myClassName}InScope(); + + /** The condition key of notInScope. */ + public static readonly ${myClassName} CK_NOT_IN_SCOPE = new ${myClassName}NotInScope(); + + /** The condition key of isNull. */ + public static readonly ${myClassName} CK_IS_NULL = new ${myClassName}IsNull(); + + /** The condition key of isNotNull. */ + public static readonly ${myClassName} CK_IS_NOT_NULL = new ${myClassName}IsNotNull(); + + /** Dummy-object for IsNull and IsNotNull and so on... */ + protected static readonly Object DUMMY_OBJECT = new Object(); + + /** Condition-key. */ + protected String _conditionKey; + + /** Operand. */ + protected String _operand; + + /** + * Get condition-key. + * + * @return Condition-key. + */ + public String GetConditionKey() { + // Because initial charactor of property name is capital in dotNet world. + return (_conditionKey != null ? _conditionKey.Substring(0, 1).ToUpper() + _conditionKey.Substring(1) : null); + } + + /** + * Get operand. + * + * @return Operand. + */ + public String GetOperand() { + return _operand; + } + + /** + * Is valid registration? + * + * @param conditionValue Condition value. (NotNull) + * @param value Value. (NotNull) + * @param callerName Caller name. (NotNull) + * @return Determination. + */ + abstract public bool IsValidRegistration(${glConditionValueName} conditionValue, Object value, String callerName); + + /** + * Add where clause. + * + * @param conditionList Condition list. (NotNull) + * @param columnName Column name. (NotNull) + * @param value Condition value. (NotNull) + * @return this. + */ + public ${myClassName} AddWhereClause(System.Collections.IList conditionList, String columnName, ${glConditionValueName} value) { + if (value == null) { + String msg = "Argument[value] must not be null:"; + throw new ArgumentNullException(msg + " value=" + value + " this.ToString()=" + ToString()); + } + DoAddWhereClause(conditionList, columnName, value); + return this; + } + + /** + * Do add where clause. + * + * @param conditionList Condition list. (NotNull) + * @param columnName Column name. (NotNull) + * @param value Condition value. (NotNull) + */ + abstract protected void DoAddWhereClause(System.Collections.IList conditionList, String columnName, ${glConditionValueName} value); + + /** + * Setup condition value. + * + * @param conditionValue Condition value. (NotNull) + * @param value Value. (Nullable) + * @param location Location. (Nullable) + * @return Condition value. (The same as argument[conditionValue]) (NotNull) + */ + public ${glConditionValueName} SetupConditionValue(${glConditionValueName} conditionValue, Object value, String location) { + if (conditionValue == null) { + String msg = "Argument[conditionValue] must not be null:"; + throw new ArgumentNullException(msg + " value=" + value + " this.ToString()=" + ToString()); + } + DoSetupConditionValue(conditionValue, value, location); + return conditionValue; + } + + /** + * Do setup condition value. + * + * @param conditionValue Condition value. (NotNull) + * @param value Value. (NotNull) + * @param location Location. (NotNull) + */ + abstract protected void DoSetupConditionValue(${glConditionValueName} conditionValue, Object value, String location); + + /** + * Build bind clause. (for s2dao) + * + * @param columnName Column name. (NotNull) + * @param location Location. (NotNull) + * @return Bind clause. (NotNull) + */ + protected String BuildBindClause(String columnName, String location) { + return columnName + " " + GetOperand() + " " + "/*dto." + location + "*/null"; + } + + /** + * Build bind clause. (for s2dao) + * + * @param columnName Column name. (NotNull) + * @param location Location. (NotNull) + * @param dummyValue Dummy value. (NotNull) + * @return Bind clause. (NotNull) + */ + protected String BuildBindClause(String columnName, String location, String dummyValue) { + return columnName + " " + GetOperand() + " " + "/*dto." + location + "*/" + dummyValue; + } + + /** + * Build clause without value. + * + * @param columnName Column name. (NotNull) + * @return Clause without value. (NotNull) + */ + protected String BuildClauseWithoutValue(String columnName) { + return columnName + " " + GetOperand(); + } + + /** + * Get wild-card. + * + * @return Wild-card. + */ + protected String GetWildCard() { + return "${database.WildCard}"; + } + + protected bool isNullableTypeNull(Object obj) { + if (obj != null && obj is Nullables.INullableType && !((Nullables.INullableType)obj).HasValue) { + return true; + } else { + return false; + } + } + + + /** + * ${database.OverrideComment} + * Returns hash-code of this condition-key string. + * + * @return HashCode. + */ + public override int GetHashCode() { + return GetConditionKey().GetHashCode(); + } + + /** + * ${database.OverrideComment} + * If the condition-key of the other is same as this one, returns true. + * + * @param other Other entity. (Nullable) + * @return Comparing result. If other is null, returns false. + */ + public override bool Equals(Object other) { + if (other is ${myClassName}) { + if (this.GetConditionKey().Equals(((${myClassName})other).GetConditionKey())) { + return true; + } + } + return false; + } + + /** + * ${database.OverrideComment} + * + * @return View-string of condition key information. + */ + public override String ToString() { + return "${myClassName}: " + GetConditionKey() + " " + GetOperand() + " wild-card=[" + GetWildCard() + "]"; + } + } +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/cbean/ckey/ConditionKey_equal.vmnet =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/cbean/ckey/ConditionKey_equal.vmnet 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/cbean/ckey/ConditionKey_equal.vmnet 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,77 @@ +#set ($myClassName = "${glConditionKeyName}Equal") + +using System; +using System.Collections; +using System.Reflection; +using ${glPackageBaseCommonCValue}; + +namespace ${glPackageBaseCommonCKey} { + + /// + /// The condition-key of equal. + /// Author: ${database.ClassAuthor} + /// + public class ${myClassName} : ${glConditionKeyName} { + + /** Log-instance. */ + private static readonly log4net.ILog _log = log4net.LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); + + /** + * Constructor. + */ + public ${myClassName}() { + _conditionKey = "equal"; + _operand = "="; + } + + /** + * Is valid registration? + * + * @param conditionValue Condition value. (NotNull) + * @param value Value. (NotNull) + * @param callerName Caller name. (NotNull) + * @return Determination. + */ + public override bool IsValidRegistration(${glConditionValueName} conditionValue, Object value, String callerName) { + if (value == null || isNullableTypeNull(value)) { + return false; + } + Object valueObject = conditionValue.Equal; + if (valueObject != null && !isNullableTypeNull(valueObject) && valueObject.Equals(value)) { + _log.Warn("The value has already registered at " + callerName + ": " + valueObject + " = " + value); + return false; + } + return true; + } + + /** + * This method implements super#doAddWhereClause(). + * + * @param conditionList Condition list. (NotNull) + * @param columnName Column name. (NotNull) + * @param value Condition value. (NotNull) + */ + protected override void DoAddWhereClause(System.Collections.IList conditionList, String columnName, ${glConditionValueName} value) { + if (value.Equal == null) { + return; + } + Object valueObject = value.Equal; + if (isNullableTypeNull(valueObject)) { + return; + } + conditionList.Add(BuildBindClause(columnName, value.GetEqualLocation())); + } + + /** + * This method implements super#doSetupConditionValue(). + * + * @param conditionValue Condition value. (NotNull) + * @param value Value. (NotNull) + * @param location Location. (NotNull) + */ + protected override void DoSetupConditionValue(${glConditionValueName} conditionValue, Object value, String location) { + conditionValue.Equal = value; + conditionValue.SetEqualLocation(location); + } + } +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/cbean/ckey/ConditionKey_greaterEqual.vmnet =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/cbean/ckey/ConditionKey_greaterEqual.vmnet 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/cbean/ckey/ConditionKey_greaterEqual.vmnet 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,77 @@ +#set ($myClassName = "${glConditionKeyName}GreaterEqual") + +using System; +using System.Collections; +using System.Reflection; +using ${glPackageBaseCommonCValue}; + +namespace ${glPackageBaseCommonCKey} { + + /// + /// The condition-key of greaterEqual. + /// Author: ${database.ClassAuthor} + /// + public class ${myClassName} : ${glConditionKeyName} { + + /** Log-instance. */ + private static readonly log4net.ILog _log = log4net.LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); + + /** + * Constructor. + */ + public ${myClassName}() { + _conditionKey = "greaterEqual"; + _operand = ">="; + } + + /** + * Is valid registration? + * + * @param conditionValue Condition value. (NotNull) + * @param value Value. (NotNull) + * @param callerName Caller name. (NotNull) + * @return Determination. + */ + public override bool IsValidRegistration(${glConditionValueName} conditionValue, Object value, String callerName) { + if (value == null || isNullableTypeNull(value)) { + return false; + } + Object valueObject = conditionValue.GreaterEqual; + if (valueObject != null && !isNullableTypeNull(valueObject) && valueObject.Equals(value)) { + _log.Warn("The value has already registered at " + callerName + ": " + valueObject + " = " + value); + return false; + } + return true; + } + + /** + * This method implements super#doAddWhereClause(). + * + * @param conditionList Condition list. (NotNull) + * @param columnName Column name. (NotNull) + * @param value Condition value. (NotNull) + */ + protected override void DoAddWhereClause(System.Collections.IList conditionList, String columnName, ${glConditionValueName} value) { + if (value.GreaterEqual == null) { + return; + } + Object valueObject = value.GreaterEqual; + if (isNullableTypeNull(valueObject)) { + return; + } + conditionList.Add(BuildBindClause(columnName, value.GetGreaterEqualLocation())); + } + + /** + * This method implements super#doSetupConditionValue(). + * + * @param conditionValue Condition value. (NotNull) + * @param value Value. (NotNull) + * @param location Location. (NotNull) + */ + protected override void DoSetupConditionValue(${glConditionValueName} conditionValue, Object value, String location) { + conditionValue.GreaterEqual = value; + conditionValue.SetGreaterEqualLocation(location); + } + } +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/cbean/ckey/ConditionKey_greaterThan.vmnet =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/cbean/ckey/ConditionKey_greaterThan.vmnet 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/cbean/ckey/ConditionKey_greaterThan.vmnet 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,77 @@ +#set ($myClassName = "${glConditionKeyName}GreaterThan") + +using System; +using System.Collections; +using System.Reflection; +using ${glPackageBaseCommonCValue}; + +namespace ${glPackageBaseCommonCKey} { + + /// + /// The condition-key of greaterThan. + /// Author: ${database.ClassAuthor} + /// + public class ${myClassName} : ${glConditionKeyName} { + + /** Log-instance. */ + private static readonly log4net.ILog _log = log4net.LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); + + /** + * Constructor. + */ + public ${myClassName}() { + _conditionKey = "greaterThan"; + _operand = ">"; + } + + /** + * Is valid registration? + * + * @param conditionValue Condition value. (NotNull) + * @param value Value. (NotNull) + * @param callerName Caller name. (NotNull) + * @return Determination. + */ + public override bool IsValidRegistration(${glConditionValueName} conditionValue, Object value, String callerName) { + if (value == null || isNullableTypeNull(value)) { + return false; + } + Object valueObject = conditionValue.GreaterThan; + if (valueObject != null && !isNullableTypeNull(valueObject) && valueObject.Equals(value)) { + _log.Warn("The value has already registered at " + callerName + ": " + valueObject + " = " + value); + return false; + } + return true; + } + + /** + * This method implements super#doAddWhereClause(). + * + * @param conditionList Condition list. (NotNull) + * @param columnName Column name. (NotNull) + * @param value Condition value. (NotNull) + */ + protected override void DoAddWhereClause(System.Collections.IList conditionList, String columnName, ${glConditionValueName} value) { + if (value.GreaterThan == null) { + return; + } + Object valueObject = value.GreaterThan; + if (isNullableTypeNull(valueObject)) { + return; + } + conditionList.Add(BuildBindClause(columnName, value.GetGreaterThanLocation())); + } + + /** + * This method implements super#doSetupConditionValue(). + * + * @param conditionValue Condition value. (NotNull) + * @param value Value. (NotNull) + * @param location Location. (NotNull) + */ + protected override void DoSetupConditionValue(${glConditionValueName} conditionValue, Object value, String location) { + conditionValue.GreaterThan = value; + conditionValue.SetGreaterThanLocation(location); + } + } +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/cbean/ckey/ConditionKey_inScope.vmnet =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/cbean/ckey/ConditionKey_inScope.vmnet 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/cbean/ckey/ConditionKey_inScope.vmnet 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,82 @@ +#set ($myClassName = "${glConditionKeyName}InScope") + +using System; +using System.Collections; +using System.Reflection; +using ${glPackageBaseCommonCValue}; + +namespace ${glPackageBaseCommonCKey} { + + /// + /// The condition-key of inScope. + /// Author: ${database.ClassAuthor} + /// + public class ${myClassName} : ${glConditionKeyName} { + + /** + * Constructor. + */ + public ${myClassName}() { + _conditionKey = "inScope"; + _operand = "in"; + } + + /** + * Is valid registration? + * + * @param conditionValue Condition value. (NotNull) + * @param value Value. (NotNull) + * @param callerName Caller name. (NotNull) + * @return Determination. + */ + public override bool IsValidRegistration(${glConditionValueName} conditionValue, Object value, String callerName) { + if (value == null || isNullableTypeNull(value)) { + return false; + } + if (value is System.Collections.IList && ((System.Collections.IList)value).Count == 0) { + return false; + } + return true; + } + + /** + * This method implements super#doAddWhereClause(). + * + * @param conditionList Condition list. (NotNull) + * @param columnName Column name. (NotNull) + * @param value Condition value. (NotNull) + */ + protected override void DoAddWhereClause(System.Collections.IList conditionList, String columnName, ${glConditionValueName} value) { + if (value.InScope == null) { + return; + } + System.Collections.IList valueList = value.InScope; + System.Collections.IList checkedValueList = new System.Collections.ArrayList(); + foreach (Object checkTargetValue in valueList) { + if (checkTargetValue == null) { + continue; + } + if (isNullableTypeNull(checkTargetValue)) { + continue; + } + checkedValueList.Add(checkTargetValue); + } + if (checkedValueList.Count == 0) { + return; + } + conditionList.Add(BuildBindClause(columnName, value.GetInScopeLocation(), "('a1', 'a2')")); + } + + /** + * This method implements super#doSetupConditionValue(). + * + * @param conditionValue Condition value. (NotNull) + * @param value Value. (NotNull) + * @param location Location. (NotNull) + */ + protected override void DoSetupConditionValue(${glConditionValueName} conditionValue, Object value, String location) { + conditionValue.InScope = (System.Collections.IList)value; + conditionValue.SetInScopeLocation(location); + } + } +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/cbean/ckey/ConditionKey_isNotNull.vmnet =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/cbean/ckey/ConditionKey_isNotNull.vmnet 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/cbean/ckey/ConditionKey_isNotNull.vmnet 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,70 @@ +#set ($myClassName = "${glConditionKeyName}IsNotNull") + +using System; +using System.Collections; +using System.Reflection; +using ${glPackageBaseCommonCValue}; + +namespace ${glPackageBaseCommonCKey} { + + /// + /// The condition-key of isNotNull. + /// Author: ${database.ClassAuthor} + /// + public class ${myClassName} : ${glConditionKeyName} { + + /** Log-instance. */ + private static readonly log4net.ILog _log = log4net.LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); + + /** + * Constructor. + */ + public ${myClassName}() { + _conditionKey = "isNotNull"; + _operand = "is not null"; + } + + /** + * Is valid registration? + * + * @param conditionValue Condition value. (NotNull) + * @param value Value. (NotNull) + * @param callerName Caller name. (NotNull) + * @return Determination. + */ + public override bool IsValidRegistration(${glConditionValueName} conditionValue, Object value, String callerName) { + Object valueObject = conditionValue.IsNotNull; + if (valueObject != null) { + _log.Warn("The value has already registered at " + _conditionKey + ": " + valueObject + " = " + value); + return false; + } + return true; + } + + /** + * This method implements super#doAddWhereClause(). + * + * @param conditionList Condition list. (NotNull) + * @param columnName Column name. (NotNull) + * @param value Condition value. (NotNull) + */ + protected override void DoAddWhereClause(System.Collections.IList conditionList, String columnName, ${glConditionValueName} value) { + if (value.IsNotNull == null) { + return; + } + conditionList.Add(BuildClauseWithoutValue(columnName)); + } + + /** + * This method implements super#doSetupConditionValue(). + * + * @param conditionValue Condition value. (NotNull) + * @param value Value. (NotNull) + * @param location Location. (NotNull) + */ + protected override void DoSetupConditionValue(${glConditionValueName} conditionValue, Object value, String location) { + conditionValue.IsNotNull = DUMMY_OBJECT; + conditionValue.SetIsNotNullLocation(location); + } + } +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/cbean/ckey/ConditionKey_isNull.vmnet =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/cbean/ckey/ConditionKey_isNull.vmnet 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/cbean/ckey/ConditionKey_isNull.vmnet 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,70 @@ +#set ($myClassName = "${glConditionKeyName}IsNull") + +using System; +using System.Collections; +using System.Reflection; +using ${glPackageBaseCommonCValue}; + +namespace ${glPackageBaseCommonCKey} { + + /// + /// The condition-key of isNull. + /// Author: ${database.ClassAuthor} + /// + public class ${myClassName} : ${glConditionKeyName} { + + /** Log-instance. */ + private static readonly log4net.ILog _log = log4net.LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); + + /** + * Constructor. + */ + public ${myClassName}() { + _conditionKey = "isNull"; + _operand = "is null"; + } + + /** + * Is valid registration? + * + * @param conditionValue Condition value. (NotNull) + * @param value Value. (NotNull) + * @param callerName Caller name. (NotNull) + * @return Determination. + */ + public override bool IsValidRegistration(${glConditionValueName} conditionValue, Object value, String callerName) { + Object valueObject = conditionValue.IsNull; + if (valueObject != null) { + _log.Warn("The value has already registered at " + _conditionKey + ": " + valueObject + " = " + value); + return false; + } + return true; + } + + /** + * This method implements super#doAddWhereClause(). + * + * @param conditionList Condition list. (NotNull) + * @param columnName Column name. (NotNull) + * @param value Condition value. (NotNull) + */ + protected override void DoAddWhereClause(System.Collections.IList conditionList, String columnName, ${glConditionValueName} value) { + if (value.IsNull == null) { + return; + } + conditionList.Add(BuildClauseWithoutValue(columnName)); + } + + /** + * This method implements super#doSetupConditionValue(). + * + * @param conditionValue Condition value. (NotNull) + * @param value Value. (NotNull) + * @param location Location. (NotNull) + */ + protected override void DoSetupConditionValue(${glConditionValueName} conditionValue, Object value, String location) { + conditionValue.IsNull = DUMMY_OBJECT; + conditionValue.SetIsNullLocation(location); + } + } +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/cbean/ckey/ConditionKey_lessEqual.vmnet =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/cbean/ckey/ConditionKey_lessEqual.vmnet 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/cbean/ckey/ConditionKey_lessEqual.vmnet 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,77 @@ +#set ($myClassName = "${glConditionKeyName}LessEqual") + +using System; +using System.Collections; +using System.Reflection; +using ${glPackageBaseCommonCValue}; + +namespace ${glPackageBaseCommonCKey} { + + /// + /// The condition-key of lessEqual. + /// Author: ${database.ClassAuthor} + /// + public class ${myClassName} : ${glConditionKeyName} { + + /** Log-instance. */ + private static readonly log4net.ILog _log = log4net.LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); + + /** + * Constructor. + */ + public ${myClassName}() { + _conditionKey = "lessEqual"; + _operand = "<="; + } + + /** + * Is valid registration? + * + * @param conditionValue Condition value. (NotNull) + * @param value Value. (NotNull) + * @param callerName Caller name. (NotNull) + * @return Determination. + */ + public override bool IsValidRegistration(${glConditionValueName} conditionValue, Object value, String callerName) { + if (value == null || isNullableTypeNull(value)) { + return false; + } + Object valueObject = conditionValue.LessEqual; + if (valueObject != null && !isNullableTypeNull(valueObject) && valueObject.Equals(value)) { + _log.Warn("The value has already registered at " + callerName + ": " + valueObject + " = " + value); + return false; + } + return true; + } + + /** + * This method implements super#doAddWhereClause(). + * + * @param conditionList Condition list. (NotNull) + * @param columnName Column name. (NotNull) + * @param value Condition value. (NotNull) + */ + protected override void DoAddWhereClause(System.Collections.IList conditionList, String columnName, ${glConditionValueName} value) { + if (value.LessEqual == null) { + return; + } + Object valueObject = value.LessEqual; + if (isNullableTypeNull(valueObject)) { + return; + } + conditionList.Add(BuildBindClause(columnName, value.GetLessEqualLocation())); + } + + /** + * This method implements super#doSetupConditionValue(). + * + * @param conditionValue Condition value. (NotNull) + * @param value Value. (NotNull) + * @param location Location. (NotNull) + */ + protected override void DoSetupConditionValue(${glConditionValueName} conditionValue, Object value, String location) { + conditionValue.LessEqual = value; + conditionValue.SetLessEqualLocation(location); + } + } +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/cbean/ckey/ConditionKey_lessThan.vmnet =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/cbean/ckey/ConditionKey_lessThan.vmnet 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/cbean/ckey/ConditionKey_lessThan.vmnet 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,77 @@ +#set ($myClassName = "${glConditionKeyName}LessThan") + +using System; +using System.Collections; +using System.Reflection; +using ${glPackageBaseCommonCValue}; + +namespace ${glPackageBaseCommonCKey} { + + /// + /// The condition-key of equal. + /// Author: ${database.ClassAuthor} + /// + public class ${myClassName} : ${glConditionKeyName} { + + /** Log-instance. */ + private static readonly log4net.ILog _log = log4net.LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); + + /** + * Constructor. + */ + public ${myClassName}() { + _conditionKey = "lessThan"; + _operand = "<"; + } + + /** + * Is valid registration? + * + * @param conditionValue Condition value. (NotNull) + * @param value Value. (NotNull) + * @param callerName Caller name. (NotNull) + * @return Determination. + */ + public override bool IsValidRegistration(${glConditionValueName} conditionValue, Object value, String callerName) { + if (value == null || isNullableTypeNull(value)) { + return false; + } + Object valueObject = conditionValue.LessThan; + if (valueObject != null && !isNullableTypeNull(valueObject) && valueObject.Equals(value)) { + _log.Warn("The value has already registered at " + callerName + ": " + valueObject + " = " + value); + return false; + } + return true; + } + + /** + * This method implements super#doAddWhereClause(). + * + * @param conditionList Condition list. (NotNull) + * @param columnName Column name. (NotNull) + * @param value Condition value. (NotNull) + */ + protected override void DoAddWhereClause(System.Collections.IList conditionList, String columnName, ${glConditionValueName} value) { + if (value.LessThan == null) { + return; + } + Object valueObject = value.LessThan; + if (isNullableTypeNull(valueObject)) { + return; + } + conditionList.Add(BuildBindClause(columnName, value.GetLessThanLocation())); + } + + /** + * This method implements super#doSetupConditionValue(). + * + * @param conditionValue Condition value. (NotNull) + * @param value Value. (NotNull) + * @param location Location. (NotNull) + */ + protected override void DoSetupConditionValue(${glConditionValueName} conditionValue, Object value, String location) { + conditionValue.LessThan = value; + conditionValue.SetLessThanLocation(location); + } + } +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/cbean/ckey/ConditionKey_notEqual.vmnet =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/cbean/ckey/ConditionKey_notEqual.vmnet 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/cbean/ckey/ConditionKey_notEqual.vmnet 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,77 @@ +#set ($myClassName = "${glConditionKeyName}NotEqual") + +using System; +using System.Collections; +using System.Reflection; +using ${glPackageBaseCommonCValue}; + +namespace ${glPackageBaseCommonCKey} { + + /// + /// The condition-key of equal. + /// Author: ${database.ClassAuthor} + /// + public class ${myClassName} : ${glConditionKeyName} { + + /** Log-instance. */ + private static readonly log4net.ILog _log = log4net.LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); + + /** + * Constructor. + */ + public ${myClassName}() { + _conditionKey = "notEqual"; + _operand = "!="; + } + + /** + * Is valid registration? + * + * @param conditionValue Condition value. (NotNull) + * @param value Value. (NotNull) + * @param callerName Caller name. (NotNull) + * @return Determination. + */ + public override bool IsValidRegistration(${glConditionValueName} conditionValue, Object value, String callerName) { + if (value == null || isNullableTypeNull(value)) { + return false; + } + Object valueObject = conditionValue.NotEqual; + if (valueObject != null && !isNullableTypeNull(valueObject) && valueObject.Equals(value)) { + _log.Warn("The value has already registered at " + callerName + ": " + valueObject + " = " + value); + return false; + } + return true; + } + + /** + * This method implements super#doAddWhereClause(). + * + * @param conditionList Condition list. (NotNull) + * @param columnName Column name. (NotNull) + * @param value Condition value. (NotNull) + */ + protected override void DoAddWhereClause(System.Collections.IList conditionList, String columnName, ${glConditionValueName} value) { + if (value.NotEqual == null) { + return; + } + Object valueObject = value.NotEqual; + if (isNullableTypeNull(valueObject)) { + return; + } + conditionList.Add(BuildBindClause(columnName, value.GetNotEqualLocation())); + } + + /** + * This method implements super#doSetupConditionValue(). + * + * @param conditionValue Condition value. (NotNull) + * @param value Value. (NotNull) + * @param location Location. (NotNull) + */ + protected override void DoSetupConditionValue(${glConditionValueName} conditionValue, Object value, String location) { + conditionValue.NotEqual = value; + conditionValue.SetNotEqualLocation(location); + } + } +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/cbean/ckey/ConditionKey_notInScope.vmnet =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/cbean/ckey/ConditionKey_notInScope.vmnet 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/cbean/ckey/ConditionKey_notInScope.vmnet 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,82 @@ +#set ($myClassName = "${glConditionKeyName}NotInScope") + +using System; +using System.Collections; +using System.Reflection; +using ${glPackageBaseCommonCValue}; + +namespace ${glPackageBaseCommonCKey} { + + /// + /// The condition-key of notInScope. + /// Author: ${database.ClassAuthor} + /// + public class ${myClassName} : ${glConditionKeyName} { + + /** + * Constructor. + */ + public ${myClassName}() { + _conditionKey = "notInScope"; + _operand = "not in"; + } + + /** + * Is valid registration? + * + * @param conditionValue Condition value. (NotNull) + * @param value Value. (NotNull) + * @param callerName Caller name. (NotNull) + * @return Determination. + */ + public override bool IsValidRegistration(${glConditionValueName} conditionValue, Object value, String callerName) { + if (value == null || isNullableTypeNull(value)) { + return false; + } + if (value is System.Collections.IList && ((System.Collections.IList)value).Count == 0) { + return false; + } + return true; + } + + /** + * This method implements super#doAddWhereClause(). + * + * @param conditionList Condition list. (NotNull) + * @param columnName Column name. (NotNull) + * @param value Condition value. (NotNull) + */ + protected override void DoAddWhereClause(System.Collections.IList conditionList, String columnName, ${glConditionValueName} value) { + if (value.NotInScope == null) { + return; + } + System.Collections.IList valueList = value.NotInScope; + System.Collections.IList checkedValueList = new System.Collections.ArrayList(); + foreach (Object checkTargetValue in valueList) { + if (checkTargetValue == null) { + continue; + } + if (isNullableTypeNull(checkTargetValue)) { + continue; + } + checkedValueList.Add(checkTargetValue); + } + if (checkedValueList.Count == 0) { + return; + } + conditionList.Add(BuildBindClause(columnName, value.GetNotInScopeLocation(), "('a1', 'a2')")); + } + + /** + * This method implements super#doSetupConditionValue(). + * + * @param conditionValue Condition value. (NotNull) + * @param value Value. (NotNull) + * @param location Location. (NotNull) + */ + protected override void DoSetupConditionValue(${glConditionValueName} conditionValue, Object value, String location) { + conditionValue.NotInScope = ((System.Collections.IList)value); + conditionValue.SetNotInScopeLocation(location); + } + } +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/cbean/ckey/ConditionKey_prefixSearch.vmnet =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/cbean/ckey/ConditionKey_prefixSearch.vmnet 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/cbean/ckey/ConditionKey_prefixSearch.vmnet 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,77 @@ +#set ($myClassName = "${glConditionKeyName}PrefixSearch") + +using System; +using System.Collections; +using System.Reflection; +using ${glPackageBaseCommonCValue}; + +namespace ${glPackageBaseCommonCKey} { + + /// + /// The condition-key of prefixSearch. + /// Author: ${database.ClassAuthor} + /// + public class ${myClassName} : ${glConditionKeyName} { + + /** Log-instance. */ + private static readonly log4net.ILog _log = log4net.LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); + + /** + * Constructor. + */ + public ${myClassName}() { + _conditionKey = "prefixSearch"; + _operand = "like"; + } + + /** + * Is valid registration? + * + * @param conditionValue Condition value. (NotNull) + * @param value Value. (NotNull) + * @param callerName Caller name. (NotNull) + * @return Determination. + */ + public override bool IsValidRegistration(${glConditionValueName} conditionValue, Object value, String callerName) { + if (value == null || isNullableTypeNull(value)) { + return false; + } + Object valueObject = conditionValue.PrefixSearch; + if (valueObject != null && !isNullableTypeNull(valueObject) && valueObject.Equals(value + GetWildCard())) { + _log.Warn("The value has already registered at " + callerName + ": " + valueObject + " = " + value); + return false; + } + return true; + } + + /** + * This method implements super#doAddWhereClause(). + * + * @param conditionList Condition list. (NotNull) + * @param columnName Column name. (NotNull) + * @param value Condition value. (NotNull) + */ + protected override void DoAddWhereClause(System.Collections.IList conditionList, String columnName, ${glConditionValueName} value) { + if (value.PrefixSearch == null) { + return; + } + Object valueObject = value.PrefixSearch; + if (isNullableTypeNull(valueObject)) { + return; + } + conditionList.Add(BuildBindClause(columnName, value.GetPrefixSearchLocation())); + } + + /** + * This method implements super#doSetupConditionValue(). + * + * @param conditionValue Condition value. (NotNull) + * @param value Value. (NotNull) + * @param location Location. (NotNull) + */ + protected override void DoSetupConditionValue(${glConditionValueName} conditionValue, Object value, String location) { + conditionValue.PrefixSearch = (value != null ? value + GetWildCard() : null); + conditionValue.SetPrefixSearchLocation(location); + } + } +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/cbean/cvalue/ConditionValue.vmnet =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/cbean/cvalue/ConditionValue.vmnet 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/cbean/cvalue/ConditionValue.vmnet 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,412 @@ +#set ($myClassName = "${glConditionValueName}") + +using System; +using System.Collections; +using System.Text; + +namespace ${glPackageBaseCommonCValue} { + + /// + /// Condition value. + /// Author: ${database.ClassAuthor} + /// + [System.Serializable] + public class ${myClassName} { + + /** Value of equal. */ + protected Object _equalValue; + + /** + * Get the value of equal. + * + * @return The value of equal. (Nullable) + */ + public Object Equal { + get { return _equalValue; } + set { _equalValue = value; } + } + + /** Location of equal. */ + protected String _equalLocation; + + /** + * Get the location of equal. + * + * @return The location of equal. (Nullable) + */ + public String GetEqualLocation() { + return _equalLocation; + } + + /** + * Set the location of equal. + * + * @param location The location of equal. (Nullable) + * @return this. (NotNull) + */ + public ${myClassName} SetEqualLocation(String location) { + _equalLocation = location; + return this; + } + + /** Value of notEqual. */ + protected Object _notEqualValue; + + /** + * Get the value of notEqual. + * + * @return The value of notEqual. (Nullable) + */ + public Object NotEqual { + get { return _notEqualValue; } + set { _notEqualValue = value; } + } + + /** Location of notEqual. */ + protected String _notEqualLocation; + + /** + * Get the location of notEqual. + * + * @return The location of notEqual. (Nullable) + */ + public String GetNotEqualLocation() { + return _notEqualLocation; + } + + /** + * Set the location of notEqual. + * + * @param location The location of notEqual. (Nullable) + * @return this. (NotNull) + */ + public ${myClassName} SetNotEqualLocation(String location) { + _notEqualLocation = location; + return this; + } + + /** Value of greaterThan. */ + protected Object _greaterThanValue; + + /** + * Get the value of greaterThan. + * + * @return The value of greaterThan. (Nullable) + */ + public Object GreaterThan { + get { return _greaterThanValue; } + set { _greaterThanValue = value; } + } + + /** Location of GreaterThan. */ + protected String _greaterThanLocation; + + /** + * Get the location of greaterThan. + * + * @return The location of greaterThan. (Nullable) + */ + public String GetGreaterThanLocation() { + return _greaterThanLocation; + } + + /** + * Set the location of greaterThan. + * + * @param location The location of greaterThan. (Nullable) + * @return this. (NotNull) + */ + public ${myClassName} SetGreaterThanLocation(String location) { + _greaterThanLocation = location; + return this; + } + + /** Value of lessThan. */ + protected Object _lessThanValue; + + /** + * Get the value of lessThan. + * + * @return The value of lessThan. (Nullable) + */ + public Object LessThan { + get { return _lessThanValue; } + set { _lessThanValue = value; } + } + + /** Location of lessThan. */ + protected String _lessThanLocation; + + /** + * Get the location of lessThan. + * + * @return The location of lessThan. (Nullable) + */ + public String GetLessThanLocation() { + return _lessThanLocation; + } + + /** + * Set the location of lessThan. + * + * @param location The location of lessThan. (Nullable) + * @return this. (NotNull) + */ + public ${myClassName} SetLessThanLocation(String location) { + _lessThanLocation = location; + return this; + } + + /** Value of greaterEqual. */ + protected Object _greaterEqualValue; + + /** + * Get the value of greaterEqual. + * + * @return The value of greaterEqual. (Nullable) + */ + public Object GreaterEqual { + get { return _greaterEqualValue; } + set { _greaterEqualValue = value; } + } + + /** Location of greaterEqual. */ + protected String _greaterEqualLocation; + + /** + * Get the location of greaterEqual. + * + * @return The location of greaterEqual. (Nullable) + */ + public String GetGreaterEqualLocation() { + return _greaterEqualLocation; + } + + /** + * Set the location of greaterEqual. + * + * @param location The location of greaterEqual. (Nullable) + * @return this. (NotNull) + */ + public ${myClassName} SetGreaterEqualLocation(String location) { + _greaterEqualLocation = location; + return this; + } + + /** Value of lessEqual. */ + protected Object _lessEqualValue; + + /** + * Get the value of lessEqual. + * + * @return The value of lessEqual. (Nullable) + */ + public Object LessEqual { + get { return _lessEqualValue; } + set { _lessEqualValue = value; } + } + + /** Location of lessEqual. */ + protected String _lessEqualLocation; + + /** + * Get the location of lessEqual. + * + * @return The location of lessEqual. (Nullable) + */ + public String GetLessEqualLocation() { + return _lessEqualLocation; + } + + /** + * Set the location of lessEqual. + * + * @param location The location of lessEqual. (Nullable) + * @return this. (NotNull) + */ + public ${myClassName} SetLessEqualLocation(String location) { + _lessEqualLocation = location; + return this; + } + + /** Value of prefixSearch. */ + protected Object _prefixSearch; + + /** + * Get the value of prefixSearch. + * + * @return The value of prefixSearch. (Nullable) + */ + public Object PrefixSearch { + get { return _prefixSearch; } + set { _prefixSearch = value; } + } + + /** Location of prefixSearch. */ + protected String _prefixSearchLocation; + + /** + * Get the location of prefixSearch. + * + * @return The location of prefixSearch. (Nullable) + */ + public String GetPrefixSearchLocation() { + return _prefixSearchLocation; + } + + /** + * Set the location of prefixSearch. + * + * @param location The location of prefixSearch. (Nullable) + * @return this. (NotNull) + */ + public ${myClassName} SetPrefixSearchLocation(String location) { + _prefixSearchLocation = location; + return this; + } + + /** Value of inScope. */ + protected System.Collections.IList _inScope; + + /** + * Get the value of inScope. + * + * @return The value of inScope. (Nullable) + */ + public System.Collections.IList InScope { + get { return _inScope; } + set { _inScope = value; } + } + + /** Location of InScope. */ + protected String _inScopeLocation; + + /** + * Get the location of inScope. + * + * @return The location of inScope. (Nullable) + */ + public String GetInScopeLocation() { + return _inScopeLocation; + } + + /** + * Set the location of inScope. + * + * @param location The location of inScope. (Nullable) + * @return this. (NotNull) + */ + public ${myClassName} SetInScopeLocation(String location) { + _inScopeLocation = location; + return this; + } + + /** Value of notInScope. */ + protected System.Collections.IList _notInScope; + + /** + * Get the value of notInScope. + * + * @return The value of notInScope. (Nullable) + */ + public System.Collections.IList NotInScope { + get { return _notInScope; } + set { _notInScope = value; } + } + + /** Location of notInScope. */ + protected String _notInScopeLocation; + + /** + * Get the location of notInScope. + * + * @return The location of notInScope. (Nullable) + */ + public String GetNotInScopeLocation() { + return _notInScopeLocation; + } + + /** + * Set the location of notInScope. + * + * @param location The location of notInScope. (Nullable) + * @return this. (NotNull) + */ + public ${myClassName} SetNotInScopeLocation(String location) { + _notInScopeLocation = location; + return this; + } + + /** Value of isNull. */ + protected Object _isNullValue; + + /** + * Get the value of isNull. + * + * @return The value of isNull. (Nullable) + */ + public Object IsNull { + get { return _isNullValue; } + set { _isNullValue = value; } + } + + /** Location of isNull. */ + protected String _isNullLocation; + + /** + * Get the location of isNull. + * + * @return The location of isNull. (Nullable) + */ + public String GetIsNullLocation() { + return _isNullLocation; + } + + /** + * Set the location of isNull. + * + * @param location The location of isNull. (Nullable) + * @return this. (NotNull) + */ + public ${myClassName} SetIsNullLocation(String location) { + _isNullLocation = location; + return this; + } + + /** Value of isNotNull. */ + protected Object _isNotNullValue; + + /** + * Get the value of isNotNull. + * + * @return The value of isNotNull. (Nullable) + */ + public Object IsNotNull { + get { return _isNotNullValue; } + set { _isNotNullValue = value; } + } + + /** Location of isNotNull. */ + protected String _isNotNullLocation; + + /** + * Get the location of isNotNull. + * + * @return The location of isNotNull. (Nullable) + */ + public String GetIsNotNullLocation() { + return _isNotNullLocation; + } + + /** + * Set the location of isNotNull. + * + * @param location The location of isNotNull. (Nullable) + * @return this. (NotNull) + */ + public ${myClassName} SetIsNotNullLocation(String location) { + _isNotNullLocation = location; + return this; + } + } +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/cbean/sqlclause/AbstractSqlClause.vmnet =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/cbean/sqlclause/AbstractSqlClause.vmnet 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/cbean/sqlclause/AbstractSqlClause.vmnet 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,847 @@ +#set ($myClassName = "${glSqlClauseAbstractName}") + +using System; +using System.Collections; +using System.Text; +using ${glPackageBaseCommon}; +using ${glPackageBaseCommonCKey}; +using ${glPackageBaseCommonCValue}; + +namespace ${glPackageBaseCommonSqlClause} { + + /// + /// The abstract class of SqlClause. + /// Author: ${database.ClassAuthor} + /// + [System.Serializable] + public abstract class ${myClassName} : ${glSqlClauseInterfaceName} { + + // ===================================================================================== + // Attribute + // ========= + /** Target table name. */ + protected String _tableName; + + /** Included select column map. */ + protected System.Collections.IDictionary _includedSelectColumnMap = new System.Collections.Hashtable(); + + /** Outer join map. */ + protected System.Collections.IDictionary _outerJoinMap = new System.Collections.Hashtable(); + + /** Outer join list. (For order guarantee) */ + protected System.Collections.IList _outerJoinList = new System.Collections.ArrayList(); + + /** Where list. */ + protected System.Collections.IList _whereList = new System.Collections.ArrayList(); + + /** Inline where list for BaseTable. */ + protected System.Collections.IList _baseTableInlineWhereList = new System.Collections.ArrayList(); + + /** Order by clause. */ + protected ${glOrderByClauseName} _orderByClause = new ${glOrderByClauseName}(); + + /** Is incoluded-select-column effective? Default value is false. */ + protected bool _isIncludedSelectColumnEffective = false; + + /** Is order-by effective? Default value is false. */ + protected bool _isOrderByEffective = false; + + /** Fetch start index. (for fetchXxx()) */ + protected int _fetchStartIndex = 0; + + /** Fetch size. (for fetchXxx()) */ + protected int _fetchSize = 0; + + /** Fetch page number. (for fetchXxx()) This value should be plus. */ + protected int _fetchPageNumber = 1; + + /** Is fetch-narrowing effective? Default value is false. */ + protected bool _isFetchScopeEffective = false; + + // ===================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param tableName Table name. (NotNull) + **/ + public ${myClassName}(String tableName) { + if (tableName == null) { + String msg = "Argument[tableName] must not be null."; + throw new ArgumentNullException(msg); + } + _tableName = tableName; + } + + // ===================================================================================== + // Clause + // ====== + /** + * ${database.ImplementComment} + * + * @return Clause string. (NotNull) + */ + public String GetClause() { + StringBuilder sb = new StringBuilder(128); + if (_isIncludedSelectColumnEffective && _includedSelectColumnMap.Count != 0) { + sb.Append(" ").Append(GetIncludedSelectColumnClause()); + } + sb.Append(" "); + sb.Append(GetFromClause()); + sb.Append(" "); + sb.Append(GetFromHint()); + sb.Append(" "); + sb.Append(GetWhereClause()); + + if (_isOrderByEffective && !_orderByClause.IsEmpty()) { + sb.Append(" "); + sb.Append(GetOrderByClause()); + } + sb.Append(" "); + sb.Append(GetSqlSuffix()); + return sb.ToString(); + } + + /** + * ${database.ImplementComment} + * + * @return select-hint. {select [select-hint] * from table...} + */ + public String GetSelectHint() { + return CreateSelectHint(); + } + + public String GetIncludedSelectColumnClause() { + StringBuilder sb = new StringBuilder(); + System.Collections.ICollection keySet = _includedSelectColumnMap.Keys; + foreach (String aliasName in keySet) { + String realColumnName = (String)_includedSelectColumnMap[aliasName]; + sb.Append(", ").Append(realColumnName).Append(" as ").Append(aliasName); + } + return sb.ToString(); + } + + /** + * ${database.ImplementComment} + * + * @return From clause. (NotNull) + */ + public String GetFromClause() { + StringBuilder sb = new StringBuilder(128); + sb.Append("from "); + if (_baseTableInlineWhereList.Count == 0) { + sb.Append(_tableName); + } else { + sb.Append(GetInlineViewClause(_tableName, _baseTableInlineWhereList)).Append(" ").Append(_tableName); + } + sb.Append(GetFromBaseTableHint()); + sb.Append(GetLeftOuterJoinClause()); + return sb.ToString(); + } + + protected String GetLeftOuterJoinClause() { + StringBuilder sb = new StringBuilder(); + foreach (String aliasName in _outerJoinList) { + LeftOuterJoinInfo joinInfo = (LeftOuterJoinInfo)_outerJoinMap[aliasName]; + String joinTableName = joinInfo.JoinTableName; + System.Collections.IList inlineWhereClauseList = joinInfo.InlineWhereClauseList; + System.Collections.IDictionary joinOnMap = joinInfo.JoinOnMap; + AssertJoinOnMapNotEmpty(joinOnMap, aliasName); + + sb.Append(" left outer join "); + if (inlineWhereClauseList.Count == 0) { + sb.Append(joinTableName); + } else { + sb.Append(GetInlineViewClause(joinTableName, inlineWhereClauseList)); + } + sb.Append(" ").Append(aliasName).Append(" on "); + int count = 0; + System.Collections.ICollection localColumnNameSet = joinOnMap.Keys; + foreach (String localColumnName in localColumnNameSet) { + String foreignColumnName = (String)joinOnMap[localColumnName]; + if (count != 0) { + sb.Append(" and "); + } + sb.Append(localColumnName).Append(" = ").Append(foreignColumnName); + count++; + } + } + return sb.ToString(); + } + + protected String GetInlineViewClause(String joinTableName, System.Collections.IList inlineWhereClauseList) { + StringBuilder sb = new StringBuilder(); + sb.Append("(select * from ").Append(joinTableName).Append(" where "); + int count = 0; + foreach (String whereClause in inlineWhereClauseList) { + if (count > 0) { + sb.Append(" and "); + } + sb.Append(whereClause); + ++count; + } + sb.Append(")"); + return sb.ToString(); + } + + /** + * ${database.ImplementComment} + * + * @return from-base-table-hint. {select * from table [from-base-table-hint] where ...} (NotNull) + */ + public String GetFromBaseTableHint() { + return CreateFromBaseTableHint(); + } + + /** + * ${database.ImplementComment} + * + * @return from-hint. {select * from table [from-hint] where ...} (NotNull) + */ + public String GetFromHint() { + return CreateFromHint(); + } + + /** + * ${database.ImplementComment} + * + * @return Where clause. (NotNull) + */ + public String GetWhereClause() { + StringBuilder sb = new StringBuilder(128); + int count = 0; + foreach (String clause in _whereList) { + if (count == 0) { + sb.Append("where ").Append(clause); + } else { + sb.Append(" and ").Append(clause); + } + count++; + } + return sb.ToString(); + } + + /** + * ${database.ImplementComment} + * + * @return Order-by clause. (NotNull) + */ + public String GetOrderByClause() { + return _orderByClause.GetOrderByClause(); + } + + /** + * ${database.ImplementComment} + * + * @return from-hint. {select * from table where ... order by ... [sql-suffix]} + */ + public String GetSqlSuffix() { + return CreateSqlSuffix(); + } + + // ===================================================================================== + // IncludedSelectColumn + // ==================== + public void MakeIncludedSelectColumnEffective() { + _isIncludedSelectColumnEffective = true; + } + + public void IgnoreIncludedSelectColumn() { + _isIncludedSelectColumnEffective = false; + } + + public void RegisterIncludedSelectColumn(String aliasName, String realColumnName) { + _isIncludedSelectColumnEffective = true; + _includedSelectColumnMap.Add(aliasName, realColumnName); + } + + // ===================================================================================== + // OuterJoin + // ========= + /** + * ${database.ImplementComment} + * + * @param joinTableName Join table name(outer join [joinTableName]). (NotNull) + * @param aliasName Alias name of join table. (NotNull and Unique per invoking method.) + * @param joinOnMap Map that has conditions of 'on' clause. (NotNull) + */ + public void RegisterOuterJoin(String joinTableName, String aliasName, System.Collections.IDictionary joinOnMap) { + AssertAlreadyOuterJoin(aliasName); + AssertJoinOnMapNotEmpty(joinOnMap, aliasName); + LeftOuterJoinInfo joinInfo = new LeftOuterJoinInfo(); + joinInfo.AliasName = aliasName; + joinInfo.JoinTableName = joinTableName; + joinInfo.JoinOnMap = joinOnMap; + _outerJoinMap.Add(aliasName, joinInfo); + _outerJoinList.Add(aliasName);// For order guarantee + } + + public class LeftOuterJoinInfo { + protected String _aliasName; + protected String _joinTableName; + protected System.Collections.IList _inlineWhereClauseList = new System.Collections.ArrayList(); + protected System.Collections.IDictionary _joinOnMap; + public String AliasName { + get { return _aliasName; } + set { _aliasName = value; } + } + public String JoinTableName { + get { return _joinTableName; } + set { _joinTableName = value; } + } + public System.Collections.IList InlineWhereClauseList { + get { return _inlineWhereClauseList; } + } + public void AddInlineWhereClause(String value) { + _inlineWhereClauseList.Add(value); + } + public System.Collections.IDictionary JoinOnMap { + get { return _joinOnMap; } + set { _joinOnMap = value; } + } + } + + protected void AssertAlreadyOuterJoin(String aliasName) { + if (_outerJoinMap.Contains(aliasName)) { + String msg = "The alias name have already registered in outer join: " + aliasName; + throw new ArgumentOutOfRangeException(msg); + } + } + + protected void AssertJoinOnMapNotEmpty(System.Collections.IDictionary joinOnMap, String aliasName) { + if (joinOnMap.Count == 0) { + String msg = "The joinOnMap should not be empty: aliasName=" + aliasName; + throw new ArgumentOutOfRangeException(msg); + } + } + + // ===================================================================================== + // Where + // ===== + /** + * ${database.ImplementComment} + * + * @param columnName Column name([table-name].[column-name]). (NotNull) + * @param key Condition key. (NotNull) + * @param value Condition value. (NotNull) + */ + public void RegisterWhereClause(String columnName, ${glConditionKeyName} key, ${glConditionValueName} value) { + AssertStringNotNullAndNotTrimmedEmpty("columnName", columnName); + key.AddWhereClause(_whereList, columnName, value); + } + + /** + * Register where clause. + * + * @param clause Where clause. (NotNull) + * @return this. (NotNull) + */ + public void RegisterWhereClause(String clause) { + AssertStringNotNullAndNotTrimmedEmpty("clause", clause); + _whereList.Add(clause); + } + + // ===================================================================================== + // InlineWhere + // =========== + public void RegisterBaseTableInlineWhereClause(String columnName, ${glConditionKeyName} key, ${glConditionValueName} value) { + RegisterWhereClause(columnName, key, value); + String inlineWhereClause = (String)_whereList[_whereList.Count-1]; + _whereList.RemoveAt(_whereList.Count-1); + _baseTableInlineWhereList.Add(inlineWhereClause); + } + + public void RegisterBaseTableInlineWhereClause(String value) { + _baseTableInlineWhereList.Add(value); + } + + public void RegisterOuterJoinInlineWhereClause(String aliasName, String columnName, ${glConditionKeyName} key, ${glConditionValueName} value) { + AssertNotYetOuterJoin(aliasName); + LeftOuterJoinInfo joinInfo = (LeftOuterJoinInfo)_outerJoinMap[aliasName]; + RegisterWhereClause(columnName, key, value); + String inlineWhereClause = (String)_whereList[_whereList.Count-1]; + _whereList.RemoveAt(_whereList.Count-1); + joinInfo.AddInlineWhereClause(inlineWhereClause); + } + + public void RegisterOuterJoinInlineWhereClause(String aliasName, String value) { + AssertNotYetOuterJoin(aliasName); + LeftOuterJoinInfo joinInfo = (LeftOuterJoinInfo)_outerJoinMap[aliasName]; + joinInfo.AddInlineWhereClause(value); + } + + /** + * Assert whether the alias name have already registered in outer join. + * + * @param aliasName Alias name. + */ + protected void AssertNotYetOuterJoin(String aliasName) { + if (!_outerJoinMap.Contains(aliasName)) { + String msg = "The alias name have not registered in outer join yet: " + aliasName; + throw new ArgumentOutOfRangeException(msg); + } + } + + // ===================================================================================== + // OrderBy + // ======= + /** + * ${database.ImplementComment} + * + * @return this. (NotNull) + */ + public ${glOrderByClauseName} GetSqlComponentOfOrderByClause() { + return _orderByClause; + } + + /** + * ${database.ImplementComment} + * + * @return this. (NotNull) + */ + public ${glSqlClauseInterfaceName} ClearOrderBy() { + _isOrderByEffective = false; + _orderByClause.Clear(); + return this; + } + + /** + * ${database.ImplementComment} + * + * @return this. (NotNull) + */ + public ${glSqlClauseInterfaceName} IgnoreOrderBy() { + _isOrderByEffective = false; + return this; + } + + /** + * ${database.ImplementComment} + * + * @return this. (NotNull) + */ + public ${glSqlClauseInterfaceName} MakeOrderByEffective() { + _isOrderByEffective = true; + return this; + } + + public void ReverseOrderBy_Or_OverrideOrderBy(String columnFullName, bool isAsc) { + ReverseOrderBy_Or_OverrideOrderBy(columnFullName, null, isAsc); + } + + public void ReverseOrderBy_Or_OverrideOrderBy(String columnFullName, String registeredColumnFullName, bool isAsc) { + _isOrderByEffective = true; + if (!_orderByClause.IsSameOrderByColumn(columnFullName)) { + ClearOrderBy(); + RegisterOrderBy(columnFullName, registeredColumnFullName, isAsc); + } else { + _orderByClause.ReverseAll(); + } + } + + /** + * ${database.ImplementComment} + * + * @param columnFullName Column-full-name. ([table-name].[column-name]) (NotNull) + * @param registeredColumnFullName Registered-column-full-name. ([table-name].[column-name]) (Nullable) + */ + public void RegisterOrderBy(String columnFullName, bool isAsc) { + RegisterOrderBy(columnFullName, null, isAsc); + } + + /** + * ${database.ImplementComment} + * + * @param columnFullName Column-full-name. ([table-name].[column-name]) (NotNull) + * @param registeredColumnFullName Registered-column-full-name. ([table-name].[column-name]) (Nullable) + */ + public void RegisterOrderBy(String columnFullName, String registeredColumnFullName, bool isAsc) { + try { + String[] orderByArray = columnFullName.Split('/'); + if (registeredColumnFullName == null || registeredColumnFullName.Trim().Length ==0) { + registeredColumnFullName = columnFullName; + } + String[] registeredOrderByArray = registeredColumnFullName.Split('/'); + int count = 0; + foreach (String orderBy in orderByArray) { + String registeredOrderBy = registeredOrderByArray[count]; + + _isOrderByEffective = true; + String aliasName = null; + String columnName = null; + String registeredAliasName = null; + String registeredColumnName = null; + + if (orderBy.IndexOf(".") < 0) { + columnName = orderBy; + } else { + aliasName = orderBy.Substring(0, orderBy.LastIndexOf(".")); + columnName = orderBy.Substring(orderBy.LastIndexOf(".") + 1); + } + + if (registeredOrderBy.IndexOf(".") < 0) { + registeredColumnName = registeredOrderBy; + } else { + registeredAliasName = registeredOrderBy.Substring(0, registeredOrderBy.LastIndexOf(".")); + registeredColumnName = registeredOrderBy.Substring(registeredOrderBy.LastIndexOf(".") + 1); + } + + ${glOrderByElementName} element = new ${glOrderByElementName}(); + element.AliasName = aliasName; + element.ColumnName = columnName; + element.RegisteredAliasName = registeredAliasName; + element.RegisteredColumnName = registeredColumnName; + if (isAsc) { + element.SetupAsc(); + } else { + element.SetupDesc(); + } + _orderByClause.AddOrderByElement(element); + + count++; + } + } catch (Exception e) { + String msg = "RegisterOrderBy() threw the exception: columnFullName=" + columnFullName; + msg = msg + " registeredColumnFullName=" + registeredColumnFullName; + msg = msg + " isAsc=" + isAsc; + msg = msg + " sqlClause=" + this.ToString(); + throw new SystemException(msg, e); + } + } + + // ===================================================================================== + // Advance + // ======= + /** + * ${database.ImplementComment} + * + * @param fetchSize Fetch-size. (NotMinus & NotZero) + * @return this. (NotNull) + */ + public ${glSqlClauseInterfaceName} FetchFirst(int fetchSize) { + _isFetchScopeEffective = true; + if (fetchSize <= 0) { + String msg = "Argument[fetchSize] must be plus: " + fetchSize; + throw new ArgumentOutOfRangeException(msg); + } + _fetchStartIndex = 0; + _fetchSize = fetchSize; + _fetchPageNumber = 1; + DoClearFetchPageClause(); + DoFetchFirst(); + return this; + } + + /** + * ${database.ImplementComment} + * + * @param fetchStartIndex Fetch-start-index. 0 origin. (NotMinus) + * @param fetchSize Fetch size. (NotMinus) + * @return this. (NotNull) + */ + public ${glSqlClauseInterfaceName} FetchScope(int fetchStartIndex, int fetchSize) { + _isFetchScopeEffective = true; + if (fetchStartIndex < 0) { + String msg = "Argument[fetchStartIndex] must be plus or zero: " + fetchStartIndex; + throw new ArgumentOutOfRangeException(msg); + } + if (fetchSize <= 0) { + String msg = "Argument[fetchSize] must be plus: " + fetchSize; + throw new ArgumentOutOfRangeException(msg); + } + _fetchStartIndex = fetchStartIndex; + _fetchSize = fetchSize; + return FetchPage(1); + } + + /** + * ${database.ImplementComment} + * + * @param fetchPageNumber Page-number. 1 origin. (NotMinus & NotZero: If minus or zero, set one.) + * @return this. (NotNull) + */ + public ${glSqlClauseInterfaceName} FetchPage(int fetchPageNumber) { + _isFetchScopeEffective = true; + if (fetchPageNumber <= 0) { + fetchPageNumber = 1; + } + if (_fetchSize <= 0) { + String msg = "Fetch size should not be minus or zero when you invoke this method. "; + msg = msg + "When you invoke this method, it is necessary to invoke 'fetchFirst()' or 'fetchScope()' ahead of that. "; + msg = msg + ": fetchPageNumber=" + fetchPageNumber + " _fetchSize=" + _fetchSize; + throw new SystemException(msg); + } + _fetchPageNumber = fetchPageNumber; + if (_fetchPageNumber == 1 && _fetchStartIndex == 0) { + return FetchFirst(_fetchSize); + } + DoClearFetchPageClause(); + DoFetchPage(); + return this; + } + + /** + * Do fetch first. + */ + abstract protected void DoFetchFirst(); + + /** + * Do fetch page. + */ + abstract protected void DoFetchPage(); + + /** + * Do clear fetch-page clause. + */ + abstract protected void DoClearFetchPageClause(); + + /** + * ${database.ImplementComment} + * + * @return Fetch start index. + */ + public int FetchStartIndex { + get { + return _fetchStartIndex; + } + } + + /** + * ${database.ImplementComment} + * + * @return Fetch size. + */ + public int FetchSize { + get { + return _fetchSize; + } + } + + /** + * ${database.ImplementComment} + * + * @return Fetch page number. + */ + public int FetchPageNumber { + get { + return _fetchPageNumber; + } + } + + /** + * Get page start index. + * + * @return Page start index. 0 origin. (NotMinus) + */ + public int PageStartIndex { + get { + if (_fetchPageNumber <= 0) { + String msg = "_fetchPageNumber must be plus: " + _fetchPageNumber; + throw new SystemException(msg); + } + return _fetchStartIndex + (_fetchSize * (_fetchPageNumber - 1)); + } + } + + /** + * Get page end index. + * + * @return Page end index. 0 origin. (NotMinus) + */ + public int PageEndIndex { + get { + if (_fetchPageNumber <= 0) { + String msg = "_fetchPageNumber must be plus: " + _fetchPageNumber; + throw new SystemException(msg); + } + return _fetchStartIndex + (_fetchSize * _fetchPageNumber); + } + } + + /** + * ${database.ImplementComment} + * + * @return this. (NotNull) + */ + public ${glSqlClauseInterfaceName} IgnoreFetchScope() { + _isFetchScopeEffective = false; + DoClearFetchPageClause(); + return this; + } + + /** + * ${database.ImplementComment} + * + * @return this. (NotNull) + */ + public ${glSqlClauseInterfaceName} MakeFetchScopeEffective() { + _isFetchScopeEffective = true; + if (this.FetchSize > 0 && this.FetchPageNumber > 0) { + FetchPage(this.FetchPageNumber); + } + return this; + } + + /** + * ${database.ImplementComment} + * + * @return Determiantion. + */ + public bool IsFetchScopeEffective { + get { + return _isFetchScopeEffective; + } + } + + /** + * ${database.ImplementComment} + * + * @return Determination. + */ + public virtual bool IsFetchStartIndexSupported { + get { + return true; // Default + } + } + + /** + * ${database.ImplementComment} + * + * @return Determination. + */ + public virtual bool IsFetchSizeSupported { + get { + return true; // Default + } + } + + /** + * ${database.ImplementComment} + * + * @return this. (NotNull) + */ + abstract public ${glSqlClauseInterfaceName} LockForUpdate(); + + /** + * Create select-hint. + * + * @return Select-hint. {select [select-hint] * from table...} (NotNull) + */ + abstract protected String CreateSelectHint(); + + /** + * Create from-base-table-hint. + * + * @return From-base-table-hint. {select * from table [from-base-table-hint] where ...} (NotNull) + */ + abstract protected String CreateFromBaseTableHint(); + + /** + * Create from-hint. + * + * @return From-hint. {select * from table [from-hint] where ...} (NotNull) + */ + abstract protected String CreateFromHint(); + + /** + * Create sql-suffix. + * + * @return Sql-suffix. {select * from table where ... order by ... [sql-suffix]} (NotNull) + */ + abstract protected String CreateSqlSuffix(); + + // ===================================================================================== + // FetchNarrowing + // ============== + /** + * ${database.ImplementComment} + * + * @return Fetch-narrowing start-index. + */ + public int FetchNarrowingSkipStartIndex { + get { + if (this.IsFetchStartIndexSupported) { + return 0; + } else { + return this.PageStartIndex; + } + } + } + + /** + * ${database.ImplementComment} + * + * @return Fetch-narrowing size. + */ + public int FetchNarrowingLoopCount { + get { + return this.FetchSize; + } + } + + /** + * ${database.ImplementComment} + * + * @return Determiantion. + */ + public bool IsFetchNarrowingEffective { + get { + return _isFetchScopeEffective; + } + } + + + // ---------------------------------------------------------------- + // Assert Object + // ------------- + #region Assert Object + + /** + * Assert that the argument is not null. + * + * @param variableName Variable name. (NotNull) + * @param arg Argument. (NotNull) + */ + protected void AssertObjectNotNull(String variableName, Object arg) { + if (variableName == null) { + String msg = "Argument[variableName] should not be null."; + throw new ArgumentNullException(msg); + } + if (arg == null) { + String msg = "Argument[" + variableName + "] should not be null."; + throw new ArgumentNullException(msg); + } + } + + #endregion + + // ---------------------------------------------------------------- + // Assert String + // ------------- + #region Assert String + + /** + * Assert that the string is not null and not trimmed empty. + * + * @param variableName Variable name. (NotNull) + * @param arg Argument. (NotNull) + */ + protected void AssertStringNotNullAndNotTrimmedEmpty(String variableName, String value) { + if (variableName == null) { + String msg = "Variable[variableName] should not be null."; + throw new ArgumentNullException(msg); + } + if (value == null) { + String msg = "Variable[" + variableName + "] should not be null."; + throw new ArgumentNullException(msg); + } + if (value.Trim().Length == 0) { + String msg = "Variable[" + variableName + "] should not be empty: [" + value + "]"; + throw new ArgumentOutOfRangeException(msg); + } + } + + #endregion + } +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/cbean/sqlclause/OrderByClause.vmnet =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/cbean/sqlclause/OrderByClause.vmnet 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/cbean/sqlclause/OrderByClause.vmnet 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,226 @@ + +#set ($myClassName = "${glOrderByClauseName}") + +using System; +using System.Text; + +namespace ${glPackageBaseCommonSqlClause} { + + /** + * The paging-result-bean of ${myClassName}. + * + * @author ${database.ClassAuthor} + */ + [System.Serializable] + public class ${myClassName} { + + // ===================================================================================== + // Attribute + // ========= + protected System.Collections.Generic.IList<${glOrderByElementName}> _orderByList = new System.Collections.Generic.List<${glOrderByElementName}>(); + + // ===================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + public ${myClassName}() { + } + + // ===================================================================================== + // Behavior + // ======== + public void AddOrderByElement(${glOrderByElementName} value) { + _orderByList.Add(value); + } + + public void ReverseAll() { + foreach (${glOrderByElementName} element in _orderByList) { + element.Reverse(); + } + } + + /** + * Get the value of allRecordCount. + * + * @return The value of allRecordCount. + */ + public System.Collections.Generic.IList<${glOrderByElementName}> GetOrderByList() { + return _orderByList; + } + + public String GetOrderByClause() { + if (_orderByList.Count == 0) { + return ""; + } + StringBuilder sb = new StringBuilder(); + String delimiter = ", "; + foreach (${glOrderByElementName} element in _orderByList) { + sb.Append(delimiter).Append(element.GetElementClause()); + } + sb.Remove(0, delimiter.Length).Insert(0, "order by "); + return sb.ToString(); + } + + public String GetFirstElementColumnFullName() { + if (IsEmpty()) { + String msg = "This order-by clause is empty: " + ToString(); + throw new SystemException(msg); + } + ${glOrderByElementName} element = (${glOrderByElementName})_orderByList[0]; + return element.GetColumnFullName(); + } + + public String GetFirstElementRegisteredColumnFullName() { + if (IsEmpty()) { + String msg = "This order-by clause is empty: " + ToString(); + throw new SystemException(msg); + } + ${glOrderByElementName} element = (${glOrderByElementName})_orderByList[0]; + return element.GetRegisteredColumnFullName(); + } + + public bool IsSameOrderByColumn(String columnFullName) { + String[] columnFullNameArray = columnFullName.Split('/'); + if (_orderByList.Count != columnFullNameArray.Length) { + return false; + } + int count = 0; + foreach (String columnFullNameElement in columnFullNameArray) { + ${glOrderByElementName} element = (${glOrderByElementName})_orderByList[count]; + if (!element.GetColumnFullName().ToLower().Equals(columnFullNameElement.ToLower())) { + return false; + } + count++; + } + return true; + } + + /// + /// Is first element asc? + /// If order-by list is empty, throws exception. + /// + /// Determination. + public bool IsFirstElementAsc() { + if (IsEmpty()) { + String msg = "This order-by clause is empty: " + ToString(); + throw new SystemException(msg); + } + ${glOrderByElementName} element = (${glOrderByElementName})_orderByList[0]; + return element.IsAsc(); + } + + /// + /// Is first element desc? + /// If order-by list is empty, throws exception. + /// + /// Determination. + public bool IsFirstElementDesc() { + return !IsFirstElementAsc(); + } + + /// + /// Is same as first element alias-name? + /// If order-by list is empty, throws exception. + /// + /// Determination. + public bool IsSameAsFirstElementAliasName(String expectedAliasName) { + if (IsEmpty()) { + String msg = "This order-by clause is empty: " + ToString(); + throw new SystemException(msg); + } + ${glOrderByElementName} element = (${glOrderByElementName})_orderByList[0]; + String actualAliasName = element.AliasName; + if (actualAliasName != null && expectedAliasName != null) { + return actualAliasName.Equals(expectedAliasName); + } else { + return false; + } + } + + /// + /// Is same as first element column-name? + /// If order-by list is empty, throws exception. + /// + /// Determination. + public bool IsSameAsFirstElementColumnName(String expectedColumnName) { + if (IsEmpty()) { + String msg = "This order-by clause is empty: " + ToString(); + throw new SystemException(msg); + } + ${glOrderByElementName} element = (${glOrderByElementName})_orderByList[0]; + String actualColumnName = element.ColumnName; + if (actualColumnName != null && expectedColumnName != null) { + return actualColumnName.Equals(expectedColumnName); + } else { + return false; + } + } + + /// + /// Is same as first element registered alias-name? + /// If order-by list is empty, throws exception. + /// + /// Determination. + public bool IsSameAsFirstElementRegisteredAliasName(String expectedRegisteredAliasName) { + if (IsEmpty()) { + String msg = "This order-by clause is empty: " + ToString(); + throw new SystemException(msg); + } + ${glOrderByElementName} element = (${glOrderByElementName})_orderByList[0]; + String actualRegisteredAliasName = element.RegisteredAliasName; + if (actualRegisteredAliasName != null && expectedRegisteredAliasName != null) { + return actualRegisteredAliasName.Equals(expectedRegisteredAliasName); + } else { + return false; + } + } + + /// + /// Is same as first element registered column-name? + /// If order-by list is empty, throws exception. + /// + /// Determination. + public bool IsSameAsFirstElementRegisteredColumnName(String expectedRegisteredColumnName) { + if (IsEmpty()) { + String msg = "This order-by clause is empty: " + ToString(); + throw new SystemException(msg); + } + ${glOrderByElementName} element = (${glOrderByElementName})_orderByList[0]; + String actualRegisteredColumnName = element.RegisteredColumnName; + if (actualRegisteredColumnName != null && expectedRegisteredColumnName != null) { + return actualRegisteredColumnName.Equals(expectedRegisteredColumnName); + } else { + return false; + } + } + + /// + /// Is order-by list empty? + /// + /// Determination. + public bool IsEmpty() { + return _orderByList.Count == 0; + } + + /// + /// Clear order-by list. + /// + public void Clear() { + _orderByList.Clear(); + } + + // ===================================================================================== + // Basic-Override Method + // ===================== + /** + * This method overrides the method that is declared at super. + * + * @return View-string of all-columns value. + */ + public override String ToString() { + return _orderByList.ToString(); + } + } +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/cbean/sqlclause/OrderByElement.vmnet =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/cbean/sqlclause/OrderByElement.vmnet 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/cbean/sqlclause/OrderByElement.vmnet 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,162 @@ + +#set ($myClassName = "${glOrderByElementName}") + +using System; +using System.Text; + +namespace ${glPackageBaseCommonSqlClause} { + + /// + /// Order-by element. + /// + /// Author: ${database.ClassAuthor} + /// + [System.Serializable] + public class ${myClassName} { + + // ===================================================================================== + // Attribute + // ========= + /** The value of alias name. */ + protected String _aliasName; + + /** The value of column name. */ + protected String _columnName; + + /** The value of registered alias name. */ + protected String _registeredAliasName; + + /** The value of registered column name. */ + protected String _registeredColumnName; + + /** The value of ascDesc. */ + protected String _ascDesc = "asc"; + + // ===================================================================================== + // GetterSetter + // ============ + public String AliasName { + get { return _aliasName; } + set { _aliasName = value; } + } + public String ColumnName { + get { return _columnName; } + set { _columnName = value; } + } + public String RegisteredAliasName { + get { return _registeredAliasName; } + set { _registeredAliasName = value; } + } + public String RegisteredColumnName { + get { return _registeredColumnName; } + set { _registeredColumnName = value; } + } + public String AscDesc { + get { return _ascDesc; } + set { _ascDesc = value; } + } + + // ===================================================================================== + // Behavior + // ======== + public void SetupAsc() { + _ascDesc = "asc"; + } + + public void SetupDesc() { + _ascDesc = "desc"; + } + + public void Reverse() { + if (_ascDesc == null) { + String msg = "The attribute[ascDesc] should not be null."; + throw new SystemException(msg); + } + if (_ascDesc.Equals("asc")) { + _ascDesc = "desc"; + } else if (_ascDesc.Equals("desc")) { + _ascDesc = "asc"; + } else { + String msg = "The attribute[ascDesc] should be asc or desc: but ascDesc=" + _ascDesc; + throw new SystemException(msg); + } + } + + public bool IsAsc() { + if (_ascDesc == null) { + String msg = "The attribute[ascDesc] should not be null."; + throw new SystemException(msg); + } + if (_ascDesc.Equals("asc")) { + return true; + } else if (_ascDesc.Equals("desc")) { + return false; + } else { + String msg = "The attribute[ascDesc] should be asc or desc: but ascDesc=" + _ascDesc; + throw new SystemException(msg); + } + } + + public String GetColumnFullName() { + StringBuilder sb = new StringBuilder(); + if (_aliasName != null) { + sb.Append(_aliasName).Append("."); + } + if (_columnName == null) { + String msg = "The attribute[columnName] should not be null."; + throw new SystemException(msg); + } + sb.Append(_columnName); + return sb.ToString(); + } + + public String GetRegisteredColumnFullName() { + StringBuilder sb = new StringBuilder(); + if (_registeredAliasName != null) { + sb.Append(_registeredAliasName).Append("."); + } + if (_registeredColumnName == null) { + String msg = "The attribute[registeredColumnName] should not be null."; + throw new SystemException(msg); + } + sb.Append(_registeredColumnName); + return sb.ToString(); + } + + public String GetElementClause() { + if (_ascDesc == null) { + String msg = "The attribute[ascDesc] should not be null."; + throw new SystemException(msg); + } + StringBuilder sb = new StringBuilder(); + sb.Append(GetColumnFullName()).Append(" ").Append(_ascDesc); + return sb.ToString(); + } + + // ===================================================================================== + // Basic Override + // ============== + /** + * This method overrides the method that is declared at super. + * + * @return View-string of all-columns value. + */ + public override String ToString() { + StringBuilder sb = new StringBuilder(); + sb.Append("aliasName=").Append(_aliasName); + sb.Append(" columnName=").Append(_columnName); + sb.Append(" registeredAliasName=").Append(_registeredAliasName); + sb.Append(" registeredColumnName=").Append(_registeredColumnName); + sb.Append(" ascDesc=").Append(_ascDesc); + return sb.ToString(); + } + } +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/cbean/sqlclause/SqlClause.vmnet =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/cbean/sqlclause/SqlClause.vmnet 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/cbean/sqlclause/SqlClause.vmnet 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,318 @@ + +using System; +using System.Collections; +using ${glPackageBaseCommonCKey}; +using ${glPackageBaseCommonCValue}; + +namespace ${glPackageBaseCommonSqlClause} { + + /// + /// The interface of SqlClause. + /// Author: ${database.ClassAuthor} + /// + public interface ${glSqlClauseInterfaceName} { + + // ===================================================================================== + // Clause + // ====== + /** + * Get clause string. + *

+ *

+         * EX.
+         * # from [base-table] left outer join [fk-table] [fk-alias] on [join-condition]
+         * # where [base-table].[column] = [value] and [fk-alias].[column] is null
+         * # order by [base-table].[column] asc, [fk-alias].[column] desc
+         * # for update
+         * 
+ * + * @return Clause string. (NotNull) + */ + String GetClause(); + + String GetIncludedSelectColumnClause(); + + /** + * Get select-hint. This is an internal method. + * + * @return select-hint. {select [select-hint] * from table...} + */ + String GetSelectHint(); + + /** + * Get from clause. {from table left outer join foreign-table on ...} + * + * @return From clause. (NotNull) + */ + String GetFromClause(); + + /** + * ${database.ImplementComment} + * + * @return from-base-table-hint. {select * from table [from-base-table-hint] where ...} (NotNull) + */ + String GetFromBaseTableHint(); + + /** + * Get from-hint. This is an internal method. + * + * @return from-hint. {select * from table [from-hint] where ...} + */ + String GetFromHint(); + + /** + * Get where clause. {where [base-table].[column] = [value] and [fk-alias].[column] is null} + * + * @return Where clause. (NotNull) + */ + String GetWhereClause(); + + /** + * Get order-by clause. {order by [base-table].[column] asc, [fk-alias].[column] desc} + * + * @return Order-by clause. (NotNull) + */ + String GetOrderByClause(); + + /** + * Get sql-suffix. This is an internal method. + * + * @return sql-suffix. {select * from table where ... order by ... [sql-suffix]} + */ + String GetSqlSuffix(); + + // ===================================================================================== + // IncludedSelectColumn + // ==================== + void MakeIncludedSelectColumnEffective(); + void IgnoreIncludedSelectColumn(); + void RegisterIncludedSelectColumn(String aliasName, String realColumnName); + + // ===================================================================================== + // Where + // ===== + /** + * Register where clause. + * + * @param columnName Column name([table-name].[column-name]). (NotNull) + * @param key Condition key. (NotNull) + * @param value Condition value. (NotNull) + */ + void RegisterWhereClause(String columnName, ${glConditionKeyName} key, ${glConditionValueName} value); + + /** + * Register where clause. + * + * @param clause Where clause. (NotNull) + */ + void RegisterWhereClause(String clause); + + // ===================================================================================== + // InlineWhere + // =========== + void RegisterBaseTableInlineWhereClause(String columnName, ${glConditionKeyName} key, ${glConditionValueName} value); + void RegisterBaseTableInlineWhereClause(String value); + void RegisterOuterJoinInlineWhereClause(String aliasName, String columnName, ${glConditionKeyName} key, ${glConditionValueName} value); + void RegisterOuterJoinInlineWhereClause(String aliasName, String value); + + // ===================================================================================== + // OrderBy + // ======= + /** + * ${database.ImplementComment} + * + * @return this. (NotNull) + */ + ${glOrderByClauseName} GetSqlComponentOfOrderByClause(); + + /** + * Clear order-by. + * + * @return this. (NotNull) + */ + ${glSqlClauseInterfaceName} ClearOrderBy(); + + /** + * Ignore order-by. + * + * @return this. (NotNull) + */ + ${glSqlClauseInterfaceName} IgnoreOrderBy(); + + /** + * Make order-by effective. + * + * @return this. (NotNull) + */ + ${glSqlClauseInterfaceName} MakeOrderByEffective(); + + void ReverseOrderBy_Or_OverrideOrderBy(String columnFullName, bool isAsc); + + void ReverseOrderBy_Or_OverrideOrderBy(String columnFullName, String registeredColumnFullName, bool isAsc); + + /** + * Register order-by-asc. + * + * @param columnFullName Column-full-name([table-name].[column-name]). (NotNull) + */ + void RegisterOrderBy(String columnFullName, bool isAsc); + + /** + * Register order-by-asc. + * + * @param columnFullName Column-full-name([table-name].[column-name]). (NotNull) + */ + void RegisterOrderBy(String columnFullName, String registeredColumnFullName, bool isAsc); + + /** + * Register outer join. + * + * @param joinTableName Join table name(outer join [joinTableName]). (NotNull) + * @param aliasName Alias name of join table. (NotNull and Unique per invoking method.) + * @param joinOnMap Map that has conditions of 'on' clause. (NotNull) + */ + void RegisterOuterJoin(String joinTableName, String aliasName, System.Collections.IDictionary joinOnMap); + + // ===================================================================================== + // Advance + // ======= + /** + * Fetch first. + *

+ * If you invoke this, your SQL returns [fetch-size] records from first. + * If you invoke this, instance-variable[_fetchPageNumber] is initialized as one. + * + * @param fetchSize Fetch-size. (NotMinus) + * @return this. (NotNull) + */ + ${glSqlClauseInterfaceName} FetchFirst(int fetchSize); + + /** + * Fetch scope. + *

+ * If you invoke this, your SQL returns [fetch-size] records from [fetch-start-index]. + * If you invoke this, instance-variable[_fetchPageNumber] is initialized as one. + * + * @param fetchStartIndex Fetch-start-index. 0 origin. (NotMinus) + * @param fetchSize Fetch-size. (NotMinus) + * @return this. (NotNull) + */ + ${glSqlClauseInterfaceName} FetchScope(int fetchStartIndex, int fetchSize); + + /** + * Fetch page. + *

+ * When you invoke this, it is normally necessary to invoke 'fetchFirst()' or 'fetchScope()' ahead of that. + * But you also can use default-fetch-size without invoking 'fetchFirst()' or 'fetchScope()'. + * If you invoke this, your SQL returns [fetch-size] records from [fetch-start-index] calculated by [fetch-page-number]. + * + * @param fetchPageNumber Fetch-page-number. 1 origin. (NotMinus & NotZero) + * @return this. (NotNull) + */ + ${glSqlClauseInterfaceName} FetchPage(int fetchPageNumber); + + /** + * Get fetch start index. + * + * @return Fetch start index. + */ + int FetchStartIndex { get; } + + /** + * Get fetch size. + * + * @return Fetch size. + */ + int FetchSize { get; } + + /** + * Get fetch page number. + * + * @return Fetch page number. + */ + int FetchPageNumber { get; } + + /** + * Get page start index. + * + * @return Page start index. 0 origin. (NotMinus) + */ + int PageStartIndex { get; } + + /** + * Get page end index. + * + * @return Page end index. 0 origin. (NotMinus) + */ + int PageEndIndex { get; } + + /** + * Ignore fetch-narrowing. + * + * @return this. (NotNull) + */ + ${glSqlClauseInterfaceName} IgnoreFetchScope(); + + /** + * Make fetch-narrowing effective. + * + * @return this. (NotNull) + */ + ${glSqlClauseInterfaceName} MakeFetchScopeEffective(); + + /** + * Is fetch scope effective? + * + * @return Determination. + */ + bool IsFetchScopeEffective { get; } + + /** + * Is fetch start index supported? + * + * @return Determination. + */ + bool IsFetchStartIndexSupported { get; } + + /** + * Is fetch size supported? + * + * @return Determination. + */ + bool IsFetchSizeSupported { get; } + + /** + * Lock for update. + *

+ * If you invoke this, your SQL lock target records for update. + * It depends whether this method supports this on the database type. + * + * @return this. (NotNull) + */ + ${glSqlClauseInterfaceName} LockForUpdate(); + + // ===================================================================================== + // FetchNarrowing + // ============== + /** + * Get fetch-narrowing start-index. + * + * @return Fetch-narrowing start-index. + */ + int FetchNarrowingSkipStartIndex { get; } + + /** + * Get fetch-narrowing size. + * + * @return Fetch-narrowing size. + */ + int FetchNarrowingLoopCount { get; } + + /** + * Is fetch-narrowing effective? + * + * @return Determiantion. + */ + bool IsFetchNarrowingEffective { get; } + } +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/cbean/sqlclause/SqlClause_db2.vmnet =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/cbean/sqlclause/SqlClause_db2.vmnet 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/cbean/sqlclause/SqlClause_db2.vmnet 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,116 @@ +#set ($myClassName = "${glSqlClauseInterfaceName}${database.DaoGenDbName}") + +using System; +using System.Collections; +using System.Text; + +namespace ${glPackageBaseCommonSqlClause} { + + ///

+ /// SqlClause for MSSQL. + /// Author: ${database.ClassAuthor} + /// + [System.Serializable] + public class ${myClassName} : ${glSqlClauseAbstractName} { + + /** String of fetch-first as sql-suffix. */ + protected String _fetchFirstSqlSuffix = ""; + + /** String of lock as from-hint. */ + protected String _lockSqlSuffix = ""; + + /** + * Constructor. + * + * @param tableName Table name. (NotNull) + **/ + public ${myClassName}(String tableName) + : base(tableName) {} + + /** + * ${database.ImplementComment} + */ + protected override void DoFetchFirst() { + if (IsFetchSizeSupported) { + _fetchFirstSqlSuffix = " fetch first " + this.FetchSize + " rows only"; + } + } + + /** + * ${database.ImplementComment} + */ + protected override void DoFetchPage() { + if (IsFetchSizeSupported) { + if (IsFetchStartIndexSupported) { + _fetchFirstSqlSuffix = " fetch first " + this.FetchSize + " rows only"; + } else { + _fetchFirstSqlSuffix = " fetch first " + this.PageEndIndex + " rows only"; + } + } + } + + /** + * ${database.ImplementComment} + */ + protected override void DoClearFetchPageClause() { + _fetchFirstSelectHint = ""; + } + + /** + * ${database.OverrideComment} + * + * @return Determination. + */ + public override bool IsFetchStartIndexSupported { + get { + return false; // Default + } + } + + /** + * ${database.ImplementComment} + * + * @return this. (NotNull) + */ + public override ${glSqlClauseInterfaceName} LockForUpdate() { + _lockSqlSuffix = " for update with RS"; + return this; + } + + /** + * ${database.ImplementComment} + * + * @return Select-hint. (NotNull) + */ + protected override String CreateSelectHint() { + return ""; + } + + /** + * ${database.ImplementComment} + * + * @return From-base-table-hint. {select * from table [from-base-table-hint] where ...} (NotNull) + */ + protected override String CreateFromBaseTableHint() { + return ""; + } + + /** + * ${database.ImplementComment} + * + * @return From-hint. (NotNull) + */ + protected override String CreateFromHint() { + return ""; + } + + /** + * ${database.ImplementComment} + * + * @return Sql-suffix. (NotNull) + */ + protected override String CreateSqlSuffix() { + return _fetchFirstSqlSuffix + _lockSqlSuffix;; + } + } +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/cbean/sqlclause/SqlClause_default.vmnet =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/cbean/sqlclause/SqlClause_default.vmnet 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/cbean/sqlclause/SqlClause_default.vmnet 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,110 @@ +#set ($myClassName = "${glSqlClauseInterfaceName}${database.DaoGenDbName}") + +using System; +using System.Collections; +using System.Text; + +namespace ${glPackageBaseCommonSqlClause} { + + /// + /// SqlClause for Default. + /// Author: ${database.ClassAuthor} + /// + [System.Serializable] + public class ${myClassName} : ${glSqlClauseAbstractName} { + + /** + * Constructor. + * + * @param tableName Table name. (NotNull) + **/ + public ${myClassName}(String tableName) + : base(tableName) {} + + /** + * ${database.ImplementComment} + */ + protected override void DoFetchFirst() { + } + + /** + * ${database.ImplementComment} + */ + protected override void DoFetchPage() { + } + + /** + * ${database.ImplementComment} + */ + protected override void DoClearFetchPageClause() { + } + + /** + * ${database.OverrideComment} + * + * @return Determination. + */ + public override bool IsFetchStartIndexSupported { + get { + return false; // Default + } + } + + /** + * ${database.OverrideComment} + * + * @return Determination. + */ + public override bool IsFetchSizeSupported { + get { + return false; // Default + } + } + + /** + * ${database.ImplementComment} + * + * @return this. (NotNull) + */ + public override ${glSqlClauseInterfaceName} LockForUpdate() { + String msg = "LockForUpdate-SQL is unsupported in the database. Sorry...: " + ToString(); + throw new SystemException(msg); + } + + /** + * ${database.ImplementComment} + * + * @return Select-hint. (NotNull) + */ + protected override String CreateSelectHint() { + return ""; + } + + /** + * ${database.ImplementComment} + * + * @return From-base-table-hint. {select * from table [from-base-table-hint] where ...} (NotNull) + */ + protected override String CreateFromBaseTableHint() { + return ""; + } + + /** + * ${database.ImplementComment} + * + * @return From-hint. (NotNull) + */ + protected override String CreateFromHint() { + return ""; + } + + /** + * ${database.ImplementComment} + * + * @return Sql-suffix. (NotNull) + */ + protected override String CreateSqlSuffix() { + return ""; + } + } +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/cbean/sqlclause/SqlClause_derby.vmnet =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/cbean/sqlclause/SqlClause_derby.vmnet 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/cbean/sqlclause/SqlClause_derby.vmnet 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,113 @@ +#set ($myClassName = "${glSqlClauseInterfaceName}${database.DaoGenDbName}") + +using System; +using System.Collections; +using System.Text; + +namespace ${glPackageBaseCommonSqlClause} { + + /// + /// SqlClause for Apache Derby. + /// Author: ${database.ClassAuthor} + /// + [System.Serializable] + public class ${myClassName} : ${glSqlClauseAbstractName} { + + /** String of lock as sql-suffix. */ + protected String _lockSqlSuffix = ""; + + /** + * Constructor. + * + * @param tableName Table name. (NotNull) + **/ + public ${myClassName}(String tableName) + : base(tableName) {} + + /** + * ${database.ImplementComment} + */ + protected override void DoFetchFirst() { + } + + /** + * ${database.ImplementComment} + */ + protected override void DoFetchPage() { + } + + /** + * ${database.ImplementComment} + */ + protected override void DoClearFetchPageClause() { + } + + /** + * ${database.OverrideComment} + * + * @return Determination. + */ + public override bool IsFetchStartIndexSupported { + get { + return false; // Default + } + } + + /** + * ${database.OverrideComment} + * + * @return Determination. + */ + public override bool IsFetchSizeSupported { + get { + return false; // Default + } + } + + /** + * ${database.ImplementComment} + * + * @return this. (NotNull) + */ + public override ${glSqlClauseInterfaceName} LockForUpdate() { + _lockSqlSuffix = " for update"; + return this; + } + + /** + * ${database.ImplementComment} + * + * @return Select-hint. (NotNull) + */ + protected override String CreateSelectHint() { + return _fetchFirstSelectHint; + } + + /** + * ${database.ImplementComment} + * + * @return From-base-table-hint. {select * from table [from-base-table-hint] where ...} (NotNull) + */ + protected override String CreateFromBaseTableHint() { + return ""; + } + + /** + * ${database.ImplementComment} + * + * @return From-hint. (NotNull) + */ + protected override String CreateFromHint() { + return ""; + } + + /** + * ${database.ImplementComment} + * + * @return Sql-suffix. (NotNull) + */ + protected override String CreateSqlSuffix() { + return _lockSqlSuffix; + } + } +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/cbean/sqlclause/SqlClause_firebird.vmnet =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/cbean/sqlclause/SqlClause_firebird.vmnet 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/cbean/sqlclause/SqlClause_firebird.vmnet 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,107 @@ +#set ($myClassName = "${glSqlClauseInterfaceName}${database.DaoGenDbName}") + +using System; +using System.Collections; +using System.Text; + +namespace ${glPackageBaseCommonSqlClause} { + + /// + /// SqlClause for MSSQL. + /// Author: ${database.ClassAuthor} + /// + [System.Serializable] + public class ${myClassName} : ${glSqlClauseAbstractName} { + + /** String of fetch-scope as select-hint. */ + protected String _fetchScopeSelectHint = ""; + + /** String of lock as sql-suffix. */ + protected String _lockSqlSuffix = ""; + + /** + * Constructor. + * + * @param tableName Table name. (NotNull) + **/ + public ${myClassName}(String tableName) + : base(tableName) {} + + /** + * ${database.ImplementComment} + */ + protected override void DoFetchFirst() { + if (this.IsFetchSizeSupported) { + _fetchScopeSelectHint = " first " + this.FetchSize; + } + } + + /** + * ${database.ImplementComment} + */ + protected override void DoFetchPage() { + if (this.IsFetchStartIndexSupported && this.IsFetchSizeSupported) { + _fetchScopeSelectHint = " first " + this.FetchSize + " skip " + this.PageStartIndex; + } + if (this.IsFetchStartIndexSupported && !this.IsFetchSizeSupported) { + _fetchScopeSelectHint = " skip " + this.PageStartIndex; + } + if (!this.IsFetchStartIndexSupported && this.IsFetchSizeSupported) { + _fetchScopeSelectHint = " first " + this.PageEndIndex; + } + } + + /** + * ${database.ImplementComment} + */ + protected override void DoClearFetchPageClause() { + _fetchScopeSelectHint = ""; + } + + /** + * ${database.ImplementComment} + * + * @return this. (NotNull) + */ + public override ${glSqlClauseInterfaceName} LockForUpdate() { + _lockSqlSuffix = " for update with lock"; + return this; + } + + /** + * ${database.ImplementComment} + * + * @return Select-hint. (NotNull) + */ + protected override String CreateSelectHint() { + return _fetchScopeSelectHint; + } + + /** + * ${database.ImplementComment} + * + * @return From-base-table-hint. {select * from table [from-base-table-hint] where ...} (NotNull) + */ + protected override String CreateFromBaseTableHint() { + return ""; + } + + /** + * ${database.ImplementComment} + * + * @return From-hint. (NotNull) + */ + protected override String CreateFromHint() { + return ""; + } + + /** + * ${database.ImplementComment} + * + * @return Sql-suffix. (NotNull) + */ + protected override String CreateSqlSuffix() { + return _lockSqlSuffix; + } + } +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/cbean/sqlclause/SqlClause_interbase.vmnet =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/cbean/sqlclause/SqlClause_interbase.vmnet 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/cbean/sqlclause/SqlClause_interbase.vmnet 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,107 @@ +#set ($myClassName = "${glSqlClauseInterfaceName}${database.DaoGenDbName}") + +using System; +using System.Collections; +using System.Text; + +namespace ${glPackageBaseCommonSqlClause} { + + /// + /// SqlClause for Interbase. + /// Author: ${database.ClassAuthor} + /// + [System.Serializable] + public class ${myClassName} : ${glSqlClauseAbstractName} { + + /** String of fetch-scope as select-hint. */ + protected String _fetchScopeSelectHint = ""; + + /** String of lock as sql-suffix. */ + protected String _lockSqlSuffix = ""; + + /** + * Constructor. + * + * @param tableName Table name. (NotNull) + **/ + public ${myClassName}(String tableName) + : base(tableName) {} + + /** + * ${database.ImplementComment} + */ + protected override void DoFetchFirst() { + if (this.IsFetchSizeSupported) { + _fetchScopeSelectHint = " first " + this.FetchSize; + } + } + + /** + * ${database.ImplementComment} + */ + protected override void DoFetchPage() { + if (this.IsFetchStartIndexSupported && this.IsFetchSizeSupported) { + _fetchScopeSelectHint = " first " + this.FetchSize + " skip " + this.PageStartIndex; + } + if (this.IsFetchStartIndexSupported && !this.IsFetchSizeSupported) { + _fetchScopeSelectHint = " skip " + this.PageStartIndex; + } + if (!this.IsFetchStartIndexSupported && this.IsFetchSizeSupported) { + _fetchScopeSelectHint = " first " + this.PageEndIndex; + } + } + + /** + * ${database.ImplementComment} + */ + protected override void DoClearFetchPageClause() { + _fetchScopeSelectHint = ""; + } + + /** + * ${database.ImplementComment} + * + * @return this. (NotNull) + */ + public override ${glSqlClauseInterfaceName} LockForUpdate() { + _lockSqlSuffix = " for update with lock"; + return this; + } + + /** + * ${database.ImplementComment} + * + * @return Select-hint. (NotNull) + */ + protected override String CreateSelectHint() { + return _fetchScopeSelectHint; + } + + /** + * ${database.ImplementComment} + * + * @return From-base-table-hint. {select * from table [from-base-table-hint] where ...} (NotNull) + */ + protected override String CreateFromBaseTableHint() { + return ""; + } + + /** + * ${database.ImplementComment} + * + * @return From-hint. (NotNull) + */ + protected override String CreateFromHint() { + return ""; + } + + /** + * ${database.ImplementComment} + * + * @return Sql-suffix. (NotNull) + */ + protected override String CreateSqlSuffix() { + return _lockSqlSuffix; + } + } +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/cbean/sqlclause/SqlClause_mssql.vmnet =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/cbean/sqlclause/SqlClause_mssql.vmnet 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/cbean/sqlclause/SqlClause_mssql.vmnet 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,116 @@ +#set ($myClassName = "${glSqlClauseInterfaceName}${database.DaoGenDbName}") + +using System; +using System.Collections; +using System.Text; + +namespace ${glPackageBaseCommonSqlClause} { + + /// + /// SqlClause for MSSQL. + /// Author: ${database.ClassAuthor} + /// + [System.Serializable] + public class ${myClassName} : ${glSqlClauseAbstractName} { + + /** String of fetch-first as select-hint. */ + protected String _fetchFirstSelectHint = ""; + + /** String of lock as from-hint. */ + protected String _lockFromHint = ""; + + /** + * Constructor. + * + * @param tableName Table name. (NotNull) + **/ + public ${myClassName}(String tableName) + : base(tableName) {} + + /** + * ${database.ImplementComment} + */ + protected override void DoFetchFirst() { + if (this.IsFetchSizeSupported) { + _fetchFirstSelectHint = " top " + this.FetchSize; + } + } + + /** + * ${database.ImplementComment} + */ + protected override void DoFetchPage() { + if (this.IsFetchSizeSupported) { + if (this.IsFetchStartIndexSupported) { + _fetchFirstSelectHint = " top " + this.FetchSize; + } else { + _fetchFirstSelectHint = " top " + this.PageEndIndex; + } + } + } + + /** + * ${database.ImplementComment} + */ + protected override void DoClearFetchPageClause() { + _fetchFirstSelectHint = ""; + } + + /** + * ${database.OverrideComment} + * + * @return Determination. + */ + public override bool IsFetchStartIndexSupported { + get { + return false; // Default + } + } + + /** + * ${database.ImplementComment} + * + * @return this. (NotNull) + */ + public override ${glSqlClauseInterfaceName} LockForUpdate() { + _lockFromHint = " with (updlock)"; + return this; + } + + /** + * ${database.ImplementComment} + * + * @return Select-hint. (NotNull) + */ + protected override String CreateSelectHint() { + return _fetchFirstSelectHint; + } + + /** + * ${database.ImplementComment} + * + * @return From-base-table-hint. {select * from table [from-base-table-hint] where ...} (NotNull) + */ + protected override String CreateFromBaseTableHint() { + return _lockFromHint; + } + + /** + * ${database.ImplementComment} + * + * @return From-hint. (NotNull) + */ + protected override String CreateFromHint() { + return ""; + } + + /** + * ${database.ImplementComment} + * + * @return Sql-suffix. (NotNull) + */ + protected override String CreateSqlSuffix() { + return ""; + } + } +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/cbean/sqlclause/SqlClause_mysql.vmnet =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/cbean/sqlclause/SqlClause_mysql.vmnet 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/cbean/sqlclause/SqlClause_mysql.vmnet 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,97 @@ +#set ($myClassName = "${glSqlClauseInterfaceName}${database.DaoGenDbName}") + +using System; +using System.Collections; +using System.Text; + +namespace ${glPackageBaseCommonSqlClause} { + + /// + /// SqlClause for Apache Derby. + /// Author: ${database.ClassAuthor} + /// + [System.Serializable] + public class ${myClassName} : ${glSqlClauseAbstractName} { + + /** String of fetch-scope as sql-suffix. */ + protected String _fetchScopeSqlSuffix = ""; + + /** String of lock as sql-suffix. */ + protected String _lockSqlSuffix = ""; + + /** + * Constructor. + * + * @param tableName Table name. (NotNull) + **/ + public ${myClassName}(String tableName) + : base(tableName) {} + + /** + * ${database.ImplementComment} + */ + protected override void DoFetchFirst() { + DoFetchPage(); + } + + /** + * ${database.ImplementComment} + */ + protected override void DoFetchPage() { + _fetchScopeSqlSuffix = " limit " + this.PageStartIndex + ", " + this.FetchSize; + } + + /** + * ${database.ImplementComment} + */ + protected override void DoClearFetchPageClause() { + _fetchScopeSqlSuffix = ""; + } + + /** + * ${database.ImplementComment} + * + * @return this. (NotNull) + */ + public override ${glSqlClauseInterfaceName} LockForUpdate() { + _lockSqlSuffix = " for update"; + return this; + } + + /** + * ${database.ImplementComment} + * + * @return Select-hint. (NotNull) + */ + protected override String CreateSelectHint() { + return ""; + } + + /** + * ${database.ImplementComment} + * + * @return From-base-table-hint. {select * from table [from-base-table-hint] where ...} (NotNull) + */ + protected override String CreateFromBaseTableHint() { + return ""; + } + + /** + * ${database.ImplementComment} + * + * @return From-hint. (NotNull) + */ + protected override String CreateFromHint() { + return ""; + } + + /** + * ${database.ImplementComment} + * + * @return Sql-suffix. (NotNull) + */ + protected override String CreateSqlSuffix() { + return _fetchScopeSqlSuffix + _lockSqlSuffix; + } + } +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/cbean/sqlclause/SqlClause_oracle.vmnet =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/cbean/sqlclause/SqlClause_oracle.vmnet 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/cbean/sqlclause/SqlClause_oracle.vmnet 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,118 @@ +#set ($myClassName = "${glSqlClauseInterfaceName}${database.DaoGenDbName}") + +using System; +using System.Collections; +using System.Text; + +namespace ${glPackageBaseCommonSqlClause} { + + /// + /// SqlClause for Apache Derby. + /// Author: ${database.ClassAuthor} + /// + [System.Serializable] + public class ${myClassName} : ${glSqlClauseAbstractName} { + + /** String of fetch-scope as select-hint. */ + protected String _fetchScopeSelectHint = ""; + + /** String of fetch-scope as sql-suffix. */ + protected String _fetchScopeSqlSuffix = ""; + + /** String of lock as sql-suffix. */ + protected String _lockSqlSuffix = ""; + + /** + * Constructor. + * + * @param tableName Table name. (NotNull) + **/ + public ${myClassName}(String tableName) + : base(tableName) {} + + /** + * ${database.ImplementComment} + */ + protected override void DoFetchFirst() { + if (IsFetchSizeSupported) { + _fetchScopeSelectHint = " * from (select"; + _fetchScopeSqlSuffix = ") where rownum <= " + this.FetchSize; + } + } + + /** + * ${database.ImplementComment} + */ + protected override void DoFetchPage() { + if (!IsFetchStartIndexSupported && !IsFetchSizeSupported) { + return; + } + _fetchScopeSelectHint = " * from (select"; + _fetchScopeSqlSuffix = ""; + if (IsFetchStartIndexSupported) { + _fetchScopeSqlSuffix = ") where rownum > " + this.PageStartIndex; + } + if (IsFetchSizeSupported) { + if (IsFetchStartIndexSupported) { + _fetchScopeSqlSuffix = _fetchScopeSqlSuffix + " and rownum <= " + this.PageEndIndex; + } else { + _fetchScopeSqlSuffix = ") where rownum <= " + this.FetchSize; + } + } + } + + /** + * ${database.ImplementComment} + */ + protected override void DoClearFetchPageClause() { + _fetchScopeSelectHint = ""; + _fetchScopeSqlSuffix = ""; + } + + /** + * ${database.ImplementComment} + * + * @return this. (NotNull) + */ + public override ${glSqlClauseInterfaceName} LockForUpdate() { + _lockSqlSuffix = " for update"; + return this; + } + + /** + * ${database.ImplementComment} + * + * @return Select-hint. (NotNull) + */ + protected override String CreateSelectHint() { + return _fetchFirstSelectHint; + } + + /** + * ${database.ImplementComment} + * + * @return From-base-table-hint. {select * from table [from-base-table-hint] where ...} (NotNull) + */ + protected override String CreateFromBaseTableHint() { + return _fetchScopeSelectHint; + } + + /** + * ${database.ImplementComment} + * + * @return From-hint. (NotNull) + */ + protected override String CreateFromHint() { + return ""; + } + + /** + * ${database.ImplementComment} + * + * @return Sql-suffix. (NotNull) + */ + protected override String CreateSqlSuffix() { + return _fetchScopeSqlSuffix + _lockSqlSuffix; + } + } +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/cbean/sqlclause/SqlClause_postgresql.vmnet =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/cbean/sqlclause/SqlClause_postgresql.vmnet 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/cbean/sqlclause/SqlClause_postgresql.vmnet 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,97 @@ +#set ($myClassName = "${glSqlClauseInterfaceName}${database.DaoGenDbName}") + +using System; +using System.Collections; +using System.Text; + +namespace ${glPackageBaseCommonSqlClause} { + + /// + /// SqlClause for Apache Derby. + /// Author: ${database.ClassAuthor} + /// + [System.Serializable] + public class ${myClassName} : ${glSqlClauseAbstractName} { + + /** String of fetch-scope as sql-suffix. */ + protected String _fetchScopeSqlSuffix = ""; + + /** String of lock as sql-suffix. */ + protected String _lockSqlSuffix = ""; + + /** + * Constructor. + * + * @param tableName Table name. (NotNull) + **/ + public ${myClassName}(String tableName) + : base(tableName) {} + + /** + * ${database.ImplementComment} + */ + protected override void DoFetchFirst() { + DoFetchPage(); + } + + /** + * ${database.ImplementComment} + */ + protected override void DoFetchPage() { + _fetchScopeSqlSuffix = " offset " + this.PageStartIndex + " limit " + this.getFetchSize; + } + + /** + * ${database.ImplementComment} + */ + protected override void DoClearFetchPageClause() { + _fetchScopeSqlSuffix = ""; + } + + /** + * ${database.ImplementComment} + * + * @return this. (NotNull) + */ + public override ${glSqlClauseInterfaceName} LockForUpdate() { + _lockSqlSuffix = " for update"; + return this; + } + + /** + * ${database.ImplementComment} + * + * @return Select-hint. (NotNull) + */ + protected override String CreateSelectHint() { + return ""; + } + + /** + * ${database.ImplementComment} + * + * @return From-base-table-hint. {select * from table [from-base-table-hint] where ...} (NotNull) + */ + protected override String CreateFromBaseTableHint() { + return ""; + } + + /** + * ${database.ImplementComment} + * + * @return From-hint. (NotNull) + */ + protected override String CreateFromHint() { + return ""; + } + + /** + * ${database.ImplementComment} + * + * @return Sql-suffix. (NotNull) + */ + protected override String CreateSqlSuffix() { + return _fetchScopeSqlSuffix + _lockSqlSuffix; + } + } +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/dbmeta/AbstractDBMeta.vmnet =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/dbmeta/AbstractDBMeta.vmnet 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/dbmeta/AbstractDBMeta.vmnet 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,427 @@ + +#set ($myClassName = "${glDBMetaAbstractName}") + +using System; +using System.Text; + +using ${glPackageBaseCommon}; +using ${glPackageBaseCommonCBean}; + +namespace ${glPackageBaseCommonDBMeta} { + + /// + /// The abstract class of dbmeta. + /// Author : ${database.ClassAuthor} + /// + public abstract class ${myClassName} : ${glDBMetaInterfaceName} { + + // ===================================================================================== + // Table Name + // ========== + /// + /// ${database.ImplementComment} + /// + /// Table db-name. (NotNull) + abstract public String GetTableDbName(); + + /// + /// ${database.ImplementComment} + /// + /// Table cap-prop-name. (NotNull) + abstract public String GetTableCapPropName(); + + /// + /// ${database.ImplementComment} + /// + /// Table uncap-prop-name. (NotNull) + abstract public String GetTableUncapPropName(); + + // ===================================================================================== + // DB-Name Method + // ============== + /// + /// ${database.ImplementComment} + /// + /// Db-name. (NotNull) + /// Determination. + public bool IsExistDbName(String dbName) { + return GetDbNameCapPropNameMap().ContainsKey(dbName); + } + + /// + /// ${database.ImplementComment} + /// + /// Capitalized property-name. (NotNull) + /// Determination. + public bool IsExistCapPropName(String capPropName) { + return GetCapPropNameDbNameMap().ContainsKey(capPropName); + } + + /// + /// ${database.ImplementComment} + /// + /// Uncapitalized property-name. (NotNull) + /// Determination. + public bool IsExistUncapPropName(String unCapPropName) { + return GetUncapPropNameDbNameMap().ContainsKey(unCapPropName); + } + + /// + /// ${database.ImplementComment} + /// + /// Multi-name. (NotNull) + /// Determination. + public bool IsExistMultiName(String multiName) { + if (IsExistDbName(multiName)) { + return true; + } + if (IsExistCapPropName(multiName)) { + return true; + } + if (IsExistUncapPropName(multiName)) { + return true; + } + return false; + } + + /// + /// ${database.ImplementComment} + /// + /// Uncapitalized property-name. (NotNull) + /// {db-name : cap-prop-name} map. + public String GetDbNameByUncapPropName(String unCapPropName) { + AssertStringNotNullAndNotTrimmedEmpty("unCapPropName", unCapPropName); + String dbName = null; + try { + dbName = (String)GetUncapPropNameDbNameMap()[unCapPropName]; + } catch (System.Collections.Generic.KeyNotFoundException e) { + String msg = "The propertyNameDbNameMap didn't contain the key of '" + unCapPropName + "': "; + throw new ArgumentOutOfRangeException(msg + Seasar.Framework.Util.ToStringUtil.ToString(GetUncapPropNameDbNameMap()), e); + } + return dbName; + } + + /// + /// ${database.ImplementComment} + /// + /// Db-name. (NotNull) + /// Uncapitalized property-name. (NotNull) + public String GetUncapPropNameByDbName(String dbName) { + AssertStringNotNullAndNotTrimmedEmpty("dbName", dbName); + if (dbName == null) { + String msg = "The argument[dbName] must not be null."; + throw new ArgumentNullException(msg); + } + String unCapPropName = null; + try { + unCapPropName = (String)GetDbNameUncapPropNameMap()[dbName]; + } catch (System.Collections.Generic.KeyNotFoundException e) { + String msg = "The dbNameUncapPropNameMap didn't contain the key of '" + dbName + "': "; + throw new ArgumentOutOfRangeException(msg + Seasar.Framework.Util.ToStringUtil.ToString(GetDbNameUncapPropNameMap()), e); + } + return unCapPropName; + } + + /// + /// ${database.ImplementComment} + /// + /// Capitalized property-name. (NotNull) + /// Db-name. + public String GetDbNameByCapPropName(String capPropName) { + AssertStringNotNullAndNotTrimmedEmpty("capPropName", capPropName); + String dbName = null; + try { + dbName = (String)GetCapPropNameDbNameMap()[capPropName]; + } catch (System.Collections.Generic.KeyNotFoundException e) { + String msg = "The capPropNameDbNameMap didn't contain the key of '" + capPropName + "': "; + throw new ArgumentOutOfRangeException(msg + Seasar.Framework.Util.ToStringUtil.ToString(GetCapPropNameDbNameMap()), e); + } + return dbName; + } + + /// + /// ${database.ImplementComment} + /// + /// Db-name. (NotNull) + /// Capitalized property-name. + public String GetCapPropNameByDbName(String dbName) { + AssertStringNotNullAndNotTrimmedEmpty("dbName", dbName); + String capPropName = null; + try { + capPropName = (String)GetDbNameCapPropNameMap()[dbName]; + } catch (System.Collections.Generic.KeyNotFoundException e) { + String msg = "The dbNameCapPropNameMap didn't contain the key of '" + dbName + "': "; + throw new ArgumentOutOfRangeException(msg + Seasar.Framework.Util.ToStringUtil.ToString(GetDbNameCapPropNameMap()), e); + } + return capPropName; + } + + /// + /// ${database.ImplementComment} + /// + /// Uncap-prop-name. (NotNull) + /// Capitalized property-name. (NotNull) + public String GetCapPropNameByUncapPropName(String unCapProp) { + AssertStringNotNullAndNotTrimmedEmpty("unCapProp", unCapProp); + String capPropName = null; + try { + capPropName = (String)GetUncapPropNameCapPropNameMap()[unCapProp]; + } catch (System.Collections.Generic.KeyNotFoundException e) { + String msg = "The uncapPropNameCapPropNameMap didn't contain the key of '" + unCapProp + "': "; + throw new ArgumentOutOfRangeException(msg + Seasar.Framework.Util.ToStringUtil.ToString(GetUncapPropNameCapPropNameMap()), e); + } + return capPropName; + } + + /// + /// ${database.ImplementComment} + /// + /// Cap-prop-name. (NotNull) + /// Uncapitalized property-name. (NotNull) + public String GetUncapPropNameByCapPropName(String capProp) { + AssertStringNotNullAndNotTrimmedEmpty("capProp", capProp); + String uncapPropName = null; + try { + uncapPropName = (String)GetCapPropNameUncapPropNameMap()[capProp]; + } catch (System.Collections.Generic.KeyNotFoundException e) { + String msg = "The capPropNameCapPropNameMap didn't contain the key of '" + capProp + "': "; + throw new ArgumentOutOfRangeException(msg + Seasar.Framework.Util.ToStringUtil.ToString(GetCapPropNameUncapPropNameMap()), e); + } + return uncapPropName; + } + + /// + /// ${database.ImplementComment} + /// + /// Multi-name. (NotNull) + /// Db-name. + public String GetDbNameByMultiName(String multiName) { + AssertStringNotNullAndNotTrimmedEmpty("multiName", multiName); + if (IsExistDbName(multiName)) { + return multiName; + } + if (IsExistCapPropName(multiName)) { + return GetDbNameByCapPropName(multiName); + } + if (IsExistUncapPropName(multiName)) { + return GetDbNameByUncapPropName(multiName); + } + String msg = "The multi-name is invalid: multiName=" + multiName; + throw new ArgumentOutOfRangeException(msg); + } + + /// + /// Get cap-prop-name by multi-name. + /// + /// Multi-name. (NotNull) + /// Cap-prop-name. (NotNull) + public String GetCapPropNameByMultiName(String multiName) { + AssertStringNotNullAndNotTrimmedEmpty("multiName", multiName); + if (IsExistDbName(multiName)) { + return GetCapPropNameByDbName(multiName); + } + if (IsExistCapPropName(multiName)) { + return multiName; + } + if (IsExistUncapPropName(multiName)) { + return GetCapPropNameByUncapPropName(multiName); + } + String msg = "The multi-name is invalid: multiName=" + multiName; + throw new ArgumentOutOfRangeException(msg); + } + + /// + /// Get uncap-prop-name by multi-name. + /// + /// Multi-name. (NotNull) + /// Uncap-prop-name. (NotNull) + public String GetUncapPropNameByMultiName(String multiName) { + AssertStringNotNullAndNotTrimmedEmpty("multiName", multiName); + if (IsExistDbName(multiName)) { + return GetUncapPropNameByDbName(multiName); + } + if (IsExistCapPropName(multiName)) { + return GetUncapPropNameByCapPropName(multiName); + } + if (IsExistUncapPropName(multiName)) { + return multiName; + } + String msg = "The multi-name is invalid: multiName=" + multiName; + throw new ArgumentOutOfRangeException(msg); + } + + // ===================================================================================== + // DB-Name-Map Getter + // ================== + /// + /// ${database.ImplementComment} + /// + /// {uncap-prop-name : db-name} map. + abstract public System.Collections.Generic.IDictionary GetUncapPropNameDbNameMap(); + + /// + /// ${database.ImplementComment} + /// + /// {db-name : uncap-prop-name} map. + abstract public System.Collections.Generic.IDictionary GetDbNameUncapPropNameMap(); + + /// + /// ${database.ImplementComment} + /// + /// {cap-prop-name : db-name} map. + abstract public System.Collections.Generic.IDictionary GetCapPropNameDbNameMap(); + + /// + /// ${database.ImplementComment} + /// + /// {db-name : cap-prop-name} map. + abstract public System.Collections.Generic.IDictionary GetDbNameCapPropNameMap(); + + /// + /// ${database.ImplementComment} + /// + /// {cap-prop-name : uncap-prop-name} map. + abstract public System.Collections.Generic.IDictionary GetCapPropNameUncapPropNameMap(); + + /// + /// ${database.ImplementComment} + /// + /// {uncap-prop-name : cap-prop-name} map. + abstract public System.Collections.Generic.IDictionary GetUncapPropNameCapPropNameMap(); + + // ===================================================================================== + // Type Getter + // =========== + /** + * Get the type of dao. + * + * @return The type of dao. (NotNull) + */ + abstract public Type GetDaoType(); + + /** + * Get the type of entity. + * + * @return The type of entity. (NotNull) + */ + abstract public Type GetEntityType(); + + /** + * Get the type of condition-bean. + * + * @return The type of condition-bean. (NotNull) + */ + abstract public Type GetConditionBeanType(); + + // ===================================================================================== + // Instance Getter + // =============== + /** + * New the instance of entity. + * + * @return The instance of entity. (NotNull) + */ + abstract public ${glEntityInterfaceName} NewEntity(); + + /** + * New the instance of condition-bean. + * + * @return The instance of condition-bean. (NotNull) + */ + abstract public ${glConditionBeanInterfaceName} NewConditionBean(); +#if ($database.isMakeDeprecated()) + + // ===================================================================================== + // Entity PropertyInfo + // =================== + #region Entity PropertyInfo + /// + /// ${database.ImplementComment} + /// + /// Multi-name. (NotNull) + /// Entity property-info. (NotNull) + [Obsolete("There is more available object. {org.seasar.framework.beans.factory.BeanDescFactory}")] + abstract public System.Reflection.PropertyInfo GetEntityPropertyInfoByMultiName(String multiName); + #endregion +#end + + // ===================================================================================== + // Foreign DBMeta + // ============== + /// + /// ${database.ImplementComment} + /// + /// Foreign-property-name(Both OK - InitCap or not). (NotNull) + /// Foreign DBMeta. (NotNull) + abstract public ${glDBMetaInterfaceName} GetForeignDBMeta(String foreignPropertyName); + + // ===================================================================================== + // Determination + // ============= + /** + * ${database.ImplementComment} + * + * @return Determination. + */ + abstract public bool HasTwoOrMorePrimaryKeys { get; } + + /** + * ${database.ImplementComment} + * + * @return Determination. + */ + abstract public bool HasCommonColumn { get; } + + // ---------------------------------------------------------------- + // Assert Object + // ------------- + #region Assert Object + + /** + * Assert that the argument is not null. + * + * @param variableName Variable name. (NotNull) + * @param arg Argument. (NotNull) + */ + protected void AssertObjectNotNull(String variableName, Object arg) { + if (variableName == null) { + String msg = "Argument[variableName] should not be null."; + throw new ArgumentNullException(msg); + } + if (arg == null) { + String msg = "Argument[" + variableName + "] should not be null."; + throw new ArgumentNullException(msg); + } + } + + #endregion + + // ---------------------------------------------------------------- + // Assert String + // ------------- + #region Assert Argument + + /** + * Assert that the string is not null and not trimmed empty. + * + * @param variableName Variable name. (NotNull) + * @param arg Argument. (NotNull) + */ + protected void AssertStringNotNullAndNotTrimmedEmpty(String variableName, String value) { + if (variableName == null) { + String msg = "Variable[variableName] should not be null."; + throw new ArgumentNullException(msg); + } + if (value == null) { + String msg = "Variable[" + variableName + "] should not be null."; + throw new ArgumentNullException(msg); + } + if (value.Trim().Length == 0) { + String msg = "Variable[" + variableName + "] should not be empty: [" + value + "]"; + throw new ArgumentOutOfRangeException(msg); + } + } + + #endregion + } +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/dbmeta/DBMeta.vmnet =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/dbmeta/DBMeta.vmnet 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/dbmeta/DBMeta.vmnet 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,253 @@ +#set ($myClassName = "${glDBMetaInterfaceName}") + +using System; + +using ${glPackageBaseCommon}; +using ${glPackageBaseCommonCBean}; + +namespace ${glPackageBaseCommonDBMeta} { + + /// + /// The interface of dbmeta. + /// Author : ${database.ClassAuthor} + /// + public interface ${myClassName} { + + // ===================================================================================== + // Table Name + // ========== + /// + /// Get table db-name. + /// + /// Table db-name. (NotNull) + String GetTableDbName(); + + /// + /// Get table cap-prop-name. + /// + /// Table cap-prop-name. (NotNull) + String GetTableCapPropName(); + + /// + /// Get table uncap-prop-name. + /// + /// Table uncap-prop-name. (NotNull) + String GetTableUncapPropName(); + + // ===================================================================================== + // DB-Name Method + // ============== + /// + /// Is existing db-name. + /// + /// Db-name. (NotNull) + /// Determination. + bool IsExistDbName(String dbName); + + /// + /// Is existing cap-prop-name. + /// + /// Capitalized property-name. (NotNull) + /// Determination. + bool IsExistCapPropName(String capPropName); + + /// + /// Is existing un-cap-prop-name. + /// + /// Uncapitalized property-name. (NotNull) + /// Determination. + bool IsExistUncapPropName(String unCapProp); + + /// + /// Is existing multi-name. + /// + /// Multi-name. (NotNull) + /// Determination. (NotNull) + bool IsExistMultiName(String multiName); + + /// + /// Get db-name by un-cap-prop-name. + /// + /// Uncapitalized property-name. (NotNull) + /// Db-name. (NotNull) + String GetDbNameByUncapPropName(String unCapProp); + + /// + /// Get un-cap-prop-name by db-name. + /// + /// Db-name. + /// Uncapitalized property-name. (NotNull) + String GetUncapPropNameByDbName(String dbName); + + /// + /// Get db-name by cap-prop-name. + /// + /// Capitalized property-name. (NotNull) + /// Db-name. + String GetDbNameByCapPropName(String capPropName); + + /// + /// Get cap-prop-name by db-name. + /// + /// Db-name. (NotNull) + /// Capitalized property-name. (NotNull) + String GetCapPropNameByDbName(String dbName); + + /// + /// Get cap-prop-name by uncap-prop-name. + /// + /// Uncap-prop-name. (NotNull) + /// Capitalized property-name. (NotNull) + String GetCapPropNameByUncapPropName(String unCapProp); + + /// + /// Get uncap-prop-name by cap-prop-name. + /// + /// Cap-prop-name. (NotNull) + /// Uncapitalized property-name. (NotNull) + String GetUncapPropNameByCapPropName(String capProp); + + /// + /// Get db-name by property-name. + /// + /// Multi-name. (NotNull) + /// Db-name. (NotNull) + String GetDbNameByMultiName(String multiName); + + /// + /// Get cap-prop-name by multi-name. + /// + /// Multi-name. (NotNull) + /// Cap-prop-name. (NotNull) + String GetCapPropNameByMultiName(String multiName); + + /// + /// Get uncap-prop-name by multi-name. + /// + /// Multi-name. (NotNull) + /// Uncap-prop-name. (NotNull) + String GetUncapPropNameByMultiName(String multiName); + + // ===================================================================================== + // DB-Name-Map Getter + // ================== + /// + /// Get uncap-prop-name db-name map. + /// + /// {un-cap-prop-name : db-name} map. + System.Collections.Generic.IDictionary GetUncapPropNameDbNameMap(); + + /// + /// Get db-name uncap-prop-name map. + /// + /// {db-name : un-cap-prop-name} map. + System.Collections.Generic.IDictionary GetDbNameUncapPropNameMap(); + + /// + /// Get cap-prop-name db-name map. + /// + /// {cap-prop-name : db-name} map. + System.Collections.Generic.IDictionary GetCapPropNameDbNameMap(); + + /// + /// Get db-name cap-prop-name map. + /// + /// {db-name : cap-prop-name} map. + System.Collections.Generic.IDictionary GetDbNameCapPropNameMap(); + + /// + /// Get cap-prop-name uncap-prop-name map. + /// + /// {cap-prop-name : uncap-prop-name} map. + System.Collections.Generic.IDictionary GetCapPropNameUncapPropNameMap(); + + /// + /// Get uncap-prop-name cap-prop-name map. + /// + /// {uncap-prop-name : cap-prop-name} map. + System.Collections.Generic.IDictionary GetUncapPropNameCapPropNameMap(); + + // ===================================================================================== + // Type Getter + // =========== + /** + * Get the type of dao. + * + * @return The type of dao. (NotNull) + */ + Type GetDaoType(); + + /** + * Get the type of entity. + * + * @return The type of entity. (NotNull) + */ + Type GetEntityType(); + + /** + * Get the type of condition-bean. + * + * @return The type of condition-bean. (NotNull) + */ + Type GetConditionBeanType(); + + // ===================================================================================== + // Instance Getter + // =============== + /** + * New the instance of entity. + * + * @return The instance of entity. (NotNull) + */ + ${glEntityInterfaceName} NewEntity(); + + /** + * New the instance of condition-bean. + * + * @return The instance of condition-bean. (NotNull) + */ + ${glConditionBeanInterfaceName} NewConditionBean(); +#if ($database.isMakeDeprecated()) + + // ===================================================================================== + // Entity PropertyInfo + // =================== + #region Entity PropertyInfo + /// + /// Get entity property-info by multi-name. + /// + /// Multi-name. (NotNull) + /// Entity property-info of entity. (NotNull) + [Obsolete("There is more available object. {org.seasar.framework.beans.factory.BeanDescFactory}")] + System.Reflection.PropertyInfo GetEntityPropertyInfoByMultiName(String multiName); + #endregion +#end + + // ===================================================================================== + // Foreign DBMeta + // ============== + /// + /// Get foreign dbmeta. + /// + /// Foreign-property-name(Both OK - InitCap or not). (NotNull) + /// Foreign DBMeta. (NotNull) + ${myClassName} GetForeignDBMeta(String foreignPropertyName); + + // ===================================================================================== + // Determination + // ============= + /** + * Has two or more primary-keys? + * + * @return Determination. + */ + bool HasTwoOrMorePrimaryKeys { get; } + + /** + * Has common column? + * + * @return Determination. + */ + bool HasCommonColumn { get; } + } +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/dbmeta/DBMetaInstanceHandler.vmnet =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/dbmeta/DBMetaInstanceHandler.vmnet 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/dbmeta/DBMetaInstanceHandler.vmnet 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,179 @@ + +#set ($myClassName = "${glDBMetaInstanceHandlerName}") +#set ($instanceMapGenericDefinition = "String, ${glDBMetaInterfaceName}") + +using System; +using System.Collections.Generic; + +namespace ${glPackageBaseCommonDBMeta} { + + /// + /// DBMeta instance handler. + /// Author : ${database.ClassAuthor} + public class ${myClassName} { + + /// Table db-name instance map. + protected static readonly IDictionary _tableDbNameInstanceMap; + + /// Table cap-prop-name instance map. + protected static readonly IDictionary _tableCapPropNameInstanceMap; + + /// Table uncap-prop-name instance map. + protected static readonly IDictionary _tableUncapPropNameInstanceMap; + + static ${myClassName}() { + { + IDictionary tmpMap = new Dictionary(); + + #foreach ($table in $database.Tables) + + tmpMap.Add("${table.Name}", GetDBMeta("${glPackageBaseDBMeta}.${glProjectPrefix}${table.JavaName}Dbm")); + #end + + _tableDbNameInstanceMap = tmpMap;//java.util.Collections.unmodifiableMap(tmpMap); + } + + { + IDictionary tmpMap = new Dictionary(); + + #foreach ($table in $database.Tables) + + tmpMap.Add("${table.JavaName}", GetDBMeta("${glPackageBaseDBMeta}.${glProjectPrefix}${table.JavaName}Dbm")); + #end + + _tableCapPropNameInstanceMap = tmpMap;//java.util.Collections.unmodifiableMap(tmpMap); + } + + { + IDictionary tmpMap = new Dictionary(); + + #foreach ($table in $database.Tables) + + tmpMap.Add("${table.UncapitalisedJavaName}", GetDBMeta("${glPackageBaseDBMeta}.${glProjectPrefix}${table.JavaName}Dbm")); + #end + + _tableUncapPropNameInstanceMap = tmpMap;//java.util.Collections.unmodifiableMap(tmpMap); + } + } + + protected static ${glDBMetaInterfaceName} GetDBMeta(String className) { + Seasar.Framework.Xml.S2Section config = Seasar.Framework.Xml.S2SectionHandler.GetS2Section(); + Type clazz = ForName(className, config.Assemblys); + if (clazz == null) { + String msg = "The className was not found: " + className + " assemblys="; + msg = msg + Seasar.Framework.Util.ToStringUtil.ToString(config.Assemblys); + throw new SystemException(msg); + } + System.Reflection.MethodInfo method = clazz.GetMethod("GetInstance"); + return (${glDBMetaInterfaceName})method.Invoke(null, null); + } + + protected static Type ForName(string className, System.Collections.IList assemblys) { + Type type = Type.GetType(className); + if(type != null) return type; + foreach(String assemblyName in assemblys) { + System.Reflection.Assembly assembly = System.Reflection.Assembly.Load(assemblyName); + if (assembly == null) { + String msg = "The assemblyName was not found: " + assemblyName + " assemblys="; + msg = msg + Seasar.Framework.Util.ToStringUtil.ToString(assemblys); + throw new SystemException(msg); + } + type = assembly.GetType(className); + if(type != null) return type; + } + return type; + } + + /// + /// Get instance by table db-name. + /// + /// Table db-name. (NotNull) + /// Instance. (NotNull) + public static ${glDBMetaInterfaceName} GetInstanceByTableDbName(String tableDbName) { + AssertObjectNotNull("tableDbName", tableDbName); + try { + return (${glDBMetaInterfaceName})_tableDbNameInstanceMap[tableDbName]; + } catch (System.Collections.Generic.KeyNotFoundException e) { + String msg = "The tableDbNameInstanceMap didn't contain the key of '" + tableDbName + "': "; + throw new ArgumentOutOfRangeException(msg + _tableDbNameInstanceMap, e); + } + } + + /// + /// Get instance by table cap-prop-name. + /// + /// Table cap-prop-name. (NotNull) + /// Instance. (NotNull) + public static ${glDBMetaInterfaceName} GetInstanceByTableCapPropName(String tableCapPropName) { + AssertObjectNotNull("tableCapPropName", tableCapPropName); + try { + return (${glDBMetaInterfaceName})_tableCapPropNameInstanceMap[tableCapPropName]; + } catch (System.Collections.Generic.KeyNotFoundException e) { + String msg = "The tableCapPropNameInstanceMap didn't contain the key of '" + tableCapPropName + "': "; + throw new ArgumentOutOfRangeException(msg + _tableCapPropNameInstanceMap, e); + } + } + + /// + /// Get instance by table uncap-prop-name. + /// + /// Table uncap-prop-name. (NotNull) + /// Instance. (NotNull) + public static ${glDBMetaInterfaceName} GetInstanceByTableUncapPropName(String tableUncapPropName) { + AssertObjectNotNull("tableUncapPropName", tableUncapPropName); + try { + return (${glDBMetaInterfaceName})_tableUncapPropNameInstanceMap[tableUncapPropName]; + } catch (System.Collections.Generic.KeyNotFoundException e) { + String msg = "The tableUncapPropNameInstanceMap didn't contain the key of '" + tableUncapPropName + "': "; + throw new ArgumentOutOfRangeException(msg + _tableUncapPropNameInstanceMap, e); + } + } + + /// + /// Get instance by table multi-name. + /// + /// Table multi-name. (NotNull) + /// Instance. (NotNull) + public static ${glDBMetaInterfaceName} GetInstanceByTableMultiName(String tableMultiName) { + AssertObjectNotNull("tableMultiName", tableMultiName); + + try { + return (${glDBMetaInterfaceName})_tableDbNameInstanceMap[tableMultiName]; + } catch (System.Collections.Generic.KeyNotFoundException) { + } + try { + return (${glDBMetaInterfaceName})_tableCapPropNameInstanceMap[tableMultiName]; + } catch (System.Collections.Generic.KeyNotFoundException) { + } + try { + return (${glDBMetaInterfaceName})_tableUncapPropNameInstanceMap[tableMultiName]; + } catch (System.Collections.Generic.KeyNotFoundException) { + } + + String msg = "The tableMultiName does not exist in all-instance-map: tableMultiName=" + tableMultiName; + msg = msg + " tableDbNameInstanceMap=" + Seasar.Framework.Util.ToStringUtil.ToString(_tableDbNameInstanceMap); + msg = msg + " tableCapPropNameInstanceMap=" + Seasar.Framework.Util.ToStringUtil.ToString(_tableCapPropNameInstanceMap); + msg = msg + " tableUncapPropNameInstanceMap=" + Seasar.Framework.Util.ToStringUtil.ToString(_tableUncapPropNameInstanceMap); + throw new ArgumentOutOfRangeException(msg); + } + + // ---------------------------------------------------------------- + // Assert Argument + // --------------- + /// + /// Assert that the object is not null. + /// + /// Variable name. (NotNull) + /// Argument. (NotNull) + protected static void AssertObjectNotNull(String variableName, Object arg) { + if (variableName == null) { + String msg = "Argument[variableName] must not be null."; + throw new ArgumentNullException(msg); + } + if (arg == null) { + String msg = "Argument[" + variableName + "] must not be null."; + throw new ArgumentNullException(msg); + } + } + } +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/exception/DaoExceptionContext.vmnet =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/exception/DaoExceptionContext.vmnet 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/exception/DaoExceptionContext.vmnet 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,107 @@ + +using System; +using System.Collections.Generic; +using System.Threading; + +namespace ${glPackageBaseCommonException} { + +/** + * Dao-exception context. (referring to s2pager) + * + * @author ${database.ClassAuthor} + */ + public static class ${glDaoExceptionContextName} { + + /** The thread-local for this. */ + private static LocalDataStoreSlot _slot = Thread.AllocateDataSlot(); + + /** Key of sql. */ + public static readonly String KEY_SQL = "sql"; + + /** Key of exception. */ + public static readonly String KEY_EXCEPTION = "exception"; + + /** + * Get condition-bean context on thread. + * + * @return Condition-bean. (Nullable) + */ + public static IDictionary GetInformationMapOnThread() { + return (IDictionary)Thread.GetData(_slot); + } + + /** + * Get sql on thread. + * + * @return SQL. (NotNull) + */ + public static String GetSqlOnThread() { + if (GetInformationMapOnThread() == null) { + return null; + } + return (String)GetInformationMapOnThread()[KEY_SQL]; + } + + /** + * Set sql on thread. + * + * @param sql SQL. (NotNull) + */ + public static void SetSqlOnThread(String sql) { + if (sql == null) { + String msg = "The argument[sql] must not be null."; + throw new ArgumentNullException(msg); + } + if (GetInformationMapOnThread() == null) { + IDictionary contextMap = new Dictionary(); + Thread.SetData(_slot, contextMap); + } + GetInformationMapOnThread().Add(KEY_SQL, sql); + } + + /** + * Get exception on thread. + * + * @return Exception. (NotNull) + */ + public static Exception GetExceptionOnThread() { + if (GetInformationMapOnThread() == null) { + return null; + } + return (Exception)GetInformationMapOnThread()[KEY_EXCEPTION]; + } + + /** + * Set exception on thread. + * + * @param exception Exception. (NotNull) + */ + public static void SetExceptionOnThread(Exception exception) { + if (exception == null) { + String msg = "The argument[exception] must not be null."; + throw new ArgumentNullException(msg); + } + if (GetInformationMapOnThread() == null) { + IDictionary contextMap = new Dictionary(); + Thread.SetData(_slot, contextMap); + } + GetInformationMapOnThread().Add(KEY_EXCEPTION, exception); + } + + /** + * Clear dao-exception context on thread. + */ + public static void ClearDaoExceptionOnThread() { + Thread.SetData(_slot, null); + } + + /** + * Is existing dao-exception context on thread? + * + * @return Determination. + */ + public static bool IsExistDaoExceptionOnThread() { + return (Thread.GetData(_slot) != null); + } + } +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/exception/RecordHasAlreadyBeenDeletedException.vmnet =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/exception/RecordHasAlreadyBeenDeletedException.vmnet 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/exception/RecordHasAlreadyBeenDeletedException.vmnet 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,20 @@ + +using System; +using System.Collections; + +namespace ${glPackageBaseCommonException} { + + /// + /// The exception when the record has already been deleted (by other thread). + /// Author: ${database.ClassAuthor} + /// + public class ${glRecordHasAlreadyBeenDeletedException} : ApplicationException { + + /// + /// Constructor. + /// + /// Exception message. + public ${glRecordHasAlreadyBeenDeletedException}(String msg) + : base(msg) {} + } +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/exception/RecordHasOverlappedException.vmnet =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/exception/RecordHasOverlappedException.vmnet 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/exception/RecordHasOverlappedException.vmnet 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,20 @@ + +using System; +using System.Collections; + +namespace ${glPackageBaseCommonException} { + + /// + /// The exception when the record has overlapped. + /// Author: ${database.ClassAuthor} + /// + public class ${glRecordHasOverlappedException} : ApplicationException { + + /// + /// Constructor. + /// + /// Exception message. + public ${glRecordHasOverlappedException}(String msg) + : base(msg) {} + } +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/exception/SelectedCountExceedMaxCountException.vmnet =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/exception/SelectedCountExceedMaxCountException.vmnet 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/exception/SelectedCountExceedMaxCountException.vmnet 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,49 @@ + +using System; +using System.Collections; + +namespace ${glPackageBaseCommonException} { + + /// + /// The exception when selected count exceeds max count. + /// Author: ${database.ClassAuthor} + /// + public class ${glSelectedCountExceedMaxCountExceptionName} : ApplicationException { + + /** Selected count. */ + protected int _selectedCount; + + /** Max count. */ + protected int _maxCount; + + /// + /// Constructor. + /// + /// Exception message. + /// Max count. + /// Selected count. + public ${glSelectedCountExceedMaxCountExceptionName}(String msg, int selectedCount, int maxCount) + : base(msg) { + _selectedCount = selectedCount; + _maxCount = maxCount; + } + + /** + * Get selected count. + * + * @return Selected count. (Nullable) + */ + public int GetSelectedCount() { + return _selectedCount; + } + + /** + * Get max count. + * + * @return Max count. (Nullable) + */ + public int GetMaxCount() { + return _maxCount; + } + } +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/helper/MapListString.vmnet =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/helper/MapListString.vmnet 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/helper/MapListString.vmnet 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,54 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace ${glPackageBaseCommonHelper} { + + public interface ${glMapListStringName} { + + string NEW_LINE { get;} + + string DEFAULT_MAP_MARK { get;} + + string DEFAULT_LIST_MARK { get;} + + string DEFAULT_DELIMITER { get;} + + string DEFAULT_START_BRACE { get;} + + string DEFAULT_END_BRACE { get;} + + string DEFAULT_EQUAL { get;} + + String MapMark { get; set; } + + String ListMark { get; set; } + + String StartBrace { get; set; } + + String EndBrace { get; set; } + + String Delimiter { get; set; } + + String Equal { get; set; } + + // ========================================================================================== + // Generate + // ======== + /** + * Generate map from map-string. + * + * @param mapString Map-string (NotNull) + * @return Generated map. (NotNull) + */ + Dictionary generateMap(String mapString); + + /** + * Generate map from list-string. {Implement} + * + * @param listString List-string (NotNull) + * @return Generated list. (NotNull) + */ + List generateList(String listString); + } +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/helper/MapListStringImpl.vmnet =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/helper/MapListStringImpl.vmnet 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/helper/MapListStringImpl.vmnet 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,925 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace ${glPackageBaseCommonHelper} +{ + public class IllegalStateException : ApplicationException + { + public IllegalStateException(string message) + : base(message) + { + } + } + + public class IllegalArgumentException : ApplicationException + { + public IllegalArgumentException(string message) + : base(message) + { + } + } + + public class ${glMapListStringImplName} : ${glMapListStringName} + { + public string NEW_LINE + { + get { return "\n"; } + } + + public string DEFAULT_MAP_MARK + { + get + { + return "map:"; + } + } + + public string DEFAULT_LIST_MARK + { + get + { + return "list:"; + } + } + + public string DEFAULT_DELIMITER + { + get + { + return ";"; + } + } + + public string DEFAULT_START_BRACE + { + get + { + return "{"; + } + } + + public string DEFAULT_END_BRACE + { + get + { + return "}"; + } + } + + public string DEFAULT_EQUAL + { + get + { + return "="; + } + } + + /** Map-mark. */ + protected String _mapMark; + + /** List-mark. */ + protected String _listMark; + + /** Start-brace. */ + protected String _startBrace; + + /** End-brace. */ + protected String _endBrace; + + /** Delimiter. */ + protected String _delimiter; + + /** Equal. */ + protected String _equal; + + /** Remainder string. */ + protected String _topString; + + /** Remainder string. */ + protected String _remainderString; + + public ${glMapListStringImplName}() + { + _mapMark = DEFAULT_MAP_MARK; + _listMark = DEFAULT_LIST_MARK; + _startBrace = DEFAULT_START_BRACE; + _endBrace = DEFAULT_END_BRACE; + _delimiter = DEFAULT_DELIMITER; + _equal = DEFAULT_EQUAL; + } + + public String MapMark { + get { return _mapMark; } + set { _mapMark = value ; } + } + + public String ListMark { + get { return _listMark; } + set { _listMark = value ; } + } + + public String StartBrace { + get { return _startBrace; } + set { _startBrace = value ; } + } + + public String EndBrace { + get { return _endBrace; } + set { _endBrace = value ; } + } + + public String Delimiter { + get { return _delimiter; } + set { _delimiter = value ; } + } + + public String Equal { + get { return _equal; } + set { _equal = value ; } + } + + // **************************************************************************************************** + // Main Method + // *********** + + // ========================================================================================== + // Generate + // ======== + /** + * Generate map from map-string. {Implement} + * + * @param mapString Map-string (NotNull) + * @return Generated map. (NotNull) + */ + public Dictionary generateMap(string mapString) + { + assertMapString(mapString); + + _topString = mapString; + _remainderString = mapString; + + removeBothSideSpaceAndTabAndNewLine(); + removePrefixMapMarkAndStartBrace(); + + Dictionary generatedMap = newStringObjectMap(); + parseRemainderMapString(generatedMap); + if (!"".Equals(_remainderString) && !_endBrace.Equals(_remainderString)) + { + string msg = "remainderString must be empty or end-brace string:"; + msg = msg + getNewLineAndIndent() + " # remainderString --> " + _remainderString; + msg = msg + getNewLineAndIndent() + " # mapString --> " + mapString; + msg = msg + getNewLineAndIndent() + " # generatedMap --> " + generatedMap; + throw new IllegalStateException(msg); + } + return generatedMap; + } + + /** + * Generate map from list-string. {Implement} + * + * @param listString List-string (NotNull) + * @return Generated list. (NotNull) + */ + public List generateList(string listString) + { + assertListString(listString); + + _topString = listString; + _remainderString = listString; + + removeBothSideSpaceAndTabAndNewLine(); + removePrefixListMarkAndStartBrace(); + + List generatedList = newObjectList(); + parseRemainderListString(generatedList); + if (!"".Equals(_remainderString) && !_endBrace.Equals(_remainderString)) + { + string msg = "rRemainderString must be empty or end-brace string:"; + msg = msg + getNewLineAndIndent() + " # remainderString --> " + _remainderString; + msg = msg + getNewLineAndIndent() + " # listString --> " + listString; + msg = msg + getNewLineAndIndent() + " # generatedList --> " + generatedList; + throw new IllegalStateException(msg); + } + return generatedList; + } + + // ========================================================================================== + // Parse + // ===== + protected void parseRemainderMapString(Dictionary currentMap) + { + while (true) + { + if (initializeAtLoopBeginning()) + { + return; + } + + // *** Now, _remainderString should starts with the key of the map. *** + + int equalIndex = _remainderString.IndexOf(_equal); + assertEqualIndex(_remainderString, equalIndex, _topString, currentMap); + string mapKey = _remainderString.Substring(0, equalIndex).Trim(); + removePrefixTargetIndexPlus(equalIndex, _equal.Length); + removeBothSideSpaceAndTabAndNewLine(); + + // *** Now, _remainderString should starts with the value of the map. *** + + if (isStartsWithMapPrefix(_remainderString)) + { + removePrefixMapMarkAndStartBrace(); + parseRemainderMapString(setupNestMap(currentMap, mapKey)); + if (closingAfterParseNestMapList()) + { + return; + } + continue; + } + + if (isStartsWithListPrefix(_remainderString)) + { + removePrefixListMarkAndStartBrace(); + parseRemainderListString(setupNestList(currentMap, mapKey)); + if (closingAfterParseNestMapList()) + { + return; + } + continue; + } + + int delimiterIndex = _remainderString.IndexOf(_delimiter); + int endBraceIndex = _remainderString.IndexOf(_endBrace); + assertEndBracekIndex(_remainderString, endBraceIndex, _topString, currentMap); + + // If delimiter exists and delimiter is closer than end brace, + // Everything from the head of the present remainder string to the delimiter becomes map value. + // ex) value1,key2=value2} + if (delimiterIndex >= 0 && delimiterIndex < endBraceIndex) + { + string mapValue = _remainderString.Substring(0, delimiterIndex); + currentMap.Add(mapKey, filterMapListValue(mapValue)); + + // Because the map element continues since the delimiter, skip the delimiter and continue the loop. + removePrefixTargetIndexPlus(delimiterIndex, _delimiter.Length); + continue; + } + + // Everything from the head of the present remainder string to the delimiter becomes map value. + // ex) value1}, key2=value2} + string mapValue2 = _remainderString.Substring(0, endBraceIndex); + currentMap.Add(mapKey, filterMapListValue(mapValue2)); + + // Analyzing map is over. So closing and return. + closingByEndBraceIndex(endBraceIndex); + return; + } + } + + protected void parseRemainderListString(List currentList) + { + while (true) + { + if (initializeAtLoopBeginning()) + { + return; + } + + // *** Now, _remainderString should starts with the value of the list. *** + + if (isStartsWithMapPrefix(_remainderString)) + { + removePrefixMapMarkAndStartBrace(); + parseRemainderMapString(setupNestMap(currentList)); + if (closingAfterParseNestMapList()) + { + return; + } + continue; + } + + if (isStartsWithListPrefix(_remainderString)) + { + removePrefixListMarkAndStartBrace(); + parseRemainderListString(setupNestList(currentList)); + if (closingAfterParseNestMapList()) + { + return; + } + continue; + } + + int delimiterIndex = _remainderString.IndexOf(_delimiter); + int endBraceIndex = _remainderString.IndexOf(_endBrace); + assertEndBraceIndex(_remainderString, endBraceIndex, _topString, currentList); + + // If delimiter exists and delimiter is closer than end brace, + // Everything from the head of the present remainder string to the delimiter becomes list value. + // ex) value1,value2,value3} + if (delimiterIndex >= 0 && delimiterIndex < endBraceIndex) + { + string listValue = _remainderString.Substring(0, delimiterIndex); + currentList.Add(filterMapListValue(listValue)); + + // Because the list element continues since the delimiter, skip the delimiter and continue the loop. + removePrefixTargetIndexPlus(delimiterIndex, _delimiter.Length); + continue; + } + + // Everything from the head of the present remainder string to the delimiter becomes list value. + // ex) value1}, value2, } + string listValue2 = _remainderString.Substring(0, endBraceIndex); + currentList.Add(filterMapListValue(listValue2)); + + // Analyzing list is over. So closing and return. + closingByEndBraceIndex(endBraceIndex); + return; + } + } + + /** + * @return Is return? + */ + protected bool initializeAtLoopBeginning() + { + // Remove prefix delimiter. (Result string is always trimmed.) + removePrefixAllDelimiter(); + + // If the remainder string is empty-string, Analyzing is over! + if (_remainderString.Equals("")) + { + return true; + } + + // If the remainder string starts with end-brace, Analyzing current map is over! + // And then remove the end-brace. + if (isStartsWithEndBrace(_remainderString)) + { + removePrefixEndBrace(); + return true; + } + return false; + } + + /** + * @return Is return? + */ + protected bool closingAfterParseNestMapList() + { + // If the remainder string starts with end-brace, remove it and return true. + if (isStartsWithEndBrace(_remainderString)) + { + removePrefixEndBrace(); + return true; + } + return false; + } + + protected void closingByEndBraceIndex(int endBraceIndex) + { + // Remove the value that was finished analyzing and end-brace. + _remainderString = _remainderString.Substring(endBraceIndex); + removePrefixEndBrace(); + } + + // **************************************************************************************************** + // StateFul Method + // *************** + + // ========================================================================================== + // Remove + // ====== + protected void removePrefixMapMarkAndStartBrace() + { + removePrefix(_mapMark + _startBrace); + } + + protected void removePrefixListMarkAndStartBrace() + { + removePrefix(_listMark + _startBrace); + } + + protected void removePrefixDelimiter() + { + removePrefix(_delimiter); + } + + protected void removePrefixEndBrace() + { + removePrefix(_endBrace); + } + + protected void removePrefix(String prefixString) + { + if (_remainderString == null) + { + String msg = "Argument[remainderString] must not be null: " + _remainderString; + throw new IllegalArgumentException(msg); + } + removeBothSideSpaceAndTabAndNewLine(); + if (prefixString == null) + { + String msg = "Argument[prefixString] must not be null: " + prefixString; + throw new IllegalArgumentException(msg); + } + if (_remainderString.Length < prefixString.Length) + { + String msg = "Argument[remainderString] length must be larger than Argument[prefixString] length:"; + msg = msg + getNewLineAndIndent() + " # remainderString --> " + _remainderString; + msg = msg + getNewLineAndIndent() + " # prefixString=" + prefixString; + throw new IllegalArgumentException(msg); + } + if (!_remainderString.StartsWith(prefixString)) + { + String msg = "Argument[remainderString] must start with Argument[prefixString:]"; + msg = msg + getNewLineAndIndent() + " # remainderString --> " + _remainderString; + msg = msg + getNewLineAndIndent() + " # prefixString --> " + prefixString; + throw new IllegalArgumentException(msg); + } + + _remainderString = _remainderString.Substring(prefixString.Length); + removeBothSideSpaceAndTabAndNewLine(); + } + + protected void removePrefixAllDelimiter() + { + removeBothSideSpaceAndTabAndNewLine(); + + while (true) + { + if (!isStartsWithDelimiter(_remainderString)) + { + break; + } + + if (isStartsWithDelimiter(_remainderString)) + { + removePrefixDelimiter(); + removeBothSideSpaceAndTabAndNewLine(); + } + } + } + + protected void removeBothSideSpaceAndTabAndNewLine() + { + _remainderString = _remainderString.Trim(); + } + + protected void removePrefixTargetIndexPlus(int index, int plusCount) + { + _remainderString = _remainderString.Substring(index + plusCount); + } + + // **************************************************************************************************** + // StateLess Method + // **************** + + // ========================================================================================== + // Assert + // ====== + protected void assertMapString(String mapString) + { + if (mapString == null) + { + String msg = "Argument[mapString] must not be null: "; + throw new IllegalArgumentException(msg + "mapString=" + mapString); + } + mapString = mapString.Trim(); + if (!isStartsWithMapPrefix(mapString)) + { + String msg = "Argument[mapString] must start with '" + _mapMark + _startBrace + "': "; + throw new IllegalArgumentException(msg + "mapString=" + mapString); + } + if (!isEndsWithEndMark(mapString)) + { + String msg = "Argument[mapString] must end with '" + _endBrace + "': "; + throw new IllegalArgumentException(msg + "mapString=" + mapString); + } + + int startBraceCount = getDelimiterCount(mapString, _startBrace); + int endBraceCount = getDelimiterCount(mapString, _endBrace); + if (startBraceCount != endBraceCount) + { + String msg = "It is necessary to have braces of the same number on start and end:"; + msg = msg + getNewLineAndIndent() + " # mapString --> " + mapString; + msg = msg + getNewLineAndIndent() + " # startBraceCount --> " + startBraceCount; + msg = msg + getNewLineAndIndent() + " # endBraceCount --> " + endBraceCount; + throw new IllegalArgumentException(msg); + } + } + + protected void assertListString(String listString) + { + if (listString == null) + { + String msg = "Argument[listString] must not be null: "; + throw new IllegalArgumentException(msg + "liststring=" + listString); + } + listString = listString.Trim(); + if (!isStartsWithListPrefix(listString)) + { + string msg = "Argument[listString] must start with '" + _mapMark + "': "; + throw new IllegalArgumentException(msg + "listString=" + listString); + } + if (!isEndsWithEndMark(listString)) + { + string msg = "Argument[listString] must end with '" + _endBrace + "': "; + throw new IllegalArgumentException(msg + "listString=" + listString); + } + + int startBraceCount = getDelimiterCount(listString, _startBrace); + int endBraceCount = getDelimiterCount(listString, _endBrace); + if (startBraceCount != endBraceCount) + { + string msg = "It is necessary to have braces of the same number on start and end:"; + msg = msg + getNewLineAndIndent() + " # listString --> " + listString; + msg = msg + getNewLineAndIndent() + " # startBraceCount --> " + startBraceCount; + msg = msg + getNewLineAndIndent() + " # endBraceCount --> " + endBraceCount; + msg = msg + getNewLineAndIndent() + " # _startBrace --> " + _startBrace; + msg = msg + getNewLineAndIndent() + " # _endBrace --> " + _endBrace; + msg = msg + getNewLineAndIndent() + " # _delimiter --> " + _delimiter; + msg = msg + getNewLineAndIndent() + " # _equal --> " + _equal; + throw new IllegalArgumentException(msg); + } + } + + protected void assertEqualIndex(string remainderMapString, int equalIndex, string mapString4Log, Dictionary currentMap4Log) + { + if (remainderMapString == null) + { + string msg = "Argument[remainderMapString] must not be null:"; + msg = msg + getNewLineAndIndent() + " # remainderMapString --> " + remainderMapString; + msg = msg + getNewLineAndIndent() + " # equalIndex --> " + equalIndex; + msg = msg + getNewLineAndIndent() + " # mapString4Log --> " + mapString4Log; + msg = msg + getNewLineAndIndent() + " # currentMap4Log --> " + currentMap4Log; + msg = msg + getNewLineAndIndent() + " # _startBrace --> " + _startBrace; + msg = msg + getNewLineAndIndent() + " # _endBrace --> " + _endBrace; + msg = msg + getNewLineAndIndent() + " # _delimiter --> " + _delimiter; + msg = msg + getNewLineAndIndent() + " # _equal --> " + _equal; + throw new IllegalArgumentException(msg); + } + + if (equalIndex < 0) + { + string msg = "Argument[equalIndex] must be plus or zero:"; + msg = msg + getNewLineAndIndent() + " # remainderMapString --> " + remainderMapString; + msg = msg + getNewLineAndIndent() + " # equalIndex --> " + equalIndex; + msg = msg + getNewLineAndIndent() + " # mapString4Log --> " + mapString4Log; + msg = msg + getNewLineAndIndent() + " # currentMap4Log --> " + currentMap4Log; + msg = msg + getNewLineAndIndent() + " # _startBrace --> " + _startBrace; + msg = msg + getNewLineAndIndent() + " # _endBrace --> " + _endBrace; + msg = msg + getNewLineAndIndent() + " # _delimiter --> " + _delimiter; + msg = msg + getNewLineAndIndent() + " # _equal --> " + _equal; + throw new IllegalArgumentException(msg); + } + + if (remainderMapString.Length < equalIndex) + { + string msg = "Argument[remainderMapString] length must be larger than equalIndex value:"; + msg = msg + getNewLineAndIndent() + " # remainderMapString --> " + remainderMapString; + msg = msg + getNewLineAndIndent() + " # equalIndex --> " + equalIndex; + msg = msg + getNewLineAndIndent() + " # mapString4Log --> " + mapString4Log; + msg = msg + getNewLineAndIndent() + " # currentMap4Log --> " + currentMap4Log; + msg = msg + getNewLineAndIndent() + " # _startBrace --> " + _startBrace; + msg = msg + getNewLineAndIndent() + " # _endBrace --> " + _endBrace; + msg = msg + getNewLineAndIndent() + " # _delimiter --> " + _delimiter; + msg = msg + getNewLineAndIndent() + " # _equal --> " + _equal; + throw new IllegalArgumentException(msg); + } + + String expectedAsEndMark = remainderMapString.Substring(equalIndex, _equal.Length); + if (!expectedAsEndMark.Equals(_equal)) + { + string msg = "Argument[remainderMapString] must have '" + _equal + "' at Argument[equalIndex]:"; + msg = msg + getNewLineAndIndent() + " # remainderMapString --> " + remainderMapString; + msg = msg + getNewLineAndIndent() + " # equalIndex --> " + equalIndex; + msg = msg + getNewLineAndIndent() + " # expectedAsEndMark --> " + expectedAsEndMark; + msg = msg + getNewLineAndIndent() + " # mapString --> " + mapString4Log; + msg = msg + getNewLineAndIndent() + " # currentMap --> " + currentMap4Log; + msg = msg + getNewLineAndIndent() + " # _startBrace --> " + _startBrace; + msg = msg + getNewLineAndIndent() + " # _endBrace --> " + _endBrace; + msg = msg + getNewLineAndIndent() + " # _delimiter --> " + _delimiter; + msg = msg + getNewLineAndIndent() + " # _equal --> " + _equal; + throw new IllegalArgumentException(msg); + } + } + + protected void assertEndBracekIndex(string remainderMapString, int endBraceIndex, string mapString4Log, + Dictionary currentMap4Log) + { + if (remainderMapString == null) + { + string msg = "Argument[remainderMapString] must not be null:"; + msg = msg + getNewLineAndIndent() + " # remainderMapString --> " + remainderMapString; + msg = msg + getNewLineAndIndent() + " # endBraceIndex --> " + endBraceIndex; + msg = msg + getNewLineAndIndent() + " # mapString --> " + mapString4Log; + msg = msg + getNewLineAndIndent() + " # currentMap --> " + currentMap4Log; + msg = msg + getNewLineAndIndent() + " # _startBrace --> " + _startBrace; + msg = msg + getNewLineAndIndent() + " # _endBrace --> " + _endBrace; + msg = msg + getNewLineAndIndent() + " # _delimiter --> " + _delimiter; + msg = msg + getNewLineAndIndent() + " # _equal --> " + _equal; + throw new IllegalArgumentException(msg); + } + + if (endBraceIndex < 0) + { + string msg = "Argument[endMarkIndex] must be plus or zero:"; + msg = msg + getNewLineAndIndent() + " # remainderMapString --> " + remainderMapString; + msg = msg + getNewLineAndIndent() + " # endBraceIndex --> " + endBraceIndex; + msg = msg + getNewLineAndIndent() + " # mapString --> =" + mapString4Log; + msg = msg + getNewLineAndIndent() + " # currentMap --> " + currentMap4Log; + msg = msg + getNewLineAndIndent() + " # _startBrace --> " + _startBrace; + msg = msg + getNewLineAndIndent() + " # _endBrace --> " + _endBrace; + msg = msg + getNewLineAndIndent() + " # _delimiter --> " + _delimiter; + msg = msg + getNewLineAndIndent() + " # _equal --> " + _equal; + throw new IllegalArgumentException(msg); + } + + if (remainderMapString.Length < endBraceIndex) + { + string msg = "Argument[remainderMapString] length must be larger than endMarkIndex value:"; + msg = msg + getNewLineAndIndent() + " # remainderMapString --> " + remainderMapString; + msg = msg + getNewLineAndIndent() + " # endBraceIndex --> " + endBraceIndex; + msg = msg + getNewLineAndIndent() + " # mapString --> " + mapString4Log; + msg = msg + getNewLineAndIndent() + " # currentMap --> " + currentMap4Log; + msg = msg + getNewLineAndIndent() + " # _startBrace --> " + _startBrace; + msg = msg + getNewLineAndIndent() + " # _endBrace --> " + _endBrace; + msg = msg + getNewLineAndIndent() + " # _delimiter --> " + _delimiter; + msg = msg + getNewLineAndIndent() + " # _equal --> " + _equal; + throw new IllegalArgumentException(msg); + } + + String expectedAsEndMark = remainderMapString.Substring(endBraceIndex, _endBrace.Length); + if (!expectedAsEndMark.Equals(_endBrace)) + { + string msg = "Argument[remainderMapString] must have '" + _endBrace + "' at Argument[endBraceIndex]:"; + msg = msg + getNewLineAndIndent() + " # remainderMapString --> " + remainderMapString; + msg = msg + getNewLineAndIndent() + " # endBraceIndex --> " + endBraceIndex; + msg = msg + getNewLineAndIndent() + " # expectedAsEndMark --> " + expectedAsEndMark; + msg = msg + getNewLineAndIndent() + " # mapString --> " + mapString4Log; + msg = msg + getNewLineAndIndent() + " # currentMap --> " + currentMap4Log; + msg = msg + getNewLineAndIndent() + " # _startBrace --> " + _startBrace; + msg = msg + getNewLineAndIndent() + " # _endBrace --> " + _endBrace; + msg = msg + getNewLineAndIndent() + " # _delimiter --> " + _delimiter; + msg = msg + getNewLineAndIndent() + " # _equal --> " + _equal; + throw new IllegalArgumentException(msg); + } + } + + protected void assertEndBraceIndex(string remainderListString, int endBraceIndex, string mapString4Log, + List currentList4Log) + { + if (remainderListString == null) + { + string msg = "Argument[remainderMapString] must not be null:"; + msg = msg + getNewLineAndIndent() + " # remainderListString --> " + remainderListString; + msg = msg + getNewLineAndIndent() + " # endBraceIndex --> " + endBraceIndex; + msg = msg + getNewLineAndIndent() + " # mapString --> " + mapString4Log; + msg = msg + getNewLineAndIndent() + " # currentList --> " + currentList4Log; + msg = msg + getNewLineAndIndent() + " # _startBrace --> " + _startBrace; + msg = msg + getNewLineAndIndent() + " # _endBrace --> " + _endBrace; + msg = msg + getNewLineAndIndent() + " # _delimiter --> " + _delimiter; + msg = msg + getNewLineAndIndent() + " # _equal --> " + _equal; + throw new IllegalArgumentException(msg); + } + + if (endBraceIndex < 0) + { + string msg = "Argument[endMarkIndex] must be plus or zero:"; + msg = msg + getNewLineAndIndent() + " # remainderListString --> " + remainderListString; + msg = msg + getNewLineAndIndent() + " # endBraceIndex --> " + endBraceIndex; + msg = msg + getNewLineAndIndent() + " # mapString --> " + mapString4Log; + msg = msg + getNewLineAndIndent() + " # currentList --> " + currentList4Log; + msg = msg + getNewLineAndIndent() + " # _startBrace --> " + _startBrace; + msg = msg + getNewLineAndIndent() + " # _endBrace --> " + _endBrace; + msg = msg + getNewLineAndIndent() + " # _delimiter --> " + _delimiter; + msg = msg + getNewLineAndIndent() + " # _equal --> " + _equal; + throw new IllegalArgumentException(msg); + } + + if (remainderListString.Length < endBraceIndex) + { + string msg = "Argument[remainderMapString] length must be larger than endMarkIndex value:"; + msg = msg + getNewLineAndIndent() + " # remainderListString --> " + remainderListString; + msg = msg + getNewLineAndIndent() + " # endBraceIndex --> " + endBraceIndex; + msg = msg + getNewLineAndIndent() + " # mapString --> " + mapString4Log; + msg = msg + getNewLineAndIndent() + " # currentList --> " + currentList4Log; + msg = msg + getNewLineAndIndent() + " # _startBrace --> " + _startBrace; + msg = msg + getNewLineAndIndent() + " # _endBrace --> " + _endBrace; + msg = msg + getNewLineAndIndent() + " # _delimiter --> " + _delimiter; + msg = msg + getNewLineAndIndent() + " # _equal --> " + _equal; + throw new IllegalArgumentException(msg); + } + + String expectedAsEndBrace = remainderListString.Substring(endBraceIndex, _endBrace.Length); + if (!expectedAsEndBrace.Equals(_endBrace)) + { + string msg = "Argument[remainderMapString] must have '" + _endBrace + "' at Argument[endBraceIndex]:"; + msg = msg + getNewLineAndIndent() + " # remainderListString --> " + remainderListString; + msg = msg + getNewLineAndIndent() + " # endBraceIndex --> " + endBraceIndex; + msg = msg + getNewLineAndIndent() + " # expectedAsEndBrace --> " + expectedAsEndBrace; + msg = msg + getNewLineAndIndent() + " # mapString --> " + mapString4Log; + msg = msg + getNewLineAndIndent() + " # currentList --> " + currentList4Log; + msg = msg + getNewLineAndIndent() + " # _startBrace --> " + _startBrace; + msg = msg + getNewLineAndIndent() + " # _endBrace --> " + _endBrace; + msg = msg + getNewLineAndIndent() + " # _delimiter --> " + _delimiter; + msg = msg + getNewLineAndIndent() + " # _equal --> " + _equal; + throw new IllegalArgumentException(msg); + } + } + + // ========================================================================================== + // Filter + // ====== + /** + * Filter map or list value. + *

+ *

+         * # The value is trimmed.
+         * # If the value is null, this returns null.
+         * # If the value is 'null', this returns null.
+         * # If the trimmed value is empty string, this returns null.
+         * 
+ * @param value value. (Nullable) + * @return Filtered value. (Nullable) + */ + protected String filterMapListValue(string value) + { + if (value == null) + { + return null; + } + value = value.Trim(); + return (("".Equals(value) || "null".Equals(value)) ? null : value); + } + + // ========================================================================================== + // Judgement + // ========= + protected bool isStartsWithMapPrefix(string targetString) + { + if (targetString == null) + { + string msg = "Argument[targetString] must not be null: " + targetString; + throw new IllegalArgumentException(msg); + } + targetString = targetString.Trim(); + if (targetString.StartsWith(_mapMark + _startBrace)) + { + return true; + } + else + { + return false; + } + } + + protected bool isStartsWithListPrefix(string targetString) + { + if (targetString == null) + { + string msg = "Argument[targetString] must not be null: " + targetString; + throw new IllegalArgumentException(msg); + } + targetString = targetString.Trim(); + if (targetString.StartsWith(_listMark + _startBrace)) + { + return true; + } + else + { + return false; + } + } + + protected bool isStartsWithDelimiter(string targetString) + { + if (targetString == null) + { + string msg = "Argument[targetString] must not be null: " + targetString; + throw new IllegalArgumentException(msg); + } + targetString = targetString.Trim(); + if (targetString.StartsWith(_delimiter)) + { + return true; + } + else + { + return false; + } + } + + protected bool isStartsWithEndBrace(string targetString) + { + if (targetString == null) + { + string msg = "Argument[targetString] must not be null: " + targetString; + throw new IllegalArgumentException(msg); + } + targetString = targetString.Trim(); + if (targetString.StartsWith(_endBrace)) + { + return true; + } + else + { + return false; + } + } + + protected bool isEndsWithEndMark(string targetString) + { + if (targetString == null) + { + string msg = "Argument[targetString] must not be null: " + targetString; + throw new IllegalArgumentException(msg); + } + targetString = targetString.Trim(); + if (targetString.EndsWith(_endBrace)) + { + return true; + } + else + { + return false; + } + } + + // ========================================================================================== + // Other + // ===== + protected Dictionary setupNestMap(Dictionary currentMap, string mapKey) + { + Dictionary nestMap = newStringObjectMap(); + currentMap.Add(mapKey, nestMap); + return nestMap; + } + + protected Dictionary setupNestMap(List currentList) + { + Dictionary nestMap = newStringObjectMap(); + currentList.Add(nestMap); + return nestMap; + } + + protected List setupNestList(Dictionary currentMap, string mapKey) + { + List nestList = newObjectList(); + currentMap.Add(mapKey, nestList); + return nestList; + } + + protected List setupNestList(List currentList) + { + List nestList = newObjectList(); + currentList.Add(nestList); + return nestList; + } + + protected Dictionary newStringObjectMap() + { + return new Dictionary(); + } + + protected List newObjectList() + { + return new List(); + } + + protected String getNewLineAndIndent() + { + return NEW_LINE + " "; + } + + /** + * Get count that target string exist in the base string. + * + * @param targetString ?????+ * @param delimiter ???? + * @return ??????????????????? + */ + protected int getDelimiterCount(string targetString, string delimiter) + { + int result = 0; + for (int i = 0; ; ) + { + if (targetString.IndexOf(delimiter, i) != -1) + { + result++; + i = targetString.IndexOf(delimiter, i) + 1; + } + else + { + break; + } + } + if (result == 0) + { + result = -1; + } + return result; + } + + } +} \ No newline at end of file Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/helper/MapStringBuilder.vmnet =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/helper/MapStringBuilder.vmnet 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/helper/MapStringBuilder.vmnet 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,68 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace ${glPackageBaseCommonHelper} { + + /// + /// The interface of map-string-builder. (by kotani) + /// Author: ${database.ClassAuthor} + /// + public interface ${glMapStringBuilderName} { + + /// + /// The property of column-name array. + /// + String[] ColumnNames { set; } + + /// + /// The property of map-mark for map-string. + /// + String MapStringMapMark { set; } + + /// + /// The property of delimiter for map-string. + /// + String MapStringDelimiter { set; } + + /// + /// The property of equal for map-string . + /// + String MapStringEqual { set; } + + /// + /// The property of start-brace for map-string. + /// + String MapStringStartBrace { set; } + + /// + /// The property of end-brace for map-string. + /// + String MapStringEndBrace { set; } + + /// + /// Build by delimiter. + /// + /// String separated by delimiter. (NotNull) + /// Delimiter. (NotNull) + /// Map-string. (NotNull) + /// + String BuildByDelimiter(String values, String delimiter); + } + + public class DifferentDelimiterCountException : ApplicationException { + protected String[] _columnNames; + protected String[] _values; + public DifferentDelimiterCountException(String msg, String[] columnNames, String[] values) + : base(msg) { + _columnNames = columnNames; + _values = values; + } + public String[] getColumnNames() { + return _columnNames; + } + public String[] getValues() { + return _values; + } + } +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/helper/MapStringBuilderImpl.vmnet =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/helper/MapStringBuilderImpl.vmnet 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/helper/MapStringBuilderImpl.vmnet 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,167 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Text.RegularExpressions; + +namespace ${glPackageBaseCommonHelper} { + + /// + /// The implementation of map-string-builder. + /// Author: ${database.ClassAuthor} + /// + public class ${glMapStringBuilderImplName} : ${glMapStringBuilderName} { + + /// The instance of regular-expressions. + protected Regex _regDelimiter; + + /// The array of column-name. + protected String[] _columnNames; + + /// The value of map-mark for map-string. + protected String _msMapMark; + + /// The value of delimiter for map-string. + protected String _msDelimiter; + + /// The value of equal for map-string. + protected String _msEqual; + + /// The value of start-brace for map-string. + protected String _msStartBrace; + + /// The value of end-brace for map-string. + protected String _msEndBrace; + + /// + /// The property of column-name. + /// + public String[] ColumnNames { + set{ _columnNames = value; } + } + + /// + /// The property of map-mark for map-string. + /// + public String MapStringMapMark { + set { _msMapMark = value; } + } + + /// + /// The property of delimiter for map-string. + /// + public String MapStringDelimiter { + set { _msDelimiter = value; _regDelimiter = new Regex(String.Format("({0})$", _msDelimiter)); } + } + + /// + /// The property of equal for map-string. + /// + public String MapStringEqual { + set { _msEqual = value; } + } + + /// + /// The property of start-brace for map-string. + /// + public String MapStringStartBrace { + set { _msStartBrace = value; } + } + + /// + /// The property of end-brace for map-string. + /// + public String MapStringEndBrace { + set { _msEndBrace = value; } + } + + /// + /// Build by delimiter. + /// + /// String separated by delimiter. (NotNull) + /// Delimiter. (NotNull) + /// Map-string. (NotNull) + /// + public String BuildByDelimiter(String values, String delimiter) { + if (values == null) { + String msg = "The argument[values] should not be null."; + throw new ArgumentNullException(msg); + } + if (delimiter == null) { + String msg = "The argument[delimiter] should not be null."; + throw new ArgumentNullException(msg); + } + AssertStringComponent(); + + String[] valueArray = values.Split(delimiter.ToCharArray()); + AssertValueArray(_columnNames, valueArray); + + StringBuilder builder = new StringBuilder(); + builder.Append(_msMapMark + _msStartBrace); + for (int i = 0; i < _columnNames.Length; i++ ) { + builder.AppendFormat("{0}{1}{2} {3}", _columnNames[i], _msEqual, valueArray[i], _msDelimiter); + } + + return String.Format("{0}{1}", _regDelimiter.Replace(builder.ToString(), ""), _msEndBrace); + } + + protected void AssertStringComponent() { + if (_columnNames == null) { + String msg = "The columnNames should not be null."; + throw new SystemException(msg); + } + if (_columnNames.Length == 0) { + String msg = "The columnNames should not be empty-array."; + throw new SystemException(msg); + } + if (_msMapMark == null) { + String msg = "The msMapMark should not be null."; + throw new SystemException(msg); + } + if (_msDelimiter == null) { + String msg = "The msDelimiter should not be null."; + throw new SystemException(msg); + } + if (_msEqual == null) { + String msg = "The msEqual should not be null."; + throw new SystemException(msg); + } + if (_msStartBrace == null) { + String msg = "The msStartBrace should not be null."; + throw new SystemException(msg); + } + if (_msEndBrace == null) { + String msg = "The msEndBrace should not be null."; + throw new SystemException(msg); + } + } + + /// + /// Assert + /// + /// The expected columns. (NotNull) + /// The actual values. (NotNull) + /// + protected void AssertValueArray(String[] expected, String[] actual) { + if (expected.Length != actual.Length) { + String msg = String.Format("StringArray's length is difference. ({0}, {1}) by Kotan", expected.Length, actual.Length); + { + StringBuilder sb = new StringBuilder(); + foreach (String str in expected) { + sb.Append(", ").Append(str); + } + sb.Remove(0, ", ".Length); + msg = msg + " expectedNames=" + sb.ToString(); + } + { + StringBuilder sb = new StringBuilder(); + foreach (String str in actual) { + sb.Append(", ").Append(str); + } + sb.Remove(0, ", ".Length); + msg = msg + " actualValues=" + sb.ToString(); + } + throw new DifferentDelimiterCountException(msg, expected, actual); + } + } + } +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/interceptor/CommonColumnSetupAbstractInterceptor.vmnet =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/interceptor/CommonColumnSetupAbstractInterceptor.vmnet 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/interceptor/CommonColumnSetupAbstractInterceptor.vmnet 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,100 @@ + +using System; +using System.Reflection; +using System.Collections; +using System.Text; + +using ${glPackageBaseCommon}; + +namespace ${glPackageBaseCommonInterceptor} { + + /// + /// CommonColumn-Setup Abstract Interceptor. + /// Author : ${database.ClassAuthor} + /// + public abstract class ${glCommonColumnSetupAbstractInterceptor} : Seasar.Framework.Aop.Interceptors.AbstractInterceptor { + + /// Log-instance. + private static readonly log4net.ILog _log = log4net.LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); + + /// + /// Invoke. + /// + /// Method invocation. + /// Result of the method. + /// + public override object Invoke(Seasar.Framework.Aop.IMethodInvocation invocation) { + MethodBase method = invocation.Method; + Object[] args = invocation.Arguments; + + if (!(args != null && args.Length != 0)) { + return invocation.Proceed(); + } + Object firstArgument = args[0]; + if (IsEntityDefinedCommonColumn(firstArgument)) { + ${glEntityDefinedCommonColumnInterfaceName} entity = (${glEntityDefinedCommonColumnInterfaceName})firstArgument; + if (_log.IsDebugEnabled) { + String methodName = method.DeclaringType.Name + "." + method.Name; + _log.Debug("Intercepted the method '" + methodName + "()': entity=" + entity.ExtractPrimaryKeyMapString()); + } + SetupEntity(entity); + return invocation.Proceed(); + } else if (IsListSaveEntityDefinedCommonColumn(firstArgument)) { + IList ls = (IList)firstArgument; + if (_log.IsDebugEnabled) { + String methodName = method.DeclaringType.Name + "." + method.Name; + _log.Debug("Intercepted the method '" + methodName + "()': entityList.Count=" + ls.Count); + } + foreach (${glEntityDefinedCommonColumnInterfaceName} entity in ls) { + SetupEntity(entity); + } + return invocation.Proceed(); + } else { + return invocation.Proceed(); + } + } + + /// + /// Is the object entity defined common column? + /// + /// Object. If the object is null, returns false. (Nullable) + /// Determination. + protected bool IsEntityDefinedCommonColumn(Object obj) { + if (obj == null) { + return false; + } + if (obj is ${glEntityDefinedCommonColumnInterfaceName}) { + return true; + } else { + return false; + } + } + + /// + /// Is the object list that saves entity defined common column? + /// + /// Object. If the object is null, returns false. (Nullable) + /// Determination. + protected bool IsListSaveEntityDefinedCommonColumn(Object obj) { + if (obj == null) { + return false; + } + if (!(obj is IList)) { + return false; + } + IList ls = (IList)obj; + foreach (Object currentObj in ls) { + if (!(currentObj is ${glEntityDefinedCommonColumnInterfaceName})) { + return false; + } + } + return true; + } + + /// + /// Set up the entity. + /// + /// Entity. (Nullable). + abstract protected void SetupEntity(${glEntityDefinedCommonColumnInterfaceName} entity); + } +} \ No newline at end of file Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/interceptor/CommonColumnSetupBeforeDeleteInterceptor.vmnet =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/interceptor/CommonColumnSetupBeforeDeleteInterceptor.vmnet 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/interceptor/CommonColumnSetupBeforeDeleteInterceptor.vmnet 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,57 @@ + +using System; +using System.Collections; + +using ${glPackageBaseCommon}; + +namespace ${glPackageBaseCommonInterceptor} { + + /// + /// CommonColumn-Setup-before-Delete Interceptor. + /// Author : ${database.ClassAuthor} + /// + public class ${glCommonColumnSetupBeforeDeleteInterceptor} : ${glCommonColumnSetupAbstractInterceptor} { + + /// Log-instance. + private static readonly log4net.ILog _log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); + + /// + /// Set up the entity. + /// + /// Entity. (Nullable) + protected override void SetupEntity(${glEntityDefinedCommonColumnInterfaceName} entity) { + if (_log.IsDebugEnabled) { + _log.Debug(" before setup : " + entity.ExtractCommonColumnValueMapString()); + } + #foreach ($columnName in ${database.CommonColumnNameList}) + #set ($entityCommonColumnMap = ${database.CommonColumnMap}) + #set ($columnType = ${entityCommonColumnMap.get(${columnName})}) + #set ($javaNative = ${database.convertJavaNativeByJdbcType(${columnType})}) + #set ($javaName = ${database.convertJavaNameByJdbcNameAsColumn(${columnName})}) + #set ($uncapitalisedJavaName = ${database.convertUncapitalisedJavaNameByJdbcNameAsColumn(${columnName})}) + #if (${database.containsValidColumnNameKeyCommonColumnSetupBeforeDeleteInterceptorLogicMap(${columnName})}) + #set ($logic = ${database.getCommonColumnSetupBeforeDeleteInterceptorLogicByColumnName(${columnName})}) + #if ($database.isCommonColumnSetupInvokingLogic($logic)) + #set ($filteredLogic = $database.removeCommonColumnSetupInvokingMark($logic)) + + ${filteredLogic} + if (_log.IsDebugEnabled) { + _log.Debug(" ${columnName} has been set up: invoking=${filteredLogic}"); + } + #else + + ${javaNative} ${uncapitalisedJavaName} = ${logic}; + entity.${javaName} = ${uncapitalisedJavaName}; + if (_log.IsDebugEnabled) { + _log.Debug(" ${columnName} has been set up: value=" + ${uncapitalisedJavaName}); + } + #end + #end + #end + + if (_log.IsDebugEnabled) { + _log.Debug(" after setup : " + entity.ExtractCommonColumnValueMapString()); + } + } + } +} \ No newline at end of file Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/interceptor/CommonColumnSetupBeforeInsertInterceptor.vmnet =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/interceptor/CommonColumnSetupBeforeInsertInterceptor.vmnet 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/interceptor/CommonColumnSetupBeforeInsertInterceptor.vmnet 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,57 @@ + +using System; +using System.Collections; + +using ${glPackageBaseCommon}; + +namespace ${glPackageBaseCommonInterceptor} { + + /// + /// CommonColumn-Setup-before-Insert Interceptor. + /// Author : ${database.ClassAuthor} + /// + public class ${glCommonColumnSetupBeforeInsertInterceptor} : ${glCommonColumnSetupAbstractInterceptor} { + + /// Log-instance. + private static readonly log4net.ILog _log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); + + /// + /// Set up the entity. + /// + /// + protected override void SetupEntity(${glEntityDefinedCommonColumnInterfaceName} entity) { + if (_log.IsDebugEnabled) { + _log.Debug(" before setup : " + entity.ExtractCommonColumnValueMapString()); + } + #foreach ($columnName in ${database.CommonColumnNameList}) + #set ($entityCommonColumnMap = ${database.CommonColumnMap}) + #set ($columnType = ${entityCommonColumnMap.get(${columnName})}) + #set ($javaNative = ${database.convertJavaNativeByJdbcType(${columnType})}) + #set ($javaName = ${database.convertJavaNameByJdbcNameAsColumn(${columnName})}) + #set ($uncapitalisedJavaName = ${database.convertUncapitalisedJavaNameByJdbcNameAsColumn(${columnName})}) + #if (${database.containsValidColumnNameKeyCommonColumnSetupBeforeInsertInterceptorLogicMap(${columnName})}) + #set ($logic = ${database.getCommonColumnSetupBeforeInsertInterceptorLogicByColumnName(${columnName})}) + #if ($database.isCommonColumnSetupInvokingLogic($logic)) + #set ($filteredLogic = $database.removeCommonColumnSetupInvokingMark($logic)) + + ${filteredLogic} + if (_log.IsDebugEnabled) { + _log.Debug(" CommonColumnSetup - ${columnName} has been set up: invoking=${filteredLogic}"); + } + #else + + ${javaNative} ${uncapitalisedJavaName} = ${logic}; + entity.${javaName} = ${uncapitalisedJavaName}; + if (_log.IsDebugEnabled) { + _log.Debug(" CommonColumnSetup - ${columnName} has been set up: value=" + ${uncapitalisedJavaName}); + } + #end + #end + #end + + if (_log.IsDebugEnabled) { + _log.Debug(" after setup : " + entity.ExtractCommonColumnValueMapString()); + } + } + } +} \ No newline at end of file Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/interceptor/CommonColumnSetupBeforeUpdateInterceptor.vmnet =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/interceptor/CommonColumnSetupBeforeUpdateInterceptor.vmnet 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/interceptor/CommonColumnSetupBeforeUpdateInterceptor.vmnet 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,57 @@ + +using System; +using System.Collections; + +using ${glPackageBaseCommon}; + +namespace ${glPackageBaseCommonInterceptor} { + + /// + /// CommonColumn-Setup-before-Update Interceptor. + /// Author : ${database.ClassAuthor} + /// + public class ${glCommonColumnSetupBeforeUpdateInterceptor} : ${glCommonColumnSetupAbstractInterceptor} { + + /// Log-instance. + private static readonly log4net.ILog _log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); + + /// + /// Set up the entity. + /// + /// + protected override void SetupEntity(${glEntityDefinedCommonColumnInterfaceName} entity) { + if (_log.IsDebugEnabled) { + _log.Debug(" before setup : " + entity.ExtractCommonColumnValueMapString()); + } + #foreach ($columnName in ${database.CommonColumnNameList}) + #set ($entityCommonColumnMap = ${database.CommonColumnMap}) + #set ($columnType = ${entityCommonColumnMap.get(${columnName})}) + #set ($javaNative = ${database.convertJavaNativeByJdbcType(${columnType})}) + #set ($javaName = ${database.convertJavaNameByJdbcNameAsColumn(${columnName})}) + #set ($uncapitalisedJavaName = ${database.convertUncapitalisedJavaNameByJdbcNameAsColumn(${columnName})}) + #if (${database.containsValidColumnNameKeyCommonColumnSetupBeforeUpdateInterceptorLogicMap(${columnName})}) + #set ($logic = ${database.getCommonColumnSetupBeforeUpdateInterceptorLogicByColumnName(${columnName})}) + #if ($database.isCommonColumnSetupInvokingLogic($logic)) + #set ($filteredLogic = $database.removeCommonColumnSetupInvokingMark($logic)) + + ${filteredLogic} + if (_log.IsDebugEnabled) { + _log.Debug(" CommonColumnSetup - ${columnName} has been set up: invoking=${filteredLogic}"); + } + #else + + ${javaNative} ${uncapitalisedJavaName} = ${logic}; + entity.${javaName} = ${uncapitalisedJavaName}; + if (_log.IsDebugEnabled) { + _log.Debug(" CommonColumnSetup - ${columnName} has been set up: value=" + ${uncapitalisedJavaName}); + } + #end + #end + #end + + if (_log.IsDebugEnabled) { + _log.Debug(" after setup : " + entity.ExtractCommonColumnValueMapString()); + } + } + } +} \ No newline at end of file Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/s2dao/FetchNarrowingResultSetFactory.vmnet =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/s2dao/FetchNarrowingResultSetFactory.vmnet 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/s2dao/FetchNarrowingResultSetFactory.vmnet 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,124 @@ + +using System; +using System.Reflection; +using System.Text; + +using ${glPackageBaseCommonCBean}; + +namespace ${glPackageBaseCommonS2Dao} { + + /** + * Fetch page result set factory. + * + * @author ${database.ClassAuthor} + */ + public class ${glFetchNarrowingResultSetFactory} : Seasar.Extension.ADO.IDataReaderFactory { + + /// Log instance. + private static readonly log4net.ILog _log = log4net.LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); + + /// Is internal-debug enabled? + private bool _isInternalDebugEnabled = false; + + /** + * Constructor. + */ + public ${glFetchNarrowingResultSetFactory}() { + } + + /** + * Create result set. + * + * @param ps Prepared statement. + * @return Result set. (NotNull) + */ + public System.Data.IDataReader CreateDataReader(Seasar.Extension.ADO.IDataSource dataSource, System.Data.IDbCommand cmd) { + if (_isInternalDebugEnabled) { + if (_log.IsDebugEnabled) { + _log.Debug("ExecuteReader(dataSource, cmd). dataSource=" + dataSource + " cmd=" + cmd); + } + } + + DateTime before = DateTime.Now; + System.Data.IDataReader dataReader = Seasar.Framework.Util.CommandUtil.ExecuteReader(dataSource, cmd); + DateTime after = DateTime.Now; + if (_log.IsDebugEnabled) { + _log.Debug("SQL Finished! (" + GetPerformanceView(before, after) + ")"); + } + + if (!${glFetchNarrowingBeanContextName}.IsExistFetchNarrowingBeanOnThread()) { + return dataReader;// If the first argument is not condition-bean... + } + ${glFetchNarrowingBeanInterfaceName} ${glAttachedCBArgsVariableName} = ${glFetchNarrowingBeanContextName}.GetFetchNarrowingBeanOnThread(); + + if (!${glAttachedCBArgsVariableName}.IsFetchNarrowingEffective) { + return dataReader;// It is not necessary to control. + } + if (!${glAttachedCBArgsVariableName}.IsFetchNarrowingSkipStartIndexEffective && !${glAttachedCBArgsVariableName}.IsFetchNarrowingLoopCountEffective) { + return dataReader;// It is not necessary to control. The sql already have been controlled. + } + + if (_isInternalDebugEnabled) { + if (_log.IsDebugEnabled) { + _log.Debug("Necessary to control fetch-narrowing! ${glAttachedCBArgsVariableName}=" + ${glAttachedCBArgsVariableName}); + } + } + return new ${glFetchNarrowingResultSetWrapper}(dataReader, ${glAttachedCBArgsVariableName}); + } + + /** + * Get performance-view + * + * @param mil Millisecond + * @return ex)?1m23s456ms?(NotNull) + */ + protected String GetPerformanceView(DateTime before, DateTime after) { + long beforeMil = 0; + { + String hour = (before.Hour < 10 ? "0" + before.Hour : "" + before.Hour); + String minute = (before.Minute < 10 ? "0" + before.Minute : "" + before.Minute); + String secound = (before.Second < 10 ? "0" + before.Second : "" + before.Second); + String millisecond = (before.Millisecond < 10 ? "00" + before.Millisecond : (before.Millisecond < 100 ? "0" + before.Millisecond : "" + before.Millisecond)); + beforeMil = long.Parse(hour + minute + secound + millisecond); + } + long afterMil = 0; + { + String hour = (after.Hour < 10 ? "0" + after.Hour : "" + after.Hour); + String minute = (after.Minute < 10 ? "0" + after.Minute : "" + after.Minute); + String secound = (after.Second < 10 ? "0" + after.Second : "" + after.Second); + String millisecond = (after.Millisecond < 10 ? "00" + after.Millisecond : (after.Millisecond < 100 ? "0" + after.Millisecond : "" + after.Millisecond)); + afterMil = long.Parse(hour + minute + secound + millisecond); + } + long mil = afterMil - beforeMil; + if (mil < 0) { + return "minus mil: " + after + "-" + before; + } + + long sec = mil / 1000; + long min = sec / 60; + sec = sec % 60; + mil = mil % 1000; + + StringBuilder sb = new StringBuilder(); + if (min >= 10) { // Minute + sb.Append(min).Append("m"); + } else if (min < 10 && min >= 0) { + sb.Append("0").Append(min).Append("m"); + } + if (sec >= 10) { // Secound + sb.Append(sec).Append("s"); + } else if (sec < 10 && sec >= 0) { + sb.Append("0").Append(sec).Append("s"); + } + if (mil >= 100) { // Millisecond + sb.Append(mil).Append("ms"); + } else if (mil < 100 && mil >= 10) { + sb.Append("0").Append(mil).Append("ms"); + } else if (mil < 10 && mil >= 0) { + sb.Append("00").Append(mil).Append("ms"); + } + + return sb.ToString(); + } + } +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/s2dao/FetchNarrowingResultSetWrapper.vmnet =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/s2dao/FetchNarrowingResultSetWrapper.vmnet 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/s2dao/FetchNarrowingResultSetWrapper.vmnet 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,311 @@ + +using System; +using System.Collections; +using System.Reflection; + +using ${glPackageBaseCommon}; +using ${glPackageBaseCommonCBean}; + +namespace ${glPackageBaseCommonS2Dao} { + + /** + * Fetch page??????ResultSet?????

+ * ??????????offset?????limit????????? + * next??????????

+ * limit?-1???A??????next?????????? + * + * @author ${database.ClassAuthor} + */ + public class ${glFetchNarrowingResultSetWrapper} : System.Data.IDataReader { + + ///

Log instance. + private static readonly log4net.ILog _log = log4net.LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); + + /// Is internal-debug enabled? + private bool _isInternalDebugEnabled = false; + + /** Original data-reader. */ + protected System.Data.IDataReader _dataReader; + + /** FetchNarrowing-bean. */ + protected ${glFetchNarrowingBeanInterfaceName} _${glAttachedCBArgsVariableName}; + + /** Fetch counter. */ + protected long _counter; + + /** + * Constructor. + * + * @param dataReader Original data-reader. (NotNull) + * @param ${glAttachedCBArgsVariableName} FetchNarrowing-bean. (NotNull) + */ + public ${glFetchNarrowingResultSetWrapper}(System.Data.IDataReader dataReader, ${glFetchNarrowingBeanInterfaceName} ${glAttachedCBArgsVariableName}) { + _dataReader = dataReader; + _${glAttachedCBArgsVariableName} = ${glAttachedCBArgsVariableName}; + + if (_isInternalDebugEnabled) { + if (_log.IsDebugEnabled) { + String msg = " IsFetchNarrowingSkipStartIndexEffective=" + GetFetchNarrowingBean().IsFetchNarrowingSkipStartIndexEffective; + _log.Debug(msg); + msg = " IsFetchNarrowingLoopCountEffective=" + GetFetchNarrowingBean().IsFetchNarrowingLoopCountEffective; + _log.Debug(msg); + msg = " GetFetchNarrowingSkipStartIndex()=" + GetFetchNarrowingSkipStartIndex(); + _log.Debug(msg); + msg = " GetFetchNarrowingLoopCount()=" + GetFetchNarrowingLoopCount(); + _log.Debug(msg); + } + } + + MoveToFetchStartIndex(); + } + + /** + * Move to fetch-start-index. + */ + private void MoveToFetchStartIndex() { + if (!GetFetchNarrowingBean().IsFetchNarrowingSkipStartIndexEffective) { + return; + } + if (IsCursorUsed()) { +// if (0 == GetFetchNarrowingSkipStartIndex()) { +// GetDataReader().beforeFirst(); +// } else { +// GetDataReader().absolute(GetFetchNarrowingSkipStartIndex()); +// } +// _counter = GetDataReader().getRow(); + throw new NotSupportedException("Cursor is unsupported!!!"); + } else { + while (_counter < GetFetchNarrowingSkipStartIndex() && GetDataReader().Read()) { + ++_counter; + } + } + if (_isInternalDebugEnabled) { + if (_log.IsDebugEnabled) { + _log.Debug(" After moving to fetch-start-index, counter=" + _counter); + } + } + } + + /** + * Read. + * + * @return Does the result set have next record? + * @throws SQLException + */ + public bool Read() { + bool hasNext = GetDataReader().Read(); + if (!GetFetchNarrowingBean().IsFetchNarrowingLoopCountEffective) { + return hasNext; + } + if (hasNext && _counter < GetFetchNarrowingSkipStartIndex() + GetFetchNarrowingLoopCount()) { + ++_counter; + return true; + } else { + if (_isInternalDebugEnabled) { + if (_log.IsDebugEnabled) { + String msg = " Finally the result of Read() is false! Because counter is greater-equal"; + msg = msg + " than 'fetch-start-index + real-fetch-size'."; + msg = msg + " " + _counter + " >= " + GetFetchNarrowingSkipStartIndex() + " + " + GetFetchNarrowingLoopCount(); + _log.Debug(msg); + } + } + return false; + } + } + + /** + * Get result set. + * + * @return Result set. + */ + protected System.Data.IDataReader GetDataReader() { + return _dataReader; + } + + /** + * Get condition-bean. + * + * @return FetchNarrowing-bean. + */ + protected ${glFetchNarrowingBeanInterfaceName} GetFetchNarrowingBean() { + return _${glAttachedCBArgsVariableName}; + } + + /** + * Get fetch-narrowing start-index from condition-bean. + * + * @return Fetch-narrowing start-index. + */ + protected int GetFetchNarrowingSkipStartIndex() { + return GetFetchNarrowingBean().FetchNarrowingSkipStartIndex; + } + + /** + * Get fetch-narrowing size from condition-bean. + * + * @return Fetch-narrowing size. + */ + protected int GetFetchNarrowingLoopCount() { + return _${glAttachedCBArgsVariableName}.FetchNarrowingLoopCount; + } + + /** + * Is cursor used? + * + * @return Determination. + */ + protected bool IsCursorUsed() { + return IsCursorSupported(GetDataReader()); + } + + /** + * Is cursor supported? + * + * @param resultSet ResultSet + * @return Determation. + */ + public static bool IsCursorSupported(System.Data.IDataReader dataReader) { + return false;// Is Cursor Unsupported at C#? + } + +#region IDataReader ??? + + void System.Data.IDataReader.Close() { + GetDataReader().Close(); + } + + int System.Data.IDataReader.Depth { + get { return GetDataReader().Depth; } + } + + System.Data.DataTable System.Data.IDataReader.GetSchemaTable() { + return GetDataReader().GetSchemaTable(); + } + + bool System.Data.IDataReader.IsClosed { + get { return GetDataReader().IsClosed; } + } + + bool System.Data.IDataReader.NextResult() { + return GetDataReader().NextResult(); + } + + int System.Data.IDataReader.RecordsAffected { + get { return GetDataReader().RecordsAffected; } + } + + #endregion + + #region IDisposable ??? + + void System.IDisposable.Dispose() { + GetDataReader().Dispose(); + } + + #endregion + + #region IDataRecord ??? + + int System.Data.IDataRecord.FieldCount { + get { return GetDataReader().FieldCount; } + } + + bool System.Data.IDataRecord.GetBoolean(int i) { + return GetDataReader().GetBoolean(i); + } + + byte System.Data.IDataRecord.GetByte(int i) { + return GetDataReader().GetByte(i); + } + + long System.Data.IDataRecord.GetBytes(int i, long fieldOffset, byte[] buffer, int bufferoffset, int length) { + return GetDataReader().GetBytes(i, fieldOffset, buffer, bufferoffset, length); + } + + char System.Data.IDataRecord.GetChar(int i) { + return GetDataReader().GetChar(i); + } + + long System.Data.IDataRecord.GetChars(int i, long fieldoffset, char[] buffer, int bufferoffset, int length) { + return GetDataReader().GetChars(i, fieldoffset, buffer, bufferoffset, length); + } + + System.Data.IDataReader System.Data.IDataRecord.GetData(int i) { + return GetDataReader().GetData(i); + } + + string System.Data.IDataRecord.GetDataTypeName(int i) { + return GetDataReader().GetDataTypeName(i); + } + + System.DateTime System.Data.IDataRecord.GetDateTime(int i) { + return GetDataReader().GetDateTime(i); + } + + decimal System.Data.IDataRecord.GetDecimal(int i) { + return GetDataReader().GetDecimal(i); + } + + double System.Data.IDataRecord.GetDouble(int i) { + return GetDataReader().GetDouble(i); + } + + System.Type System.Data.IDataRecord.GetFieldType(int i) { + return GetDataReader().GetFieldType(i); + } + + float System.Data.IDataRecord.GetFloat(int i) { + return GetDataReader().GetFloat(i); + } + + System.Guid System.Data.IDataRecord.GetGuid(int i) { + return GetDataReader().GetGuid(i); + } + + short System.Data.IDataRecord.GetInt16(int i) { + return GetDataReader().GetInt16(i); + } + + int System.Data.IDataRecord.GetInt32(int i) { + return GetDataReader().GetInt32(i); + } + + long System.Data.IDataRecord.GetInt64(int i) { + return GetDataReader().GetInt64(i); + } + + string System.Data.IDataRecord.GetName(int i) { + return GetDataReader().GetName(i); + } + + int System.Data.IDataRecord.GetOrdinal(string name) { + return GetDataReader().GetOrdinal(name); + } + + string System.Data.IDataRecord.GetString(int i) { + return GetDataReader().GetString(i); + } + + object System.Data.IDataRecord.GetValue(int i) { + return GetDataReader().GetValue(i); + } + + int System.Data.IDataRecord.GetValues(object[] values) { + return GetDataReader().GetValues(values); + } + + bool System.Data.IDataRecord.IsDBNull(int i) { + return GetDataReader().IsDBNull(i); + } + + object System.Data.IDataRecord.this[string name] { + get { return GetDataReader()[name]; } + } + + object System.Data.IDataRecord.this[int i] { + get { return GetDataReader()[i]; } + } + + #endregion + } +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/s2dao/S2DaoInterceptor.vmnet =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/s2dao/S2DaoInterceptor.vmnet 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/s2dao/S2DaoInterceptor.vmnet 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,334 @@ + +using System; +using System.Reflection; +using System.Collections; +using System.Text; + +using ${glPackageBaseCommon}; +using ${glPackageBaseCommonCBean}; +using ${glPackageBaseCommonException}; + +namespace ${glPackageBaseCommonS2Dao} { + + /** + * My-DaoInterceptor. + * Customises original class 'S2DaoInterceptor'. + * + * @author ${database.ClassAuthor} + */ + public class ${glDaoInterceptor} : Seasar.Framework.Aop.Interceptors.AbstractInterceptor { + + /** Log-instance. */ + private static readonly log4net.ILog _log = log4net.LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); + + /** Dao meta data factory. */ + private Seasar.Dao.IDaoMetaDataFactory daoMetaDataFactory_; + + /** + * Constructor. + * + * @param daoMetaDataFactory Dao meta data factory. + */ + public ${glDaoInterceptor}(Seasar.Dao.IDaoMetaDataFactory daoMetaDataFactory) { + daoMetaDataFactory_ = daoMetaDataFactory; + } + + /** + * Invoke. + * + * @param invocation Method invocation. + * @return Result of the method. + * @throws Throwable + */ + public override object Invoke(Seasar.Framework.Aop.IMethodInvocation invocation) { + System.Reflection.MethodBase method = invocation.Method; + if (!method.IsAbstract) { + return invocation.Proceed(); + } + TraceMethod(invocation); + DateTime before = DateTime.Now; + + Type targetType = GetComponentDef(invocation).ComponentType; + Seasar.Dao.ISqlCommand cmd = null; + { + DateTime beforeCmd = DateTime.Now; + Seasar.Dao.IDaoMetaData dmd = null; + try { + dmd = daoMetaDataFactory_.GetDaoMetaData(targetType); + } catch (Exception e) { + _log.Warn("IDaoMetaDataFactory#GetDaoMetaData() threw the exception: targetType=" + targetType, e); + throw; + } + try { + cmd = dmd.GetSqlCommand(method.Name); + } catch (Exception e) { + _log.Warn("IDaoMetaData#GetSqlCommand() threw the exception: dmd=" + dmd + " methodName=" + method.Name, e); + throw; + } + DateTime afterCmd = DateTime.Now; + TraceSqlCommand(invocation, cmd, beforeCmd, afterCmd); + } + + ${glConditionBeanInterfaceName} ${glAttachedCBArgsVariableName} = null; + try { + ${glAttachedCBArgsVariableName} = PreprocessConditionBean(invocation, cmd); + } catch (Exception e) { + _log.Warn("${glDaoInterceptor}#PreprocessConditionBean() threw the exception: ", e); + throw; + } + + object ret = null; + try { + ret = cmd.Execute(invocation.Arguments); + } catch (Exception e) { + if (e is Seasar.Dao.NotSingleRowUpdatedRuntimeException) { + if (_log.IsInfoEnabled) { + _log.Info("Dao threw the exception: NotSingleRowUpdatedRuntimeException - " + e.Message); + } + throw; + } + _log.Info(" "); + _log.Info("/ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @"); + _log.Info("Dao threw the exception: " + e.GetType() + " msg=" + e.Message); + _log.Info(" method --> " + invocation.Method); + _log.Info(" argument --> " + GetObjectArrayString(invocation.Arguments)); + if (e is Seasar.Framework.Exceptions.SQLRuntimeException) { + String sql = ((Seasar.Framework.Exceptions.SQLRuntimeException)e).Sql; + _log.Info(" sql --> " + sql); + } + _log.Info("@ @ @ @ @ @ @ @ @ @ @ /"); + _log.Info(" "); + throw; + } + PostprocessConditionBean(invocation, ${glAttachedCBArgsVariableName}); + DateTime after = DateTime.Now; + + Type retType = ((MethodInfo) method).ReturnType; + ret = Seasar.Framework.Util.ConversionUtil.ConvertTargetType(ret, retType); + + TraceReturn(invocation, retType, ret, before, after); + return ret; + } + + protected void TraceMethod(Seasar.Framework.Aop.IMethodInvocation invocation) { + if (_log.IsDebugEnabled) { + System.Reflection.MethodBase method = invocation.Method; + String invokeName = method.DeclaringType.Name + "." + method.Name; + int length = invokeName.Length; + StringBuilder sb = new StringBuilder(); + for (int i=0; i < length; i++) { + sb.Append("="); + } + _log.Debug("/=====================================================" + sb.ToString() + "=="); + _log.Debug(" " + invokeName + "()"); + _log.Debug(" " + sb.ToString() + "=/"); + } + } + + protected void TraceSqlCommand(Seasar.Framework.Aop.IMethodInvocation invocation, Seasar.Dao.ISqlCommand cmd, DateTime beforeCmd, DateTime afterCmd) { + if (_log.IsDebugEnabled) { + _log.Debug("SqlCommand Initialization Cost: [" + GetPerformanceView(beforeCmd, afterCmd) + "]"); + } + } + + protected void TraceReturn(Seasar.Framework.Aop.IMethodInvocation invocation, Type retType, Object ret, DateTime before, DateTime after) { + if (_log.IsDebugEnabled) { + System.Reflection.MethodBase method = invocation.Method; + try { + String daoResultPrefix = "===========/ [" + GetPerformanceView(before, after) + " - "; + if (typeof(System.Collections.IList).IsAssignableFrom(retType)) { + if (ret == null) { + _log.Debug(daoResultPrefix + "Selected count: null]"); + } else { + System.Collections.IList ls = (System.Collections.IList)ret; + if (ls.Count == 0) { + _log.Debug(daoResultPrefix + "Selected count: 0]"); + } else { + _log.Debug(daoResultPrefix + "Selected count: " + ls.Count + " first=" + ls[0] + "]"); + } + } + } else if (typeof(${glEntityInterfaceName}).IsAssignableFrom(retType)) { + if (ret == null) { + _log.Debug(daoResultPrefix + "Selected entity: null" + "]"); + } else { + ${glEntityInterfaceName} entity = (${glEntityInterfaceName})ret; + _log.Debug(daoResultPrefix + "Selected entity: " + entity + "]"); + } + } else { + if (IsSelectCountIgnoreFetchScopeMethod(invocation)) { + _log.Debug(daoResultPrefix + "Selected count: " + ret + "]"); + } else { + _log.Debug(daoResultPrefix + "Result: " + ret + "]"); + } + } + _log.Debug(" "); + } catch (Exception e) { + String msg = "Result object debug threw the exception: methodName=" + method.Name + " retType=" + retType; + msg = msg + " ret=" + ret; + _log.Warn(msg, e); + throw; + } + } + } + + /** + * Preprocess condition-bean. + *

+ * If this method is condition bean select target, make dynamic sql. + * Else nothing. + * + * @param invocation Method invocation. (NotNull) + * @param cmd Sql command. (NotNull) + * @return Condition-bean. (Nullable) + */ + protected ${glConditionBeanInterfaceName} PreprocessConditionBean(Seasar.Framework.Aop.IMethodInvocation invocation, Seasar.Dao.ISqlCommand cmd) { + ClearThreadLocal(); + + Object[] args = invocation.Arguments; + if (args == null || !(args.Length >= 1)) { + return null; + } + if (args[0] == null) { + return null; + } + + if (!${glConditionBeanContextName}.IsTheArgumentConditionBean(args[0])) {// The argument is not condition-bean... + if (${glFetchNarrowingBeanContextName}.IsTheArgumentFetchNarrowingBean(args[0]) && !IsSelectCountIgnoreFetchScopeMethod(invocation)) { + // Fetch-narrowing-bean and Not select count! + ${glFetchNarrowingBeanContextName}.SetFetchNarrowingBeanOnThread((${glFetchNarrowingBeanInterfaceName})args[0]); + } + return null; + } + + ${glConditionBeanInterfaceName} ${glAttachedCBArgsVariableName} = (${glConditionBeanInterfaceName})args[0]; + + if (!(cmd is ${glSelectDynamicCommand})) {// The argument is condition-bean, but this method using outer-file-sql... + ${glFetchNarrowingBeanContextName}.SetFetchNarrowingBeanOnThread((${glFetchNarrowingBeanInterfaceName})args[0]); + return null; + } + + if (IsSelectCountIgnoreFetchScopeMethod(invocation)) { + ${glAttachedCBArgsVariableName}.SetupSelectCountIgnoreFetchScope(); + } else { + ${glFetchNarrowingBeanContextName}.SetFetchNarrowingBeanOnThread(cb); + } + + ${glConditionBeanContextName}.SetConditionBeanOnThread(cb); + return ${glAttachedCBArgsVariableName}; + } + + /** + * Postprocess condition-bean. + * + * @param invocation Method invocation. (NotNull) + * @param ${glAttachedCBArgsVariableName} Condition-bean. (Nullable) + */ + public void PostprocessConditionBean(Seasar.Framework.Aop.IMethodInvocation invocation, ${glConditionBeanInterfaceName} ${glAttachedCBArgsVariableName}) { + ClearThreadLocal(); + + if (${glAttachedCBArgsVariableName} == null) { + return; + } + if (IsSelectCountIgnoreFetchScopeMethod(invocation)) { + ${glAttachedCBArgsVariableName}.AfterCareSelectCountIgnoreFetchScope(); + } + } + + protected void ClearThreadLocal() { + if (${glFetchNarrowingBeanContextName}.IsExistFetchNarrowingBeanOnThread()) { + ${glFetchNarrowingBeanContextName}.ClearFetchNarrowingBeanOnThread(); + } + if (${glConditionBeanContextName}.IsExistConditionBeanOnThread()) { + ${glConditionBeanContextName}.ClearConditionBeanOnThread(); + } + } + + /** + * Is select-count-ignore-fetch-scope method? + * + * @param invocation Method invocation. (NotNull) + * @return Determination. + */ + protected bool IsSelectCountIgnoreFetchScopeMethod(Seasar.Framework.Aop.IMethodInvocation invocation) { + String name = invocation.Method.Name; + if (name.StartsWith("ReadCount") + || name.StartsWith("SelectCount") + || name.StartsWith("SelectCountIgnoreFetchScope") + || name.StartsWith("SelectCountIgnoreFetchScope")) { + return true; + } else { + return false; + } + } + + protected String GetPerformanceView(DateTime before, DateTime after) { + long beforeMil = 0; + { + String hour = (before.Hour < 10 ? "0" + before.Hour : "" + before.Hour); + String minute = (before.Minute < 10 ? "0" + before.Minute : "" + before.Minute); + String secound = (before.Second < 10 ? "0" + before.Second : "" + before.Second); + String millisecond = (before.Millisecond < 10 ? "00" + before.Millisecond : (before.Millisecond < 100 ? "0" + before.Millisecond : "" + before.Millisecond)); + beforeMil = long.Parse(hour + minute + secound + millisecond); + } + long afterMil = 0; + { + String hour = (after.Hour < 10 ? "0" + after.Hour : "" + after.Hour); + String minute = (after.Minute < 10 ? "0" + after.Minute : "" + after.Minute); + String secound = (after.Second < 10 ? "0" + after.Second : "" + after.Second); + String millisecond = (after.Millisecond < 10 ? "00" + after.Millisecond : (after.Millisecond < 100 ? "0" + after.Millisecond : "" + after.Millisecond)); + afterMil = long.Parse(hour + minute + secound + millisecond); + } + long mil = afterMil - beforeMil; + if (mil < 0) { + return "minus mil: " + after + "-" + before; + } + + long sec = mil / 1000; + long min = sec / 60; + sec = sec % 60; + mil = mil % 1000; + + StringBuilder sb = new StringBuilder(); + if (min >= 10) { // Minute + sb.Append(min).Append("m"); + } else if (min < 10 && min >= 0) { + sb.Append("0").Append(min).Append("m"); + } + if (sec >= 10) { // Secound + sb.Append(sec).Append("s"); + } else if (sec < 10 && sec >= 0) { + sb.Append("0").Append(sec).Append("s"); + } + if (mil >= 100) { // Millisecond + sb.Append(mil).Append("ms"); + } else if (mil < 100 && mil >= 10) { + sb.Append("0").Append(mil).Append("ms"); + } else if (mil < 10 && mil >= 0) { + sb.Append("00").Append(mil).Append("ms"); + } + + return sb.ToString(); + } + + /** + * Change object array to string divided with comma. + * + * @param objArray Object array. (Nullable) + * @return String (NotNull: If the argument is null, returns empty string.) + */ + protected String GetObjectArrayString(Object[] objArray) { + if (objArray == null) { + return ""; + } + StringBuilder sb = new StringBuilder(); + for (int i = 0; i < objArray.Length; i++) { + if (i == 0) { + sb.Append(objArray[i]); + } else { + sb.Append(", ").Append(objArray[i]); + } + } + return sb.ToString(); + } + } +} \ No newline at end of file Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/s2dao/S2DaoMetaDataExtension.vmnet =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/s2dao/S2DaoMetaDataExtension.vmnet 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/s2dao/S2DaoMetaDataExtension.vmnet 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,459 @@ + +using System; +using System.Collections; +using System.Data; +using System.Text; +using System.Reflection; + +using Seasar.Dao; +using Seasar.Dao.Attrs; +using Seasar.Dao.Dbms; +using Seasar.Dao.Impl; +using Seasar.Extension.ADO; +using Seasar.Extension.ADO.Impl; +using Seasar.Extension.ADO.Types; +using Seasar.Framework.Beans; +using Seasar.Framework.Util; + +using ${glPackageBaseCommonCBean}; +using ${glPackageBaseCommonAnnotation}; + +namespace ${glPackageBaseCommonS2Dao} { + + public class ${glDaoMetaDataExtension} : Seasar.Dao.Impl.DaoMetaDataImpl { + + public ${glDaoMetaDataExtension}(Type daoType, IDataSource dataSource,ICommandFactory commandFactory, + IDataReaderFactory dataReaderFactory, IDatabaseMetaData dbMetaData) + : base(daoType, dataSource, commandFactory, dataReaderFactory, dbMetaData) {} + + public override void Initialize() + { + daoInterface = GetDaoInterface(daoType); + annotationReader = AnnotationReaderFactory.CreateDaoAnnotationReader(daoType); + beanType = annotationReader.GetBeanType(); + dbms = DbmsManager.GetDbms(dataSource); + BeanMetaDataExtension bmdExt = new BeanMetaDataExtension(beanType, annotationReaderFactory, false); + bmdExt.Initialize(dbMetaData, dbms); + beanMetaData = bmdExt; + SetupSqlCommand(); + } + + // ===================================================================================== + // Outside Sql Check Override + // ========================== + protected override void SetupMethodByAuto(MethodInfo mi) { + ${glOutsideSqlAnnotation} outsideSql = Attribute.GetCustomAttribute(mi, typeof(${glOutsideSqlAnnotation})) as ${glOutsideSqlAnnotation}; + if (outsideSql != null) { + String msg = "This method '" + mi.Name + "()' should use Outside Sql but the file was not found!"; + msg = msg + " Expected sql file name is '" + mi.DeclaringType.Name + "_" + mi.Name + ".sql'"; + throw new SystemException(msg); + } + base.SetupMethodByAuto(mi); + } + + // ===================================================================================== + // ConditionBean Override + // ====================== + protected override void SetupSelectMethodByAuto(MethodInfo methodInfo) { + String query = annotationReader.GetQuery(methodInfo.Name); + IDataReaderHandler handler = CreateDataReaderHandler(methodInfo); + SelectDynamicCommand cmd = null; + String[] argNames = MethodUtil.GetParameterNames(methodInfo); + Type[] argTypes = MethodUtil.GetParameterTypes(methodInfo); + if (query != null && !StartsWithOrderBy(query)) { + cmd = CreateSelectDynamicCommand(handler, query); + } else { + cmd = CreateSelectDynamicCommand(handler); + String sql = null; + if (argTypes.Length == 1 && ValueTypes.GetValueType(argTypes[0]) == ValueTypes.OBJECT) { + argNames = new String[] { "dto" }; + // /----------------------------------------------------- [MyExtension] + if (${glConditionBeanContextName}.IsTheTypeConditionBean(argTypes[0])) { + ${glSelectDynamicCommand} dynamicCommand = NewMySelectDynamicCommand(handler); + String sqlNormal = GetSelectClause(); + String sqlPKOnly = GetSelectClausePKOnly(); + sql = sqlNormal; + cmd = dynamicCommand; + dynamicCommand.SetSelectClause(sqlNormal); + dynamicCommand.SetSelectClausePKOnly(sqlPKOnly); + dynamicCommand.ArgNames4Nest = argNames;// Oops! + dynamicCommand.ArgTypes4Nest = argTypes;// Oops! + } else { + if (typeof(${glSelectResourceInterfaceName}).IsAssignableFrom(argTypes[0])) { + String msg = "If the first argument type is select-resource(and not condition-bean), "; + msg = msg + "the method should not use auto-select-sql-by-dto."; + msg = msg + " (Do you want to use outer-file-sql? Please check your sql-file-name and build-action!)"; + msg = msg + ": dao=" + methodInfo.DeclaringType + " method=" + methodInfo.Name + "()"; + msg = msg + " firstArgument=" + argTypes[0] + " argTypes.Length=" + argTypes.Length; + throw new SystemException(msg); + } + sql = CreateAutoSelectSqlByDto(argTypes[0]); + } + // -----------/ + } else { + // /----------------------------------------------------- [MyExtension] + if (argTypes.Length > 1 && ValueTypes.GetValueType(argTypes[0]) == ValueTypes.OBJECT) { + if (typeof(${glSelectResourceInterfaceName}).IsAssignableFrom(argTypes[0])) { + String msg = "If the number of argument is more than 1 and the first argument type is select-resource, "; + msg = msg + "the method should not use auto-select-sql."; + msg = msg + " (Do you want to use outer-file-sql? Please check your sql-file-name and build-action!)"; + msg = msg + ": dao=" + methodInfo.DeclaringType + " method=" + methodInfo.Name + "()"; + msg = msg + " firstArgument=" + argTypes[0] + " argTypes.Length=" + argTypes.Length; + throw new SystemException(msg); + } + } + // -----------/ + sql = CreateAutoSelectSql(argNames, argTypes); + } + if (query != null) { + sql = sql + " " + query; + } + cmd.Sql = sql; + } + cmd.ArgNames = argNames; + cmd.ArgTypes = argTypes; + sqlCommands[methodInfo.Name] = cmd; + } + + protected String GetSelectClausePKOnly() { + StringBuilder sb = new StringBuilder(100); + sb.Append("select/*$dto.SelectHint*/ "); + + StringBuilder sbMySelectList = new StringBuilder(100); + for (int i = 0; i < beanMetaData.PropertyTypeSize; ++i) { + IPropertyType pt = beanMetaData.GetPropertyType(i); + if (pt.IsPersistent && pt.IsPrimaryKey) { + if (sbMySelectList.Length != 0) { + sbMySelectList.Append(", "); + } + sbMySelectList.Append(beanMetaData.TableName); + sbMySelectList.Append("."); + sbMySelectList.Append(pt.ColumnName); + } + } + sb.Append(sbMySelectList); + + return sb.ToString(); + } + + protected String GetSelectClause() { + StringBuilder sb = new StringBuilder(100); + sb.Append("select/*$dto.SelectHint*/ "); + + StringBuilder sbMySelectList = new StringBuilder(100); + for (int i = 0; i < beanMetaData.PropertyTypeSize; ++i) { + IPropertyType pt = beanMetaData.GetPropertyType(i); + if (pt.IsPersistent) { + if (sbMySelectList.Length != 0) { + sbMySelectList.Append(", "); + } + sbMySelectList.Append(beanMetaData.TableName); + sbMySelectList.Append("."); + sbMySelectList.Append(pt.ColumnName); + } + } + sb.Append(sbMySelectList); + + SetupRelationSelectClause(sb, beanMetaData, "", "", 1); + return sb.ToString(); + } + + protected void SetupRelationSelectClause(StringBuilder sb, IBeanMetaData baseBmd, String judgeProp, String preNoSuffix, int cqNestNo) { + for (int i = 0; i < baseBmd.RelationPropertyTypeSize; ++i) { + StringBuilder sbYourSelectList = new StringBuilder(100); + IRelationPropertyType rpt = baseBmd.GetRelationPropertyType(i); + if (rpt == null) { + String msg = "The baseBmd.GetRelationPropertyType(" + i + ") returned null"; + msg = msg + ": baseBmd.TableName=" + baseBmd.TableName; + msg = msg + ": baseBmd.RelationPropertyTypeSize=" + baseBmd.RelationPropertyTypeSize; + throw new SystemException(msg); + } + + IBeanMetaData relationBmd = rpt.BeanMetaData; + String initCapPropertyName = rpt.PropertyName; + String ifComment = "/*IF dto." + judgeProp + "IsSelect" + initCapPropertyName + "*/"; + String endComment = "/*END*/"; + for (int j = 0; j < relationBmd.PropertyTypeSize; ++j) { + IPropertyType pt = relationBmd.GetPropertyType(j); + String tableAliasName = rpt.PropertyName + (cqNestNo > 1 ? "_n" + cqNestNo : ""); + if (pt.IsPersistent) { + String columnName = pt.ColumnName; + sbYourSelectList.Append(", "); + sbYourSelectList.Append(tableAliasName).Append(".").Append(columnName); + sbYourSelectList.Append(" AS "); + sbYourSelectList.Append(pt.ColumnName).Append(preNoSuffix).Append("_").Append(rpt.RelationNo); + } + } + if (relationBmd.RelationPropertyTypeSize > 0) { + String nssString = "Nss" + initCapPropertyName + "."; + String nextPreNoSuffix = preNoSuffix + "_" + rpt.RelationNo; + int nextCQNestNo = cqNestNo + 1; + SetupRelationSelectClause(sbYourSelectList, relationBmd, nssString, nextPreNoSuffix, nextCQNestNo); + } + sb.Append(ifComment).Append(sbYourSelectList).Append(endComment); + } + } + + protected ${glSelectDynamicCommand} NewMySelectDynamicCommand(IDataReaderHandler handler) {// for condition-bean + return new ${glSelectDynamicCommand}(dataSource, commandFactory, handler, dataReaderFactory); + } + + // ===================================================================================== + // Command Override + // ================ + protected override SelectDynamicCommand CreateSelectDynamicCommand(IDataReaderHandler drh) {// for all except condition-bean + return new SelectDynamicCommandExtension(dataSource, commandFactory, drh, dataReaderFactory); + } + + // ===================================================================================== + // ByManual Override + // ================= + protected override void SetupSelectMethodByManual(MethodInfo mi, string sql) { + IBeanMetaData myMetaData = BuildBeanMetaData(mi, dbMetaData, dbms); + SelectDynamicCommand cmd = CreateSelectDynamicCommand(CreateDataReaderHandler4SelectMethodByManual(mi, myMetaData)); + cmd.Sql = sql; + cmd.ArgNames = MethodUtil.GetParameterNames(mi); + cmd.ArgTypes = MethodUtil.GetParameterTypes(mi); + sqlCommands[mi.Name] = cmd; + } + + protected IBeanMetaData BuildBeanMetaData(MethodInfo mi, IDatabaseMetaData databaseMetaData, Seasar.Dao.IDbms dbInfo) { + Type beanClass4SelectMethodByManual = GetBeanClass4SelectMethodByManual(mi); + if (beanClass4SelectMethodByManual.Equals(beanType)) { + return beanMetaData; + } + BeanMetaDataExtension bmdExt = new BeanMetaDataExtension(beanClass4SelectMethodByManual, annotationReaderFactory, false); + bmdExt.Initialize(databaseMetaData, dbInfo); + return bmdExt; + } + + protected Type GetBeanClass4SelectMethodByManual(MethodInfo mi) { + Type retType = mi.ReturnType; + if (retType.IsGenericType && (retType.GetGenericTypeDefinition().Equals(typeof(System.Collections.Generic.IList<>)))) { + return retType.GetGenericArguments()[0]; + } else if (!retType.IsGenericType && typeof(System.Collections.IList).IsAssignableFrom(retType)) { + return beanType; + } else if (retType.IsArray) { + return retType.GetElementType(); + } else if (ValueTypes.GetValueType(retType) != ValueTypes.OBJECT) { + return beanType; + } else { + return retType; + } + } + + protected IDataReaderHandler CreateDataReaderHandler4SelectMethodByManual(MethodInfo mi, IBeanMetaData bmd) + { + Type retType = mi.ReturnType; + + if (retType.IsArray) { + return CreateBeanArrayMetaDataDataReaderHandler(bmd); + } else if (!retType.IsGenericType && typeof(IList).IsAssignableFrom(retType)) { + return CreateBeanListMetaDataDataReaderHandler(bmd); + } else if (IsBeanTypeAssignable4SelectMethodByManual(retType, bmd)) { + return CreateBeanMetaDataDataReaderHandler(bmd); + } else if (Array.CreateInstance(beanType, 0).GetType().IsAssignableFrom(retType)) { + return CreateBeanArrayMetaDataDataReaderHandler(bmd); + } else if(retType.IsGenericType && (retType.GetGenericTypeDefinition().Equals(typeof(System.Collections.Generic.IList<>)) + || retType.GetGenericTypeDefinition().Equals(typeof(System.Collections.Generic.List<>)))) { + return CreateBeanGenericListMetaDataDataReaderHandler(bmd); + } else { + return CreateObjectDataReaderHandler(); + } + } + + protected bool IsBeanTypeAssignable4SelectMethodByManual(Type type, IBeanMetaData bmd) { + return bmd.BeanType.IsAssignableFrom(type) || type.IsAssignableFrom(bmd.BeanType); + } + + // ===================================================================================== + // ReaderHandler Override + // ====================== + protected override BeanListMetaDataDataReaderHandler CreateBeanListMetaDataDataReaderHandler(IBeanMetaData bmd) { + return new BeanListMetaDataDataReaderHandlerExtension(bmd); + } + + protected override BeanMetaDataDataReaderHandler CreateBeanMetaDataDataReaderHandler(IBeanMetaData bmd) { + return new BeanMetaDataDataReaderHandlerExtension(bmd); + } + + protected override BeanArrayMetaDataDataReaderHandler CreateBeanArrayMetaDataDataReaderHandler(IBeanMetaData bmd) { + return new BeanArrayMetaDataDataReaderHandlerExtension(bmd); + } + + protected override BeanGenericListMetaDataDataReaderHandler CreateBeanGenericListMetaDataDataReaderHandler(IBeanMetaData bmd) { + return new BeanGenericListMetaDataDataReaderHandlerExtension(bmd); + } + + protected override ObjectDataReaderHandler CreateObjectDataReaderHandler() { + return new ObjectDataReaderHandler(); + } + } + + // ===================================================================================== + // Extension Class + // =============== + public class SelectDynamicCommandExtension : SelectDynamicCommand { + /** Log-instance. */ + private static readonly log4net.ILog _log = log4net.LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); + + private readonly IDataReaderHandler _dataReaderHandler; + private readonly IDataReaderFactory _dataReaderFactory; + + public SelectDynamicCommandExtension(IDataSource dataSource, + ICommandFactory commandFactory, + IDataReaderHandler dataReaderHandler, IDataReaderFactory dataReaderFactory) + : base(dataSource, commandFactory, dataReaderHandler, dataReaderFactory) { + _dataReaderHandler = dataReaderHandler; + _dataReaderFactory = dataReaderFactory; + } + + public override object Execute(object[] args) { + ICommandContext ctx = Apply(args); + BasicSelectHandler selectHandler = new BasicSelectHandler(DataSource, + ctx.Sql, _dataReaderHandler, CommandFactory, _dataReaderFactory); +#if ($database.isSelectQueryTimeoutValid()) + + int timeout = ${database.SelectQueryTimeout}; + if (_log.IsDebugEnabled) { + _log.Debug("@SelectDynamicCommand: selectHandler.CommandTimeout = " + timeout + ";// from SelectQueryTimeout"); + } + selectHandler.CommandTimeout = timeout; +#end + + return selectHandler.Execute(ctx.BindVariables, ctx.BindVariableTypes); + } + } + + public class BeanListMetaDataDataReaderHandlerExtension : BeanListMetaDataDataReaderHandler { + public BeanListMetaDataDataReaderHandlerExtension(IBeanMetaData beanMetaData) + : base(beanMetaData) { + } + protected RelationRowCreator _creator = new RelationRowCreator(); + protected override object CreateRelationRow(IDataReader reader, IRelationPropertyType rpt, IList columnNames, Hashtable relKeyValues) { + return _creator.CreateRelationRow(reader, rpt, columnNames, relKeyValues, ""); + } + } + public class BeanMetaDataDataReaderHandlerExtension : BeanMetaDataDataReaderHandler { + public BeanMetaDataDataReaderHandlerExtension(IBeanMetaData beanMetaData) + : base(beanMetaData) { + } + protected RelationRowCreator _creator = new RelationRowCreator(); + protected override object CreateRelationRow(IDataReader reader, IRelationPropertyType rpt, IList columnNames, Hashtable relKeyValues) { + return _creator.CreateRelationRow(reader, rpt, columnNames, relKeyValues, ""); + } + } + public class BeanArrayMetaDataDataReaderHandlerExtension : BeanArrayMetaDataDataReaderHandler { + public BeanArrayMetaDataDataReaderHandlerExtension(IBeanMetaData beanMetaData) + : base(beanMetaData) { + } + protected RelationRowCreator _creator = new RelationRowCreator(); + protected override object CreateRelationRow(IDataReader reader, IRelationPropertyType rpt, IList columnNames, Hashtable relKeyValues) { + return _creator.CreateRelationRow(reader, rpt, columnNames, relKeyValues, ""); + } + } + public class BeanGenericListMetaDataDataReaderHandlerExtension : BeanGenericListMetaDataDataReaderHandler { + public BeanGenericListMetaDataDataReaderHandlerExtension(IBeanMetaData beanMetaData) + : base(beanMetaData) { + } + protected RelationRowCreator _creator = new RelationRowCreator(); + protected override object CreateRelationRow(IDataReader reader, IRelationPropertyType rpt, IList columnNames, Hashtable relKeyValues) { + return _creator.CreateRelationRow(reader, rpt, columnNames, relKeyValues, ""); + } + } + + public class BeanMetaDataExtension : BeanMetaDataImpl { + public BeanMetaDataExtension(Type beanType, IAnnotationReaderFactory annotationReaderFactory, bool relation) + : base() { + this.BeanType = beanType; + this.relation = relation; + this.AnnotationReaderFactory = annotationReaderFactory; + } + protected int _nestNo; + public int NestNo { + get { return _nestNo; } + set { _nestNo = value; } + } + protected override IBeanMetaData CreateRelationBeanMetaData(PropertyInfo propertyInfo, IDatabaseMetaData dbMetaData, IDbms dbms) { + bool isRelation = false; + if (this.NestNo > 0) { + isRelation = true; + } + BeanMetaDataExtension bmdExt = new BeanMetaDataExtension(propertyInfo.PropertyType, this.AnnotationReaderFactory, isRelation); + bmdExt.NestNo = this.NestNo + 1; + bmdExt.Initialize(dbMetaData, dbms); + return bmdExt; + } + } + + public class RelationRowCreator { + public virtual object CreateRelationRow(IDataReader reader, IRelationPropertyType rpt, + IList columnNames, Hashtable relKeyValues, String preNoSuffix) { + object row = null; + IBeanMetaData bmd = rpt.BeanMetaData; + for (int i = 0; i < rpt.KeySize; ++i) { + string columnName = rpt.GetMyKey(i); + if (columnNames.Contains(columnName)) + { + if (row == null) row = CreateRelationRow(rpt); + if (relKeyValues != null && relKeyValues.ContainsKey(columnName)) + { + object value = relKeyValues[columnName]; + IPropertyType pt = bmd.GetPropertyTypeByColumnName(rpt.GetYourKey(i)); + PropertyInfo pi = pt.PropertyInfo; + if (value != null) pi.SetValue(row, value, null); + } + } + continue; + } + String relationNoSuffix = BuildRelationNoSuffix(preNoSuffix, rpt.RelationNo); + int existColumn = 0; + for (int i = 0; i < bmd.PropertyTypeSize; ++i) { + IPropertyType pt = bmd.GetPropertyType(i); + string columnName = pt.ColumnName + relationNoSuffix; + if (!columnNames.Contains(columnName)) continue; + existColumn++; + if (row == null) row = CreateRelationRow(rpt); + object value = null; + PropertyInfo pi = pt.PropertyInfo; + if (relKeyValues != null && relKeyValues.ContainsKey(columnName)) { + value = relKeyValues[columnName]; + } else { + IValueType valueType = pt.ValueType; + value = valueType.GetValue(reader, columnName); + } + if (value != null) pi.SetValue(row, value, null); + } + if (existColumn == 0) { + return null; + } + if (rpt.BeanMetaData.RelationPropertyTypeSize > 0) { + CreateParentRelationRow(reader, rpt.BeanMetaData, columnNames, relationNoSuffix, row); + } + return row; + } + + protected virtual void CreateParentRelationRow(IDataReader reader, IBeanMetaData parentBmd, IList columnNames, String relationNoSuffix, Object row) { + for (int i = 0; i < parentBmd.RelationPropertyTypeSize; ++i) { + IRelationPropertyType parentParentRpt = parentBmd.GetRelationPropertyType(i); + if (parentParentRpt == null) { + continue; + } + Object relationRow = CreateRelationRow(reader, parentParentRpt, columnNames, null, relationNoSuffix); + if (relationRow != null) { + IPropertyType pt = parentBmd.GetRelationPropertyType(i); + PropertyInfo pi = pt.PropertyInfo; + pi.SetValue(row, relationRow, null); + } + } + } + + protected virtual object CreateRelationRow(IRelationPropertyType rpt) { + return ClassUtil.NewInstance(rpt.PropertyInfo.PropertyType); + } + + protected virtual String BuildRelationNoSuffix(String preNoSuffix, int relationNo) { + return preNoSuffix + "_" + relationNo; + } + } +} \ No newline at end of file Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/s2dao/S2DaoMetaDataFactoryImpl.vmnet =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/s2dao/S2DaoMetaDataFactoryImpl.vmnet 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/s2dao/S2DaoMetaDataFactoryImpl.vmnet 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,57 @@ + +using System; +using System.Collections; +using System.Reflection; +using System.Text; + +using Seasar.Extension.ADO; +using Seasar.Extension.ADO.Impl; + +namespace ${glPackageBaseCommonS2Dao} { + + /** + * My-DaoMetaDataFactoryImpl. + * Customises original class 'DaoMetaDataFactoryImpl'. + * + * @author ${database.ClassAuthor} + */ + public class ${glDaoMetaDataFactoryImpl} : Seasar.Dao.IDaoMetaDataFactory { + + private Hashtable daoMetaDataCache = new Hashtable(); + private IDataSource dataSource; + private ICommandFactory commandFactory; + private IDataReaderFactory dataReaderFactory; + private IDatabaseMetaData dbMetaData; + + public ${glDaoMetaDataFactoryImpl}(IDataSource dataSource, + ICommandFactory commandFactory, IDataReaderFactory dataReaderFactory) { + this.dataSource = dataSource; + this.commandFactory = commandFactory; + this.dataReaderFactory = dataReaderFactory; + this.dbMetaData = new DatabaseMetaDataImpl(dataSource); + } + + /** + * Get data meta data. + * + * @param daoType Dao class + * @return Data meta data. + */ + public Seasar.Dao.IDaoMetaData GetDaoMetaData(Type daoType) { + lock(this) { + String key = daoType.Name; + Seasar.Dao.IDaoMetaData dmd = (Seasar.Dao.IDaoMetaData) daoMetaDataCache[key]; + if (dmd != null) { + return dmd; + } + + // /----------------------------------------------- [MyExtention] + dmd = new ${glDaoMetaDataExtension}(daoType, dataSource, commandFactory, dataReaderFactory, dbMetaData); + // --------------------/ + + daoMetaDataCache[key] = dmd; + return dmd; + } + } + } +} \ No newline at end of file Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/s2dao/S2DaoSelectDynamicCommand.vmnet =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/s2dao/S2DaoSelectDynamicCommand.vmnet 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/allcommon/s2dao/S2DaoSelectDynamicCommand.vmnet 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,215 @@ + +using System; +using System.Reflection; +using System.Collections.Generic; +using System.Text; + +using Seasar.Extension.ADO; +using Seasar.Extension.ADO.Impl; +using Seasar.Dao; + +using ${glPackageBaseCommonCBean}; + +namespace ${glPackageBaseCommonS2Dao} { + + /** + * My-SelectDynamicCommand. + * Overrides original class 'SelectDynamicCommand'. + * + * @author ${database.ClassAuthor} + */ + public class ${glSelectDynamicCommand} : Seasar.Dao.Impl.SelectDynamicCommand { + + /** Log-instance. */ + private static readonly log4net.ILog _log = log4net.LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); + + private IDataReaderHandler dataReaderHandler; + private IDataReaderFactory dataReaderFactory; + + /** Cache of select clause command. */ + protected ${glSelectDynamicCommand} _selectClauseCommand; + + /** Cache of select clause PK-only command. */ + protected ${glSelectDynamicCommand} _selectClausePKOnlyCommand; + + /** + * Constructor. + * + * @param dataSource Data source. + * @param statementFactory Statement factory. + * @param resultSetHandler Result set handler. + * @param resultSetFactory Result set factory. + */ + public ${glSelectDynamicCommand}(IDataSource dataSource, ICommandFactory commandFactory + , IDataReaderHandler dataReaderHandler, IDataReaderFactory dataReaderFactory) + : base(dataSource, commandFactory, dataReaderHandler, dataReaderFactory) { + this.dataReaderHandler = dataReaderHandler; + this.dataReaderFactory = dataReaderFactory; + } + + /** + * Do apply. {for delegating to apply()} + * + * @param args Arguments. (NotNull) + * @return Command context. (NotNull) + */ + public ICommandContext DoApply(Object[] args) { + return Apply(args); + } + + /** + * Set select clause. + * + * @param value Select clause. + * @return this. (NotNull) + */ + public ${glSelectDynamicCommand} SetSelectClause(String value) { + _selectClauseCommand = CreateMySelectDynamicCommand(); + _selectClauseCommand.Sql = value; + return this; + } + + /** + * Set select clause PK only. + * + * @param value Select clause PK only. + * @return this. (NotNull) + */ + public ${glSelectDynamicCommand} SetSelectClausePKOnly(String value) { + _selectClausePKOnlyCommand = CreateMySelectDynamicCommand(); + _selectClausePKOnlyCommand.Sql = value; + return this; + } + + protected ${glSelectDynamicCommand} CreateMySelectDynamicCommand() { + return new ${glSelectDynamicCommand}(DataSource, CommandFactory, dataReaderHandler, dataReaderFactory); + } + + public string[] ArgNames4Nest { + set { + if (_selectClauseCommand != null) { + _selectClauseCommand.ArgNames = value; + } + if (_selectClausePKOnlyCommand != null) { + _selectClausePKOnlyCommand.ArgNames = value; + } + } + } + + public Type[] ArgTypes4Nest { + set { + if (_selectClauseCommand != null) { + _selectClauseCommand.ArgTypes = value; + } + if (_selectClausePKOnlyCommand != null) { + _selectClausePKOnlyCommand.ArgTypes = value; + } + } + } + + public override object Execute(object[] args) { + if (!${glConditionBeanContextName}.IsExistConditionBeanOnThread()) { + return base.Execute(args); + } + AssertSelectClauseCommand(); + IList bindVariableList = new List(); + IList bindVariableTypeList = new List(); + IList bindVariableNameList = new List(); + + StringBuilder sb = new StringBuilder(); + sb.Append(SetupRealSelectClause(args, bindVariableList, bindVariableTypeList, bindVariableNameList)); + sb.Append(" "); + sb.Append(SetupRealFromWhereClause(args, bindVariableList, bindVariableTypeList, bindVariableNameList)); + + BasicSelectHandler selectHandler = CreateBasicSelectHandler(sb.ToString()); +#if ($database.isSelectQueryTimeoutValid()) + + int timeout = ${database.SelectQueryTimeout}; + if (_log.IsDebugEnabled) { + _log.Debug("@SelectDynamicCommand: selectHandler.CommandTimeout = " + timeout + ";// from ${database.SelectQueryTimeout}"); + } + selectHandler.CommandTimeout = timeout; +#end + + Object[] bindVariableArray = new Object[bindVariableList.Count]; + bindVariableList.CopyTo(bindVariableArray, 0); + Type[] bindVariableTypeArray = new Type[bindVariableTypeList.Count]; + bindVariableTypeList.CopyTo(bindVariableTypeArray, 0); + String[] bindVariableNameArray = new String[bindVariableNameList.Count]; + bindVariableNameList.CopyTo(bindVariableNameArray, 0); + return selectHandler.Execute(bindVariableArray, bindVariableTypeArray, bindVariableNameArray); + } + + protected String SetupRealSelectClause(Object[] args, IList bindVariableList, IList bindVariableTypeList, IList bindVariableNameList) { + ${glConditionBeanInterfaceName} cb = ${glConditionBeanContextName}.GetConditionBeanOnThread(); + if (cb.IsSelectCountIgnoreFetchScope()) { + return "select count(*)"; + } + String realSelectClause; + { + ICommandContext ctx; + if (cb.IsLimitSelect_PKOnly()) { + ctx = _selectClausePKOnlyCommand.DoApply(args); + } else { + ctx = _selectClauseCommand.DoApply(args); + } + realSelectClause = ctx.Sql; + AddBindVariableInfo(ctx, bindVariableList, bindVariableTypeList, bindVariableNameList); + } + return realSelectClause; + } + + protected String SetupRealFromWhereClause(Object[] args, IList bindVariableList, IList bindVariableTypeList, IList bindVariableNameList) { + ${glConditionBeanInterfaceName} cb = ${glConditionBeanContextName}.GetConditionBeanOnThread(); + String realFromWhereClause; + { + ${glSelectDynamicCommand} fromWhereCommand = CreateMySelectDynamicCommand(); + fromWhereCommand.ArgNames = this.ArgNames; + fromWhereCommand.ArgTypes = this.ArgTypes; + fromWhereCommand.Sql = cb.GetClause(); + ICommandContext ctx = fromWhereCommand.DoApply(args); + realFromWhereClause = ctx.Sql; + AddBindVariableInfo(ctx, bindVariableList, bindVariableTypeList, bindVariableNameList); + } + return realFromWhereClause; + } + + protected BasicSelectHandler CreateBasicSelectHandler(String realSql) { + return new BasicSelectHandler(DataSource, realSql, dataReaderHandler, CommandFactory, dataReaderFactory); + } + + protected void AddBindVariableInfo(ICommandContext ctx, IList bindVariableList, IList bindVariableTypeList, IList bindVariableNameList) { + Object[] bindVariables = ctx.BindVariables; + AddBindVariableList(bindVariableList, bindVariables); + Type[] bindVariableTypes = ctx.BindVariableTypes; + AddBindVariableTypeList(bindVariableTypeList, bindVariableTypes); + String[] bindVariableNames = ctx.BindVariableNames; + AddBindVariableNameList(bindVariableNameList, bindVariableNames); + } + + protected void AddBindVariableList(IList bindVariableList, Object[] bindVariables) { + for (int i=0; i < bindVariables.Length; i++) { + bindVariableList.Add(bindVariables[i]); + } + } + + protected void AddBindVariableTypeList(IList bindVariableTypeList, Type[] bindVariableTypes) { + for (int i=0; i < bindVariableTypes.Length; i++) { + bindVariableTypeList.Add(bindVariableTypes[i]); + } + } + + protected void AddBindVariableNameList(IList bindVariableNameList, String[] bindVariableNames) { + for (int i=0; i < bindVariableNames.Length; i++) { + bindVariableNameList.Add(bindVariableNames[i]); + } + } + + protected void AssertSelectClauseCommand() { + if (_selectClauseCommand == null) { + String msg = "Select clause command should not be null."; + throw new SystemException(msg); + } + } + } +} \ No newline at end of file Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/bsbhv/BaseBhv.vmnet =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/bsbhv/BaseBhv.vmnet 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/bsbhv/BaseBhv.vmnet 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,451 @@ +#set ($myClassName = "${myExtendedBhvInterfaceName}") + +using System; +using System.Collections; +using ${glPackageBaseCommon}; +using ${glPackageBaseCommonBhv}; +using ${glPackageBaseCommonCBean}; +using ${glPackageBaseCommonDBMeta}; +using ${myDBMetaPackageName}; +using ${glPackageExtendedDao}; +using ${glPackageExtendedEntity}; +using ${glPackageCB}; + +#set ($myExtendClassName = "") +#if ($table.isWritable()) + #set ($myExtendClassName = "${glBehaviorWritableInterfaceName}") +#else + #set ($myExtendClassName = "${glBehaviorReadableInterfaceName}") +#end + +namespace ${glPackageExtendedBhv} { + + /// + /// The behavior-interface of ${table.Name}. (partial class for auto-generation) + /// Author : ${database.ClassAuthor} + /// + public partial interface ${myClassName} : ${glPackageBaseCommonBhv}.${myExtendClassName} { + + // ===================================================================================== + // DBMeta + // ====== + #region DBMeta + /// + /// The property of my dbmeta. + /// + ${myDBMetaClassName} MyDBMeta { get; } + #endregion + + // ===================================================================================== + // Dao GetterSetter + // ================ + #region Dao GetterSetter + /// + /// Get my dao. + /// + ${myExtendedDaoClassName} Dao { get; set; } + #endregion + + // ===================================================================================== + // New Instance + // ============ + #region New Instance + /// + /// New my entity. + /// + /// My condition-bean. (NotNull) + ${myExtendedObjectClassName} NewMyEntity(); + + /// + /// New my condition-bean. + /// + /// My condition-bean. (NotNull) + ${myConditionBeanClassName} NewMyConditionBean(); + #endregion + + // ===================================================================================== + // Delegate-Method + // =============== + #region Delegate-Method + /// + /// Select all list. (Delegate-Method) + /// + /// Selected all list. If the select result is zero, it returns empty list. (NotNull) + int DelegateGetCountAll(); + + /// + /// Select all list. (Delegate-Method) + /// + /// Selected all list. If the select result is zero, it returns empty list. (NotNull) + IList DelegateGetListAll(); + + /// + /// Select all list. (Delegate-Method) + /// + /// Selected all list. If the select result is zero, it returns empty list. (NotNull) + IList DelegateSelectListAll();// for saving compatible +#if ($table.hasPrimaryKey()) + + // + // Get entity. (Delegate-Method) + // + // @param Primary-keys (NotNull) + // @return Entity. (NotNull) + // + ${myExtendedObjectClassName} DelegateGetEntity(${table.PrimaryKeyArgsString}); +#end + + /// + /// Select count by condition-bean. (Delegate-Method) + /// + /// Condition-bean. (NotNull) + /// Selected count. (NotNull) + int DelegateSelectCount(${myConditionBeanClassName} ${glAttachedCBArgsVariableName}); +#if ($database.isMakeDeprecated()) + + /// + /// Select count by condition-bean. (Delegate-Method) + /// + /// Condition-bean. (NotNull) + /// Selected count. (NotNull) + [Obsolete("This method is deprecated. Please use DelegateSelectCount()")] + int DelegateSelectCountIgnoreFetchScope(${myConditionBeanClassName} ${glAttachedCBArgsVariableName}); +#end + + /// + /// Select entity by condition-bean. (Delegate-Method) + /// + /// Condition-bean. (NotNull) + /// Selected entity. If the select result is zero, it returns null. (Nullable) + ${myExtendedObjectClassName} DelegateSelectEntity(${myConditionBeanClassName} ${glAttachedCBArgsVariableName}); + + /// + /// Select list by condition-bean. (Delegate-Method) + /// + /// Condition-bean. (NotNull) + /// Selected list. If the select result is zero, it returns empty list. (NotNull) + IList DelegateSelectList(${myConditionBeanClassName} ${glAttachedCBArgsVariableName}); + + #if ($table.isUseSequence()) + + /// + /// Select next value as sequence. (Delegate-Method) + /// + /// Next value. (NotNull) + int DelegateSelectNextVal(); + #end + #if ($table.isWritable()) + + /// + /// Insert one entity. (Delegate-Method) + /// + /// Entity. (NotNull) + /// Inserted count. + int DelegateInsert(${myExtendedObjectClassName} entity); + + /// + /// Update one entity. (Delegate-Method) + /// + /// Entity. (NotNull) + /// Updated count. + int DelegateUpdate(${myExtendedObjectClassName} entity); + + /// + /// Delete one entity. (Delegate-Method) + /// + /// Entity. (NotNull) + /// Deleted count. + int DelegateDelete(${myExtendedObjectClassName} entity); + + #end + #endregion + + // ===================================================================================== + // Basic Select + // ============ + #region Basic Select + /// + /// Select count by condition-bean. + /// + /// Condition-bean. (NotNull) + /// Selected count. (NotNull) + int SelectCount(${myConditionBeanClassName} cb); + + /// + /// Select entity by condition-bean. + /// + /// Condition-bean. (NotNull) + /// Entity that is selected from database by select-for-update. (NotNull) + /// + /// + ${myExtendedObjectClassName} SelectEntity(${myConditionBeanClassName} cb); + + /// + /// Select entity by condition-bean with deleted check. + /// + /// Condition-bean. (NotNull) + /// Entity that is selected from database by select-for-update. (NotNull) + /// + ${myExtendedObjectClassName} SelectEntityWithDeletedCheck(${myConditionBeanClassName} ${glAttachedCBArgsVariableName}); + #if ($table.hasPrimaryKey()) + + ${myExtendedObjectClassName} SelectByPKValueWithDeletedCheck(${table.PrimaryKeyArgsString}); + #end + #if ($table.hasPrimaryKey() && $database.isMakeBehaviorForUpdate()) + + ${myExtendedObjectClassName} SelectByPKValueWithDeletedCheckForUpdate(${table.PrimaryKeyArgsString}); + + #if ($database.isMakeDeprecated()) + + // K.Kotani Added. + [Obsolete("This method is deprecated. Please use SelectByPKValueWithDeletedCheck.")] + ${myExtendedObjectClassName} SelectForUpdateByPKMapStringWithDeletedCheck(String primaryKeyMapString); + #end + #end + + + /// + /// Select list as result-bean. + /// + /// Condition-bean. (NotNull) + /// List-result-bean. (NotNull) + ${glListResultBeanName} SelectList(${myConditionBeanClassName} ${glAttachedCBArgsVariableName}); + + /// + /// Select page as result-bean. + /// + /// Condition-bean. (NotNull) + /// Selected page. (NotNull) + ${glPagingResultBeanName} SelectPage(${myConditionBeanClassName} ${glAttachedCBArgsVariableName}); + + /// + /// Select page as result-bean. + /// + /// Condition-bean. (NotNull) + /// Select-page-invoker. (NotNull) + /// Read page. (NotNull) + ${glPagingResultBeanName} SelectPage(${myConditionBeanClassName} ${glAttachedCBArgsVariableName}, SelectPageInvoker invoker); + + #endregion + + // ===================================================================================== + // Various Select + // ============== + #region Various Select + #if ($database.isMakeDeprecated()) + + /// + /// Select list after checking count(ignore fetch scope). + /// + /// Condition-bean. (NotNull) + /// Max count. + /// List-result-bean. (NotNull) + /// + [Obsolete("This method is deprecated.")] + ${glListResultBeanName} SelectListAfterCheckingCountIgnoreFetchScope(${myConditionBeanClassName} ${glAttachedCBArgsVariableName}, int maxCount); + #end + + /// + /// Select page as first. + /// + /// Condition-bean. (NotNull) + /// Fetch-size. + /// Selected page as first page. (NotNull) + ${glPagingResultBeanName} SelectPageAsFirst(${myConditionBeanClassName} ${glAttachedCBArgsVariableName}, int fetchSize); + + /// + /// Select page by page-number. + /// If result-page is 'rb.getAllRecordCount > 0 && rb.getSelectedList().size() == 0', re-select as max-page. + /// + /// Condition-bean. (NotNull) + /// Fetch-page-number. + /// Selected page as [fetchPageNumber] page. (NotNull) + ${glPagingResultBeanName} SelectPageByPageNumber(${myConditionBeanClassName} ${glAttachedCBArgsVariableName}, int fetchPageNumber); + #if ($table.hasPrimaryKey()) + #if ($database.isMakeDeprecated()) + + [Obsolete("This method is deprecated. Please use SelectByPKMapStringWithDeletedCheck().")] + ${myExtendedObjectClassName} SelectForReadOnlyByPKValueWithDeletedCheck(${table.PrimaryKeyArgsString}); + #end + #end + #if ($database.isMakeDeprecated()) + + /// + /// Select for read only with deleted check. + /// + /// Primary-key map-string. (NotNull) + /// Entity that is selected from database by select-for-update. (NotNull) + /// + [Obsolete("This class is deprecated. Please use SelectByPKMapStringWithDeletedCheck().")] + ${myExtendedObjectClassName} SelectForReadOnlyByPKMapStringWithDeletedCheck(String primaryKeyMapString); + #end + + #endregion + + +#if (${table.hasOnlyOnePrimaryKey()}) + + // ===================================================================================== + // Load Refferer + // ============= + #region Load Refferer + #foreach ($refferer in $table.Referrers) + #set ($reffererTable = $refferer.Table) + #set ($reffererEntityClassName = "${glProjectPrefix}${reffererTable.JavaName}") + #set ($reffererDaoClassName = "${reffererEntityClassName}Dao") + #set ($reffererBhvClassName = "${reffererEntityClassName}Bhv") + #set ($reffererCBClassName = "${reffererEntityClassName}${glConditionBeanInitialName}") + #set ($reffererVariableName = "${glChildrenVariablePrefix}${refferer.ReffererPropertyNameInitCap}") + #set ($reffererEntityLongClassName = "${glPackageExtendedEntity}.${reffererEntityClassName}") + #set ($genericPKChildListMap = "${table.getPrimaryKeyJavaNativeAsOne()}, java.util.List${database.filterGenericsString(${reffererEntityClassName})}") + + // /* * * * * * * * * * * * * * * * * * * * * * * + // ReffererTable = [${refferer.Table.Name}] + // ReffererProperty = [${refferer.ReffererPropertyName}] + // * * * * * * * * */ + + /// + /// Load refferer of ${refferer.ReffererPropertyName}. + /// Default refferer condition is 'primary-key asc'. + /// + /// Entity list of main table. (NotNull) + void Load${refferer.ReffererPropertyNameInitCap}(System.Collections.IList ls); + + /// + /// Load refferer of ${refferer.ReffererPropertyName}. + /// + /// Entity list of main table. (NotNull) + /// Refferer condition-bean setupper instance for registering refferer condition. (NotNull) + void Load${refferer.ReffererPropertyNameInitCap}(System.Collections.IList ls, ${reffererTable.JavaName}CBSetupper cbSetupper); + #end + + #endregion +#end + #if ($table.isWritable()) + + // ===================================================================================== + // Basic Entity Update + // =================== + #region Basic Entity Update + + /// + /// Insert. + /// + /// Entity. (NotNull) + void Insert(${myExtendedObjectClassName} entity); + + /// + /// Update. + /// + /// Entity. (NotNull) + void Update(${myExtendedObjectClassName} entity); + + /// + /// Update after select. + /// + /// Entity. This must contain primary-key value at least. (NotNull) + /// + void UpdateAfterSelect(${myExtendedObjectClassName} entity); + + /// + /// Insert or update after select. + /// + /// Entity. This must contain primary-key value at least. (NotNull) + /// + void InsertOrUpdateAfterSelect(${myExtendedObjectClassName} entity); + #if ($database.isMakeBehaviorForUpdate()) + + /// + /// Update after select-for-update. + /// + /// Entity. This must contain primary-key value at least. (NotNull) + /// + void UpdateAfterSelectForUpdate(${myExtendedObjectClassName} entity); + + /// + /// Insert or update after select-for-update. + /// + /// Entity. This must contain primary-key value at least. (NotNull) + /// + void InsertOrUpdateAfterSelectForUpdate(${myExtendedObjectClassName} entity); + #end + + /// + /// Delete. + /// + /// Entity. (NotNull) + void Delete(${myExtendedObjectClassName} entity); + + #endregion + + // ===================================================================================== + // Various Insert + // ============== + #region Various Insert + #if ($table.isUseIdentity()) + #if ($table.hasPrimaryKey()) + + int CopyInsertByPKValueAfterSelect(${table.PrimaryKeyArgsString}); + #end + + #if ($database.isMakeDeprecated()) + + // K.Kotani added. + /// + /// Select for read only by primary-key map-string with deleted check. + /// + /// Primary-key map-string. (NotNull) + /// Entity that is selected from database by select-for-read-only. (NotNull) + /// + [Obsolete("This class is deprecated. Please use CopyInsertByPKValueAfterSelect().")] + int CopyInsertByPKMapStringAfterSelect(String primaryKeyMapString); + #end + #end + + #endregion + #end + + } + + /// + /// The interface of CBSetupper. + /// + public interface ${table.JavaName}CBSetupper : SimpleCBSetupper { + /// + /// Set up condition. + /// + /// Condition-bean. (NotNull) + void Setup(${myConditionBeanClassName} ${glAttachedCBArgsVariableName}); + } + + /// + /// The implementation of CBSetupper. {order by PK Asc} + /// + public class ${table.JavaName}CBSetupperPKAsc : ${table.JavaName}CBSetupper { + /// + /// Set up condition. + /// + /// Condition-bean. (NotNull) + public void Setup(${myConditionBeanClassName} ${glAttachedCBArgsVariableName}) { + ${glAttachedCBArgsVariableName}.AddOrderBy_PK_Asc(); + } + } + +#if (${table.hasOnlyOnePrimaryKey()}) + #foreach ($refferer in $table.Referrers) + #set ($reffererTable = $refferer.Table) + #set ($reffererEntityClassName = "${glProjectPrefix}${reffererTable.JavaName}") + #set ($reffererDaoClassName = "${reffererEntityClassName}Dao") + #set ($reffererBhvClassName = "${reffererEntityClassName}Bhv") + #set ($reffererCBClassName = "${reffererEntityClassName}${glConditionBeanInitialName}") + #set ($reffererVariableName = "${glChildrenVariablePrefix}${refferer.ReffererPropertyNameInitCap}") + #set ($reffererEntityLongClassName = "${glPackageExtendedEntity}.${reffererEntityClassName}") + #set ($genericPKChildListMap = "${table.getPrimaryKeyJavaNativeAsOne()}, java.util.List${database.filterGenericsString(${reffererEntityClassName})}") + + [Obsolete("This class is deprecated. Please use ${reffererTable.JavaName}CBSetupper.")] + public interface ${table.JavaName}ReffererCondition${refferer.ReffererPropertyNameInitCap} : ${reffererTable.JavaName}CBSetupper { + } + #end +#end + +} \ No newline at end of file Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/bsbhv/BaseBhvImpl.vmnet =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/bsbhv/BaseBhvImpl.vmnet 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/bsbhv/BaseBhvImpl.vmnet 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,963 @@ +#set ($myClassName = "${myExtendedBhvClassName}") + +using System; +using System.Collections; +using ${glPackageBaseCommon}; +using ${glPackageBaseCommonBhv}; +using ${glPackageBaseCommonCBean}; +using ${glPackageBaseCommonDBMeta}; +using ${myDBMetaPackageName}; +using ${glPackageExtendedDao}; +using ${glPackageExtendedEntity}; +using ${glPackageCB}; + +#set ($myExtendClassName = "") +#if ($table.isWritable()) + #set ($myExtendClassName = "${glBehaviorWritableAbstractName}") +#else + #set ($myExtendClassName = "${glBehaviorReadableAbstractName}") +#end + +namespace ${glPackageExtendedBhv} { + + /// + /// The behavior of ${table.Name}. (partial class for auto-generation) + /// Author : ${database.ClassAuthor} + /// + partial class ${myClassName} : ${glPackageBaseCommonBhv}.${myExtendClassName}, ${myExtendedBhvInterfaceName} { + + // ===================================================================================== + // Attribute + // ========= + #region Attribute + /// Dao instance. + protected ${myExtendedDaoClassName} _dao; + #endregion + + // ===================================================================================== + // Constructor + // =========== + #region Constructor + /// + /// Constructor. + /// + public ${myClassName}() { + } + #endregion + + // ===================================================================================== + // Table Name + // ========== + #region Table Name + /// + /// ${database.ImplementComment} + /// + public override String TableDbName { + get { return "${table.Name}"; } + } + #endregion + + // ===================================================================================== + // DBMeta + // ====== + #region DBMeta + /// + /// ${database.ImplementComment} + /// + public override ${glDBMetaInterfaceName} DBMeta { + get { return ${myDBMetaClassName}.GetInstance(); } + } + + /// + /// The property of my dbmeta. + /// + public ${myDBMetaClassName} MyDBMeta { + get { return ${myDBMetaClassName}.GetInstance(); } + } + #endregion + + // ===================================================================================== + // Self Dispatcher + // =============== + #region Self Dispatcher + /// + /// Behavior's self-dispatch + /// + /// ${myExtendedBhvInterfaceName} + protected ${myExtendedBhvInterfaceName} Self { + get { + if (this.DaoSelector == null) { + String msg = "Behavior's property 'DaoSelector' should not be null. This should have been initialized!"; + throw new SystemException(msg); + } + return (${myExtendedBhvInterfaceName})this.DaoSelector.GetRBhv(typeof(${myExtendedBhvInterfaceName})); + } + } + + /// + /// ${database.OverrideComment} + /// + /// ${glBehaviorReadableInterfaceName} + protected override ${glBehaviorReadableInterfaceName} SelfReadable { + get { return this.Self; } + } + #if ($table.isWritable()) + + /// + /// ${database.OverrideComment} + /// + /// ${glBehaviorWritableInterfaceName} + protected override ${glBehaviorWritableInterfaceName} SelfWritable { + get { return this.Self; } + } + #end + + #endregion + + // ===================================================================================== + // Dao Accessor + // ============ + #region Dao Accessor + /// + /// Get my dao. + /// + /// My dao. + public ${myExtendedDaoClassName} Dao { + get { return _dao; } + set { _dao = value; } + } + + /// + /// ${database.ImplementComment} + /// + /// Dao-readable. (NotNull) + public override ${glDaoReadableInterfaceName} GetDaoReadable() { + return this.Dao; + } + #if ($table.isWritable()) + + /// + /// ${database.ImplementComment} + /// + /// Dao-writable. (NotNull) + public override ${glDaoWritableInterfaceName} GetDaoWritable() { + return this.Dao; + } + #end + + #endregion + + // ===================================================================================== + // New Instance + // ============ + #region New Instance + /// + /// New entity. + /// + /// Entity. (NotNull) + public override ${glEntityInterfaceName} NewEntity() { + return NewMyEntity(); + } + + /// + /// New condition-bean. + /// + /// Condition-bean. (NotNull) + public override ${glConditionBeanInterfaceName} NewConditionBean() { + return NewMyConditionBean(); + } + + /// + /// New my entity. + /// + /// My condition-bean. (NotNull) + public ${myExtendedObjectClassName} NewMyEntity() { + return new ${myExtendedObjectClassName}(); + } + + /// + /// New my condition-bean. + /// + /// My condition-bean. (NotNull) + public ${myConditionBeanClassName} NewMyConditionBean() { + return new ${myConditionBeanClassName}(); + } + #endregion + + // ===================================================================================== + // Delegate Method + // =============== + #region Delegate-Method + /// + /// Select all list. (Delegate-Method) + /// + /// Selected all list. If the select result is zero, it returns empty list. (NotNull) + int ${myExtendedBhvInterfaceName}.DelegateGetCountAll() { + return this.Dao.GetCountAll(); + } + + /// + /// Select all list. (Delegate-Method) + /// + /// Selected all list. If the select result is zero, it returns empty list. (NotNull) + IList ${myExtendedBhvInterfaceName}.DelegateGetListAll() { + return this.Dao.GetListAll(); + } + + /// + /// Select all list. (Delegate-Method) + /// + /// Selected all list. If the select result is zero, it returns empty list. (NotNull) + IList ${myExtendedBhvInterfaceName}.DelegateSelectListAll() {// for saving compatible + return this.Dao.GetListAll(); + } +#if ($table.hasPrimaryKey()) + + // + // Get entity. (Delegate-Method) + // + // @param Primary-keys (NotNull) + // @return Entity. (NotNull) + // + ${myExtendedObjectClassName} ${myExtendedBhvInterfaceName}.DelegateGetEntity(${table.PrimaryKeyArgsString}) { + return this.Dao.GetEntity(${table.getPrimaryKeyUncapitalisedJavaNameCommaString()}); + } +#end + + /// + /// Select count by condition-bean. (Delegate-Method) + /// + /// Condition-bean. (NotNull) + /// Selected count. (NotNull) + int ${myExtendedBhvInterfaceName}.DelegateSelectCount(${myConditionBeanClassName} cb) { + AssertConditionBeanNotNull(cb); + return this.Dao.SelectCount(cb); + } + + /// + /// ${database.OverrideComment} + /// + /// Condition-bean. (NotNull) + /// Selected count. (NotNull) + protected override int DoCallReadCount(${glConditionBeanInterfaceName} cb) { + return this.Self.DelegateSelectCount((${myConditionBeanClassName})cb); + } + +#if ($database.isMakeDeprecated()) + + /// + /// Select count by condition-bean. (Delegate-Method) + /// + /// Condition-bean. (NotNull) + /// Selected count. (NotNull) + [Obsolete("This method is deprecated. Please use DelegateSelectCount()")] + int ${myExtendedBhvInterfaceName}.DelegateSelectCountIgnoreFetchScope(${myConditionBeanClassName} cb) { + AssertConditionBeanNotNull(cb); + return this.Dao.SelectCountIgnoreFetchScope(cb); + } + + /// + /// ${database.OverrideComment} + /// + /// Condition-bean. (NotNull) + /// Selected count. (NotNull) + [Obsolete("This method is deprecated. Please don't use!")] + protected override int DoCallReadCountIgnoreFetchScope(${glConditionBeanInterfaceName} cb) { + return this.Self.DelegateSelectCountIgnoreFetchScope((${myConditionBeanClassName})cb); + } +#end + + /// + /// Select entity by condition-bean. (Delegate-Method) + /// + /// Condition-bean. (NotNull) + /// Selected entity. If the select result is zero, it returns null. (Nullable) + ${myExtendedObjectClassName} ${myExtendedBhvInterfaceName}.DelegateSelectEntity(${myConditionBeanClassName} cb) { + AssertConditionBeanNotNull(cb); + return this.Dao.SelectEntity(cb); + } + + /// + /// Select list by condition-bean. (Delegate-Method) + /// + /// Condition-bean. (NotNull) + /// Selected list. If the select result is zero, it returns empty list. (NotNull) + IList ${myExtendedBhvInterfaceName}.DelegateSelectList(${myConditionBeanClassName} cb) { + AssertConditionBeanNotNull(cb); + return this.Dao.SelectList(cb); + } + + /// + /// ${database.OverrideComment} + /// + /// Selected all count. If the select result is zero, it returns empty list. (NotNull) + protected override int DoCallGetCountAll() { + return this.Self.DelegateGetCountAll(); + } + + /// + /// ${database.OverrideComment} + /// + /// Selected all list. If the select result is zero, it returns empty list. (NotNull) + protected override IList DoCallGetListAll() { + return this.Self.DelegateGetListAll(); + } + + /// + /// ${database.OverrideComment} + /// + /// Condition-bean. (NotNull) + /// Selected entity. If the select result is zero, it returns null. (Nullable) + protected override ${glEntityInterfaceName} DoCallReadEntity(${glConditionBeanInterfaceName} cb) { + return this.Self.DelegateSelectEntity((${myConditionBeanClassName})cb); + } + + /// + /// ${database.OverrideComment} + /// + /// Condition-bean. (NotNull) + /// Selected list. If the select result is zero, it returns empty list. (NotNull) + protected override IList DoCallReadList(${glConditionBeanInterfaceName} cb) { + return this.Self.DelegateSelectList((${myConditionBeanClassName})cb); + } + +#if ($database.isMakeDeprecated()) + + /// + /// ${database.OverrideComment} + /// + /// Selected all list. If the select result is zero, it returns empty list. (NotNull) + protected override IList DoDelegateReadAllList() { + return this.Self.DelegateGetListAll(); + } + + /// + /// ${database.OverrideComment} + /// + /// Condition-bean. (NotNull) + /// Selected count. (NotNull) + [Obsolete("This method is deprecated. Please don't use!")] + protected override int DoDelegateReadCountIgnoreFetchScope(${glConditionBeanInterfaceName} cb) { + return this.Self.DelegateSelectCountIgnoreFetchScope((${myConditionBeanClassName})cb); + } + + /// + /// ${database.OverrideComment} + /// + /// Condition-bean. (NotNull) + /// Selected entity. If the select result is zero, it returns null. (Nullable) + protected override ${glEntityInterfaceName} DoDelegateReadEntity(${glConditionBeanInterfaceName} cb) { + return this.Self.DelegateSelectEntity((${myConditionBeanClassName})cb); + } + + /// + /// ${database.OverrideComment} + /// + /// Condition-bean. (NotNull) + /// Selected list. If the select result is zero, it returns empty list. (NotNull) + protected override IList DoDelegateReadList(${glConditionBeanInterfaceName} cb) { + return this.Self.DelegateSelectList((${myConditionBeanClassName})cb); + } +#end + + #if ($table.isUseSequence()) + + /// + /// Select next value as sequence. (Delegate-Method) + /// + /// Next value. (NotNull) + int ${myExtendedBhvInterfaceName}.DelegateSelectNextVal() { + return this.Dao.SelectNextVal(); + } + #end + + #if ($table.isWritable()) + + /// + /// Insert one entity. (Delegate-Method) + /// + /// Entity. (NotNull) + /// Inserted count. + int ${myExtendedBhvInterfaceName}.DelegateInsert(${myExtendedObjectClassName} entity) { + AssertEntityNotNull(entity);// If this table use identity, the entity does not have primary-key. + FilterEntityOfInsert(entity); + AssertEntityOfInsert(entity); + return this.Dao.Insert(entity); + } + + /// + /// Update one entity. (Delegate-Method) + /// + /// Entity. (NotNull) + /// Updated count. + int ${myExtendedBhvInterfaceName}.DelegateUpdate(${myExtendedObjectClassName} entity) { + AssertEntityNotNullAndHasPrimaryKeyValue(entity); + FilterEntityOfUpdate(entity); + AssertEntityOfUpdate(entity); + return this.Dao.Update(entity); + } + + /// + /// Delete one entity. (Delegate-Method) + /// + /// Entity. (NotNull) + /// Deleted count. + int ${myExtendedBhvInterfaceName}.DelegateDelete(${myExtendedObjectClassName} entity) { + AssertEntityNotNullAndHasPrimaryKeyValue(entity); + FilterEntityOfDelete(entity); + AssertEntityOfDelete(entity); + return this.Dao.Delete(entity); + } + + /// + /// ${database.OverrideComment} + /// + /// Entity. (NotNull) + /// Inserted count. + protected override int DoCallCreate(${glEntityInterfaceName} entity) { + return this.Self.DelegateInsert((${myExtendedObjectClassName})entity); + } + + /// + /// ${database.OverrideComment} + /// + /// Entity. (NotNull) + /// Updated count. + protected override int DoCallModify(${glEntityInterfaceName} entity) { + return this.Self.DelegateUpdate((${myExtendedObjectClassName})entity); + } + + /// + /// ${database.OverrideComment} + /// + /// Entity. (NotNull) + /// Deleted count. + protected override int DoCallRemove(${glEntityInterfaceName} entity) { + return this.Self.DelegateDelete((${myExtendedObjectClassName})entity); + } + +#if ($database.isMakeDeprecated()) + + /// + /// ${database.OverrideComment} + /// + /// Entity. (NotNull) + /// Inserted count. + protected override int DoDelegateCreate(${glEntityInterfaceName} entity) { + return this.Self.DelegateInsert((${myExtendedObjectClassName})entity); + } + + /// + /// ${database.OverrideComment} + /// + /// Entity. (NotNull) + /// Updated count. + protected override int DoDelegateModify(${glEntityInterfaceName} entity) { + return this.Self.DelegateUpdate((${myExtendedObjectClassName})entity); + } + + /// + /// ${database.OverrideComment} + /// + /// Entity. (NotNull) + /// Deleted count. + protected override int DoDelegateRemove(${glEntityInterfaceName} entity) { + return this.Self.DelegateDelete((${myExtendedObjectClassName})entity); + } +#end + + #end + + #endregion + + // ===================================================================================== + // Basic Select + // ============ + #region Basic Select + + /// + /// Select count by condition-bean. + /// + /// Condition-bean. (NotNull) + /// Selected count. (NotNull) + public int SelectCount(${myConditionBeanClassName} cb) { + AssertConditionBeanNotNull(cb); + return this.Self.DelegateSelectCount(cb); + } + + /// + /// Select entity by condition-bean. + /// + /// Condition-bean. (NotNull) + /// Selected entity. (Nullalble) + /// + /// + public ${myExtendedObjectClassName} SelectEntity(${myConditionBeanClassName} cb) { + AssertConditionBeanNotNull(cb); + System.Collections.IList ls = this.Self.DelegateSelectList(cb); + if (ls.Count == 0) { + return null; + } + AssertRecordHasBeenSelectedAsOne(ls, cb); + return (${myExtendedObjectClassName})ls[0]; + } + + /// + /// Select entity by condition-bean with deleted check. + /// + /// Condition-bean. (NotNull) + /// Selected entity. (NotNull) + /// + /// + public ${myExtendedObjectClassName} SelectEntityWithDeletedCheck(${myConditionBeanClassName} cb) { + AssertConditionBeanNotNull(cb); + System.Collections.IList ls = this.Self.DelegateSelectList(cb); + AssertRecordHasNotBeenDeleted(ls, cb); + AssertRecordHasBeenSelectedAsOne(ls, cb); + return (${myExtendedObjectClassName})ls[0]; + } + + #if ($table.hasPrimaryKey()) + + public ${myExtendedObjectClassName} SelectByPKValueWithDeletedCheck(${table.PrimaryKeyArgsString}) { + ${myExtendedObjectClassName} entity = new ${myExtendedObjectClassName}(); + ${table.getPrimaryKeyArgsSetupStringCSharp('entity')} + ${myConditionBeanClassName} cb = NewMyConditionBean(); + cb.AcceptPrimaryKeyMapString(entity.ExtractPrimaryKeyMapString()); + return this.Self.SelectEntityWithDeletedCheck(cb); + } + #end + #if ($table.hasPrimaryKey() && $database.isMakeBehaviorForUpdate()) + + public ${myExtendedObjectClassName} SelectByPKValueWithDeletedCheckForUpdate(${table.PrimaryKeyArgsString}) { + ${myExtendedObjectClassName} entity = new ${myExtendedObjectClassName}(); + ${table.getPrimaryKeyArgsSetupStringCSharp('entity')} + ${myConditionBeanClassName} cb = NewMyConditionBean(); + cb.AcceptPrimaryKeyMapString(entity.ExtractPrimaryKeyMapString()); + cb.LockForUpdate(); + return this.Self.SelectEntityWithDeletedCheck(cb); + } + + #if ($database.isMakeDeprecated()) + + // K.Kotani Added. + [Obsolete("This method is deprecated. Please use SelectByPKValueWithDeleteCheckForUpdate.")] + public ${myExtendedObjectClassName} SelectForUpdateByPKMapStringWithDeletedCheck(String primaryKeyMapString) { + ${myConditionBeanClassName} cb = NewMyConditionBean(); + cb.AcceptPrimaryKeyMapString(primaryKeyMapString); + cb.LockForUpdate(); + return this.Self.SelectEntityWithDeletedCheck(cb); + } + #end + #end + + + /// + /// Select list. + /// + /// Condition-bean. (NotNull) + /// List-result-bean. (NotNull) + /// + public ${glListResultBeanName} SelectList(${myConditionBeanClassName} cb) { + AssertConditionBeanNotNull(cb); + return new ResultBeanBuilder(this).BuildListResultBean(cb, this.Self.DelegateSelectList(cb)); + } + + /// + /// Select page. + /// + /// Condition-bean. (NotNull) + /// Selected page. (NotNull) + public ${glPagingResultBeanName} SelectPage(${myConditionBeanClassName} cb) { + AssertConditionBeanNotNull(cb); + return this.Self.SelectPage(cb, new SelectPageSimpleInvoker(this)); + } + + /// + /// Select page. + /// + /// Condition-bean. (NotNull) + /// Select-page-invoker. (NotNull) + /// Read page. (NotNull) + public ${glPagingResultBeanName} SelectPage(${myConditionBeanClassName} cb, SelectPageInvoker invoker) { + AssertConditionBeanNotNull(cb); + return invoker.InvokeSelectPage(new SelectPageSimpleCallback(cb, this)); + } + + #endregion + + // ===================================================================================== + // Various Select + // ============== + #region Various Select + #if ($database.isMakeDeprecated()) + + /// + /// Select list after checking count(ignore fetch scope). + /// + /// Condition-bean. (NotNull) + /// Max count. + /// List-result-bean. (NotNull) + /// + [Obsolete("This method is deprecated.")] + public ${glListResultBeanName} SelectListAfterCheckingCountIgnoreFetchScope(${myConditionBeanClassName} cb, int maxCount) { + AssertConditionBeanNotNull(cb); + int selectedCount = this.Self.DelegateSelectCountIgnoreFetchScope(cb); + AssertSelectedCountHasNotExceededMaxCount(selectedCount, maxCount, cb); + return new ResultBeanBuilder(this).BuildListResultBean(cb, this.Self.DelegateSelectList(cb)); + } + #end + + /// + /// Select page as first. + /// + /// Condition-bean. (NotNull) + /// Fetch-size. + /// Selected page as first page. (NotNull) + public ${glPagingResultBeanName} SelectPageAsFirst(${myConditionBeanClassName} cb, int fetchSize) { + AssertConditionBeanNotNull(cb); + cb.FetchFirst(fetchSize); + return this.Self.SelectPage(cb); + } + + /// + /// Select page by page-number. + /// If result-page is 'rb.getAllRecordCount > 0 && rb.getSelectedList().size() == 0', re-select as max-page. + /// + /// Condition-bean. (NotNull) + /// Fetch-page-number. + /// Selected page as [fetchPageNumber] page. (NotNull) + public ${glPagingResultBeanName} SelectPageByPageNumber(${myConditionBeanClassName} cb, int fetchPageNumber) { + AssertConditionBeanNotNull(cb); + cb.FetchPage(fetchPageNumber); + return this.Self.SelectPage(cb); + } + + #if ($table.hasPrimaryKey()) + #if ($database.isMakeDeprecated()) + + [Obsolete("This class is deprecated. Please use SelectByPKMapStringWithDeletedCheck().")] + public ${myExtendedObjectClassName} SelectForReadOnlyByPKValueWithDeletedCheck(${table.PrimaryKeyArgsString}) { + ${myExtendedObjectClassName} entity = new ${myExtendedObjectClassName}(); + ${table.getPrimaryKeyArgsSetupStringCSharp('entity')} + ${myConditionBeanClassName} cb = NewMyConditionBean(); + cb.AcceptPrimaryKeyMapString(entity.ExtractPrimaryKeyMapString()); + return SelectEntityWithDeletedCheck(cb); + } + #end + #end + #if ($database.isMakeDeprecated()) + + /// + /// Select for read only by primary-key map-string with deleted check. + /// + /// Primary-key map-string. (NotNull) + /// Entity that is selected from database by select-for-read-only. (NotNull) + /// + [Obsolete("This class is deprecated. Please use SelectByPKMapStringWithDeletedCheck().")] + public ${myExtendedObjectClassName} SelectForReadOnlyByPKMapStringWithDeletedCheck(String primaryKeyMapString) { + AssertStringNotNullAndNotTrimmedEmpty("primaryKeyMapString", primaryKeyMapString); + ${myConditionBeanClassName} cb = NewMyConditionBean(); + cb.AcceptPrimaryKeyMapString(primaryKeyMapString); + ${glPackageExtendedEntity}.${myExtendedObjectClassName} currentEntity = this.Self.DelegateSelectEntity(cb); + AssertRecordHasNotBeenDeleted(currentEntity, primaryKeyMapString); + return currentEntity; + } + #end + + #endregion +#if (${table.hasOnlyOnePrimaryKey()}) + + // ===================================================================================== + // Load Refferer + // ============= + #region Load Refferer + #foreach ($refferer in $table.Referrers) + #set ($reffererTable = $refferer.Table) + #set ($reffererEntityClassName = "${glProjectPrefix}${reffererTable.JavaName}") + #set ($reffererDaoClassName = "${reffererEntityClassName}Dao") + #set ($reffererBhvClassName = "") + #set ($reffererBhvClassName = "${reffererEntityClassName}Bhv") + #set ($reffererCBClassName = "${reffererEntityClassName}${glConditionBeanInitialName}") + #set ($reffererVariableName = "${glChildrenVariablePrefix}${refferer.ReffererPropertyNameInitCap}") + #set ($reffererEntityLongClassName = "${glPackageExtendedEntity}.${reffererEntityClassName}") + #set ($genericPKChildListMap = "${table.getPrimaryKeyJavaNativeAsOne()}, java.util.List${database.filterGenericsString(${reffererEntityClassName})}") + + // /* * * * * * * * * * * * * * * * * * * * * * * + // ReffererTable = [${refferer.Table.Name}] + // ReffererProperty = [${refferer.ReffererPropertyName}] + // * * * * * * * * */ + + /// + /// Load refferer of ${refferer.ReffererPropertyName}. + /// Default refferer condition is 'primary-key asc'. + /// + /// Entity list of main table. (NotNull) + public void Load${refferer.ReffererPropertyNameInitCap}(System.Collections.IList ls) { + Load${refferer.ReffererPropertyNameInitCap}(ls, new ${reffererTable.JavaName}CBSetupperPKAsc()); + } + + /// + /// Load refferer of ${refferer.ReffererPropertyName}. + /// + /// Entity list of main table. (NotNull) + /// Refferer condition-bean setupper instance for registering refferer condition. (NotNull) + public void Load${refferer.ReffererPropertyNameInitCap}(System.Collections.IList ls, ${reffererTable.JavaName}CBSetupper cbSetupper) { + AssertObjectNotNull("ls", ls); + AssertObjectNotNull("cbSetupper", cbSetupper); + if (ls.Count == 0) { + return; + } + + System.Collections.IDictionary pkMyEntityMap = new System.Collections.Hashtable(); + System.Collections.IList pkList = new System.Collections.ArrayList(); + foreach (${myExtendedObjectClassName} entity in ls) { + pkList.Add(entity.${table.getPrimaryKeyJavaNameAsOne()}); + if (pkMyEntityMap.Contains(entity.${table.getPrimaryKeyJavaNameAsOne()})) { + pkMyEntityMap.Add(entity.${table.getPrimaryKeyJavaNameAsOne()}, entity); + } + } + ${reffererBhvClassName} reffererBhv = (${reffererBhvClassName})this.DaoSelector.GetRBhv(typeof(${reffererBhvClassName})); + ${reffererCBClassName} cb = reffererBhv.NewMyConditionBean(); + cb.Query().Set${refferer.getLocalColumnJavaNameAsOne()}_InScope(pkList); + cb.Query().AddOrderBy_${refferer.getLocalColumnJavaNameAsOne()}_Asc(); + cbSetupper.Setup(cb); + System.Collections.IList reffererList = reffererBhv.DelegateSelectList(cb); + + System.Collections.IDictionary pkReffererListMap = new System.Collections.Hashtable(); + foreach (${reffererEntityClassName} reffererEntity in reffererList) { + if (!pkReffererListMap.Contains(reffererEntity.${refferer.getLocalColumnJavaNameAsOne()})) { + pkReffererListMap.Add(reffererEntity.${refferer.getLocalColumnJavaNameAsOne()}, new System.Collections.ArrayList()); + } + ((System.Collections.IList)pkReffererListMap[reffererEntity.${refferer.getLocalColumnJavaNameAsOne()}]).Add(reffererEntity); + + // for Reverse Reference. + ${myExtendedObjectClassName} myEntity = (${myExtendedObjectClassName})pkMyEntityMap[reffererEntity.${refferer.getLocalColumnJavaNameAsOne()}]; + reffererEntity.${refferer.ForeignPropertyNameInitCap} = myEntity; + } + + foreach (${myExtendedObjectClassName} entity in ls) { + if (pkReffererListMap.Contains(entity.${table.getPrimaryKeyJavaNameAsOne()})) { + entity.${refferer.ReffererPropertyNameInitCap} = (System.Collections.IList)pkReffererListMap[entity.${table.getPrimaryKeyJavaNameAsOne()}]; + } else { + entity.${refferer.ReffererPropertyNameInitCap} = new System.Collections.ArrayList(); + } + } + } + + [Obsolete("This class is deprecated. Please use ${reffererTable.JavaName}CBSetupperPKAsc.")] + public class ${table.JavaName}ReffererCondition${refferer.ReffererPropertyNameInitCap}PKAsc : ${reffererTable.JavaName}CBSetupper { + public void Setup(${reffererCBClassName} cb) { + cb.AddOrderBy_PK_Asc(); + } + } + #end + + #endregion +#end + #if ($table.isWritable()) + + // ===================================================================================== + // Basic Entity Update + // =================== + #region Basic Entity Update + /// + /// Insert. + /// + /// Entity. (NotNull) + public void Insert(${myExtendedObjectClassName} entity) { + AssertEntityNotNull(entity); + this.Self.DelegateInsert(entity); + } + + /// + /// Update. + /// + /// Entity. (NotNull) + public void Update(${myExtendedObjectClassName} entity) { + AssertEntityNotNull(entity); + int updatedCount = this.Self.DelegateUpdate(entity); + if (updatedCount != 1) { + throw new Seasar.Dao.NotSingleRowUpdatedRuntimeException(entity, updatedCount); + } + } + + /// + /// Update after select. + /// + /// Entity. This must contain primary-key value at least. (NotNull) + /// + public void UpdateAfterSelect(${myExtendedObjectClassName} entity) { + AssertEntityNotNullAndHasPrimaryKeyValue(entity); + ${myConditionBeanClassName} cb = NewMyConditionBean(); + cb.AcceptPrimaryKeyMapString(entity.ExtractPrimaryKeyMapString()); + ${myExtendedObjectClassName} currentEntity = SelectEntityWithDeletedCheck(cb); + MergeEntity(entity, currentEntity); + this.Self.Update(currentEntity); + } + + /// + /// Insert or update. + /// + /// Entity. This must contain primary-key value at least. (NotNull) + /// +// TODO: @jflute - In development +// public void InsertOrUpdate(${myExtendedObjectClassName} entity) { +// AssertEntityNotNull(entity); +// if (!entity.HasPrimaryKeyValue) { +// this.Self.Insert(entity); +// return; +// } +// try { +// this.Self.Update(entity); +// } catch (Exception) { +// this.Self.Insert(entity); +// return; +// } +// } + + /// + /// Insert or update after select. + /// + /// Entity. This must contain primary-key value at least. (NotNull) + /// + public void InsertOrUpdateAfterSelect(${myExtendedObjectClassName} entity) { + AssertEntityNotNull(entity); + if (!entity.HasPrimaryKeyValue) { + this.Self.Insert(entity); + return; + } + ${myExtendedObjectClassName} currentEntity = null; + try { + ${myConditionBeanClassName} cb = NewMyConditionBean(); + cb.AcceptPrimaryKeyMapString(entity.ExtractPrimaryKeyMapString()); + currentEntity = SelectEntityWithDeletedCheck(cb); + } catch (${glPackageBaseCommonException}.${glRecordHasAlreadyBeenDeletedException}) { + this.Self.Insert(entity); + return; + } + AssertEntityNotNullAndHasPrimaryKeyValue(entity); + MergeEntity(entity, currentEntity); + this.Self.Update(currentEntity); + } + #if ($database.isMakeBehaviorForUpdate()) + + /// + /// Update after select-for-update. + /// + /// Entity. This must contain primary-key value at least. (NotNull) + /// + public void UpdateAfterSelectForUpdate(${myExtendedObjectClassName} entity) { + AssertEntityNotNullAndHasPrimaryKeyValue(entity); + ${myConditionBeanClassName} cb = NewMyConditionBean(); + cb.AcceptPrimaryKeyMapString(entity.ExtractPrimaryKeyMapString()); + cb.LockForUpdate(); + ${myExtendedObjectClassName} currentEntity = SelectEntityWithDeletedCheck(cb); + MergeEntity(entity, currentEntity); + this.Self.Update(currentEntity); + } + + /// + /// Insert or update after select-for-update. + /// + /// Entity. This must contain primary-key value at least. (NotNull) + /// + public void InsertOrUpdateAfterSelectForUpdate(${myExtendedObjectClassName} entity) { + AssertEntityNotNull(entity); + if (!entity.HasPrimaryKeyValue) { + this.Self.Insert(entity); + return; + } + ${myExtendedObjectClassName} currentEntity = null; + try { + ${myConditionBeanClassName} cb = NewMyConditionBean(); + cb.AcceptPrimaryKeyMapString(entity.ExtractPrimaryKeyMapString()); + cb.LockForUpdate(); + currentEntity = SelectEntityWithDeletedCheck(cb); + } catch (${glPackageBaseCommonException}.${glRecordHasAlreadyBeenDeletedException}) { + this.Self.Insert(entity); + return; + } + AssertEntityNotNullAndHasPrimaryKeyValue(entity); + MergeEntity(entity, currentEntity); + this.Self.Update(currentEntity); + } + #end + + /// + /// ${database.ImplementComment} + /// + /// Source entity. (NotNull) + /// Destination entity. (NotNull) + protected override void MergeEntity(${glEntityInterfaceName} sourceEntity, ${glEntityInterfaceName} destinationEntity) { + AssertObjectNotNull("sourceEntity", sourceEntity); + AssertObjectNotNull("destinationEntity", destinationEntity); + ${myExtendedObjectClassName} sourceMyEntity = (${myExtendedObjectClassName})sourceEntity; + ${myExtendedObjectClassName} destinationMyEntity = (${myExtendedObjectClassName})destinationEntity; + #foreach ($col in $table.Columns) + + if (sourceMyEntity.IsSetterInvoked${col.JavaName}()) { + destinationMyEntity.${col.JavaName} = sourceMyEntity.${col.JavaName}; + } + #end + + } + + /// + /// Delete. + /// + /// Entity. (NotNull) + public void Delete(${myExtendedObjectClassName} entity) { + AssertEntityNotNull(entity); + this.Self.DelegateDelete(entity); + } + #endregion + + // ===================================================================================== + // Various Insert + // ============== + #region Various Insert + #if ($table.isUseIdentity()) + #if ($table.hasPrimaryKey()) + + // + // Copy-insert after select-for-update. + // + // Primary-keys. (NotNull) + // Inserted count. + // + public int CopyInsertByPKValueAfterSelect(${table.PrimaryKeyArgsString}) { + ${myExtendedObjectClassName} entity = new ${myExtendedObjectClassName}(); + ${table.getPrimaryKeyArgsSetupStringCSharp('entity')} + ${myConditionBeanClassName} cb = NewMyConditionBean(); + cb.AcceptPrimaryKeyMapString(entity.ExtractPrimaryKeyMapString()); + ${myExtendedObjectClassName} currentEntity = SelectEntityWithDeletedCheck(cb); + FilterCopyInsertEntity(currentEntity); + return this.Self.DelegateInsert(currentEntity); + } + #if ($database.isMakeDeprecated()) + + // K.Kotani added. + /// + /// Select for read only by primary-key map-string with deleted check. + /// + /// Primary-key map-string. (NotNull) + /// Entity that is selected from database by select-for-read-only. (NotNull) + /// + [Obsolete("This class is deprecated. Please use CopyInsertByPKValueAfterSelect().")] + public int CopyInsertByPKMapStringAfterSelect(String primaryKeyMapString) { + ${myConditionBeanClassName} cb = NewMyConditionBean(); + cb.AcceptPrimaryKeyMapString(primaryKeyMapString); + ${myExtendedObjectClassName} currentEntity = SelectEntityWithDeletedCheck(cb); + FilterCopyInsertEntity(currentEntity); + return this.Self.DelegateInsert(currentEntity); + } + #end + #end + #end + + #endregion + #end + + } +} \ No newline at end of file Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/bsdao/BaseDao.vmnet =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/bsdao/BaseDao.vmnet 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/bsdao/BaseDao.vmnet 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,198 @@ +#set ($myClassName = "${myExtendedDaoClassName}") + +using System; +using System.Collections; +using ${myExtendedEntityPackageName}; +#set ($InterfaceName = "") +#if ($table.hasPrimaryKey()) + #set ($InterfaceName = "${glPackageBaseCommon}.${glDaoWritableInterfaceName}") +#else + #set ($InterfaceName = "${glPackageBaseCommon}.${glDaoReadableInterfaceName}") +#end + +namespace ${myExtendedDaoPackageName} { + + /// + /// The dao interface of ${table.Name}. (partial interface for auto-generation) + /// + /// [primary-key] + /// ${table.PrimaryKeyNameCommaString} + /// + /// [all-columns] + /// ${table.ColumnNameCommaString} + /// + /// [foreign-table] + /// ${table.ForeignPropertyNameCommaString} + /// + /// [refferer-table] + /// ${table.ReferrerPropertyNameCommaString} + /// + /// [sequence] + /// ${table.DefinedSequenceName} + /// + /// [identity] + /// ${table.IdentityPropertyName} + /// + /// [update-date] + /// ${table.UpdateDateJavaName} + /// + /// [version-no] + /// ${table.VersionNoJavaName} + /// + /// Author: ${database.ClassAuthor} + /// + [Seasar.Dao.Attrs.Bean(typeof(${myExtendedEntityPackageName}.${myExtendedObjectClassName}))] + public partial interface ${myClassName} : ${InterfaceName} { + + /// + /// Get count of all records. + /// It is necessary that sub interface of this have SQL-Annotation. + /// + /// Count of all records. + [Seasar.Dao.Attrs.Sql("select count(*) from ${table.Name}")] + int GetCountAll(); + + /// + /// Get list of all records. + /// It is necessary that sub interface of this have SQL-Annotation. + /// + /// List of all records. + [Seasar.Dao.Attrs.Sql("select * from ${table.Name}")] + System.Collections.IList GetListAll(); +#if ($table.hasPrimaryKey()) + + [Seasar.Dao.Attrs.Sql("select * from ${table.Name} where ${table.PrimaryKeyWhereStringWithSqlComment}")] + ${myExtendedObjectClassName} GetEntity(${table.PrimaryKeyArgsString}); +#end + + /// + /// Select count by condition-bean. + /// Ignore fetchFirst() and fetchScope() and fetchPage(). But the fetch status of the condition-bean remains as it is. + /// This select method generates SQL based on condition-bean. + /// + /// Example) + /// final ${myConditionBeanClassName} ${glAttachedCBArgsVariableName} = new ${myConditionBeanClassName}(); + /// ${glAttachedCBArgsVariableName}.query().setXxx_GreaterEqual(new BigDecimal(14)); + /// final int count = dao.${database.ConditionBeanSelectCountMethodName}(${glAttachedCBArgsVariableName}); + /// + /// + /// Condition-bean. (NotNull) + /// Selected count. (NotNull) + int SelectCount(${myAttachedCBArgsString}); + + /// + /// Select count by condition-bean. + /// Ignore fetchFirst() and fetchScope() and fetchPage(). But the fetch status of the condition-bean remains as it is. + /// This select method generates SQL based on condition-bean. + /// + /// Example) + /// final ${myConditionBeanClassName} ${glAttachedCBArgsVariableName} = new ${myConditionBeanClassName}(); + /// ${glAttachedCBArgsVariableName}.query().setXxx_GreaterEqual(new BigDecimal(14)); + /// final int count = dao.${database.ConditionBeanSelectCountMethodName}(${glAttachedCBArgsVariableName}); + /// + /// + /// Condition-bean. (NotNull) + /// Selected count. (NotNull) + [Obsolete("This method is deprecated. Please use SelectCount()")] + int SelectCountIgnoreFetchScope(${myAttachedCBArgsString}); + + /// + /// Select entity '${myExtendedObjectClassName}' by condition-bean. + /// This select method generates SQL based on condition-bean. + /// + /// Example) + /// final ${myConditionBeanClassName} ${glAttachedCBArgsVariableName} = new ${myConditionBeanClassName}(); + /// ${glAttachedCBArgsVariableName}.query().setXxxCode_Equal("abc");// It is assumed that this is the primary key... + /// ${glAttachedCBArgsVariableName}.lockForUpdate(); + /// final ${myExtendedObjectClassName} entity = dao.selectEntity(${glAttachedCBArgsVariableName}); + /// + /// + /// Condition-bean. (NotNull) + /// Selected entity. If the select result is zero, it returns null. (Nullable) + ${myExtendedObjectClassName} SelectEntity(${myAttachedCBArgsString}); + + /// + /// Select list by condition-bean. + /// This select method generates SQL based on condition-bean. + /// + /// Example) + /// final ${myConditionBeanClassName} ${glAttachedCBArgsVariableName} = new ${myConditionBeanClassName}(); + /// ${glAttachedCBArgsVariableName}.setupSelect_Xxx(); // Including the foreign table in select clause + /// ${glAttachedCBArgsVariableName}.query().setXxxName_PrefixSearch("abc"); + /// ${glAttachedCBArgsVariableName}.query().setXxxStartDate_IsNotNull(); + /// ${glAttachedCBArgsVariableName}.addOrderBy_PK_Asc().fetchFirst(20); + /// final List resultList = dao.selectList(${glAttachedCBArgsVariableName}); + /// + /// + /// Condition-bean. (NotNull) + /// Selected list. If the select result is zero, it returns empty list. (NotNull) + System.Collections.IList SelectList(${myAttachedCBArgsString}); + +#if ($table.hasPrimaryKey()) + + /// + /// Insert one entity. + /// + /// Entity. (NotNull) + /// Inserted count. + int Insert(${myExtendedObjectClassName} entity); + + /// + /// Update one entity. + /// + /// Entity. (NotNull) + /// Updated count. + int Update(${myExtendedObjectClassName} entity); + + /// + /// Delete one entity. + /// + /// Entity. (NotNull) + /// Deleted count. + int Delete(${myExtendedObjectClassName} entity); + + /// + /// Insert several entities. + /// + /// Entity-list. (NotNull) + /// Inserted count. +/// TODO: This method has not been supported yet at S2Dao-dotNet. (2006/06/09) +// int InsertList(System.Collections.IList entityList); + + /// + /// Update several entities. + /// + /// Entity-list. (NotNull) + /// Updated count. +/// TODO: This method has not been supported yet at S2Dao-dotNet. (2006/06/09) +// int UpdateList(System.Collections.IList entityList); + + /// + /// Delete several entities. + /// + /// Entity-list. (NotNull) + /// Deleted count. +/// TODO: This method has not been supported yet at S2Dao-dotNet. (2006/06/09) +// int DeleteList(System.Collections.IList entityList); + + /// + /// Delete all entities. + /// It is necessary that sub interface of this have SQL-Annotation. + /// + /// Deleted count. + [Seasar.Dao.Attrs.Sql("delete from ${table.Name}")] + int RemoveAll(); +#end + +#if ($table.isUseSequence()) + + /// + /// Select next value as sequence. + /// + /// Next value. (NotNull) + [Seasar.Dao.Attrs.Sql("${table.SequenceNextSql}")] + int SelectNextVal(); +#end + + } +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/bsdao/BsParameterBean.vmnet =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/bsdao/BsParameterBean.vmnet 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/bsdao/BsParameterBean.vmnet 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,70 @@ + +#set ($myClassName = "${myExtendedParameterBeanClassName}") + +using System; +using System.Text; + +namespace ${glPackageExtendedParameterBean} { + + /// + /// The parametaer-bean of ${pmbClassName}. + /// Author: ${database.ClassAuthor} + /// + [System.Serializable] + public partial class ${myClassName} ${database.getPmbMetaDataSuperClassDefinition($pmbClassName)}{ + + // ===================================================================================== + // Attribute + // ========= +#foreach ($propertyName in $database.getPmbMetaDataPropertySet($pmbClassName)) + #set ($propertyType = $database.getPmbMetaDataPropertyType($pmbClassName, $propertyName)) + + /// The value of ${propertyName}. + protected ${propertyType} _${propertyName}; +#end + + // ===================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + public ${myClassName}() { + } + + // ===================================================================================== + // Accessor + // ======== +#foreach ($propertyName in $database.getPmbMetaDataPropertySet($pmbClassName)) + #set ($propertyType = $database.getPmbMetaDataPropertyType($pmbClassName, $propertyName)) + + /** + * Get the value of ${propertyName}. + * + * @return The value of ${propertyName}. + */ + public ${propertyType} ${database.initCap($propertyName)} { + get { return _${propertyName}; } + set { _${propertyName} = value; } + } +#end + + // ===================================================================================== + // Basic Override Method + // ===================== + /** + * ${database.OverrideComment} + * + * @return Property-string. (NotNull) + */ + public override String ToString() { + StringBuilder sb = new StringBuilder(); +#foreach ($propertyName in $database.getPmbMetaDataPropertySet($pmbClassName)) + + sb.Append(" ${propertyName}=").Append(_${propertyName}); +#end + + return sb.ToString(); + } + } +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/bsdao/customize/BaseCustomizeDao.vmnet =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/bsdao/customize/BaseCustomizeDao.vmnet 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/bsdao/customize/BaseCustomizeDao.vmnet 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,28 @@ +#set ($myClassName = "${myExtendedDaoClassName}") + +using System; +using System.Collections; + +using ${glPackageBaseCommon}; +#foreach ($import in $table.getCustomizeDaoImportList()) + +${import}; +#end + +namespace ${myExtendedDaoPackageName} { + + /// + /// The customize-dao interface of ${table.Name}. (partial interface for auto-generation) + /// Author: ${database.ClassAuthor} + /// + [Seasar.Dao.Attrs.Bean(typeof(${myExtendedEntityPackageName}.${myExtendedObjectClassName}))] + public partial interface ${myClassName} : ${glDaoReadableInterfaceName} { + +#foreach ($methodName in $table.getCustomizeDaoMethodNameList()) + #set ($argument = $table.getCustomizeDaoMethodMap().get($methodName)) + + ${table.getCustomizeDaoReturnTypeCSharp(${methodName})} ${methodName}(${argument}); +#end + + } +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/bsentity/BaseEntity.vmnet =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/bsentity/BaseEntity.vmnet 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/bsentity/BaseEntity.vmnet 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,990 @@ + +#set ($myClassName = "${myExtendedObjectClassName}") + +using System; +using System.Reflection; +using System.Collections; +using System.Text; + +using ${glPackageBaseCommon}; +using ${glPackageBaseCommonCBean}; +using ${glPackageBaseCommonDBMeta}; +using ${glPackageBaseCommonHelper}; +using ${myDBMetaPackageName}; + +#set ($myEntityInterfaceName = "") +#if (${table.hasAllCommonColumn()}) + #set ($myEntityInterfaceName = ${glEntityDefinedCommonColumnInterfaceName}) +#else + #set ($myEntityInterfaceName = ${glEntityInterfaceName}) +#end + +namespace ${myExtendedEntityPackageName} { + + [Seasar.Dao.Attrs.Table("${table.AnnotationTableName}")] + +#if ($table.isUseUpdateDate()) + [Seasar.Dao.Attrs.TimestampProperty("${table.UpdateDateUncapitalisedJavaName}")] +#end +#if ($table.isUseVersionNo()) + + [Seasar.Dao.Attrs.VersionNoProperty("${table.VersionNoUncapitalisedJavaName}")] +#end + + [System.Serializable] + /// + /// The entity of ${table.Name}. (partial interface for auto-generation) + /// + /// [primary-key] + /// ${table.PrimaryKeyNameCommaString} + /// + /// [all-columns] + /// ${table.ColumnNameCommaString} + /// + /// [foreign-table] + /// ${table.ForeignPropertyNameCommaString} + /// + /// [refferer-table] + /// ${table.ReferrerPropertyNameCommaString} + /// + /// [sequence] + /// ${table.DefinedSequenceName} + /// + /// [identity] + /// ${table.IdentityPropertyName} + /// + /// [update-date] + /// ${table.UpdateDateJavaName} + /// + /// [version-no] + /// ${table.VersionNoJavaName} + /// + /// Author: ${database.ClassAuthor} + /// + public partial class ${myClassName} : ${myEntityInterfaceName} { + + // ===================================================================================== + // Definition + // ========== + /** Map-string map-mark. */ + public static readonly String MAP_STRING_MAP_MARK = "map:"; + + /** Map-string list-mark. */ + public static readonly String MAP_STRING_LIST_MARK = "list:"; + + /** Map-string start-brace. */ + public static readonly String MAP_STRING_START_BRACE = "${database.extractAcceptStartBrace}"; + + /** Map-string end-brace. */ + public static readonly String MAP_STRING_END_BRACE = "${database.extractAcceptEndBrace}"; + + /** Map-string delimiter. */ + public static readonly String MAP_STRING_DELIMITER = "${database.extractAcceptDelimiter}"; + + /** Map-string equal. */ + public static readonly String MAP_STRING_EQUAL = "${database.extractAcceptEqual}"; + + // ===================================================================================== + // Attribute + // ========= + #region Attribute + +#foreach ($col in $table.Columns) + + /// The value of ${col.UncapitalisedJavaName}. + protected ${col.JavaNative} _${col.UncapitalisedJavaName}; + + /// Has the setter of ${col.UncapitalisedJavaName} been invoked? + protected bool _isSetterInvoked${col.JavaName}; +#end + + #endregion + + // ===================================================================================== + // Constructor + // =========== + #region Constructor + + /// + /// Constructor. + /// + public ${myClassName}() { + } + + #endregion + + // ===================================================================================== + // Table Name + // ========== + #region Table Name + /// + /// ${database.ImplementComment} + /// + public String TableDbName { + get { return "${table.Name}"; } + } + + /// + /// ${database.ImplementComment} + /// + public String TableCapPropName { + get { return "${table.JavaName}"; } + } + + /// + /// ${database.ImplementComment} + /// + public String TableUncapPropName { + get { return "${table.UncapitalisedJavaName}"; } + } + #endregion + + // ===================================================================================== + // DBMeta + // ====== + /// + /// ${database.ImplementComment} + /// + public ${glDBMetaInterfaceName} DBMeta { + get { return ${myDBMetaClassName}.GetInstance(); } + } + + // ===================================================================================== + // Accessor + // ======== + #region Property +#foreach ($col in $table.Columns) + #if ($col.isIdentity()) + + /// + /// The property of ${col.UncapitalisedJavaName}. This is identity. + /// + [Seasar.Dao.Attrs.ID("identity")] + [Seasar.Dao.Attrs.Column("${col.Name}")] + public ${col.JavaNative} ${col.JavaName} { + get { return _${col.UncapitalisedJavaName}; } + set { _isSetterInvoked${col.JavaName} = true; _${col.UncapitalisedJavaName} = value; } + } + #else + + /// + /// The property of ${col.UncapitalisedJavaName}. + /// + public ${col.JavaNative} ${col.JavaName} { + get { return _${col.UncapitalisedJavaName}; } + set { _isSetterInvoked${col.JavaName} = true; _${col.UncapitalisedJavaName} = value; } + } + #end +#end + + #endregion + + // ===================================================================================== + // Invoking Determination + // ====================== + #region Invoking Determination +#foreach ($col in $table.Columns) + + /// + /// Has the setter of ${col.UncapitalisedJavaName} been invoked? + /// + /// Determination. + public bool IsSetterInvoked${col.JavaName}() { + return _isSetterInvoked${col.JavaName}; + } +#end + + #endregion + + // ===================================================================================== + // Classify Method + // =============== + #region Classify Method +#foreach ($col in $table.Columns) + #if (${col.hasClassification()}) + #foreach ($classificationMap in $col.ClassificationMapList) + #if (${col.hasClassificationName()}) + + /// + /// Classify the value of ${col.UncapitalisedJavaName} as ${classificationMap.get('name')}. + /// ${classificationMap.get('comment')} + /// + public void Classify${col.JavaName}${classificationMap.get('name')}() { + String code = ${glPackageBaseCommon}.${glClassificationDefinition}.CODE_${col.ClassificationName}_${classificationMap.get('name')}; + #if (${col.isJavaNativeStringObject()}) + + ${col.JavaName} = code; + } + #else + + ${col.JavaName} = ${col.JavaNative}.Parse(code); + } + #end + #else + + /// + /// Classify the value of ${col.UncapitalisedJavaName} as ${classificationMap.get('name')}. + /// ${classificationMap.get('comment')} + /// + public void Classify${col.JavaName}_${classificationMap.get('name')}() { + String code = ${glPackageBaseCommon}.${glClassificationDefinition}.CODE_${col.ClassificationName}_${classificationMap.get('name')}; + #if (${col.isJavaNativeStringObject()}) + + ${col.JavaName} = code; + } + #else + + ${col.JavaName} = ${col.JavaNative}.Parse(code); + } + #end + #end + #end + #end +#end + + #endregion + + // ===================================================================================== + // Classification Determination + // ============================ + #region Classification Determination +#foreach ($col in $table.Columns) + #if (${col.hasClassification()}) + #foreach ($classificationMap in $col.ClassificationMapList) + #if (${col.hasClassificationName()}) + + /// + /// Is the value of ${col.UncapitalisedJavaName} '${classificationMap.get('name')}'? + /// The difference of capital letters and small letters is NOT distinguished. + /// If the value is null, this method returns false! + /// ${classificationMap.get('comment')} + /// + /// Determanation. + public bool Is${col.JavaName}${classificationMap.get('name')}() { + if (_${col.UncapitalisedJavaName} == null) { + return false; + } + Object obj = _${col.UncapitalisedJavaName}; + if (obj is Nullables.INullableType && !((Nullables.INullableType)obj).HasValue) { + return false; + } + String code = ${glPackageBaseCommon}.${glClassificationDefinition}.CODE_${col.ClassificationName}_${classificationMap.get('name')}; + return code.ToLower().Equals(_${col.UncapitalisedJavaName}.ToString().ToLower()); + } + #if ($database.isMakeDeprecated()) + + /// + /// Is the value of ${col.UncapitalisedJavaName} '${classificationMap.get('name')}'? + /// The difference of capital letters and small letters is NOT distinguished. + /// If the value is null, this method throws exception! + /// ${classificationMap.get('comment')} + /// + /// Determanation. + [Obsolete("This method is deprecated. Sorry!")] + public bool Is${col.JavaName}${classificationMap.get('name')}IfNullException() { + if (_${col.UncapitalisedJavaName} == null) { + String msg = "If the value of ${col.UncapitalisedJavaName} is null, this method throws exception!"; + throw new SystemException(msg + " ${col.UncapitalisedJavaName}=" + _${col.UncapitalisedJavaName}); + } + Object obj = _${col.UncapitalisedJavaName}; + if (obj is Nullables.INullableType && !((Nullables.INullableType)obj).HasValue) { + String msg = "If the nullable-type-value of ${col.UncapitalisedJavaName} does not have value, this method throws exception!"; + throw new SystemException(msg + " ${col.UncapitalisedJavaName}=" + _${col.UncapitalisedJavaName}); + } + return Is${col.JavaName}${classificationMap.get('name')}(); + } + #end + #else + + /// + /// Is the value of ${col.UncapitalisedJavaName} '${classificationMap.get('name')}'? + /// The difference of capital letters and small letters is NOT distinguished. + /// If the value is null, this method returns false! + /// ${classificationMap.get('comment')} + /// + /// Determanation. + public bool Is${col.JavaName}_${classificationMap.get('name')}() { + if (_${col.UncapitalisedJavaName} == null) { + return false; + } + Object obj = _${col.UncapitalisedJavaName}; + if (obj is Nullables.INullableType && !((Nullables.INullableType)obj).HasValue) { + return false; + } + String code = ${glPackageBaseCommon}.${glClassificationDefinition}.CODE_${col.ClassificationName}_${classificationMap.get('name')}; + return code.ToLower().Equals(_${col.UncapitalisedJavaName}.ToString().ToLower()); + } + #if ($database.isMakeDeprecated()) + + /// + /// Is the value of ${col.UncapitalisedJavaName} '${classificationMap.get('name')}'? + /// The difference of capital letters and small letters is NOT distinguished. + /// If the value is null, this method throws exception! + /// ${classificationMap.get('comment')} + /// + /// Determanation. + [Obsolete("This method is deprecated. Sorry!")] + public bool Is${col.JavaName}_${classificationMap.get('name')}_IfNullException() { + if (_${col.UncapitalisedJavaName} == null) { + String msg = "If the value of ${col.UncapitalisedJavaName} is null, this method throws exception!"; + throw new SystemException(msg + " ${col.UncapitalisedJavaName}=" + _${col.UncapitalisedJavaName}); + } + Object obj = _${col.UncapitalisedJavaName}; + if (obj is Nullables.INullableType && !((Nullables.INullableType)obj).HasValue) { + String msg = "If the nullable-type-value of ${col.UncapitalisedJavaName} does not have value, this method throws exception!"; + throw new SystemException(msg + " ${col.UncapitalisedJavaName}=" + _${col.UncapitalisedJavaName}); + } + return Is${col.JavaName}_${classificationMap.get('name')}(); + } + #end + #end + #end + #end +#end + + #endregion + + // ===================================================================================== + // Classification Getter + // ===================== + #region Classification Getter +#foreach ($col in $table.Columns) + #if (${col.hasClassification()}) + #if (${col.hasClassificationName()}) + + /// + /// Get the value of ${col.UncapitalisedJavaName} as classification-name. + /// + /// The value of ${col.UncapitalisedJavaName} as classification-name. + public String Get${col.JavaName}Name() { + if (_${col.UncapitalisedJavaName} == null) { + return null; + } + Object obj = _${col.UncapitalisedJavaName}; + if (obj is Nullables.INullableType && !((Nullables.INullableType)obj).HasValue) { + return null; + } + System.Collections.IDictionary hash = ${glPackageBaseCommon}.${glClassificationDefinition}.CODE_NAME_MAP_${col.ClassificationName}; + return (String)hash[_${col.UncapitalisedJavaName}.ToString()]; + } + #end + #if (${col.hasClassificationAlias()}) + + /// + /// Get the value of ${col.UncapitalisedJavaName} as classification-alias. + /// + /// The value of ${col.UncapitalisedJavaName} as classification-alias. + public String Get${col.JavaName}Alias() { + if (_${col.UncapitalisedJavaName} == null) { + return null; + } + Object obj = _${col.UncapitalisedJavaName}; + if (obj is Nullables.INullableType && !((Nullables.INullableType)obj).HasValue) { + return null; + } + System.Collections.IDictionary hash = ${glPackageBaseCommon}.${glClassificationDefinition}.CODE_ALIAS_MAP_${col.ClassificationName}; + return (String)hash[_${col.UncapitalisedJavaName}.ToString()]; + } + #end + #end +#end + + #endregion + + // ===================================================================================== + // Foreign Table + // ============= + #region Foreign Table +#set ($foreignKeysIndex = 0) +#foreach ($foreignKeys in $table.ForeignKeys) + #set ($foreignVariableName = "${glParentVariablePrefix}${foreignKeys.foreignPropertyNameInitCap}") + #set ($foreignDaoClassName = "${glProjectPrefix}${foreignKeys.foreignTable.JavaName}Dao") + #set ($foreignEntityClassName = "${glProjectPrefix}${foreignKeys.foreignTable.JavaName}") + #set ($parentCBClassName = "${glProjectPrefix}${foreignKeys.foreignTable.JavaName}${glConditionBeanInitialName}") + + // /* * * * * * * * * * * * * * * * * * * * * * * + // ForeignTable = [${foreignKeys.foreignTable.name}] + // ForeignProperty = [${foreignKeys.foreignPropertyName}] + // * * * * * * * * */ + + /// The entity of foreign table. + protected ${glPackageExtendedEntity}.${foreignEntityClassName} ${foreignVariableName}; + + /// + /// Property of ${foreignKeys.ForeignPropertyName} as the entity of foreign table. + /// + [Seasar.Dao.Attrs.Relno(${foreignKeysIndex}), Seasar.Dao.Attrs.Relkeys("$foreignKeys.RelationKeysCommaString")] + public ${glPackageExtendedEntity}.${foreignEntityClassName} ${foreignKeys.foreignPropertyNameInitCap} { + get { return ${foreignVariableName}; } + set { ${foreignVariableName} = value; } + } + + public bool HasRelation${foreignKeys.foreignPropertyNameInitCap} { + get { return ${foreignVariableName} != null && ${foreignVariableName}.HasPrimaryKeyValue; } + } + + #set ($foreignKeysIndex = $foreignKeysIndex + 1) +#end + + #endregion + + // ===================================================================================== + // Refferer Table + // ============== + #region Refferer Table +#foreach ($refferer in $table.Referrers) + #set ($reffererTable = $refferer.Table) + #set ($reffererEntityClassName = "${glProjectPrefix}${reffererTable.JavaName}") + #set ($reffererDaoClassName = "${reffererEntityClassName}Dao") + #set ($reffererCBClassName = "${reffererEntityClassName}${glConditionBeanInitialName}") + #set ($reffererVariableName = "${glChildrenVariablePrefix}${refferer.ReffererPropertyNameInitCap}") + #set ($reffererEntityLongClassName = "${glPackageExtendedEntity}.${reffererEntityClassName}") + + #if (${refferer.isOneToOne()}) + + // /* * * * * * * * * * * * * * * * * * * * * * * {one-to-one} + // ReffererTable = [${refferer.Table.Name}] + // ReffererProperty = [${refferer.ReffererPropertyName}] + // * * * * * * * * */ + #else + + // /* * * * * * * * * * * * * * * * * * * * * * * + // ReffererTable = [${refferer.Table.Name}] + // ReffererProperty = [${refferer.ReffererPropertyName}] + // * * * * * * * * */ + #end + + /// The list of refferer table. + protected System.Collections.IList $reffererVariableName; + + /// + /// Property of ${refferer.ReffererPropertyName} as the list of refferer table. + /// + public System.Collections.IList ${refferer.ReffererPropertyNameInitCap} { + get { return ${reffererVariableName}; } + set { + if (value == null) { + ${reffererVariableName} = null; + } else { + ${reffererVariableName} = value; + } + } + } + #if (${refferer.isOneToOne()}) + + /// + /// Property of ${refferer.ReffererPropertyName} as one of refferer table. + /// + [Seasar.Dao.Attrs.Relno(${foreignKeysIndex}), Seasar.Dao.Attrs.Relkeys("$refferer.relationKeysCommaStringForOneToOneRefferer")] + public ${reffererEntityLongClassName} ${refferer.reffererPropertyNameInitCapAsOne} { + get { + System.Collections.IList ls = this.${refferer.reffererPropertyNameInitCap}; + if (ls == null || ls.Count == 0) { + return null; + } + if (ls.Count > 1) { + String msg = "The size of the list must be one because this relation is 'one-to-one'"; + msg = msg + ": list=" + ls + ": ToString()=" + ToString(); + throw new SystemException(msg); + } + return (${reffererEntityLongClassName})ls[0]; + } + set { + if (value == null) { + ${reffererVariableName} = null; + return; + } + System.Collections.IList ls = new System.Collections.ArrayList(); + ls.Add(value); + ${reffererVariableName} = ls; + } + } + + public bool HasRelation${refferer.reffererPropertyNameInitCapAsOne} { + get { return ${refferer.reffererPropertyNameInitCapAsOne} != null && ${refferer.reffererPropertyNameInitCapAsOne}.HasPrimaryKeyValue; } + } + #set ($foreignKeysIndex = $foreignKeysIndex + 1) + #end +#end + + #endregion + + // ===================================================================================== + // Accept + // ====== + #region Accept + + /// + /// ${database.ImplementComment} + /// + /// Primary-key map. (NotNull and NotEmpty) + public void AcceptPrimaryKeyMap(System.Collections.Generic.IDictionary primaryKeyMap) { + if (primaryKeyMap == null) { + String msg = "The argument[primaryKeyMap] should not be null."; + throw new ArgumentNullException(msg); + } + if (primaryKeyMap.Count == 0) { + String msg = "The argument[primaryKeyMap] should not be empty."; + throw new ArgumentOutOfRangeException(msg); + } +#if ($table.hasPrimaryKey()) + #foreach ($col in $table.PrimaryKey) + + if (!primaryKeyMap.ContainsKey("${col.Name}") || primaryKeyMap["${col.Name}"] == null) { + _${col.UncapitalisedJavaName} = null; + _isSetterInvoked${col.JavaName} = false; + } else { + Object obj = primaryKeyMap["${col.Name}"]; + if (obj == null) { + ${col.JavaName} = null; + } else { + if (obj is ${col.JavaNative}) { + ${col.JavaName} = (${col.JavaNative})obj; + } else { + if (!(obj is String)) { + String msg = "The value should be ${col.JavaNative} or String: "; + msg = msg + "valueType=" + obj.GetType() + " value=" + obj; + throw new SystemException(msg); + } + String value = (String)obj; + #if ($col.isJavaNativeStringObject()) + + ${col.JavaName} = value; + } + } + } + #else + #if (${col.isJavaNativeBinaryObject()}) + + ${col.JavaName} = null;// Binary as String is out of target. + } + } + } + #else + + ${col.JavaName} = ${col.JavaNative}.Parse(value); + } + } + } + #end + #end + #end +#else + #foreach ($col in $table.Columns) + + if (!primaryKeyMap.ContainsKey("${col.Name}") || primaryKeyMap["${col.Name}"] == null) { + _${col.UncapitalisedJavaName} = null; + _isSetterInvoked${col.JavaName} = false; + } else { + Object obj = primaryKeyMap["${col.Name}"]; + if (obj == null) { + ${col.JavaName} = null; + } else { + if (obj is ${col.JavaNative}) { + ${col.JavaName} = (${col.JavaNative})obj; + } else { + if (!(obj is String)) { + String msg = "The value should be ${col.JavaNative} or String: "; + msg = msg + "valueType=" + obj.GetType() + " value=" + obj; + throw new SystemException(msg); + } + String value = (String)obj; + #if ($col.isJavaNativeStringObject()) + + ${col.JavaName} = value; + } + } + } + #else + #if (${col.isJavaNativeBinaryObject()}) + + ${col.JavaName} = null;// Binary as String is out of target. + } + } + } + #else + + ${col.JavaName} = ${col.JavaNative}.Parse(value); + } + } + } + #end + #end + #end +#end + + } + + /// + /// ${database.ImplementComment} + /// + /// Primary-key map-string. (NotNull) + public void AcceptPrimaryKeyMapString(String primaryKeyMapString) { + if (primaryKeyMapString == null) { + String msg = "The argument[primaryKeyMapString] should not be null."; + throw new ArgumentNullException(msg); + } + String prefix = MAP_STRING_MAP_MARK + MAP_STRING_START_BRACE; + String suffix = MAP_STRING_END_BRACE; + if (!primaryKeyMapString.Trim().StartsWith(prefix)) { + primaryKeyMapString = prefix + primaryKeyMapString; + } + if (!primaryKeyMapString.Trim().EndsWith(suffix)) { + primaryKeyMapString = primaryKeyMapString + suffix; + } + ${glMapListStringName} mapListString = new ${glMapListStringImplName}(); + mapListString.MapMark = MAP_STRING_MAP_MARK; + mapListString.ListMark = MAP_STRING_LIST_MARK; + mapListString.StartBrace = MAP_STRING_START_BRACE; + mapListString.EndBrace = MAP_STRING_END_BRACE; + mapListString.Delimiter = MAP_STRING_DELIMITER; + mapListString.Equal = MAP_STRING_EQUAL; + AcceptPrimaryKeyMap(mapListString.generateMap(primaryKeyMapString)); + } + + /// + /// ${database.ImplementComment} + /// + /// Column-value map. (NotNull and NotEmpty) + public void AcceptColumnValueMap(System.Collections.Generic.IDictionary columnValueMap) { + if (columnValueMap == null) { + String msg = "The argument[columnValueMap] should not be null."; + throw new ArgumentNullException(msg); + } + if (columnValueMap.Count == 0) { + String msg = "The argument[columnValueMap] should not be empty."; + throw new ArgumentOutOfRangeException(msg); + } + #foreach ($col in $table.Columns) + + if (!columnValueMap.ContainsKey("${col.Name}") || columnValueMap["${col.Name}"] == null) { + _${col.UncapitalisedJavaName} = null; + _isSetterInvoked${col.JavaName} = false; + } else { + Object obj = columnValueMap["${col.Name}"]; + if (obj == null) { + ${col.JavaName} = null; + } else { + if (obj is ${col.JavaNative}) { + ${col.JavaName} = (${col.JavaNative})obj; + } else { + if (!(obj is String)) { + String msg = "The value should be ${col.JavaNative} or String: "; + msg = msg + "valueType=" + obj.GetType() + " value=" + obj; + throw new SystemException(msg); + } + String value = (String)obj; + #if ($col.isJavaNativeStringObject()) + + ${col.JavaName} = value; + } + } + } + #else + #if (${col.isJavaNativeBinaryObject()}) + + ${col.JavaName} = null;// Binary as String is out of target. + } + } + } + #else + + ${col.JavaName} = ${col.JavaNative}.Parse(value); + } + } + } + #end + #end + #end + + } + + /// + /// ${database.ImplementComment} + /// + /// Column-value map-string. (NotNull) + public void AcceptColumnValueMapString(String columnValueMapString) { + if (columnValueMapString == null) { + String msg = "The argument[columnValueMapString] should not be null."; + throw new ArgumentNullException(msg); + } + String prefix = MAP_STRING_MAP_MARK + MAP_STRING_START_BRACE; + String suffix = MAP_STRING_END_BRACE; + if (!columnValueMapString.Trim().StartsWith(prefix)) { + columnValueMapString = prefix + columnValueMapString; + } + if (!columnValueMapString.Trim().EndsWith(suffix)) { + columnValueMapString = columnValueMapString + suffix; + } + ${glMapListStringName} mapListString = new ${glMapListStringImplName}(); + mapListString.MapMark = MAP_STRING_MAP_MARK; + mapListString.ListMark = MAP_STRING_LIST_MARK; + mapListString.StartBrace = MAP_STRING_START_BRACE; + mapListString.EndBrace = MAP_STRING_END_BRACE; + mapListString.Delimiter = MAP_STRING_DELIMITER; + mapListString.Equal = MAP_STRING_EQUAL; + AcceptColumnValueMap(mapListString.generateMap(columnValueMapString)); + } + + #endregion + + // ===================================================================================== + // Extract + // ======= + #region Extract + + /// + /// ${database.ImplementComment} + /// + /// Primary key map-string. + public String ExtractPrimaryKeyMapString() { +#if ($table.hasPrimaryKey()) + + String startBrace = MAP_STRING_START_BRACE; + String endBrace = MAP_STRING_END_BRACE; + String delimiter = MAP_STRING_DELIMITER; + String equal = MAP_STRING_EQUAL; + String mapMarkAndStartBrace = MAP_STRING_MAP_MARK + startBrace; + StringBuilder sb = new StringBuilder(); + + #foreach ($col in $table.PrimaryKey) + + sb.Append(delimiter); + { + Object obj = _${col.UncapitalisedJavaName}; + if (obj != null && (obj.GetType().IsPrimitive || obj is DateTime)) { + sb.Append("${col.Name}").Append(equal).Append(obj); + } else { + sb.Append("${col.Name}").Append(equal).Append((obj != null ? obj.ToString() : "")); + } + } + #end + + sb.Remove(0, delimiter.Length).Insert(0, mapMarkAndStartBrace).Append(endBrace); + return sb.ToString(); +#else + + return ExtractColumnValueMapString(); +#end + } + + /// + /// ${database.ImplementComment} + /// + /// Column-value map-string. + public String ExtractColumnValueMapString() { + String startBrace = MAP_STRING_START_BRACE; + String endBrace = MAP_STRING_END_BRACE; + String delimiter = MAP_STRING_DELIMITER; + String equal = MAP_STRING_EQUAL; + String mapMarkAndStartBrace = MAP_STRING_MAP_MARK + startBrace; + String listMarkAndStartBrace = MAP_STRING_LIST_MARK + startBrace; + StringBuilder sb = new StringBuilder(); + +#foreach ($col in $table.Columns) + + sb.Append(delimiter); + { + Object obj = _${col.UncapitalisedJavaName}; + if (obj != null && (obj.GetType().IsPrimitive || obj is DateTime)) { + sb.Append("${col.Name}").Append(equal).Append(obj); + } else { + sb.Append("${col.Name}").Append(equal).Append((obj != null ? obj.ToString() : "")); + } + } +#end + + sb.Remove(0, delimiter.Length).Insert(0, mapMarkAndStartBrace).Append(endBrace); + return sb.ToString(); + } + +#if (${table.hasAllCommonColumn()}) + + /// + /// ${database.ImplementComment} + /// + /// Common-column-value map-string. + public String ExtractCommonColumnValueMapString() { + String startBrace = MAP_STRING_START_BRACE; + String endBrace = MAP_STRING_END_BRACE; + String delimiter = MAP_STRING_DELIMITER; + String equal = MAP_STRING_EQUAL; + String mapMarkAndStartBrace = MAP_STRING_MAP_MARK + startBrace; + StringBuilder sb = new StringBuilder(); + + #foreach ($columnName in ${database.CommonColumnNameList}) + #set ($col = $table.getColumnByFlexibleName($columnName)) + + sb.Append(delimiter); + { + Object obj = _${col.UncapitalisedJavaName}; + if (obj != null && (obj.GetType().IsPrimitive || obj is DateTime)) { + sb.Append("${columnName}").Append(equal).Append(obj); + } else { + sb.Append("${columnName}").Append(equal).Append((obj != null ? obj.ToString() : "")); + } + } + #end + + sb.Remove(0, delimiter.Length).Insert(0, mapMarkAndStartBrace).Append(endBrace); + return sb.ToString(); + } +#end + + #endregion + + + // ===================================================================================== + // Determination + // ============= + /** + * ${database.ImplementComment} + * + * @return Determination. + */ + public bool HasPrimaryKeyValue { + get { + #foreach ($col in $table.PrimaryKey) + + if (_${col.UncapitalisedJavaName} == null || IsNullableTypeNull(_${col.UncapitalisedJavaName})) { + return false; + } + #end + + return true; + } + } + + // ===================================================================================== + // Basic Override + // ============== + #region Basic Override Method +#if ($table.hasPrimaryKey()) + + /// + /// ${database.OverrideComment} + /// If the primary-key of the other is same as this one, returns true. + /// + /// Other entity. + /// Comparing result. + public override bool Equals(Object other) { + if (other == null) { + return false; + } + if (!(other is $myClassName)) { + return false; + } + $myClassName otherEntity = ($myClassName)other; + #foreach ($col in $table.PrimaryKey) + + if (this.${col.JavaName} == null || !this.${col.JavaName}.Equals(otherEntity.${col.JavaName})) { + return false; + } + #end + + return true; + } + + /// + /// ${database.OverrideComment} + /// Calculates hash-code from primary-key. + /// + /// Hash-code from primary-keys. + public override int GetHashCode() { + int result = 0; + #foreach ($col in $table.PrimaryKey) + #if (!${col.isJavaNativeNumberObject()}) + + if (_${col.UncapitalisedJavaName} != null) { + result = result + _${col.UncapitalisedJavaName}.GetHashCode(); + } + #else + + result = result + _${col.UncapitalisedJavaName}.GetHashCode(); + #end + #end + + return result; + } +#else + + /// + /// ${database.OverrideComment} + /// If the all-column value of the other is same as this one, returns true. + /// + /// Other entity. + /// Comparing result. + public override bool Equals(Object other) { + if (other == null) { + return false; + } + if (!(other is $myClassName)) { + return false; + } + $myClassName otherEntity = ($myClassName)other; + #foreach ($col in $table.Columns) + + if (this.${col.JavaName} == null || !this.${col.JavaName}.Equals(otherEntity.${col.JavaName})) { + return false; + } + #end + + return true; + } + + /// + /// ${database.OverrideComment} + /// Calculates hash-code from all-columns. + /// + /// Hash-code from all-columns. + public override int GetHashCode() { + int result = 0; + #foreach ($col in $table.Columns) + #if (!${col.isJavaNativeNumberObject()}) + + if (_${col.UncapitalisedJavaName} != null) { + result = result + _${col.UncapitalisedJavaName}.GetHashCode(); + } + #else + + result = result + _${col.UncapitalisedJavaName}.GetHashCode(); + #end + #end + + return result; + } +#end + + /// + /// ${database.OverrideComment} + /// + /// Column-map. (NotNull) + public override String ToString() { + String delimiter = ","; + StringBuilder sb = new StringBuilder(); +#foreach ($col in $table.Columns) + + sb.Append(delimiter).Append(this.${col.JavaName}); +#end + + sb.Remove(0, delimiter.Length); + sb.Insert(0, "{").Append("}"); + return sb.ToString(); + } + + #endregion + + // ===================================================================================== + // Helper + // ====== + #region Helper + protected bool IsNullableTypeNull(Object obj) { + if (obj != null && obj is Nullables.INullableType && !((Nullables.INullableType)obj).HasValue) { + return true; + } else { + return false; + } + } + #endregion + } +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/bsentity/PlainBaseEntity.vmnet =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/bsentity/PlainBaseEntity.vmnet 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/bsentity/PlainBaseEntity.vmnet 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,151 @@ +#set ($myClassName = "${myBaseObjectClassName}") + +using System; +using System.Text; + +namespace ${myBaseEntityPackageName} { + + /** + * The entity of ${table.Name}. + * + * @author ${database.ClassAuthor} + */ + public class ${myClassName} { + + // ===================================================================================== + // Attribute + // ========= +#foreach ($col in $table.Columns) + + /** The value of ${col.UncapitalisedJavaName}. */ + protected ${col.JavaNative} _${col.UncapitalisedJavaName}; +#end + + // ===================================================================================== + // Accessor + // ======== +#foreach ($col in $table.Columns) + + public ${col.JavaNative} ${col.JavaName} { + get { return _${col.UncapitalisedJavaName}; } + set { _${col.UncapitalisedJavaName} = value; } + } +#end + + // ===================================================================================== + // Basic Override + // ============== +#if ($table.hasPrimaryKey()) + + /// + /// ${database.OverrideComment} + /// If the primary-key of the other is same as this one, returns true. + /// + /// Other entity. + /// Comparing result. + public override bool Equals(Object other) { + if (other == null) { + return false; + } + if (!(other is $myClassName)) { + return false; + } + $myClassName otherEntity = ($myClassName)other; + #foreach ($col in $table.PrimaryKey) + + if (this.${col.JavaName} == null || !this.${col.JavaName}.Equals(otherEntity.${col.JavaName})) { + return false; + } + #end + + return true; + } + + /// + /// ${database.OverrideComment} + /// Calculates hash-code from primary-key. + /// + /// Hash-code from primary-keys. + public override int GetHashCode() { + int result = 0; + #foreach ($col in $table.PrimaryKey) + #if (!${col.isJavaNativeNumberObject()}) + + if (_${col.UncapitalisedJavaName} != null) { + result = result + _${col.UncapitalisedJavaName}.GetHashCode(); + } + #else + + result = result + _${col.UncapitalisedJavaName}.GetHashCode(); + #end + #end + + return result; + } +#else + + /// + /// ${database.OverrideComment} + /// If the all-column value of the other is same as this one, returns true. + /// + /// Other entity. + /// Comparing result. + public override bool Equals(Object other) { + if (other == null) { + return false; + } + if (!(other is $myClassName)) { + return false; + } + $myClassName otherEntity = ($myClassName)other; + #foreach ($col in $table.Columns) + + if (this.${col.JavaName} == null || !this.${col.JavaName}.Equals(otherEntity.${col.JavaName})) { + return false; + } + #end + + return true; + } + + /// + /// ${database.OverrideComment} + /// Calculates hash-code from all-columns. + /// + /// Hash-code from all-columns. + public override int GetHashCode() { + int result = 0; + #foreach ($col in $table.Columns) + #if (!${col.isJavaNativeNumberObject()}) + + if (_${col.UncapitalisedJavaName} != null) { + result = result + _${col.UncapitalisedJavaName}.GetHashCode(); + } + #else + + result = result + _${col.UncapitalisedJavaName}.GetHashCode(); + #end + #end + + return result; + } +#end + + /// + /// ${database.OverrideComment} + /// + /// Column-map. (NotNull) + public override String ToString() { + String delimiter = ","; + StringBuilder sb = new StringBuilder(); +#foreach ($col in $table.Columns) + + sb.Append(delimiter).Append(this.${col.JavaName}); +#end + + sb.Remove(0, delimiter.Length); + sb.Insert(0, "{").Append("}"); + return sb.ToString(); + } + } +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/bsentity/dbmeta/DBMetaImpl.vmnet =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/bsentity/dbmeta/DBMetaImpl.vmnet 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/bsentity/dbmeta/DBMetaImpl.vmnet 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,507 @@ +#set ($myClassName = "${myDBMetaClassName}") + +using System; +using System.Collections; +using System.Reflection; +using System.Text; + +using ${glPackageBaseCommon}; +using ${glPackageBaseCommonCBean}; +using ${glPackageBaseCommonDBMeta}; +using ${myExtendedEntityPackageName}; +#if (${isExistDao}) + +using ${myExtendedDaoPackageName}; +#end +#if (${isExistConditionBean}) +using ${glPackageCB}; + +#end +namespace ${myDBMetaPackageName} { + + /// + /// The dbmeta of ${table.Name}. + /// + /// [primary-key] + /// ${table.PrimaryKeyNameCommaString} + /// + /// [all-columns] + /// ${table.ColumnNameCommaString} + /// + /// [foreign-property] + /// ${table.ForeignPropertyNameCommaString} + /// + /// [refferer-property] + /// ${table.ReferrerPropertyNameCommaString} + /// + /// [sequence] + /// ${table.DefinedSequenceName} + /// + /// [identity] + /// ${table.IdentityPropertyName} + /// + /// [update-date] + /// ${table.UpdateDateJavaName} + /// + /// [version-no] + /// ${table.VersionNoJavaName} + /// + /// Author: ${database.ClassAuthor} + /// + public class ${myClassName} : ${glDBMetaAbstractName} { + + /// The type of entity. + public static readonly Type ENTITY_TYPE = typeof(${myExtendedObjectClassName}); +#if (${isExistDao}) + + /// The type of dao. + public static readonly Type DAO_TYPE = typeof(${myExtendedDaoClassName}); +#end +#if (${isExistConditionBean}) + + /// The type of condition-bean. + public static readonly Type CONDITION_BEAN_TYPE = typeof(${myConditionBeanClassName}); +#end + + /// Singleton instance. + private static readonly ${myClassName} _instance = new ${myClassName}(); + + /// + /// Constructor + /// + private ${myClassName}() { + } + + /// + /// Get instance. + /// + /// Singleton instance. + public static ${myClassName} GetInstance() { + return _instance; + } + + // ===================================================================================== + // Name + // ==== + #region Name + + /// Table db-name. + public static readonly String TABLE_DB_NAME = "$table.Name"; + + /// Table cap-prop-name. + public static readonly String TABLE_CAP_PROP_NAME = "$table.JavaName"; + + /// Table uncap-prop-name. + public static readonly String TABLE_UNCAP_PROP_NAME = "$table.UncapitalisedJavaName"; + + #foreach ($col in $table.Columns) + + /// DB name of ${col.JavaName}. + public static readonly String COLUMN_DB_NAME_OF_${col.JavaName} = "$col.Name"; + #end + + #foreach ($col in $table.Columns) + + /// Java name of ${col.JavaName}. + public static readonly String COLUMN_CAP_PROP_NAME_OF_${col.JavaName} = "$col.JavaName"; + #end + #foreach ($foreignKeys in $table.ForeignKeys) + + /// Java name of ${foreignKeys.ForeignPropertyName}. + public static readonly String COLUMN_CAP_PROP_NAME_OF_${foreignKeys.foreignPropertyNameInitCap} = "$foreignKeys.ForeignPropertyNameInitCap"; + #end + #foreach ($children in $table.Referrers) + + /// Java name of ${children.ReffererPropertyNameInitCap}. + public static readonly String COLUMN_CAP_PROP_NAME_OF_${children.ReffererPropertyNameInitCap} = "$children.ReffererPropertyNameInitCap"; + #end + + #foreach ($col in $table.Columns) + + /// Property name of ${col.JavaName}. + public static readonly String COLUMN_UNCAP_PROP_NAME_OF_${col.JavaName} = "$col.UncapitalisedJavaName"; + #end + #foreach ($foreignKeys in $table.ForeignKeys) + + /// Property name of ${foreignKeys.ForeignPropertyName}. + public static readonly String COLUMN_UNCAP_PROP_NAME_OF_${foreignKeys.foreignPropertyNameInitCap} = "$foreignKeys.ForeignPropertyName"; + #end + #foreach ($children in $table.Referrers) + + /// Property name of ${children.ReffererPropertyName}. + public static readonly String COLUMN_UNCAP_PROP_NAME_OF_${children.ReffererPropertyNameInitCap} = "$children.ReffererPropertyName"; + #end + + /// {uncap-prop-name : db-name} map. + protected static readonly System.Collections.Generic.IDictionary _uncapPropNameDbNameMap; + + /// {db-name : uncap-prop-name} map. + protected static readonly System.Collections.Generic.IDictionary _dbNameUncapPropNameMap; + + /// {cap-prop-name : db-name} map. + protected static readonly System.Collections.Generic.IDictionary _capPropNameDbNameMap; + + /// {db-name : cap-prop-name} map. + protected static readonly System.Collections.Generic.IDictionary _dbNameCapPropNameMap; + + /// {cap-prop-name : uncap-prop-name} map. + protected static readonly System.Collections.Generic.IDictionary _capPropNameUncapPropNameMap; + + /// {uncap-prop-name : cap-prop-name} map. + protected static readonly System.Collections.Generic.IDictionary _uncapPropNameCapPropNameMap; + + /// + /// Constractor + /// + static ${myClassName}() { + { + System.Collections.Generic.IDictionary map = new System.Collections.Generic.Dictionary(); + map.Add(TABLE_UNCAP_PROP_NAME, TABLE_DB_NAME); + #foreach ($col in $table.Columns) + + map.Add(COLUMN_UNCAP_PROP_NAME_OF_${col.JavaName}, COLUMN_DB_NAME_OF_${col.JavaName}); + #end + + _uncapPropNameDbNameMap = map; + } + { + System.Collections.Generic.IDictionary map = new System.Collections.Generic.Dictionary(); + map.Add(TABLE_DB_NAME, TABLE_UNCAP_PROP_NAME); + #foreach ($col in $table.Columns) + + map.Add(COLUMN_DB_NAME_OF_${col.JavaName}, COLUMN_UNCAP_PROP_NAME_OF_${col.JavaName}); + #end + + _dbNameUncapPropNameMap = map; + } + { + System.Collections.Generic.IDictionary map = new System.Collections.Generic.Dictionary(); + map.Add(TABLE_CAP_PROP_NAME, TABLE_DB_NAME); + #foreach ($col in $table.Columns) + + map.Add(COLUMN_CAP_PROP_NAME_OF_${col.JavaName}, COLUMN_DB_NAME_OF_${col.JavaName}); + #end + + _capPropNameDbNameMap = map; + } + { + System.Collections.Generic.IDictionary map = new System.Collections.Generic.Dictionary(); + map.Add(TABLE_DB_NAME, TABLE_CAP_PROP_NAME); + #foreach ($col in $table.Columns) + + map.Add(COLUMN_DB_NAME_OF_${col.JavaName}, COLUMN_CAP_PROP_NAME_OF_${col.JavaName}); + #end + + _dbNameCapPropNameMap = map; + } + { + System.Collections.Generic.IDictionary map = new System.Collections.Generic.Dictionary(); + map.Add(TABLE_CAP_PROP_NAME, TABLE_UNCAP_PROP_NAME); + #foreach ($col in $table.Columns) + + map.Add(COLUMN_CAP_PROP_NAME_OF_${col.JavaName}, COLUMN_UNCAP_PROP_NAME_OF_${col.JavaName}); + #end + + _capPropNameUncapPropNameMap = map; + } + { + System.Collections.Generic.IDictionary map = new System.Collections.Generic.Dictionary(); + map.Add(TABLE_UNCAP_PROP_NAME, TABLE_CAP_PROP_NAME); + #foreach ($col in $table.Columns) + + map.Add(COLUMN_UNCAP_PROP_NAME_OF_${col.JavaName}, COLUMN_CAP_PROP_NAME_OF_${col.JavaName}); + #end + + _uncapPropNameCapPropNameMap = map; + } + } + + #endregion + + // ===================================================================================== + // Table Name + // ========== + #region Table Name + /** + * ${database.ImplementComment} + * + * @return Table db-name. (NotNull) + */ + public override String GetTableDbName() { + return TABLE_DB_NAME; + } + + /** + * ${database.ImplementComment} + * + * @return Table cap-prop-name. (NotNull) + */ + public override String GetTableCapPropName() { + return TABLE_CAP_PROP_NAME; + } + + /** + * ${database.ImplementComment} + * + * @return Table uncap-prop-name. (NotNull) + */ + public override String GetTableUncapPropName() { + return TABLE_UNCAP_PROP_NAME; + } + #endregion + + // ===================================================================================== + // DB-Name-Map Getter + // ================== + #region DB-Name-Map Getter + /// + /// ${database.ImplementComment} + /// + /// {property-name : db-name} map. + public override System.Collections.Generic.IDictionary GetUncapPropNameDbNameMap() { + return _uncapPropNameDbNameMap; + } + + /// + /// ${database.ImplementComment} + /// + /// {db-name : property-name} map. + public override System.Collections.Generic.IDictionary GetDbNameUncapPropNameMap() { + return _dbNameUncapPropNameMap; + } + + /// + /// ${database.ImplementComment} + /// + /// {cap-prop-name : db-name} map. + public override System.Collections.Generic.IDictionary GetCapPropNameDbNameMap() { + return _capPropNameDbNameMap; + } + + /// + /// ${database.ImplementComment} + /// + /// {db-name : cap-prop-name} map. + public override System.Collections.Generic.IDictionary GetDbNameCapPropNameMap() { + return _dbNameCapPropNameMap; + } + + /// + /// ${database.ImplementComment} + /// + /// {cap-prop-name : uncap-prop-name} map. + public override System.Collections.Generic.IDictionary GetCapPropNameUncapPropNameMap() { + return _capPropNameUncapPropNameMap; + } + + /// + /// ${database.ImplementComment} + /// + /// {uncap-prop-name : cap-prop-name} map. + public override System.Collections.Generic.IDictionary GetUncapPropNameCapPropNameMap() { + return _uncapPropNameCapPropNameMap; + } + #endregion + + // ===================================================================================== + // Type Getter + // =========== + /** + * ${database.ImplementComment} + * + * @return The type of entity. (NotNull) + */ + public override Type GetEntityType() { + return ENTITY_TYPE; + } + + /** + * ${database.ImplementComment} + * + * @return The type of dao. (NotNull) + */ + public override Type GetDaoType() { +#if (${isExistDao}) + + return DAO_TYPE; +#else + + String msg = "The entity does not have dao. So this method is invalid."; + throw new SystemException(msg + " dbmeta=" + ToString()); +#end + } + + /** + * ${database.ImplementComment} + * + * @return The type of condition-bean. (NotNull) + */ + public override Type GetConditionBeanType() { +#if (${isExistConditionBean}) + + return CONDITION_BEAN_TYPE; +#else + + String msg = "The entity does not have condition-bean. So this method is invalid."; + throw new SystemException(msg + " dbmeta=" + ToString()); +#end + } + + // ===================================================================================== + // Instance Getter + // =============== + /** + * ${database.ImplementComment} + * + * @return The instance of entity. (NotNull) + */ + public override ${glEntityInterfaceName} NewEntity() { + return NewMyEntity(); + } + + /** + * New the instance of my entity. + * + * @return The instance of my entity. (NotNull) + */ + public ${myExtendedObjectClassName} NewMyEntity() { + return new ${myExtendedObjectClassName}(); + } + + /** + * ${database.ImplementComment} + * + * @return The instance of condition-bean. (NotNull) + */ + public override ${glConditionBeanInterfaceName} NewConditionBean() { +#if (${isExistConditionBean}) + + return NewMyConditionBean(); +#else + + String msg = "The entity does not have condition-bean. So this method is invalid."; + throw new SystemException(msg + " dbmeta=" + ToString()); +#end + } +#if (${isExistConditionBean}) + + /** + * New the instance of my condition-bean. + * + * @return The instance of condition-bean. (NotNull) + */ + public ${myConditionBeanClassName} NewMyConditionBean() { + return new ${myConditionBeanClassName}(); + } +#end +#if ($database.isMakeDeprecated()) + + // ===================================================================================== + // PropertyInfo + // ============ + #region PropertyInfo + +#foreach ($col in $table.Columns) + + /// The entity property-info of ${col.UncapitalisedJavaName}. + [Obsolete("There is more available object. {org.seasar.framework.beans.factory.BeanDescFactory}")] + public static readonly PropertyInfo ENTITY_PROPERTY_INFO_${col.JavaName} = ENTITY_TYPE.GetProperty(COLUMN_CAP_PROP_NAME_OF_${col.JavaName}); +#end + +#foreach ($col in $table.Columns) + + /// + /// ${database.ImplementComment} + /// + /// The entity property-info of ${col.UncapitalisedJavaName}. + [Obsolete("There is more available object. {org.seasar.framework.beans.factory.BeanDescFactory}")] + public PropertyInfo GetEntityPropertyInfo_${col.JavaName}() { + return ENTITY_PROPERTY_INFO_${col.JavaName}; + } +#end + + /// + /// ${database.ImplementComment} + /// + /// Multi-name. (NotNull) + /// Entity property-info. (NotNull) + [Obsolete("There is more available object. {org.seasar.framework.beans.factory.BeanDescFactory}")] + public override PropertyInfo GetEntityPropertyInfoByMultiName(String multiName) { + String propertyName = GetCapPropNameByDbName(GetDbNameByMultiName(multiName)); + MethodInfo method = this.GetType().GetMethod("GetEntityPropertyInfo_" + propertyName); + return (PropertyInfo)method.Invoke(this, null); + } + + #endregion +#end + + // ===================================================================================== + // Foreign DBMeta + // ============== + /// + /// ${database.ImplementComment} + /// + /// Foreign-property-name(Both OK - InitCap or not). (NotNull) + /// Foreign DBMeta. (NotNull) + public override ${glDBMetaInterfaceName} GetForeignDBMeta(String foreignPropertyName) { + AssertStringNotNullAndNotTrimmedEmpty("foreignPropertyName", foreignPropertyName); + String methodName = "GetForeignDBMeta_" + foreignPropertyName.Substring(0, 1) + foreignPropertyName.Substring(1); + MethodInfo method = this.GetType().GetMethod(methodName); + if (method == null) { + String msg = "The foreignPropertyName is not existing: foreignPropertyName=" + foreignPropertyName; + msg = msg + " tableName=" + TABLE_DB_NAME + " methodName=" + methodName; + throw new SystemException(msg); + } + return (${glDBMetaInterfaceName})method.Invoke(this, null); + } +#foreach ($foreignKeys in $table.ForeignKeys) + + /// + /// Get foreign dbmeta of ${foreignKeys.foreignPropertyNameInitCap}. + /// + /// Foreign DBMeta. (NotNull) + public ${glProjectPrefix}${foreignKeys.ForeignTable.JavaName}Dbm GetForeignDBMeta_${foreignKeys.foreignPropertyNameInitCap}() { + return ${glProjectPrefix}${foreignKeys.ForeignTable.JavaName}Dbm.GetInstance(); + } +#end +#foreach ($refferer in $table.Referrers) + #set ($reffererTable = $refferer.Table) + #set ($reffererEntityClassName = "${glProjectPrefix}${reffererTable.JavaName}") + #set ($reffererDaoClassName = "${reffererEntityClassName}Dao") + #set ($reffererCBClassName = "${reffererEntityClassName}${glConditionBeanInitialName}") + #set ($reffererVariableName = "${glChildrenVariablePrefix}${refferer.ReffererPropertyNameInitCap}") + #set ($reffererEntityLongClassName = "${glPackageExtendedEntity}.${reffererEntityClassName}") + #if (${refferer.isOneToOne()}) + + /// + /// Get foreign dbmeta of ${foreignKeys.reffererPropertyNameInitCapAsOne}. + /// + /// Foreign DBMeta. (NotNull) + public ${glProjectPrefix}${refferer.Table.JavaName}Dbm GetForeignDBMeta_${refferer.reffererPropertyNameInitCapAsOne}() { + return ${glProjectPrefix}${refferer.Table.JavaName}Dbm.GetInstance(); + } + #end +#end + + // ===================================================================================== + // Determination + // ============= + /** + * ${database.ImplementComment} + * + * @return Determination. + */ + public override bool HasTwoOrMorePrimaryKeys { + get { return ${table.hasTwoOrMorePrimaryKeys()}; } + } + + /** + * ${database.ImplementComment} + * + * @return Determination. + */ + public override bool HasCommonColumn { + get { return ${table.hasAllCommonColumn()}; } + } + } +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/cbean/AbstractBsConditionQuery.vmnet =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/cbean/AbstractBsConditionQuery.vmnet 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/cbean/AbstractBsConditionQuery.vmnet 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,543 @@ +#set ($myClassName = "${myAbstractBaseConditionQueryClassName}") + +using System; +using System.Collections; + +using ${glPackageBaseCommon}; +using ${glPackageBaseCommonCBean}; +using ${glPackageBaseCommonCKey}; +using ${glPackageBaseCommonCValue}; +using ${glPackageBaseCommonSqlClause}; + +namespace ${glPackageBaseCQ} { + + /// + /// The condition-query of {table.Name}. + /// Author: ${database.ClassAuthor} + /// + [System.Serializable] + public abstract class ${myClassName} : ${glConditionQueryAbstractName} { + + // ===================================================================================== + // Constructor + // =========== + /// + /// Constructor. + /// + /// Child query as interface. (Nullable: If null, this is base instance.) + /// SQL clause instance. (NotNull) + /// My alias name. (NotNull) + /// Nest level. + public ${myClassName}(${glConditionQueryInterfaceName} childQuery, ${glSqlClauseName} sqlClause, String aliasName, int nestLevel) + : base(childQuery, sqlClause, aliasName, nestLevel) {} + + // ===================================================================================== + // Table Name + // ========== + /// + /// ${database.ImplementComment} + /// + public override String GetTableDbName() { + return "${table.Name}"; + } + + // ===================================================================================== + // Query + // ===== + ## -------------------------------------------------------------------------------- + ## Make getter and setter methods. + ## ------------------------------- + + // /* * * * * * * * * * * * * * * * * * * * * * * + // MyTable = [$table.Name] + // * * * * * * * * */ + + #foreach ($col in $table.Columns) + #set ($tmpJavaName = "${col.JavaName}") + #set ($tmpUncapitalisedJavaName = "${col.UncapitalisedJavaName}") + + /// Column db name of ${col.UncapitalisedJavaName}. + protected static readonly String COL_${col.Name} = "${col.Name}"; + + /// Column java name of ${col.UncapitalisedJavaName}. + protected static readonly String J_${col.JavaName} = "${col.JavaName}"; + + /// Column uncapitalised java name of ${col.UncapitalisedJavaName}. + protected static readonly String UJ_${col.UncapitalisedJavaName} = "${col.UncapitalisedJavaName}"; + #if (${col.isJavaNativeStringObject()}) + + /// + /// Set the value of ${col.UncapitalisedJavaName} using equal. { = } + /// If the value is null or empty-string, this condition is ignored. + /// + /// The value of ${col.UncapitalisedJavaName} as equal. + public void Set${tmpJavaName}_Equal($col.JavaNative value) { + Register${tmpJavaName}(${glConditionKeyName}.CK_EQUAL, FilterRemoveEmptyString(value)); + } + #if ($database.isMakeConditionQueryEqualEmptyString()) + + /// + /// Set the empty-string of ${col.UncapitalisedJavaName} as equal. { = } + /// + /// this. (NotNull) + public void Set${tmpJavaName}_Equal_EmptyString() { + Register${tmpJavaName}(${glConditionKeyName}.CK_EQUAL, ""); + } + #end + #if (${col.hasClassification()}) + #foreach ($classificationMap in $col.ClassificationMapList) + + /// + /// Set the value od ${classificationMap.get('name')} of ${col.UncapitalisedJavaName} as equal. { = } + /// ${classificationMap.get('comment')} + /// + public void Set${tmpJavaName}_Equal_${classificationMap.get('name')}() { + Register${tmpJavaName}(${glConditionKeyName}.CK_EQUAL, ${glClassificationDefinition}.CODE_${col.ClassificationName}_${classificationMap.get('name')}); + } + #end + #end + #if (${col.isAvailableStringNotEqual()}) + + /// + /// Set the value of ${col.UncapitalisedJavaName} using notEqual. { != } + /// If the value is null or empty-string, this condition is ignored. + /// + /// The value of ${col.UncapitalisedJavaName} as notEqual. + public void Set${tmpJavaName}_NotEqual($col.JavaNative value) { + Register${tmpJavaName}(${glConditionKeyName}.CK_NOT_EQUAL, FilterRemoveEmptyString(value)); + } + #end + #if (${col.isAvailableStringGreaterThan()}) + + /// + /// Set the value of ${col.UncapitalisedJavaName} using greaterThan. { > } + /// If the value is null or empty-string, this condition is ignored. + /// + /// The value of ${col.UncapitalisedJavaName} as greaterThan. + public void Set${tmpJavaName}_GreaterThan($col.JavaNative value) { + Register${tmpJavaName}(${glConditionKeyName}.CK_GREATER_THAN, FilterRemoveEmptyString(value)); + } + #end + #if (${col.isAvailableStringLessThan()}) + + /// + /// Set the value of ${col.UncapitalisedJavaName} using lessThan. { < } + /// If the value is null or empty-string, this condition is ignored. + /// + /// The value of ${col.UncapitalisedJavaName} as lessThan. + public void Set${tmpJavaName}_LessThan($col.JavaNative value) { + Register${tmpJavaName}(${glConditionKeyName}.CK_LESS_THAN, FilterRemoveEmptyString(value)); + } + #end + #if (${col.isAvailableStringGreaterEqual()}) + + /// + /// Set the value of ${col.UncapitalisedJavaName} using greaterEqual. { >= } + /// If the value is null or empty-string, this condition is ignored. + /// + /// The value of ${col.UncapitalisedJavaName} as greaterEqual. + public void Set${tmpJavaName}_GreaterEqual($col.JavaNative value) { + Register${tmpJavaName}(${glConditionKeyName}.CK_GREATER_EQUAL, FilterRemoveEmptyString(value)); + } + #end + #if (${col.isAvailableStringLessEqual()}) + + /// + /// Set the value of ${col.UncapitalisedJavaName} using lessEqual. { <= } + /// If the value is null or empty-string, this condition is ignored. + /// + /// The value of ${col.UncapitalisedJavaName} as lessEqual. + public void Set${tmpJavaName}_LessEqual($col.JavaNative value) { + Register${tmpJavaName}(${glConditionKeyName}.CK_LESS_EQUAL, FilterRemoveEmptyString(value)); + } + #end + #if (${col.isAvailableStringPrefixSearch()}) + + /// + /// Set the value of ${col.UncapitalisedJavaName} using prefixSearch. { like 'xxx%' } + /// If the value is null or empty-string, this condition is ignored. + /// + /// The value of ${col.UncapitalisedJavaName} as prefixSearch. + public void Set${tmpJavaName}_PrefixSearch($col.JavaNative value) { + Register${tmpJavaName}(${glConditionKeyName}.CK_PREFIX_SEARCH, FilterRemoveEmptyString(value)); + } + #end + #if (${col.isAvailableStringInScope()}) + + /// + /// Set the value of ${col.UncapitalisedJavaName} using inScope. { in ('a', 'b') } + /// If the element in the list is null or empty-string, the condition-element is ignored. + /// + /// The value of ${col.UncapitalisedJavaName} as inScope. + public void Set${tmpJavaName}_InScope(System.Collections.IList valueList) { + Register${tmpJavaName}(${glConditionKeyName}.CK_IN_SCOPE, FilterRemoveEmptyStringFromList(valueList)); + } + #end + #if (${col.isAvailableStringNotInScope()}) + + /// + /// Set the value of ${col.UncapitalisedJavaName} using notInScope. { not in ('a', 'b') } + /// If the element in the list is null or empty-string, the condition-element is ignored. + /// + /// The value of ${col.UncapitalisedJavaName} as notInScope. + public void Set${tmpJavaName}_NotInScope(System.Collections.IList valueList) { + Register${tmpJavaName}(${glConditionKeyName}.CK_NOT_IN_SCOPE, FilterRemoveEmptyStringFromList(valueList)); + } + #end + #if (${col.isSingleKeyForeignKey()}) + #set ($relatedCQClassName = "${glProjectPrefix}${col.foreignKey.foreignTable.javaName}CQ") + #set ($subQueryPropertyNameInitCap = "${tmpJavaName}_InScopeSubQuery_${col.foreignKey.foreignPropertyNameInitCap}") + #set ($subQueryPropertyName = "${tmpUncapitalisedJavaName}_InScopeSubQuery_${col.foreignKey.foreignPropertyNameInitCap}") + + /// + /// Set the sub-query of ${subQueryPropertyNameInitCap} using inScopeSubQuery. + /// { in (select xxx.${col.foreignKey.firstForeignColumnName} from ${col.foreignKey.foreignTable.Name} where ...) } + /// This method use from clause and where clause of the sub-query instance. + /// this query keep the sub-query instance for query-value. + /// After you invoke this, If you set query in the argument[subQuery], the query is ignored. + /// + /// The sub-query of ${subQueryPropertyNameInitCap} using inScopeSubQuery. (NotNull) + public void Set${subQueryPropertyNameInitCap}(${relatedCQClassName} subQuery) { + AssertObjectNotNull("subQuery", subQuery); + Keep${subQueryPropertyNameInitCap}(subQuery);// for saving query-value. + RegisterInScopeSubQuery(subQuery, COL_${col.Name}, "${col.foreignKey.firstForeignColumnName}", "${subQueryPropertyNameInitCap}"); + } + + abstract public void Keep${subQueryPropertyNameInitCap}(${relatedCQClassName} subQuery); + #end + #if (${col.hasSingleKeyReferrer()}) + #foreach ($refferer in $col.SingleKeyReferrers) + #set ($relatedCQClassName = "${glProjectPrefix}${refferer.Table.JavaName}CQ") + #set ($subQueryPropertyNameInitCap = "${tmpJavaName}_InScopeSubQuery_${refferer.ReffererPropertyNameInitCap}") + #set ($subQueryPropertyName = "${tmpUncapitalisedJavaName}_InScopeSubQuery_${refferer.ReffererPropertyNameInitCap}") + + /// + /// Set the sub-query of ${subQueryPropertyNameInitCap} using inScopeSubQuery. + /// { in (select xxx.${refferer.FirstLocalColumnName} from ${refferer.Table.Name} where ...) } + /// This method use from clause and where clause of the sub-query instance. + /// this query save the sub-query instance for query-value. + /// After you invoke this, If you set query in the argument[subQuery], the query is ignored. + /// + /// The sub-query of ${subQueryPropertyNameInitCap} using inScopeSubQuery. (NotNull) + public void Set${subQueryPropertyNameInitCap}(${relatedCQClassName} subQuery) { + AssertObjectNotNull("subQuery", subQuery); + Keep${subQueryPropertyNameInitCap}(subQuery); + RegisterInScopeSubQuery(subQuery, COL_${col.Name}, "${refferer.FirstLocalColumnName}", "${subQueryPropertyNameInitCap}"); + } + + abstract public void Keep${subQueryPropertyNameInitCap}(${relatedCQClassName} subQuery); + #end + #end + #if (${col.hasSingleKeyReferrer()}) + #foreach ($refferer in $col.SingleKeyReferrers) + #if (!$refferer.isSelfReference()) + #set ($relatedCQClassName = "${glProjectPrefix}${refferer.Table.JavaName}CQ") + #set ($subQueryPropertyNameInitCap = "${tmpJavaName}_ExistsSubQuery_${refferer.ReffererPropertyNameInitCap}") + #set ($subQueryPropertyName = "${tmpUncapitalisedJavaName}_ExistsSubQuery_${refferer.ReffererPropertyNameInitCap}") + + /// + /// Set the sub-query of ${subQueryPropertyNameInitCap} using existsSubQuery. + /// { exists (select xxx.${refferer.FirstLocalColumnName} from ${refferer.Table.Name} where ...) } + /// This method use from clause and where clause of the sub-query instance. + /// this query save the sub-query instance for query-value. + /// After you invoke this, If you set query in the argument[subQuery], the query is ignored. + /// + /// The sub-query of ${subQueryPropertyNameInitCap} using existsSubQuery. (NotNull) + public void Set${subQueryPropertyNameInitCap}(${relatedCQClassName} subQuery) { + AssertObjectNotNull("subQuery", subQuery); + Keep${subQueryPropertyNameInitCap}(subQuery); + RegisterExistsSubQuery(subQuery, COL_${col.Name}, "${refferer.FirstLocalColumnName}", "${subQueryPropertyNameInitCap}"); + } + + abstract public void Keep${subQueryPropertyNameInitCap}(${relatedCQClassName} subQuery); + #end + #end + #end + #end + #if (${col.isJavaNativeNumberObject()}) + + /// + /// Set the value of ${col.UncapitalisedJavaName} using equal. { = } + /// + /// The value of ${col.UncapitalisedJavaName} as equal. + public void Set${tmpJavaName}_Equal($col.JavaNative value) { + Register${tmpJavaName}(${glConditionKeyName}.CK_EQUAL, value); + } + #if (${col.hasClassification()}) + #foreach ($classificationMap in $col.ClassificationMapList) + + /// + /// Set the value od ${classificationMap.get('name')} of ${col.UncapitalisedJavaName} as equal. { = } + /// ${classificationMap.get('comment')} + /// + public void Set${tmpJavaName}_Equal_${classificationMap.get('name')}() { + String code = ${glClassificationDefinition}.CODE_${col.ClassificationName}_${classificationMap.get('name')}; + Register${tmpJavaName}(${glConditionKeyName}.CK_EQUAL, ${col.JavaNative}.Parse(code)); + } + #end + #end + #if (${col.isAvailableNumberNotEqual()}) + + /// + /// Set the value of ${col.UncapitalisedJavaName} using notEqual. { != } + /// + /// The value of ${col.UncapitalisedJavaName} as notEqual. + public void Set${tmpJavaName}_NotEqual($col.JavaNative value) { + Register${tmpJavaName}(${glConditionKeyName}.CK_NOT_EQUAL, value); + } + #end + #if (${col.isAvailableNumberGreaterThan()}) + + /// + /// Set the value of ${col.UncapitalisedJavaName} using greaterThan. { > } + /// + /// The value of ${col.UncapitalisedJavaName} as greaterThan. + public void Set${tmpJavaName}_GreaterThan($col.JavaNative value) { + Register${tmpJavaName}(${glConditionKeyName}.CK_GREATER_THAN, value); + } + #end + #if (${col.isAvailableNumberLessThan()}) + + /// + /// Set the value of ${col.UncapitalisedJavaName} using lessThan. { < } + /// + /// The value of ${col.UncapitalisedJavaName} as lessThan. + public void Set${tmpJavaName}_LessThan($col.JavaNative value) { + Register${tmpJavaName}(${glConditionKeyName}.CK_LESS_THAN, value); + } + #end + #if (${col.isAvailableNumberGreaterEqual()}) + + /// + /// Set the value of ${col.UncapitalisedJavaName} using greaterEqual. { >= } + /// + /// The value of ${col.UncapitalisedJavaName} as greaterEqual. + public void Set${tmpJavaName}_GreaterEqual($col.JavaNative value) { + Register${tmpJavaName}(${glConditionKeyName}.CK_GREATER_EQUAL, value); + } + #end + #if (${col.isAvailableNumberLessEqual()}) + + /// + /// Set the value of ${col.UncapitalisedJavaName} using lessEqual. { <= } + /// + /// The value of ${col.UncapitalisedJavaName} as lessEqual. + public void Set${tmpJavaName}_LessEqual($col.JavaNative value) { + Register${tmpJavaName}(${glConditionKeyName}.CK_LESS_EQUAL, value); + } + #end + #if (${col.isAvailableNumberInScope()}) + + /// + /// Set the value of ${col.UncapitalisedJavaName} using inScope. { in ('a', 'b') } + /// If the element in the list is null or empty-string, the condition-element is ignored. + /// + /// The value of ${col.UncapitalisedJavaName} as inScope. + public void Set${tmpJavaName}_InScope(System.Collections.IList valueList) { + Register${tmpJavaName}(${glConditionKeyName}.CK_IN_SCOPE, FilterRemoveEmptyStringFromList(valueList)); + } + #end + #if (${col.isAvailableNumberNotInScope()}) + + /// + /// Set the value of ${col.UncapitalisedJavaName} using notInScope. { not in ('a', 'b') } + /// If the element in the list is null or empty-string, the condition-element is ignored. + /// + /// The value of ${col.UncapitalisedJavaName} as notInScope. + public void Set${tmpJavaName}_NotInScope(System.Collections.IList valueList) { + Register${tmpJavaName}(${glConditionKeyName}.CK_NOT_IN_SCOPE, FilterRemoveEmptyStringFromList(valueList)); + } + #end + #if (${col.isSingleKeyForeignKey()}) + #set ($relatedCQClassName = "${glProjectPrefix}${col.foreignKey.foreignTable.javaName}CQ") + #set ($subQueryPropertyNameInitCap = "${tmpJavaName}_InScopeSubQuery_${col.foreignKey.foreignPropertyNameInitCap}") + #set ($subQueryPropertyName = "${tmpUncapitalisedJavaName}_InScopeSubQuery_${col.foreignKey.foreignPropertyNameInitCap}") + + /// + /// Set the sub-query of ${subQueryPropertyNameInitCap} using inScopeSubQuery. + /// { in (select xxx.${col.foreignKey.firstForeignColumnName} from ${col.foreignKey.foreignTable.Name} where ...) } + /// This method use from clause and where clause of the sub-query instance. + /// this query keep the sub-query instance for query-value. + /// After you invoke this, If you set query in the argument[subQuery], the query is ignored. + /// + /// The sub-query of ${subQueryPropertyNameInitCap} using inScopeSubQuery. (NotNull) + public void Set${subQueryPropertyNameInitCap}(${relatedCQClassName} subQuery) { + AssertObjectNotNull("subQuery", subQuery); + Keep${subQueryPropertyNameInitCap}(subQuery);// for saving query-value. + RegisterInScopeSubQuery(subQuery, COL_${col.Name}, "${col.foreignKey.firstForeignColumnName}", "${subQueryPropertyNameInitCap}"); + } + + abstract public void Keep${subQueryPropertyNameInitCap}(${relatedCQClassName} subQuery); + #end + #if (${col.hasSingleKeyReferrer()}) + #foreach ($refferer in $col.SingleKeyReferrers) + #set ($relatedCQClassName = "${glProjectPrefix}${refferer.Table.JavaName}CQ") + #set ($subQueryPropertyNameInitCap = "${tmpJavaName}_InScopeSubQuery_${refferer.ReffererPropertyNameInitCap}") + #set ($subQueryPropertyName = "${tmpUncapitalisedJavaName}_InScopeSubQuery_${refferer.ReffererPropertyNameInitCap}") + + /// + /// Set the sub-query of ${subQueryPropertyNameInitCap} using inScopeSubQuery. + /// { in (select xxx.${refferer.FirstLocalColumnName} from ${refferer.Table.Name} where ...) } + /// This method use from clause and where clause of the sub-query instance. + /// this query save the sub-query instance for query-value. + /// After you invoke this, If you set query in the argument[subQuery], the query is ignored. + /// + /// The sub-query of ${subQueryPropertyNameInitCap} using inScopeSubQuery. (NotNull) + public void Set${subQueryPropertyNameInitCap}(${relatedCQClassName} subQuery) { + AssertObjectNotNull("subQuery", subQuery); + Keep${subQueryPropertyNameInitCap}(subQuery); + RegisterInScopeSubQuery(subQuery, COL_${col.Name}, "${refferer.FirstLocalColumnName}", "${subQueryPropertyNameInitCap}"); + } + + abstract public void Keep${subQueryPropertyNameInitCap}(${relatedCQClassName} subQuery); + #end + #end + #if (${col.hasSingleKeyReferrer()}) + #foreach ($refferer in $col.SingleKeyReferrers) + #if (!$refferer.isSelfReference()) + #set ($relatedCQClassName = "${glProjectPrefix}${refferer.Table.JavaName}CQ") + #set ($subQueryPropertyNameInitCap = "${tmpJavaName}_ExistsSubQuery_${refferer.ReffererPropertyNameInitCap}") + #set ($subQueryPropertyName = "${tmpUncapitalisedJavaName}_ExistsSubQuery_${refferer.ReffererPropertyNameInitCap}") + + /// + /// Set the sub-query of ${subQueryPropertyNameInitCap} using existsSubQuery. + /// { exists (select xxx.${refferer.FirstLocalColumnName} from ${refferer.Table.Name} where ...) } + /// This method use from clause and where clause of the sub-query instance. + /// this query save the sub-query instance for query-value. + /// After you invoke this, If you set query in the argument[subQuery], the query is ignored. + /// + /// The sub-query of ${subQueryPropertyNameInitCap} using existsSubQuery. (NotNull) + public void Set${subQueryPropertyNameInitCap}(${relatedCQClassName} subQuery) { + AssertObjectNotNull("subQuery", subQuery); + Keep${subQueryPropertyNameInitCap}(subQuery); + RegisterExistsSubQuery(subQuery, COL_${col.Name}, "${refferer.FirstLocalColumnName}", "${subQueryPropertyNameInitCap}"); + } + + abstract public void Keep${subQueryPropertyNameInitCap}(${relatedCQClassName} subQuery); + #end + #end + #end + #end + #if (${col.isJavaNativeDateObject()}) + + /// + /// Set the value of ${col.UncapitalisedJavaName} using equal. { = } + /// + /// The value of ${col.UncapitalisedJavaName} as equal. + public void Set${tmpJavaName}_Equal($col.JavaNative value) { + Register${tmpJavaName}(${glConditionKeyName}.CK_EQUAL, value); + } + #if (${col.isAvailableDateNotEqual()}) + + /// + /// Set the value of ${col.UncapitalisedJavaName} using notEqual. { != } + /// + /// The value of ${col.UncapitalisedJavaName} as notEqual. + public void Set${tmpJavaName}_NotEqual($col.JavaNative value) { + Register${tmpJavaName}(${glConditionKeyName}.CK_NOT_EQUAL, value); + } + #end + #if (${col.isAvailableDateGreaterThan()}) + + /// + /// Set the value of ${col.UncapitalisedJavaName} using greaterThan. { > } + /// + /// The value of ${col.UncapitalisedJavaName} as greaterThan. + public void Set${tmpJavaName}_GreaterThan($col.JavaNative value) { + Register${tmpJavaName}(${glConditionKeyName}.CK_GREATER_THAN, value); + } + #end + #if (${col.isAvailableDateLessThan()}) + + /// + /// Set the value of ${col.UncapitalisedJavaName} using lessThan. { < } + /// + /// The value of ${col.UncapitalisedJavaName} as lessThan. + public void Set${tmpJavaName}_LessThan($col.JavaNative value) { + Register${tmpJavaName}(${glConditionKeyName}.CK_LESS_THAN, value); + } + #end + #if (${col.isAvailableDateGreaterEqual()}) + + /// + /// Set the value of ${col.UncapitalisedJavaName} using greaterEqual. { >= } + /// + /// The value of ${col.UncapitalisedJavaName} as greaterEqual. + public void Set${tmpJavaName}_GreaterEqual($col.JavaNative value) { + Register${tmpJavaName}(${glConditionKeyName}.CK_GREATER_EQUAL, value); + } + #end + #if (${col.isAvailableDateLessEqual()}) + + /// + /// Set the value of ${col.UncapitalisedJavaName} using lessEqual. { <= } + /// + /// The value of ${col.UncapitalisedJavaName} as lessEqual. + public void Set${tmpJavaName}_LessEqual($col.JavaNative value) { + Register${tmpJavaName}(${glConditionKeyName}.CK_LESS_EQUAL, value); + } + #end + #end + #if (${col.isJavaNativeBooleanObject()}) + + /// + /// Set the value of ${col.UncapitalisedJavaName} using equal. { = } + /// + /// The value of ${col.UncapitalisedJavaName} as equal. + public void Set${tmpJavaName}_Equal($col.JavaNative value) { + Register${tmpJavaName}(${glConditionKeyName}.CK_EQUAL, value); + } + #end + #if (${col.isJavaNativeBinaryObject()}) + #end + #if (!${col.isNotNull()}) + + /// + /// Set the value of ${col.UncapitalisedJavaName} using isNull. { is null } + /// + public void Set${tmpJavaName}_IsNull() { + Register${tmpJavaName}(${glConditionKeyName}.CK_IS_NULL, DUMMY_OBJECT); + } + + /// + /// Set the value of ${col.UncapitalisedJavaName} using isNotNull. { is not null } + /// + public void Set${tmpJavaName}_IsNotNull() { + Register${tmpJavaName}(${glConditionKeyName}.CK_IS_NOT_NULL, DUMMY_OBJECT); + } + #end + + /// + /// Register condition of ${col.UncapitalisedJavaName}. + /// + /// Condition key. (NotNull) + /// The value of ${col.UncapitalisedJavaName}. (Nullable) + protected void Register${tmpJavaName}(${glConditionKeyName} key, Object value) { + RegisterQuery(key, value, GetCValue${tmpJavaName}(), COL_${col.Name}, J_${col.JavaName}, UJ_${col.UncapitalisedJavaName}); + } + + /// + /// Register inline condition of ${col.UncapitalisedJavaName}. + /// + /// Condition key. (NotNull) + /// The value of ${col.UncapitalisedJavaName}. (Nullable) + /// this. (NotNull) + protected void RegisterInline${tmpJavaName}(${glConditionKeyName} key, Object value) { + RegisterInlineQuery(key, value, GetCValue${tmpJavaName}(), COL_${col.Name}, J_${col.JavaName}, UJ_${col.UncapitalisedJavaName}); + } + + abstract protected ${glConditionValueName} GetCValue${tmpJavaName}(); + #end + + // ===================================================================================== + // Basic-Override Method + // ===================== + /// + /// This method overrides the method that is declared at super. + /// + /// Clause string. (NotNull) + public override String ToString() { + return GetSqlClause().GetClause(); + } + } +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/cbean/BsConditionBean.vmnet =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/cbean/BsConditionBean.vmnet 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/cbean/BsConditionBean.vmnet 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,389 @@ +#set ($myClassName = "${myBaseConditionBeanClassName}") + +using System; +using System.Collections; + +using ${glPackageBaseCommon}; +using ${glPackageBaseCommonCBean}; +using ${glPackageBaseCommonHelper}; + +using ${glPackageCQ}; +using ${glPackageNss}; + +namespace ${glPackageBaseCB} { + + /// + /// The condition-bean of ${table.Name}. + /// Author: ${database.ClassAuthor} + /// + [Seasar.Dao.Attrs.Table("$table.Name")] + [System.Serializable] + public class ${myClassName} : ${glConditionBeanAbstractName} { + + // ===================================================================================== + // Definition + // ========== + /** Map-string map-mark. */ + public static readonly String MAP_STRING_MAP_MARK = "map:"; + + /** Map-string list-mark. */ + public static readonly String MAP_STRING_LIST_MARK = "list:"; + + /** Map-string start-brace. */ + public static readonly String MAP_STRING_START_BRACE = "${database.extractAcceptStartBrace}"; + + /** Map-string end-brace. */ + public static readonly String MAP_STRING_END_BRACE = "${database.extractAcceptEndBrace}"; + + /** Map-string delimiter. */ + public static readonly String MAP_STRING_DELIMITER = "${database.extractAcceptDelimiter}"; + + /** Map-string equal. */ + public static readonly String MAP_STRING_EQUAL = "${database.extractAcceptEqual}"; + + // ===================================================================================== + // Attribute + // ========= + /// Condition query. + protected ${myConditionQueryClassName} _conditionQuery; + + // ===================================================================================== + // Constructor + // =========== + /// + /// Constructor. + /// + public ${myClassName}() { + } + + // ===================================================================================== + // Table Name + // ========== + /// + /// ${database.ImplementComment} + /// + public override String GetTableDbName() { + return "${table.Name}"; + } + + // ===================================================================================== + // Accept-PK-Map + // ============= + /// + /// ${database.ImplementComment} + /// + /// Primary key map. (NotNull and NotEmpty) + public override void AcceptPrimaryKeyMap(System.Collections.Generic.IDictionary primaryKeyMap) { + if (primaryKeyMap == null) { + String msg = "The argument[primaryKeyMap] must not be null."; + throw new ArgumentNullException(msg); + } + if (primaryKeyMap.Count == 0) { + String msg = "The argument[primaryKeyMap] must not be empty."; + throw new ArgumentOutOfRangeException(msg); + } +#if ($table.hasPrimaryKey()) + #foreach ($col in $table.PrimaryKey) + + if (!primaryKeyMap.ContainsKey("${col.Name}")) { + String msg = "The primaryKeyMap must have the value of ${col.Name}"; + throw new ArgumentOutOfRangeException(msg + ": primaryKeyMap --> " + primaryKeyMap); + } + { + Object obj = primaryKeyMap["${col.Name}"]; + if (obj == null) { + Query().Set${col.JavaName}_Equal(null); + } else { + if (obj is ${col.JavaNative}) { + Query().Set${col.JavaName}_Equal((${col.JavaNative})obj); + } else { + if (!(obj is String)) { + String msg = "The value should be ${col.JavaNative} or String: "; + msg = msg + "valueType=" + obj.GetType() + " value=" + obj; + throw new SystemException(msg); + } + String value = (String)obj; + #if ($col.isJavaNativeStringObject()) + + Query().Set${col.JavaName}_Equal(value); + } + } + } + #else + #if (${col.isJavaNativeBinaryObject()}) + + Query().Set${col.JavaName}_Equal(null);// Binary as String is out of target. + } + } + } + #else + + Query().Set${col.JavaName}_Equal(${col.JavaNative}.Parse(value)); + } + } + } + #end + #end + #end +#else + #foreach ($col in $table.Columns) + + if (!primaryKeyMap.ContainsKey("${col.Name}")) { + String msg = "The primaryKeyMap must have the value of ${col.Name}"; + throw new ArgumentOutOfRangeException(msg + ": primaryKeyMap --> " + primaryKeyMap); + } + { + Object obj = primaryKeyMap["${col.Name}"]; + if (obj == null) { + Query().Set${col.JavaName}_Equal(null); + } else { + if (obj is ${col.JavaNative}) { + Query().Set${col.JavaName}_Equal((${col.JavaNative})obj); + } else { + if (!(obj is String)) { + String msg = "The value should be ${col.JavaNative} or String: "; + msg = msg + "valueType=" + obj.GetType() + " value=" + obj; + throw new SystemException(msg); + } + String value = (String)obj; + #if ($col.isJavaNativeStringObject()) + + Query().Set${col.JavaName}_Equal(value); + } + } + } + #else + #if (${col.isJavaNativeBinaryObject()}) + + Query().Set${col.JavaName}_Equal(null);// Binary as String is out of target. + } + } + } + #else + + Query().Set${col.JavaName}_Equal(${col.JavaNative}.Parse(value)); + } + } + } + #end + #end + #end +#end + + } + + /// + /// ${database.ImplementComment} + /// + /// Primary key map-string. (NotNull and NotEmpty) + /// this. (NotNull) + public override void AcceptPrimaryKeyMapString(String primaryKeyMapString) { + if (primaryKeyMapString == null) { + String msg = "The argument[primaryKeyMapString] must not be null."; + throw new ArgumentNullException(msg); + } + String prefix = MAP_STRING_MAP_MARK + MAP_STRING_START_BRACE; + String suffix = MAP_STRING_END_BRACE; + if (!primaryKeyMapString.Trim().StartsWith(prefix)) { + primaryKeyMapString = prefix + primaryKeyMapString; + } + if (!primaryKeyMapString.Trim().EndsWith(suffix)) { + primaryKeyMapString = primaryKeyMapString + suffix; + } + ${glMapListStringName} mapListString = new ${glMapListStringImplName}(); + mapListString.MapMark = MAP_STRING_MAP_MARK; + mapListString.ListMark = MAP_STRING_LIST_MARK; + mapListString.StartBrace = MAP_STRING_START_BRACE; + mapListString.EndBrace = MAP_STRING_END_BRACE; + mapListString.Delimiter = MAP_STRING_DELIMITER; + mapListString.Equal = MAP_STRING_EQUAL; + AcceptPrimaryKeyMap(mapListString.generateMap(primaryKeyMapString)); + } + + // ===================================================================================== + // Add-OrderBy-PK + // ============== + /// + /// ${database.ImplementComment} + /// + /// this. (NotNull) + public override ${glConditionBeanInterfaceName} AddOrderBy_PK_Asc() { +#if ($table.hasPrimaryKey()) + #foreach ($col in $table.PrimaryKey) + + Query().AddOrderBy_${col.JavaName}_Asc(); + #end + + return this; +#else + + String msg = "This method is unsupported in this table that doesn't have primary key: "; + throw new NotSupportedException(msg + ToString()); +#end + + } + + /// + /// ${database.ImplementComment} + /// + /// this. (NotNull) + public override ${glConditionBeanInterfaceName} AddOrderBy_PK_Desc() { +#if ($table.hasPrimaryKey()) + #foreach ($col in $table.PrimaryKey) + + Query().AddOrderBy_${col.JavaName}_Desc(); + #end + + return this; +#else + + String msg = "This method is unsupported in this table that doesn't have primary key: "; + throw new NotSupportedException(msg + ToString()); +#end + + } + + // ===================================================================================== + // Query + // ===== + /// + /// Query. + /// + /// Instance of query. (NotNull) + public ${myConditionQueryClassName} Query() { + return this.ConditionQuery; + } + + /// + /// The property of condition-query. {for SqlComment} + /// + /// Instance of condition query. (NotNull) + public ${myConditionQueryClassName} ConditionQuery { + get { + if (_conditionQuery == null) { + _conditionQuery = new ${myConditionQueryClassName}(null, this.SqlClause, GetTableDbName(), 0); + } + return _conditionQuery; + } + } + + /// + /// ${database.ImplementComment} + /// + /// Instance of condition-query. (NotNull) + public override ${glPackageBaseCommonCBean}.${glConditionQueryInterfaceName} ConditionQueryAsInterface { + get { return this.ConditionQuery; } + } + +#foreach ($foreignKeys in $table.ForeignKeys) + #set ($tmpPropertyName = "${foreignKeys.foreignPropertyName}") + #set ($tmpPropertyNameInitCap = "${foreignKeys.foreignPropertyNameInitCap}") + #set ($nestSelectSetuppperClassName = "${glProjectPrefix}${foreignKeys.foreignTable.javaName}Nss") + + // /* * * * * * * * * * * * * * * * * * * * * * * + // ForeignTable = [${foreignKeys.foreignTable.Name}] + // ForeignProperty = [${tmpPropertyName}] + // * * * * * * * * */ + + /// Is select for ${tmpPropertyName}? + protected bool _isSelect${tmpPropertyNameInitCap}; + /// Nest select setupper for ${tmpPropertyName}. + protected ${nestSelectSetuppperClassName} _nss${tmpPropertyNameInitCap}; + /// + /// Is select for ${tmpPropertyName}? + /// + /// Determination. + public bool IsSelect${tmpPropertyNameInitCap} { + get { return _isSelect${tmpPropertyNameInitCap}; } + } + /// + /// Get nest select setupper for ${tmpPropertyName}. {For Internal} + /// + /// Nest select setupper. (NotNull) + public ${nestSelectSetuppperClassName} Nss${tmpPropertyNameInitCap} { + get { + if (_nss${tmpPropertyNameInitCap} == null) { + _nss${tmpPropertyNameInitCap} = new ${nestSelectSetuppperClassName}(null);// for Dummy + } + return _nss${tmpPropertyNameInitCap}; + } + } + /// + /// Set up select for ${tmpPropertyName}. + /// If you invoke this, this entity is target of select. + /// + public ${nestSelectSetuppperClassName} SetupSelect_${tmpPropertyNameInitCap}() { + Query().Query${tmpPropertyNameInitCap}();// For setting outer join. + if (_nss${tmpPropertyNameInitCap} == null || !_nss${tmpPropertyNameInitCap}.HasConditionQuery) { + _nss${tmpPropertyNameInitCap} = new ${nestSelectSetuppperClassName}(Query().Query${tmpPropertyNameInitCap}()); + } + // Set dummy string that means this foreign entity is target of select. + _isSelect${tmpPropertyNameInitCap} = true; + LimitSelect_Off(); + return _nss${tmpPropertyNameInitCap}; + } +#end +#foreach ($refferer in $table.Referrers) + #if (${refferer.isOneToOne()}) + #set ($tmpPropertyName = "${refferer.ReffererPropertyNameAsOne}") + #set ($tmpPropertyNameInitCap = "${refferer.ReffererPropertyNameInitCapAsOne}") + #set ($nestSelectSetuppperClassName = "${glProjectPrefix}${refferer.table.javaName}Nss") + + // /* * * * * * * * * * * * * * * * * * * * * * * {as one} + // RefferTable = [${refferer.Table.Name}] + // RefferProperty = [${tmpPropertyName}] + // * * * * * * * * */ + + /// Is select for ${tmpPropertyName}? + protected bool _isSelect${tmpPropertyNameInitCap}; + /// Nest select setupper for ${tmpPropertyName}. + protected ${nestSelectSetuppperClassName} _nss${tmpPropertyNameInitCap}; + /// + /// Is select for ${tmpPropertyName}? + /// + /// Determination. + public bool IsSelect${tmpPropertyNameInitCap} { + get { return _isSelect${tmpPropertyNameInitCap}; } + } + /// + /// Get nest select setupper for ${tmpPropertyName}. {For Internal} + /// + /// Nest select setupper. (NotNull) + public ${nestSelectSetuppperClassName} Nss${tmpPropertyNameInitCap} { + get { + if (_nss${tmpPropertyNameInitCap} == null) { + _nss${tmpPropertyNameInitCap} = new ${nestSelectSetuppperClassName}(null);// for Dummy + } + return _nss${tmpPropertyNameInitCap}; + } + } + /// + /// Set up select for ${tmpPropertyName}. + /// If you invoke this, this entity is target of select. + /// + public ${nestSelectSetuppperClassName} SetupSelect_${tmpPropertyNameInitCap}() { + Query().Query${tmpPropertyNameInitCap}();// For setting outer join. + if (_nss${tmpPropertyNameInitCap} == null || !_nss${tmpPropertyNameInitCap}.HasConditionQuery) { + _nss${tmpPropertyNameInitCap} = new ${nestSelectSetuppperClassName}(Query().Query${tmpPropertyNameInitCap}()); + } + // Set dummy string that means this foreign entity is target of select. + _isSelect${tmpPropertyNameInitCap} = true; + LimitSelect_Off(); + return _nss${tmpPropertyNameInitCap}; + } + #end +#end + + // ===================================================================================== + // Basic-Override Method + // ===================== + /// + /// This method overrides the method that is declared at super. + /// + /// Clause string. (NotNull) + override public String ToString() { + return GetClause(); + } + + } +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/cbean/BsConditionInlineQuery.vmnet =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/cbean/BsConditionInlineQuery.vmnet 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/cbean/BsConditionInlineQuery.vmnet 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,157 @@ +#set ($myClassName = "${myConditionInlineQueryClassName}") +#set ($myCQClassName = "") +#if ($database.isJavaDirOnlyOne()) + #set ($myCQClassName = "${myBaseConditionQueryClassName}") +#else + #set ($myCQClassName = "${myConditionQueryClassName}") +#end + +using System; +using System.Collections; + +using ${glPackageBaseCommon}; +using ${glPackageBaseCommonCBean}; +using ${glPackageBaseCommonCKey}; +using ${glPackageBaseCommonCValue}; +using ${glPackageBaseCommonSqlClause}; +using ${glPackageBaseCQ}; +using ${glPackageCQ}; + +namespace ${glPackageCIQ} { + + /// + /// The condition-query of {table.Name}. + /// Author: ${database.ClassAuthor} + /// + [System.Serializable] + public class ${myClassName} : ${myAbstractBaseConditionQueryClassName} { + + // ===================================================================================== + // Attribute + // ========= + protected ${myCQClassName} _myCQ; + + // ===================================================================================== + // Constructor + // =========== + /// + /// Constructor. + /// + /// Child query as interface. (Nullable: If null, this is base instance.) + /// SQL clause instance. (NotNull) + /// My alias name. (NotNull) + /// Nest level. + /// My condition-query. (NotNull) + public ${myClassName}(${glConditionQueryInterfaceName} childQuery, ${glSqlClauseName} sqlClause, String aliasName, int nestLevel, ${myCQClassName} myCQ) + : base(childQuery, sqlClause, aliasName, nestLevel) { _myCQ = myCQ; } + + // ===================================================================================== + // Query + // ===== + protected override void RegisterQuery(${glConditionKeyName} key, Object value, ${glConditionValueName} cvalue + , String colName, String capPropName, String uncapPropName) { + RegisterInlineQuery(key, value, cvalue, colName, capPropName, uncapPropName); + } + + ## -------------------------------------------------------------------------------- + ## Make getter and setter methods. + ## ------------------------------- + + // /* * * * * * * * * * * * * * * * * * * * * * * + // MyTable = [$table.Name] + // * * * * * * * * */ + + #foreach ($col in $table.Columns) + #set ($tmpJavaName = "${col.JavaName}") + #set ($tmpUncapitalisedJavaName = "${col.UncapitalisedJavaName}") + + protected override ${glConditionValueName} GetCValue${tmpJavaName}() { + return _myCQ.${tmpJavaName}; + } + + #if (${col.isJavaNativeStringObject()}) + #if (${col.isSingleKeyForeignKey()}) + #set ($relatedCQClassName = "${glProjectPrefix}${col.foreignKey.foreignTable.javaName}CQ") + #set ($subQueryPropertyNameInitCap = "${tmpJavaName}_InScopeSubQuery_${col.foreignKey.foreignPropertyNameInitCap}") + #set ($subQueryPropertyName = "${tmpUncapitalisedJavaName}_InScopeSubQuery_${col.foreignKey.foreignPropertyNameInitCap}") + + public override void Keep${subQueryPropertyNameInitCap}(${relatedCQClassName} subQuery) { + _myCQ.Keep${subQueryPropertyNameInitCap}(subQuery); + } + #end + #if (${col.hasSingleKeyReferrer()}) + #foreach ($refferer in $col.SingleKeyReferrers) + #set ($relatedCQClassName = "${glProjectPrefix}${refferer.Table.JavaName}${glConditionQueryInitialName}") + #set ($subQueryPropertyNameInitCap = "${tmpJavaName}_InScopeSubQuery_${refferer.ReffererPropertyNameInitCap}") + #set ($subQueryPropertyName = "${tmpUncapitalisedJavaName}_InScopeSubQuery_${refferer.ReffererPropertyNameInitCap}") + + public override void Keep${subQueryPropertyNameInitCap}(${relatedCQClassName} subQuery) { + _myCQ.Keep${subQueryPropertyNameInitCap}(subQuery); + } + #end + #end + #if (${col.hasSingleKeyReferrer()}) + #foreach ($refferer in $col.SingleKeyReferrers) + #if (!$refferer.isSelfReference()) + #set ($relatedCQClassName = "${glProjectPrefix}${refferer.Table.JavaName}${glConditionQueryInitialName}") + #set ($subQueryPropertyNameInitCap = "${tmpJavaName}_ExistsSubQuery_${refferer.ReffererPropertyNameInitCap}") + #set ($subQueryPropertyName = "${tmpUncapitalisedJavaName}_ExistsSubQuery_${refferer.ReffererPropertyNameInitCap}") + + public override void Keep${subQueryPropertyNameInitCap}(${relatedCQClassName} subQuery) { + throw new SystemException("ExistsSubQuery at inline() is unsupported! Sorry!"); + // _myCQ.Keep${subQueryPropertyNameInitCap}(subQuery); + } + #end + #end + #end + #end + #if (${col.isJavaNativeNumberObject()}) + #if (${col.isSingleKeyForeignKey()}) + #set ($relatedCQClassName = "${glProjectPrefix}${col.foreignKey.foreignTable.javaName}CQ") + #set ($subQueryPropertyNameInitCap = "${tmpJavaName}_InScopeSubQuery_${col.foreignKey.foreignPropertyNameInitCap}") + #set ($subQueryPropertyName = "${tmpUncapitalisedJavaName}_InScopeSubQuery_${col.foreignKey.foreignPropertyNameInitCap}") + + public override void Keep${subQueryPropertyNameInitCap}(${relatedCQClassName} subQuery) { + _myCQ.Keep${subQueryPropertyNameInitCap}(subQuery); + } + #end + #if (${col.hasSingleKeyReferrer()}) + #foreach ($refferer in $col.SingleKeyReferrers) + #set ($relatedCQClassName = "${glProjectPrefix}${refferer.Table.JavaName}${glConditionQueryInitialName}") + #set ($subQueryPropertyNameInitCap = "${tmpJavaName}_InScopeSubQuery_${refferer.ReffererPropertyNameInitCap}") + #set ($subQueryPropertyName = "${tmpUncapitalisedJavaName}_InScopeSubQuery_${refferer.ReffererPropertyNameInitCap}") + + public override void Keep${subQueryPropertyNameInitCap}(${relatedCQClassName} subQuery) { + _myCQ.Keep${subQueryPropertyNameInitCap}(subQuery); + } + #end + #end + #if (${col.hasSingleKeyReferrer()}) + #foreach ($refferer in $col.SingleKeyReferrers) + #if (!$refferer.isSelfReference()) + #set ($relatedCQClassName = "${glProjectPrefix}${refferer.Table.JavaName}${glConditionQueryInitialName}") + #set ($subQueryPropertyNameInitCap = "${tmpJavaName}_ExistsSubQuery_${refferer.ReffererPropertyNameInitCap}") + #set ($subQueryPropertyName = "${tmpUncapitalisedJavaName}_ExistsSubQuery_${refferer.ReffererPropertyNameInitCap}") + + public override void Keep${subQueryPropertyNameInitCap}(${relatedCQClassName} subQuery) { + throw new SystemException("ExistsSubQuery at inline() is unsupported! Sorry!"); + // _myCQ.Keep${subQueryPropertyNameInitCap}(subQuery); + } + #end + #end + #end + #end + #if (${col.isJavaNativeDateObject()}) + #end + #if (${col.isJavaNativeBooleanObject()}) + #end + #if (${col.isJavaNativeBinaryObject()}) + #end + #if (!${col.isNotNull()}) + #end + #if (!${col.isJavaNativeBinaryObject()}) + #end + #end + + } +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/cbean/BsConditionQuery.vmnet =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/cbean/BsConditionQuery.vmnet 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/cbean/BsConditionQuery.vmnet 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,717 @@ +#set ($myClassName = "") +#if ($database.isJavaDirOnlyOne()) + +using ${glPackageCQ}; + #set ($myClassName = "${myBaseConditionQueryClassName}") +#else + +using ${glPackageBaseCQ}; + #set ($myClassName = "${myConditionQueryClassName}") +#end + +using System; +using System.Collections; + +using ${glPackageBaseCommon}; +using ${glPackageBaseCommonCBean}; +using ${glPackageBaseCommonCKey}; +using ${glPackageBaseCommonCValue}; +using ${glPackageBaseCommonSqlClause}; + +using ${glPackageCIQ}; + +#if ($database.isJavaDirOnlyOne()) + +namespace ${glPackageBaseCQ} { +#else + +namespace ${glPackageCQ} { +#end + + /// + /// The condition-query of {table.Name}. + /// Author: ${database.ClassAuthor} + /// + [System.Serializable] + public class ${myClassName} : ${myAbstractBaseConditionQueryClassName} { + + // ===================================================================================== + // Attribute + // ========= + protected ${myConditionInlineQueryClassName} _inlineQuery; + + // ===================================================================================== + // Constructor + // =========== + /// + /// Constructor. + /// + /// Child query as interfaec. (Nullable: If null, this is base instance.) + /// SQL clause instance. (NotNull) + /// My alias name. (NotNull) + /// Nest level. + public ${myClassName}(${glConditionQueryInterfaceName} childQuery, ${glSqlClauseName} sqlClause, String aliasName, int nestLevel) + : base(childQuery, sqlClause, aliasName, nestLevel) {} + + // ===================================================================================== + // Inline + // ====== + /** + * Get inline query. + * + * @return Inline query. (NotNull) + */ + public ${myConditionInlineQueryClassName} Inline() { + if (_inlineQuery == null) { + _inlineQuery = new ${myConditionInlineQueryClassName}(GetChildQuery(), GetSqlClause(), GetAliasName(), GetNestLevel(), this); + } + return _inlineQuery; + } + + // ===================================================================================== + // IncludeAsMine + // ============= + #foreach ($col in $table.Columns) + + /// + /// Include select-column of ${col.UncapitalisedJavaName} as mine. + /// Alias name is java-name of this column. + /// Be careful to whether your table have the same column. + /// + public void IncludeAsMine_${col.JavaName}() { + RegisterIncludedSelectColumn("${col.JavaName}", GetRealColumnName("${col.Name}")); + } + + /// + /// Include select-column of ${col.UncapitalisedJavaName} as mine. + /// + /// Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + public void IncludeAsMine_${col.JavaName}(String aliasName) { + RegisterIncludedSelectColumn(aliasName, GetRealColumnName("${col.Name}")); + } + #end + + // ===================================================================================== + // Query + // ===== + ## -------------------------------------------------------------------------------- + ## Make getter and setter methods. + ## ------------------------------- + + // /* * * * * * * * * * * * * * * * * * * * * * * + // MyTable = [$table.Name] + // * * * * * * * * */ + + #foreach ($col in $table.Columns) + #set ($tmpJavaName = "${col.JavaName}") + #set ($tmpUncapitalisedJavaName = "${col.UncapitalisedJavaName}") + + /// The attribute of ${col.UncapitalisedJavaName}. + protected ${glConditionValueName} _${tmpUncapitalisedJavaName}; + + /// + /// Get the value of ${col.UncapitalisedJavaName}. + /// + /// The value of ${col.UncapitalisedJavaName}. + public ${glConditionValueName} ${tmpJavaName} { + get { + if (_${tmpUncapitalisedJavaName} == null) { + _${tmpUncapitalisedJavaName} = new ${glConditionValueName}(); + } + return _${tmpUncapitalisedJavaName}; + } + } + + protected override ${glConditionValueName} GetCValue${tmpJavaName}() { + return this.${tmpJavaName}; + } + + #if (${col.isJavaNativeStringObject()}) + #if ($database.isMakeDeprecated()) + #if (${col.isAvailableStringEqualOldAsInline()}) + + /// + /// Set the value of ${col.UncapitalisedJavaName} using equal as inline. { = } + /// If the value is null or empty-string, this condition is ignored. + /// + /// The value of ${col.UncapitalisedJavaName} as equal. + public void Set${tmpJavaName}_Equal_AsInline($col.JavaNative value) { + RegisterInline${tmpJavaName}(${glConditionKeyName}.CK_EQUAL, FilterRemoveEmptyString(value)); + } + #if (${col.hasClassification()}) + #foreach ($classificationMap in $col.ClassificationMapList) + + /// + /// Set the value od ${classificationMap.get('name')} of ${col.UncapitalisedJavaName} as equal as inline. { = } + /// + public void Set${tmpJavaName}_Equal_${classificationMap.get('name')}_AsInline() { + RegisterInline${tmpJavaName}(${glConditionKeyName}.CK_EQUAL, ${glClassificationDefinition}.CODE_${col.ClassificationName}_${classificationMap.get('name')}); + } + #end + #end + #end + #if (${col.isAvailableStringNotEqualOldAsInline()}) + + /// + /// Set the value of ${col.UncapitalisedJavaName} using notEqual as inline. { != } + /// If the value is null or empty-string, this condition is ignored. + /// + /// The value of ${col.UncapitalisedJavaName} as notEqual. + public void Set${tmpJavaName}_NotEqual_AsInline($col.JavaNative value) { + RegisterInline${tmpJavaName}(${glConditionKeyName}.CK_NOT_EQUAL, FilterRemoveEmptyString(value)); + } + #end + #if (${col.isAvailableStringGreaterThanOldAsInline()}) + + /// + /// Set the value of ${col.UncapitalisedJavaName} using greaterThan as inline. { > } + /// If the value is null or empty-string, this condition is ignored. + /// + /// The value of ${col.UncapitalisedJavaName} as greaterThan. + public void Set${tmpJavaName}_GreaterThan_AsInline($col.JavaNative value) { + RegisterInline${tmpJavaName}(${glConditionKeyName}.CK_GREATER_THAN, FilterRemoveEmptyString(value)); + } + #end + #if (${col.isAvailableStringLessThanOldAsInline()}) + + /// + /// Set the value of ${col.UncapitalisedJavaName} using lessThan as inline. { < } + /// If the value is null or empty-string, this condition is ignored. + /// + /// The value of ${col.UncapitalisedJavaName} as lessThan. + public void Set${tmpJavaName}_LessThan_AsInline($col.JavaNative value) { + RegisterInline${tmpJavaName}(${glConditionKeyName}.CK_LESS_THAN, FilterRemoveEmptyString(value)); + } + #end + #if (${col.isAvailableStringGreaterEqualOldAsInline()}) + + /// + /// Set the value of ${col.UncapitalisedJavaName} using greaterEqual as inline. { >= } + /// If the value is null or empty-string, this condition is ignored. + /// + /// The value of ${col.UncapitalisedJavaName} as greaterEqual. + public void Set${tmpJavaName}_GreaterEqual_AsInline($col.JavaNative value) { + RegisterInline${tmpJavaName}(${glConditionKeyName}.CK_GREATER_EQUAL, FilterRemoveEmptyString(value)); + } + #end + #if (${col.isAvailableStringLessEqualOldAsInline()}) + + /// + /// Set the value of ${col.UncapitalisedJavaName} using lessEqual as inline. { <= } + /// If the value is null or empty-string, this condition is ignored. + /// + /// The value of ${col.UncapitalisedJavaName} as lessEqual. + public void Set${tmpJavaName}_LessEqual_AsInline($col.JavaNative value) { + RegisterInline${tmpJavaName}(${glConditionKeyName}.CK_LESS_EQUAL, FilterRemoveEmptyString(value)); + } + #end + #if (${col.isAvailableStringPrefixSearchOldAsInline()}) + + /// + /// Set the value of ${col.UncapitalisedJavaName} using prefixSearch as inline. { like 'xxx%' } + /// If the value is null or empty-string, this condition is ignored. + /// + /// The value of ${col.UncapitalisedJavaName} as prefixSearch. + public void Set${tmpJavaName}_PrefixSearch_AsInline($col.JavaNative value) { + RegisterInline${tmpJavaName}(${glConditionKeyName}.CK_PREFIX_SEARCH, FilterRemoveEmptyString(value)); + } + #end + #end + #if (${col.isSingleKeyForeignKey()}) + #set ($relatedCQClassName = "${glProjectPrefix}${col.foreignKey.foreignTable.javaName}CQ") + #set ($subQueryPropertyNameInitCap = "${tmpJavaName}_InScopeSubQuery_${col.foreignKey.foreignPropertyNameInitCap}") + #set ($subQueryPropertyName = "${tmpUncapitalisedJavaName}_InScopeSubQuery_${col.foreignKey.foreignPropertyNameInitCap}") + + /// The sub-query of ${subQueryPropertyNameInitCap} using inScopeSubQuery. + protected ${relatedCQClassName} _${subQueryPropertyName}; + + /// + /// The property of sub-query of ${subQueryPropertyNameInitCap} using inScopeSubQuery. + /// + public ${relatedCQClassName} ${subQueryPropertyNameInitCap} { + get { return _${subQueryPropertyName}; } + } + + public override void Keep${subQueryPropertyNameInitCap}(${relatedCQClassName} subQuery) { + _${subQueryPropertyName} = subQuery; + } + #end + #if (${col.hasSingleKeyReferrer()}) + #foreach ($refferer in $col.SingleKeyReferrers) + #set ($relatedCQClassName = "${glProjectPrefix}${refferer.Table.JavaName}${glConditionQueryInitialName}") + #set ($subQueryPropertyNameInitCap = "${tmpJavaName}_InScopeSubQuery_${refferer.ReffererPropertyNameInitCap}") + #set ($subQueryPropertyName = "${tmpUncapitalisedJavaName}_InScopeSubQuery_${refferer.ReffererPropertyNameInitCap}") + + /// The sub-query of ${subQueryPropertyNameInitCap} using inScopeSubQuery. + protected ${relatedCQClassName} _${subQueryPropertyName}; + + /// + /// The property of sub-query of ${subQueryPropertyNameInitCap} using inScopeSubQuery. + /// + public ${relatedCQClassName} ${subQueryPropertyNameInitCap} { + get { return _${subQueryPropertyName}; } + } + + public override void Keep${subQueryPropertyNameInitCap}(${relatedCQClassName} subQuery) { + _${subQueryPropertyName} = subQuery; + } + #if ($database.isMakeDeprecated()) + #if (${col.isAvailableStringInScopeSubQueryOldAsInline()}) + + /// The sub-query of ${subQueryPropertyNameInitCap} using inScopeSubQuery as inline. + protected ${relatedCQClassName} _${subQueryPropertyName}_AsInline; + + /// + /// The property of sub-query of ${subQueryPropertyNameInitCap} using inScopeSubQuery as inline. + /// + public ${relatedCQClassName} ${subQueryPropertyNameInitCap}_AsInline { + get { return _${subQueryPropertyName}_AsInline; } + } + + /// + /// Set the sub-query of ${subQueryPropertyNameInitCap} using inScopeSubQuery as inline. + /// { in (select xxx.${refferer.FirstLocalColumnName} from ${refferer.Table.Name} where ...) } + /// This method use from clause and where clause of the sub-query instance. + /// this query save the sub-query instance for query-value. + /// After you invoke this, If you set query in the argument[subQuery], the query is ignored. + /// + /// The sub-query of ${subQueryPropertyNameInitCap} using inScopeSubQuery as inline. (NotNull) + public void Set${subQueryPropertyNameInitCap}_AsInline(${relatedCQClassName} subQuery) { + AssertObjectNotNull("subQuery", subQuery); + _${subQueryPropertyName}_AsInline = subQuery;// for saving query-value. + RegisterInlineInScopeSubQuery(subQuery, COL_${col.Name}, "${refferer.FirstLocalColumnName}", "${subQueryPropertyNameInitCap}_AsInline"); + } + #end + #end + #end + #end + #if (${col.hasSingleKeyReferrer()}) + #foreach ($refferer in $col.SingleKeyReferrers) + #if (!$refferer.isSelfReference()) + #set ($relatedCQClassName = "${glProjectPrefix}${refferer.Table.JavaName}${glConditionQueryInitialName}") + #set ($subQueryPropertyNameInitCap = "${tmpJavaName}_ExistsSubQuery_${refferer.ReffererPropertyNameInitCap}") + #set ($subQueryPropertyName = "${tmpUncapitalisedJavaName}_ExistsSubQuery_${refferer.ReffererPropertyNameInitCap}") + + /// The sub-query of ${subQueryPropertyNameInitCap} using existsSubQuery. + protected ${relatedCQClassName} _${subQueryPropertyName}; + + /// + /// The property of sub-query of ${subQueryPropertyNameInitCap} using existsSubQuery. + /// + public ${relatedCQClassName} ${subQueryPropertyNameInitCap} { + get { return _${subQueryPropertyName}; } + } + + public override void Keep${subQueryPropertyNameInitCap}(${relatedCQClassName} subQuery) { + _${subQueryPropertyName} = subQuery; + } + #end + #end + #end + #end + #if (${col.isJavaNativeNumberObject()}) + #if ($database.isMakeDeprecated()) + #if (${col.isAvailableNumberEqualOldAsInline()}) + + /// + /// Set the value of ${col.UncapitalisedJavaName} using equal as inline. { = } + /// + /// The value of ${col.UncapitalisedJavaName} as equal. + public void Set${tmpJavaName}_Equal_AsInline($col.JavaNative value) { + RegisterInline${tmpJavaName}(${glConditionKeyName}.CK_EQUAL, value); + } + #if (${col.hasClassification()}) + #foreach ($classificationMap in $col.ClassificationMapList) + + /// + /// Set the value od ${classificationMap.get('name')} of ${col.UncapitalisedJavaName} as equal as inline. { = } + /// + public void Set${tmpJavaName}_Equal_${classificationMap.get('name')}_AsInline() { + String code = ${glClassificationDefinition}.CODE_${col.ClassificationName}_${classificationMap.get('name')}; + RegisterInline${tmpJavaName}(${glConditionKeyName}.CK_EQUAL, ${col.JavaNative}.Parse(code)); + } + #end + #end + #end + #if (${col.isAvailableNumberNotEqualOldAsInline()}) + + /// + /// Set the value of ${col.UncapitalisedJavaName} using notEqual as inline. { != } + /// + /// The value of ${col.UncapitalisedJavaName} as notEqual. + public void Set${tmpJavaName}_NotEqual_AsInline($col.JavaNative value) { + RegisterInline${tmpJavaName}(${glConditionKeyName}.CK_NOT_EQUAL, value); + } + #end + #if (${col.isAvailableNumberGreaterThanOldAsInline()}) + + /// + /// Set the value of ${col.UncapitalisedJavaName} using greaterThan as inline. { > } + /// + /// The value of ${col.UncapitalisedJavaName} as greaterThan. + public void Set${tmpJavaName}_GreaterThan_AsInline($col.JavaNative value) { + RegisterInline${tmpJavaName}(${glConditionKeyName}.CK_GREATER_THAN, value); + } + #end + #if (${col.isAvailableNumberLessThanOldAsInline()}) + + /// + /// Set the value of ${col.UncapitalisedJavaName} using lessThan as inline. { < } + /// + /// The value of ${col.UncapitalisedJavaName} as lessThan. + public void Set${tmpJavaName}_LessThan_AsInline($col.JavaNative value) { + RegisterInline${tmpJavaName}(${glConditionKeyName}.CK_LESS_THAN, value); + } + #end + #if (${col.isAvailableNumberGreaterEqualOldAsInline()}) + + /// + /// Set the value of ${col.UncapitalisedJavaName} using greaterEqual as inline. { >= } + /// + /// The value of ${col.UncapitalisedJavaName} as greaterEqual. + public void Set${tmpJavaName}_GreaterEqual_AsInline($col.JavaNative value) { + RegisterInline${tmpJavaName}(${glConditionKeyName}.CK_GREATER_EQUAL, value); + } + #end + #if (${col.isAvailableNumberLessEqualOldAsInline()}) + + /// + /// Set the value of ${col.UncapitalisedJavaName} using lessEqual as inline. { <= } + /// + /// The value of ${col.UncapitalisedJavaName} as lessEqual. + public void Set${tmpJavaName}_LessEqual_AsInline($col.JavaNative value) { + RegisterInline${tmpJavaName}(${glConditionKeyName}.CK_LESS_EQUAL, value); + } + #end + #end + #if (${col.isSingleKeyForeignKey()}) + #set ($relatedCQClassName = "${glProjectPrefix}${col.foreignKey.foreignTable.javaName}CQ") + #set ($subQueryPropertyNameInitCap = "${tmpJavaName}_InScopeSubQuery_${col.foreignKey.foreignPropertyNameInitCap}") + #set ($subQueryPropertyName = "${tmpUncapitalisedJavaName}_InScopeSubQuery_${col.foreignKey.foreignPropertyNameInitCap}") + + /// The sub-query of ${subQueryPropertyNameInitCap} using inScopeSubQuery. + protected ${relatedCQClassName} _${subQueryPropertyName}; + + /// + /// The property of sub-query of ${subQueryPropertyNameInitCap} using inScopeSubQuery. + /// + public ${relatedCQClassName} ${subQueryPropertyNameInitCap} { + get { return _${subQueryPropertyName}; } + } + + public override void Keep${subQueryPropertyNameInitCap}(${relatedCQClassName} subQuery) { + _${subQueryPropertyName} = subQuery; + } + #end + #if (${col.hasSingleKeyReferrer()}) + #foreach ($refferer in $col.SingleKeyReferrers) + #set ($relatedCQClassName = "${glProjectPrefix}${refferer.Table.JavaName}${glConditionQueryInitialName}") + #set ($subQueryPropertyNameInitCap = "${tmpJavaName}_InScopeSubQuery_${refferer.ReffererPropertyNameInitCap}") + #set ($subQueryPropertyName = "${tmpUncapitalisedJavaName}_InScopeSubQuery_${refferer.ReffererPropertyNameInitCap}") + + /// The sub-query of ${subQueryPropertyNameInitCap} using inScopeSubQuery. + protected ${relatedCQClassName} _${subQueryPropertyName}; + + /// + /// The property of sub-query of ${subQueryPropertyNameInitCap} using inScopeSubQuery. + /// + public ${relatedCQClassName} ${subQueryPropertyNameInitCap} { + get { return _${subQueryPropertyName}; } + } + + public override void Keep${subQueryPropertyNameInitCap}(${relatedCQClassName} subQuery) { + _${subQueryPropertyName} = subQuery; + } + #if ($database.isMakeDeprecated()) + #if (${col.isAvailableNumberInScopeSubQueryOldAsInline()}) + + /// The sub-query of ${subQueryPropertyNameInitCap} using inScopeSubQuery as inline. + protected ${relatedCQClassName} _${subQueryPropertyName}_AsInline; + + /// + /// The property of sub-query of ${subQueryPropertyNameInitCap} using inScopeSubQuery as inline. + /// + public ${relatedCQClassName} ${subQueryPropertyNameInitCap}_AsInline { + get { return _${subQueryPropertyName}_AsInline; } + } + + /// + /// Set the sub-query of ${subQueryPropertyNameInitCap} using inScopeSubQuery as inline. + /// { in (select xxx.${refferer.FirstLocalColumnName} from ${refferer.Table.Name} where ...) } + /// This method use from clause and where clause of the sub-query instance. + /// this query save the sub-query instance for query-value. + /// After you invoke this, If you set query in the argument[subQuery], the query is ignored. + /// + /// The sub-query of ${subQueryPropertyNameInitCap} using inScopeSubQuery as inline. (NotNull) + public void Set${subQueryPropertyNameInitCap}_AsInline(${relatedCQClassName} subQuery) { + AssertObjectNotNull("subQuery", subQuery); + _${subQueryPropertyName}_AsInline = subQuery;// for saving query-value. + RegisterInlineInScopeSubQuery(subQuery, COL_${col.Name}, "${refferer.FirstLocalColumnName}", "${subQueryPropertyNameInitCap}_AsInline"); + } + #end + #end + #end + #end + #if (${col.hasSingleKeyReferrer()}) + #foreach ($refferer in $col.SingleKeyReferrers) + #if (!$refferer.isSelfReference()) + #set ($relatedCQClassName = "${glProjectPrefix}${refferer.Table.JavaName}${glConditionQueryInitialName}") + #set ($subQueryPropertyNameInitCap = "${tmpJavaName}_ExistsSubQuery_${refferer.ReffererPropertyNameInitCap}") + #set ($subQueryPropertyName = "${tmpUncapitalisedJavaName}_ExistsSubQuery_${refferer.ReffererPropertyNameInitCap}") + + /// The sub-query of ${subQueryPropertyNameInitCap} using existsSubQuery. + protected ${relatedCQClassName} _${subQueryPropertyName}; + + /// + /// The property of sub-query of ${subQueryPropertyNameInitCap} using existsSubQuery. + /// + public ${relatedCQClassName} ${subQueryPropertyNameInitCap} { + get { return _${subQueryPropertyName}; } + } + + public override void Keep${subQueryPropertyNameInitCap}(${relatedCQClassName} subQuery) { + _${subQueryPropertyName} = subQuery; + } + #end + #end + #end + #end + #if (${col.isJavaNativeDateObject()}) + #if ($database.isMakeDeprecated()) + #if (${col.isAvailableDateEqualOldAsInline()}) + + /// + /// Set the value of ${col.UncapitalisedJavaName} using equal as inline. { = } + /// + /// The value of ${col.UncapitalisedJavaName} as equal. + public void Set${tmpJavaName}_Equal_AsInline($col.JavaNative value) { + RegisterInline${tmpJavaName}(${glConditionKeyName}.CK_EQUAL, value); + } + #end + #if (${col.isAvailableDateNotEqualOldAsInline()}) + + /// + /// Set the value of ${col.UncapitalisedJavaName} using notEqual as inline. { != } + /// + /// The value of ${col.UncapitalisedJavaName} as notEqual. + public void Set${tmpJavaName}_NotEqual_AsInline($col.JavaNative value) { + RegisterInline${tmpJavaName}(${glConditionKeyName}.CK_NOT_EQUAL, value); + } + #end + #if (${col.isAvailableDateGreaterThanOldAsInline()}) + + /// + /// Set the value of ${col.UncapitalisedJavaName} using greaterThan as inline. { > } + /// + /// The value of ${col.UncapitalisedJavaName} as greaterThan. + public void Set${tmpJavaName}_GreaterThan_AsInline($col.JavaNative value) { + RegisterInline${tmpJavaName}(${glConditionKeyName}.CK_GREATER_THAN, value); + } + #end + #if (${col.isAvailableDateLessThanOldAsInline()}) + + /// + /// Set the value of ${col.UncapitalisedJavaName} using lessThan as inline. { < } + /// + /// The value of ${col.UncapitalisedJavaName} as lessThan. + public void Set${tmpJavaName}_LessThan_AsInline($col.JavaNative value) { + RegisterInline${tmpJavaName}(${glConditionKeyName}.CK_LESS_THAN, value); + } + #end + #if (${col.isAvailableDateGreaterEqualOldAsInline()}) + + /// + /// Set the value of ${col.UncapitalisedJavaName} using greaterEqual as inline. { >= } + /// + /// The value of ${col.UncapitalisedJavaName} as greaterEqual. + public void Set${tmpJavaName}_GreaterEqual_AsInline($col.JavaNative value) { + RegisterInline${tmpJavaName}(${glConditionKeyName}.CK_GREATER_EQUAL, value); + } + #end + #if (${col.isAvailableDateLessEqualOldAsInline()}) + + /// + /// Set the value of ${col.UncapitalisedJavaName} using lessEqual as inline. { <= } + /// + /// The value of ${col.UncapitalisedJavaName} as lessEqual. + public void Set${tmpJavaName}_LessEqual_AsInline($col.JavaNative value) { + RegisterInline${tmpJavaName}(${glConditionKeyName}.CK_LESS_EQUAL, value); + } + #end + #end + #end + #if (${col.isJavaNativeBooleanObject()}) + #end + #if (${col.isJavaNativeBinaryObject()}) + #end + #if (!${col.isNotNull()}) + #end + #if (!${col.isJavaNativeBinaryObject()}) + + /// + /// Add order-by of ${col.UncapitalisedJavaName} as ASC. { ex) order by primaryKey asc } + /// + /// this. (NotNull) + public ${myClassName} AddOrderBy_${tmpJavaName}_Asc() { + GetSqlClause().RegisterOrderBy(GetRealColumnName(COL_${col.Name}), true);return this; + } + + /// + /// Add order-by of ${col.UncapitalisedJavaName} as DESC. { ex) order by primaryKey desc } + /// + /// this. (NotNull) + public ${myClassName} AddOrderBy_${tmpJavaName}_Desc() { + GetSqlClause().RegisterOrderBy(GetRealColumnName(COL_${col.Name}), false);return this; + } + + /// + /// Reverse order-by (between 'asc' and 'desc') or override order-by of ${col.UncapitalisedJavaName} as ASC. + /// + /// this. (NotNull) + public ${myClassName} ReverseOrderBy_Or_OverrideOrderByAsc_${tmpJavaName}() { + GetSqlClause().ReverseOrderBy_Or_OverrideOrderBy(GetRealColumnName(COL_${col.Name}), true);return this; + } + + /// + /// Reverse order-by (between 'asc' and 'desc') or override order-by of ${col.UncapitalisedJavaName} as DESC. + /// + /// this. (NotNull) + public ${myClassName} ReverseOrderBy_Or_OverrideOrderByDesc_${tmpJavaName}() { + GetSqlClause().ReverseOrderBy_Or_OverrideOrderBy(GetRealColumnName(COL_${col.Name}), false);return this; + } + #end + #end + + // ===================================================================================== + // Query-SetupOuter-Method + // ======================= + #foreach ($foreignKeys in $table.ForeignKeys) + #set ($foreignCQClassName = "${glProjectPrefix}${foreignKeys.foreignTable.JavaName}${glConditionQueryInitialName}") + + // /* * * * * * * * * * * * * * * * * * * * * * * + // ForeignTable = [${foreignKeys.ForeignTable.Name}] + // ForeignProperty = [${foreignKeys.ForeignPropertyName}] + // * * * * * * * * */ + + /// + /// Query for ${foreignKeys.ForeignPropertyName}. + /// + /// Instance of ${foreignCQClassName} as ${foreignKeys.ForeignPropertyName}. (NotNull) + public ${foreignCQClassName} Query${foreignKeys.ForeignPropertyNameInitCap}() { + return this.ConditionQuery${foreignKeys.ForeignPropertyNameInitCap}; + } + + /// + /// Setup outer join for ${foreignKeys.ForeignPropertyName}. + /// + public void SetupOuterJoin_${foreignKeys.ForeignPropertyNameInitCap}() { + System.Collections.IDictionary joinOnMap = new System.Collections.Hashtable(); + String key = null; + String value = null; + #foreach ($columnName in $foreignKeys.LocalColumns) + #set ($localColumn = $table.getColumn($columnName)) + #set ($foreignColumnName = $foreignKeys.getLocalForeignMapping().get($columnName)) + + key = GetRealColumnName("${localColumn.Name}"); + value = this.ConditionQuery${foreignKeys.ForeignPropertyNameInitCap}.GetRealColumnName("${foreignColumnName}"); + joinOnMap.Add(key, value); + #end + + String joinTableName = "${foreignKeys.foreignTable.Name}"; + String aliasName = this.ConditionQuery${foreignKeys.ForeignPropertyNameInitCap}.GetRealAliasName(); + GetSqlClause().RegisterOuterJoin(joinTableName, aliasName, joinOnMap); + } + + /// Condition-query for ${foreignKeys.ForeignPropertyName}. */ + protected ${foreignCQClassName} _conditionQuery${foreignKeys.ForeignPropertyNameInitCap}; + + /// + /// Get condition-query for ${foreignKeys.ForeignPropertyName}. + /// + /// Instance of ${foreignCQClassName} as ${foreignKeys.ForeignPropertyName}. (NotNull) + public ${foreignCQClassName} ConditionQuery${foreignKeys.ForeignPropertyNameInitCap} { + get { + if (_conditionQuery${foreignKeys.foreignPropertyNameInitCap} == null) { + _conditionQuery${foreignKeys.foreignPropertyNameInitCap} = NewQuery${foreignKeys.ForeignPropertyNameInitCap}(); + SetupOuterJoin_${foreignKeys.foreignPropertyNameInitCap}(); + } + return _conditionQuery${foreignKeys.ForeignPropertyNameInitCap}; + } + } + + /// + /// New query for ${foreignKeys.ForeignPropertyName}. + /// + /// Query for ${foreignKeys.ForeignPropertyName}. (NotNull) + protected ${foreignCQClassName} NewQuery${foreignKeys.ForeignPropertyNameInitCap}() { + return new ${foreignCQClassName}(this, GetSqlClause(), "${foreignKeys.ForeignPropertyNameInitCap}", GetNextNestLevel()); + } + #end + + #foreach ($refferer in $table.Referrers) + #set ($relatedCQClassName = "${glProjectPrefix}${refferer.Table.JavaName}${glConditionQueryInitialName}") + #if (${refferer.isOneToOne()}) + + // /* * * * * * * * * * * * * * * * * * * * * * * {as one} + // ReffererTable = [${refferer.Table.Name}] + // ReffererProperty = [${refferer.ReffererPropertyNameAsOne}] + // * * * * * * * * */ + + /// + /// Query for ${refferer.ReffererPropertyNameAsOne}. + /// + /// Instance of ${relatedCQClassName} as ${refferer.ReffererPropertyNameAsOne}. (NotNull) + public ${relatedCQClassName} Query${refferer.ReffererPropertyNameInitCapAsOne}() { + return this.ConditionQuery${refferer.ReffererPropertyNameInitCapAsOne}; + } + + /// + /// Setup outer join for ${refferer.ReffererPropertyNameAsOne}. + /// + public void SetupOuterJoin_${refferer.ReffererPropertyNameInitCapAsOne}() { + System.Collections.IDictionary joinOnMap = new System.Collections.Hashtable(); + String key = null; + String value = null; + #foreach ($columnName in $refferer.ForeignColumns) + #set ($foreignColumn = $table.getColumn($columnName)) + #set ($reffererColumnName = $refferer.getLocalForeignMapping().get($columnName)) + + key = GetRealColumnName("${foreignColumn.Name}"); + value = this.ConditionQuery${refferer.ReffererPropertyNameInitCapAsOne}.GetRealColumnName("${reffererColumnName}"); + joinOnMap.Add(key, value); + #end + + String joinTableName = "${refferer.Table.Name}"; + String aliasName = this.ConditionQuery${refferer.ReffererPropertyNameInitCapAsOne}.GetRealAliasName(); + GetSqlClause().RegisterOuterJoin(joinTableName, aliasName, joinOnMap); + } + + /// Condition-query for ${refferer.ReffererPropertyNameAsOne}. + protected ${relatedCQClassName} _conditionQuery${refferer.ReffererPropertyNameInitCapAsOne}; + + /// + /// Get condition-query for ${refferer.ReffererPropertyNameAsOne}. + /// + /// Instance of ${relatedCQClassName} as ${refferer.ReffererPropertyNameAsOne}. (NotNull) + public ${relatedCQClassName} ConditionQuery${refferer.ReffererPropertyNameInitCapAsOne} { + get { + if (_conditionQuery${refferer.ReffererPropertyNameInitCapAsOne} == null) { + _conditionQuery${refferer.ReffererPropertyNameInitCapAsOne} = NewQuery${refferer.ReffererPropertyNameInitCapAsOne}(); + SetupOuterJoin_${refferer.ReffererPropertyNameInitCapAsOne}(); + } + return _conditionQuery${refferer.ReffererPropertyNameInitCapAsOne}; + } + } + + /// + /// New query for ${refferer.ReffererPropertyNameAsOne}. + /// + /// Query for ${refferer.ReffererPropertyNameAsOne}. (NotNull) + protected ${relatedCQClassName} NewQuery${refferer.ReffererPropertyNameInitCapAsOne}() { + return new ${relatedCQClassName}(this, GetSqlClause(), "${refferer.ReffererPropertyNameInitCapAsOne}", GetNextNestLevel()); + } + #end + #end + + } +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/cbean/ExConditionBean.vmnet =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/cbean/ExConditionBean.vmnet 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/cbean/ExConditionBean.vmnet 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,15 @@ +#set ($myClassName = "${myConditionBeanClassName}") + +using System; +using System.Collections; + +namespace ${glPackageCB} { + + /// + /// The condition-bean of ${table.Name}. + /// Author: ${database.ClassAuthor} + /// + [System.Serializable] + public class ${myClassName} : ${glPackageBaseCB}.${myBaseConditionBeanClassName} { + } +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/cbean/ExConditionQuery.vmnet =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/cbean/ExConditionQuery.vmnet 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/cbean/ExConditionQuery.vmnet 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,33 @@ +#set ($myClassName = "${myConditionQueryClassName}") + +using System; +using System.Collections; + +using ${glPackageBaseCommon}; +using ${glPackageBaseCommonCBean}; +using ${glPackageBaseCommonSqlClause}; +using ${glPackageBaseCQ}; + +namespace ${glPackageCQ} { + + /// + /// The condition-query of {table.Name}. + /// Author: ${database.ClassAuthor} + /// + [System.Serializable] + public class ${myClassName} : ${myBaseConditionQueryClassName} { + + // ===================================================================================== + // Constructor + // =========== + /// + /// Constructor. + /// + /// Child query as interface. (Nullable: If null, this is base instance.) + /// SQL clause instance. (NotNull) + /// My alias name. (NotNull) + /// Nest level. + public ${myClassName}(${glConditionQueryInterfaceName} childQuery, ${glSqlClauseName} sqlClause, String aliasName, int nestLevel) + : base(childQuery, sqlClause, aliasName, nestLevel) {} + } +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/cbean/NestSelectSetupper.vmnet =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/cbean/NestSelectSetupper.vmnet 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/cbean/NestSelectSetupper.vmnet 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,75 @@ +#set ($myClassName = "${myNestSelectSetupperClassName}") + +using System; + +using ${glPackageCQ}; + + +namespace ${glPackageNss} { + + public class ${myClassName} { + + /** Base query. */ + protected ${myConditionQueryClassName} _query; + + // ===================================================================================== + // Constructor + // =========== + public ${myClassName}(${myConditionQueryClassName} query) { + _query = query; + } + + // ===================================================================================== + // Accessor + // ======== + public ${myConditionQueryClassName} Query() { + return _query; + } + + public bool HasConditionQuery { + get { return _query != null; } + } + + // ===================================================================================== + // SetupSelect + // =========== + #foreach ($foreignKeys in $table.ForeignKeys) + #set ($tmpPropertyNameInitCap = "${foreignKeys.foreignPropertyNameInitCap}") + + protected bool _isSelect${tmpPropertyNameInitCap}; + public bool IsSelect${tmpPropertyNameInitCap} { + get { return _isSelect${tmpPropertyNameInitCap}; } + } + public void With${tmpPropertyNameInitCap}() { + AssertConditionQuery(); + Query().Query${tmpPropertyNameInitCap}(); + _isSelect${tmpPropertyNameInitCap} = true; + } + #end + #foreach ($refferer in $table.Referrers) + #if (${refferer.isOneToOne()}) + #set ($tmpPropertyNameInitCap = "${refferer.ReffererPropertyNameInitCapAsOne}") + + protected bool _isSelect${tmpPropertyNameInitCap}; + public bool IsSelect${tmpPropertyNameInitCap} { + get { return _isSelect${tmpPropertyNameInitCap}; } + } + public void With${tmpPropertyNameInitCap}() { + AssertConditionQuery(); + Query().Query${tmpPropertyNameInitCap}(); + _isSelect${tmpPropertyNameInitCap} = true; + } + #end + #end + + // ===================================================================================== + // Helper + // ====== + protected void AssertConditionQuery() { + if (!this.HasConditionQuery) { + String msg = "The query should not be null."; + throw new SystemException(msg); + } + } + } +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/exbhv/ExtendedBhv.vmnet =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/exbhv/ExtendedBhv.vmnet 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/exbhv/ExtendedBhv.vmnet 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,14 @@ +#set ($myClassName = "${myExtendedBhvInterfaceName}") + +using System; +using System.Collections; + +namespace ${glPackageExtendedBhv} { + + /// + /// The behavior-interface of ${table.Name}. (partial class for customizing) + /// Author: ${database.ClassAuthor} + /// + partial interface $myClassName { + } +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/exbhv/ExtendedBhvImpl.vmnet =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/exbhv/ExtendedBhvImpl.vmnet 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/exbhv/ExtendedBhvImpl.vmnet 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,14 @@ +#set ($myClassName = "${myExtendedBhvClassName}") + +using System; +using System.Collections; + +namespace ${glPackageExtendedBhv} { + + /// + /// The behavior of ${table.Name}. (partial class for customizing) + /// Author: ${database.ClassAuthor} + /// + partial class $myClassName { + } +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/exdao/ExParameterBean.vmnet =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/exdao/ExParameterBean.vmnet 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/exdao/ExParameterBean.vmnet 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,15 @@ + +#set ($myClassName = "${myExtendedParameterBeanClassName}") + +using System; + +namespace ${glPackageExtendedParameterBean} { + + /** + * The parameter-bean of ${pmbClassName}. + * + * @author ${database.ClassAuthor} + */ + partial class ${myClassName} { + } +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/exdao/ExtendedDao.vmnet =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/exdao/ExtendedDao.vmnet 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/exdao/ExtendedDao.vmnet 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,14 @@ +#set ($myClassName = "${myExtendedDaoClassName}") + +using System; +using System.Collections; + +namespace ${myExtendedDaoPackageName} { + + /// + /// The dao interface of ${table.Name}. (partial interface for customizing) + /// Author: ${database.ClassAuthor} + /// + partial interface ${myClassName} { + } +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/exentity/ExtendedEntity.vmnet =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/exentity/ExtendedEntity.vmnet 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/exentity/ExtendedEntity.vmnet 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,14 @@ +#set ($myClassName = "${myExtendedObjectClassName}") + +using System; +using System.Collections; + +namespace ${myExtendedEntityPackageName} { + + /// + /// The entity of ${table.Name}. (partial class for customizing) + /// Author: ${database.ClassAuthor} + /// + partial class $myClassName { + } +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/sbean/ArgumentBean.vmnet =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/sbean/ArgumentBean.vmnet 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/sbean/ArgumentBean.vmnet 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,162 @@ +#set ($myClassName = "${myArgumentBeanClassName}") + +using System; +using System.Reflection; +using System.Text; + +namespace ${glPackageArgumentBean} { + + /// + /// The argument-bean of ${myArgumentBeanName}. + /// Author: ${database.ClassAuthor} + /// + [System.Serializable] + public class ${myClassName} { + + // ===================================================================================== + // Static Definition + // ================= + #region Static Definition +#foreach ($propertyName in $propertyDefinitionMap.keySet()) + + /// The java name of ${propertyName} + public static readonly String JAVA_NAME_OF_${database.initCap($propertyName)} = "${database.initCap($propertyName)}"; + + /// The property name of ${propertyName} + public static readonly String PROPERTY_NAME_OF_${database.initCap($propertyName)} = "${propertyName}"; +#end + + #endregion + + // ===================================================================================== + // Attribute + // ========= + #region Attribute + +#foreach ($propertyName in $propertyDefinitionMap.keySet()) + #set ($propertyJavaNative = $database.getArgumentBeanPropertyType($myArgumentBeanName, $propertyName)) + #if ($database.isArgumentBeanPropertyDefaultValueEffective($myArgumentBeanName, $propertyName)) + + /// The value of ${propertyName}. Default value is ${database.getArgumentBeanPropertyDefaultValue($myArgumentBeanName, $propertyName)}. + protected ${propertyJavaNative} _${propertyName} = ${database.getArgumentBeanPropertyDefaultValue($myArgumentBeanName, $propertyName)}; + #else + + /// The value of ${propertyName}. + protected ${propertyJavaNative} _${propertyName}; + #end + + /// Has the setter of ${col.UncapitalisedJavaName} been invoked? + protected bool _isSetterInvoked${database.initCap($propertyName)}; +#end + + #endregion + + // ===================================================================================== + // Constructor + // =========== + #region Constructor + + /// + /// Constructor. + /// + public ${myClassName}() { + } + + #endregion + + // ===================================================================================== + // Property + // ======== + #region Property +#foreach ($propertyName in $propertyDefinitionMap.keySet()) + #set ($propertyJavaNative = $database.getArgumentBeanPropertyType($myArgumentBeanName, $propertyName)) + + /// + /// The value of ${propertyName}. + /// + public virtual ${propertyJavaNative} ${database.initCap($propertyName)} { + get { return _${propertyName}; } + set { _isSetterInvoked${database.initCap($propertyName)} = true; _${propertyName} = value; } + } +#end + + #endregion + + // ===================================================================================== + // Invoking Determination + // ====================== +#foreach ($propertyName in $propertyDefinitionMap.keySet()) + #set ($propertyJavaNative = $database.getArgumentBeanPropertyType($myArgumentBeanName, $propertyName)) + + /// + /// Has the setter of ${propertyName} been invoked? + /// + /// Determination. + public bool IsSetterInvoked${database.initCap($propertyName)}() { + return _isSetterInvoked${database.initCap($propertyName)}; + } +#end + + // ===================================================================================== + // Property PropertyInfo + // ===================== + #region Property PropertyInfo +#foreach ($propertyName in $propertyDefinitionMap.keySet()) + #set ($propertyJavaNative = $database.getArgumentBeanPropertyType($myArgumentBeanName, $propertyName)) + + /// + /// Get the propertyInfo of ${propertyName}. + /// + public PropertyInfo GetPropertyInfo${database.initCap($propertyName)}() { + return this.GetType().GetProperty("${database.initCap($propertyName)}"); + } +#end + + #endregion + +#if (${database.isAvailableSqlParameterBeanGeneration()}) + + // ===================================================================================== + // Prepared SqlParameter + // ===================== + #region Prepared SqlParameter + #foreach ($sqlParameterName in $database.getArgumentBeanRelatedSqlParameterSqlParameterNameList($myArgumentBeanName)) + + /// + /// Get prepared parameter bean of ${sqlParameterName}. + /// + public ${glPackageExtendedSqlParameterBean}.${sqlParameterName} GeneratePreparedSqlParameter${sqlParameterName}() { + ${glPackageExtendedSqlParameterBean}.${sqlParameterName} pmb = new ${glPackageExtendedSqlParameterBean}.${sqlParameterName}(); + #foreach ($propertyName in $propertyDefinitionMap.keySet()) + #set ($propertyJavaNative = $database.getArgumentBeanPropertyType($myArgumentBeanName, $propertyName)) + #if ($database.isSqlParameterBeanHaveTheProperty($sqlParameterName, $propertyName)) + + pmb.${database.initCap($propertyName)} = this.${database.initCap($propertyName)}; + #end + #end + + return pmb; + } + #end + + #endregion +#end + // ===================================================================================== + // Basic-Override Method + // ===================== + /// + /// ${database.OverrideComment} + /// + /// View-string of all-columns value. + public override String ToString() { + StringBuilder sb = new StringBuilder(); +#foreach ($propertyName in $propertyDefinitionMap.keySet()) + #set ($propertyJavaNative = $database.getArgumentBeanPropertyType($myArgumentBeanName, $propertyName)) + + sb.Append(" ${propertyName}=").Append(this.${database.initCap($propertyName)}); +#end + + return sb.ToString(); + } + } +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/sbean/SqlParameterBeanBs.vmnet =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/sbean/SqlParameterBeanBs.vmnet 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/sbean/SqlParameterBeanBs.vmnet 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,135 @@ +#set ($myClassName = "${myExtendedSqlParameterClassName}") + +using System; +using System.Reflection; +using System.Text; + +namespace ${glPackageExtendedSqlParameterBean} { + + /// + /// The sql-parametaer-bean of ${mySqlParameterBeanName}. + /// Author: ${database.ClassAuthor} + /// + [System.Serializable] + public partial class ${myClassName} { + + // ===================================================================================== + // Static Definition + // ================= + #region Static Definition +#foreach ($propertyName in $propertyDefinitionMap.keySet()) + + /// The java name of ${propertyName} + public static readonly String JAVA_NAME_OF_${database.initCap($propertyName)} = "${database.initCap($propertyName)}"; + + /// The property name of ${propertyName} + public static readonly String PROPERTY_NAME_OF_${database.initCap($propertyName)} = "${propertyName}"; +#end + + #endregion + + // ===================================================================================== + // Attribute + // ========= + #region Attribute + +#foreach ($propertyName in $propertyDefinitionMap.keySet()) + #set ($propertyJavaNative = $database.getSqlParameterBeanPropertyType($mySqlParameterBeanName, $propertyName)) + #if ($database.isSqlParameterBeanPropertyDefaultValueEffective($mySqlParameterBeanName, $propertyName)) + + /// The value of ${propertyName}. Default value is ${database.getSqlParameterBeanPropertyDefaultValue($mySqlParameterBeanName, $propertyName)}. + protected ${propertyJavaNative} _${propertyName} = ${database.getSqlParameterBeanPropertyDefaultValue($mySqlParameterBeanName, $propertyName)}; + #else + + /// The value of ${propertyName}. + protected ${propertyJavaNative} _${propertyName}; + #end + + /// Has the setter of ${col.UncapitalisedJavaName} been invoked? + protected bool _isSetterInvoked${database.initCap($propertyName)}; +#end + + #endregion + + // ===================================================================================== + // Constructor + // =========== + #region Constructor + + /// + /// Constructor. + /// + public ${myClassName}() { + } + + #endregion + + // ===================================================================================== + // Property + // ======== + #region Property +#foreach ($propertyName in $propertyDefinitionMap.keySet()) + #set ($propertyJavaNative = $database.getSqlParameterBeanPropertyType($mySqlParameterBeanName, $propertyName)) + + /// + /// The value of ${propertyName}. + /// + public ${propertyJavaNative} ${database.initCap($propertyName)} { + get { return _${propertyName}; } + set { _isSetterInvoked${database.initCap($propertyName)} = true; _${propertyName} = value; } + } +#end + + #endregion + + // ===================================================================================== + // Invoking Determination + // ====================== +#foreach ($propertyName in $propertyDefinitionMap.keySet()) + #set ($propertyJavaNative = $database.getSqlParameterBeanPropertyType($mySqlParameterBeanName, $propertyName)) + + /// + /// Has the setter of ${propertyName} been invoked? + /// + /// Determination. + public bool IsSetterInvoked${database.initCap($propertyName)}() { + return _isSetterInvoked${database.initCap($propertyName)}; + } +#end + + // ===================================================================================== + // Property PropertyInfo + // ===================== + #region Property PropertyInfo +#foreach ($propertyName in $propertyDefinitionMap.keySet()) + #set ($propertyJavaNative = $database.getSqlParameterBeanPropertyType($mySqlParameterBeanName, $propertyName)) + + /// + /// Get the propertyInfo of ${propertyName}. + /// + public PropertyInfo GetPropertyInfo${database.initCap($propertyName)}() { + return this.GetType().GetProperty("${database.initCap($propertyName)}"); + } +#end + + #endregion + + // ===================================================================================== + // Basic-Override Method + // ===================== + /// + /// ${database.OverrideComment} + /// + /// View-string of all-columns value. + public override String ToString() { + StringBuilder sb = new StringBuilder(); +#foreach ($propertyName in $propertyDefinitionMap.keySet()) + #set ($propertyJavaNative = $database.getSqlParameterBeanPropertyType($mySqlParameterBeanName, $propertyName)) + + sb.Append(" ${propertyName}=").Append(this.${database.initCap($propertyName)}); +#end + + return sb.ToString(); + } + } +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/sbean/SqlParameterBeanEx.vmnet =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/sbean/SqlParameterBeanEx.vmnet 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/csharp/sbean/SqlParameterBeanEx.vmnet 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,15 @@ +#set ($myClassName = "${myExtendedSqlParameterClassName}") + +using System; +using System.Reflection; +using System.Text; + +namespace ${glPackageExtendedSqlParameterBean} { + + /// + /// The sql-parameter-bean of ${mySqlParameterBeanName}. + /// Author: ${database.ClassAuthor} + /// + partial class ${myClassName} { + } +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/AccessContext.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/AccessContext.vm 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/AccessContext.vm 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,152 @@ +package ${glPackageBaseCommon}; + +/** + * Access-Context. + *
+ * This access-context on the thread should be initialized at the beginning of access.
+ * The access is various. Web-Access, Batch-Access, JUnit-Access and so on...
+ * 
+ * @author ${database.ClassAuthor} + */ +public class ${glAccessContextName} { + + // =================================================================================== + // Thread Local + // ============ + /** The thread-local for this. */ + private static final ThreadLocal${database.filterGenericsString(${glAccessContextName})} threadLocal = new ThreadLocal${database.filterGenericsString(${glAccessContextName})}(); + + /** + * Get access-context on thread. + * + * @return Access-context. (Nullable) + */ + public static ${glAccessContextName} getAccessContextOnThread() { + return (${glAccessContextName}) threadLocal.get(); + } + + /** + * Set access-context on thread. + * + * @param accessContext Access-context. (NotNull) + */ + public static void setAccessContextOnThread(${glAccessContextName} accessContext) { + if (accessContext == null) { + String msg = "The argument[accessContext] must not be null."; + throw new IllegalArgumentException(msg); + } + threadLocal.set(accessContext); + } + + /** + * Is existing access-context on thread? + * + * @return Determination. + */ + public static boolean isExistAccessContextOnThread() { + return (threadLocal.get() != null); + } + + /** + * Clear access-context on thread. + */ + public static void clearAccessContextOnThread() { + threadLocal.set(null); + } + + // =================================================================================== + // Access Information + // ================== + /** + * Get access user on thread. + *
+     * If it can't get access user from access-context, 
+     * returns 'Anonymous' as default value!
+     * 
+ * @return Access user. (NotNull) + */ + public static String getAccessUserOnThread() { + if (isExistAccessContextOnThread()) { + final ${glAccessContextName} userContextOnThread = getAccessContextOnThread(); + final String accessUser = userContextOnThread.getAccessUser(); + if (accessUser != null) { + return accessUser; + } + } + return "Anonymous";// as Default + } + + /** + * Get access module on thread. + *
+     * If it can't get access module from access-context, 
+     * returns 'Anonymous' as default value!
+     * 
+ * @return Access module. (NotNull) + */ + public static String getAccessModuleOnThread() { + if (isExistAccessContextOnThread()) { + final ${glAccessContextName} userContextOnThread = getAccessContextOnThread(); + final String accessModule = userContextOnThread.getAccessModule(); + if (accessModule != null) { + return accessModule; + } + } + return "Anonymous";// as Default + } + + /** + * Get access timestamp on thread. + *
+     * If it can't get access timestamp from access-context, 
+     * returns application current time as default value!
+     * 
+ * @return Access timestamp. (NotNull) + */ + public static java.sql.Timestamp getAccessTimestampOnThread() { + if (isExistAccessContextOnThread()) { + final ${glAccessContextName} userContextOnThread = getAccessContextOnThread(); + final java.sql.Timestamp accessTimestamp = userContextOnThread.getAccessTimestamp(); + if (accessTimestamp != null) { + return accessTimestamp; + } + } + return new java.sql.Timestamp(System.currentTimeMillis());// as Default + } + + // =================================================================================== + // Attribute + // ========= + protected String accessUser; + + protected String accessModule; + + protected java.sql.Timestamp accessTimestamp; + + // =================================================================================== + // Accessor + // ======== + public String getAccessUser() { + return accessUser; + } + + public void setAccessUser(String accessUser) { + this.accessUser = accessUser; + } + + public String getAccessModule() { + return accessModule; + } + + public void setAccessModule(String accessModule) { + this.accessModule = accessModule; + } + + public java.sql.Timestamp getAccessTimestamp() { + return accessTimestamp; + } + + public void setAccessTimestamp(java.sql.Timestamp accessTimestamp) { + this.accessTimestamp = accessTimestamp; + } +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/CacheDaoSelector.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/CacheDaoSelector.vm 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/CacheDaoSelector.vm 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,295 @@ +package ${glPackageBaseCommon}; +#if ($database.isAvailableBehaviorGeneration()) + +import ${glPackageBaseCommonBhv}.${glBehaviorReadableInterfaceName}; +import ${glPackageBaseCommonBhv}.${glBehaviorWritableInterfaceName}; +#end + +import ${glPackageBaseCommonDBMeta}.${glDBMetaInstanceHandlerName}; +import ${glPackageBaseCommonDBMeta}.${glDBMetaInterfaceName}; + +import org.seasar.framework.container.S2Container; + +/** + * The implementation of dao-selector. + *
+ * Long long ago this object have cache of dao and bhv.
+ * But the cache cause wrong performance when this is initialized.
+ * So now this object don't have cache.
+ * 
+ * @author ${database.ClassAuthor} + */ +public class ${glCacheDaoSelectorName} implements ${glDaoSelectorInterfaceName} { + + protected S2Container _container; + + public void setContainer(S2Container container) { + this._container = container; + } + +#if ($database.isAvailableGenerics()) + /** + * Get dao. + * + * @param daoType Dao type. (NotNull) + * @return Dao. (NotNull) + */ + public DAO_TYPE getDao(Class daoType) { + return (DAO_TYPE)_container.getComponent(daoType); + } + + /** + * Get dao-readable. + * + * @param tableMultiName Table multi-name. (NotNull) + * @return Dao-readable. (NotNull) + */ + public ${glDaoReadableInterfaceName} byNameAsDaoReadable(String tableMultiName) { + assertStringNotNullAndNotTrimmedEmpty("tableMultiName", tableMultiName); + final ${glDBMetaInterfaceName} dbmeta = ${glDBMetaInstanceHandlerName}.getInstanceByTableMultiName(tableMultiName); + return getDao(getDaoType(dbmeta)); + } + +#if ($database.isAvailableBehaviorGeneration()) + /** + * Get behavior. + * + * @param behaviorType Behavior type. (NotNull) + * @return Behavior. (NotNull) + */ + public BEHAVIOR_TYPE getBehavior(Class behaviorType) { + return (BEHAVIOR_TYPE)_container.getComponent(behaviorType); + } + + /** + * Get behavior-readable. + * + * @param tableMultiName Table multi-name. (NotNull) + * @return Behavior-readable. (NotNull) + */ + public ${glBehaviorReadableInterfaceName} byNameAsBehaviorReadable(String tableMultiName) { + assertStringNotNullAndNotTrimmedEmpty("tableMultiName", tableMultiName); + final ${glDBMetaInterfaceName} dbmeta = ${glDBMetaInstanceHandlerName}.getInstanceByTableMultiName(tableMultiName); + return getBehavior(getBehaviorType(dbmeta)); + } +#end +#end + + /** + * Get dao-readable by dao type. + * + * @param daoType Dao type. (NotNull) + * @return Dao-readable. (NotNull) + */ + public ${glDaoReadableInterfaceName} getRDao(Class daoType) { + assertObjectNotNull("daoType", daoType); + return (${glDaoReadableInterfaceName})_container.getComponent(daoType); + } + + /** + * Get dao-readable by entity. + * + * @param entity Entity. (NotNull) + * @return Dao-readable. (NotNull) + */ + public ${glDaoReadableInterfaceName} getRDao(${glEntityInterfaceName} entity) { + assertObjectNotNull("entity", entity); + return getRDao(getDaoType(entity.getDBMeta())); + } + + /** + * Get dao-readable by table multi-name. + * + * @param tableMultiName Table multi-name. (NotNull) + * @return Dao-readable. (NotNull) + */ + public ${glDaoReadableInterfaceName} getRDao(String tableMultiName) { + assertStringNotNullAndNotTrimmedEmpty("tableMultiName", tableMultiName); + final ${glDBMetaInterfaceName} dbmeta = ${glDBMetaInstanceHandlerName}.getInstanceByTableMultiName(tableMultiName); + return getRDao(getDaoType(dbmeta)); + } + + /** + * Get dao-writable by dao type. + * + * @param daoType Dao type. (NotNull) + * @return Dao-writable. (NotNull) + */ + public ${glDaoWritableInterfaceName} getWDao(Class daoType) { + assertObjectNotNull("daoType", daoType); + return (${glDaoWritableInterfaceName})getRDao(daoType); + } + + /** + * Get dao-writable by entity. + * + * @param entity Entity. (NotNull) + * @return Dao-writable. (NotNull) + */ + public ${glDaoWritableInterfaceName} getWDao(${glEntityInterfaceName} entity) { + assertObjectNotNull("entity", entity); + return (${glDaoWritableInterfaceName})getRDao(entity); + } + + /** + * Get dao-writable by table multi-name. + * + * @param tableMultiName Table multi-name. (NotNull) + * @return Dao-writable. (NotNull) + */ + public ${glDaoWritableInterfaceName} getWDao(String tableMultiName) { + assertStringNotNullAndNotTrimmedEmpty("tableMultiName", tableMultiName); + return (${glDaoWritableInterfaceName})getRDao(tableMultiName); + } +#if ($database.isAvailableBehaviorGeneration()) + + /** + * Get bhv-readable by bhv type. + * + * @param bhvType Bhv type. (NotNull) + * @return Bhv-readable. (NotNull) + */ + public ${glBehaviorReadableInterfaceName} getRBhv(Class bhvType) { + assertObjectNotNull("bhvType", bhvType); + return (${glBehaviorReadableInterfaceName})_container.getComponent(bhvType); + } + + /** + * Get bhv-readable by entity. + * + * @param entity Entity. (NotNull) + * @return Bhv-readable. (NotNull) + */ + public ${glBehaviorReadableInterfaceName} getRBhv(${glEntityInterfaceName} entity) { + assertObjectNotNull("entity", entity); + return getRBhv(getBehaviorType(entity.getDBMeta())); + } + + /** + * Get bhv-readable by table multi-name. + * + * @param tableMultiName Table multi-name. (NotNull) + * @return Bhv-readable. (NotNull) + */ + public ${glBehaviorReadableInterfaceName} getRBhv(String tableMultiName) { + assertStringNotNullAndNotTrimmedEmpty("tableMultiName", tableMultiName); + final ${glDBMetaInterfaceName} dbmeta = ${glDBMetaInstanceHandlerName}.getInstanceByTableMultiName(tableMultiName); + return getRBhv(getBehaviorType(dbmeta)); + } + + /** + * Get bhv-writable by bhv type. + * + * @param bhvType Bhv type. (NotNull) + * @return Bhv-writable. (NotNull) + */ + public ${glBehaviorWritableInterfaceName} getWBhv(Class bhvType) { + assertObjectNotNull("bhvType", bhvType); + return (${glBehaviorWritableInterfaceName})getRBhv(bhvType); + } + + /** + * Get bhv-writable by entity. + * + * @param entity Entity. (NotNull) + * @return Bhv-writable. (NotNull) + */ + public ${glBehaviorWritableInterfaceName} getWBhv(${glEntityInterfaceName} entity) { + assertObjectNotNull("entity", entity); + return (${glBehaviorWritableInterfaceName})getRBhv(entity); + } + + /** + * Get bhv-writable by table multi-name. + * + * @param tableMultiName Table multi-name. (NotNull) + * @return Bhv-writable. (NotNull) + */ + public ${glBehaviorWritableInterfaceName} getWBhv(String tableMultiName) { + assertStringNotNullAndNotTrimmedEmpty("tableMultiName", tableMultiName); + return (${glBehaviorWritableInterfaceName})getRBhv(tableMultiName); + } + + /** + * Get behavior-type by dbmeta. + * + * @param dbmeta Dbmeta. (NotNull) + * @return Behavior-type. (NotNull) + */ + protected Class getBehaviorType(${glDBMetaInterfaceName} dbmeta) { + final String behaviorTypeName = dbmeta.getBehaviorTypeName(); + if (behaviorTypeName == null) { + String msg = "The dbmeta.getBehaviorTypeName() should not return null: dbmeta=" + dbmeta; + throw new IllegalStateException(msg); + } + final Class behaviorType; + try { + behaviorType = Class.forName(behaviorTypeName); + } catch (ClassNotFoundException e) { + throw new RuntimeException("The class does not exist: " + behaviorTypeName, e); + } + return behaviorType; + } +#end + + protected Class getDaoType(${glDBMetaInterfaceName} dbmeta) { + final String daoTypeName = dbmeta.getDaoTypeName(); + if (daoTypeName == null) { + String msg = "The dbmeta.getDaoTypeName() should not return null: dbmeta=" + dbmeta; + throw new IllegalStateException(msg); + } + final Class daoType; + try { + daoType = Class.forName(daoTypeName); + } catch (ClassNotFoundException e) { + throw new RuntimeException("The class does not exist: " + daoTypeName, e); + } + return daoType; + } + + // ===================================================================================== + // Destroy + // ======= + public void destroy() { + _container = null; + } + + // ---------------------------------------------------------------- + // Assert Object + // ------------- + /** + * Assert that the object is not null. + * + * @param variableName Variable name. (NotNull) + * @param value Value. (NotNull) + * @exception IllegalArgumentException + */ + protected void assertObjectNotNull(String variableName, Object value) { + if (variableName == null) { + String msg = "The value should not be null: variableName=" + variableName + " value=" + value; + throw new IllegalArgumentException(msg); + } + if (value == null) { + String msg = "The value should not be null: variableName=" + variableName; + throw new IllegalArgumentException(msg); + } + } + + // ---------------------------------------------------------------- + // Assert String + // ------------- + /** + * Assert that the entity is not null and not trimmed empty. + * + * @param variableName Variable name. (NotNull) + * @param value Value. (NotNull) + */ + protected void assertStringNotNullAndNotTrimmedEmpty(String variableName, String value) { + assertObjectNotNull("variableName", variableName); + assertObjectNotNull("value", value); + if (value.trim().length() ==0) { + String msg = "The value should not be empty: variableName=" + variableName + " value=" + value; + throw new IllegalArgumentException(msg); + } + } +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/ClassificationDefinition.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/ClassificationDefinition.vm 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/ClassificationDefinition.vm 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,115 @@ +package ${glPackageBaseCommon}; + +#set ($myClassName = "${glClassificationDefinition}") + +/** + * The definition class that has classification. + * + * @author ${database.ClassAuthor} + */ +public class ${myClassName} { + + // ===================================================================================== + // Classification-Code-Definition + // ============================== +#foreach ($classificationName in $database.ClassificationNameList) + #set ($classificationMapList = $database.ClassificationDefinitionMap.get($classificationName)) + #foreach ($classificationMap in $classificationMapList) + + /** + * The classification code of ${classificationMap.get('name')}.
+ * ${classificationMap.get('comment')}
+ */ + public static final String CODE_${classificationName}_${classificationMap.get('name')} = "$classificationMap.get('code')"; + #end +#end + + // ===================================================================================== + // Classification-CodeNameMap-Definition + // ===================================== +#foreach ($classificationName in $database.ClassificationNameListValidNameOnly) + #set ($classificationMapList = $database.ClassificationDefinitionMap.get($classificationName)) + + /** The classification code-name map of ${classificationName}. */ + public static final java.util.Map${database.filterGenericsString('String, String')} CODE_NAME_MAP_${classificationName}; + static { + final java.util.Map${database.filterGenericsString('String, String')} map = new java.util.LinkedHashMap${database.filterGenericsString('String, String')}(); + #foreach ($classificationMap in $classificationMapList) + map.put(CODE_${classificationName}_${classificationMap.get('name')}, "${classificationMap.get('name')}"); + #end + + CODE_NAME_MAP_${classificationName} = java.util.Collections.unmodifiableMap(map); + } +#end + +#foreach ($classificationName in $database.ClassificationNameListValidAliasOnly) + #set ($classificationMapList = $database.ClassificationDefinitionMap.get($classificationName)) + + /** The classification code-alias map of ${classificationName}. */ + public static final java.util.Map${database.filterGenericsString('String, String')} CODE_ALIAS_MAP_${classificationName}; + static { + final java.util.Map${database.filterGenericsString('String, String')} map = new java.util.LinkedHashMap${database.filterGenericsString('String, String')}(); + #foreach ($classificationMap in $classificationMapList) + map.put(CODE_${classificationName}_${classificationMap.get('name')}, "${classificationMap.get('alias')}"); + #end + + CODE_ALIAS_MAP_${classificationName} = java.util.Collections.unmodifiableMap(map); + } +#end + + + // ===================================================================================== + // Classification-ValueLabelList-Definition + // ======================================== +#foreach ($classificationName in $database.ClassificationNameListValidNameOnly) + #set ($classificationMapList = $database.ClassificationDefinitionMap.get($classificationName)) + + /** The classification code-name map of ${classificationName}. */ + public static final java.util.List${database.filterGenericsString('java.util.Map')} VALUE_LABEL_NAME_LIST_${classificationName}; + static { + final java.util.List${database.filterGenericsString('java.util.Map')} list = new java.util.ArrayList${database.filterGenericsString('java.util.Map')}(); + #foreach ($classificationMap in $classificationMapList) + setupValueLabelElement(list, CODE_${classificationName}_${classificationMap.get('name')}, "${classificationMap.get('name')}"); + #end + + VALUE_LABEL_NAME_LIST_${classificationName} = java.util.Collections.unmodifiableList(list); + } + public static java.util.List${database.filterGenericsString('java.util.Map')} createValueLabelNameList${classificationName}() { + return setupValueLabelList(VALUE_LABEL_NAME_LIST_${classificationName}); + } +#end +#foreach ($classificationName in $database.ClassificationNameListValidAliasOnly) + #set ($classificationMapList = $database.ClassificationDefinitionMap.get($classificationName)) + + /** The classification code-name map of ${classificationName}. */ + public static final java.util.List${database.filterGenericsString('java.util.Map')} VALUE_LABEL_ALIAS_LIST_${classificationName}; + static { + final java.util.List${database.filterGenericsString('java.util.Map')} list = new java.util.ArrayList${database.filterGenericsString('java.util.Map')}(); + #foreach ($classificationMap in $classificationMapList) + setupValueLabelElement(list, CODE_${classificationName}_${classificationMap.get('name')}, "${classificationMap.get('alias')}"); + #end + + VALUE_LABEL_ALIAS_LIST_${classificationName} = java.util.Collections.unmodifiableList(list); + } + public static java.util.List${database.filterGenericsString('java.util.Map')} createValueLabelAliasList${classificationName}() { + return setupValueLabelList(VALUE_LABEL_ALIAS_LIST_${classificationName}); + } +#end + + protected static java.util.List${database.filterGenericsString('java.util.Map')} setupValueLabelList(java.util.List${database.filterGenericsString('java.util.Map')} ls) { + final java.util.List${database.filterGenericsString('java.util.Map')} newList = new java.util.ArrayList${database.filterGenericsString('java.util.Map')}(); + for (final java.util.Iterator ite = ls.iterator(); ite.hasNext(); ) { + final java.util.Map${database.filterGenericsString('String, String')} map = (java.util.Map${database.filterGenericsString('String, String')})ite.next(); + final java.util.Map${database.filterGenericsString('String, String')} newMap = new java.util.LinkedHashMap${database.filterGenericsString('String, String')}(map); + newList.add(newMap); + } + return newList; + } + + protected static void setupValueLabelElement(java.util.List${database.filterGenericsString('java.util.Map')} ls, String value, String label) { + final java.util.Map${database.filterGenericsString('String, String')} map = new java.util.LinkedHashMap${database.filterGenericsString('String, String')}(); + map.put("value", value); + map.put("label", label); + ls.add(java.util.Collections.unmodifiableMap(map)); + } +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/DaoDicon.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/DaoDicon.vm 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/DaoDicon.vm 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,129 @@ + + + + +#foreach ($includePath in $database.DBFluteDiconBeforeJ2eeIncludePathList) + + +#end + + +#foreach ($includePath in $database.DBFluteDiconOtherIncludePathList) + + +#end + + + + + + + +#if ($database.isVersionAfter1040()) + + + + +#end + + + + + + + + + + + + + + #foreach ($componentName in $database.getOriginalDaoComponentComponentNameList()) + #set ($className = ${database.getOriginalDaoComponentClassName($componentName)}) + #if ($database.isDaoComponent($componentName)) + + + ${glDaoDiconNamespace}.interceptor + + #else + + + #end + #end + + + + #foreach ($componentName in $database.getOriginalBehaviorAspectComponentNameList()) + #set ($className = ${database.getOriginalBehaviorAspectClassName($componentName)}) + + + #end + +#foreach ($table in $database.Tables) + + + #if (${database.isAvailableCommonColumnSetupInterceptorToDao()}) + + + ${glDaoDiconNamespace}.commonColumnSetupBeforeInsertInterceptor + ${glDaoDiconNamespace}.commonColumnSetupBeforeUpdateInterceptor + ${glDaoDiconNamespace}.commonColumnSetupBeforeDeleteInterceptor + ${glDaoDiconNamespace}.interceptor + + #else + + + ${glDaoDiconNamespace}.interceptor + + #end + #if (${database.isAvailableBehaviorGeneration()}) + #if (${database.isAvailableCommonColumnSetupInterceptorToBehavior()}) + + +#if (${database.isAvailableBehaviorRequiresNewTx()}) + ${database.RequiresNewTxComponentName} +#end +#if (${database.isAvailableBehaviorRequiredTx()}) + ${database.RequiredTxComponentName} +#end + ${glDaoDiconNamespace}.commonColumnSetupBeforeInsertInterceptor + ${glDaoDiconNamespace}.commonColumnSetupBeforeUpdateInterceptor + ${glDaoDiconNamespace}.commonColumnSetupBeforeDeleteInterceptor + #foreach ($componentName in $database.getOriginalBehaviorAspectComponentNameList()) + #set ($pointcut = ${database.getOriginalBehaviorAspectPointcut($componentName)}) + + ${glDaoDiconNamespace}.${componentName} + #end + + + #else + + +#if (${database.isAvailableBehaviorRequiresNewTx()}) + ${database.RequiresNewTxComponentName} +#end +#if (${database.isAvailableBehaviorRequiredTx()}) + ${database.RequiredTxComponentName} +#end + #foreach ($componentName in $database.getOriginalBehaviorAspectComponentNameList()) + #set ($pointcut = ${database.getOriginalBehaviorAspectPointcut($componentName)}) + + ${glDaoDiconNamespace}.${componentName} + #end + + + #end + #end +#end + +#foreach ($table in $database.CustomizeTableList) + + + + + ${glDaoDiconNamespace}.interceptor + +#end + + Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/DaoReadable.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/DaoReadable.vm 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/DaoReadable.vm 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,12 @@ +package ${glPackageBaseCommon}; + +/** + * The interface of dao-readable. + * + * @author ${database.ClassAuthor} + */ +public interface ${glDaoReadableInterfaceName} { + // [Developer's comment] (2006/06/08) + // It cannot be done for the convenience of s2dao though I want to define methods for condition-bean here. + // DTO argument as Interface is not accepted. +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/DaoSelector.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/DaoSelector.vm 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/DaoSelector.vm 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,160 @@ +package ${glPackageBaseCommon}; +#if ($database.isAvailableBehaviorGeneration()) + +import ${glPackageBaseCommonBhv}.${glBehaviorReadableInterfaceName}; +import ${glPackageBaseCommonBhv}.${glBehaviorWritableInterfaceName}; +#end + +/** + * The interface of dao-selector. + * + * @author ${database.ClassAuthor} + */ +public interface ${glDaoSelectorInterfaceName} { +#if ($database.isAvailableGenerics()) + + /** + * Get dao. + * + * @param daoType Dao type. (NotNull) + * @return Dao. (NotNull) + */ + public DAO_TYPE getDao(Class daoType); + + /** + * Get dao-readable. + * + * @param tableMultiName Table multi-name. (NotNull) + * @return Dao-readable. (NotNull) + */ + public ${glDaoReadableInterfaceName} byNameAsDaoReadable(String tableMultiName); + +#if ($database.isAvailableBehaviorGeneration()) + /** + * Get behavior. + * + * @param behaviorType Behavior type. (NotNull) + * @return Behavior. (NotNull) + */ + public BEHAVIOR_TYPE getBehavior(Class behaviorType); + + /** + * Get behavior-readable. + * + * @param tableMultiName Table multi-name. (NotNull) + * @return Behavior-readable. (NotNull) + */ + public ${glBehaviorReadableInterfaceName} byNameAsBehaviorReadable(String tableMultiName); +#end +#end + + /** + * Get dao-readable by dao type. + * + * @param daoType Dao type. (NotNull) + * @return Dao-readable. (NotNull) + * @deprecated + */ + public ${glDaoReadableInterfaceName} getRDao(Class daoType); + + /** + * Get dao-readable by entity. + * + * @param entity Entity. (NotNull) + * @return Dao-readable. (NotNull) + * @deprecated + */ + public ${glDaoReadableInterfaceName} getRDao(${glEntityInterfaceName} entity); + + /** + * Get dao-readable by table multi-name. + * + * @param tableMultiName Table multi-name. (NotNull) + * @return Dao-readable. (NotNull) + * @deprecated + */ + public ${glDaoReadableInterfaceName} getRDao(String tableMultiName); + + /** + * Get dao-writable by dao type. + * + * @param daoType Dao type. (NotNull) + * @return Dao-writable. (NotNull) + * @deprecated + */ + public ${glDaoWritableInterfaceName} getWDao(Class daoType); + + /** + * Get dao-writable by entity. + * + * @param entity Entity. (NotNull) + * @return Dao-writable. (NotNull) + * @deprecated + */ + public ${glDaoWritableInterfaceName} getWDao(${glEntityInterfaceName} entity); + + /** + * Get dao-writable by table multi-name. + * + * @param tableMultiName Table multi-name. (NotNull) + * @return Dao-writable. (NotNull)] + * @deprecated + */ + public ${glDaoWritableInterfaceName} getWDao(String tableMultiName); +#if ($database.isAvailableBehaviorGeneration()) + + /** + * Get bhv-readable by bhv type. + * + * @param bhvType Bhv type. (NotNull) + * @return Bhv-readable. (NotNull) + * @deprecated + */ + public ${glBehaviorReadableInterfaceName} getRBhv(Class bhvType); + + /** + * Get bhv-readable by entity. + * + * @param entity Entity. (NotNull) + * @return Bhv-readable. (NotNull) + * @deprecated + */ + public ${glBehaviorReadableInterfaceName} getRBhv(${glEntityInterfaceName} entity); + + /** + * Get bhv-readable by table multi-name. + * + * @param tableMultiName Table multi-name. (NotNull) + * @return Bhv-readable. (NotNull) + * @deprecated + */ + public ${glBehaviorReadableInterfaceName} getRBhv(String tableMultiName); + + /** + * Get bhv-writable by bhv type. + * + * @param bhvType Bhv type. (NotNull) + * @return Bhv-writable. (NotNull) + * @deprecated + */ + public ${glBehaviorWritableInterfaceName} getWBhv(Class bhvType); + + /** + * Get bhv-writable by entity. + * + * @param entity Entity. (NotNull) + * @return Bhv-writable. (NotNull) + * @deprecated + */ + public ${glBehaviorWritableInterfaceName} getWBhv(${glEntityInterfaceName} entity); + + /** + * Get bhv-writable by table multi-name. + * + * @param tableMultiName Table multi-name. (NotNull) + * @return Bhv-writable. (NotNull) + * @deprecated + */ + public ${glBehaviorWritableInterfaceName} getWBhv(String tableMultiName); +#end +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/DaoWritable.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/DaoWritable.vm 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/DaoWritable.vm 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,67 @@ +package ${glPackageBaseCommon}; + +import ${glPackageBaseCommon}.${glEntityInterfaceName}; + +/** + * The interface of dao-writable. + * + * @author ${database.ClassAuthor} + */ +public interface ${glDaoWritableInterfaceName} extends ${glDaoReadableInterfaceName} { + + /** + * Insert one entity that the type is entity-interface. + * + * @param entity Entity that the type is entity-interface. (NotNull) + * @return Inserted count. + */ + public int create(${glEntityInterfaceName} entity); + + /** + * Update one entity that the type is entity-interface. + * + * @param entity Entity that the type is entity-interface. (NotNull) + * @return Updated count. + */ + public int modify(${glEntityInterfaceName} entity); + + /** + * Update one entity that the type is entity-interface. (modified only) + * + * @param entity Entity that the type is entity-interface. (NotNull) + * @return Updated count. + */ + public int modifyModifiedOnly(${glEntityInterfaceName} entity); + + /** + * Delete one entity that the type is entity-interface. + * + * @param entity Entity that the type is entity-interface. (NotNull) + * @return Deleted count. + */ + public int remove(${glEntityInterfaceName} entity); + + /** + * Insert several entities that the type is entity-interface. + * + * @param entityList Entity-list that the type is entity-interface. (NotNull) + * @return Inserted count. + */ + public int createList(java.util.List${database.filterGenericsString(${glEntityInterfaceName})} entityList); + + /** + * Update several entities that the type is entity-interface. + * + * @param entityList Entity-list that the type is entity-interface. (NotNull) + * @return Updated count. + */ + public int modifyList(java.util.List${database.filterGenericsString(${glEntityInterfaceName})} entityList); + + /** + * Delete several entities that the type is entity-interface. + * + * @param entityList Entity-list that the type is entity-interface. (NotNull) + * @return Deleted count. + */ + public int removeList(java.util.List${database.filterGenericsString(${glEntityInterfaceName})} entityList); +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/Entity.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/Entity.vm 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/Entity.vm 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,224 @@ +package ${glPackageBaseCommon}; + +import ${glPackageBaseCommonDBMeta}.${glDBMetaInterfaceName}; +import ${glPackageBaseCommonHelper}.${glMapListStringName}; +import ${glPackageBaseCommonHelper}.${glMapListStringImplName}; + +/** + * The interface of entity. + * + * @author ${database.ClassAuthor} + */ +public interface ${glEntityInterfaceName} { + + // =================================================================================== + // Definition + // ========== + /** Map-string map-mark. */ + public static final String MAP_STRING_MAP_MARK = "map:"; + + /** Map-string list-mark. */ + public static final String MAP_STRING_LIST_MARK = "list:"; + + /** Map-string start-brace. */ + public static final String MAP_STRING_START_BRACE = "${database.extractAcceptStartBrace}"; + + /** Map-string end-brace. */ + public static final String MAP_STRING_END_BRACE = "${database.extractAcceptEndBrace}"; + + /** Map-string delimiter. */ + public static final String MAP_STRING_DELIMITER = "${database.extractAcceptDelimiter}"; + + /** Map-string equal. */ + public static final String MAP_STRING_EQUAL = "${database.extractAcceptEqual}"; + + // =================================================================================== + // DBMeta + // ====== + /** + * Get dbmeta. + * + * @return DBMeta. (NotNull) + */ + public ${glDBMetaInterfaceName} getDBMeta(); + + // =================================================================================== + // Table Name + // ========== + /** + * Get table db-name. + * + * @return Table db-name. (NotNull) + */ + public String getTableDbName(); + + /** + * Get table cap-prop-name. + * + * @return Table cap-prop-name. (NotNull) + */ + public String getTableCapPropName(); + + /** + * Get table uncap-prop-name. + * + * @return Table uncap-prop-name. (NotNull) + */ + public String getTableUncapPropName(); + + // =================================================================================== + // Accept + // ====== + /** + * Accept primary-key map. + * + * @param primaryKeyMap Primary-key map. (NotNull and NotEmpty) + * @deprecated Please use ${glDBMetaInterfaceName}#acceptPrimaryKeyMap(entity, primaryKeyMap); + */ + public void acceptPrimaryKeyMap(java.util.Map${database.filterGenericsString('String, ? extends Object')} primaryKeyMap); + + /** + * Accept primary-key map-string. + * + * @param primaryKeyMapString Primary-key map-string. (NotNull) + * @deprecated Please use ${glDBMetaInterfaceName}#acceptPrimaryKeyMapString(entity, primaryKeyMap); + */ + public void acceptPrimaryKeyMapString(String primaryKeyMapString); + + /** + * Accept column-value map. + * + * @param columnValueMap Column-value map. (NotNull and NotEmpty) + * @deprecated Please use ${glDBMetaInterfaceName}#acceptColumnValueMap(entity, columnValueMap); + */ + public void acceptColumnValueMap(java.util.Map${database.filterGenericsString('String, ? extends Object')} columnValueMap); + + /** + * Accept column-value map-string. + * + * @param columnValueMapString Column-value map-string. (NotNull) + * @deprecated Please use ${glDBMetaInterfaceName}#acceptColumnValueMapString(entity, columnValueMapString); + */ + public void acceptColumnValueMapString(String columnValueMapString); + + // =================================================================================== + // Extract + // ======= + /** + * Extract primary-key map-string. Delimiter is at-mark and semicolon. + *

+ *

+     * ex) Uses that this method have.
+     *   final String primaryKeyMapString = entity.extractPrimaryKeyMapString();
+     *   final LdBook entity = dao.selectEntity(new LdBookCB().acceptPrimaryKeyMapString(primaryKeyMapString));
+     *   ... // as primary key for condition.
+     * 
+ * + * @return Primary-key map-string. (NotNull) + * @deprecated Please use ${glDBMetaInterfaceName}#extractPrimaryKeyMapString(entity); + */ + public String extractPrimaryKeyMapString(); + + /** + * Extract primary-key map-string. + * + * @param startBrace Start-brace. (NotNull) + * @param endBrace End-brace. (NotNull) + * @param delimiter Delimiter. (NotNull) + * @param equal Equal. (NotNull) + * @return Primary-key map-string. (NotNull) + * @deprecated Please use ${glDBMetaInterfaceName}#extractPrimaryKeyMapString(entity, startBrace, endBrace, delimiter, equal); + */ + public String extractPrimaryKeyMapString(String startBrace, String endBrace, String delimiter, String equal); + + /** + * Extract column-value map-string. Delimiter is at-mark and semicolon. + * + * @return Column-value map-string. (NotNull) + * @deprecated Please use ${glDBMetaInterfaceName}#extractColumnValueMapString(entity); + */ + public String extractColumnValueMapString(); + + /** + * Extract column-value map-string. + * + * @param startBrace Start-brace. (NotNull) + * @param endBrace End-brace. (NotNull) + * @param delimiter Delimiter. (NotNull) + * @param equal Equal. (NotNull) + * @return Column-value map-string. (NotNull) + * @deprecated Please use ${glDBMetaInterfaceName}#extractColumnValueMapString(entity, startBrace, endBrace, delimiter, equal); + */ + public String extractColumnValueMapString(String startBrace, String endBrace, String delimiter, String equal); + + // =================================================================================== + // Determination + // ============= + /** + * Has primary-key value? + * + * @return Determination. + */ + public boolean hasPrimaryKeyValue(); + + // =================================================================================== + // Modified Properties + // =================== + /** + * Get modified property names. (JavaBeansRule) + * + * @return Modified property names. (NotNull) + */ + public java.util.Set${database.filterGenericsString('String')} getModifiedPropertyNames(); + + /** + * Clear modified property names. + */ + public void clearModifiedPropertyNames(); + + /** + * Entity modified properties. + */ + public static class EntityModifiedProperties implements java.io.Serializable { + + /** Serial version UID. (Default) */ + private static final long serialVersionUID = 1L; + + /** Set of properties. */ + protected java.util.Set${database.filterGenericsString('String')} _propertiesSet = new java.util.LinkedHashSet${database.filterGenericsString('String')}(); + + /** + * Add property name. (JavaBeansRule) + * + * @param propertyName Property name. (Nullable) + */ + public void addPropertyName(String propertyName) { + _propertiesSet.add(propertyName); + } + + /** + * Get the set of properties. + * + * @return The set of properties. (NotNull) + */ + public java.util.Set${database.filterGenericsString('String')} getPropertyNames() { + return _propertiesSet; + } + + /** + * Clear the set of properties. + */ + public void clear() { + _propertiesSet.clear(); + } + + /** + * Remove property name from the set. (JavaBeansRule) + * + * @param propertyName Property name. (Nullable) + */ + public void remove(String propertyName) { + _propertiesSet.remove(propertyName); + } + } +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/EntityDefinedCommonColumn.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/EntityDefinedCommonColumn.vm 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/EntityDefinedCommonColumn.vm 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,78 @@ +package ${glPackageBaseCommon}; + +/** + * The interface of entity defined common column. + * + * @author ${database.ClassAuthor} + */ +public interface ${glEntityDefinedCommonColumnInterfaceName} extends ${glEntityInterfaceName} { +#foreach ($columnName in ${database.commonColumnNameList}) + #set ($filteredColumnName = ${database.filterCommonColumn(${columnName})}) + #set ($commonColumnMap = ${database.CommonColumnMap}) + #set ($columnType = ${commonColumnMap.get(${columnName})}) + #set ($javaNative = ${database.convertJavaNativeByJdbcType(${columnType})}) + #set ($javaName = ${database.convertJavaNameByJdbcNameAsColumn(${filteredColumnName})}) + #set ($uncapitalisedJavaName = ${database.convertUncapitalisedJavaNameByJdbcNameAsColumn(${filteredColumnName})}) + + /** + * Get the value of ${uncapitalisedJavaName}. + * + * @return The value of ${uncapitalisedJavaName}. + */ + public ${javaNative} get${javaName}(); + + /** + * Set the value of ${uncapitalisedJavaName}. + * + * @param ${uncapitalisedJavaName} The value of ${uncapitalisedJavaName}. + */ + public void set${javaName}(${javaNative} ${uncapitalisedJavaName}); +#if ($database.isGenerateDeprecated()) + + /** + * Has the setter of ${uncapitalisedJavaName} been invoked? + * + * @return Determination. + * @deprecated This method is out of date because S2Dao supported modified-properties. + */ + public boolean isSetterInvoked${javaName}(); +#end + #if (${database.isAllClassificationColumn($filteredColumnName)}) + #set ($classificationName = $database.getAllClassificationName($filteredColumnName)) + #set ($classificationList = $database.getClassificationMapList($classificationName)) + #foreach ($classificationMap in $classificationList) + + /** + * Classify the value of ${uncapitalisedJavaName} as ${classificationMap.get('name')}. + */ + public void classify${javaName}${classificationMap.get('name')}(); + + /** + * Is the value of ${uncapitalisedJavaName} '${classificationMap.get('name')}'? + * The difference of capital letters and small letters is NOT distinguished. + * If the value is null, this method returns false! + * + * @return Determanation. + */ + public boolean is${javaName}${classificationMap.get('name')}(); + + /** + * Is the value of ${uncapitalisedJavaName} '${classificationMap.get('name')}'? + * The difference of capital letters and small letters is NOT distinguished. + * If the value is null, this method throws exception! + * + * @return Determanation. + */ + public boolean is${javaName}${classificationMap.get('name')}IfNullException(); + #end + #end +#end + + /** + * Extract common-column-value map-string. + * + * @return Common-column-value map-string. (NotNull) + * @deprecated Please use ${glDBMetaInterfaceName}#extractCommonColumnValueMapString(entity); + */ + public String extractCommonColumnValueMapString(); +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/GenMetaData.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/GenMetaData.vm 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/GenMetaData.vm 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,410 @@ +package ${glPackageBaseCommon}; + +#set ($myClassName = "${glGenMetaDataClassName}") + +/** + * The sigleton class that has generate-meta-data(GenMetaData). + * + * @author ${database.ClassAuthor} + */ +public class ${myClassName} { + + /** Singleton instance. */ + private static final ${myClassName} _instance = new ${myClassName}(); + + /** + * Constructor. + */ + private ${myClassName}() { + } + + /** + * Get instance. + * + * @return Singleton instance. + */ + public static ${myClassName} getInstance() { + return _instance; + } + + // ========================================================================================= + // Generated method name + // ===================== + /** + * Get the method name of 'getCountAll'. + * + * @return The method name of 'getCountAll'. (NotNull) + */ + public String getMethodNameOfGetCountAll() { + return "getCountAll"; + } + + /** + * Get the method name of 'getListAll'. + * + * @return The method name of 'getListAll'. (NotNull) + */ + public String getMethodNameOfGetListAll() { + return "getListAll"; + } + + /** + * Get the method name of 'getEntity'. + * + * @return The method name of 'getEntity'. (NotNull) + */ + public String getMethodNameOfGetEntity() { + return "getEntity"; + } + + /** + * Get the method name of 'selectCountIgnoreFetchNarrowing'. + * + * @return The method name of 'selectCountIgnoreFetchNarrowing'. (NotNull) + */ + public String getMethodNameOfSelectCountIgnoreFetchScope() { + return "selectCountIgnoreFetchScope"; + } + + /** + * Get the method name of 'selectEntity'. + * + * @return The method name of 'selectEntity'. (NotNull) + */ + public String getMethodNameOfSelectEntity() { + return "selectEntity"; + } + + /** + * Get the method name of 'selectList'. + * + * @return The method name of 'selectList'. (NotNull) + */ + public String getMethodNameOfSelectList() { + return "selectList"; + } + + // ========================================================================================= + // Only when having generated, the effective one + // ============================================= + // ------------------------------------------------------------------------------- + // Basic + // ----- + /** + * Get the property-value of targetLanguage. + * + * @return The property-value. + */ + public String getTargetLanguage() { + return "${database.TargetLanguage}"; + } + + /** + * Get the property-value of templateFileExtension. + * + * @return The property-value. + */ + public String getTemplateFileExtension() { + return "${database.TemplateFileExtension}"; + } + + /** + * Get the property-value of classFileExtension. + * + * @return The property-value. + */ + public String getClassFileExtension() { + return "${database.ClassFileExtension}"; + } + + /** + * Get the property-value of templateFileEncoding. + * + * @return The property-value. + */ + public String getTemplateEncoding() { + return "${database.TemplateFileEncoding}"; + } + + /** + * Get the property-value of classAuthor. + * + * @return The property-value. + */ + public String getClassAuthor() { + return "${database.ClassAuthor}"; + } + + // ------------------------------------------------------------------------------- + // Available + // --------- + /** + * Is java name of table same as db name? Answer is ${database.isJavaNameOfTableSameAsDbName()}! + * + * @return The property-value. + */ + public boolean isJavaNameOfTableSameAsDbName() { + return ${database.isJavaNameOfTableSameAsDbName()}; + } + + /** + * Is java name of column same as db name? Answer is ${database.isJavaNameOfColumnSameAsDbName()}! + * + * @return The property-value. + */ + public boolean isJavaNameOfColumnSameAsDbName() { + return ${database.isJavaNameOfColumnSameAsDbName()}; + } + + /** + * Is available behavior generation? Answer is ${database.isAvailableBehaviorGeneration()}! + * + * @return The property-value. + */ + public boolean isAvailableBehaviorGeneration() { + return ${database.isAvailableBehaviorGeneration()}; + } + + /** + * Is available common-column-setup interceptor to behavior? Answer is ${database.isAvailableCommonColumnSetupInterceptorToBehavior()}! + * + * @return The property-value. + */ + public boolean isAvailableCommonColumnSetupInterceptorToBehavior() { + return ${database.isAvailableCommonColumnSetupInterceptorToBehavior()}; + } + + /** + * Is available common-column-setup interceptor to dao? Answer is ${database.isAvailableCommonColumnSetupInterceptorToDao()}! + * + * @return The property-value. + */ + public boolean isAvailableCommonColumnSetupInterceptorToDao() { + return ${database.isAvailableCommonColumnSetupInterceptorToDao()}; + } + + /** + * Is available generics? Answer is ${database.isAvailableGenerics()}! + * + * @return The property-value. + */ + public boolean isAvailableGenerics() { + return ${database.isAvailableGenerics()}; + } + + // ------------------------------------------------------------------------------- + // Prefix + // ------ + /** + * Get the property-value of projectPrefix. + * + * @return The property-value. + */ + public String getProjectPrefix() { + return "${database.ProjectPrefix}"; + } + + /** + * Get the property-value of basePrefix. + * + * @return The property-value. + */ + public String getBasePrefix() { + return "${database.BasePrefix}"; + } + + // ------------------------------------------------------------------------------- + // DaoDicon + // -------- + /** + * Get the property-value of daoDiconNamespace. + * + * @return The property-value. + */ + public String getDaoDiconNamespace() { + return "${database.DaoDiconNamespace}"; + } + + /** + * Get the property-value of daoDiconPackageName. + * + * @return The property-value. + */ + public String getDaoDiconPackageName() { + return "${database.DaoDiconPackageName}"; + } + + /** + * Get the property-value of daoDiconFileName. + * + * @return The property-value. + */ + public String getDaoDiconFileName() { + return "${database.DaoDiconFileName}"; + } + + /** + * Get the property-value of jdbcDiconResourceName. + * + * @return The property-value. + */ + public String getJdbcDiconResourceName() { + return "${database.JdbcDiconResourceName}"; + } + + /** + * Get the property-value of requiredTxComponentName. + * + * @return The property-value. + */ + public String getRequiredTxComponentName() { + return "${database.requiredTxComponentName}"; + } + + // ------------------------------------------------------------------------------- + // Package + // ------- + /** + * Get the property-value of baseCommonPackage. + * + * @return The property-value. + */ + public String getBaseCommonPackage() { + return "${database.BaseCommonPackage}"; + } + + /** + * Get the property-value of baseBehaviorPackage. + * + * @return The property-value. + */ + public String getBaseBehaviorPackage() { + return "${database.BaseBehaviorPackage}"; + } + + /** + * Get the property-value of baseDaoPackage. + * + * @return The property-value. + */ + public String getBaseDaoPackage() { + return "${database.BaseDaoPackage}"; + } + + /** + * Get the property-value of baseEntityPackage. + * + * @return The property-value. + */ + public String getBaseEntityPackage() { + return "${database.BaseEntityPackage}"; + } + + /** + * Get the property-value of conditionBeanPackage. + * + * @return The property-value. + */ + public String getConditionBeanPackage() { + return "${database.ConditionBeanPackage}"; + } + + /** + * Get the property-value of extendedDaoPackage. + * + * @return The property-value. + */ + public String getExtendedDaoPackage() { + return "${database.ExtendedDaoPackage}"; + } + + /** + * Get the property-value of extendedBehaviorPackage. + * + * @return The property-value. + */ + public String getExtendedBehaviorPackage() { + return "${database.ExtendedBehaviorPackage}"; + } + + /** + * Get the property-value of extendedEntityPackage. + * + * @return The property-value. + */ + public String getExtendedEntityPackage() { + return "${database.ExtendedEntityPackage}"; + } + + // ------------------------------------------------------------------------------- + // Optimistic Lock + // --------------- + /** + * Get the property-value of updateDateFieldName. + * + * @return The property-value. + */ + public String getUpdateDateFieldName() { + return "${database.UpdateDateFieldName}"; + } + + /** + * Get the property-value of versionNoFieldName. + * + * @return The property-value. + */ + public String getVersionNoFieldName() { + return "${database.VersionNoFieldName}"; + } + + // ------------------------------------------------------------------------------- + // Select Param + // ------------ + /** + * Get the property-value of selectQueryTimeout. + * + * @return The property-value. + */ + public int getSelectQueryTimeout() { + return ${database.SelectQueryTimeout}; + } + + // ------------------------------------------------------------------------------- + // Extract + // ------- + /** + * Get the value of 'extractAcceptStartBrace'. + * + * @return The property-value. (NotNull) + */ + public String getExtractAcceptStartBrace() { + return "${database.extractAcceptStartBrace}"; + } + + /** + * Get the value of 'extractAcceptEndBrace'. + * + * @return The property-value. (NotNull) + */ + public String getExtractAcceptEndBrace() { + return "${database.extractAcceptEndBrace}"; + } + + /** + * Get the value of 'extractAcceptDelimiter'. + * + * @return The property-value. (NotNull) + */ + public String getExtractAcceptDelimiter() { + return "${database.extractAcceptDelimiter}"; + } + + /** + * Get the value of 'extractAcceptEqual'. + * + * @return The property-value. (NotNull) + */ + public String getExtractAcceptEqual() { + return "${database.extractAcceptEqual}"; + } +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/annotation/OutsideSql.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/annotation/OutsideSql.vm 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/annotation/OutsideSql.vm 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,13 @@ +package ${glPackageBaseCommonAnnotation}; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Inherited; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + + △ Inherited + △ Retention(RetentionPolicy.RUNTIME) + △ Target(ElementType.METHOD) +public @interface ${glOutsideSqlAnnotation} { +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/bhv/AbstractBehaviorReadable.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/bhv/AbstractBehaviorReadable.vm 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/bhv/AbstractBehaviorReadable.vm 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,521 @@ +#set ($myClassName = "${glBehaviorReadableAbstractName}") + +package ${glPackageBaseCommonBhv}; + +import ${glPackageBaseCommon}.${glDaoSelectorInterfaceName}; +import ${glPackageBaseCommon}.${glEntityInterfaceName}; +#if ($database.isAvailableGenerics()) +import ${glPackageBaseCommonBhvSetup}.${glValueLabelSetupperName}; +import ${glPackageBaseCommonBhvSetup}.${glValueLabelBoxName}; +#end +import ${glPackageBaseCommonCBean}.${glConditionBeanInterfaceName}; +import ${glPackageBaseCommonCBean}.${glListResultBeanName}; +import ${glPackageBaseCommonCBean}.${glPagingBeanInterfaceName}; +import ${glPackageBaseCommonCBean}.${glPagingResultBeanName}; + +import ${glPackageBaseCommonBhvBatch}.${glTokenFileOutputOptionName}; +import ${glPackageBaseCommonBhvBatch}.${glTokenFileOutputResultName}; + +import ${glPackageBaseCommonHelperTokenFile}.${glFileMakingOptionName}; +import ${glPackageBaseCommonHelperTokenFile}.${glFileMakingHeaderInfoName}; +import ${glPackageBaseCommonHelperTokenFile}.${glFileMakingSimpleFacadeName}; +import ${glPackageBaseCommonHelperTokenFileImpl}.${glFileMakingSimpleFacadeImplName}; + +/** + * The abstract class of behavior-readable. + * + * @author ${database.ClassAuthor} + */ +public abstract class $myClassName implements ${glBehaviorReadableInterfaceName} { + + // =================================================================================== + // Attribute + // ========= + /** Dao-selector instance. */ + protected ${glDaoSelectorInterfaceName} _daoSelector; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + public ${myClassName}() { + } + + // =================================================================================== + // Dao Accessor + // ============ + /** + * ${database.ImplementComment} + * + * @return Dao-selector. + */ + public ${glDaoSelectorInterfaceName} getDaoSelector() { + return _daoSelector; + } + + /** + * ${database.ImplementComment} + * + * @param value Dao-selector. + */ + public void setDaoSelector(${glDaoSelectorInterfaceName} value) { + _daoSelector = value; + } + + // =================================================================================== + // Delegate Method + // =============== + /** + * ${database.ImplementComment} + * + * @return All count. + */ + public int callGetCountAll() { + final java.lang.reflect.Method mtd = getMethod(getDaoReadable().getClass(), "getCountAll", new Class[]{}); + final Object result = invoke(mtd, getDaoReadable(), new Object[]{}); + return ((Integer)result).intValue(); + } + + /** + * ${database.ImplementComment} + * + * @return All list. (NotNull) + */ + public java.util.List${database.filterGenericsString(${glEntityInterfaceName})} callGetListAll() { + final java.lang.reflect.Method mtd = getMethod(getDaoReadable().getClass(), "getListAll", new Class[]{}); + final Object result = invoke(mtd, getDaoReadable(), new Object[]{}); + return (java.util.List${database.filterGenericsString(${glEntityInterfaceName})})result; + } + + /** + * ${database.ImplementComment} + * + * @param cb Condition-bean that the type is condition-bean-interface. (NotNull) + * @return Read count. (NotNull) + */ + public int callReadCount(${glConditionBeanInterfaceName} cb) { + assertConditionBeanNotNull(cb); + final Class[] types = new Class[]{cb.getClass()}; + final java.lang.reflect.Method mtd = getMethod(getDaoReadable().getClass(), "selectCount", types); + final Object result = invoke(mtd, getDaoReadable(), new Object[]{cb}); + return ((Integer)result).intValue(); + } + + /** + * ${database.ImplementComment} + * + * @param cb Condition-bean that the type is condition-bean-interface. (NotNull) + * @return Read entity. If the select result is zero, it returns null. (Nullable) + */ + public ${glEntityInterfaceName} callReadEntity(${glConditionBeanInterfaceName} cb) { + assertConditionBeanNotNull(cb); + final Class[] types = new Class[]{cb.getClass()}; + final java.lang.reflect.Method mtd = getMethod(getDaoReadable().getClass(), "selectEntity", types); + final Object result = invoke(mtd, getDaoReadable(), new Object[]{cb}); + return (${glEntityInterfaceName})result; + } + + /** + * ${database.ImplementComment} + * + * @param cb Condition-bean that the type is condition-bean-interface. (NotNull) + * @return Read list. If the select result is zero, it returns empty list. (NotNull) + */ + public java.util.List${database.filterGenericsString(${glEntityInterfaceName})} callReadList(${glConditionBeanInterfaceName} cb) { + assertConditionBeanNotNull(cb); + final Class[] types = new Class[]{cb.getClass()}; + final java.lang.reflect.Method mtd = getMethod(getDaoReadable().getClass(), "selectList", types); + final Object result = invoke(mtd, getDaoReadable(), new Object[]{cb}); + return (java.util.List${database.filterGenericsString(${glEntityInterfaceName})})result; + } + + private java.lang.reflect.Method getMethod(Class clazz, String methodName, Class[] argTypes) { + try { + return clazz.getMethod(methodName, argTypes); + } catch (NoSuchMethodException ex) { + String msg = "class=" + clazz + " method=" + methodName + "-" + java.util.Arrays.asList(argTypes); + throw new RuntimeException(msg, ex); + } + } + + private Object invoke(java.lang.reflect.Method method, Object target, Object[] args) { + try { + return method.invoke(target, args); + } catch (java.lang.reflect.InvocationTargetException ex) { + Throwable t = ex.getCause(); + if (t instanceof RuntimeException) { + throw (RuntimeException) t; + } + if (t instanceof Error) { + throw (Error) t; + } + String msg = "target=" + target + " method=" + method + "-" + java.util.Arrays.asList(args); + throw new RuntimeException(msg, ex); + } catch (IllegalAccessException ex) { + String msg = "target=" + target + " method=" + method + "-" + java.util.Arrays.asList(args); + throw new RuntimeException(msg, ex); + } + } + + // ===================================================================================== + // Basic Get All + // ============= + /** + * Get count all. + * + * @return Count all. + */ + public int getCountAll() { + return callGetCountAll(); + } + + // ===================================================================================== + // Basic Read Count + // ================ + /** + * ${database.ImplementComment} + * + * @param cb Condition-bean. This condition-bean should not be set up about fetch-scope. (NotNull) + * @return Read count. (NotNull) + */ + public int readCount(${glConditionBeanInterfaceName} cb) { + assertConditionBeanNotNull(cb); + return callReadCount(cb); + } + + // ===================================================================================== + // Basic Read Entity + // ================= + /** + * ${database.ImplementComment} + * + * @param cb Condition-bean. (NotNull) + * @return Read entity. (Nullalble) + * @exception ${glPackageBaseCommonException}.${glRecordHasOverlappedException} + */ + public ${glEntityInterfaceName} readEntity(${glConditionBeanInterfaceName} cb) { + assertConditionBeanNotNull(cb); + final java.util.List${database.filterGenericsString(${glEntityInterfaceName})} ls = readList(cb); + if (ls.isEmpty()) { + return null; + } + assertRecordHasBeenSelectedAsOne(ls, cb); + return (${glEntityInterfaceName})ls.get(0); + } + + /** + * ${database.ImplementComment} + * + * @param cb Condition-bean. (NotNull) + * @return Read entity. (NotNull) + * @exception ${glPackageBaseCommonException}.${glRecordHasAlreadyBeenDeletedException} + * @exception ${glPackageBaseCommonException}.${glRecordHasOverlappedException} + */ + public ${glEntityInterfaceName} readEntityWithDeletedCheck(${glConditionBeanInterfaceName} cb) { + assertConditionBeanNotNull(cb); + final java.util.List${database.filterGenericsString(${glEntityInterfaceName})} ls = readList(cb); + assertRecordHasNotBeenDeleted(ls, cb); + assertRecordHasBeenSelectedAsOne(ls, cb); + return (${glEntityInterfaceName})ls.get(0); + } + + // ===================================================================================== + // Basic Read List + // =============== + /** + * ${database.ImplementComment} + * + * @param cb Condition-bean. + * @return List-result-bean. If the select result is zero, it returns empty list. (NotNull) + */ + public ${glListResultBeanName}${database.filterGenericsString(${glEntityInterfaceName})} readList(${glConditionBeanInterfaceName} cb) { + assertConditionBeanNotNull(cb); + return new ResultBeanBuilder${database.filterGenericsString(${glEntityInterfaceName})}(this).buildListResultBean(cb, callReadList(cb)); + } + + /** + * ${database.ImplementComment} + * + * @param cb Condition-bean. (NotNull) + * @return Read page. (NotNull) + */ + public ${glPagingResultBeanName}${database.filterGenericsString(${glEntityInterfaceName})} readPage(final ${glConditionBeanInterfaceName} cb) { + assertConditionBeanNotNull(cb); + return readPage(cb, new SelectPageSimpleInvoker${database.filterGenericsString(${glEntityInterfaceName})}(this)); + } + + /** + * ${database.ImplementComment} + * + * @param cb Condition-bean. (NotNull) + * @param invoker Select-page-invoker (NotNull) + * @return Read page. (NotNull) + */ + public ${glPagingResultBeanName}${database.filterGenericsString(${glEntityInterfaceName})} readPage(final ${glConditionBeanInterfaceName} cb, SelectPageInvoker${database.filterGenericsString(${glEntityInterfaceName})} invoker) { + assertConditionBeanNotNull(cb); + final SelectPageCallback${database.filterGenericsString(${glEntityInterfaceName})} pageCallback = new SelectPageCallback${database.filterGenericsString(${glEntityInterfaceName})}() { + public ${glPagingBeanInterfaceName} getPagingBean() { return cb; } + public int selectCountIgnoreFetchScope() { + return readCount(cb); + } + public java.util.List${database.filterGenericsString(${glEntityInterfaceName})} selectListWithFetchScope() { + return readList(cb); + } + }; + return invoker.invokeSelectPage(pageCallback); + } + + /** + * Assert that record has not been deleted. + * + * @param entity Selected entity. + * @param searchKey4log Search-key for Logging. + * @exception ${glPackageBaseCommonException}.${glRecordHasAlreadyBeenDeletedException} + */ + protected void assertRecordHasNotBeenDeleted(${glPackageBaseCommon}.${glEntityInterfaceName} entity, Object searchKey4log) { + if (entity == null) { + String msg = "The record has already been deleted by other thread: searchKey=" + searchKey4log; + throw new ${glPackageBaseCommonException}.${glRecordHasAlreadyBeenDeletedException}(msg); + } + } + + /** + * Assert that record has not been deleted. + * + * @param ls Selected list. + * @param searchKey4log Search-key for Logging. + * @exception ${glPackageBaseCommonException}.${glRecordHasAlreadyBeenDeletedException} + */ + protected void assertRecordHasNotBeenDeleted(java.util.List ls, Object searchKey4log) { + if (ls == null || ls.isEmpty()) { + String msg = "The record has already been deleted by other thread: searchKey=" + searchKey4log; + throw new ${glPackageBaseCommonException}.${glRecordHasAlreadyBeenDeletedException}(msg); + } + } + + /** + * Assert that record has been selected as one. + * + * @param ls Selected list. + * @param searchKey4log Search-key for Logging. + * @exception ${glPackageBaseCommonException}.${glRecordHasAlreadyBeenDeletedException} + * @exception ${glPackageBaseCommonException}.${glRecordHasOverlappedException} + */ + protected void assertRecordHasBeenSelectedAsOne(java.util.List ls, Object searchKey4log) { + if (ls == null || ls.isEmpty()) { + String msg = "The record has already been deleted by other thread: searchKey=" + searchKey4log; + throw new ${glPackageBaseCommonException}.${glRecordHasAlreadyBeenDeletedException}(msg); + } + if (ls.size() != 1) { + String msg = "This selected contents should be only one: searchKey=" + searchKey4log; + msg = msg + " resultCount=" + ls.size(); + throw new ${glPackageBaseCommonException}.${glRecordHasOverlappedException}(msg); + } + } + + /** + * Assert that selected count has not exceeded max count. + * + * @param selectedCount Selected count. + * @param maxCount Max count. + * @param clauseObject Clause object for exception message. + * @exception ${glPackageBaseCommonException}.${glSelectedCountExceedMaxCountExceptionName} + */ + protected void assertSelectedCountHasNotExceededMaxCount(int selectedCount, int maxCount, Object clauseObject) { + if (selectedCount > maxCount) { + String msg = "Selected count[" + selectedCount + "] has exceeded max count[" + maxCount + "]: clauseObject=" + clauseObject; + throw new ${glPackageBaseCommonException}.${glSelectedCountExceedMaxCountExceptionName}(msg, selectedCount, maxCount); + } + } + +#if ($database.isAvailableGenerics()) + // =================================================================================== + // Various Select + // ============== + /** + * Select value-label list. + * + * @param cb Condition-bean. (NotNull) + * @param valueLabelSetupper Value-label-setupper. (NotNull) + * @return Value-label list. (NotNull) + */ + protected java.util.List> createValueLabelList(${glListResultBeanName} ls, ${glValueLabelSetupperName} valueLabelSetupper) { + final java.util.List> valueLabelList = new java.util.ArrayList>(); + final ${glValueLabelBoxName} box = new ${glValueLabelBoxName}(); + for (E entity : ls) { + final java.util.Map valueLabel = new java.util.HashMap(); + valueLabelSetupper.setup(box, entity); + valueLabel.put("value", box.getValue()); + valueLabel.put("label", box.getLabel()); + valueLabelList.add(valueLabel); + } + return valueLabelList; + } +#end + + // =================================================================================== + // Token File + // ========== + /** + * Output token-file from this table records. + * + * @param cb Condition-bean. (NotNull) + * @param filename Name of the file. (NotNull and NotEmpty) + * @param tokenFileOutputOption token-file-output-option. (NotNull and Required{delimiter and encoding}) + * @return Token-file-output-result. (NotNull) + * @throws java.io.FileNotFoundException + * @throws java.io.IOException + */ + public ${glTokenFileOutputResultName} outputTokenFile(${glConditionBeanInterfaceName} cb, String filename, ${glTokenFileOutputOptionName} tokenFileOutputOption) throws java.io.FileNotFoundException, java.io.IOException { + assertConditionBeanNotNull(cb); + assertStringNotNullAndNotTrimmedEmpty("filename", filename); + assertObjectNotNull("tokenFileOutputOption", tokenFileOutputOption); + + final java.util.List${database.filterGenericsString(${glEntityInterfaceName})} ls = readList(cb); + java.util.List${database.filterGenericsString('java.util.List')} rowList = new java.util.ArrayList${database.filterGenericsString('java.util.List')}(); + for (java.util.Iterator ite = ls.iterator(); ite.hasNext(); ) { + final ${glEntityInterfaceName} entity = (${glEntityInterfaceName})ite.next(); + final java.util.List${database.filterGenericsString('String')} valueList = getDBMeta().convertToColumnStringValueList(entity); + rowList.add(valueList); + } + final ${glFileMakingSimpleFacadeName} fileMakingSimpleFacade = new ${glFileMakingSimpleFacadeImplName}(); + final ${glFileMakingOptionName} fileMakingOption = tokenFileOutputOption.getFileMakingOption(); + final ${glFileMakingHeaderInfoName} fileMakingHeaderInfo = new ${glFileMakingHeaderInfoName}(); + fileMakingHeaderInfo.setColumnNameList(getDBMeta().getColumnDbNameList()); + fileMakingOption.setFileMakingHeaderInfo(fileMakingHeaderInfo); + fileMakingSimpleFacade.makeFromRowList(filename, rowList, fileMakingOption); + final ${glTokenFileOutputResultName} tokeFileOutputResult = new ${glTokenFileOutputResultName}(); + tokeFileOutputResult.setSelectedList(ls); + return tokeFileOutputResult; + } + + // =================================================================================== + // Helper + // ====== + /** + * To lower case if the type is String. + * + * @param obj Object. (Nullable) + * @return Lower object. (Nullable) + */ + protected Object toLowerCaseIfString(Object obj) { + if (obj != null && obj instanceof String) { + return ((String)obj).toLowerCase(); + } + return obj; + } + + // ---------------------------------------------------------------- + // Assert Object + // ------------- + /** + * Assert that the object is not null. + * + * @param variableName Variable name. (NotNull) + * @param value Value. (NotNull) + * @exception IllegalArgumentException + */ + protected void assertObjectNotNull(String variableName, Object value) { + if (variableName == null) { + String msg = "The value should not be null: variableName=" + variableName + " value=" + value; + throw new IllegalArgumentException(msg); + } + if (value == null) { + String msg = "The value should not be null: variableName=" + variableName; + throw new IllegalArgumentException(msg); + } + } + + /** + * Assert that the entity is not null. + * + * @param entity Entity. (NotNull) + */ + protected void assertEntityNotNull(${glEntityInterfaceName} entity) { + assertObjectNotNull("entity", entity); + } + + /** + * Assert that the condition-bean is not null. + * + * @param cb Condition-bean. (NotNull) + */ + protected void assertConditionBeanNotNull(${glPackageBaseCommonCBean}.${glConditionBeanInterfaceName} cb) { + assertObjectNotNull("cb", cb); + } + + /** + * Assert that the entity has primary-key value. + * + * @param entity Entity. (NotNull) + */ + protected void assertEntityNotNullAndHasPrimaryKeyValue(${glEntityInterfaceName} entity) { + assertEntityNotNull(entity); + if (!entity.hasPrimaryKeyValue()) { + String msg = "The entity must should primary-key: entity=" + entity; + throw new IllegalArgumentException(msg + entity); + } + } + + // ---------------------------------------------------------------- + // Assert String + // ------------- + /** + * Assert that the entity is not null and not trimmed empty. + * + * @param variableName Variable name. (NotNull) + * @param value Value. (NotNull) + */ + protected void assertStringNotNullAndNotTrimmedEmpty(String variableName, String value) { + assertObjectNotNull("variableName", variableName); + assertObjectNotNull(variableName, value); + if (value.trim().length() ==0) { + String msg = "The value should not be empty: variableName=" + variableName + " value=" + value; + throw new IllegalArgumentException(msg); + } + } + + // ---------------------------------------------------------------- + // Assert List + // ----------- + /** + * Assert that the list is empty. + * + * @param ls List. (NotNull) + */ + protected void assertListNotNullAndEmpty(java.util.List ls) { + assertObjectNotNull("ls", ls); + if (!ls.isEmpty()) { + String msg = "The list should be empty: ls=" + ls.toString(); + throw new IllegalArgumentException(msg); + } + } + + /** + * Assert that the list is not empty. + * + * @param ls List. (NotNull) + */ + protected void assertListNotNullAndNotEmpty(java.util.List ls) { + assertObjectNotNull("ls", ls); + if (ls.isEmpty()) { + String msg = "The list should not be empty: ls=" + ls.toString(); + throw new IllegalArgumentException(msg); + } + } + + /** + * Assert that the list having only one. + * + * @param ls List. (NotNull) + */ + protected void assertListNotNullAndHasOnlyOne(java.util.List ls) { + assertObjectNotNull("ls", ls); + if (ls.size() != 1) { + String msg = "The list should contain only one object: ls=" + ls.toString(); + throw new IllegalArgumentException(msg); + } + } +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/bhv/AbstractBehaviorWritable.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/bhv/AbstractBehaviorWritable.vm 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/bhv/AbstractBehaviorWritable.vm 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,601 @@ +#set ($myClassName = "${glBehaviorWritableAbstractName}") + +package ${glPackageBaseCommonBhv}; + +import ${glPackageBaseCommon}.${glEntityInterfaceName}; +import ${glPackageBaseCommonHelper}.${glMapStringBuilderName}; +import ${glPackageBaseCommonHelper}.${glMapStringBuilderImplName}; + +import ${glPackageBaseCommonBhvBatch}.${glTokenFileReflectionOptionName}; +import ${glPackageBaseCommonBhvBatch}.${glTokenFileReflectionResultName}; +import ${glPackageBaseCommonBhvBatch}.${glTokenFileReflectionFailureName}; + +import ${glPackageBaseCommonHelperTokenFile}.${glFileTokenName}; +import ${glPackageBaseCommonHelperTokenFile}.${glFileTokenizingCallbackName}; +import ${glPackageBaseCommonHelperTokenFile}.${glFileTokenizingRowResourceName}; +import ${glPackageBaseCommonHelperTokenFile}.${glFileTokenizingHeaderInfoName}; +import ${glPackageBaseCommonHelperTokenFile}.${glFileTokenizingOptionName}; +import ${glPackageBaseCommonHelperTokenFileImpl}.${glFileTokenImplName}; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +/** + * The abstract class of behavior-writable. + * + * @author ${database.ClassAuthor} + */ +public abstract class ${myClassName} extends ${glBehaviorReadableAbstractName} implements ${glBehaviorWritableInterfaceName} { + + /** Log-instance. */ + private static final Log _log = LogFactory.getLog(${myClassName}.class); + + // ===================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + public ${myClassName}() { + } + + // ===================================================================================== + // Delegate Method + // =============== + /** + * ${database.ImplementComment} + * + * @param entity Entity that the type is entity-interface. (NotNull) + * @return Inserted count. + */ + public int callCreate(${glEntityInterfaceName} entity) { + assertEntityNotNull(entity);// If this table use identity, the entity does not have primary-key. + filterEntityOfInsert(entity); + assertEntityOfInsert(entity); + return getDaoWritable().create(entity); + } + + /** + * ${database.ImplementComment} + * {modified only} + * + * @param entity Entity that the type is entity-interface. (NotNull) + * @return Updated count. + */ + public int callModify(${glEntityInterfaceName} entity) { + assertEntityNotNullAndHasPrimaryKeyValue(entity); + filterEntityOfUpdate(entity); + assertEntityOfUpdate(entity); + return getDaoWritable().modifyModifiedOnly(entity); + } + + /** + * ${database.ImplementComment} + * + * @param entity Entity that the type is entity-interface. (NotNull) + * @return Deleted count. + */ + public int callRemove(${glEntityInterfaceName} entity) { + assertEntityNotNullAndHasPrimaryKeyValue(entity); + filterEntityOfDelete(entity); + assertEntityOfDelete(entity); + return getDaoWritable().remove(entity); + } + + /** + * Filter the entity of insert. + * + * @param entity Entity that the type is entity-interface. (NotNull) + */ + protected void filterEntityOfInsert(${glEntityInterfaceName} entity) { + } + + /** + * Assert the entity of insert. + * + * @param entity Entity that the type is entity-interface. (NotNull) + */ + protected void assertEntityOfInsert(${glEntityInterfaceName} entity) { + } + + /** + * Filter the entity of update. + * + * @param entity Entity that the type is entity-interface. (NotNull) + */ + protected void filterEntityOfUpdate(${glEntityInterfaceName} entity) { + } + + /** + * Assert the entity of update. + * + * @param entity Entity that the type is entity-interface. (NotNull) + */ + protected void assertEntityOfUpdate(${glEntityInterfaceName} entity) { + } + + + /** + * Filter the entity of delete. + * + * @param entity Entity that the type is entity-interface. (NotNull) + */ + protected void filterEntityOfDelete(${glEntityInterfaceName} entity) { + } + + /** + * Assert the entity of delete + * + * @param entity Entity that the type is entity-interface. (NotNull) + */ + protected void assertEntityOfDelete(${glEntityInterfaceName} entity) { + } + + /** + * ${database.ImplementComment} + * + * @param entityList Entity-list that the type is entity-interface. (NotNull) + * @return Inserted count. + */ + public int callCreateList(java.util.List${database.filterGenericsString(${glEntityInterfaceName})} entityList) { + assertListNotNullAndNotEmpty(entityList); + for (final java.util.Iterator ite = entityList.iterator(); ite.hasNext(); ) { + final ${glEntityInterfaceName} entity = (${glEntityInterfaceName})ite.next(); + filterEntityOfInsert(entity); + assertEntityOfInsert(entity); + } + return getDaoWritable().createList(entityList); + } + + /** + * ${database.ImplementComment} + * + * @param entityList Entity-list that the type is entity-interface. (NotNull) + * @return Updated count. + */ + public int callModifyList(java.util.List${database.filterGenericsString(${glEntityInterfaceName})} entityList) { + assertListNotNullAndNotEmpty(entityList); + for (final java.util.Iterator ite = entityList.iterator(); ite.hasNext(); ) { + final ${glEntityInterfaceName} entity = (${glEntityInterfaceName})ite.next(); + filterEntityOfUpdate(entity); + assertEntityOfUpdate(entity); + } + return getDaoWritable().modifyList(entityList); + } + + /** + * ${database.ImplementComment} + * + * @param entityList Entity-list that the type is entity-interface. (NotNull) + * @return Deleted count. + */ + public int callRemoveList(java.util.List${database.filterGenericsString(${glEntityInterfaceName})} entityList) { + assertListNotNullAndNotEmpty(entityList); + for (final java.util.Iterator ite = entityList.iterator(); ite.hasNext(); ) { + final ${glEntityInterfaceName} entity = (${glEntityInterfaceName})ite.next(); + filterEntityOfDelete(entity); + assertEntityOfDelete(entity); + } + return getDaoWritable().removeList(entityList); + } + + // ===================================================================================== + // Basic Entity Update + // =================== + /** + * Create. + * + * @param entity Entity. (NotNull) + */ + public void create(${glEntityInterfaceName} entity) { + doCreate(entity); + } + + abstract protected void doCreate(${glEntityInterfaceName} entity); + + /** + * Modify. + * + * @param entity Entity. (NotNull) + * @exception ${glPackageBaseCommonException}.${glRecordHasAlreadyBeenDeletedException} + * @exception ${glPackageBaseCommonException}.${glRecordHasOverlappedException} + */ + public void modify(${glEntityInterfaceName} entity) { + doModify(entity); + } + + abstract protected void doModify(${glEntityInterfaceName} entity); + + /** + * ${database.ImplementComment} + * + * @param entity Entity having primary-key value. (NotNull) + * @exception ${glPackageBaseCommonException}.${glRecordHasAlreadyBeenDeletedException} + */ + public void modifyAfterSelect(${glEntityInterfaceName} entity) { + doModifyAfterSelect(entity); + } + + abstract protected void doModifyAfterSelect(${glEntityInterfaceName} entity); + + /** + * Create or modify after select. + * {modify: modified only} + * + * @param entity Entity. This must contain primary-key value at least(Except use identity). (NotNull) + */ + public void createOrModifyAfterSelect(${glPackageBaseCommon}.${glEntityInterfaceName} entity) { + assertEntityNotNull(entity); + doCreateOrModifyAfterSelect(entity); + } + + abstract protected void doCreateOrModifyAfterSelect(${glEntityInterfaceName} entity); +#if ($database.isMakeBehaviorForUpdate()) + + /** + * ${database.ImplementComment} + * + * @param entity Entity having primary-key value. (NotNull) + * @exception ${glPackageBaseCommonException}.${glRecordHasAlreadyBeenDeletedException} + * @deprecated This method is deprecated. + */ + public void modifyAfterSelectForUpdate(${glEntityInterfaceName} entity) { + assertEntityNotNullAndHasPrimaryKeyValue(entity); + doModifyAfterSelectForUpdate(entity); + } + + abstract protected void doModifyAfterSelectForUpdate(${glEntityInterfaceName} entity); + + /** + * Create or modify after select-for-update. + * {modify: modified only} + * + * @param entity Entity. This must contain primary-key value at least(Except use identity). (NotNull) + * @deprecated This method is deprecated. + */ + public void createOrModifyAfterSelectForUpdate(${glPackageBaseCommon}.${glEntityInterfaceName} entity) { + assertEntityNotNull(entity); + doCreateOrModifyAfterSelectForUpdate(entity); + } + + abstract protected void doCreateOrModifyAfterSelectForUpdate(${glEntityInterfaceName} entity); +#end + + /** + * Merge entity. + * Copy the column data of sourceEntity that the setter has been invoked to destinationEntity. + * + * @param sourceEntity Source entity. (NotNull) + * @param destinationEntity Destination entity. (NotNull) + */ + abstract protected void mergeEntity(${glEntityInterfaceName} sourceEntity, ${glEntityInterfaceName} destinationEntity); + + /** + * Remove. + * + * @param entity Entity. (NotNull) + * @exception ${glPackageBaseCommonException}.${glRecordHasAlreadyBeenDeletedException} + * @exception ${glPackageBaseCommonException}.${glRecordHasOverlappedException} + */ + public void remove(${glPackageBaseCommon}.${glEntityInterfaceName} entity) { + assertEntityNotNull(entity); + callRemove(entity); + } + + abstract protected void doRemove(${glEntityInterfaceName} entity); + + /** + * Remove after select. + * + * @param entity Entity. This must contain primary-key value at least. (NotNull) + * @exception ${glPackageBaseCommonException}.${glRecordHasAlreadyBeenDeletedException} + */ + public void removeAfterSelect(${glEntityInterfaceName} entity) { + assertEntityNotNullAndHasPrimaryKeyValue(entity); + doRemoveAfterSelect(entity); + } + + abstract protected void doRemoveAfterSelect(${glEntityInterfaceName} entity); + + // ===================================================================================== + // Basic Batch Update + // ================== + /** + * Create list. + * + * @param entityList Entity-list. (NotNull and NotEmpty) + * @return Created count. + */ + public int createList(java.util.List${database.filterGenericsString(${glEntityInterfaceName})} entityList) { + assertListNotNullAndNotEmpty(entityList); + return callCreateList(entityList); + } + + /** + * Modify list. + * + * @param entityList Entity-list. (NotNull and NotEmpty) + * @return Modified count. + */ + public int modifyList(java.util.List${database.filterGenericsString(${glEntityInterfaceName})} entityList) { + assertListNotNullAndNotEmpty(entityList); + return callModifyList(entityList); + } + + /** + * Remove list. + * + * @param entityList Entity-list. (NotNull and NotEmpty) + * @return Removed count. + */ + public int removeList(java.util.List${database.filterGenericsString(${glEntityInterfaceName})} entityList) { + assertListNotNullAndNotEmpty(entityList); + return callRemoveList(entityList); + } + + // ===================================================================================== + // Token File + // ========== + /** + * Reflect(insert or update) token-file to this table. + * + * @param filename Name of the file. (NotNull and NotEmpty) + * @param tokenFileReflectionOption token-file-reflection-option. (NotNull and Required{delimiter and encoding}) + * @return Token-file-reflection-result. (NotNull) + * @throws java.io.FileNotFoundException + * @throws java.io.IOException + */ + public ${glTokenFileReflectionResultName} reflectTokenFile(String filename, ${glTokenFileReflectionOptionName} tokenFileReflectionOption) throws java.io.FileNotFoundException, java.io.IOException { + assertStringNotNullAndNotTrimmedEmpty("filename", filename); + assertFileTokenReflectionOption(tokenFileReflectionOption); + + final ${glTokenFileReflectionResultName} result = buildTokenFileReflectionResult(); + final ${glFileTokenizingCallbackName} fileTokenizingCallback = buildFileTokenReflectionFileTokenizingCallback(tokenFileReflectionOption, result); + final ${glFileTokenizingOptionName} fileTokenizingOption = buildFileTokenReflectionFileTokenizingOption(tokenFileReflectionOption); + final ${glFileTokenName} fileToken = new ${glFileTokenImplName}(); + fileToken.tokenize(filename, fileTokenizingCallback, fileTokenizingOption); + return result; + } + + /** + * Reflect(insert or update) token-file to this table. + * + * @param inputStream Input stream. (NotNull and NotClosed) + * @param tokenFileReflectionOption token-file-reflection-option. (NotNull and Required{delimiter and encoding}) + * @return Token-file-reflection-result. (NotNull) + * @throws java.io.FileNotFoundException + * @throws java.io.IOException + */ + public ${glTokenFileReflectionResultName} reflectTokenFile(java.io.InputStream inputStream, ${glTokenFileReflectionOptionName} tokenFileReflectionOption) throws java.io.FileNotFoundException, java.io.IOException { + assertObjectNotNull("inputStream", inputStream); + assertFileTokenReflectionOption(tokenFileReflectionOption); + + final ${glTokenFileReflectionResultName} result = buildTokenFileReflectionResult(); + final ${glFileTokenizingCallbackName} fileTokenizingCallback = buildFileTokenReflectionFileTokenizingCallback(tokenFileReflectionOption, result); + final ${glFileTokenizingOptionName} fileTokenizingOption = buildFileTokenReflectionFileTokenizingOption(tokenFileReflectionOption); + final ${glFileTokenName} fileToken = new ${glFileTokenImplName}(); + fileToken.tokenize(inputStream, fileTokenizingCallback, fileTokenizingOption); + return result; + } + + protected void assertFileTokenReflectionOption(${glTokenFileReflectionOptionName} tokenFileReflectionOption) { + assertObjectNotNull("tokenFileReflectionOption", tokenFileReflectionOption); + + final String encoding = tokenFileReflectionOption.getEncoding(); + final String delimiter = tokenFileReflectionOption.getDelimiter(); + assertStringNotNullAndNotTrimmedEmpty("encoding", encoding); + assertObjectNotNull("delimiter", delimiter); + } + + protected ${glTokenFileReflectionResultName} buildTokenFileReflectionResult() { + final ${glTokenFileReflectionResultName} result = new ${glTokenFileReflectionResultName}(); + final java.util.List${database.filterGenericsString(${glTokenFileReflectionFailureName})} failureList = new java.util.ArrayList${database.filterGenericsString(${glTokenFileReflectionFailureName})}(); + result.setFailureList(failureList); + return result; + } + + protected ${glFileTokenizingCallbackName} buildFileTokenReflectionFileTokenizingCallback(${glTokenFileReflectionOptionName} tokenFileReflectionOption, final ${glTokenFileReflectionResultName} result) throws java.io.FileNotFoundException, java.io.IOException { + assertObjectNotNull("tokenFileReflectionOption", tokenFileReflectionOption); + + final String encoding = tokenFileReflectionOption.getEncoding(); + final String delimiter = tokenFileReflectionOption.getDelimiter(); + final boolean interruptIfError = tokenFileReflectionOption.isInterruptIfError(); + assertStringNotNullAndNotTrimmedEmpty("encoding", encoding); + assertObjectNotNull("delimiter", delimiter); + final java.util.List${database.filterGenericsString(${glTokenFileReflectionFailureName})} failureList = result.getFailureList(); + assertObjectNotNull("failureList", failureList); + + final ${glFileTokenizingCallbackName} fileTokenizingCallback = new ${glFileTokenizingCallbackName}() { + public void handleRowResource(${glFileTokenizingRowResourceName} fileTokenizingRowResource) { + final ${glFileTokenizingHeaderInfoName} fileTokenizingHeaderInfo = fileTokenizingRowResource.getFileTokenizingHeaderInfo(); + final java.util.List${database.filterGenericsString('String')} columnNameList = fileTokenizingHeaderInfo.getColumnNameList(); + final java.util.List${database.filterGenericsString('String')} valueList = fileTokenizingRowResource.getValueList(); + + // Set up columnNameList of result object. + if (result.getColumnNameList() == null) { + result.setColumnNameList(columnNameList); + } + + ${glEntityInterfaceName} entity = null; + try { + // Create entity by the list of value composed of String. + entity = createEntityByStringValueList(columnNameList, valueList); + + // Create or modify as non-strict. + doCreateOrUpdateNonstrict(entity); + + // Increment successCount of result object. + result.incrementSuccessCount(); + } catch (RuntimeException e) { + if (interruptIfError) { + throw e; + } + final ${glTokenFileReflectionFailureName} failure = new ${glTokenFileReflectionFailureName}(); + failure.setColumnNameList(columnNameList); + failure.setValueList(valueList); + failure.setRowString(fileTokenizingRowResource.getRowString()); + failure.setRowNumber(fileTokenizingRowResource.getRowNumber()); + failure.setLineNumber(fileTokenizingRowResource.getLineNumber()); + if (entity != null) { + failure.setEntity(entity); + } + failure.setException(e); + failureList.add(failure); + } + } + }; + return fileTokenizingCallback; + } + + protected ${glEntityInterfaceName} createEntityByStringValueList(java.util.List${database.filterGenericsString('String')} columnNameList, java.util.List${database.filterGenericsString('String')} valueList) { + final ${glMapStringBuilderName} builder = new ${glMapStringBuilderImplName}(); + builder.setMsMapMark(MAP_STRING_MAP_MARK); + builder.setMsStartBrace(MAP_STRING_START_BRACE); + builder.setMsEndBrace(MAP_STRING_END_BRACE); + builder.setMsDelimiter(MAP_STRING_DELIMITER); + builder.setMsEqual(MAP_STRING_EQUAL); + builder.setColumnNameList(columnNameList); + final String mapString = builder.buildFromList(valueList); + + final ${glEntityInterfaceName} entity = getDBMeta().newEntity(); + getDBMeta().acceptColumnValueMapString(entity, mapString); + return entity; + } + + protected ${glFileTokenizingOptionName} buildFileTokenReflectionFileTokenizingOption(${glTokenFileReflectionOptionName} tokenFileReflectionOption) throws java.io.FileNotFoundException, java.io.IOException { + assertObjectNotNull("tokenFileReflectionOption", tokenFileReflectionOption); + + final String encoding = tokenFileReflectionOption.getEncoding(); + final String delimiter = tokenFileReflectionOption.getDelimiter(); + assertStringNotNullAndNotTrimmedEmpty("encoding", encoding); + assertObjectNotNull("delimiter", delimiter); + + final ${glFileTokenizingOptionName} fileTokenizingOption = new ${glFileTokenizingOptionName}(); + fileTokenizingOption.setEncoding(encoding); + fileTokenizingOption.setDelimiter(delimiter); + if (tokenFileReflectionOption.isHandleEmptyAsNull()) { + fileTokenizingOption.handleEmptyAsNull(); + } + return fileTokenizingOption; + } + + abstract protected void doCreateOrUpdateNonstrict(${glEntityInterfaceName} entity); + + /** + * Reflect(insert or update) from separated-file. + * + * @param filename Name of the file. (NotNull and NotEmpty) + * @param encoding Encoding of the file. (NotNull and NotEmpty) + * @param delimiter Delimiter of the file. (NotNull and NotEmpty) + * @param batchCount Batch-count for transaction. If this value is 0, all records are done in one transaction. + * @param isErrorContinue If true, this method continue in spite of throwing the exception. + * @return The list of OneEntityExceptionResult. (NotNull) + * @throws java.io.FileNotFoundException + * @throws java.io.IOException + * @deprecated Please use reflectTokenFile() + */ + public java.util.List${database.filterGenericsString('OneEntityExceptionResult')} reflectFromSeparatedFile( + String filename, String encoding, + String delimiter, int batchCount, boolean isErrorContinue + ) throws java.io.FileNotFoundException, java.io.IOException { + assertStringNotNullAndNotTrimmedEmpty("filename", filename); + assertStringNotNullAndNotTrimmedEmpty("encoding", encoding); + assertObjectNotNull("delimiter", delimiter); + final java.util.List${database.filterGenericsString('OneEntityExceptionResult')} exceptionList = new java.util.ArrayList${database.filterGenericsString('OneEntityExceptionResult')}(); + + java.io.FileInputStream fis = null; + java.io.InputStreamReader ir = null; + java.io.BufferedReader br = null; + try { + fis = new java.io.FileInputStream(filename); + ir = new java.io.InputStreamReader(fis, encoding); + br = new java.io.BufferedReader(ir); + + final ${glMapStringBuilderName} builder = new ${glMapStringBuilderImplName}(); + builder.setMsMapMark(MAP_STRING_MAP_MARK); + builder.setMsStartBrace(MAP_STRING_START_BRACE); + builder.setMsEndBrace(MAP_STRING_END_BRACE); + builder.setMsDelimiter(MAP_STRING_DELIMITER); + builder.setMsEqual(MAP_STRING_EQUAL); + final java.util.List${database.filterGenericsString(${glEntityInterfaceName})} entityList = new java.util.ArrayList${database.filterGenericsString(${glEntityInterfaceName})}(); + int count = 0; + while (true) { + ++count; + + final String lineString = br.readLine(); + if (lineString == null) { + if (entityList.size() > 0) { + final java.util.List${database.filterGenericsString('OneEntityExceptionResult')} tmpList = reflectAfterSelectNewTx(entityList, isErrorContinue); + exceptionList.addAll(tmpList); + entityList.clear(); + } + break; + } + if (count == 1) { + builder.setColumnNames(lineString.split(delimiter)); + continue; + } + + final String mapString = builder.buildByDelimiter(lineString, delimiter); + final ${glEntityInterfaceName} entity = getDBMeta().newEntity(); + entity.acceptColumnValueMapString(mapString); + entityList.add(entity); + + if (entityList.size() == batchCount) { + final java.util.List${database.filterGenericsString('OneEntityExceptionResult')} tmpList = reflectAfterSelectNewTx(entityList, isErrorContinue); + exceptionList.addAll(tmpList); + entityList.clear(); + } + } + } catch (java.io.FileNotFoundException e) { + throw e; + } catch (java.io.IOException e) { + throw e; + } finally { + try { + if (fis != null) { + fis.close(); + } + if (ir != null) { + ir.close(); + } + if (br != null) { + br.close(); + } + } catch (java.io.IOException ignored) { + _log.warn("File-close threw the exception: ", ignored); + } + } + return exceptionList; + } + + /** + * Reflect(insert or update) from separated-file. + * + * @param entityList The list of entity that is reflection target. (NotNull) + * @param isErrorContinue If true, this method continue in spite of throwing the exception. + * @return The list of InsertOrUpdateExceptionResult. (NotNull) + * @deprecated Please use reflectTokenFile() + */ + public java.util.List${database.filterGenericsString('OneEntityExceptionResult')} reflectAfterSelectNewTx(java.util.List${database.filterGenericsString(${glEntityInterfaceName})} entityList, + boolean isErrorContinue) { + final java.util.List${database.filterGenericsString('OneEntityExceptionResult')} exceptionList = new java.util.ArrayList${database.filterGenericsString('OneEntityExceptionResult')}(); + for (final java.util.Iterator ite = entityList.iterator(); ite.hasNext(); ) { + final ${glEntityInterfaceName} entity = (${glEntityInterfaceName})ite.next(); + try { + createOrModifyAfterSelect(entity); + } catch (RuntimeException e) { + if (isErrorContinue) { + final OneEntityExceptionResult result = new OneEntityExceptionResult(); + result.setPrimaryKeyMapString(entity.extractPrimaryKeyMapString()); + result.setEntity(entity); + result.setException(e); + exceptionList.add(result); + continue; + } + throw e; + } + } + return exceptionList; + } +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/bhv/BehaviorReadable.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/bhv/BehaviorReadable.vm 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/bhv/BehaviorReadable.vm 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,374 @@ +package ${glPackageBaseCommonBhv}; + +import ${glPackageBaseCommon}.${glDaoSelectorInterfaceName}; +import ${glPackageBaseCommon}.${glDaoReadableInterfaceName}; +import ${glPackageBaseCommon}.${glEntityInterfaceName}; +import ${glPackageBaseCommonCBean}.${glConditionBeanInterfaceName}; +import ${glPackageBaseCommonCBean}.${glListResultBeanName}; +import ${glPackageBaseCommonCBean}.${glOrderByBeanInterfaceName}; +import ${glPackageBaseCommonCBean}.${glPagingBeanInterfaceName}; +import ${glPackageBaseCommonCBean}.${glPagingResultBeanName}; +import ${glPackageBaseCommonDBMeta}.${glDBMetaInterfaceName}; + +import ${glPackageBaseCommonBhvBatch}.${glTokenFileOutputOptionName}; +import ${glPackageBaseCommonBhvBatch}.${glTokenFileOutputResultName}; + +/** + * The interface of behavior-readable. + * + * @author ${database.ClassAuthor} + */ +public interface ${glBehaviorReadableInterfaceName} { + + // ===================================================================================== + // Definition + // ========== + /** Map-string map-mark. */ + public static final String MAP_STRING_MAP_MARK = "map:"; + + /** Map-string list-mark. */ + public static final String MAP_STRING_LIST_MARK = "list:"; + + /** Map-string start-brace. */ + public static final String MAP_STRING_START_BRACE = "${database.extractAcceptStartBrace}"; + + /** Map-string end-brace. */ + public static final String MAP_STRING_END_BRACE = "${database.extractAcceptEndBrace}"; + + /** Map-string delimiter. */ + public static final String MAP_STRING_DELIMITER = "${database.extractAcceptDelimiter}"; + + /** Map-string equal. */ + public static final String MAP_STRING_EQUAL = "${database.extractAcceptEqual}"; + + // ===================================================================================== + // Table name + // ========== + /** + * Get table db-name. + * + * @return Table db-name. (NotNull) + */ + public String getTableDbName(); + + // ===================================================================================== + // DBMeta + // ====== + /** + * Get dbmeta. + * + * @return DBMeta. (NotNull) + */ + public ${glDBMetaInterfaceName} getDBMeta(); + + // ===================================================================================== + // Dao Accessor + // ============ + /** + * Get dao-readable. + * + * @return Dao-readable. (NotNull) + */ + public ${glDaoReadableInterfaceName} getDaoReadable(); + + /** + * Get dao-selector. + * + * @return Dao-selector. + */ + public ${glDaoSelectorInterfaceName} getDaoSelector(); + + /** + * Set dao-selector. + * + * @param value Dao-selector. + */ + public void setDaoSelector(${glDaoSelectorInterfaceName} value); + + // ===================================================================================== + // New Instance + // ============ + /** + * New entity. + * + * @return Entity. (NotNull) + */ + public ${glEntityInterfaceName} newEntity(); + + /** + * New condition-bean. + * + * @return Condition-bean. (NotNull) + */ + public ${glConditionBeanInterfaceName} newConditionBean(); + + // ===================================================================================== + // Delegate Method + // =============== + /** + * Read count as all. (Delegate-Method) + * + * @return All count. (NotNull) + */ + public int callGetCountAll(); + + /** + * Read list as all. (Delegate-Method) + * + * @return All list. (NotNull) + */ + public java.util.List${database.filterGenericsString(${glEntityInterfaceName})} callGetListAll(); + + /** + * Read count by condition-bean. (Delegate-Method) + * If the condition-bean is invoked fetchFirst() and fetchScope() and fetchPage(), throw exception. + * + * @param ${glAttachedCBArgsVariableName} Condition-bean. (NotNull) + * @return Read count. (NotNull) + */ + public int callReadCount(${glConditionBeanInterfaceName} ${glAttachedCBArgsVariableName}); + + /** + * Read entity by condition-bean. (Delegate-Method) + * + * @param ${glAttachedCBArgsVariableName} Condition-bean. (NotNull) + * @return Read entity. If the select result is zero, it returns null. (Nullable) + */ + public ${glEntityInterfaceName} callReadEntity(${glConditionBeanInterfaceName} ${glAttachedCBArgsVariableName}); + + /** + * Read list by condition-bean. (Delegate-Method) + * + * @param ${glAttachedCBArgsVariableName} Condition-bean. (NotNull) + * @return Read list. If the select result is zero, it returns empty list. (NotNull) + */ + public java.util.List${database.filterGenericsString(${glEntityInterfaceName})} callReadList(${glConditionBeanInterfaceName} ${glAttachedCBArgsVariableName}); + + // ===================================================================================== + // Basic Get All + // ============= + /** + * Get count all. + * + * @return Count all. + */ + public int getCountAll(); + + // ===================================================================================== + // Basic Read Count + // ================ + /** + * Read count by condition-bean. + *
+     * If the argument 'condition-bean' is effective about fetch-scope,
+     * this method invoke select count ignoring the fetch-scope.
+     * 
+ * @param cb Condition-bean. This condition-bean should not be set up about fetch-scope. (NotNull) + * @return Read count. (NotNull) + */ + public int readCount(${glConditionBeanInterfaceName} cb); + + // ===================================================================================== + // Basic Read Entity + // ================= + /** + * Read entity by condition-bean. + * + * @param cb Condition-bean. (NotNull) + * @return Read entity. (Nullalble) + * @exception ${glPackageBaseCommonException}.${glRecordHasOverlappedException} + */ + public ${glEntityInterfaceName} readEntity(${glConditionBeanInterfaceName} cb); + + /** + * Read simple entity by condition-bean with deleted check. + * + * @param ${glAttachedCBArgsVariableName} Condition-bean. (NotNull) + * @return Read entity. (NotNull) + * @exception ${glPackageBaseCommonException}.${glRecordHasAlreadyBeenDeletedException} + */ + public ${glEntityInterfaceName} readEntityWithDeletedCheck(${glConditionBeanInterfaceName} ${glAttachedCBArgsVariableName}); + + // ===================================================================================== + // Basic Read List + // =============== + /** + * Read list as result-bean. + * + * @param ${glAttachedCBArgsVariableName} Condition-bean. (NotNull) + * @return List-result-bean. If the select result is zero, it returns empty list. (NotNull) + */ + public ${glListResultBeanName}${database.filterGenericsString(${glEntityInterfaceName})} readList(${glConditionBeanInterfaceName} ${glAttachedCBArgsVariableName}); + + /** + * Read page as result-bean. + * + * @param ${glAttachedCBArgsVariableName} Condition-bean. (NotNull) + * @return Read page. (NotNull) + */ + public ${glPagingResultBeanName}${database.filterGenericsString(${glEntityInterfaceName})} readPage(final ${glConditionBeanInterfaceName} ${glAttachedCBArgsVariableName}); + + /** + * Read page as result-bean. + * + * @param ${glAttachedCBArgsVariableName} Condition-bean. (NotNull) + * @param invoker Select-page-invoker (NotNull) + * @return Read page. (NotNull) + */ + public ${glPagingResultBeanName}${database.filterGenericsString(${glEntityInterfaceName})} readPage(final ${glConditionBeanInterfaceName} ${glAttachedCBArgsVariableName}, SelectPageInvoker${database.filterGenericsString(${glEntityInterfaceName})} invoker); + + // ===================================================================================== + // Token File + // ========== + /** + * Output token-file from this table records. + * + * @param cb Condition-bean. (NotNull) + * @param filename Name of the file. (NotNull and NotEmpty) + * @param tokenFileOutputOption token-file-output-option. (NotNull and Required{delimiter and encoding}) + * @return Token-file-output-result. (NotNull) + * @throws java.io.FileNotFoundException + * @throws java.io.IOException + */ + public ${glTokenFileOutputResultName} outputTokenFile(${glConditionBeanInterfaceName} cb, String filename, ${glTokenFileOutputOptionName} tokenFileOutputOption) throws java.io.FileNotFoundException, java.io.IOException; + + /** + * The interface of select-page callback. + * + * @param The generic template for 'selectedList'. + */ + public static interface SelectPageCallback${database.filterGenericsString('T')} { + public ${glPagingBeanInterfaceName} getPagingBean(); + public int selectCountIgnoreFetchScope(); + public java.util.List${database.filterGenericsString('T')} selectListWithFetchScope(); + } + + /** + * The object of result-bean builder. + * + * @param The generic template for 'resultBean'. + */ + public static class ResultBeanBuilder${database.filterGenericsString('T')} { + protected ${glBehaviorReadableInterfaceName} _bhv; + public ResultBeanBuilder(${glBehaviorReadableInterfaceName} bhv) { + _bhv = bhv; + } + /** + * Build list-reuslt-bean. + * + * @param ob Order-by-bean. (NotNull) + * @param selectedList Selected list. (NotNull) + * @return List-result-bean. (NotNull) + */ + public ${glListResultBeanName}${database.filterGenericsString('T')} buildListResultBean(${glOrderByBeanInterfaceName} ob, java.util.List${database.filterGenericsString('T')} selectedList) { + ${glListResultBeanName}${database.filterGenericsString('T')} rb = new ${glListResultBeanName}${database.filterGenericsString('T')}(); + rb.setTableDbName(_bhv.getTableDbName()); + rb.setAllRecordCount(selectedList.size()); + rb.setSelectedList(selectedList); + rb.setOrderByClause(ob.getSqlComponentOfOrderByClause()); + return rb; + } + /** + * Build paging-reuslt-bean. + * + * @param pb Paging-bean. (NotNull) + * @param allRecordCount All-record-count. + * @param selectedList Selected list. (NotNull) + * @return Paging-result-bean. (NotNull) + */ + public ${glPagingResultBeanName}${database.filterGenericsString('T')} buildPagingResultBean(${glPagingBeanInterfaceName} pb, int allRecordCount, java.util.List${database.filterGenericsString('T')} selectedList) { + ${glPagingResultBeanName}${database.filterGenericsString('T')} rb = new ${glPagingResultBeanName}${database.filterGenericsString('T')}(); + rb.setTableDbName(_bhv.getTableDbName()); + rb.setAllRecordCount(allRecordCount); + rb.setSelectedList(selectedList); + rb.setPageSize(pb.getFetchSize()); + rb.setCurrentPageNumber(pb.getFetchPageNumber()); + rb.setOrderByClause(pb.getSqlComponentOfOrderByClause()); + return rb; + } + } + + public static interface SelectPageInvoker${database.filterGenericsString('T')} { + /** + * Invoke select-page by callback. + * + * @param callback Callback. (NotNull) + * @return Paging-result-bean. (NotNull) + */ + public ${glPagingResultBeanName}${database.filterGenericsString('T')} invokeSelectPage(SelectPageCallback${database.filterGenericsString('T')} callback); + } + + /** + * The object of result-bean builder. + * + * @param The generic template for 'resultBean'. + */ + public static class SelectPageSimpleInvoker${database.filterGenericsString('T')} implements SelectPageInvoker${database.filterGenericsString('T')} { + protected ${glBehaviorReadableInterfaceName} _bhv; + public SelectPageSimpleInvoker(${glBehaviorReadableInterfaceName} bhv) { + _bhv = bhv; + } + + /** + * Invoke select-page by callback. + * + * @param callback Callback. (NotNull) + * @return Paging-result-bean. (NotNull) + */ + public ${glPagingResultBeanName}${database.filterGenericsString('T')} invokeSelectPage(SelectPageCallback${database.filterGenericsString('T')} callback) { + assertObjectNotNull("callback", callback); + assertObjectNotNull("callback.getPagingBean()", callback.getPagingBean()); + if (!callback.getPagingBean().isFetchScopeEffective()) { + String msg = "The paging bean is not effective about fetch-scope!"; + msg = msg + " When you select page, you should set up fetch-scope of paging bean(Should invoke fetchFirst() and fetchPage()!)."; + msg = msg + " The paging bean is: " + callback.getPagingBean(); + throw new IllegalStateException(msg); + } + final int allRecordCount = callback.selectCountIgnoreFetchScope(); + final java.util.List${database.filterGenericsString('T')} selectedList = callback.selectListWithFetchScope(); + final ${glPagingResultBeanName}${database.filterGenericsString('T')} rb = new ResultBeanBuilder${database.filterGenericsString('T')}(_bhv).buildPagingResultBean(callback.getPagingBean(), allRecordCount, selectedList); + if (isNecessaryToReadPageAgain(rb)) { + callback.getPagingBean().fetchPage(rb.getAllPageCount()); + final int reAllRecordCount = callback.selectCountIgnoreFetchScope(); + final java.util.List${database.filterGenericsString('T')} reSelectedList = callback.selectListWithFetchScope(); + return new ResultBeanBuilder${database.filterGenericsString('T')}(_bhv).buildPagingResultBean(callback.getPagingBean(), reAllRecordCount, reSelectedList); + } else { + return rb; + } + } + + /** + * Is it necessary to read page again? + * + * @param rb Paging-result-bean. (NotNull) + * @return Determination. + */ + protected boolean isNecessaryToReadPageAgain(${glPagingResultBeanName}${database.filterGenericsString('T')} rb) { + return rb.getAllRecordCount() > 0 && rb.getSelectedList().isEmpty(); + } + + /** + * Assert that the object is not null. + * + * @param variableName Variable name. (NotNull) + * @param value Value. (NotNull) + * @exception IllegalArgumentException + */ + protected void assertObjectNotNull(String variableName, Object value) { + if (variableName == null) { + String msg = "The value should not be null: variableName=" + variableName + " value=" + value; + throw new IllegalArgumentException(msg); + } + if (value == null) { + String msg = "The value should not be null: variableName=" + variableName; + throw new IllegalArgumentException(msg); + } + } + } + + /** + * The marker interface of simple condition-bean setupper. + */ + public static interface SimpleCBSetupper { + } +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/bhv/BehaviorWritable.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/bhv/BehaviorWritable.vm 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/bhv/BehaviorWritable.vm 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,227 @@ +package ${glPackageBaseCommonBhv}; + +import ${glPackageBaseCommon}.${glDaoWritableInterfaceName}; +import ${glPackageBaseCommon}.${glEntityInterfaceName}; +import ${glPackageBaseCommonBhvBatch}.${glTokenFileReflectionOptionName}; +import ${glPackageBaseCommonBhvBatch}.${glTokenFileReflectionResultName}; + +/** + * The interface of behavior-writable. + * + * @author ${database.ClassAuthor} + */ +public interface ${glBehaviorWritableInterfaceName} extends ${glBehaviorReadableInterfaceName} { + + /** + * Get dao-writable. + * + * @return Dao-writable. (NotNull) + */ + public ${glDaoWritableInterfaceName} getDaoWritable(); + + /** + * Create entity. (Delegate-Method) + * + * @param entity Entity that the type is entity-interface. (NotNull) + * @return Inserted count. + */ + public int callCreate(${glEntityInterfaceName} entity); + + /** + * Modify entity. (Delegate-Method) + * {modified only} + * + * @param entity Entity that the type is entity-interface. (NotNull) + * @return Updated count. + */ + public int callModify(${glEntityInterfaceName} entity); + + /** + * Remove entity. (Delegate-Method) + * + * @param entity Entity that the type is entity-interface. (NotNull) + * @return Deleted count. + */ + public int callRemove(${glEntityInterfaceName} entity); + + /** + * Create several entity-list. (Delegate-Method) + * + * @param entityList Entity-list that the type is entity-interface. (NotNull) + * @return Inserted count. + */ + public int callCreateList(java.util.List${database.filterGenericsString(${glEntityInterfaceName})} entityList); + + /** + * Modify several entity-list. (Delegate-Method) + * + * @param entityList Entity-list that the type is entity-interface. (NotNull) + * @return Updated count. + */ + public int callModifyList(java.util.List${database.filterGenericsString(${glEntityInterfaceName})} entityList); + + /** + * Remove several entity-list. (Delegate-Method) + * + * @param entityList Entity-list that the type is entity-interface. (NotNull) + * @return Deleted count. + */ + public int callRemoveList(java.util.List${database.filterGenericsString(${glEntityInterfaceName})} entityList); + + // ===================================================================================== + // Basic Entity Update + // =================== + /** + * Create. + * + * @param entity Entity. (NotNull) + */ + public void create(${glPackageBaseCommon}.${glEntityInterfaceName} entity); + + /** + * Modify. + * + * @param entity Entity. (NotNull) + */ + public void modify(${glPackageBaseCommon}.${glEntityInterfaceName} entity); + + /** + * Modify after select. + * + * @param entity Entity. + * @exception ${glPackageBaseCommonException}.${glRecordHasAlreadyBeenDeletedException} + */ + public void modifyAfterSelect(${glPackageBaseCommon}.${glEntityInterfaceName} entity); + + /** + * Create or modify after select. + * + * @param entity Entity. This must contain primary-key value at least(Except use identity). (NotNull) + */ + public void createOrModifyAfterSelect(${glPackageBaseCommon}.${glEntityInterfaceName} entity); +#if ($database.isMakeBehaviorForUpdate()) + + /** + * Modify after select-for-update. + * + * @param entity Entity. + * @exception ${glPackageBaseCommonException}.${glRecordHasAlreadyBeenDeletedException} + * @deprecated This method is deprecated. + */ + public void modifyAfterSelectForUpdate(${glPackageBaseCommon}.${glEntityInterfaceName} entity); + + /** + * Create or modify after select-for-update. + * + * @param entity Entity. This must contain primary-key value at least(Except use identity). (NotNull) + * @deprecated This method is deprecated. + */ + public void createOrModifyAfterSelectForUpdate(${glPackageBaseCommon}.${glEntityInterfaceName} entity); +#end + + /** + * Remove. + * + * @param entity Entity. (NotNull) + */ + public void remove(${glPackageBaseCommon}.${glEntityInterfaceName} entity); + + // ===================================================================================== + // Basic Batch Update + // ================== + /** + * Create list. + * + * @param entityList Entity-list. (NotNull and NotEmpty) + * @return Created count. + */ + public int createList(java.util.List${database.filterGenericsString(${glEntityInterfaceName})} entityList); + + /** + * Modify list. + * + * @param entityList Entity-list. (NotNull and NotEmpty) + * @return Modified count. + */ + public int modifyList(java.util.List${database.filterGenericsString(${glEntityInterfaceName})} entityList); + + /** + * Remove list. + * + * @param entityList Entity-list. (NotNull and NotEmpty) + * @return Removed count. + */ + public int removeList(java.util.List${database.filterGenericsString(${glEntityInterfaceName})} entityList); + + // ===================================================================================== + // Token File + // ========== + /** + * Reflect(insert or update) token-file to this table. + * + * @param filename Name of the file. (NotNull and NotEmpty) + * @param tokenFileReflectionOption token-file-reflection-option. (NotNull and Required{delimiter and encoding}) + * @return Token-file-reflection-result. (NotNull) + * @throws java.io.FileNotFoundException + * @throws java.io.IOException + */ + public ${glTokenFileReflectionResultName} reflectTokenFile(String filename, ${glTokenFileReflectionOptionName} tokenFileReflectionOption) throws java.io.FileNotFoundException, java.io.IOException; + + /** + * Reflect(insert or update) token-file to this table. + * + * @param inputStream Input stream. (NotNull and NotClosed) + * @param tokenFileReflectionOption token-file-reflection-option. (NotNull and Required{delimiter and encoding}) + * @return Token-file-reflection-result. (NotNull) + * @throws java.io.FileNotFoundException + * @throws java.io.IOException + */ + public ${glTokenFileReflectionResultName} reflectTokenFile(java.io.InputStream inputStream, ${glTokenFileReflectionOptionName} tokenFileReflectionOption) throws java.io.FileNotFoundException, java.io.IOException; + + /** + * Reflect(insert or update) from separated-file. + * + * @param filename Name of the file. (NotNull and NotEmpty) + * @param encoding Encoding of the file. (NotNull and NotEmpty) + * @param delimiter Delimiter of the file. (NotNull and NotEmpty) + * @param batchCount Batch-count for transaction. + * @param isErrorContinue If true, this method continue in spite of throwing the exception. + * @return The list of InsertOrUpdateExceptionResult. (NotNull) + * @throws java.io.FileNotFoundException + * @throws java.io.IOException + * @deprecated Please use reflectTokenFile() + */ + public java.util.List${database.filterGenericsString('OneEntityExceptionResult')} reflectFromSeparatedFile( + String filename, String encoding, + String delimiter, int batchCount, boolean isErrorContinue + ) throws java.io.FileNotFoundException, java.io.IOException; + + /** + * Exception result for one entity. + * @deprecated Please use BatchTransactionFailureResult + */ + public static class OneEntityExceptionResult { + protected String _primaryKeyMapString; + protected ${glEntityInterfaceName} _entity; + protected Exception _exception; + + public String getPrimaryKeyMapString() { + return _primaryKeyMapString; + } + public void setPrimaryKeyMapString(String value) { + _primaryKeyMapString = value; + } + public ${glEntityInterfaceName} getEntity() { + return _entity; + } + public void setEntity(${glEntityInterfaceName} value) { + _entity = value; + } + public Exception getException() { + return _exception; + } + public void setException(Exception value) { + _exception = value; + } + } +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/bhv/batch/TokenFileOutputOption.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/bhv/batch/TokenFileOutputOption.vm 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/bhv/batch/TokenFileOutputOption.vm 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,87 @@ +package ${glPackageBaseCommonBhvBatch}; + +import ${glPackageBaseCommonHelperTokenFile}.${glFileMakingOptionName}; + +/** + * @author ${database.ClassAuthor} + */ +public class ${glTokenFileOutputOptionName} { + + // ===================================================================================== + // Attribute + // ========= + protected ${glFileMakingOptionName} _fileMakingOption = new ${glFileMakingOptionName}(); + + // ===================================================================================== + // Easy-to-Use + // =========== + public ${glTokenFileOutputOptionName} delimitateByComma() { + _fileMakingOption.delimitateByComma(); + return this; + } + + public ${glTokenFileOutputOptionName} delimitateByTab() { + _fileMakingOption.delimitateByTab(); + return this; + } + + public ${glTokenFileOutputOptionName} encodeAsUTF8() { + _fileMakingOption.encodeAsUTF8(); + return this; + } + + public ${glTokenFileOutputOptionName} encodeAsWindows31J() { + _fileMakingOption.encodeAsWindows31J(); + return this; + } + + public ${glTokenFileOutputOptionName} separateCrLf() { + _fileMakingOption.separateCrLf(); + return this; + } + + public ${glTokenFileOutputOptionName} separateLf() { + _fileMakingOption.separateLf(); + return this; + } + + public ${glTokenFileOutputOptionName} goodByeDoubleQuotation() { + _fileMakingOption.goodByeDoubleQuotation(); + return this; + } + + // ===================================================================================== + // Accessor + // ======== + public String getEncoding() { + return _fileMakingOption.getEncoding(); + } + + public void setEncoding(String encoding) { + _fileMakingOption.setDelimiter(encoding); + } + + public String getDelimiter() { + return _fileMakingOption.getDelimiter(); + } + + public void setDelimiter(String delimiter) { + _fileMakingOption.setDelimiter(delimiter); + } + + public String getLineSeparator() { + return _fileMakingOption.getLineSeparator(); + } + + public void setLineSeparator(String lineSeparator) { + _fileMakingOption.setLineSeparator(lineSeparator); + } + + public boolean isGoodByeDoubleQuotation() { + return _fileMakingOption.isGoodByeDoubleQuotation(); + } + + public ${glFileMakingOptionName} getFileMakingOption() { + return _fileMakingOption; + } +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/bhv/batch/TokenFileOutputResult.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/bhv/batch/TokenFileOutputResult.vm 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/bhv/batch/TokenFileOutputResult.vm 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,25 @@ +package ${glPackageBaseCommonBhvBatch}; + +import ${glPackageBaseCommon}.${glEntityInterfaceName}; + +/** + * @author ${database.ClassAuthor} + */ +public class ${glTokenFileOutputResultName} { + + // ===================================================================================== + // Attribute + // ========= + protected java.util.List${database.filterGenericsString(${glEntityInterfaceName})} _selectedList; + + // ===================================================================================== + // Accessor + // ======== + public java.util.List${database.filterGenericsString(${glEntityInterfaceName})} getSelectedList() { + return _selectedList; + } + + public void setSelectedList(java.util.List${database.filterGenericsString(${glEntityInterfaceName})} selectedList) { + _selectedList = selectedList; + } +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/bhv/batch/TokenFileReflectionFailure.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/bhv/batch/TokenFileReflectionFailure.vm 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/bhv/batch/TokenFileReflectionFailure.vm 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,85 @@ +package ${glPackageBaseCommonBhvBatch}; + +import ${glPackageBaseCommon}.${glEntityInterfaceName}; + +/** + * @author ${database.ClassAuthor} + */ +public class ${glTokenFileReflectionFailureName} { + + // ===================================================================================== + // Attribute + // ========= + protected java.util.List${database.filterGenericsString('String')} _columnNameList; + protected java.util.List${database.filterGenericsString('String')} _valueList; + + protected String rowString; + + /** The row number. */ + protected int _rowNumber; + + /** The line number. */ + protected int _lineNumber; + + protected ${glEntityInterfaceName} _entity; + protected Exception _exception; + + // ===================================================================================== + // Accessor + // ======== + public java.util.List${database.filterGenericsString('String')} getColumnNameList() { + return _columnNameList; + } + + public void setColumnNameList(java.util.List${database.filterGenericsString('String')} columnNameList) { + this._columnNameList = columnNameList; + } + + public java.util.List${database.filterGenericsString('String')} getValueList() { + return _valueList; + } + + public void setValueList(java.util.List${database.filterGenericsString('String')} valueList) { + this._valueList = valueList; + } + + public String getRowString() { + return rowString; + } + + public void setRowString(String rowString) { + this.rowString = rowString; + } + + public int getRowNumber() { + return _rowNumber; + } + + public void setRowNumber(int rowNumber) { + _rowNumber = rowNumber; + } + + public int getLineNumber() { + return _lineNumber; + } + + public void setLineNumber(int lineNumber) { + _lineNumber = lineNumber; + } + + public ${glEntityInterfaceName} getEntity() { + return _entity; + } + + public void setEntity(${glEntityInterfaceName} value) { + _entity = value; + } + + public Exception getException() { + return _exception; + } + + public void setException(Exception value) { + _exception = value; + } +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/bhv/batch/TokenFileReflectionOption.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/bhv/batch/TokenFileReflectionOption.vm 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/bhv/batch/TokenFileReflectionOption.vm 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,76 @@ +package ${glPackageBaseCommonBhvBatch}; + +import ${glPackageBaseCommonHelperTokenFile}.${glFileTokenizingOptionName}; + +/** + * @author ${database.ClassAuthor} + */ +public class ${glTokenFileReflectionOptionName} { + + // ===================================================================================== + // Attribute + // ========= + protected boolean _interruptIfError; + + protected ${glFileTokenizingOptionName} _fileTokenizingOption = new ${glFileTokenizingOptionName}(); + + // ===================================================================================== + // Easy-to-Use + // =========== + public ${glTokenFileReflectionOptionName} delimitateByComma() { + _fileTokenizingOption.delimitateByComma(); + return this; + } + + public ${glTokenFileReflectionOptionName} delimitateByTab() { + _fileTokenizingOption.delimitateByTab(); + return this; + } + + public ${glTokenFileReflectionOptionName} encodeAsUTF8() { + _fileTokenizingOption.encodeAsUTF8(); + return this; + } + + public ${glTokenFileReflectionOptionName} encodeAsWindows31J() { + _fileTokenizingOption.encodeAsWindows31J(); + return this; + } + + public ${glTokenFileReflectionOptionName} handleEmptyAsNull() { + _fileTokenizingOption.handleEmptyAsNull(); + return this; + } + + public ${glTokenFileReflectionOptionName} interruptIfError() { + _interruptIfError = true; + return this; + } + + // ===================================================================================== + // Accessor + // ======== + public String getDelimiter() { + return _fileTokenizingOption.getDelimiter(); + } + + public void setDelimiter(String delimiter) { + _fileTokenizingOption.setDelimiter(delimiter); + } + + public String getEncoding() { + return _fileTokenizingOption.getEncoding(); + } + + public void setEncoding(String encoding) { + _fileTokenizingOption.setDelimiter(encoding); + } + + public boolean isHandleEmptyAsNull() { + return _fileTokenizingOption.isHandleEmptyAsNull(); + } + + public boolean isInterruptIfError() { + return _interruptIfError; + } +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/bhv/batch/TokenFileReflectionResult.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/bhv/batch/TokenFileReflectionResult.vm 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/bhv/batch/TokenFileReflectionResult.vm 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,48 @@ +package ${glPackageBaseCommonBhvBatch}; + +/** + * @author ${database.ClassAuthor} + */ +public class ${glTokenFileReflectionResultName} { + + // ===================================================================================== + // Attribute + // ========= + protected java.util.List${database.filterGenericsString('String')} _columnNameList; + protected int _successCount; + protected java.util.List${database.filterGenericsString(${glTokenFileReflectionFailureName})} _failureList; + + // ===================================================================================== + // Easy-to-Use + // =========== + public void incrementSuccessCount() { + ++_successCount; + } + + // ===================================================================================== + // Accessor + // ======== + public java.util.List${database.filterGenericsString('String')} getColumnNameList() { + return _columnNameList; + } + + public void setColumnNameList(java.util.List${database.filterGenericsString('String')} columnNameList) { + this._columnNameList = columnNameList; + } + + public int getSuccessCount() { + return _successCount; + } + + public void setSuccessCount(int successCount) { + _successCount = successCount; + } + + public java.util.List${database.filterGenericsString(${glTokenFileReflectionFailureName})} getFailureList() { + return _failureList; + } + + public void setFailureList(java.util.List${database.filterGenericsString(${glTokenFileReflectionFailureName})} failureList) { + this._failureList = failureList; + } +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/bhv/load/LoadRefererOption.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/bhv/load/LoadRefererOption.vm 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/bhv/load/LoadRefererOption.vm 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,120 @@ +package ${glPackageBaseCommonBhvLoad}; + +import ${glPackageBaseCommon}.${glEntityInterfaceName}; +import ${glPackageBaseCommonBhvSetup}.${glConditionBeanSetupperName}; +import ${glPackageBaseCommonBhvSetup}.${glEntityListSetupperName}; +import ${glPackageBaseCommonCBean}.${glConditionBeanInterfaceName}; + +/** + * The class of load referer option. + * + * @author ${database.ClassAuthor} + */ +public class ${glLoadRefererOptionName} { + + // =================================================================================== + // Attribute + // ========= + protected ${glConditionBeanSetupperName} _conditionBeanSetupper; + + protected ${glEntityListSetupperName} _entityListSetupper; + + protected REFERER_CONDITION_BEAN _reffererConditionBean; + + protected boolean _toLastKeyCondtion; + + protected boolean _stopOrderByKey; + + // =================================================================================== + // Constructor + // =========== + public ${glLoadRefererOptionName}() { + } + + public ${glLoadRefererOptionName}(${glConditionBeanSetupperName} conditionBeanSetupper) { + this._conditionBeanSetupper = conditionBeanSetupper; + } + + public ${glLoadRefererOptionName}(${glConditionBeanSetupperName} conditionBeanSetupper, ${glEntityListSetupperName} entityListSetupper) { + this._conditionBeanSetupper = conditionBeanSetupper; + this._entityListSetupper = entityListSetupper; + } + + // =================================================================================== + // Easy-to-Use + // =========== + /** + * Specify that the key condition is added as last condition.
+ * This method is valid only after you use reffererConditionBean and add your original condition to it.
+ * + * @return this. (NotNull) + */ + public ${glLoadRefererOptionName} toLastKeyCondtion() { + _toLastKeyCondtion = true; + return this; + } + + /** + * Specify that it stops adding order-by of the key.
+ * This method is valid only after you use reffererConditionBean and add your original order-by to it.
+ * + * @return this. (NotNull) + */ + public ${glLoadRefererOptionName} stopOrderByKey() { + _stopOrderByKey = true; + return this; + } + + public void delegateKeyConditionExchangingFirstWhereClauseForLastOne(REFERER_CONDITION_BEAN cb) {// Internal + if (!_toLastKeyCondtion) { + cb.getSqlClause().exchangeFirstWhereClauseForLastOne(); + } + } + + public void delegateConditionBeanSettingUp(REFERER_CONDITION_BEAN cb) {// Internal + if (_conditionBeanSetupper != null) { + _conditionBeanSetupper.setup(cb); + } + } + + public void delegateEntitySettingUp(java.util.List entityList) {// Internal + if (_entityListSetupper != null) { + _entityListSetupper.setup(entityList); + } + } + + // =================================================================================== + // Accessor + // ======== + public ${glConditionBeanSetupperName} getConditionBeanSetupper() { + return _conditionBeanSetupper; + } + + public void setConditionBeanSetupper(${glConditionBeanSetupperName} conditionBeanSetupper) { + this._conditionBeanSetupper = conditionBeanSetupper; + } + + public ${glEntityListSetupperName} getEntityListSetupper() { + return _entityListSetupper; + } + + public void setEntityListSetupper(${glEntityListSetupperName} entityListSetupper) { + this._entityListSetupper = entityListSetupper; + } + + public REFERER_CONDITION_BEAN getReffererConditionBean() { + return _reffererConditionBean; + } + + public void setReffererConditionBean(REFERER_CONDITION_BEAN reffererConditionBean) { + this._reffererConditionBean = reffererConditionBean; + } + + public boolean isToLastKeyCondtion() { + return _toLastKeyCondtion; + } + + public boolean isStopOrderByKey() { + return _stopOrderByKey; + } +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/bhv/setup/ConditionBeanSetupper.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/bhv/setup/ConditionBeanSetupper.vm 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/bhv/setup/ConditionBeanSetupper.vm 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,18 @@ +package ${glPackageBaseCommonBhvSetup}; + +import ${glPackageBaseCommonCBean}.${glConditionBeanInterfaceName}; + +/** + * The interface of condition-bean setupper. + * + * @author ${database.ClassAuthor} + */ +public interface ${glConditionBeanSetupperName} { + + /** + * Set up condition. + * + * @param cb Condition-bean. (NotNull) + */ + public void setup(CONDITION_BEAN cb); +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/bhv/setup/EntityListSetupper.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/bhv/setup/EntityListSetupper.vm 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/bhv/setup/EntityListSetupper.vm 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,18 @@ +package ${glPackageBaseCommonBhvSetup}; + +import ${glPackageBaseCommon}.${glEntityInterfaceName}; + +/** + * The interface of entity list setupper. + * + * @author ${database.ClassAuthor} + */ +public interface ${glEntityListSetupperName} { + + /** + * Set up entity list. + * + * @param entityList Entity list. (NotNull) + */ + public void setup(java.util.List entityList); +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/bhv/setup/ValueLabelBox.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/bhv/setup/ValueLabelBox.vm 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/bhv/setup/ValueLabelBox.vm 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,26 @@ +package ${glPackageBaseCommonBhvSetup}; + +/** + * The class of Value-Label Box. + * + * @author ${database.ClassAuthor} + */ +public class ${glValueLabelBoxName} { + + protected Object _value; + + protected String _label; + + public void setValueLabel(Object value, String label) { + this._value = value; + this._label = label; + } + + public Object getValue() { + return _value; + } + + public String getLabel() { + return _label; + } +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/bhv/setup/ValueLabelSetupper.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/bhv/setup/ValueLabelSetupper.vm 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/bhv/setup/ValueLabelSetupper.vm 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,17 @@ +package ${glPackageBaseCommonBhvSetup}; + +/** + * The interface of Value-Label Setupper. + * + * @author ${database.ClassAuthor} + */ +public interface ${glValueLabelSetupperName} { + + /** + * Set up value-label. + * + * @param box Value-label box. (NotNull) + * @param entity Entity. (NotNull) + */ + public void setup(${glValueLabelBoxName} box, T entity); +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/AbstractConditionBean.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/AbstractConditionBean.vm 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/AbstractConditionBean.vm 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,549 @@ +package ${glPackageBaseCommonCBean}; + +#set ($myClassName = "${glConditionBeanAbstractName}") + +import ${glPackageBaseCommonCBean}.${glConditionBeanContextName}; +import ${glPackageBaseCommonDBMeta}.${glDBMetaInterfaceName}; +import ${glPackageBaseCommonDBMeta}.${glDBMetaInstanceHandlerName}; +import ${glPackageBaseCommonHelper}.${glMapListStringName}; +import ${glPackageBaseCommonHelper}.${glMapListStringImplName}; +import ${glPackageBaseCommonSqlClause}.${glOrderByClauseName}; +import ${glPackageBaseCommonSqlClause}.${glSqlClauseName}; + +/** + * The condition-bean as abstract. + * + * @author ${database.ClassAuthor} + */ +public abstract class $myClassName implements ${glConditionBeanInterfaceName} { + + // ===================================================================================== + // Attribute + // ========= + /** SQL clause instance. */ + protected final ${glSqlClauseName} _sqlClause; + { + _sqlClause = ${glConditionBeanContextName}.createSqlClause(this); + } + + // ===================================================================================== + // Sql-Clause + // ========== + /** + * ${database.ImplementComment} + * + * @return Sql clause. (NotNull) + */ + public ${glSqlClauseName} getSqlClause() { + return _sqlClause; + } + + // ===================================================================================== + // Condition-Query + // =============== + /** + * Get condition query as interface. + * + * @return Instance of query as interface. (NotNull) + */ + abstract public ${glConditionQueryInterfaceName} getConditionQueryAsInterface(); + + // ===================================================================================== + // Accept Primary-Key + // ================== + /** + * ${database.ImplementComment} + * + * @param primaryKeyMapString Primary-key map. (NotNull and NotEmpty) + */ + public void acceptPrimaryKeyMapString(String primaryKeyMapString) { + if (primaryKeyMapString == null) { + String msg = "The argument[primaryKeyMapString] must not be null."; + throw new IllegalArgumentException(msg); + } + final String prefix = MAP_STRING_MAP_MARK + MAP_STRING_START_BRACE; + final String suffix = MAP_STRING_END_BRACE; + if (!primaryKeyMapString.trim().startsWith(prefix)) { + primaryKeyMapString = prefix + primaryKeyMapString; + } + if (!primaryKeyMapString.trim().endsWith(suffix)) { + primaryKeyMapString = primaryKeyMapString + suffix; + } + ${glMapListStringName} mapListString = new ${glMapListStringImplName}(); + mapListString.setMapMark(MAP_STRING_MAP_MARK); + mapListString.setListMark(MAP_STRING_LIST_MARK); + mapListString.setDelimiter(MAP_STRING_DELIMITER); + mapListString.setStartBrace(MAP_STRING_START_BRACE); + mapListString.setEndBrace(MAP_STRING_END_BRACE); + mapListString.setEqual(MAP_STRING_EQUAL); + acceptPrimaryKeyMap(mapListString.generateMap(primaryKeyMapString)); + } + + protected void checkTypeString(Object value, String propertyName, String typeName) { + if (value == null) { + throw new IllegalArgumentException("The value should not be null: " + propertyName); + } + if (!(value instanceof String)) { + String msg = "The value of " + propertyName + " should be " + typeName + " or String: "; + msg = msg + "valueType=" + value.getClass() + " value=" + value; + throw new IllegalArgumentException(msg); + } + } + + protected long parseDateString(Object value, String propertyName, String typeName) { + checkTypeString(value, propertyName, typeName); + try { + return getDateFormat().parse((String)value).getTime(); + } catch (java.text.ParseException e) { + String msg = "The value of " + propertyName + " should be " + typeName + ". but: " + value; + throw new RuntimeException(msg + " threw the exception: value=[" + value + "]", e); + } catch (RuntimeException e) { + String msg = "The value of " + propertyName + " should be " + typeName + ". but: " + value; + throw new RuntimeException(msg + " threw the exception: value=[" + value + "]", e); + } + } + + protected java.text.DateFormat getDateFormat() { + return new java.text.SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS"); + } + + // ===================================================================================== + // Fetch-Narrowing + // =============== + /** + * ${database.ImplementComment} + * + * @return Fetch start index. + */ + public int getFetchNarrowingSkipStartIndex() { + return getSqlClause().getFetchNarrowingSkipStartIndex(); + } + + /** + * ${database.ImplementComment} + * + * @return Fetch size. + */ + public int getFetchNarrowingLoopCount() { + return getSqlClause().getFetchNarrowingLoopCount(); + } + + /** + * ${database.ImplementComment} + * + * @return Determination. + */ + public boolean isFetchNarrowingSkipStartIndexEffective() { + return !getSqlClause().isFetchStartIndexSupported(); + } + + /** + * ${database.ImplementComment} + * + * @return Determination. + */ + public boolean isFetchNarrowingLoopCountEffective() { + return !getSqlClause().isFetchSizeSupported(); + } + + /** + * ${database.ImplementComment} + * + * @return Determiantion. + */ + public boolean isFetchNarrowingEffective() { + return getSqlClause().isFetchNarrowingEffective(); + } + + // ===================================================================================== + // Paging + // ====== + /** + * ${database.ImplementComment} + * + * @param fetchSize Fetch-size. (NotMinus & NotZero) + * @return this. (NotNUll) + */ + public ${glPagingBeanInterfaceName} fetchFirst(int fetchSize) { + getSqlClause().fetchFirst(fetchSize); + return this; + } + + /** + * ${database.ImplementComment} + * + * @param fetchStartIndex Fetch-start-index. 0 origin. (NotMinus) + * @param fetchSize Fetch-size. (NotMinus & NotZero) + * @return this. (NotNUll) + */ + public ${glPagingBeanInterfaceName} fetchScope(int fetchStartIndex, int fetchSize) { + getSqlClause().fetchScope(fetchStartIndex, fetchSize); + return this; + } + + /** + * ${database.ImplementComment} + * + * @param fetchPageNumber Fetch-page-number. 1 origin. (NotMinus & NotZero) + * @return this. (NotNull) + */ + public ${glPagingBeanInterfaceName} fetchPage(int fetchPageNumber) { + getSqlClause().fetchPage(fetchPageNumber); + return this; + } + + /** + * ${database.ImplementComment} + * + * @return Fetch-start-index. + */ + public int getFetchStartIndex() { + return getSqlClause().getFetchStartIndex(); + } + + /** + * ${database.ImplementComment} + * + * @return Fetch-size. + */ + public int getFetchSize() { + return getSqlClause().getFetchSize(); + } + + /** + * ${database.ImplementComment} + * + * @return Fetch-page-number. + */ + public int getFetchPageNumber() { + return getSqlClause().getFetchPageNumber(); + } + + /** + * ${database.ImplementComment} + * + * @return Page start index. 0 origin. (NotMinus) + */ + public int getPageStartIndex() { + return getSqlClause().getPageStartIndex(); + } + + /** + * ${database.ImplementComment} + * + * @return Page end index. 0 origin. (NotMinus) + */ + public int getPageEndIndex() { + return getSqlClause().getPageEndIndex(); + } + + /** + * Is fetch scope effective? + * + * @return Determiantion. + */ + public boolean isFetchScopeEffective() { + return getSqlClause().isFetchScopeEffective(); + } + + // ===================================================================================== + // Order-By + // ======== + /** + * ${database.ImplementComment} + * + * @return Sql component of order-by clause. (NotNull) + */ + public ${glOrderByClauseName} getSqlComponentOfOrderByClause() { + return getSqlClause().getSqlComponentOfOrderByClause(); + } + + /** + * ${database.ImplementComment} + * + * @return Order-by clause. (NotNull) + */ + public String getOrderByClause() { + return _sqlClause.getOrderByClause(); + } + + /** + * ${database.ImplementComment} + * + * @return this. (NotNull) + */ + public ${glOrderByBeanInterfaceName} clearOrderBy() { + getSqlClause().clearOrderBy(); + return this; + } + + /** + * ${database.ImplementComment} + * + * @return this. (NotNull) + */ + public ${glOrderByBeanInterfaceName} ignoreOrderBy() { + getSqlClause().ignoreOrderBy(); + return this; + } + + /** + * ${database.ImplementComment} + * + * @return this. (NotNull) + */ + public ${glOrderByBeanInterfaceName} makeOrderByEffective() { + getSqlClause().makeOrderByEffective(); + return this; + } + + /** + * Register order-by-asc. + * + * @param orderByProperty Order-by-property. 'aliasName.columnName/aliasName.columnName/...' (NotNull) + * @return this. (NotNull) + */ + public ${glOrderByBeanInterfaceName} registerOrderByAsc(String orderByProperty) { + getSqlClause().registerOrderBy(filterOrderByProperty(orderByProperty), orderByProperty, true); + return this; + } + + /** + * Register order-by-desc. + * + * @param orderByProperty Order-by-property. 'aliasName.columnName/aliasName.columnName/...' (NotNull) + * @return this. (NotNull) + */ + public ${glOrderByBeanInterfaceName} registerOrderByDesc(String orderByProperty) { + getSqlClause().registerOrderBy(filterOrderByProperty(orderByProperty), orderByProperty, false); + return this; + } + + /** + * Reverse order-by or Override order-by asc. + * + * @param orderByProperty Order-by-property. 'aliasName.columnName/aliasName.columnName/...' (NotNull) + * @return this. (NotNull) + */ + public ${glOrderByBeanInterfaceName} reverseOrderBy_Or_OverrideOrderByAsc(String orderByProperty) { + getSqlClause().reverseOrderBy_Or_OverrideOrderBy(filterOrderByProperty(orderByProperty), orderByProperty, true); + return this; + } + + /** + * Reverse order-by or Override order-by desc. + * + * @param orderByProperty Order-by-property. 'aliasName.columnName/aliasName.columnName/...' (NotNull) + * @return this. (NotNull) + */ + public ${glOrderByBeanInterfaceName} reverseOrderBy_Or_OverrideOrderByDesc(String orderByProperty) { + getSqlClause().reverseOrderBy_Or_OverrideOrderBy(filterOrderByProperty(orderByProperty), orderByProperty, false); + return this; + } + + protected String filterOrderByProperty(String orderByProperty) { + final java.util.List${database.filterGenericsString('String')} orderBySlashList = new java.util.ArrayList${database.filterGenericsString('String')}(); + { + final java.util.StringTokenizer st = new java.util.StringTokenizer(orderByProperty, "/"); + while (st.hasMoreElements()) { + orderBySlashList.add(st.nextToken()); + } + } + + final StringBuffer sb = new StringBuffer(); + ${glDBMetaInterfaceName} dbmeta = ${glDBMetaInstanceHandlerName}.getInstanceByTableDbName(getTableDbName()); + ${glConditionQueryInterfaceName} query = this.getConditionQueryAsInterface(); + for (final java.util.Iterator ite = orderBySlashList.iterator(); ite.hasNext(); ) { + final String orderBySlashElement = (String)ite.next(); + final java.util.List${database.filterGenericsString('String')} orderByDotList = new java.util.ArrayList${database.filterGenericsString('String')}(); + { + final java.util.StringTokenizer st = new java.util.StringTokenizer(orderBySlashElement, "/"); + while (st.hasMoreElements()) { + orderByDotList.add(st.nextToken()); + } + } + + if (orderByDotList.size() == 1) { + if (dbmeta.isExistMultiName(orderBySlashElement)) { + sb.append("/").append(query.getRealColumnName(dbmeta.getDbNameByMultiName(orderBySlashElement))); + } else { + sb.append("/").append(orderBySlashElement); + } + } else { + ${glDBMetaInterfaceName} foreignDBMeta = dbmeta; + ${glConditionQueryInterfaceName} foreignQuery = query; + int count = 0; + for (final java.util.Iterator ite2 = orderByDotList.iterator(); ite2.hasNext(); ) { + String orderByDotElement = (String)ite2.next(); + count++; + + if (orderByDotList.size() == count) {// Last Loop! + if (!foreignDBMeta.isExistMultiName(orderByDotElement)) { + String msg = "The name for order-by is not existing: name=" + orderByDotElement; + msg = msg + " orderBySlashElement=" + orderBySlashElement + " orderByProperty=" + orderByProperty; + throw new IllegalStateException(msg); + } + sb.append("/").append(foreignQuery.getRealColumnName(foreignDBMeta.getDbNameByMultiName(orderByDotElement))); + break; + } + + foreignDBMeta = foreignDBMeta.getForeignDBMeta(orderByDotElement); + foreignQuery = foreignQuery.getForeignConditionQuery(orderByDotElement); + } + } + } + sb.delete(0, "/".length()); + return sb.toString(); + } + + // ===================================================================================== + // Limit-Select + // ============ + /** Is limit-select PK only? */ + protected boolean _isLimitSelectPKOnly; + + /** + * Is limit-select PK only? + * + * @return Determination. + */ + public boolean isLimitSelect_PKOnly() { + return _isLimitSelectPKOnly; + } + + /** + * Limit select PK only. + * + * @return this. (NotNull) + */ + public ${glConditionBeanInterfaceName} limitSelect_PKOnly() { + _isLimitSelectPKOnly = true; + return this; + } + + /** + * Limit select off. + * + * @return this. (NotNull) + */ + public ${glConditionBeanInterfaceName} limitSelect_Off() { + _isLimitSelectPKOnly = false; + return this; + } + + // ===================================================================================== + // Advance + // ======= + /** + * ${database.ImplementComment} + * + * @return this. (NotNull) + */ + public ${glConditionBeanInterfaceName} lockForUpdate() { + getSqlClause().lockForUpdate(); + return this; + } + + // ===================================================================================== + // For SqlComment + // ============== + /** + * Get select-hint. {select [select-hint] * from table...} + * + * @return select-hint. (NotNull) + */ + public String getSelectHint() { + return getSqlClause().getSelectHint(); + } + + /** + * Get from-base-table-hint. {select * from table [from-base-table-hint] where ...} + * + * @return from-base-table-hint. (NotNull) + */ + public String getFromBaseTableHint() { + return getSqlClause().getFromBaseTableHint(); + } + + /** + * Get from-hint. {select * from table left outer join ... on ... [from-hint] where ...} + * + * @return from-hint. (NotNull) + */ + public String getFromHint() { + return getSqlClause().getFromHint(); + } + + /** + * Get where clause. + * + * @return Where clause. (NotNull) + */ + public String getWhereClause() { + return getSqlClause().getWhereClause(); + } + + /** + * Get sql-suffix. {select * from table where ... order by ... [sql-suffix]} + * + * @return Sql-suffix. (NotNull) + */ + public String getSqlSuffix() { + return getSqlClause().getSqlSuffix(); + } + + // ------------------------------ + // for Internal + // ------------ + /** + * Set up various things for select-count-ignore-fetch-scope. {Internal} + * This method is for INTERNAL. Don't invoke this! + * + * @return this. (NotNull) + */ + public ${glConditionBeanInterfaceName} xsetupSelectCountIgnoreFetchScope() { + _isSelectCountIgnoreFetchScope = true; + + // If the query uses union query, it needs included-select-column. + if (!hasUnionQueryOrUnionAllQuery()) { + getSqlClause().ignoreIncludedSelectColumn(); + } + + getSqlClause().ignoreOrderBy(); + getSqlClause().ignoreFetchScope(); + return this; + } + + /** + * Do after-care for select-count-ignore-fetch-scope. {Internal} + * This method is for INTERNAL. Don't invoke this! + * + * @return this. (NotNull) + */ + public ${glConditionBeanInterfaceName} xafterCareSelectCountIgnoreFetchScope() { + _isSelectCountIgnoreFetchScope = false; + + // If the query uses union query, it needs included-select-column. + if (!hasUnionQueryOrUnionAllQuery()) { + getSqlClause().makeIncludedSelectColumnEffective(); + } + + getSqlClause().makeOrderByEffective(); + getSqlClause().makeFetchScopeEffective(); + return this; + } + + /** Is set up various things for select-count-ignore-fetch-scope? */ + protected boolean _isSelectCountIgnoreFetchScope; + + /** + * Is set up various things for select-count-ignore-fetch-scope? + * This method is for INTERNAL. Don't invoke this! + * + * @return Determination. + */ + public boolean isSelectCountIgnoreFetchScope() { + return _isSelectCountIgnoreFetchScope; + } + +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/AbstractConditionQuery.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/AbstractConditionQuery.vm 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/AbstractConditionQuery.vm 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,788 @@ +package ${glPackageBaseCommonCBean}; + +#set ($myClassName = "${glConditionQueryAbstractName}") + +import ${glPackageBaseCommonCKey}.${glConditionKeyName}; +import ${glPackageBaseCommonCOption}.${glConditionOptionInterfaceName}; +import ${glPackageBaseCommonCOption}.${glConditionOptionFromToName}; +import ${glPackageBaseCommonCOption}.${glConditionOptionLikeSearchName}; +import ${glPackageBaseCommonCOption}.${glConditionOptionInScopeName}; +import ${glPackageBaseCommonCValue}.${glConditionValueName}; +import ${glPackageBaseCommonDBMeta}.${glDBMetaInterfaceName}; +import ${glPackageBaseCommonDBMeta}.${glDBMetaInstanceHandlerName}; +import ${glPackageBaseCommonSqlClause}.${glSqlClauseName}; + +/** + * The abstract class of condition-query. + * + * @author ${database.ClassAuthor} + */ +public abstract class ${myClassName} implements ${glConditionQueryInterfaceName} { + + // ===================================================================================== + // Attribute + // ========= + /** Condition value for DUMMY. */ + protected static final ${glConditionValueName} DUMMY_CONDITION_VALUE = new ${glConditionValueName}(); + + /** Object for DUMMY. */ + protected static final Object DUMMY_OBJECT = new Object(); + + /** SQL clause. */ + protected final ${glSqlClauseName} _sqlClause; + + /** My alias name. */ + protected final String _aliasName; + + /** Nest level. */ + protected final int _nestLevel; + + /** Child query. */ + protected final ${glConditionQueryInterfaceName} _childQuery; + + // ===================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param childQuery Child query. (Nullable: If null, this is base instance.) + * @param sqlClause SQL clause instance. (NotNull) + * @param aliasName My alias name. (NotNull) + * @param nestLevel Nest level. + */ + public ${myClassName}(${glConditionQueryInterfaceName} childQuery, ${glSqlClauseName} sqlClause, String aliasName, int nestLevel) { + _childQuery = childQuery; + _sqlClause = sqlClause; + _aliasName = aliasName; + _nestLevel = nestLevel; + } + + // ===================================================================================== + // Accessor + // ======== + /** + * Get child query. + * + * @return Child query. (Nullable) + */ + public ${glConditionQueryInterfaceName} getChildQuery() { + return _childQuery; + } + + /** + * Get sql clause. + * + * @return Sql clause. (NotNull) + */ + public ${glSqlClauseName} getSqlClause() { + return _sqlClause; + } + + /** + * Get alias name. + * + * @return Alias name. (NotNull) + */ + public String getAliasName() { + return _aliasName; + } + + /** + * Get nest level. + * + * @return Nest level. + */ + public int getNestLevel() { + return _nestLevel; + } + + /** + * Get next nest level. + * + * @return Next nest level. + */ + public int getNextNestLevel() { + return _nestLevel+1; + } + + /** + * Is base query? + * + * @param query Condition query. (NotNull) + * @return Determination. + */ + public boolean isBaseQuery(${glConditionQueryInterfaceName} query) { + return (query.getChildQuery() == null); + } + + // ===================================================================================== + // Real Name + // ========= + /** + * Get real alias name(that has nest level mark). + * + * @return Real alias name. + */ + public String getRealAliasName() { + if (getNestLevel() > 1) { + return getAliasName() + "_n" + getNestLevel(); + } else { + return getAliasName(); + } + } + + /** + * Get real column name(with real alias name). + * + * @param columnName Column name without alias name. This should not contain comma. (NotNull) + * @return Real column name. + */ + public String getRealColumnName(String columnName) { + assertColumnName(columnName); + return getRealAliasName() + "." + columnName; + } + + // ===================================================================================== + // Location + // ======== + /** + * Get location. + * + * @param columnPropertyName Column property name. + * @param key Condition key. + * @return Next nest level. + */ + protected String getLocation(String columnPropertyName, ${glConditionKeyName} key) { + return getLocationBase(columnPropertyName) + "." + key.getConditionKey(); + } + + protected String getLocationBase() { + final StringBuffer sb = new StringBuffer(); + ${glConditionQueryInterfaceName} query = this; + while (true) { + if (query.isBaseQuery(query)) { + sb.insert(0, "conditionQuery."); + break; + } else { + sb.insert(0, "conditionQuery" + query.getAliasName() + "."); + } + query = query.getChildQuery(); + } + return sb.toString(); + } + + protected String getLocationBase(String columnPropertyName) { + return getLocationBase() + columnPropertyName; + } +#set ($unionQueryGenericsString = "String, ${glConditionQueryInterfaceName}") + + // ===================================================================================== + // Union-Query + // =========== + protected java.util.Map${database.filterGenericsString(${unionQueryGenericsString})} _unionQueryMap = new java.util.LinkedHashMap${database.filterGenericsString(${unionQueryGenericsString})}(); + + public java.util.Map${database.filterGenericsString(${unionQueryGenericsString})} getUnionQueryMap() {// for Internal + return _unionQueryMap; + } + + /** + * Set union query. {Internal} + *
+     * Add union query to condition bean.
+     * 
+ * @param unionQuery Union query. (NotNull) + */ + public void xsetUnionQuery(${glConditionQueryInterfaceName} unionQuery) { + xsetupUnion(unionQuery, false, _unionQueryMap); + } + + protected java.util.Map${database.filterGenericsString(${unionQueryGenericsString})} _unionAllQueryMap = new java.util.LinkedHashMap${database.filterGenericsString(${unionQueryGenericsString})}(); + + public java.util.Map${database.filterGenericsString(${unionQueryGenericsString})} getUnionAllQueryMap() {// for Internal + return _unionAllQueryMap; + } + + /** + * Set union all query. {Internal} + *
+     * Add union all query to condition bean.
+     * 
+ * @param unionAllQuery Union all query. (NotNull) + */ + public void xsetUnionAllQuery(${glConditionQueryInterfaceName} unionAllQuery) { + xsetupUnion(unionAllQuery, true, _unionAllQueryMap); + } + + protected void xsetupUnion(${glConditionQueryInterfaceName} unionQuery, boolean unionAll, java.util.Map${database.filterGenericsString(${unionQueryGenericsString})} unionQueryMap) { + if (unionQuery == null) { + String msg = "The argument[unionQuery] should not be null."; + throw new IllegalArgumentException(msg); + } + reflectRelationOnUnionQuery(this, unionQuery);// Reflect Relation! + getSqlClause().copyIncludedSelectColumn(unionQuery.getSqlClause());// Reflect IncludedSelectColumn! + final String key = (unionAll ? "unionAllQuery" : "unionQuery") + unionQueryMap.size(); + unionQueryMap.put(key, unionQuery); + registerUnionQuery(unionQuery, unionAll, (unionAll ? "unionAllQueryMap" : "unionQueryMap") + "." + key); + } + + abstract protected void reflectRelationOnUnionQuery(${glConditionQueryInterfaceName} baseQueryAsSuper, ${glConditionQueryInterfaceName} unionQueryAsSuper); + + public boolean hasUnionQueryOrUnionAllQuery() { + return !_unionQueryMap.isEmpty() || !_unionAllQueryMap.isEmpty(); + } + + public java.util.List${database.filterGenericsString(${glConditionQueryInterfaceName})} getUnionQueryList() { + return new java.util.ArrayList${database.filterGenericsString(${glConditionQueryInterfaceName})}(_unionQueryMap.values()); + } + + public java.util.List${database.filterGenericsString(${glConditionQueryInterfaceName})} getUnionAllQueryList() { + return new java.util.ArrayList${database.filterGenericsString(${glConditionQueryInterfaceName})}(_unionAllQueryMap.values()); + } + + // ===================================================================================== + // Include-As-Mine + // =============== + /** + * Register included-select-column. + * + * @param aliasName Alias name. This should not contain comma. (NotNull) + * @param realColumnName Real column name. This should not contain comma. (NotNull) + */ + protected void registerIncludedSelectColumn(String aliasName, String realColumnName) { + assertAliasName(aliasName); + assertColumnName(realColumnName); + getSqlClause().registerIncludedSelectColumn(aliasName, realColumnName); + } + + // ===================================================================================== + // Register + // ======== + // ---------------------------------------- + // Normal + // ------ + protected void registerQuery(${glConditionKeyName} key, Object value, ${glConditionValueName} cvalue + , String colName, String capPropName, String uncapPropName) { + if (key.isValidRegistration(cvalue, value, key.getConditionKey() + " of " + getRealAliasName() + "." + uncapPropName)) { + setupConditionValueAndRegisterWhereClause(key, value, cvalue, colName, capPropName, uncapPropName); + } + } + + protected void registerQuery(${glConditionKeyName} key, Object value, ${glConditionValueName} cvalue + , String colName, String capPropName, String uncapPropName, ${glConditionOptionInterfaceName} option) { + if (key.isValidRegistration(cvalue, value, key.getConditionKey() + " of " + getRealAliasName() + "." + uncapPropName)) { + setupConditionValueAndRegisterWhereClause(key, value, cvalue, colName, capPropName, uncapPropName, option); + } + } + + // ---------------------------------------- + // FromTo + // ------ + protected void registerFromToQuery(java.util.Date fromDate, java.util.Date toDate, ${glConditionValueName} cvalue + , String colName, String capPropName, String uncapPropName, ${glConditionOptionFromToName} option) { + { + final java.util.Date filteredFromDate = option.filterFromDate(fromDate); + final ${glConditionKeyName} fromKey = option.getFromDateConditionKey(); + if (fromKey.isValidRegistration(cvalue, filteredFromDate, fromKey.getConditionKey() + " of " + getRealAliasName() + "." + uncapPropName)) { + setupConditionValueAndRegisterWhereClause(fromKey, filteredFromDate, cvalue, colName, capPropName, uncapPropName); + } + } + { + final java.util.Date filteredToDate = option.filterToDate(toDate); + final ${glConditionKeyName} toKey = option.getToDateConditionKey(); + if (toKey.isValidRegistration(cvalue, filteredToDate, toKey.getConditionKey() + " of " + getRealAliasName() + "." + uncapPropName)) { + setupConditionValueAndRegisterWhereClause(toKey, filteredToDate, cvalue, colName, capPropName, uncapPropName); + } + } + } +#set ($likeAsOrCallbackFullClassName = "${glConditionOptionLikeSearchName}.LikeAsOrCallback") + + // ---------------------------------------- + // LikeSearch + // ---------- + protected void registerLikeSearchQuery(${glConditionKeyName} key, String value, ${glConditionValueName} cvalue + , String colName, String capPropName, String uncapPropName, ${glConditionOptionLikeSearchName} option) { + if (key.isValidRegistration(cvalue, value, key.getConditionKey() + " of " + getRealAliasName() + "." + uncapPropName)) { + if (value != null && option.isSplit()) { + final String[] strArray = option.generateSplitValueArray(value); + for (int i=0; i < strArray.length; i++) { + final String currentValue = strArray[i]; + setupConditionValueAndRegisterWhereClause(key, currentValue, cvalue, colName, capPropName, uncapPropName, option); + + // Callback for LikeAsOr! + final java.util.List${database.filterGenericsString(${likeAsOrCallbackFullClassName})} callbackList = option.getLikeAsOrCallbackList(); + if (!callbackList.isEmpty()) { + getSqlClause().makeAdditionalConditionAsOrEffective(); + for (java.util.Iterator ite = callbackList.iterator(); ite.hasNext(); ) { + final ${likeAsOrCallbackFullClassName} likeAsOrCallback = (${likeAsOrCallbackFullClassName})ite.next(); + final String additionalTargetPropertyName = likeAsOrCallback.getAdditionalTargetPropertyName(); + final String filteredValue = likeAsOrCallback.filterValue(currentValue); + final ${glConditionOptionLikeSearchName} optionDeepCopy = (${glConditionOptionLikeSearchName})option.createDeepCopy(); + optionDeepCopy.clearLikeAsOrCallback(); + final ${glConditionOptionLikeSearchName} filteredOption = likeAsOrCallback.filterOption(optionDeepCopy); + invokeSetterLikeSearch(additionalTargetPropertyName, filteredValue, filteredOption); + } + getSqlClause().ignoreAdditionalConditionAsOr(); + } + } + } else { + setupConditionValueAndRegisterWhereClause(key, value, cvalue, colName, capPropName, uncapPropName, option); + } + } + } + + // ---------------------------------------- + // InScope + // ------- + protected void registerInScopeQuery(${glConditionKeyName} key, String value, ${glConditionValueName} cvalue + , String colName, String capPropName, String uncapPropName, ${glConditionOptionInScopeName} option) { + if (key.isValidRegistration(cvalue, value, key.getConditionKey() + " of " + getRealAliasName() + "." + uncapPropName)) { + if (value != null && option.isSplit()) { + final String[] strArray = option.generateSplitValueArray(value); + final java.util.List${database.filterGenericsString('String')} realValueList = new java.util.ArrayList${database.filterGenericsString('String')}(); + for (int i=0; i < strArray.length; i++) { + final String currentValue = strArray[i]; + realValueList.add(currentValue); + } + setupConditionValueAndRegisterWhereClause(key, realValueList, cvalue, colName, capPropName, uncapPropName, option); + } else { + setupConditionValueAndRegisterWhereClause(key, value, cvalue, colName, capPropName, uncapPropName, option); + } + } + } + + protected void setupConditionValueAndRegisterWhereClause(${glConditionKeyName} key, Object value, ${glConditionValueName} cvalue + , String colName, String capPropName, String uncapPropName) { + key.setupConditionValue(cvalue, value, getLocation(uncapPropName, key));// If Java, UncapProp! + getSqlClause().registerWhereClause(getRealColumnName(colName), key, cvalue); + } + + protected void setupConditionValueAndRegisterWhereClause(${glConditionKeyName} key, Object value, ${glConditionValueName} cvalue + , String colName, String capPropName, String uncapPropName, ${glConditionOptionInterfaceName} option) { + key.setupConditionValue(cvalue, value, getLocation(uncapPropName, key), option);// If Java, UncapProp! + getSqlClause().registerWhereClause(getRealColumnName(colName), key, cvalue, option); + } + + // ---------------------------------------- + // Inline + // ------ + protected void registerInlineQuery(${glConditionKeyName} key, Object value, ${glConditionValueName} cvalue + , String colName, String capPropName, String uncapPropName) { + if (key.isValidRegistration(cvalue, value, key.getConditionKey() + " of " + getRealAliasName() + "." + uncapPropName)) { + key.setupConditionValue(cvalue, value, getLocation(uncapPropName, key));// If Java, UncapProp! + if (isBaseQuery(this)) { + getSqlClause().registerBaseTableInlineWhereClause(colName, key, cvalue); + } else { + getSqlClause().registerOuterJoinInlineWhereClause(getRealAliasName(), colName, key, cvalue); + } + } + } + + protected void registerInlineQuery(${glConditionKeyName} key, Object value, ${glConditionValueName} cvalue + , String colName, String capPropName, String uncapPropName, ${glConditionOptionInterfaceName} option) { + if (key.isValidRegistration(cvalue, value, key.getConditionKey() + " of " + getRealAliasName() + "." + uncapPropName)) { + key.setupConditionValue(cvalue, value, getLocation(uncapPropName, key), option);// If Java, UncapProp! + if (isBaseQuery(this)) { + getSqlClause().registerBaseTableInlineWhereClause(colName, key, cvalue, option); + } else { + getSqlClause().registerOuterJoinInlineWhereClause(getRealAliasName(), colName, key, cvalue, option); + } + } + } + + // ---------------------------------------- + // InScopeSubQuery + // --------------- + protected void registerInScopeSubQuery(${glConditionQueryInterfaceName} subQuery + , String columnName, String relatedColumnName, String propertyName) { + final String realColumnName = getRealColumnName(columnName); + final String subQueryClause = getInScopeSubQuerySql(subQuery, relatedColumnName, propertyName); + registerWhereClause(realColumnName + " in (" + subQueryClause + ")"); + } + + protected String getInScopeSubQuerySql(${glConditionQueryInterfaceName} subQuery + , String relatedColumnName, String propertyName) { + final String selectClause = "select " + subQuery.getAliasName() + "." + relatedColumnName; + String clause = subQuery.getSqlClause().getClauseWithoutIncludedOrderBySqlSuffix(); + clause = replaceString(clause, ".conditionQuery.", "." + getLocationBase(propertyName) + ".");// Very Important! + return replaceString(clause, ${glSqlClauseInterfaceName}.INCLUDE_SELECT_CLAUSE_MARK, selectClause); + } + + // ---------------------------------------- + // ExistsSubQuery + // -------------- + protected void registerExistsSubQuery(${glConditionQueryInterfaceName} subQuery + , String columnName, String relatedColumnName, String propertyName) { + final String realColumnName = getRealColumnName(columnName); + final String subQueryClause = getExistsSubQuerySql(subQuery, realColumnName, relatedColumnName, propertyName); + registerWhereClause("exists (" + subQueryClause + ")"); + } + + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + // *Unsupport ExistsSubQuery as inline because it's so dangerous. + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + protected String getExistsSubQuerySql(${glConditionQueryInterfaceName} subQuery + , String realColumnName, String relatedColumnName, String propertyName) { + final String selectClause = "select " + subQuery.getAliasName() + "." + relatedColumnName; + String clause = subQuery.getSqlClause().getClauseWithoutIncludedOrderBySqlSuffix(); + clause = replaceString(clause, ".conditionQuery.", "." + getLocationBase(propertyName) + ".");// Very Important! + final String parentCondition; + if (clause.contains("where")) { + parentCondition = " and " + relatedColumnName + " = " + realColumnName; + } else { + parentCondition = " where " + relatedColumnName + " = " + realColumnName; + } + return replaceString(clause + parentCondition, ${glSqlClauseInterfaceName}.INCLUDE_SELECT_CLAUSE_MARK, selectClause); + } + + protected void registerWhereClause(String whereClause) { + getSqlClause().registerWhereClause(whereClause); + } + + protected void registerInlineWhereClause(String whereClause) { + if (isBaseQuery(this)) { + getSqlClause().registerBaseTableInlineWhereClause(whereClause); + } else { + getSqlClause().registerOuterJoinInlineWhereClause(getRealAliasName(), whereClause); + } + } +#if ($database.isMakeDeprecated()) + + /** + * @param subQuery Sub query. (NotNull) + * @param columName Column name. (NotNull) + * @param relatedColumnName Related column name. (NotNull) + * @param propertyName Property name. (NotNull) + * @deprecated This method is deprecated. + */ + protected void registerInlineInScopeSubQuery(${glConditionQueryInterfaceName} subQuery + , String columnName, String relatedColumnName, String propertyName) { + final String subQueryClause = getInScopeSubQuerySql(subQuery, relatedColumnName, propertyName); + final String finalClause = columnName + " in (" + subQueryClause + ")"; + if (isBaseQuery(this)) { + getSqlClause().registerBaseTableInlineWhereClause(finalClause); + } else { + getSqlClause().registerOuterJoinInlineWhereClause(getRealAliasName(), finalClause); + } + } +#end + + // ---------------------------------------- + // UnionQuery + // ---------- + public void registerUnionQuery(${glConditionQueryInterfaceName} unionQuery, boolean unionAll, String unionQueryPropertyName) { + final String unionQueryClause = getUnionQuerySql(unionQuery, unionQueryPropertyName); + getSqlClause().registerUnionQuery(unionQueryClause, unionAll); + } + + protected String getUnionQuerySql(${glConditionQueryInterfaceName} unionQuery, String unionQueryPropertyName) { + final String selectClause = unionQuery.getSqlClause().getIncludedSelectColumnClause(); + final String queryClause = unionQuery.getSqlClause().getFromClause() + " " + unionQuery.getSqlClause().getWhereClause(); + final String oldStr = ".conditionQuery."; + final String newStr = ".conditionQuery." + unionQueryPropertyName + "."; + final String replacedClause = replaceString(queryClause, oldStr, newStr);// Very Important! + return selectClause + " " + replacedClause; + } + + // ===================================================================================== + // Invoke + // ====== + public ${glConditionValueName} invokeGetter(String columnMultiName) { + final ${glDBMetaInterfaceName} dbmeta = ${glDBMetaInstanceHandlerName}.getInstanceByTableDbName(getTableDbName()); + final String columnCapPropName = dbmeta.getCapPropNameByMultiName(columnMultiName); + String methodName = "get" + columnCapPropName; + java.lang.reflect.Method method = null; + try { + method = this.getClass().getMethod(methodName, new Class[]{}); + } catch (NoSuchMethodException e) { + String msg = "The columnMultiName is not existing in this table: columnMultiName=" + columnMultiName; + msg = msg + " tableName=" + getTableDbName() + " methodName=" + methodName; + throw new RuntimeException(msg, e); + } + try { + final Object result = method.invoke(this, new Object[]{}); + return (${glConditionValueName})result; + } catch (IllegalAccessException e) { + throw new RuntimeException(e); + } catch (java.lang.reflect.InvocationTargetException e) { + throw new RuntimeException(e.getCause()); + } + } + + public void invokeSetterEqual(String columnMultiName, Object value) { + invokeSetter(columnMultiName, value, "equal"); + } + + public void invokeSetterNotEqual(String columnMultiName, Object value) { + invokeSetter(columnMultiName, value, "notEqual"); + } + + public void invokeSetterGreaterThan(String columnMultiName, Object value) { + invokeSetter(columnMultiName, value, "greaterThan"); + } + + public void invokeSetterLessThan(String columnMultiName, Object value) { + invokeSetter(columnMultiName, value, "lessThan"); + } + + public void invokeSetterGreaterEqual(String columnMultiName, Object value) { + invokeSetter(columnMultiName, value, "greaterEqual"); + } + + public void invokeSetterLessEqual(String columnMultiName, Object value) { + invokeSetter(columnMultiName, value, "lessEqual"); + } + + protected void invokeSetter(String columnMultiName, Object value, String conditionKeyName) { + if (value == null) { + return; + } + final ${glDBMetaInterfaceName} dbmeta = ${glDBMetaInstanceHandlerName}.getInstanceByTableDbName(getTableDbName()); + final String columnCapPropName = dbmeta.getCapPropNameByMultiName(columnMultiName); + String methodName = "set" + columnCapPropName + "_" + conditionKeyName.substring(0, 1).toUpperCase() + conditionKeyName.substring(1); + java.lang.reflect.Method method = null; + try { + method = this.getClass().getMethod(methodName, new Class[]{value.getClass()}); + } catch (NoSuchMethodException e) { + String msg = "The columnMultiName is not existing in this table: columnMultiName=" + columnMultiName; + msg = msg + " tableName=" + getTableDbName() + " methodName=" + methodName; + throw new RuntimeException(msg, e); + } + try { + method.invoke(this, new Object[]{value}); + } catch (IllegalAccessException e) { + throw new RuntimeException(e); + } catch (java.lang.reflect.InvocationTargetException e) { + throw new RuntimeException(e.getCause()); + } + } + + protected void invokeSetterLikeSearch(String columnMultiName, Object value, ${glConditionOptionLikeSearchName} option) { + if (value == null) { + return; + } + final ${glDBMetaInterfaceName} dbmeta = ${glDBMetaInstanceHandlerName}.getInstanceByTableDbName(getTableDbName()); + final String columnCapPropName = dbmeta.getCapPropNameByMultiName(columnMultiName); + String methodName = "set" + columnCapPropName + "_" + "likeSearch".substring(0, 1).toUpperCase() + "likeSearch".substring(1); + java.lang.reflect.Method method = null; + try { + method = this.getClass().getMethod(methodName, new Class[]{value.getClass(), ${glConditionOptionLikeSearchName}.class}); + } catch (NoSuchMethodException e) { + String msg = "The columnMultiName is not existing in this table: columnMultiName=" + columnMultiName; + msg = msg + " tableName=" + getTableDbName() + " methodName=" + methodName; + throw new RuntimeException(msg, e); + } + try { + method.invoke(this, new Object[]{value, option}); + } catch (IllegalAccessException e) { + throw new RuntimeException(e); + } catch (java.lang.reflect.InvocationTargetException e) { + throw new RuntimeException(e.getCause()); + } + } + + public void invokeAddOrderByAsc(String columnMultiName) { + invokeOrderBy(columnMultiName, true); + } + + public void invokeAddOrderByDesc(String columnMultiName) { + invokeOrderBy(columnMultiName, false); + } + + protected void invokeOrderBy(String columnMultiName, boolean isAsc) { + String ascDesc = null; + if (isAsc) { + ascDesc = "Asc"; + } else { + ascDesc = "Desc"; + } + final ${glDBMetaInterfaceName} dbmeta = ${glDBMetaInstanceHandlerName}.getInstanceByTableDbName(getTableDbName()); + final String methodName = "addOrderBy_" + dbmeta.getCapPropNameByMultiName(columnMultiName) + "_" + ascDesc; + + java.lang.reflect.Method method = null; + try { + method = this.getClass().getMethod(methodName, new Class[]{}); + } catch (NoSuchMethodException e) { + String msg = "The columnMultiName is not existing in this table: columnMultiName=" + columnMultiName; + msg = msg + " tableName=" + getTableDbName() + " methodName=" + methodName; + throw new RuntimeException(msg, e); + } + try { + method.invoke(this, new Object[]{}); + } catch (IllegalAccessException e) { + throw new RuntimeException(e); + } catch (java.lang.reflect.InvocationTargetException e) { + throw new RuntimeException(e.getCause()); + } + } + + // ===================================================================================== + // Foreign Query + // ============= + /// + /// ${database.ImplementComment} + /// + /// Foreign-property-name(Both OK - InitCap or not). (NotNull) + /// Foreign condition-query as interface. + public ${glConditionQueryInterfaceName} getForeignConditionQuery(String foreignPropertyName) { + final String methodName = "query" + foreignPropertyName.substring(0, 1) + foreignPropertyName.substring(1); + java.lang.reflect.Method method = null; + try { + method = this.getClass().getMethod(methodName, new Class[]{}); + } catch (NoSuchMethodException e) { + String msg = "The foreignPropertyName is not existing in this table: foreignPropertyName=" + foreignPropertyName; + msg = msg + " tableName=" + getTableDbName() + " methodName=" + methodName; + throw new RuntimeException(msg, e); + } + try { + return (${glConditionQueryInterfaceName})method.invoke(this, new Object[]{}); + } catch (IllegalAccessException e) { + throw new RuntimeException(e); + } catch (java.lang.reflect.InvocationTargetException e) { + throw new RuntimeException(e.getCause()); + } + } + + // ===================================================================================== + // Helper + // ====== + + protected final String replaceString(String text, String fromText, String toText) { + if(text == null || fromText == null || toText == null) + return null; + StringBuffer buf = new StringBuffer(100); + int pos = 0; + int pos2 = 0; + do { + pos = text.indexOf(fromText, pos2); + if(pos == 0) { + buf.append(toText); + pos2 = fromText.length(); + } else + if(pos > 0) { + buf.append(text.substring(pos2, pos)); + buf.append(toText); + pos2 = pos + fromText.length(); + } else { + buf.append(text.substring(pos2)); + return buf.toString(); + } + } while(true); + } + + /** + * Filter removing empty-string. + * If the value is null or empty-string, returns null. + * + * @param value Query-value-string. (Nullable) + * @return Filtered value. (Nullable) + */ + protected String filterRemoveEmptyString(String value) { + return ((value != null && !"".equals(value)) ? value : null); + } + + /** + * Filter removing empty-string from the list. + * If the list is null or empty-string, returns null. + * + * @param ls List. (Nullable) + * @return Filtered list. (Nullable) + */ + protected java.util.List${database.filterGenericsString('String')} filterRemoveEmptyStringFromList(java.util.List${database.filterGenericsString('String')} ls) { + if (ls == null) { + return null; + } + java.util.List${database.filterGenericsString('String')} newList = new java.util.ArrayList${database.filterGenericsString('String')}(); + for (final java.util.Iterator ite = ls.iterator(); ite.hasNext(); ) { + final String str = (String)ite.next(); + if ("".equals(str)) { + continue; + } + newList.add(str); + } + return newList; + } + + // ---------------------------------------------------------------- + // Assert Object + // ------------- + /** + * Assert that the object is not null. + * + * @param variableName Variable name. (NotNull) + * @param value Value. (NotNull) + * @exception IllegalArgumentException + */ + protected void assertObjectNotNull(String variableName, Object value) { + if (variableName == null) { + String msg = "The value should not be null: variableName=" + variableName + " value=" + value; + throw new IllegalArgumentException(msg); + } + if (value == null) { + String msg = "The value should not be null: variableName=" + variableName; + throw new IllegalArgumentException(msg); + } + } + + /** + * Assert that the column-name is not null and is not emtpy and does not contain comma. + * + * @param columnName Column-name. (NotNull) + * @exception IllegalArgumentException + */ + protected void assertColumnName(String columnName) { + if (columnName == null) { + String msg = "The columnName should not be null."; + throw new IllegalArgumentException(msg); + } + if (columnName.trim().length() == 0) { + String msg = "The columnName should not be empty-string."; + throw new IllegalArgumentException(msg); + } + if (columnName.indexOf(",") >= 0) { + String msg = "The columnName should not contain comma ',': " + columnName; + throw new IllegalArgumentException(msg); + } + } + + /** + * Assert that the alias-name is not null and is not emtpy and does not contain comma. + * + * @param aliasName Alias-name. (NotNull) + * @exception IllegalArgumentException + */ + protected void assertAliasName(String aliasName) { + if (aliasName == null) { + String msg = "The aliasName should not be null."; + throw new IllegalArgumentException(msg); + } + if (aliasName.trim().length() == 0) { + String msg = "The aliasName should not be empty-string."; + throw new IllegalArgumentException(msg); + } + if (aliasName.indexOf(",") >= 0) { + String msg = "The aliasName should not contain comma ',': " + aliasName; + throw new IllegalArgumentException(msg); + } + } + + + // ---------------------------------------------------------------- + // Assert String + // ------------- + /** + * Assert that the entity is not null and not trimmed empty. + * + * @param variableName Variable name. (NotNull) + * @param value Value. (NotNull) + */ + protected void assertStringNotNullAndNotTrimmedEmpty(String variableName, String value) { + assertObjectNotNull("variableName", variableName); + assertObjectNotNull("value", value); + if (value.trim().length() ==0) { + String msg = "The value should not be empty: variableName=" + variableName + " value=" + value; + throw new IllegalArgumentException(msg); + } + } +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/ConditionBean.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/ConditionBean.vm 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/ConditionBean.vm 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,165 @@ +package ${glPackageBaseCommonCBean}; + +import ${glPackageBaseCommonSqlClause}.${glSqlClauseName}; + +/** + * The interface of condition-bean. + * + * @author ${database.ClassAuthor} + */ +public interface ${glConditionBeanInterfaceName} extends ${glPagingBeanInterfaceName} { + + // ===================================================================================== + // Definition + // ========== + /** Map-string map-mark. */ + public static final String MAP_STRING_MAP_MARK = "map:"; + + /** Map-string list-mark. */ + public static final String MAP_STRING_LIST_MARK = "list:"; + + /** Map-string start-brace. */ + public static final String MAP_STRING_START_BRACE = "${database.extractAcceptStartBrace}"; + + /** Map-string end-brace. */ + public static final String MAP_STRING_END_BRACE = "${database.extractAcceptEndBrace}"; + + /** Map-string delimiter. */ + public static final String MAP_STRING_DELIMITER = "${database.extractAcceptDelimiter}"; + + /** Map-string equal. */ + public static final String MAP_STRING_EQUAL = "${database.extractAcceptEqual}"; + + // ===================================================================================== + // Table Name + // ========== + /** + * Get table db-name. + * + * @return Table db-name. (NotNull) + */ + public String getTableDbName(); + + // ===================================================================================== + // Sql-Clause + // ========== + /** + * Get sql-clause instance. + * + * @return Sql-clause. (NotNull) + */ + public ${glSqlClauseName} getSqlClause(); + + // ===================================================================================== + // Primary-Key + // =========== + /** + * Accept primary-key map-string. + * + * @param primaryKeyMap Primary-key map. (NotNull and NotEmpty) + */ + public void acceptPrimaryKeyMap(java.util.Map${database.filterGenericsString('String, ? extends Object')} primaryKeyMap); + + /** + * Accept primary-key map-string. Delimiter is at-mark and semicolon. + * + * @param primaryKeyMapString Primary-key map. (NotNull and NotEmpty) + */ + public void acceptPrimaryKeyMapString(String primaryKeyMapString); + + // ===================================================================================== + // Order-By + // ======== + /** + * Add order-by PrimaryKey asc. {order by primaryKey1 asc, primaryKey2 asc...} + * + * @return this. (NotNull) + */ + public ${glConditionBeanInterfaceName} addOrderBy_PK_Asc(); + + /** + * Add order-by PrimaryKey desc. {order by primaryKey1 desc, primaryKey2 desc...} + * + * @return this. (NotNull) + */ + public ${glConditionBeanInterfaceName} addOrderBy_PK_Desc(); + + // ===================================================================================== + // Query + // ===== + /** + * Get condition-query as interface. + * + * @return Instance of query as interface. (NotNull) + */ + public ${glConditionQueryInterfaceName} getConditionQueryAsInterface(); + + // ===================================================================================== + // Union-Query + // =========== + public boolean hasUnionQueryOrUnionAllQuery(); + + // ===================================================================================== + // Limit-Select + // ============ + /** + * Limit select PK only. + * + * @return this. (NotNull) + */ + public ${glConditionBeanInterfaceName} limitSelect_PKOnly(); + + /** + * Limit select off. + * + * @return this. (NotNull) + */ + public ${glConditionBeanInterfaceName} limitSelect_Off(); + + /** + * Is limit-select PK only? + * + * @return Determination. + */ + public boolean isLimitSelect_PKOnly(); + + // ===================================================================================== + // Advance + // ======= + /** + * Lock for update. + * + * If you invoke this, your SQL lock target records for update. + * It depends whether this method supports this on the database type. + * + * @return this. (NotNull) + */ + public ${glConditionBeanInterfaceName} lockForUpdate(); + + // ------------------------------ + // for Internal + // ------------ + /** + * Set up various things for select-count-ignore-fetch-scope. {Internal} + * This method is for INTERNAL. Don't invoke this! + * + * @return this. (NotNull) + */ + public ${glConditionBeanInterfaceName} xsetupSelectCountIgnoreFetchScope(); + + /** + * Do after-care for select-count-ignore-fetch-scope. {Internal} + * This method is for INTERNAL. Don't invoke this! + * + * @return this. (NotNull) + */ + public ${glConditionBeanInterfaceName} xafterCareSelectCountIgnoreFetchScope(); + + /** + * Is set up various things for select-count-ignore-fetch-scope? {Internal} + * This method is for INTERNAL. Don't invoke this! + * + * @return Determination. + */ + public boolean isSelectCountIgnoreFetchScope(); +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/ConditionBeanContext.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/ConditionBeanContext.vm 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/ConditionBeanContext.vm 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,196 @@ +package ${glPackageBaseCommonCBean}; + +import ${glPackageBaseCommonSqlClause}.*; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +/** + * Condition-Bean context. (referring to s2pager) + * + * @author ${database.ClassAuthor} + */ +public class ${glConditionBeanContextName} { + + /** Log-instance. */ + private static final Log _log = LogFactory.getLog(${glConditionBeanContextName}.class); + + // ===================================================================================== + // Thread Local + // ============ + /** The thread-local for this. */ + private static final ThreadLocal${database.filterGenericsString(${glConditionBeanInterfaceName})} _threadLocal = new ThreadLocal${database.filterGenericsString(${glConditionBeanInterfaceName})}(); + + /** + * Get condition-bean on thread. + * + * @return Condition-bean context. (Nullable) + */ + public static ${glConditionBeanInterfaceName} getConditionBeanOnThread() { + return (${glConditionBeanInterfaceName})_threadLocal.get(); + } + + /** + * Set condition-bean on thread. + * + * @param cb Condition-bean. (NotNull) + */ + public static void setConditionBeanOnThread(${glConditionBeanInterfaceName} cb) { + if (cb == null) { + String msg = "The argument[cb] must not be null."; + throw new IllegalArgumentException(msg); + } + _threadLocal.set(cb); + } + + /** + * Is existing condition-bean on thread? + * + * @return Determination. + */ + public static boolean isExistConditionBeanOnThread() { + return (_threadLocal.get() != null); + } + + /** + * Clear condition-bean on thread. + */ + public static void clearConditionBeanOnThread() { + _threadLocal.set(null); + } + + // ===================================================================================== + // Initialize against LinkageError + // =============================== + public static void initialize() { + // Stop the LinkageError! + { + final Class clazz = ${glPackageBaseCommonCBean}.${glSimplePagingBeanName}.class; + _log.debug("Loading class of " + clazz.getName() + ": " + clazz.getClassLoader()); + } + { + final Class clazz = ${glPackageBaseCommonCOption}.${glConditionOptionFromToName}.class; + _log.debug("Loading class of " + clazz.getName() + ": " + clazz.getClassLoader()); + } + { + final Class clazz = ${glPackageBaseCommonCOption}.${glConditionOptionLikeSearchName}.class; + _log.debug("Loading class of " + clazz.getName() + ": " + clazz.getClassLoader()); + } + { + final Class clazz = ${glPackageBaseCommonCOption}.${glConditionOptionInScopeName}.class; + _log.debug("Loading class of " + clazz.getName() + ": " + clazz.getClassLoader()); + } + } + + // ===================================================================================== + // Type Judgement + // ============== + /** + * Is the argument condition-bean? + * + * @param dtoInstance Dto instance. + * @return Determination. + */ + public static boolean isTheArgumentConditionBean(final Object dtoInstance) { + if (dtoInstance instanceof ${glConditionBeanInterfaceName}) { + return true; + } else { + return false; + } + } + + /** + * Is the type condition-bean? + * + * @param dtoClass DtoClass. + * @return Determination. + */ + public static boolean isTheTypeConditionBean(final Class dtoClass) { + if (${glConditionBeanInterfaceName}.class.isAssignableFrom(dtoClass)) { + return true; + } else { + return false; + } + } + + // ===================================================================================== + // Product Name + // ============ + /** The database product name. */ + private static String _databaseProductName; + + /** + * Get database product name. + * + * @return Database product name. + */ + public static String getDatabaseProductName() { + return _databaseProductName; + } + + /** + * Set database product name. + * + * @param name Database product name. (NotNull) + */ + public static void setDatabaseProductName(String name) { + if (_databaseProductName != null) { + String msg = "Already set up: current=" + _databaseProductName + " your=" + name; + throw new IllegalStateException(msg); + } + _databaseProductName = name; + } +#set ($columnAliasGeneric = "Class, java.util.Map") + + // ===================================================================================== + // Column Alias + // ============ + public static final java.util.Map${database.filterGenericsString('Class, java.util.Map')} _selectClauseColumnAliasContainerMap = new java.util.HashMap${database.filterGenericsString('Class, java.util.Map')}(); + + public static void addColumnAliasInfo(Class conditionBeanClass, String columnFullName, String columnAliasName) { + if (_selectClauseColumnAliasContainerMap.containsKey(conditionBeanClass)) { + final java.util.Map${database.filterGenericsString('String, String')} selectClauseColumnAliasMap = (java.util.Map${database.filterGenericsString('String, String')})_selectClauseColumnAliasContainerMap.get(conditionBeanClass); + selectClauseColumnAliasMap.put(columnFullName, columnAliasName); + } else { + final java.util.Map${database.filterGenericsString('String, String')} selectClauseColumnAliasMap = new java.util.HashMap${database.filterGenericsString('String, String')}(); + _selectClauseColumnAliasContainerMap.put(conditionBeanClass, selectClauseColumnAliasMap); + selectClauseColumnAliasMap.put(columnFullName, columnAliasName); + } + } + + public static java.util.Map${database.filterGenericsString('String, String')} getSelectClauseColumnAliasMap(Class conditionBeanClass) { + return (java.util.Map${database.filterGenericsString('String, String')})_selectClauseColumnAliasContainerMap.get(conditionBeanClass); + } + + // ===================================================================================== + // Creator + // ======= + public static ${glSqlClauseName} createSqlClause(${glConditionBeanInterfaceName} cb) { + final String tableDbName = cb.getTableDbName(); + return createSqlClause(tableDbName); + } + + public static ${glSqlClauseName} createSqlClause(String tableDbName) { + final String databaseProductName = getDatabaseProductName(); + if (databaseProductName == null) { + return new ${glSqlClauseName}${database.DaoGenDbName}(tableDbName); + } + final String name = databaseProductName.toLowerCase(); + if (name.startsWith("derby")) { + return new ${glSqlClauseName}Derby(tableDbName); + } else if (name.startsWith("oracle")) { + return new ${glSqlClauseName}Oracle(tableDbName); + } else if (name.startsWith("firebird")) { + return new ${glSqlClauseName}Firebird(tableDbName); + } else if (name.startsWith("mysql")) { + return new ${glSqlClauseName}MySql(tableDbName); + } else if (name.startsWith("postgre")) { + return new ${glSqlClauseName}PostgreSql(tableDbName); + } else if (name.startsWith("mssql")) { + return new ${glSqlClauseName}SqlServer(tableDbName); + } else if (name.startsWith("db2")) { + return new ${glSqlClauseName}Db2(tableDbName); + } else { + return new ${glSqlClauseName}${database.DaoGenDbName}(tableDbName); + } + } +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/ConditionQuery.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/ConditionQuery.vm 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/ConditionQuery.vm 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,105 @@ +package ${glPackageBaseCommonCBean}; + +import ${glPackageBaseCommonCValue}.${glConditionValueName}; +import ${glPackageBaseCommonSqlClause}.${glSqlClauseName}; + +/** + * The condition-query as interface. + * + * @author ${database.ClassAuthor} + */ +public interface ${glConditionQueryInterfaceName} { + + // ===================================================================================== + // Accessor + // ======== + /** + * Get table db-name. + * + * @return Table db-name. (NotNull) + */ + public String getTableDbName(); + + /** + * Get real alias name(that has nest level mark). + * + * @return Real alias name. + */ + public String getRealAliasName(); + + /** + * Get real column name(with real alias name). + * + * @param columnName Column name without alias name. + * @return Real column name. + */ + public String getRealColumnName(String columnName); + + /** + * Get child query. + * + * @return Child query. (Nullable) + */ + public ${glConditionQueryInterfaceName} getChildQuery(); + + /** + * Get sql clause. + * + * @return Sql clause. (NotNull) + */ + public ${glSqlClauseName} getSqlClause(); + + /** + * Get alias name. + * + * @return Alias name. (NotNull) + */ + public String getAliasName(); + + /** + * Get nest level. + * + * @return Nest level. + */ + public int getNestLevel(); + + /** + * Get next nest level. + * + * @return Next nest level. + */ + public int getNextNestLevel(); + + /** + * Is base query? + * + * @param query Condition query. (NotNull) + * @return Determination. + */ + public boolean isBaseQuery(${glConditionQueryInterfaceName} query); + + // ===================================================================================== + // Invoke + // ====== + public ${glConditionValueName} invokeGetter(String columnMultiName); + + public void invokeSetterEqual(String columnMultiName, Object value); + public void invokeSetterNotEqual(String columnMultiName, Object value); + public void invokeSetterGreaterThan(String columnMultiName, Object value); + public void invokeSetterLessThan(String columnMultiName, Object value); + public void invokeSetterGreaterEqual(String columnMultiName, Object value); + public void invokeSetterLessEqual(String columnMultiName, Object value); + + public void invokeAddOrderByAsc(String columnMultiName); + public void invokeAddOrderByDesc(String columnMultiName); + + // ===================================================================================== + // Foregin-Query + // ============= + /// + /// Get foreign condition-query. + /// + /// Foreign-property-name(Both OK - InitCap or not). (NotNull) + /// Foreign condition-query as interface. + public ${glConditionQueryInterfaceName} getForeignConditionQuery(String foreignPropertyName); +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/FetchNarrowingBean.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/FetchNarrowingBean.vm 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/FetchNarrowingBean.vm 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,44 @@ +package ${glPackageBaseCommonCBean}; + +/** + * The condition-bean as interface. + * + * @author ${database.ClassAuthor} + */ +public interface ${glFetchNarrowingBeanInterfaceName} { + + /** + * Get fetch start index. + * + * @return Fetch start index. + */ + public int getFetchNarrowingSkipStartIndex(); + + /** + * Get fetch size. + * + * @return Fetch size. + */ + public int getFetchNarrowingLoopCount(); + + /** + * Is fetch start index supported? + * + * @return Determination. + */ + public boolean isFetchNarrowingSkipStartIndexEffective(); + + /** + * Is fetch size supported? + * + * @return Determination. + */ + public boolean isFetchNarrowingLoopCountEffective(); + + /** + * Is fetch-narrowing effective? + * + * @return Determiantion. + */ + public boolean isFetchNarrowingEffective(); +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/FetchNarrowingBeanContext.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/FetchNarrowingBeanContext.vm 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/FetchNarrowingBeanContext.vm 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,78 @@ +package ${glPackageBaseCommonCBean}; + +/** + * Fetch-Narrowing-Bean context. (referring to s2pager) + * + * @author ${database.ClassAuthor} + */ +public class ${glFetchNarrowingBeanContextName} { + + /** The thread-local for this. */ + private static ThreadLocal${database.filterGenericsString(${glFetchNarrowingBeanInterfaceName})} _threadLocal = new ThreadLocal${database.filterGenericsString(${glFetchNarrowingBeanInterfaceName})}(); + + /** + * Get fetch-narrowing-bean on thread. + * + * @return Condition-bean context. (Nullable) + */ + public static ${glFetchNarrowingBeanInterfaceName} getFetchNarrowingBeanOnThread() { + return (${glFetchNarrowingBeanInterfaceName})_threadLocal.get(); + } + + /** + * Set fetch-narrowing-bean on thread. + * + * @param ${glAttachedCBArgsVariableName} Condition-bean. (NotNull) + */ + public static void setFetchNarrowingBeanOnThread(${glFetchNarrowingBeanInterfaceName} ${glAttachedCBArgsVariableName}) { + if (${glAttachedCBArgsVariableName} == null) { + String msg = "The argument[${glAttachedCBArgsVariableName}] must not be null."; + throw new IllegalArgumentException(msg); + } + _threadLocal.set(${glAttachedCBArgsVariableName}); + } + + /** + * Is existing fetch-narrowing-bean on thread? + * + * @return Determination. + */ + public static boolean isExistFetchNarrowingBeanOnThread() { + return (_threadLocal.get() != null); + } + + /** + * Clear fetch-narrowing-bean on thread. + */ + public static void clearFetchNarrowingBeanOnThread() { + _threadLocal.set(null); + } + + /** + * Is the argument fetch-narrowing-bean? + * + * @param dtoInstance Dto instance. + * @return Determination. + */ + public static boolean isTheArgumentFetchNarrowingBean(final Object dtoInstance) { + if (dtoInstance instanceof ${glFetchNarrowingBeanInterfaceName}) { + return true; + } else { + return false; + } + } + + /** + * Is the type fetch-narrowing-bean? + * + * @param dtoClass DtoClass. + * @return Determination. + */ + public static boolean isTheTypeFetchNarrowingBean(final Class dtoClass) { + if (${glFetchNarrowingBeanInterfaceName}.class.isAssignableFrom(dtoClass)) { + return true; + } else { + return false; + } + } +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/ListResultBean.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/ListResultBean.vm 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/ListResultBean.vm 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,422 @@ +package ${glPackageBaseCommonCBean}; + +#set ($myClassName = "${glListResultBeanName}") +#set ($selectedListArgumentGenericDefinition = "${glEntityInterfaceName}") +#if ($database.isAvailableGenerics()) +import ${glPackageBaseCommonCBeanMapping}.${glEntityDtoMapperName}; +import ${glPackageBaseCommonCBeanGrouping}.${glGroupingOptionName}; +import ${glPackageBaseCommonCBeanGrouping}.${glGroupingRowEndDeterminerName}; +import ${glPackageBaseCommonCBeanGrouping}.${glGroupingRowResourceName}; +import ${glPackageBaseCommonCBeanGrouping}.${glGroupingRowSetupperName}; +#end +import ${glPackageBaseCommonSqlClause}.${glOrderByClauseName}; + +/** + * The list-result-bean for ${myClassName}. + * + * @param ${database.filterGenericsString('ENTITY')} The generic template for 'selectedList'. + * @author ${database.ClassAuthor} + */ +public class ${myClassName}${database.filterGenericsString('ENTITY')} implements java.util.List${database.filterGenericsString('ENTITY')}, java.io.Serializable { + + /** Serial version UID. (Default) */ + private static final long serialVersionUID = 1L; + + // ===================================================================================== + // Attribute + // ========= + /** The value of table db-name. */ + protected String _tableDbName; + + /** The value of all record count. */ + protected int _allRecordCount; + + /** Selected list. */ + protected java.util.List${database.filterGenericsString('ENTITY')} _selectedList = new java.util.ArrayList${database.filterGenericsString('ENTITY')}(); + + /** Order-by clause. */ + protected ${glOrderByClauseName} _orderByClause = new ${glOrderByClauseName}(); + + // ===================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + public ${myClassName}() { + } + + // ===================================================================================== + // Getter Setter + // ============= + /** + * Get the value of tableDbName. + * + * @return The value of tableDbName. + */ + public String getTableDbName() { + return _tableDbName; + } + + /** + * Set the value of tableDbName. + * + * @param tableDbName The value of tableDbName. + */ + public void setTableDbName(String tableDbName) { + _tableDbName = tableDbName; + } + + /** + * Get the value of allRecordCount. + * + * @return The value of allRecordCount. + */ + public int getAllRecordCount() { + return _allRecordCount; + } + + /** + * Set the value of allRecordCount. + * + * @param allRecordCount The value of allRecordCount. + */ + public void setAllRecordCount(int allRecordCount) { + _allRecordCount = allRecordCount; + } + + /** + * Get the value of selectedList. + * + * @return Selected list. (NotNull) + */ + public java.util.List${database.filterGenericsString('ENTITY')} getSelectedList() { + return _selectedList; + } + + /** + * Set the value of selectedList. + * + * @param selectedList Selected list. (NotNull) + */ + public void setSelectedList(java.util.List${database.filterGenericsString('ENTITY')} selectedList) { + _selectedList = selectedList; + } + + /** + * Get the value of orderByClause. + * + * @return The value of orderByClause. (NotNull) + */ + public ${glOrderByClauseName} getOrderByClause() { + return _orderByClause; + } + + /** + * Set the value of orderByClause. + * + * @param orderByClause The value of orderByClause. (NotNull) + */ + public void setOrderByClause(${glOrderByClauseName} orderByClause) { + _orderByClause = orderByClause; + } + +#if ($database.isAvailableGenerics()) + // ===================================================================================== + // Grouping + // ======== + public java.util.List groupingList(${glGroupingRowSetupperName} groupingRowSetupper, ${glGroupingOptionName} groupingOption) { + final java.util.List groupingList = new java.util.ArrayList(); + ${glGroupingRowEndDeterminerName} rowEndDeterminer = groupingOption.getGroupingRowEndDeterminer(); + if (rowEndDeterminer == null) { + rowEndDeterminer = new ${glGroupingRowEndDeterminerName}() { + public boolean determine(int columnIndex, int columnCount, ${glGroupingRowResourceName} rowResource, ENTITY nextEntity) { + return columnIndex == (columnCount-1); + } + };// as Default + } + ${glGroupingRowResourceName} rowResource = new ${glGroupingRowResourceName}(); + int columnCount = groupingOption.getColumnCount(); + int columnIndex = 0; + int rowIndex = 0; + for (ENTITY entity : _selectedList) { + // Set up row resource. + rowResource.addGroupingRowList(entity); + + if (_selectedList.size() == (rowIndex + 1)) {// Last Loop! + // Callback! + final ROW groupingRowObject = groupingRowSetupper.setup(rowResource); + + // Register! + groupingList.add(groupingRowObject); + break; + } + + ENTITY nextElement = null; + if (_selectedList.size() > (rowIndex + 1)) {; + nextElement = _selectedList.get(rowIndex); + } + + // Do at row end. + if (rowEndDeterminer.determine(columnIndex, columnCount, rowResource, nextElement)) { + // Callback! + final ROW groupingRowObject = groupingRowSetupper.setup(rowResource); + + // Register! + groupingList.add(groupingRowObject); + + // Initialize! + rowResource = new ${glGroupingRowResourceName}(); + columnIndex = 0; + ++rowIndex; + continue; + } + ++columnIndex; + ++rowIndex; + } + return groupingList; + } + + // ===================================================================================== + // Mapping + // ======= + public ${myClassName} mappingList(${glEntityDtoMapperName} entityDtoMapper) { + final ${myClassName} mappingList = new ${myClassName}(); + for (ENTITY entity : _selectedList) { + mappingList.add(entityDtoMapper.map(entity)); + } + mappingList.setTableDbName(getTableDbName()); + mappingList.setAllRecordCount(getAllRecordCount()); + mappingList.setOrderByClause(getOrderByClause()); + return mappingList; + } +#end + + // ===================================================================================== + // Determination + // ============= + /** + * Has this result selected? + *
+     * If isSetterInvokedSelectedList is true, returns true.
+     * 
+ * + * @return Determination. + */ + public boolean isSelectedResult() { + return _tableDbName != null; + } + + // ===================================================================================== + // Basic Override + // ============== + /** + * This method overrides the method that is declared at super. + * + * @return View-string of all-columns value. + */ + public String toString() { + final StringBuffer sb = new StringBuffer(); + + sb.append(" tableDbName=").append(_tableDbName); + sb.append(" allRecordCount=").append(_tableDbName); + sb.append(" selectedList.size()=").append(_selectedList.size()); + sb.append(" orderByClause=").append(_orderByClause); + + return sb.toString(); + } +#if ($database.isAvailableGenerics()) + + // ===================================================================================== + // List Elements + // ============= + public boolean add(ENTITY o) { + return _selectedList.add(o); + } + + public boolean addAll(java.util.Collection${database.filterGenericsString('? extends ENTITY')} c) { + return _selectedList.addAll(c); + } + + public void clear() { + _selectedList.clear(); + } + + public boolean contains(Object o) { + return _selectedList.contains(o); + } + + public boolean containsAll(java.util.Collection c) { + return _selectedList.containsAll(c); + } + + public boolean isEmpty() { + return _selectedList.isEmpty(); + } + + public java.util.Iterator${database.filterGenericsString('ENTITY')} iterator() { + return _selectedList.iterator(); + } + + public boolean remove(Object o) { + return _selectedList.remove(o); + } + + public boolean removeAll(java.util.Collection${database.filterGenericsString('?')} c) { + return _selectedList.removeAll(c); + } + + public boolean retainAll(java.util.Collection${database.filterGenericsString('?')} c) { + return _selectedList.retainAll(c); + } + + public int size() { + return _selectedList.size(); + } + + public Object[] toArray() { + return _selectedList.toArray(); + } + + public ${database.filterGenericsString('TYPE')} TYPE[] toArray(TYPE[] a) { + return _selectedList.toArray(a); + } + + public void add(int index, ENTITY element) { + _selectedList.add(index, element); + } + + public boolean addAll(int index, java.util.Collection${database.filterGenericsString('? extends ENTITY')} c) { + return _selectedList.addAll(index, c); + } + + public ENTITY get(int index) { + return _selectedList.get(index); + } + + public int indexOf(Object o) { + return _selectedList.indexOf(o); + } + + public int lastIndexOf(Object o) { + return _selectedList.lastIndexOf(o); + } + + public java.util.ListIterator${database.filterGenericsString('ENTITY')} listIterator() { + return _selectedList.listIterator(); + } + + public java.util.ListIterator${database.filterGenericsString('ENTITY')} listIterator(int index) { + return _selectedList.listIterator(index); + } + + public ENTITY remove(int index) { + return _selectedList.remove(index); + } + + public ENTITY set(int index, ENTITY element) { + return _selectedList.set(index, element); + } + + public java.util.List${database.filterGenericsString('ENTITY')} subList(int fromIndex, int toIndex) { + return _selectedList.subList(fromIndex, toIndex); + } +#else + + // ===================================================================================== + // List Elements + // ============= + public boolean add(Object arg0) { + return _selectedList.add(arg0); + } + + public void add(int arg0, Object arg1) { + _selectedList.add(arg0, arg1); + } + + public boolean addAll(java.util.Collection arg0) { + return _selectedList.addAll(arg0); + } + + public boolean addAll(int arg0, java.util.Collection arg1) { + return _selectedList.addAll(arg0, arg1); + } + + public void clear() { + _selectedList.clear(); + } + + public boolean contains(Object o) { + return _selectedList.contains(o); + } + + public boolean containsAll(java.util.Collection arg0) { + return _selectedList.containsAll(arg0); + } + + public Object get(int index) { + return _selectedList.get(index); + } + + public int indexOf(Object o) { + return _selectedList.indexOf(o); + } + + public boolean isEmpty() { + return _selectedList.isEmpty(); + } + + public java.util.Iterator iterator() { + return _selectedList.iterator(); + } + + public int lastIndexOf(Object o) { + return _selectedList.lastIndexOf(o); + } + + public java.util.ListIterator listIterator() { + return _selectedList.listIterator(); + } + + public java.util.ListIterator listIterator(int index) { + return _selectedList.listIterator(); + } + + public boolean remove(Object o) { + return _selectedList.remove(o); + } + + public Object remove(int index) { + return _selectedList.remove(index); + } + + public boolean removeAll(java.util.Collection arg0) { + return _selectedList.removeAll(arg0); + } + + public boolean retainAll(java.util.Collection arg0) { + return _selectedList.retainAll(arg0); + } + + public Object set(int arg0, Object arg1) { + return _selectedList.set(arg0, arg1); + } + + public int size() { + return _selectedList.size(); + } + + public java.util.List subList(int fromIndex, int toIndex) { + return _selectedList.subList(fromIndex, toIndex); + } + + public Object[] toArray() { + return _selectedList.toArray(); + } + + public Object[] toArray(Object[] arg0) { + return _selectedList.toArray(arg0); + } +#end + +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/OrderByBean.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/OrderByBean.vm 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/OrderByBean.vm 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,78 @@ +package ${glPackageBaseCommonCBean}; + +import ${glPackageBaseCommonSqlClause}.${glOrderByClauseName}; + +/** + * The order-by-bean as interface. + * + * @author ${database.ClassAuthor} + */ +public interface ${glOrderByBeanInterfaceName} extends ${glSelectResourceInterfaceName} { + + /** + * Get sql component of order-by clause. + * + * @return Sql component of order-by clause. (NotNull) + */ + public ${glOrderByClauseName} getSqlComponentOfOrderByClause(); + + /** + * Get order-by clause. + * + * @return Order-by clause. (NotNull) + */ + public String getOrderByClause(); + + /** + * Clear order-by. + * + * @return this. (NotNull) + */ + public ${glOrderByBeanInterfaceName} clearOrderBy(); + + /** + * Ignore order-by. + * + * @return this. (NotNull) + */ + public ${glOrderByBeanInterfaceName} ignoreOrderBy(); + + /** + * Make order-by effective. + * + * @return this. (NotNull) + */ + public ${glOrderByBeanInterfaceName} makeOrderByEffective(); + + /** + * Register order-by-asc. + * + * @param orderByProperty Order-by-property. 'aliasName.columnName/aliasName.columnName/...' (NotNull) + * @return this. (NotNull) + */ + public ${glOrderByBeanInterfaceName} registerOrderByAsc(String orderByProperty); + + /** + * Register order-by-desc. + * + * @param orderByProperty Order-by-property. 'aliasName.columnName/aliasName.columnName/...' (NotNull) + * @return this. (NotNull) + */ + public ${glOrderByBeanInterfaceName} registerOrderByDesc(String orderByProperty); + + /** + * Reverse order-by or Override order-by asc. + * + * @param orderByProperty Order-by-property. 'aliasName.columnName/aliasName.columnName/...' (NotNull) + * @return this. (NotNull) + */ + public ${glOrderByBeanInterfaceName} reverseOrderBy_Or_OverrideOrderByAsc(String orderByProperty); + + /** + * Reverse order-by or Override order-by desc. + * + * @param orderByProperty Order-by-property. 'aliasName.columnName/aliasName.columnName/...' (NotNull) + * @return this. (NotNull) + */ + public ${glOrderByBeanInterfaceName} reverseOrderBy_Or_OverrideOrderByDesc(String orderByProperty); +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/PagingBean.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/PagingBean.vm 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/PagingBean.vm 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,108 @@ +package ${glPackageBaseCommonCBean}; + +/** + * The interface of paging-bean. + * + * @author ${database.ClassAuthor} + */ +public interface ${glPagingBeanInterfaceName} extends ${glFetchNarrowingBeanInterfaceName}, ${glOrderByBeanInterfaceName} { + + /** + * Fetch first. + * + * If you invoke this, your SQL returns [fetch-size] records from first. + * + * @param fetchSize Fetch-size. (NotMinus & NotZero) + * @return this. (NotNUll) + */ + public ${glPagingBeanInterfaceName} fetchFirst(int fetchSize); + + /** + * Fetch scope. + * + * If you invoke this, your SQL returns [fetch-size] records from [fetch-start-index]. + * + * @param fetchStartIndex Fetch-start-index. 0 origin. (NotMinus) + * @param fetchSize Fetch-size. (NotMinus & NotZero) + * @return this. (NotNUll) + */ + public ${glPagingBeanInterfaceName} fetchScope(int fetchStartIndex, int fetchSize); + + /** + * Fetch page. + * + * When you invoke this, it is normally necessary to invoke 'fetchFirst()' or 'fetchScope()' ahead of that. + * But you also can use default-fetch-size without invoking 'fetchFirst()' or 'fetchScope()'. + * If you invoke this, your SQL returns [fetch-size] records from [fetch-start-index] calculated by [fetch-page-number]. + * + * @param fetchPageNumber Fetch-page-number. 1 origin. (NotMinus & NotZero) + * @return this. (NotNull) + */ + public ${glPagingBeanInterfaceName} fetchPage(int fetchPageNumber); + + /** + * Get fetch-start-index. + * + * @return Fetch-start-index. + */ + public int getFetchStartIndex(); + + /** + * Get fetch-size. + * + * @return Fetch-size. + */ + public int getFetchSize(); + + /** + * Get fetch-page-number. + * + * @return Fetch-page-number. + */ + public int getFetchPageNumber(); + + /** + * Get page start index. + * + * @return Page start index. 0 origin. (NotMinus) + */ + public int getPageStartIndex(); + + /** + * Get page end index. + * + * @return Page end index. 0 origin. (NotMinus) + */ + public int getPageEndIndex(); + + /** + * Is fetch scope effective? + * + * @return Determiantion. + */ + public boolean isFetchScopeEffective(); + + // ===================================================================================== + // For SqlComment + // ============== + /** + * Get select-hint. {select [select-hint] * from table...} + * + * @return Select-hint. (NotNull) + */ + public String getSelectHint(); + + /** + * Get from-hint. {select * from table [from-hint] where ...} + * + * @return From-hint. (NotNull) + */ + public String getFromHint(); + + /** + * Get sql-suffix. {select * from table where ... order by ... [sql-suffix]} + * + * @return Sql-suffix. (NotNull) + */ + public String getSqlSuffix(); +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/PagingResultBean.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/PagingResultBean.vm 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/PagingResultBean.vm 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,526 @@ +package ${glPackageBaseCommonCBean}; + +#set ($myClassName = "${glPagingResultBeanName}") +#if ($database.isAvailableGenerics()) +import ${glPackageBaseCommonCBeanMapping}.${glEntityDtoMapperName}; +#end +/** + * The paging-result-bean for ${myClassName}. + * + * @param ${database.filterGenericsString('ENTITY')} The generic template for 'selectedList'. + * @author ${database.ClassAuthor} + */ +public class ${myClassName}${database.filterGenericsString('ENTITY')} extends ${glListResultBeanName}${database.filterGenericsString('ENTITY')} { + + /** Serial version UID. (Default) */ + private static final long serialVersionUID = 1L; + + // ===================================================================================== + // Attribute + // ========= + /** The value of current page number. */ + protected int _pageSize; + + /** The value of current page number. */ + protected int _currentPageNumber; + + // ----------------------------------------- + // Page Range + // ---------- + /** The value of page-range option. */ + protected PageRangeOption _pageRangeOption; + + // ----------------------------------------- + // Page Group + // ---------- + /** The value of page-group option. */ + protected PageGroupOption _pageGroupOption; + + // ===================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + public ${myClassName}() { + } + + // ===================================================================================== + // Accessor + // ======== + /** + * Get the value of pageSize. + * + * @return The value of pageSize. + */ + public int getPageSize() { + return _pageSize; + } + + /** + * Set the value of pageSize. + * + * @param pageSize The value of pageSize. + */ + public void setPageSize(int pageSize) { + _pageSize = pageSize; + } + + /** + * Get the value of currentPageNumber. + * + * @return The value of currentPageNumber. + */ + public int getCurrentPageNumber() { + return _currentPageNumber; + } + + /** + * Set the value of currentPageNumber. + * + * @param currentPageNumber The value of currentPageNumber. + */ + public void setCurrentPageNumber(int currentPageNumber) { + _currentPageNumber = currentPageNumber; + } + + /** + * Get the value of allPageCount. + * + * @return The value of allPageCount. + */ + public int getAllPageCount() { + return calculateAllPageCount(_allRecordCount, _pageSize); + } + + /** + * Get the value of currentStartRecordNumber. + * + * @return The value of currentStartRecordNumber. + */ + public int getCurrentStartRecordNumber() { + return calculateCurrentStartRecordNumber(_currentPageNumber, _pageSize); + } + + /** + * Get the value of currentEndRecordNumber. + * + * @return The value of currentEndRecordNumber. + */ + public int getCurrentEndRecordNumber() { + return calculateCurrentEndRecordNumber(_currentPageNumber, _pageSize); + } + + // ----------------------------------------- + // Page Range + // ---------- + /** + * Get the value of pageRangeSize. + * + * @return The value of pageRangeSize. + */ + public int getPageRangeSize() { + return _pageRangeOption != null ? _pageRangeOption.getPageRangeSize() : 0; + } + + /** + * Set the value of pageRangeSize. + * + * @param pageRangeSize The value of pageRangeSize. + */ + public void setPageRangeSize(int pageRangeSize) { + final PageRangeOption option = new PageRangeOption(); + option.setPageRangeSize(pageRangeSize); + setPageRangeOption(option); + } + + /** + * Set the value of pageRangeOption. + * + * @param pageRangeOption The value of pageRangeOption. + */ + public void setPageRangeOption(PageRangeOption pageRangeOption) { + _pageRangeOption = pageRangeOption; + } + + public static class PageRangeOption { + protected int _pageRangeSize; + + protected boolean _fillLimit; + + public int getPageRangeSize() { + return _pageRangeSize; + } + + public void setPageRangeSize(int pageRangeSize) { + _pageRangeSize = pageRangeSize; + } + + public boolean isFillLimit() { + return _fillLimit; + } + + public void setFillLimit(boolean fillLimit) { + _fillLimit = fillLimit; + } + } + + // ----------------------------------------- + // Page Group + // ---------- + /** + * Get the value of pageGroupSize. + * + * @return The value of pageGroupSize. + */ + public int getPageGroupSize() { + return _pageGroupOption != null ? _pageGroupOption.getPageGroupSize() : 0; + } + + /** + * Set the value of pageGroupSize. + * + * @param value The value of pageGroupSize. + */ + public void setPageGroupSize(int pageGroupSize) { + final PageGroupOption option = new PageGroupOption(); + option.setPageGroupSize(pageGroupSize); + setPageGroupOption(option); + } + + /** + * Set the value of pageGroupOption. + * + * @param pageGroupOption The value of pageGroupOption. + */ + public void setPageGroupOption(PageGroupOption pageGroupOption) { + _pageGroupOption = pageGroupOption; + } + + public static class PageGroupOption { + protected int _pageGroupSize; + + public int getPageGroupSize() { + return _pageGroupSize; + } + + public void setPageGroupSize(int pageGroupSize) { + _pageGroupSize = pageGroupSize; + } + } + +#if ($database.isAvailableGenerics()) + // ===================================================================================== + // Mapping + // ======= + public ${myClassName} mappingList(${glEntityDtoMapperName} entityDtoMapper) { + final ${glListResultBeanName} ls = super.mappingList(entityDtoMapper); + final ${myClassName} mappingList = new ${myClassName}(); + mappingList.setSelectedList(ls.getSelectedList()); + mappingList.setTableDbName(getTableDbName()); + mappingList.setAllRecordCount(getAllRecordCount()); + mappingList.setOrderByClause(getOrderByClause()); + mappingList.setPageSize(getPageSize()); + mappingList.setCurrentPageNumber(getCurrentPageNumber()); + mappingList.setPageRangeOption(_pageRangeOption); + mappingList.setPageGroupOption(_pageGroupOption); + return mappingList; + } +#end + + // ===================================================================================== + // Calculate + // ========= + // ------------------------------------------- + // Page + // ---- + /** + * Calculate all page count. + * + * @param allRecordCount All record count. + * @param pageSize Fetch-size. + * @return All page count. + */ + protected int calculateAllPageCount(int allRecordCount, int pageSize) { + if (allRecordCount == 0) { + return 1; + } + int pageCountBase = (allRecordCount / pageSize); + if (allRecordCount % pageSize > 0) { + pageCountBase++; + } + return pageCountBase; + } + + protected int calculateCurrentStartRecordNumber(int currentPageNumber, int pageSize) { + return ((currentPageNumber - 1) * pageSize) + 1; + } + + protected int calculateCurrentEndRecordNumber(int currentPageNumber, int pageSize) { + return calculateCurrentStartRecordNumber(currentPageNumber, pageSize) + _selectedList.size() - 1; + } + + /** + * Is existing previous page? + * Using values are currentPageNumber. + * + * @return Determination. + */ + public boolean isExistPrePage() { + return (_allRecordCount > 0 && _currentPageNumber > 1); + } + + /** + * Is existing next page? + * Using values are currentPageNumber and allPageCount. + * + * @return Determination. + */ + public boolean isExistNextPage() { + return (_allRecordCount > 0 && _currentPageNumber < getAllPageCount()); + } + + // ------------------------------------------- + // Page Range + // ---------- + /** + * Get current page-range page-number-list. + * Using values are pageRangeOption and currentPageNumber and allPageCount. + * + * @return Current page-range page-number-list. (NotNull) + */ + public java.util.List${database.filterGenericsString('Integer')} getCurrentPageRangePageNumberList() { + assertPageRangeValid(); + final int pageRangeSize = _pageRangeOption.getPageRangeSize(); + final int allPageCount = this.getAllPageCount(); + final int currentPageNumber = _currentPageNumber; + + final java.util.List${database.filterGenericsString('Integer')} resultList = new java.util.ArrayList${database.filterGenericsString('Integer')}(); + for (int i = currentPageNumber - pageRangeSize; i < currentPageNumber; i++) { + if (i < 1) { + continue; + } + resultList.add(new Integer(i)); + } + + resultList.add(new Integer(currentPageNumber)); + + final int endPageNumber = (currentPageNumber + pageRangeSize); + for (int i = currentPageNumber + 1 ; i <= endPageNumber && i <= allPageCount; i++) { + resultList.add(new Integer(i)); + } + + final boolean fillLimit = _pageRangeOption.isFillLimit(); + final int limitSize = (pageRangeSize * 2) + 1; + if (fillLimit && !resultList.isEmpty() && resultList.size() < limitSize) { + final Integer firstElements = (Integer)resultList.get(0); + final Integer lastElements = (Integer)resultList.get(resultList.size() - 1); + if (firstElements.intValue() > 1) { + for (int i = firstElements.intValue() - 1 ; resultList.size() < limitSize && i > 0; i--) { + resultList.add(0, new Integer(i)); + } + } + for (int i = lastElements.intValue() + 1 ; resultList.size() < limitSize && i <= allPageCount; i++) { + resultList.add(new Integer(i)); + } + } + return resultList; + } + + /** + * Get current page-range page-number-array. + * Using values are pageRangeOption and currentPageNumber and allPageCount. + * + * @return Current page-range page-number-array. + */ + public int[] getCurrentPageRangePageNumberArray() { + assertPageRangeValid(); + return convertListToIntArray(getCurrentPageRangePageNumberList()); + } + + protected int[] convertListToIntArray(java.util.List${database.filterGenericsString('Integer')} ls) { + final int[] resultArray = new int[ls.size()]; + int arrayIndex = 0; + for (final java.util.Iterator ite = ls.iterator(); ite.hasNext(); ) { + final Integer tmpPageNumber = (Integer)ite.next(); + resultArray[arrayIndex] = tmpPageNumber.intValue(); + arrayIndex++; + } + return resultArray; + } + + /** + * Is existing previous page-range? + * Using values are pageRangeOption and currentPageNumber and allPageCount. + * + * @return Determination. + */ + public boolean isExistPrePageRange() { + assertPageRangeValid(); + final int[] array = getCurrentPageRangePageNumberArray(); + if (array.length == 0) { + return false; + } + return array[0] > 1; + } + + /** + * Is existing next page-range? + * Using values are pageRangeOption and currentPageNumber and allPageCount. + * + * @return Determination. + */ + public boolean isExistNextPageRange() { + assertPageRangeValid(); + final int[] array = getCurrentPageRangePageNumberArray(); + if (array.length == 0) { + return false; + } + return array[array.length-1] < getAllPageCount(); + } + + protected void assertPageRangeValid() { + if (_pageRangeOption == null) { + String msg = "The pageRangeOption should not be null. Please invoke setPageRangeOption()."; + throw new IllegalStateException(msg); + } + final int pageRangeSize = _pageRangeOption.getPageRangeSize(); + if (pageRangeSize == 0) { + String msg = "The pageRangeSize should be greater than 1. But the value is zero."; + throw new IllegalStateException(msg); + } + } + + // ------------------------------------------- + // Page Group + // ---------- + /** + * Calculate current page-group start-page-number. + * Using values are currentPageNumber and pageGroupSize. + * + * @return Current page-group start-page-number. + */ + public int calculateCurrentPageGroupStartPageNumber() { + assertPageGroupValid(); + final int pageGroupSize = _pageGroupOption.getPageGroupSize(); + final int currentPageNumber = _currentPageNumber; + + int currentPageGroupNumber = (currentPageNumber / pageGroupSize); + if ((currentPageNumber % pageGroupSize) == 0) + { + currentPageGroupNumber--; + } + final int currentPageGroupStartPageNumber = (pageGroupSize * currentPageGroupNumber) + 1; + if (!(currentPageNumber >= currentPageGroupStartPageNumber)) { + String msg = "currentPageNumber should be greater equal currentPageGroupStartPageNumber. But:"; + msg = msg + " currentPageNumber=" + currentPageNumber; + msg = msg + " currentPageGroupStartPageNumber=" + currentPageGroupStartPageNumber; + throw new IllegalStateException(msg); + } + return currentPageGroupStartPageNumber; + } + + /** + * Get current page-group page-number-list. + * Using values are currentPageNumber and pageGroupSize and allPageCount. + * + * @return Current page-group page-number-list. + */ + public java.util.List${database.filterGenericsString('Integer')} getCurrentPageGroupPageNumberList() { + assertPageGroupValid(); + final int pageGroupSize = _pageGroupOption.getPageGroupSize(); + final int allPageCount = getAllPageCount(); + final int currentPageGroupStartPageNumber = calculateCurrentPageGroupStartPageNumber(); + if (!(currentPageGroupStartPageNumber > 0)) { + String msg = "currentPageGroupStartPageNumber should be greater than 0. {> 0} But:"; + msg = msg + " currentPageGroupStartPageNumber=" + currentPageGroupStartPageNumber; + throw new IllegalStateException(msg); + } + final int nextPageGroupStartPageNumber = currentPageGroupStartPageNumber + pageGroupSize; + + final java.util.List${database.filterGenericsString('Integer')} resultList = new java.util.ArrayList${database.filterGenericsString('Integer')}(); + for (int i=currentPageGroupStartPageNumber; i < nextPageGroupStartPageNumber && i <= allPageCount; i++) { + resultList.add(new Integer(i)); + } + return resultList; + } + + /** + * Get current page-group page-number-array. + * Using values are currentPageNumber and pageGroupSize and allPageCount. + * + * @return Current page-group page-number-array. + */ + public int[] getCurrentPageGroupPageNumberArray() { + assertPageGroupValid(); + return convertListToIntArray(getCurrentPageGroupPageNumberList()); + } + + /** + * Is existing previous page-group? + * Using values are currentPageNumber and pageGroupSize. + * + * @return Determination. + */ + public boolean isExistPrePageGroup() { + assertPageGroupValid(); + return (_currentPageNumber > _pageGroupOption.getPageGroupSize()); + } + + /** + * Is existing next page-group? + * Using values are currentPageNumber and pageGroupSize and allPageCount. + * + * @return Determination. + */ + public boolean isExistNextPageGroup() { + assertPageGroupValid(); + int currentPageGroupStartPageNumber = calculateCurrentPageGroupStartPageNumber(); + if (!(currentPageGroupStartPageNumber > 0)) { + String msg = "currentPageGroupStartPageNumber should be greater than 0. {> 0} But:"; + msg = msg + " currentPageGroupStartPageNumber=" + currentPageGroupStartPageNumber; + throw new IllegalStateException(msg); + } + int nextPageGroupStartPageNumber = currentPageGroupStartPageNumber + _pageGroupOption.getPageGroupSize(); + return (nextPageGroupStartPageNumber <= getAllPageCount()); + } + + protected void assertPageGroupValid() { + if (_pageGroupOption == null) { + String msg = "The pageGroupOption should not be null. Please invoke setPageGroupOption()."; + throw new IllegalStateException(msg); + } + if (_pageGroupOption.getPageGroupSize() == 0) { + String msg = "The pageGroupSize should be greater than 1. But the value is zero."; + msg = msg + " pageGroupSize=" + _pageGroupOption.getPageGroupSize(); + throw new IllegalStateException(msg); + } + if (_pageGroupOption.getPageGroupSize() == 1) { + String msg = "The pageGroupSize should be greater than 1. But the value is one."; + msg = msg + " pageGroupSize=" + _pageGroupOption.getPageGroupSize(); + throw new IllegalStateException(msg); + } + } + + // ===================================================================================== + // Basic-Override Method + // ===================== + /** + * This method overrides the method that is declared at super. + * + * @return View-string of all-columns value. + */ + public String toString() { + final StringBuffer sb = new StringBuffer(); + + sb.append(getCurrentPageNumber()).append("/").append(getAllPageCount()); + sb.append(" of ").append(getAllRecordCount()); + sb.append(" listSize=").append(getSelectedList() != null ? new Integer(getSelectedList().size()) : null); + sb.append(" pageSize=").append(getPageSize()); + sb.append(" page:{").append(isExistPrePage()).append("/").append(isExistNextPage()).append("}"); + sb.append(" groupSize=").append(getPageGroupSize()); + sb.append(" rangeSize=").append(getPageRangeSize()); + + return sb.toString(); + } +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/SelectResource.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/SelectResource.vm 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/SelectResource.vm 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,9 @@ +package ${glPackageBaseCommonCBean}; + +/** + * The select-resource as marker-interface. + * + * @author ${database.ClassAuthor} + */ +public interface ${glSelectResourceInterfaceName} { +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/SimpleOrderByBean.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/SimpleOrderByBean.vm 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/SimpleOrderByBean.vm 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,136 @@ +package ${glPackageBaseCommonCBean}; + +import ${glPackageBaseCommonSqlClause}.${glOrderByClauseName}; +import ${glPackageBaseCommonSqlClause}.${glSqlClauseName}; + +/// +/// The order-by-bean as simple implemetation. +/// Author: ${database.ClassAuthor} +/// +public class ${glSimpleOrderByBeanName} implements ${glOrderByBeanInterfaceName} { + + // ===================================================================================== + // Attribute + // ========= + /** SQL clause instance. */ + protected final ${glSqlClauseName} _sqlClause; + { + _sqlClause = ${glConditionBeanContextName}.createSqlClause("Dummy"); + } + + // ===================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + public ${glSimpleOrderByBeanName}() { + } + + // ===================================================================================== + // SqlClause + // ========= + /** + * Get sql-clause. + * + * @return Sql clause. (NotNull) + */ + protected ${glSqlClauseName} getSqlClause() { + return _sqlClause; + } + + // ===================================================================================== + // OrderBy + // ======= + /** + * ${database.ImplementComment} + * + * @return Sql component of order-by clause. (NotNull) + */ + public ${glOrderByClauseName} getSqlComponentOfOrderByClause() { + return getSqlClause().getSqlComponentOfOrderByClause(); + } + + /** + * ${database.ImplementComment} + * + * @return Order-by clause. (NotNull) + */ + public String getOrderByClause() { + return getSqlClause().getOrderByClause(); + } + + /** + * ${database.ImplementComment} + * + * @return this. (NotNull) + */ + public ${glOrderByBeanInterfaceName} clearOrderBy() { + getSqlClause().clearOrderBy(); + return this; + } + + /** + * ${database.ImplementComment} + * + * @return this. (NotNull) + */ + public ${glOrderByBeanInterfaceName} ignoreOrderBy() { + getSqlClause().ignoreOrderBy(); + return this; + } + + /** + * ${database.ImplementComment} + * + * @return this. (NotNull) + */ + public ${glOrderByBeanInterfaceName} makeOrderByEffective() { + getSqlClause().makeOrderByEffective(); + return this; + } + + /** + * Register order-by-asc. + * + * @param orderByProperty Order-by-property. 'aliasName.columnName/aliasName.columnName/...' (NotNull) + * @return this. (NotNull) + */ + public ${glOrderByBeanInterfaceName} registerOrderByAsc(String orderByProperty) { + getSqlClause().registerOrderBy(orderByProperty, orderByProperty, true); + return this; + } + + /** + * Register order-by-desc. + * + * @param orderByProperty Order-by-property. 'aliasName.columnName/aliasName.columnName/...' (NotNull) + * @return this. (NotNull) + */ + public ${glOrderByBeanInterfaceName} registerOrderByDesc(String orderByProperty) { + getSqlClause().registerOrderBy(orderByProperty, orderByProperty, false); + return this; + } + + /** + * Reverse order-by or Override order-by asc. + * + * @param orderByProperty Order-by-property. 'aliasName.columnName/aliasName.columnName/...' (NotNull) + * @return this. (NotNull) + */ + public ${glOrderByBeanInterfaceName} reverseOrderBy_Or_OverrideOrderByAsc(String orderByProperty) { + getSqlClause().reverseOrderBy_Or_OverrideOrderBy(orderByProperty, orderByProperty, true); + return this; + } + + /** + * Reverse order-by or Override order-by desc. + * + * @param orderByProperty Order-by-property. 'aliasName.columnName/aliasName.columnName/...' (NotNull) + * @return this. (NotNull) + */ + public ${glOrderByBeanInterfaceName} reverseOrderBy_Or_OverrideOrderByDesc(String orderByProperty) { + getSqlClause().reverseOrderBy_Or_OverrideOrderBy(orderByProperty, orderByProperty, false); + return this; + } +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/SimplePagingBean.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/SimplePagingBean.vm 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/SimplePagingBean.vm 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,209 @@ +package ${glPackageBaseCommonCBean}; + +import ${glPackageBaseCommonSqlClause}.${glSqlClauseName}; + +/** + * The simple paging-bean. + * + * @author ${database.ClassAuthor} + */ +public class ${glSimplePagingBeanName} extends ${glSimpleOrderByBeanName} implements ${glPagingBeanInterfaceName} { + + // ===================================================================================== + // SqlClause + // ========= + /** + * Get sql-clause. + * + * @return Sql clause. (NotNull) + */ + protected ${glSqlClauseName} getSqlClause() { + return _sqlClause; + } + + // ===================================================================================== + // FetchNarrowing + // ============== + /** + * Get fetch-narrowing start-index. + * + * @return Fetch-narrowing start-index. + */ + public int getFetchNarrowingSkipStartIndex() { + return getSqlClause().getFetchNarrowingSkipStartIndex(); + } + + /** + * Get fetch-narrowing size. + * + * @return Fetch-narrowing size. + */ + public int getFetchNarrowingLoopCount() { + return getSqlClause().getFetchNarrowingLoopCount(); + } + + /** + * Is fetch start index supported? + * + * @return Determination. + */ + public boolean isFetchNarrowingSkipStartIndexEffective() { + return !getSqlClause().isFetchStartIndexSupported(); + } + + /** + * Is fetch size supported? + * + * @return Determination. + */ + public boolean isFetchNarrowingLoopCountEffective() { + return !getSqlClause().isFetchSizeSupported(); + } + + /** + * Is fetch-narrowing effective? + * + * @return Determiantion. + */ + public boolean isFetchNarrowingEffective() { + return getSqlClause().isFetchNarrowingEffective(); + } + + // ===================================================================================== + // Paging + // ====== + /** + * Fetch first. + *
+     * If you invoke this, your SQL returns [fetch-size] records from first.
+     * 
+ * @param fetchSize Fetch-size. (NotMinus & NotZero) + * @return this. (NotNull) + */ + public ${glPagingBeanInterfaceName} fetchFirst(int fetchSize) { + getSqlClause().fetchFirst(fetchSize); + return this; + } + + /** + * Fetch scope. + *
+     * If you invoke this, your SQL returns [fetch-size] records from [fetch-start-index].
+     * 
+ * @param fetchStartIndex Fetch-start-index. 0 origin. (NotMinus) + * @param fetchSize Fetch-size. (NotMinus & NotZero) + * @return this. (NotNull) + */ + public ${glPagingBeanInterfaceName} fetchScope(int fetchStartIndex, int fetchSize) { + getSqlClause().fetchScope(fetchStartIndex, fetchSize); + return this; + } + + /** + * Fetch page. + *
+     * When you invoke this, it is normally necessary to invoke 'fetchFirst()' or 'fetchScope()' ahead of that.
+     *  But you also can use default-fetch-size without invoking 'fetchFirst()' or 'fetchScope()'.
+     *  If you invoke this, your SQL returns [fetch-size] records from [fetch-start-index] calculated by [fetch-page-number].
+     * 
+ * @param fetchPageNumber Fetch-page-number. 1 origin. (NotMinus & NotZero) + * @return this. (NotNull) + */ + public ${glPagingBeanInterfaceName} fetchPage(int fetchPageNumber) { + getSqlClause().fetchPage(fetchPageNumber); + return this; + } + + /** + * ${database.ImplementComment} + * + * @return Fetch-start-index. + */ + public int getFetchStartIndex() { + return getSqlClause().getFetchStartIndex(); + } + + /** + * ${database.ImplementComment} + * + * @return Fetch-size. + */ + public int getFetchSize() { + return getSqlClause().getFetchSize(); + } + + /** + * ${database.ImplementComment} + * + * @return Fetch-page-number. + */ + public int getFetchPageNumber() { + return getSqlClause().getFetchPageNumber(); + } + + /** + * ${database.ImplementComment} + * + * @return Page start index. 0 origin. (NotMinus) + */ + public int getPageStartIndex() { + return getSqlClause().getPageStartIndex(); + } + + /** + * ${database.ImplementComment} + * + * @return Page end index. 0 origin. (NotMinus) + */ + public int getPageEndIndex() { + return getSqlClause().getPageEndIndex(); + } + + /** + * Is fetch scope effective? + * + * @return Determiantion. + */ + public boolean isFetchScopeEffective() { + return getSqlClause().isFetchScopeEffective(); + } + + // ===================================================================================== + // For SqlComment + // ============== + /** + * Get select-hint. {select [select-hint] * from table...} + * + * @return Select-hint. (NotNull) + */ + public String getSelectHint() { + return getSqlClause().getSelectHint(); + } + + /** + * Get from-base-table-hint. {select * from table [from-base-table-hint] where ...} + * + * @return from-base-table-hint. (NotNull) + */ + public String getFromBaseTableHint() { + return getSqlClause().getFromBaseTableHint(); + } + + /** + * Get from-hint. {select * from table [from-hint] where ...} + * + * @return From-hint. (NotNull) + */ + public String getFromHint() { + return getSqlClause().getFromHint(); + } + + /** + * Get sql-suffix. {select * from table where ... order by ... [sql-suffix]} + * + * @return Sql-suffix. (NotNull) + */ + public String getSqlSuffix() { + return getSqlClause().getSqlSuffix(); + } +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/ckey/ConditionKey.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/ckey/ConditionKey.vm 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/ckey/ConditionKey.vm 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,287 @@ +package ${glPackageBaseCommonCKey}; + +#set ($myClassName = "${glConditionKeyName}") + +import ${glPackageBaseCommonCOption}.${glConditionOptionInterfaceName}; +import ${glPackageBaseCommonCValue}.${glConditionValueName}; + +/** + * The abstract class of condition-key. + * + * @author ${database.ClassAuthor} + */ +public abstract class ${myClassName} { + + /** Mark of replaced value. */ + public static final String MARK_OF_REPLACED_VALUE = "ReplacedValue"; + + /** The condition key of equal. */ + public static final ${myClassName} CK_EQUAL = new ${myClassName}Equal(); + + /** The condition key of notEqual. */ + public static final ${myClassName} CK_NOT_EQUAL = new ${myClassName}NotEqual(); + + /** The condition key of greaterThan. */ + public static final ${myClassName} CK_GREATER_THAN = new ${myClassName}GreaterThan(); + + /** The condition key of lessrThan. */ + public static final ${myClassName} CK_LESS_THAN = new ${myClassName}LessThan(); + + /** The condition key of greaterEqual. */ + public static final ${myClassName} CK_GREATER_EQUAL = new ${myClassName}GreaterEqual(); + + /** The condition key of lessEqual. */ + public static final ${myClassName} CK_LESS_EQUAL = new ${myClassName}LessEqual(); + + /** The condition key of prefixSearch. */ + public static final ${myClassName} CK_PREFIX_SEARCH = new ${myClassName}PrefixSearch(); + + /** The condition key of likeSearch. */ + public static final ${myClassName} CK_LIKE_SEARCH = new ${myClassName}LikeSearch(); + + /** The condition key of inScope. */ + public static final ${myClassName} CK_IN_SCOPE = new ${myClassName}InScope(); + + /** The condition key of notInScope. */ + public static final ${myClassName} CK_NOT_IN_SCOPE = new ${myClassName}NotInScope(); + + /** The condition key of isNull. */ + public static final ${myClassName} CK_IS_NULL = new ${myClassName}IsNull(); + + /** The condition key of isNotNull. */ + public static final ${myClassName} CK_IS_NOT_NULL = new ${myClassName}IsNotNull(); + + /** Dummy-object for IsNull and IsNotNull and so on... */ + protected static final Object DUMMY_OBJECT = new Object(); + + /** Condition-key. */ + protected String _conditionKey; + + /** Operand. */ + protected String _operand; + + /** + * Get condition-key. + * + * @return Condition-key. + */ + public String getConditionKey() { + return _conditionKey; + } + + /** + * Get operand. + * + * @return Operand. + */ + public String getOperand() { + return _operand; + } + + /** + * Is valid registration? + * + * @param conditionValue Condition value. (NotNull) + * @param value Value. (NotNull) + * @param callerName Caller name. (NotNull) + * @return Determination. + */ + abstract public boolean isValidRegistration(${glConditionValueName} conditionValue, Object value, String callerName); + + /** + * Add where clause. + * + * @param conditionList Condition list. (NotNull) + * @param columnName Column name. (NotNull) + * @param value Condition value. (NotNull) + * @return this. + */ + public ${myClassName} addWhereClause(java.util.List${database.filterGenericsString('String')} conditionList, String columnName, ${glConditionValueName} value) { + if (value == null) { + String msg = "Argument[value] must not be null:"; + throw new IllegalArgumentException(msg + " value=" + value + " this.toString()=" + toString()); + } + doAddWhereClause(conditionList, columnName, value); + return this; + } + + /** + * Add where clause. + * + * @param conditionList Condition list. (NotNull) + * @param columnName Column name. (NotNull) + * @param value Condition value. (NotNull) + * @param option Condition option. (NotNull) + * @return this. + */ + public ${myClassName} addWhereClause(java.util.List${database.filterGenericsString('String')} conditionList, String columnName, ${glConditionValueName} value, ${glConditionOptionInterfaceName} option) { + if (value == null) { + String msg = "Argument[value] must not be null:"; + throw new IllegalArgumentException(msg + " value=" + value + " this.toString()=" + toString()); + } + doAddWhereClause(conditionList, columnName, value, option); + return this; + } + + /** + * Do add where clause. + * + * @param conditionList Condition list. (NotNull) + * @param columnName Column name. (NotNull) + * @param value Condition value. (NotNull) + */ + abstract protected void doAddWhereClause(java.util.List${database.filterGenericsString('String')} conditionList, String columnName, ${glConditionValueName} value); + + /** + * Do add where clause. + * + * @param conditionList Condition list. (NotNull) + * @param columnName Column name. (NotNull) + * @param value Condition value. (NotNull) + * @param option Condition option. (NotNull) + */ + abstract protected void doAddWhereClause(java.util.List${database.filterGenericsString('String')} conditionList, String columnName, ${glConditionValueName} value, ${glConditionOptionInterfaceName} option); + + /** + * Setup condition value. + * + * @param conditionValue Condition value. (NotNull) + * @param value Value. (Nullable) + * @param location Location. (Nullable) + * @return Condition value. (The same as argument[conditionValue]) (NotNull) + */ + public ${glConditionValueName} setupConditionValue(${glConditionValueName} conditionValue, Object value, String location) { + if (conditionValue == null) { + String msg = "Argument[conditionValue] must not be null:"; + throw new IllegalArgumentException(msg + " value=" + value + " this.toString()=" + toString()); + } + doSetupConditionValue(conditionValue, value, location); + return conditionValue; + } + + /** + * Setup condition value. + * + * @param conditionValue Condition value. (NotNull) + * @param value Value. (Nullable) + * @param location Location. (Nullable) + * @param option Condition option. (NotNull) + * @return Condition value. (The same as argument[conditionValue]) (NotNull) + */ + public ${glConditionValueName} setupConditionValue(${glConditionValueName} conditionValue, Object value, String location, ${glConditionOptionInterfaceName} option) { + if (conditionValue == null) { + String msg = "Argument[conditionValue] must not be null:"; + throw new IllegalArgumentException(msg + " value=" + value + " this.toString()=" + toString()); + } + doSetupConditionValue(conditionValue, value, location, option); + return conditionValue; + } + + /** + * Do setup condition value. + * + * @param conditionValue Condition value. (NotNull) + * @param value Value. (NotNull) + * @param location Location. (NotNull) + */ + abstract protected void doSetupConditionValue(${glConditionValueName} conditionValue, Object value, String location); + + /** + * Do setup condition value. + * + * @param conditionValue Condition value. (NotNull) + * @param value Value. (NotNull) + * @param location Location. (NotNull) + * @param option Condition option. (NotNull) + */ + abstract protected void doSetupConditionValue(${glConditionValueName} conditionValue, Object value, String location, ${glConditionOptionInterfaceName} option); + + /** + * Build bind clause. (for s2dao) + * + * @param columnName Column name. (NotNull) + * @param location Location. (NotNull) + * @return Bind clause. (NotNull) + */ + protected String buildBindClause(String columnName, String location) { + return columnName + " " + getOperand() + " " + "/*dto." + location + "*/null"; + } + + /** + * Build bind clause. (for s2dao) + * + * @param columnName Column name. (NotNull) + * @param location Location. (NotNull) + * @param additionalOption Additional option. (NotNull) + * @return Bind clause. (NotNull) + */ + protected String buildBindClauseWithRearOption(String columnName, String location, String rearOption) { + return columnName + " " + getOperand() + " " + "/*dto." + location + "*/null" + rearOption; + } + + /** + * Build bind clause. (for s2dao) + * + * @param columnName Column name. (NotNull) + * @param location Location. (NotNull) + * @param dummyValue Dummy value. (NotNull) + * @return Bind clause. (NotNull) + */ + protected String buildBindClause(String columnName, String location, String dummyValue) { + return columnName + " " + getOperand() + " " + "/*dto." + location + "*/" + dummyValue; + } + + /** + * Build clause without value. + * + * @param columnName Column name. (NotNull) + * @return Clause without value. (NotNull) + */ + protected String buildClauseWithoutValue(String columnName) { + return columnName + " " + getOperand(); + } + + /** + * Get wild-card. + * + * @return Wild-card. + */ + protected String getWildCard() { + return "${database.wildCard}"; + } + + /** + * ${database.OverrideComment} + * Returns hash-code of this condition-key string. + * + * @return HashCode. + */ + public int hashCode() { + return getConditionKey().hashCode(); + } + + /** + * ${database.OverrideComment} + * If the condition-key of the other is same as this one, returns true. + * + * @param other Other entity. (Nullable) + * @return Comparing result. If other is null, returns false. + */ + public boolean equals(Object other) { + if (other instanceof ${myClassName}) { + if (this.getConditionKey().equals(((${myClassName})other).getConditionKey())) { + return true; + } + } + return false; + } + + /** + * ${database.OverrideComment} + * + * @return View-string of condition key information. + */ + public String toString() { + return "${myClassName}: " + getConditionKey() + " " + getOperand() + " wild-card=[" + getWildCard() + "]"; + } +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/ckey/ConditionKey_equal.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/ckey/ConditionKey_equal.vm 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/ckey/ConditionKey_equal.vm 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,101 @@ +package ${glPackageBaseCommonCKey}; + +#set ($myClassName = "${glConditionKeyName}Equal") + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +import ${glPackageBaseCommonCOption}.${glConditionOptionInterfaceName}; +import ${glPackageBaseCommonCValue}.${glConditionValueName}; + +/** + * The condition-key of equal. + * + * @author ${database.ClassAuthor} + */ +public class ${myClassName} extends ${glConditionKeyName} { + + /** Log-instance. */ + private static final Log _log = LogFactory.getLog(${myClassName}.class); + + /** + * Constructor. + */ + protected ${myClassName}() { + _conditionKey = "equal"; + _operand = "="; + } + + /** + * Is valid registration? + * + * @param conditionValue Condition value. (NotNull) + * @param value Value. (NotNull) + * @param callerName Caller name. (NotNull) + * @return Determination. + */ + public boolean isValidRegistration(${glConditionValueName} conditionValue, Object value, String callerName) { + if (value == null) { + return false; + } + if (conditionValue.hasEqual()) { + if (conditionValue.equalEqual(value)) { + _log.warn("The value has already registered at " + callerName + ": value=" + value); + return false; + } else { + conditionValue.overrideEqual(value); + return false; + } + } + return true; + } + + /** + * This method implements super#doAddWhereClause(). + * + * @param conditionList Condition list. (NotNull) + * @param columnName Column name. (NotNull) + * @param value Condition value. (NotNull) + */ + protected void doAddWhereClause(java.util.List${database.filterGenericsString('String')} conditionList, String columnName, ${glConditionValueName} value) { + if (value.getEqual() == null) { + return; + } + conditionList.add(buildBindClause(columnName, value.getEqualLocation())); + } + + /** + * This method implements super#doAddWhereClause(). + * + * @param conditionList Condition list. (NotNull) + * @param columnName Column name. (NotNull) + * @param value Condition value. (NotNull) + * @param option Condition option. (NotNull) + */ + protected void doAddWhereClause(java.util.List${database.filterGenericsString('String')} conditionList, String columnName, ${glConditionValueName} value, ${glConditionOptionInterfaceName} option) { + throw new UnsupportedOperationException("doAddWhereClause with condition-option is unsupported!!!"); + } + + /** + * This method implements super#doSetupConditionValue(). + * + * @param conditionValue Condition value. (NotNull) + * @param value Value. (NotNull) + * @param location Location. (NotNull) + */ + protected void doSetupConditionValue(${glConditionValueName} conditionValue, Object value, String location) { + conditionValue.setEqual(value).setEqualLocation(location); + } + + /** + * This method implements super#doSetupConditionValue(). + * + * @param conditionValue Condition value. (NotNull) + * @param value Value. (NotNull) + * @param location Location. (NotNull) + * @param option Condition option. (NotNull) + */ + protected void doSetupConditionValue(${glConditionValueName} conditionValue, Object value, String location, ${glConditionOptionInterfaceName} option) { + throw new UnsupportedOperationException("doSetupConditionValue with condition-option is unsupported!!!"); + } +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/ckey/ConditionKey_greaterEqual.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/ckey/ConditionKey_greaterEqual.vm 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/ckey/ConditionKey_greaterEqual.vm 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,101 @@ +package ${glPackageBaseCommonCKey}; + +#set ($myClassName = "${glConditionKeyName}GreaterEqual") + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +import ${glPackageBaseCommonCOption}.${glConditionOptionInterfaceName}; +import ${glPackageBaseCommonCValue}.${glConditionValueName}; + +/** + * The condition-key of greaterEqual. + * + * @author ${database.ClassAuthor} + */ +public class ${myClassName} extends ${glConditionKeyName} { + + /** Log-instance. */ + private static final Log _log = LogFactory.getLog(${myClassName}.class); + + /** + * Constructor. + */ + protected ${myClassName}() { + _conditionKey = "greaterEqual"; + _operand = ">="; + } + + /** + * Is valid registration? + * + * @param conditionValue Condition value. (NotNull) + * @param value Value. (NotNull) + * @param callerName Caller name. (NotNull) + * @return Determination. + */ + public boolean isValidRegistration(${glConditionValueName} conditionValue, Object value, String callerName) { + if (value == null) { + return false; + } + if (conditionValue.hasGreaterEqual()) { + if (conditionValue.equalGreaterEqual(value)) { + _log.warn("The value has already registered at " + callerName + ": value=" + value); + return false; + } else { + conditionValue.overrideGreaterEqual(value); + return false; + } + } + return true; + } + + /** + * This method implements super#doAddWhereClause(). + * + * @param conditionList Condition list. (NotNull) + * @param columnName Column name. (NotNull) + * @param value Condition value. (NotNull) + */ + protected void doAddWhereClause(java.util.List${database.filterGenericsString('String')} conditionList, String columnName, ${glConditionValueName} value) { + if (value.getGreaterEqual() == null) { + return; + } + conditionList.add(buildBindClause(columnName, value.getGreaterEqualLocation())); + } + + /** + * This method implements super#doAddWhereClause(). + * + * @param conditionList Condition list. (NotNull) + * @param columnName Column name. (NotNull) + * @param value Condition value. (NotNull) + * @param option Condition option. (NotNull) + */ + protected void doAddWhereClause(java.util.List${database.filterGenericsString('String')} conditionList, String columnName, ${glConditionValueName} value, ${glConditionOptionInterfaceName} option) { + throw new UnsupportedOperationException("doAddWhereClause that has ConditionOption is unsupported!!!"); + } + + /** + * This method implements super#doSetupConditionValue(). + * + * @param conditionValue Condition value. (NotNull) + * @param value Value. (NotNull) + * @param location Location. (NotNull) + */ + protected void doSetupConditionValue(${glConditionValueName} conditionValue, Object value, String location) { + conditionValue.setGreaterEqual(value).setGreaterEqualLocation(location); + } + + /** + * This method implements super#doSetupConditionValue(). + * + * @param conditionValue Condition value. (NotNull) + * @param value Value. (NotNull) + * @param location Location. (NotNull) + * @param option Condition option. (NotNull) + */ + protected void doSetupConditionValue(${glConditionValueName} conditionValue, Object value, String location, ${glConditionOptionInterfaceName} option) { + throw new UnsupportedOperationException("doSetupConditionValue with condition-option is unsupported!!!"); + } +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/ckey/ConditionKey_greaterThan.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/ckey/ConditionKey_greaterThan.vm 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/ckey/ConditionKey_greaterThan.vm 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,101 @@ +package ${glPackageBaseCommonCKey}; + +#set ($myClassName = "${glConditionKeyName}GreaterThan") + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +import ${glPackageBaseCommonCOption}.${glConditionOptionInterfaceName}; +import ${glPackageBaseCommonCValue}.${glConditionValueName}; + +/** + * The condition-key of greaterThan. + * + * @author ${database.ClassAuthor} + */ +public class ${myClassName} extends ${glConditionKeyName} { + + /** Log-instance. */ + private static final Log _log = LogFactory.getLog(${myClassName}.class); + + /** + * Constructor. + */ + protected ${myClassName}() { + _conditionKey = "greaterThan"; + _operand = ">"; + } + + /** + * Is valid registration? + * + * @param conditionValue Condition value. (NotNull) + * @param value Value. (NotNull) + * @param callerName Caller name. (NotNull) + * @return Determination. + */ + public boolean isValidRegistration(${glConditionValueName} conditionValue, Object value, String callerName) { + if (value == null) { + return false; + } + if (conditionValue.hasGreaterThan()) { + if (conditionValue.equalGreaterThan(value)) { + _log.warn("The value has already registered at " + callerName + ": value=" + value); + return false; + } else { + conditionValue.overrideGreaterThan(value); + return false; + } + } + return true; + } + + /** + * This method implements super#doAddWhereClause(). + * + * @param conditionList Condition list. (NotNull) + * @param columnName Column name. (NotNull) + * @param value Condition value. (NotNull) + */ + protected void doAddWhereClause(java.util.List${database.filterGenericsString('String')} conditionList, String columnName, ${glConditionValueName} value) { + if (value.getGreaterThan() == null) { + return; + } + conditionList.add(buildBindClause(columnName, value.getGreaterThanLocation())); + } + + /** + * This method implements super#doAddWhereClause(). + * + * @param conditionList Condition list. (NotNull) + * @param columnName Column name. (NotNull) + * @param value Condition value. (NotNull) + * @param option Condition option. (NotNull) + */ + protected void doAddWhereClause(java.util.List${database.filterGenericsString('String')} conditionList, String columnName, ${glConditionValueName} value, ${glConditionOptionInterfaceName} option) { + throw new UnsupportedOperationException("doAddWhereClause that has ConditionOption is unsupported!!!"); + } + + /** + * This method implements super#doSetupConditionValue(). + * + * @param conditionValue Condition value. (NotNull) + * @param value Value. (NotNull) + * @param location Location. (NotNull) + */ + protected void doSetupConditionValue(${glConditionValueName} conditionValue, Object value, String location) { + conditionValue.setGreaterThan(value).setGreaterThanLocation(location); + } + + /** + * This method implements super#doSetupConditionValue(). + * + * @param conditionValue Condition value. (NotNull) + * @param value Value. (NotNull) + * @param location Location. (NotNull) + * @param option Condition option. (NotNull) + */ + protected void doSetupConditionValue(${glConditionValueName} conditionValue, Object value, String location, ${glConditionOptionInterfaceName} option) { + throw new UnsupportedOperationException("doSetupConditionValue with condition-option is unsupported!!!"); + } +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/ckey/ConditionKey_inScope.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/ckey/ConditionKey_inScope.vm 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/ckey/ConditionKey_inScope.vm 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,126 @@ +package ${glPackageBaseCommonCKey}; + +#set ($myClassName = "${glConditionKeyName}InScope") + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +import ${glPackageBaseCommonCOption}.${glConditionOptionInterfaceName}; +import ${glPackageBaseCommonCOption}.${glConditionOptionInScopeName}; +import ${glPackageBaseCommonCValue}.${glConditionValueName}; + +/** + * The condition-key of inScope. + * + * @author ${database.ClassAuthor} + */ +public class ${myClassName} extends ${glConditionKeyName} { + + /** Log-instance. */ + private static final Log _log = LogFactory.getLog(${myClassName}.class); + + /** + * Constructor. + */ + protected ${myClassName}() { + _conditionKey = "inScope"; + _operand = "in"; + } + + /** + * Is valid registration? + * + * @param conditionValue Condition value. (NotNull) + * @param value Value. (NotNull) + * @param callerName Caller name. (NotNull) + * @return Determination. + */ + public boolean isValidRegistration(${glConditionValueName} conditionValue, Object value, String callerName) { + if (value == null) { + return false; + } + if (value instanceof java.util.List && ((java.util.List)value).isEmpty()) { + return false; + } + if (value instanceof java.util.List) { + if (conditionValue.hasInScope()) { + if (conditionValue.equalInScope(((java.util.List)value))) { + _log.warn("The value has already registered at " + callerName + ": value=" + value); + return false; + } else { + conditionValue.overrideInScope(((java.util.List)value)); + return false; + } + } + } + return true; + } + + /** + * This method implements super#doAddWhereClause(). + * + * @param conditionList Condition list. (NotNull) + * @param columnName Column name. (NotNull) + * @param value Condition value. (NotNull) + */ + protected void doAddWhereClause(java.util.List${database.filterGenericsString('String')} conditionList, String columnName, ${glConditionValueName} value) { + if (value.getInScope() == null) { + return; + } + final java.util.List valueList = value.getInScope(); + final java.util.List${database.filterGenericsString('Object')} checkedValueList = new java.util.ArrayList${database.filterGenericsString('Object')}(); + for (final java.util.Iterator ite = valueList.iterator(); ite.hasNext(); ) { + final Object checkTargetValue = ite.next(); + if (checkTargetValue != null) {; + checkedValueList.add(checkTargetValue); + } + } + if (checkedValueList.isEmpty()) { + return; + } + conditionList.add(buildBindClause(columnName, value.getInScopeLocation(), "('a1', 'a2')")); + } + + /** + * This method implements super#doAddWhereClause(). + * + * @param conditionList Condition list. (NotNull) + * @param columnName Column name. (NotNull) + * @param value Condition value. (NotNull) + * @param option Condition option. (NotNull) + */ + protected void doAddWhereClause(java.util.List${database.filterGenericsString('String')} conditionList, String columnName, ${glConditionValueName} value, ${glConditionOptionInterfaceName} option) { + if (option == null) { + String msg = "The argument[option] should not be null: columnName=" + columnName + " value=" + value; + throw new IllegalArgumentException(msg); + } + if (!(option instanceof ${glConditionOptionInScopeName})) { + String msg = "The argument[option] should be ${glConditionOptionInScopeName}: columnName=" + columnName + " value=" + value; + throw new IllegalArgumentException(msg); + } + conditionList.add(buildBindClause(columnName, value.getInScopeLocation(), "('a1', 'a2')")); + } + + /** + * This method implements super#doSetupConditionValue(). + * + * @param conditionValue Condition value. (NotNull) + * @param value Value. (NotNull) + * @param location Location. (NotNull) + */ + protected void doSetupConditionValue(${glConditionValueName} conditionValue, Object value, String location) { + conditionValue.setInScope((java.util.List)value).setInScopeLocation(location); + } + + /** + * This method implements super#doSetupConditionValue(). + * + * @param conditionValue Condition value. (NotNull) + * @param value Value. (NotNull) + * @param location Location. (NotNull) + * @param option Condition option. (NotNull) + */ + protected void doSetupConditionValue(${glConditionValueName} conditionValue, Object value, String location, ${glConditionOptionInterfaceName} option) { + conditionValue.setInScope((java.util.List)value, (${glConditionOptionInScopeName})option).setInScopeLocation(location); + } +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/ckey/ConditionKey_isNotNull.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/ckey/ConditionKey_isNotNull.vm 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/ckey/ConditionKey_isNotNull.vm 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,93 @@ +package ${glPackageBaseCommonCKey}; + +#set ($myClassName = "${glConditionKeyName}IsNotNull") + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +import ${glPackageBaseCommonCOption}.${glConditionOptionInterfaceName}; +import ${glPackageBaseCommonCValue}.${glConditionValueName}; + +/** + * The condition-key of isNotNull. + * + * @author ${database.ClassAuthor} + */ +public class ${myClassName} extends ${glConditionKeyName} { + + /** Log-instance. */ + private static final Log _log = LogFactory.getLog(${myClassName}.class); + + /** + * Constructor. + */ + protected ${myClassName}() { + _conditionKey = "isNotNull"; + _operand = "is not null"; + } + + /** + * Is valid registration? + * + * @param conditionValue Condition value. (NotNull) + * @param value Value. (NotNull) + * @param callerName Caller name. (NotNull) + * @return Determination. + */ + public boolean isValidRegistration(${glConditionValueName} conditionValue, Object value, String callerName) { + if (conditionValue.hasIsNotNull()) { + _log.warn("The value has already registered at " + callerName); + return false; + } + return true; + } + + /** + * This method implements super#doAddWhereClause(). + * + * @param conditionList Condition list. (NotNull) + * @param columnName Column name. (NotNull) + * @param value Condition value. (NotNull) + */ + protected void doAddWhereClause(java.util.List${database.filterGenericsString('String')} conditionList, String columnName, ${glConditionValueName} value) { + if (value.getIsNotNull() == null) { + return; + } + conditionList.add(buildClauseWithoutValue(columnName)); + } + + /** + * This method implements super#doAddWhereClause(). + * + * @param conditionList Condition list. (NotNull) + * @param columnName Column name. (NotNull) + * @param value Condition value. (NotNull) + * @param option Condition option. (NotNull) + */ + protected void doAddWhereClause(java.util.List${database.filterGenericsString('String')} conditionList, String columnName, ${glConditionValueName} value, ${glConditionOptionInterfaceName} option) { + throw new UnsupportedOperationException("doAddWhereClause that has ConditionOption is unsupported!!!"); + } + + /** + * This method implements super#doSetupConditionValue(). + * + * @param conditionValue Condition value. (NotNull) + * @param value Value. (NotNull) + * @param location Location. (NotNull) + */ + protected void doSetupConditionValue(${glConditionValueName} conditionValue, Object value, String location) { + conditionValue.setIsNotNull(DUMMY_OBJECT).setIsNotNullLocation(location); + } + + /** + * This method implements super#doSetupConditionValue(). + * + * @param conditionValue Condition value. (NotNull) + * @param value Value. (NotNull) + * @param location Location. (NotNull) + * @param option Condition option. (NotNull) + */ + protected void doSetupConditionValue(${glConditionValueName} conditionValue, Object value, String location, ${glConditionOptionInterfaceName} option) { + throw new UnsupportedOperationException("doSetupConditionValue with condition-option is unsupported!!!"); + } +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/ckey/ConditionKey_isNull.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/ckey/ConditionKey_isNull.vm 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/ckey/ConditionKey_isNull.vm 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,93 @@ +package ${glPackageBaseCommonCKey}; + +#set ($myClassName = "${glConditionKeyName}IsNull") + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +import ${glPackageBaseCommonCOption}.${glConditionOptionInterfaceName}; +import ${glPackageBaseCommonCValue}.${glConditionValueName}; + +/** + * The condition-key of isNull. + * + * @author ${database.ClassAuthor} + */ +public class ${myClassName} extends ${glConditionKeyName} { + + /** Log-instance. */ + private static final Log _log = LogFactory.getLog(${myClassName}.class); + + /** + * Constructor. + */ + protected ${myClassName}() { + _conditionKey = "isNull"; + _operand = "is null"; + } + + /** + * Is valid registration? + * + * @param conditionValue Condition value. (NotNull) + * @param value Value. (NotNull) + * @param callerName Caller name. (NotNull) + * @return Determination. + */ + public boolean isValidRegistration(${glConditionValueName} conditionValue, Object value, String callerName) { + if (conditionValue.hasIsNull()) { + _log.warn("The value has already registered at " + callerName); + return false; + } + return true; + } + + /** + * This method implements super#doAddWhereClause(). + * + * @param conditionList Condition list. (NotNull) + * @param columnName Column name. (NotNull) + * @param value Condition value. (NotNull) + */ + protected void doAddWhereClause(java.util.List${database.filterGenericsString('String')} conditionList, String columnName, ${glConditionValueName} value) { + if (value.getIsNull() == null) { + return; + } + conditionList.add(buildClauseWithoutValue(columnName)); + } + + /** + * This method implements super#doAddWhereClause(). + * + * @param conditionList Condition list. (NotNull) + * @param columnName Column name. (NotNull) + * @param value Condition value. (NotNull) + * @param option Condition option. (NotNull) + */ + protected void doAddWhereClause(java.util.List${database.filterGenericsString('String')} conditionList, String columnName, ${glConditionValueName} value, ${glConditionOptionInterfaceName} option) { + throw new UnsupportedOperationException("doAddWhereClause that has ConditionOption is unsupported!!!"); + } + + /** + * This method implements super#doSetupConditionValue(). + * + * @param conditionValue Condition value. (NotNull) + * @param value Value. (NotNull) + * @param location Location. (NotNull) + */ + protected void doSetupConditionValue(${glConditionValueName} conditionValue, Object value, String location) { + conditionValue.setIsNull(DUMMY_OBJECT).setIsNullLocation(location); + } + + /** + * This method implements super#doSetupConditionValue(). + * + * @param conditionValue Condition value. (NotNull) + * @param value Value. (NotNull) + * @param location Location. (NotNull) + * @param option Condition option. (NotNull) + */ + protected void doSetupConditionValue(${glConditionValueName} conditionValue, Object value, String location, ${glConditionOptionInterfaceName} option) { + throw new UnsupportedOperationException("doSetupConditionValue with condition-option is unsupported!!!"); + } +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/ckey/ConditionKey_lessEqual.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/ckey/ConditionKey_lessEqual.vm 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/ckey/ConditionKey_lessEqual.vm 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,101 @@ +package ${glPackageBaseCommonCKey}; + +#set ($myClassName = "${glConditionKeyName}LessEqual") + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +import ${glPackageBaseCommonCOption}.${glConditionOptionInterfaceName}; +import ${glPackageBaseCommonCValue}.${glConditionValueName}; + +/** + * The condition-key of lessEqual. + * + * @author ${database.ClassAuthor} + */ +public class ${myClassName} extends ${glConditionKeyName} { + + /** Log-instance. */ + private static final Log _log = LogFactory.getLog(${myClassName}.class); + + /** + * Constructor. + */ + protected ${myClassName}() { + _conditionKey = "lessEqual"; + _operand = "<="; + } + + /** + * Is valid registration? + * + * @param conditionValue Condition value. (NotNull) + * @param value Value. (NotNull) + * @param callerName Caller name. (NotNull) + * @return Determination. + */ + public boolean isValidRegistration(${glConditionValueName} conditionValue, Object value, String callerName) { + if (value == null) { + return false; + } + if (conditionValue.hasLessEqual()) { + if (conditionValue.equalLessEqual(value)) { + _log.warn("The value has already registered at " + callerName + ": value=" + value); + return false; + } else { + conditionValue.overrideLessEqual(value); + return false; + } + } + return true; + } + + /** + * This method implements super#doAddWhereClause(). + * + * @param conditionList Condition list. (NotNull) + * @param columnName Column name. (NotNull) + * @param value Condition value. (NotNull) + */ + protected void doAddWhereClause(java.util.List${database.filterGenericsString('String')} conditionList, String columnName, ${glConditionValueName} value) { + if (value.getLessEqual() == null) { + return; + } + conditionList.add(buildBindClause(columnName, value.getLessEqualLocation())); + } + + /** + * This method implements super#doAddWhereClause(). + * + * @param conditionList Condition list. (NotNull) + * @param columnName Column name. (NotNull) + * @param value Condition value. (NotNull) + * @param option Condition option. (NotNull) + */ + protected void doAddWhereClause(java.util.List${database.filterGenericsString('String')} conditionList, String columnName, ${glConditionValueName} value, ${glConditionOptionInterfaceName} option) { + throw new UnsupportedOperationException("doAddWhereClause that has ConditionOption is unsupported!!!"); + } + + /** + * This method implements super#doSetupConditionValue(). + * + * @param conditionValue Condition value. (NotNull) + * @param value Value. (NotNull) + * @param location Location. (NotNull) + */ + protected void doSetupConditionValue(${glConditionValueName} conditionValue, Object value, String location) { + conditionValue.setLessEqual(value).setLessEqualLocation(location); + } + + /** + * This method implements super#doSetupConditionValue(). + * + * @param conditionValue Condition value. (NotNull) + * @param value Value. (NotNull) + * @param location Location. (NotNull) + * @param option Condition option. (NotNull) + */ + protected void doSetupConditionValue(${glConditionValueName} conditionValue, Object value, String location, ${glConditionOptionInterfaceName} option) { + throw new UnsupportedOperationException("doSetupConditionValue with condition-option is unsupported!!!"); + } +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/ckey/ConditionKey_lessThan.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/ckey/ConditionKey_lessThan.vm 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/ckey/ConditionKey_lessThan.vm 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,101 @@ +package ${glPackageBaseCommonCKey}; + +#set ($myClassName = "${glConditionKeyName}LessThan") + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +import ${glPackageBaseCommonCOption}.${glConditionOptionInterfaceName}; +import ${glPackageBaseCommonCValue}.${glConditionValueName}; + +/** + * The condition-key of lessThan. + * + * @author ${database.ClassAuthor} + */ +public class ${myClassName} extends ${glConditionKeyName} { + + /** Log-instance. */ + private static final Log _log = LogFactory.getLog(${myClassName}.class); + + /** + * Constructor. + */ + protected ${myClassName}() { + _conditionKey = "lessThan"; + _operand = "<"; + } + + /** + * Is valid registration? + * + * @param conditionValue Condition value. (NotNull) + * @param value Value. (NotNull) + * @param callerName Caller name. (NotNull) + * @return Determination. + */ + public boolean isValidRegistration(${glConditionValueName} conditionValue, Object value, String callerName) { + if (value == null) { + return false; + } + if (conditionValue.hasLessThan()) { + if (conditionValue.equalLessThan(value)) { + _log.warn("The value has already registered at " + callerName + ": value=" + value); + return false; + } else { + conditionValue.overrideLessThan(value); + return false; + } + } + return true; + } + + /** + * This method implements super#doAddWhereClause(). + * + * @param conditionList Condition list. (NotNull) + * @param columnName Column name. (NotNull) + * @param value Condition value. (NotNull) + */ + protected void doAddWhereClause(java.util.List${database.filterGenericsString('String')} conditionList, String columnName, ${glConditionValueName} value) { + if (value.getLessThan() == null) { + return; + } + conditionList.add(buildBindClause(columnName, value.getLessThanLocation())); + } + + /** + * This method implements super#doAddWhereClause(). + * + * @param conditionList Condition list. (NotNull) + * @param columnName Column name. (NotNull) + * @param value Condition value. (NotNull) + * @param option Condition option. (NotNull) + */ + protected void doAddWhereClause(java.util.List${database.filterGenericsString('String')} conditionList, String columnName, ${glConditionValueName} value, ${glConditionOptionInterfaceName} option) { + throw new UnsupportedOperationException("doAddWhereClause that has ConditionOption is unsupported!!!"); + } + + /** + * This method implements super#doSetupConditionValue(). + * + * @param conditionValue Condition value. (NotNull) + * @param value Value. (NotNull) + * @param location Location. (NotNull) + */ + protected void doSetupConditionValue(${glConditionValueName} conditionValue, Object value, String location) { + conditionValue.setLessThan(value).setLessThanLocation(location); + } + + /** + * This method implements super#doSetupConditionValue(). + * + * @param conditionValue Condition value. (NotNull) + * @param value Value. (NotNull) + * @param location Location. (NotNull) + * @param option Condition option. (NotNull) + */ + protected void doSetupConditionValue(${glConditionValueName} conditionValue, Object value, String location, ${glConditionOptionInterfaceName} option) { + throw new UnsupportedOperationException("doSetupConditionValue with condition-option is unsupported!!!"); + } +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/ckey/ConditionKey_likeSearch.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/ckey/ConditionKey_likeSearch.vm 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/ckey/ConditionKey_likeSearch.vm 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,93 @@ +package ${glPackageBaseCommonCKey}; + +#set ($myClassName = "${glConditionKeyName}LikeSearch") + +import ${glPackageBaseCommonCOption}.${glConditionOptionInterfaceName}; +import ${glPackageBaseCommonCOption}.${glConditionOptionLikeSearchName}; +import ${glPackageBaseCommonCValue}.${glConditionValueName}; + +/** + * The condition-key of likeSearch. + * + * @author ${database.ClassAuthor} + */ +public class ${myClassName} extends ${glConditionKeyName} { + + /** + * Constructor. + */ + protected ${myClassName}() { + _conditionKey = "likeSearch"; + _operand = "like"; + } + + /** + * Is valid registration? + * + * @param conditionValue Condition value. (NotNull) + * @param value Value. (NotNull) + * @param callerName Caller name. (NotNull) + * @return Determination. + */ + public boolean isValidRegistration(${glConditionValueName} conditionValue, Object value, String callerName) { + if (value == null) { + return false; + } + return true; + } + + /** + * This method implements super#doAddWhereClause(). + * + * @param conditionList Condition list. (NotNull) + * @param columnName Column name. (NotNull) + * @param value Condition value. (NotNull) + */ + protected void doAddWhereClause(java.util.List${database.filterGenericsString('String')} conditionList, String columnName, ${glConditionValueName} value) { + throw new UnsupportedOperationException("doAddWhereClause without condition-option is unsupported!!!"); + } + + /** + * This method implements super#doAddWhereClause(). + * + * @param conditionList Condition list. (NotNull) + * @param columnName Column name. (NotNull) + * @param value Condition value. (NotNull) + * @param option Condition option. (NotNull) + */ + protected void doAddWhereClause(java.util.List${database.filterGenericsString('String')} conditionList, String columnName, ${glConditionValueName} value, ${glConditionOptionInterfaceName} option) { + if (option == null) { + String msg = "The argument[option] should not be null: columnName=" + columnName + " value=" + value; + throw new IllegalArgumentException(msg); + } + if (!(option instanceof ${glConditionOptionLikeSearchName})) { + String msg = "The argument[option] should be ${glConditionOptionLikeSearchName}: columnName=" + columnName + " value=" + value; + throw new IllegalArgumentException(msg); + } + final ${glConditionOptionLikeSearchName} myOption = (${glConditionOptionLikeSearchName})option; + conditionList.add(buildBindClauseWithRearOption(columnName, value.getLikeSearchLocation(), myOption.getRearOption())); + } + + /** + * This method implements super#doSetupConditionValue(). + * + * @param conditionValue Condition value. (NotNull) + * @param value Value. (NotNull) + * @param location Location. (NotNull) + */ + protected void doSetupConditionValue(${glConditionValueName} conditionValue, Object value, String location) { + throw new UnsupportedOperationException("doSetupConditionValue without condition-option is unsupported!!!"); + } + + /** + * This method implements super#doSetupConditionValue(). + * + * @param conditionValue Condition value. (NotNull) + * @param value Value. (NotNull) + * @param location Location. (NotNull) + * @param option Condition option. (NotNull) + */ + protected void doSetupConditionValue(${glConditionValueName} conditionValue, Object value, String location, ${glConditionOptionInterfaceName} option) { + conditionValue.setLikeSearch((String)value, (${glConditionOptionLikeSearchName})option).setLikeSearchLocation(location); + } +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/ckey/ConditionKey_notEqual.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/ckey/ConditionKey_notEqual.vm 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/ckey/ConditionKey_notEqual.vm 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,101 @@ +package ${glPackageBaseCommonCKey}; + +#set ($myClassName = "${glConditionKeyName}NotEqual") + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +import ${glPackageBaseCommonCOption}.${glConditionOptionInterfaceName}; +import ${glPackageBaseCommonCValue}.${glConditionValueName}; + +/** + * The condition-key of notEqual. + * + * @author ${database.ClassAuthor} + */ +public class ${myClassName} extends ${glConditionKeyName} { + + /** Log-instance. */ + private static final Log _log = LogFactory.getLog(${myClassName}.class); + + /** + * Constructor. + */ + protected ${myClassName}() { + _conditionKey = "notEqual"; + _operand = "!="; + } + + /** + * Is valid registration? + * + * @param conditionValue Condition value. (NotNull) + * @param value Value. (NotNull) + * @param callerName Caller name. (NotNull) + * @return Determination. + */ + public boolean isValidRegistration(${glConditionValueName} conditionValue, Object value, String callerName) { + if (value == null) { + return false; + } + if (conditionValue.hasNotEqual()) { + if (conditionValue.equalNotEqual(value)) { + _log.warn("The value has already registered at " + callerName + ": value=" + value); + return false; + } else { + conditionValue.overrideNotEqual(value); + return false; + } + } + return true; + } + + /** + * This method implements super#doAddWhereClause(). + * + * @param conditionList Condition list. (NotNull) + * @param columnName Column name. (NotNull) + * @param value Condition value. (NotNull) + */ + protected void doAddWhereClause(java.util.List${database.filterGenericsString('String')} conditionList, String columnName, ${glConditionValueName} value) { + if (value.getNotEqual() == null) { + return; + } + conditionList.add(buildBindClause(columnName, value.getNotEqualLocation())); + } + + /** + * This method implements super#doAddWhereClause(). + * + * @param conditionList Condition list. (NotNull) + * @param columnName Column name. (NotNull) + * @param value Condition value. (NotNull) + * @param option Condition option. (NotNull) + */ + protected void doAddWhereClause(java.util.List${database.filterGenericsString('String')} conditionList, String columnName, ${glConditionValueName} value, ${glConditionOptionInterfaceName} option) { + throw new UnsupportedOperationException("doAddWhereClause with condition-option is unsupported!!!"); + } + + /** + * This method implements super#doSetupConditionValue(). + * + * @param conditionValue Condition value. (NotNull) + * @param value Value. (NotNull) + * @param location Location. (NotNull) + */ + protected void doSetupConditionValue(${glConditionValueName} conditionValue, Object value, String location) { + conditionValue.setNotEqual(value).setNotEqualLocation(location); + } + + /** + * This method implements super#doSetupConditionValue(). + * + * @param conditionValue Condition value. (NotNull) + * @param value Value. (NotNull) + * @param location Location. (NotNull) + * @param option Condition option. (NotNull) + */ + protected void doSetupConditionValue(${glConditionValueName} conditionValue, Object value, String location, ${glConditionOptionInterfaceName} option) { + throw new UnsupportedOperationException("doSetupConditionValue with condition-option is unsupported!!!"); + } +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/ckey/ConditionKey_notInScope.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/ckey/ConditionKey_notInScope.vm 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/ckey/ConditionKey_notInScope.vm 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,117 @@ +package ${glPackageBaseCommonCKey}; + +#set ($myClassName = "${glConditionKeyName}NotInScope") + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +import ${glPackageBaseCommonCOption}.${glConditionOptionInterfaceName}; +import ${glPackageBaseCommonCValue}.${glConditionValueName}; + +/** + * The condition-key of notInScope. + * + * @author ${database.ClassAuthor} + */ +public class ${myClassName} extends ${glConditionKeyName} { + + /** Log-instance. */ + private static final Log _log = LogFactory.getLog(${myClassName}.class); + + /** + * Constructor. + */ + protected ${myClassName}() { + _conditionKey = "notInScope"; + _operand = "not in"; + } + + /** + * Is valid registration? + * + * @param conditionValue Condition value. (NotNull) + * @param value Value. (NotNull) + * @param callerName Caller name. (NotNull) + * @return Determination. + */ + public boolean isValidRegistration(${glConditionValueName} conditionValue, Object value, String callerName) { + if (value == null) { + return false; + } + if (value instanceof java.util.List && ((java.util.List)value).isEmpty()) { + return false; + } + if (value instanceof java.util.List) { + if (conditionValue.hasNotInScope()) { + if (conditionValue.equalNotInScope(((java.util.List)value))) { + _log.warn("The value has already registered at " + callerName + ": value=" + value); + return false; + } else { + conditionValue.overrideNotInScope(((java.util.List)value)); + return false; + } + } + } + return true; + } + + /** + * This method implements super#doAddWhereClause(). + * + * @param conditionList Condition list. (NotNull) + * @param columnName Column name. (NotNull) + * @param value Condition value. (NotNull) + */ + protected void doAddWhereClause(java.util.List${database.filterGenericsString('String')} conditionList, String columnName, ${glConditionValueName} value) { + if (value.getNotInScope() == null) { + return; + } + final java.util.List valueList = value.getNotInScope(); + final java.util.List${database.filterGenericsString('Object')} checkedValueList = new java.util.ArrayList${database.filterGenericsString('Object')}(); + for (final java.util.Iterator ite = valueList.iterator(); ite.hasNext(); ) { + final Object checkTargetValue = ite.next(); + if (checkTargetValue != null) {; + checkedValueList.add(checkTargetValue); + } + } + if (checkedValueList.isEmpty()) { + return; + } + conditionList.add(buildBindClause(columnName, value.getNotInScopeLocation(), "('a1', 'a2')")); + } + + /** + * This method implements super#doAddWhereClause(). + * + * @param conditionList Condition list. (NotNull) + * @param columnName Column name. (NotNull) + * @param value Condition value. (NotNull) + * @param option Condition option. (NotNull) + */ + protected void doAddWhereClause(java.util.List${database.filterGenericsString('String')} conditionList, String columnName, ${glConditionValueName} value, ${glConditionOptionInterfaceName} option) { + throw new UnsupportedOperationException("doAddWhereClause that has ConditionOption is unsupported!!!"); + } + + /** + * This method implements super#doSetupConditionValue(). + * + * @param conditionValue Condition value. (NotNull) + * @param value Value. (NotNull) + * @param location Location. (NotNull) + */ + protected void doSetupConditionValue(${glConditionValueName} conditionValue, Object value, String location) { + conditionValue.setNotInScope((java.util.List)value).setNotInScopeLocation(location); + } + + /** + * This method implements super#doSetupConditionValue(). + * + * @param conditionValue Condition value. (NotNull) + * @param value Value. (NotNull) + * @param location Location. (NotNull) + * @param option Condition option. (NotNull) + */ + protected void doSetupConditionValue(${glConditionValueName} conditionValue, Object value, String location, ${glConditionOptionInterfaceName} option) { + throw new UnsupportedOperationException("doSetupConditionValue with condition-option is unsupported!!!"); + } +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/ckey/ConditionKey_prefixSearch.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/ckey/ConditionKey_prefixSearch.vm 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/ckey/ConditionKey_prefixSearch.vm 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,101 @@ +package ${glPackageBaseCommonCKey}; + +#set ($myClassName = "${glConditionKeyName}PrefixSearch") + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +import ${glPackageBaseCommonCOption}.${glConditionOptionInterfaceName}; +import ${glPackageBaseCommonCValue}.${glConditionValueName}; + +/** + * The condition-key of prefixSearch. + * + * @author ${database.ClassAuthor} + */ +public class ${myClassName} extends ${glConditionKeyName} { + + /** Log-instance. */ + private static final Log _log = LogFactory.getLog(${myClassName}.class); + + /** + * Constructor. + */ + protected ${myClassName}() { + _conditionKey = "prefixSearch"; + _operand = "like"; + } + + /** + * Is valid registration? + * + * @param conditionValue Condition value. (NotNull) + * @param value Value. (NotNull) + * @param callerName Caller name. (NotNull) + * @return Determination. + */ + public boolean isValidRegistration(${glConditionValueName} conditionValue, Object value, String callerName) { + if (value == null) { + return false; + } + if (conditionValue.hasPrefixSearch()) { + if (conditionValue.equalPrefixSearch(value + getWildCard())) { + _log.warn("The value has already registered at " + callerName + ": value=" + value); + return false; + } else { + conditionValue.overridePrefixSearch(value); + return false; + } + } + return true; + } + + /** + * This method implements super#doAddWhereClause(). + * + * @param conditionList Condition list. (NotNull) + * @param columnName Column name. (NotNull) + * @param value Condition value. (NotNull) + */ + protected void doAddWhereClause(java.util.List${database.filterGenericsString('String')} conditionList, String columnName, ${glConditionValueName} value) { + if (value.getPrefixSearch() == null) { + return; + } + conditionList.add(buildBindClause(columnName, value.getPrefixSearchLocation())); + } + + /** + * This method implements super#doAddWhereClause(). + * + * @param conditionList Condition list. (NotNull) + * @param columnName Column name. (NotNull) + * @param value Condition value. (NotNull) + * @param option Condition option. (NotNull) + */ + protected void doAddWhereClause(java.util.List${database.filterGenericsString('String')} conditionList, String columnName, ${glConditionValueName} value, ${glConditionOptionInterfaceName} option) { + throw new UnsupportedOperationException("doAddWhereClause that has ConditionOption is unsupported!!!"); + } + + /** + * This method implements super#doSetupConditionValue(). + * + * @param conditionValue Condition value. (NotNull) + * @param value Value. (NotNull) + * @param location Location. (NotNull) + */ + protected void doSetupConditionValue(${glConditionValueName} conditionValue, Object value, String location) { + conditionValue.setPrefixSearch((value != null ? value + getWildCard() : null)).setPrefixSearchLocation(location); + } + + /** + * This method implements super#doSetupConditionValue(). + * + * @param conditionValue Condition value. (NotNull) + * @param value Value. (NotNull) + * @param location Location. (NotNull) + * @param option Condition option. (NotNull) + */ + protected void doSetupConditionValue(${glConditionValueName} conditionValue, Object value, String location, ${glConditionOptionInterfaceName} option) { + throw new UnsupportedOperationException("doSetupConditionValue with condition-option is unsupported!!!"); + } +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/coption/ConditionOption.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/coption/ConditionOption.vm 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/coption/ConditionOption.vm 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,12 @@ +package ${glPackageBaseCommonCOption}; + +#set ($myClassName = "${glConditionOptionInterfaceName}") + +/** + * The interface of condition-option. + * + * @author ${database.ClassAuthor} + */ +public interface ${myClassName} { + public String getRearOption(); +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/coption/FromToOption.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/coption/FromToOption.vm 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/coption/FromToOption.vm 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,145 @@ +package ${glPackageBaseCommonCOption}; + +#set ($myClassName = "${glConditionOptionFromToName}") + +/** + * The class of from-to-option. + *
+ * ex) fromDate:{2007/04/10 08:24:53} toDate:{2007/04/16 14:36:29}
+ *
+ *   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
+ *   new ${myClassName}().compareAsDate(); 
+ *     --> column >= '2007/04/10 00:00:00' and column < '2007/04/17 00:00:00'
+ *   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
+ *
+ *   new ${myClassName}(); 
+ *     --> column >= '2007/04/10 08:24:53' and column <= '2007/04/16 14:36:29'
+ *
+ *   new ${myClassName}().greaterThan(); 
+ *     --> column > '2007/04/10 08:24:53' and column <= '2007/04/16 14:36:29'
+ *
+ *   new ${myClassName}().lessThan(); 
+ *     --> column >= '2007/04/10 08:24:53' and column < '2007/04/16 14:36:29'
+ *
+ *   new ${myClassName}().greaterThan().lessThan(); 
+ *     --> column > '2007/04/10 08:24:53' and column < '2007/04/16 14:36:29'
+ * 
+ * 
+ * @author ${database.ClassAuthor} + */ +public class ${myClassName} implements ${glConditionOptionInterfaceName} { + + // ===================================================================================== + // Attribute + // ========= + protected boolean _fromDateGreaterThan; + + protected boolean _toDateLessThan; + + protected boolean _compareAsDate; + + // ===================================================================================== + // Interface Implementation + // ======================== + public String getRearOption() { + String msg = "Thie option does not use getRearOption()!"; + throw new UnsupportedOperationException(msg); + } + + // ===================================================================================== + // Main + // ==== + public ${myClassName} greaterThan() { + _fromDateGreaterThan = true; return this; + } + + public ${myClassName} lessThan() { + _toDateLessThan = true; return this; + } + + /** + * Compare as date. + *
+     * ex) fromDate:{2007/04/10 08:24:53} toDate:{2007/04/16 14:36:29}
+     *
+     *   new ${myClassName}().compareAsDate();
+     *     --> column >= '2007/04/10 00:00:00' and column < '2007/04/17 00:00:00'
+     * 
+     * This method ignore greaterThan() and lessThan().
+     * 
+ * @return this. (NotNull) + */ + public ${myClassName} compareAsDate() { + _compareAsDate = true; return this; + } + + // ===================================================================================== + // Internal Main + // ============= + public java.util.Date filterFromDate(java.util.Date fromDate) { + if (fromDate == null) { + return null; + } + if (_compareAsDate) { + final java.util.Calendar cal = java.util.Calendar.getInstance(); + cal.setTimeInMillis(fromDate.getTime()); + clearCalendarHourMinuteSecondMilli(cal); + final java.util.Date cloneDate = (java.util.Date) fromDate.clone(); + cloneDate.setTime(cal.getTimeInMillis()); + return cloneDate; + } + return fromDate; + } + + public java.util.Date filterToDate(java.util.Date toDate) { + if (toDate == null) { + return null; + } + if (_compareAsDate) { + final java.util.Calendar cal = java.util.Calendar.getInstance(); + cal.setTimeInMillis(toDate.getTime()); + clearCalendarHourMinuteSecondMilli(cal); + addCalendarNextDay(cal);// Key Point! + final java.util.Date cloneDate = (java.util.Date) toDate.clone(); + cloneDate.setTime(cal.getTimeInMillis()); + return cloneDate; + } + return toDate; + } + + public ${glPackageBaseCommonCKey}.${glConditionKeyName} getFromDateConditionKey() { + if (_compareAsDate) { + return ${glPackageBaseCommonCKey}.${glConditionKeyName}.CK_GREATER_EQUAL; + } + if (_fromDateGreaterThan) { + return ${glPackageBaseCommonCKey}.${glConditionKeyName}.CK_GREATER_THAN;// Default! + } else { + return ${glPackageBaseCommonCKey}.${glConditionKeyName}.CK_GREATER_EQUAL;// Default! + } + } + + public ${glPackageBaseCommonCKey}.${glConditionKeyName} getToDateConditionKey() { + if (_compareAsDate) { + return ${glPackageBaseCommonCKey}.${glConditionKeyName}.CK_LESS_THAN; + } + if (_toDateLessThan) { + return ${glPackageBaseCommonCKey}.${glConditionKeyName}.CK_LESS_THAN;// Default! + } else { + return ${glPackageBaseCommonCKey}.${glConditionKeyName}.CK_LESS_EQUAL;// Default! + } + } + + // ===================================================================================== + // Calendar Helper + // =============== + protected void addCalendarNextDay(java.util.Calendar cal) { + cal.add(java.util.Calendar.DAY_OF_MONTH, 1); + } + + protected void clearCalendarHourMinuteSecondMilli(java.util.Calendar cal) { + cal.clear(java.util.Calendar.MILLISECOND); + cal.clear(java.util.Calendar.SECOND); + cal.clear(java.util.Calendar.MINUTE); + cal.set(java.util.Calendar.HOUR_OF_DAY, cal.getActualMinimum(java.util.Calendar.HOUR_OF_DAY)); + } +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/coption/InScopeOption.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/coption/InScopeOption.vm 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/coption/InScopeOption.vm 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,89 @@ +package ${glPackageBaseCommonCOption}; + +#set ($myClassName = "${glConditionOptionInScopeName}") + +import ${glPackageBaseCommonCOptionPartsLocal}.${glConditionOptionPartsAgentJapaneseName}; + +/** + * The class of in-scope-option. + * + * @author ${database.ClassAuthor} + */ +public class ${myClassName} extends ${glConditionOptionSimpleStringName} { + + // ===================================================================================== + // Split + // ===== + public ${myClassName} splitBySpace() { + return (${myClassName})doSplitBySpace(); + } + + public ${myClassName} splitBySpace(int splitLimitCount) { + return (${myClassName})doSplitBySpace(splitLimitCount); + } + + public ${myClassName} splitBySpaceContainsDoubleByte() { + return (${myClassName})doSplitBySpaceContainsDoubleByte(); + } + + public ${myClassName} splitBySpaceContainsDoubleByte(int splitLimitCount) { + return (${myClassName})doSplitBySpaceContainsDoubleByte(splitLimitCount); + } + + public ${myClassName} splitByPipeLine() { + return (${myClassName})doSplitByPipeLine(); + } + + public ${myClassName} splitByPipeLine(int splitLimitCount) { + return (${myClassName})doSplitByPipeLine(splitLimitCount); + } + + // ===================================================================================== + // To Upper/Lower Case + // =================== + public ${myClassName} toUpperCase() { + return (${myClassName})doToUpperCase(); + } + + public ${myClassName} toLowerCase() { + return (${myClassName})doToLowerCase(); + } + + // ===================================================================================== + // To Single Byte + // ============== + public ${myClassName} toSingleByteSpace() { + return (${myClassName})doToSingleByteSpace(); + } + + public ${myClassName} toSingleByteAlphabetNumber() { + return (${myClassName})doToSingleByteAlphabetNumber(); + } + + public ${myClassName} toSingleByteAlphabetNumberMark() { + return (${myClassName})doToSingleByteAlphabetNumberMark(); + } + + // ===================================================================================== + // To Double Byte + // ============== + + // ===================================================================================== + // Japanese + // ======== + public ${glConditionOptionPartsAgentJapaneseName} localJapanese() { + return doLocalJapanese(); + } + + // ===================================================================================== + // Real Value + // ========== + public java.util.List generateRealValueList(java.util.List valueList) { + final java.util.List${database.filterGenericsString('String')} resultList = new java.util.ArrayList${database.filterGenericsString('String')}(); + for (final java.util.Iterator ite = valueList.iterator(); ite.hasNext(); ) { + final String value = (String)ite.next(); + resultList.add(generateRealValue(value)); + } + return resultList; + } +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/coption/LikeSearchOption.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/coption/LikeSearchOption.vm 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/coption/LikeSearchOption.vm 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,210 @@ +package ${glPackageBaseCommonCOption}; + +#set ($myClassName = "${glConditionOptionLikeSearchName}") + +import ${glPackageBaseCommonCOptionPartsLocal}.${glConditionOptionPartsAgentJapaneseName}; + +/** + * The class of like-search-option. + * + * @author ${database.ClassAuthor} + */ +public class ${myClassName} extends ${glConditionOptionSimpleStringName} { + + protected static final String LIKE_PREFIX = "prefix"; + protected static final String LIKE_SUFFIX = "suffix"; + protected static final String LIKE_CONTAIN = "contain"; + + protected String _like; + protected String _escape; + + protected java.util.List${database.filterGenericsString('LikeAsOrCallback')} _likeAsOrCallbackList = new java.util.ArrayList${database.filterGenericsString('LikeAsOrCallback')}(); + + // ===================================================================================== + // Rear Option + // =========== + public String getRearOption() { + if (_escape == null || _escape.trim().length() == 0) { + return ""; + } + return " escape '" + _escape + "'"; + } + + // ===================================================================================== + // AsOr + // ==== + public static interface LikeAsOrCallback { + public String getAdditionalTargetPropertyName(); + public String filterValue(String currentValue); + public ${myClassName} filterOption(${myClassName} optionDeepCopyWithoutCallback); + } + + public static abstract class DefaultLikeAsOrCallback implements LikeAsOrCallback { + public String filterValue(String currentValue) { + return currentValue; + } + public ${myClassName} filterOption(${myClassName} optionDeepCopyWithoutCallback) { + return optionDeepCopyWithoutCallback; + } + } + + public java.util.List${database.filterGenericsString('LikeAsOrCallback')} getLikeAsOrCallbackList() { + return _likeAsOrCallbackList; + } + + public void addLikeAsOrCallback(LikeAsOrCallback likeAsOrCallback) { + _likeAsOrCallbackList.add(likeAsOrCallback); + } + + public void clearLikeAsOrCallback() { + _likeAsOrCallbackList.clear(); + } + + // ===================================================================================== + // Like + // ==== + public ${myClassName} likePrefix() { + _like = LIKE_PREFIX; + return this; + } + public ${myClassName} likeSuffix() { + _like = LIKE_SUFFIX; + return this; + } + public ${myClassName} likeContain() { + _like = LIKE_CONTAIN; + return this; + } + + // ===================================================================================== + // Escape + // ====== + public ${myClassName} escapeByPipeLine() { + _escape = "|"; + return this; + } + + public ${myClassName} escapeByAtMark() { + _escape = "@"; + return this; + } + + public ${myClassName} escapeBySlash() { + _escape = "/"; + return this; + } + + public ${myClassName} escapeByBackSlash() { + _escape = "\\"; + return this; + } + + // ===================================================================================== + // Split + // ===== + public ${myClassName} splitBySpace() { + return (${myClassName})doSplitBySpace(); + } + + public ${myClassName} splitBySpace(int splitLimitCount) { + return (${myClassName})doSplitBySpace(splitLimitCount); + } + + public ${myClassName} splitBySpaceContainsDoubleByte() { + return (${myClassName})doSplitBySpaceContainsDoubleByte(); + } + + public ${myClassName} splitBySpaceContainsDoubleByte(int splitLimitCount) { + return (${myClassName})doSplitBySpaceContainsDoubleByte(splitLimitCount); + } + + public ${myClassName} splitByPipeLine() { + return (${myClassName})doSplitByPipeLine(); + } + + public ${myClassName} splitByPipeLine(int splitLimitCount) { + return (${myClassName})doSplitByPipeLine(splitLimitCount); + } + + // ===================================================================================== + // To Upper/Lower Case + // =================== + public ${myClassName} toUpperCase() { + return (${myClassName})doToUpperCase(); + } + + public ${myClassName} toLowerCase() { + return (${myClassName})doToLowerCase(); + } + + // ===================================================================================== + // To Single Byte + // ============== + public ${myClassName} toSingleByteSpace() { + return (${myClassName})doToSingleByteSpace(); + } + + public ${myClassName} toSingleByteAlphabetNumber() { + return (${myClassName})doToSingleByteAlphabetNumber(); + } + + public ${myClassName} toSingleByteAlphabetNumberMark() { + return (${myClassName})doToSingleByteAlphabetNumberMark(); + } + + // ===================================================================================== + // To Double Byte + // ============== + + // ===================================================================================== + // Japanese + // ======== + public ${glConditionOptionPartsAgentJapaneseName} localJapanese() { + return doLocalJapanese(); + } + + // ===================================================================================== + // Real Value + // ========== + public String generateRealValue(String value) { + value = super.generateRealValue(value); + + // Escape + if (_escape != null && _escape.trim().length() != 0) { + String tmp = replace(value, _escape, _escape + _escape); + tmp = replace(tmp, "%", _escape + "%"); + tmp = replace(tmp, "_", _escape + "_"); + value = tmp; + } + final String wildCard = "${database.wildCard}"; + if (_like == null || _like.trim().length() == 0) { + return value; + } else if (_like.equals(LIKE_PREFIX)) { + return value + wildCard; + } else if (_like.equals(LIKE_SUFFIX)) { + return wildCard + value; + } else if (_like.equals(LIKE_CONTAIN)) { + return wildCard + value + wildCard; + } else { + String msg = "The like was wrong string: " + _like; + throw new IllegalStateException(msg); + } + } + + // ===================================================================================== + // DeepCopy + // ======== + public Object createDeepCopy() { + final ${myClassName} deepCopy = (${myClassName})super.createDeepCopy(); + deepCopy._like = _like; + deepCopy._escape = _escape; + for (java.util.Iterator ite = _likeAsOrCallbackList.iterator(); ite.hasNext(); ) { + deepCopy.addLikeAsOrCallback((LikeAsOrCallback)ite.next()); + } + return deepCopy; + } + + protected ${glConditionOptionSimpleStringName} newDeepCopyInstance() { + return new ${myClassName}(); + } +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/coption/SimpleStringOption.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/coption/SimpleStringOption.vm 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/coption/SimpleStringOption.vm 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,193 @@ +package ${glPackageBaseCommonCOption}; + +#set ($myClassName = "${glConditionOptionSimpleStringName}") + +import ${glPackageBaseCommonCOptionParts}.${glConditionOptionPartsSplitName}; +import ${glPackageBaseCommonCOptionParts}.${glConditionOptionPartsToUpperLowerCaseName}; +import ${glPackageBaseCommonCOptionParts}.${glConditionOptionPartsToSingleByteName}; +import ${glPackageBaseCommonCOptionPartsLocal}.${glConditionOptionPartsAgentJapaneseName}; + +/** + * The class of simple-string-option. + * + * @author ${database.ClassAuthor} + */ +public class ${myClassName} implements ${glConditionOptionInterfaceName} { + + protected ${glConditionOptionPartsSplitName} _splitOptionParts; + protected ${glConditionOptionPartsToUpperLowerCaseName} _toUpperLowerCaseOptionParts; + protected ${glConditionOptionPartsToSingleByteName} _toSingleByteCaseOptionParts; + protected ${glConditionOptionPartsAgentJapaneseName} _japaneseOptionPartsAgent; + + // ===================================================================================== + // Rear Option + // =========== + public String getRearOption() { + return ""; + } + + // ===================================================================================== + // Split + // ===== + protected ${myClassName} doSplitBySpace() { + getSplitOptionParts().splitBySpace(); + return this; + } + + protected ${myClassName} doSplitBySpace(int splitLimitCount) { + getSplitOptionParts().splitBySpace(splitLimitCount); + return this; + } + + protected ${myClassName} doSplitBySpaceContainsDoubleByte() { + getSplitOptionParts().splitBySpaceContainsDoubleByte(); + return this; + } + + protected ${myClassName} doSplitBySpaceContainsDoubleByte(int splitLimitCount) { + getSplitOptionParts().splitBySpaceContainsDoubleByte(splitLimitCount); + return this; + } + + protected ${myClassName} doSplitByPipeLine() { + getSplitOptionParts().splitByPipeLine(); + return this; + } + + protected ${myClassName} doSplitByPipeLine(int splitLimitCount) { + getSplitOptionParts().splitByPipeLine(splitLimitCount); + return this; + } + + protected ${glConditionOptionPartsSplitName} getSplitOptionParts() { + if (_splitOptionParts == null) { + _splitOptionParts = new ${glConditionOptionPartsSplitName}(); + } + return _splitOptionParts; + } + + public boolean isSplit() { + return getSplitOptionParts().isSplit(); + } + + public String[] generateSplitValueArray(String value) { + return getSplitOptionParts().generateSplitValueArray(value); + } + + // ===================================================================================== + // To Upper/Lower Case + // =================== + protected ${myClassName} doToUpperCase() { + getToUpperLowerCaseOptionParts().toUpperCase(); + return this; + } + + protected ${myClassName} doToLowerCase() { + getToUpperLowerCaseOptionParts().toLowerCase(); + return this; + } + + protected ${glConditionOptionPartsToUpperLowerCaseName} getToUpperLowerCaseOptionParts() { + if (_toUpperLowerCaseOptionParts == null) { + _toUpperLowerCaseOptionParts = new ${glConditionOptionPartsToUpperLowerCaseName}(); + } + return _toUpperLowerCaseOptionParts; + } + + // ===================================================================================== + // To Single Byte + // ============== + protected ${myClassName} doToSingleByteSpace() { + getToSingleByteOptionParts().toSingleByteSpace(); + return this; + } + + protected ${myClassName} doToSingleByteAlphabetNumber() { + getToSingleByteOptionParts().toSingleByteAlphabetNumber(); + return this; + } + + protected ${myClassName} doToSingleByteAlphabetNumberMark() { + getToSingleByteOptionParts().toSingleByteAlphabetNumberMark(); + return this; + } + + protected ${glConditionOptionPartsToSingleByteName} getToSingleByteOptionParts() { + if (_toSingleByteCaseOptionParts == null) { + _toSingleByteCaseOptionParts = new ${glConditionOptionPartsToSingleByteName}(); + } + return _toSingleByteCaseOptionParts; + } + + // ===================================================================================== + // To Double Byte + // ============== + + // ===================================================================================== + // Japanese + // ======== + protected ${glConditionOptionPartsAgentJapaneseName} doLocalJapanese() { + return getJapaneseOptionPartsAgent(); + } + + protected ${glConditionOptionPartsAgentJapaneseName} getJapaneseOptionPartsAgent() { + if (_japaneseOptionPartsAgent == null) { + _japaneseOptionPartsAgent = new ${glConditionOptionPartsAgentJapaneseName}(); + } + return _japaneseOptionPartsAgent; + } + + // ===================================================================================== + // Real Value + // ========== + public String generateRealValue(String value) { + value = getToUpperLowerCaseOptionParts().generateRealValue(value); + value = getToSingleByteOptionParts().generateRealValue(value); + value = getJapaneseOptionPartsAgent().generateRealValue(value); + return value; + } + + // ===================================================================================== + // Helper + // ====== + protected final String replace(String text, String fromText, + String toText) { + + if (text == null || fromText == null || toText == null) { + return null; + } + StringBuffer buf = new StringBuffer(100); + int pos = 0; + int pos2 = 0; + while (true) { + pos = text.indexOf(fromText, pos2); + if (pos == 0) { + buf.append(toText); + pos2 = fromText.length(); + } else if (pos > 0) { + buf.append(text.substring(pos2, pos)); + buf.append(toText); + pos2 = pos + fromText.length(); + } else { + buf.append(text.substring(pos2)); + break; + } + } + return buf.toString(); + } + + // ===================================================================================== + // DeepCopy + // ======== + public Object createDeepCopy() { + final ${myClassName} deepCopy = newDeepCopyInstance(); + deepCopy._splitOptionParts = _splitOptionParts != null ? (${glConditionOptionPartsSplitName})_splitOptionParts.createDeepCopy() : null; + deepCopy._toUpperLowerCaseOptionParts = _toUpperLowerCaseOptionParts != null ? (${glConditionOptionPartsToUpperLowerCaseName})_toUpperLowerCaseOptionParts.createDeepCopy() : null; + deepCopy._toSingleByteCaseOptionParts = _toSingleByteCaseOptionParts != null ? (${glConditionOptionPartsToSingleByteName})_toSingleByteCaseOptionParts.createDeepCopy() : null; + deepCopy._japaneseOptionPartsAgent = _japaneseOptionPartsAgent != null ? (${glConditionOptionPartsAgentJapaneseName})_japaneseOptionPartsAgent.createDeepCopy() : null; + return deepCopy; + } + protected ${myClassName} newDeepCopyInstance() { + return new ${myClassName}(); + } +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/coption/parts/SplitOptionParts.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/coption/parts/SplitOptionParts.vm 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/coption/parts/SplitOptionParts.vm 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,155 @@ +package ${glPackageBaseCommonCOptionParts}; + +#set ($myClassName = "${glConditionOptionPartsSplitName}") + +/** + * The interface of condition-option. + * + * @author ${database.ClassAuthor} + */ +public class ${myClassName} { + + // ===================================================================================== + // Attribute + // ========= + protected String _split; + protected String _splitContainedDelimiter; + protected int _splitLimitCount; + + // ===================================================================================== + // Main + // ==== + public boolean isSplit() { + return _split != null; + } + + public void splitBySpace() { + _split = " "; + } + + public void splitBySpace(int splitLimitCount) { + _split = " "; + _splitLimitCount = splitLimitCount; + } + + public void splitBySpaceContainsDoubleByte() { + _split = " "; + _splitContainedDelimiter = "\u3000"; + } + + public void splitBySpaceContainsDoubleByte(int splitLimitCount) { + _split = " "; + _splitContainedDelimiter = "\u3000"; + _splitLimitCount = splitLimitCount; + } + + public void splitByPipeLine() { + _split = "|"; + } + + public void splitByPipeLine(int splitLimitCount) { + _split = "|"; + _splitLimitCount = splitLimitCount; + } + + // ===================================================================================== + // Real Value + // ========== + public String[] generateSplitValueArray(String value) { + if (value == null || value.trim().length() == 0) { + String msg = "The argument[value] should not be null of empty: " + value; + throw new IllegalArgumentException(msg); + } + value = repalceContainedDelimiterToRealDelimiter(value); + final java.util.StringTokenizer st = new java.util.StringTokenizer(value, _split); + final String[] tokenizedValues = new String[st.countTokens()]; + int count = 0; + while (st.hasMoreTokens()) { + tokenizedValues[count] = st.nextToken(); + count++; + } + final String[] values = removeInvalidValue(tokenizedValues); + if (_splitLimitCount > 0 && values.length > _splitLimitCount) { + final String[] realValues = new String[_splitLimitCount]; + for (int i=0; i < values.length; i++) { + if (i == _splitLimitCount) { + break; + } + realValues[i] = values[i]; + } + return realValues; + } else { + return values; + } + + } + + protected String repalceContainedDelimiterToRealDelimiter(String value) { + if (value == null || value.trim().length() == 0) { + return value; + } + if (_splitContainedDelimiter == null) { + return value; + } + if (_split == null) { + return value; + } + return replace(value, _splitContainedDelimiter, _split); + } + + protected String[] removeInvalidValue(String[] values) { + final java.util.List${database.filterGenericsString('String')} ls = new java.util.ArrayList${database.filterGenericsString('String')}(); + for (int i = 0; i < values.length; i++) { + final String value = values[i]; + if (value == null || value.equals("")) {// Don't trim!!! + continue; + } + ls.add(value); + } + final String[] resultArray = new String[ls.size()]; + for (int i = 0; i < ls.size(); i++) { + resultArray[i] = (String) ls.get(i); + } + return resultArray; + } + + // ===================================================================================== + // Helper + // ====== + protected final String replace(String text, String fromText, + String toText) { + + if (text == null || fromText == null || toText == null) { + return null; + } + StringBuffer buf = new StringBuffer(100); + int pos = 0; + int pos2 = 0; + while (true) { + pos = text.indexOf(fromText, pos2); + if (pos == 0) { + buf.append(toText); + pos2 = fromText.length(); + } else if (pos > 0) { + buf.append(text.substring(pos2, pos)); + buf.append(toText); + pos2 = pos + fromText.length(); + } else { + buf.append(text.substring(pos2)); + break; + } + } + return buf.toString(); + } + + // ===================================================================================== + // DeepCopy + // ======== + public Object createDeepCopy() { + final ${myClassName} deepCopy = new ${myClassName}(); + deepCopy._split = _split; + deepCopy._splitContainedDelimiter = _splitContainedDelimiter; + deepCopy._splitLimitCount = _splitLimitCount; + return deepCopy; + } +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/coption/parts/ToSingleByteOptionParts.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/coption/parts/ToSingleByteOptionParts.vm 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/coption/parts/ToSingleByteOptionParts.vm 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,83 @@ +package ${glPackageBaseCommonCOptionParts}; + +#set ($myClassName = "${glConditionOptionPartsToSingleByteName}") + +import ${glPackageBaseCommonHelperCharacter}.${glGeneralCharacterName}; +import ${glPackageBaseCommonHelperCharacterImpl}.${glGeneralCharacterImplName}; + +/** + * The interface of condition-option. + * + * @author ${database.ClassAuthor} + */ +public class ${myClassName} { + + // ===================================================================================== + // Attribute + // ========= + protected boolean _toSingleByteSpace; + protected boolean _toSingleByteAlphabetNumber; + protected boolean _toSingleByteAlphabetNumberMark; + + private ${glGeneralCharacterName} _generalCharacter; + + // ===================================================================================== + // Main + // ==== + public boolean isToSingleByteSpace() { + return _toSingleByteSpace; + } + public void toSingleByteSpace() { + _toSingleByteSpace = true; + } + + public void toSingleByteAlphabetNumber() { + _toSingleByteAlphabetNumber = true; + } + + public void toSingleByteAlphabetNumberMark() { + _toSingleByteAlphabetNumberMark = true; + } + + // ===================================================================================== + // Real Value + // ========== + public String generateRealValue(String value) { + if (value == null || value.trim().length() == 0) { + String msg = "The argument[value] should not be null."; + throw new IllegalArgumentException(msg); + } + + // To Single Byte + if (_toSingleByteSpace) { + value = (value != null ? value.replaceAll("\u3000", " ") : value); + } + if (_toSingleByteAlphabetNumberMark) { + value = getGeneralCharacter().toSingleByteAlphabetNumberMark(value); + } else if (_toSingleByteAlphabetNumber) { + value = getGeneralCharacter().toSingleByteAlphabetNumber(value); + } + return value; + } + + // ===================================================================================== + // Helper + // ====== + protected ${glGeneralCharacterName} getGeneralCharacter() { + if (_generalCharacter == null) { + _generalCharacter = new ${glGeneralCharacterImplName}(); + } + return _generalCharacter; + } + + // ===================================================================================== + // DeepCopy + // ======== + public Object createDeepCopy() { + final ${myClassName} deepCopy = new ${myClassName}(); + deepCopy._toSingleByteSpace = _toSingleByteSpace; + deepCopy._toSingleByteAlphabetNumber = _toSingleByteAlphabetNumber; + deepCopy._toSingleByteAlphabetNumberMark = _toSingleByteAlphabetNumberMark; + return deepCopy; + } +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/coption/parts/ToUpperLowerCaseOptionParts.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/coption/parts/ToUpperLowerCaseOptionParts.vm 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/coption/parts/ToUpperLowerCaseOptionParts.vm 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,59 @@ +package ${glPackageBaseCommonCOptionParts}; + +#set ($myClassName = "${glConditionOptionPartsToUpperLowerCaseName}") + +/** + * The class of condition-option-parts about toUpperCase/toLowerCase. + * + * @author ${database.ClassAuthor} + */ +public class ${myClassName} { + + // ===================================================================================== + // Attribute + // ========= + protected boolean _toUpperCase; + protected boolean _toLowerCase; + + // ===================================================================================== + // Main + // ==== + public void toUpperCase() { + _toUpperCase = true; + _toLowerCase = false; + } + + public void toLowerCase() { + _toUpperCase = false; + _toLowerCase = true; + } + + // ===================================================================================== + // Real Value + // ========== + public String generateRealValue(String value) { + if (value == null || value.trim().length() == 0) { + String msg = "The argument[value] should not be null."; + throw new IllegalArgumentException(msg); + } + + // To Upper/Lower Case + if (_toUpperCase) { + value = (value != null ? value.toUpperCase() : value); + } + if (_toLowerCase) { + value = (value != null ? value.toLowerCase() : value); + } + return value; + } + + // ===================================================================================== + // DeepCopy + // ======== + public Object createDeepCopy() { + final ${myClassName} deepCopy = new ${myClassName}(); + deepCopy._toUpperCase = _toUpperCase; + deepCopy._toLowerCase = _toLowerCase; + return deepCopy; + } +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/coption/parts/local/JapaneseOptionPartsAgent.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/coption/parts/local/JapaneseOptionPartsAgent.vm 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/coption/parts/local/JapaneseOptionPartsAgent.vm 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,82 @@ +package ${glPackageBaseCommonCOptionPartsLocal}; + +#set ($myClassName = "${glConditionOptionPartsAgentJapaneseName}") + +import ${glPackageBaseCommonHelperCharacter}.${glJapaneseCharacterName}; +import ${glPackageBaseCommonHelperCharacterImpl}.${glJapaneseCharacterImplName}; + +/** + * The class of condition-option-parts-agent. + * + * @author ${database.ClassAuthor} + */ +public class ${myClassName} { + + // ===================================================================================== + // Attribute + // ========= + protected boolean _toDoubleByteKatakana; + protected boolean _removeLastLongVowel; + private ${glJapaneseCharacterName} _japaneseCharacter; + + // ===================================================================================== + // Main + // ==== + public boolean isToDoubleByteKatakana() { + return _toDoubleByteKatakana; + } + + public void toDoubleByteKatakana() { + _toDoubleByteKatakana = true; + } + + public boolean isRemoveLastLongVowel() { + return _removeLastLongVowel; + } + public void removeLastLongVowel() { + _removeLastLongVowel = true; + } + + // ===================================================================================== + // Real Value + // ========== + public String generateRealValue(String value) { + if (value == null || value.trim().length() == 0) { + String msg = "The argument[value] should not be null."; + throw new IllegalArgumentException(msg); + } + + // To Double Byte + if (_toDoubleByteKatakana) { + value = getJapaneseCharacter().toDoubleByteKatakana(value); + } + + // Remove + if (_removeLastLongVowel) { + if (value != null && value.endsWith("\u30fc")) { + value = value.substring(0, value.length() - "\u30fc".length()); + } + } + return value; + } + + // ===================================================================================== + // Helper + // ====== + protected ${glJapaneseCharacterName} getJapaneseCharacter() { + if (_japaneseCharacter == null) { + _japaneseCharacter = new ${glJapaneseCharacterImplName}(); + } + return _japaneseCharacter; + } + + // ===================================================================================== + // DeepCopy + // ======== + public Object createDeepCopy() { + final ${myClassName} deepCopy = new ${myClassName}(); + deepCopy._toDoubleByteKatakana = _toDoubleByteKatakana; + deepCopy._removeLastLongVowel = _removeLastLongVowel; + return deepCopy; + } +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/cvalue/ConditionValue.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/cvalue/ConditionValue.vm 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/cvalue/ConditionValue.vm 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,1186 @@ +package ${glPackageBaseCommonCValue}; + +#set ($myClassName = "${glConditionValueName}") + +import java.util.List; + +import ${glPackageBaseCommonCOption}.${glConditionOptionLikeSearchName}; +import ${glPackageBaseCommonCOption}.${glConditionOptionInScopeName}; + +/** + * Condition value. + * + * @author ${database.ClassAuthor} + */ +public class ${myClassName} { + + // =================================================================================== + // Equal + // ===== + /** Value of equal. */ + protected Object _equalValue; + + /** + * Get the value of equal. + * + * @return The value of equal. (Nullable) + */ + public Object getEqual() { + return filterValue(_equalValue); + } + + /** + * Set the value of equal. + * + * @param value The value of equal. (Nullable) + * @return this. (NotNull) + */ + public ${myClassName} setEqual(Object value) { + _equalValue = value; + return this; + } + + /** + * Does it has the value of equal? + * + * @return Determination. (NotNull) + */ + public boolean hasEqual() { + return _equalValue != null; + } + + /** + * Does the value equal the value of equal? + * + * @param value The value of equal. (Nullable) + * @return Determination. (NotNull) + */ + public boolean equalEqual(Object value) { + return hasEqual() ? _equalValue.equals(value) : value == null; + } + + /** + * Override the value of equal. + * + * @param value The value of equal. (Nullable) + * @return this. (NotNull) + */ + public ${myClassName} overrideEqual(Object value) { + _equalValue = value; + return this; + } + + /** Location of equal. */ + protected String _equalLocation; + + /** + * Get the location of equal. + * + * @return The location of equal. (Nullable) + */ + public String getEqualLocation() { + return _equalLocation; + } + + /** + * Set the location of equal. + * + * @param location The location of equal. (Nullable) + * @return this. (NotNull) + */ + public ${myClassName} setEqualLocation(String location) { + _equalLocation = location; + return this; + } + + // =================================================================================== + // Not Equal + // ========= + /** Value of notEqual. */ + protected Object _notEqualValue; + + /** + * Get the value of notEqual. + * + * @return The value of notEqual. (Nullable) + */ + public Object getNotEqual() { + return filterValue(_notEqualValue); + } + + /** + * Set the value of notEqual. + * + * @param value The value of notEqual. (Nullable) + * @return this. (NotNull) + */ + public ${myClassName} setNotEqual(Object value) { + _notEqualValue = value; + return this; + } + + /** + * Does it has the value of notEqual? + * + * @return Determination. (NotNull) + */ + public boolean hasNotEqual() { + return _notEqualValue != null; + } + + /** + * Does the value equal the value of notEqual? + * + * @param value The value of notEqual. (Nullable) + * @return Determination. (NotNull) + */ + public boolean equalNotEqual(Object value) { + return hasNotEqual() ? _notEqualValue.equals(value) : value == null; + } + + /** + * Override the value of notEqual. + * + * @param value The value of notEqual. (Nullable) + * @return this. (NotNull) + */ + public ${myClassName} overrideNotEqual(Object value) { + _notEqualValue = value; + return this; + } + + /** Location of notEqual. */ + protected String _notEqualLocation; + + /** + * Get the location of notEqual. + * + * @return The location of notEqual. (Nullable) + */ + public String getNotEqualLocation() { + return _notEqualLocation; + } + + /** + * Set the location of notEqual. + * + * @param location The location of notEqual. (Nullable) + * @return this. (NotNull) + */ + public ${myClassName} setNotEqualLocation(String location) { + _notEqualLocation = location; + return this; + } + + // =================================================================================== + // Greater Than + // ============ + /** Value of greaterThan. */ + protected Object _greaterThanValue; + + /** + * Get the value of greaterThan. + * + * @return The value of greaterThan. (Nullable) + */ + public Object getGreaterThan() { + return filterValue(_greaterThanValue); + } + + /** + * Set the value of greaterThan. + * + * @param value The value of greaterThan. (Nullable) + * @return this. (NotNull) + */ + public ${myClassName} setGreaterThan(Object value) { + _greaterThanValue = value; + return this; + } + + /** + * Does it has the value of greaterThan? + * + * @return Determination. (NotNull) + */ + public boolean hasGreaterThan() { + return _greaterThanValue != null; + } + + /** + * Does the value equal the value of greaterThan? + * + * @param value The value of greaterThan. (Nullable) + * @return Determination. (NotNull) + */ + public boolean equalGreaterThan(Object value) { + return hasGreaterThan() ? _greaterThanValue.equals(value) : value == null; + } + + /** + * Override the value of greaterThan. + * + * @param value The value of greaterThan. (Nullable) + * @return this. (NotNull) + */ + public ${myClassName} overrideGreaterThan(Object value) { + _greaterThanValue = value; + return this; + } + + /** Location of GreaterThan. */ + protected String _greaterThanLocation; + + /** + * Get the location of greaterThan. + * + * @return The location of greaterThan. (Nullable) + */ + public String getGreaterThanLocation() { + return _greaterThanLocation; + } + + /** + * Set the location of greaterThan. + * + * @param location The location of greaterThan. (Nullable) + * @return this. (NotNull) + */ + public ${myClassName} setGreaterThanLocation(String location) { + _greaterThanLocation = location; + return this; + } + + // =================================================================================== + // Less Than + // ========= + /** Value of lessThan. */ + protected Object _lessThanValue; + + /** + * Get the value of lessThan. + * + * @return The value of lessThan. (Nullable) + */ + public Object getLessThan() { + return filterValue(_lessThanValue); + } + + /** + * Set the value of lessThan. + * + * @param value The value of lessThan. (Nullable) + * @return this. (NotNull) + */ + public ${myClassName} setLessThan(Object value) { + _lessThanValue = value; + return this; + } + + /** + * Does it has the value of lessThan? + * + * @return Determination. (NotNull) + */ + public boolean hasLessThan() { + return _lessThanValue != null; + } + + /** + * Does the value equal the value of lessThan? + * + * @param value The value of lessThan. (Nullable) + * @return Determination. (NotNull) + */ + public boolean equalLessThan(Object value) { + return hasLessThan() ? _lessThanValue.equals(value) : value == null; + } + + /** + * Override the value of lessThan. + * + * @param value The value of lessThan. (Nullable) + * @return this. (NotNull) + */ + public ${myClassName} overrideLessThan(Object value) { + _lessThanValue = value; + return this; + } + + /** Location of lessThan. */ + protected String _lessThanLocation; + + /** + * Get the location of lessThan. + * + * @return The location of lessThan. (Nullable) + */ + public String getLessThanLocation() { + return _lessThanLocation; + } + + /** + * Set the location of lessThan. + * + * @param location The location of lessThan. (Nullable) + * @return this. (NotNull) + */ + public ${myClassName} setLessThanLocation(String location) { + _lessThanLocation = location; + return this; + } + + // =================================================================================== + // Greater Equal + // ============= + /** Value of greaterEqual. */ + protected Object _greaterEqualValue; + + /** + * Get the value of greaterEqual. + * + * @return The value of greaterEqual. (Nullable) + */ + public Object getGreaterEqual() { + return filterValue(_greaterEqualValue); + } + + /** + * Set the value of greaterEqual. + * + * @param value The value of greaterEqual. (Nullable) + * @return this. (NotNull) + */ + public ${myClassName} setGreaterEqual(Object value) { + _greaterEqualValue = value; + return this; + } + + /** + * Does it has the value of greaterEqual? + * + * @return Determination. (NotNull) + */ + public boolean hasGreaterEqual() { + return _greaterEqualValue != null; + } + + /** + * Does the value equal the value of greaterEqual? + * + * @param value The value of greaterEqual. (Nullable) + * @return Determination. (NotNull) + */ + public boolean equalGreaterEqual(Object value) { + return hasGreaterEqual() ? _greaterEqualValue.equals(value) : value == null; + } + + /** + * Override the value of greaterEqual. + * + * @param value The value of greaterEqual. (Nullable) + * @return this. (NotNull) + */ + public ${myClassName} overrideGreaterEqual(Object value) { + _greaterEqualValue = value; + return this; + } + + /** Location of greaterEqual. */ + protected String _greaterEqualLocation; + + /** + * Get the location of greaterEqual. + * + * @return The location of greaterEqual. (Nullable) + */ + public String getGreaterEqualLocation() { + return _greaterEqualLocation; + } + + /** + * Set the location of greaterEqual. + * + * @param location The location of greaterEqual. (Nullable) + * @return this. (NotNull) + */ + public ${myClassName} setGreaterEqualLocation(String location) { + _greaterEqualLocation = location; + return this; + } + + // =================================================================================== + // Less Equal + // ========== + /** Value of lessEqual. */ + protected Object _lessEqualValue; + + /** + * Get the value of lessEqual. + * + * @return The value of lessEqual. (Nullable) + */ + public Object getLessEqual() { + return filterValue(_lessEqualValue); + } + + /** + * Set the value of lessEqual. + * + * @param value The value of lessEqual. (Nullable) + * @return this. (NotNull) + */ + public ${myClassName} setLessEqual(Object value) { + _lessEqualValue = value; + return this; + } + + /** + * Does it has the value of lessEqual? + * + * @return Determination. (NotNull) + */ + public boolean hasLessEqual() { + return _lessEqualValue != null; + } + + /** + * Does the value equal the value of lessEqual? + * + * @param value The value of lessEqual. (Nullable) + * @return Determination. (NotNull) + */ + public boolean equalLessEqual(Object value) { + return hasLessEqual() ? _lessEqualValue.equals(value) : value == null; + } + + /** + * Override the value of lessEqual. + * + * @param value The value of lessEqual. (Nullable) + * @return this. (NotNull) + */ + public ${myClassName} overrideLessEqual(Object value) { + _lessEqualValue = value; + return this; + } + + /** Location of lessEqual. */ + protected String _lessEqualLocation; + + /** + * Get the location of lessEqual. + * + * @return The location of lessEqual. (Nullable) + */ + public String getLessEqualLocation() { + return _lessEqualLocation; + } + + /** + * Set the location of lessEqual. + * + * @param location The location of lessEqual. (Nullable) + * @return this. (NotNull) + */ + public ${myClassName} setLessEqualLocation(String location) { + _lessEqualLocation = location; + return this; + } + + // =================================================================================== + // Prefix Search + // ============= + /** Value of prefixSearch. */ + protected Object _prefixSearch; + + /** + * Get the value of prefixSearch. + * + * @return The value of prefixSearch. (Nullable) + */ + public Object getPrefixSearch() { + return filterValue(_prefixSearch); + } + + /** + * Set the value of prefixSearch. + * + * @param value The value of prefixSearch. (Nullable) + * @return this. (NotNull) + */ + public ${myClassName} setPrefixSearch(Object value) { + _prefixSearch = value; + return this; + } + + /** + * Does it has the value of prefixSearch? + * + * @return Determination. (NotNull) + */ + public boolean hasPrefixSearch() { + return _prefixSearch != null; + } + + /** + * Does the value equal the value of prefixSearch? + * + * @param value The value of prefixSearch. (Nullable) + * @return Determination. (NotNull) + */ + public boolean equalPrefixSearch(Object value) { + return hasPrefixSearch() ? _prefixSearch.equals(value) : value == null; + } + + /** + * Override the value of prefixSearch. + * + * @param value The value of prefixSearch. (Nullable) + * @return this. (NotNull) + */ + public ${myClassName} overridePrefixSearch(Object value) { + _prefixSearch = value; + return this; + } + + /** Location of prefixSearch. */ + protected String _prefixSearchLocation; + + /** + * Get the location of prefixSearch. + * + * @return The location of prefixSearch. (Nullable) + */ + public String getPrefixSearchLocation() { + return _prefixSearchLocation; + } + + /** + * Set the location of prefixSearch. + * + * @param location The location of prefixSearch. (Nullable) + * @return this. (NotNull) + */ + public ${myClassName} setPrefixSearchLocation(String location) { + _prefixSearchLocation = location; + return this; + } + + // =================================================================================== + // Like Search + // =========== + /** Value of likeSearch. */ + protected java.util.List${database.filterGenericsString('LikeSearchValue')} _likeSearch; + + /** Value of likeSearch for spare. */ + protected java.util.List${database.filterGenericsString('LikeSearchValue')} _likeSearch4Spare; + + /** + * Get the value of likeSearch. + * + * @return The value of likeSearch. (Nullable) + */ + public String getLikeSearch() { + if (_likeSearch == null) { + return null; + } + if (_likeSearch.isEmpty() && !_likeSearch4Spare.isEmpty()) { + for (int index=0; index < _likeSearch4Spare.size(); index++) { + _likeSearch.add(_likeSearch4Spare.get(index)); + } + } + final LikeSearchValue likeSearchValue = (LikeSearchValue)_likeSearch.remove(0); + return (String)filterValue(likeSearchValue.generateRealValue()); + } + + /** + * Set the value of likeSearch. + * + * @param value The value of likeSearch. (Nullable) + * @return this. (NotNull) + */ + public ${myClassName} setLikeSearch(String value, ${glConditionOptionLikeSearchName} option) { + if (_likeSearch == null) { + _likeSearch = new java.util.ArrayList${database.filterGenericsString('LikeSearchValue')}(); + _likeSearch4Spare= new java.util.ArrayList${database.filterGenericsString('LikeSearchValue')}(); + } + if (_likeSearch.isEmpty() && !_likeSearch4Spare.isEmpty()) { + for (int index=0; index < _likeSearch4Spare.size(); index++) { + _likeSearch.add(_likeSearch4Spare.get(index)); + } + } + final LikeSearchValue likeSearchValue = new LikeSearchValue(value, option); + _likeSearch.add(likeSearchValue); + _likeSearch4Spare.add(likeSearchValue); + return this; + } + + /** Location of likeSearch. */ + protected String _likeSearchLocation; + + /** + * Get the location of likeSearch. + * + * @return The location of likeSearch. (Nullable) + */ + public String getLikeSearchLocation() { + return _likeSearchLocation; + } + + /** + * Set the location of likeSearch. + * + * @param location The location of likeSearch. (Nullable) + * @return this. (NotNull) + */ + public ${myClassName} setLikeSearchLocation(String location) { + _likeSearchLocation = location; + return this; + } + + protected static class LikeSearchValue { + protected String _value; + protected ${glConditionOptionLikeSearchName} _option; + public LikeSearchValue(String value, ${glConditionOptionLikeSearchName} option) { + _value = value; + _option = option; + } + public String getValue() { + return _value; + } + public ${glConditionOptionLikeSearchName} getOption() { + return _option; + } + public String generateRealValue() { + if (_option == null) { + return _value; + } + return _option.generateRealValue(_value); + } + } + + // =================================================================================== + // In Scope + // ======== + /** Value of inScope. */ + protected List _inScope; + + protected ${glConditionOptionInScopeName} _inScopeOption; + + /** + * Get the value of inScope. + * + * @return The value of inScope. (Nullable) + */ + public List getInScope() { + if (_inScopeOption != null) { + return filterValue(_inScopeOption.generateRealValueList(_inScope)); + } + return filterValue(_inScope); + } + + /** + * Set the value of inScope. + * + * @param value The value of inScope. (Nullable) + * @return this. (NotNull) + */ + public ${myClassName} setInScope(List value) { + _inScope = value; + return this; + } + + public ${myClassName} setInScope(List value, ${glConditionOptionInScopeName} option) { + _inScope = value; + _inScopeOption = option; + return this; + } + + /** + * Does it has the value of inScope? + * + * @return Determination. (NotNull) + */ + public boolean hasInScope() { + return _inScope != null; + } + + /** + * Does the value equal the value of inScope? + * + * @param value The value of inScope. (Nullable) + * @return Determination. (NotNull) + */ + public boolean equalInScope(List value) { + return hasInScope() ? _inScope.equals(value) : value == null; + } + + /** + * Override the value of inScope. + * + * @param value The value of inScope. (Nullable) + * @return this. (NotNull) + */ + public ${myClassName} overrideInScope(List value) { + _inScope = value; + return this; + } + + /** Location of InScope. */ + protected String _inScopeLocation; + + /** + * Get the location of inScope. + * + * @return The location of inScope. (Nullable) + */ + public String getInScopeLocation() { + return _inScopeLocation; + } + + /** + * Set the location of inScope. + * + * @param location The location of inScope. (Nullable) + * @return this. (NotNull) + */ + public ${myClassName} setInScopeLocation(String location) { + _inScopeLocation = location; + return this; + } + + // =================================================================================== + // Not In Scope + // ============ + /** Value of notInScope. */ + protected List _notInScope; + + /** + * Get the value of notInScope. + * + * @return The value of notInScope. (Nullable) + */ + public List getNotInScope() { + return filterValue(_notInScope); + } + + /** + * Set the value of notInScope. + * + * @param value The value of notInScope. (Nullable) + * @return this. (NotNull) + */ + public ${myClassName} setNotInScope(List value) { + _notInScope = value; + return this; + } + + /** + * Does it has the value of inNotScope? + * + * @return Determination. (NotNull) + */ + public boolean hasNotInScope() { + return _notInScope != null; + } + + /** + * Does the value equal the value of inNotScope? + * + * @param value The value of inNotScope. (Nullable) + * @return Determination. (NotNull) + */ + public boolean equalNotInScope(List value) { + return hasNotInScope() ? _notInScope.equals(value) : value == null; + } + + /** + * Override the value of inNotScope. + * + * @param value The value of inNotScope. (Nullable) + * @return this. (NotNull) + */ + public ${myClassName} overrideNotInScope(List value) { + _notInScope = value; + return this; + } + + /** Location of notInScope. */ + protected String _notInScopeLocation; + + /** + * Get the location of notInScope. + * + * @return The location of notInScope. (Nullable) + */ + public String getNotInScopeLocation() { + return _notInScopeLocation; + } + + /** + * Set the location of notInScope. + * + * @param location The location of notInScope. (Nullable) + * @return this. (NotNull) + */ + public ${myClassName} setNotInScopeLocation(String location) { + _notInScopeLocation = location; + return this; + } + + // =================================================================================== + // Is Null + // ======= + /** Value of isNull. */ + protected Object _isNullValue; + + /** + * Get the value of isNull. + * + * @return The value of isNull. (Nullable) + */ + public Object getIsNull() { + return _isNullValue; + } + + /** + * Set the value of isNull. + * + * @param value The value of isNull. (Nullable) + * @return this. (NotNull) + */ + public ${myClassName} setIsNull(Object value) { + _isNullValue = value; + return this; + } + + /** + * Does it has the value of isNull? + * + * @return Determination. (NotNull) + */ + public boolean hasIsNull() { + return _isNullValue != null; + } + + /** Location of isNull. */ + protected String _isNullLocation; + + /** + * Get the location of isNull. + * + * @return The location of isNull. (Nullable) + */ + public String getIsNullLocation() { + return _isNullLocation; + } + + /** + * Set the location of isNull. + * + * @param location The location of isNull. (Nullable) + * @return this. (NotNull) + */ + public ${myClassName} setIsNullLocation(String location) { + _isNullLocation = location; + return this; + } + + // =================================================================================== + // Is Not Null + // =========== + /** Value of isNotNull. */ + protected Object _isNotNullValue; + + /** + * Get the value of isNotNull. + * + * @return The value of isNotNull. (Nullable) + */ + public Object getIsNotNull() { + return _isNotNullValue; + } + + /** + * Set the value of isNotNull. + * + * @param value The value of isNotNull. (Nullable) + * @return this. (NotNull) + */ + public ${myClassName} setIsNotNull(Object value) { + _isNotNullValue = value; + return this; + } + + /** + * Does it has the value of isNotNull? + * + * @return Determination. (NotNull) + */ + public boolean hasIsNotNull() { + return _isNotNullValue != null; + } + + /** Location of isNotNull. */ + protected String _isNotNullLocation; + + /** + * Get the location of isNotNull. + * + * @return The location of isNotNull. (Nullable) + */ + public String getIsNotNullLocation() { + return _isNotNullLocation; + } + + /** + * Set the location of isNotNull. + * + * @param location The location of isNotNull. (Nullable) + * @return this. (NotNull) + */ + public ${myClassName} setIsNotNullLocation(String location) { + _isNotNullLocation = location; + return this; + } + + // ===================================================================================== + // Filter + // ====== + /** + * Filter value. + * If the value is instance of java.util.Date or java.util.Calendar, returns value as java.sql.Date. + * + * @param value Value. (Nullable) + * @return Filtered value. (Nullable) + */ + protected Object filterValue(Object value) { + if (value == null) { + return value; + } + if (value instanceof java.sql.Timestamp) { + return value; + } + if (value instanceof java.util.Date || value instanceof java.util.Calendar) { + return SqlDateConversionUtil.toDate(value); + } else { + return value; + } + } + + /** + * Filter value. + * If the value is instance of java.util.Date or java.util.Calendar, returns value as java.sql.Date. + * + * @param valueList Value-list. (Nullable) + * @return Filtered value-list. (Nullable) + */ + protected java.util.List filterValue(java.util.List valueList) { + if (valueList == null || valueList.isEmpty()) { + return valueList; + } + final List${database.filterGenericsString("Object")} resultList = new java.util.ArrayList${database.filterGenericsString("Object")}(); + for (final java.util.Iterator ite = valueList.iterator(); ite.hasNext(); ) { + Object value = ite.next(); + resultList.add(filterValue(value)); + } + return resultList; + } + + protected static class SqlDateConversionUtil { + + private SqlDateConversionUtil() { + } + + public static java.sql.Date toDate(Object o) { + return toDate(o, null); + } + + public static java.sql.Date toDate(Object o, String pattern) { + if (o instanceof java.sql.Date) { + return (java.sql.Date) o; + } + java.util.Date date = DateConversionUtil.toDate(o, pattern); + if (date != null) { + return new java.sql.Date(date.getTime()); + } + return null; + } + } + + protected static class DateConversionUtil { + + private DateConversionUtil() { + } + + public static java.util.Date toDate(Object o) { + return toDate(o, null); + } + + public static java.util.Date toDate(Object o, String pattern) { + if (o == null) { + return null; + } else if (o instanceof String) { + return toDate((String) o, pattern); + } else if (o instanceof java.util.Date) { + return (java.util.Date) o; + } else if (o instanceof java.util.Calendar) { + return ((java.util.Calendar) o).getTime(); + } else { + return toDate(o.toString(), pattern); + } + } + + public static java.util.Date toDate(String s, String pattern) { + return toDate(s, pattern, java.util.Locale.getDefault()); + } + + public static java.util.Date toDate(String s, String pattern, java.util.Locale locale) { + java.text.SimpleDateFormat sdf = getDateFormat(s, pattern, locale); + try { + return sdf.parse(s); + } catch (java.text.ParseException ex) { + throw new RuntimeException(ex); + } + } + + public static java.text.SimpleDateFormat getDateFormat(String s, String pattern, + java.util.Locale locale) { + if (pattern != null) { + return new java.text.SimpleDateFormat(pattern); + } + return getDateFormat(s, locale); + } + + public static java.text.SimpleDateFormat getDateFormat(String s, java.util.Locale locale) { + String pattern = getPattern(locale); + String shortPattern = removeDelimiter(pattern); + String delimitor = findDelimiter(s); + if (delimitor == null) { + if (s.length() == shortPattern.length()) { + return new java.text.SimpleDateFormat(shortPattern); + } + if (s.length() == shortPattern.length() + 2) { + return new java.text.SimpleDateFormat(InternalStringUtil.replace(shortPattern, + "yy", "yyyy")); + } + } else { + String[] array = InternalStringUtil.split(s, delimitor); + for (int i = 0; i < array.length; ++i) { + if (array[i].length() == 4) { + pattern = InternalStringUtil.replace(pattern, "yy", "yyyy"); + break; + } + } + return new java.text.SimpleDateFormat(pattern); + } + return new java.text.SimpleDateFormat(); + } + + public static java.text.SimpleDateFormat getDateFormat(java.util.Locale locale) { + return new java.text.SimpleDateFormat(getPattern(locale)); + } + + public static java.text.SimpleDateFormat getY4DateFormat(java.util.Locale locale) { + return new java.text.SimpleDateFormat(getY4Pattern(locale)); + } + + public static String getY4Pattern(java.util.Locale locale) { + String pattern = getPattern(locale); + if (pattern.indexOf("yyyy") < 0) { + pattern = InternalStringUtil.replace(pattern, "yy", "yyyy"); + } + return pattern; + } + + public static String getPattern(java.util.Locale locale) { + java.text.SimpleDateFormat df = (java.text.SimpleDateFormat) java.text.DateFormat.getDateInstance( + java.text.DateFormat.SHORT, locale); + String pattern = df.toPattern(); + int index = pattern.indexOf(' '); + if (index > 0) { + pattern = pattern.substring(0, index); + } + if (pattern.indexOf("MM") < 0) { + pattern = InternalStringUtil.replace(pattern, "M", "MM"); + } + if (pattern.indexOf("dd") < 0) { + pattern = InternalStringUtil.replace(pattern, "d", "dd"); + } + return pattern; + } + + public static String findDelimiter(String value) { + for (int i = 0; i < value.length(); ++i) { + char c = value.charAt(i); + if (Character.isDigit(c)) { + continue; + } + return Character.toString(c); + } + return null; + } + + public static String removeDelimiter(String pattern) { + StringBuffer buf = new StringBuffer(); + for (int i = 0; i < pattern.length(); ++i) { + char c = pattern.charAt(i); + if (c == 'y' || c == 'M' || c == 'd') { + buf.append(c); + } + } + return buf.toString(); + } + } + + protected static class InternalStringUtil { + + public static final String[] EMPTY_STRINGS = new String[0]; + + private InternalStringUtil() { + } + + public static final boolean isEmpty(String text) { + return text == null || text.length() == 0; + } + + public static final String replace(String text, String fromText, + String toText) { + + if (text == null || fromText == null || toText == null) { + return null; + } + StringBuffer buf = new StringBuffer(100); + int pos = 0; + int pos2 = 0; + while (true) { + pos = text.indexOf(fromText, pos2); + if (pos == 0) { + buf.append(toText); + pos2 = fromText.length(); + } else if (pos > 0) { + buf.append(text.substring(pos2, pos)); + buf.append(toText); + pos2 = pos + fromText.length(); + } else { + buf.append(text.substring(pos2)); + break; + } + } + return buf.toString(); + } + + public static String[] split(String str, String delim) { + if (str == null) { + return EMPTY_STRINGS; + } + java.util.List${database.filterGenericsString('String')} list = new java.util.ArrayList${database.filterGenericsString('String')}(); + java.util.StringTokenizer st = new java.util.StringTokenizer(str, delim); + while (st.hasMoreElements()) { + list.add(st.nextToken()); + } + return (String[]) list.toArray(new String[list.size()]); + } + } +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/grouping/GroupingOption.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/grouping/GroupingOption.vm 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/grouping/GroupingOption.vm 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,42 @@ +package ${glPackageBaseCommonCBeanGrouping}; + +/** + * The class of option for grouping making. + * + * @author ${database.ClassAuthor} + */ +public class ${glGroupingOptionName} { + + // ===================================================================================== + // Attribute + // ========= + protected int _columnCount; + + protected ${glGroupingRowEndDeterminerName} _groupingRowEndDeterminer; + + // ===================================================================================== + // Constructor + // =========== + public ${glGroupingOptionName}(int columnCount) { + _columnCount = columnCount; + } + + // ===================================================================================== + // Easy-to-Use + // =========== + + // ===================================================================================== + // Accessor + // ======== + public int getColumnCount() { + return this._columnCount; + } + + public ${glGroupingRowEndDeterminerName} getGroupingRowEndDeterminer() { + return this._groupingRowEndDeterminer; + } + + public void setGroupingRowEndDeterminer(${glGroupingRowEndDeterminerName} groupingRowEndDeterminer) { + this._groupingRowEndDeterminer = groupingRowEndDeterminer; + } +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/grouping/GroupingRowEndDeterminer.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/grouping/GroupingRowEndDeterminer.vm 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/grouping/GroupingRowEndDeterminer.vm 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,11 @@ +package ${glPackageBaseCommonCBeanGrouping}; + +/** + * The interface of grouping switch point determiner. + * + * @author ${database.ClassAuthor} + */ +public interface ${glGroupingRowEndDeterminerName} { + + public boolean determine(int columnIndex, int columnCount, ${glGroupingRowResourceName} rowResource, ENTITY nextEntity); +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/grouping/GroupingRowResource.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/grouping/GroupingRowResource.vm 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/grouping/GroupingRowResource.vm 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,29 @@ +package ${glPackageBaseCommonCBeanGrouping}; + +/** + * The class of row resource for grouping making. + * + * @author ${database.ClassAuthor} + */ +public class ${glGroupingRowResourceName} { + + // ===================================================================================== + // Attribute + // ========= + protected java.util.List _groupingRowList = new java.util.ArrayList(); + + // ===================================================================================== + // Easy-to-Use + // =========== + + // ===================================================================================== + // Accessor + // ======== + public java.util.List getGroupingRowList() { + return this._groupingRowList; + } + + public void addGroupingRowList(ENTITY groupingRow) { + this._groupingRowList.add(groupingRow); + } +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/grouping/GroupingRowSetupper.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/grouping/GroupingRowSetupper.vm 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/grouping/GroupingRowSetupper.vm 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,17 @@ +package ${glPackageBaseCommonCBeanGrouping}; + +/** + * The interface of grouping row setupper. + * + * @author ${database.ClassAuthor} + */ +public interface ${glGroupingRowSetupperName} { + + /** + * Set up grouping row object. + * + * @param groupingRowResource Grouping row resource. (NotNull) + * @return Grouping row object. (NotNull) + */ + public ROW setup(${glGroupingRowResourceName} groupingRowResource); +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/mapping/EntityDtoMapper.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/mapping/EntityDtoMapper.vm 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/mapping/EntityDtoMapper.vm 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,17 @@ +package ${glPackageBaseCommonCBeanMapping}; + +/** + * The interface of entity converter. + * + * @author ${database.ClassAuthor} + */ +public interface ${glEntityDtoMapperName} { + + /** + * Map entity to data transfer object. + * + * @param entity Entity. (NotNull) + * @return Data transfer object. (NotNull) + */ + public DTO map(ENTITY entity); +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/sqlclause/AbstractSqlClause.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/sqlclause/AbstractSqlClause.vm 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/sqlclause/AbstractSqlClause.vm 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,1009 @@ +package ${glPackageBaseCommonSqlClause}; + +#set ($myClassName = "${glSqlClauseAbstractName}") + +import ${glPackageBaseCommonCKey}.*; +import ${glPackageBaseCommonCOption}.${glConditionOptionInterfaceName}; +import ${glPackageBaseCommonCValue}.${glConditionValueName}; + +/** + * The abstract class of SqlClause. + * + * @author ${database.ClassAuthor} + */ +public abstract class ${myClassName} implements ${glSqlClauseInterfaceName} { + + // ===================================================================================== + // Attribute + // ========= + /** Target table name. */ + protected final String _tableName; + + /** Included select column map. */ + protected java.util.Map${database.filterGenericsString('String, String')} _includedSelectColumnMap = new java.util.LinkedHashMap${database.filterGenericsString('String, String')}(); + + /** Outer join map. */ + protected java.util.Map${database.filterGenericsString('String, LeftOuterJoinInfo')} _outerJoinMap = new java.util.LinkedHashMap${database.filterGenericsString('String, LeftOuterJoinInfo')}(); + + /** Where list. */ + protected java.util.List${database.filterGenericsString('String')} _whereList = new java.util.ArrayList${database.filterGenericsString('String')}(); + + /** Inline where list for BaseTable. */ + protected java.util.List${database.filterGenericsString('String')} _baseTableInlineWhereList = new java.util.ArrayList${database.filterGenericsString('String')}(); + + /** Order-by clause. */ + protected final ${glOrderByClauseName} _orderByClause = new ${glOrderByClauseName}(); + + /** Order-by clause. */ + protected java.util.Map${database.filterGenericsString('String, String')} _selectClauseColumnAliasMap; + + /** Union clause list. */ + protected java.util.List${database.filterGenericsString('UnionQueryInfo')} _unionQueryInfoList = new java.util.ArrayList${database.filterGenericsString('UnionQueryInfo')}(); + + /** Is incoluded-select-column effective? Default value is false. */ + protected boolean _isIncludedSelectColumnEffective = false; + + /** Is order-by effective? Default value is false. */ + protected boolean _isOrderByEffective = false; + + /** Fetch start index. (for fetchXxx()) */ + protected int _fetchStartIndex = 0; + + /** Fetch size. (for fetchXxx()) */ + protected int _fetchSize = 0; + + /** Fetch page number. (for fetchXxx()) This value should be plus. */ + protected int _fetchPageNumber = 1; + + /** Is fetch-narrowing effective? Default value is false. */ + protected boolean _isFetchScopeEffective = false; + + /** Is additional condition as or effective?*/ + protected boolean _isAdditionalConditionAsOrEffective = false; + + // ===================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param tableName Table name. (NotNull) + **/ + public ${myClassName}(String tableName) { + if (tableName == null) { + String msg = "Argument[tableName] must not be null."; + throw new IllegalArgumentException(msg); + } + _tableName = tableName; + } + + // ===================================================================================== + // Select-Clause + // ============= + public void setSelectClauseColumnAliasMap(java.util.Map${database.filterGenericsString('String, String')} selectClauseColumnAliasMap) { + _selectClauseColumnAliasMap = selectClauseColumnAliasMap; + } + + // ===================================================================================== + // Clause + // ====== + /** + * ${database.ImplementComment} + * + * @return Clause string. (NotNull) + */ + public String getClause() { + final StringBuffer sb = new StringBuffer(128); + sb.append(INCLUDE_SELECT_CLAUSE_MARK); + sb.append(" "); + if (_isIncludedSelectColumnEffective && !_includedSelectColumnMap.isEmpty()) { + sb.append(" ").append(getIncludedSelectColumnClause()); + } + sb.append(" "); + sb.append(getFromClause()); + sb.append(" "); + sb.append(getFromHint()); + sb.append(" "); + sb.append(getWhereClause()); + sb.append(getUnionClause()); + if (_isOrderByEffective && !_orderByClause.isEmpty()) { + sb.append(" "); + sb.append(getOrderByClause()); + } + sb.append(" "); + sb.append(getSqlSuffix()); + return sb.toString(); + } + + /** + * ${database.ImplementComment} + * + * @return Clause string. (NotNull) + */ + public String getClauseWithoutIncludedOrderBySqlSuffix() { + final StringBuffer sb = new StringBuffer(128); + sb.append(INCLUDE_SELECT_CLAUSE_MARK); + sb.append(" "); + sb.append(getFromClause()); + sb.append(" "); + sb.append(getFromHint()); + sb.append(" "); + sb.append(getWhereClause()); + sb.append(getUnionClause()); + return sb.toString(); + } + + protected String getUnionClause() { + final StringBuffer sb = new StringBuffer(); + for (final java.util.Iterator ite = _unionQueryInfoList.iterator(); ite.hasNext(); ) { + final UnionQueryInfo unionQueryInfo = (UnionQueryInfo)ite.next(); + final String unionQueryClause = unionQueryInfo.getUnionQueryClause(); + final boolean unionAll = unionQueryInfo.isUnionAll(); + sb.append(unionAll ? " union all " : " union ").append(INCLUDE_SELECT_CLAUSE_MARK).append(unionQueryClause); + } + return sb.toString(); + } + + // ===================================================================================== + // Clause Parts + // ============ + /** + * ${database.ImplementComment} + * + * @return select-hint. {select [select-hint] * from table...} (NotNull) + */ + public String getSelectHint() { + return createSelectHint(); + } + + /** + * ${database.ImplementComment} + * + * @return Included-select-column clause. {select ... , [included-select-column clause] from table...} (NotNull) + */ + public String getIncludedSelectColumnClause() { + final StringBuffer sb = new StringBuffer(); + int count = 0; + for (final java.util.Iterator ite = _includedSelectColumnMap.keySet().iterator(); ite.hasNext(); count++) { + final String aliasName = (String)ite.next(); + final String realColumnName = (String)_includedSelectColumnMap.get(aliasName); + sb.append(", ").append(realColumnName).append(" as ").append(aliasName); + } + return sb.toString(); + } + + /** + * ${database.ImplementComment} + * + * @return From clause. (NotNull) + */ + public String getFromClause() { + final StringBuffer sb = new StringBuffer(); + sb.append("from "); + if (_baseTableInlineWhereList.isEmpty()) { + sb.append(_tableName); + } else { + sb.append(getInlineViewClause(_tableName, _baseTableInlineWhereList)).append(" ").append(_tableName); + } + sb.append(getFromBaseTableHint()); + sb.append(getLeftOuterJoinClause()); + return sb.toString(); + } + + protected String getLeftOuterJoinClause() { + final StringBuffer sb = new StringBuffer(); + for (final java.util.Iterator ite = _outerJoinMap.keySet().iterator(); ite.hasNext(); ) { + final String aliasName = (String)ite.next(); + final LeftOuterJoinInfo joinInfo = (LeftOuterJoinInfo)_outerJoinMap.get(aliasName); + final String joinTableName = joinInfo.getJoinTableName(); + final java.util.List${database.filterGenericsString('String')} inlineWhereClauseList = joinInfo.getInlineWhereClauseList(); + final java.util.Map${database.filterGenericsString('String, String')} joinOnMap = joinInfo.getJoinOnMap(); + assertJoinOnMapNotEmpty(joinOnMap, aliasName); + + sb.append(" left outer join "); + if (inlineWhereClauseList.isEmpty()) { + sb.append(joinTableName); + } else { + sb.append(getInlineViewClause(joinTableName, inlineWhereClauseList)); + } + sb.append(" ").append(aliasName).append(" on "); + int count = 0; + for (final java.util.Iterator joinOnMapIte = joinOnMap.keySet().iterator(); joinOnMapIte.hasNext(); count++) { + final String localColumnName = (String)joinOnMapIte.next(); + final String foreignColumnName = (String)joinOnMap.get(localColumnName); + if (count != 0) { + sb.append(" and "); + } + sb.append(localColumnName).append(" = ").append(foreignColumnName); + } + } + return sb.toString(); + } + + protected String getInlineViewClause(String joinTableName, java.util.List${database.filterGenericsString('String')} inlineWhereClauseList) { + final StringBuffer sb = new StringBuffer(); + sb.append("(select * from ").append(joinTableName).append(" where "); + int count = 0; + for (final java.util.Iterator ite = inlineWhereClauseList.iterator(); ite.hasNext(); ) { + final String whereClause = (String)ite.next(); + if (count > 0) { + sb.append(" and "); + } + sb.append(whereClause); + ++count; + } + sb.append(")"); + return sb.toString(); + } + + /** + * ${database.ImplementComment} + * + * @return from-base-table-hint. {select * from table [from-base-table-hint] where ...} (NotNull) + */ + public String getFromBaseTableHint() { + return createFromBaseTableHint(); + } + + /** + * ${database.ImplementComment} + * + * @return from-hint. {select * from table left outer join ... on ... [from-hint] where ...} (NotNull) + */ + public String getFromHint() { + return createFromHint(); + } + + public String getWhereClause() { + final StringBuffer sb = new StringBuffer(); + int count = 0; + for (final java.util.Iterator ite = _whereList.iterator(); ite.hasNext(); count++) { + if (count == 0) { + sb.append("where ").append((String)ite.next()); + } else { + sb.append(" and ").append((String)ite.next()); + } + } + return sb.toString(); + } + + public String getOrderByClause() { + if (!_unionQueryInfoList.isEmpty()) { + if (_selectClauseColumnAliasMap == null || _selectClauseColumnAliasMap.isEmpty()) { + String msg = "The selectClauseColumnAliasMap should not be null or empty when union query exists: " + toString(); + throw new IllegalStateException(msg); + } + return _orderByClause.getOrderByClause(_selectClauseColumnAliasMap); + } else { + return _orderByClause.getOrderByClause(); + } + } + + /** + * ${database.ImplementComment} + * + * @return sql-suffix. {select * from table where ... order by ... [sql-suffix]} (NotNull) + */ + public String getSqlSuffix() { + return createSqlSuffix(); + } + + // ===================================================================================== + // Copy Parts + // ========== + /** + * Copy included-select-column. + */ + public void copyIncludedSelectColumn(${glSqlClauseInterfaceName} sqlClause) { + final java.util.Set keySet = _includedSelectColumnMap.keySet(); + for (final java.util.Iterator ite = keySet.iterator(); ite.hasNext(); ) { + final String aliasName = (String)ite.next(); + final String realColumnName = (String)_includedSelectColumnMap.get(aliasName); + sqlClause.registerIncludedSelectColumn(aliasName, realColumnName); + } + } + + // ===================================================================================== + // IncludedSelectColumn + // ==================== + /** + * Ignore included-select-column. + */ + public void ignoreIncludedSelectColumn() { + _isIncludedSelectColumnEffective = false; + } + + /** + * Make included-select-column effective. + */ + public void makeIncludedSelectColumnEffective() { + if (!_includedSelectColumnMap.isEmpty()) { + _isIncludedSelectColumnEffective = true; + } + } + + /** + * Register included-select-column. + * + * @param aliasName Alias name. (NotNull) + * @param realColumnName Real column name. (NotNull) + */ + public void registerIncludedSelectColumn(String aliasName, String realColumnName) { + _isIncludedSelectColumnEffective = true; + _includedSelectColumnMap.put(aliasName, realColumnName); + } + + // ===================================================================================== + // OuterJoin + // ========= + /** + * ${database.ImplementComment} + * + * @param joinTableName Join table name(outer join [joinTableName]). (NotNull) + * @param aliasName Alias name of join table. (NotNull and Unique per invoking method.) + * @param joinOnMap Map that has conditions of 'on' clause. (NotNull) + */ + public void registerOuterJoin(String joinTableName, String aliasName, java.util.Map${database.filterGenericsString('String, String')} joinOnMap) { + assertAlreadyOuterJoin(aliasName); + assertJoinOnMapNotEmpty(joinOnMap, aliasName); + final LeftOuterJoinInfo joinInfo = new LeftOuterJoinInfo(); + joinInfo.setAliasName(aliasName); + joinInfo.setJoinTableName(joinTableName); + joinInfo.setJoinOnMap(joinOnMap); + _outerJoinMap.put(aliasName, joinInfo); + } + + protected static class LeftOuterJoinInfo { + protected String _aliasName; + protected String _joinTableName; + protected java.util.List${database.filterGenericsString('String')} _inlineWhereClauseList = new java.util.ArrayList${database.filterGenericsString('String')}(); + protected java.util.Map${database.filterGenericsString('String, String')} _joinOnMap; + public String getAliasName() { + return _aliasName; + } + public void setAliasName(String value) { + _aliasName = value; + } + public String getJoinTableName() { + return _joinTableName; + } + public void setJoinTableName(String value) { + _joinTableName = value; + } + public java.util.List${database.filterGenericsString('String')} getInlineWhereClauseList() { + return _inlineWhereClauseList; + } + public void addInlineWhereClause(String value) { + _inlineWhereClauseList.add(value); + } + public java.util.Map${database.filterGenericsString('String, String')} getJoinOnMap() { + return _joinOnMap; + } + public void setJoinOnMap(java.util.Map${database.filterGenericsString('String, String')} value) { + _joinOnMap = value; + } + } + + /** + * Assert whether the alias name have already registered in outer join. + * + * @param aliasName Alias name. + */ + protected void assertAlreadyOuterJoin(String aliasName) { + if (_outerJoinMap.containsKey(aliasName)) { + String msg = "The alias name have already registered in outer join: " + aliasName; + throw new IllegalStateException(msg); + } + } + + /** + * Assert whether the joinOnMap should not be empty. + * + * @param joinOnMap Map that has conditions of 'on' clause. (NotNull) + * @param aliasName Alias name. + */ + protected void assertJoinOnMapNotEmpty(java.util.Map${database.filterGenericsString('String, String')} joinOnMap, String aliasName) { + if (joinOnMap.isEmpty()) { + String msg = "The joinOnMap should not be empty: aliasName=" + aliasName; + throw new IllegalStateException(msg); + } + } + + // ===================================================================================== + // Where + // ===== + /** + * ${database.ImplementComment} + * + * @param columnFullName Column-full-name([table-name].[column-name]). (NotNull) + * @param key Condition key. (NotNull) + * @param value Condition value. (NotNull) + */ + public void registerWhereClause(String columnFullName, ${glConditionKeyName} key, ${glConditionValueName} value) { + assertStringNotNullAndNotTrimmedEmpty("columnFullName", columnFullName); + key.addWhereClause(_whereList, columnFullName, value); + arrangeWhereListAdditionalConditionAsOr(_whereList); + } + + /** + * Register where clause. + * + * @param columnFullName Column-full-name([table-name].[column-name]). (NotNull) + * @param key Condition key. (NotNull) + * @param value Condition value. (NotNull) + * @param option Operand option. (NotNull) + */ + public void registerWhereClause(String columnFullName, ${glConditionKeyName} key, ${glConditionValueName} value, ${glConditionOptionInterfaceName} option) { + assertStringNotNullAndNotTrimmedEmpty("columnFullName", columnFullName); + assertObjectNotNull("option of " + columnFullName, option); + key.addWhereClause(_whereList, columnFullName, value, option); + arrangeWhereListAdditionalConditionAsOr(_whereList); + } + + /** + * ${database.ImplementComment} + * + * @param clause Where-clause. (NotNull) + */ + public void registerWhereClause(String clause) { + assertStringNotNullAndNotTrimmedEmpty("clause", clause); + _whereList.add(clause); + arrangeWhereListAdditionalConditionAsOr(_whereList); + } + + /** + * Exchange first where clause for last one. + */ + public void exchangeFirstWhereClauseForLastOne() { + if (_whereList.size() > 1) { + final String first = (String)_whereList.get(0); + final String last = (String)_whereList.get(_whereList.size() - 1); + _whereList.set(0, last); + _whereList.set(_whereList.size() - 1, first); + } + } + + // ===================================================================================== + // InlineWhere + // =========== + public void registerBaseTableInlineWhereClause(String columnName, ${glConditionKeyName} key, ${glConditionValueName} value) { + assertStringNotNullAndNotTrimmedEmpty("columnName", columnName); + key.addWhereClause(_baseTableInlineWhereList, columnName, value); + arrangeWhereListAdditionalConditionAsOr(_baseTableInlineWhereList); + } + + public void registerBaseTableInlineWhereClause(String columnName, ${glConditionKeyName} key, ${glConditionValueName} value, ${glConditionOptionInterfaceName} option) { + assertStringNotNullAndNotTrimmedEmpty("columnName", columnName); + assertObjectNotNull("option of " + columnName, option); + key.addWhereClause(_baseTableInlineWhereList, columnName, value, option); + arrangeWhereListAdditionalConditionAsOr(_baseTableInlineWhereList); + } + + public void registerBaseTableInlineWhereClause(String value) { + _baseTableInlineWhereList.add(value); + } + + public void registerOuterJoinInlineWhereClause(String aliasName, String columnName, ${glConditionKeyName} key, ${glConditionValueName} value) { + assertNotYetOuterJoin(aliasName); + assertStringNotNullAndNotTrimmedEmpty("columnName", columnName); + final LeftOuterJoinInfo joinInfo = (LeftOuterJoinInfo)_outerJoinMap.get(aliasName); + key.addWhereClause(joinInfo.getInlineWhereClauseList(), columnName, value); + arrangeWhereListAdditionalConditionAsOr(joinInfo.getInlineWhereClauseList()); + } + + public void registerOuterJoinInlineWhereClause(String aliasName, String columnName, ${glConditionKeyName} key, ${glConditionValueName} value, ${glConditionOptionInterfaceName} option) { + assertNotYetOuterJoin(aliasName); + assertStringNotNullAndNotTrimmedEmpty("columnName", columnName); + final LeftOuterJoinInfo joinInfo = (LeftOuterJoinInfo)_outerJoinMap.get(aliasName); + key.addWhereClause(joinInfo.getInlineWhereClauseList(), columnName, value, option); + arrangeWhereListAdditionalConditionAsOr(joinInfo.getInlineWhereClauseList()); + } + + public void registerOuterJoinInlineWhereClause(String aliasName, String value) { + assertNotYetOuterJoin(aliasName); + final LeftOuterJoinInfo joinInfo = (LeftOuterJoinInfo)_outerJoinMap.get(aliasName); + joinInfo.addInlineWhereClause(value); + arrangeWhereListAdditionalConditionAsOr(joinInfo.getInlineWhereClauseList()); + } + + /** + * Assert whether the alias name have already registered in outer join. + * + * @param aliasName Alias name. + */ + protected void assertNotYetOuterJoin(String aliasName) { + if (!_outerJoinMap.containsKey(aliasName)) { + String msg = "The alias name have not registered in outer join yet: " + aliasName; + throw new IllegalStateException(msg); + } + } + + // ===================================================================================== + // AdditionalConditionAsOr + // ======================= + public void makeAdditionalConditionAsOrEffective() { + _isAdditionalConditionAsOrEffective = true; + } + + public void ignoreAdditionalConditionAsOr() { + _isAdditionalConditionAsOrEffective = false; + } + + protected void arrangeWhereListAdditionalConditionAsOr(java.util.List${database.filterGenericsString('String')} whereList) { + if (_isAdditionalConditionAsOrEffective) { + if (whereList.size() < 2) { + String msg = "The whereList should have two more elements when the isAdditionalConditionAsOrEffective is true: " + toString(); + throw new IllegalStateException(msg); + } + final String lastWhereClause = (String)whereList.remove(whereList.size() - 1); + final String preWhereClause = (String)whereList.remove(whereList.size() - 1); + if (preWhereClause.startsWith("(") && preWhereClause.endsWith(")")) { + final String plainClause = preWhereClause.substring("(".length(), preWhereClause.length() - ")".length()); + whereList.add("(" + plainClause + " or " + lastWhereClause + ")"); + } else { + whereList.add("(" + preWhereClause + " or " + lastWhereClause + ")"); + } + } + } + + // ===================================================================================== + // OrderBy + // ======= + /** + * ${database.ImplementComment} + * + * @return this. (NotNull) + */ + public ${glOrderByClauseName} getSqlComponentOfOrderByClause() { + return _orderByClause; + } + + /** + * ${database.ImplementComment} + * + * @return this. (NotNull) + */ + public ${glSqlClauseInterfaceName} clearOrderBy() { + _isOrderByEffective = false; + _orderByClause.clear(); + return this; + } + + /** + * ${database.ImplementComment} + * + * @return this. (NotNull) + */ + public ${glSqlClauseInterfaceName} ignoreOrderBy() { + _isOrderByEffective = false; + return this; + } + + /** + * ${database.ImplementComment} + * + * @return this. (NotNull) + */ + public ${glSqlClauseInterfaceName} makeOrderByEffective() { + if (!_orderByClause.isEmpty()) { + _isOrderByEffective = true; + } + return this; + } + + /** + * ${database.ImplementComment} + * + * @param orderByProperty Order-by-property. 'aliasName.columnName/aliasName.columnName/...' (NotNull) + * @param registeredOrderByProperty Registered-order-by-property. ([table-name].[column-name]) (Nullable) + * @param isAsc Is asc? + */ + public void reverseOrderBy_Or_OverrideOrderBy(String orderByProperty, String registeredOrderByProperty, boolean isAsc) { + _isOrderByEffective = true; + if (!_orderByClause.isSameOrderByColumn(orderByProperty)) { + clearOrderBy(); + registerOrderBy(orderByProperty, registeredOrderByProperty, isAsc); + } else { + _orderByClause.reverseAll(); + } + } + + /** + * ${database.ImplementComment} + * + * @param orderByProperty Order-by-property. 'aliasName.columnName/aliasName.columnName/...' (NotNull) + * @param registeredOrderByProperty Registered-order-by-property. ([table-name].[column-name]) (Nullable) + * @param isAsc Is asc? + */ + public void registerOrderBy(String orderByProperty, String registeredOrderByProperty, boolean isAsc) { + try { + _isOrderByEffective = true; + final java.util.List${database.filterGenericsString('String')} orderByList = new java.util.ArrayList${database.filterGenericsString('String')}(); + { + final java.util.StringTokenizer st = new java.util.StringTokenizer(orderByProperty, "/"); + while (st.hasMoreElements()) { + orderByList.add(st.nextToken()); + } + } + + if (registeredOrderByProperty == null || registeredOrderByProperty.trim().length() ==0) { + registeredOrderByProperty = orderByProperty; + } + + final java.util.List${database.filterGenericsString('String')} registeredOrderByList = new java.util.ArrayList${database.filterGenericsString('String')}(); + { + final java.util.StringTokenizer st = new java.util.StringTokenizer(registeredOrderByProperty, "/"); + while (st.hasMoreElements()) { + registeredOrderByList.add(st.nextToken()); + } + } + + int count = 0; + for (final java.util.Iterator ite = orderByList.iterator(); ite.hasNext(); ) { + String orderBy = (String)ite.next(); + String registeredOrderBy = (String)registeredOrderByList.get(count); + + _isOrderByEffective = true; + String aliasName = null; + String columnName = null; + String registeredAliasName = null; + String registeredColumnName = null; + + if (orderBy.indexOf(".") < 0) { + columnName = orderBy; + } else { + aliasName = orderBy.substring(0, orderBy.lastIndexOf(".")); + columnName = orderBy.substring(orderBy.lastIndexOf(".") + 1); + } + + if (registeredOrderBy.indexOf(".") < 0) { + registeredColumnName = registeredOrderBy; + } else { + registeredAliasName = registeredOrderBy.substring(0, registeredOrderBy.lastIndexOf(".")); + registeredColumnName = registeredOrderBy.substring(registeredOrderBy.lastIndexOf(".") + 1); + } + + ${glOrderByElementName} element = new ${glOrderByElementName}(); + element.setAliasName(aliasName); + element.setColumnName(columnName); + element.setRegisteredAliasName(registeredAliasName); + element.setRegisteredColumnName(registeredColumnName); + if (isAsc) { + element.setupAsc(); + } else { + element.setupDesc(); + } + _orderByClause.addOrderByElement(element); + + count++; + } + } catch (RuntimeException e) { + String msg = "registerOrderBy() threw the exception: orderByProperty=" + orderByProperty; + msg = msg + " registeredColumnFullName=" + registeredOrderByProperty; + msg = msg + " isAsc=" + isAsc; + msg = msg + " sqlClause=" + this.toString(); + throw new RuntimeException(msg, e); + } + } + + // ===================================================================================== + // Clause + // ====== + public void registerUnionQuery(String unionQueryClause, boolean unionAll) { + assertStringNotNullAndNotTrimmedEmpty("unionQueryClause", unionQueryClause); + final UnionQueryInfo unionQueryInfo = new UnionQueryInfo(); + unionQueryInfo.setUnionQueryClause(unionQueryClause); + unionQueryInfo.setUnionAll(unionAll); + _unionQueryInfoList.add(unionQueryInfo); + } + + protected static class UnionQueryInfo { + protected String _unionQueryClause; + protected boolean _unionAll; + public String getUnionQueryClause() { + return _unionQueryClause; + } + public void setUnionQueryClause(String unionQueryClause) { + _unionQueryClause = unionQueryClause; + } + public boolean isUnionAll() { + return _unionAll; + } + public void setUnionAll(boolean unionAll) { + _unionAll = unionAll; + } + } + + // ===================================================================================== + // Advance + // ======= + /** + * ${database.ImplementComment} + * + * @param fetchSize Fetch-size. (NotMinus & NotZero) + * @return this. (NotNull) + */ + public ${glSqlClauseInterfaceName} fetchFirst(int fetchSize) { + _isFetchScopeEffective = true; + if (fetchSize <= 0) { + String msg = "Argument[fetchSize] must be plus: " + fetchSize; + throw new IllegalArgumentException(msg); + } + _fetchStartIndex = 0; + _fetchSize = fetchSize; + _fetchPageNumber = 1; + doClearFetchPageClause(); + doFetchFirst(); + return this; + } + + /** + * ${database.ImplementComment} + * + * @param fetchStartIndex Fetch-start-index. 0 origin. (NotMinus) + * @param fetchSize Fetch size. (NotMinus) + * @return this. (NotNull) + */ + public ${glSqlClauseInterfaceName} fetchScope(int fetchStartIndex, int fetchSize) { + _isFetchScopeEffective = true; + if (fetchStartIndex < 0) { + String msg = "Argument[fetchStartIndex] must be plus or zero: " + fetchStartIndex; + throw new IllegalArgumentException(msg); + } + if (fetchSize <= 0) { + String msg = "Argument[fetchSize] must be plus: " + fetchSize; + throw new IllegalArgumentException(msg); + } + _fetchStartIndex = fetchStartIndex; + _fetchSize = fetchSize; + return fetchPage(1); + } + + /** + * ${database.ImplementComment} + * + * @param fetchPageNumber Page-number. 1 origin. (NotMinus & NotZero: If minus or zero, set one.) + * @return this. (NotNull) + */ + public ${glSqlClauseInterfaceName} fetchPage(int fetchPageNumber) { + _isFetchScopeEffective = true; + if (fetchPageNumber <= 0) { + fetchPageNumber = 1; + } + if (_fetchSize <= 0) { + String msg = "Fetch size should not be minus or zero when you invoke this method. "; + msg = msg + "When you invoke this method, it is necessary to invoke 'fetchFirst()' or 'fetchScope()' ahead of that. "; + msg = msg + ": fetchPageNumber=" + fetchPageNumber + " _fetchSize=" + _fetchSize; + throw new IllegalStateException(msg); + } + _fetchPageNumber = fetchPageNumber; + if (_fetchPageNumber == 1 && _fetchStartIndex == 0) { + return fetchFirst(_fetchSize); + } + doClearFetchPageClause(); + doFetchPage(); + return this; + } + + /** + * Do fetch first. + */ + abstract protected void doFetchFirst(); + + /** + * Do fetch page. + */ + abstract protected void doFetchPage(); + + /** + * Do clear fetch-page clause. + */ + abstract protected void doClearFetchPageClause(); + + /** + * ${database.ImplementComment} + * + * @return Fetch start index. + */ + public int getFetchStartIndex() { + return _fetchStartIndex; + } + + /** + * ${database.ImplementComment} + * + * @return Fetch size. + */ + public int getFetchSize() { + return _fetchSize; + } + + /** + * ${database.ImplementComment} + * + * @return Fetch page number. + */ + public int getFetchPageNumber() { + return _fetchPageNumber; + } + + /** + * Get page start index. + * + * @return Page start index. 0 origin. (NotMinus) + */ + public int getPageStartIndex() { + if (_fetchPageNumber <= 0) { + String msg = "_fetchPageNumber must be plus: " + _fetchPageNumber; + throw new IllegalStateException(msg); + } + return _fetchStartIndex + (_fetchSize * (_fetchPageNumber - 1)); + } + + /** + * Get page end index. + * + * @return Page end index. 0 origin. (NotMinus) + */ + public int getPageEndIndex() { + if (_fetchPageNumber <= 0) { + String msg = "_fetchPageNumber must be plus: " + _fetchPageNumber; + throw new IllegalStateException(msg); + } + return _fetchStartIndex + (_fetchSize * _fetchPageNumber); + } + + /** + * ${database.ImplementComment} + * + * @return Determiantion. + */ + public boolean isFetchScopeEffective() { + return _isFetchScopeEffective; + } + + /** + * ${database.ImplementComment} + * + * @return this. (NotNull) + */ + public ${glSqlClauseInterfaceName} ignoreFetchScope() { + _isFetchScopeEffective = false; + doClearFetchPageClause(); + return this; + } + + /** + * ${database.ImplementComment} + * + * @return this. (NotNull) + */ + public ${glSqlClauseInterfaceName} makeFetchScopeEffective() { + if (getFetchSize() > 0 && getFetchPageNumber() > 0) { + fetchPage(getFetchPageNumber()); + } + return this; + } + + /** + * ${database.ImplementComment} + * + * @return Determination. + */ + public boolean isFetchStartIndexSupported() { + return true; // Default + } + + /** + * ${database.ImplementComment} + * + * @return Determination. + */ + public boolean isFetchSizeSupported() { + return true; // Default + } + + /** + * Create select-hint. + * + * @return Select-hint. {select [select-hint] * from table...} (NotNull) + */ + abstract protected String createSelectHint(); + + /** + * Create from-base-table-hint. + * + * @return From-hint. {select * from table [from-base-table-hint] where ...} (NotNull) + */ + abstract protected String createFromBaseTableHint(); + + /** + * Create from-hint. + * + * @return From-hint. {select * from table left outer join ... on ... [from-hint] where ...} (NotNull) + */ + abstract protected String createFromHint(); + + /** + * Create sql-suffix. + * + * @return Sql-suffix. {select * from table where ... order by ... [sql-suffix]} (NotNull) + */ + abstract protected String createSqlSuffix(); + + // ===================================================================================== + // FetchNarrowing + // ============== + /** + * ${database.ImplementComment} + * + * @return Fetch-narrowing start-index. + */ + public int getFetchNarrowingSkipStartIndex() { + if (isFetchStartIndexSupported()) { + return 0; + } else { + return getPageStartIndex(); + } + } + + /** + * ${database.ImplementComment} + * + * @return Fetch-narrowing size. + */ + public int getFetchNarrowingLoopCount() { + return getFetchSize(); + } + + /** + * ${database.ImplementComment} + * + * @return Determiantion. + */ + public boolean isFetchNarrowingEffective() { + return _isFetchScopeEffective; + } + + // ===================================================================================== + // Helper Method + // ============= + // ---------------------------------------------------------------- + // Assert Object + // ------------- + /** + * Assert that the object is not null. + * + * @param variableName Variable name. (NotNull) + * @param value Value. (NotNull) + * @exception IllegalArgumentException + */ + protected void assertObjectNotNull(String variableName, Object value) { + if (variableName == null) { + String msg = "The value should not be null: variableName=" + variableName + " value=" + value; + throw new IllegalArgumentException(msg); + } + if (value == null) { + String msg = "The value should not be null: variableName=" + variableName; + throw new IllegalArgumentException(msg); + } + } + + // ---------------------------------------------------------------- + // Assert String + // ------------- + /** + * Assert that the entity is not null and not trimmed empty. + * + * @param variableName Variable name. (NotNull) + * @param value Value. (NotNull) + */ + protected void assertStringNotNullAndNotTrimmedEmpty(String variableName, String value) { + assertObjectNotNull("variableName", variableName); + assertObjectNotNull("value", value); + if (value.trim().length() ==0) { + String msg = "The value should not be empty: variableName=" + variableName + " value=" + value; + throw new IllegalArgumentException(msg); + } + } +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/sqlclause/OrderByClause.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/sqlclause/OrderByClause.vm 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/sqlclause/OrderByClause.vm 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,277 @@ +package ${glPackageBaseCommonSqlClause}; + +#set ($myClassName = "${glOrderByClauseName}") + +/** + * The paging-result-bean of ${myClassName}. + * + * @author ${database.ClassAuthor} + */ +public class ${myClassName} implements java.io.Serializable { + + /** Serial version UID. (Default) */ + private static final long serialVersionUID = 1L; + + // ===================================================================================== + // Attribute + // ========= + protected java.util.List${database.filterGenericsString(${glOrderByElementName})} _orderByList = new java.util.ArrayList${database.filterGenericsString(${glOrderByElementName})}(); + + // ===================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + public ${myClassName}() { + } + + // ===================================================================================== + // Behavior + // ======== + /** + * Add order-by element. + * + * @param orderByElement Order-by element. (NotNull) + */ + public void addOrderByElement(${glOrderByElementName} orderByElement) { + _orderByList.add(orderByElement); + } + + /** + * Insert first order-by element . + * + * @param orderByElement Order-by element. (NotNull) + */ + public void insertFirstOrderByElement(${glOrderByElementName} orderByElement) { + _orderByList.add(0, orderByElement); + } + + public void reverseAll() { + for (final java.util.Iterator ite = _orderByList.iterator(); ite.hasNext(); ) { + final ${glOrderByElementName} element = (${glOrderByElementName})ite.next(); + element.reverse(); + } + } + + public void exchangeFirstOrderByElementForLastOne() { + if (_orderByList.size() > 1) { + final ${glOrderByElementName} first = (${glOrderByElementName})_orderByList.get(0); + final ${glOrderByElementName} last = (${glOrderByElementName})_orderByList.get(_orderByList.size() - 1); + _orderByList.set(0, last); + _orderByList.set(_orderByList.size() - 1, first); + } + } + + /** + * Get the value of allRecordCount. + * + * @return The value of allRecordCount. + */ + public java.util.List${database.filterGenericsString(${glOrderByElementName})} getOrderByList() { + return _orderByList; + } + + public String getOrderByClause() { + if (_orderByList.isEmpty()) { + return ""; + } + final StringBuffer sb = new StringBuffer(); + final String delimiter = ", "; + for (final java.util.Iterator ite = _orderByList.iterator(); ite.hasNext(); ) { + final ${glOrderByElementName} element = (${glOrderByElementName})ite.next(); + sb.append(delimiter).append(element.getElementClause()); + } + sb.delete(0, delimiter.length()).insert(0, "order by "); + return sb.toString(); + } + + public String getOrderByClause(java.util.Map${database.filterGenericsString('String, String')} selectClauseColumnAliasMap) { + if (_orderByList.isEmpty()) { + return ""; + } + final StringBuffer sb = new StringBuffer(); + final String delimiter = ", "; + for (final java.util.Iterator ite = _orderByList.iterator(); ite.hasNext(); ) { + final ${glOrderByElementName} element = (${glOrderByElementName})ite.next(); + sb.append(delimiter).append(element.getElementClause(selectClauseColumnAliasMap)); + } + sb.delete(0, delimiter.length()).insert(0, "order by "); + return sb.toString(); + } + + public boolean isSameOrderByColumn(String orderByProperty) { + final java.util.List${database.filterGenericsString('String')} orderByList = new java.util.ArrayList${database.filterGenericsString('String')}(); + { + final java.util.StringTokenizer st = new java.util.StringTokenizer(orderByProperty, "/"); + while (st.hasMoreElements()) { + orderByList.add(st.nextToken()); + } + } + if (_orderByList.size() != orderByList.size()) { + return false; + } + int count = 0; + for (final java.util.Iterator ite = orderByList.iterator(); ite.hasNext(); ) { + final String columnFullName = (String)ite.next(); + final ${glOrderByElementName} element = (${glOrderByElementName})_orderByList.get(count); + if (!element.getColumnFullName().equals(columnFullName)) { + return false; + } + count++; + } + return true; + } + + // ===================================================================================== + // First Element + // ============= + /** + * Is first element asc? + * If order-by list is empty, throws exception. + * + * @return Determination. + */ + public boolean isFirstElementAsc() { + if (isEmpty()) { + String msg = "This order-by clause is empty: " + toString(); + throw new IllegalStateException(msg); + } + final ${glOrderByElementName} element = (${glOrderByElementName})_orderByList.get(0); + return element.isAsc(); + } + + /** + * Is first element desc? + * If order-by list is empty, throws exception. + * + * @return Determination. + */ + public boolean isFirstElementDesc() { + return !isFirstElementAsc(); + } + + /** + * Is same as first element alias-name? + * If order-by list is empty, throws exception. + * + * @param expectedAliasName Expected alias-name. (Nullable) + * @return Determination. + */ + public boolean isSameAsFirstElementAliasName(String expectedAliasName) { + if (isEmpty()) { + String msg = "This order-by clause is empty: " + toString(); + throw new RuntimeException(msg); + } + ${glOrderByElementName} element = (${glOrderByElementName})_orderByList.get(0); + String actualAliasName = element.getAliasName(); + if (actualAliasName != null && expectedAliasName != null) { + return actualAliasName.equalsIgnoreCase(expectedAliasName); + } else { + return false; + } + } + + /** + * Is same as first element column-name? + * If order-by list is empty, throws exception. + * + * @param expectedColumnName Expected column-name. (Nullable) + * @return Determination. + */ + public boolean isSameAsFirstElementColumnName(String expectedColumnName) { + if (isEmpty()) { + String msg = "This order-by clause is empty: " + toString(); + throw new RuntimeException(msg); + } + ${glOrderByElementName} element = (${glOrderByElementName})_orderByList.get(0); + String actualColumnName = element.getColumnName(); + if (actualColumnName != null && expectedColumnName != null) { + return actualColumnName.equalsIgnoreCase(expectedColumnName); + } else { + return false; + } + } + + /** + * Is same as first element registered-alias-name? + * If order-by list is empty, throws exception. + * + * @param expectedAliasName Expected alias-name. (Nullable) + * @return Determination. + */ + public boolean isSameAsFirstElementRegisteredAliasName(String expectedAliasName) { + if (isEmpty()) { + String msg = "This order-by clause is empty: " + toString(); + throw new RuntimeException(msg); + } + ${glOrderByElementName} element = (${glOrderByElementName})_orderByList.get(0); + String actualAliasName = element.getRegisteredAliasName(); + if (actualAliasName != null && expectedAliasName != null) { + return actualAliasName.equalsIgnoreCase(expectedAliasName); + } else { + return false; + } + } + + /** + * Is same as first element registered-column-name? + * If order-by list is empty, throws exception. + * + * @param expectedColumnName Expected column-name. (Nullable) + * @return Determination. + */ + public boolean isSameAsFirstElementRegisteredColumnName(String expectedColumnName) { + if (isEmpty()) { + String msg = "This order-by clause is empty: " + toString(); + throw new RuntimeException(msg); + } + ${glOrderByElementName} element = (${glOrderByElementName})_orderByList.get(0); + String actualColumnName = element.getRegisteredColumnName(); + if (actualColumnName != null && expectedColumnName != null) { + return actualColumnName.equalsIgnoreCase(expectedColumnName); + } else { + return false; + } + } + + // ===================================================================================== + // Delegate of List + // ================ + /** + * Is empty? + * + * @return Determination. + */ + public boolean isEmpty() { + return _orderByList.isEmpty(); + } + + /** + * Get iterator of order-by list. + * + * @return Determination. + */ + public java.util.Iterator iterator() { + return _orderByList.iterator(); + } + + /** + * Clear order-by list. + */ + public void clear() { + _orderByList.clear(); + } + + // ===================================================================================== + // Basic-Override Method + // ===================== + /** + * This method overrides the method that is declared at super. + * + * @return View-string of all-columns value. + */ + public String toString() { + return _orderByList.toString(); + } +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/sqlclause/OrderByElement.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/sqlclause/OrderByElement.vm 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/sqlclause/OrderByElement.vm 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,173 @@ +package ${glPackageBaseCommonSqlClause}; + +#set ($myClassName = "${glOrderByElementName}") + +/** + * The paging-result-bean of ${myClassName}. + * + *
+ *   For example, if you make order-by 'order BOOK.BOOK_ID asc', the way is as follows:
+ *       /-----------------------------------------------------
+ *       ${myClassName} orderByElement = new ${myClassName}();
+ *       orderByElement.AliasName = "BOOK";
+ *       orderByElement.ColumnName = "BOOK_ID";
+ *       orderByElement.SetupAsc();
+ *       -------------/
+ * 
+ * + * @author ${database.ClassAuthor} + */ +public class ${myClassName} implements java.io.Serializable { + + /** Serial version UID. (Default) */ + private static final long serialVersionUID = 1L; + + // ===================================================================================== + // Attribute + // ========= + /** The value of alias name. */ + protected String _aliasName; + + /** The value of column name. */ + protected String _columnName; + + /** The value of registered alias name. */ + protected String _registeredAliasName; + + /** The value of registered column name. */ + protected String _registeredColumnName; + + /** The value of ascDesc. */ + protected String _ascDesc = "asc"; + + // ===================================================================================== + // GetterSetter + // ============ + public String getAliasName() { + return _aliasName; + } + public String getColumnName() { + return _columnName; + } + public String getRegisteredAliasName() { + return _registeredAliasName; + } + public String getRegisteredColumnName() { + return _registeredColumnName; + } + public String getAscDesc() { + return _ascDesc; + } + public void setAliasName(String value) { + _aliasName = value; + } + public void setColumnName(String value) { + _columnName = value; + } + public void setRegisteredAliasName(String value) { + _registeredAliasName = value; + } + public void setRegisteredColumnName(String value) { + _registeredColumnName = value; + } + public void setAscDesc(String value) { + _ascDesc = value; + } + + // ===================================================================================== + // Behavior + // ======== + public void setupAsc() { + _ascDesc = "asc"; + } + + public void setupDesc() { + _ascDesc = "desc"; + } + + public void reverse() { + if (_ascDesc == null) { + String msg = "The attribute[ascDesc] should not be null."; + throw new IllegalStateException(msg); + } + if (_ascDesc.equals("asc")) { + _ascDesc = "desc"; + } else if (_ascDesc.equals("desc")) { + _ascDesc = "asc"; + } else { + String msg = "The attribute[ascDesc] should be asc or desc: but ascDesc=" + _ascDesc; + throw new IllegalStateException(msg); + } + } + + public boolean isAsc() { + if (_ascDesc == null) { + String msg = "The attribute[ascDesc] should not be null."; + throw new IllegalStateException(msg); + } + if (_ascDesc.equals("asc")) { + return true; + } else if (_ascDesc.equals("desc")) { + return false; + } else { + String msg = "The attribute[ascDesc] should be asc or desc: but ascDesc=" + _ascDesc; + throw new IllegalStateException(msg); + } + } + + public String getColumnFullName() { + final StringBuffer sb = new StringBuffer(); + if (_aliasName != null) { + sb.append(_aliasName).append("."); + } + if (_columnName == null) { + String msg = "The attribute[columnName] should not be null."; + throw new IllegalStateException(msg); + } + sb.append(_columnName); + return sb.toString(); + } + + public String getElementClause() { + if (_ascDesc == null) { + String msg = "The attribute[ascDesc] should not be null."; + throw new IllegalStateException(msg); + } + final StringBuffer sb = new StringBuffer(); + sb.append(getColumnFullName()).append(" ").append(_ascDesc); + return sb.toString(); + } + + public String getElementClause(java.util.Map${database.filterGenericsString('String, String')} selectClauseColumnAliasMap) { + if (_ascDesc == null) { + String msg = "The attribute[ascDesc] should not be null."; + throw new IllegalStateException(msg); + } + final StringBuffer sb = new StringBuffer(); + final String columnAlias = (String)selectClauseColumnAliasMap.get(getColumnFullName()); + if (columnAlias == null || columnAlias.trim().length() == 0) { + String msg = "The selectClauseColumnAliasMap should have the value of the key: " + getColumnFullName(); + throw new IllegalStateException(msg + " But the map is " + selectClauseColumnAliasMap); + } + sb.append(columnAlias).append(" ").append(_ascDesc); + return sb.toString(); + } + + // ===================================================================================== + // Basic Override + // ============== + /** + * This method overrides the method that is declared at super. + * + * @return View-string of all-columns value. + */ + public String toString() { + final StringBuffer sb = new StringBuffer(); + sb.append("[OrderByElement] aliasName=").append(_aliasName); + sb.append(" columnName=").append(_columnName); + sb.append(" registeredAliasName=").append(_registeredAliasName); + sb.append(" registeredColumnName=").append(_registeredColumnName); + sb.append(" ascDesc=").append(_ascDesc); + return sb.toString(); + } +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/sqlclause/SqlClause.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/sqlclause/SqlClause.vm 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/sqlclause/SqlClause.vm 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,373 @@ +package ${glPackageBaseCommonSqlClause}; + +#set ($myClassName = "${glSqlClauseInterfaceName}") + +import java.util.Map; + +import ${glPackageBaseCommonCKey}.${glConditionKeyName}; +import ${glPackageBaseCommonCOption}.${glConditionOptionInterfaceName}; +import ${glPackageBaseCommonCValue}.${glConditionValueName}; + +/** + * The interface of SqlClause. + * + * @author ${database.ClassAuthor} + */ +public interface ${myClassName} { + + public static final String INCLUDE_SELECT_CLAUSE_MARK = "/* df:includeSelectClause */"; + + // ===================================================================================== + // Select Clause + // ============= + public void setSelectClauseColumnAliasMap(java.util.Map${database.filterGenericsString('String, String')} selectClauseColumnAliasMap); + + // ===================================================================================== + // Clause + // ====== + /** + * Get clause string. + *

+ *

+     * ex)
+     * # from [base-table] left outer join [fk-table] [fk-alias] on [join-condition]
+     * # where [base-table].[column] = [value] and [fk-alias].[column] is null
+     * # order by [base-table].[column] asc, [fk-alias].[column] desc
+     * # for update
+     * 
+ * + * @return Clause string. (NotNull) + */ + public String getClause(); + + /** + * Get clause string without included and orderby and sqlsuffix. + * + * @return Clause string. (NotNull) + */ + public String getClauseWithoutIncludedOrderBySqlSuffix(); + + // ===================================================================================== + // Clause Parts + // ============ + /** + * Get select-hint. This is an internal method. + * + * @return select-hint. {select [select-hint] * from table...} (NotNull) + */ + public String getSelectHint(); + + /** + * Get included-select-column clause. This is an internal method. + * + * @return Included-select-column clause. {select ... , [included-select-column clause] from table...} (NotNull) + */ + public String getIncludedSelectColumnClause(); + + /** + * Get from clause. {from table left outer join foreign-table on ...} + * + * @return From clause. (NotNull) + */ + public String getFromClause(); + + /** + * Get from-base-table-hint. This is an internal method. + * + * @return from-base-table-hint. {select * from table [from-base-table-hint] where ...} (NotNull) + */ + public String getFromBaseTableHint(); + + /** + * Get from-hint. This is an internal method. + * + * @return from-hint. {select * from table left outer join ... on ... [from-hint] where ...} (NotNull) + */ + public String getFromHint(); + + /** + * Get where clause. {where [base-table].[column] = [value] and [fk-alias].[column] is null} + * + * @return Where clause. (NotNull) + */ + public String getWhereClause(); + + /** + * Get order-by clause. {order by [base-table].[column] asc, [fk-alias].[column] desc} + * + * @return Order-by clause. (NotNull) + */ + public String getOrderByClause(); + + /** + * Get sql-suffix. This is an internal method. + * + * @return sql-suffix. {select * from table where ... order by ... [sql-suffix]} (NotNull) + */ + public String getSqlSuffix(); + + // ===================================================================================== + // Copy Parts + // ========== + /** + * Copy included-select-column. + */ + public void copyIncludedSelectColumn(${glSqlClauseInterfaceName} sqlClause); + + // ===================================================================================== + // IncludedSelectColumn + // ==================== + /** + * Ignore included-select-column. + */ + public void ignoreIncludedSelectColumn(); + + /** + * Make included-select-column effective. + */ + public void makeIncludedSelectColumnEffective(); + + /** + * Register included-select-column. + * + * @param aliasName Alias name. (NotNull) + * @param realColumnName Real column name. (NotNull) + */ + public void registerIncludedSelectColumn(String aliasName, String realColumnName); + + // ===================================================================================== + // OuterJoin + // ========= + /** + * Register outer join. + * + * @param joinTableName Join table name(outer join [joinTableName]). (NotNull) + * @param aliasName Alias name of join table. (NotNull and Unique per invoking method.) + * @param joinOnMap Map that has conditions of 'on' clause. (NotNull) + */ + public void registerOuterJoin(String joinTableName, String aliasName, Map${database.filterGenericsString('String, String')} joinOnMap); + + // ===================================================================================== + // Where + // ===== + /** + * Register where clause. + * + * @param columnFullName Column-full-name([table-name].[column-name]). (NotNull) + * @param key Condition key. (NotNull) + * @param value Condition value. (NotNull) + */ + public void registerWhereClause(String columnFullName, ${glConditionKeyName} key, ${glConditionValueName} value); + + /** + * Register where clause. + * + * @param columnFullName Column-full-name([table-name].[column-name]). (NotNull) + * @param key Condition key. (NotNull) + * @param value Condition value. (NotNull) + * @param option Condition option. (NotNull) + */ + public void registerWhereClause(String columnFullName, ${glConditionKeyName} key, ${glConditionValueName} value, ${glConditionOptionInterfaceName} option); + + /** + * Register where clause. + * + * @param clause Where-clause. (NotNull) + */ + public void registerWhereClause(String clause); + + /** + * Exchange first where clause for last one. + */ + public void exchangeFirstWhereClauseForLastOne(); + + // ===================================================================================== + // InlineWhere + // =========== + public void registerBaseTableInlineWhereClause(String columnName, ${glConditionKeyName} key, ${glConditionValueName} value); + public void registerBaseTableInlineWhereClause(String columnName, ${glConditionKeyName} key, ${glConditionValueName} value, ${glConditionOptionInterfaceName} option); + public void registerBaseTableInlineWhereClause(String value); + public void registerOuterJoinInlineWhereClause(String aliasName, String columnName, ${glConditionKeyName} key, ${glConditionValueName} value); + public void registerOuterJoinInlineWhereClause(String aliasName, String columnName, ${glConditionKeyName} key, ${glConditionValueName} value, ${glConditionOptionInterfaceName} option); + public void registerOuterJoinInlineWhereClause(String aliasName, String value); + + // ===================================================================================== + // AdditionalConditionAsOr + // ======================= + public void makeAdditionalConditionAsOrEffective(); + public void ignoreAdditionalConditionAsOr(); + + // ===================================================================================== + // OrderBy + // ======= + public ${glOrderByClauseName} getSqlComponentOfOrderByClause(); + + /** + * Clear order-by. + * + * @return this. (NotNull) + */ + public ${myClassName} clearOrderBy(); + + /** + * Ignore order-by. + * + * @return this. (NotNull) + */ + public ${myClassName} ignoreOrderBy(); + + /** + * Make order-by effective. + * + * @return this. (NotNull) + */ + public ${myClassName} makeOrderByEffective(); + + public void registerOrderBy(String orderByProperty, String registeredOrderByProperty, boolean isAsc); + + public void reverseOrderBy_Or_OverrideOrderBy(String orderByProperty, String registeredOrderByProperty, boolean isAsc); + + // ===================================================================================== + // Clause + // ====== + public void registerUnionQuery(String unionClause, boolean unionAll); + + // ===================================================================================== + // Advance + // ======= + /** + * Fetch first. + *

+ * If you invoke this, your SQL returns [fetch-size] records from first. + * If you invoke this, instance-variable[_fetchPageNumber] is initialized as one. + * + * @param fetchSize Fetch-size. (NotMinus) + * @return this. (NotNull) + */ + public ${myClassName} fetchFirst(int fetchSize); + + /** + * Fetch scope. + *

+ * If you invoke this, your SQL returns [fetch-size] records from [fetch-start-index]. + * If you invoke this, instance-variable[_fetchPageNumber] is initialized as one. + * + * @param fetchStartIndex Fetch-start-index. 0 origin. (NotMinus) + * @param fetchSize Fetch-size. (NotMinus) + * @return this. (NotNull) + */ + public ${myClassName} fetchScope(int fetchStartIndex, int fetchSize); + + /** + * Fetch page. + *

+ * When you invoke this, it is normally necessary to invoke 'fetchFirst()' or 'fetchScope()' ahead of that. + * But you also can use default-fetch-size without invoking 'fetchFirst()' or 'fetchScope()'. + * If you invoke this, your SQL returns [fetch-size] records from [fetch-start-index] calculated by [fetch-page-number]. + * + * @param fetchPageNumber Fetch-page-number. 1 origin. (NotMinus & NotZero) + * @return this. (NotNull) + */ + public ${myClassName} fetchPage(int fetchPageNumber); + + /** + * Get fetch start index. + * + * @return Fetch start index. + */ + public int getFetchStartIndex(); + + /** + * Get fetch size. + * + * @return Fetch size. + */ + public int getFetchSize(); + + /** + * Get fetch page number. + * + * @return Fetch page number. + */ + public int getFetchPageNumber(); + + /** + * Get page start index. + * + * @return Page start index. 0 origin. (NotMinus) + */ + public int getPageStartIndex(); + + /** + * Get page end index. + * + * @return Page end index. 0 origin. (NotMinus) + */ + public int getPageEndIndex(); + + /** + * Is fetch scope effective? + * + * @return Determiantion. + */ + public boolean isFetchScopeEffective(); + + /** + * Ignore fetch-scope. + * + * @return this. (NotNull) + */ + public ${myClassName} ignoreFetchScope(); + + /** + * Make fetch-scope effective. + * + * @return this. (NotNull) + */ + public ${myClassName} makeFetchScopeEffective(); + + /** + * Is fetch start index supported? + * + * @return Determination. + */ + public boolean isFetchStartIndexSupported(); + + /** + * Is fetch size supported? + * + * @return Determination. + */ + public boolean isFetchSizeSupported(); + + /** + * Is fetch-narrowing effective? + * + * @return Determiantion. + */ + public boolean isFetchNarrowingEffective(); + + /** + * Get fetch-narrowing skip-start-index. + * + * @return Skip-start-index. + */ + public int getFetchNarrowingSkipStartIndex(); + + /** + * Get fetch-narrowing loop-count. + * + * @return Loop-count. + */ + public int getFetchNarrowingLoopCount(); + + /** + * Lock for update. + *

+ * If you invoke this, your SQL lock target records for update. + * It depends whether this method supports this on the database type. + * + * @return this. (NotNull) + */ + public ${myClassName} lockForUpdate(); +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/sqlclause/SqlClause_db2.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/sqlclause/SqlClause_db2.vm 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/sqlclause/SqlClause_db2.vm 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,110 @@ +package ${glPackageBaseCommonSqlClause}; + +#set ($myClassName = "${glSqlClauseInterfaceName}Db2") + +/** + * SqlClause for DB2. + * + * @author ${database.ClassAuthor} + */ +public class ${myClassName} extends ${glSqlClauseAbstractName} { + + /** String of fetch-first as sql-suffix. */ + protected String _fetchFirstSqlSuffix = ""; + + /** String of lock as from-hint. */ + protected String _lockSqlSuffix = ""; + + /** + * Constructor. + * + * @param tableName Table name. (NotNull) + **/ + public ${myClassName}(String tableName) { + super(tableName); + } + + /** + * ${database.ImplementComment} + */ + protected void doFetchFirst() { + if (isFetchSizeSupported()) { + _fetchFirstSqlSuffix = " fetch first " + getFetchSize() + " rows only"; + } + } + + /** + * ${database.ImplementComment} {Unsupported!} + */ + protected void doFetchPage() { + if (isFetchSizeSupported()) { + if (isFetchStartIndexSupported()) { + _fetchFirstSqlSuffix = " fetch first " + getFetchSize() + " rows only"; + } else { + _fetchFirstSqlSuffix = " fetch first " + getPageEndIndex() + " rows only"; + } + } + } + + /** + * ${database.ImplementComment} {Unsupported!} + */ + protected void doClearFetchPageClause() { + _fetchFirstSqlSuffix = ""; + } + + /** + * ${database.OverrideComment} + * + * @return Determination. + */ + public boolean isFetchStartIndexSupported() { + return false; + } + + /** + * ${database.ImplementComment} + * + * @return this. (NotNull) + */ + public ${glSqlClauseInterfaceName} lockForUpdate() { + _lockSqlSuffix = " for update with RS"; + return this; + } + + /** + * ${database.ImplementComment} + * + * @return Select-hint. (NotNull) + */ + protected String createSelectHint() { + return ""; + } + + /** + * ${database.ImplementComment} + * + * @return From-base-table-hint. {select * from table [from-base-table-hint] where ...} (NotNull) + */ + protected String createFromBaseTableHint() { + return ""; + } + + /** + * ${database.ImplementComment} + * + * @return From-hint. (NotNull) + */ + protected String createFromHint() { + return ""; + } + + /** + * ${database.ImplementComment} + * + * @return Sql-suffix. (NotNull) + */ + protected String createSqlSuffix() { + return _fetchFirstSqlSuffix + _lockSqlSuffix; + } +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/sqlclause/SqlClause_default.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/sqlclause/SqlClause_default.vm 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/sqlclause/SqlClause_default.vm 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,102 @@ +package ${glPackageBaseCommonSqlClause}; + +#set ($myClassName = "${glSqlClauseInterfaceName}Default") + +/** + * SqlClause for Default. + * + * @author ${database.ClassAuthor} + */ +public class ${myClassName} extends ${glSqlClauseAbstractName} { + + /** + * Constructor. + *

+ * @param tableName Table name. (NotNull) + **/ + public ${myClassName}(String tableName) { + super(tableName); + } + + /** + * ${database.ImplementComment} + */ + protected void doFetchFirst() { + } + + /** + * ${database.ImplementComment} + */ + protected void doFetchPage() { + } + + /** + * ${database.ImplementComment} + */ + protected void doClearFetchPageClause() { + } + + /** + * ${database.OverrideComment} + * + * @return Determination. + */ + public boolean isFetchStartIndexSupported() { + return false; // Default + } + + /** + * ${database.OverrideComment} + * + * @return Determination. + */ + public boolean isFetchSizeSupported() { + return false; // Default + } + + /** + * ${database.ImplementComment} + * + * @return this. (NotNull) + */ + public ${glSqlClauseInterfaceName} lockForUpdate() { + String msg = "LockForUpdate-SQL is unsupported in the database. Sorry...: " + toString(); + throw new UnsupportedOperationException(msg); + } + + /** + * ${database.ImplementComment} + * + * @return Select-hint. (NotNull) + */ + protected String createSelectHint() { + return ""; + } + + /** + * ${database.ImplementComment} + * + * @return From-base-table-hint. {select * from table [from-base-table-hint] where ...} (NotNull) + */ + protected String createFromBaseTableHint() { + return ""; + } + + /** + * ${database.ImplementComment} + * + * @return From-hint. (NotNull) + */ + protected String createFromHint() { + return ""; + } + + /** + * ${database.ImplementComment} + * + * @return Sql-suffix. (NotNull) + */ + protected String createSqlSuffix() { + return ""; + } +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/sqlclause/SqlClause_derby.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/sqlclause/SqlClause_derby.vm 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/sqlclause/SqlClause_derby.vm 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,105 @@ +package ${glPackageBaseCommonSqlClause}; + +#set ($myClassName = "${glSqlClauseInterfaceName}Derby") + +/** + * SqlClause for Default. + * + * @author ${database.ClassAuthor} + */ +public class ${myClassName} extends ${glSqlClauseAbstractName} { + + /** String of lock as sql-suffix. */ + protected String _lockSqlSuffix = ""; + + /** + * Constructor. + *

+ * @param tableName Table name. (NotNull) + **/ + public ${myClassName}(String tableName) { + super(tableName); + } + + /** + * ${database.ImplementComment} + */ + protected void doFetchFirst() { + } + + /** + * ${database.ImplementComment} + */ + protected void doFetchPage() { + } + + /** + * ${database.ImplementComment} + */ + protected void doClearFetchPageClause() { + } + + /** + * ${database.OverrideComment} + * + * @return Determination. + */ + public boolean isFetchStartIndexSupported() { + return false; // Default + } + + /** + * ${database.OverrideComment} + * + * @return Determination. + */ + public boolean isFetchSizeSupported() { + return false; // Default + } + + /** + * ${database.ImplementComment} + * + * @return this. (NotNull) + */ + public ${glSqlClauseInterfaceName} lockForUpdate() { + _lockSqlSuffix = " for update"; + return this; + } + + /** + * ${database.ImplementComment} + * + * @return Select-hint. (NotNull) + */ + protected String createSelectHint() { + return ""; + } + + /** + * ${database.ImplementComment} + * + * @return From-base-table-hint. {select * from table [from-base-table-hint] where ...} (NotNull) + */ + protected String createFromBaseTableHint() { + return ""; + } + + /** + * ${database.ImplementComment} + * + * @return From-hint. (NotNull) + */ + protected String createFromHint() { + return ""; + } + + /** + * ${database.ImplementComment} + * + * @return Sql-suffix. (NotNull) + */ + protected String createSqlSuffix() { + return _lockSqlSuffix; + } +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/sqlclause/SqlClause_firebird.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/sqlclause/SqlClause_firebird.vm 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/sqlclause/SqlClause_firebird.vm 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,103 @@ +package ${glPackageBaseCommonSqlClause}; + +#set ($myClassName = "${glSqlClauseInterfaceName}Firebird") + +/** + * SqlClause for Firebird. + * + * @author ${database.ClassAuthor} + */ +public class ${myClassName} extends ${glSqlClauseAbstractName} { + + /** String of fetch-scope as select-hint. */ + protected String _fetchScopeSelectHint = ""; + + /** String of lock as sql-suffix. */ + protected String _lockSqlSuffix = ""; + + /** + * Constructor. + * + * @param tableName Table name. (NotNull) + **/ + public ${myClassName}(String tableName) { + super(tableName); + } + + /** + * ${database.ImplementComment} + */ + protected void doFetchFirst() { + if (isFetchSizeSupported()) { + _fetchScopeSelectHint = " first " + getFetchSize(); + } + } + + /** + * ${database.ImplementComment} + */ + protected void doFetchPage() { + if (isFetchStartIndexSupported() && isFetchSizeSupported()) { + _fetchScopeSelectHint = " first " + getFetchSize() + " skip " + getPageStartIndex(); + } + if (isFetchStartIndexSupported() && !isFetchSizeSupported()) { + _fetchScopeSelectHint = " skip " + getPageStartIndex(); + } + if (!isFetchStartIndexSupported() && isFetchSizeSupported()) { + _fetchScopeSelectHint = " first " + getPageEndIndex(); + } + } + + /** + * ${database.ImplementComment} + */ + protected void doClearFetchPageClause() { + _fetchScopeSelectHint = ""; + } + + /** + * ${database.ImplementComment} + * + * @return this. (NotNull) + */ + public ${glSqlClauseInterfaceName} lockForUpdate() { + _lockSqlSuffix = " for update with lock"; + return this; + } + + /** + * ${database.ImplementComment} + * + * @return Select-hint. (NotNull) + */ + protected String createSelectHint() { + return _fetchScopeSelectHint; + } + + /** + * ${database.ImplementComment} + * + * @return From-base-table-hint. {select * from table [from-base-table-hint] where ...} (NotNull) + */ + protected String createFromBaseTableHint() { + return ""; + } + + /** + * ${database.ImplementComment} + * + * @return From-hint. (NotNull) + */ + protected String createFromHint() { + return ""; + } + + /** + * ${database.ImplementComment} + * + * @return Sql-suffix. (NotNull) + */ + protected String createSqlSuffix() { + return _lockSqlSuffix; + } +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/sqlclause/SqlClause_interbase.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/sqlclause/SqlClause_interbase.vm 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/sqlclause/SqlClause_interbase.vm 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,103 @@ +package ${glPackageBaseCommonSqlClause}; + +#set ($myClassName = "${glSqlClauseInterfaceName}Interbase") + +/** + * SqlClause for Interbase. + * + * @author ${database.ClassAuthor} + */ +public class ${myClassName} extends ${glSqlClauseAbstractName} { + + /** String of fetch-scope as select-hint. */ + protected String _fetchScopeSelectHint = ""; + + /** String of lock as sql-suffix. */ + protected String _lockSqlSuffix = ""; + + /** + * Constructor. + * + * @param tableName Table name. (NotNull) + **/ + public ${myClassName}(String tableName) { + super(tableName); + } + + /** + * ${database.ImplementComment} + */ + protected void doFetchFirst() { + if (isFetchSizeSupported()) { + _fetchScopeSelectHint = " first " + getFetchSize(); + } + } + + /** + * ${database.ImplementComment} + */ + protected void doFetchPage() { + if (isFetchStartIndexSupported() && isFetchSizeSupported()) { + _fetchScopeSelectHint = " first " + getFetchSize() + " skip " + getPageStartIndex(); + } + if (isFetchStartIndexSupported() && !isFetchSizeSupported()) { + _fetchScopeSelectHint = " skip " + getPageStartIndex(); + } + if (!isFetchStartIndexSupported() && isFetchSizeSupported()) { + _fetchScopeSelectHint = " first " + getPageEndIndex(); + } + } + + /** + * ${database.ImplementComment} + */ + protected void doClearFetchPageClause() { + _fetchScopeSelectHint = ""; + } + + /** + * ${database.ImplementComment} + * + * @return this. (NotNull) + */ + public ${glSqlClauseInterfaceName} lockForUpdate() { + _lockSqlSuffix = " for update with lock"; + return this; + } + + /** + * ${database.ImplementComment} + * + * @return Select-hint. (NotNull) + */ + protected String createSelectHint() { + return _fetchScopeSelectHint; + } + + /** + * ${database.ImplementComment} + * + * @return From-base-table-hint. {select * from table [from-base-table-hint] where ...} (NotNull) + */ + protected String createFromBaseTableHint() { + return ""; + } + + /** + * ${database.ImplementComment} + * + * @return From-hint. (NotNull) + */ + protected String createFromHint() { + return ""; + } + + /** + * ${database.ImplementComment} + * + * @return Sql-suffix. (NotNull) + */ + protected String createSqlSuffix() { + return _lockSqlSuffix; + } +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/sqlclause/SqlClause_mssql.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/sqlclause/SqlClause_mssql.vm 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/sqlclause/SqlClause_mssql.vm 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,110 @@ +package ${glPackageBaseCommonSqlClause}; + +#set ($myClassName = "${glSqlClauseInterfaceName}SqlServer") + +/** + * SqlClause for MSSQL. + * + * @author ${database.ClassAuthor} + */ +public class ${myClassName} extends ${glSqlClauseAbstractName} { + + /** String of fetch-first as select-hint. */ + protected String _fetchFirstSelectHint = ""; + + /** String of lock as from-hint. */ + protected String _lockFromHint = ""; + + /** + * Constructor. + * + * @param tableName Table name. (NotNull) + **/ + public ${myClassName}(String tableName) { + super(tableName); + } + + /** + * ${database.ImplementComment} + */ + protected void doFetchFirst() { + if (isFetchSizeSupported()) { + _fetchFirstSelectHint = " top " + getFetchSize(); + } + } + + /** + * ${database.ImplementComment} + */ + protected void doFetchPage() { + if (isFetchSizeSupported()) { + if (isFetchStartIndexSupported()) { + _fetchFirstSelectHint = " top " + getFetchSize(); + } else { + _fetchFirstSelectHint = " top " + getPageEndIndex(); + } + } + } + + /** + * ${database.ImplementComment} + */ + protected void doClearFetchPageClause() { + _fetchFirstSelectHint = ""; + } + + /** + * ${database.OverrideComment} + * + * @return Determination. + */ + public boolean isFetchStartIndexSupported() { + return false; + } + + /** + * ${database.ImplementComment} {Implement} + * + * @return this. (NotNull) + */ + public ${glSqlClauseInterfaceName} lockForUpdate() { + _lockFromHint = " with (updlock)"; + return this; + } + + /** + * ${database.ImplementComment} + * + * @return Select-hint. (NotNull) + */ + protected String createSelectHint() { + return _fetchFirstSelectHint; + } + + /** + * ${database.ImplementComment} + * + * @return From-base-table-hint. {select * from table [from-base-table-hint] where ...} (NotNull) + */ + protected String createFromBaseTableHint() { + return _lockFromHint; + } + + /** + * ${database.ImplementComment} + * + * @return From-hint. (NotNull) + */ + protected String createFromHint() { + return ""; + } + + /** + * ${database.ImplementComment} + * + * @return Sql-suffix. (NotNull) + */ + protected String createSqlSuffix() { + return ""; + } +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/sqlclause/SqlClause_mysql.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/sqlclause/SqlClause_mysql.vm 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/sqlclause/SqlClause_mysql.vm 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,93 @@ +package ${glPackageBaseCommonSqlClause}; + +#set ($myClassName = "${glSqlClauseInterfaceName}MySql") + +/** + * SqlClause for MySQL. + * + * @author ${database.ClassAuthor} + */ +public class ${myClassName} extends ${glSqlClauseAbstractName} { + + /** String of fetch-scope as sql-suffix. */ + protected String _fetchScopeSqlSuffix = ""; + + /** String of lock as sql-suffix. */ + protected String _lockSqlSuffix = ""; + + /** + * Constructor. + *

+ * @param tableName Table name. (NotNull) + **/ + public ${myClassName}(String tableName) { + super(tableName); + } + + /** + * ${database.ImplementComment} + */ + protected void doFetchFirst() { + doFetchPage(); + } + + /** + * ${database.ImplementComment} + */ + protected void doFetchPage() { + _fetchScopeSqlSuffix = " limit " + getPageStartIndex() + ", " + getFetchSize(); + } + + /** + * ${database.ImplementComment} + */ + protected void doClearFetchPageClause() { + _fetchScopeSqlSuffix = ""; + } + + /** + * ${database.ImplementComment} + * + * @return this. (NotNull) + */ + public ${glSqlClauseInterfaceName} lockForUpdate() { + _lockSqlSuffix = " for update"; + return this; + } + + /** + * ${database.ImplementComment} + * + * @return Select-hint. (NotNull) + */ + protected String createSelectHint() { + return ""; + } + + /** + * ${database.ImplementComment} + * + * @return From-base-table-hint. {select * from table [from-base-table-hint] where ...} (NotNull) + */ + protected String createFromBaseTableHint() { + return ""; + } + + /** + * ${database.ImplementComment} + * + * @return From-hint. (NotNull) + */ + protected String createFromHint() { + return ""; + } + + /** + * ${database.ImplementComment} + * + * @return Sql-suffix. (NotNull) + */ + protected String createSqlSuffix() { + return _fetchScopeSqlSuffix + _lockSqlSuffix; + } +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/sqlclause/SqlClause_oracle.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/sqlclause/SqlClause_oracle.vm 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/sqlclause/SqlClause_oracle.vm 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,114 @@ +package ${glPackageBaseCommonSqlClause}; + +#set ($myClassName = "${glSqlClauseInterfaceName}Oracle") + +/** + * SqlClause for Oracle. + * + * @author ${database.ClassAuthor} + */ +public class ${myClassName} extends ${glSqlClauseAbstractName} { + + /** String of fetch-scope as select-hint. */ + protected String _fetchScopeSelectHint = ""; + + /** String of fetch-scope as sql-suffix. */ + protected String _fetchScopeSqlSuffix = ""; + + /** String of lock as sql-suffix. */ + protected String _lockSqlSuffix = ""; + + /** + * Constructor. + * + * @param tableName Table name. (NotNull) + **/ + public ${myClassName}(String tableName) { + super(tableName); + } + + /** + * ${database.ImplementComment} + */ + protected void doFetchFirst() { + if (isFetchSizeSupported()) { + _fetchScopeSelectHint = " * from (select"; + _fetchScopeSqlSuffix = ") where rownum <= " + getFetchSize(); + } + } + + /** + * ${database.ImplementComment} + */ + protected void doFetchPage() { + if (!isFetchStartIndexSupported() && !isFetchSizeSupported()) { + return; + } + _fetchScopeSelectHint = " * from (select base.*, rownum as rn from (select"; + _fetchScopeSqlSuffix = ""; + if (isFetchStartIndexSupported()) { + _fetchScopeSqlSuffix = ") base ) where rn > " + getPageStartIndex(); + } + if (isFetchSizeSupported()) { + if (isFetchStartIndexSupported()) { + _fetchScopeSqlSuffix = _fetchScopeSqlSuffix + " and rn <= " + getPageEndIndex(); + } else { + _fetchScopeSqlSuffix = ") base ) where rn <= " + getPageEndIndex(); + } + } + } + + /** + * ${database.ImplementComment} + */ + protected void doClearFetchPageClause() { + _fetchScopeSelectHint = ""; + _fetchScopeSqlSuffix = ""; + } + + /** + * ${database.ImplementComment} + * + * @return this. (NotNull) + */ + public ${glSqlClauseInterfaceName} lockForUpdate() { + _lockSqlSuffix = " for update"; + return this; + } + + /** + * ${database.ImplementComment} + * + * @return Select-hint. (NotNull) + */ + protected String createSelectHint() { + return _fetchScopeSelectHint; + } + + /** + * ${database.ImplementComment} + * + * @return From-base-table-hint. {select * from table [from-base-table-hint] where ...} (NotNull) + */ + protected String createFromBaseTableHint() { + return ""; + } + + /** + * ${database.ImplementComment} + * + * @return From-hint. (NotNull) + */ + protected String createFromHint() { + return ""; + } + + /** + * ${database.ImplementComment} + * + * @return Sql-suffix. (NotNull) + */ + protected String createSqlSuffix() { + return _fetchScopeSqlSuffix + _lockSqlSuffix; + } +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/sqlclause/SqlClause_postgresql.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/sqlclause/SqlClause_postgresql.vm 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/cbean/sqlclause/SqlClause_postgresql.vm 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,93 @@ +package ${glPackageBaseCommonSqlClause}; + +#set ($myClassName = "${glSqlClauseInterfaceName}PostgreSql") + +/** + * SqlClause for PostreSQL. + * + * @author ${database.ClassAuthor} + */ +public class ${myClassName} extends ${glSqlClauseAbstractName} { + + /** String of fetch-scope as sql-suffix. */ + protected String _fetchScopeSqlSuffix = ""; + + /** String of lock as sql-suffix. */ + protected String _lockSqlSuffix = ""; + + /** + * Constructor. + * + * @param tableName Table name. (NotNull) + **/ + public ${myClassName}(String tableName) { + super(tableName); + } + + /** + * ${database.ImplementComment} + */ + protected void doFetchFirst() { + doFetchPage(); + } + + /** + * ${database.ImplementComment} + */ + protected void doFetchPage() { + _fetchScopeSqlSuffix = " offset " + getPageStartIndex() + " limit " + getFetchSize(); + } + + /** + * ${database.ImplementComment} + */ + protected void doClearFetchPageClause() { + _fetchScopeSqlSuffix = ""; + } + + /** + * ${database.ImplementComment} + * + * @return this. (NotNull) + */ + public ${glSqlClauseInterfaceName} lockForUpdate() { + _lockSqlSuffix = " for update"; + return this; + } + + /** + * ${database.ImplementComment} + * + * @return Select-hint. (NotNull) + */ + protected String createSelectHint() { + return ""; + } + + /** + * ${database.ImplementComment} + * + * @return From-base-table-hint. {select * from table [from-base-table-hint] where ...} (NotNull) + */ + protected String createFromBaseTableHint() { + return ""; + } + + /** + * ${database.ImplementComment} + * + * @return From-hint. (NotNull) + */ + protected String createFromHint() { + return ""; + } + + /** + * ${database.ImplementComment} + * + * @return Sql-suffix. (NotNull) + */ + protected String createSqlSuffix() { + return _fetchScopeSqlSuffix + _lockSqlSuffix; + } +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/dbmeta/AbstractDBMeta.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/dbmeta/AbstractDBMeta.vm 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/dbmeta/AbstractDBMeta.vm 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,608 @@ +package ${glPackageBaseCommonDBMeta}; + +#set ($myClassName = "${glDBMetaAbstractName}") + +import ${glPackageBaseCommon}.${glEntityInterfaceName}; +import ${glPackageBaseCommonHelper}.${glMapListStringName}; +import ${glPackageBaseCommonHelper}.${glMapListStringImplName}; +import ${glPackageBaseCommonHelper}.${glMapStringBuilderName}; +import ${glPackageBaseCommonHelper}.${glMapStringBuilderImplName}; + +/** + * The abstract class of dbmeta. + * + * @author ${database.ClassAuthor} + */ +public abstract class ${myClassName} implements ${glDBMetaInterfaceName} { + + // ===================================================================================== + // Name Handling + // ============= + /** + * ${database.ImplementComment} + * + * @param dbName Db-name. (NotNull) + * @return Determination. + */ + public boolean isExistDbName(String dbName) { + return getDbNameCapPropNameMap().containsKey(dbName); + } + + /** + * ${database.ImplementComment} + * + * @param capPropName Cap-prop-name. (NotNull) + * @return Determination. + */ + public boolean isExistCapPropName(String capPropName) { + return getCapPropNameDbNameMap().containsKey(capPropName); + } + + /** + * ${database.ImplementComment} + * + * @param uncapPropName Uncap-prop-name. (NotNull) + * @return Determination. + */ + public boolean isExistUncapPropName(String uncapPropName) { + return getUncapPropNameDbNameMap().containsKey(uncapPropName); + } + + /// + /// ${database.ImplementComment} + /// + /// Multi-name. + /// Determination. + public boolean isExistMultiName(String multiName) { + if (isExistDbName(multiName)) { + return true; + } + if (isExistCapPropName(multiName)) { + return true; + } + if (isExistUncapPropName(multiName)) { + return true; + } + return false; + } + + /** + * ${database.ImplementComment} + * + * @param capPropName Cap-prop-name. (NotNull) + * @return Db-name. (NotNull) + */ + public String getDbNameByCapPropName(String capPropName) { + assertStringNotNullAndNotTrimmedEmpty("capPropName", capPropName); + final String dbName = (String)getCapPropNameDbNameMap().get(capPropName); + if (dbName == null) { + String msg = "The capPropNameDbNameMap didn't contain the key of '" + capPropName + "': "; + throw new IllegalStateException(msg + getCapPropNameDbNameMap()); + } + return dbName; + } + + /** + * ${database.ImplementComment} + * + * @param uncapPropName Uncap-prop-name. (NotNull) + * @return {db-name : java-name} map. (NotNull) + */ + public String getDbNameByUncapPropName(String uncapPropName) { + assertStringNotNullAndNotTrimmedEmpty("uncapPropName", uncapPropName); + final String dbName = (String)getUncapPropNameDbNameMap().get(uncapPropName); + if (dbName == null) { + String msg = "The uncapPropNameDbNameMap didn't contain the key of '" + uncapPropName + "': "; + throw new IllegalStateException(msg + getUncapPropNameDbNameMap()); + } + return dbName; + } + + /** + * ${database.ImplementComment} + * + * @param dbName Db-name. (NotNull) + * @return Cap-prop-name. (NotNull) + */ + public String getCapPropNameByDbName(String dbName) { + assertStringNotNullAndNotTrimmedEmpty("dbName", dbName); + final String capPropName = (String)getDbNameCapPropNameMap().get(dbName); + if (capPropName == null) { + String msg = "The dbNameCapPropNameMap didn't contain the key of '" + dbName + "': "; + throw new IllegalStateException(msg + getDbNameCapPropNameMap()); + } + return capPropName; + } + + /** + * ${database.ImplementComment} + * + * @param uncapPropName Uncap-prop-name. (NotNull) + * @return Cap-prop-name. (NotNull) + */ + public String getCapPropNameByUncapPropName(String uncapPropName) { + assertStringNotNullAndNotTrimmedEmpty("uncapPropName", uncapPropName); + final String dbName = getDbNameByMultiName(uncapPropName); + final String capPropName = (String)getDbNameCapPropNameMap().get(dbName); + if (capPropName == null) { + String msg = "The dbNameCapPropNameMap didn't contain the key of '" + dbName + "': "; + throw new IllegalStateException(msg + getDbNameCapPropNameMap()); + } + return capPropName; + } + + /** + * ${database.ImplementComment} + * + * @param dbName Db-name. (NotNull) + * @return Uncap-prop-name. (NotNull) + */ + public String getUncapPropNameByDbName(String dbName) { + assertStringNotNullAndNotTrimmedEmpty("dbName", dbName); + final String uncapPropName = (String)getDbNameUncapPropNameMap().get(dbName); + if (uncapPropName == null) { + String msg = "The dbNameUncapPropNameMap didn't contain the key of '" + dbName + "': "; + throw new IllegalStateException(msg + getDbNameUncapPropNameMap()); + } + return uncapPropName; + } + + /** + * ${database.ImplementComment} + * + * @param capPropName Cap-prop-name. (NotNull) + * @return Uncap-prop-name. (NotNull) + */ + public String getUncapPropNameByCapPropName(String capPropName) { + assertStringNotNullAndNotTrimmedEmpty("capPropName", capPropName); + final String dbName = getDbNameByMultiName(capPropName); + final String uncapPropName = (String)getDbNameUncapPropNameMap().get(dbName); + if (uncapPropName == null) { + String msg = "The dbNameUncapPropNameMap didn't contain the key of '" + capPropName + "': "; + throw new IllegalStateException(msg + getDbNameUncapPropNameMap()); + } + return uncapPropName; + } + + /** + * ${database.ImplementComment} + * + * @param multiName Multi-name. (NotNull) + * @return Db-name. (NotNull) + */ + public String getDbNameByMultiName(String multiName) { + assertStringNotNullAndNotTrimmedEmpty("multiName", multiName); + if (isExistDbName(multiName)) { + return multiName; + } + if (isExistCapPropName(multiName)) { + return getDbNameByCapPropName(multiName); + } + if (isExistUncapPropName(multiName)) { + return getDbNameByUncapPropName(multiName); + } + String msg = "The multi-name is invalid: multiName=" + multiName; + throw new IllegalStateException(msg); + } + + /** + * Get java-name by multi-name. + * + * @param multiName Multi-name. + * @return Cap-prop-name. + */ + public String getCapPropNameByMultiName(String multiName) { + assertStringNotNullAndNotTrimmedEmpty("multiName", multiName); + if (isExistDbName(multiName)) { + return getCapPropNameByDbName(multiName); + } + if (isExistCapPropName(multiName)) { + return multiName; + } + if (isExistUncapPropName(multiName)) { + return getCapPropNameByUncapPropName(multiName); + } + String msg = "The multi-name is invalid: multiName=" + multiName; + throw new IllegalStateException(msg); + } + + /** + * Get property-name by multi-name. + * + * @param multiName Multi-name. + * @return Uncap-prop-name. + */ + public String getUncapPropNameByMultiName(String multiName) { + assertStringNotNullAndNotTrimmedEmpty("multiName", multiName); + if (isExistDbName(multiName)) { + return getUncapPropNameByDbName(multiName); + } + if (isExistCapPropName(multiName)) { + return getUncapPropNameByCapPropName(multiName); + } + if (isExistUncapPropName(multiName)) { + return multiName; + } + String msg = "The multi-name is invalid: multiName=" + multiName; + throw new IllegalStateException(msg); + } + + // =================================================================================== + // JDBC Support + // ============ + public int insertEntity(java.sql.Connection conn, ${glEntityInterfaceName} entity) { + return insertEntity(conn, entity, ""); + } + + public int insertEntity(java.sql.Connection conn, ${glEntityInterfaceName} entity, String tablePrefix) { + checkDowncast(entity); + final String sql = getPreparedInsertClause(tablePrefix); + java.sql.PreparedStatement ps = null; + try { + ps = conn.prepareStatement(sql); + final java.util.List${database.filterGenericsString('Object')} valueList = convertToColumnValueList(entity); + int settingIndex = 1; + for (final java.util.Iterator ite = valueList.iterator(); ite.hasNext(); ) { + Object value = ite.next(); + if (value == null) { + ps.setNull(settingIndex, java.sql.Types.VARCHAR); + } else { + ps.setObject(settingIndex, value); + } + ++settingIndex; + } + return ps.executeUpdate(); + } catch (java.sql.SQLException e) { + String msg = "The sql threw the exception: sql=" + sql; + throw new IllegalStateException(msg, e); + } finally { + if (ps != null) { + try { + ps.close(); + } catch (java.sql.SQLException ignored) { + } + } + } + } + + // =================================================================================== + // Map String + // ========== + public ${glMapListStringName} createMapListString() { + return MapStringUtil.createMapListString(); + } + + public ${glMapStringBuilderName} createMapStringBuilder() { + return MapStringUtil.createMapStringBuilder(getColumnDbNameList()); + } + + // =================================================================================== + // Util Class + // ========== + /** + * This class is for Internal. Don't use this! + */ + protected static class MapStringUtil { + public static void acceptPrimaryKeyMapString(String primaryKeyMapString, ${glEntityInterfaceName} entity) { + if (primaryKeyMapString == null) { + String msg = "The argument[primaryKeyMapString] should not be null."; + throw new IllegalArgumentException(msg); + } + final String prefix = MAP_STRING_MAP_MARK + MAP_STRING_START_BRACE; + final String suffix = MAP_STRING_END_BRACE; + if (!primaryKeyMapString.trim().startsWith(prefix)) { + primaryKeyMapString = prefix + primaryKeyMapString; + } + if (!primaryKeyMapString.trim().endsWith(suffix)) { + primaryKeyMapString = primaryKeyMapString + suffix; + } + ${glMapListStringName} mapListString = createMapListString(); + entity.getDBMeta().acceptPrimaryKeyMap(entity, mapListString.generateMap(primaryKeyMapString)); + } + + public static void acceptColumnValueMapString(String columnValueMapString, ${glEntityInterfaceName} entity) { + if (columnValueMapString == null) { + String msg = "The argument[columnValueMapString] should not be null."; + throw new IllegalArgumentException(msg); + } + final String prefix = MAP_STRING_MAP_MARK + MAP_STRING_START_BRACE; + final String suffix = MAP_STRING_END_BRACE; + if (!columnValueMapString.trim().startsWith(prefix)) { + columnValueMapString = prefix + columnValueMapString; + } + if (!columnValueMapString.trim().endsWith(suffix)) { + columnValueMapString = columnValueMapString + suffix; + } + ${glMapListStringName} mapListString = createMapListString(); + entity.getDBMeta().acceptColumnValueMap(entity, mapListString.generateMap(columnValueMapString)); + } + + public static String extractPrimaryKeyMapString(${glEntityInterfaceName} entity) { + final String startBrace = MAP_STRING_START_BRACE; + final String endBrace = MAP_STRING_END_BRACE; + final String delimiter = MAP_STRING_DELIMITER; + final String equal = MAP_STRING_EQUAL; + return entity.getDBMeta().extractPrimaryKeyMapString(entity, startBrace, endBrace, delimiter, equal); + } + + public static String extractColumnValueMapString(${glEntityInterfaceName} entity) { + final String startBrace = MAP_STRING_START_BRACE; + final String endBrace = MAP_STRING_END_BRACE; + final String delimiter = MAP_STRING_DELIMITER; + final String equal = MAP_STRING_EQUAL; + return entity.getDBMeta().extractColumnValueMapString(entity, startBrace, endBrace, delimiter, equal); + } + + public static void checkTypeString(Object value, String propertyName, String typeName) { + if (value == null) { + throw new IllegalArgumentException("The value should not be null: " + propertyName); + } + if (!(value instanceof String)) { + String msg = "The value of " + propertyName + " should be " + typeName + " or String: "; + msg = msg + "valueType=" + value.getClass() + " value=" + value; + throw new IllegalArgumentException(msg); + } + } + + public static long parseDateStringAsMillis(Object value, String propertyName, String typeName) { + checkTypeString(value, propertyName, typeName); + try { + final String valueString = (String)value; + if (valueString.indexOf("-") >= 0 && valueString.indexOf("-") != valueString.lastIndexOf("-")) { + return java.sql.Timestamp.valueOf(valueString).getTime(); + } else { + return getParseDateFormat().parse((String)value).getTime(); + } + } catch (java.text.ParseException e) { + String msg = "The value of " + propertyName + " should be " + typeName + ". but: " + value; + throw new RuntimeException(msg + " threw the exception: value=[" + value + "]", e); + } catch (RuntimeException e) { + String msg = "The value of " + propertyName + " should be " + typeName + ". but: " + value; + throw new RuntimeException(msg + " threw the exception: value=[" + value + "]", e); + } + } + + public static String formatDate(java.util.Date value) { + return getFormatDateFormat().format(value); + } + + public static String formatTimestamp(java.sql.Timestamp value) { + return getFormatDateFormat().format(value); + } + + public static java.text.DateFormat getParseDateFormat() { + return java.text.DateFormat.getDateTimeInstance(); + } + + public static java.text.DateFormat getFormatDateFormat() { + return new java.text.SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS"); + } + + public static ${glMapListStringName} createMapListString() { + final ${glMapListStringName} mapListString = new ${glMapListStringImplName}(); + mapListString.setMapMark(MAP_STRING_MAP_MARK); + mapListString.setListMark(MAP_STRING_LIST_MARK); + mapListString.setStartBrace(MAP_STRING_START_BRACE); + mapListString.setEndBrace(MAP_STRING_END_BRACE); + mapListString.setEqual(MAP_STRING_EQUAL); + mapListString.setDelimiter(MAP_STRING_DELIMITER); + return mapListString; + } + + public static ${glMapStringBuilderName} createMapStringBuilder(java.util.List${database.filterGenericsString('String')} columnNameList) { + ${glMapStringBuilderName} mapStringBuilder = new ${glMapStringBuilderImplName}(); + mapStringBuilder.setMsMapMark(MAP_STRING_MAP_MARK); + mapStringBuilder.setMsStartBrace(MAP_STRING_START_BRACE); + mapStringBuilder.setMsEndBrace(MAP_STRING_END_BRACE); + mapStringBuilder.setMsEqual(MAP_STRING_EQUAL); + mapStringBuilder.setMsDelimiter(MAP_STRING_DELIMITER); + mapStringBuilder.setColumnNameList(columnNameList); + return mapStringBuilder; + } + } + + /** + * This class is for Internal. Don't use this! + */ + protected static class MapAssertUtil { + public static void assertPrimaryKeyMapNotNullAndNotEmpty(java.util.Map${database.filterGenericsString('String, ? extends Object')} primaryKeyMap) { + if (primaryKeyMap == null) { + String msg = "The argument[primaryKeyMap] should not be null."; + throw new IllegalArgumentException(msg); + } + if (primaryKeyMap.isEmpty()) { + String msg = "The argument[primaryKeyMap] should not be empty."; + throw new IllegalArgumentException(msg); + } + } + public static void assertColumnExistingInPrimaryKeyMap(java.util.Map${database.filterGenericsString('String, ? extends Object')} primaryKeyMap, String columnName) { + if (!primaryKeyMap.containsKey(columnName)) { + String msg = "The primaryKeyMap must have the value of " + columnName; + throw new IllegalStateException(msg + ": primaryKeyMap --> " + primaryKeyMap); + } + } + public static void assertColumnValueMapNotNullAndNotEmpty(java.util.Map${database.filterGenericsString('String, ? extends Object')} columnValueMap) { + if (columnValueMap == null) { + String msg = "The argument[columnValueMap] should not be null."; + throw new IllegalArgumentException(msg); + } + if (columnValueMap.isEmpty()) { + String msg = "The argument[columnValueMap] should not be empty."; + throw new IllegalArgumentException(msg); + } + } + } + +#if ($database.isAvailableGenerics()) + + /** + * This class is for Internal. Don't use this! + */ + protected static class MapStringValueAnalyzer { + protected java.util.Map _valueMap; + protected java.util.Set _modifiedPropertyNames; + protected String _columnName; + protected String _uncapPropName; + protected String _propertyName; + + public MapStringValueAnalyzer(java.util.Map valueMap, java.util.Set modifiedPropertyNames) { + this._valueMap = valueMap; + this._modifiedPropertyNames = modifiedPropertyNames; + } + + public boolean init(String columnName, String uncapPropName, String propertyName) { + this._columnName = columnName; + this._uncapPropName = uncapPropName; + this._propertyName = propertyName; + return _valueMap.containsKey(_columnName); + } + + public COLUMN_TYPE analyzeString(Class javaType) { + final Object obj = _valueMap.get(_columnName); + if (obj == null) { + _modifiedPropertyNames.remove(_propertyName); + return null; + } + helpCheckingTypeString(obj, _uncapPropName, javaType.getName()); + return (COLUMN_TYPE)obj; + } + + public COLUMN_TYPE analyzeNumber(Class javaType) { + final Object obj = _valueMap.get(_columnName); + if (obj == null) { + _modifiedPropertyNames.remove(_propertyName); + return null; + } + if (javaType.isAssignableFrom(obj.getClass())) { + return (COLUMN_TYPE)obj; + } + return (COLUMN_TYPE)newInstanceByConstructor(javaType, String.class, obj.toString()); + } + + public COLUMN_TYPE analyzeDate(Class javaType) { + final Object obj = _valueMap.get(_columnName); + if (obj == null) { + _modifiedPropertyNames.remove(_propertyName); + return null; + } + if (javaType.isAssignableFrom(obj.getClass())) { + return (COLUMN_TYPE)obj; + } + return (COLUMN_TYPE)newInstanceByConstructor(javaType, long.class, helpParsingDateString(obj, _uncapPropName, javaType.getName())); + } + + public COLUMN_TYPE analyzeOther(Class javaType) { + final Object obj = _valueMap.get(_columnName); + if (obj == null) { + _modifiedPropertyNames.remove(_propertyName); + return null; + } + return (COLUMN_TYPE)obj; + } + + private void helpCheckingTypeString(Object value, String uncapPropName, String typeName) { + MapStringUtil.checkTypeString(value, uncapPropName, typeName); + } + + private long helpParsingDateString(Object value, String uncapPropName, String typeName) { + return MapStringUtil.parseDateStringAsMillis(value, uncapPropName, typeName); + } + + protected Object newInstanceByConstructor(Class targetType, Class argType, Object arg) { + java.lang.reflect.Constructor constructor; + try { + constructor = targetType.getConstructor(new Class[]{argType}); + } catch (SecurityException e) { + String msg = "targetType=" + targetType + " argType=" + argType + " arg=" + arg; + throw new RuntimeException(msg, e); + } catch (NoSuchMethodException e) { + String msg = "targetType=" + targetType + " argType=" + argType + " arg=" + arg; + throw new RuntimeException(msg, e); + } + try { + return constructor.newInstance(new Object[]{arg}); + } catch (IllegalArgumentException e) { + String msg = "targetType=" + targetType + " argType=" + argType + " arg=" + arg; + throw new RuntimeException(msg, e); + } catch (InstantiationException e) { + String msg = "targetType=" + targetType + " argType=" + argType + " arg=" + arg; + throw new RuntimeException(msg, e); + } catch (IllegalAccessException e) { + String msg = "targetType=" + targetType + " argType=" + argType + " arg=" + arg; + throw new RuntimeException(msg, e); + } catch (java.lang.reflect.InvocationTargetException e) { + String msg = "targetType=" + targetType + " argType=" + argType + " arg=" + arg; + throw new RuntimeException(msg, e); + } + } + } + +#end + + // ===================================================================================== + // Helper + // ====== + abstract protected void checkDowncast(${glEntityInterfaceName} entity); + + protected String helpGettingColumnStringValue(Object value) { + if (value instanceof java.sql.Timestamp) { + return (value != null ? helpFormatingTimestamp((java.sql.Timestamp)value) : ""); + } else if (value instanceof java.util.Date) { + return (value != null ? helpFormatingDate((java.util.Date)value) : ""); + } else { + return (value != null ? value.toString() : ""); + } + } + + protected String helpFormatingDate(java.util.Date date) { + return MapStringUtil.formatDate(date); + } + + protected String helpFormatingTimestamp(java.sql.Timestamp timestamp) { + return MapStringUtil.formatTimestamp(timestamp); + } + + // ---------------------------------------------------------------- + // Assert Object + // ------------- + /** + * Assert that the argument is not null. + * + * @param variableName Variable name. (NotNull) + * @param arg Argument. (NotNull) + */ + protected void assertObjectNotNull(String variableName, Object arg) { + if (variableName == null) { + String msg = "Argument[variableName] should not be null."; + throw new IllegalArgumentException(msg); + } + if (arg == null) { + String msg = "Argument[" + variableName + "] should not be null."; + throw new IllegalArgumentException(msg); + } + } + + // ---------------------------------------------------------------- + // Assert String + // ------------- + /** + * Assert that the string is not null and not trimmed empty. + * + * @param variableName Variable name. (NotNull) + * @param value Value. (NotNull) + */ + protected void assertStringNotNullAndNotTrimmedEmpty(String variableName, String value) { + if (variableName == null) { + String msg = "Variable[variableName] should not be null."; + throw new IllegalArgumentException(msg); + } + if (value == null) { + String msg = "Variable[" + variableName + "] should not be null."; + throw new IllegalArgumentException(msg); + } + if (value.trim().length() == 0) { + String msg = "Variable[" + variableName + "] should not be empty: [" + value + "]"; + throw new IllegalArgumentException(msg); + } + } +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/dbmeta/DBMeta.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/dbmeta/DBMeta.vm 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/dbmeta/DBMeta.vm 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,473 @@ +package ${glPackageBaseCommonDBMeta}; + +#set ($myClassName = "${glDBMetaInterfaceName}") + +import ${glPackageBaseCommon}.${glEntityInterfaceName}; +import ${glPackageBaseCommonHelper}.${glMapListStringName}; +import ${glPackageBaseCommonHelper}.${glMapStringBuilderName}; + +/** + * The interface of dbmeta. + * + * @author ${database.ClassAuthor} + */ +public interface ${myClassName} { + + // =================================================================================== + // Definition + // ========== + /** Map-string map-mark. */ + public static final String MAP_STRING_MAP_MARK = "map:"; + + /** Map-string list-mark. */ + public static final String MAP_STRING_LIST_MARK = "list:"; + + /** Map-string start-brace. */ + public static final String MAP_STRING_START_BRACE = "${database.extractAcceptStartBrace}"; + + /** Map-string end-brace. */ + public static final String MAP_STRING_END_BRACE = "${database.extractAcceptEndBrace}"; + + /** Map-string delimiter. */ + public static final String MAP_STRING_DELIMITER = "${database.extractAcceptDelimiter}"; + + /** Map-string equal. */ + public static final String MAP_STRING_EQUAL = "${database.extractAcceptEqual}"; + + // =================================================================================== + // Table Name + // ========== + /** + * Get table db-name. + * + * @return Table db-name. (NotNull) + */ + public String getTableDbName(); + + /** + * Get table cap-prop-name. + * + * @return Table cap-prop-name. (NotNull) + */ + public String getTableCapPropName(); + + /** + * Get table uncap-prop-name. + * + * @return Table uncap-prop-name. (NotNull) + */ + public String getTableUncapPropName(); + + // =================================================================================== + // Column Name + // =========== + public java.util.List${database.filterGenericsString('String')} getColumnDbNameList(); + + public java.util.List${database.filterGenericsString('String')} getColumnCapPropNameList(); + + public java.util.List${database.filterGenericsString('String')} getColumnUncapPropNameList(); + + /** + * Get column-db-name comma-string. + * + * @return Column-db-name comma-string. (NotNull) + */ + public String getColumnDbNameCommaString(); + + // =================================================================================== + // Name Handling + // ============= + /** + * Is existing db-name? + * + * @param dbName Db-name. (NotNull) + * @return Determination. + */ + public boolean isExistDbName(String dbName); + + /** + * Is existing cap-prop-name? + * + * @param capPropName Cap-prop-name. (NotNull) + * @return Determination. + */ + public boolean isExistCapPropName(String capPropName); + + /** + * Is existing uncap-prop-name? + * + * @param uncapPropName Uncap-prop-name. (NotNull) + * @return Determination. + */ + public boolean isExistUncapPropName(String uncapPropName); + + /** + * Is existing multi-name? + * + * @param multiName Multi-name. (NotNull) + * @return Determination. + */ + public boolean isExistMultiName(String multiName); + + /** + * Get db-name by property-name. + * + * @param capPropName Cap-prop-name. + * @return Db-name. + */ + public String getDbNameByCapPropName(String capPropName); + + /** + * Get db-name by property-name. + * + * @param propertyName Uncap-prop-name. + * @return {db-name : cap-prop-name} map. + */ + public String getDbNameByUncapPropName(String propertyName); + + /** + * Get cap-prop-name by db-name. + * + * @param dbName Db-name. + * @return Cap-prop-name. + */ + public String getCapPropNameByDbName(String dbName); + + /** + * Get cap-prop-name by property-name. + * + * @param propertyName Uncap-prop-name. + * @return Cap-prop-name. + */ + public String getCapPropNameByUncapPropName(String propertyName); + + /** + * Get property-name by db-name. + * + * @param dbName Db-name. + * @return Uncap-prop-name. + */ + public String getUncapPropNameByDbName(String dbName); + + /** + * Get property-name by cap-prop-name. + * + * @param capPropName Cap-prop-name. + * @return Uncap-prop-name. + */ + public String getUncapPropNameByCapPropName(String capPropName); + + /** + * Get db-name by multi-name. + * + * @param multiName Multi-name. + * @return Db-name. + */ + public String getDbNameByMultiName(String multiName); + + /** + * Get cap-prop-name by multi-name. + * + * @param multiName Multi-name. + * @return Cap-prop-name. + */ + public String getCapPropNameByMultiName(String multiName); + + /** + * Get property-name by multi-name. + * + * @param multiName Multi-name. + * @return Uncap-prop-name. + */ + public String getUncapPropNameByMultiName(String multiName); + + // =================================================================================== + // Name Map + // ======== + /** + * ${database.ImplementComment} + * + * @return {db-name : cap-prop-name} map. + */ + public java.util.Map${database.filterGenericsString('String, String')} getDbNameCapPropNameMap(); + + /** + * ${database.ImplementComment} + * + * @return {db-name : uncap-prop-name} map. + */ + public java.util.Map${database.filterGenericsString('String, String')} getDbNameUncapPropNameMap(); + + /** + * ${database.ImplementComment} + * + * @return {cap-prop-name : db-name} map. + */ + public java.util.Map${database.filterGenericsString('String, String')} getCapPropNameDbNameMap(); + + /** + * ${database.ImplementComment} + * + * @return {cap-prop-name : uncap-prop-name} map. + */ + public java.util.Map${database.filterGenericsString('String, String')} getCapPropNameUncapPropNameMap(); + + /** + * ${database.ImplementComment} + * + * @return {uncap-prop-name : db-name} map. + */ + public java.util.Map${database.filterGenericsString('String, String')} getUncapPropNameDbNameMap(); + + /** + * ${database.ImplementComment} + * + * @return {uncap-prop-name : cap-prop-name} map. + */ + public java.util.Map${database.filterGenericsString('String, String')} getUncapPropNameCapPropNameMap(); + + // =================================================================================== + // Type Name + // ========= + /** + * Get the type-name of entity. + * + * @return The type-name of entity. (NotNull) + */ + public String getEntityTypeName(); + + /** + * Get the type-name of condition-bean. + * + * @return The type-name of condition-bean. (Nullable: If the condition-bean does not exist) + */ + public String getConditionBeanTypeName(); + + /** + * Get the type-name of dao. + * + * @return The type-name of dao. (Nullable: If the dao does not exist) + */ + public String getDaoTypeName(); + + /** + * Get the type-name of behavior. + * + * @return The type-name of behavior. (Nullable: If the behavior does not exist) + */ + public String getBehaviorTypeName(); + + // =================================================================================== + // Type + // ==== + /** + * Get the type of entity. + * + * @return The type of entity. (NotNull) + */ + public Class getEntityType(); + + // =================================================================================== + // Instance + // ======== + /** + * New the instance of entity. + * + * @return The instance of entity. (NotNull) + */ + public ${glEntityInterfaceName} newEntity(); + + // =================================================================================== + // Foreign DBMeta + // ============== + /** + * Get foreign dbmeta. + * + * @param foreignPropertyName Foreign-property-name(Both OK - InitCap or not). (NotNull) + * @return Foreign DBMeta. (NotNull) + */ + public ${myClassName} getForeignDBMeta(String foreignPropertyName); + + // =================================================================================== + // Determination + // ============= + /** + * Has two or more primary-keys? + * + * @return Determination. + */ + public boolean hasTwoOrMorePrimaryKeys(); + + /** + * Has common column? + * + * @return Determination. + */ + public boolean hasCommonColumn(); + + // =================================================================================== + // Entity Handling + // =============== + // ----------------------------------------------------- + // Accept + // ------ + /** + * Accept primary-key map. + * + * The column that column-value map-string doesn't have the value of is reflected as null. + * The column that column-value map-string doesn't have the key of is NOT updated nothing. + * + * @param entity Target entity. (NotNull) + * @param primaryKeyMap Primary-key map. (NotNull and NotEmpty) + */ + public void acceptPrimaryKeyMap(${glEntityInterfaceName} entity, java.util.Map${database.filterGenericsString('String, ? extends Object')} primaryKeyMap); + + /** + * Accept primary-key map-string. + * + * The column that column-value map-string doesn't have the value of is reflected as null. + * The column that column-value map-string doesn't have the key of is NOT updated nothing. + * + * @param entity Target entity. (NotNull) + * @param primaryKeyMapString Primary-key map-string. (NotNull) + */ + public void acceptPrimaryKeyMapString(${glEntityInterfaceName} entity, String primaryKeyMapString); + + /** + * Accept column-value map. + * + * The column that column-value map-string doesn't have the value of is reflected as null. + * The column that column-value map-string doesn't have the key of is NOT updated nothing. + * + * @param entity Target entity. (NotNull) + * @param columnValueMap Column-value map. (NotNull and NotEmpty) + */ + public void acceptColumnValueMap(${glEntityInterfaceName} entity, java.util.Map${database.filterGenericsString('String, ? extends Object')} columnValueMap); + + /** + * Accept column-value map-string. + * + * The column that column-value map-string doesn't have the value of is reflected as null. + * The column that column-value map-string doesn't have the key of is NOT updated nothing. + * + * @param entity Target entity. (NotNull) + * @param columnValueMapString Column-value map-string. (NotNull) + */ + public void acceptColumnValueMapString(${glEntityInterfaceName} entity, String columnValueMapString); + + // ----------------------------------------------------- + // Extract + // ------- + /** + * Extract primary-key map-string. Delimiter is at-mark and semicolon. + *

+ *

+     * ex) Uses that this method have.
+     *   final String primaryKeyMapString = LdBookDbm.extractPrimaryKeyMapString(entity);
+     *   final LdBook entity = dao.selectEntity(new LdBookCB().acceptPrimaryKeyMapString(primaryKeyMapString));
+     *   ... // as primary key for condition.
+     * 
+ * + * @param entity Target entity. (NotNull) + * @return Primary-key map-string. (NotNull) + */ + public String extractPrimaryKeyMapString(${glEntityInterfaceName} entity); + + /** + * Extract primary-key map-string. + * + * @param entity Target entity. (NotNull) + * @param startBrace Start-brace. (NotNull) + * @param endBrace End-brace. (NotNull) + * @param delimiter Delimiter. (NotNull) + * @param equal Equal. (NotNull) + * @return Primary-key map-string. (NotNull) + */ + public String extractPrimaryKeyMapString(${glEntityInterfaceName} entity, String startBrace, String endBrace, String delimiter, String equal); + + /** + * Extract column-value map-string. Delimiter is at-mark and semicolon. + * + * @param entity Target entity. (NotNull) + * @return Column-value map-string. (NotNull) + */ + public String extractColumnValueMapString(${glEntityInterfaceName} entity); + + /** + * Extract column-value map-string. + * + * @param entity Target entity. (NotNull) + * @param startBrace Start-brace. (NotNull) + * @param endBrace End-brace. (NotNull) + * @param delimiter Delimiter. (NotNull) + * @param equal Equal. (NotNull) + * @return Column-value map-string. (NotNull) + */ + public String extractColumnValueMapString(${glEntityInterfaceName} entity, String startBrace, String endBrace, String delimiter, String equal); + + /** + * Extract common-column-value map-string. + * + * @param entity Target entity. (NotNull) + * @return Common-column-value map-string. (NotNull) + */ + public String extractCommonColumnValueMapString(${glEntityInterfaceName} entity); + + /** + * Extract common-column-value map-string. + * + * @param entity Target entity. (NotNull) + * @return Common-column-value map-string. (NotNull) + */ + public String extractCommonColumnValueMapString(${glEntityInterfaceName} entity, String startBrace, String endBrace, String delimiter, String equal); + + // ----------------------------------------------------- + // Convert + // ------- + /** + * Convert entity to column value as list. + * + * @param entity Target entity. (NotNull) + * @return The list of column value. (NotNull) + */ + public java.util.List${database.filterGenericsString('Object')} convertToColumnValueList(${glEntityInterfaceName} entity); + + /** + * Convert entity to column value as map. + * + * @param entity Target entity. (NotNull) + * @return The map of column value. (NotNull) + */ + public java.util.Map${database.filterGenericsString('String, Object')} convertToColumnValueMap(${glEntityInterfaceName} entity); + + /** + * Convert entity to column string-value as list. + * + * @param entity Target entity. (NotNull) + * @return The list of column string-value. (NotNull) + */ + public java.util.List${database.filterGenericsString('String')} convertToColumnStringValueList(${glEntityInterfaceName} entity); + + /** + * Convert entity to column string-value as map. + * + * @param entity Target entity. (NotNull) + * @return The map of column string-value. (NotNull) + */ + public java.util.Map${database.filterGenericsString('String, String')} convertToColumnStringValueMap(${glEntityInterfaceName} entity); + + // =================================================================================== + // JDBC Support + // ============ + public int insertEntity(java.sql.Connection conn, ${glEntityInterfaceName} entity); + public int insertEntity(java.sql.Connection conn, ${glEntityInterfaceName} entity, String tablePrefix); + public String getPreparedInsertClause(); + public String getPreparedInsertClause(String tablePrefix); + + // =================================================================================== + // Map String + // ========== + public ${glMapListStringName} createMapListString(); + + public ${glMapStringBuilderName} createMapStringBuilder(); +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/dbmeta/DBMetaInstanceHandler.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/dbmeta/DBMetaInstanceHandler.vm 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/dbmeta/DBMetaInstanceHandler.vm 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,187 @@ +package ${glPackageBaseCommonDBMeta}; + +#set ($myClassName = "${glDBMetaInstanceHandlerName}") +#set ($instanceMapGenericDefinition = "String, ${glDBMetaInterfaceName}") + +import java.util.Map; +import java.util.LinkedHashMap; + +/** + * DBMeta instance handler. + * + * @author ${database.ClassAuthor} + */ +public class ${myClassName} { + + /** Table db-name instance map. */ + protected static final Map${database.filterGenericsString(${instanceMapGenericDefinition})} _tableDbNameInstanceMap; + static { + Map${database.filterGenericsString(${instanceMapGenericDefinition})} tmpMap = new LinkedHashMap${database.filterGenericsString(${instanceMapGenericDefinition})}(); + +#foreach ($table in $database.Tables) + tmpMap.put("${table.Name}", getDBMeta("${glPackageBaseDBMeta}.${glProjectPrefix}${table.JavaName}Dbm")); +#end + + _tableDbNameInstanceMap = java.util.Collections.unmodifiableMap(tmpMap); + } + + /** Table cap-prop-name instance map. */ + protected static final Map${database.filterGenericsString(${instanceMapGenericDefinition})} _tableCapPropNameInstanceMap; + static { + Map${database.filterGenericsString(${instanceMapGenericDefinition})} tmpMap = new LinkedHashMap${database.filterGenericsString(${instanceMapGenericDefinition})}(); + +#foreach ($table in $database.Tables) + tmpMap.put("${table.JavaName}", getDBMeta("${glPackageBaseDBMeta}.${glProjectPrefix}${table.JavaName}Dbm")); +#end + + _tableCapPropNameInstanceMap = java.util.Collections.unmodifiableMap(tmpMap); + } + + /** Table uncap-prop-name instance map. */ + protected static final Map${database.filterGenericsString(${instanceMapGenericDefinition})} _tableUncapPropNameInstanceMap; + static { + Map${database.filterGenericsString(${instanceMapGenericDefinition})} tmpMap = new LinkedHashMap${database.filterGenericsString(${instanceMapGenericDefinition})}(); + +#foreach ($table in $database.Tables) + tmpMap.put("${table.UncapitalisedJavaName}", getDBMeta("${glPackageBaseDBMeta}.${glProjectPrefix}${table.JavaName}Dbm")); +#end + + _tableUncapPropNameInstanceMap = java.util.Collections.unmodifiableMap(tmpMap); + } + + protected static ${glDBMetaInterfaceName} getDBMeta(String className) { + try { + final Class clazz = Class.forName(className); + final java.lang.reflect.Method methoz = clazz.getMethod("getInstance", (Class[])null); + final Object result = methoz.invoke(null, (Object[])null); + return (${glDBMetaInterfaceName})result; + } catch (Exception e) { + throw new RuntimeException(e); + } + } + + /** + * Get instance by table db-name. + * + * @param tableDbName Table db-name. (NotNull) + * @return Instance. (NotNull) + */ + public static ${glDBMetaInterfaceName} getInstanceByTableDbName(String tableDbName) { + assertStringNotNullAndNotTrimmedEmpty("tableDbName", tableDbName); + final ${glDBMetaInterfaceName} instance = (${glDBMetaInterfaceName})_tableDbNameInstanceMap.get(tableDbName); + if (instance == null) { + String msg = "The instance map returned null by the key: key=" + tableDbName + " instanceMap=" + _tableDbNameInstanceMap; + throw new IllegalStateException(msg); + } + return instance; + } + + /** + * Get instance by table cap-prop-name. + * + * @param tableCapPropName Table cap-prop-name. (NotNull) + * @return Instance. (NotNull) + */ + public static ${glDBMetaInterfaceName} getInstanceByTableCapPropName(String tableCapPropName) { + assertStringNotNullAndNotTrimmedEmpty("tableCapPropName", tableCapPropName); + final ${glDBMetaInterfaceName} instance = (${glDBMetaInterfaceName})_tableCapPropNameInstanceMap.get(tableCapPropName); + if (instance == null) { + String msg = "The instance map returned null by the key: key=" + tableCapPropName + " instanceMap=" + _tableCapPropNameInstanceMap; + throw new IllegalStateException(msg); + } + return instance; + } + + /** + * Get instance by table uncap-prop-name. + * + * @param tableUncapPropName Table uncap-prop-name. (NotNull) + * @return Instance. (NotNull) + */ + public static ${glDBMetaInterfaceName} getInstanceByTableUncapPropName(String tableUncapPropName) { + assertStringNotNullAndNotTrimmedEmpty("tableUncapPropName", tableUncapPropName); + final ${glDBMetaInterfaceName} instance = (${glDBMetaInterfaceName})_tableUncapPropNameInstanceMap.get(tableUncapPropName); + if (instance == null) { + String msg = "The instance map returned null by the key: key=" + tableUncapPropName + " instanceMap=" + _tableUncapPropNameInstanceMap; + throw new IllegalStateException(msg); + } + return instance; + } + + /** + * Get instance by table uncap-prop-name. + * + * @param tableMultiName Table multi-name. (NotNull) + * @return Instance. (NotNull) + */ + public static ${glDBMetaInterfaceName} getInstanceByTableMultiName(String tableMultiName) { + assertStringNotNullAndNotTrimmedEmpty("tableMultiName", tableMultiName); + { + final ${glDBMetaInterfaceName} instance = (${glDBMetaInterfaceName})_tableDbNameInstanceMap.get(tableMultiName); + if (instance != null) { + return instance; + } + } + { + final ${glDBMetaInterfaceName} instance = (${glDBMetaInterfaceName})_tableCapPropNameInstanceMap.get(tableMultiName); + if (instance != null) { + return instance; + } + } + { + final ${glDBMetaInterfaceName} instance = (${glDBMetaInterfaceName})_tableUncapPropNameInstanceMap.get(tableMultiName); + if (instance != null) { + return instance; + } + } + String msg = "The tableMultiName does not exist in all-instance-map: tableMultiName=" + tableMultiName; + msg = msg + " tableDbNameInstanceMap=" + _tableDbNameInstanceMap; + msg = msg + " tableCapPropNameInstanceMap=" + _tableCapPropNameInstanceMap; + msg = msg + " tableUncapPropNameInstanceMap=" + _tableUncapPropNameInstanceMap; + throw new IllegalStateException(msg); + } + + // ---------------------------------------------------------------- + // Assert Object + // ------------- + /** + * Assert that the argument is not null. + * + * @param variableName Variable name. (NotNull) + * @param arg Argument. (NotNull) + */ + protected static void assertObjectNotNull(String variableName, Object arg) { + if (variableName == null) { + String msg = "Argument[variableName] should not be null."; + throw new IllegalArgumentException(msg); + } + if (arg == null) { + String msg = "Argument[" + variableName + "] should not be null."; + throw new IllegalArgumentException(msg); + } + } + + // ---------------------------------------------------------------- + // Assert String + // ------------- + /** + * Assert that the string is not null and not trimmed empty. + * + * @param variableName Variable name. (NotNull) + * @param value Value. (NotNull) + */ + protected static void assertStringNotNullAndNotTrimmedEmpty(String variableName, String value) { + if (variableName == null) { + String msg = "Variable[variableName] should not be null."; + throw new IllegalArgumentException(msg); + } + if (value == null) { + String msg = "Variable[" + variableName + "] should not be null."; + throw new IllegalArgumentException(msg); + } + if (value.trim().length() == 0) { + String msg = "Variable[" + variableName + "] should not be empty: [" + value + "]"; + throw new IllegalArgumentException(msg); + } + } +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/exception/DaoExceptionContext.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/exception/DaoExceptionContext.vm 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/exception/DaoExceptionContext.vm 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,104 @@ +package ${glPackageBaseCommonException}; + +import java.util.Map; +import java.util.LinkedHashMap; + +/** + * Dao-exception context. + * + * @author ${database.ClassAuthor} + */ +public class ${glDaoExceptionContextName} { + + /** The thread-local for this. */ + private static ThreadLocal${database.filterGenericsString('Map')} _threadLocal = new ThreadLocal${database.filterGenericsString('Map')}(); + + /** Key of sql. */ + public static final String KEY_SQL = "sql"; + + /** Key of exception. */ + public static final String KEY_EXCEPTION = "exception"; + + /** + * Get condition-bean on thread. + * + * @return Condition-bean context. (Nullable) + */ + public static Map${database.filterGenericsString('String, Object')} getInformationMapOnThread() { + return (Map${database.filterGenericsString('String, Object')})_threadLocal.get(); + } + + /** + * Get sql on thread. + * + * @return SQL. (NotNull) + */ + public static String getSqlOnThread() { + if (getInformationMapOnThread() == null) { + return null; + } + return (String)getInformationMapOnThread().get(KEY_SQL); + } + + /** + * Set sql on thread. + * + * @param sql SQL. (NotNull) + */ + public static void setSqlOnThread(String sql) { + if (sql == null) { + String msg = "The argument[sql] must not be null."; + throw new IllegalArgumentException(msg); + } + if (getInformationMapOnThread() == null) { + final Map${database.filterGenericsString('String, Object')} contextMap = new LinkedHashMap${database.filterGenericsString('String, Object')}(); + _threadLocal.set(contextMap); + } + getInformationMapOnThread().put(KEY_SQL, sql); + } + + /** + * Get exception on thread. + * + * @return Exception. (NotNull) + */ + public static Exception getExceptionOnThread() { + if (getInformationMapOnThread() == null) { + return null; + } + return (Exception)getInformationMapOnThread().get(KEY_EXCEPTION); + } + + /** + * Set exception on thread. + * + * @param exception Exception. (NotNull) + */ + public static void setExceptionOnThread(Exception exception) { + if (exception == null) { + String msg = "The argument[e] must not be null."; + throw new IllegalArgumentException(msg); + } + if (getInformationMapOnThread() == null) { + final Map${database.filterGenericsString('String, Object')} contextMap = new LinkedHashMap${database.filterGenericsString('String, Object')}(); + _threadLocal.set(contextMap); + } + getInformationMapOnThread().put(KEY_EXCEPTION, exception); + } + + /** + * Is existing dao-exception on thread? + * + * @return Determination. + */ + public static boolean isExistDaoExceptionOnThread() { + return (_threadLocal.get() != null); + } + + /** + * Clear dao-exception on thread. + */ + public static void clearDaoExceptionOnThread() { + _threadLocal.set(null); + } +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/exception/RecordHasAlreadyBeenDeletedException.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/exception/RecordHasAlreadyBeenDeletedException.vm 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/exception/RecordHasAlreadyBeenDeletedException.vm 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,21 @@ +package ${glPackageBaseCommonException}; + +/** + * The exception when the record has already been deleted (by other thread). + * + * @author ${database.ClassAuthor} + */ +public class ${glRecordHasAlreadyBeenDeletedException} extends RuntimeException { + + /** Serial version UID. (Default) */ + private static final long serialVersionUID = 1L; + + /** + * Constructor. + * + * @param msg Exception message. + */ + public ${glRecordHasAlreadyBeenDeletedException}(String msg) { + super(msg); + } +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/exception/RecordHasOverlappedException.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/exception/RecordHasOverlappedException.vm 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/exception/RecordHasOverlappedException.vm 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,21 @@ +package ${glPackageBaseCommonException}; + +/** + * The exception when the record has overlapped. + * + * @author ${database.ClassAuthor} + */ +public class ${glRecordHasOverlappedException} extends RuntimeException { + + /** Serial version UID. (Default) */ + private static final long serialVersionUID = 1L; + + /** + * Constructor. + * + * @param msg Exception message. + */ + public ${glRecordHasOverlappedException}(String msg) { + super(msg); + } +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/exception/SelectedCountExceedMaxCountException.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/exception/SelectedCountExceedMaxCountException.vm 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/exception/SelectedCountExceedMaxCountException.vm 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,49 @@ +package ${glPackageBaseCommonException}; + +/** + * The exception when selected count exceeds max count. + * + * @author ${database.ClassAuthor} + */ +public class ${glSelectedCountExceedMaxCountExceptionName} extends RuntimeException { + + /** Serial version UID. (Default) */ + private static final long serialVersionUID = 1L; + + /** Selected count. */ + protected int _selectedCount; + + /** Max count. */ + protected int _maxCount; + + /** + * Constructor. + * + * @param msg Exception message. + * @param maxCount Max count. + * @param selectedCount Selected count. + */ + public ${glSelectedCountExceedMaxCountExceptionName}(String msg, int selectedCount, int maxCount) { + super(msg); + _selectedCount = selectedCount; + _maxCount = maxCount; + } + + /** + * Get selected count. + * + * @return Selected count. + */ + public int getSelectedCount() { + return _selectedCount; + } + + /** + * Get max count. + * + * @return Max count. + */ + public int getMaxCount() { + return _maxCount; + } +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/helper/MapListString.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/helper/MapListString.vm 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/helper/MapListString.vm 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,102 @@ +package ${glPackageBaseCommonHelper}; + +import java.util.List; +import java.util.Map; + +/** + * MapList-String. + *

+ *

+ * # Interface that offers generation of map and list from the following character strings (map list string). 
+ * # 
+ * #   ex) map:{key1=value1,key2=list:{value21,value22,value23},key3=map:{key31=value31}}
+ * #   ex) list:{key1=value1,key2=list:{value21,value22,value23},key3=map:{key31=value31}}
+ * # 
+ * 
+ * + * @author ${database.ClassAuthor} + */ +public interface ${glMapListStringName} { + + /** Default of map-mark. */ + public static final String DEFAULT_MAP_MARK = "map:"; + + /** Default of list-mark. */ + public static final String DEFAULT_LIST_MARK = "list:"; + + /** Default of start-brace. */ + public static final String DEFAULT_START_BRACE = "{"; + + /** Default of end-brace. */ + public static final String DEFAULT_END_BRACE = "}"; + + /** Default of delimter. */ + public static final String DEFAULT_DELIMITER = ";"; + + /** Default of equal. */ + public static final String DEFAULT_EQUAL = "="; + + // ========================================================================================== + // Setter + // ====== + /** + * Set map-mark. + * + * @param mapMark Map-mark. (NotNull) + */ + public void setMapMark(String mapMark); + + /** + * Set list-mark. + * + * @param listMark List-mark. (NotNull) + */ + public void setListMark(String listMark); + + /** + * Set start brace. + * + * @param startBrace Start brace. (NotNull) + */ + public void setStartBrace(String startBrace); + + /** + * Set end brace. + * + * @param endBrace End brace. (NotNull) + */ + public void setEndBrace(String endBrace); + + /** + * Set delimiter. + * + * @param delimiter Delimiter. (NotNull) + */ + public void setDelimiter(String delimiter); + + /** + * Set equal. + * + * @param equal Equal. (NotNull) + */ + public void setEqual(String equal); + + // ========================================================================================== + // Generate + // ======== + /** + * Generate map from map-string. + * + * @param mapString Map-string (NotNull) + * @return Generated map. (NotNull) + */ + public Map${database.filterGenericsString('String, Object')} generateMap(String mapString); + + /** + * Generate map from list-string. {Implement} + * + * @param listString List-string (NotNull) + * @return Generated list. (NotNull) + */ + public List${database.filterGenericsString('Object')} generateList(String listString); +} \ No newline at end of file Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/helper/MapListStringImpl.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/helper/MapListStringImpl.vm 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/helper/MapListStringImpl.vm 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,938 @@ +package ${glPackageBaseCommonHelper}; + +import java.util.ArrayList; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; + +/** + * The implementation of MapList-String. + * + * @author ${database.ClassAuthor} + */ +public class ${glMapListStringImplName} implements ${glMapListStringName} { + + /** Line separator. */ + public static final String NEW_LINE = System.getProperty("line.separator"); + + /** Map-mark. */ + protected String _mapMark; + + /** List-mark. */ + protected String _listMark; + + /** Start-brace. */ + protected String _startBrace; + + /** End-brace. */ + protected String _endBrace; + + /** Delimiter. */ + protected String _delimiter; + + /** Equal. */ + protected String _equal; + + /** Top string. */ + protected String _topString; + + /** Remainder string. */ + protected String _remainderString; + + /** + * Constructor. + */ + public ${glMapListStringImplName}() { + _mapMark = DEFAULT_MAP_MARK; + _listMark = DEFAULT_LIST_MARK; + _startBrace = DEFAULT_START_BRACE; + _endBrace = DEFAULT_END_BRACE; + _delimiter = DEFAULT_DELIMITER; + _equal = DEFAULT_EQUAL; + } + + // ========================================================================================== + // Setter + // ====== + /** + * Set map-mark. + * + * @param mapMark Map mark. (NotNull) + */ + public void setMapMark(String mapMark) { + _mapMark = mapMark; + } + + /** + * Set list-mark. + * + * @param listMark List mark. (NotNull) + */ + public void setListMark(String listMark) { + _listMark = listMark; + } + + /** + * Set start-brace. + * + * @param startBrace Start-brace. (NotNull) + */ + public synchronized void setStartBrace(String startBrace) { + _startBrace = startBrace; + } + + /** + * Set end-brace. + * + * @param endBrace End-brace. (NotNull) + */ + public synchronized void setEndBrace(String endBrace) { + _endBrace = endBrace; + } + + /** + * Set delimiter. + * + * @param delimiter Delimiter. (NotNull) + */ + public synchronized void setDelimiter(String delimiter) { + _delimiter = delimiter; + } + + /** + * Set equal. + * + * @param equal Equal. (NotNull) + */ + public void setEqual(String equal) { + _equal = equal; + } + + // **************************************************************************************************** + // Main Method + // *********** + + // ========================================================================================== + // Generate + // ======== + /** + * Generate map from map-string. {Implement} + * + * @param mapString Map-string (NotNull) + * @return Generated map. (NotNull) + */ + public synchronized Map${database.filterGenericsString('String, Object')} generateMap(String mapString) { + assertMapString(mapString); + + _topString = mapString; + _remainderString = mapString; + + removeBothSideSpaceAndTabAndNewLine(); + removePrefixMapMarkAndStartBrace(); + + final Map${database.filterGenericsString('String, Object')} generatedMap = newStringObjectMap(); + parseRemainderMapString(generatedMap); + if (!"".equals(_remainderString)) { + String msg = "Final remainderString must be empty string:"; + msg = msg + getNewLineAndIndent() + " # remainderString --> " + _remainderString; + msg = msg + getNewLineAndIndent() + " # mapString --> " + mapString; + msg = msg + getNewLineAndIndent() + " # generatedMap --> " + generatedMap; + throw new IllegalStateException(msg); + } + return generatedMap; + } + + /** + * Generate map from list-string. {Implement} + * + * @param listString List-string (NotNull) + * @return Generated list. (NotNull) + */ + public synchronized List${database.filterGenericsString('Object')} generateList(String listString) { + assertListString(listString); + + _topString = listString; + _remainderString = listString; + + removeBothSideSpaceAndTabAndNewLine(); + removePrefixListMarkAndStartBrace(); + + final List${database.filterGenericsString('Object')} generatedList = newObjectList(); + parseRemainderListString(generatedList); + if (!"".equals(_remainderString)) { + String msg = "Final remainderString must be empty string:"; + msg = msg + getNewLineAndIndent() + " # remainderString --> " + _remainderString; + msg = msg + getNewLineAndIndent() + " # listString --> " + listString; + msg = msg + getNewLineAndIndent() + " # generatedList --> " + generatedList; + throw new IllegalStateException(msg); + } + return generatedList; + } + + // ========================================================================================== + // Parse + // ===== + /** + * Parse remainder map string. + * + * @param currentMap current map. + */ + protected void parseRemainderMapString(final Map${database.filterGenericsString('String, Object')} currentMap) { + while (true) { + if (initializeAtLoopBeginning()) { + return; + } + + // *** Now, _remainderString should starts with the key of the map. *** + + final int equalIndex = _remainderString.indexOf(_equal); + assertEqualIndex(_remainderString, equalIndex, _topString, currentMap); + final String mapKey = _remainderString.substring(0, equalIndex).trim(); + removePrefixTargetIndexPlus(equalIndex, _equal.length()); + removeBothSideSpaceAndTabAndNewLine(); + + // *** Now, _remainderString should starts with the value of the map. *** + + if (isStartsWithMapPrefix(_remainderString)) { + removePrefixMapMarkAndStartBrace(); + parseRemainderMapString(setupNestMap(currentMap, mapKey)); + if (closingAfterParseNestMapList()) { + return; + } + continue; + } + + if (isStartsWithListPrefix(_remainderString)) { + removePrefixListMarkAndStartBrace(); + parseRemainderListString(setupNestList(currentMap, mapKey)); + if (closingAfterParseNestMapList()) { + return; + } + continue; + } + + final int delimiterIndex = _remainderString.indexOf(_delimiter); + final int endBraceIndex = _remainderString.indexOf(_endBrace); + assertEndBracekIndex(_remainderString, endBraceIndex, _topString, currentMap); + + // If delimiter exists and delimiter is closer than end brace, + // Everything from the head of the present remainder string to the delimiter becomes map value. + // ex) value1,key2=value2} + if (delimiterIndex >= 0 && delimiterIndex < endBraceIndex) { + final String mapValue = _remainderString.substring(0, delimiterIndex); + currentMap.put(mapKey, filterMapListValue(mapValue)); + + // Because the map element continues since the delimiter, skip the delimiter and continue the loop. + removePrefixTargetIndexPlus(delimiterIndex, _delimiter.length()); + continue; + } + + // Everything from the head of the present remainder string to the delimiter becomes map value. + // ex) value1}, key2=value2} + final String mapValue = _remainderString.substring(0, endBraceIndex); + currentMap.put(mapKey, filterMapListValue(mapValue)); + + // Analyzing map is over. So closing and return. + closingByEndBraceIndex(endBraceIndex); + return; + } + } + + /** + * Parse remainder list string. + * + * @param currentList current list. + */ + protected void parseRemainderListString(final List${database.filterGenericsString('Object')} currentList) { + while (true) { + if (initializeAtLoopBeginning()) { + return; + } + + // *** Now, _remainderString should starts with the value of the list. *** + + if (isStartsWithMapPrefix(_remainderString)) { + removePrefixMapMarkAndStartBrace(); + parseRemainderMapString(setupNestMap(currentList)); + if (closingAfterParseNestMapList()) { + return; + } + continue; + } + + if (isStartsWithListPrefix(_remainderString)) { + removePrefixListMarkAndStartBrace(); + parseRemainderListString(setupNestList(currentList)); + if (closingAfterParseNestMapList()) { + return; + } + continue; + } + + final int delimiterIndex = _remainderString.indexOf(_delimiter); + final int endBraceIndex = _remainderString.indexOf(_endBrace); + assertEndBraceIndex(_remainderString, endBraceIndex, _topString, currentList); + + // If delimiter exists and delimiter is closer than end brace, + // Everything from the head of the present remainder string to the delimiter becomes list value. + // ex) value1,value2,value3} + if (delimiterIndex >= 0 && delimiterIndex < endBraceIndex) { + final String listValue = _remainderString.substring(0, delimiterIndex); + currentList.add(filterMapListValue(listValue)); + + // Because the list element continues since the delimiter, skip the delimiter and continue the loop. + removePrefixTargetIndexPlus(delimiterIndex, _delimiter.length()); + continue; + } + + // Everything from the head of the present remainder string to the delimiter becomes list value. + // ex) value1}, value2, } + final String listValue = _remainderString.substring(0, endBraceIndex); + currentList.add(filterMapListValue(listValue)); + + // Analyzing list is over. So closing and return. + closingByEndBraceIndex(endBraceIndex); + return; + } + } + + /** + * Initialize at loop beginning. + * + * @return Is return? + */ + protected boolean initializeAtLoopBeginning() { + // Remove prefix delimiter. (Result string is always trimmed.) + removePrefixAllDelimiter(); + + // If the remainder string is empty-string, Analyzing is over! + if (_remainderString.equals("")) { + return true; + } + + // If the remainder string starts with end-brace, Analyzing current map is over! + // And then remove the end-brace. + if (isStartsWithEndBrace(_remainderString)) { + removePrefixEndBrace(); + return true; + } + return false; + } + + /** + * Close after parse nest map list. + * + * @return Is return? + */ + protected boolean closingAfterParseNestMapList() { + // If the remainder string starts with end-brace, remove it and return true. + if (isStartsWithEndBrace(_remainderString)) { + removePrefixEndBrace(); + return true; + } + return false; + } + + /** + * Close by end-brace index. + * + * @param endBraceIndex End-brace index. + */ + protected void closingByEndBraceIndex(int endBraceIndex) { + // Remove the value that was finished analyzing and end-brace. + _remainderString = _remainderString.substring(endBraceIndex); + removePrefixEndBrace(); + } + + // **************************************************************************************************** + // StateFul Method + // *************** + + // ========================================================================================== + // Remove + // ====== + /** + * Remove prefix map-mark and start-brace. + */ + protected void removePrefixMapMarkAndStartBrace() { + removePrefix(_mapMark + _startBrace); + } + + /** + * Remove prefix list-mark and start-brace. + */ + protected void removePrefixListMarkAndStartBrace() { + removePrefix(_listMark + _startBrace); + } + + /** + * Remove prefix delimiter. + */ + protected void removePrefixDelimiter() { + removePrefix(_delimiter); + } + + /** + * Remove prefix end-brace. + */ + protected void removePrefixEndBrace() { + removePrefix(_endBrace); + } + + /** + * Remove prefix. + * + * @param prefixString Prefix string. (NotNull) + */ + protected void removePrefix(String prefixString) { + if (_remainderString == null) { + String msg = "Argument[remainderString] must not be null: " + _remainderString; + throw new IllegalArgumentException(msg); + } + if (prefixString == null) { + String msg = "Argument[prefixString] must not be null: " + prefixString; + throw new IllegalArgumentException(msg); + } + + removeBothSideSpaceAndTabAndNewLine(); + + if (_remainderString.length() < prefixString.length()) { + String msg = "Argument[remainderString] length must be larger than Argument[prefixString] length:"; + msg = msg + getNewLineAndIndent() + " # remainderString --> " + _remainderString; + msg = msg + getNewLineAndIndent() + " # prefixString=" + prefixString; + throw new IllegalArgumentException(msg); + } + if (!_remainderString.startsWith(prefixString)) { + String msg = "Argument[remainderString] must start with Argument[prefixString:]"; + msg = msg + getNewLineAndIndent() + " # remainderString --> " + _remainderString; + msg = msg + getNewLineAndIndent() + " # prefixString --> " + prefixString; + throw new IllegalArgumentException(msg); + } + + _remainderString = _remainderString.substring(prefixString.length()); + removeBothSideSpaceAndTabAndNewLine(); + } + + /** + * Remove prefix and delimiter. + */ + protected void removePrefixAllDelimiter() { + removeBothSideSpaceAndTabAndNewLine(); + + while (true) { + if (!isStartsWithDelimiter(_remainderString)) { + break; + } + + if (isStartsWithDelimiter(_remainderString)) { + removePrefixDelimiter(); + removeBothSideSpaceAndTabAndNewLine(); + } + } + } + + /** + * Remove both side space and tab and new-line. + */ + protected void removeBothSideSpaceAndTabAndNewLine() { + _remainderString = _remainderString.trim(); + } + + /** + * Remove prefix (target index plus one). + * + * @param index Index. + * @param plusCount Plus count. + */ + protected void removePrefixTargetIndexPlus(int index, int plusCount) { + _remainderString = _remainderString.substring(index + plusCount); + } + + // **************************************************************************************************** + // StateLess Method + // **************** + + // ========================================================================================== + // Assert + // ====== + /** + * Assert map-string. + * + * @param mapString Map-string. (NotNull) + */ + protected void assertMapString(String mapString) { + if (mapString == null) { + String msg = "Argument[mapString] must not be null: "; + throw new IllegalArgumentException(msg + "mapString=" + mapString); + } + mapString = mapString.trim(); + if (!isStartsWithMapPrefix(mapString)) { + String msg = "Argument[mapString] must start with '" + _mapMark + _startBrace + "': "; + throw new IllegalArgumentException(msg + "mapString=" + mapString); + } + if (!isEndsWithEndBrace(mapString)) { + String msg = "Argument[mapString] must end with '" + _endBrace + "': "; + throw new IllegalArgumentException(msg + "mapString=" + mapString); + } + + final int startBraceCount = getDelimiterCount(mapString, _startBrace); + final int endBraceCount = getDelimiterCount(mapString, _endBrace); + if (startBraceCount != endBraceCount) { + String msg = "It is necessary to have braces of the same number on start and end:"; + msg = msg + getNewLineAndIndent() + " # mapString --> " + mapString; + msg = msg + getNewLineAndIndent() + " # startBraceCount --> " + startBraceCount; + msg = msg + getNewLineAndIndent() + " # endBraceCount --> " + endBraceCount; + throw new IllegalArgumentException(msg); + } + } + + /** + * Assert list-string. + * + * @param listString List-string. (NotNull) + */ + protected void assertListString(String listString) { + if (listString == null) { + String msg = "Argument[listString] must not be null: "; + throw new IllegalArgumentException(msg + "listString=" + listString); + } + listString = listString.trim(); + if (!isStartsWithListPrefix(listString)) { + String msg = "Argument[listString] must start with '" + _mapMark + "': "; + throw new IllegalArgumentException(msg + "listString=" + listString); + } + if (!isEndsWithEndBrace(listString)) { + String msg = "Argument[listString] must end with '" + _endBrace + "': "; + throw new IllegalArgumentException(msg + "listString=" + listString); + } + + final int startBraceCount = getDelimiterCount(listString, _startBrace); + final int endBraceCount = getDelimiterCount(listString, _endBrace); + if (startBraceCount != endBraceCount) { + String msg = "It is necessary to have braces of the same number on start and end:"; + msg = msg + getNewLineAndIndent() + " # listString --> " + listString; + msg = msg + getNewLineAndIndent() + " # startBraceCount --> " + startBraceCount; + msg = msg + getNewLineAndIndent() + " # endBraceCount --> " + endBraceCount; + throw new IllegalArgumentException(msg); + } + } + + /** + * Assert equal-index. + * + * @param remainderMapString Remainder map-string. (NotNull) + * @param equalIndex Equal-index. + * @param mapString4Log Map-string for log. (NotNull) + * @param currentMap4Log Current-map for log. (NotNull) + */ + protected void assertEqualIndex(String remainderMapString, int equalIndex, String mapString4Log + , Map${database.filterGenericsString('String, Object')} currentMap4Log) { + if (remainderMapString == null) { + String msg = "Argument[remainderMapString] must not be null:"; + msg = msg + getNewLineAndIndent() + " # remainderMapString --> " + remainderMapString; + msg = msg + getNewLineAndIndent() + " # equalIndex --> " + equalIndex; + msg = msg + getNewLineAndIndent() + " # mapString4Log --> " + mapString4Log; + msg = msg + getNewLineAndIndent() + " # currentMap4Log --> " + currentMap4Log; + msg = msg + getNewLineAndIndent() + " # _startBrace --> " + _startBrace; + msg = msg + getNewLineAndIndent() + " # _endBrace --> " + _endBrace; + msg = msg + getNewLineAndIndent() + " # _delimiter --> " + _delimiter; + msg = msg + getNewLineAndIndent() + " # _equal --> " + _equal; + throw new IllegalArgumentException(msg); + } + + if (equalIndex < 0) { + String msg = "Argument[equalIndex] must be plus or zero:"; + msg = msg + getNewLineAndIndent() + " # remainderMapString --> " + remainderMapString; + msg = msg + getNewLineAndIndent() + " # equalIndex --> " + equalIndex; + msg = msg + getNewLineAndIndent() + " # mapString4Log --> " + mapString4Log; + msg = msg + getNewLineAndIndent() + " # currentMap4Log --> " + currentMap4Log; + msg = msg + getNewLineAndIndent() + " # _startBrace --> " + _startBrace; + msg = msg + getNewLineAndIndent() + " # _endBrace --> " + _endBrace; + msg = msg + getNewLineAndIndent() + " # _delimiter --> " + _delimiter; + msg = msg + getNewLineAndIndent() + " # _equal --> " + _equal; + throw new IllegalArgumentException(msg); + } + + if (remainderMapString.length() < equalIndex) { + String msg = "Argument[remainderMapString] length must be larger than equalIndex value:"; + msg = msg + getNewLineAndIndent() + " # remainderMapString --> " + remainderMapString; + msg = msg + getNewLineAndIndent() + " # equalIndex --> " + equalIndex; + msg = msg + getNewLineAndIndent() + " # mapString4Log --> " + mapString4Log; + msg = msg + getNewLineAndIndent() + " # currentMap4Log --> " + currentMap4Log; + msg = msg + getNewLineAndIndent() + " # _startBrace --> " + _startBrace; + msg = msg + getNewLineAndIndent() + " # _endBrace --> " + _endBrace; + msg = msg + getNewLineAndIndent() + " # _delimiter --> " + _delimiter; + msg = msg + getNewLineAndIndent() + " # _equal --> " + _equal; + throw new IllegalArgumentException(msg); + } + + final String expectedAsEndMark = remainderMapString.substring(equalIndex, equalIndex + _equal.length()); + if (!expectedAsEndMark.equals(_equal)) { + String msg = "Argument[remainderMapString] must have '" + _equal + "' at Argument[equalIndex]:"; + msg = msg + getNewLineAndIndent() + " # remainderMapString --> " + remainderMapString; + msg = msg + getNewLineAndIndent() + " # equalIndex --> " + equalIndex; + msg = msg + getNewLineAndIndent() + " # expectedAsEndMark --> " + expectedAsEndMark; + msg = msg + getNewLineAndIndent() + " # mapString --> " + mapString4Log; + msg = msg + getNewLineAndIndent() + " # currentMap --> " + currentMap4Log; + msg = msg + getNewLineAndIndent() + " # _startBrace --> " + _startBrace; + msg = msg + getNewLineAndIndent() + " # _endBrace --> " + _endBrace; + msg = msg + getNewLineAndIndent() + " # _delimiter --> " + _delimiter; + msg = msg + getNewLineAndIndent() + " # _equal --> " + _equal; + throw new IllegalArgumentException(msg); + } + } + + /** + * Assert end-brace-index. + * + * @param remainderMapString Remainder map-string. (NotNull) + * @param endBraceIndex End-brace-index. + * @param mapString4Log Map-string for log. (NotNull) + * @param currentMap4Log Current-map for log. (NotNull) + */ + protected void assertEndBracekIndex(String remainderMapString, int endBraceIndex, String mapString4Log + , Map${database.filterGenericsString('String, Object')} currentMap4Log) { + if (remainderMapString == null) { + String msg = "Argument[remainderMapString] must not be null:"; + msg = msg + getNewLineAndIndent() + " # remainderMapString --> " + remainderMapString; + msg = msg + getNewLineAndIndent() + " # endBraceIndex --> " + endBraceIndex; + msg = msg + getNewLineAndIndent() + " # mapString --> " + mapString4Log; + msg = msg + getNewLineAndIndent() + " # currentMap --> " + currentMap4Log; + msg = msg + getNewLineAndIndent() + " # _startBrace --> " + _startBrace; + msg = msg + getNewLineAndIndent() + " # _endBrace --> " + _endBrace; + msg = msg + getNewLineAndIndent() + " # _delimiter --> " + _delimiter; + msg = msg + getNewLineAndIndent() + " # _equal --> " + _equal; + throw new IllegalArgumentException(msg); + } + + if (endBraceIndex < 0) { + String msg = "Argument[endMarkIndex] must be plus or zero:"; + msg = msg + getNewLineAndIndent() + " # remainderMapString --> " + remainderMapString; + msg = msg + getNewLineAndIndent() + " # endBraceIndex --> " + endBraceIndex; + msg = msg + getNewLineAndIndent() + " # mapString --> =" + mapString4Log; + msg = msg + getNewLineAndIndent() + " # currentMap --> " + currentMap4Log; + msg = msg + getNewLineAndIndent() + " # _startBrace --> " + _startBrace; + msg = msg + getNewLineAndIndent() + " # _endBrace --> " + _endBrace; + msg = msg + getNewLineAndIndent() + " # _delimiter --> " + _delimiter; + msg = msg + getNewLineAndIndent() + " # _equal --> " + _equal; + throw new IllegalArgumentException(msg); + } + + if (remainderMapString.length() < endBraceIndex) { + String msg = "Argument[remainderMapString] length must be larger than endMarkIndex value:"; + msg = msg + getNewLineAndIndent() + " # remainderMapString --> " + remainderMapString; + msg = msg + getNewLineAndIndent() + " # endBraceIndex --> " + endBraceIndex; + msg = msg + getNewLineAndIndent() + " # mapString --> " + mapString4Log; + msg = msg + getNewLineAndIndent() + " # currentMap --> " + currentMap4Log; + msg = msg + getNewLineAndIndent() + " # _startBrace --> " + _startBrace; + msg = msg + getNewLineAndIndent() + " # _endBrace --> " + _endBrace; + msg = msg + getNewLineAndIndent() + " # _delimiter --> " + _delimiter; + msg = msg + getNewLineAndIndent() + " # _equal --> " + _equal; + throw new IllegalArgumentException(msg); + } + + final String expectedAsEndMark = remainderMapString.substring(endBraceIndex, endBraceIndex + _endBrace.length()); + if (!expectedAsEndMark.equals(_endBrace)) { + String msg = "Argument[remainderMapString] must have '" + _endBrace + "' at Argument[endBraceIndex]:"; + msg = msg + getNewLineAndIndent() + " # remainderMapString --> " + remainderMapString; + msg = msg + getNewLineAndIndent() + " # endBraceIndex --> " + endBraceIndex; + msg = msg + getNewLineAndIndent() + " # expectedAsEndMark --> " + expectedAsEndMark; + msg = msg + getNewLineAndIndent() + " # mapString --> " + mapString4Log; + msg = msg + getNewLineAndIndent() + " # currentMap --> " + currentMap4Log; + msg = msg + getNewLineAndIndent() + " # _startBrace --> " + _startBrace; + msg = msg + getNewLineAndIndent() + " # _endBrace --> " + _endBrace; + msg = msg + getNewLineAndIndent() + " # _delimiter --> " + _delimiter; + msg = msg + getNewLineAndIndent() + " # _equal --> " + _equal; + throw new IllegalArgumentException(msg); + } + } + + /** + * Assert end-brace-index. + * + * @param remainderListString Remainder list-string. (NotNull) + * @param endBraceIndex End-brace-index. + * @param listString4Log List-string for log. (NotNull) + * @param currentList4Log Current-list for log. (NotNull) + */ + protected void assertEndBraceIndex(String remainderListString, int endBraceIndex, String listString4Log, + List currentList4Log) { + if (remainderListString == null) { + String msg = "Argument[remainderListString] must not be null:"; + msg = msg + getNewLineAndIndent() + " # remainderListString --> " + remainderListString; + msg = msg + getNewLineAndIndent() + " # endBraceIndex --> " + endBraceIndex; + msg = msg + getNewLineAndIndent() + " # listString --> " + listString4Log; + msg = msg + getNewLineAndIndent() + " # currentList --> " + currentList4Log; + msg = msg + getNewLineAndIndent() + " # _startBrace --> " + _startBrace; + msg = msg + getNewLineAndIndent() + " # _endBrace --> " + _endBrace; + msg = msg + getNewLineAndIndent() + " # _delimiter --> " + _delimiter; + msg = msg + getNewLineAndIndent() + " # _equal --> " + _equal; + throw new IllegalArgumentException(msg); + } + + if (endBraceIndex < 0) { + String msg = "Argument[endMarkIndex] must be plus or zero:"; + msg = msg + getNewLineAndIndent() + " # remainderListString --> " + remainderListString; + msg = msg + getNewLineAndIndent() + " # endBraceIndex --> " + endBraceIndex; + msg = msg + getNewLineAndIndent() + " # listString --> " + listString4Log; + msg = msg + getNewLineAndIndent() + " # currentList --> " + currentList4Log; + msg = msg + getNewLineAndIndent() + " # _startBrace --> " + _startBrace; + msg = msg + getNewLineAndIndent() + " # _endBrace --> " + _endBrace; + msg = msg + getNewLineAndIndent() + " # _delimiter --> " + _delimiter; + msg = msg + getNewLineAndIndent() + " # _equal --> " + _equal; + throw new IllegalArgumentException(msg); + } + + if (remainderListString.length() < endBraceIndex) { + String msg = "Argument[remainderListString] length must be larger than endMarkIndex value:"; + msg = msg + getNewLineAndIndent() + " # remainderListString --> " + remainderListString; + msg = msg + getNewLineAndIndent() + " # endBraceIndex --> " + endBraceIndex; + msg = msg + getNewLineAndIndent() + " # listString --> " + listString4Log; + msg = msg + getNewLineAndIndent() + " # currentList --> " + currentList4Log; + msg = msg + getNewLineAndIndent() + " # _startBrace --> " + _startBrace; + msg = msg + getNewLineAndIndent() + " # _endBrace --> " + _endBrace; + msg = msg + getNewLineAndIndent() + " # _delimiter --> " + _delimiter; + msg = msg + getNewLineAndIndent() + " # _equal --> " + _equal; + throw new IllegalArgumentException(msg); + } + + final String expectedAsEndBrace = remainderListString.substring(endBraceIndex, endBraceIndex + _endBrace.length()); + if (!expectedAsEndBrace.equals(_endBrace)) { + String msg = "Argument[remainderListString] must have '" + _endBrace + "' at Argument[endBraceIndex]:"; + msg = msg + getNewLineAndIndent() + " # remainderListString --> " + remainderListString; + msg = msg + getNewLineAndIndent() + " # endBraceIndex --> " + endBraceIndex; + msg = msg + getNewLineAndIndent() + " # expectedAsEndBrace --> " + expectedAsEndBrace; + msg = msg + getNewLineAndIndent() + " # listString --> " + listString4Log; + msg = msg + getNewLineAndIndent() + " # currentList --> " + currentList4Log; + msg = msg + getNewLineAndIndent() + " # _startBrace --> " + _startBrace; + msg = msg + getNewLineAndIndent() + " # _endBrace --> " + _endBrace; + msg = msg + getNewLineAndIndent() + " # _delimiter --> " + _delimiter; + msg = msg + getNewLineAndIndent() + " # _equal --> " + _equal; + throw new IllegalArgumentException(msg); + } + } + + // ========================================================================================== + // Filter + // ====== + /** + * Filter map or list value. + *

+ *

+     * # The value is trimmed.
+     * # If the value is null, this returns null.
+     * # If the value is 'null', this returns null.
+     * # If the trimmed value is empty string, this returns null.
+     * 
+ * @param value value. (Nullable) + * @return Filtered value. (Nullable) + */ + protected String filterMapListValue(String value) { + if (value == null) { + return null; + } + value = value.trim(); + return (("".equals(value) || "null".equals(value)) ? null : value); + } + + // ========================================================================================== + // Judgement + // ========= + /** + * Does it start with map-prefix? + * + * @param targetString Target-string. (NotNull) + * @return Determination. + */ + protected boolean isStartsWithMapPrefix(String targetString) { + if (targetString == null) { + String msg = "Argument[targetString] must not be null: " + targetString; + throw new IllegalArgumentException(msg); + } + targetString = targetString.trim(); + if (targetString.startsWith(_mapMark + _startBrace)) { + return true; + } else { + return false; + } + } + + /** + * Does it start with list-prefix? + * + * @param targetString Target-string. (NotNull) + * @return Determination. + */ + protected boolean isStartsWithListPrefix(String targetString) { + if (targetString == null) { + String msg = "Argument[targetString] must not be null: " + targetString; + throw new IllegalArgumentException(msg); + } + targetString = targetString.trim(); + if (targetString.startsWith(_listMark + _startBrace)) { + return true; + } else { + return false; + } + } + + /** + * Does it start with delimiter? + * + * @param targetString Target-string. (NotNull) + * @return Determination. + */ + protected boolean isStartsWithDelimiter(String targetString) { + if (targetString == null) { + String msg = "Argument[targetString] must not be null: " + targetString; + throw new IllegalArgumentException(msg); + } + targetString = targetString.trim(); + if (targetString.startsWith(_delimiter)) { + return true; + } else { + return false; + } + } + + /** + * Does it start with end-brace? + * + * @param targetString Target-string. (NotNull) + * @return Determination. + */ + protected boolean isStartsWithEndBrace(String targetString) { + if (targetString == null) { + String msg = "Argument[targetString] must not be null: " + targetString; + throw new IllegalArgumentException(msg); + } + targetString = targetString.trim(); + if (targetString.startsWith(_endBrace)) { + return true; + } else { + return false; + } + } + + /** + * Does it end with end-brace? + * + * @param targetString Target-string. (NotNull) + * @return Determination. + */ + protected boolean isEndsWithEndBrace(String targetString) { + if (targetString == null) { + String msg = "Argument[targetString] must not be null: " + targetString; + throw new IllegalArgumentException(msg); + } + targetString = targetString.trim(); + if (targetString.endsWith(_endBrace)) { + return true; + } else { + return false; + } + } + + // ========================================================================================== + // Other + // ===== + /** + * Setup nest map. + * + * @param currentMap Current-map. (NotNull) + * @param mapKey Map-key. (NotNull) + * @return Nest map. (NotNull) + */ + protected Map${database.filterGenericsString('String, Object')} setupNestMap(Map${database.filterGenericsString('String, Object')} currentMap, String mapKey) { + final Map${database.filterGenericsString('String, Object')} nestMap = newStringObjectMap(); + currentMap.put(mapKey, nestMap); + return nestMap; + } + + /** + * Setup nest map. + * + * @param currentList Current-list. (NotNull) + * @return Nest map. (NotNull) + */ + protected Map${database.filterGenericsString('String, Object')} setupNestMap(List${database.filterGenericsString('Object')} currentList) { + final Map${database.filterGenericsString('String, Object')} nestMap = newStringObjectMap(); + currentList.add(nestMap); + return nestMap; + } + + /** + * Setup nest list. + * + * @param currentMap Current-map. (NotNull) + * @param mapKey Map-key. (NotNull) + * @return Nest list. (NotNull) + */ + protected List${database.filterGenericsString('Object')} setupNestList(Map${database.filterGenericsString('String, Object')} currentMap, String mapKey) { + final List${database.filterGenericsString('Object')} nestList = newObjectList(); + currentMap.put(mapKey, nestList); + return nestList; + } + + /** + * Setup nest list. + * + * @param currentList Current-list. (NotNull) + * @return Nest list. (NotNull) + */ + protected List${database.filterGenericsString('Object')} setupNestList(List${database.filterGenericsString('Object')} currentList) { + final List${database.filterGenericsString('Object')} nestList = newObjectList(); + currentList.add(nestList); + return nestList; + } + + /** + * New string-object-map. + * + * @return String-object-map. (NotNull) + */ + protected Map${database.filterGenericsString('String, Object')} newStringObjectMap() { + return new LinkedHashMap${database.filterGenericsString('String, Object')}(); + } + + /** + * New object-list. + * + * @return String-object-list. (NotNull) + */ + protected List${database.filterGenericsString('Object')} newObjectList() { + return new ArrayList${database.filterGenericsString('Object')}(); + } + + /** + * Get new-line and indent. + * + * @return New-line and indent. (NotNull) + */ + protected String getNewLineAndIndent() { + return NEW_LINE + " "; + } + + /** + * Get count that target string exist in the base string. + * + * @param targetString Target string. + * @param delimiter Delimiter + * @return Delimiter count that _remainderString contains. + */ + protected int getDelimiterCount(String targetString, String delimiter) { + int result = 0; + for (int i = 0;;) { + if (targetString.indexOf(delimiter, i) != -1) { + result++; + i = targetString.indexOf(delimiter, i) + 1; + } else { + break; + } + } + if (result == 0) { + result = -1; + } + return result; + } +} \ No newline at end of file Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/helper/MapStringBuilder.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/helper/MapStringBuilder.vm 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/helper/MapStringBuilder.vm 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,67 @@ +package ${glPackageBaseCommonHelper}; + +/** + * The interface of map-string-builder. + * + * @author ${database.ClassAuthor} + */ +public interface ${glMapStringBuilderName} { + + // ===================================================================================== + // Setter + // ====== + public void setColumnNames(String[] columnNames); + + public void setColumnNameList(java.util.List${database.filterGenericsString('String')} columnNameList); + + public void setMsMapMark(String value); + + public void setMsStartBrace(String value); + + public void setMsEndBrace(String value); + + public void setMsDelimiter(String value); + + public void setMsEqual(String value); + + // ===================================================================================== + // Main + // ==== + public String buildByDelimiter(String values, String delimiter); + + public String buildFromList(java.util.List${database.filterGenericsString('String')} valueList); + + // ===================================================================================== + // Exception Static Class + // ====================== + public static class DifferentDelimiterCountException extends RuntimeException { + + /** Serial version UID. (Default) */ + private static final long serialVersionUID = 1L; + + // ===================================================================================== + // Attribute + // ========= + protected java.util.List${database.filterGenericsString('String')} _columnNameList; + protected java.util.List${database.filterGenericsString('String')} _valueList; + + // ===================================================================================== + // Constructor + // =========== + public DifferentDelimiterCountException(String msg, java.util.List${database.filterGenericsString('String')} columnNameList, java.util.List${database.filterGenericsString('String')} valueList) { + super(msg); + _columnNameList = columnNameList; + _valueList = valueList; + } + + // ===================================================================================== + // Accessor + // ======== + public java.util.List${database.filterGenericsString('String')} getColumnNameList() { + return _columnNameList; + } + public java.util.List${database.filterGenericsString('String')} getValueList() { + return _valueList; + } + } +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/helper/MapStringBuilderImpl.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/helper/MapStringBuilderImpl.vm 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/helper/MapStringBuilderImpl.vm 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,177 @@ +package ${glPackageBaseCommonHelper}; + +import ${glPackageBaseCommonHelperTokenLine}.${glLineTokenName}; +import ${glPackageBaseCommonHelperTokenLine}.${glLineTokenizingOptionName}; +import ${glPackageBaseCommonHelperTokenLineImpl}.${glLineTokenImplName}; + +/** + * The implementation of map-string-builder. + * + * @author ${database.ClassAuthor} + */ +public class ${glMapStringBuilderImplName} implements ${glMapStringBuilderName} { + + protected java.util.List${database.filterGenericsString('String')} _columnNameList; + + protected String _msMapMark; + + protected String _msStartBrace; + + protected String _msEndBrace; + + protected String _msDelimiter; + + protected String _msEqual; + + protected boolean _trimDoubleQuotation; + + public void setColumnNames(String[] columnNames) { + _columnNameList = java.util.Arrays.asList(columnNames); + } + + public void setColumnNameList(java.util.List${database.filterGenericsString('String')} columnNameList) { + _columnNameList = columnNameList; + } + + public void setMsMapMark(String value) { + _msMapMark = value; + } + + public void setMsStartBrace(String value) { + _msStartBrace = value; + } + + public void setMsEndBrace(String value) { + _msEndBrace = value; + } + + public void setMsDelimiter(String value) { + _msDelimiter = value; + } + + public void setMsEqual(String value) { + _msEqual = value; + } + + public void trimDoubleQuotation() { + _trimDoubleQuotation = true; + } + + public String buildByDelimiter(String values, String delimiter) { + if (values == null) { + String msg = "The argument[values] should not be null."; + throw new IllegalArgumentException(msg); + } + if (delimiter == null) { + String msg = "The argument[delimiter] should not be null."; + throw new IllegalArgumentException(msg); + } + assertStringComponent(); + + final java.util.List${database.filterGenericsString('String')} valueList = tokenize(values, delimiter); + assertColumnValueList(_columnNameList, valueList); + + final StringBuffer sb = new StringBuffer(); + sb.append(_msMapMark).append(_msStartBrace); + for (int i = 0; i < _columnNameList.size(); i++ ) { + sb.append(_columnNameList.get(i)).append(_msEqual).append(valueList.get(i)).append(_msDelimiter); + } + + sb.delete(sb.length() - _msDelimiter.length(), sb.length()); + sb.append(_msEndBrace); + return sb.toString(); + } + + public String buildFromList(java.util.List${database.filterGenericsString('String')} valueList) { + if (valueList == null) { + String msg = "The argument[valueList] should not be null."; + throw new IllegalArgumentException(msg); + } + assertStringComponent(); + assertColumnValueList(_columnNameList, valueList); + + final StringBuffer sb = new StringBuffer(); + sb.append(_msMapMark).append(_msStartBrace); + for (int i = 0; i < _columnNameList.size(); i++ ) { + sb.append(_columnNameList.get(i)).append(_msEqual).append(valueList.get(i)).append(_msDelimiter); + } + + sb.delete(sb.length() - _msDelimiter.length(), sb.length()); + sb.append(_msEndBrace); + return sb.toString(); + } + + protected java.util.List${database.filterGenericsString('String')} tokenize(String value, String delimiter) { + final ${glLineTokenName} lineToken = new ${glLineTokenImplName}(); + final ${glLineTokenizingOptionName} lineTokenizingOption = new ${glLineTokenizingOptionName}(); + lineTokenizingOption.setDelimiter(delimiter); + if (_trimDoubleQuotation) { + lineTokenizingOption.trimDoubleQuotation(); + } + return lineToken.tokenize(value, lineTokenizingOption); + } + + protected void assertStringComponent() { + if (_columnNameList == null) { + String msg = "The columnNameList should not be null."; + throw new IllegalStateException(msg); + } + if (_columnNameList.isEmpty()) { + String msg = "The columnNameList should not be empty."; + throw new IllegalStateException(msg); + } + if (_msMapMark == null) { + String msg = "The msMapMark should not be null."; + throw new IllegalStateException(msg); + } + if (_msStartBrace == null) { + String msg = "The msStartBrace should not be null."; + throw new IllegalStateException(msg); + } + if (_msEndBrace == null) { + String msg = "The msEndBrace should not be null."; + throw new IllegalStateException(msg); + } + if (_msDelimiter == null) { + String msg = "The msDelimiter should not be null."; + throw new IllegalStateException(msg); + } + if (_msEqual == null) { + String msg = "The msEqual should not be null."; + throw new IllegalStateException(msg); + } + } + + protected void assertColumnValueList(java.util.List${database.filterGenericsString('String')} columnNameList, java.util.List${database.filterGenericsString('String')} valueList) { + if (columnNameList.size() != valueList.size()) { + String msg = "The length of columnNameList and valueList are difference. (" + columnNameList.size() + ", " + valueList.size() + ")"; + msg = msg + " columnNameList=" + columnNameList; + msg = msg + " valueList=" + valueList; + throw new DifferentDelimiterCountException(msg, columnNameList, valueList); + } + } + + protected static final String replace(String text, String fromText, String toText) { + if (text == null || fromText == null || toText == null) { + return null; + } + final StringBuffer buf = new StringBuffer(100); + int pos = 0; + int pos2 = 0; + while (true) { + pos = text.indexOf(fromText, pos2); + if (pos == 0) { + buf.append(toText); + pos2 = fromText.length(); + } else if (pos > 0) { + buf.append(text.substring(pos2, pos)); + buf.append(toText); + pos2 = pos + fromText.length(); + } else { + buf.append(text.substring(pos2)); + break; + } + } + return buf.toString(); + } +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/helper/character/GeneralCharacter.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/helper/character/GeneralCharacter.vm 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/helper/character/GeneralCharacter.vm 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,17 @@ +package ${glPackageBaseCommonHelperCharacter}; + +/** + * The interface of general character. + * + * @author ${database.ClassAuthor} + */ +public interface ${glGeneralCharacterName} { + + public String toSingleByteAlphabet(String s); + + public String toSingleByteNumber(String s); + + public String toSingleByteAlphabetNumber(String target); + + public String toSingleByteAlphabetNumberMark(String target); +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/helper/character/JapaneseCharacter.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/helper/character/JapaneseCharacter.vm 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/helper/character/JapaneseCharacter.vm 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,11 @@ +package ${glPackageBaseCommonHelperCharacter}; + +/** + * The interface of Japanese character. + * + * @author ${database.ClassAuthor} + */ +public interface ${glJapaneseCharacterName} { + + public String toDoubleByteKatakana(String target); +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/helper/character/impl/GeneralCharacterImpl.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/helper/character/impl/GeneralCharacterImpl.vm 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/helper/character/impl/GeneralCharacterImpl.vm 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,100 @@ +package ${glPackageBaseCommonHelperCharacterImpl}; + +import ${glPackageBaseCommonHelperCharacter}.${glGeneralCharacterName}; + +/** + * The implementation of general character. + * + * @author ${database.ClassAuthor} + */ +public class ${glGeneralCharacterImplName} implements ${glGeneralCharacterName} { + + public String toSingleByteAlphabet(String target) { + if (target == null || target.trim().length() == 0) { + return target; + } + final StringBuffer sb = new StringBuffer(); + for (int i = 0; i < target.length(); i++) { + final char currentChar = target.charAt(i); + + if (currentChar >= 0xff21 && currentChar <= 0xff3a) { + sb.append(toSingleByteCharacter(currentChar)); + } else if (currentChar >= 0xff41 && currentChar <= 0xff5a) { + sb.append(toSingleByteCharacter(currentChar)); + } else { + sb.append(currentChar); + } + } + return sb.toString(); + } + + public String toSingleByteNumber(String target) { + if (target == null || target.trim().length() == 0) { + return target; + } + final StringBuffer sb = new StringBuffer(); + for (int i = 0; i < target.length(); i++) { + final char currentChar = target.charAt(i); + if (currentChar >= 0xff10 && currentChar <= 0xff19) { + sb.append(toSingleByteCharacter(currentChar)); + } else { + sb.append(currentChar); + } + } + return sb.toString(); + } + + public String toSingleByteAlphabetNumber(String target) { + if (target == null || target.trim().length() == 0) { + return target; + } + final StringBuffer sb = new StringBuffer(); + for (int i = 0; i < target.length(); i++) { + final char currentChar = target.charAt(i); + + if (currentChar >= 0xff10 && currentChar <= 0xff19) { + sb.append(toSingleByteCharacter(currentChar)); + } else if (currentChar >= 0xff21 && currentChar <= 0xff3a) { + sb.append(toSingleByteCharacter(currentChar)); + } else if (currentChar >= 0xff41 && currentChar <= 0xff5a) { + sb.append(toSingleByteCharacter(currentChar)); + } else { + sb.append(currentChar); + } + } + return sb.toString(); + } + + public String toSingleByteAlphabetNumberMark(String target) { + if (target == null || target.trim().length() == 0) { + return target; + } + final StringBuffer sb = new StringBuffer(target.length()); + for (int i = 0; i < target.length(); i++) { + final char currentChar = target.charAt(i); + if (currentChar >= 0xff01 && currentChar <= 0xff5e) { + sb.append(toSingleByteCharacter(currentChar)); + + // TODO: @jflute - I will append mark... + } else if (currentChar == '\u2019' || currentChar == '\u2018' || currentChar == '\u2032') { + sb.append('\''); + } else if (currentChar == '\u201d' || currentChar == '\u201c' || currentChar == '\u2033') { + sb.append('\"'); + } else if (currentChar == '\uffe5') { + sb.append('\\'); + } else if (currentChar == '\u2010') { + sb.append('-'); + } else if (currentChar == '\uff5e') { + sb.append('~'); + + } else { + sb.append(currentChar); + } + } + return sb.toString(); + } + + protected char toSingleByteCharacter(final char currentChar) { + return (char) (currentChar - 0xfee0); + } +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/helper/character/impl/JapaneseCharacterImpl.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/helper/character/impl/JapaneseCharacterImpl.vm 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/helper/character/impl/JapaneseCharacterImpl.vm 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,87 @@ +package ${glPackageBaseCommonHelperCharacterImpl}; + +import ${glPackageBaseCommonHelperCharacter}.${glJapaneseCharacterName}; + +/** + * The implementation of Japanese character. + * + * @author ${database.ClassAuthor} + */ +public class ${glJapaneseCharacterImplName} implements ${glJapaneseCharacterName} { + + // Double-byte Katakana + protected static final String TABLE_ZENKANA = + "\u3002\u300c\u300d\u3001\u30fb\u30f2\u30a1\u30a3\u30a5" + + "\u30a7\u30a9\u30e3\u30e5\u30e7\u30c3\u30fc\u30a2\u30a4" + + "\u30a6\u30a8\u30aa\u30ab\u30ad\u30af\u30b1\u30b3\u30b5" + + "\u30b7\u30b9\u30bb\u30bd\u30bf\u30c1\u30c4\u30c6\u30c8" + + "\u30ca\u30cb\u30cc\u30cd\u30ce\u30cf\u30d2\u30d5\u30d8" + + "\u30db\u30de\u30df\u30e0\u30e1\u30e2\u30e4\u30e6\u30e8" + + "\u30e9\u30ea\u30eb\u30ec\u30ed\u30ef\u30f3\u309b\u309c"; + + // (uff71 - uff9d) + protected static final String DEF_DOUBLE_BYTE_VOICED_SOUND_NORMAL_KATAKANA = + "\u30a2\u30a4\u30f4\u30a8\u30aa" + + "\u30ac\u30ae\u30b0\u30b2\u30b4" + + "\u30b6\u30b8\u30ba\u30bc\u30be" + + "\u30c0\u30c2\u30c5\u30c7\u30c9" + + "\u30ca\u30cb\u30cc\u30cd\u30ce" + + "\u30d0\u30d3\u30d6\u30d9\u30dc" + + "\u30de\u30df\u30e0\u30e1\u30e2" + + "\u30e4\u30e6\u30e8" + + "\u30e9\u30ea\u30eb\u30ec\u30ed" + + "\u30ef\u30f3"; + + // (uff66 - uff6f) + protected static final String DEF_DOUBLE_BYTE_VOICED_SOUND_SPECIAL_KATAKANA = "\u30fa\u30a1\u30a3\u30a5\u30a7\u30a9\u30e3\u30e5\u30e7"; + + // (u30cf - u30dd) + protected static final String DEF_DOUBLE_BYTE_SEMI_VOICED_SOUND_KATAKANA = "\u30d1\u30d4\u30d7\u30da\u30dd"; + + public String toDoubleByteKatakana(String target) { + if (target == null || target.trim().length() == 0) { + return target; + } + + final StringBuffer sb = new StringBuffer(); + for (int i = 0; i < target.length(); i++) { + final char currentChar = target.charAt(i); + final char nextChar; + if (i < target.length() - 1) { + nextChar = target.charAt(i + 1); + } else { + nextChar = ' '; + } + + if (isVoicedSoundKatakana(currentChar, nextChar)) { + if (currentChar >= 0xff66 && currentChar <= 0xff6f) {// Voiced sound special Katakana + sb.append(DEF_DOUBLE_BYTE_VOICED_SOUND_SPECIAL_KATAKANA.charAt(currentChar - 0xff66)); + i++; + } else if (currentChar >= 0xff71 && currentChar <= 0xff9d) {// Voiced sound normal Katakana + sb.append(DEF_DOUBLE_BYTE_VOICED_SOUND_NORMAL_KATAKANA.charAt(currentChar - 0xff71)); + i++; + } + + } else if (isSemiVoicedSoundKatakana(currentChar, nextChar)) { + sb.append(DEF_DOUBLE_BYTE_SEMI_VOICED_SOUND_KATAKANA.charAt(currentChar - 0xff8a)); + i++; + } else if (currentChar != 0xff9e && currentChar != 0xff9f) { + if (currentChar >= 0xff61 && currentChar <= 0xff9f) { + sb.append(TABLE_ZENKANA.charAt(currentChar - 0xff61)); + } else { + sb.append(currentChar); + } + } + } + return sb.toString(); + } + + protected boolean isVoicedSoundKatakana(final char currentChar, final char nextChar) { + return ((currentChar >= 0xff66 && currentChar <= 0xff6f) || (currentChar >= 0xff71 && (currentChar <= 0xff9d))) + && (nextChar == 0xff9e); + } + + protected boolean isSemiVoicedSoundKatakana(final char currentChar, final char nextChar) { + return (currentChar >= 0xff8a && currentChar <= 0xff8e) && (nextChar == 0xff9f); + } +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/helper/token/file/FileMakingCallback.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/helper/token/file/FileMakingCallback.vm 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/helper/token/file/FileMakingCallback.vm 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,17 @@ +package ${glPackageBaseCommonHelperTokenFile}; + +/** + * @author ${database.ClassAuthor} + */ +public interface ${glFileMakingCallbackName} { + + /** + * Get file-making header information. + *
+     * You should return your row resource for file-making.
+     * It continues invoking until this method returns null.
+     * 
+ * @return File-making header information. (Nullable) + */ + public ${glFileMakingRowResourceName} getRowResource(); +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/helper/token/file/FileMakingHeaderInfo.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/helper/token/file/FileMakingHeaderInfo.vm 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/helper/token/file/FileMakingHeaderInfo.vm 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,23 @@ +package ${glPackageBaseCommonHelperTokenFile}; + +import java.util.List; + +/** + * @author ${database.ClassAuthor} + */ +public class ${glFileMakingHeaderInfoName} { + + protected List${database.filterGenericsString('String')} columnNameList = new java.util.ArrayList${database.filterGenericsString('String')}(); + + public List${database.filterGenericsString('String')} getColumnNameList() { + return columnNameList; + } + + public void setColumnNameList(List${database.filterGenericsString('String')} columnNameList) { + this.columnNameList = columnNameList; + } + + public boolean isEmpty() { + return this.columnNameList.isEmpty(); + } +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/helper/token/file/FileMakingOption.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/helper/token/file/FileMakingOption.vm 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/helper/token/file/FileMakingOption.vm 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,103 @@ +package ${glPackageBaseCommonHelperTokenFile}; + +/** + * @author ${database.ClassAuthor} + */ +public class ${glFileMakingOptionName} { + + // ===================================================================================== + // Attribute + // ========= + /** Encoding. (Required) */ + protected String _encoding; + + /** Delimiter. (Required) */ + protected String _delimiter; + + /** Line separator. (NotRequired) */ + protected String _lineSeparator; + + /** Good bye double quotation. (NotRequired) */ + protected boolean _goodByeDoubleQuotation; + + /** File-making header information. (NotRequired) */ + protected ${glFileMakingHeaderInfoName} _fileMakingHeaderInfo; + + // ===================================================================================== + // Easy-to-Use + // =========== + public ${glFileMakingOptionName} delimitateByComma() { + _delimiter = ","; + return this; + } + + public ${glFileMakingOptionName} delimitateByTab() { + _delimiter = "\t"; + return this; + } + + public ${glFileMakingOptionName} encodeAsUTF8() { + _encoding = "UTF-8"; + return this; + } + + public ${glFileMakingOptionName} encodeAsWindows31J() { + _encoding = "Windows-31J"; + return this; + } + + public ${glFileMakingOptionName} separateCrLf() { + _lineSeparator = "\r\n"; + return this; + } + + public ${glFileMakingOptionName} separateLf() { + _lineSeparator = "\n"; + return this; + } + + public ${glFileMakingOptionName} goodByeDoubleQuotation() { + _goodByeDoubleQuotation = true; + return this; + } + + // ===================================================================================== + // Accessor + // ======== + public String getEncoding() { + return _encoding; + } + + public void setEncoding(String encoding) { + _encoding = encoding; + } + + public String getDelimiter() { + return _delimiter; + } + + public void setDelimiter(String delimiter) { + _delimiter = delimiter; + } + + public String getLineSeparator() { + return _lineSeparator; + } + + public void setLineSeparator(String lineSeparator) { + _lineSeparator = lineSeparator; + } + + public boolean isGoodByeDoubleQuotation() { + return _goodByeDoubleQuotation; + } + + public ${glFileMakingHeaderInfoName} getFileMakingHeaderInfo() { + return _fileMakingHeaderInfo; + } + + public void setFileMakingHeaderInfo(${glFileMakingHeaderInfoName} fileMakingHeaderInfo) { + _fileMakingHeaderInfo = fileMakingHeaderInfo; + } + +} \ No newline at end of file Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/helper/token/file/FileMakingRowResource.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/helper/token/file/FileMakingRowResource.vm 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/helper/token/file/FileMakingRowResource.vm 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,23 @@ +package ${glPackageBaseCommonHelperTokenFile}; + +/** + * @author ${database.ClassAuthor} + */ +public class ${glFileMakingRowResourceName} { + + // ===================================================================================== + // Attribute + // ========= + protected java.util.List${database.filterGenericsString('String')} _valueList; + + // ===================================================================================== + // Accessor + // ======== + public java.util.List${database.filterGenericsString('String')} getValueList() { + return _valueList; + } + + public void setValueList(java.util.List${database.filterGenericsString('String')} valueList) { + this._valueList = valueList; + } +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/helper/token/file/FileMakingSimpleFacade.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/helper/token/file/FileMakingSimpleFacade.vm 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/helper/token/file/FileMakingSimpleFacade.vm 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,29 @@ +package ${glPackageBaseCommonHelperTokenFile}; + +/** + * @author ${database.ClassAuthor} + */ +public interface ${glFileMakingSimpleFacadeName} { + + /** + * Make token-file from row-list. + * + * @param filename Output target file name. (NotNull) + * @param rowList Row-list composed of value-list. (NotNull) + * @param fileMakingOption File-making option. (NotNull and Required{encoding and delimiter}) + * @throws java.io.FileNotFoundException + * @throws java.io.IOException + */ + public void makeFromRowList(final String filename, final java.util.List${database.filterGenericsString('java.util.List')} rowList, final ${glFileMakingOptionName} fileMakingOption) throws java.io.FileNotFoundException, java.io.IOException; + + /** + * Make bytes from row-list. + * + * @param rowList Row-list composed of value-list. (NotNull) + * @param fileMakingOption File-making option. (NotNull and Required{encoding and delimiter}) + * @return Result byte array. (NotNull) + * @throws java.io.FileNotFoundException + * @throws java.io.IOException + */ + public byte[] makeFromRowList(final java.util.List${database.filterGenericsString('java.util.List')} rowList, final ${glFileMakingOptionName} fileMakingOption) throws java.io.FileNotFoundException, java.io.IOException; +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/helper/token/file/FileToken.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/helper/token/file/FileToken.vm 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/helper/token/file/FileToken.vm 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,59 @@ +package ${glPackageBaseCommonHelperTokenFile}; + +/** + * File-Token. + * + * @author ${database.ClassAuthor} + */ +public interface ${glFileTokenName} { + + /** + * Tokenize token-file data of a specified file. + * + * @param filename Input target file name. (NotNull) + * @param fileTokenizingCallback File-tokenizing callback. (NotNull) + * @param fileTokenizingOption File-tokenizing option. (NotNull and Required{encoding and delimiter}) + * @throws java.io.FileNotFoundException + * @throws java.io.IOException + */ + public void tokenize(String filename, ${glFileTokenizingCallbackName} fileTokenizingCallback, ${glFileTokenizingOptionName} fileTokenizingOption) throws java.io.FileNotFoundException, java.io.IOException; + + /** + * Tokenize token-file data of a specified file. + *
+     * This method uses java.io.InputStreamReader and java.io.BufferedReader that wrap the argument[inputStream].
+     * These objects are closed. (Invoking close() at finally)
+     * 
+ * @param inputStream Input target stream. (NotNull) + * @param fileTokenizingCallback File-tokenizing callback. (NotNull) + * @param fileTokenizingOption File-tokenizing option. (NotNull and Required{encoding and delimiter}) + * @throws java.io.FileNotFoundException + * @throws java.io.IOException + */ + public void tokenize(java.io.InputStream inputStream, ${glFileTokenizingCallbackName} fileTokenizingCallback, ${glFileTokenizingOptionName} fileTokenizingOption) throws java.io.FileNotFoundException, java.io.IOException; + + /** + * Make token-file from specified row resources. + * + * @param filename Output target file name. (NotNull) + * @param fileMakingCallback File-making callback. (NotNull) + * @param fileMakingOption File-making option. (NotNull and Required{encoding and delimiter}) + * @throws java.io.FileNotFoundException + * @throws java.io.IOException + */ + public void make(String filename, ${glFileMakingCallbackName} fileMakingCallback, ${glFileMakingOptionName} fileMakingOption) throws java.io.FileNotFoundException, java.io.IOException; + + /** + * Make token-file from specified row resources. + *
+     * This method uses java.io.BufferedOutputStream and java.io.OutputStreamWriter that wrap the argument[outputStream].
+     * These objects are closed. (Invoking close() at finally)
+     * 
+ * @param outputStream Output target stream. (NotNull) + * @param fileMakingCallback File-making callback. (NotNull) + * @param fileMakingOption File-making option. (NotNull and Required{encoding and delimiter}) + * @throws java.io.FileNotFoundException + * @throws java.io.IOException + */ + public void make(java.io.OutputStream outputStream, ${glFileMakingCallbackName} fileMakingCallback, ${glFileMakingOptionName} fileMakingOption) throws java.io.FileNotFoundException, java.io.IOException; +} \ No newline at end of file Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/helper/token/file/FileTokenizingCallback.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/helper/token/file/FileTokenizingCallback.vm 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/helper/token/file/FileTokenizingCallback.vm 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,8 @@ +package ${glPackageBaseCommonHelperTokenFile}; + +/** + * @author ${database.ClassAuthor} + */ +public interface ${glFileTokenizingCallbackName} { + public void handleRowResource(${glFileTokenizingRowResourceName} fileTokenizingRowResource); +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/helper/token/file/FileTokenizingHeaderInfo.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/helper/token/file/FileTokenizingHeaderInfo.vm 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/helper/token/file/FileTokenizingHeaderInfo.vm 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,42 @@ +package ${glPackageBaseCommonHelperTokenFile}; + +import java.util.List; + +/** + * @author ${database.ClassAuthor} + */ +public class ${glFileTokenizingHeaderInfoName} { + + // ===================================================================================== + // Attribute + // ========= + protected List${database.filterGenericsString('String')} _columnNameList = new java.util.ArrayList${database.filterGenericsString('String')}(); + + // ===================================================================================== + // Easy-to-Use + // =========== + protected String _columnNameRowString; + + public boolean isEmpty() { + return this._columnNameList.isEmpty(); + } + + // ===================================================================================== + // Accessor + // ======== + public List${database.filterGenericsString('String')} getColumnNameList() { + return _columnNameList; + } + + public void setColumnNameList(List${database.filterGenericsString('String')} columnNameList) { + this._columnNameList = columnNameList; + } + + public String getColumnNameRowString() { + return _columnNameRowString; + } + + public void setColumnNameRowString(String columnNameRowString) { + _columnNameRowString = columnNameRowString; + } +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/helper/token/file/FileTokenizingOption.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/helper/token/file/FileTokenizingOption.vm 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/helper/token/file/FileTokenizingOption.vm 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,78 @@ +package ${glPackageBaseCommonHelperTokenFile}; + +/** + * @author ${database.ClassAuthor} + */ +public class ${glFileTokenizingOptionName} { + + // ===================================================================================== + // Attribute + // ========= + protected String _encoding; + + protected String _delimiter; + + protected boolean _beginFirstLine; + + protected boolean _handleEmptyAsNull; + + // ===================================================================================== + // Easy-to-Use + // =========== + public ${glFileTokenizingOptionName} delimitateByComma() { + _delimiter = ","; + return this; + } + + public ${glFileTokenizingOptionName} delimitateByTab() { + _delimiter = "\t"; + return this; + } + + public ${glFileTokenizingOptionName} encodeAsUTF8() { + _encoding = "UTF-8"; + return this; + } + + public ${glFileTokenizingOptionName} encodeAsWindows31J() { + _encoding = "Windows-31J"; + return this; + } + + public ${glFileTokenizingOptionName} beginFirstLine() { + _beginFirstLine = true; + return this; + } + + public ${glFileTokenizingOptionName} handleEmptyAsNull() { + _handleEmptyAsNull = true; + return this; + } + + // ===================================================================================== + // Accessor + // ======== + public String getDelimiter() { + return _delimiter; + } + + public void setDelimiter(String delimiter) { + _delimiter = delimiter; + } + + public String getEncoding() { + return _encoding; + } + + public void setEncoding(String encoding) { + _encoding = encoding; + } + + public boolean isBeginFirstLine() { + return _beginFirstLine; + } + + public boolean isHandleEmptyAsNull() { + return _handleEmptyAsNull; + } +} \ No newline at end of file Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/helper/token/file/FileTokenizingRowResource.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/helper/token/file/FileTokenizingRowResource.vm 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/helper/token/file/FileTokenizingRowResource.vm 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,65 @@ +package ${glPackageBaseCommonHelperTokenFile}; + +/** + * @author ${database.ClassAuthor} + */ +public class ${glFileTokenizingRowResourceName} { + + // ===================================================================================== + // Attribute + // ========= + protected ${glFileTokenizingHeaderInfoName} fileTokenizingHeaderInfo; + + protected java.util.List${database.filterGenericsString('String')} valueList; + + protected String rowString; + + /** The row number. */ + protected int _rowNumber; + + /** The line number. */ + protected int _lineNumber; + + // ===================================================================================== + // Accessor + // ======== + public ${glFileTokenizingHeaderInfoName} getFileTokenizingHeaderInfo() { + return fileTokenizingHeaderInfo; + } + + public void setFirstLineInfo(${glFileTokenizingHeaderInfoName} fileTokenizingHeaderInfo) { + this.fileTokenizingHeaderInfo = fileTokenizingHeaderInfo; + } + + public java.util.List${database.filterGenericsString('String')} getValueList() { + return valueList; + } + + public void setValueList(java.util.List${database.filterGenericsString('String')} valueList) { + this.valueList = valueList; + } + + public String getRowString() { + return rowString; + } + + public void setRowString(String rowString) { + this.rowString = rowString; + } + + public int getRowNumber() { + return _rowNumber; + } + + public void setRowNumber(int rowNumber) { + _rowNumber = rowNumber; + } + + public int getLineNumber() { + return _lineNumber; + } + + public void setLineNumber(int lineNumber) { + _lineNumber = lineNumber; + } +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/helper/token/file/impl/FileMakingSimpleFacadeImpl.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/helper/token/file/impl/FileMakingSimpleFacadeImpl.vm 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/helper/token/file/impl/FileMakingSimpleFacadeImpl.vm 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,74 @@ +package ${glPackageBaseCommonHelperTokenFileImpl}; + +import ${glPackageBaseCommonHelperTokenFile}.${glFileTokenName}; + +import ${glPackageBaseCommonHelperTokenFile}.${glFileMakingCallbackName}; +import ${glPackageBaseCommonHelperTokenFile}.${glFileMakingOptionName}; +import ${glPackageBaseCommonHelperTokenFile}.${glFileMakingRowResourceName}; +import ${glPackageBaseCommonHelperTokenFile}.${glFileMakingSimpleFacadeName}; + +/** + * @author ${database.ClassAuthor} + */ +public class ${glFileMakingSimpleFacadeImplName} implements ${glFileMakingSimpleFacadeName} { + + protected ${glFileTokenName} _fileToken = new ${glFileTokenImplName}(); + + public void setFileToken(${glFileTokenName} fileToken) { + this._fileToken = fileToken; + } + + /** + * Make token-file from row-list. + * + * @param filename Output target file name. (NotNull) + * @param rowList Row-list composed of value-list. (NotNull) + * @param fileMakingOption File-making option. (NotNull and Required{encoding and delimiter}) + * @throws java.io.FileNotFoundException + * @throws java.io.IOException + */ + public void makeFromRowList(final String filename, final java.util.List${database.filterGenericsString('java.util.List')} rowList, final ${glFileMakingOptionName} fileMakingOption) throws java.io.FileNotFoundException, java.io.IOException { + final ${glFileMakingCallbackName} fileMakingCallback = new ${glFileMakingCallbackName}() { + protected int rowCount = 0; + public ${glFileMakingRowResourceName} getRowResource() { + ++rowCount; + if (rowList.size() < rowCount) { + return null;// The End! + } + final java.util.List${database.filterGenericsString('String')} valueList = (java.util.List${database.filterGenericsString('String')})rowList.get(rowCount - 1); + final ${glFileMakingRowResourceName} fileMakingRowResource = new ${glFileMakingRowResourceName}(); + fileMakingRowResource.setValueList(valueList); + return fileMakingRowResource; + } + }; + _fileToken.make(filename, fileMakingCallback, fileMakingOption); + } + + /** + * Make bytes from row-list. + * + * @param rowList Row-list composed of value-list. (NotNull) + * @param fileMakingOption File-making option. (NotNull and Required{encoding and delimiter}) + * @return Result byte array. (NotNull) + * @throws java.io.FileNotFoundException + * @throws java.io.IOException + */ + public byte[] makeFromRowList(final java.util.List${database.filterGenericsString('java.util.List')} rowList, final ${glFileMakingOptionName} fileMakingOption) throws java.io.FileNotFoundException, java.io.IOException { + final ${glFileMakingCallbackName} fileMakingCallback = new ${glFileMakingCallbackName}() { + protected int rowCount = 0; + public ${glFileMakingRowResourceName} getRowResource() { + ++rowCount; + if (rowList.size() < rowCount) { + return null;// The End! + } + final java.util.List${database.filterGenericsString('String')} valueList = (java.util.List${database.filterGenericsString('String')})rowList.get(rowCount - 1); + final ${glFileMakingRowResourceName} fileMakingRowResource = new ${glFileMakingRowResourceName}(); + fileMakingRowResource.setValueList(valueList); + return fileMakingRowResource; + } + }; + final java.io.ByteArrayOutputStream baos = new java.io.ByteArrayOutputStream(); + _fileToken.make(baos, fileMakingCallback, fileMakingOption); + return baos.toByteArray(); + } +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/helper/token/file/impl/FileTokenImpl.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/helper/token/file/impl/FileTokenImpl.vm 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/helper/token/file/impl/FileTokenImpl.vm 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,502 @@ +package ${glPackageBaseCommonHelperTokenFileImpl}; + +import java.util.List; +import java.util.ArrayList; + +import ${glPackageBaseCommonHelperTokenFile}.${glFileTokenName}; + +import ${glPackageBaseCommonHelperTokenFile}.${glFileTokenizingCallbackName}; +import ${glPackageBaseCommonHelperTokenFile}.${glFileTokenizingOptionName}; +import ${glPackageBaseCommonHelperTokenFile}.${glFileTokenizingRowResourceName}; +import ${glPackageBaseCommonHelperTokenFile}.${glFileTokenizingHeaderInfoName}; + +import ${glPackageBaseCommonHelperTokenFile}.${glFileMakingCallbackName}; +import ${glPackageBaseCommonHelperTokenFile}.${glFileMakingOptionName}; +import ${glPackageBaseCommonHelperTokenFile}.${glFileMakingRowResourceName}; +import ${glPackageBaseCommonHelperTokenFile}.${glFileMakingHeaderInfoName}; + +import ${glPackageBaseCommonHelperTokenLine}.${glLineTokenName}; +import ${glPackageBaseCommonHelperTokenLine}.${glLineTokenizingOptionName}; +import ${glPackageBaseCommonHelperTokenLine}.${glLineMakingOptionName}; +import ${glPackageBaseCommonHelperTokenLineImpl}.${glLineTokenImplName}; + +/** + * @author ${database.ClassAuthor} + */ +public class ${glFileTokenImplName} implements ${glFileTokenName} { + + // ===================================================================================== + // Attribute + // ========= + /** Line-token for help. */ + protected final ${glLineTokenName} _lineToken = new ${glLineTokenImplName}(); + + // ===================================================================================== + // Main + // ==== + /** + * Tokenize token-file data of a specified file. + * + * @param filename File name. (NotNull) + * @param fileTokenizingCallback File-tokenizing callback. (NotNull) + * @param fileTokenizingOption File-tokenizing option. (NotNull and Required{encoding and delimiter}) + * @throws java.io.FileNotFoundException + * @throws java.io.IOException + */ + public void tokenize(String filename, ${glFileTokenizingCallbackName} fileTokenizingCallback, ${glFileTokenizingOptionName} fileTokenizingOption) throws java.io.FileNotFoundException, java.io.IOException { + assertStringNotNullAndNotTrimmedEmpty("filename", filename); + + java.io.FileInputStream fis = null; + try { + fis = new java.io.FileInputStream(filename); + tokenize(fis, fileTokenizingCallback, fileTokenizingOption); + } catch (java.io.FileNotFoundException e) { + throw e; + } catch (java.io.IOException e) { + throw e; + } finally { + try { + if (fis != null) { + fis.close(); + } + } catch (java.io.IOException ignored) { + } + } + } + + + /** + * Tokenize token-file data of a specified file. + *
+     * This method uses java.io.InputStreamReader and java.io.BufferedReader that wrap the argument[inputStream].
+     * These objects are closed. (Invoking close() at finally)
+     * 
+ * @param inputStream Input target stream. (NotNull) + * @param fileTokenizingCallback File-tokenizing callback. (NotNull) + * @param fileTokenizingOption File-tokenizing option. (NotNull and Required{encoding and delimiter}) + * @throws java.io.FileNotFoundException + * @throws java.io.IOException + */ + public void tokenize(java.io.InputStream inputStream, ${glFileTokenizingCallbackName} fileTokenizingCallback, ${glFileTokenizingOptionName} fileTokenizingOption) throws java.io.FileNotFoundException, java.io.IOException { + assertObjectNotNull("inputStream", inputStream); + assertObjectNotNull("fileTokenizingCallback", fileTokenizingCallback); + assertObjectNotNull("fileTokenizingOption", fileTokenizingOption); + final String delimiter = fileTokenizingOption.getDelimiter(); + final String encoding = fileTokenizingOption.getEncoding(); + assertStringNotNullAndNotTrimmedEmpty("encoding", encoding); + assertObjectNotNull("delimiter", delimiter); + + java.io.InputStreamReader ir = null; + java.io.BufferedReader br = null; + + String lineString = null; + String preContinueString = ""; + final List${database.filterGenericsString('String')} temporaryValueList = new ArrayList${database.filterGenericsString('String')}(); + final List${database.filterGenericsString('String')} filteredValueList = new ArrayList${database.filterGenericsString('String')}(); + + try { + ir = new java.io.InputStreamReader(inputStream, encoding); + br = new java.io.BufferedReader(ir); + + ${glFileTokenizingHeaderInfoName} fileTokenizingHeaderInfo = null; + int count = -1; + int rowNumber = 1; + int lineNumber = 0; + while (true) { + ++count; + if ("".equals(preContinueString)) { + lineNumber = count + 1; + } + + lineString = br.readLine(); + if (lineString == null) { + break; + } + if (count == 0) { + if (fileTokenizingOption.isBeginFirstLine()) { + fileTokenizingHeaderInfo = new ${glFileTokenizingHeaderInfoName}();// As empty + } else { + fileTokenizingHeaderInfo = analyzeHeaderInfo(delimiter, lineString); + continue; + } + } + final String rowString; + if (preContinueString.equals("")) { + rowString = lineString; + } else { + final String lineSeparator = System.getProperty("line.separator"); + rowString = preContinueString + lineSeparator + lineString; + } + final ValueLineInfo valueLineInfo = arrangeValueList(rowString, delimiter); + final List${database.filterGenericsString('String')} ls = valueLineInfo.getValueList(); + if (valueLineInfo.isContinueNextLine()) { + preContinueString = (String)ls.remove(ls.size() - 1); + temporaryValueList.addAll(ls); + continue; + } + temporaryValueList.addAll(ls); + + try { + final ${glFileTokenizingRowResourceName} fileTokenizingRowResource = new ${glFileTokenizingRowResourceName}(); + fileTokenizingRowResource.setFirstLineInfo(fileTokenizingHeaderInfo); + + if (fileTokenizingOption.isHandleEmptyAsNull()) { + for (final java.util.Iterator ite = temporaryValueList.iterator(); ite.hasNext(); ) { + final String value = (String)ite.next(); + if ("".equals(value)) { + filteredValueList.add(null); + } else { + filteredValueList.add(value); + } + } + fileTokenizingRowResource.setValueList(filteredValueList); + } else { + fileTokenizingRowResource.setValueList(temporaryValueList); + } + + fileTokenizingRowResource.setRowString(rowString); + fileTokenizingRowResource.setRowNumber(rowNumber); + fileTokenizingRowResource.setLineNumber(lineNumber); + fileTokenizingCallback.handleRowResource(fileTokenizingRowResource); + } finally { + ++rowNumber; + temporaryValueList.clear(); + filteredValueList.clear(); + preContinueString = ""; + } + } + } catch (java.io.FileNotFoundException e) { + throw e; + } catch (java.io.IOException e) { + throw e; + } finally { + try { + if (ir != null) { + ir.close(); + } + if (br != null) { + br.close(); + } + } catch (java.io.IOException ignored) { + } + } + } + + protected ValueLineInfo arrangeValueList(final String lineString, String delimiter) { + final List${database.filterGenericsString('String')} valueList = new ArrayList${database.filterGenericsString('String')}(); + + // Don't use split! + // final String[] values = lineString.split(delimiter); + final ${glLineTokenizingOptionName} tokenizingOption = new ${glLineTokenizingOptionName}(); + tokenizingOption.setDelimiter(delimiter); + final List${database.filterGenericsString('String')} list = _lineToken.tokenize(lineString, tokenizingOption); + final String[] values = (String[])list.toArray(new String[list.size()]); + for (int i=0; i < values.length; i++) { + valueList.add(values[i]); + } + return arrangeValueList(valueList, delimiter); + } + + protected ValueLineInfo arrangeValueList(List${database.filterGenericsString('String')} valueList, String delimiter) { + final ValueLineInfo valueLineInfo = new ValueLineInfo(); + final ArrayList${database.filterGenericsString('String')} resultList = new ArrayList${database.filterGenericsString('String')}(); + String preString = ""; + for (int i = 0; i < valueList.size(); i++) { + final String value = (String)valueList.get(i); + if (value == null) { + continue; + } + if (i == valueList.size() - 1) {// The last loop + if (preString.equals("")) { + if (isFrontQOnly(value)) { + valueLineInfo.setContinueNextLine(true); + resultList.add(value); + break; + } else if (isRearQOnly(value)) { + resultList.add(value); + break; + } else if (isNotBothQ(value)) { + resultList.add(value); + break; + } else { + resultList.add(removeDoubleQuotation(value)); + break; + } + } else { + if (isFrontQOnly(value)) { + valueLineInfo.setContinueNextLine(true); + resultList.add(connectPreString(preString, delimiter, value)); + break; + } else if (isRearQOnly(value)) { + resultList.add(removeDoubleQuotation(connectPreString(preString, delimiter, value))); + break; + } else if (isNotBothQ(value)) { + valueLineInfo.setContinueNextLine(true); + resultList.add(connectPreString(preString, delimiter, value)); + break; + } else { + resultList.add(removeDoubleQuotation(connectPreString(preString, delimiter, value))); + break; + } + } + } + + if (preString.equals("")) { + if (isFrontQOnly(value)) { + preString = value; + continue; + } else if (isRearQOnly(value)) { + preString = value; + continue; + } else if (isNotBothQ(value)) { + resultList.add(value); + } else { + resultList.add(removeDoubleQuotation(value)); + } + } else { + if (isFrontQOnly(value)) { + preString = connectPreString(preString, delimiter, value); + continue; + } else if (isRearQOnly(value)) { + resultList.add(removeDoubleQuotation(connectPreString(preString, delimiter, value))); + } else if (isNotBothQ(value)) { + preString = connectPreString(preString, delimiter, value); + continue; + } else { + resultList.add(removeDoubleQuotation(connectPreString(preString, delimiter, value))); + } + } + preString = ""; + } + valueLineInfo.setValueList(resultList); + return valueLineInfo; + } + + protected String connectPreString(String preString, String delimiter, String value) { + if (preString.equals("")) { + return value; + } else { + return preString + delimiter + value; + } + } + + protected boolean isNotBothQ(final String value) { + return !value.startsWith("\"") && !value.endsWith("\""); + } + + protected boolean isRearQOnly(final String value) { + return !value.startsWith("\"") && value.endsWith("\""); + } + + protected boolean isFrontQOnly(final String value) { + return value.startsWith("\"") && !value.endsWith("\""); + } + + protected String removeDoubleQuotation(String value) { + if (!value.startsWith("\"") && !value.endsWith("\"")) { + return value; + } + if (value.startsWith("\"")) { + value = value.substring(1); + } + if (value.endsWith("\"")) { + value = value.substring(0, value.length() - 1); + } + return value; + } + + protected String removeRightDoubleQuotation(String value) { + if (value.endsWith("\"")) { + value = value.substring(0, value.length() - 1); + } + return value; + } + + protected ${glFileTokenizingHeaderInfoName} analyzeHeaderInfo(String delimiter, final String lineString) { + final java.util.List${database.filterGenericsString('String')} columnNameList = new ArrayList${database.filterGenericsString('String')}(); + final String[] values = lineString.split(delimiter); + int count = 0; + for (int i=0; i < values.length; i++) { + String value = values[i]; + if (value == null) { + columnNameList.add(""); + } + value = value.trim();// Trimming is Header Only! + if (value.startsWith("\"") && value.endsWith("\"")) { + columnNameList.add(value.substring(1, value.length() - 1)); + } else { + columnNameList.add(value); + } + count++; + } + final ${glFileTokenizingHeaderInfoName} fileTokenizingHeaderInfo = new ${glFileTokenizingHeaderInfoName}(); + fileTokenizingHeaderInfo.setColumnNameList(columnNameList); + fileTokenizingHeaderInfo.setColumnNameRowString(lineString); + return fileTokenizingHeaderInfo; + } + + public static class ValueLineInfo { + protected java.util.List${database.filterGenericsString('String')} valueList; + + protected boolean continueNextLine; + + public java.util.List${database.filterGenericsString('String')} getValueList() { + return valueList; + } + + public void setValueList(List${database.filterGenericsString('String')} valueList) { + this.valueList = valueList; + } + + public boolean isContinueNextLine() { + return continueNextLine; + } + + public void setContinueNextLine(boolean continueNextLine) { + this.continueNextLine = continueNextLine; + } + } + + /** + * Make token-file from specified row resources. + * + * @param filename File name. (NotNull) + * @param fileMakingCallback File-making callback. (NotNull) + * @param fileMakingOption File-making option. (NotNull and Required{encoding and delimiter}) + * @throws java.io.FileNotFoundException + * @throws java.io.IOException + */ + public void make(String filename, ${glFileMakingCallbackName} fileMakingCallback, ${glFileMakingOptionName} fileMakingOption) throws java.io.FileNotFoundException, java.io.IOException { + assertStringNotNullAndNotTrimmedEmpty("filename", filename); + + java.io.FileOutputStream fos = null; + try { + fos = new java.io.FileOutputStream(filename); + make(fos, fileMakingCallback, fileMakingOption); + } catch (java.io.FileNotFoundException e) { + throw e; + } catch (java.io.IOException e) { + throw e; + } finally { + if (fos != null) { + fos.close(); + } + } + } + + /** + * Make token-file from specified row resources. + *
+     * This method uses java.io.BufferedOutputStream and java.io.OutputStreamWriter that wrap the argument[outputStream].
+     * These objects are closed. (Invoking close() at finally)
+     * 
+ * @param outputStream Output target stream. (NotNull) + * @param fileMakingCallback File-making callback. (NotNull) + * @param fileMakingOption File-making option. (NotNull and Required{encoding and delimiter}) + * @throws java.io.FileNotFoundException + * @throws java.io.IOException + */ + public void make(java.io.OutputStream outputStream, ${glFileMakingCallbackName} fileMakingCallback, ${glFileMakingOptionName} fileMakingOption) throws java.io.FileNotFoundException, java.io.IOException { + assertObjectNotNull("outputStream", outputStream); + assertObjectNotNull("fileMakingCallback", fileMakingCallback); + assertObjectNotNull("fileMakingOption", fileMakingOption); + final String encoding = fileMakingOption.getEncoding(); + final String delimiter = fileMakingOption.getDelimiter(); + assertStringNotNullAndNotTrimmedEmpty("encoding", encoding); + assertObjectNotNull("delimiter", delimiter); + final String lineSeparator; + if (fileMakingOption.getLineSeparator() != null && !fileMakingOption.getLineSeparator().equals("")) { + lineSeparator = fileMakingOption.getLineSeparator(); + } else { + lineSeparator = System.getProperty("line.separator");// Default! + } + + java.io.BufferedOutputStream bos = null; + java.io.Writer writer = null; + try { + bos = new java.io.BufferedOutputStream(outputStream); + writer = new java.io.OutputStreamWriter(bos, encoding); + + // Make header. + final ${glFileMakingHeaderInfoName} fileMakingHeaderInfo = fileMakingOption.getFileMakingHeaderInfo(); + if (fileMakingHeaderInfo != null) { + final List${database.filterGenericsString('String')} columnNameList = fileMakingHeaderInfo.getColumnNameList(); + if (columnNameList != null && !columnNameList.isEmpty()) { + final ${glLineMakingOptionName} lineMakingOption = new ${glLineMakingOptionName}(); + lineMakingOption.setDelimiter(delimiter); + lineMakingOption.trimSpace();// Trimming is Header Only! + final String columnHeaderString = _lineToken.make(columnNameList, lineMakingOption); + writer.write(columnHeaderString + lineSeparator); + } + } + + // Make row. + ${glFileMakingRowResourceName} rowResource = null; + while (true) { + rowResource = fileMakingCallback.getRowResource(); + if (rowResource == null) { + break;// The End! + } + final java.util.List${database.filterGenericsString('String')} valueList = rowResource.getValueList(); + final ${glLineMakingOptionName} lineMakingOption = new ${glLineMakingOptionName}(); + lineMakingOption.setDelimiter(delimiter); + if (!fileMakingOption.isGoodByeDoubleQuotation()) { + lineMakingOption.quoteByDoubleQuotation(); + } + final String lineString = _lineToken.make(valueList, lineMakingOption); + writer.write(lineString + lineSeparator); + } + writer.flush(); + } catch (java.io.FileNotFoundException e) { + throw e; + } catch (java.io.IOException e) { + throw e; + } finally { + if (bos != null) { + bos.close(); + } + if (writer != null) { + writer.close(); + } + } + } + + // ---------------------------------------------------------------- + // Assert Object + // ------------- + /** + * Assert that the object is not null. + * + * @param variableName Variable name. (NotNull) + * @param value Value. (NotNull) + * @exception IllegalArgumentException + */ + protected void assertObjectNotNull(String variableName, Object value) { + if (variableName == null) { + String msg = "The value should not be null: variableName=" + variableName + " value=" + value; + throw new IllegalArgumentException(msg); + } + if (value == null) { + String msg = "The value should not be null: variableName=" + variableName; + throw new IllegalArgumentException(msg); + } + } + + // ---------------------------------------------------------------- + // Assert String + // ------------- + /** + * Assert that the entity is not null and not trimmed empty. + * + * @param variableName Variable name. (NotNull) + * @param value Value. (NotNull) + */ + protected void assertStringNotNullAndNotTrimmedEmpty(String variableName, String value) { + assertObjectNotNull("variableName", variableName); + assertObjectNotNull(variableName, value); + if (value.trim().length() ==0) { + String msg = "The value should not be empty: variableName=" + variableName + " value=" + value; + throw new IllegalArgumentException(msg); + } + } +} \ No newline at end of file Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/helper/token/line/LineMakingOption.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/helper/token/line/LineMakingOption.vm 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/helper/token/line/LineMakingOption.vm 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,49 @@ +package ${glPackageBaseCommonHelperTokenLine}; + +/** + * @author ${database.ClassAuthor} + */ +public class ${glLineMakingOptionName} { + + protected String _delimiter; + + protected boolean _quoteByDoubleQuotation; + + protected boolean _trimSpace; + + public ${glLineMakingOptionName} delimitateByComma() { + _delimiter = ","; + return this; + } + + public ${glLineMakingOptionName} delimitateByTab() { + _delimiter = "\t"; + return this; + } + + public String getDelimiter() { + return _delimiter; + } + + public void setDelimiter(String delimiter) { + _delimiter = delimiter; + } + + public ${glLineMakingOptionName} quoteByDoubleQuotation() { + _quoteByDoubleQuotation = true; + return this; + } + + public boolean isQuoteByDoubleQuotation() { + return _quoteByDoubleQuotation; + } + + public ${glLineMakingOptionName} trimSpace() { + _trimSpace = true; + return this; + } + + public boolean isTrimSpace() { + return _trimSpace; + } +} \ No newline at end of file Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/helper/token/line/LineToken.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/helper/token/line/LineToken.vm 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/helper/token/line/LineToken.vm 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,11 @@ +package ${glPackageBaseCommonHelperTokenLine}; + +/** + * @author ${database.ClassAuthor} + */ +public interface ${glLineTokenName} { + + public java.util.List${database.filterGenericsString('String')} tokenize(String lineString, ${glLineTokenizingOptionName} lineTokenizingOption); + + public String make(java.util.List${database.filterGenericsString('String')} valueList, ${glLineMakingOptionName} lineMakingOption); +} \ No newline at end of file Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/helper/token/line/LineTokenizingOption.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/helper/token/line/LineTokenizingOption.vm 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/helper/token/line/LineTokenizingOption.vm 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,58 @@ +package ${glPackageBaseCommonHelperTokenLine}; + +/** + * @author ${database.ClassAuthor} + */ +public class ${glLineTokenizingOptionName} { + + // ===================================================================================== + // Attribute + // ========= + protected String _delimiter; + + protected boolean _trimDoubleQuotation; + + protected boolean _handleEmtpyAsNull; + + // ===================================================================================== + // Easy-to-Use + // =========== + public ${glLineTokenizingOptionName} delimitateByComma() { + _delimiter = ","; + return this; + } + + public ${glLineTokenizingOptionName} delimitateByTab() { + _delimiter = "\t"; + return this; + } + + public ${glLineTokenizingOptionName} trimDoubleQuotation() { + _trimDoubleQuotation = true; + return this; + } + + public ${glLineTokenizingOptionName} handleEmtpyAsNull() { + _handleEmtpyAsNull = true; + return this; + } + + // ===================================================================================== + // Accessor + // ======== + public String getDelimiter() { + return _delimiter; + } + + public void setDelimiter(String delimiter) { + _delimiter = delimiter; + } + + public boolean isTrimDoubleQuotation() { + return _trimDoubleQuotation; + } + + public boolean isHandleEmtpyAsNull() { + return _handleEmtpyAsNull; + } +} \ No newline at end of file Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/helper/token/line/impl/LineTokenImpl.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/helper/token/line/impl/LineTokenImpl.vm 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/helper/token/line/impl/LineTokenImpl.vm 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,111 @@ +package ${glPackageBaseCommonHelperTokenLineImpl}; + +import ${glPackageBaseCommonHelperTokenLine}.${glLineTokenName}; +import ${glPackageBaseCommonHelperTokenLine}.${glLineTokenizingOptionName}; +import ${glPackageBaseCommonHelperTokenLine}.${glLineMakingOptionName}; + +/** + * @author ${database.ClassAuthor} + */ +public class ${glLineTokenImplName} implements ${glLineTokenName} { + + public java.util.List${database.filterGenericsString('String')} tokenize(String lineString, ${glLineTokenizingOptionName} lineTokenizingOption) { + final String delimiter = lineTokenizingOption.getDelimiter(); + final java.util.List${database.filterGenericsString('String')} list = new java.util.ArrayList${database.filterGenericsString('String')}(); + int i = 0; + int j = lineString.indexOf(delimiter); + for (int h = 0; j >= 0; h++) { + final String pureValue = lineString.substring(i, j); + if (lineTokenizingOption.isTrimDoubleQuotation()) { + final String before = pureValue; + if (before.length() > 1 && before.startsWith("\"") && before.endsWith("\"")) { + final String after = before.substring(1, before.length() - 1); + list.add(filterHandlingEmptyAsNull(after, lineTokenizingOption)); + } else { + list.add(filterHandlingEmptyAsNull(before, lineTokenizingOption)); + } + } else { + list.add(filterHandlingEmptyAsNull(pureValue, lineTokenizingOption)); + } + i = j + 1; + j = lineString.indexOf(delimiter, i); + } + list.add(filterHandlingEmptyAsNull(lineString.substring(i), lineTokenizingOption)); + return list; + } + + protected String filterHandlingEmptyAsNull(String target, ${glLineTokenizingOptionName} lineTokenizingOption) { + if (target == null) { + return null; + } + if (lineTokenizingOption.isHandleEmtpyAsNull() && "".equals(target)) { + return null; + } + return target; + } + + public String make(java.util.List${database.filterGenericsString('String')} valueList, ${glLineMakingOptionName} lineMakingOption) { + assertObjectNotNull("valueList", valueList); + assertObjectNotNull("lineMakingOption", lineMakingOption); + final String delimiter = lineMakingOption.getDelimiter(); + assertObjectNotNull("lineMakingOption.getDelimiter()", delimiter); + return createLineString(valueList, delimiter, lineMakingOption.isQuoteByDoubleQuotation(), lineMakingOption.isTrimSpace()); + } + + protected String createLineString(java.util.List${database.filterGenericsString('String')} valueList, String delimiter, boolean quoteByDoubleQuotation, boolean trimSpace) { + final StringBuffer sb = new StringBuffer(); + for (final java.util.Iterator ite = valueList.iterator(); ite.hasNext(); ) { + String value = (String)ite.next(); + value = (value != null ? value : ""); + if (trimSpace) { + value = value.trim(); + } + if (quoteByDoubleQuotation) { + sb.append(delimiter).append("\"").append(value).append("\""); + } else { + sb.append(delimiter).append(value); + } + } + sb.delete(0, delimiter.length()); + return sb.toString(); + } + + // ---------------------------------------------------------------- + // Assert Object + // ------------- + /** + * Assert that the object is not null. + * + * @param variableName Variable name. (NotNull) + * @param value Value. (NotNull) + * @exception IllegalArgumentException + */ + protected void assertObjectNotNull(String variableName, Object value) { + if (variableName == null) { + String msg = "The value should not be null: variableName=" + variableName + " value=" + value; + throw new IllegalArgumentException(msg); + } + if (value == null) { + String msg = "The value should not be null: variableName=" + variableName; + throw new IllegalArgumentException(msg); + } + } + + // ---------------------------------------------------------------- + // Assert String + // ------------- + /** + * Assert that the entity is not null and not trimmed empty. + * + * @param variableName Variable name. (NotNull) + * @param value Value. (NotNull) + */ + protected void assertStringNotNullAndNotTrimmedEmpty(String variableName, String value) { + assertObjectNotNull("variableName", variableName); + assertObjectNotNull(variableName, value); + if (value.trim().length() ==0) { + String msg = "The value should not be empty: variableName=" + variableName + " value=" + value; + throw new IllegalArgumentException(msg); + } + } +} \ No newline at end of file Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/interceptor/CommonColumnSetupAbstractInterceptor.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/interceptor/CommonColumnSetupAbstractInterceptor.vm 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/interceptor/CommonColumnSetupAbstractInterceptor.vm 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,127 @@ +package ${glPackageBaseCommonInterceptor}; + +import org.aopalliance.intercept.MethodInvocation; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +import ${glPackageBaseCommon}.${glEntityDefinedCommonColumnInterfaceName}; + +/** + * CommonColumn-Setup Abstract Interceptor. + * + * @author ${database.ClassAuthor} + */ +public abstract class ${glCommonColumnSetupAbstractInterceptor} extends org.seasar.framework.aop.interceptors.AbstractInterceptor { + + /** Serial version UID. (Default) */ + private static final long serialVersionUID = 1L; + + /** Log-instance. */ + private static final Log _log = LogFactory.getLog(${glCommonColumnSetupAbstractInterceptor}.class); + + /** + * Invoke. + * + * @param invocation Method invocation. + * @return Result of the method. + * @throws Throwable + */ + public Object invoke(MethodInvocation invocation) throws Throwable { + final java.lang.reflect.Method method = invocation.getMethod(); + final Object[] args = invocation.getArguments(); + + if (!(args != null && args.length != 0)) { + return invocation.proceed(); + } + final Object firstArgument = args[0]; + if (isEntityDefinedCommonColumn(firstArgument)) { + final ${glEntityDefinedCommonColumnInterfaceName} entity = (${glEntityDefinedCommonColumnInterfaceName})firstArgument; + if (_log.isDebugEnabled()) { + String msg = "Intercepted the method '" + getShortClassName(method.getDeclaringClass()) + "." + method.getName() + "()'"; + msg = msg + ": entity=" + entity.extractPrimaryKeyMapString(); + _log.debug(msg); + } + setupEntity(entity); + return invocation.proceed(); + } else if (isListSaveEntityDefinedCommonColumn(firstArgument)) { + final java.util.List ls = (java.util.List)firstArgument; + if (_log.isDebugEnabled()) { + String msg = "Intercepted the method '" + getShortClassName(method.getDeclaringClass()) + "." + method.getName() + "()'"; + msg = msg + ": entityList.size()=" + ls.size(); + _log.debug(msg); + } + for (final java.util.Iterator ite = ls.iterator(); ite.hasNext(); ) { + final ${glEntityDefinedCommonColumnInterfaceName} entity = (${glEntityDefinedCommonColumnInterfaceName})ite.next(); + setupEntity(entity); + } + return invocation.proceed(); + } else { + return invocation.proceed(); + } + } + + /** + * Is the object entity defined common column? + * + * @param obj Object. If the object is null, returns false. (Nullable) + * @return Determination. + */ + protected boolean isEntityDefinedCommonColumn(Object obj) { + if (obj == null) { + return false; + } + if (obj instanceof ${glEntityDefinedCommonColumnInterfaceName}) { + return true; + } else { + return false; + } + } + + /** + * Is the object list that saves entity defined common column? + * + * @param obj Object. If the object is null, returns false. (Nullable) + * @return Determination. + */ + protected boolean isListSaveEntityDefinedCommonColumn(Object obj) { + if (obj == null) { + return false; + } + if (!(obj instanceof java.util.List)) { + return false; + } + final java.util.List ls = (java.util.List)obj; + for (final java.util.Iterator ite = ls.iterator(); ite.hasNext(); ) { + final Object currentObj = ite.next(); + if (!(currentObj instanceof ${glEntityDefinedCommonColumnInterfaceName})) { + return false; + } + } + return true; + } + + /** + * Set up the entity. + * + * @param entity Entity. (Nullable) + */ + abstract protected void setupEntity(${glEntityDefinedCommonColumnInterfaceName} entity); + + // ===================================================================================== + // Helper + // ====== + /** + * Get short class name. + * + * @param clazz Class instance. (NotNull) + * @return Short class name. (NotNull) + */ + protected String getShortClassName(Class clazz) { + String s = clazz.getName(); + int i = s.lastIndexOf('.'); + if (i > 0) { + return s.substring(i + 1); + } + return s; + } +} \ No newline at end of file Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/interceptor/CommonColumnSetupBeforeDeleteInterceptor.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/interceptor/CommonColumnSetupBeforeDeleteInterceptor.vm 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/interceptor/CommonColumnSetupBeforeDeleteInterceptor.vm 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,61 @@ +package ${glPackageBaseCommonInterceptor}; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +import ${glPackageBaseCommon}.${glEntityDefinedCommonColumnInterfaceName}; + +/** + * CommonColumn-Setup-before-Delete Interceptor. + * + * @author ${database.ClassAuthor} + */ +public class ${glCommonColumnSetupBeforeDeleteInterceptor} extends ${glCommonColumnSetupAbstractInterceptor} { + + /** Serial version UID. (Default) */ + private static final long serialVersionUID = 1L; + + /** Log-instance. */ + private static final Log _log = LogFactory.getLog(${glCommonColumnSetupBeforeDeleteInterceptor}.class); + + /** + * Set up the entity. + * + * @param entity Entity. (Nullable) + */ + protected void setupEntity(${glEntityDefinedCommonColumnInterfaceName} entity) { + if (_log.isDebugEnabled()) { + _log.debug(" before setup : " + entity.getDBMeta().extractCommonColumnValueMapString(entity)); + } +#foreach ($columnName in ${database.CommonColumnNameList}) + #set ($filteredColumnName = ${database.filterCommonColumn(${columnName})}) + #set ($entityCommonColumnMap = ${database.CommonColumnMap}) + #set ($columnType = ${entityCommonColumnMap.get(${columnName})}) + #set ($javaNative = ${database.convertJavaNativeByJdbcType(${columnType})}) + #set ($javaName = ${database.convertJavaNameByJdbcNameAsColumn(${filteredColumnName})}) + #set ($uncapitalisedJavaName = ${database.convertUncapitalisedJavaNameByJdbcNameAsColumn(${filteredColumnName})}) + #if (${database.containsValidColumnNameKeyCommonColumnSetupBeforeDeleteInterceptorLogicMap(${columnName})}) + #set ($logic = ${database.getCommonColumnSetupBeforeDeleteInterceptorLogicByColumnName(${columnName})}) + #if ($database.isCommonColumnSetupInvokingLogic($logic)) + #set ($filteredLogic = $database.removeCommonColumnSetupInvokingMark($logic)) + + ${filteredLogic} + if (_log.isDebugEnabled()) { + _log.debug(" ${filteredColumnName} has been set up: invoking=${filteredLogic}"); + } + #else + + final ${javaNative} ${uncapitalisedJavaName} = ${logic}; + entity.set${javaName}(${uncapitalisedJavaName}); + if (_log.isDebugEnabled()) { + _log.debug(" ${filteredColumnName} has been set up: value=" + ${uncapitalisedJavaName}); + } + #end + #end +#end + + if (_log.isDebugEnabled()) { + _log.debug(" after setup : " + entity.getDBMeta().extractCommonColumnValueMapString(entity)); + } + } +} \ No newline at end of file Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/interceptor/CommonColumnSetupBeforeInsertInterceptor.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/interceptor/CommonColumnSetupBeforeInsertInterceptor.vm 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/interceptor/CommonColumnSetupBeforeInsertInterceptor.vm 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,61 @@ +package ${glPackageBaseCommonInterceptor}; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +import ${glPackageBaseCommon}.${glEntityDefinedCommonColumnInterfaceName}; + +/** + * CommonColumn-Setup-before-Insert Interceptor. + * + * @author ${database.ClassAuthor} + */ +public class ${glCommonColumnSetupBeforeInsertInterceptor} extends ${glCommonColumnSetupAbstractInterceptor} { + + /** Serial version UID. (Default) */ + private static final long serialVersionUID = 1L; + + /** Log-instance. */ + private static final Log _log = LogFactory.getLog(${glCommonColumnSetupBeforeInsertInterceptor}.class); + + /** + * Set up the entity. + * + * @param entity Entity. (Nullable) + */ + protected void setupEntity(${glEntityDefinedCommonColumnInterfaceName} entity) { + if (_log.isDebugEnabled()) { + _log.debug(" before setup : " + entity.getDBMeta().extractCommonColumnValueMapString(entity)); + } +#foreach ($columnName in ${database.CommonColumnNameList}) + #set ($filteredColumnName = ${database.filterCommonColumn(${columnName})}) + #set ($entityCommonColumnMap = ${database.CommonColumnMap}) + #set ($columnType = ${entityCommonColumnMap.get(${columnName})}) + #set ($javaNative = ${database.convertJavaNativeByJdbcType(${columnType})}) + #set ($javaName = ${database.convertJavaNameByJdbcNameAsColumn(${filteredColumnName})}) + #set ($uncapitalisedJavaName = ${database.convertUncapitalisedJavaNameByJdbcNameAsColumn(${filteredColumnName})}) + #if (${database.containsValidColumnNameKeyCommonColumnSetupBeforeInsertInterceptorLogicMap(${columnName})}) + #set ($logic = ${database.getCommonColumnSetupBeforeInsertInterceptorLogicByColumnName(${columnName})}) + #if ($database.isCommonColumnSetupInvokingLogic($logic)) + #set ($filteredLogic = $database.removeCommonColumnSetupInvokingMark($logic)) + + ${filteredLogic} + if (_log.isDebugEnabled()) { + _log.debug(" ${filteredColumnName} has been set up: invoking=${filteredLogic}"); + } + #else + + final ${javaNative} ${uncapitalisedJavaName} = ${logic}; + entity.set${javaName}(${uncapitalisedJavaName}); + if (_log.isDebugEnabled()) { + _log.debug(" ${filteredColumnName} has been set up: value=" + ${uncapitalisedJavaName}); + } + #end + #end +#end + + if (_log.isDebugEnabled()) { + _log.debug(" after setup : " + entity.getDBMeta().extractCommonColumnValueMapString(entity)); + } + } +} \ No newline at end of file Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/interceptor/CommonColumnSetupBeforeUpdateInterceptor.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/interceptor/CommonColumnSetupBeforeUpdateInterceptor.vm 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/interceptor/CommonColumnSetupBeforeUpdateInterceptor.vm 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,61 @@ +package ${glPackageBaseCommonInterceptor}; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +import ${glPackageBaseCommon}.${glEntityDefinedCommonColumnInterfaceName}; + +/** + * CommonColumn-Setup-before-Update Interceptor. + * + * @author ${database.ClassAuthor} + */ +public class ${glCommonColumnSetupBeforeUpdateInterceptor} extends ${glCommonColumnSetupAbstractInterceptor} { + + /** Serial version UID. (Default) */ + private static final long serialVersionUID = 1L; + + /** Log-instance. */ + private static final Log _log = LogFactory.getLog(${glCommonColumnSetupBeforeUpdateInterceptor}.class); + + /** + * Set up the entity. + * + * @param entity Entity. (Nullable) + */ + protected void setupEntity(${glEntityDefinedCommonColumnInterfaceName} entity) { + if (_log.isDebugEnabled()) { + _log.debug(" before setup : " + entity.getDBMeta().extractCommonColumnValueMapString(entity)); + } +#foreach ($columnName in ${database.CommonColumnNameList}) + #set ($filteredColumnName = ${database.filterCommonColumn(${columnName})}) + #set ($entityCommonColumnMap = ${database.CommonColumnMap}) + #set ($columnType = ${entityCommonColumnMap.get(${columnName})}) + #set ($javaNative = ${database.convertJavaNativeByJdbcType(${columnType})}) + #set ($javaName = ${database.convertJavaNameByJdbcNameAsColumn(${filteredColumnName})}) + #set ($uncapitalisedJavaName = ${database.convertUncapitalisedJavaNameByJdbcNameAsColumn(${filteredColumnName})}) + #if (${database.containsValidColumnNameKeyCommonColumnSetupBeforeUpdateInterceptorLogicMap(${columnName})}) + #set ($logic = ${database.getCommonColumnSetupBeforeUpdateInterceptorLogicByColumnName(${columnName})}) + #if ($database.isCommonColumnSetupInvokingLogic($logic)) + #set ($filteredLogic = $database.removeCommonColumnSetupInvokingMark($logic)) + + ${filteredLogic} + if (_log.isDebugEnabled()) { + _log.debug(" ${filteredColumnName} has been set up: invoking=${filteredLogic}"); + } + #else + + final ${javaNative} ${uncapitalisedJavaName} = ${logic}; + entity.set${javaName}(${uncapitalisedJavaName}); + if (_log.isDebugEnabled()) { + _log.debug(" ${filteredColumnName} has been set up: value=" + ${uncapitalisedJavaName}); + } + #end + #end +#end + + if (_log.isDebugEnabled()) { + _log.debug(" after setup : " + entity.getDBMeta().extractCommonColumnValueMapString(entity)); + } + } +} \ No newline at end of file Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/jdbc/history/PreparedExecutionBean.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/jdbc/history/PreparedExecutionBean.vm 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/jdbc/history/PreparedExecutionBean.vm 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,46 @@ +package ${glPackageBaseCommonJdbcHistory}; + +/** + * The bean of prepared execution. + * + * @author ${database.ClassAuthor} + */ +public class ${glPreparedExecutionBeanName} { + + // =================================================================================== + // Attribute + // ========= + protected java.util.List<${glPreparedParameterElementName}> preparedParameterElementList = new java.util.ArrayList<${glPreparedParameterElementName}>(); + + protected String displaySql; + + // =================================================================================== + // Easy-to-Use + // =========== + public void addParameterElement(${glPreparedParameterElementName} parameterElement) { + this.preparedParameterElementList.add(parameterElement); + } + + public boolean isEmpty() { + return preparedParameterElementList.isEmpty(); + } + + public int size() { + return preparedParameterElementList.size(); + } + + // =================================================================================== + // Accessor + // ======== + public java.util.List<${glPreparedParameterElementName}> getPreparedParameterElementList() { + return preparedParameterElementList; + } + + public String getDisplaySql() { + return displaySql; + } + + public void setDisplaySql(String displaySql) { + this.displaySql = displaySql; + } +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/jdbc/history/PreparedParameterElement.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/jdbc/history/PreparedParameterElement.vm 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/jdbc/history/PreparedParameterElement.vm 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,46 @@ +package ${glPackageBaseCommonJdbcHistory}; + +/** + * The element of prepared parameters. + * + * @author ${database.ClassAuthor} + */ +public class ${glPreparedParameterElementName} { + + // ===================================================================================== + // Attribute + // ========= + protected int settingIndex; + + /** JDBC type. (java.sql.Types) */ + protected int jdbcType; + + protected Object parameterValue; + + // ===================================================================================== + // Accessor + // ======== + public int getSettingIndex() { + return settingIndex; + } + + public void setSettingIndex(int settingIndex) { + this.settingIndex = settingIndex; + } + + public int getJdbcType() { + return jdbcType; + } + + public void setJdbcType(int jdbcType) { + this.jdbcType = jdbcType; + } + + public Object getParameterValue() { + return parameterValue; + } + + public void setParameterValue(Object parameterValue) { + this.parameterValue = parameterValue; + } +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/jdbc/history/StatementHistory.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/jdbc/history/StatementHistory.vm 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/jdbc/history/StatementHistory.vm 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,48 @@ +package ${glPackageBaseCommonJdbcHistory}; + +/** + * The history of statement. + * + * @author ${database.ClassAuthor} + */ +public class ${glStatementHistoryName} { + + // =================================================================================== + // Attribute + // ========= + protected java.util.List<${glPreparedExecutionBeanName}> preparedExecutionBeanList = new java.util.ArrayList<${glPreparedExecutionBeanName}>(); + + // =================================================================================== + // Easy-to-Use + // =========== + public void addExecutionBean(${glPreparedExecutionBeanName} parameterBean) { + this.preparedExecutionBeanList.add(parameterBean); + } + + public ${glPreparedExecutionBeanName} current() { + if (preparedExecutionBeanList.isEmpty()) { + preparedExecutionBeanList.add(new ${glPreparedExecutionBeanName}()); + } + return preparedExecutionBeanList.get(preparedExecutionBeanList.size() - 1); + } + + public ${glPreparedExecutionBeanName} next() { + preparedExecutionBeanList.add(new ${glPreparedExecutionBeanName}()); + return current(); + } + + public ${glPreparedExecutionBeanName} removeLast() { + return preparedExecutionBeanList.remove(preparedExecutionBeanList.size() - 1); + } + + public int size() { + return preparedExecutionBeanList.size(); + } + + // =================================================================================== + // Accessor + // ======== + public java.util.List<${glPreparedExecutionBeanName}> getPreparedExecutionBeanList() { + return preparedExecutionBeanList; + } +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/jdbc/history/StatementHistoryWitness.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/jdbc/history/StatementHistoryWitness.vm 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/jdbc/history/StatementHistoryWitness.vm 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,16 @@ +package ${glPackageBaseCommonJdbcHistory}; + +/** + * The interface of statement history witness. + * + * @author ${database.ClassAuthor} + */ +public interface ${glStatementHistoryWitnessName} { + + /** + * Witness the history. + * + * @param statementHistory Statement history. (NotNull) + */ + public void witnessTheHistory(${glStatementHistoryName} statementHistory); +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/jdbc/history/TraceablePreparedStatement.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/jdbc/history/TraceablePreparedStatement.vm 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/jdbc/history/TraceablePreparedStatement.vm 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,525 @@ +package ${glPackageBaseCommonJdbcHistory}; + +import java.io.InputStream; +import java.io.Reader; +import java.math.BigDecimal; +import java.net.URL; +import java.sql.Array; +import java.sql.Blob; +import java.sql.Clob; +import java.sql.Connection; +import java.sql.Date; +import java.sql.ParameterMetaData; +import java.sql.PreparedStatement; +import java.sql.Ref; +import java.sql.ResultSet; +import java.sql.ResultSetMetaData; +import java.sql.SQLException; +import java.sql.SQLWarning; +import java.sql.Time; +import java.sql.Timestamp; +import java.sql.Types; +import java.text.SimpleDateFormat; +import java.util.Calendar; + +/** + * The implementation of prepared statement as traceable prepared statement. + * + * @author ${database.ClassAuthor} + */ +public class ${glTraceablePreparedStatementName} implements PreparedStatement { + + // =================================================================================== + // Attribute + // ========= + protected PreparedStatement preparedStatement; + + protected String preparedSql; + + protected ${glStatementHistoryName} statementHistory = new ${glStatementHistoryName}(); + + protected ${glStatementHistoryWitnessName} statementHistoryWitness; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param preparedStatement Wrap target prepared statement. (NotNull) + * @param preparedSql Prepared sql. (NotNull) + */ + public ${glTraceablePreparedStatementName}(PreparedStatement preparedStatement, String preparedSql, ${glStatementHistoryWitnessName} statementHistoryWitness) { + this.preparedStatement = preparedStatement; + this.preparedSql = preparedSql; + this.statementHistoryWitness = statementHistoryWitness; + } + + // =================================================================================== + // Delegate + // ======== + // ----------------------------------------------------- + // Add-Batch + // --------- + public void addBatch() throws SQLException { + moveNextBatchPoint(); + preparedStatement.addBatch(); + } + + public void addBatch(String sql) throws SQLException { + preparedStatement.addBatch(sql); + } + + // ----------------------------------------------------- + // Cancel + // ------ + public void cancel() throws SQLException { + preparedStatement.cancel(); + } + + // ----------------------------------------------------- + // Clear + // ----- + public void clearBatch() throws SQLException { + preparedStatement.clearBatch(); + } + + public void clearParameters() throws SQLException { + preparedStatement.clearParameters(); + } + + public void clearWarnings() throws SQLException { + preparedStatement.clearWarnings(); + } + + // ----------------------------------------------------- + // Close + // ----- + public void close() throws SQLException { + preparedStatement.close(); + } + + // ----------------------------------------------------- + // Execute + // ------- + public boolean execute() throws SQLException { + traceSql(preparedSql); + return preparedStatement.execute(); + } + + public boolean execute(String sql, int autoGeneratedKeys) throws SQLException { + traceSql(sql); + return preparedStatement.execute(sql, autoGeneratedKeys); + } + + public boolean execute(String sql, int[] columnIndexes) throws SQLException { + traceSql(sql); + return preparedStatement.execute(sql, columnIndexes); + } + + public boolean execute(String sql, String[] columnNames) throws SQLException { + traceSql(sql); + return preparedStatement.execute(sql, columnNames); + } + + public boolean execute(String sql) throws SQLException { + traceSql(sql); + return preparedStatement.execute(sql); + } + + public int[] executeBatch() throws SQLException { + traceSql(preparedSql); + return preparedStatement.executeBatch(); + } + + public ResultSet executeQuery() throws SQLException { + traceSql(preparedSql); + return preparedStatement.executeQuery(); + } + + public ResultSet executeQuery(String sql) throws SQLException { + traceSql(sql); + return preparedStatement.executeQuery(sql); + } + + public int executeUpdate() throws SQLException { + traceSql(preparedSql); + return preparedStatement.executeUpdate(); + } + + public int executeUpdate(String sql, int autoGeneratedKeys) throws SQLException { + traceSql(sql); + return preparedStatement.executeUpdate(sql, autoGeneratedKeys); + } + + public int executeUpdate(String sql, int[] columnIndexes) throws SQLException { + traceSql(sql); + return preparedStatement.executeUpdate(sql, columnIndexes); + } + + public int executeUpdate(String sql, String[] columnNames) throws SQLException { + traceSql(sql); + return preparedStatement.executeUpdate(sql, columnNames); + } + + public int executeUpdate(String sql) throws SQLException { + traceSql(sql); + return preparedStatement.executeUpdate(sql); + } + + // ----------------------------------------------------- + // Other + // ----- + public Connection getConnection() throws SQLException { + return preparedStatement.getConnection(); + } + + public int getFetchDirection() throws SQLException { + return preparedStatement.getFetchDirection(); + } + + public int getFetchSize() throws SQLException { + return preparedStatement.getFetchSize(); + } + + public ResultSet getGeneratedKeys() throws SQLException { + return preparedStatement.getGeneratedKeys(); + } + + public int getMaxFieldSize() throws SQLException { + return preparedStatement.getMaxFieldSize(); + } + + public int getMaxRows() throws SQLException { + return preparedStatement.getMaxRows(); + } + + public ResultSetMetaData getMetaData() throws SQLException { + return preparedStatement.getMetaData(); + } + + public boolean getMoreResults() throws SQLException { + return preparedStatement.getMoreResults(); + } + + public boolean getMoreResults(int current) throws SQLException { + return preparedStatement.getMoreResults(current); + } + + public ParameterMetaData getParameterMetaData() throws SQLException { + return preparedStatement.getParameterMetaData(); + } + + public int getQueryTimeout() throws SQLException { + return preparedStatement.getQueryTimeout(); + } + + public ResultSet getResultSet() throws SQLException { + return preparedStatement.getResultSet(); + } + + public int getResultSetConcurrency() throws SQLException { + return preparedStatement.getResultSetConcurrency(); + } + + public int getResultSetHoldability() throws SQLException { + return preparedStatement.getResultSetHoldability(); + } + + public int getResultSetType() throws SQLException { + return preparedStatement.getResultSetType(); + } + + public int getUpdateCount() throws SQLException { + return preparedStatement.getUpdateCount(); + } + + public SQLWarning getWarnings() throws SQLException { + return preparedStatement.getWarnings(); + } + + // ----------------------------------------------------- + // Setting Parameter + // ----------------- + public void setArray(int parameterIndex, Array x) throws SQLException { + registerPreparedParameter(parameterIndex, Types.ARRAY, x); + preparedStatement.setArray(parameterIndex, x); + } + + public void setAsciiStream(int parameterIndex, InputStream x, int length) throws SQLException { + preparedStatement.setAsciiStream(parameterIndex, x, length); + } + + public void setBigDecimal(int parameterIndex, BigDecimal x) throws SQLException { + registerPreparedParameter(parameterIndex, Types.DECIMAL, x); + preparedStatement.setBigDecimal(parameterIndex, x); + } + + public void setBinaryStream(int parameterIndex, InputStream x, int length) throws SQLException { + preparedStatement.setBinaryStream(parameterIndex, x, length); + } + + public void setBlob(int i, Blob x) throws SQLException { + registerPreparedParameter(i, Types.BLOB, x); + preparedStatement.setBlob(i, x); + } + + public void setBoolean(int parameterIndex, boolean x) throws SQLException { + registerPreparedParameter(parameterIndex, Types.BOOLEAN, x); + preparedStatement.setBoolean(parameterIndex, x); + } + + public void setByte(int parameterIndex, byte x) throws SQLException { + preparedStatement.setByte(parameterIndex, x); + } + + public void setBytes(int parameterIndex, byte[] x) throws SQLException { + preparedStatement.setBytes(parameterIndex, x); + } + + public void setCharacterStream(int parameterIndex, Reader reader, int length) throws SQLException { + // *Out of target about registering prepared parameter. + preparedStatement.setCharacterStream(parameterIndex, reader, length); + } + + public void setClob(int i, Clob x) throws SQLException { + registerPreparedParameter(i, Types.CLOB, x); + preparedStatement.setClob(i, x); + } + + public void setCursorName(String name) throws SQLException { + preparedStatement.setCursorName(name); + } + + public void setDate(int parameterIndex, Date x, Calendar cal) throws SQLException { + registerPreparedParameter(parameterIndex, Types.DATE, x); + preparedStatement.setDate(parameterIndex, x, cal); + } + + public void setDate(int parameterIndex, Date x) throws SQLException { + registerPreparedParameter(parameterIndex, Types.DATE, x); + preparedStatement.setDate(parameterIndex, x); + } + + public void setDouble(int parameterIndex, double x) throws SQLException { + registerPreparedParameter(parameterIndex, Types.DOUBLE, x); + preparedStatement.setDouble(parameterIndex, x); + } + + public void setEscapeProcessing(boolean enable) throws SQLException { + preparedStatement.setEscapeProcessing(enable); + } + + public void setFetchDirection(int direction) throws SQLException { + preparedStatement.setFetchDirection(direction); + } + + public void setFetchSize(int rows) throws SQLException { + preparedStatement.setFetchSize(rows); + } + + public void setFloat(int parameterIndex, float x) throws SQLException { + registerPreparedParameter(parameterIndex, Types.FLOAT, x); + preparedStatement.setFloat(parameterIndex, x); + } + + public void setInt(int parameterIndex, int x) throws SQLException { + registerPreparedParameter(parameterIndex, Types.INTEGER, x); + preparedStatement.setInt(parameterIndex, x); + } + + public void setLong(int parameterIndex, long x) throws SQLException { + registerPreparedParameter(parameterIndex, Types.LONGVARCHAR, x); + preparedStatement.setLong(parameterIndex, x); + } + + public void setMaxFieldSize(int max) throws SQLException { + preparedStatement.setMaxFieldSize(max); + } + + public void setMaxRows(int max) throws SQLException { + preparedStatement.setMaxRows(max); + } + + public void setNull(int paramIndex, int sqlType, String typeName) throws SQLException { + registerPreparedParameter(paramIndex, Types.NULL, null); + preparedStatement.setNull(paramIndex, sqlType, typeName); + } + + public void setNull(int parameterIndex, int sqlType) throws SQLException { + registerPreparedParameter(parameterIndex, Types.NULL, null); + preparedStatement.setNull(parameterIndex, sqlType); + } + + public void setObject(int parameterIndex, Object x, int targetSqlType, int scale) throws SQLException { + registerPreparedParameter(parameterIndex, Types.OTHER, x); + preparedStatement.setObject(parameterIndex, x, targetSqlType, scale); + } + + public void setObject(int parameterIndex, Object x, int targetSqlType) throws SQLException { + registerPreparedParameter(parameterIndex, Types.OTHER, x); + preparedStatement.setObject(parameterIndex, x, targetSqlType); + } + + public void setObject(int parameterIndex, Object x) throws SQLException { + registerPreparedParameter(parameterIndex, Types.OTHER, x); + preparedStatement.setObject(parameterIndex, x); + } + + public void setQueryTimeout(int seconds) throws SQLException { + preparedStatement.setQueryTimeout(seconds); + } + + public void setRef(int i, Ref x) throws SQLException { + preparedStatement.setRef(i, x); + } + + public void setShort(int parameterIndex, short x) throws SQLException { + registerPreparedParameter(parameterIndex, Types.INTEGER, x); + preparedStatement.setShort(parameterIndex, x); + } + + public void setString(int parameterIndex, String x) throws SQLException { + registerPreparedParameter(parameterIndex, Types.VARCHAR, x); + preparedStatement.setString(parameterIndex, x); + } + + public void setTime(int parameterIndex, Time x, Calendar cal) throws SQLException { + registerPreparedParameter(parameterIndex, Types.TIME, x); + preparedStatement.setTime(parameterIndex, x, cal); + } + + public void setTime(int parameterIndex, Time x) throws SQLException { + registerPreparedParameter(parameterIndex, Types.TIME, x); + preparedStatement.setTime(parameterIndex, x); + } + + public void setTimestamp(int parameterIndex, Timestamp x, Calendar cal) throws SQLException { + registerPreparedParameter(parameterIndex, Types.TIMESTAMP, x); + preparedStatement.setTimestamp(parameterIndex, x, cal); + } + + public void setTimestamp(int parameterIndex, Timestamp x) throws SQLException { + registerPreparedParameter(parameterIndex, Types.TIMESTAMP, x); + preparedStatement.setTimestamp(parameterIndex, x); + } + + /** + * @deprecated + */ + public void setUnicodeStream(int parameterIndex, InputStream x, int length) throws SQLException { + preparedStatement.setUnicodeStream(parameterIndex, x, length); + } + + public void setURL(int parameterIndex, URL x) throws SQLException { + preparedStatement.setURL(parameterIndex, x); + } + + // =================================================================================== + // Trace + // ===== + protected void traceSql(String sql) { + if (statementHistory.current().isEmpty()) { + statementHistory.removeLast(); + } + setupSqlDisplayList(sql); + statementHistoryWitness.witnessTheHistory(statementHistory); + } + + protected void registerPreparedParameter(int settingIndex, int jdbcType, Object parameterValue) { + final ${glPreparedParameterElementName} parameterElement = createPreparedParameterElement(settingIndex, jdbcType, parameterValue); + statementHistory.current().addParameterElement(parameterElement); + } + + protected ${glPreparedParameterElementName} createPreparedParameterElement(int settingIndex, int jdbcType, Object parameterValue) { + final ${glPreparedParameterElementName} element = new ${glPreparedParameterElementName}(); + element.setSettingIndex(settingIndex); + element.setJdbcType(jdbcType); + element.setParameterValue(parameterValue); + return element; + } + + // =================================================================================== + // Set up + // ====== + protected void setupSqlDisplayList(String realSql) { + final java.util.List<${glPreparedExecutionBeanName}> executionBeanList = statementHistory.getPreparedExecutionBeanList(); + for (${glPreparedExecutionBeanName} executionBean : executionBeanList) { + if (executionBean.isEmpty()) { + continue; + } + final Object[] args = new Object[executionBean.size()]; + int index = 0; + final java.util.List<${glPreparedParameterElementName}> parameterElementList = executionBean.getPreparedParameterElementList(); + for (${glPreparedParameterElementName} parameterElement : parameterElementList) { + final Object parameterValue = parameterElement.getParameterValue(); + args[index] = parameterValue; + ++index; + } + final String displaySql = getCompleteSql(realSql, args); + executionBean.setDisplaySql(displaySql); + } + } + + // =================================================================================== + // Batch + // ===== + protected void moveNextBatchPoint() { + statementHistory.next(); + } + + // =================================================================================== + // Helper + // ====== + protected String getCompleteSql(String sql, Object[] args) { + if (args == null || args.length == 0) { + return sql; + } + StringBuffer buf = new StringBuffer(200); + int pos = 0; + int pos2 = 0; + int pos3 = 0; + int pos4 = 0; + int index = 0; + while (true) { + pos = sql.indexOf('?', pos2); + pos3 = sql.indexOf('\'', pos2); + pos4 = sql.indexOf('\'', pos3 + 1); + if (pos > 0) { + if (pos3 >= 0 && pos3 < pos && pos < pos4) { + buf.append(sql.substring(pos2, pos4 + 1)); + pos2 = pos4 + 1; + } else { + buf.append(sql.substring(pos2, pos)); + buf.append(getBindVariableText(args[index++])); + pos2 = pos + 1; + } + } else { + buf.append(sql.substring(pos2)); + break; + } + } + return buf.toString(); + } + + protected String getBindVariableText(Object bindVariable) { + if (bindVariable instanceof String) { + return "'" + bindVariable + "'"; + } else if (bindVariable instanceof Number) { + return bindVariable.toString(); + } else if (bindVariable instanceof Timestamp) { + SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH.mm.ss"); + return "'" + sdf.format((java.util.Date) bindVariable) + "'"; + } else if (bindVariable instanceof java.util.Date) { + SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); + return "'" + sdf.format((java.util.Date) bindVariable) + "'"; + } else if (bindVariable instanceof Boolean) { + return bindVariable.toString(); + } else if (bindVariable == null) { + return "null"; + } else { + return "'" + bindVariable.toString() + "'"; + } + } + +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/s2dao/FetchNarrowingResultSetFactory.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/s2dao/FetchNarrowingResultSetFactory.vm 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/s2dao/FetchNarrowingResultSetFactory.vm 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,67 @@ +package ${glPackageBaseCommonS2Dao}; + +import java.sql.PreparedStatement; +import java.sql.ResultSet; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +import org.seasar.extension.jdbc.ResultSetFactory; +import org.seasar.framework.util.PreparedStatementUtil; + +import ${glPackageBaseCommonCBean}.${glFetchNarrowingBeanInterfaceName}; +import ${glPackageBaseCommonCBean}.${glFetchNarrowingBeanContextName}; + +/** + * Fetch page result set factory. + * + * @author ${database.ClassAuthor} + */ +public class ${glFetchNarrowingResultSetFactory} implements ResultSetFactory { + + /** Log-instance. */ + private static final Log _log = LogFactory.getLog(${glFetchNarrowingResultSetFactory}.class); + + /** Is internal-debug enabled? */ + private boolean _isInternalDebugEnabled = false; + + /** + * Constructor. + */ + public ${glFetchNarrowingResultSetFactory}() { + } + + /** + * Create result set. + * + * @param ps Prepared statement. + * @return Result set. (NotNull) + */ + public ResultSet createResultSet(PreparedStatement ps) { + if (_isInternalDebugEnabled) { + if (_log.isDebugEnabled()) { + _log.debug("executeQuery(ps) ps=" + ps); + } + } + final ResultSet resultSet = PreparedStatementUtil.executeQuery(ps); + + if (!${glFetchNarrowingBeanContextName}.isExistFetchNarrowingBeanOnThread()) { + return resultSet; + } + + final ${glFetchNarrowingBeanInterfaceName} ${glAttachedCBArgsVariableName} = ${glFetchNarrowingBeanContextName}.getFetchNarrowingBeanOnThread(); + if (!${glAttachedCBArgsVariableName}.isFetchNarrowingEffective()) { + return resultSet;// It is not necessary to control. + } + if (!${glAttachedCBArgsVariableName}.isFetchNarrowingSkipStartIndexEffective() && !${glAttachedCBArgsVariableName}.isFetchNarrowingLoopCountEffective()) { + return resultSet;// It is not necessary to control. The sql already have been controlled. + } + + if (_isInternalDebugEnabled) { + if (_log.isDebugEnabled()) { + _log.debug("Necessary to control fetch-narrowing! ${glAttachedCBArgsVariableName}=" + ${glAttachedCBArgsVariableName}); + } + } + return new ${glFetchNarrowingResultSetWrapper}(resultSet, ${glAttachedCBArgsVariableName}); + } +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/s2dao/FetchNarrowingResultSetWrapper.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/s2dao/FetchNarrowingResultSetWrapper.vm 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/s2dao/FetchNarrowingResultSetWrapper.vm 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,178 @@ +package ${glPackageBaseCommonS2Dao}; + +import java.sql.ResultSet; +import java.sql.SQLException; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +import org.seasar.extension.jdbc.impl.ResultSetWrapper; +import org.seasar.framework.exception.SQLRuntimeException; + +import ${glPackageBaseCommonCBean}.${glFetchNarrowingBeanInterfaceName}; + +/** + * Fetch-narrowing-result-set-wrapper. + * + * @author ${database.ClassAuthor} + */ +public class ${glFetchNarrowingResultSetWrapper} extends ResultSetWrapper { + + /** Log-instance. */ + private static final Log _log = LogFactory.getLog(${glFetchNarrowingResultSetWrapper}.class); + + /** Is internal-debug enabled? */ + private boolean _isInternalDebugEnabled = false; + + /** Original result set. */ + private ResultSet _resultSet; + + /** FetchNarrowing-bean. */ + private ${glFetchNarrowingBeanInterfaceName} _${glAttachedCBArgsVariableName}; + + /** Fetch counter. */ + private long _counter; + + /** + * Constructor. + * + * @param resultSet Original result set. (NotNull) + * @param ${glAttachedCBArgsVariableName} FetchNarrowing-bean. (NotNull) + */ + public ${glFetchNarrowingResultSetWrapper}(ResultSet resultSet, ${glFetchNarrowingBeanInterfaceName} ${glAttachedCBArgsVariableName}) { + super(resultSet); + + _resultSet = resultSet; + _${glAttachedCBArgsVariableName} = ${glAttachedCBArgsVariableName}; + + if (_isInternalDebugEnabled) { + if (_log.isDebugEnabled()) { + String msg = " isFetchNarrowingSkipStartIndexEffective()=" + getFetchNarrowingBean().isFetchNarrowingSkipStartIndexEffective(); + _log.debug(msg); + msg = " isFetchNarrowingLoopCountEffective()=" + getFetchNarrowingBean().isFetchNarrowingLoopCountEffective(); + _log.debug(msg); + msg = " getFetchNarrowingSkipStartIndex()=" + getFetchNarrowingSkipStartIndex(); + _log.debug(msg); + msg = " getFetchNarrowingLoopCount()=" + getFetchNarrowingLoopCount(); + _log.debug(msg); + } + } + + skip(); + } + + /** + * Skip to start-index. + */ + private void skip() { + if (!getFetchNarrowingBean().isFetchNarrowingSkipStartIndexEffective()) { + return; + } + if (isCursorUsed()) { + try { + if (0 == getFetchNarrowingSkipStartIndex()) { + getResultSet().beforeFirst(); + } else { + getResultSet().absolute(getFetchNarrowingSkipStartIndex()); + } + _counter = getResultSet().getRow(); + } catch (SQLException e) { + throw new SQLRuntimeException(e); + } + } else { + try { + while (getResultSet().getRow() < getFetchNarrowingSkipStartIndex() && getResultSet().next()) { + ++_counter; + } + } catch (SQLException e) { + throw new SQLRuntimeException(e); + } + } + } + + /** + * Next. + * + * @return Does the result set have next record? + * @throws SQLException + */ + public boolean next() throws SQLException { + final boolean hasNext = super.next(); + if (!getFetchNarrowingBean().isFetchNarrowingLoopCountEffective()) { + return hasNext; + } + if (hasNext && _counter < getFetchNarrowingSkipStartIndex() + getFetchNarrowingLoopCount()) { + ++_counter; + return true; + } else { + if (_isInternalDebugEnabled) { + if (_log.isDebugEnabled()) { + String msg = " Finally the result of next() is false! Because counter is greater-equal"; + msg = msg + " than 'fetch-start-index + real-fetch-size'."; + msg = msg + " " + _counter + " >= " + getFetchNarrowingSkipStartIndex() + " + " + getFetchNarrowingLoopCount(); + _log.debug(msg); + } + } + return false; + } + } + + /** + * Get result set. + * + * @return Result set. + */ + protected ResultSet getResultSet() { + return _resultSet; + } + + /** + * Get fetch-narrowing-bean. + * + * @return FetchNarrowing-bean. + */ + protected ${glFetchNarrowingBeanInterfaceName} getFetchNarrowingBean() { + return _${glAttachedCBArgsVariableName}; + } + + /** + * Get fetch-start-index from fetch-narrowing-bean. + * + * @return Fetch-start-index. + */ + protected int getFetchNarrowingSkipStartIndex() { + return _${glAttachedCBArgsVariableName}.getFetchNarrowingSkipStartIndex(); + } + + /** + * Get fetch-size from fetch-narrowing-bean. + * + * @return Fetch-size. + */ + protected int getFetchNarrowingLoopCount() { + return _${glAttachedCBArgsVariableName}.getFetchNarrowingLoopCount(); + } + + /** + * Is cursor used? + * + * @return Determination. + */ + protected boolean isCursorUsed() { + return isCursorSupported(getResultSet()); + } + + /** + * Is cursor supported? + * + * @param resultSet ResultSet + * @return Determation. + */ + public static boolean isCursorSupported(ResultSet resultSet) { + try { + return !(resultSet.getType() == ResultSet.TYPE_FORWARD_ONLY); + } catch (SQLException e) { + throw new SQLRuntimeException(e); + } + } +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/s2dao/S2BeanMetaDataFactoryImpl.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/s2dao/S2BeanMetaDataFactoryImpl.vm 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/s2dao/S2BeanMetaDataFactoryImpl.vm 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,14 @@ +package ${glPackageBaseCommonS2Dao}; + +import org.seasar.dao.impl.BeanMetaDataFactoryImpl; + +/** + * BeanMetaDataFactoryImpl for DBFlute. + * + * @author ${database.ClassAuthor} + */ +public class ${glBeanMetaDataFactoryImpl} extends BeanMetaDataFactoryImpl { + protected int getLimitRelationNestLevel() { + return 2; + } +} \ No newline at end of file Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/s2dao/S2DaoInterceptor.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/s2dao/S2DaoInterceptor.vm 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/s2dao/S2DaoInterceptor.vm 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,351 @@ +package ${glPackageBaseCommonS2Dao}; + +import org.aopalliance.intercept.MethodInvocation; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +import ${glPackageBaseCommon}.${glEntityInterfaceName}; +import ${glPackageBaseCommonCBean}.${glConditionBeanInterfaceName}; +import ${glPackageBaseCommonCBean}.${glConditionBeanContextName}; +import ${glPackageBaseCommonCBean}.${glFetchNarrowingBeanContextName}; +import ${glPackageBaseCommonCBean}.${glFetchNarrowingBeanInterfaceName}; + +/** + * My-DaoInterceptor. + * Customises original class 'S2DaoInterceptor'. + * + * @author ${database.ClassAuthor} + */ +public class ${glDaoInterceptor} extends org.seasar.framework.aop.interceptors.AbstractInterceptor { + + /** Serial version UID. (Default) */ + private static final long serialVersionUID = 1L; + + /** Log-instance. */ + private static final Log _log = LogFactory.getLog(${glDaoInterceptor}.class); + + /** Dao meta data factory. */ + private org.seasar.dao.DaoMetaDataFactory daoMetaDataFactory_; + + /** + * Constructor. + * + * @param daoMetaDataFactory Dao meta data factory. + */ + public ${glDaoInterceptor}(org.seasar.dao.DaoMetaDataFactory daoMetaDataFactory) { + daoMetaDataFactory_ = daoMetaDataFactory; + } + + /** + * Invoke. + * + * @param invocation Method invocation. + * @return Result of the method. + * @throws Throwable + */ + public Object invoke(MethodInvocation invocation) throws Throwable { + final java.lang.reflect.Method method = invocation.getMethod(); + if (!org.seasar.framework.util.MethodUtil.isAbstract(method)) { + return invocation.proceed(); + } + traceMethod(invocation); + final long before = System.currentTimeMillis(); + + final org.seasar.dao.SqlCommand cmd; + { + final long beforeCmd = System.currentTimeMillis(); + final Class targetClass = getTargetClass(invocation); + final org.seasar.dao.DaoMetaData dmd = daoMetaDataFactory_.getDaoMetaData(targetClass); + cmd = dmd.getSqlCommand(method.getName()); + final long afterCmd = System.currentTimeMillis(); + traceSqlCommand(invocation, cmd, beforeCmd, afterCmd); + } + + final ${glConditionBeanInterfaceName} ${glAttachedCBArgsVariableName} = preprocessConditionBean(invocation, cmd); + Object ret = null; + + try { + ret = cmd.execute(invocation.getArguments()); + } catch (Exception e) { + _log.info("Dao threw the exception: " + e.getClass() + " msg=" + e.getMessage()); + _log.info(" method --> " + invocation.getMethod()); + _log.info(" argument --> " + getObjectArrayString(invocation.getArguments())); + if (e instanceof org.seasar.framework.exception.SQLRuntimeException) { + final Throwable causeException = ((org.seasar.framework.exception.SQLRuntimeException)e).getCause(); + if (causeException instanceof org.seasar.framework.exception.SSQLException) { + final String sql = ((org.seasar.framework.exception.SSQLException)causeException).getSql(); + _log.info(" sql --> " + sql); + } + } + throw e; + } finally { + postprocessConditionBean(invocation, ${glAttachedCBArgsVariableName}); + } + final long after = System.currentTimeMillis(); + + final Class retType = method.getReturnType(); + assertRetType(retType, ret); + traceReturn(invocation, retType, ret, before, after); + + if (retType.isPrimitive()) { + return org.seasar.framework.util.NumberConversionUtil.convertPrimitiveWrapper(retType, ret); + } else if (Number.class.isAssignableFrom(retType)) { + return org.seasar.framework.util.NumberConversionUtil.convertNumber(retType, ret); + } else { + return ret; + } + } + + protected void traceMethod(MethodInvocation invocation) { + if (_log.isDebugEnabled()) { + final java.lang.reflect.Method method = invocation.getMethod(); + final String invokeName = getShortClassName(method.getDeclaringClass()) + "." + method.getName(); + final int length = invokeName.length(); + final StringBuffer sb = new StringBuffer(); + for (int i = 0; i < length; i++) { + sb.append("="); + } + _log.debug("/=====================================================" + sb.toString() + "=="); + _log.debug(" " + invokeName + "()"); + _log.debug(" " + sb.toString() + "=/"); + } + } + + protected void traceSqlCommand(MethodInvocation invocation, org.seasar.dao.SqlCommand cmd, long beforeCmd, long afterCmd) { + if (_log.isDebugEnabled()) { + _log.debug("SqlCommand Initialization Cost: [" + getPerformanceView(afterCmd - beforeCmd) + "]"); + } + } + + protected void assertRetType(Class retType, Object ret) { + if (java.util.List.class.isAssignableFrom(retType)) { + if (ret != null && !(ret instanceof java.util.List)) { + String msg = "The retType is difference from actual return: "; + msg = msg + "retType=" + retType + " ret.getClass()=" + ret.getClass() + " ref=" + ret; + throw new IllegalStateException(msg); + } + } else if (${glEntityInterfaceName}.class.isAssignableFrom(retType)) { + if (ret != null && !(ret instanceof ${glEntityInterfaceName})) { + String msg = "The retType is difference from actual return: "; + msg = msg + "retType=" + retType + " ret.getClass()=" + ret.getClass() + " ref=" + ret; + throw new IllegalStateException(msg); + } + } + } + + protected void traceReturn(MethodInvocation invocation, Class retType, Object ret, long before, long after) + throws Throwable { + if (_log.isDebugEnabled()) { + try { + final String daoResultPrefix = "===========/ [" + getPerformanceView(after - before) + " - "; + if (java.util.List.class.isAssignableFrom(retType)) { + if (ret == null) { + _log.debug(daoResultPrefix + "Selected count: null]"); + } else { + final java.util.List ls = (java.util.List) ret; + if (ls.isEmpty()) { + _log.debug(daoResultPrefix + "Selected count: 0]"); + } else { + _log.debug(daoResultPrefix + "Selected count: " + ls.size() + " first=" + ls.get(0) + "]"); + } + } + } else if (${glEntityInterfaceName}.class.isAssignableFrom(retType)) { + if (ret == null) { + _log.debug(daoResultPrefix + "Selected entity: null" + "]"); + } else { + final ${glEntityInterfaceName} entity = (${glEntityInterfaceName}) ret; + _log.debug(daoResultPrefix + "Selected entity: " + entity + "]"); + } + } else { + if (isSelectCountIgnoreFetchScopeMethod(invocation)) { + _log.debug(daoResultPrefix + "Selected count: " + ret + "]"); + } else { + _log.debug(daoResultPrefix + "Result: " + ret + "]"); + } + } + _log.debug(" "); + } catch (Exception e) { + String msg = "Result object debug threw the exception: methodName="; + msg = msg + invocation.getMethod().getName() + " retType=" + retType; + msg = msg + " ret=" + ret; + _log.warn(msg, e); + throw e; + } + } + } + + // ===================================================================================== + // Pre&Post Process + // ================ + /** + * Preprocess condition-bean. + *

+ * If this method is condition bean select target, make dynamic sql. + * Else nothing. + * + * @param invocation Method invocation. (NotNull) + * @param cmd Sql command. (NotNull) + * @return Condition-bean. (Nullable) + */ + protected ${glConditionBeanInterfaceName} preprocessConditionBean(MethodInvocation invocation, org.seasar.dao.SqlCommand cmd) { + clearThreadLocal(); + + final ${glConditionBeanInterfaceName} ${glAttachedCBArgsVariableName}; + { + final Object[] args = invocation.getArguments(); + if (args == null || !(args.length >= 1)) { + return null; + } + + final Object arg0 = args[0]; + if (arg0 == null) { + return null; + } + + if (!${glConditionBeanContextName}.isTheTypeConditionBean(arg0.getClass())) {// The argument is not condition-bean... + if (${glFetchNarrowingBeanContextName}.isTheTypeFetchNarrowingBean(arg0.getClass()) && !isSelectCountIgnoreFetchScopeMethod(invocation)) { + // Fetch-narrowing-bean and Not select count! + ${glFetchNarrowingBeanContextName}.setFetchNarrowingBeanOnThread((${glFetchNarrowingBeanInterfaceName})arg0); + } + return null; + } + + ${glAttachedCBArgsVariableName} = (${glConditionBeanInterfaceName})arg0; + } + + if (!(cmd instanceof ${glSelectDynamicCommand})) {// The argument is condition-bean, but this method use outer-sql-file... + ${glFetchNarrowingBeanContextName}.setFetchNarrowingBeanOnThread(${glAttachedCBArgsVariableName}); + return null; + } + + if (isSelectCountIgnoreFetchScopeMethod(invocation)) { + ${glAttachedCBArgsVariableName}.xsetupSelectCountIgnoreFetchScope(); + } else { + ${glFetchNarrowingBeanContextName}.setFetchNarrowingBeanOnThread(cb); + } + + ${glConditionBeanContextName}.setConditionBeanOnThread(cb); + return ${glAttachedCBArgsVariableName}; + } + + /** + * Postprocess condition-bean. + * + * @param invocation Method invocation. (NotNull) + * @param ${glAttachedCBArgsVariableName} Condition-bean. (Nullable) + */ + public void postprocessConditionBean(MethodInvocation invocation, ${glConditionBeanInterfaceName} ${glAttachedCBArgsVariableName}) { + clearThreadLocal(); + + if (${glAttachedCBArgsVariableName} != null && isSelectCountIgnoreFetchScopeMethod(invocation)) { + ${glAttachedCBArgsVariableName}.xafterCareSelectCountIgnoreFetchScope(); + } + } + + protected void clearThreadLocal() { + if (${glFetchNarrowingBeanContextName}.isExistFetchNarrowingBeanOnThread()) { + ${glFetchNarrowingBeanContextName}.clearFetchNarrowingBeanOnThread(); + } + if (${glConditionBeanContextName}.isExistConditionBeanOnThread()) { + ${glConditionBeanContextName}.clearConditionBeanOnThread(); + } + } + + // ===================================================================================== + // Determination + // ============= + /** + * Is select count ignore-fetch-scope method? + * + * @param invocation Method invocation. (NotNull) + * @return Determination. + */ + protected boolean isSelectCountIgnoreFetchScopeMethod(MethodInvocation invocation) { + final String name = invocation.getMethod().getName(); + if (name.startsWith("readCount") + || name.startsWith("selectCount") + || name.startsWith("readCountIgnoreFetchScope") + || name.startsWith("selectCountIgnoreFetchScope")) { + return true; + } else { + return false; + } + } + + // ===================================================================================== + // Helper + // ====== + /** + * Get short class name. + * + * @param clazz Class instance. (NotNull) + * @return Short class name. (NotNull) + */ + protected String getShortClassName(Class clazz) { + String s = clazz.getName(); + int i = s.lastIndexOf('.'); + if (i > 0) { + return s.substring(i + 1); + } + return s; + } + + /** + * Change object array to string divided with comma. + * + * @param objArray Object array. (Nullable) + * @return String (NotNull: If the argument is null, returns empty string.) + */ + protected String getObjectArrayString(Object[] objArray) { + if (objArray == null) { + return ""; + } + final StringBuffer sb = new StringBuffer(); + for (int i = 0; i < objArray.length; i++) { + if (i == 0) { + sb.append(objArray[i]); + } else { + sb.append(", ").append(objArray[i]); + } + } + return sb.toString(); + } + + /** + * Get performance view. + * + * @param mil The value of millisecound. + * @return Performance view. (ex. 1m23s456ms) (NotNull) + */ + protected String getPerformanceView(long mil) { + if (mil < 0) { + return String.valueOf(mil); + } + + long sec = mil / 1000; + long min = sec / 60; + sec = sec % 60; + mil = mil % 1000; + + StringBuffer sb = new StringBuffer(); + if (min >= 10) { // Minute + sb.append(min).append("m"); + } else if (min < 10 && min >= 0) { + sb.append("0").append(min).append("m"); + } + if (sec >= 10) { // Second + sb.append(sec).append("s"); + } else if (sec < 10 && sec >= 0) { + sb.append("0").append(sec).append("s"); + } + if (mil >= 100) { // Millisecond + sb.append(mil).append("ms"); + } else if (mil < 100 && mil >= 10) { + sb.append("0").append(mil).append("ms"); + } else if (mil < 10 && mil >= 0) { + sb.append("00").append(mil).append("ms"); + } + + return sb.toString(); + } +} \ No newline at end of file Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/s2dao/S2DaoMetaDataExtension.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/s2dao/S2DaoMetaDataExtension.vm 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/s2dao/S2DaoMetaDataExtension.vm 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,1333 @@ +#if ($database.isVersionAfter1040()) + +package ${glPackageBaseCommonS2Dao}; + +#if ($database.isAvailableGenerics()) + +import java.lang.reflect.ParameterizedType; +import java.lang.reflect.Type; +#end + +import java.lang.reflect.Method; +import java.sql.DatabaseMetaData; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import javax.sql.DataSource; +#if ($database.isAvailableOtherConnectionDaoInitialization()) + +import javax.transaction.InvalidTransactionException; +import javax.transaction.Status; +import javax.transaction.SystemException; +import javax.transaction.Transaction; +import javax.transaction.TransactionManager; +import org.seasar.framework.exception.EmptyRuntimeException; +#end + +import org.seasar.dao.BeanEnhancer; +import org.seasar.dao.BeanMetaData; +import org.seasar.dao.BeanMetaDataFactory; +import org.seasar.dao.CommandContext; +#if ($database.isVersionAfter1043()) + +import org.seasar.dao.DaoAnnotationReader; +import org.seasar.dao.DtoMetaDataFactory; +#end + +import org.seasar.dao.Dbms; +import org.seasar.dao.RelationPropertyType; +import org.seasar.dao.RelationRowCreator; +import org.seasar.dao.ResultSetHandlerFactory; +import org.seasar.dao.SqlCommand; +import org.seasar.dao.impl.BeanMetaDataImpl; +import org.seasar.dao.impl.DaoMetaDataImpl; +import org.seasar.dao.impl.RelationRowCreatorImpl; +import org.seasar.dao.impl.AbstractSqlCommand; +import org.seasar.dao.impl.SelectDynamicCommand; +import org.seasar.dao.impl.UpdateAutoDynamicCommand; +import org.seasar.dao.impl.UpdateAutoStaticCommand; +import org.seasar.dao.impl.UpdateBatchAutoStaticCommand; +import org.seasar.dao.impl.UpdateModifiedOnlyCommand; +import org.seasar.dao.impl.DeleteAutoStaticCommand; +import org.seasar.dao.impl.DeleteBatchAutoStaticCommand; +import org.seasar.extension.jdbc.PropertyType; +import org.seasar.extension.jdbc.ResultSetFactory; +import org.seasar.extension.jdbc.ResultSetHandler; +import org.seasar.extension.jdbc.StatementFactory; +import org.seasar.extension.jdbc.impl.BasicSelectHandler; +import org.seasar.extension.jdbc.types.ValueTypes; +import org.seasar.framework.beans.BeanDesc; +import org.seasar.framework.beans.PropertyDesc; +import org.seasar.framework.util.StringUtil; + +import ${glPackageBaseCommonCBean}.${glConditionBeanContextName}; +#if ($database.isAvailableGenerics()) + +import ${glPackageBaseCommonAnnotation}.${glOutsideSqlAnnotation}; +#end + +/** + * DaoMetaDataImpl for DBFlute. + * + * @author ${database.ClassAuthor} + */ +public class ${glDaoMetaDataExtension} extends DaoMetaDataImpl { + + // ===================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + public ${glDaoMetaDataExtension}() { + } + +#if ($database.isAvailableOtherConnectionDaoInitialization()) + + // ===================================================================================== + // Other Connection Dao Initialization Override + // ============================================ + protected TransactionManager transactionManager; + + public void setTransactionManager(TransactionManager transactionManager) { + this.transactionManager = transactionManager; + } + + public void initialize() {// Override! + final TransactionSuspendEventInvoker transactionSuspendEventHandler = new TransactionSuspendEventInvoker(); + transactionSuspendEventHandler.setTransactionManager(transactionManager); + final TransactionSuspendEventCallback callback = new TransactionSuspendEventCallback() { + public Object callback() { + executeSuperInitialize(); + return null; + } + }; + transactionSuspendEventHandler.callbackAfterSuspendAndResumeLater(callback); + } + + protected void executeSuperInitialize() { + super.initialize(); + } + + protected static interface TransactionSuspendEventCallback { + public Object callback(); + } + + protected static class TransactionSuspendEventInvoker { + + private static final org.apache.commons.logging.Log _log = org.apache.commons.logging.LogFactory.getLog(TransactionSuspendEventInvoker.class); + + protected TransactionManager transactionManager; + + public void setTransactionManager(TransactionManager transactionManager) { + this.transactionManager = transactionManager; + } + + public boolean hasTransaction() throws SystemException { + return transactionManager.getStatus() != Status.STATUS_NO_TRANSACTION; + } + + public Transaction suspend() throws SystemException { + if (transactionManager == null) { + throw new EmptyRuntimeException("transactionManager"); + } + return transactionManager.suspend(); + } + + public void resume(final Transaction transaction) throws InvalidTransactionException, IllegalStateException, SystemException { + if (transactionManager == null) { + throw new EmptyRuntimeException("transactionManager"); + } + transactionManager.resume(transaction); + } + + public Object callbackAfterSuspendAndResumeLater(TransactionSuspendEventCallback callback) { + Transaction tx = null; + try { + if (!hasTransaction()) { + return callback.callback(); + } + _log.debug("...Suspending the transaction!"); + tx = suspend(); + return callback.callback(); + } catch (Exception e) { + String msg = "The initialize() that is overrided threw the exception: tx=" + tx; + throw new IllegalStateException(msg, e); + } finally { + if (tx != null) { + try { + _log.debug("...Resuming the transaction: tx=" + tx); + resume(tx); + } catch (Exception ignored) { + _log.warn("resume(tx) threw the exception: tx=" + tx, ignored); + } + } + } + } + } +#end + + // ===================================================================================== + // Bean Enhancer + // ============= + protected BeanEnhancer beanEnhancer; + + public BeanEnhancer getBeanEnhancer() { + return beanEnhancer; + } + + public void setBeanEnhancer(final BeanEnhancer beanEnhancer) { + this.beanEnhancer = beanEnhancer; + } +#if ($database.isAvailableGenerics()) + + // ===================================================================================== + // OutsideSql Check Override + // ========================= + protected void setupMethodByAuto(Method method) { + final ${glOutsideSqlAnnotation} outsideSql = method.getAnnotation(${glOutsideSqlAnnotation}.class); + if (outsideSql != null) { + String msg = "This method '" + method.getName() + "()' should use Outside Sql but the file was not found!"; + msg = msg + " Expected sql file name is '" + method.getDeclaringClass().getSimpleName() + "_" + method.getName() + ".sql'"; + throw new IllegalStateException(msg); + } + super.setupMethodByAuto(method); + } +#end + #if ($database.isVersionAfter1043()) + + // ===================================================================================== + // ResultSetHandlerFactory Override + // ================================ + protected ResultSetHandlerFactory createResultSetHandlerFactory() { + return new ResultSetHandlerFactoryExtension(beanMetaData, annotationReader, dtoMetaDataFactory); + } + #else + + // ===================================================================================== + // ResultSetHandlerFactory Override + // ================================ + protected ResultSetHandlerFactory createResultSetHandlerFactory(final BeanMetaData beanMetaData) { + return new ResultSetHandlerFactoryExtension(beanMetaData); + } + #end +#if ($database.isAvailableDaoMethodLazyInitializing()) + + // ===================================================================================== + // SqlCommand Setup Override + // ========================= + protected void setupSqlCommand() { + // Do nothing for lazy initializing! + } + + public org.seasar.dao.SqlCommand getSqlCommand(String methodName) throws org.seasar.framework.beans.MethodNotFoundRuntimeException { + { + final org.seasar.dao.SqlCommand cmd = (org.seasar.dao.SqlCommand) sqlCommands.get(methodName); + if (cmd != null) { + return cmd; + } + } + + final Method[] methods = daoBeanDesc.getMethods(methodName); + if (methods.length == 1 && org.seasar.framework.util.MethodUtil.isAbstract(methods[0])) { + setupMethod(methods[0]); + } + + { + final org.seasar.dao.SqlCommand cmd = (org.seasar.dao.SqlCommand) sqlCommands.get(methodName); + if (cmd != null) { + return cmd; + } + throw new org.seasar.framework.beans.MethodNotFoundRuntimeException(daoClass, methodName, null); + } + } +#end + + // ===================================================================================== + // ConditionBean Override + // ====================== + + protected SelectDynamicCommand setupNonQuerySelectMethodByDto(Method method, ResultSetHandler handler, String[] argNames, String query) { + Class[] types = method.getParameterTypes(); + Class clazz = types[0]; + if (!${glConditionBeanContextName}.isTheTypeConditionBean(clazz)) { + return super.setupNonQuerySelectMethodByDto(method, handler, argNames, query); + } + // /----------------------------------------------------- [MyExtension] + argNames = new String[] { "dto" }; + final String sqlNormal = getSelectClause(getBeanMetaData(), clazz); + final String sqlPKOnly = getSelectClausePKOnly(getBeanMetaData()); + final ${glSelectDynamicCommand} dynamicCommand = newMySelectDynamicCommand(handler); + String sql = sqlNormal; + final SelectDynamicCommand cmd = dynamicCommand; + dynamicCommand.setSelectClause(sqlNormal); + dynamicCommand.setSelectClausePKOnly(sqlPKOnly); + // -----------/ + if (query != null) { + sql = sql + " " + query; + } + cmd.setSql(sql); + cmd.setArgNames(argNames); + cmd.setArgTypes(types); + return cmd; + } + + /** + * Get select clause. + * + * @param beanMetaData BeanMetaData. (NotNull) + * @param conditionBeanClass Condition-bean class. (NotNull) + * @return Select clause. (NotNull) + */ + protected String getSelectClause(BeanMetaData beanMetaData, Class conditionBeanClass) { + final StringBuffer sb = new StringBuffer(100); + sb.append("select/*$dto.selectHint*/ "); + + final StringBuffer sbMySelectList = new StringBuffer(100); + for (int i = 0; i < beanMetaData.getPropertyTypeSize(); ++i) { + final PropertyType pt = beanMetaData.getPropertyType(i); + if (pt.isPersistent()) { + if (sbMySelectList.length() != 0) { + sbMySelectList.append(", "); + } + final String columnFullName = beanMetaData.getTableName() + "." + pt.getColumnName(); + sbMySelectList.append(columnFullName); + + ${glConditionBeanContextName}.addColumnAliasInfo(conditionBeanClass, columnFullName, pt.getColumnName()); + } + } + sb.append(sbMySelectList); + + setupRelationSelectClause(sb, beanMetaData, "", "", 1, conditionBeanClass); + return sb.toString(); + } + + protected void setupRelationSelectClause(StringBuffer sb, BeanMetaData baseBmd, String judgeProp, String preNoSuffix, int cqNestNo, Class conditionBeanClass) { + for (int i = 0; i < baseBmd.getRelationPropertyTypeSize(); ++i) { + final StringBuffer sbYourSelectList = new StringBuffer(100); + final RelationPropertyType rpt = baseBmd.getRelationPropertyType(i); + if (rpt == null) { + String msg = "The baseBmd.GetRelationPropertyType(" + i + ") returned null"; + msg = msg + ": baseBmd.getTableName()=" + baseBmd.getTableName(); + msg = msg + ": baseBmd.getRelationPropertyTypeSize()=" + baseBmd.getRelationPropertyTypeSize(); + throw new IllegalStateException(msg); + } + + final BeanMetaData relationBmd = rpt.getBeanMetaData(); + final String initCapPropertyName = StringUtil.capitalize(rpt.getPropertyName()); + final String ifComment = "/*IF dto." + judgeProp + "isSelect" + initCapPropertyName + "()*/"; + final String endComment = "/*END*/"; + for (int j = 0; j < relationBmd.getPropertyTypeSize(); ++j) { + final PropertyType pt = relationBmd.getPropertyType(j); + final String tableAliasName = StringUtil.capitalize(rpt.getPropertyName()) + (cqNestNo > 1 ? "_n" + cqNestNo : ""); + if (pt.isPersistent()) { + final String columnName = pt.getColumnName(); + final String columnFullName = tableAliasName + "." + columnName; + final String columnAliasName = pt.getColumnName() + preNoSuffix + "_" + rpt.getRelationNo(); + sbYourSelectList.append(", "); + sbYourSelectList.append(columnFullName).append(" AS ").append(columnAliasName); + + ${glConditionBeanContextName}.addColumnAliasInfo(conditionBeanClass, columnFullName, columnAliasName); + } + } + if (relationBmd.getRelationPropertyTypeSize() > 0) { + final String nssString = "nss" + initCapPropertyName + "."; + final String nextPreNoSuffix = preNoSuffix + "_" + rpt.getRelationNo(); + final int nextCQNestNo = cqNestNo + 1; + setupRelationSelectClause(sbYourSelectList, relationBmd, nssString, nextPreNoSuffix, nextCQNestNo, conditionBeanClass); + } + sb.append(ifComment).append(sbYourSelectList).append(endComment); + } + } + + /** + * Get select clause PK only. + * + * @param beanMetaData BeanMetaData. (NotNull) + * @return Select clause PK only. (NotNull) + */ + protected String getSelectClausePKOnly(BeanMetaData beanMetaData) { + final StringBuffer sb = new StringBuffer(100); + sb.append("select/*$dto.selectHint*/ "); + + final StringBuffer sbMySelectList = new StringBuffer(100); + for (int i = 0; i < beanMetaData.getPropertyTypeSize(); ++i) { + final PropertyType pt = beanMetaData.getPropertyType(i); + if (pt.isPersistent() && pt.isPrimaryKey()) { + if (sbMySelectList.length() != 0) { + sbMySelectList.append(", "); + } + sbMySelectList.append(beanMetaData.getTableName()); + sbMySelectList.append("."); + sbMySelectList.append(pt.getColumnName()); + } + } + sb.append(sbMySelectList); + + return sb.toString(); + } + + /** + * New my select dynamic command for condition-bean. + * + * @param handler ResultSetHandler + * @return My select dynamic command. (NotNull) + */ + protected ${glSelectDynamicCommand} newMySelectDynamicCommand(ResultSetHandler handler) {// for condition-bean + return new ${glSelectDynamicCommand}(dataSource, statementFactory, handler, resultSetFactory); + } + + // ===================================================================================== + // SelectDynamicCommand Override + // ============================= + protected SelectDynamicCommand createSelectDynamicCommand(ResultSetHandler rsh) {// for all except condition-bean + return new SelectDynamicCommand(dataSource, statementFactory, rsh, resultSetFactory); + } + + public static class SelectDynamicCommandExtension extends SelectDynamicCommand { +#if ($database.isSelectQueryTimeoutValid()) + + /** Log-instance. */ + private static final org.apache.commons.logging.Log _log = org.apache.commons.logging.LogFactory.getLog(SelectDynamicCommandExtension.class); +#end + + private ResultSetHandler resultSetHandler; + private ResultSetFactory resultSetFactory; + public SelectDynamicCommandExtension(DataSource dataSource, + StatementFactory statementFactory, + ResultSetHandler resultSetHandler, ResultSetFactory resultSetFactory) { + super(dataSource, statementFactory, resultSetHandler, resultSetFactory); + this.resultSetHandler = resultSetHandler; + this.resultSetFactory = resultSetFactory; + } + + public ResultSetHandler getResultSetHandler() { + return resultSetHandler; + } + + public Object execute(Object[] args) { + CommandContext ctx = apply(args); +#if ($database.isSelectQueryTimeoutValid()) + + final StatementFactory statementFactoryReal = getStatementFactory(); + final StatementFactory statementFactoryWrapper = new StatementFactory() { + public java.sql.PreparedStatement createPreparedStatement(java.sql.Connection arg0, String arg1) { + final java.sql.PreparedStatement ps = statementFactoryReal.createPreparedStatement(arg0, arg1); + try { + final int timeout = ${database.SelectQueryTimeout}; + if (_log.isDebugEnabled()) { + _log.debug("@SelectDynamicCommand: ps.setQueryTimeout(" + timeout + ");// from ${database.SelectQueryTimeout}"); + } + ps.setQueryTimeout(timeout); + } catch (java.sql.SQLException e) { + throw new org.seasar.framework.exception.SQLRuntimeException(e); + } + return ps; + } + public java.sql.CallableStatement createCallableStatement(java.sql.Connection arg0, String arg1) { + return statementFactoryReal.createCallableStatement(arg0, arg1); + } + }; + final BasicSelectHandler selectHandler = new BasicSelectHandler(getDataSource(), ctx.getSql(), resultSetHandler, statementFactoryWrapper, resultSetFactory); +#else + + final BasicSelectHandler selectHandler = new BasicSelectHandler(getDataSource(), ctx.getSql(), resultSetHandler, getStatementFactory(), resultSetFactory); +#end + + selectHandler.setFetchSize(-1); + return selectHandler.execute(ctx.getBindVariables(), ctx.getBindVariableTypes()); + } + } + + // ===================================================================================== + // UpdateByAuto Override + // ===================== + protected void setupUpdateMethodByAuto(Method method) { + checkAutoUpdateMethod(method); + String[] propertyNames = getPersistentPropertyNames(method); + AbstractSqlCommand cmd; + if (isUpdateSignatureForBean(method)) { + if (isUnlessNull(method.getName())) { + cmd = createUpdateAutoDynamicCommand(method, propertyNames); + } else if (isModifiedOnly(method.getName())) { + cmd = createUpdateModifiedOnlyCommand(method, propertyNames); + } else { + cmd = new UpdateAutoStaticCommand(dataSource, statementFactory, createNonConcurrencyBeanMetaData(method), propertyNames);// Extension Point! + } + } else { + cmd = new UpdateBatchAutoStaticCommand(dataSource, statementFactory, createNonConcurrencyBeanMetaData(method), propertyNames);// Extension Point! + } + sqlCommands.put(method.getName(), cmd); + } + + protected AbstractSqlCommand createUpdateAutoDynamicCommand(Method method, String[] propertyNames) { + AbstractSqlCommand cmd; + UpdateAutoDynamicCommand uac = new UpdateAutoDynamicCommand(dataSource, statementFactory); + uac.setBeanMetaData(createNonConcurrencyBeanMetaData(method));// Extension Point! + uac.setPropertyNames(propertyNames); + uac.setNotSingleRowUpdatedExceptionClass(getNotSingleRowUpdatedExceptionClass(method)); + cmd = uac; + return cmd; + } + + protected AbstractSqlCommand createUpdateModifiedOnlyCommand(final Method method, final String[] propertyNames) { + UpdateModifiedOnlyCommand uac = new UpdateModifiedOnlyCommand(dataSource, statementFactory); + uac.setBeanMetaData(createNonConcurrencyBeanMetaData(method));// Extension Point! + uac.setPropertyNames(propertyNames); + uac.setNotSingleRowUpdatedExceptionClass(getNotSingleRowUpdatedExceptionClass(method)); + return uac; + } + +#if ($database.isAvailableOtherConnectionDaoInitialization()) + + protected BeanMetaData createNonConcurrencyBeanMetaData(Method method) { + if (method.getName().contains("Nonstrict")) { + final TransactionSuspendEventInvoker transactionSuspendEventHandler = new TransactionSuspendEventInvoker(); + transactionSuspendEventHandler.setTransactionManager(transactionManager); + final TransactionSuspendEventCallback callback = new TransactionSuspendEventCallback() { + public Object callback() { + return createNonConcurrencyBmdFactory().createBeanMetaData(getBeanClass()); + } + }; + return (BeanMetaData)transactionSuspendEventHandler.callbackAfterSuspendAndResumeLater(callback); + } else { + return getBeanMetaData(); + } + } +#else + + protected BeanMetaData createNonConcurrencyBeanMetaData(Method method) { + if (method.getName().contains("Nonstrict")) { + return createNonConcurrencyBmdFactory().createBeanMetaData(getBeanClass()); + } else { + return getBeanMetaData(); + } + } +#end + + protected BeanMetaDataFactory createNonConcurrencyBmdFactory() { + final ${glBeanMetaDataFactoryImpl} nonConcurrencyBmdFactory = new ${glBeanMetaDataFactoryImpl}() { + protected BeanMetaDataImpl createBeanMetaDataImpl() { + return new BeanMetaDataImpl() { + public boolean hasVersionNoPropertyType() { + return false; + } + + public boolean hasTimestampPropertyType() { + return false; + } + }; + } + }; + nonConcurrencyBmdFactory.setAnnotationReaderFactory(this.annotationReaderFactory); + nonConcurrencyBmdFactory.setValueTypeFactory(this.valueTypeFactory); + nonConcurrencyBmdFactory.setDataSource(this.dataSource); + nonConcurrencyBmdFactory.setDaoNamingConvention(this.daoNamingConvention); + nonConcurrencyBmdFactory.setBeanEnhancer(this.beanEnhancer); + return nonConcurrencyBmdFactory; + } + + // ===================================================================================== + // DeleteByAuto Override + // ===================== + protected void setupDeleteMethodByAuto(Method method) { + checkAutoUpdateMethod(method); + String[] propertyNames = getPersistentPropertyNames(method); + SqlCommand cmd = null; + if (isUpdateSignatureForBean(method)) { + cmd = new DeleteAutoStaticCommand(dataSource, statementFactory, createNonConcurrencyBeanMetaData(method), propertyNames); + } else { + cmd = new DeleteBatchAutoStaticCommand(dataSource, statementFactory, createNonConcurrencyBeanMetaData(method), propertyNames); + } + sqlCommands.put(method.getName(), cmd); + } + + // ===================================================================================== + // ByManual Override + // ================= + protected void setupSelectMethodByManual(Method method, String sql) { + final BeanMetaData beanMetaData = buildBeanMetaData(method, this.dataSource); + #if ($database.isVersionAfter1043()) + + final ResultSetHandlerFactory factory = new ResultSetHandlerFactoryExtension(beanMetaData, annotationReader, dtoMetaDataFactory); + #else + + final ResultSetHandlerFactory factory = new ResultSetHandlerFactoryExtension(beanMetaData); + #end + + SelectDynamicCommand cmd = createSelectDynamicCommand(factory.createResultSetHandler(method)); + cmd.setSql(sql); + cmd.setArgNames(this.annotationReader.getArgNames(method)); + cmd.setArgTypes(method.getParameterTypes()); + this.sqlCommands.put(method.getName(), cmd); + } + + protected BeanMetaData buildBeanMetaData(Method method, DataSource ds) { + final Class beanClass4SelectMethodByManual = getOriginalBeanClass(method); + if (beanClass4SelectMethodByManual.equals(getBeanClass())) { + return getBeanMetaData(); + } + return createOriginalBmdFactory().createBeanMetaData(getOriginalBeanClass(method)); + } + + protected BeanMetaDataFactory createOriginalBmdFactory() { + final ${glBeanMetaDataFactoryImpl} originalBmdFactory = new ${glBeanMetaDataFactoryImpl}() { + protected BeanMetaDataImpl createBeanMetaDataImpl() { + return new BeanMetaDataImpl() { + protected void setupDatabaseMetaData(BeanDesc beanDesc, DatabaseMetaData dbMetaData, Dbms dbms) { + // Nothing. + } + }; + } + }; + originalBmdFactory.setAnnotationReaderFactory(this.annotationReaderFactory); + originalBmdFactory.setValueTypeFactory(this.valueTypeFactory); + originalBmdFactory.setDataSource(this.dataSource); + originalBmdFactory.setDaoNamingConvention(this.daoNamingConvention); + originalBmdFactory.setBeanEnhancer(this.beanEnhancer); + return originalBmdFactory; + } + + protected Class getOriginalBeanClass(Method method) { + final Class retType = method.getReturnType(); + if (java.util.List.class.isAssignableFrom(retType)) { + final Class elementType = InternalMethodUtil.getElementTypeOfListFromReturnMethod(method); + if (elementType != null) { + return elementType; + } else { + return getBeanClass(); + } + } else if (retType.isArray()) { + return retType.getComponentType(); + } else if (retType.isPrimitive() || !ValueTypes.getValueType(retType).equals(ValueTypes.OBJECT)) { + return getBeanClass(); + } else { + return retType; + } + } + + protected static class InternalMethodUtil { + public static Class getElementTypeOfListFromReturnMethod(Method method) { + return ReflectionUtil.getElementTypeOfListFromReturnType(method); + } + } +#if ($database.isAvailableGenerics()) + + protected static class ReflectionUtil { + public static Class getElementTypeOfList(final Type parameterizedList) { + if (!(parameterizedList instanceof ParameterizedType)) { + return null; + } + + final ParameterizedType parameterizedType = ParameterizedType.class.cast(parameterizedList); + final Type rawType = parameterizedType.getRawType(); + if (!(rawType instanceof Class)) { + return null; + } + + final Class rawClass = Class.class.cast(rawType); + if (!rawClass.isAssignableFrom(List.class)) { + return null; + } + + final Type[] actualTypeArgument = parameterizedType.getActualTypeArguments(); + if (actualTypeArgument == null || actualTypeArgument.length != 1) { + return null; + } + if (!(actualTypeArgument[0] instanceof Class)) { + return null; + } + + return Class.class.cast(actualTypeArgument[0]); + } + + public static Class getElementTypeOfListFromParameterType(final Method method, final int parameterPosition) { + final Type[] parameterTypes = method.getGenericParameterTypes(); + return getElementTypeOfList(parameterTypes[parameterPosition]); + } + + public static Class getElementTypeOfListFromReturnType(final Method method) { + return getElementTypeOfList(method.getGenericReturnType()); + } + } +#else + + protected static class ReflectionUtil { + public static Class getElementTypeOfListFromReturnType(final Method method) { + return null; + } + } +#end + + protected static class ResultSetHandlerFactoryExtension extends ResultSetHandlerFactoryImpl { + #if ($database.isVersionAfter1043()) + + public ResultSetHandlerFactoryExtension(BeanMetaData beanMetaData, DaoAnnotationReader annotationReader, DtoMetaDataFactory dtoMetaDataFactory) { + super(beanMetaData, annotationReader, dtoMetaDataFactory); + } + #else + + public ResultSetHandlerFactoryExtension(BeanMetaData beanMetaData) { + super(beanMetaData); + } + #end + + protected RelationRowCreator createRelationRowCreator() { + return new RelationRowCreatorExtension(); + } + } + + protected static class RelationRowCreatorExtension extends RelationRowCreatorImpl { + public Object createRelationRow(ResultSet rs, RelationPropertyType rpt, Set columnNames, Map relKeyValues) + throws SQLException { + return createRelationRow(rs, rpt, columnNames, relKeyValues, ""); + } + + public Object createRelationRow(ResultSet rs, RelationPropertyType rpt, Set columnNames, Map relKeyValues, + String preRelationNoSuffix) throws SQLException { + // It must doesn't need to invoke this! + // final Object row = setupRelationKeyValue(rpt, columnNames, relKeyValues); + + return setupRelationAllValue(rs, rpt, columnNames, relKeyValues, preRelationNoSuffix); + } + + protected Object setupRelationAllValue(ResultSet rs, RelationPropertyType rpt, Set columnNames, + Map relKeyValues, String preRelationNoSuffix) throws SQLException { + Object row = null; + final String relationNoSuffix = preRelationNoSuffix + "_" + rpt.getRelationNo(); + final BeanMetaData bmd = rpt.getBeanMetaData(); + int existColumn = 0; + for (int i = 0; i < bmd.getPropertyTypeSize(); ++i) { + final PropertyType pt = bmd.getPropertyType(i); + final String columnName = pt.getColumnName() + relationNoSuffix; + if (!columnNames.contains(columnName)) { + continue; + } + + // Return null if the primary key of foreign table is invalid(The foreign key is deadlink). + if (pt.isPrimaryKey()) { + if (!isValidValue(rs, pt, columnName, relKeyValues)) { + return null; + } + } + + existColumn++; + if (row == null) { + row = createRelationRow(rpt); + } + registerRelationValue(row, rs, rpt, pt, columnName, relKeyValues); + } + + // Return null if setupSelect_Xxx() or withXxx() has not been invoked. + if (existColumn == 0) { + return null; + } + + if (rpt.getBeanMetaData().getRelationPropertyTypeSize() != 0) { + createParentRelationRow(rs, rpt.getBeanMetaData(), columnNames, relationNoSuffix, row); + } + return row; + } + + protected boolean isValidValue(ResultSet rs, PropertyType pt, String columnName, Map relKeyValues) throws SQLException { + Object value = null; + if (relKeyValues != null && relKeyValues.containsKey(columnName)) { + value = relKeyValues.get(columnName); + } else { + final org.seasar.extension.jdbc.ValueType valueType = pt.getValueType(); + value = valueType.getValue(rs, columnName); + } + return value != null; + } + + protected void createParentRelationRow(ResultSet rs, BeanMetaData parentBmd, Set columnNames, + String relationNoSuffix, Object row) throws SQLException { + for (int i = 0; i < parentBmd.getRelationPropertyTypeSize(); ++i) { + RelationPropertyType parentParentRpt = parentBmd.getRelationPropertyType(i); + if (parentParentRpt == null) { + continue; + } + Object relationRow = createRelationRow(rs, parentParentRpt, columnNames, null, relationNoSuffix); + if (relationRow != null) { + PropertyDesc pd = parentParentRpt.getPropertyDesc(); + pd.setValue(row, relationRow); + } + } + } + } +} +#else + +package ${glPackageBaseCommonS2Dao}; + +import java.lang.reflect.Array; +import java.lang.reflect.Method; +#if ($database.isAvailableGenerics()) + +import java.lang.reflect.ParameterizedType; +import java.lang.reflect.Type; +#end + +import java.sql.Connection; +import java.sql.DatabaseMetaData; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.StringTokenizer; + +import javax.sql.DataSource; + +import org.seasar.dao.BeanMetaData; +import org.seasar.dao.Dbms; +import org.seasar.dao.RelationPropertyType; +import org.seasar.dao.ResultSetHandlerFactory; +import org.seasar.dao.dbms.DbmsManager; +import org.seasar.dao.impl.BeanArrayMetaDataResultSetHandler; +import org.seasar.dao.impl.BeanListMetaDataResultSetHandler; +import org.seasar.dao.impl.BeanMetaDataImpl; +import org.seasar.dao.impl.BeanMetaDataResultSetHandler; +import org.seasar.dao.impl.DaoMetaDataImpl; +import org.seasar.dao.impl.RelationPropertyTypeImpl; +import org.seasar.dao.impl.SelectDynamicCommand; +import org.seasar.extension.jdbc.PropertyType; +import org.seasar.extension.jdbc.ResultSetHandler; +import org.seasar.extension.jdbc.ValueType; +import org.seasar.extension.jdbc.impl.ObjectResultSetHandler; +import org.seasar.extension.jdbc.types.ValueTypes; +import org.seasar.extension.jdbc.util.ConnectionUtil; +import org.seasar.extension.jdbc.util.DataSourceUtil; +import org.seasar.framework.beans.BeanDesc; +import org.seasar.framework.beans.PropertyDesc; +import org.seasar.framework.beans.factory.BeanDescFactory; +import org.seasar.framework.util.ClassUtil; +import org.seasar.framework.util.StringUtil; + +import ${glPackageBaseCommonCBean}.${glConditionBeanContextName}; +import ${glPackageBaseCommonCBean}.${glSelectResourceInterfaceName}; + +/** + * DaoMetaDataImpl for DaoGen. + * + * @author ${database.ClassAuthor} + */ +public class ${glDaoMetaDataExtension} extends DaoMetaDataImpl { + + /** + * Constructor. + */ + public ${glDaoMetaDataExtension}() { + } + + public void initialize() { + Class daoClass = getDaoClass(); + daoInterface = getDaoInterface(daoClass); + daoBeanDesc = BeanDescFactory.getBeanDesc(daoClass); + annotationReader = getAnnotationReaderFactory().createDaoAnnotationReader(daoBeanDesc); + setBeanClass(annotationReader.getBeanClass()); + Connection con = DataSourceUtil.getConnection(dataSource); + try { + DatabaseMetaData dbMetaData = ConnectionUtil.getMetaData(con); + dbms = DbmsManager.getDbms(dbMetaData); + BeanMetaDataImpl beanMetaDataImpl = new BeanMetaDataExtension(); + beanMetaDataImpl.setBeanClass(getBeanClass()); + beanMetaDataImpl.setDatabaseMetaData(dbMetaData); + beanMetaDataImpl.setDbms(dbms); + beanMetaDataImpl.setAnnotationReaderFactory(getAnnotationReaderFactory()); + beanMetaDataImpl.setValueTypeFactory(getValueTypeFactory()); + beanMetaDataImpl.initialize(); + this.beanMetaData = beanMetaDataImpl; + } finally { + ConnectionUtil.close(con); + } + resultSetHandlerFactory = new ResultSetHandlerFactoryExtension(beanMetaData); + setupSqlCommand(); + } + + // ===================================================================================== + // ConditionBean Override + // ====================== + /** + * This method overrides the method that is declared at super. + * + * @param method Method instance. (NotNull) + */ + protected void setupSelectMethodByAuto(Method method) { + String query = annotationReader.getQuery(method); + ResultSetHandler handler = createResultSetHandler(method); + SelectDynamicCommand cmd = null; + String[] argNames = annotationReader.getArgNames(method); + Class[] argTypes = method.getParameterTypes(); + if (query != null && !startsWithOrderBy(query)) { + cmd = createSelectDynamicCommand(handler, query); + } else { + cmd = createSelectDynamicCommand(handler); + String sql = null; + if (argNames.length == 0 && argTypes.length == 1) { + argNames = new String[] { "dto" }; + // /----------------------------------------------------- [MyExtension] + if (${glConditionBeanContextName}.isTheTypeConditionBean(argTypes[0])) { + final String sqlNormal = getSelectClause(getBeanMetaData(), argTypes[0]); + final String sqlPKOnly = getSelectClausePKOnly(getBeanMetaData()); + final ${glSelectDynamicCommand} dynamicCommand = newMySelectDynamicCommand(handler); + sql = sqlNormal; + cmd = dynamicCommand; + dynamicCommand.setSelectClause(sqlNormal); + dynamicCommand.setSelectClausePKOnly(sqlPKOnly); + } else { + if (${glSelectResourceInterfaceName}.class.isAssignableFrom(argTypes[0])) { + String msg = "If the first argument type is select-resource(and not condition-bean), "; + msg = msg + "the method should not use auto-select-sql."; + msg = msg + " (Do you want to use outer-file-sql? Please check your sql-file-name and build-action!)"; + msg = msg + ": dao=" + method.getDeclaringClass() + " method=" + method.getName() + "()"; + msg = msg + " firstArgument=" + argTypes[0] + " argTypes.length=" + argTypes.length; + throw new IllegalStateException(msg); + } + sql = createAutoSelectSqlByDto(argTypes[0]); + } + // -----------/ + } else { + // /----------------------------------------------------- [MyExtension] + if (argTypes.length > 1 && ${glSelectResourceInterfaceName}.class.isAssignableFrom(argTypes[0])) { + String msg = "If the number of argument is more than 1 and the first argument type is select-resource, "; + msg = msg + "the method should not use auto-select-sql."; + msg = msg + " (Do you want to use outer-file-sql? Please check your sql-file-name and build-action!)"; + msg = msg + ": dao=" + method.getDeclaringClass() + " method=" + method.getName() + "()"; + msg = msg + " firstArgument=" + argTypes[0] + " argTypes.length=" + argTypes.length; + throw new IllegalStateException(msg); + } + // -----------/ + sql = createAutoSelectSql(argNames); + } + if (query != null) { + sql = sql + " " + query; + } + cmd.setSql(sql); + } + cmd.setArgNames(argNames); + cmd.setArgTypes(method.getParameterTypes()); + sqlCommands.put(method.getName(), cmd); + } + + /** + * Get select clause. + * + * @param beanMetaData BeanMetaData. (NotNull) + * @param conditionBeanClass Condition-bean class. (NotNull) + * @return Select clause. (NotNull) + */ + protected String getSelectClause(BeanMetaData beanMetaData, Class conditionBeanClass) { + final StringBuffer sb = new StringBuffer(100); + sb.append("select/*$dto.selectHint*/ "); + + final StringBuffer sbMySelectList = new StringBuffer(100); + for (int i = 0; i < beanMetaData.getPropertyTypeSize(); ++i) { + final PropertyType pt = beanMetaData.getPropertyType(i); + if (pt.isPersistent()) { + if (sbMySelectList.length() != 0) { + sbMySelectList.append(", "); + } + final String columnFullName = beanMetaData.getTableName() + "." + pt.getColumnName(); + sbMySelectList.append(columnFullName); + + ${glConditionBeanContextName}.addColumnAliasInfo(conditionBeanClass, columnFullName, pt.getColumnName()); + } + } + sb.append(sbMySelectList); + + setupRelationSelectClause(sb, beanMetaData, "", "", 1, conditionBeanClass); + return sb.toString(); + } + + protected void setupRelationSelectClause(StringBuffer sb, BeanMetaData baseBmd, String judgeProp, String preNoSuffix, int cqNestNo, Class conditionBeanClass) { + for (int i = 0; i < baseBmd.getRelationPropertyTypeSize(); ++i) { + final StringBuffer sbYourSelectList = new StringBuffer(100); + final RelationPropertyType rpt = baseBmd.getRelationPropertyType(i); + if (rpt == null) { + String msg = "The baseBmd.GetRelationPropertyType(" + i + ") returned null"; + msg = msg + ": baseBmd.getTableName()=" + baseBmd.getTableName(); + msg = msg + ": baseBmd.getRelationPropertyTypeSize()=" + baseBmd.getRelationPropertyTypeSize(); + throw new IllegalStateException(msg); + } + + final BeanMetaData relationBmd = rpt.getBeanMetaData(); + final String initCapPropertyName = StringUtil.capitalize(rpt.getPropertyName()); + final String ifComment = "/*IF dto." + judgeProp + "isSelect" + initCapPropertyName + "()*/"; + final String endComment = "/*END*/"; + for (int j = 0; j < relationBmd.getPropertyTypeSize(); ++j) { + final PropertyType pt = relationBmd.getPropertyType(j); + final String tableAliasName = StringUtil.capitalize(rpt.getPropertyName()) + (cqNestNo > 1 ? "_n" + cqNestNo : ""); + if (pt.isPersistent()) { + final String columnName = pt.getColumnName(); + final String columnFullName = tableAliasName + "." + columnName; + final String columnAliasName = pt.getColumnName() + preNoSuffix + "_" + rpt.getRelationNo(); + sbYourSelectList.append(", "); + sbYourSelectList.append(columnFullName).append(" AS ").append(columnAliasName); + + ${glConditionBeanContextName}.addColumnAliasInfo(conditionBeanClass, columnFullName, columnAliasName); + } + } + if (relationBmd.getRelationPropertyTypeSize() > 0) { + final String nssString = "nss" + initCapPropertyName + "."; + final String nextPreNoSuffix = preNoSuffix + "_" + rpt.getRelationNo(); + final int nextCQNestNo = cqNestNo + 1; + setupRelationSelectClause(sbYourSelectList, relationBmd, nssString, nextPreNoSuffix, nextCQNestNo, conditionBeanClass); + } + sb.append(ifComment).append(sbYourSelectList).append(endComment); + } + } + + /** + * Get select clause PK only. + * + * @param beanMetaData BeanMetaData. (NotNull) + * @return Select clause PK only. (NotNull) + */ + protected String getSelectClausePKOnly(BeanMetaData beanMetaData) { + final StringBuffer sb = new StringBuffer(100); + sb.append("select/*$dto.selectHint*/ "); + + final StringBuffer sbMySelectList = new StringBuffer(100); + for (int i = 0; i < beanMetaData.getPropertyTypeSize(); ++i) { + final PropertyType pt = beanMetaData.getPropertyType(i); + if (pt.isPersistent() && pt.isPrimaryKey()) { + if (sbMySelectList.length() != 0) { + sbMySelectList.append(", "); + } + sbMySelectList.append(beanMetaData.getTableName()); + sbMySelectList.append("."); + sbMySelectList.append(pt.getColumnName()); + } + } + sb.append(sbMySelectList); + + return sb.toString(); + } + + /** + * Create select-dynamic-command. (Override) + * + * @param handler ResultSetHandler + * @return Select dynamic command. (NotNull) + */ + protected SelectDynamicCommand createSelectDynamicCommand(ResultSetHandler handler) { + return newMySelectDynamicCommand(handler); + } + + /** + * New my select dynamic command. + * + * @param handler ResultSetHandler + * @return My select dynamic command. (NotNull) + */ + protected ${glSelectDynamicCommand} newMySelectDynamicCommand(ResultSetHandler handler) { + return new ${glSelectDynamicCommand}(dataSource, statementFactory, handler, resultSetFactory); + } + + // ===================================================================================== + // ByManual Override + // ================= + protected void setupSelectMethodByManual(Method method, String sql) { + final BeanMetaData beanMetaData = buildBeanMetaData(method, this.dbms, this.dataSource); + final ResultSetHandlerFactory factory = new ResultSetHandlerFactoryExtension(beanMetaData); + SelectDynamicCommand cmd = createSelectDynamicCommand(factory.createResultSetHandler(method)); + cmd.setSql(sql); + cmd.setArgNames(this.annotationReader.getArgNames(method)); + cmd.setArgTypes(method.getParameterTypes()); + this.sqlCommands.put(method.getName(), cmd); + } + + protected BeanMetaData buildBeanMetaData(Method method, Dbms dbInfo, DataSource ds) { + final Class beanClass4SelectMethodByManual = getBeanClass4SelectMethodByManual(method); + if (beanClass4SelectMethodByManual.equals(getBeanClass())) { + return getBeanMetaData(); + } + final BeanMetaDataImpl beanMetaDataImpl = new BeanMetaDataExtension(); + final Connection con = DataSourceUtil.getConnection(ds); + try { + DatabaseMetaData dbMetaData = ConnectionUtil.getMetaData(con); + beanMetaDataImpl.setBeanClass(getBeanClass4SelectMethodByManual(method)); + beanMetaDataImpl.setDatabaseMetaData(dbMetaData); + beanMetaDataImpl.setDbms(dbInfo); + beanMetaDataImpl.setAnnotationReaderFactory(getAnnotationReaderFactory()); + beanMetaDataImpl.setValueTypeFactory(getValueTypeFactory()); + beanMetaDataImpl.initialize(); + } finally { + ConnectionUtil.close(con); + } + return beanMetaDataImpl; + } + + protected Class getBeanClass4SelectMethodByManual(Method method) { + final Class retType = method.getReturnType(); + if (java.util.List.class.isAssignableFrom(retType)) { + final Class elementType = InternalMethodUtil.getElementTypeOfListFromReturnMethod(method); + if (elementType != null) { + return elementType; + } else { + return getBeanClass(); + } + } else if (retType.isArray()) { + return retType.getComponentType(); + } else if (retType.isPrimitive() || !ValueTypes.getValueType(retType).equals(ValueTypes.OBJECT)) { + return getBeanClass(); + } else { + return retType; + } + } + + protected static class InternalMethodUtil { + public static Class getElementTypeOfListFromReturnMethod(Method method) { + return ReflectionUtil.getElementTypeOfListFromReturnType(method); + } + } +#if ($database.isAvailableGenerics()) + + protected static class ReflectionUtil { + public static Class getElementTypeOfList(final Type parameterizedList) { + if (!(parameterizedList instanceof ParameterizedType)) { + return null; + } + + final ParameterizedType parameterizedType = ParameterizedType.class.cast(parameterizedList); + final Type rawType = parameterizedType.getRawType(); + if (!(rawType instanceof Class)) { + return null; + } + + final Class rawClass = Class.class.cast(rawType); + if (!rawClass.isAssignableFrom(List.class)) { + return null; + } + + final Type[] actualTypeArgument = parameterizedType.getActualTypeArguments(); + if (actualTypeArgument == null || actualTypeArgument.length != 1) { + return null; + } + if (!(actualTypeArgument[0] instanceof Class)) { + return null; + } + + return Class.class.cast(actualTypeArgument[0]); + } + + public static Class getElementTypeOfListFromParameterType(final Method method, final int parameterPosition) { + final Type[] parameterTypes = method.getGenericParameterTypes(); + return getElementTypeOfList(parameterTypes[parameterPosition]); + } + + public static Class getElementTypeOfListFromReturnType(final Method method) { + return getElementTypeOfList(method.getGenericReturnType()); + } + } +#else + + protected static class ReflectionUtil { + public static Class getElementTypeOfListFromReturnType(final Method method) { + return null; + } + } +#end + + protected static class BeanMetaDataExtension extends BeanMetaDataImpl { + private int _nestNo; + public void setNestNo(int value) { + _nestNo = value; + } + protected RelationPropertyType createRelationPropertyType( + BeanDesc beanDesc, PropertyDesc propertyDesc, + DatabaseMetaData dbMetaData, Dbms dbms) { + String[] myKeys = new String[0]; + String[] yourKeys = new String[0]; + int relno = beanAnnotationReader.getRelationNo(propertyDesc); + String relkeys = beanAnnotationReader.getRelationKey(propertyDesc); + if (relkeys != null) { + StringTokenizer st = new StringTokenizer(relkeys, " \t\n\r\f,"); + List myKeyList = new ArrayList(); + List yourKeyList = new ArrayList(); + while (st.hasMoreTokens()) { + String token = st.nextToken(); + int index = token.indexOf(':'); + if (index > 0) { + myKeyList.add(token.substring(0, index)); + yourKeyList.add(token.substring(index + 1)); + } else { + myKeyList.add(token); + yourKeyList.add(token); + } + } + myKeys = (String[]) myKeyList.toArray(new String[myKeyList.size()]); + yourKeys = (String[]) yourKeyList.toArray(new String[yourKeyList + .size()]); + } + Class beanClass = propertyDesc.getPropertyType(); + + // /======================================================= {Modify} + BeanMetaDataExtension beanMetaData = new BeanMetaDataExtension(); + // ==============/ + + beanMetaData.setBeanClass(beanClass); + beanMetaData.setDatabaseMetaData(dbMetaData); + beanMetaData.setDbms(dbms); + beanMetaData.setAnnotationReaderFactory(getAnnotationReaderFactory()); + beanMetaData.setValueTypeFactory(getValueTypeFactory()); + + // /======================================================= {Modify} + if (_nestNo > 0) { + beanMetaData.setRelation(true); + } else { + beanMetaData.setRelation(false); + } + final int nestNo = _nestNo + 1; + beanMetaData.setNestNo(nestNo); + // ==============/ + + beanMetaData.initialize(); + RelationPropertyType rpt = new RelationPropertyTypeImpl(propertyDesc, + relno, myKeys, yourKeys, beanMetaData); + return rpt; + } + } + + protected static class ResultSetHandlerFactoryExtension implements ResultSetHandlerFactory { + final BeanMetaData beanMetaData; + + public ResultSetHandlerFactoryExtension(BeanMetaData beanMetaData) { + this.beanMetaData = beanMetaData; + } + + public ResultSetHandler createResultSetHandler(final Method method) { + final Class beanClass = beanMetaData.getBeanClass(); + if (List.class.isAssignableFrom(method.getReturnType())) { + return new BeanListMetaDataResultSetHandler(beanMetaData) { + protected Object createRelationRow(ResultSet rs, RelationPropertyType rpt, + Set columnNames, Map relKeyValues) throws SQLException { + return createRelationRow(rs, rpt, columnNames, relKeyValues, ""); + } + protected Object createRelationRow(ResultSet rs, RelationPropertyType rpt, + Set columnNames, Map relKeyValues, String preNoSuffix) throws SQLException { + return delegateCreateRelationRow(rs, rpt, columnNames, relKeyValues, preNoSuffix); + } + }; + } else if (isBeanClassAssignable(beanClass, method.getReturnType())) { + return new BeanMetaDataResultSetHandler(beanMetaData) { + protected Object createRelationRow(ResultSet rs, RelationPropertyType rpt, + Set columnNames, Map relKeyValues) throws SQLException { + return createRelationRow(rs, rpt, columnNames, relKeyValues, ""); + } + protected Object createRelationRow(ResultSet rs, RelationPropertyType rpt, + Set columnNames, Map relKeyValues, String preNoSuffix) throws SQLException { + return delegateCreateRelationRow(rs, rpt, columnNames, relKeyValues, preNoSuffix); + } + }; + } else if (method.getReturnType().isAssignableFrom(Array.newInstance(beanClass, 0).getClass())) { + return new BeanArrayMetaDataResultSetHandler(beanMetaData) { + protected Object createRelationRow(ResultSet rs, RelationPropertyType rpt, + Set columnNames, Map relKeyValues) throws SQLException { + return createRelationRow(rs, rpt, columnNames, relKeyValues, ""); + } + protected Object createRelationRow(ResultSet rs, RelationPropertyType rpt, + Set columnNames, Map relKeyValues, String preNoSuffix) throws SQLException { + return delegateCreateRelationRow(rs, rpt, columnNames, relKeyValues, preNoSuffix); + } + }; + } else { + return new ObjectResultSetHandler(); + } + } + + protected Object delegateCreateRelationRow(ResultSet rs, RelationPropertyType rpt, + Set columnNames, Map relKeyValues, String preNoSuffix) + throws SQLException { + Object row = null; + BeanMetaData bmd = rpt.getBeanMetaData(); + for (int i = 0; i < rpt.getKeySize(); ++i) { + String columnName = rpt.getMyKey(i); + if (columnNames.contains(columnName)) { + if (row == null) { + row = createRelationRow(rpt); + } + if (relKeyValues != null + && relKeyValues.containsKey(columnName)) { + Object value = relKeyValues.get(columnName); + PropertyType pt = bmd.getPropertyTypeByColumnName(rpt + .getYourKey(i)); + PropertyDesc pd = pt.getPropertyDesc(); + if (value != null) { + pd.setValue(row, value); + } + } + } + continue; + } + final String relationNoSuffix = buildRelationNoSuffix(preNoSuffix, rpt + .getRelationNo()); + int existColumn = 0; + for (int i = 0; i < bmd.getPropertyTypeSize(); ++i) { + PropertyType pt = bmd.getPropertyType(i); + String columnName = pt.getColumnName() + relationNoSuffix; + if (!columnNames.contains(columnName)) { + continue; + } + existColumn++; + if (row == null) { + row = createRelationRow(rpt); + } + Object value = null; + if (relKeyValues != null && relKeyValues.containsKey(columnName)) { + value = relKeyValues.get(columnName); + } else { + ValueType valueType = pt.getValueType(); + value = valueType.getValue(rs, columnName); + } + PropertyDesc pd = pt.getPropertyDesc(); + if (value != null) { + pd.setValue(row, value); + } + } + + if (existColumn == 0) { + return null; + } + + if (rpt.getBeanMetaData().getRelationPropertyTypeSize() != 0) { + createParentRelationRow(rs, rpt.getBeanMetaData(), columnNames, relationNoSuffix, row); + } + return row; + } + + protected Object createRelationRow(RelationPropertyType rpt) { + return ClassUtil.newInstance(rpt.getPropertyDesc().getPropertyType()); + } + + protected void createParentRelationRow(ResultSet rs, BeanMetaData parentBmd, Set columnNames, + String relationNoSuffix, Object row) throws SQLException { + for (int i = 0; i < parentBmd.getRelationPropertyTypeSize(); ++i) { + RelationPropertyType parentParentRpt = parentBmd.getRelationPropertyType(i); + if (parentParentRpt == null) { + continue; + } + Object relationRow = delegateCreateRelationRow(rs, parentParentRpt, columnNames, null, relationNoSuffix); + if (relationRow != null) { + PropertyDesc pd = parentParentRpt.getPropertyDesc(); + pd.setValue(row, relationRow); + } + } + } + + private String buildRelationNoSuffix(String preNoSuffix, int relationNo) { + return preNoSuffix + "_" + relationNo; + } + + private boolean isBeanClassAssignable(Class beanClass, Class clazz) { + return beanClass.isAssignableFrom(clazz) || clazz.isAssignableFrom(beanClass); + } + } + +} +#end \ No newline at end of file Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/s2dao/S2DaoMetaDataFactoryImpl.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/s2dao/S2DaoMetaDataFactoryImpl.vm 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/s2dao/S2DaoMetaDataFactoryImpl.vm 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,194 @@ +package ${glPackageBaseCommonS2Dao}; + +import java.sql.Connection; +import java.sql.DatabaseMetaData; +import javax.sql.DataSource; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +#if ($database.isVersionAfter1040()) + #if ($database.isAvailableOtherConnectionDaoInitialization()) + +import javax.transaction.TransactionManager; + #end + +import org.seasar.dao.AnnotationReaderFactory; +import org.seasar.dao.BeanEnhancer; +import org.seasar.dao.impl.DaoMetaDataFactoryImpl; +import org.seasar.dao.impl.DaoMetaDataImpl; +import org.seasar.extension.jdbc.ResultSetFactory; +import org.seasar.extension.jdbc.StatementFactory; +#else + +import org.seasar.dao.AnnotationReaderFactory; +import org.seasar.dao.DaoMetaData; +import org.seasar.dao.impl.DaoMetaDataFactoryImpl; +import org.seasar.dao.impl.DaoMetaDataImpl; +import org.seasar.extension.jdbc.ResultSetFactory; +import org.seasar.extension.jdbc.StatementFactory; +#end + +import org.seasar.dao.Dbms; +import org.seasar.dao.dbms.DbmsManager; +import org.seasar.extension.jdbc.util.ConnectionUtil; +import org.seasar.extension.jdbc.util.DataSourceUtil; + +import ${glPackageBaseCommonCBean}.${glConditionBeanContextName}; + +/** + * DaoMetaDataFactoryImpl for DBFlute. + * + * @author ${database.ClassAuthor} + */ +public class ${glDaoMetaDataFactoryImpl} extends DaoMetaDataFactoryImpl { + + /** Log-instance. */ + private static final Log _log = LogFactory.getLog(${glDaoInterceptor}.class); +#if ($database.isVersionAfter1040() && $database.isAvailableOtherConnectionDaoInitialization()) + + // ===================================================================================== + // Attribute + // ========= + private TransactionManager transactionManager; +#end + + // ===================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param dataSource Data source. + * @param statementFactory Statement factory. + * @param resultSetFactory Result set factory. + * @param readerFactory Annotation reader factory. + */ + public ${glDaoMetaDataFactoryImpl}(DataSource dataSource, + StatementFactory statementFactory, + ResultSetFactory resultSetFactory, + AnnotationReaderFactory readerFactory) { + super(dataSource, statementFactory, resultSetFactory, readerFactory); + + // Stop the LinkageError! + ${glConditionBeanContextName}.initialize(); + + initializeDatabaseProductNameOfContext(dataSource); + } + + // -------------------------------------- + // Database Product Name + // --------------------- + protected void initializeDatabaseProductNameOfContext(DataSource dataSource) { + if (getDatabaseProductNameFromContext() != null) { + return; + } + String suffix = null; + try { + final Connection con = DataSourceUtil.getConnection(dataSource); + try { + final DatabaseMetaData dbMetaData = ConnectionUtil.getMetaData(con); + final Dbms dbms = DbmsManager.getDbms(dbMetaData); + suffix = dbms.getSuffix(); + } finally { + ConnectionUtil.close(con); + } + if (suffix == null) { + setDatabaseProductNameToContext("${database.DaoGenDbName}"); + return; + } + } catch (RuntimeException e) { + _log.info("initializeDatabaseProductNameOfContext threw the exception: " + e.getClass(), e); + return; + } + suffix = suffix.startsWith("_") ? suffix.substring("_".length()) : suffix; + setDatabaseProductNameToContext(suffix); + } + + protected String getDatabaseProductNameFromContext() { + return ${glConditionBeanContextName}.getDatabaseProductName(); + } + + protected void setDatabaseProductNameToContext(String name) { + ${glConditionBeanContextName}.setDatabaseProductName(name); + } + +#if ($database.isVersionAfter1040()) + + // ===================================================================================== + // DataMetaData Creation Override + // ============================== + protected BeanEnhancer beanEnhancer; + + public BeanEnhancer getBeanEnhancer() { + return beanEnhancer; + } + + public void setBeanEnhancer(final BeanEnhancer beanEnhancer) { + this.beanEnhancer = beanEnhancer; + } + #if ($database.isAvailableOtherConnectionDaoInitialization()) + + protected DaoMetaDataImpl createDaoMetaDataImpl() {// Override! + ${glDaoMetaDataExtension} dmdExtension = new ${glDaoMetaDataExtension}(); + dmdExtension.setBeanEnhancer(this.beanEnhancer); + dmdExtension.setTransactionManager(this.transactionManager); + return dmdExtension; + } + + // ===================================================================================== + // Accessor + // ======== + public TransactionManager getTransactionManager() { + return transactionManager; + } + + public void setTransactionManager(TransactionManager transactionManager) { + this.transactionManager = transactionManager; + } + #else + + protected DaoMetaDataImpl createDaoMetaDataImpl() {// Override! + ${glDaoMetaDataExtension} dmdExtension = new ${glDaoMetaDataExtension}(); + dmdExtension.setBeanEnhancer(this.beanEnhancer); + return dmdExtension; + } + #end +#else + + // ===================================================================================== + // DaoMetaData + // =========== + /** + * Create data meta data. + * + * @param daoClass Dao class + * @return Data meta data. + */ + protected DaoMetaData createDaoMetaData(Class daoClass) { + DaoMetaDataImpl daoMetaData = new ${glDaoMetaDataExtension}(); + daoMetaData.setDaoClass(daoClass); + daoMetaData.setDataSource(dataSource); + daoMetaData.setStatementFactory(statementFactory); + daoMetaData.setResultSetFactory(resultSetFactory); + daoMetaData.setAnnotationReaderFactory(annotationReaderFactory); + daoMetaData.setValueTypeFactory(valueTypeFactory); + if (sqlFileEncoding != null) { + daoMetaData.setSqlFileEncoding(sqlFileEncoding); + } + if (daoSuffixes != null) { + daoMetaData.setDaoSuffixes(daoSuffixes); + } + if (insertPrefixes != null) { + daoMetaData.setInsertPrefixes(insertPrefixes); + } + if (updatePrefixes != null) { + daoMetaData.setUpdatePrefixes(updatePrefixes); + } + if (deletePrefixes != null) { + daoMetaData.setDeletePrefixes(deletePrefixes); + } + daoMetaData.initialize(); + return daoMetaData; + } +#end +} \ No newline at end of file Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/s2dao/S2DaoSelectDynamicCommand.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/s2dao/S2DaoSelectDynamicCommand.vm 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/s2dao/S2DaoSelectDynamicCommand.vm 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,610 @@ +package ${glPackageBaseCommonS2Dao}; +#if ($database.isSelectQueryTimeoutValid()) + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +#end + +import java.util.ArrayList; +import java.util.List; +import java.util.Stack; + +import javax.sql.DataSource; + +import org.seasar.dao.CommandContext; +import org.seasar.dao.EndCommentNotFoundRuntimeException; +import org.seasar.dao.IfConditionNotFoundRuntimeException; +import org.seasar.dao.Node; +import org.seasar.dao.SqlParser; +import org.seasar.dao.SqlTokenizer; +import org.seasar.dao.impl.SelectDynamicCommand; +import org.seasar.dao.node.BeginNode; +import org.seasar.dao.node.BindVariableNode; +import org.seasar.dao.node.ContainerNode; +import org.seasar.dao.node.ElseNode; +import org.seasar.dao.node.EmbeddedValueNode; +import org.seasar.dao.node.IfNode; +import org.seasar.dao.node.ParenBindVariableNode; +import org.seasar.dao.node.PrefixSqlNode; +import org.seasar.dao.node.SqlNode; +import org.seasar.dao.parser.SqlTokenizerImpl; +import org.seasar.extension.jdbc.ResultSetFactory; +import org.seasar.extension.jdbc.ResultSetHandler; +import org.seasar.extension.jdbc.StatementFactory; +import org.seasar.extension.jdbc.impl.BasicSelectHandler; +import org.seasar.framework.beans.BeanDesc; +import org.seasar.framework.beans.PropertyDesc; +import org.seasar.framework.beans.factory.BeanDescFactory; +import org.seasar.framework.util.StringUtil; + +import ${glPackageBaseCommonCBean}.${glConditionBeanInterfaceName}; +import ${glPackageBaseCommonCBean}.${glConditionBeanContextName}; +import ${glPackageBaseCommonSqlClause}.${glSqlClauseInterfaceName}; + +/** + * SelectDynamicCommand for DBFlute. + * + * @author ${database.ClassAuthor} + */ +public class ${glSelectDynamicCommand} extends SelectDynamicCommand { +#if ($database.isSelectQueryTimeoutValid()) + + /** Log-instance. */ + private static final Log _log = LogFactory.getLog(${glDaoInterceptor}.class); +#end + + // ===================================================================================== + // Attribute + // ========= + /** Root node. */ + private Node rootNode;// Override! + + /** Result-set handler. */ + private ResultSetHandler resultSetHandler; + + /** Result-set factory. */ + private ResultSetFactory resultSetFactory; + + /** Cache of select clause command. */ + protected ${glSelectDynamicCommand} _selectClauseCommand; + + /** Cache of select clause PK-only command. */ + protected ${glSelectDynamicCommand} _selectClausePKOnlyCommand; + + // ===================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param dataSource Data source. + * @param statementFactory Statement factory. + * @param resultSetHandler Result-set handler. + * @param resultSetFactory Result-set factory. + */ + public ${glSelectDynamicCommand}(DataSource dataSource, + StatementFactory statementFactory, + ResultSetHandler resultSetHandler, ResultSetFactory resultSetFactory) { + + super(dataSource, statementFactory, resultSetHandler, resultSetFactory); + + this.resultSetHandler = resultSetHandler; + this.resultSetFactory = resultSetFactory; + } + + // ===================================================================================== + // Main + // ==== + // -------------------------------------- + // Very Important Override + // ----------------------- + public void setSql(String sql) {// Override! + super.setSql(sql); + this.rootNode = new InternalSqlParserImpl(sql).parse(); + } + + protected CommandContext apply(Object[] args) {// Override! + CommandContext ctx = createCommandContext(args); + rootNode.accept(ctx); + return ctx; + } + + public void setArgNames(String[] argNames) { + if (_selectClauseCommand != null) { + _selectClauseCommand.setArgNames(argNames); + } + if (_selectClausePKOnlyCommand != null) { + _selectClausePKOnlyCommand.setArgNames(argNames); + } + super.setArgNames(argNames); + } + + public void setArgTypes(Class[] argTypes) { + if (_selectClauseCommand != null) { + _selectClauseCommand.setArgTypes(argTypes); + } + if (_selectClausePKOnlyCommand != null) { + _selectClausePKOnlyCommand.setArgTypes(argTypes); + } + super.setArgTypes(argTypes); + } + + // -------------------------------------- + // For Public + // ---------- + /** + * Do apply. {for delegating to apply()} + * + * @param args Arguments. (NotNull) + * @return Command context. (NotNull) + */ + public CommandContext doApply(Object[] args) { + return apply(args); + } + + // -------------------------------------- + // Select-Clause + // ------------- + /** + * Set select clause. + * + * @param value Select clause. (Nullable) + * @return this. (NotNull) + */ + public ${glSelectDynamicCommand} setSelectClause(String value) { + _selectClauseCommand = createMySelectDynamicCommand(); + _selectClauseCommand.setSql(value); + return this; + } + + /** + * Set select clause PK only. + * + * @param value Select clause PK only. (Nullable) + * @return this. (NotNull) + */ + public ${glSelectDynamicCommand} setSelectClausePKOnly(String value) { + _selectClausePKOnlyCommand = createMySelectDynamicCommand(); + _selectClausePKOnlyCommand.setSql(value); + return this; + } + + // -------------------------------------- + // SelectDynamicCommand Creation + // ----------------------------- + protected ${glSelectDynamicCommand} createMySelectDynamicCommand() { + return new ${glSelectDynamicCommand}(getDataSource(), getStatementFactory(), resultSetHandler, resultSetFactory); + } + + // -------------------------------------- + // Execute + // ------- + public Object execute(Object[] args) { + if (!${glConditionBeanContextName}.isExistConditionBeanOnThread()) { + return super.execute(args); + } + assertSelectClauseCommand(); + final List${database.filterGenericsString('Object')} bindVariableList = new ArrayList${database.filterGenericsString('Object')}(); + final List${database.filterGenericsString('Class')} bindVariableTypeList = new ArrayList${database.filterGenericsString('Class')}(); + + final ${glConditionBeanInterfaceName} cb = ${glConditionBeanContextName}.getConditionBeanOnThread(); + final String finalClause; + if (cb.hasUnionQueryOrUnionAllQuery()) { + final String selectClause = setupRealSelectClause(args, bindVariableList, bindVariableTypeList); + final String fromWhereClause = setupRealFromWhereClause(args, bindVariableList, bindVariableTypeList); + if (cb.isSelectCountIgnoreFetchScope()) { + // If the query uses union and it selects count, the way of select-count is as follows. + // (Then it needs included-select-column) + finalClause = "select count(*) from (" + InternalStringUtil.replace(fromWhereClause, ${glSqlClauseInterfaceName}.INCLUDE_SELECT_CLAUSE_MARK, selectClause) + ") base"; + } else { + finalClause = InternalStringUtil.replace(fromWhereClause, ${glSqlClauseInterfaceName}.INCLUDE_SELECT_CLAUSE_MARK, selectClause); + } + } else { + final String selectClause; + if (cb.isSelectCountIgnoreFetchScope()) { + selectClause = "select count(*)"; + } else { + selectClause = setupRealSelectClause(args, bindVariableList, bindVariableTypeList); + } + final String fromWhereClause = setupRealFromWhereClause(args, bindVariableList, bindVariableTypeList); + finalClause = InternalStringUtil.replace(fromWhereClause, ${glSqlClauseInterfaceName}.INCLUDE_SELECT_CLAUSE_MARK, selectClause); + } + + final BasicSelectHandler selectHandler = createBasicSelectHandler(finalClause); + selectHandler.setFetchSize(-1); + + return selectHandler.execute(bindVariableList.toArray(), toClassArray(bindVariableTypeList)); + } + + // -------------------------------------- + // Setup Clause + // ------------ + protected String setupRealSelectClause(Object[] args, List${database.filterGenericsString('Object')} bindVariableList, List${database.filterGenericsString('Class')} bindVariableTypeList) { + final ${glConditionBeanInterfaceName} cb = ${glConditionBeanContextName}.getConditionBeanOnThread(); + final String realSelectClause; + { + final CommandContext ctx; + if (cb.isLimitSelect_PKOnly()) { + ctx = _selectClausePKOnlyCommand.doApply(args); + } else { + ctx = _selectClauseCommand.doApply(args); + } + realSelectClause = ctx.getSql(); + addBindVariableInfo(ctx, bindVariableList, bindVariableTypeList); + } + return realSelectClause; + } + + protected String setupRealFromWhereClause(Object[] args, List${database.filterGenericsString('Object')} bindVariableList, List${database.filterGenericsString('Class')} bindVariableTypeList) { + final ${glConditionBeanInterfaceName} cb = ${glConditionBeanContextName}.getConditionBeanOnThread(); + final String realFromWhereClause; + { + final ${glSelectDynamicCommand} fromWhereCommand = createMySelectDynamicCommand(); + fromWhereCommand.setArgNames(getArgNames()); + fromWhereCommand.setArgTypes(getArgTypes()); + + // for Union + cb.getSqlClause().setSelectClauseColumnAliasMap(${glConditionBeanContextName}.getSelectClauseColumnAliasMap(cb.getClass())); + + fromWhereCommand.setSql(cb.getSqlClause().getClause()); + CommandContext ctx = fromWhereCommand.doApply(args); + realFromWhereClause = ctx.getSql(); + addBindVariableInfo(ctx, bindVariableList, bindVariableTypeList); + } + return realFromWhereClause; + } + + protected BasicSelectHandler createBasicSelectHandler(String realSql) { +#if ($database.isSelectQueryTimeoutValid()) + + final StatementFactory statementFactoryReal = getStatementFactory(); + final StatementFactory statementFactoryWrapper = new StatementFactory() { + public java.sql.PreparedStatement createPreparedStatement(java.sql.Connection arg0, String arg1) { + final java.sql.PreparedStatement ps = statementFactoryReal.createPreparedStatement(arg0, arg1); + try { + final int timeout = ${database.SelectQueryTimeout}; + if (_log.isDebugEnabled()) { + _log.debug("@SelectDynamicCommand: ps.setQueryTimeout(" + timeout + ");// from ${database.SelectQueryTimeout}"); + } + ps.setQueryTimeout(timeout); + } catch (java.sql.SQLException e) { + throw new org.seasar.framework.exception.SQLRuntimeException(e); + } + return ps; + } + public java.sql.CallableStatement createCallableStatement(java.sql.Connection arg0, String arg1) { + return statementFactoryReal.createCallableStatement(arg0, arg1); + } + }; + return new BasicSelectHandler(getDataSource(), realSql, resultSetHandler, statementFactoryWrapper, resultSetFactory); +#else + + return new BasicSelectHandler(getDataSource(), realSql, resultSetHandler, getStatementFactory(), resultSetFactory); +#end + + } + + protected Class[] toClassArray(List${database.filterGenericsString('Class')} bindVariableTypeList) { + final Class[] bindVariableTypesArray = new Class[bindVariableTypeList.size()]; + for (int i = 0; i < bindVariableTypeList.size(); i++) { + final Class bindVariableType = (Class) bindVariableTypeList.get(i); + bindVariableTypesArray[i] = bindVariableType; + } + return bindVariableTypesArray; + } + + protected void addBindVariableInfo(CommandContext ctx, List${database.filterGenericsString('Object')} bindVariableList, List${database.filterGenericsString('Class')} bindVariableTypeList) { + final Object[] bindVariables = ctx.getBindVariables(); + addBindVariableList(bindVariableList, bindVariables); + final Class[] bindVariableTypes = ctx.getBindVariableTypes(); + addBindVariableTypeList(bindVariableTypeList, bindVariableTypes); + } + + protected void addBindVariableList(List${database.filterGenericsString('Object')} bindVariableList, Object[] bindVariables) { + for (int i=0; i < bindVariables.length; i++) { + bindVariableList.add(bindVariables[i]); + } + } + + protected void addBindVariableTypeList(List${database.filterGenericsString('Class')} bindVariableTypeList, Class[] bindVariableTypes) { + for (int i=0; i < bindVariableTypes.length; i++) { + bindVariableTypeList.add(bindVariableTypes[i]); + } + } + + protected void assertSelectClauseCommand() { + if (_selectClauseCommand == null) { + String msg = "Select clause command should not be null."; + throw new IllegalStateException(msg); + } + } + + // ===================================================================================== + // Internal Static Class + // ===================== + // -------------------------------------- + // SqlParser + // --------- + protected static class InternalSqlParserImpl implements SqlParser { + + private SqlTokenizer tokenizer; + + private Stack nodeStack = new Stack(); + + public InternalSqlParserImpl(String sql) { + sql = sql.trim(); + if (sql.endsWith(";")) { + sql = sql.substring(0, sql.length() - 1); + } + tokenizer = new SqlTokenizerImpl(sql); + } + + public Node parse() { + push(new ContainerNode()); + while (SqlTokenizer.EOF != tokenizer.next()) { + parseToken(); + } + return pop(); + } + + protected void parseToken() { + switch (tokenizer.getTokenType()) { + case SqlTokenizer.SQL: + parseSql(); + break; + case SqlTokenizer.COMMENT: + parseComment(); + break; + case SqlTokenizer.ELSE: + parseElse(); + break; + case SqlTokenizer.BIND_VARIABLE: + parseBindVariable(); + break; + } + } + + protected void parseSql() { + String sql = tokenizer.getToken(); + if (isElseMode()) { + sql = StringUtil.replace(sql, "--", ""); + } + Node node = peek(); + if ((node instanceof IfNode || node instanceof ElseNode) && node.getChildSize() == 0) { + + SqlTokenizer st = new SqlTokenizerImpl(sql); + st.skipWhitespace(); + String token = st.skipToken(); + st.skipWhitespace(); + if (sql.startsWith(",")) { + if (sql.startsWith(", ")) { + node.addChild(new PrefixSqlNode(", ", sql.substring(2))); + } else { + node.addChild(new PrefixSqlNode(",", sql.substring(1))); + } + } else if ("AND".equalsIgnoreCase(token) || "OR".equalsIgnoreCase(token)) { + node.addChild(new PrefixSqlNode(st.getBefore(), st.getAfter())); + } else { + node.addChild(new SqlNode(sql)); + } + } else { + node.addChild(new SqlNode(sql)); + } + } + + protected void parseComment() { + String comment = tokenizer.getToken(); + if (isTargetComment(comment)) { + if (isIfComment(comment)) { + parseIf(); + } else if (isBeginComment(comment)) { + parseBegin(); + } else if (isEndComment(comment)) { + return; + } else { + parseCommentBindVariable(); + } + } else if (comment != null && 0 < comment.length()) { + String before = tokenizer.getBefore(); + peek().addChild(new SqlNode(before.substring(before.lastIndexOf("/*")))); + } + } + + protected void parseIf() { + String condition = tokenizer.getToken().substring(2).trim(); + if (StringUtil.isEmpty(condition)) { + throw new IfConditionNotFoundRuntimeException(); + } + IfNode ifNode = new IfNode(condition); + peek().addChild(ifNode); + push(ifNode); + parseEnd(); + } + + protected void parseBegin() { + BeginNode beginNode = new BeginNode(); + peek().addChild(beginNode); + push(beginNode); + parseEnd(); + } + + protected void parseEnd() { + while (SqlTokenizer.EOF != tokenizer.next()) { + if (tokenizer.getTokenType() == SqlTokenizer.COMMENT && isEndComment(tokenizer.getToken())) { + + pop(); + return; + } + parseToken(); + } + throw new EndCommentNotFoundRuntimeException(); + } + + protected void parseElse() { + Node parent = peek(); + if (!(parent instanceof IfNode)) { + return; + } + IfNode ifNode = (IfNode) pop(); + ElseNode elseNode = new ElseNode(); + ifNode.setElseNode(elseNode); + push(elseNode); + tokenizer.skipWhitespace(); + } + + protected void parseCommentBindVariable() { + String expr = tokenizer.getToken(); + String s = tokenizer.skipToken(); + if (s.startsWith("(") && s.endsWith(")")) { + peek().addChild(new ParenBindVariableNode(expr)); + } else if (expr.startsWith("$")) { + peek().addChild(new EmbeddedValueNode(expr.substring(1))); + } else { + peek().addChild(new InternalBindVariableNode(expr));// Extension! + } + } + + protected void parseBindVariable() { + String expr = tokenizer.getToken(); + peek().addChild(new InternalBindVariableNode(expr));// Extension! + } + + protected Node pop() { + return (Node) nodeStack.pop(); + } + + protected Node peek() { + return (Node) nodeStack.peek(); + } + + protected void push(Node node) { + nodeStack.push(node); + } + + protected boolean isElseMode() { + for (int i = 0; i < nodeStack.size(); ++i) { + if (nodeStack.get(i) instanceof ElseNode) { + return true; + } + } + return false; + } + + private static boolean isTargetComment(String comment) { + return comment != null && comment.length() > 0 && Character.isJavaIdentifierStart(comment.charAt(0)); + } + + private static boolean isIfComment(String comment) { + return comment.startsWith("IF"); + } + + private static boolean isBeginComment(String content) { + return content != null && "BEGIN".equals(content); + } + + private static boolean isEndComment(String content) { + return content != null && "END".equals(content); + } + } + + // -------------------------------------- + // BindVariableNode + // ---------------- + protected static class InternalBindVariableNode extends BindVariableNode { + private String expression; + + private String[] names; + + public InternalBindVariableNode(String expression) { + super(expression); + + this.expression = expression; + names = StringUtil.split(expression, "."); + // baseName_ = array[0]; + // if (array.length > 1) { + // propertyName_ = array[1]; + // } + } + + public String getExpression() { + return expression; + } + + public void accept(CommandContext ctx) { + Object value = ctx.getArg(names[0]); + Class clazz = ctx.getArgType(names[0]); + for (int pos = 1; pos < names.length; pos++) { + if (value == null) { + break; + } + if (java.util.Map.class.isInstance(value)) {// Extension! + final java.util.Map map = (java.util.Map) value; + value = map.get(names[pos]); + if (value == null) { + break; + } + clazz = value.getClass(); + } else { + BeanDesc beanDesc = BeanDescFactory.getBeanDesc(clazz); + PropertyDesc pd = beanDesc.getPropertyDesc(names[pos]); + value = pd.getValue(value); + clazz = pd.getPropertyType(); + } + } + ctx.addSql("?", value, clazz); + } + } + + // -------------------------------------- + // StringUtil + // ---------- + protected static class InternalStringUtil { + + public static final String[] EMPTY_STRINGS = new String[0]; + + private InternalStringUtil() { + } + + public static final boolean isEmpty(String text) { + return text == null || text.length() == 0; + } + + public static final String replace(String text, String fromText, + String toText) { + + if (text == null || fromText == null || toText == null) { + return null; + } + StringBuffer buf = new StringBuffer(100); + int pos = 0; + int pos2 = 0; + while (true) { + pos = text.indexOf(fromText, pos2); + if (pos == 0) { + buf.append(toText); + pos2 = fromText.length(); + } else if (pos > 0) { + buf.append(text.substring(pos2, pos)); + buf.append(toText); + pos2 = pos + fromText.length(); + } else { + buf.append(text.substring(pos2)); + break; + } + } + return buf.toString(); + } + + public static String[] split(String str, String delim) { + if (str == null) { + return EMPTY_STRINGS; + } + java.util.List${database.filterGenericsString('String')} list = new java.util.ArrayList${database.filterGenericsString('String')}(); + java.util.StringTokenizer st = new java.util.StringTokenizer(str, delim); + while (st.hasMoreElements()) { + list.add(st.nextToken()); + } + return (String[]) list.toArray(new String[list.size()]); + } + } +} \ No newline at end of file Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/s2dao/S2DaoStatementFactory.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/s2dao/S2DaoStatementFactory.vm 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/allcommon/s2dao/S2DaoStatementFactory.vm 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,44 @@ +package ${glPackageBaseCommonS2Dao}; +#if (${database.isStatementResultSetTypeValid()}) + +import java.sql.Connection; +import java.sql.PreparedStatement; + +import java.sql.ResultSet; +import java.sql.SQLException; + +import org.seasar.extension.jdbc.impl.BasicStatementFactory; +import org.seasar.framework.exception.SQLRuntimeException; + +#else + +import java.sql.Connection; +import java.sql.PreparedStatement; + +import org.seasar.extension.jdbc.impl.BasicStatementFactory; +import org.seasar.extension.jdbc.util.ConnectionUtil; +#end + +/** + * Statement factory. + * + * @author ${database.ClassAuthor} + */ +public class ${glDaoStatementFactory} extends BasicStatementFactory { +#if (${database.isStatementResultSetTypeValid()}) + + public PreparedStatement createPreparedStatement(Connection con, String sql) { + try { + return con.prepareStatement(sql, ${database.StatementResultSetType}, ${database.StatementResultSetConcurrency}); + } catch (SQLException e) { + throw new SQLRuntimeException(e); + } + } +#else + + public PreparedStatement createPreparedStatement(Connection con, String sql) { + return ConnectionUtil.prepareStatement(con, sql); + } +#end + +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/bsbhv/BaseBhv.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/bsbhv/BaseBhv.vm 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/bsbhv/BaseBhv.vm 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,1309 @@ +#set ($myClassName = "${myBaseBhvClassName}") + +package ${glPackageBaseBhv}; + +import ${glPackageBaseCommon}.*; +#if ($database.isAvailableGenerics()) +import ${glPackageBaseCommonBhvLoad}.${glLoadRefererOptionName}; +import ${glPackageBaseCommonBhvSetup}.${glConditionBeanSetupperName}; +import ${glPackageBaseCommonBhvSetup}.${glValueLabelSetupperName}; +#end +import ${glPackageBaseCommonCBean}.${glConditionBeanInterfaceName}; +import ${glPackageBaseCommonCBean}.${glListResultBeanName}; +import ${glPackageBaseCommonCBean}.${glPagingBeanInterfaceName}; +import ${glPackageBaseCommonCBean}.${glPagingResultBeanName}; +import ${glPackageBaseCommonDBMeta}.${glDBMetaInterfaceName}; +#if (${table.hasOnlyOnePrimaryKey()}) + #if (${table.hasReferrer()}) + +import ${glPackageExtendedBhv}.*; + #end +#end + +import ${glPackageExtendedDao}.*; +import ${glPackageExtendedEntity}.*; +import ${myDBMetaPackageName}.*; +import ${glPackageCB}.*; + +#set ($myExtendClassName = "") +#if ($table.isWritable()) + #set ($myExtendClassName = "${glBehaviorWritableAbstractName}") +#else + #set ($myExtendClassName = "${glBehaviorReadableAbstractName}") +#end + + +/** + * The behavior of ${table.Name}. + * + *

+ * [primary-key]
+ *     ${table.PrimaryKeyNameCommaString}
+ * 
+ * [column-property]
+ *     ${table.ColumnNameCommaString}
+ * 
+ * [foreign-property]
+ *     ${table.ForeignPropertyNameCommaString}
+ * 
+ * [refferer-property]
+ *     ${table.ReferrerPropertyNameCommaString}
+ * 
+ * [sequence]
+ *     ${table.DefinedSequenceName}
+ * 
+ * [identity]
+ *     ${table.IdentityPropertyName}
+ * 
+ * [update-date]
+ *     ${table.UpdateDateJavaName}
+ * 
+ * [version-no]
+ *     ${table.VersionNoJavaName}
+ * 
+ * 
+ * + * @author ${database.ClassAuthor} + */ +public abstract class ${myClassName} extends ${glPackageBaseCommonBhv}.${myExtendClassName} { + + // =================================================================================== + // Attribute + // ========= + /** Dao instance. */ + protected ${myExtendedDaoClassName} _dao; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + public ${myClassName}() { + } + + // =================================================================================== + // Table name + // ========== + /** + * ${database.ImplementComment} + * + * @return Table db-name. (NotNull) + */ + public String getTableDbName() { + return "${table.Name}"; + } + + // =================================================================================== + // DBMeta + // ====== + /** + * ${database.ImplementComment} + * + * @return DBMeta. (NotNull) + */ + public ${glDBMetaInterfaceName} getDBMeta() { + return ${myDBMetaClassName}.getInstance(); + } + + /** + * Get my dbmeta. + * + * @return DBMeta. (NotNull) + */ + public ${myDBMetaClassName} getMyDBMeta() { + return ${myDBMetaClassName}.getInstance(); + } + + // =================================================================================== + // Dao Accessor + // ============ + /** + * Get my dao. + * + * @return My dao. + */ + public ${myExtendedDaoClassName} getMyDao() { + return _dao; + } + + /** + * Set my dao. + * + * @param dao My dao. (NotNull) + */ + public void setMyDao(${myExtendedDaoClassName} dao) { + assertObjectNotNull("dao", dao); + _dao = dao; + } + + /** + * ${database.ImplementComment} + * + * @return Dao-readable. (NotNull) + */ + public ${glDaoReadableInterfaceName} getDaoReadable() { + return getMyDao(); + } + +#if ($table.isWritable()) + /** + * ${database.ImplementComment} + * + * @return Dao-writable. (NotNull) + */ + public ${glDaoWritableInterfaceName} getDaoWritable() { + return getMyDao(); + } +#end + + // =================================================================================== + // New Instance + // ============ + /** + * New entity. + * + * @return Entity. (NotNull) + */ + public ${glEntityInterfaceName} newEntity() { + return newMyEntity(); + } + + /** + * New condition-bean. + * + * @return Condition-bean. (NotNull) + */ + public ${glConditionBeanInterfaceName} newConditionBean() { + return newMyConditionBean(); + } + + /** + * New my entity. + * + * @return My entity. (NotNull) + */ + public ${myExtendedObjectClassName} newMyEntity() { + return new ${myExtendedObjectClassName}(); + } + + /** + * New my condition-bean. + * + * @return My condition-bean. (NotNull) + */ + public ${myConditionBeanClassName} newMyConditionBean() { + return new ${myConditionBeanClassName}(); + } + + // =================================================================================== + // Delegate Method + // =============== + // ----------------------------------------------------- + // Select + // ------ + /** + * Get count as all. (Delegate-Method) + * + * @return All count. (NotNull) + */ + public int delegateGetCountAll() { + return getMyDao().getCountAll(); + } + + /** + * Get list as all. (Delegate-Method) + * + * @return All list. (NotNull) + */ + public java.util.List${database.filterGenericsString(${myExtendedObjectClassName})} delegateGetListAll() { + return getMyDao().getListAll(); + } +#if ($table.hasPrimaryKey()) + + // + // Get entity. (Delegate-Method) + // + // @param Primary-keys (NotNull) + // @return Entity. (NotNull) + // + public ${myExtendedObjectClassName} delegateGetEntity(${table.PrimaryKeyArgsString}) { + return getMyDao().getEntity(${table.getPrimaryKeyUncapitalisedJavaNameCommaString()}); + } +#end + + /** + * Select count by condition-bean. (Delegate-Method) + * + * @param cb Condition-bean. (NotNull) + * @return Selected count. (NotNull) + */ + public int delegateSelectCount(${myConditionBeanClassName} cb) { + assertConditionBeanNotNull(cb); + return getMyDao().selectCount(cb); + } + + /** + * Select entity by condition-bean. (Delegate-Method) + * + * @param cb Condition-bean. (NotNull) + * @return Selected entity. If the select result is zero, it returns null. (Nullable) + */ + public ${myExtendedObjectClassName} delegateSelectEntity(${myConditionBeanClassName} cb) { + assertConditionBeanNotNull(cb); + return getMyDao().selectEntity(cb); + } + + /** + * Select list by condition-bean. (Delegate-Method) + * + * @param cb Condition-bean. (NotNull) + * @return Selected list. If the select result is zero, it returns empty list. (NotNull) + */ + public java.util.List${database.filterGenericsString(${myExtendedObjectClassName})} delegateSelectList(${myConditionBeanClassName} cb) { + assertConditionBeanNotNull(cb); + return getMyDao().selectList(cb); + } + +#if ($table.isUseSequence()) + + /** + * Select next value as sequence. (Delegate-Method) + * + * @return Next value. (NotNull) + */ + public ${database.sequenceReturnType} delegateSelectNextVal() { + return getMyDao().selectNextVal(); + } +#end + +#if ($table.isWritable()) + // ----------------------------------------------------- + // Update + // ------ + /** + * Insert one entity. (Delegate-Method) + * + * @param entity Entity. (NotNull) + * @return Inserted count. + */ + public int delegateInsert(${myExtendedObjectClassName} entity) { + assertEntityNotNull(entity);// If this table use identity, the entity does not have primary-key. + filterEntityOfInsert(entity); + assertEntityOfInsert(entity); + return getMyDao().insert(entity); + } + + /** + * Update one entity. (Delegate-Method) + * {modified only} + * + * @param entity Entity. (NotNull) + * @return Updated count. + */ + public int delegateUpdate(${myExtendedObjectClassName} entity) { + assertEntityNotNullAndHasPrimaryKeyValue(entity); + filterEntityOfUpdate(entity); + assertEntityOfUpdate(entity); + return getMyDao().updateModifiedOnly(entity); + } + #if ($database.isVersionAfter1040() && ($table.isUseUpdateDate() || $table.isUseVersionNo())) + + /** + * Update one entity. (Delegate-Method) + * {non strict & modified only} + * + * @param entity Entity. (NotNull) + * @return Updated count. + */ + public int delegateUpdateNonstrict(${myExtendedObjectClassName} entity) { + assertEntityNotNullAndHasPrimaryKeyValue(entity); + filterEntityOfUpdate(entity); + assertEntityOfUpdate(entity); + return getMyDao().updateNonstrictModifiedOnly(entity); + } + #end + + /** + * Delete one entity. (Delegate-Method) + * + * @param entity Entity. (NotNull) + * @return Deleted count. + */ + public int delegateDelete(${myExtendedObjectClassName} entity) { + assertEntityNotNullAndHasPrimaryKeyValue(entity); + filterEntityOfDelete(entity); + assertEntityOfDelete(entity); + return getMyDao().delete(entity); + } + #if ($database.isVersionAfter1040() && ($table.isUseUpdateDate() || $table.isUseVersionNo())) + + /** + * Delete one entity. (Delegate-Method) + * {non strict} + * + * @param entity Entity. (NotNull) + * @return Deleted count. + */ + public int delegateDeleteNonstrict(${myExtendedObjectClassName} entity) { + assertEntityNotNullAndHasPrimaryKeyValue(entity); + filterEntityOfDelete(entity); + assertEntityOfDelete(entity); + return getMyDao().deleteNonstrict(entity); + } + #end + + /** + * Insert several entities. (Delegate-Method) + * + * @param entityList Entity-list. (NotNull & NotEmpty) + * @return Inserted count. + */ + public int delegateInsertList(java.util.List${database.filterGenericsString(${myExtendedObjectClassName})} entityList) { + assertListNotNullAndNotEmpty(entityList); + return getMyDao().insertList(entityList); + } + + /** + * Update several entities. (Delegate-Method) + * + * @param entityList Entity-list. (NotNull & NotEmpty) + * @return Updated count. + */ + public int delegateUpdateList(java.util.List${database.filterGenericsString(${myExtendedObjectClassName})} entityList) { + assertListNotNullAndNotEmpty(entityList); + return getMyDao().updateList(entityList); + } + + /** + * Delete several entities. (Delegate-Method) + * + * @param entityList Entity-list. (NotNull & NotEmpty) + * @return Deleted count. + */ + public int delegateDeleteList(java.util.List${database.filterGenericsString(${myExtendedObjectClassName})} entityList) { + assertListNotNullAndNotEmpty(entityList); + return getMyDao().deleteList(entityList); + } +#else + #if ($table.isAvailableNonPrimaryKeyWritable()) + + /** + * Insert one entity. (Delegate-Method) + * + * @param entity Entity. (NotNull) + * @return Inserted count. + */ + public int delegateInsert(${myExtendedObjectClassName} entity) { + assertEntityNotNull(entity);// If this table use identity, the entity does not have primary-key. + return getMyDao().insert(entity); + } + #end +#end + + // =================================================================================== + // Basic Select Count + // ================== + /** + * Select count by condition-bean. + *
+     * If the argument 'condition-bean' is effective about fetch-scope,
+     * this method invoke select count ignoring the fetch-scope.
+     * 
+ * @param cb Condition-bean. This condition-bean should not be set up about fetch-scope. (NotNull) + * @return Selected count. + */ + public int selectCount(${myConditionBeanClassName} cb) { + assertConditionBeanNotNull(cb); + return delegateSelectCount(cb); + } + + // =================================================================================== + // Basic Select Entity + // =================== + /** + * Select entity by condition-bean. + * + * @param cb Condition-bean. (NotNull) + * @return Selected entity. (Nullalble) + * @exception ${glPackageBaseCommonException}.${glRecordHasOverlappedException} + */ + public ${myExtendedObjectClassName} selectEntity(${myConditionBeanClassName} cb) { + assertConditionBeanNotNull(cb); + final java.util.List${database.filterGenericsString(${myExtendedObjectClassName})} ls = selectList(cb); + if (ls.isEmpty()) { + return null; + } + assertRecordHasBeenSelectedAsOne(ls, cb); + return (${myExtendedObjectClassName})ls.get(0); + } + + /** + * Select entity by condition-bean with deleted check. + * + * @param cb Condition-bean. (NotNull) + * @return Selected entity. (NotNull) + * @exception ${glPackageBaseCommonException}.${glRecordHasAlreadyBeenDeletedException} + * @exception ${glPackageBaseCommonException}.${glRecordHasOverlappedException} + */ + public ${myExtendedObjectClassName} selectEntityWithDeletedCheck(${myConditionBeanClassName} cb) { + assertConditionBeanNotNull(cb); + final java.util.List${database.filterGenericsString(${myExtendedObjectClassName})} ls = selectList(cb); + assertRecordHasNotBeenDeleted(ls, cb); + assertRecordHasBeenSelectedAsOne(ls, cb); + return (${myExtendedObjectClassName})ls.get(0); + } +#if ($table.hasPrimaryKey()) + + /* + * Select entity with deleted check. {by primary-key} + * + * @param primaryKey + * @return Selected entity. (NotNull) + * @exception ${glPackageBaseCommonException}.${glRecordHasAlreadyBeenDeletedException} + * @exception ${glPackageBaseCommonException}.${glRecordHasOverlappedException} + */ + public ${myExtendedObjectClassName} selectByPKValueWithDeletedCheck(${table.PrimaryKeyArgsString}) { + ${myExtendedObjectClassName} entity = new ${myExtendedObjectClassName}(); + ${table.getPrimaryKeyArgsSetupString('entity')} + final ${myConditionBeanClassName} cb = newMyConditionBean(); + cb.acceptPrimaryKeyMapString(getDBMeta().extractPrimaryKeyMapString(entity)); + return selectEntityWithDeletedCheck(cb); + } +#end +#if ($table.hasPrimaryKey() && $database.isMakeBehaviorForUpdate()) + + /* + * Select entity for update with deleted check. {by primary-key} + * + * @param primaryKey + * @return Selected entity. (NotNull) + * @exception ${glPackageBaseCommonException}.${glRecordHasAlreadyBeenDeletedException} + * @exception ${glPackageBaseCommonException}.${glRecordHasOverlappedException} + * @deprecated This method is deprecated. + */ + public ${myExtendedObjectClassName} selectByPKValueWithDeletedCheckForUpdate(${table.PrimaryKeyArgsString}) { + ${myExtendedObjectClassName} entity = new ${myExtendedObjectClassName}(); + ${table.getPrimaryKeyArgsSetupString('entity')} + final ${myConditionBeanClassName} cb = newMyConditionBean(); + cb.acceptPrimaryKeyMapString(getDBMeta().extractPrimaryKeyMapString(entity)); + cb.lockForUpdate(); + return selectEntityWithDeletedCheck(cb); + } +#end + + // =================================================================================== + // Basic Select List + // ================= + /** + * Select list as result-bean. + * + * @param cb Condition-bean. (NotNull) + * @return Selected list-result-bean. (NotNull) + */ + public ${glListResultBeanName}${database.filterGenericsString(${myExtendedObjectClassName})} selectList(${myConditionBeanClassName} cb) { + assertConditionBeanNotNull(cb); + return new ResultBeanBuilder${database.filterGenericsString(${myExtendedObjectClassName})}(this).buildListResultBean(cb, delegateSelectList(cb)); + } + + /** + * Select page as result-bean. + * + * @param cb Condition-bean. (NotNull) + * @return Selected paging-result-bean. (NotNull) + */ + public ${glPagingResultBeanName}${database.filterGenericsString(${myExtendedObjectClassName})} selectPage(final ${myConditionBeanClassName} cb) { + assertConditionBeanNotNull(cb); + return selectPage(cb, new SelectPageSimpleInvoker${database.filterGenericsString(${myExtendedObjectClassName})}(this)); + } + + /** + * Select page. + * + * @param cb Condition-bean. (NotNull) + * @param invoker Select-page-invoker (NotNull) + * @return Selected paging-result-bean. (NotNull) + */ + public ${glPagingResultBeanName}${database.filterGenericsString(${myExtendedObjectClassName})} selectPage(final ${myConditionBeanClassName} cb, SelectPageInvoker${database.filterGenericsString(${myExtendedObjectClassName})} invoker) { + assertConditionBeanNotNull(cb); + final SelectPageCallback${database.filterGenericsString(${myExtendedObjectClassName})} pageCallback = new SelectPageCallback${database.filterGenericsString(${myExtendedObjectClassName})}() { + public ${glPagingBeanInterfaceName} getPagingBean() { return cb; } + public int selectCountIgnoreFetchScope() { + return selectCount(cb); + } + public java.util.List${database.filterGenericsString(${myExtendedObjectClassName})} selectListWithFetchScope() { + return selectList(cb); + } + }; + return invoker.invokeSelectPage(pageCallback); + } + +#if ($database.isAvailableGenerics()) + // =================================================================================== + // Various Select + // ============== + /** + * Select value-label list. + * + * @param cb Condition-bean. (NotNull) + * @param valueLabelSetupper Value-label-setupper. (NotNull) + * @return Value-label list. (NotNull) + */ + public java.util.List> selectValueLabelList(${myConditionBeanClassName} cb, ${glValueLabelSetupperName}<${myExtendedObjectClassName}> valueLabelSetupper) { + return createValueLabelList(selectList(cb), valueLabelSetupper); + } +#end +#if ($table.isUseSequence()) + + // =================================================================================== + // Sequence + // ======== + /** + * Select next value as sequence. + * + * @return Next value. (NotNull) + */ + public ${database.sequenceReturnType} selectNextVal() { + return delegateSelectNextVal(); + } +#end +#if (${table.hasOnlyOnePrimaryKey()}) + + // =================================================================================== + // Load Referer + // ============ + #foreach ($refferer in $table.Referrers) + #set ($reffererTable = $refferer.Table) + #set ($reffererEntityClassName = "${glProjectPrefix}${reffererTable.JavaName}") + #set ($reffererDaoClassName = "${reffererEntityClassName}Dao") + #set ($reffererBhvClassName = "${reffererEntityClassName}Bhv") + #set ($reffererCBClassName = "${reffererEntityClassName}${glConditionBeanInitialName}") + #set ($reffererVariableName = "${glChildrenVariablePrefix}${refferer.ReffererPropertyNameInitCap}") + #set ($reffererEntityLongClassName = "${glPackageExtendedEntity}.${reffererEntityClassName}") + #set ($genericPKMyEntityMap = "${table.getPrimaryKeyJavaNativeAsOne()}, ${myExtendedObjectClassName}") + #set ($genericPKChildListMap = "${table.getPrimaryKeyJavaNativeAsOne()}, java.util.List${database.filterGenericsString(${reffererEntityClassName})}") + + // /* * * * * * * * * * * * * * * * * * * * * * * + // RefererTable = [${refferer.table.name}] + // RefererProperty = [${refferer.reffererPropertyName}] + // * * * * * * * * */ + #if ($database.isAvailableGenerics()) + + /** + * Load referer of ${refferer.ReffererPropertyName}. + *
+     *   You can load referer.
+     * 
+     *   ex) {Client Example}
+     *     final ${myConditionBeanClassName} cb = new ${myConditionBeanClassName}();
+     *     cb.query().setXxx_Equal("xxx");
+     *     final List<${myExtendedObjectClassName}> ${myEntityListVariableName} = ${myBehaviorVariableName}.selectList(cb);
+     *     ${myBehaviorVariableName}.load${refferer.reffererPropertyNameInitCap}(${myEntityListVariableName});
+     * 
+     *   *About internal policy, the value of primary key(and others too) is treated as CaseInsensitive.
+     * 
+ * + * @param ${myEntityListVariableName} Entity list of ${table.uncapitalisedJavaName}. (NotNull) + */ + public void load${refferer.ReffererPropertyNameInitCap}(java.util.List<${myExtendedObjectClassName}> ${myEntityListVariableName}) { + final ${glConditionBeanSetupperName}<${reffererCBClassName}> conditionBeanSetupper = new ${glConditionBeanSetupperName}<${reffererCBClassName}>() { + public void setup(${reffererCBClassName} cb) { + } + }; + load${refferer.reffererPropertyNameInitCap}(${myEntityListVariableName}, conditionBeanSetupper); + } + + /** + * Load referer of ${refferer.ReffererPropertyName}. + *
+     *   You can load referer with your original condition.
+     * 
+     *   ex) {Client Example}: Referer conditions are 'Xxx' is not null and order-by 'Yyy' desc
+     *     /- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
+     *     final ${myConditionBeanClassName} cb = new ${myConditionBeanClassName}();
+     *     cb.query().setXxx_Equal("xxx");
+     *     final List<${myExtendedObjectClassName}> ${myEntityListVariableName} = ${myBehaviorVariableName}.selectList(cb);
+     *     final ${glConditionBeanSetupperName}<${reffererCBClassName}> conditionBeanSetupper = new ${glConditionBeanSetupperName}<${reffererCBClassName}>() {
+     *         public void setup(${reffererCBClassName} cb) {
+     *             cb.query().setXxx_IsNotNull();
+     *             cb.query().addOrderBy_Yyy_Desc();
+     *         }
+     *     };
+     *     ${myBehaviorVariableName}.load${refferer.reffererPropertyNameInitCap}(${myEntityListVariableName}, conditionBeanSetupper);
+     *     - - - - - - - - - -/
+     * 
+     *   The condition-bean that the setupper provides have settings before you touch it. It is as follows:
+     *     /- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
+     *     cb.query().set${refferer.getLocalColumnJavaNameAsOne()}_InScope(pkList);
+     *     cb.query().addOrderBy_${refferer.getLocalColumnJavaNameAsOne()}_Asc();
+     *     - - - - - - - - - -/
+     * 
+     *   *About internal policy, the value of primary key(and others too) is treated as CaseInsensitive.
+     * 
+ * + * @param ${myEntityListVariableName} Entity list of ${table.uncapitalisedJavaName}. (NotNull) + * @param conditionBeanSetupper Referer condition setupper instance for registering referer condition. (NotNull) + */ + public void load${refferer.ReffererPropertyNameInitCap}(java.util.List<${myExtendedObjectClassName}> ${myEntityListVariableName}, ${glConditionBeanSetupperName}<${reffererCBClassName}> conditionBeanSetupper) { + assertObjectNotNull("${myEntityListVariableName}<${myExtendedObjectClassName}>", ${myEntityListVariableName}); + assertObjectNotNull("conditionBeanSetupper<${reffererCBClassName}>", conditionBeanSetupper); + if (${myEntityListVariableName}.isEmpty()) { + return; + } + load${refferer.reffererPropertyNameInitCap}(${myEntityListVariableName}, new ${glLoadRefererOptionName}<${reffererCBClassName}, ${reffererEntityClassName}>(conditionBeanSetupper)); + } + + /** + * Load referer of ${refferer.ReffererPropertyName}. + *
+     *   You can load referer with your original condition.
+     * 
+     *   ex) {Client Example}: Referer conditions are 'Xxx' is not null and order-by 'Yyy' desc
+     *     /- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
+     *     final ${myConditionBeanClassName} cb = new ${myConditionBeanClassName}();
+     *     cb.query().setXxx_Equal("xxx");
+     *     final List<${myExtendedObjectClassName}> ${myEntityListVariableName} = ${myBehaviorVariableName}.selectList(cb);
+     *     final ${glConditionBeanSetupperName}<${reffererCBClassName}> cbSetupper = new ${glConditionBeanSetupperName}<${reffererCBClassName}>() {
+     *         public void setup(${reffererCBClassName} cb) {
+     *             cb.query().setXxx_IsNotNull();
+     *             cb.query().addOrderBy_Yyy_Desc();
+     *         }
+     *     };
+     *     ${myBehaviorVariableName}.load${refferer.reffererPropertyNameInitCap}(${myEntityListVariableName}, new ${glLoadRefererOptionName}<${reffererCBClassName}, ${reffererEntityClassName}>(cbSetupper));
+     *     - - - - - - - - - -/
+     * 
+     *   The condition-bean that the setupper provides have settings before you touch it. It is as follows:
+     *     /- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
+     *     cb.query().set${refferer.getLocalColumnJavaNameAsOne()}_InScope(pkList);
+     *     cb.query().addOrderBy_${refferer.getLocalColumnJavaNameAsOne()}_Asc();
+     *     - - - - - - - - - -/
+     * 
+     *   *About internal policy, the value of primary key(and others too) is treated as CaseInsensitive.
+     * 
+ * + * @param ${myEntityListVariableName} Entity list of ${table.uncapitalisedJavaName}. (NotNull) + * @param loadRefererOption Load-referer option. (NotNull) + */ + public void load${refferer.reffererPropertyNameInitCap}(java.util.List<${myExtendedObjectClassName}> ${myEntityListVariableName}, ${glLoadRefererOptionName}<${reffererCBClassName}, ${reffererEntityClassName}> loadRefererOption) { + assertObjectNotNull("${myEntityListVariableName}<${myExtendedObjectClassName}>", ${myEntityListVariableName}); + assertObjectNotNull("loadRefererOption<${reffererEntityClassName}, ${reffererCBClassName}>", loadRefererOption); + if (${myEntityListVariableName}.isEmpty()) { + return; + } + + final java.util.Map<${genericPKMyEntityMap}> pkMyEntityMap = new java.util.LinkedHashMap<${genericPKMyEntityMap}>(); + final java.util.List<${table.getPrimaryKeyJavaNativeAsOne()}> pkList = new java.util.ArrayList<${table.getPrimaryKeyJavaNativeAsOne()}>(); + for (${myExtendedObjectClassName} ${myEntityVariableName} : ${myEntityListVariableName}) { + pkList.add(${myEntityVariableName}.get${table.getPrimaryKeyJavaNameAsOne()}()); + pkMyEntityMap.put((${table.getPrimaryKeyJavaNativeAsOne()})toLowerCaseIfString(${myEntityVariableName}.get${table.getPrimaryKeyJavaNameAsOne()}()), ${myEntityVariableName}); + } + final ${reffererBhvClassName} refererBhv = getDaoSelector().getBehavior(${reffererBhvClassName}.class); + final ${reffererCBClassName} cb = loadRefererOption.getReffererConditionBean() != null ? loadRefererOption.getReffererConditionBean() : refererBhv.newMyConditionBean(); + cb.query().set${refferer.getLocalColumnJavaNameAsOne()}_InScope(pkList); + loadRefererOption.delegateKeyConditionExchangingFirstWhereClauseForLastOne(cb); + if (!loadRefererOption.isStopOrderByKey()) { + cb.query().addOrderBy_${refferer.getLocalColumnJavaNameAsOne()}_Asc(); + cb.getSqlComponentOfOrderByClause().exchangeFirstOrderByElementForLastOne(); + } + loadRefererOption.delegateConditionBeanSettingUp(cb); + final java.util.List${database.filterGenericsString(${reffererEntityClassName})} reffererList = refererBhv.selectList(cb); + loadRefererOption.delegateEntitySettingUp(reffererList); + + final java.util.Map<${genericPKChildListMap}> pkReffererListMap = new java.util.LinkedHashMap<${genericPKChildListMap}>(); + for (${reffererEntityClassName} reffererEntity : reffererList) { + if (!pkReffererListMap.containsKey(toLowerCaseIfString(reffererEntity.get${refferer.getLocalColumnJavaNameAsOne()}()))) { + pkReffererListMap.put((${table.getPrimaryKeyJavaNativeAsOne()})toLowerCaseIfString(reffererEntity.get${refferer.getLocalColumnJavaNameAsOne()}()), new java.util.ArrayList<${reffererEntityClassName}>()); + } + (pkReffererListMap.get(toLowerCaseIfString(reffererEntity.get${refferer.getLocalColumnJavaNameAsOne()}()))).add(reffererEntity); + + // for Reverse Reference. + final ${myExtendedObjectClassName} myEntity = pkMyEntityMap.get(toLowerCaseIfString(reffererEntity.get${refferer.getLocalColumnJavaNameAsOne()}())); + reffererEntity.set${refferer.ForeignPropertyNameInitCap}(myEntity); + } + + for (${myExtendedObjectClassName} ${myEntityVariableName} : ${myEntityListVariableName}) { + if (pkReffererListMap.containsKey(toLowerCaseIfString(${myEntityVariableName}.get${table.getPrimaryKeyJavaNameAsOne()}()))) { + ${myEntityVariableName}.set${refferer.ReffererPropertyNameInitCap}((java.util.List${database.filterGenericsString(${reffererEntityClassName})})pkReffererListMap.get(toLowerCaseIfString(${myEntityVariableName}.get${table.getPrimaryKeyJavaNameAsOne()}()))); + } else { + ${myEntityVariableName}.set${refferer.ReffererPropertyNameInitCap}(new java.util.ArrayList<${reffererEntityClassName}>()); + } + } + } + #else + + /** + * Load refferer of ${refferer.ReffererPropertyName}. + *
+     *   Default refferer order-by is 'primary-key asc'.
+     * 
+     *   ex) {Client Example}
+     *     final ${myConditionBeanClassName} cb = new ${myConditionBeanClassName}();
+     *     cb.query().setXxx_Equal("xxx");
+     *     final List<${myExtendedObjectClassName}> ls = ${myBehaviorVariableName}.selectList(cb);
+     *     ${myBehaviorVariableName}.load${refferer.ReffererPropertyNameInitCap}(ls);
+     * 
+     *   *About internal policy, the value of primary key(and others too) is treated as CaseInsensitive.
+     * 
+ * + * @param ls Entity list of main table. (NotNull) + */ + public void load${refferer.ReffererPropertyNameInitCap}(java.util.List${database.filterGenericsString(${myExtendedObjectClassName})} ls) { + final ${reffererBhvClassName}.CBSetupper cbSetupper = new ${reffererBhvClassName}.CBSetupper() { + public void setup(${reffererCBClassName} cb) { + cb.addOrderBy_PK_Asc();// Default OrderBy for Refferer. + } + }; + load${refferer.ReffererPropertyNameInitCap}(ls, cbSetupper); + } + + /** + * Load refferer of ${refferer.ReffererPropertyName}. + *
+     *   You can load refferer with your original condition.
+     * 
+     *   ex) {Client Example}: Refferer conditions are 'Xxx' is not null and order-by 'Yyy' desc
+     *     final ${myConditionBeanClassName} cb = new ${myConditionBeanClassName}();
+     *     cb.query().setXxx_Equal("xxx");
+     *     final List<${myExtendedObjectClassName}> ls = ${myBehaviorVariableName}.selectList(cb);
+     *     final ${reffererBhvClassName}.CBSetupper cbSetupper = new ${reffererBhvClassName}.CBSetupper() {
+     *         public void setup(${reffererCBClassName} cb) {
+     *             cb.query().setXxx_IsNotNull();
+     *             cb.query().addOrderBy_Yyy_Desc();
+     *         }
+     *     };
+     *     ${myBehaviorVariableName}.load${refferer.ReffererPropertyNameInitCap}(ls, cbSetupper);
+     * 
+     *   *About internal policy, the value of primary key(and others too) is treated as CaseInsensitive.
+     * 
+ * + * @param ls Entity list of main table. (NotNull) + * @param cbSetupper Refferer condition setupper instance for registering refferer condition. (NotNull) + */ + public void load${refferer.ReffererPropertyNameInitCap}(java.util.List${database.filterGenericsString(${myExtendedObjectClassName})} ls, ${reffererBhvClassName}.CBSetupper cbSetupper) { + assertObjectNotNull("ls", ls); + assertObjectNotNull("cbSetupper", cbSetupper); + if (ls.isEmpty()) { + return; + } + + final java.util.Map${database.filterGenericsString(${genericPKMyEntityMap})} pkMyEntityMap = new java.util.LinkedHashMap${database.filterGenericsString(${genericPKMyEntityMap})}(); + final java.util.List${database.filterGenericsString(${table.getPrimaryKeyJavaNativeAsOne()})} pkList = new java.util.ArrayList${database.filterGenericsString(${table.getPrimaryKeyJavaNativeAsOne()})}(); + for (final java.util.Iterator ite = ls.iterator(); ite.hasNext(); ) { + final ${myExtendedObjectClassName} ${myEntityVariableName} = (${myExtendedObjectClassName})ite.next(); + pkList.add(${myEntityVariableName}.get${table.getPrimaryKeyJavaNameAsOne()}()); + pkMyEntityMap.put((${table.getPrimaryKeyJavaNativeAsOne()})toLowerCaseIfString(${myEntityVariableName}.get${table.getPrimaryKeyJavaNameAsOne()}()), ${myEntityVariableName}); + } + final ${reffererBhvClassName} reffererBhv = (${reffererBhvClassName})getDaoSelector().getRBhv(${reffererBhvClassName}.class); + final ${reffererCBClassName} cb = reffererBhv.newMyConditionBean(); + cb.query().set${refferer.getLocalColumnJavaNameAsOne()}_InScope(pkList); + cb.query().addOrderBy_${refferer.getLocalColumnJavaNameAsOne()}_Asc(); + cbSetupper.setup(cb); + final java.util.List${database.filterGenericsString(${reffererEntityClassName})} reffererList = reffererBhv.selectList(cb); + + final java.util.Map${database.filterGenericsString(${genericPKChildListMap})} pkReffererListMap; + pkReffererListMap = new java.util.LinkedHashMap${database.filterGenericsString(${genericPKChildListMap})}(); + for (final java.util.Iterator ite = reffererList.iterator(); ite.hasNext(); ) { + final ${reffererEntityClassName} reffererEntity = (${reffererEntityClassName})ite.next(); + if (!pkReffererListMap.containsKey(toLowerCaseIfString(reffererEntity.get${refferer.getLocalColumnJavaNameAsOne()}()))) { + pkReffererListMap.put((${table.getPrimaryKeyJavaNativeAsOne()})toLowerCaseIfString(reffererEntity.get${refferer.getLocalColumnJavaNameAsOne()}()), new java.util.ArrayList${database.filterGenericsString(${reffererEntityClassName})}()); + } + ((java.util.List${database.filterGenericsString(${reffererEntityClassName})})pkReffererListMap.get(toLowerCaseIfString(reffererEntity.get${refferer.getLocalColumnJavaNameAsOne()}()))).add(reffererEntity); + + // for Reverse Reference. + final ${myExtendedObjectClassName} myEntity = (${myExtendedObjectClassName})pkMyEntityMap.get(toLowerCaseIfString(reffererEntity.get${refferer.getLocalColumnJavaNameAsOne()}())); + reffererEntity.set${refferer.ForeignPropertyNameInitCap}(myEntity); + } + + for (final java.util.Iterator ite = ls.iterator(); ite.hasNext(); ) { + final ${myExtendedObjectClassName} ${myEntityVariableName} = (${myExtendedObjectClassName})ite.next(); + if (pkReffererListMap.containsKey(toLowerCaseIfString(${myEntityVariableName}.get${table.getPrimaryKeyJavaNameAsOne()}()))) { + ${myEntityVariableName}.set${refferer.ReffererPropertyNameInitCap}((java.util.List${database.filterGenericsString(${reffererEntityClassName})})pkReffererListMap.get(toLowerCaseIfString(${myEntityVariableName}.get${table.getPrimaryKeyJavaNameAsOne()}()))); + } else { + ${myEntityVariableName}.set${refferer.ReffererPropertyNameInitCap}(new java.util.ArrayList${database.filterGenericsString(${reffererEntityClassName})}()); + } + } + } + #end + #end +#end + + // =================================================================================== + // Pull Out Foreign + // ================ +#foreach ($foreignKeys in $table.ForeignKeys) + #set ($foreignEntityClassName = "${glProjectPrefix}${foreignKeys.foreignTable.JavaName}") + + /** + * Pull out the list of foreign table '${foreignEntityClassName}'. + * + * @param ${myEntityListVariableName} The list of ${table.uncapitalisedJavaName}. (NotNull) + * @return The list of foreign table. (NotNull) + */ + public java.util.List${database.filterGenericsString(${foreignEntityClassName})} pullout${foreignKeys.foreignPropertyNameInitCap}(java.util.List${database.filterGenericsString(${myExtendedObjectClassName})} ${myEntityListVariableName}) { + assertObjectNotNull("${myEntityListVariableName}", ${myEntityListVariableName}); + final java.util.Set${database.filterGenericsString(${foreignEntityClassName})} foreignSet = new java.util.LinkedHashSet${database.filterGenericsString(${foreignEntityClassName})}(); + for (java.util.Iterator ite = ${myEntityListVariableName}.iterator(); ite.hasNext(); ) { + final ${myExtendedObjectClassName} ${myEntityVariableName} = (${myExtendedObjectClassName})ite.next(); + final ${foreignEntityClassName} foreignEntity = ${myEntityVariableName}.get${foreignKeys.foreignPropertyNameInitCap}(); + if (foreignEntity == null || foreignSet.contains(foreignEntity)) { + continue; + } + foreignSet.add(foreignEntity); + } + return new java.util.ArrayList${database.filterGenericsString(${foreignEntityClassName})}(foreignSet); + } +#end +#foreach ($refferer in $table.Referrers) + #set ($reffererTable = $refferer.Table) + #set ($reffererEntityClassName = "${glProjectPrefix}${reffererTable.JavaName}") + #if (${refferer.isOneToOne()}) + + /** + * Pull out the list of referer-as-one table '${foreignEntityClassName}'. + * + * @param ${myEntityListVariableName} The list of ${table.uncapitalisedJavaName}. (NotNull) + * @return The list of referer-as-one table. (NotNull) + */ + public java.util.List${database.filterGenericsString(${reffererEntityClassName})} pullout${refferer.reffererPropertyNameInitCapAsOne}(java.util.List${database.filterGenericsString(${myExtendedObjectClassName})} ${myEntityListVariableName}) { + final java.util.Set${database.filterGenericsString(${reffererEntityClassName})} reffererAsOneSet = new java.util.LinkedHashSet${database.filterGenericsString(${reffererEntityClassName})}(); + for (java.util.Iterator ite = ${myEntityListVariableName}.iterator(); ite.hasNext(); ) { + final ${myExtendedObjectClassName} ${myEntityVariableName} = (${myExtendedObjectClassName})ite.next(); + final ${reffererEntityClassName} refererEntity = ${myEntityVariableName}.get${refferer.reffererPropertyNameInitCapAsOne}(); + if (refererEntity == null || reffererAsOneSet.contains(refererEntity)) { + continue; + } + reffererAsOneSet.add(refererEntity); + } + return new java.util.ArrayList${database.filterGenericsString(${reffererEntityClassName})}(reffererAsOneSet); + } + #end +#end +#if ($table.isWritable()) + + // =================================================================================== + // Basic Entity Update + // =================== + /** + * Insert. + * + * @param ${myEntityVariableName} Entity. (NotNull) + */ + public void insert(${myExtendedObjectClassName} ${myEntityVariableName}) { + assertEntityNotNull(${myEntityVariableName}); + delegateInsert(${myEntityVariableName}); + } + + protected void doCreate(${glEntityInterfaceName} ${myEntityVariableName}) { + insert((${myExtendedObjectClassName})${myEntityVariableName}); + } + + /** + * Update. + *
+     * If it updates count zero, throws exception.
+     * If concurrency control of this table is valid, this update have it.
+     * 
+ * @param ${myEntityVariableName} Entity. (NotNull) + * @exception ${glPackageBaseCommonException}.${glRecordHasAlreadyBeenDeletedException} + * @exception ${glPackageBaseCommonException}.${glRecordHasOverlappedException} + */ + public void update(${myExtendedObjectClassName} ${myEntityVariableName}) { + assertEntityNotNull(${myEntityVariableName}); + final int updatedCount = delegateUpdate(${myEntityVariableName}); + if (updatedCount == 0) { + throw new ${glPackageBaseCommonException}.${glRecordHasAlreadyBeenDeletedException}(${myEntityVariableName}.toString()); + } else if (updatedCount > 1) { + String msg = "updatedCount=" + updatedCount + ": " + ${myEntityVariableName}.toString(); + throw new ${glPackageBaseCommonException}.${glRecordHasOverlappedException}(msg); + } + } + + protected void doModify(${glEntityInterfaceName} ${myEntityVariableName}) { + update((${myExtendedObjectClassName})${myEntityVariableName}); + } + #if ($database.isVersionAfter1040() && ($table.isUseUpdateDate() || $table.isUseVersionNo())) + + /** + * Update non stritct. + *
+     * This update ignores concurrency control.
+     * This method is faster than updateAfterSelect().
+     * 
+ * @param ${myEntityVariableName} Entity. (NotNull) + * @exception ${glPackageBaseCommonException}.${glRecordHasAlreadyBeenDeletedException} + * @exception ${glPackageBaseCommonException}.${glRecordHasOverlappedException} + */ + public void updateNonstrict(${myExtendedObjectClassName} ${myEntityVariableName}) { + assertEntityNotNull(${myEntityVariableName}); + final int updatedCount = delegateUpdateNonstrict(${myEntityVariableName}); + if (updatedCount == 0) { + throw new ${glPackageBaseCommonException}.${glRecordHasAlreadyBeenDeletedException}(${myEntityVariableName}.toString()); + } else if (updatedCount > 1) { + String msg = "updatedCount=" + updatedCount + ": " + ${myEntityVariableName}.toString(); + throw new ${glPackageBaseCommonException}.${glRecordHasOverlappedException}(msg); + } + } + #end + + /** + * Update after select. + * + * @param ${myEntityVariableName} Entity. This must contain primary-key value at least. (NotNull) + * @exception ${glPackageBaseCommonException}.${glRecordHasAlreadyBeenDeletedException} + */ + public void updateAfterSelect(${myExtendedObjectClassName} ${myEntityVariableName}) { + assertEntityNotNullAndHasPrimaryKeyValue(${myEntityVariableName}); + final ${myConditionBeanClassName} cb = newMyConditionBean(); + cb.acceptPrimaryKeyMapString(getDBMeta().extractPrimaryKeyMapString(${myEntityVariableName})); + final ${myExtendedObjectClassName} currentEntity = selectEntityWithDeletedCheck(cb); + mergeEntity(${myEntityVariableName}, currentEntity); + update(currentEntity); + } + + protected void doModifyAfterSelect(${glEntityInterfaceName} ${myEntityVariableName}) { + updateAfterSelect((${myExtendedObjectClassName})${myEntityVariableName}); + } + #if ($database.isVersionAfter1040() && ($table.isUseUpdateDate() || $table.isUseVersionNo())) + + /** + * Insert or update non strict. + * {update: modified only} + *
+     * This method is faster than insertOrUpdateAfterSelect().
+     * 
+ * @param ${myEntityVariableName} Entity. This should contain primary-key value at least(Except use identity). (NotNull) + * @exception ${glPackageBaseCommonException}.${glRecordHasOverlappedException} + */ + public void insertOrUpdateNonStrict(${myExtendedObjectClassName} ${myEntityVariableName}) { + assertEntityNotNull(${myEntityVariableName}); + if (!${myEntityVariableName}.hasPrimaryKeyValue()) { + insert(${myEntityVariableName}); + } else { + try { + updateNonstrict(${myEntityVariableName}); + } catch (org.seasar.dao.NotSingleRowUpdatedRuntimeException e) { + insert(${myEntityVariableName}); + } catch (${glPackageBaseCommonException}.${glRecordHasAlreadyBeenDeletedException} e) { + insert(${myEntityVariableName}); + } + } + } + #else + + /** + * Insert or update. + * {update: modified only} + * + * @param ${myEntityVariableName} Entity. This should contain primary-key value at least(Except use identity). (NotNull) + */ + public void insertOrUpdate(${myExtendedObjectClassName} ${myEntityVariableName}) { + assertEntityNotNull(${myEntityVariableName}); + if (!${myEntityVariableName}.hasPrimaryKeyValue()) { + insert(${myEntityVariableName}); + } else { + try { + update(${myEntityVariableName}); + } catch (org.seasar.dao.NotSingleRowUpdatedRuntimeException e) { + insert(${myEntityVariableName}); + } catch (${glPackageBaseCommonException}.${glRecordHasAlreadyBeenDeletedException} e) { + insert(${myEntityVariableName}); + } + } + } + #end + + protected void doCreateOrUpdateNonstrict(${glEntityInterfaceName} ${myEntityVariableName}) { + #if ($database.isVersionAfter1040() && ($table.isUseUpdateDate() || $table.isUseVersionNo())) + + insertOrUpdateNonStrict((${myExtendedObjectClassName})${myEntityVariableName}); + #else + + insertOrUpdate((${myExtendedObjectClassName})${myEntityVariableName}); + #end + + } + + /** + * Insert or update after select. + * {update: modified only} + * + * @param ${myEntityVariableName} Entity. This should contain primary-key value at least(Except use identity). (NotNull) + */ + public void insertOrUpdateAfterSelect(${myExtendedObjectClassName} ${myEntityVariableName}) { + assertEntityNotNull(${myEntityVariableName}); + if (!${myEntityVariableName}.hasPrimaryKeyValue()) { + insert(${myEntityVariableName}); + return; + } + ${myExtendedObjectClassName} currentEntity = null; + try { + final ${myConditionBeanClassName} cb = newMyConditionBean(); + cb.acceptPrimaryKeyMapString(getDBMeta().extractPrimaryKeyMapString(${myEntityVariableName})); + currentEntity = selectEntityWithDeletedCheck(cb); + } catch (${glPackageBaseCommonException}.${glRecordHasAlreadyBeenDeletedException} e) { + insert(${myEntityVariableName}); + return; + } + assertEntityNotNullAndHasPrimaryKeyValue(${myEntityVariableName}); + mergeEntity(${myEntityVariableName}, currentEntity); + update(currentEntity); + } + + protected void doCreateOrModifyAfterSelect(${glEntityInterfaceName} entity) { + insertOrUpdateAfterSelect((${myExtendedObjectClassName})entity); + } + #if ($database.isMakeBehaviorForUpdate()) + + /** + * Update after select-for-update. + * + * @param ${myEntityVariableName} Entity. This must contain primary-key value at least. (NotNull) + * @exception ${glPackageBaseCommonException}.${glRecordHasAlreadyBeenDeletedException} + * @deprecated This method is deprecated. + */ + public void updateAfterSelectForUpdate(${myExtendedObjectClassName} ${myEntityVariableName}) { + assertEntityNotNullAndHasPrimaryKeyValue(${myEntityVariableName}); + final ${myConditionBeanClassName} cb = newMyConditionBean(); + cb.acceptPrimaryKeyMapString(getDBMeta().extractPrimaryKeyMapString(${myEntityVariableName})); + cb.lockForUpdate(); + final ${myExtendedObjectClassName} currentEntity = selectEntityWithDeletedCheck(cb); + mergeEntity(${myEntityVariableName}, currentEntity); + update(currentEntity); + } + + protected void doModifyAfterSelectForUpdate(${glEntityInterfaceName} entity) { + updateAfterSelectForUpdate((${myExtendedObjectClassName})entity); + } + + /** + * Insert or update after select-for-update. + * {update: modified only} + * + * @param ${myEntityVariableName} Entity. This must contain primary-key value at least(Except use identity). (NotNull) + * @deprecated This method is deprecated. + */ + public void insertOrUpdateAfterSelectForUpdate(${myExtendedObjectClassName} ${myEntityVariableName}) { + assertEntityNotNull(${myEntityVariableName}); + if (!${myEntityVariableName}.hasPrimaryKeyValue()) { + insert(${myEntityVariableName}); + return; + } + ${myExtendedObjectClassName} currentEntity = null; + try { + final ${myConditionBeanClassName} cb = newMyConditionBean(); + cb.acceptPrimaryKeyMapString(getDBMeta().extractPrimaryKeyMapString(${myEntityVariableName})); + cb.lockForUpdate(); + currentEntity = selectEntityWithDeletedCheck(cb); + } catch (${glPackageBaseCommonException}.${glRecordHasAlreadyBeenDeletedException} e) { + insert(${myEntityVariableName}); + return; + } + assertEntityNotNullAndHasPrimaryKeyValue(${myEntityVariableName}); + mergeEntity(${myEntityVariableName}, currentEntity); + update(${myEntityVariableName}); + } + + protected void doCreateOrModifyAfterSelectForUpdate(${glEntityInterfaceName} ${myEntityVariableName}) { + insertOrUpdateAfterSelectForUpdate((${myExtendedObjectClassName})${myEntityVariableName}); + } + #end + + /** + * ${database.ImplementComment} + * + * @param sourceEntity Source entity. (NotNull) + * @param destinationEntity Destination entity. (NotNull) + */ + protected void mergeEntity(${glEntityInterfaceName} sourceEntity, ${glEntityInterfaceName} destinationEntity) { + assertEntityNotNull(sourceEntity); + assertEntityNotNull(destinationEntity); + final ${myExtendedObjectClassName} sourceMyEntity = (${myExtendedObjectClassName})sourceEntity; + final ${myExtendedObjectClassName} destinationMyEntity = (${myExtendedObjectClassName})destinationEntity; + destinationMyEntity.clearModifiedPropertyNames(); + final java.util.Set${database.filterGenericsString('String')} names = sourceMyEntity.getModifiedPropertyNames(); + +#foreach ($col in $table.Columns) + if (names.contains("${col.UncapitalisedJavaName}")) { destinationMyEntity.set${col.JavaName}(sourceMyEntity.get${col.JavaName}()); } +#end + + } + + /** + * Delete. + * + * @param ${myEntityVariableName} Entity. (NotNull) + * @exception ${glPackageBaseCommonException}.${glRecordHasAlreadyBeenDeletedException} + * @exception ${glPackageBaseCommonException}.${glRecordHasOverlappedException} + */ + public void delete(${myExtendedObjectClassName} ${myEntityVariableName}) { + assertEntityNotNull(${myEntityVariableName}); + final int deletedCount = delegateDelete(${myEntityVariableName}); + if (deletedCount == 0) { + throw new ${glPackageBaseCommonException}.${glRecordHasAlreadyBeenDeletedException}(${myEntityVariableName}.toString()); + } else if (deletedCount > 1) { + String msg = "deletedCount=" + deletedCount + ": " + ${myEntityVariableName}.toString(); + throw new ${glPackageBaseCommonException}.${glRecordHasOverlappedException}(msg); + } + } + + protected void doRemove(${glEntityInterfaceName} ${myEntityVariableName}) { + delete((${myExtendedObjectClassName})${myEntityVariableName}); + } + + /** + * Delete after select. + * + * @param ${myEntityVariableName} Entity. This must contain primary-key value at least. (NotNull) + * @exception ${glPackageBaseCommonException}.${glRecordHasAlreadyBeenDeletedException} + */ + public void deleteAfterSelect(${myExtendedObjectClassName} ${myEntityVariableName}) { + assertEntityNotNullAndHasPrimaryKeyValue(${myEntityVariableName}); + final ${myConditionBeanClassName} cb = newMyConditionBean(); + cb.acceptPrimaryKeyMapString(getDBMeta().extractPrimaryKeyMapString(${myEntityVariableName})); + selectEntityWithDeletedCheck(cb); + delete(${myEntityVariableName}); + } + + protected void doRemoveAfterSelect(${glEntityInterfaceName} ${myEntityVariableName}) { + deleteAfterSelect((${myExtendedObjectClassName})${myEntityVariableName}); + } + #if ($database.isVersionAfter1040() && ($table.isUseUpdateDate() || $table.isUseVersionNo())) + + /** + * Delete non stritct. + *
+     * This delete ignores concurrency control.
+     * This method is faster than deleteAfterSelect().
+     * 
+ * @param ${myEntityVariableName} Entity. (NotNull) + * @exception ${glPackageBaseCommonException}.${glRecordHasAlreadyBeenDeletedException} + * @exception ${glPackageBaseCommonException}.${glRecordHasOverlappedException} + */ + public void deleteNonstrict(${myExtendedObjectClassName} ${myEntityVariableName}) { + assertEntityNotNull(${myEntityVariableName}); + final int deletedCount = delegateDeleteNonstrict(${myEntityVariableName}); + if (deletedCount == 0) { + throw new ${glPackageBaseCommonException}.${glRecordHasAlreadyBeenDeletedException}(${myEntityVariableName}.toString()); + } else if (deletedCount > 1) { + String msg = "deletedCount=" + deletedCount + ": " + ${myEntityVariableName}.toString(); + throw new ${glPackageBaseCommonException}.${glRecordHasOverlappedException}(msg); + } + } + #end + + // =================================================================================== + // Basic Batch Update + // ================== + /** + * Insert list. + * + * @param ${myEntityListVariableName} Entity-list. (NotNull & NotEmpty) + * @return Inserted count. + */ + public int insertList(java.util.List${database.filterGenericsString(${myExtendedObjectClassName})} ${myEntityListVariableName}) { + assertListNotNullAndNotEmpty(${myEntityListVariableName}); + return delegateInsertList(${myEntityListVariableName}); + } + + /** + * Update list. + * + * @param ${myEntityListVariableName} Entity-list. (NotNull & NotEmpty) + * @return Updated count. + */ + public int updateList(java.util.List${database.filterGenericsString(${myExtendedObjectClassName})} ${myEntityListVariableName}) { + assertListNotNullAndNotEmpty(${myEntityListVariableName}); + return delegateUpdateList(${myEntityListVariableName}); + } + + /** + * Delete list. + * + * @param ${myEntityListVariableName} Entity-list. (NotNull & NotEmpty) + * @return Deleted count. + */ + public int deleteList(java.util.List${database.filterGenericsString(${myExtendedObjectClassName})} ${myEntityListVariableName}) { + assertListNotNullAndNotEmpty(${myEntityListVariableName}); + return delegateDeleteList(${myEntityListVariableName}); + } + + // =================================================================================== + // Various Insert + // ============== + #if ($table.isUseIdentity()) + #if ($table.hasPrimaryKey()) + + /* (non-javadoc) + * Copy-insert. + * + * @param primaryKey Primary-keys. (NotNull) + * @return Inserted count. + * @exception ${glPackageBaseCommonException}.${glRecordHasAlreadyBeenDeletedException} + */ + public int copyInsertByPKValueAfterSelect(${table.PrimaryKeyArgsString}) { + ${myExtendedObjectClassName} entity = new ${myExtendedObjectClassName}(); + ${table.getPrimaryKeyArgsSetupString('entity')} + final ${myConditionBeanClassName} cb = newMyConditionBean(); + cb.acceptPrimaryKeyMapString(getDBMeta().extractPrimaryKeyMapString(entity)); + final ${myExtendedObjectClassName} currentEntity = selectEntityWithDeletedCheck(cb); + return delegateInsert(currentEntity); + } + #end + + /** + * Filter 'copy-insert' entity. + * + * @param ${myEntityVariableName} Entity. (NotNull) + */ + protected void filterCopyInsertEntity(${myExtendedObjectClassName} ${myEntityVariableName}) { + } + #end +#else + #if ($table.isAvailableNonPrimaryKeyWritable()) + + // =================================================================================== + // Basic Entity Update + // =================== + /** + * Insert. + * + * @param ${myEntityVariableName} Entity. (NotNull) + */ + public void insert(${myExtendedObjectClassName} ${myEntityVariableName}) { + assertEntityNotNull(${myEntityVariableName}); + delegateInsert(${myEntityVariableName}); + } + #end +#end + + // =================================================================================== + // CBSetupper + // ========== +#if ($database.isAvailableGenerics()) + /** + * The interface of condition-bean setupper. + */ + public static interface CBSetupper extends ${glConditionBeanSetupperName}<${myConditionBeanClassName}> { + + /** + * Set up condition. + * + * @param cb Condition-bean. (NotNull) + */ + public void setup(${myConditionBeanClassName} cb); + } +#else + /** + * The interface of condition-bean setupper. + */ + public static interface CBSetupper extends SimpleCBSetupper { + + /** + * Set up condition. + * + * @param cb Condition-bean. (NotNull) + */ + public void setup(${myConditionBeanClassName} cb); + } +#end +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/bsdao/BaseDao.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/bsdao/BaseDao.vm 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/bsdao/BaseDao.vm 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,243 @@ +#set ($myClassName = "${myBaseDaoClassName}") + +package ${myBaseDaoPackageName}; + +import ${glPackageExtendedEntity}.${myExtendedObjectClassName}; +#set ($InterfaceName = "") +#if ($table.isWritable()) + #set ($InterfaceName = "${glPackageBaseCommon}.${glDaoWritableInterfaceName}") +#else + #set ($InterfaceName = "${glPackageBaseCommon}.${glDaoReadableInterfaceName}") +#end + +/** + * The dao interface of ${table.Name}. + * + *
+ * [primary-key]
+ *     ${table.primaryKeyNameCommaString}
+ * 
+ * [column-property]
+ *     ${table.columnNameCommaString}
+ * 
+ * [foreign-property]
+ *     ${table.foreignPropertyNameCommaString}
+ * 
+ * [refferer-property]
+ *     ${table.referrerPropertyNameCommaString}
+ * 
+ * [sequence]
+ *     ${table.definedSequenceName}
+ * 
+ * [identity]
+ *     ${table.identityPropertyName}
+ * 
+ * [update-date]
+ *     ${table.updateDateJavaName}
+ * 
+ * [version-no]
+ *     ${table.versionNoJavaName}
+ * 
+ * 
+ * + * @author ${database.ClassAuthor} + */ +public interface ${myClassName} extends ${InterfaceName} { + + /** BEAN-Annotation. */ + public Class BEAN = ${glPackageExtendedEntity}.${myExtendedObjectClassName}.class; + + /** SQL-Annotation for getCountAll(). */ + public static final String getCountAll_SQL = "select count(*) from ${table.Name}"; + + /** + * Get count as all. + * + * @return All count. + */ + public int getCountAll(); + + /** SQL-Annotation for getListAll(). */ + public static final String getListAll_SQL = "select * from ${table.Name}"; + + /** + * Get list as all. + * + * @return All list. (NotNull) + */ + public java.util.List${database.filterGenericsString(${myExtendedObjectClassName})} getListAll(); +#if ($table.isWritable()) + + /** SQL-Annotation for getEntity(). */ + public static final String getEntity_SQL = "select * from ${table.Name} where ${table.PrimaryKeyWhereStringWithSqlComment}"; + + /** Args-Annotation for getEntity(). */ + public static final String getEntity_ARGS = "${table.PrimaryKeyUncapitalisedJavaNameCommaString}"; + + /* (non-javadoc) + * Get entity by primary key. + * + * @param primaryKey Primary key. (NotNull) + */ + public ${myExtendedObjectClassName} getEntity(${table.PrimaryKeyArgsString}); +#end + + /** + * Select count by condition-bean. + *
+     * Ignore fetchFirst() and fetchScope() and fetchPage().
+     * But the fetch status of the condition-bean remains as it is.
+     * This select method generates SQL based on condition-bean.
+     * 
+     * Example)
+     *   final ${myConditionBeanClassName} cb = new ${myConditionBeanClassName}();
+     *   cb.query().setXxx_GreaterEqual(new BigDecimal(14));
+     *   final int count = dao.selectCount(cb);
+     * 
+ * + * @param cb Condition-bean. (NotNull) + * @return Selected count. (NotNull) + */ + public int selectCount(${myAttachedCBArgsString}); + + /** + * Select entity '${myExtendedObjectClassName}' by condition-bean. + *
+     * This select method generates SQL based on condition-bean.
+     * 
+     * Example)
+     *   final ${myConditionBeanClassName} cb = new ${myConditionBeanClassName}();
+     *   cb.query().setXxxCode_Equal("abc");// It is assumed that this is the primary key...
+     *   cb.lockForUpdate();
+     *   final ${myExtendedObjectClassName} entity = dao.selectEntity(cb);
+     * 
+ * + * @param cb Condition-bean. (NotNull) + * @return Selected entity. If the select result is zero, it returns null. (Nullable) + */ + public ${myExtendedObjectClassName} selectEntity(${myAttachedCBArgsString}); + + /** + * Select list by condition-bean. + *
+     * This select method generates SQL based on condition-bean.
+     * 
+     * Example)
+     *   final ${myConditionBeanClassName} cb = new ${myConditionBeanClassName}();
+     *   cb.setupSelect_Xxx(); // Including the foreign table in select clause
+     *   cb.query().setXxxName_PrefixSearch("abc");
+     *   cb.query().setXxxStartDate_IsNotNull();
+     *   cb.addOrderBy_PK_Asc().fetchFirst(20);
+     *   final List resultList = dao.selectList(cb);
+     * 
+ * + * @param cb Condition-bean. (NotNull) + * @return Selected list. If the select result is zero, it returns empty list. (NotNull) + */ + public java.util.List${database.filterGenericsString(${myExtendedObjectClassName})} selectList(${myAttachedCBArgsString}); + +#if ($table.isWritable()) + + /** + * Insert one entity. + * + * @param entity Entity. (NotNull) + * @return Inserted count. + */ + public int insert(${myExtendedObjectClassName} entity); + + /** + * Update one entity. + * + * @param entity Entity. (NotNull) + * @return Updated count. + */ + public int update(${myExtendedObjectClassName} entity); + + /** + * Update one entity. (modified only) + * + * @param entity Entity. (NotNull) + * @return Updated count. + */ + public int updateModifiedOnly(${myExtendedObjectClassName} entity); + #if ($database.isVersionAfter1040() && ($table.isUseUpdateDate() || $table.isUseVersionNo())) + + /** + * Update one entity. (non strict & modified only) + * + * @param entity Entity. (NotNull) + * @return Updated count. + */ + public int updateNonstrictModifiedOnly(${myExtendedObjectClassName} entity); + #end + + /** + * Delete one entity. + * + * @param entity Entity. (NotNull) + * @return Deleted count. + */ + public int delete(${myExtendedObjectClassName} entity); + #if ($database.isVersionAfter1040() && ($table.isUseUpdateDate() || $table.isUseVersionNo())) + + /** + * Delete one entity. (non strict) + * + * @param entity Entity. (NotNull) + * @return Deleted count. + */ + public int deleteNonstrict(${myExtendedObjectClassName} entity); + #end + + /** + * Insert several entities. + * + * @param entityList Entity-list. (NotNull) + * @return Inserted count. + */ + public int insertList(java.util.List${database.filterGenericsString(${myExtendedObjectClassName})} entityList); + + /** + * Update several entities. + * + * @param entityList Entity-list. (NotNull) + * @return Updated count. + */ + public int updateList(java.util.List${database.filterGenericsString(${myExtendedObjectClassName})} entityList); + + /** + * Delete several entities. + * + * @param entityList Entity-list. (NotNull) + * @return Deleted count. + */ + public int deleteList(java.util.List${database.filterGenericsString(${myExtendedObjectClassName})} entityList); +#else + #if ($table.isAvailableNonPrimaryKeyWritable()) + + /** SQL-Annotation for insert(). */ + public static final String insert_SQL = "insert into ${table.Name}(${table.columnNameCommaString}) values(${table.insertClauseValuesAsSqlComment})"; + + /** + * Insert one entity. + * + * @param entity Entity. (NotNull) + * @return Inserted count. + */ + public int insert(${myExtendedObjectClassName} entity); + #end +#end +#if ($table.isUseSequence()) + + /** SQL-Annotation for selectNextVal(). */ + public String selectNextVal_SQL = "${table.SequenceNextSql}"; + + /** + * Select next value as sequence. + * + * @return Next value. (NotNull) + */ + public ${database.sequenceReturnType} selectNextVal(); +#end +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/bsdao/BsParameterBean.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/bsdao/BsParameterBean.vm 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/bsdao/BsParameterBean.vm 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,73 @@ +package ${glPackageBaseParameterBean}; + +#set ($myClassName = "${myBaseParameterBeanClassName}") + +/** + * The parametaer-bean of ${pmbClassName}. + * + * @author ${database.ClassAuthor} + */ +public class ${myClassName} ${database.getPmbMetaDataSuperClassDefinition($pmbClassName)}{ + + // =================================================================================== + // Attribute + // ========= +#foreach ($propertyName in $database.getPmbMetaDataPropertySet($pmbClassName)) + #set ($propertyType = $database.getPmbMetaDataPropertyType($pmbClassName, $propertyName)) + + /** The value of ${propertyName}. */ + protected ${propertyType} _${propertyName}; +#end + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + public ${myClassName}() { + } + + // =================================================================================== + // Accessor + // ======== +#foreach ($propertyName in $database.getPmbMetaDataPropertySet($pmbClassName)) + #set ($propertyType = $database.getPmbMetaDataPropertyType($pmbClassName, $propertyName)) + + /** + * Get the value of ${propertyName}. + * + * @return The value of ${propertyName}. + */ + public ${propertyType} get${database.initCap($propertyName)}() { + return _${propertyName}; + } + + /** + * Set the value of ${propertyName}. + * + * @param value The value of ${propertyName}. + */ + public void set${database.initCap($propertyName)}(${propertyType} ${propertyName}) { + _${propertyName} = ${propertyName}; + } +#end + + // =================================================================================== + // Basic Override + // ============== + /** + * ${database.OverrideComment} + * + * @return Property-string. (NotNull) + */ + public String toString() { + final StringBuffer sb = new StringBuffer(); +#foreach ($propertyName in $database.getPmbMetaDataPropertySet($pmbClassName)) + + sb.append(" ${propertyName}=").append(_${propertyName}); +#end + + return sb.toString(); + } +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/bsdao/customize/BaseCustomizeDao.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/bsdao/customize/BaseCustomizeDao.vm 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/bsdao/customize/BaseCustomizeDao.vm 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,30 @@ +#set ($myClassName = "${myBaseDaoClassName}") + +package ${myBaseDaoPackageName}; + +import ${glPackageExtendedCustomizeEntity}.${myExtendedObjectClassName}; +import ${glPackageBaseCommon}.${glDaoReadableInterfaceName}; +#foreach ($import in $table.getCustomizeDaoImportList()) + +${import}; +#end + +/** + * The customize dao interface of ${table.Name}. + * + * @author ${database.ClassAuthor} + */ +public interface ${myClassName} extends ${glDaoReadableInterfaceName} { + + /** BEAN-Annotation. */ + public Class BEAN = ${myExtendedObjectClassName}.class; + +#foreach ($methodName in $table.getCustomizeDaoMethodNameList()) + #set ($argument = $table.getCustomizeDaoMethodMap().get($methodName)) + + public String ${methodName}_ARGS = "${table.getCustomizeDaoArgumentVariableCommaString(${methodName})}"; + + public ${table.getCustomizeDaoReturnType(${methodName})} ${methodName}(${argument}); +#end + +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/bsentity/BaseEntity.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/bsentity/BaseEntity.vm 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/bsentity/BaseEntity.vm 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,745 @@ +package ${myBaseEntityPackageName}; +#set ($myClassName = "${myBaseObjectClassName}") + +#if (${table.hasAllCommonColumn()}) + +import ${glPackageBaseCommon}.${glEntityDefinedCommonColumnInterfaceName}; +#else + +import ${glPackageBaseCommon}.${glEntityInterfaceName}; +#end +import ${glPackageBaseCommonDBMeta}.${glDBMetaInterfaceName}; +#if (!$isSql2Entity) +import ${glPackageBaseCommonDBMeta}.${glDBMetaInstanceHandlerName}; +#end +#set ($myEntityInterfaceName = "") +#if (${table.hasAllCommonColumn()}) + #set ($myEntityInterfaceName = ${glEntityDefinedCommonColumnInterfaceName}) +#else + #set ($myEntityInterfaceName = ${glEntityInterfaceName}) +#end + +/** + * The entity of ${table.Name}. + * + *
+ * [primary-key]
+ *     ${table.PrimaryKeyNameCommaString}
+ * 
+ * [column-property]
+ *     ${table.ColumnNameCommaString}
+ * 
+ * [foreign-property]
+ *     ${table.ForeignPropertyNameCommaString}
+ * 
+ * [refferer-property]
+ *     ${table.ReferrerPropertyNameCommaString}
+ * 
+ * [sequence]
+ *     ${table.DefinedSequenceName}
+ * 
+ * [identity]
+ *     ${table.IdentityPropertyName}
+ * 
+ * [update-date]
+ *     ${table.UpdateDateJavaName}
+ * 
+ * [version-no]
+ *     ${table.VersionNoJavaName}
+ * 
+ * 
+ * + * @author ${database.ClassAuthor} + */ +public abstract class $myClassName implements ${myEntityInterfaceName}, java.io.Serializable { + + /** Serial version UID. (Default) */ + private static final long serialVersionUID = 1L; + + /** TABLE-Annotation for S2Dao */ + public static final String TABLE = "${table.AnnotationTableName}"; + +#if ($table.isUseUpdateDate()) + + /** TIMESTAMP-Annotation */ + public static final String TIMESTAMP_PROPERTY = "$table.UpdateDateUncapitalisedJavaName"; +#end +#if ($table.isUseVersionNo()) + + /** VERSION_NO-Annotation */ + public static final String VERSION_NO_PROPERTY = "$table.VersionNoUncapitalisedJavaName"; +#end +#if ($table.isUseIdentity()) + + /** ID-Annotation */ + public static final String ${table.IdentityPropertyName}_ID = "identity"; +#end + + // =================================================================================== + // Attribute + // ========= + /** Entity modified properties. (for S2Dao) */ + protected EntityModifiedProperties _modifiedProperties = newEntityModifiedProperties(); + +#foreach ($col in $table.Columns) + #if ($database.isMakeDeprecated()) + + /** The value of ${col.UncapitalisedJavaName}. ColumnDefinition -- ${col.columnDefinitionLineDisp}*/ + protected ${col.JavaNative} _${col.UncapitalisedJavaName}; + + /** Has the setter of ${col.UncapitalisedJavaName} been invoked? */ + protected boolean _isSetterInvoked${col.JavaName}; + #else + + /** The value of ${col.UncapitalisedJavaName}. ColumnDefinition -- ${col.columnDefinitionLineDisp}*/ + protected ${col.JavaNative} _${col.UncapitalisedJavaName}; + #end +#end + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + public ${myClassName}() { + } + +#if ($isSql2Entity) + // =================================================================================== + // DBMeta + // ====== + /** + * ${database.ImplementComment} + * + * @return DBMeta. (NotNull) + */ + public ${glDBMetaInterfaceName} getDBMeta() { + return ${myDBMetaPackageName}.${myDBMetaClassName}.getInstance(); + } +#else + + // =================================================================================== + // DBMeta + // ====== + /** + * ${database.ImplementComment} + * + * @return DBMeta. (NotNull) + */ + public ${glDBMetaInterfaceName} getDBMeta() { + return ${glDBMetaInstanceHandlerName}.getInstanceByTableDbName(getTableDbName()); + } +#end + + // =================================================================================== + // Table Name + // ========== + /** + * ${database.ImplementComment} + * + * @return Table db-name. (NotNull) + */ + public String getTableDbName() { + return "${table.name}"; + } + + /** + * ${database.ImplementComment} + * + * @return Table cap-prop-name. (NotNull) + */ + public String getTableCapPropName() { + return "${table.javaName}"; + } + + /** + * ${database.ImplementComment} + * + * @return Table uncap-prop-name. (NotNull) + */ + public String getTableUncapPropName() { + return "${table.uncapitalisedJavaName}"; + } + + // =================================================================================== + // Accessor + // ======== +#foreach ($col in $table.Columns) + + /** Column-Annotation for S2Dao. ColumnDefinition -- ${col.columnDefinitionLineDisp}*/ + public static final String ${col.JavaBeansRulePropertyName}_COLUMN = "${col.Name}"; + + /** + * Get the value of ${col.UncapitalisedJavaName}.
+ * {${col.columnDefinitionLineDisp}} + * + * @return The value of ${col.UncapitalisedJavaName}. (Nullable) + */ + public ${col.JavaNative} get${col.JavaName}() { + return _${col.UncapitalisedJavaName}; + } + + /** + * Set the value of ${col.UncapitalisedJavaName}.
+ * {${col.columnDefinitionLineDisp}} + * + * @param ${col.UncapitalisedJavaName} The value of ${col.UncapitalisedJavaName}. (Nullable) + */ + public void set${col.JavaName}(${col.JavaNative} ${col.UncapitalisedJavaName}) { + _modifiedProperties.addPropertyName("${col.JavaBeansRulePropertyName}"); + _${col.UncapitalisedJavaName} = ${col.UncapitalisedJavaName}; + } +#end + +#if ($table.hasAllCommonColumn()) + #foreach ($columnName in ${database.commonColumnNameConvertionList}) + #set ($filteredColumnName = ${database.filterCommonColumn(${columnName})}) + #set ($commonColumnMap = ${database.commonColumnMap}) + #set ($columnType = ${commonColumnMap.get(${columnName})}) + #set ($javaNative = ${database.convertJavaNativeByJdbcType(${columnType})}) + #set ($javaName = ${database.convertJavaNameByJdbcNameAsColumn(${filteredColumnName})}) + #set ($uncapitalisedJavaName = ${database.convertUncapitalisedJavaNameByJdbcNameAsColumn(${filteredColumnName})}) + #set ($targetJavaName = ${table.findTargetColumnJavaNameByCommonColumnName(${columnName})}) + + /** + * Get the value of ${uncapitalisedJavaName}.
+ * + * @return The value of ${uncapitalisedJavaName}. (Nullable) + */ + public ${javaNative} get${javaName}() { + return get${targetJavaName}(); + } + + /** + * Set the value of ${uncapitalisedJavaName}.
+ * + * @param ${uncapitalisedJavaName} The value of ${uncapitalisedJavaName}. (Nullable) + */ + public void set${javaName}(${javaNative} ${uncapitalisedJavaName}) { + set${targetJavaName}(${uncapitalisedJavaName}); + } + #end +#end + + // =================================================================================== + // Classify Method + // =============== +#foreach ($col in $table.Columns) + #if (${col.hasClassification()}) + #foreach ($classificationMap in $col.ClassificationMapList) + + /** + * Classify the value of ${col.UncapitalisedJavaName} as ${classificationMap.get('name')}.
+ * ${classificationMap.get('comment')}
+ */ + public void classify${col.JavaName}${classificationMap.get('name')}() { + String code = ${glPackageBaseCommon}.${glClassificationDefinition}.CODE_${col.ClassificationName}_${classificationMap.get('name')}; + set${col.JavaName}(new ${col.JavaNative}(code)); + } + #end + #end +#end + + // =================================================================================== + // Classification Determination + // ============================ +#foreach ($col in $table.Columns) + #if (${col.hasClassification()}) + #foreach ($classificationMap in $col.ClassificationMapList) + + /** + * Is the value of ${col.UncapitalisedJavaName} '${classificationMap.get('name')}'?
+ * ${classificationMap.get('comment')}
+ *
+     * The difference of capital letters and small letters is NOT distinguished.
+     * If the value is null, this method returns false!
+     * 
+ * + * @return Determanation. + */ + public boolean is${col.JavaName}${classificationMap.get('name')}() { + return helpEqualingIgnoreCaseClassification(_${col.UncapitalisedJavaName}, ${glPackageBaseCommon}.${glClassificationDefinition}.CODE_${col.ClassificationName}_${classificationMap.get('name')}); + } + #end + #end +#end + +#if (${table.hasClassification()}) + private boolean helpEqualingIgnoreCaseClassification(Object value, String code) { + if (value == null) { return false; } + return code.equalsIgnoreCase(value.toString()); + } +#end + + // =================================================================================== + // Classification Getter + // ===================== +#foreach ($col in $table.Columns) + #if (${col.hasClassification()}) + #if (${col.hasClassificationName()}) + + /** + * Get the value of ${col.UncapitalisedJavaName} as classification-name. + * + * @return The value of ${col.UncapitalisedJavaName} as classification-name. (Nullable) + */ + public String get${col.JavaName}Name() { + return helpGettingFromClassificationMap(_${col.UncapitalisedJavaName}, ${glPackageBaseCommon}.${glClassificationDefinition}.CODE_NAME_MAP_${col.ClassificationName}); + } + #end + #if (${col.hasClassificationAlias()}) + + /** + * Get the value of ${col.UncapitalisedJavaName} as classification-alias. + * + * @return The value of ${col.UncapitalisedJavaName} as classification-alias. (Nullable) + */ + public String get${col.JavaName}Alias() { + return helpGettingFromClassificationMap(_${col.UncapitalisedJavaName}, ${glPackageBaseCommon}.${glClassificationDefinition}.CODE_ALIAS_MAP_${col.ClassificationName}); + } + #end + #end +#end + +#if (${table.hasClassification()}) + private String helpGettingFromClassificationMap(Object key, java.util.Map${database.filterGenericsString('String, String')} map) { + if (key == null) { return null; } + return (String)map.get(key.toString()); + } +#end + + // =================================================================================== + // Foreign Table + // ============= +#set ($foreignKeysIndex = 0) +#foreach ($foreignKeys in $table.ForeignKeys) + #set ($foreignVariableName = "${glParentVariablePrefix}${foreignKeys.ForeignPropertyNameInitCap}") + #set ($foreignDaoClassName = "${glProjectPrefix}${foreignKeys.foreignTable.JavaName}Dao") + #set ($foreignEntityClassName = "${glProjectPrefix}${foreignKeys.foreignTable.JavaName}") + #set ($parentCBClassName = "${glProjectPrefix}${foreignKeys.foreignTable.JavaName}${glConditionBeanInitialName}") + + // /* * * * * * * * * * * * * * * * * * * * * * * + // ForeignTable = [${foreignKeys.foreignTable.name}] + // ForeignProperty = [${foreignKeys.foreignPropertyName}] + // * * * * * * * * */ + + /** RELNO of foreign table for s2dao. */ + public static final int ${foreignKeys.ForeignJavaBeansRulePropertyName}_RELNO = ${foreignKeysIndex}; + + /** RELKEYS of foreign table for s2dao. */ + public static final String ${foreignKeys.ForeignJavaBeansRulePropertyName}_RELKEYS = "$foreignKeys.RelationKeysCommaString"; + + /** The entity of foreign table. */ + protected ${glPackageExtendedEntity}.${foreignEntityClassName} ${foreignVariableName}; + + /** + * Get the entity of foreign table without lazyload. + * + * @return The entity of foreign table. + */ + public ${glPackageExtendedEntity}.${foreignEntityClassName} get${foreignKeys.foreignPropertyNameInitCap}() { + return ${foreignVariableName}; + } + + /** + * Set the entity of foreign table. + * + * @param v The entity of foreign table. + */ + public void set${foreignKeys.foreignPropertyNameInitCap}(${glPackageExtendedEntity}.${foreignEntityClassName} entity) { + this.${foreignVariableName} = entity; + } + + /** + * Has relation object of ${foreignKeys.foreignPropertyName}. + * + * @return Determination. + */ + public boolean hasRelation${foreignKeys.foreignPropertyNameInitCap}() { + return ${foreignVariableName} != null && ${foreignVariableName}.hasPrimaryKeyValue(); + } + + #set ($foreignKeysIndex = $foreignKeysIndex + 1) +#end + + // =================================================================================== + // Refferer Table + // ============== +#foreach ($refferer in $table.Referrers) + #set ($reffererTable = $refferer.Table) + #set ($reffererEntityClassName = "${glProjectPrefix}${reffererTable.JavaName}") + #set ($reffererDaoClassName = "${reffererEntityClassName}Dao") + #set ($reffererCBClassName = "${reffererEntityClassName}${glConditionBeanInitialName}") + #set ($reffererVariableName = "${glChildrenVariablePrefix}${refferer.ReffererPropertyNameInitCap}") + #set ($reffererEntityLongClassName = "${glPackageExtendedEntity}.${reffererEntityClassName}") + + #if (${refferer.isOneToOne()}) + + // /* * * * * * * * * * * * * * * * * * * * * * * {as one} + // ReffererTable = [${refferer.Table.Name}] + // ReffererProperty = [${refferer.ReffererPropertyName}] + // * * * * * * * * */ + + /** RELNO of foreign table for s2dao. */ + public static final int ${refferer.ReffererJavaBeansRulePropertyNameAsOne}_RELNO = ${foreignKeysIndex}; + + /** RELKEYS of foreign table for s2dao. */ + public static final String ${refferer.ReffererJavaBeansRulePropertyNameAsOne}_RELKEYS = "$refferer.RelationKeysCommaStringForOneToOneRefferer"; + #set ($foreignKeysIndex = $foreignKeysIndex + 1) + #else + + // /* * * * * * * * * * * * * * * * * * * * * * * + // ReffererTable = [${refferer.Table.Name}] + // ReffererProperty = [${refferer.ReffererPropertyName}] + // * * * * * * * * */ + #end + + /** The list of refferer table. */ + protected java.util.List${database.filterGenericsString(${reffererEntityLongClassName})} $reffererVariableName; + + /** + * Get the list of refferer table without lazyload. + * If it's not loaded yet, returns null. + * + * @return The list of refferer table. (Nullable) + */ + public java.util.List${database.filterGenericsString(${reffererEntityLongClassName})} get${refferer.ReffererPropertyNameInitCap}() { + return ${reffererVariableName}; + } + + /** + * Set the list of refferer table. + * + * @param value The list of refferer table. (Nullable) + */ + public void set${refferer.ReffererPropertyNameInitCap}(java.util.List${database.filterGenericsString(${reffererEntityLongClassName})} entity) { + this.${reffererVariableName} = entity; + } + #if (${refferer.isOneToOne()}) + + /** + * Get the entity of refferer table as one without lazyload. + * If it's not loaded yet, returns null. + * If the size of the refferer table list is zero, throws the exception. + * + * @return The entity of refferer table. (Nullable) + */ + public ${reffererEntityLongClassName} get${refferer.reffererPropertyNameInitCapAsOne}() { + final java.util.List${database.filterGenericsString(${reffererEntityLongClassName})} ls = get${refferer.ReffererPropertyNameInitCap}(); + if (ls == null || ls.isEmpty()) { + return null; + } + if (ls.size() > 1) { + String msg = "The size of the list must be one because this relation is 'one-to-one'"; + msg = msg + ": list=" + ls + ": toString()=" + toString(); + throw new IllegalStateException(msg); + } + return (${reffererEntityLongClassName})ls.get(0); + } + + /** + * Set the entity of refferer table as one. + * + * @param entity The entity of refferer table. (Nullable) + */ + public void set${refferer.reffererPropertyNameInitCapAsOne}(${reffererEntityLongClassName} entity) { + if (entity == null) { + ${reffererVariableName} = null; + return; + } + final java.util.List${database.filterGenericsString(${reffererEntityLongClassName})} ls = new java.util.ArrayList${database.filterGenericsString(${reffererEntityLongClassName})}(); + ls.add(entity); + ${reffererVariableName} = ls; + } + + /** + * Has relation of ${refferer.reffererPropertyNameAsOne}. + * + * @return Determination. + */ + public boolean hasRelation${refferer.reffererPropertyNameInitCapAsOne}() { + return get${refferer.reffererPropertyNameInitCapAsOne}() != null && get${refferer.reffererPropertyNameInitCapAsOne}().hasPrimaryKeyValue(); + } + #end +#end + + // =================================================================================== + // Accept + // ====== + /** + * ${database.ImplementComment} + * + * @param primaryKeyMap Primary key map. (NotNull and NotEmpty) + * @deprecated Please use ${myDBMetaClassName}.getInstance().acceptPrimaryKeyMap(entity, primaryKeyMap); + */ + public void acceptPrimaryKeyMap(java.util.Map${database.filterGenericsString('String, ? extends Object')} primaryKeyMap) { + getDBMeta().acceptPrimaryKeyMap(this, primaryKeyMap); + } + + /** + * ${database.ImplementComment} + * + * @param primaryKeyMapString Primary-key map-string. (NotNull and NotEmpty) + * @deprecated Please use ${myDBMetaClassName}.getInstance().acceptPrimaryKeyMapString(entity, primaryKeyMapString); + */ + public void acceptPrimaryKeyMapString(String primaryKeyMapString) { + getDBMeta().acceptPrimaryKeyMapString(this, primaryKeyMapString); + } + + /** + * ${database.ImplementComment} + * + * @param columnValueMap Column-value map. (NotNull and NotEmpty) + * @deprecated Please use ${myDBMetaClassName}.getInstance().acceptColumnValueMap(entity, columnValueMap); + */ + public void acceptColumnValueMap(java.util.Map${database.filterGenericsString('String, ? extends Object')} columnValueMap) { + getDBMeta().acceptColumnValueMap(this, columnValueMap); + } + + /** + * ${database.ImplementComment} + * + * @param columnValueMapString Column-value map-string. (NotNull and NotEmpty) + * @deprecated Please use ${myDBMetaClassName}.getInstance().acceptColumnValueMap(entity, columnValueMapString); + */ + public void acceptColumnValueMapString(String columnValueMapString) { + getDBMeta().acceptColumnValueMapString(this, columnValueMapString); + } + + // =================================================================================== + // Extract + // ======= + /** + * ${database.ImplementComment} + * + * @return Primary-key map-string. (NotNull) + * @deprecated Please use ${myDBMetaClassName}.getInstance().extractPrimaryKeyMapString(entity); + */ + public String extractPrimaryKeyMapString() { + return getDBMeta().extractPrimaryKeyMapString(this); + } + + /** + * Extract primary-key map-string. + * + * @param startBrace Start-brace. (NotNull) + * @param endBrace End-brace. (NotNull) + * @param delimiter Delimiter. (NotNull) + * @param equal Equal. (NotNull) + * @return Primary-key map-string. (NotNull) + * @deprecated Please use ${myDBMetaClassName}.getInstance().extractPrimaryKeyMapString(entity, startBrace, endBrace, delimiter, equal); + */ + public String extractPrimaryKeyMapString(String startBrace, String endBrace, String delimiter, String equal) { + return getDBMeta().extractPrimaryKeyMapString(this, startBrace, endBrace, delimiter, equal); + } + + /** + * ${database.ImplementComment} + * + * @return Column-value map-string. (NotNull) + * @deprecated Please use ${myDBMetaClassName}.getInstance().extractColumnValueMapString(entity); + */ + public String extractColumnValueMapString() { + return getDBMeta().extractColumnValueMapString(this); + } + + /** + * Extract column-value map-string. + * + * @param startBrace Start-brace. (NotNull) + * @param endBrace End-brace. (NotNull) + * @param delimiter Delimiter. (NotNull) + * @param equal Equal. (NotNull) + * @return Column-value map-string. (NotNull) + * @deprecated Please use ${myDBMetaClassName}.getInstance().extractColumnValueMapString(entity, startBrace, endBrace, delimiter, equal); + */ + public String extractColumnValueMapString(String startBrace, String endBrace, String delimiter, String equal) { + return getDBMeta().extractColumnValueMapString(this, startBrace, endBrace, delimiter, equal); + } + +#if (${table.hasAllCommonColumn()}) + + /** + * ${database.ImplementComment} + * + * @return Column-value map-string. (NotNull) + * @deprecated Please use ${myDBMetaClassName}.getInstance().extractCommonColumnValueMapString(entity); + */ + public String extractCommonColumnValueMapString() { + return getDBMeta().extractCommonColumnValueMapString(this); + } + + /** + * Extract common-column-value map-string. + * + * @param startBrace Start-brace. (NotNull) + * @param endBrace End-brace. (NotNull) + * @param delimiter Delimiter. (NotNull) + * @param equal Equal. (NotNull) + * @return Common-column-value map-string. (NotNull) + * @deprecated Please use ${myDBMetaClassName}.getInstance().extractCommonColumnValueMapString(entity, startBrace, endBrace, delimiter, equal); + */ + public String extractCommonColumnValueMapString(String startBrace, String endBrace, String delimiter, String equal) { + return getDBMeta().extractCommonColumnValueMapString(this, startBrace, endBrace, delimiter, equal); + } +#end + + // =================================================================================== + // Determination + // ============= + /** + * ${database.ImplementComment} + * + * @return Determination. + */ + public boolean hasPrimaryKeyValue() { + +#foreach ($col in $table.PrimaryKey) + if (_${col.UncapitalisedJavaName} == null) { + return false; + } +#end + + return true; + } + + // =================================================================================== + // Modified Properties + // =================== + /** + * Get modified property names. (S2Dao uses this for updateModifiedProperties()) + * + * @return Modified property names. (NotNull) + */ + public java.util.Set${database.filterGenericsString('String')} getModifiedPropertyNames() { + return _modifiedProperties.getPropertyNames(); + } + + /** + * New entity modified properties. You can override this at the sub-class if you need it. + * + * @return Entity modified properties. (NotNull) + */ + protected EntityModifiedProperties newEntityModifiedProperties() { + return new EntityModifiedProperties(); + } + + /** + * Clear modified property names. + */ + public void clearModifiedPropertyNames() { + _modifiedProperties.clear(); + } + + // =================================================================================== + // Basic Override + // ============== +#if ($table.hasPrimaryKey()) + + /** + * ${database.OverrideComment} + * If the primary-key of the other is same as this one, returns true. + * + * @param other Other entity. + * @return Comparing result. + */ + public boolean equals(Object other) { + if (other == null) { + return false; + } + if (!(other instanceof $myClassName)) { + return false; + } + final $myClassName otherEntity = ($myClassName)other; + +#foreach ($col in $table.PrimaryKey) + if (get${col.JavaName}() == null || !get${col.JavaName}().equals(otherEntity.get${col.JavaName}())) { + return false; + } +#end + + return true; + } + + /** + * ${database.OverrideComment} + * Calculates hash-code from primary-key. + * + * @return Hash-code from primary-keys. + */ + public int hashCode() { + int result = 0; + +#foreach ($col in $table.PrimaryKey) + if (this.get${col.JavaName}() != null) { + result = result + get${col.JavaName}().hashCode(); + } +#end + + return result; + } +#else + + /** + * ${database.OverrideComment} + * If the all-column value of the other is same as this one, returns true. + * + * @param other Other entity. (Nullable) + * @return Comparing result. If other is null, returns false. + */ + public boolean equals(Object other) { + if (other == null) { + return false; + } + if (!(other instanceof $myClassName)) { + return false; + } + final $myClassName otherEntity = ($myClassName)other; + +#foreach ($col in $table.Columns) + if (get${col.JavaName}() == null || !get${col.JavaName}().equals(otherEntity.get${col.JavaName}())) { + return false; + } +#end + + return true; + } + + /** + * ${database.OverrideComment} + * Calculates hash-code from all-columns. + * + * @return Hash-code from all-columns. + */ + public int hashCode() { + int result = 0; + +#foreach ($col in $table.Columns) + if (this.get${col.JavaName}() != null) { + result = result + this.get${col.JavaName}().hashCode(); + } +#end + + return result; + } +#end + + /** + * ${database.OverrideComment} + * + * @return Column-value map-string. (NotNull) + */ + public String toString() { + final String delimiter = ","; + final StringBuffer sb = new StringBuffer(); + +#foreach ($col in $table.Columns) + sb.append(delimiter).append(get${col.JavaName}()); +#end + + sb.delete(0, delimiter.length()); + sb.insert(0, "{").append("}"); + return sb.toString(); + } +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/bsentity/PlainBaseEntity.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/bsentity/PlainBaseEntity.vm 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/bsentity/PlainBaseEntity.vm 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,157 @@ +package ${myBaseEntityPackageName}; +#set ($myClassName = "${myBaseObjectClassName}") + +/** + * The entity of ${table.Name}. + * + * @author ${database.ClassAuthor} + */ +public class ${myClassName} implements java.io.Serializable { + + /** Serial version UID. (Default) */ + private static final long serialVersionUID = 1L; + + // =================================================================================== + // Attribute + // ========= +#foreach ($col in $table.Columns) + + /** The value of ${col.UncapitalisedJavaName}. */ + protected ${col.JavaNative} _${col.UncapitalisedJavaName}; +#end + + // =================================================================================== + // Accessor + // ======== +#foreach ($col in $table.Columns) + + /** + * Get the value of ${col.UncapitalisedJavaName}. + * + * @return The value of ${col.UncapitalisedJavaName}. (Nullable) + */ + public ${col.JavaNative} get${col.JavaName}() { + return _${col.UncapitalisedJavaName}; + } + + /** + * Set the value of ${col.UncapitalisedJavaName}. + * + * @param ${col.UncapitalisedJavaName} The value of ${col.UncapitalisedJavaName}. (Nullable) + */ + public void set${col.JavaName}(${col.JavaNative} ${col.UncapitalisedJavaName}) { + _${col.UncapitalisedJavaName} = ${col.UncapitalisedJavaName}; + } +#end + + // =================================================================================== + // Basic Override + // ============== +#if ($table.hasPrimaryKey()) + + /** + * ${database.OverrideComment} + * If the primary-key of the other is same as this one, returns true. + * + * @param other Other entity. + * @return Comparing result. + */ + public boolean equals(Object other) { + if (other == null) { + return false; + } + if (!(other instanceof $myClassName)) { + return false; + } + final $myClassName otherEntity = ($myClassName)other; + #foreach ($col in $table.PrimaryKey) + + if (get${col.JavaName}() == null || !get${col.JavaName}().equals(otherEntity.get${col.JavaName}())) { + return false; + } + #end + + return true; + } + + /** + * ${database.OverrideComment} + * Calculates hash-code from primary-key. + * + * @return Hash-code from primary-keys. + */ + public int hashCode() { + int result = 0; + #foreach ($col in $table.PrimaryKey) + + if (this.get${col.JavaName}() != null) { + result = result + get${col.JavaName}().hashCode(); + } + #end + + return result; + } +#else + + /** + * ${database.OverrideComment} + * If the all-column value of the other is same as this one, returns true. + * + * @param other Other entity. (Nullable) + * @return Comparing result. If other is null, returns false. + */ + public boolean equals(Object other) { + if (other == null) { + return false; + } + if (!(other instanceof $myClassName)) { + return false; + } + final $myClassName otherEntity = ($myClassName)other; + #foreach ($col in $table.Columns) + + if (get${col.JavaName}() == null || !get${col.JavaName}().equals(otherEntity.get${col.JavaName}())) { + return false; + } + #end + + return true; + } + + /** + * ${database.OverrideComment} + * Calculates hash-code from all-columns. + * + * @return Hash-code from all-columns. + */ + public int hashCode() { + int result = 0; + #foreach ($col in $table.Columns) + + if (this.get${col.JavaName}() != null) { + result = result + this.get${col.JavaName}().hashCode(); + } + #end + + return result; + } +#end + + /** + * ${database.OverrideComment} + * + * @return Column-value map-string. (NotNull) + */ + public String toString() { + final String delimiter = ","; + final StringBuffer sb = new StringBuffer(); +#foreach ($col in $table.Columns) + + sb.append(delimiter).append(get${col.JavaName}()); +#end + + sb.delete(0, delimiter.length()); + sb.insert(0, "{").append("}"); + return sb.toString(); + } +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/bsentity/dbmeta/DBMetaImpl.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/bsentity/dbmeta/DBMetaImpl.vm 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/bsentity/dbmeta/DBMetaImpl.vm 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,989 @@ +package ${myDBMetaPackageName}; + +#set ($myClassName = "${myDBMetaClassName}") + +import ${glPackageBaseCommon}.${glEntityInterfaceName}; +import ${glPackageBaseCommonDBMeta}.${glDBMetaInterfaceName}; +import ${glPackageBaseCommonDBMeta}.${glDBMetaAbstractName}; +import ${myExtendedEntityPackageName}.${myExtendedObjectClassName}; + +/** + * The dbmeta of ${table.Name}. (Singleton) + * + *
+ * [primary-key]
+ *     ${table.PrimaryKeyNameCommaString}
+ * 
+ * [column-property]
+ *     ${table.ColumnNameCommaString}
+ * 
+ * [foreign-property]
+ *     ${table.ForeignPropertyNameCommaString}
+ * 
+ * [refferer-property]
+ *     ${table.ReferrerPropertyNameCommaString}
+ * 
+ * [sequence]
+ *     ${table.DefinedSequenceName}
+ * 
+ * [identity]
+ *     ${table.IdentityPropertyName}
+ * 
+ * [update-date]
+ *     ${table.UpdateDateJavaName}
+ * 
+ * [version-no]
+ *     ${table.VersionNoJavaName}
+ * 
+ * 
+ * + * @author ${database.ClassAuthor} + */ +public class ${myClassName} extends ${glDBMetaAbstractName} { + + // =================================================================================== + // Definition + // ========== + /** The type of entity. */ + protected static final Class ENTITY_TYPE = ${myExtendedObjectClassName}.class; + + /** Singleton instance. */ + private static final ${myClassName} _instance = new ${myClassName}(); + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + private ${myClassName}() { + } + + // =================================================================================== + // Singleton + // ========= + /** + * Get instance. + * + * @return Singleton instance. (NotNull) + */ + public static ${myClassName} getInstance() { + return _instance; + } + + // =================================================================================== + // Name Definition + // =============== + /** Table db name. */ + public static final String TABLE_DB_NAME = "$table.Name"; + + /** Table cap-prop name. */ + public static final String TABLE_CAP_PROP_NAME = "$table.JavaName"; + + /** Table uncap-prop name. */ + public static final String TABLE_UNCAP_PROP_NAME = "$table.UncapitalisedJavaName"; + +#foreach ($col in $table.Columns) + /** Db-name of ${col.JavaName}. */ + public static final String COLUMN_DB_NAME_OF_${col.JavaName} = "$col.Name"; +#end + +#foreach ($col in $table.Columns) + /** Cap-prop-name of ${col.JavaName}. */ + public static final String COLUMN_CAP_PROP_NAME_OF_${col.JavaName} = "$col.JavaName"; +#end + +#foreach ($foreignKeys in $table.ForeignKeys) + /** Cap-prop-name of ${foreignKeys.ForeignPropertyName}. */ + public static final String COLUMN_CAP_PROP_NAME_OF_${foreignKeys.foreignPropertyNameInitCap} = "$foreignKeys.ForeignPropertyNameInitCap"; +#end + +#foreach ($children in $table.Referrers) + /** Cap-prop-name of ${children.ReffererPropertyNameInitCap}. */ + public static final String COLUMN_CAP_PROP_NAME_OF_${children.ReffererPropertyNameInitCap} = "$children.ReffererPropertyNameInitCap"; +#end + +#foreach ($col in $table.Columns) + /** Uncap-prop-name of ${col.JavaName}. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_${col.JavaName} = "$col.UncapitalisedJavaName"; +#end + +#foreach ($foreignKeys in $table.ForeignKeys) + /** Uncap-prop-name of ${foreignKeys.ForeignPropertyName}. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_${foreignKeys.foreignPropertyNameInitCap} = "$foreignKeys.ForeignPropertyName"; +#end + +#foreach ($children in $table.Referrers) + /** Uncap-prop-name of ${children.ReffererPropertyName}. */ + public static final String COLUMN_UNCAP_PROP_NAME_OF_${children.ReffererPropertyNameInitCap} = "$children.ReffererPropertyName"; +#end + + /** {db-name : cap-prop-name} map. */ + private static java.util.Map${database.filterGenericsString('String, String')} _dbNameCapPropNameMap; + protected static java.util.Map${database.filterGenericsString('String, String')} createDbNameCapPropNameMap() { + if (_dbNameCapPropNameMap != null) { + return _dbNameCapPropNameMap; + } + final java.util.Map${database.filterGenericsString('String, String')} map = new java.util.LinkedHashMap${database.filterGenericsString('String, String')}(); + map.put(TABLE_DB_NAME, TABLE_CAP_PROP_NAME); + +#foreach ($col in $table.Columns) + map.put(COLUMN_DB_NAME_OF_${col.JavaName}, COLUMN_CAP_PROP_NAME_OF_${col.JavaName}); +#end + + _dbNameCapPropNameMap = java.util.Collections.unmodifiableMap(map); + return _dbNameCapPropNameMap; + } + + /** {db-name : uncap-prop-name} map. */ + private static java.util.Map${database.filterGenericsString('String, String')} _dbNameUncapPropNameMap; + protected static java.util.Map${database.filterGenericsString('String, String')} createDbNameUncapPropNameMap() { + if (_dbNameUncapPropNameMap != null) { + return _dbNameUncapPropNameMap; + } + final java.util.Map${database.filterGenericsString('String, String')} map = new java.util.LinkedHashMap${database.filterGenericsString('String, String')}(); + map.put(TABLE_DB_NAME, TABLE_UNCAP_PROP_NAME); + +#foreach ($col in $table.Columns) + map.put(COLUMN_DB_NAME_OF_${col.JavaName}, COLUMN_UNCAP_PROP_NAME_OF_${col.JavaName}); +#end + + _dbNameUncapPropNameMap = java.util.Collections.unmodifiableMap(map); + return _dbNameUncapPropNameMap; + } + + /** {cap-prop-name : db-name} map. */ + private static java.util.Map${database.filterGenericsString('String, String')} _capPropNameDbNameMap; + protected static java.util.Map${database.filterGenericsString('String, String')} createCapPropNameDbNameMap() { + if (_capPropNameDbNameMap != null) { + return _capPropNameDbNameMap; + } + final java.util.Map${database.filterGenericsString('String, String')} map = new java.util.LinkedHashMap${database.filterGenericsString('String, String')}(); + map.put(TABLE_CAP_PROP_NAME, TABLE_DB_NAME); + +#foreach ($col in $table.Columns) + map.put(COLUMN_CAP_PROP_NAME_OF_${col.JavaName}, COLUMN_DB_NAME_OF_${col.JavaName}); +#end + + _capPropNameDbNameMap = java.util.Collections.unmodifiableMap(map); + return _capPropNameDbNameMap; + } + + /** {cap-prop-name : uncap-prop-name} map. */ + private static java.util.Map${database.filterGenericsString('String, String')} _capPropNameUncapPropNameMap; + protected static java.util.Map${database.filterGenericsString('String, String')} createCapPropNameUncapPropNameMap() { + if (_capPropNameUncapPropNameMap != null) { + return _capPropNameUncapPropNameMap; + } + final java.util.Map${database.filterGenericsString('String, String')} map = new java.util.LinkedHashMap${database.filterGenericsString('String, String')}(); + map.put(TABLE_CAP_PROP_NAME, TABLE_UNCAP_PROP_NAME); + +#foreach ($col in $table.Columns) + map.put(COLUMN_CAP_PROP_NAME_OF_${col.JavaName}, COLUMN_UNCAP_PROP_NAME_OF_${col.JavaName}); +#end + + _capPropNameUncapPropNameMap = java.util.Collections.unmodifiableMap(map); + return _capPropNameUncapPropNameMap; + } + + /** {uncap-prop-name : db-name} map. */ + private static java.util.Map${database.filterGenericsString('String, String')} _uncapPropNameDbNameMap; + protected static java.util.Map${database.filterGenericsString('String, String')} createUncapPropNameDbNameMap() { + if (_uncapPropNameDbNameMap != null) { + return _uncapPropNameDbNameMap; + } + final java.util.Map${database.filterGenericsString('String, String')} map = new java.util.LinkedHashMap${database.filterGenericsString('String, String')}(); + map.put(TABLE_UNCAP_PROP_NAME, TABLE_DB_NAME); + +#foreach ($col in $table.Columns) + map.put(COLUMN_UNCAP_PROP_NAME_OF_${col.JavaName}, COLUMN_DB_NAME_OF_${col.JavaName}); +#end + + _uncapPropNameDbNameMap = java.util.Collections.unmodifiableMap(map); + return _uncapPropNameDbNameMap; + } + + /** {uncap-prop-name : cap-prop-name} map. */ + private static java.util.Map${database.filterGenericsString('String, String')} _uncapPropNameCapPropNameMap; + protected static java.util.Map${database.filterGenericsString('String, String')} createUncapPropNameCapPropNameMap() { + if (_uncapPropNameCapPropNameMap != null) { + return _uncapPropNameCapPropNameMap; + } + final java.util.Map${database.filterGenericsString('String, String')} map = new java.util.LinkedHashMap${database.filterGenericsString('String, String')}(); + map.put(TABLE_UNCAP_PROP_NAME, TABLE_CAP_PROP_NAME); + +#foreach ($col in $table.Columns) + map.put(COLUMN_UNCAP_PROP_NAME_OF_${col.JavaName}, COLUMN_CAP_PROP_NAME_OF_${col.JavaName}); +#end + + _uncapPropNameCapPropNameMap = java.util.Collections.unmodifiableMap(map); + return _uncapPropNameCapPropNameMap; + } + + // =================================================================================== + // Name-Map + // ======== + /** + * ${database.ImplementComment} + * + * @return {db-name : cap-prop-name} map. + */ + public java.util.Map${database.filterGenericsString('String, String')} getDbNameCapPropNameMap() { + return createDbNameCapPropNameMap(); + } + + /** + * ${database.ImplementComment} + * + * @return {db-name : uncap-prop-name} map. + */ + public java.util.Map${database.filterGenericsString('String, String')} getDbNameUncapPropNameMap() { + return createDbNameUncapPropNameMap(); + } + + /** + * ${database.ImplementComment} + * + * @return {cap-prop-name : db-name} map. + */ + public java.util.Map${database.filterGenericsString('String, String')} getCapPropNameDbNameMap() { + return createCapPropNameDbNameMap(); + } + + /** + * ${database.ImplementComment} + * + * @return {cap-prop-name : uncap-prop-name} map. + */ + public java.util.Map${database.filterGenericsString('String, String')} getCapPropNameUncapPropNameMap() { + return createCapPropNameUncapPropNameMap(); + } + + /** + * ${database.ImplementComment} + * + * @return {uncap-prop-name : db-name} map. + */ + public java.util.Map${database.filterGenericsString('String, String')} getUncapPropNameDbNameMap() { + return createUncapPropNameDbNameMap(); + } + + /** + * ${database.ImplementComment} + * + * @return {uncap-prop-name : cap-prop-name} map. + */ + public java.util.Map${database.filterGenericsString('String, String')} getUncapPropNameCapPropNameMap() { + return createUncapPropNameCapPropNameMap(); + } + + // =================================================================================== + // Table Name + // ========== + /** + * ${database.ImplementComment} + * + * @return Table db-name. (NotNull) + */ + public String getTableDbName() { + return TABLE_DB_NAME; + } + + /** + * ${database.ImplementComment} + * + * @return Table cap-prop-name. (NotNull) + */ + public String getTableCapPropName() { + return TABLE_CAP_PROP_NAME; + } + + /** + * ${database.ImplementComment} + * + * @return Table property-name. (NotNull) + */ + public String getTableUncapPropName() { + return TABLE_UNCAP_PROP_NAME; + } + + // =================================================================================== + // Column Name + // =========== + public java.util.List${database.filterGenericsString('String')} getColumnDbNameList() { + final String[] columns = getColumnDbNameCommaString().split(","); + final java.util.List${database.filterGenericsString('String')} resultList = new java.util.ArrayList${database.filterGenericsString('String')}(); + for (int i=0; i < columns.length; i++) { + resultList.add(columns[i].trim()); + } + return resultList; + } + + public java.util.List${database.filterGenericsString('String')} getColumnCapPropNameList() { + final java.util.List${database.filterGenericsString('String')} columnDbNameList = getColumnDbNameList(); + final java.util.List${database.filterGenericsString('String')} resultList = new java.util.ArrayList${database.filterGenericsString('String')}(); + for (final java.util.Iterator ite = columnDbNameList.iterator(); ite.hasNext(); ) { + resultList.add(getDbNameCapPropNameMap().get((String)ite.next())); + } + return resultList; + } + + public java.util.List${database.filterGenericsString('String')} getColumnUncapPropNameList() { + final java.util.List${database.filterGenericsString('String')} columnDbNameList = getColumnDbNameList(); + final java.util.List${database.filterGenericsString('String')} resultList = new java.util.ArrayList${database.filterGenericsString('String')}(); + for (final java.util.Iterator ite = columnDbNameList.iterator(); ite.hasNext(); ) { + resultList.add(getDbNameUncapPropNameMap().get((String)ite.next())); + } + return resultList; + } + + /** + * ${database.ImplementComment} + * + * @return Column-db-name comma-string. (NotNull) + */ + public String getColumnDbNameCommaString() { + return "${table.columnNameCommaString}"; + } + + // =================================================================================== + // Type Name + // ========= + /** + * ${database.ImplementComment} + * + * @return The type-name of entity. (NotNull) + */ + public String getEntityTypeName() { + return "${myExtendedEntityPackageName}.${myExtendedObjectClassName}"; + } +#if ($isExistConditionBean) + + /** + * ${database.ImplementComment} + * + * @return The type-name of condition-bean. (NotNull) + */ + public String getConditionBeanTypeName() { + return "${glPackageBaseCB}.${myConditionBeanClassName}"; + } +#else + + /** + * ${database.ImplementComment} + * + * @return The type-name of condition-bean. (Nullable: If the condition-bean does not exist) + */ + public String getConditionBeanTypeName() { + return null; + } +#end +#if ($isExistDao) + + /** + * ${database.ImplementComment} + * + * @return The type-name of dao. (NotNull) + */ + public String getDaoTypeName() { + return "${myExtendedDaoPackageName}.${myExtendedDaoClassName}"; + } +#else + + /** + * ${database.ImplementComment} + * + * @return The type-name of dao. (Nullable: If the dao does not exist) + */ + public String getDaoTypeName() { + return null; + } +#end +#if ($isExistBehavior) + + /** + * ${database.ImplementComment} + * + * @return The type-name of behavior. (NotNull) + */ + public String getBehaviorTypeName() { + return "${myExtendedBhvPackageName}.${myExtendedBhvClassName}"; + } +#else + + /** + * ${database.ImplementComment} + * + * @return The type-name of behavior. (Nullable: If the behavior does not exist) + */ + public String getBehaviorTypeName() { + return null; + } +#end + + // =================================================================================== + // Type + // ==== + /** + * ${database.ImplementComment} + * + * @return The type of entity. (NotNull) + */ + public Class getEntityType() { + return ENTITY_TYPE; + } + + // =================================================================================== + // Instance + // ======== + /** + * ${database.ImplementComment} + * + * @return The type of entity. (NotNull) + */ + public ${glEntityInterfaceName} newEntity() { + return newMyEntity(); + } + + /** + * New the instance of my entity. + * + * @return The instance of my entity. (NotNull) + */ + public ${myExtendedObjectClassName} newMyEntity() { + return new ${myExtendedObjectClassName}(); + } + + // =================================================================================== + // Foreign DBMeta + // ============== + /** + * ${database.ImplementComment} + * + * @param foreignPropertyName Foreign-property-name(Both OK - InitCap or not). (NotNull) + * @return Foreign DBMeta. (NotNull) + */ + public ${glDBMetaInterfaceName} getForeignDBMeta(String foreignPropertyName) { + assertStringNotNullAndNotTrimmedEmpty("foreignPropertyName", foreignPropertyName); + final String methodName = "getForeignDBMeta_" + foreignPropertyName.substring(0, 1) + foreignPropertyName.substring(1); + + java.lang.reflect.Method method = null; + try { + method = this.getClass().getMethod(methodName, new Class[]{}); + } catch (NoSuchMethodException e) { + String msg = "The foreignPropertyName is not found: foreignPropertyName=" + foreignPropertyName; + msg = msg + " tableName=" + TABLE_DB_NAME + " methodName=" + methodName; + throw new RuntimeException(msg, e); + } + try { + return (${glDBMetaInterfaceName})method.invoke(this, new Object[]{}); + } catch (IllegalAccessException e) { + throw new RuntimeException(e); + } catch (java.lang.reflect.InvocationTargetException e) { + throw new RuntimeException(e.getCause()); + } + } +#foreach ($foreignKeys in $table.ForeignKeys) + + /** + * Get foreign dbmeta of ${foreignKeys.foreignPropertyNameInitCap}. + * + * @return Foreign DBMeta. (NotNull) + */ + public ${glProjectPrefix}${foreignKeys.ForeignTable.JavaName}Dbm getForeignDBMeta_${foreignKeys.foreignPropertyNameInitCap}() { + return ${glProjectPrefix}${foreignKeys.ForeignTable.JavaName}Dbm.getInstance(); + } +#end +#foreach ($refferer in $table.Referrers) + #set ($reffererTable = $refferer.Table) + #set ($reffererEntityClassName = "${glProjectPrefix}${reffererTable.JavaName}") + #set ($reffererDaoClassName = "${reffererEntityClassName}Dao") + #set ($reffererCBClassName = "${reffererEntityClassName}${glConditionBeanInitialName}") + #set ($reffererVariableName = "${glChildrenVariablePrefix}${refferer.ReffererPropertyNameInitCap}") + #set ($reffererEntityLongClassName = "${glPackageExtendedEntity}.${reffererEntityClassName}") + #if (${refferer.isOneToOne()}) + + /** + * Get foreign dbmeta of ${refferer.reffererPropertyNameInitCapAsOne}. + * + * @return Foreign DBMeta. (NotNull) + */ + public ${glProjectPrefix}${refferer.Table.JavaName}Dbm getForeignDBMeta_${refferer.reffererPropertyNameInitCapAsOne}() { + return ${glProjectPrefix}${refferer.Table.JavaName}Dbm.getInstance(); + } + #end +#end + + // =================================================================================== + // Determination + // ============= + /** + * ${database.ImplementComment} + * + * @return Determination. + */ + public boolean hasTwoOrMorePrimaryKeys() { + return ${table.hasTwoOrMorePrimaryKeys()}; + } + + /** + * ${database.ImplementComment} + * + * @return Determination. + */ + public boolean hasCommonColumn() { + return ${table.hasAllCommonColumn()}; + } + + // =================================================================================== + // Entity Handling + // =============== +#if ($database.isAvailableGenerics()) + // ----------------------------------------------------- + // Accept + // ------ + /** + * ${database.ImplementComment} + * + * @param entity Target entity. (NotNull) + * @param primaryKeyMap Primary key map. (NotNull and NotEmpty) + */ + public void acceptPrimaryKeyMap(${glEntityInterfaceName} entity, java.util.Map${database.filterGenericsString('String, ? extends Object')} primaryKeyMap) { +#if ($table.hasPrimaryKey()) + final ${myExtendedObjectClassName} myEntity = (${myExtendedObjectClassName})entity; + MapAssertUtil.assertPrimaryKeyMapNotNullAndNotEmpty(primaryKeyMap); + final MapStringValueAnalyzer analyzer = new MapStringValueAnalyzer(primaryKeyMap, entity.getModifiedPropertyNames()); + +#foreach ($col in $table.primaryKey) + MapAssertUtil.assertColumnExistingInPrimaryKeyMap(primaryKeyMap, "${col.Name}"); +#if ($col.isJavaNativeStringObject()) + if (analyzer.init("${col.Name}", "${col.UncapitalisedJavaName}", "${col.JavaBeansRulePropertyName}")) { myEntity.set${col.javaName}(analyzer.analyzeString(${col.JavaNative}.class)); }; +#end +#if ($col.isJavaNativeNumberObject()) + if (analyzer.init("${col.Name}", "${col.UncapitalisedJavaName}", "${col.JavaBeansRulePropertyName}")) { myEntity.set${col.javaName}(analyzer.analyzeNumber(${col.JavaNative}.class)); }; +#end +#if ($col.isJavaNativeDateObject()) + if (analyzer.init("${col.Name}", "${col.UncapitalisedJavaName}", "${col.JavaBeansRulePropertyName}")) { myEntity.set${col.javaName}(analyzer.analyzeDate(${col.JavaNative}.class)); }; +#end +#if (!$col.isJavaNativeStringObject() && !$col.isJavaNativeNumberObject() && !$col.isJavaNativeDateObject()) + if (analyzer.init("${col.Name}", "${col.UncapitalisedJavaName}", "${col.JavaBeansRulePropertyName}")) { myEntity.set${col.javaName}(analyzer.analyzeOther(${col.JavaNative}.class)); }; +#end +#end + +#else + + String msg = "This table has no primary-keys: " + getTableDbName(); + throw new IllegalStateException(msg); +#end + + } +#else + // ----------------------------------------------------- + // Accept + // ------ + /** + * ${database.ImplementComment} + * + * @param entity Target entity. (NotNull) + * @param primaryKeyMap Primary key map. (NotNull and NotEmpty) + */ + public void acceptPrimaryKeyMap(${glEntityInterfaceName} entity, java.util.Map${database.filterGenericsString('String, ? extends Object')} primaryKeyMap) { +#if ($table.hasPrimaryKey()) + final ${myExtendedObjectClassName} myEntity = (${myExtendedObjectClassName})entity; + MapAssertUtil.assertPrimaryKeyMapNotNullAndNotEmpty(primaryKeyMap); + #foreach ($col in $table.PrimaryKey) + + MapAssertUtil.assertColumnExistingInPrimaryKeyMap(primaryKeyMap, "${col.Name}"); + { + final Object obj = primaryKeyMap.get("${col.Name}"); + if (obj == null) { + myEntity.set${col.JavaName}(null); entity.getModifiedPropertyNames().remove("${col.JavaBeansRulePropertyName}"); + } else { + #if ($col.isJavaNativeStringObject()) + + helpCheckingTypeString(obj, "${col.UncapitalisedJavaName}", "${col.JavaNative}"); + myEntity.set${col.JavaName}((String)obj); + } + } + #else + #if ($col.isJavaNativeDateObject()) + + if (obj instanceof ${col.JavaNative}) { + myEntity.set${col.JavaName}((${col.JavaNative})obj); + } else { + myEntity.set${col.JavaName}(new ${col.JavaNative}(helpParsingDateString(obj, "${col.UncapitalisedJavaName}", "${col.JavaNative}"))); + } + } + } + #else + #if (${col.isJavaNativeBinaryObject()}) + + if (obj instanceof ${col.JavaNative}) { + myEntity.set${col.JavaName}((${col.JavaNative})obj); + } else { + myEntity.set${col.JavaName}(null);// Binary as String is out of target. + } + } + } + #else + + if (obj instanceof ${col.JavaNative}) { + myEntity.set${col.JavaName}((${col.JavaNative})obj); + } else { + try { + myEntity.set${col.JavaName}(new ${col.JavaNative}((String)obj)); + } catch (RuntimeException e) { + String msg = "entity.set${col.JavaName}(new ${col.JavaNative}((String)obj))"; + throw new RuntimeException(msg + " threw the exception: value=[" + obj + "]", e); + } + } + } + } + #end + #end + #end + #end +#else + + String msg = "This table has no primary-keys: " + getTableDbName(); + throw new IllegalStateException(msg); +#end + + } +#end + + /** + * ${database.ImplementComment} + * + * @param entity Target entity. (NotNull) + * @param primaryKeyMapString Primary-key map-string. (NotNull and NotEmpty) + */ + public void acceptPrimaryKeyMapString(${glEntityInterfaceName} entity, String primaryKeyMapString) { + MapStringUtil.acceptPrimaryKeyMapString(primaryKeyMapString, entity); + } + +#if ($database.isAvailableGenerics()) + /** + * ${database.ImplementComment} + * + * @param entity Target entity. (NotNull) + * @param columnValueMap Column-value map. (NotNull and NotEmpty) + */ + public void acceptColumnValueMap(${glEntityInterfaceName} entity, java.util.Map${database.filterGenericsString('String, ? extends Object')} columnValueMap) { + final ${myExtendedObjectClassName} myEntity = (${myExtendedObjectClassName})entity; + MapAssertUtil.assertColumnValueMapNotNullAndNotEmpty(columnValueMap); + final MapStringValueAnalyzer analyzer = new MapStringValueAnalyzer(columnValueMap, entity.getModifiedPropertyNames()); + +#foreach ($col in $table.columns) +#if ($col.isJavaNativeStringObject()) + if (analyzer.init("${col.Name}", "${col.UncapitalisedJavaName}", "${col.JavaBeansRulePropertyName}")) { myEntity.set${col.javaName}(analyzer.analyzeString(${col.JavaNative}.class)); }; +#end +#if ($col.isJavaNativeNumberObject()) + if (analyzer.init("${col.Name}", "${col.UncapitalisedJavaName}", "${col.JavaBeansRulePropertyName}")) { myEntity.set${col.javaName}(analyzer.analyzeNumber(${col.JavaNative}.class)); }; +#end +#if ($col.isJavaNativeDateObject()) + if (analyzer.init("${col.Name}", "${col.UncapitalisedJavaName}", "${col.JavaBeansRulePropertyName}")) { myEntity.set${col.javaName}(analyzer.analyzeDate(${col.JavaNative}.class)); }; +#end +#if (!$col.isJavaNativeStringObject() && !$col.isJavaNativeNumberObject() && !$col.isJavaNativeDateObject()) + if (analyzer.init("${col.Name}", "${col.UncapitalisedJavaName}", "${col.JavaBeansRulePropertyName}")) { myEntity.set${col.javaName}(analyzer.analyzeOther(${col.JavaNative}.class)); }; +#end +#end + + } + +#else + /** + * ${database.ImplementComment} + * + * @param entity Target entity. (NotNull) + * @param columnValueMap Column-value map. (NotNull and NotEmpty) + */ + public void acceptColumnValueMap(${glEntityInterfaceName} entity, java.util.Map${database.filterGenericsString('String, ? extends Object')} columnValueMap) { + final ${myExtendedObjectClassName} myEntity = (${myExtendedObjectClassName})entity; + MapAssertUtil.assertColumnValueMapNotNullAndNotEmpty(columnValueMap); + #foreach ($col in $table.columns) + + { + final Object obj = columnValueMap.get("${col.Name}"); + if (obj == null) { + myEntity.set${col.JavaName}(null); entity.getModifiedPropertyNames().remove("${col.JavaBeansRulePropertyName}"); + } else { + #if ($col.isJavaNativeStringObject()) + + helpCheckingTypeString(obj, "${col.UncapitalisedJavaName}", "${col.JavaNative}"); + myEntity.set${col.JavaName}((String)obj); + } + } + #else + #if ($col.isJavaNativeDateObject()) + + if (obj instanceof ${col.JavaNative}) { + myEntity.set${col.JavaName}((${col.JavaNative})obj); + } else { + myEntity.set${col.JavaName}(new ${col.JavaNative}(helpParsingDateString(obj, "${col.UncapitalisedJavaName}", "${col.JavaNative}"))); + } + } + } + #else + #if (${col.isJavaNativeBinaryObject()}) + + if (obj instanceof ${col.JavaNative}) { + myEntity.set${col.JavaName}((${col.JavaNative})obj); + } else { + myEntity.set${col.JavaName}(null);// Binary as String is out of target. + } + } + } + #else + + if (obj instanceof ${col.JavaNative}) { + myEntity.set${col.JavaName}((${col.JavaNative})obj); + } else { + try { + myEntity.set${col.JavaName}(new ${col.JavaNative}((String)obj)); + } catch (RuntimeException e) { + String msg = "set${col.JavaName}(new ${col.JavaNative}((String)obj))"; + throw new RuntimeException(msg + " threw the exception: value=[" + obj + "]", e); + } + } + } + } + #end + #end + #end + #end + + } +#end + + /** + * ${database.ImplementComment} + * + * @param entity Target entity. (NotNull) + * @param columnValueMapString Column-value map-string. (NotNull and NotEmpty) + */ + public void acceptColumnValueMapString(${glEntityInterfaceName} entity, String columnValueMapString) { + MapStringUtil.acceptColumnValueMapString(columnValueMapString, entity); + } + +#if (!$database.isAvailableGenerics()) + private void helpCheckingTypeString(Object value, String propertyName, String typeName) { + MapStringUtil.checkTypeString(value, propertyName, typeName); + } + + private long helpParsingDateString(Object value, String propertyName, String typeName) { + return MapStringUtil.parseDateStringAsMillis(value, propertyName, typeName); + } +#end + + // ----------------------------------------------------- + // Extract + // ------- + /** + * ${database.ImplementComment} + * + * @param entity Target entity. (NotNull) + * @return Primary-key map-string. (NotNull) + */ + public String extractPrimaryKeyMapString(${glEntityInterfaceName} entity) { + return MapStringUtil.extractPrimaryKeyMapString(entity); + } + + /** + * Extract primary-key map-string. + * + * @param entity Target entity. (NotNull) + * @param startBrace Start-brace. (NotNull) + * @param endBrace End-brace. (NotNull) + * @param delimiter Delimiter. (NotNull) + * @param equal Equal. (NotNull) + * @return Primary-key map-string. (NotNull) + */ + public String extractPrimaryKeyMapString(${glEntityInterfaceName} entity, String startBrace, String endBrace, String delimiter, String equal) { + final ${myExtendedObjectClassName} myEntity = (${myExtendedObjectClassName})entity; +#if ($table.hasPrimaryKey()) + final String mapMarkAndStartBrace = MAP_STRING_MAP_MARK + startBrace; + final StringBuffer sb = new StringBuffer(); +#foreach ($col in $table.PrimaryKey) + helpAppendingColumnValueString(sb, delimiter, equal, "${col.Name}", myEntity.get${col.JavaName}()); +#end + + sb.delete(0, delimiter.length()).insert(0, mapMarkAndStartBrace).append(endBrace); + return sb.toString(); +#else + return extractColumnValueMapString(entity, startBrace, endBrace, delimiter, equal); +#end + + } + + /** + * ${database.ImplementComment} + * + * @param entity Target entity. (NotNull) + * @return Column-value map-string. (NotNull) + */ + public String extractColumnValueMapString(${glEntityInterfaceName} entity) { + return MapStringUtil.extractColumnValueMapString(entity); + } + + /** + * Extract column-value map-string. + * + * @param entity Target entity. (NotNull) + * @param startBrace Start-brace. (NotNull) + * @param endBrace End-brace. (NotNull) + * @param delimiter Delimiter. (NotNull) + * @param equal Equal. (NotNull) + * @return Column-value map-string. (NotNull) + */ + public String extractColumnValueMapString(${glEntityInterfaceName} entity, String startBrace, String endBrace, String delimiter, String equal) { + final ${myExtendedObjectClassName} myEntity = (${myExtendedObjectClassName})entity; + final String mapMarkAndStartBrace = MAP_STRING_MAP_MARK + startBrace; + final StringBuffer sb = new StringBuffer(); +#foreach ($col in $table.Columns) + helpAppendingColumnValueString(sb, delimiter, equal, "${col.Name}", myEntity.get${col.JavaName}()); +#end + + sb.delete(0, delimiter.length()).insert(0, mapMarkAndStartBrace).append(endBrace); + return sb.toString(); + } + + private void helpAppendingColumnValueString(StringBuffer sb, String delimiter, String equal, String colName, Object value) { + sb.append(delimiter).append(colName).append(equal); + sb.append(helpGettingColumnStringValue(value)); + } + +#if (${table.hasAllCommonColumn()}) + + /** + * ${database.ImplementComment} + * + * @param entity Target entity. (NotNull) + * @return Column-value map-string. (NotNull) + */ + public String extractCommonColumnValueMapString(${glEntityInterfaceName} entity) { + final String startBrace = MAP_STRING_START_BRACE; + final String endBrace = MAP_STRING_END_BRACE; + final String delimiter = MAP_STRING_DELIMITER; + final String equal = MAP_STRING_EQUAL; + return extractCommonColumnValueMapString(entity, startBrace, endBrace, delimiter, equal); + } + + /** + * Extract common-column-value map-string. + * + * @param entity Target entity. (NotNull) + * @param startBrace Start-brace. (NotNull) + * @param endBrace End-brace. (NotNull) + * @param delimiter Delimiter. (NotNull) + * @param equal Equal. (NotNull) + * @return Common-column-value map-string. (NotNull) + */ + public String extractCommonColumnValueMapString(${glEntityInterfaceName} entity, String startBrace, String endBrace, String delimiter, String equal) { + final ${myExtendedObjectClassName} myEntity = (${myExtendedObjectClassName})entity; + final String mapMarkAndStartBrace = MAP_STRING_MAP_MARK + startBrace; + final StringBuffer sb = new StringBuffer(); + #foreach ($columnName in ${database.commonColumnNameList}) + #set ($filteredColumnName = ${database.filterCommonColumn(${columnName})}) + #set ($commonColumnMap = ${database.commonColumnMap}) + #set ($columnType = ${commonColumnMap.get(${columnName})}) + #set ($javaNative = ${database.convertJavaNativeByJdbcType(${columnType})}) + #set ($javaName = ${database.convertJavaNameByJdbcNameAsColumn(${filteredColumnName})}) + #set ($targetColumnName = ${table.findTargetColumnNameByCommonColumnName(${columnName})}) + #set ($targetJavaName = ${table.findTargetColumnJavaNameByCommonColumnName(${columnName})}) + #set ($col = $table.getColumnByFlexibleName($targetJavaName)) + #if ($col.isJavaNativeDateObject()) + + sb.append(delimiter).append("${targetColumnName}").append(equal); + sb.append((myEntity.get${javaName}() != null ? helpFormatingDate(myEntity.get${javaName}()) : "")); + #else + + sb.append(delimiter).append("${targetColumnName}").append(equal); + sb.append((myEntity.get${javaName}() != null ? myEntity.get${javaName}().toString() : "")); + #end + #end + + sb.delete(0, delimiter.length()).insert(0, mapMarkAndStartBrace).append(endBrace); + return sb.toString(); + } +#else + + /** + * ${database.ImplementComment} + * + * @param entity Target entity. (NotNull) + * @return Column-value map-string. (NotNull) + */ + public String extractCommonColumnValueMapString(${glEntityInterfaceName} entity) { + return "map:{}"; + } + + /** + * ${database.ImplementComment} + * + * @param entity Target entity. (NotNull) + * @return Column-value map-string. (NotNull) + */ + public String extractCommonColumnValueMapString(${glEntityInterfaceName} entity, String startBrace, String endBrace, String delimiter, String equal) { + return "map:" + startBrace + endBrace; + } + +#end + + // ----------------------------------------------------- + // Convert + // ------- + public java.util.List${database.filterGenericsString('Object')} convertToColumnValueList(${glEntityInterfaceName} entity) { + return new java.util.ArrayList${database.filterGenericsString('Object')}(convertToColumnValueMap(entity).values()); + } + + public java.util.Map${database.filterGenericsString('String, Object')} convertToColumnValueMap(${glEntityInterfaceName} entity) { + final ${myExtendedObjectClassName} myEntity = downcast(entity); + final java.util.Map${database.filterGenericsString('String, Object')} valueMap = new java.util.LinkedHashMap${database.filterGenericsString('String, Object')}(); +#foreach ($col in $table.columns) + valueMap.put("${col.name}", myEntity.get${col.JavaName}()); +#end + return valueMap; + } + + public java.util.List${database.filterGenericsString('String')} convertToColumnStringValueList(${glEntityInterfaceName} entity) { + return new java.util.ArrayList${database.filterGenericsString('String')}(convertToColumnStringValueMap(entity).values()); + } + + public java.util.Map${database.filterGenericsString('String, String')} convertToColumnStringValueMap(${glEntityInterfaceName} entity) { + final ${myExtendedObjectClassName} myEntity = downcast(entity); + final java.util.Map${database.filterGenericsString('String, String')} valueMap = new java.util.LinkedHashMap${database.filterGenericsString('String, String')}(); +#foreach ($col in $table.columns) + valueMap.put("${col.name}", helpGettingColumnStringValue(myEntity.get${col.JavaName}())); +#end + return valueMap; + } + + // =================================================================================== + // JDBC Support + // ============ + public String getPreparedInsertClause() { + return "insert into ${table.name}(${table.ColumnNameCommaString}) values(${table.insertClauseValuesAsQuetionMark})"; + } + + public String getPreparedInsertClause(String tablePrefix) { + return "insert into " + tablePrefix + "${table.name}(${table.ColumnNameCommaString}) values(${table.insertClauseValuesAsQuetionMark})"; + } + + // =================================================================================== + // Helper + // ====== + protected ${myExtendedObjectClassName} downcast(${glEntityInterfaceName} entity) { + assertObjectNotNull("entity", entity); + try { + return (${myExtendedObjectClassName})entity; + } catch (ClassCastException e) { + String msg = "The entity should be ${myExtendedObjectClassName} but it was: " + entity.getClass(); + throw new IllegalStateException(msg, e); + } + } + + protected void checkDowncast(${glEntityInterfaceName} entity) { + downcast(entity); + } +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/cbean/AbstractBsConditionQuery.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/cbean/AbstractBsConditionQuery.vm 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/cbean/AbstractBsConditionQuery.vm 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,686 @@ + +package ${glPackageBaseCQ}; + +#set ($myClassName = "${myAbstractBaseConditionQueryClassName}") + +#if ($table.hasClassification()) + +import ${glPackageBaseCommon}.${glClassificationDefinition}; +#end + +import ${glPackageBaseCommonCBean}.*; +import ${glPackageBaseCommonCKey}.*; +import ${glPackageBaseCommonCValue}.${glConditionValueName}; +import ${glPackageBaseCommonSqlClause}.${glSqlClauseName}; +import ${glPackageCQ}.*; + +/** + * The condition-query of ${table.name}. + * + * @author ${database.ClassAuthor} + */ +public abstract class ${myClassName} extends ${glConditionQueryAbstractName} { + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param childQuery Child query as abstract class. (Nullable: If null, this is base instance.) + * @param sqlClause SQL clause instance. (NotNull) + * @param aliasName My alias name. (NotNull) + * @param nestLevel Nest level. + */ + public ${myClassName}(${glConditionQueryInterfaceName} childQuery, ${glSqlClauseName} sqlClause, String aliasName, int nestLevel) { + super(childQuery, sqlClause, aliasName, nestLevel); + } + + // =================================================================================== + // Table Name + // ========== + /** + * ${database.ImplementComment} + * + * @return Table db-name. (NotNull) + */ + final public String getTableDbName() { + return "${table.Name}"; + } + + // =================================================================================== + // Query + // ===== + ## -------------------------------------------------------------------------------- + ## Make getter and setter methods. + ## ------------------------------- + + // /* * * * * * * * * * * * * * * * * * * * * * * + // MyTable = [$table.Name] + // * * * * * * * * */ + + #foreach ($col in $table.Columns) + #set ($tmpJavaName = "${col.JavaName}") + #set ($tmpUncapitalisedJavaName = "${col.UncapitalisedJavaName}") + + /** Column db name of ${col.UncapitalisedJavaName}. */ + protected static final String COL_${col.Name} = "${col.Name}"; + + /** Column java name of ${col.UncapitalisedJavaName}. */ + protected static final String J_${col.JavaName} = "${col.JavaName}"; + + /** Column uncapitalised java name of ${col.UncapitalisedJavaName}. */ + protected static final String UJ_${col.UncapitalisedJavaName} = "${col.UncapitalisedJavaName}"; + #if (${col.isJavaNativeStringObject()}) + + /** + * Set the value of ${col.UncapitalisedJavaName} using equal. { = } + * If the value is null or empty-string, this condition is ignored. + * + * @param ${tmpUncapitalisedJavaName} The value of ${col.UncapitalisedJavaName} as equal. + */ + public void set${tmpJavaName}_Equal($col.JavaNative ${tmpUncapitalisedJavaName}) { + register${tmpJavaName}(${glConditionKeyName}.CK_EQUAL, filterRemoveEmptyString(${tmpUncapitalisedJavaName})); + } + #if ($database.isMakeConditionQueryEqualEmptyString()) + + /** + * Set the empty-string of ${col.UncapitalisedJavaName} as equal. { = } + * + * @return this. (NotNull) + */ + public void set${tmpJavaName}_Equal_EmptyString() { + register${tmpJavaName}(${glConditionKeyName}.CK_EQUAL, ""); + } + #end + #if (${col.hasClassification()}) + #foreach ($classificationMap in $col.ClassificationMapList) + + /** + * Set the value of ${classificationMap.get('name')} of ${col.UncapitalisedJavaName} as equal. { = }
+ * ${classificationMap.get('comment')}
+ * + * @return this. (NotNull) + */ + public void set${tmpJavaName}_Equal_${classificationMap.get('name')}() { + register${tmpJavaName}(${glConditionKeyName}.CK_EQUAL, ${glClassificationDefinition}.CODE_${col.ClassificationName}_${classificationMap.get('name')}); + } + #end + #end + #if (${col.isAvailableStringNotEqual()}) + + /** + * Set the value of ${col.UncapitalisedJavaName} using notEqual. { != } + * If the value is null or empty-string, this condition is ignored. + * + * @param ${tmpUncapitalisedJavaName} The value of ${col.UncapitalisedJavaName} as notEqual. + */ + public void set${tmpJavaName}_NotEqual($col.JavaNative ${tmpUncapitalisedJavaName}) { + register${tmpJavaName}(${glConditionKeyName}.CK_NOT_EQUAL, filterRemoveEmptyString(${tmpUncapitalisedJavaName})); + } + #end + #if (${col.isAvailableStringGreaterThan()}) + + /** + * Set the value of ${col.UncapitalisedJavaName} using greaterThan. { > } + * If the value is null or empty-string, this condition is ignored. + * + * @param ${tmpUncapitalisedJavaName} The value of ${col.UncapitalisedJavaName} as greaterThan. + */ + public void set${tmpJavaName}_GreaterThan($col.JavaNative ${tmpUncapitalisedJavaName}) { + register${tmpJavaName}(${glConditionKeyName}.CK_GREATER_THAN, filterRemoveEmptyString(${tmpUncapitalisedJavaName})); + } + #end + #if (${col.isAvailableStringLessThan()}) + + /** + * Set the value of ${col.UncapitalisedJavaName} using lessThan. { < } + * If the value is null or empty-string, this condition is ignored. + * + * @param ${tmpUncapitalisedJavaName} The value of ${col.UncapitalisedJavaName} as lessThan. + */ + public void set${tmpJavaName}_LessThan($col.JavaNative ${tmpUncapitalisedJavaName}) { + register${tmpJavaName}(${glConditionKeyName}.CK_LESS_THAN, filterRemoveEmptyString(${tmpUncapitalisedJavaName})); + } + #end + #if (${col.isAvailableStringGreaterEqual()}) + + /** + * Set the value of ${col.UncapitalisedJavaName} using greaterEqual. { >= } + * If the value is null or empty-string, this condition is ignored. + * + * @param ${tmpUncapitalisedJavaName} The value of ${col.UncapitalisedJavaName} as greaterEqual. + */ + public void set${tmpJavaName}_GreaterEqual($col.JavaNative ${tmpUncapitalisedJavaName}) { + register${tmpJavaName}(${glConditionKeyName}.CK_GREATER_EQUAL, filterRemoveEmptyString(${tmpUncapitalisedJavaName})); + } + #end + #if (${col.isAvailableStringLessEqual()}) + + /** + * Set the value of ${col.UncapitalisedJavaName} using lessEqual. { <= } + * If the value is null or empty-string, this condition is ignored. + * + * @param ${tmpUncapitalisedJavaName} The value of ${col.UncapitalisedJavaName} as lessEqual. + */ + public void set${tmpJavaName}_LessEqual($col.JavaNative ${tmpUncapitalisedJavaName}) { + register${tmpJavaName}(${glConditionKeyName}.CK_LESS_EQUAL, filterRemoveEmptyString(${tmpUncapitalisedJavaName})); + } + #end + #if (${col.isAvailableStringPrefixSearch()}) + + /** + * Set the value of ${col.UncapitalisedJavaName} using prefixSearch. { like 'xxx%' } + * If the value is null or empty-string, this condition is ignored. + * + * @param ${tmpUncapitalisedJavaName} The value of ${col.UncapitalisedJavaName} as prefixSearch. + */ + public void set${tmpJavaName}_PrefixSearch($col.JavaNative ${tmpUncapitalisedJavaName}) { + register${tmpJavaName}(${glConditionKeyName}.CK_PREFIX_SEARCH, filterRemoveEmptyString(${tmpUncapitalisedJavaName})); + } + #end + #if (${col.isAvailableStringLikeSearch()}) + + /** + * Set the value of ${col.UncapitalisedJavaName} using likeSearch. { like '%xxx%' } + * If the value is null or empty-string, this condition is ignored. + * You can invoke this method several times and the conditions are set up. + * + * @param ${tmpUncapitalisedJavaName} The value of ${col.UncapitalisedJavaName} as likeSearch. + * @param likeSearchOption Like search option. (NotNull) + */ + public void set${tmpJavaName}_LikeSearch($col.JavaNative ${tmpUncapitalisedJavaName}, ${glPackageBaseCommonCOption}.${glConditionOptionLikeSearchName} likeSearchOption) { + registerLikeSearchQuery(${glConditionKeyName}.CK_LIKE_SEARCH, filterRemoveEmptyString(${tmpUncapitalisedJavaName}), getCValue${tmpJavaName}(), COL_${col.Name}, J_${col.JavaName}, UJ_${col.UncapitalisedJavaName}, likeSearchOption); + } + #end + #if (${col.isAvailableStringInScope()}) + + /** + * Set the value of ${col.UncapitalisedJavaName} using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param ${tmpUncapitalisedJavaName}List The value of ${col.UncapitalisedJavaName} as inScope. + */ + public void set${tmpJavaName}_InScope(java.util.List${database.filterGenericsString(${col.JavaNative})} ${tmpUncapitalisedJavaName}List) { + register${tmpJavaName}(${glConditionKeyName}.CK_IN_SCOPE, filterRemoveEmptyStringFromList(${tmpUncapitalisedJavaName}List)); + } + + /** + * Set the value of ${col.UncapitalisedJavaName} using inScope. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param ${tmpUncapitalisedJavaName} The value of ${col.UncapitalisedJavaName} as inScope. + */ + public void set${tmpJavaName}_InScope(${col.JavaNative} ${tmpUncapitalisedJavaName}, ${glPackageBaseCommonCOption}.${glConditionOptionInScopeName} option) { + registerInScopeQuery(${glConditionKeyName}.CK_IN_SCOPE, filterRemoveEmptyString(${tmpUncapitalisedJavaName}), getCValue${tmpJavaName}(), COL_${col.Name}, J_${col.JavaName}, UJ_${col.UncapitalisedJavaName}, option); + } + #end + #if (${col.isAvailableStringNotInScope()}) + + /** + * Set the value of ${col.UncapitalisedJavaName} using notInScope. { not in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param ${tmpUncapitalisedJavaName}List The value of ${col.UncapitalisedJavaName} as notInScope. + */ + public void set${tmpJavaName}_NotInScope(java.util.List${database.filterGenericsString(${col.JavaNative})} ${tmpUncapitalisedJavaName}List) { + register${tmpJavaName}(${glConditionKeyName}.CK_NOT_IN_SCOPE, filterRemoveEmptyStringFromList(${tmpUncapitalisedJavaName}List)); + } + #end + #if (${col.isSingleKeyForeignKey()}) + #set ($relatedCQClassName = "${glProjectPrefix}${col.foreignKey.foreignTable.javaName}CQ") + #set ($subQueryPropertyNameInitCap = "${tmpJavaName}_InScopeSubQuery_${col.foreignKey.foreignPropertyNameInitCap}") + #set ($subQueryPropertyName = "${tmpUncapitalisedJavaName}_InScopeSubQuery_${col.foreignKey.foreignPropertyNameInitCap}") + + /** + * Set the sub-query of ${subQueryPropertyNameInitCap} using inScopeSubQuery. + * { in (select xxx.${col.foreignKey.firstForeignColumnName} from ${col.foreignKey.foreignTable.Name} where ...) } + * This method use from clause and where clause of the sub-query instance. + * this query keep the sub-query instance for query-value. + * After you invoke this, If you set query in the argument[subQuery], the query is ignored. + * + * @param subQuery The sub-query of ${subQueryPropertyNameInitCap} using inScopeSubQuery. (NotNull) + */ + public void set${subQueryPropertyNameInitCap}(${relatedCQClassName} subQuery) { + assertObjectNotNull("subQuery", subQuery); + keep${subQueryPropertyNameInitCap}(subQuery);// for saving query-value. + registerInScopeSubQuery(subQuery, COL_${col.Name}, "${col.foreignKey.firstForeignColumnName}", "${subQueryPropertyName}"); + } + + abstract public void keep${subQueryPropertyNameInitCap}(${relatedCQClassName} subQuery); + #end + #if (${col.hasSingleKeyReferrer()}) + #foreach ($refferer in $col.SingleKeyReferrers) + #set ($relatedCQClassName = "${glProjectPrefix}${refferer.Table.JavaName}CQ") + #set ($subQueryPropertyNameInitCap = "${tmpJavaName}_InScopeSubQuery_${refferer.reffererPropertyNameInitCap}") + #set ($subQueryPropertyName = "${tmpUncapitalisedJavaName}_InScopeSubQuery_${refferer.reffererPropertyNameInitCap}") + + /** + * Set the sub-query of ${subQueryPropertyNameInitCap} using inScopeSubQuery. + * { in (select xxx.${refferer.FirstLocalColumnName} from ${refferer.Table.Name} where ...) } + * This method use from clause and where clause of the sub-query instance. + * this query keep the sub-query instance for query-value. + * After you invoke this, If you set query in the argument[subQuery], the query is ignored. + * + * @param subQuery The sub-query of ${subQueryPropertyNameInitCap} using inScopeSubQuery. (NotNull) + */ + public void set${subQueryPropertyNameInitCap}(${relatedCQClassName} subQuery) { + assertObjectNotNull("subQuery", subQuery); + keep${subQueryPropertyNameInitCap}(subQuery);// for saving query-value. + registerInScopeSubQuery(subQuery, COL_${col.Name}, "${refferer.FirstLocalColumnName}", "${subQueryPropertyName}"); + } + + abstract public void keep${subQueryPropertyNameInitCap}(${relatedCQClassName} subQuery); + #end + #end + #if (${col.hasSingleKeyReferrer()}) + #foreach ($refferer in $col.SingleKeyReferrers) + #if (!$refferer.isSelfReference()) + #set ($relatedCQClassName = "${glProjectPrefix}${refferer.Table.JavaName}CQ") + #set ($subQueryPropertyNameInitCap = "${tmpJavaName}_ExistsSubQuery_${refferer.ReffererPropertyNameInitCap}") + #set ($subQueryPropertyName = "${tmpUncapitalisedJavaName}_ExistsSubQuery_${refferer.ReffererPropertyNameInitCap}") + + /** + * Set the sub-query of ${subQueryPropertyNameInitCap} using existsSubQuery. + * { exists (select xxx.${refferer.FirstLocalColumnName} from ${refferer.Table.Name} where ...) } + * This method use from clause and where clause of the sub-query instance. + * this query keep the sub-query instance for query-value. + * After you invoke this, If you set query in the argument[subQuery], the query is ignored. + * + * @param subQuery The sub-query of ${subQueryPropertyNameInitCap} using existsSubQuery. (NotNull) + */ + public void set${subQueryPropertyNameInitCap}(${relatedCQClassName} subQuery) { + assertObjectNotNull("subQuery", subQuery); + keep${subQueryPropertyNameInitCap}(subQuery);// for saving query-value. + registerExistsSubQuery(subQuery, COL_${col.Name}, "${refferer.FirstLocalColumnName}", "${subQueryPropertyName}"); + } + + abstract public void keep${subQueryPropertyNameInitCap}(${relatedCQClassName} subQuery); + #end + #end + #end + #end + #if (${col.isJavaNativeNumberObject()}) + + /** + * Set the value of ${col.UncapitalisedJavaName} using equal. { = } + * + * @param ${tmpUncapitalisedJavaName} The value of ${col.UncapitalisedJavaName} as equal. + */ + public void set${tmpJavaName}_Equal($col.JavaNative ${tmpUncapitalisedJavaName}) { + register${tmpJavaName}(${glConditionKeyName}.CK_EQUAL, ${tmpUncapitalisedJavaName}); + } + #if (${col.hasClassification()}) + #foreach ($classificationMap in $col.ClassificationMapList) + + /** + * Set the value of ${classificationMap.get('name')} of ${col.UncapitalisedJavaName} as equal. { = }
+ * ${classificationMap.get('comment')}
+ */ + public void set${tmpJavaName}_Equal_${classificationMap.get('name')}() { + final String code = ${glClassificationDefinition}.CODE_${col.ClassificationName}_${classificationMap.get('name')}; + register${tmpJavaName}(${glConditionKeyName}.CK_EQUAL, new ${col.JavaNative}(code)); + } + #end + #end + #if (${col.isAvailableNumberNotEqual()}) + + /** + * Set the value of ${col.UncapitalisedJavaName} using notEqual. { != } + * + * @param ${tmpUncapitalisedJavaName} The value of ${col.UncapitalisedJavaName} as notEqual. + */ + public void set${tmpJavaName}_NotEqual($col.JavaNative ${tmpUncapitalisedJavaName}) { + register${tmpJavaName}(${glConditionKeyName}.CK_NOT_EQUAL, ${tmpUncapitalisedJavaName}); + } + #end + #if (${col.isAvailableNumberGreaterThan()}) + + /** + * Set the value of ${col.UncapitalisedJavaName} using greaterThan. { > } + * + * @param ${tmpUncapitalisedJavaName} The value of ${col.UncapitalisedJavaName} as greaterThan. + */ + public void set${tmpJavaName}_GreaterThan($col.JavaNative ${tmpUncapitalisedJavaName}) { + register${tmpJavaName}(${glConditionKeyName}.CK_GREATER_THAN, ${tmpUncapitalisedJavaName}); + } + #end + #if (${col.isAvailableNumberLessThan()}) + + /** + * Set the value of ${col.UncapitalisedJavaName} using lessThan. { < } + * + * @param ${tmpUncapitalisedJavaName} The value of ${col.UncapitalisedJavaName} as lessThan. + */ + public void set${tmpJavaName}_LessThan($col.JavaNative ${tmpUncapitalisedJavaName}) { + register${tmpJavaName}(${glConditionKeyName}.CK_LESS_THAN, ${tmpUncapitalisedJavaName}); + } + #end + #if (${col.isAvailableNumberGreaterEqual()}) + + /** + * Set the value of ${col.UncapitalisedJavaName} using greaterEqual. { >= } + * + * @param ${tmpUncapitalisedJavaName} The value of ${col.UncapitalisedJavaName} as greaterEqual. + */ + public void set${tmpJavaName}_GreaterEqual($col.JavaNative ${tmpUncapitalisedJavaName}) { + register${tmpJavaName}(${glConditionKeyName}.CK_GREATER_EQUAL, ${tmpUncapitalisedJavaName}); + } + #end + #if (${col.isAvailableNumberLessEqual()}) + + /** + * Set the value of ${col.UncapitalisedJavaName} using lessEqual. { <= } + * + * @param ${tmpUncapitalisedJavaName} The value of ${col.UncapitalisedJavaName} as lessEqual. + */ + public void set${tmpJavaName}_LessEqual($col.JavaNative ${tmpUncapitalisedJavaName}) { + register${tmpJavaName}(${glConditionKeyName}.CK_LESS_EQUAL, ${tmpUncapitalisedJavaName}); + } + #end + #if ($database.isMakeConditionQueryNumericArgumentLong()) + + /** + * Set the value of ${col.UncapitalisedJavaName} using equal. { = } + * + * @param ${tmpUncapitalisedJavaName} The value of ${col.UncapitalisedJavaName} as equal. + */ + public void set${tmpJavaName}_Equal(long ${tmpUncapitalisedJavaName}) { + register${tmpJavaName}(${glConditionKeyName}.CK_EQUAL, new ${col.JavaNative}(String.valueOf(${tmpUncapitalisedJavaName}))); + } + #if (${col.isAvailableNumberNotEqual()}) + + /** + * Set the value of ${col.UncapitalisedJavaName} using notEqual. { != } + * + * @param ${tmpUncapitalisedJavaName} The value of ${col.UncapitalisedJavaName} as notEqual. + */ + public void set${tmpJavaName}_NotEqual(long ${tmpUncapitalisedJavaName}) { + register${tmpJavaName}(${glConditionKeyName}.CK_NOT_EQUAL, new ${col.JavaNative}(String.valueOf(${tmpUncapitalisedJavaName}))); + } + #end + #if (${col.isAvailableNumberGreaterThan()}) + + /** + * Set the value of ${col.UncapitalisedJavaName} using greaterThan. { > } + * + * @param ${tmpUncapitalisedJavaName} The value of ${col.UncapitalisedJavaName} as greaterThan. + */ + public void set${tmpJavaName}_GreaterThan(long ${tmpUncapitalisedJavaName}) { + register${tmpJavaName}(${glConditionKeyName}.CK_GREATER_THAN, new ${col.JavaNative}(String.valueOf(${tmpUncapitalisedJavaName}))); + } + #end + #if (${col.isAvailableNumberLessThan()}) + + /** + * Set the value of ${col.UncapitalisedJavaName} using lessThan. { < } + * + * @param ${tmpUncapitalisedJavaName} The value of ${col.UncapitalisedJavaName} as lessThan. + */ + public void set${tmpJavaName}_LessThan(long ${tmpUncapitalisedJavaName}) { + register${tmpJavaName}(${glConditionKeyName}.CK_LESS_THAN, new ${col.JavaNative}(String.valueOf(${tmpUncapitalisedJavaName}))); + } + #end + #if (${col.isAvailableNumberGreaterEqual()}) + + /** + * Set the value of ${col.UncapitalisedJavaName} using greaterEqual. { >= } + * + * @param ${tmpUncapitalisedJavaName} The value of ${col.UncapitalisedJavaName} as greaterEqual. + */ + public void set${tmpJavaName}_GreaterEqual(long ${tmpUncapitalisedJavaName}) { + register${tmpJavaName}(${glConditionKeyName}.CK_GREATER_EQUAL, new ${col.JavaNative}(String.valueOf(${tmpUncapitalisedJavaName}))); + } + #end + #if (${col.isAvailableNumberLessEqual()}) + + /** + * Set the value of ${col.UncapitalisedJavaName} using lessEqual. { <= } + * + * @param ${tmpUncapitalisedJavaName} The value of ${col.UncapitalisedJavaName} as lessEqual. + */ + public void set${tmpJavaName}_LessEqual(long ${tmpUncapitalisedJavaName}) { + register${tmpJavaName}(${glConditionKeyName}.CK_LESS_EQUAL, new ${col.JavaNative}(String.valueOf(${tmpUncapitalisedJavaName}))); + } + #end + #end + #if (${col.isAvailableNumberInScope()}) + + /** + * Set the value of ${col.UncapitalisedJavaName} using inScope. { in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param ${tmpUncapitalisedJavaName}List The value of ${col.UncapitalisedJavaName} as inScope. + */ + public void set${tmpJavaName}_InScope(java.util.List${database.filterGenericsString(${col.JavaNative})} ${tmpUncapitalisedJavaName}List) { + register${tmpJavaName}(${glConditionKeyName}.CK_IN_SCOPE, ${tmpUncapitalisedJavaName}List); + } + #end + #if (${col.isAvailableNumberNotInScope()}) + + /** + * Set the value of ${col.UncapitalisedJavaName} using notInScope. { not in (a, b) } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param ${tmpUncapitalisedJavaName}List The value of ${col.UncapitalisedJavaName} as notInScope. + */ + public void set${tmpJavaName}_NotInScope(java.util.List${database.filterGenericsString(${col.JavaNative})} ${tmpUncapitalisedJavaName}List) { + register${tmpJavaName}(${glConditionKeyName}.CK_NOT_IN_SCOPE, ${tmpUncapitalisedJavaName}List); + } + #end + #if (${col.isSingleKeyForeignKey()}) + #set ($relatedCQClassName = "${glProjectPrefix}${col.foreignKey.foreignTable.javaName}CQ") + #set ($subQueryPropertyNameInitCap = "${tmpJavaName}_InScopeSubQuery_${col.foreignKey.foreignPropertyNameInitCap}") + #set ($subQueryPropertyName = "${tmpUncapitalisedJavaName}_InScopeSubQuery_${col.foreignKey.foreignPropertyNameInitCap}") + + /** + * Set the sub-query of ${subQueryPropertyNameInitCap} using inScopeSubQuery. + * { in (select xxx.${col.foreignKey.firstForeignColumnName} from ${col.foreignKey.foreignTable.Name} where ...) } + * This method use from clause and where clause of the sub-query instance. + * this query keep the sub-query instance for query-value. + * After you invoke this, If you set query in the argument[subQuery], the query is ignored. + * + * @param subQuery The sub-query of ${subQueryPropertyNameInitCap} using inScopeSubQuery. (NotNull) + */ + public void set${subQueryPropertyNameInitCap}(${relatedCQClassName} subQuery) { + assertObjectNotNull("subQuery", subQuery); + keep${subQueryPropertyNameInitCap}(subQuery);// for saving query-value. + registerInScopeSubQuery(subQuery, COL_${col.Name}, "${col.foreignKey.firstForeignColumnName}", "${subQueryPropertyName}"); + } + + abstract public void keep${subQueryPropertyNameInitCap}(${relatedCQClassName} subQuery); + #end + #if (${col.hasSingleKeyReferrer()}) + #foreach ($refferer in $col.SingleKeyReferrers) + #set ($relatedCQClassName = "${glProjectPrefix}${refferer.Table.JavaName}CQ") + #set ($subQueryPropertyNameInitCap = "${tmpJavaName}_InScopeSubQuery_${refferer.ReffererPropertyNameInitCap}") + #set ($subQueryPropertyName = "${tmpUncapitalisedJavaName}_InScopeSubQuery_${refferer.ReffererPropertyNameInitCap}") + + /** + * Set the sub-query of ${subQueryPropertyNameInitCap} using inScopeSubQuery. + * { in (select xxx.${refferer.FirstLocalColumnName} from ${refferer.Table.Name} where ...) } + * This method use from clause and where clause of the sub-query instance. + * this query keep the sub-query instance for query-value. + * After you invoke this, If you set query in the argument[subQuery], the query is ignored. + * + * @param subQuery The sub-query of ${subQueryPropertyNameInitCap} using inScopeSubQuery. (NotNull) + */ + public void set${subQueryPropertyNameInitCap}(${relatedCQClassName} subQuery) { + assertObjectNotNull("subQuery", subQuery); + keep${subQueryPropertyNameInitCap}(subQuery);// for saving query-value. + registerInScopeSubQuery(subQuery, COL_${col.Name}, "${refferer.FirstLocalColumnName}", "${subQueryPropertyName}"); + } + + abstract public void keep${subQueryPropertyNameInitCap}(${relatedCQClassName} subQuery); + #end + #end + #if (${col.hasSingleKeyReferrer()}) + #foreach ($refferer in $col.SingleKeyReferrers) + #if (!$refferer.isSelfReference()) + #set ($relatedCQClassName = "${glProjectPrefix}${refferer.Table.JavaName}CQ") + #set ($subQueryPropertyNameInitCap = "${tmpJavaName}_ExistsSubQuery_${refferer.ReffererPropertyNameInitCap}") + #set ($subQueryPropertyName = "${tmpUncapitalisedJavaName}_ExistsSubQuery_${refferer.ReffererPropertyNameInitCap}") + + /** + * Set the sub-query of ${subQueryPropertyNameInitCap} using existsSubQuery. + * { exists (select xxx.${refferer.FirstLocalColumnName} from ${refferer.Table.Name} where ...) } + * This method use from clause and where clause of the sub-query instance. + * this query keep the sub-query instance for query-value. + * After you invoke this, If you set query in the argument[subQuery], the query is ignored. + * + * @param subQuery The sub-query of ${subQueryPropertyNameInitCap} using existsSubQuery. (NotNull) + */ + public void set${subQueryPropertyNameInitCap}(${relatedCQClassName} subQuery) { + assertObjectNotNull("subQuery", subQuery); + keep${subQueryPropertyNameInitCap}(subQuery);// for saving query-value. + registerExistsSubQuery(subQuery, COL_${col.Name}, "${refferer.FirstLocalColumnName}", "${subQueryPropertyName}"); + } + + abstract public void keep${subQueryPropertyNameInitCap}(${relatedCQClassName} subQuery); + #end + #end + #end + #end + #if (${col.isJavaNativeDateObject()}) + + /** + * Set the value of ${col.UncapitalisedJavaName} using equal. { = } + * + * @param ${tmpUncapitalisedJavaName} The value of ${col.UncapitalisedJavaName} as equal. + */ + public void set${tmpJavaName}_Equal($col.JavaNative ${tmpUncapitalisedJavaName}) { + register${tmpJavaName}(${glConditionKeyName}.CK_EQUAL, ${tmpUncapitalisedJavaName}); + } + #if (${col.isAvailableDateNotEqual()}) + + /** + * Set the value of ${col.UncapitalisedJavaName} using notEqual. { != } + * + * @param ${tmpUncapitalisedJavaName} The value of ${col.UncapitalisedJavaName} as notEqual. + */ + public void set${tmpJavaName}_NotEqual($col.JavaNative ${tmpUncapitalisedJavaName}) { + register${tmpJavaName}(${glConditionKeyName}.CK_NOT_EQUAL, ${tmpUncapitalisedJavaName}); + } + #end + #if (${col.isAvailableDateGreaterThan()}) + + /** + * Set the value of ${col.UncapitalisedJavaName} using greaterThan. { > } + * + * @param ${tmpUncapitalisedJavaName} The value of ${col.UncapitalisedJavaName} as greaterThan. + */ + public void set${tmpJavaName}_GreaterThan($col.JavaNative ${tmpUncapitalisedJavaName}) { + register${tmpJavaName}(${glConditionKeyName}.CK_GREATER_THAN, ${tmpUncapitalisedJavaName}); + } + #end + #if (${col.isAvailableDateLessThan()}) + + /** + * Set the value of ${col.UncapitalisedJavaName} using lessThan. { < } + * + * @param ${tmpUncapitalisedJavaName} The value of ${col.UncapitalisedJavaName} as lessThan. + */ + public void set${tmpJavaName}_LessThan($col.JavaNative ${tmpUncapitalisedJavaName}) { + register${tmpJavaName}(${glConditionKeyName}.CK_LESS_THAN, ${tmpUncapitalisedJavaName}); + } + #end + #if (${col.isAvailableDateGreaterEqual()}) + + /** + * Set the value of ${col.UncapitalisedJavaName} using greaterEqual. { >= } + * + * @param ${tmpUncapitalisedJavaName} The value of ${col.UncapitalisedJavaName} as greaterEqual. + */ + public void set${tmpJavaName}_GreaterEqual($col.JavaNative ${tmpUncapitalisedJavaName}) { + register${tmpJavaName}(${glConditionKeyName}.CK_GREATER_EQUAL, ${tmpUncapitalisedJavaName}); + } + #end + #if (${col.isAvailableDateLessEqual()}) + + /** + * Set the value of ${col.UncapitalisedJavaName} using lessEqual. { <= } + * + * @param ${tmpUncapitalisedJavaName} The value of ${col.UncapitalisedJavaName} as lessEqual. + */ + public void set${tmpJavaName}_LessEqual($col.JavaNative ${tmpUncapitalisedJavaName}) { + register${tmpJavaName}(${glConditionKeyName}.CK_LESS_EQUAL, ${tmpUncapitalisedJavaName}); + } + #end + #if (${col.isAvailableDateFromTo()}) + + /** + * Set the value of ${col.UncapitalisedJavaName} using from-to. { $fromDate <= COLUMN_NAME <= $toDate } + * + * @param ${tmpUncapitalisedJavaName} The value of ${col.UncapitalisedJavaName} as from-to. + * @param fromToOption From-To option. (NotNull) + */ + public void set${tmpJavaName}_FromTo($col.JavaNative fromDate, $col.JavaNative toDate, ${glPackageBaseCommonCOption}.${glConditionOptionFromToName} fromToOption) { + registerFromToQuery(fromDate, toDate, getCValue${tmpJavaName}(), COL_${col.Name}, J_${col.JavaName}, UJ_${col.UncapitalisedJavaName}, fromToOption); + } + #end + #end + #if (${col.isJavaNativeBooleanObject()}) + + /** + * Set the value of ${col.UncapitalisedJavaName} using equal. { = } + * + * @param ${tmpUncapitalisedJavaName} The value of ${col.UncapitalisedJavaName} as equal. + */ + public void set${tmpJavaName}_Equal($col.JavaNative ${tmpUncapitalisedJavaName}) { + register${tmpJavaName}(${glConditionKeyName}.CK_EQUAL, ${tmpUncapitalisedJavaName}); + } + #end + #if (${col.isJavaNativeBinaryObject()}) + #end + #if (!${col.isNotNull()}) + + /** + * Set the value of ${col.UncapitalisedJavaName} using isNull. { is null } + */ + public void set${tmpJavaName}_IsNull() { + register${tmpJavaName}(${glConditionKeyName}.CK_IS_NULL, DUMMY_OBJECT); + } + + /** + * Set the value of ${col.UncapitalisedJavaName} using isNotNull. { is not null } + */ + public void set${tmpJavaName}_IsNotNull() { + register${tmpJavaName}(${glConditionKeyName}.CK_IS_NOT_NULL, DUMMY_OBJECT); + } + #end + + /** + * Register condition of ${col.UncapitalisedJavaName}. + * + * @param key Condition key. (NotNull) + * @param value The value of ${col.UncapitalisedJavaName}. (Nullable) + */ + protected void register${tmpJavaName}(${glConditionKeyName} key, Object value) { + registerQuery(key, value, getCValue${tmpJavaName}(), COL_${col.Name}, J_${col.JavaName}, UJ_${col.UncapitalisedJavaName}); + } + + /** + * Register inline condition of ${col.UncapitalisedJavaName}. + * + * @param key Condition key. (NotNull) + * @param value The value of ${col.UncapitalisedJavaName}. (Nullable) + */ + protected void registerInline${tmpJavaName}(${glConditionKeyName} key, Object value) { + registerInlineQuery(key, value, getCValue${tmpJavaName}(), COL_${col.Name}, J_${col.JavaName}, UJ_${col.UncapitalisedJavaName}); + } + + abstract protected ${glConditionValueName} getCValue${tmpJavaName}(); + #end + + // =================================================================================== + // Basic Override + // ============== + /** + * This method overrides the method that is declared at super. + * + * @return Clause string. (NotNull) + */ + public String toString() { + return getSqlClause().getClause(); + } +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/cbean/BsConditionBean.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/cbean/BsConditionBean.vm 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/cbean/BsConditionBean.vm 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,365 @@ +package ${glPackageBaseCB}; + +#set ($myClassName = "${myBaseConditionBeanClassName}") + +import ${glPackageBaseCommonCBean}.${glConditionBeanAbstractName}; +import ${glPackageBaseCommonCBean}.${glConditionBeanInterfaceName}; +import ${glPackageBaseCommonCBean}.${glConditionQueryInterfaceName}; + +import ${glPackageCQ}.*; +import ${glPackageNss}.*; + +/** + * The condition-bean of ${table.Name}. + * + * @author ${database.ClassAuthor} + */ +public class ${myClassName} extends ${glConditionBeanAbstractName} { + + // =================================================================================== + // Annotation + // ========== + /** TABLE-Annotation */ + public static final String TABLE = "$table.Name"; + + // =================================================================================== + // Attribute + // ========= + /** Condition query. */ + protected ${myConditionQueryClassName} _conditionQuery; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + */ + public ${myClassName}() { + } + + // /* * * * * * * * * * * * * * * * * * * * * * * + // MyTable = [$table.Name] + // * * * * * * * * */ + + // =================================================================================== + // Table Name + // ========== + /** + * ${database.ImplementComment} + * + * @return Table db-name. (NotNull) + */ + final public String getTableDbName() { + return "${table.Name}"; + } + + // =================================================================================== + // Accept Primary-Key + // ================== + /** + * ${database.ImplementComment} + * + * @param primaryKeyMap Primary key map. (NotNull and NotEmpty) + */ + public void acceptPrimaryKeyMap(java.util.Map${database.filterGenericsString('String, ? extends Object')} primaryKeyMap) { + if (primaryKeyMap == null) { + String msg = "The argument[primaryKeyMap] must not be null."; + throw new IllegalArgumentException(msg); + } + if (primaryKeyMap.isEmpty()) { + String msg = "The argument[primaryKeyMap] must not be empty."; + throw new IllegalArgumentException(msg); + } +#if ($table.hasPrimaryKey()) + #foreach ($col in $table.PrimaryKey) + + if (!primaryKeyMap.containsKey("${col.Name}")) { + String msg = "The primaryKeyMap must have the value of ${col.Name}"; + throw new IllegalStateException(msg + ": primaryKeyMap --> " + primaryKeyMap); + } + { + Object obj = primaryKeyMap.get("${col.Name}"); + if (obj instanceof ${col.JavaNative}) { + query().set${col.JavaName}_Equal((${col.JavaNative})obj); + } else { + #if ($col.isJavaNativeStringObject()) + + checkTypeString(obj, "${col.UncapitalisedJavaName}", "${col.JavaNative}"); + query().set${col.JavaName}_Equal((String)obj); + } + } + #else + #if ($col.isJavaNativeDateObject()) + + if (obj instanceof ${col.JavaNative}) { + query().set${col.JavaName}_Equal((${col.JavaNative})obj); + } else { + query().set${col.JavaName}_Equal(new ${col.JavaNative}(parseDateString(obj, "${col.UncapitalisedJavaName}", "${col.JavaNative}"))); + } + } + } + #else + #if (${col.isJavaNativeBinaryObject()}) + + if (obj instanceof ${col.JavaNative}) { + query().set${col.JavaName}_Equal((${col.JavaNative})obj); + } else { + query().set${col.JavaName}_Equal(null);// Binary as String is out of target. + } + } + } + #else + + if (obj instanceof ${col.JavaNative}) { + query().set${col.JavaName}_Equal((${col.JavaNative})obj); + } else { + try { + query().set${col.JavaName}_Equal(new ${col.JavaNative}((String)obj)); + } catch (RuntimeException e) { + String msg = "set${col.JavaName}(new ${col.JavaNative}((String)obj))"; + throw new RuntimeException(msg + " threw the exception: value=[" + obj + "]", e); + } + } + } + } + #end + #end + #end + #end +#else + + String msg = "This table has no primary-keys: " + getTableDbName(); + throw new IllegalStateException(msg); +#end + + } + + // =================================================================================== + // Order-By + // ======== + /** + * ${database.ImplementComment} + * + * @return this. (NotNull) + */ + public ${glConditionBeanInterfaceName} addOrderBy_PK_Asc() { +#if ($table.hasPrimaryKey()) + #foreach ($col in $table.PrimaryKey) + + query().addOrderBy_${col.JavaName}_Asc(); + #end + + return this; +#else + #foreach ($col in $table.Columns) + + query().addOrderBy_${col.JavaName}_Asc(); + #end + + return this; +#end + + } + + /** + * ${database.ImplementComment} + * + * @return this. (NotNull) + */ + public ${glConditionBeanInterfaceName} addOrderBy_PK_Desc() { +#if ($table.hasPrimaryKey()) + #foreach ($col in $table.PrimaryKey) + + query().addOrderBy_${col.JavaName}_Desc(); + #end + + return this; +#else + #foreach ($col in $table.Columns) + + query().addOrderBy_${col.JavaName}_Desc(); + #end + + return this; +#end + + } + + // =================================================================================== + // Query + // ===== + /** + * Query. + * + * @return Instance of query. (NotNull) + */ + public ${myConditionQueryClassName} query() { + return getConditionQuery(); + } + + /** + * Get condition query. {Internal method for s2dao} + * + * @return Instance of condition query. (NotNull) + */ + public ${myConditionQueryClassName} getConditionQuery() { + if (_conditionQuery == null) { + _conditionQuery = new ${myConditionQueryClassName}(null, getSqlClause(), getTableDbName(), 0); + } + return _conditionQuery; + } + + /** + * ${database.ImplementComment} + * + * @return Instance of query as interface. (NotNull) + */ + public ${glConditionQueryInterfaceName} getConditionQueryAsInterface() { + return getConditionQuery(); + } + + // =================================================================================== + // Union + // ===== + /** + * Union. + *
+     * Add union query to condition bean.
+     * 
+ * @param unionQuery Union query. (NotNull) + */ + public void union(${myConditionQueryClassName} unionQuery) { + query().xsetUnionQuery(unionQuery); + } + + /** + * Union all. + *
+     * Add union all query to condition bean.
+     * 
+ * @param unionAllQuery Union all query. (NotNull) + */ + public void unionAll(${myConditionQueryClassName} unionAllQuery) { + query().xsetUnionAllQuery(unionAllQuery); + } + + public boolean hasUnionQueryOrUnionAllQuery() { + return query().hasUnionQueryOrUnionAllQuery(); + } + + // =================================================================================== + // Setup-Select + // ============ + #foreach ($foreignKeys in $table.ForeignKeys) + #set ($tmpPropertyName = "${foreignKeys.foreignPropertyName}") + #set ($tmpPropertyNameInitCap = "${foreignKeys.foreignPropertyNameInitCap}") + #set ($nestSelectSetuppperClassName = "${glProjectPrefix}${foreignKeys.foreignTable.javaName}Nss") + + // /* * * * * * * * * * * * * * * * * * * * * * * + // ForeignTable = [${foreignKeys.foreignTable.name}] + // ForeignProperty = [${tmpPropertyName}] + // * * * * * * * * */ + + /** Is select for ${tmpPropertyName}? */ + protected boolean _isSelect${tmpPropertyNameInitCap}; + /** Nest select setupper for ${tmpPropertyName}. */ + protected ${nestSelectSetuppperClassName} _nss${tmpPropertyNameInitCap}; + /** + * Is select for ${tmpPropertyName}? {For Internal} + * + * @return Determination. + */ + public boolean isSelect${tmpPropertyNameInitCap}() { + return _isSelect${tmpPropertyNameInitCap}; + } + /** + * Get nest select setupper for ${tmpPropertyName}. {For Internal} + * + * @return Nest select setupper. (NotNull) + */ + public ${nestSelectSetuppperClassName} getNss${tmpPropertyNameInitCap}() { + if (_nss${tmpPropertyNameInitCap} == null) { + _nss${tmpPropertyNameInitCap} = new ${nestSelectSetuppperClassName}(null);// for Dummy + } + return _nss${tmpPropertyNameInitCap}; + } + /** + * Set up select for ${tmpPropertyName}. + * If you invoke this, this entity is target of select. + * + * @return Nest select setupper for ${tmpPropertyName}. (NotNull) + */ + public ${nestSelectSetuppperClassName} setupSelect_${tmpPropertyNameInitCap}() { + query().query${tmpPropertyNameInitCap}();// For setting outer join. + if (_nss${tmpPropertyNameInitCap} == null || !_nss${tmpPropertyNameInitCap}.hasConditionQuery()) { + _nss${tmpPropertyNameInitCap} = new ${nestSelectSetuppperClassName}(query().query${tmpPropertyNameInitCap}()); + } + _isSelect${tmpPropertyNameInitCap} = true; + limitSelect_Off(); + return _nss${tmpPropertyNameInitCap}; + } + #end + #foreach ($refferer in $table.Referrers) + #if (${refferer.isOneToOne()}) + #set ($tmpPropertyName = "${refferer.ReffererPropertyNameAsOne}") + #set ($tmpPropertyNameInitCap = "${refferer.ReffererPropertyNameInitCapAsOne}") + #set ($nestSelectSetuppperClassName = "${glProjectPrefix}${refferer.table.javaName}Nss") + + // /* * * * * * * * * * * * * * * * * * * * * * * {as one} + // RefferTable = [${refferer.table.name}] + // RefferProperty = [${tmpPropertyName}] + // * * * * * * * * */ + + /** Is select for ${tmpPropertyName}? */ + protected boolean _isSelect${tmpPropertyNameInitCap}; + /** Nest select setupper for ${tmpPropertyName}. */ + protected ${nestSelectSetuppperClassName} _nss${tmpPropertyNameInitCap}; + /** + * Is select for ${tmpPropertyName}? {For Internal} + * + * @return Determination. + */ + public boolean isSelect${tmpPropertyNameInitCap}() { + return _isSelect${tmpPropertyNameInitCap}; + } + /** + * Get nest select setupper for ${tmpPropertyName}. {For Internal} + * + * @return Nest select setupper. (NotNull) + */ + public ${nestSelectSetuppperClassName} getNss${tmpPropertyNameInitCap}() { + if (_nss${tmpPropertyNameInitCap} == null) { + _nss${tmpPropertyNameInitCap} = new ${nestSelectSetuppperClassName}(null);// for Dummy + } + return _nss${tmpPropertyNameInitCap}; + } + /** + * Set up select for ${tmpPropertyName}. + * If you invoke this, this entity is target of select. + * + * @return Nest select setupper for ${tmpPropertyName}. (NotNull) + */ + public ${nestSelectSetuppperClassName} setupSelect_${tmpPropertyNameInitCap}() { + query().query${tmpPropertyNameInitCap}();// For setting outer join. + if (_nss${tmpPropertyNameInitCap} == null || !_nss${tmpPropertyNameInitCap}.hasConditionQuery()) { + _nss${tmpPropertyNameInitCap} = new ${nestSelectSetuppperClassName}(query().query${tmpPropertyNameInitCap}()); + } + _isSelect${tmpPropertyNameInitCap} = true; + limitSelect_Off(); + return _nss${tmpPropertyNameInitCap}; + } + #end + #end + + // =================================================================================== + // Basic Override + // ============== + /** + * This method overrides the method that is declared at super. + * + * @return Clause string. (NotNull) + */ + public String toString() { + return getSqlClause().getClause(); + } +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/cbean/BsConditionInlineQuery.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/cbean/BsConditionInlineQuery.vm 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/cbean/BsConditionInlineQuery.vm 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,171 @@ +package ${glPackageCIQ}; + +#set ($myClassName = "${myConditionInlineQueryClassName}") +#set ($myCQClassName = "") +#if ($database.isJavaDirOnlyOne()) + #set ($myCQClassName = "${myBaseConditionQueryClassName}") +#else + #set ($myCQClassName = "${myConditionQueryClassName}") +#end +import ${glPackageBaseCQ}.*; +import ${glPackageCQ}.*; + +import ${glPackageBaseCommonCBean}.*; +import ${glPackageBaseCommonCKey}.*; +import ${glPackageBaseCommonCOption}.${glConditionOptionInterfaceName}; +import ${glPackageBaseCommonCValue}.${glConditionValueName}; +import ${glPackageBaseCommonSqlClause}.${glSqlClauseName}; + +/** + * The condition-inline-query of ${table.name}. + * + * @author ${database.ClassAuthor} + */ +public class ${myClassName} extends ${myAbstractBaseConditionQueryClassName} { + + // =================================================================================== + // Attribute + // ========= + /** Corresponding condition query. */ + protected ${myCQClassName} _myCQ; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param childQuery Child query as abstract class. (Nullable: If null, this is base instance.) + * @param sqlClause SQL clause instance. (NotNull) + * @param aliasName My alias name. (NotNull) + * @param nestLevel Nest level. + */ + public ${myClassName}(${glConditionQueryInterfaceName} childQuery, ${glSqlClauseName} sqlClause, String aliasName, int nestLevel, ${myCQClassName} myCQ) { + super(childQuery, sqlClause, aliasName, nestLevel); + _myCQ = myCQ; + } + + // =================================================================================== + // Override about Register + // ======================= + protected void reflectRelationOnUnionQuery(${glConditionQueryInterfaceName} baseQueryAsSuper, ${glConditionQueryInterfaceName} unionQueryAsSuper) { + throw new UnsupportedOperationException("InlineQuery must not need UNION method: " + baseQueryAsSuper + " : " + unionQueryAsSuper); + } + + protected void setupConditionValueAndRegisterWhereClause(${glConditionKeyName} key, Object value, ${glConditionValueName} cvalue + , String colName, String capPropName, String uncapPropName) { + registerInlineQuery(key, value, cvalue, colName, capPropName, uncapPropName); + } + + protected void setupConditionValueAndRegisterWhereClause(${glConditionKeyName} key, Object value, ${glConditionValueName} cvalue + , String colName, String capPropName, String uncapPropName, ${glConditionOptionInterfaceName} option) { + registerInlineQuery(key, value, cvalue, colName, capPropName, uncapPropName, option); + } + + protected void registerWhereClause(String whereClause) { + registerInlineWhereClause(whereClause); + } + + // =================================================================================== + // Override about Query + // ==================== + // /* * * * * * * * * * * * * * * * * * * * * * * + // MyTable = [$table.Name] + // * * * * * * * * */ + + #foreach ($col in $table.Columns) + #set ($tmpJavaName = "${col.JavaName}") + #set ($tmpUncapitalisedJavaName = "${col.UncapitalisedJavaName}") + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [$col.Name] + // - - - - - - - - -/ + protected ${glConditionValueName} getCValue${tmpJavaName}() { + return _myCQ.get${tmpJavaName}(); + } + + #if (${col.isJavaNativeStringObject()}) + #if (${col.isSingleKeyForeignKey()}) + #set ($relatedCQClassName = "${glProjectPrefix}${col.foreignKey.foreignTable.javaName}CQ") + #set ($subQueryPropertyNameInitCap = "${tmpJavaName}_InScopeSubQuery_${col.foreignKey.foreignPropertyNameInitCap}") + #set ($subQueryPropertyName = "${tmpUncapitalisedJavaName}_InScopeSubQuery_${col.foreignKey.foreignPropertyNameInitCap}") + + public void keep${subQueryPropertyNameInitCap}(${relatedCQClassName} subQuery) { + _myCQ.keep${subQueryPropertyNameInitCap}(subQuery); + } + #end + #if (${col.hasSingleKeyReferrer()}) + #foreach ($refferer in $col.SingleKeyReferrers) + #set ($relatedCQClassName = "${glProjectPrefix}${refferer.Table.JavaName}CQ") + #set ($subQueryPropertyNameInitCap = "${tmpJavaName}_InScopeSubQuery_${refferer.ReffererPropertyNameInitCap}") + #set ($subQueryPropertyName = "${tmpUncapitalisedJavaName}_InScopeSubQuery_${refferer.ReffererPropertyNameInitCap}") + + public void keep${subQueryPropertyNameInitCap}(${relatedCQClassName} subQuery) { + _myCQ.keep${subQueryPropertyNameInitCap}(subQuery); + } + #end + #end + #if (${col.hasSingleKeyReferrer()}) + #foreach ($refferer in $col.SingleKeyReferrers) + #if (!$refferer.isSelfReference()) + #set ($relatedCQClassName = "${glProjectPrefix}${refferer.Table.JavaName}CQ") + #set ($subQueryPropertyNameInitCap = "${tmpJavaName}_ExistsSubQuery_${refferer.ReffererPropertyNameInitCap}") + #set ($subQueryPropertyName = "${tmpUncapitalisedJavaName}_ExistsSubQuery_${refferer.ReffererPropertyNameInitCap}") + + public void keep${subQueryPropertyNameInitCap}(${relatedCQClassName} subQuery) { + throw new UnsupportedOperationException("ExistsSubQuery at inline() is unsupported! Sorry!"); + // _myCQ.keep${subQueryPropertyNameInitCap}(subQuery); + } + #end + #end + #end + #end + #if (${col.isJavaNativeNumberObject()}) + #if (${col.isSingleKeyForeignKey()}) + #set ($relatedCQClassName = "${glProjectPrefix}${col.foreignKey.foreignTable.javaName}CQ") + #set ($subQueryPropertyNameInitCap = "${tmpJavaName}_InScopeSubQuery_${col.foreignKey.foreignPropertyNameInitCap}") + #set ($subQueryPropertyName = "${tmpUncapitalisedJavaName}_InScopeSubQuery_${col.foreignKey.foreignPropertyNameInitCap}") + + public void keep${subQueryPropertyNameInitCap}(${relatedCQClassName} subQuery) { + _myCQ.keep${subQueryPropertyNameInitCap}(subQuery); + } + #end + #if (${col.hasSingleKeyReferrer()}) + #foreach ($refferer in $col.SingleKeyReferrers) + #set ($relatedCQClassName = "${glProjectPrefix}${refferer.Table.JavaName}CQ") + #set ($subQueryPropertyNameInitCap = "${tmpJavaName}_InScopeSubQuery_${refferer.ReffererPropertyNameInitCap}") + #set ($subQueryPropertyName = "${tmpUncapitalisedJavaName}_InScopeSubQuery_${refferer.ReffererPropertyNameInitCap}") + + public void keep${subQueryPropertyNameInitCap}(${relatedCQClassName} subQuery) { + _myCQ.keep${subQueryPropertyNameInitCap}(subQuery); + } + #end + #end + #if (${col.hasSingleKeyReferrer()}) + #foreach ($refferer in $col.SingleKeyReferrers) + #if (!$refferer.isSelfReference()) + #set ($relatedCQClassName = "${glProjectPrefix}${refferer.Table.JavaName}CQ") + #set ($subQueryPropertyNameInitCap = "${tmpJavaName}_ExistsSubQuery_${refferer.ReffererPropertyNameInitCap}") + #set ($subQueryPropertyName = "${tmpUncapitalisedJavaName}_ExistsSubQuery_${refferer.ReffererPropertyNameInitCap}") + + public void keep${subQueryPropertyNameInitCap}(${relatedCQClassName} subQuery) { + throw new UnsupportedOperationException("ExistsSubQuery at inline() is unsupported! Sorry!"); + // _myCQ.keep${subQueryPropertyNameInitCap}(subQuery); + } + #end + #end + #end + #end + #if (${col.isJavaNativeDateObject()}) + #end + #if (${col.isJavaNativeBooleanObject()}) + #end + #if (${col.isJavaNativeBinaryObject()}) + #end + #if (!${col.isNotNull()}) + #end + #if (!${col.isJavaNativeBinaryObject()}) + #end + #end + +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/cbean/BsConditionQuery.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/cbean/BsConditionQuery.vm 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/cbean/BsConditionQuery.vm 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,847 @@ +#set ($myClassName = "") +#if ($database.isJavaDirOnlyOne()) + +package ${glPackageBaseCQ}; + +import ${glPackageCQ}.*; + #set ($myClassName = "${myBaseConditionQueryClassName}") +#else + +package ${glPackageCQ}; + +import ${glPackageBaseCQ}.*; + #set ($myClassName = "${myConditionQueryClassName}") +#end +#if ($database.hasClassificationDefinitionMap()) + +import ${glPackageBaseCommon}.${glClassificationDefinition}; +#end + +import ${glPackageBaseCommonCBean}.*; +import ${glPackageBaseCommonCKey}.*; +import ${glPackageBaseCommonCValue}.${glConditionValueName}; +import ${glPackageBaseCommonSqlClause}.${glSqlClauseName}; +import ${glPackageCIQ}.*; + +/** + * The condition-query of ${table.name}. + * + * @author ${database.ClassAuthor} + */ +public class ${myClassName} extends ${myAbstractBaseConditionQueryClassName} { + + // =================================================================================== + // Attribute + // ========= + /** Corresponding inline query. */ + protected ${myConditionInlineQueryClassName} _inlineQuery; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param childQuery Child query as abstract class. (Nullable: If null, this is base instance.) + * @param sqlClause SQL clause instance. (NotNull) + * @param aliasName My alias name. (NotNull) + * @param nestLevel Nest level. + */ + public ${myClassName}(${glConditionQueryInterfaceName} childQuery, ${glSqlClauseName} sqlClause, String aliasName, int nestLevel) { + super(childQuery, sqlClause, aliasName, nestLevel); + } + + // =================================================================================== + // Inline + // ====== + /** + * Get inline query. + * + * @return Inline query. (NotNull) + */ + public ${myConditionInlineQueryClassName} inline() { + if (_inlineQuery == null) { + _inlineQuery = new ${myConditionInlineQueryClassName}(getChildQuery(), getSqlClause(), getAliasName(), getNestLevel(), this); + } + return _inlineQuery; + } + + // =================================================================================== + // Include-as-Mine + // =============== + #foreach ($col in $table.Columns) + + /** + * Include select-column of ${col.UncapitalisedJavaName} as mine. + * Alias name is java-name of this column. + * Be careful to whether your table have the same column. + */ + public void includeAsMine_${col.JavaName}() { + registerIncludedSelectColumn("${col.JavaName}", getRealColumnName("${col.Name}")); + } + + /** + * Include select-column of ${col.UncapitalisedJavaName} as mine. + * + * @param aliasName Alias name. {select columnName as aliasName from ...} This should not contain comma. (NotNull) + */ + public void includeAsMine_${col.JavaName}(String aliasName) { + registerIncludedSelectColumn(aliasName, getRealColumnName("${col.Name}")); + } + #end + + // =================================================================================== + // Query + // ===== + // /* * * * * * * * * * * * * * * * * * * * * * * + // MyTable = [$table.Name] + // * * * * * * * * */ + #foreach ($col in $table.Columns) + #set ($tmpJavaName = "${col.JavaName}") + #set ($tmpUncapitalisedJavaName = "${col.UncapitalisedJavaName}") + + // /- - - - - - - - - - - - - - - - - - - - - - - + // Column = [$col.Name] + // - - - - - - - - -/ + + /** The attribute of ${col.UncapitalisedJavaName}. */ + protected ${glConditionValueName} _${tmpUncapitalisedJavaName}; + + /** + * Get the value of ${col.UncapitalisedJavaName}. + * + * @return The value of ${col.UncapitalisedJavaName}. + */ + public ${glConditionValueName} get${tmpJavaName}() { + if (_${tmpUncapitalisedJavaName} == null) { + _${tmpUncapitalisedJavaName} = new ${glConditionValueName}(); + } + return _${tmpUncapitalisedJavaName}; + } + + protected ${glConditionValueName} getCValue${tmpJavaName}() { + return get${tmpJavaName}(); + } + + #if (${col.isJavaNativeStringObject()}) + #if ($database.isMakeDeprecated()) + + /** + * Set the value of ${col.UncapitalisedJavaName} using equal as inline. { = } + * If the value is null or empty-string, this condition is ignored. + * + * @param value The value of ${col.UncapitalisedJavaName} as equal. + * @deprecated This method is deprecated. Please use query().inline().setXxx_Xxx()! + */ + public void set${tmpJavaName}_Equal_AsInline($col.JavaNative value) { + registerInline${tmpJavaName}(${glConditionKeyName}.CK_EQUAL, filterRemoveEmptyString(value)); + } + #if (${col.hasClassification()}) + #foreach ($classificationMap in $col.ClassificationMapList) + + /** + * Set the value of ${classificationMap.get('name')} of ${col.UncapitalisedJavaName} as equal as inline. { = } + * + * @deprecated This method is deprecated. Please use query().inline().setXxx_Xxx()! + */ + public void set${tmpJavaName}_Equal_${classificationMap.get('name')}_AsInline() { + registerInline${tmpJavaName}(${glConditionKeyName}.CK_EQUAL, ${glClassificationDefinition}.CODE_${col.ClassificationName}_${classificationMap.get('name')}); + } + #end + #end + + /** + * Set the value of ${col.UncapitalisedJavaName} using notEqual as inline. { != } + * If the value is null or empty-string, this condition is ignored. + * + * @param value The value of ${col.UncapitalisedJavaName} as notEqual. + * @deprecated This method is deprecated. Please use query().inline().setXxx_Xxx()! + */ + public void set${tmpJavaName}_NotEqual_AsInline($col.JavaNative value) { + registerInline${tmpJavaName}(${glConditionKeyName}.CK_NOT_EQUAL, filterRemoveEmptyString(value)); + } + + /** + * Set the value of ${col.UncapitalisedJavaName} using greaterThan as inline. { > } + * If the value is null or empty-string, this condition is ignored. + * + * @param value The value of ${col.UncapitalisedJavaName} as greaterThan. + * @deprecated This method is deprecated. Please use query().inline().setXxx_Xxx()! + */ + public void set${tmpJavaName}_GreaterThan_AsInline($col.JavaNative value) { + registerInline${tmpJavaName}(${glConditionKeyName}.CK_GREATER_THAN, filterRemoveEmptyString(value)); + } + + /** + * Set the value of ${col.UncapitalisedJavaName} using lessThan as inline. { < } + * If the value is null or empty-string, this condition is ignored. + * + * @param value The value of ${col.UncapitalisedJavaName} as lessThan. + * @deprecated This method is deprecated. Please use query().inline().setXxx_Xxx()! + */ + public void set${tmpJavaName}_LessThan_AsInline($col.JavaNative value) { + registerInline${tmpJavaName}(${glConditionKeyName}.CK_LESS_THAN, filterRemoveEmptyString(value)); + } + + /** + * Set the value of ${col.UncapitalisedJavaName} using greaterEqual as inline. { >= } + * If the value is null or empty-string, this condition is ignored. + * + * @param value The value of ${col.UncapitalisedJavaName} as greaterEqual. + * @deprecated This method is deprecated. Please use query().inline().setXxx_Xxx()! + */ + public void set${tmpJavaName}_GreaterEqual_AsInline($col.JavaNative value) { + registerInline${tmpJavaName}(${glConditionKeyName}.CK_GREATER_EQUAL, filterRemoveEmptyString(value)); + } + + /** + * Set the value of ${col.UncapitalisedJavaName} using lessEqual as inline. { <= } + * If the value is null or empty-string, this condition is ignored. + * + * @param value The value of ${col.UncapitalisedJavaName} as lessEqual. + * @deprecated This method is deprecated. Please use query().inline().setXxx_Xxx()! + */ + public void set${tmpJavaName}_LessEqual_AsInline($col.JavaNative value) { + registerInline${tmpJavaName}(${glConditionKeyName}.CK_LESS_EQUAL, filterRemoveEmptyString(value)); + } + + /** + * Set the value of ${col.UncapitalisedJavaName} using prefixSearch as inline. { like 'xxx%' } + * If the value is null or empty-string, this condition is ignored. + * + * @param value The value of ${col.UncapitalisedJavaName} as prefixSearch. + * @deprecated This method is deprecated. Please use query().inline().setXxx_Xxx()! + */ + public void set${tmpJavaName}_PrefixSearch_AsInline($col.JavaNative value) { + registerInline${tmpJavaName}(${glConditionKeyName}.CK_PREFIX_SEARCH, filterRemoveEmptyString(value)); + } + + /** + * Set the value of ${col.UncapitalisedJavaName} using inScope as inline. { in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param valueList The value of ${col.UncapitalisedJavaName} as inScope. + * @deprecated This method is deprecated. Please use query().inline().setXxx_Xxx()! + */ + public void set${tmpJavaName}_InScope_AsInline(java.util.List${database.filterGenericsString(${col.JavaNative})} valueList) { + registerInline${tmpJavaName}(${glConditionKeyName}.CK_IN_SCOPE, filterRemoveEmptyStringFromList(valueList)); + } + + /** + * Set the value of ${col.UncapitalisedJavaName} using notInScope as inline. { not in ('a', 'b') } + * If the element in the list is null or empty-string, the condition-element is ignored. + * + * @param valueList The value of ${col.UncapitalisedJavaName} as notInScope. + * @deprecated This method is deprecated. Please use query().inline().setXxx_Xxx()! + */ + public void set${tmpJavaName}_NotInScope_AsInline(java.util.List${database.filterGenericsString(${col.JavaNative})} valueList) { + registerInline${tmpJavaName}(${glConditionKeyName}.CK_NOT_IN_SCOPE, filterRemoveEmptyStringFromList(valueList)); + } + #end + #if (${col.isSingleKeyForeignKey()}) + #set ($relatedCQClassName = "${glProjectPrefix}${col.foreignKey.foreignTable.javaName}CQ") + #set ($subQueryPropertyNameInitCap = "${tmpJavaName}_InScopeSubQuery_${col.foreignKey.foreignPropertyNameInitCap}") + #set ($subQueryPropertyName = "${tmpUncapitalisedJavaName}_InScopeSubQuery_${col.foreignKey.foreignPropertyNameInitCap}") + + /** The sub-query of ${subQueryPropertyNameInitCap} using inScopeSubQuery. */ + protected ${relatedCQClassName} _${subQueryPropertyName}; + + /** + * Get the sub-query of ${subQueryPropertyNameInitCap} using inScopeSubQuery. + * + * @return The sub-query of ${subQueryPropertyNameInitCap} using inScopeSubQuery. (Nullable) + */ + public ${relatedCQClassName} get${subQueryPropertyNameInitCap}() { + return _${subQueryPropertyName}; + } + + public void keep${subQueryPropertyNameInitCap}(${relatedCQClassName} subQuery) { + _${subQueryPropertyName} = subQuery; + } + #end + #if (${col.hasSingleKeyReferrer()}) + #foreach ($refferer in $col.SingleKeyReferrers) + #set ($relatedCQClassName = "${glProjectPrefix}${refferer.Table.JavaName}${glConditionQueryInitialName}") + #set ($subQueryPropertyNameInitCap = "${tmpJavaName}_InScopeSubQuery_${refferer.ReffererPropertyNameInitCap}") + #set ($subQueryPropertyName = "${tmpUncapitalisedJavaName}_InScopeSubQuery_${refferer.ReffererPropertyNameInitCap}") + + /** The sub-query of ${subQueryPropertyNameInitCap} using inScopeSubQuery. */ + protected ${relatedCQClassName} _${subQueryPropertyName}; + + /** + * Get the sub-query of ${subQueryPropertyNameInitCap} using inScopeSubQuery. + * + * @return The sub-query of ${subQueryPropertyNameInitCap} using inScopeSubQuery. (Nullable) + */ + public ${relatedCQClassName} get${subQueryPropertyNameInitCap}() { + return _${subQueryPropertyName}; + } + + public void keep${subQueryPropertyNameInitCap}(${relatedCQClassName} subQuery) { + _${subQueryPropertyName} = subQuery; + } + + #if ($database.isMakeDeprecated()) + + /** The sub-query of ${subQueryPropertyNameInitCap} using inScopeSubQuery as inline. */ + protected ${relatedCQClassName} _${subQueryPropertyName}_AsInline; + + /** + * Get the sub-query of ${subQueryPropertyNameInitCap} using inScopeSubQuery as inline. + * + * @return The sub-query of ${subQueryPropertyNameInitCap} using inScopeSubQuery as inline. (Nullable) + * @deprecated This method is deprecated. Please use query().inline().setXxx_Xxx()! + */ + public ${relatedCQClassName} get${subQueryPropertyNameInitCap}_AsInline() { + return _${subQueryPropertyName}_AsInline; + } + + /** + * Set the sub-query of ${subQueryPropertyNameInitCap} using inScopeSubQuery as inline. + * { in (select xxx.${refferer.FirstLocalColumnName} from ${refferer.Table.Name} where ...) } + * This method use from clause and where clause of the sub-query instance. + * this query keep the sub-query instance for query-value. + * After you invoke this, If you set query in the argument[subQuery], the query is ignored. + * + * @param subQuery The sub-query of ${subQueryPropertyNameInitCap} using inScopeSubQuery as inline. (NotNull) + * @deprecated This method is deprecated. Please use query().inline().setXxx_Xxx()! + */ + public void set${subQueryPropertyNameInitCap}_AsInline(${relatedCQClassName} subQuery) { + assertObjectNotNull("subQuery", subQuery); + _${subQueryPropertyName}_AsInline = subQuery;// for saving query-value. + registerInlineInScopeSubQuery(subQuery, COL_${col.Name}, "${refferer.FirstLocalColumnName}", "${subQueryPropertyName}_AsInline"); + } + #end + #end + #end + #if (${col.hasSingleKeyReferrer()}) + #foreach ($refferer in $col.SingleKeyReferrers) + #if (!$refferer.isSelfReference()) + #set ($relatedCQClassName = "${glProjectPrefix}${refferer.Table.JavaName}${glConditionQueryInitialName}") + #set ($subQueryPropertyNameInitCap = "${tmpJavaName}_ExistsSubQuery_${refferer.ReffererPropertyNameInitCap}") + #set ($subQueryPropertyName = "${tmpUncapitalisedJavaName}_ExistsSubQuery_${refferer.ReffererPropertyNameInitCap}") + + /** The sub-query of ${subQueryPropertyNameInitCap} using existsSubQuery. */ + protected ${relatedCQClassName} _${subQueryPropertyName}; + + /** + * Get the sub-query of ${subQueryPropertyNameInitCap} using existsSubQuery. + * + * @return The sub-query of ${subQueryPropertyNameInitCap} using inScopeSubQuery. (Nullable) + */ + public ${relatedCQClassName} get${subQueryPropertyNameInitCap}() { + return _${subQueryPropertyName}; + } + + public void keep${subQueryPropertyNameInitCap}(${relatedCQClassName} subQuery) { + _${subQueryPropertyName} = subQuery; + } + #end + #end + #end + #end + #if (${col.isJavaNativeNumberObject()}) + #if ($database.isMakeDeprecated()) + + /** + * Set the value of ${col.UncapitalisedJavaName} using equal as inline. { = } + * + * @param value The value of ${col.UncapitalisedJavaName} as equal. + * @deprecated This method is deprecated. Please use query().inline().setXxx_Xxx()! + */ + public void set${tmpJavaName}_Equal_AsInline($col.JavaNative value) { + registerInline${tmpJavaName}(${glConditionKeyName}.CK_EQUAL, value); + } + + /** + * Set the value of ${col.UncapitalisedJavaName} using equal as inline. { = } + * + * @param value The value of ${col.UncapitalisedJavaName} as equal. + * @deprecated This method is deprecated. Please use query().inline().setXxx_Xxx()! + */ + public void set${tmpJavaName}_Equal_AsInline(long value) { + registerInline${tmpJavaName}(${glConditionKeyName}.CK_EQUAL, new ${col.JavaNative}(String.valueOf(value))); + } + #if (${col.hasClassification()}) + #foreach ($classificationMap in $col.ClassificationMapList) + + /** + * Set the value of ${classificationMap.get('name')} of ${col.UncapitalisedJavaName} as equal as inline. { = } + * + * @deprecated This method is deprecated. Please use query().inline().setXxx_Xxx()! + */ + public void set${tmpJavaName}_Equal_${classificationMap.get('name')}_AsInline() { + final String code = ${glClassificationDefinition}.CODE_${col.ClassificationName}_${classificationMap.get('name')}; + registerInline${tmpJavaName}(${glConditionKeyName}.CK_EQUAL, new ${col.JavaNative}(code)); + } + #end + #end + + /** + * Set the value of ${col.UncapitalisedJavaName} using notEqual as inline. { != } + * + * @param value The value of ${col.UncapitalisedJavaName} as notEqual. + * @deprecated This method is deprecated. Please use query().inline().setXxx_Xxx()! + */ + public void set${tmpJavaName}_NotEqual_AsInline($col.JavaNative value) { + registerInline${tmpJavaName}(${glConditionKeyName}.CK_NOT_EQUAL, value); + } + + /** + * Set the value of ${col.UncapitalisedJavaName} using notEqual as inline. { != } + * + * @param value The value of ${col.UncapitalisedJavaName} as notEqual. + * @deprecated This method is deprecated. Please use query().inline().setXxx_Xxx()! + */ + public void set${tmpJavaName}_NotEqual_AsInline(long value) { + registerInline${tmpJavaName}(${glConditionKeyName}.CK_NOT_EQUAL, new ${col.JavaNative}(String.valueOf(value))); + } + + /** + * Set the value of ${col.UncapitalisedJavaName} using greaterThan as inline. { > } + * + * @param value The value of ${col.UncapitalisedJavaName} as greaterThan. + * @deprecated This method is deprecated. Please use query().inline().setXxx_Xxx()! + */ + public void set${tmpJavaName}_GreaterThan_AsInline($col.JavaNative value) { + registerInline${tmpJavaName}(${glConditionKeyName}.CK_GREATER_THAN, value); + } + + /** + * Set the value of ${col.UncapitalisedJavaName} using greaterThan as inline. { > } + * + * @param value The value of ${col.UncapitalisedJavaName} as greaterThan. + * @deprecated This method is deprecated. Please use query().inline().setXxx_Xxx()! + */ + public void set${tmpJavaName}_GreaterThan_AsInline(long value) { + registerInline${tmpJavaName}(${glConditionKeyName}.CK_GREATER_THAN, new ${col.JavaNative}(String.valueOf(value))); + } + + /** + * Set the value of ${col.UncapitalisedJavaName} using lessThan as inline. { < } + * + * @param value The value of ${col.UncapitalisedJavaName} as lessThan. + * @deprecated This method is deprecated. Please use query().inline().setXxx_Xxx()! + */ + public void set${tmpJavaName}_LessThan_AsInline($col.JavaNative value) { + registerInline${tmpJavaName}(${glConditionKeyName}.CK_LESS_THAN, value); + } + + /** + * Set the value of ${col.UncapitalisedJavaName} using lessThan as inline. { < } + * + * @param value The value of ${col.UncapitalisedJavaName} as lessThan. + * @deprecated This method is deprecated. Please use query().inline().setXxx_Xxx()! + */ + public void set${tmpJavaName}_LessThan_AsInline(long value) { + registerInline${tmpJavaName}(${glConditionKeyName}.CK_LESS_THAN, new ${col.JavaNative}(String.valueOf(value))); + } + + /** + * Set the value of ${col.UncapitalisedJavaName} using greaterEqual as inline. { >= } + * + * @param value The value of ${col.UncapitalisedJavaName} as greaterEqual. + * @deprecated This method is deprecated. Please use query().inline().setXxx_Xxx()! + */ + public void set${tmpJavaName}_GreaterEqual_AsInline($col.JavaNative value) { + registerInline${tmpJavaName}(${glConditionKeyName}.CK_GREATER_EQUAL, value); + } + + /** + * Set the value of ${col.UncapitalisedJavaName} using greaterEqual as inline. { >= } + * + * @param value The value of ${col.UncapitalisedJavaName} as greaterEqual. + * @deprecated This method is deprecated. Please use query().inline().setXxx_Xxx()! + */ + public void set${tmpJavaName}_GreaterEqual_AsInline(long value) { + registerInline${tmpJavaName}(${glConditionKeyName}.CK_GREATER_EQUAL, new ${col.JavaNative}(String.valueOf(value))); + } + + /** + * Set the value of ${col.UncapitalisedJavaName} using lessEqual as inline. { <= } + * + * @param value The value of ${col.UncapitalisedJavaName} as lessEqual. + * @deprecated This method is deprecated. Please use query().inline().setXxx_Xxx()! + */ + public void set${tmpJavaName}_LessEqual_AsInline($col.JavaNative value) { + registerInline${tmpJavaName}(${glConditionKeyName}.CK_LESS_EQUAL, value); + } + + /** + * Set the value of ${col.UncapitalisedJavaName} using lessEqual as inline. { <= } + * + * @param value The value of ${col.UncapitalisedJavaName} as lessEqual. + * @deprecated This method is deprecated. Please use query().inline().setXxx_Xxx()! + */ + public void set${tmpJavaName}_LessEqual_AsInline(long value) { + registerInline${tmpJavaName}(${glConditionKeyName}.CK_LESS_EQUAL, new ${col.JavaNative}(String.valueOf(value))); + } + #end + #if (${col.isSingleKeyForeignKey()}) + #set ($relatedCQClassName = "${glProjectPrefix}${col.foreignKey.foreignTable.javaName}CQ") + #set ($subQueryPropertyNameInitCap = "${tmpJavaName}_InScopeSubQuery_${col.foreignKey.foreignPropertyNameInitCap}") + #set ($subQueryPropertyName = "${tmpUncapitalisedJavaName}_InScopeSubQuery_${col.foreignKey.foreignPropertyNameInitCap}") + + /** The sub-query of ${subQueryPropertyNameInitCap} using inScopeSubQuery. */ + protected ${relatedCQClassName} _${subQueryPropertyName}; + + /** + * Get the sub-query of ${subQueryPropertyNameInitCap} using inScopeSubQuery. + * + * @return The sub-query of ${subQueryPropertyNameInitCap} using inScopeSubQuery. (Nullable) + */ + public ${relatedCQClassName} get${subQueryPropertyNameInitCap}() { + return _${subQueryPropertyName}; + } + + public void keep${subQueryPropertyNameInitCap}(${relatedCQClassName} subQuery) { + _${subQueryPropertyName} = subQuery; + } + #end + #if (${col.hasSingleKeyReferrer()}) + #foreach ($refferer in $col.SingleKeyReferrers) + #set ($relatedCQClassName = "${glProjectPrefix}${refferer.Table.JavaName}${glConditionQueryInitialName}") + #set ($subQueryPropertyNameInitCap = "${tmpJavaName}_InScopeSubQuery_${refferer.ReffererPropertyNameInitCap}") + #set ($subQueryPropertyName = "${tmpUncapitalisedJavaName}_InScopeSubQuery_${refferer.ReffererPropertyNameInitCap}") + + /** The sub-query of ${subQueryPropertyNameInitCap} using inScopeSubQuery. */ + protected ${relatedCQClassName} _${subQueryPropertyName}; + + /** + * Get the sub-query of ${subQueryPropertyNameInitCap} using inScopeSubQuery. + * + * @return The sub-query of ${subQueryPropertyNameInitCap} using inScopeSubQuery. (Nullable) + */ + public ${relatedCQClassName} get${subQueryPropertyNameInitCap}() { + return _${subQueryPropertyName}; + } + + public void keep${subQueryPropertyNameInitCap}(${relatedCQClassName} subQuery) { + _${subQueryPropertyName} = subQuery; + } + #if ($database.isMakeDeprecated()) + + /** The sub-query of ${subQueryPropertyNameInitCap} using inScopeSubQuery as inline. */ + protected ${relatedCQClassName} _${subQueryPropertyName}_AsInline; + + /** + * Get the sub-query of ${subQueryPropertyNameInitCap} using inScopeSubQuery as inline. + * + * @return The sub-query of ${subQueryPropertyNameInitCap} using inScopeSubQuery as inline. (Nullable) + * @deprecated This method is deprecated. Please use query().inline().setXxx_Xxx()! + */ + public ${relatedCQClassName} get${subQueryPropertyNameInitCap}_AsInline() { + return _${subQueryPropertyName}_AsInline; + } + + /** + * Set the sub-query of ${subQueryPropertyNameInitCap} using inScopeSubQuery as inline. + * { in (select xxx.${refferer.FirstLocalColumnName} from ${refferer.Table.Name} where ...) } + * This method use from clause and where clause of the sub-query instance. + * this query keep the sub-query instance for query-value. + * After you invoke this, If you set query in the argument[subQuery], the query is ignored. + * + * @param subQuery The sub-query of ${subQueryPropertyNameInitCap} using inScopeSubQuery as inline. (NotNull) + * @deprecated This method is deprecated. Please use query().inline().setXxx_Xxx()! + */ + public void set${subQueryPropertyNameInitCap}_AsInline(${relatedCQClassName} subQuery) { + assertObjectNotNull("subQuery", subQuery); + _${subQueryPropertyName}_AsInline = subQuery;// for saving query-value. + registerInlineInScopeSubQuery(subQuery, COL_${col.Name}, "${refferer.FirstLocalColumnName}", "${subQueryPropertyName}_AsInline"); + } + #end + #end + #end + #if (${col.hasSingleKeyReferrer()}) + #foreach ($refferer in $col.SingleKeyReferrers) + #if (!$refferer.isSelfReference()) + #set ($relatedCQClassName = "${glProjectPrefix}${refferer.Table.JavaName}${glConditionQueryInitialName}") + #set ($subQueryPropertyNameInitCap = "${tmpJavaName}_ExistsSubQuery_${refferer.ReffererPropertyNameInitCap}") + #set ($subQueryPropertyName = "${tmpUncapitalisedJavaName}_ExistsSubQuery_${refferer.ReffererPropertyNameInitCap}") + + /** The sub-query of ${subQueryPropertyNameInitCap} using existsSubQuery. */ + protected ${relatedCQClassName} _${subQueryPropertyName}; + + /** + * Get the sub-query of ${subQueryPropertyNameInitCap} using existsSubQuery. + * + * @return The sub-query of ${subQueryPropertyNameInitCap} using existsSubQuery. (Nullable) + */ + public ${relatedCQClassName} get${subQueryPropertyNameInitCap}() { + return _${subQueryPropertyName}; + } + + public void keep${subQueryPropertyNameInitCap}(${relatedCQClassName} subQuery) { + _${subQueryPropertyName} = subQuery; + } + #end + #end + #end + #end + #if (${col.isJavaNativeDateObject()}) + #if ($database.isMakeDeprecated()) + + /** + * Set the value of ${col.UncapitalisedJavaName} using equal as inline. { = } + * + * @param value The value of ${col.UncapitalisedJavaName} as equal. + * @deprecated This method is deprecated. Please use query().inline().setXxx_Xxx()! + */ + public void set${tmpJavaName}_Equal_AsInline($col.JavaNative value) { + registerInline${tmpJavaName}(${glConditionKeyName}.CK_EQUAL, value); + } + + /** + * Set the value of ${col.UncapitalisedJavaName} using notEqual as inline. { != } + * + * @param value The value of ${col.UncapitalisedJavaName} as notEqual. + * @deprecated This method is deprecated. Please use query().inline().setXxx_Xxx()! + */ + public void set${tmpJavaName}_NotEqual_AsInline($col.JavaNative value) { + registerInline${tmpJavaName}(${glConditionKeyName}.CK_NOT_EQUAL, value); + } + + /** + * Set the value of ${col.UncapitalisedJavaName} using greaterThan as inline. { > } + * + * @param value The value of ${col.UncapitalisedJavaName} as greaterThan. + * @deprecated This method is deprecated. Please use query().inline().setXxx_Xxx()! + */ + public void set${tmpJavaName}_GreaterThan_AsInline($col.JavaNative value) { + registerInline${tmpJavaName}(${glConditionKeyName}.CK_GREATER_THAN, value); + } + + /** + * Set the value of ${col.UncapitalisedJavaName} using lessThan as inline. { < } + * + * @param value The value of ${col.UncapitalisedJavaName} as lessThan. + * @deprecated This method is deprecated. Please use query().inline().setXxx_Xxx()! + */ + public void set${tmpJavaName}_LessThan_AsInline($col.JavaNative value) { + registerInline${tmpJavaName}(${glConditionKeyName}.CK_LESS_THAN, value); + } + + /** + * Set the value of ${col.UncapitalisedJavaName} using greaterEqual as inline. { >= } + * + * @param value The value of ${col.UncapitalisedJavaName} as greaterEqual. + * @deprecated This method is deprecated. Please use query().inline().setXxx_Xxx()! + */ + public void set${tmpJavaName}_GreaterEqual_AsInline($col.JavaNative value) { + registerInline${tmpJavaName}(${glConditionKeyName}.CK_GREATER_EQUAL, value); + } + + /** + * Set the value of ${col.UncapitalisedJavaName} using lessEqual as inline. { <= } + * + * @param value The value of ${col.UncapitalisedJavaName} as lessEqual. + * @deprecated This method is deprecated. Please use query().inline().setXxx_Xxx()! + */ + public void set${tmpJavaName}_LessEqual_AsInline($col.JavaNative value) { + registerInline${tmpJavaName}(${glConditionKeyName}.CK_LESS_EQUAL, value); + } + #end + #end + #if (${col.isJavaNativeBooleanObject()}) + #end + #if (${col.isJavaNativeBinaryObject()}) + #end + #if (!${col.isNotNull()}) + #end + #if (!${col.isJavaNativeBinaryObject()}) + + /** + * Add order-by of ${col.UncapitalisedJavaName} as ASC. + * + * @return this. (NotNull) + */ + public ${myClassName} addOrderBy_${tmpJavaName}_Asc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_${col.Name}), null, true);return this; + } + + /** + * Add order-by of ${col.UncapitalisedJavaName} as DESC. + * + * @return this. (NotNull) + */ + public ${myClassName} addOrderBy_${tmpJavaName}_Desc() { + getSqlClause().registerOrderBy(getRealColumnName(COL_${col.Name}), null, false);return this; + } + #end + #end + + // =================================================================================== + // Union Query + // =========== + protected void reflectRelationOnUnionQuery(${glConditionQueryInterfaceName} baseQueryAsSuper, ${glConditionQueryInterfaceName} unionQueryAsSuper) { + final ${myConditionQueryClassName} baseQuery = (${myConditionQueryClassName})baseQueryAsSuper; + final ${myConditionQueryClassName} unionQuery = (${myConditionQueryClassName})unionQueryAsSuper; + #foreach ($foreignKeys in $table.ForeignKeys) + + if (baseQuery.hasConditionQuery${foreignKeys.foreignPropertyNameInitCap}()) { + unionQuery.query${foreignKeys.foreignPropertyNameInitCap}().reflectRelationOnUnionQuery(baseQuery.query${foreignKeys.foreignPropertyNameInitCap}(), unionQuery.query${foreignKeys.foreignPropertyNameInitCap}()); + } + #end + #foreach ($refferer in $table.Referrers) + #if (${refferer.isOneToOne()}) + + if (baseQuery.hasConditionQuery${refferer.reffererPropertyNameInitCapAsOne}()) { + unionQuery.query${refferer.reffererPropertyNameInitCapAsOne}().reflectRelationOnUnionQuery(baseQuery.query${refferer.reffererPropertyNameInitCapAsOne}(), unionQuery.query${refferer.reffererPropertyNameInitCapAsOne}()); + } + #end + #end + + } + + // =================================================================================== + // Foreign Query + // ============= + #foreach ($foreignKeys in $table.ForeignKeys) + #set ($foreignCQClassName = "${glProjectPrefix}${foreignKeys.foreignTable.JavaName}${glConditionQueryInitialName}") + + // /* * * * * * * * * * * * * * * * * * * * * * * + // ForeignTable = [${foreignKeys.ForeignTable.Name}] + // ForeignProperty = [${foreignKeys.ForeignPropertyName}] + // * * * * * * * * */ + + /** + * Query for ${foreignKeys.ForeignPropertyName}. + * + * @return Instance of ${foreignCQClassName} as ${foreignKeys.ForeignPropertyName}. (NotNull) + */ + public ${foreignCQClassName} query${foreignKeys.ForeignPropertyNameInitCap}() { + return getConditionQuery${foreignKeys.ForeignPropertyNameInitCap}(); + } + + /** Condition-query for ${foreignKeys.ForeignPropertyName}. */ + protected ${foreignCQClassName} _conditionQuery${foreignKeys.ForeignPropertyNameInitCap}; + + /** + * Get condition-query for ${foreignKeys.ForeignPropertyName}. + * + * @return Instance of ${foreignCQClassName} as ${foreignKeys.ForeignPropertyName}. (NotNull) + */ + public ${foreignCQClassName} getConditionQuery${foreignKeys.ForeignPropertyNameInitCap}() { + if (_conditionQuery${foreignKeys.foreignPropertyNameInitCap} == null) { + _conditionQuery${foreignKeys.foreignPropertyNameInitCap} = newQuery${foreignKeys.ForeignPropertyNameInitCap}(); + setupOuterJoin_${foreignKeys.foreignPropertyNameInitCap}(); + } + return _conditionQuery${foreignKeys.ForeignPropertyNameInitCap}; + } + + /** + * Setup outer join for ${foreignPropertyName}. + */ + protected void setupOuterJoin_${foreignKeys.ForeignPropertyNameInitCap}() { + final java.util.Map${database.filterGenericsString('String, String')} joinOnMap = new java.util.LinkedHashMap${database.filterGenericsString('String, String')}(); + String key = null; + String value = null; + #foreach ($columnName in $foreignKeys.LocalColumns) + #set ($localColumn = $table.getColumn($columnName)) + #set ($foreignColumnName = $foreignKeys.getLocalForeignMapping().get($columnName)) + + key = getRealColumnName("${localColumn.Name}"); + value = getConditionQuery${foreignKeys.ForeignPropertyNameInitCap}().getRealColumnName("${foreignColumnName}"); + joinOnMap.put(key, value); + #end + + final String joinTableName = "${foreignKeys.foreignTable.Name}"; + final String aliasName = getConditionQuery${foreignKeys.ForeignPropertyNameInitCap}().getRealAliasName(); + getSqlClause().registerOuterJoin(joinTableName, aliasName, joinOnMap); + } + + /** + * New query for ${foreignKeys.ForeignPropertyName}. + * + * @return Query for ${foreignKeys.ForeignPropertyName}. (NotNull) + */ + protected ${foreignCQClassName} newQuery${foreignKeys.ForeignPropertyNameInitCap}() { + return new ${foreignCQClassName}(this, getSqlClause(), "${foreignKeys.ForeignPropertyNameInitCap}", getNextNestLevel()); + } + + /** + * Has condition query? + * + * @return Determination. + */ + public boolean hasConditionQuery${foreignKeys.ForeignPropertyNameInitCap}() { + return _conditionQuery${foreignKeys.ForeignPropertyNameInitCap} != null; + } + #end + + #foreach ($refferer in $table.Referrers) + #set ($relatedCQClassName = "${glProjectPrefix}${refferer.Table.JavaName}${glConditionQueryInitialName}") + #if (${refferer.isOneToOne()}) + + // /* * * * * * * * * * * * * * * * * * * * * * * {as one} + // ReffererTable = [${refferer.Table.Name}] + // ReffererProperty = [${refferer.ReffererPropertyNameAsOne}] + // * * * * * * * * */ + + /** + * Query for ${refferer.ReffererPropertyNameAsOne}. + * + * @return Instance of ${relatedCQClassName} as ${refferer.ReffererPropertyNameAsOne}. (NotNull) + */ + public ${relatedCQClassName} query${refferer.ReffererPropertyNameInitCapAsOne}() { + return getConditionQuery${refferer.ReffererPropertyNameInitCapAsOne}(); + } + + /** Condition-query for ${refferer.ReffererPropertyNameAsOne}. */ + protected ${relatedCQClassName} _conditionQuery${refferer.ReffererPropertyNameInitCapAsOne}; + + /** + * Get condition-query for ${refferer.ReffererPropertyNameAsOne}. + * + * @return Instance of ${relatedCQClassName} as ${refferer.ReffererPropertyNameAsOne}. (NotNull) + */ + public ${relatedCQClassName} getConditionQuery${refferer.ReffererPropertyNameInitCapAsOne}() { + if (_conditionQuery${refferer.ReffererPropertyNameInitCapAsOne} == null) { + _conditionQuery${refferer.ReffererPropertyNameInitCapAsOne} = newQuery${refferer.ReffererPropertyNameInitCapAsOne}(); + setupOuterJoin_${refferer.ReffererPropertyNameInitCapAsOne}(); + } + return _conditionQuery${refferer.ReffererPropertyNameInitCapAsOne}; + } + + /** + * Setup outer join for ${refferer.ReffererPropertyName}. + */ + protected void setupOuterJoin_${refferer.ReffererPropertyNameInitCapAsOne}() { + final java.util.Map${database.filterGenericsString('String, String')} joinOnMap = new java.util.LinkedHashMap${database.filterGenericsString('String, String')}(); + String key = null; + String value = null; + #foreach ($columnName in $refferer.ForeignColumns) + #set ($foreignColumn = $table.getColumn($columnName)) + #set ($reffererColumnName = $refferer.getLocalForeignMapping().get($columnName)) + + key = getRealColumnName("${foreignColumn.Name}"); + value = getConditionQuery${refferer.ReffererPropertyNameInitCapAsOne}().getRealColumnName("${reffererColumnName}"); + joinOnMap.put(key, value); + #end + + final String joinTableName = "${refferer.Table.Name}"; + final String aliasName = getConditionQuery${refferer.ReffererPropertyNameInitCapAsOne}().getRealAliasName(); + getSqlClause().registerOuterJoin(joinTableName, aliasName, joinOnMap); + } + + /** + * New query for ${refferer.ReffererPropertyNameAsOne}. + * + * @return Query for ${refferer.ReffererPropertyNameAsOne}. (NotNull) + */ + protected ${relatedCQClassName} newQuery${refferer.ReffererPropertyNameInitCapAsOne}() { + return new ${relatedCQClassName}(this, getSqlClause(), "${refferer.ReffererPropertyNameInitCapAsOne}", getNextNestLevel()); + } + + /** + * Has condition query? + * + * @return Determination. + */ + public boolean hasConditionQuery${refferer.ReffererPropertyNameInitCapAsOne}() { + return _conditionQuery${refferer.ReffererPropertyNameInitCapAsOne} != null; + } + #end + #end + +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/cbean/ExConditionBean.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/cbean/ExConditionBean.vm 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/cbean/ExConditionBean.vm 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,11 @@ +package ${glPackageCB}; + +#set ($myClassName = "${myConditionBeanClassName}") + +/** + * The condition-bean of ${table.Name}. + * + * @author ${database.ClassAuthor} + */ +public class ${myClassName} extends ${glPackageBaseCB}.${myBaseConditionBeanClassName} { +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/cbean/ExConditionQuery.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/cbean/ExConditionQuery.vm 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/cbean/ExConditionQuery.vm 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,30 @@ +package ${glPackageCQ}; + +#set ($myClassName = "${myConditionQueryClassName}") + +import ${glPackageBaseCommonCBean}.${glConditionQueryInterfaceName}; +import ${glPackageBaseCommonSqlClause}.${glSqlClauseName}; +import ${glPackageBaseCQ}.${myBaseConditionQueryClassName}; + +/** + * The condition-query of ${table.name}. + * + * @author ${database.ClassAuthor} + */ +public class ${myClassName} extends ${myBaseConditionQueryClassName} { + + // ===================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param childQuery Child query as abstract class. (Nullable: If null, this is base instance.) + * @param sqlClause SQL clause instance. (NotNull) + * @param aliasName My alias name. (NotNull) + * @param nestLevel Nest level. + */ + public ${myClassName}(${glConditionQueryInterfaceName} childQuery, ${glSqlClauseName} sqlClause, String aliasName, int nestLevel) { + super(childQuery, sqlClause, aliasName, nestLevel); + } +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/cbean/NestSelectSetupper.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/cbean/NestSelectSetupper.vm 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/cbean/NestSelectSetupper.vm 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,117 @@ +package ${glPackageNss}; + +#set ($myClassName = "${myNestSelectSetupperClassName}") + +import ${glPackageCQ}.${myConditionQueryClassName}; + + +/** + * The nest select setupper of ${table.name}. + * + * @author ${database.ClassAuthor} + */ +public class ${myClassName} { + + // =================================================================================== + // Attribute + // ========= + /** Base query. */ + protected ${myConditionQueryClassName} _query; + + // =================================================================================== + // Constructor + // =========== + /** + * Constructor. + * + * @param query Base query. (NotNull) + */ + public ${myClassName}(${myConditionQueryClassName} query) { + _query = query; + } + + // =================================================================================== + // Accessor + // ======== + /** + * @deprecated This method is INTERNAL! Please use cb.query().queryXxx().setXxx_Equal()... + */ + public ${myConditionQueryClassName} query() { + return _query; + } + + /** + * Has condition query? + * + * @return Determination. + */ + public boolean hasConditionQuery() { + return _query != null; + } + + // =================================================================================== + // With... + // ======= +#foreach ($foreignKeys in $table.ForeignKeys) + #set ($tmpPropertyName = "${foreignKeys.foreignPropertyName}") + #set ($tmpPropertyNameInitCap = "${foreignKeys.foreignPropertyNameInitCap}") + + /** Is select ${tmpPropertyName}? */ + protected boolean _isSelect${tmpPropertyNameInitCap}; + + /** + * Is select ${tmpPropertyName}? + * + * @return Determination. + */ + public boolean isSelect${tmpPropertyNameInitCap}() { + return _isSelect${tmpPropertyNameInitCap}; + } + + /** + * Set up select with ${tmpPropertyName}. + */ + public void with${tmpPropertyNameInitCap}() { + assertConditionQuery(); + _query.query${tmpPropertyNameInitCap}(); + _isSelect${tmpPropertyNameInitCap} = true; + } +#end +#foreach ($refferer in $table.Referrers) + #if (${refferer.isOneToOne()}) + #set ($tmpPropertyName = "${refferer.reffererPropertyNameAsOne}") + #set ($tmpPropertyNameInitCap = "${refferer.reffererPropertyNameInitCapAsOne}") + + /** Is select ${tmpPropertyName}? */ + protected boolean _isSelect${tmpPropertyNameInitCap}; + + /** + * Is select ${tmpPropertyName}? + * + * @return Determination. + */ + public boolean isSelect${tmpPropertyNameInitCap}() { + return _isSelect${tmpPropertyNameInitCap}; + } + + /** + * Set up select with ${tmpPropertyName}. + */ + public void with${tmpPropertyNameInitCap}() { + assertConditionQuery(); + query().query${tmpPropertyNameInitCap}(); + _isSelect${tmpPropertyNameInitCap} = true; + } + #end +#end + + // =================================================================================== + // Helper + // ====== + protected void assertConditionQuery() { + if (!hasConditionQuery()) { + String msg = "The query should not be null."; + throw new IllegalStateException(msg); + } + } +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/exbhv/ExtendedBhv.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/exbhv/ExtendedBhv.vm 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/exbhv/ExtendedBhv.vm 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,11 @@ +package ${glPackageExtendedBhv}; + +#set ($myClassName = "${myExtendedBhvClassName}") + +/** + * The behavior of ${table.Name}. + * + * @author ${database.ClassAuthor} + */ +public class $myClassName extends ${glPackageBaseBhv}.${myBaseBhvClassName} { +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/exdao/ExParameterBean.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/exdao/ExParameterBean.vm 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/exdao/ExParameterBean.vm 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,11 @@ +package ${glPackageExtendedParameterBean}; + +#set ($myClassName = "${myExtendedParameterBeanClassName}") + +/** + * The parameter-bean of ${pmbClassName}. + * + * @author ${database.ClassAuthor} + */ +public class ${myClassName} extends ${glPackageBaseParameterBean}.${myBaseParameterBeanClassName} { +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/exdao/ExtendedDao.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/exdao/ExtendedDao.vm 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/exdao/ExtendedDao.vm 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,11 @@ +package ${myExtendedDaoPackageName}; + +#set ($myClassName = "${myExtendedDaoClassName}") + +/** + * The dao interface of ${table.Name}. + * + * @author ${database.ClassAuthor} + */ +public interface ${myClassName} extends ${myBaseDaoPackageName}.${myBaseDaoClassName} { +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/exentity/ExtendedEntity.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/exentity/ExtendedEntity.vm 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/exentity/ExtendedEntity.vm 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,14 @@ +package ${myExtendedEntityPackageName}; + +#set ($myClassName = "${myExtendedObjectClassName}") + +/** + * The entity of ${table.Name}. + * + * @author ${database.ClassAuthor} + */ +public class $myClassName extends ${myBaseEntityPackageName}.${myBaseObjectClassName} { + + /** Serial version UID. (Default) */ + private static final long serialVersionUID = 1L; +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/sbean/ArgumentBean.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/sbean/ArgumentBean.vm 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/sbean/ArgumentBean.vm 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,139 @@ +package ${glPackageArgumentBean}; + +#set ($myClassName = "${myArgumentBeanClassName}") + +/** + * The argument-bean of ${myArgumentBeanName}. + * + * @author ${database.ClassAuthor} + */ +public class ${myClassName} { + + // ===================================================================================== + // Static Definition + // ================= +#foreach ($propertyName in $propertyDefinitionMap.keySet()) + + /// The java name of ${propertyName} + public static final String JAVA_NAME_OF_${database.initCap($propertyName)} = "${database.initCap($propertyName)}"; +#end + +#foreach ($propertyName in $propertyDefinitionMap.keySet()) + + /// The property name of ${propertyName} + public static final String PROPERTY_NAME_OF_${database.initCap($propertyName)} = "${propertyName}"; +#end + + // ===================================================================================== + // Attribute + // ========= +#foreach ($propertyName in $propertyDefinitionMap.keySet()) + #set ($propertyJavaNative = $database.getArgumentBeanPropertyType($myArgumentBeanName, $propertyName)) + + /// The value of ${propertyName}. + protected ${propertyJavaNative} _${propertyName}; + + /// Has the setter of ${col.UncapitalisedJavaName} been invoked? + protected boolean _isSetterInvoked${database.initCap($propertyName)}; +#end + + // ===================================================================================== + // Constructor + // =========== + /// + /// Constructor. + /// + /** + * Constructor. + */ + public ${myClassName}() { + } + + // ===================================================================================== + // Getter Setter + // ============= +#foreach ($propertyName in $propertyDefinitionMap.keySet()) + #set ($propertyJavaNative = $database.getArgumentBeanPropertyType($myArgumentBeanName, $propertyName)) + + /** + * Get the value of ${propertyName}. + * + * @return The value of ${propertyName}. + */ + public ${propertyJavaNative} get${database.initCap($propertyName)}() { + return _${propertyName}; + set { _isSetterInvoked${database.initCap($propertyName)} = true; _${propertyName} = value; } + } + + /** + * Set the value of ${propertyName}. + * + * @param value The value of ${propertyName}. + */ + public ${propertyJavaNative} set${database.initCap($propertyName)}(${propertyJavaNative} value) { + _isSetterInvoked${database.initCap($propertyName)} = true; + _${propertyName} = value; + } +#end + + // ===================================================================================== + // Invoking Determination + // ====================== +#foreach ($propertyName in $propertyDefinitionMap.keySet()) + #set ($propertyJavaNative = $database.getArgumentBeanPropertyType($myArgumentBeanName, $propertyName)) + + /** + * Has the setter of ${propertyName} been invoked? + * + * @return Determination. + */ + public boolean isSetterInvoked${database.initCap($propertyName)}() { + return _isSetterInvoked${database.initCap($propertyName)}; + } +#end + +#if (${database.isAvailableSqlParameterBeanGeneration()}) + + // ===================================================================================== + // Prepared SqlParameter + // ===================== + #foreach ($sqlParameterName in $database.getArgumentBeanRelatedSqlParameterSqlParameterNameList($myArgumentBeanName)) + + /// + /// Get prepared parameter bean of ${sqlParameterName}. + /// + public ${glPackageExtendedSqlParameterBean}.${sqlParameterName} generatePreparedSqlParameter${sqlParameterName}() { + final ${glPackageExtendedSqlParameterBean}.${sqlParameterName} pmb = new ${glPackageExtendedSqlParameterBean}.${sqlParameterName}(); + #foreach ($propertyName in $propertyDefinitionMap.keySet()) + #set ($propertyJavaNative = $database.getArgumentBeanPropertyType($myArgumentBeanName, $propertyName)) + #if ($database.isSqlParameterBeanHaveTheProperty($sqlParameterName, $propertyName)) + + pmb.set${database.initCap($propertyName)}(get${database.initCap($propertyName)}); + #end + #end + + return pmb; + } + #end +#end + + // ===================================================================================== + // Basic Override Method + // ===================== + /** + * ${database.OverrideComment} + * + * @return Property-string. (NotNull) + */ + public override String ToString() { + StringBuffer sb = new StringBuffer(); +#foreach ($propertyName in $propertyDefinitionMap.keySet()) + #set ($propertyJavaNative = $database.getArgumentBeanPropertyType($myArgumentBeanName, $propertyName)) + + sb.append(" ${propertyName}=").append(this.${database.initCap($propertyName)}); +#end + + return sb.toString(); + } + } +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/sbean/SqlParameterBeanBs.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/sbean/SqlParameterBeanBs.vm 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/sbean/SqlParameterBeanBs.vm 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,114 @@ +package ${glPackageBaseSqlParameterBean}; + +#set ($myClassName = "${myBaseSqlParameterClassName}") + +/** + * The sql-parametaer-bean of ${mySqlParameterBeanName}. + * + * @author ${database.ClassAuthor} + */ +public class ${myClassName} { + + // ===================================================================================== + // Static Definition + // ================= +#foreach ($propertyName in $propertyDefinitionMap.keySet()) + + /// The java name of ${propertyName} + public static final String JAVA_NAME_OF_${database.initCap($propertyName)} = "${database.initCap($propertyName)}"; +#end + +#foreach ($propertyName in $propertyDefinitionMap.keySet()) + + /// The property name of ${propertyName} + public static final String PROPERTY_NAME_OF_${database.initCap($propertyName)} = "${propertyName}"; +#end + + // ===================================================================================== + // Attribute + // ========= +#foreach ($propertyName in $propertyDefinitionMap.keySet()) + #set ($propertyJavaNative = $database.getSqlParameterBeanPropertyType($mySqlParameterBeanName, $propertyName)) + + /// The value of ${propertyName}. + protected ${propertyJavaNative} _${propertyName}; + + /// Has the setter of ${col.UncapitalisedJavaName} been invoked? + protected boolean _isSetterInvoked${database.initCap($propertyName)}; +#end + + // ===================================================================================== + // Constructor + // =========== + /// + /// Constructor. + /// + /** + * Constructor. + */ + public ${myClassName}() { + } + + // ===================================================================================== + // Getter Setter + // ============= +#foreach ($propertyName in $propertyDefinitionMap.keySet()) + #set ($propertyJavaNative = $database.getSqlParameterBeanPropertyType($mySqlParameterBeanName, $propertyName)) + + /** + * Get the value of ${propertyName}. + * + * @return The value of ${propertyName}. + */ + public ${propertyJavaNative} get${database.initCap($propertyName)}() { + return _${propertyName}; + set { _isSetterInvoked${database.initCap($propertyName)} = true; _${propertyName} = value; } + } + + /** + * Set the value of ${propertyName}. + * + * @param value The value of ${propertyName}. + */ + public ${propertyJavaNative} set${database.initCap($propertyName)}(${propertyJavaNative} value) { + _isSetterInvoked${database.initCap($propertyName)} = true; + _${propertyName} = value; + } +#end + + // ===================================================================================== + // Invoking Determination + // ====================== +#foreach ($propertyName in $propertyDefinitionMap.keySet()) + #set ($propertyJavaNative = $database.getSqlParameterBeanPropertyType($mySqlParameterBeanName, $propertyName)) + + /** + * Has the setter of ${propertyName} been invoked? + * + * @return Determination. + */ + public boolean isSetterInvoked${database.initCap($propertyName)}() { + return _isSetterInvoked${database.initCap($propertyName)}; + } +#end + + // ===================================================================================== + // Basic Override Method + // ===================== + /** + * ${database.OverrideComment} + * + * @return Property-string. (NotNull) + */ + public String toString() { + StringBuffer sb = new StringBuffer(); +#foreach ($propertyName in $propertyDefinitionMap.keySet()) + #set ($propertyJavaNative = $database.getSqlParameterBeanPropertyType($mySqlParameterBeanName, $propertyName)) + + sb.append(" ${propertyName}=").append(this.${database.initCap($propertyName)}); +#end + + return sb.toString(); + } + } +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/sbean/SqlParameterBeanEx.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/sbean/SqlParameterBeanEx.vm 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/java/sbean/SqlParameterBeanEx.vm 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,11 @@ +package ${glPackageExtendedSqlParameterBean}; + +#set ($myClassName = "${myExtendedSqlParameterClassName}") + +/** + * The sql-parameter-bean of ${mySqlParameterBeanName}. + * + * @author ${database.ClassAuthor} + */ +public class ${myClassName} extends ${glPackageBaseSqlParameterBean}.${myBaseSqlParameterClassName} { +} Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/sql2entity-Control.vm =================================================================== --- pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/sql2entity-Control.vm 2007-07-10 13:19:59 UTC (rev 228) +++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/om/sql2entity-Control.vm 2007-07-10 13:21:18 UTC (rev 229) @@ -0,0 +1,174 @@ + + +targetdatabase = $targetDatabase + +## +## Loop by data-model. +## +#foreach ($dataModel in $dataModels) + + ## + ## Loop by database. + ## + #foreach ($database in $dataModel.Databases) + + ## ------------------------------------------------------------------ + ## Global-Paramter + ## --------------- + ## [Language] + #set ($glTargetLanguage = ${database.TargetLanguage}) + + ## [Extension] + #set ($glTemplateFileExtension = ${database.TemplateFileExtension}) + #set ($glClassFileExtension = ${database.ClassFileExtension}) + + ## [Prefix-and-Suffix] + #set ($glProjectPrefix = ${database.ProjectPrefix}) + #set ($glBasePrefix = ${database.BasePrefix}) + #set ($glBaseSuffixForEntity = ${database.BaseSuffixForEntity}) + + #set ($glDaoReadableInterfaceName = "${glProjectPrefix}DaoReadable") + #set ($glDaoWritableInterfaceName = "${glProjectPrefix}DaoWritable") + + ## [Common-Entity] + #set ($glEntityInterfaceName = "${glProjectPrefix}Entity") + #set ($glEntityDefinedCommonColumnInterfaceName = "${glProjectPrefix}EntityDefinedCommonColumn") + + ## [ConditionBean] + #set ($glConditionBeanInterfaceName = "${glProjectPrefix}ConditionBean") + + ## [DBMeta] + #set ($glDBMetaInterfaceName = "${glProjectPrefix}DBMeta") + #set ($glDBMetaAbstractName = "${glProjectPrefix}AbstractDBMeta") + #set ($glDBMetaInstanceHandlerName = "${glProjectPrefix}DBMetaInstanceHandler") + + ## [Helper] + #set ($glMapListStringName = "${glProjectPrefix}MapListString") + #set ($glMapListStringImplName = "${glProjectPrefix}MapListStringImpl") + #set ($glMapStringBuilderName = "${glProjectPrefix}MapStringBuilder") + #set ($glMapStringBuilderImplName = "${glProjectPrefix}MapStringBuilderImpl") + + ## [ClassificationDefinition] + #set ($glClassificationDefinition = "${glProjectPrefix}ClassificationDefinition") + + ## [Package] + #set ($glPackageBaseCommon = "${database.baseCommonPackage}") + #set ($glPackageBaseCommonCBean = "${database.baseCommonPackage}.cbean") + #set ($glPackageBaseCommonDBMeta = "${database.baseCommonPackage}.dbmeta") + #set ($glPackageBaseCommonHelper = "${database.baseCommonPackage}.helper") + #set ($glPackageBaseDao = "${database.baseDaoPackage}" ) + #set ($glPackageBaseEntity = "${database.baseEntityPackage}") + #set ($glPackageExtendedDao = "${database.extendedDaoPackage}") + #set ($glPackageExtendedEntity = "${database.extendedEntityPackage}") + + ## [Other] + #set ($glConditionBeanInitialName = "CB") + #set ($glConditionQueryInitialName = "CQ") + #set ($glAttachedCBArgsVariableName = "cb") + #set ($glParentVariablePrefix = "_parent") + #set ($glChildrenVariablePrefix = "_children") + + ## ----------------------------------------------------------------------------------------------------- + ## Parse cutomize entity + ## --------------------- + ## Setup java directory. + $database.setupJavaDir_for_sql2entity() + + ## for Sql2Entity + #set ($isSql2Entity = true) + + #set ($glPackageBaseCustomizeEntity = "${database.Sql2EntityBaseEntityPackage}" ) + #set ($glPackageCustomizeDBMeta = "${database.Sql2EntityDBMetaPackage}") + #set ($glPackageExtendedCustomizeEntity = "${database.Sql2EntityExtendedEntityPackage}" ) + + #set ($path = $strings.getPackageAsPath(${glPackageBaseCustomizeEntity})) + $database.makeDirectory($path) + + #if (!$database.isSql2EntityPlainEntity()) + #set ($path = $strings.getPackageAsPath(${glPackageCustomizeDBMeta})) + $database.makeDirectory($path) + #end + + #set ($path = $strings.getPackageAsPath(${glPackageExtendedCustomizeEntity})) + $database.makeDirectory($path) + + $database.debug("public void parseCustomizeEntity() {") + $database.debug(" final List tableNameList = getTableList();") + $database.debug(" for (String tableName : tableNameList) {") + #foreach ($table in $database.TableList) + #set ($myBaseObjectClassName = "${glProjectPrefix}${glBasePrefix}${table.JavaName}") + #set ($myBaseEntityPackageName = "${glPackageBaseCustomizeEntity}") + #set ($myExtendedObjectClassName = "${glProjectPrefix}${table.JavaName}") + #set ($myExtendedEntityPackageName = "${glPackageExtendedCustomizeEntity}") + #set ($myDBMetaClassName = "${glProjectPrefix}${table.JavaName}Dbm") + #set ($myDBMetaPackageName = "${glPackageCustomizeDBMeta}") + + #set ($myEntityVariableName = "${table.uncapitalisedJavaName}") + #set ($myEntityListVariableName = "${table.uncapitalisedJavaName}List") + #set ($myCBVariableName = "${table.uncapitalisedJavaName}") + + #set ($isExistDao = false) + #set ($isExistConditionBean = false) + + #if ($database.isSql2EntityPlainEntity()) + $database.debug(" parseBaseCustomizeEntity(tableName); // ${myBaseObjectClassName}") + #set ( $path = "${strings.getPackageAsPath(${myBaseEntityPackageName})}${myBaseObjectClassName}.${glClassFileExtension}" ) + $generator.parse("om/${glTargetLanguage}/bsentity/PlainBaseEntity.${glTemplateFileExtension}",$path ,"" ,"") + #else + $database.debug(" parseBaseCustomizeEntity(tableName); // ${myBaseObjectClassName}") + #set ( $path = "${strings.getPackageAsPath(${myBaseEntityPackageName})}${myBaseObjectClassName}.${glClassFileExtension}" ) + $generator.parse("om/${glTargetLanguage}/bsentity/BaseEntity.${glTemplateFileExtension}",$path ,"" ,"") + + $database.debug(" parseCustomizeDBMeta(tableName); // ${myDBMetaClassName}") + #set ( $path = "${strings.getPackageAsPath(${myDBMetaPackageName})}${myDBMetaClassName}.${glClassFileExtension}" ) + $generator.parse("om/${glTargetLanguage}/bsentity/dbmeta/DBMetaImpl.${glTemplateFileExtension}",$path,"", "") + #end + + #set ( $path = "${strings.getPackageAsPath(${myExtendedEntityPackageName})}${myExtendedObjectClassName}.${glClassFileExtension}" ) + #if (!$files.file(${generator.OutputPath},$path).exists()) + $database.debug(" parseExtendedCustomizeEntity(tableName); // ${myExtendedObjectClassName}") + $generator.parse("om/${glTargetLanguage}/exentity/ExtendedEntity.${glTemplateFileExtension}",$path ,"" ,"") + #end + + #end + $database.debug(" }") + $database.debug("}") + + ## ----------------------------------------------------------------------------------------------------- + ## Parse parameter bean + ## -------------------- + #if ($database.isExistPmbMetaData()) + $database.debug("public void parseParameterBean() {") + $database.debug(" final List parameterBeanList = getParameterBeanList();") + $database.debug(" for (DfParameterBeanMetaData parameterBean : parameterBeanList) {") + + #set ($glPackageBaseParameterBean = "${database.Sql2EntityBaseParameterBeanPackage}" ) + #set ($glPackageExtendedParameterBean = "${database.Sql2EntityExtendedParameterBeanPackage}" ) + + #set ($path = $strings.getPackageAsPath(${glPackageBaseParameterBean})) + $database.makeDirectory($path) + #set ($path = $strings.getPackageAsPath(${glPackageExtendedParameterBean})) + $database.makeDirectory($path) + + #foreach ($pmbMetaData in $database.pmbMetaDataList) + #set ($pmbClassName = "$pmbMetaData.className") + #set ($pmbSuperClassName = "$pmbMetaData.superClassName") + #set ($myBaseParameterBeanClassName = "${glProjectPrefix}${glBasePrefix}${pmbClassName}") + #set ($myExtendedParameterBeanClassName = "${glProjectPrefix}${pmbClassName}") + + $database.debug(" parseBaseParameterBean(parameterBean); // ${myBaseParameterBeanClassName}") + #set ( $path = "${strings.getPackageAsPath(${glPackageBaseParameterBean})}${myBaseParameterBeanClassName}.${glClassFileExtension}" ) + $generator.parse("om/${glTargetLanguage}/bsdao/BsParameterBean.${glTemplateFileExtension}",$path ,"" ,"") + + #set ( $path = "${strings.getPackageAsPath(${glPackageExtendedParameterBean})}${myExtendedParameterBeanClassName}.${glClassFileExtension}" ) + #if (!$files.file(${generator.OutputPath},$path).exists()) + $database.debug(" parseExtendedParameterBean(parameterBean); // ${myExtendedParameterBeanClassName}") + $generator.parse("om/${glTargetLanguage}/exdao/ExParameterBean.${glTemplateFileExtension}",$path ,"" ,"") + #end + #end + $database.debug(" }") + $database.debug("}") + #end + + #end +#end From svnnotify △ sourceforge.jp Tue Jul 10 22:35:08 2007 From: svnnotify △ sourceforge.jp (svnnotify △ sourceforge.jp) Date: Tue, 10 Jul 2007 22:35:08 +0900 Subject: [pal-cvs 2498] [230] added main source Message-ID: <20070710133508.EA74E2AC01C@users.sourceforge.jp> Revision: 230 http://svn.sourceforge.jp/cgi-bin/viewcvs.cgi?root=pal&view=rev&rev=230 Author: takeharu Date: 2007-07-10 22:35:08 +0900 (Tue, 10 Jul 2007) Log Message: ----------- added main source Added Paths: ----------- pompei/trunk/src/main/webapp/WEB-INF/faces-config.xml -------------- next part -------------- Added: pompei/trunk/src/main/webapp/WEB-INF/faces-config.xml =================================================================== --- pompei/trunk/src/main/webapp/WEB-INF/faces-config.xml 2007-07-10 13:21:18 UTC (rev 229) +++ pompei/trunk/src/main/webapp/WEB-INF/faces-config.xml 2007-07-10 13:35:08 UTC (rev 230) @@ -0,0 +1,19 @@ + + + + + + + + + + appMessages + + en + ja + + + + \ No newline at end of file From svnnotify △ sourceforge.jp Wed Jul 11 06:34:34 2007 From: svnnotify △ sourceforge.jp (svnnotify △ sourceforge.jp) Date: Wed, 11 Jul 2007 06:34:34 +0900 Subject: [pal-cvs 2499] [231] remove log file. Message-ID: <20070710213434.5F98B2AC01C@users.sourceforge.jp> Revision: 231 http://svn.sourceforge.jp/cgi-bin/viewcvs.cgi?root=pal&view=rev&rev=231 Author: shinsuke Date: 2007-07-11 06:34:33 +0900 (Wed, 11 Jul 2007) Log Message: ----------- remove log file. Removed Paths: ------------- pompei/trunk/dbflute/velocity.log.1 -------------- next part -------------- Deleted: pompei/trunk/dbflute/velocity.log.1 =================================================================== --- pompei/trunk/dbflute/velocity.log.1 2007-07-10 13:35:08 UTC (rev 230) +++ pompei/trunk/dbflute/velocity.log.1 2007-07-10 21:34:33 UTC (rev 231) @@ -1,602 +0,0 @@ -2007-07-10 00:59:31,750 - org.apache.velocity.runtime.exception.ReferenceException: reference : template = om/java/cbean/AbstractBsConditionQuery.vm [line 612,column 71] : $fromDate is not a valid reference. -2007-07-10 00:59:31,750 - org.apache.velocity.runtime.exception.ReferenceException: reference : template = om/java/cbean/AbstractBsConditionQuery.vm [line 612,column 99] : $toDate is not a valid reference. -2007-07-10 00:59:31,750 - ResourceManager : found om/java/cbean/BsConditionInlineQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 00:59:31,812 - ResourceManager : found om/java/cbean/BsConditionQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 00:59:31,812 - ResourceManager : found om/java/cbean/NestSelectSetupper.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 00:59:31,859 - ResourceManager : found om/java/bsbhv/BaseBhv.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 00:59:31,921 - ResourceManager : found om/java/bsdao/BaseDao.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 00:59:31,953 - ResourceManager : found om/java/bsentity/BaseEntity.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 00:59:31,984 - ResourceManager : found om/java/bsentity/dbmeta/DBMetaImpl.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 00:59:32,015 - ResourceManager : found om/java/cbean/BsConditionBean.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 00:59:32,187 - ResourceManager : found om/java/cbean/AbstractBsConditionQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 00:59:32,203 - org.apache.velocity.runtime.exception.ReferenceException: reference : template = om/java/cbean/AbstractBsConditionQuery.vm [line 612,column 71] : $fromDate is not a valid reference. -2007-07-10 00:59:32,203 - org.apache.velocity.runtime.exception.ReferenceException: reference : template = om/java/cbean/AbstractBsConditionQuery.vm [line 612,column 99] : $toDate is not a valid reference. -2007-07-10 00:59:32,203 - org.apache.velocity.runtime.exception.ReferenceException: reference : template = om/java/cbean/AbstractBsConditionQuery.vm [line 612,column 71] : $fromDate is not a valid reference. -2007-07-10 00:59:32,203 - org.apache.velocity.runtime.exception.ReferenceException: reference : template = om/java/cbean/AbstractBsConditionQuery.vm [line 612,column 99] : $toDate is not a valid reference. -2007-07-10 00:59:32,203 - ResourceManager : found om/java/cbean/BsConditionInlineQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 00:59:32,234 - ResourceManager : found om/java/cbean/BsConditionQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 00:59:32,250 - ResourceManager : found om/java/cbean/NestSelectSetupper.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 00:59:32,281 - ResourceManager : found om/java/bsbhv/BaseBhv.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 00:59:32,328 - ResourceManager : found om/java/bsdao/BaseDao.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 00:59:32,359 - ResourceManager : found om/java/bsentity/BaseEntity.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 00:59:32,390 - ResourceManager : found om/java/bsentity/dbmeta/DBMetaImpl.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 00:59:32,453 - ResourceManager : found om/java/cbean/BsConditionBean.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 00:59:32,484 - ResourceManager : found om/java/cbean/AbstractBsConditionQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 00:59:32,531 - org.apache.velocity.runtime.exception.ReferenceException: reference : template = om/java/cbean/AbstractBsConditionQuery.vm [line 612,column 71] : $fromDate is not a valid reference. -2007-07-10 00:59:32,531 - org.apache.velocity.runtime.exception.ReferenceException: reference : template = om/java/cbean/AbstractBsConditionQuery.vm [line 612,column 99] : $toDate is not a valid reference. -2007-07-10 00:59:32,531 - org.apache.velocity.runtime.exception.ReferenceException: reference : template = om/java/cbean/AbstractBsConditionQuery.vm [line 612,column 71] : $fromDate is not a valid reference. -2007-07-10 00:59:32,531 - org.apache.velocity.runtime.exception.ReferenceException: reference : template = om/java/cbean/AbstractBsConditionQuery.vm [line 612,column 99] : $toDate is not a valid reference. -2007-07-10 00:59:32,531 - ResourceManager : found om/java/cbean/BsConditionInlineQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 00:59:32,578 - ResourceManager : found om/java/cbean/BsConditionQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 00:59:32,609 - ResourceManager : found om/java/cbean/NestSelectSetupper.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 00:59:32,656 - ResourceManager : found om/java/bsbhv/BaseBhv.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 00:59:32,687 - ResourceManager : found om/java/bsdao/BaseDao.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 00:59:32,718 - ResourceManager : found om/java/bsentity/BaseEntity.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 00:59:32,765 - ResourceManager : found om/java/bsentity/dbmeta/DBMetaImpl.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 00:59:32,828 - ResourceManager : found om/java/cbean/BsConditionBean.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 00:59:32,859 - ResourceManager : found om/java/cbean/AbstractBsConditionQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 00:59:32,890 - ResourceManager : found om/java/cbean/BsConditionInlineQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 00:59:32,937 - ResourceManager : found om/java/cbean/BsConditionQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 00:59:32,984 - ResourceManager : found om/java/cbean/NestSelectSetupper.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 00:59:33,031 - ResourceManager : found om/java/bsbhv/BaseBhv.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 00:59:33,046 - ResourceManager : found om/java/bsdao/BaseDao.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 00:59:33,093 - ResourceManager : found om/java/bsentity/BaseEntity.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 00:59:33,109 - ResourceManager : found om/java/bsentity/dbmeta/DBMetaImpl.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 00:59:33,156 - ResourceManager : found om/java/cbean/BsConditionBean.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 00:59:33,187 - ResourceManager : found om/java/cbean/AbstractBsConditionQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 00:59:33,218 - ResourceManager : found om/java/cbean/BsConditionInlineQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 00:59:33,250 - ResourceManager : found om/java/cbean/BsConditionQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 00:59:33,281 - ResourceManager : found om/java/cbean/NestSelectSetupper.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 00:59:33,328 - ResourceManager : found om/java/bsbhv/BaseBhv.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 00:59:33,375 - ResourceManager : found om/java/bsdao/BaseDao.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 00:59:33,390 - ResourceManager : found om/java/bsentity/BaseEntity.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 00:59:33,437 - ResourceManager : found om/java/bsentity/dbmeta/DBMetaImpl.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 00:59:33,468 - ResourceManager : found om/java/cbean/BsConditionBean.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 00:59:33,515 - ResourceManager : found om/java/cbean/AbstractBsConditionQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 00:59:33,562 - org.apache.velocity.runtime.exception.ReferenceException: reference : template = om/java/cbean/AbstractBsConditionQuery.vm [line 612,column 71] : $fromDate is not a valid reference. -2007-07-10 00:59:33,562 - org.apache.velocity.runtime.exception.ReferenceException: reference : template = om/java/cbean/AbstractBsConditionQuery.vm [line 612,column 99] : $toDate is not a valid reference. -2007-07-10 00:59:33,562 - org.apache.velocity.runtime.exception.ReferenceException: reference : template = om/java/cbean/AbstractBsConditionQuery.vm [line 612,column 71] : $fromDate is not a valid reference. -2007-07-10 00:59:33,562 - org.apache.velocity.runtime.exception.ReferenceException: reference : template = om/java/cbean/AbstractBsConditionQuery.vm [line 612,column 99] : $toDate is not a valid reference. -2007-07-10 00:59:33,562 - ResourceManager : found om/java/cbean/BsConditionInlineQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 00:59:33,609 - ResourceManager : found om/java/cbean/BsConditionQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 00:59:33,640 - ResourceManager : found om/java/cbean/NestSelectSetupper.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:46,593 - SimpleLog4JLogSystem initialized using logfile 'velocity.log' -2007-07-10 01:00:46,593 - ************************************************************** -2007-07-10 01:00:46,593 - Starting Jakarta Velocity v1.3.1 -2007-07-10 01:00:46,593 - RuntimeInstance initializing. -2007-07-10 01:00:46,593 - Default Properties File: org\apache\velocity\runtime\defaults\velocity.properties -2007-07-10 01:00:46,593 - Trying to use logger class org.apache.velocity.runtime.log.AvalonLogSystem -2007-07-10 01:00:46,593 - Couldn't find class org.apache.velocity.runtime.log.AvalonLogSystem or necessary supporting classes in classpath. Exception : java.lang.NoClassDefFoundError: org/apache/log/format/Formatter -2007-07-10 01:00:46,593 - Trying to use logger class org.apache.velocity.runtime.log.SimpleLog4JLogSystem -2007-07-10 01:00:46,593 - Using logger class org.apache.velocity.runtime.log.SimpleLog4JLogSystem -2007-07-10 01:00:46,593 - Default ResourceManager initializing. (class org.apache.velocity.runtime.resource.ResourceManagerImpl) -2007-07-10 01:00:46,609 - Resource Loader Instantiated: org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:46,609 - FileResourceLoader : initialization starting. -2007-07-10 01:00:46,609 - FileResourceLoader : adding path 'C:\development\ework-jdk1.5\pompei\mydbflute\dbflute-0.5.2\templates' -2007-07-10 01:00:46,609 - FileResourceLoader : initialization complete. -2007-07-10 01:00:46,609 - ResourceCache : initialized. (class org.apache.velocity.runtime.resource.ResourceCacheImpl) -2007-07-10 01:00:46,609 - Default ResourceManager initialization complete. -2007-07-10 01:00:46,609 - Loaded System Directive: org.apache.velocity.runtime.directive.Literal -2007-07-10 01:00:46,609 - Loaded System Directive: org.apache.velocity.runtime.directive.Macro -2007-07-10 01:00:46,609 - Loaded System Directive: org.apache.velocity.runtime.directive.Parse -2007-07-10 01:00:46,625 - Loaded System Directive: org.apache.velocity.runtime.directive.Include -2007-07-10 01:00:46,625 - Loaded System Directive: org.apache.velocity.runtime.directive.Foreach -2007-07-10 01:00:46,765 - Created: 20 parsers. -2007-07-10 01:00:46,765 - Velocimacro : initialization starting. -2007-07-10 01:00:46,765 - Velocimacro : adding VMs from VM library template : VM_global_library.vm -2007-07-10 01:00:46,781 - ResourceManager : unable to find resource 'VM_global_library.vm' in any resource loader. -2007-07-10 01:00:46,781 - Velocimacro : error using VM library template VM_global_library.vm : org.apache.velocity.exception.ResourceNotFoundException: Unable to find resource 'VM_global_library.vm' -2007-07-10 01:00:46,781 - Velocimacro : VM library template macro registration complete. -2007-07-10 01:00:46,781 - Velocimacro : allowInline = true : VMs can be defined inline in templates -2007-07-10 01:00:46,781 - Velocimacro : allowInlineToOverride = false : VMs defined inline may NOT replace previous VM definitions -2007-07-10 01:00:46,781 - Velocimacro : allowInlineLocal = false : VMs defined inline will be global in scope if allowed. -2007-07-10 01:00:46,781 - Velocimacro : messages on : VM system will output logging messages -2007-07-10 01:00:46,781 - Velocimacro : autoload off : VM system will not automatically reload global library macros -2007-07-10 01:00:46,781 - Velocimacro : initialization complete. -2007-07-10 01:00:46,781 - Velocity successfully started. -2007-07-10 01:00:47,390 - ResourceManager : found om/Control.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:47,484 - ResourceManager : found om/java/allcommon/annotation/OutsideSql.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:47,500 - ResourceManager : found om/java/allcommon/bhv/BehaviorReadable.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:47,500 - ResourceManager : found om/java/allcommon/bhv/BehaviorWritable.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:47,515 - ResourceManager : found om/java/allcommon/bhv/AbstractBehaviorReadable.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:47,531 - ResourceManager : found om/java/allcommon/bhv/AbstractBehaviorWritable.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:47,546 - ResourceManager : found om/java/allcommon/bhv/batch/TokenFileReflectionOption.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:47,546 - ResourceManager : found om/java/allcommon/bhv/batch/TokenFileReflectionResult.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:47,562 - ResourceManager : found om/java/allcommon/bhv/batch/TokenFileReflectionFailure.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:47,562 - ResourceManager : found om/java/allcommon/bhv/batch/TokenFileOutputOption.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:47,578 - ResourceManager : found om/java/allcommon/bhv/batch/TokenFileOutputResult.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:47,578 - ResourceManager : found om/java/allcommon/bhv/load/LoadRefererOption.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:47,578 - ResourceManager : found om/java/allcommon/bhv/setup/ConditionBeanSetupper.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:47,593 - ResourceManager : found om/java/allcommon/bhv/setup/EntityListSetupper.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:47,593 - ResourceManager : found om/java/allcommon/bhv/setup/ValueLabelSetupper.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:47,593 - ResourceManager : found om/java/allcommon/bhv/setup/ValueLabelBox.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:47,609 - ResourceManager : found om/java/allcommon/AccessContext.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:47,609 - ResourceManager : found om/java/allcommon/DaoReadable.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:47,609 - ResourceManager : found om/java/allcommon/DaoWritable.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:47,625 - ResourceManager : found om/java/allcommon/Entity.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:47,625 - ResourceManager : found om/java/allcommon/EntityDefinedCommonColumn.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:47,640 - ResourceManager : found om/java/allcommon/cbean/FetchNarrowingBeanContext.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:47,656 - ResourceManager : found om/java/allcommon/cbean/FetchNarrowingBean.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:47,656 - ResourceManager : found om/java/allcommon/cbean/SimpleOrderByBean.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:47,656 - ResourceManager : found om/java/allcommon/cbean/SimplePagingBean.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:47,671 - ResourceManager : found om/java/allcommon/cbean/PagingResultBean.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:47,671 - ResourceManager : found om/java/allcommon/cbean/ListResultBean.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:47,687 - ResourceManager : found om/java/allcommon/cbean/ConditionBeanContext.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:48,281 - ResourceManager : found om/java/allcommon/cbean/ConditionBean.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:48,281 - ResourceManager : found om/java/allcommon/cbean/ConditionQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:48,281 - ResourceManager : found om/java/allcommon/cbean/PagingBean.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:48,296 - ResourceManager : found om/java/allcommon/cbean/OrderByBean.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:48,296 - ResourceManager : found om/java/allcommon/cbean/SelectResource.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:48,296 - ResourceManager : found om/java/allcommon/cbean/AbstractConditionBean.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:48,312 - ResourceManager : found om/java/allcommon/cbean/AbstractConditionQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:48,328 - ResourceManager : found om/java/allcommon/cbean/ckey/ConditionKey.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:48,328 - ResourceManager : found om/java/allcommon/cbean/ckey/ConditionKey_equal.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:48,343 - ResourceManager : found om/java/allcommon/cbean/ckey/ConditionKey_notEqual.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:48,343 - ResourceManager : found om/java/allcommon/cbean/ckey/ConditionKey_greaterThan.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:48,343 - ResourceManager : found om/java/allcommon/cbean/ckey/ConditionKey_lessThan.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:48,359 - ResourceManager : found om/java/allcommon/cbean/ckey/ConditionKey_greaterEqual.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:48,359 - ResourceManager : found om/java/allcommon/cbean/ckey/ConditionKey_lessEqual.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:48,359 - ResourceManager : found om/java/allcommon/cbean/ckey/ConditionKey_prefixSearch.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:48,375 - ResourceManager : found om/java/allcommon/cbean/ckey/ConditionKey_likeSearch.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:48,375 - ResourceManager : found om/java/allcommon/cbean/ckey/ConditionKey_inScope.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:48,390 - ResourceManager : found om/java/allcommon/cbean/ckey/ConditionKey_notInScope.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:48,390 - ResourceManager : found om/java/allcommon/cbean/ckey/ConditionKey_isNull.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:48,390 - ResourceManager : found om/java/allcommon/cbean/ckey/ConditionKey_isNotNull.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:48,406 - ResourceManager : found om/java/allcommon/cbean/coption/ConditionOption.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:48,406 - ResourceManager : found om/java/allcommon/cbean/coption/SimpleStringOption.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:48,406 - ResourceManager : found om/java/allcommon/cbean/coption/FromToOption.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:48,421 - ResourceManager : found om/java/allcommon/cbean/coption/LikeSearchOption.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:48,421 - ResourceManager : found om/java/allcommon/cbean/coption/InScopeOption.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:48,421 - ResourceManager : found om/java/allcommon/cbean/coption/parts/SplitOptionParts.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:48,437 - ResourceManager : found om/java/allcommon/cbean/coption/parts/ToUpperLowerCaseOptionParts.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:48,437 - ResourceManager : found om/java/allcommon/cbean/coption/parts/ToSingleByteOptionParts.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:48,453 - ResourceManager : found om/java/allcommon/cbean/coption/parts/local/JapaneseOptionPartsAgent.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:48,453 - ResourceManager : found om/java/allcommon/cbean/cvalue/ConditionValue.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:48,468 - ResourceManager : found om/java/allcommon/cbean/grouping/GroupingOption.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:48,468 - ResourceManager : found om/java/allcommon/cbean/grouping/GroupingRowEndDeterminer.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:48,468 - ResourceManager : found om/java/allcommon/cbean/grouping/GroupingRowResource.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:48,484 - ResourceManager : found om/java/allcommon/cbean/grouping/GroupingRowSetupper.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:48,484 - ResourceManager : found om/java/allcommon/cbean/mapping/EntityDtoMapper.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:48,484 - ResourceManager : found om/java/allcommon/cbean/sqlclause/SqlClause.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:48,500 - ResourceManager : found om/java/allcommon/cbean/sqlclause/AbstractSqlClause.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:48,500 - ResourceManager : found om/java/allcommon/cbean/sqlclause/SqlClause_derby.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:48,515 - ResourceManager : found om/java/allcommon/cbean/sqlclause/SqlClause_oracle.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:48,515 - ResourceManager : found om/java/allcommon/cbean/sqlclause/SqlClause_firebird.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:48,515 - ResourceManager : found om/java/allcommon/cbean/sqlclause/SqlClause_mysql.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:48,531 - ResourceManager : found om/java/allcommon/cbean/sqlclause/SqlClause_postgresql.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:48,531 - ResourceManager : found om/java/allcommon/cbean/sqlclause/SqlClause_mssql.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:48,531 - ResourceManager : found om/java/allcommon/cbean/sqlclause/SqlClause_db2.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:48,531 - ResourceManager : found om/java/allcommon/cbean/sqlclause/SqlClause_interbase.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:48,546 - ResourceManager : found om/java/allcommon/cbean/sqlclause/SqlClause_default.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:48,546 - ResourceManager : found om/java/allcommon/cbean/sqlclause/OrderByClause.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:48,546 - ResourceManager : found om/java/allcommon/cbean/sqlclause/OrderByElement.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:48,562 - ResourceManager : found om/java/allcommon/dbmeta/DBMeta.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:48,578 - ResourceManager : found om/java/allcommon/dbmeta/AbstractDBMeta.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:48,578 - ResourceManager : found om/java/allcommon/dbmeta/DBMetaInstanceHandler.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:48,593 - ResourceManager : found om/java/allcommon/exception/RecordHasAlreadyBeenDeletedException.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:48,609 - ResourceManager : found om/java/allcommon/exception/RecordHasOverlappedException.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:48,609 - ResourceManager : found om/java/allcommon/exception/SelectedCountExceedMaxCountException.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:48,625 - ResourceManager : found om/java/allcommon/helper/MapListString.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:48,734 - ResourceManager : found om/java/allcommon/helper/MapListStringImpl.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:48,750 - ResourceManager : found om/java/allcommon/helper/MapStringBuilder.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:48,750 - ResourceManager : found om/java/allcommon/helper/MapStringBuilderImpl.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:48,750 - ResourceManager : found om/java/allcommon/helper/character/GeneralCharacter.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:48,765 - ResourceManager : found om/java/allcommon/helper/character/impl/GeneralCharacterImpl.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:48,765 - ResourceManager : found om/java/allcommon/helper/character/JapaneseCharacter.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:48,765 - ResourceManager : found om/java/allcommon/helper/character/impl/JapaneseCharacterImpl.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:48,781 - ResourceManager : found om/java/allcommon/helper/token/line/LineToken.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:48,781 - ResourceManager : found om/java/allcommon/helper/token/line/impl/LineTokenImpl.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:48,781 - ResourceManager : found om/java/allcommon/helper/token/line/LineTokenizingOption.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:48,781 - ResourceManager : found om/java/allcommon/helper/token/line/LineMakingOption.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:48,796 - ResourceManager : found om/java/allcommon/helper/token/file/FileToken.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:48,796 - ResourceManager : found om/java/allcommon/helper/token/file/impl/FileTokenImpl.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:48,812 - ResourceManager : found om/java/allcommon/helper/token/file/FileTokenizingOption.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:48,812 - ResourceManager : found om/java/allcommon/helper/token/file/FileTokenizingRowResource.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:48,812 - ResourceManager : found om/java/allcommon/helper/token/file/FileTokenizingCallback.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:48,812 - ResourceManager : found om/java/allcommon/helper/token/file/FileTokenizingHeaderInfo.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:48,828 - ResourceManager : found om/java/allcommon/helper/token/file/FileMakingOption.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:48,828 - ResourceManager : found om/java/allcommon/helper/token/file/FileMakingRowResource.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:48,828 - ResourceManager : found om/java/allcommon/helper/token/file/FileMakingCallback.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:48,843 - ResourceManager : found om/java/allcommon/helper/token/file/FileMakingHeaderInfo.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:48,843 - ResourceManager : found om/java/allcommon/helper/token/file/FileMakingSimpleFacade.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:48,843 - ResourceManager : found om/java/allcommon/helper/token/file/impl/FileMakingSimpleFacadeImpl.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:48,859 - ResourceManager : found om/java/allcommon/DaoDicon.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:48,906 - ResourceManager : found om/java/allcommon/DaoSelector.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:48,906 - ResourceManager : found om/java/allcommon/CacheDaoSelector.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:48,906 - ResourceManager : found om/java/allcommon/GenMetaData.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:48,921 - ResourceManager : found om/java/allcommon/interceptor/CommonColumnSetupAbstractInterceptor.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:48,937 - ResourceManager : found om/java/allcommon/interceptor/CommonColumnSetupBeforeInsertInterceptor.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:48,953 - ResourceManager : found om/java/allcommon/interceptor/CommonColumnSetupBeforeUpdateInterceptor.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:48,953 - ResourceManager : found om/java/allcommon/interceptor/CommonColumnSetupBeforeDeleteInterceptor.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:48,968 - ResourceManager : found om/java/allcommon/jdbc/history/PreparedExecutionBean.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:48,968 - ResourceManager : found om/java/allcommon/jdbc/history/PreparedParameterElement.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:48,968 - ResourceManager : found om/java/allcommon/jdbc/history/StatementHistory.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:48,968 - ResourceManager : found om/java/allcommon/jdbc/history/StatementHistoryWitness.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:48,984 - ResourceManager : found om/java/allcommon/jdbc/history/TraceablePreparedStatement.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:48,984 - ResourceManager : found om/java/allcommon/s2dao/S2DaoInterceptor.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:49,000 - ResourceManager : found om/java/allcommon/s2dao/S2DaoMetaDataExtension.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:49,000 - org.apache.velocity.runtime.exception.ReferenceException: reference : template = om/java/allcommon/s2dao/S2DaoMetaDataExtension.vm [line 287,column 28] : $dto.selectHint is not a valid reference. -2007-07-10 01:00:49,000 - org.apache.velocity.runtime.exception.ReferenceException: reference : template = om/java/allcommon/s2dao/S2DaoMetaDataExtension.vm [line 354,column 28] : $dto.selectHint is not a valid reference. -2007-07-10 01:00:49,000 - ResourceManager : found om/java/allcommon/s2dao/S2DaoMetaDataFactoryImpl.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:49,015 - ResourceManager : found om/java/allcommon/s2dao/S2BeanMetaDataFactoryImpl.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:49,015 - ResourceManager : found om/java/allcommon/s2dao/S2DaoSelectDynamicCommand.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:49,015 - ResourceManager : found om/java/allcommon/s2dao/S2DaoStatementFactory.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:49,015 - ResourceManager : found om/java/allcommon/s2dao/FetchNarrowingResultSetFactory.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:49,015 - ResourceManager : found om/java/allcommon/s2dao/FetchNarrowingResultSetWrapper.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:49,062 - ResourceManager : found om/java/bsbhv/BaseBhv.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:49,093 - ResourceManager : found om/java/bsdao/BaseDao.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:49,109 - ResourceManager : found om/java/bsentity/BaseEntity.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:49,140 - ResourceManager : found om/java/bsentity/dbmeta/DBMetaImpl.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:49,171 - ResourceManager : found om/java/cbean/BsConditionBean.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:49,187 - ResourceManager : found om/java/cbean/AbstractBsConditionQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:49,218 - ResourceManager : found om/java/cbean/BsConditionInlineQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:49,234 - ResourceManager : found om/java/cbean/BsConditionQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:49,250 - ResourceManager : found om/java/cbean/NestSelectSetupper.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:49,265 - ResourceManager : found om/java/bsbhv/BaseBhv.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:49,281 - ResourceManager : found om/java/bsdao/BaseDao.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:49,296 - ResourceManager : found om/java/bsentity/BaseEntity.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:49,312 - ResourceManager : found om/java/bsentity/dbmeta/DBMetaImpl.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:49,328 - ResourceManager : found om/java/cbean/BsConditionBean.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:49,343 - ResourceManager : found om/java/cbean/AbstractBsConditionQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:49,359 - ResourceManager : found om/java/cbean/BsConditionInlineQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:49,531 - ResourceManager : found om/java/cbean/BsConditionQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:49,531 - ResourceManager : found om/java/cbean/NestSelectSetupper.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:49,546 - ResourceManager : found om/java/bsbhv/BaseBhv.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:49,562 - ResourceManager : found om/java/bsdao/BaseDao.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:49,578 - ResourceManager : found om/java/bsentity/BaseEntity.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:49,609 - ResourceManager : found om/java/bsentity/dbmeta/DBMetaImpl.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:49,640 - ResourceManager : found om/java/cbean/BsConditionBean.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:49,656 - ResourceManager : found om/java/cbean/AbstractBsConditionQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:49,671 - org.apache.velocity.runtime.exception.ReferenceException: reference : template = om/java/cbean/AbstractBsConditionQuery.vm [line 612,column 71] : $fromDate is not a valid reference. -2007-07-10 01:00:49,671 - org.apache.velocity.runtime.exception.ReferenceException: reference : template = om/java/cbean/AbstractBsConditionQuery.vm [line 612,column 99] : $toDate is not a valid reference. -2007-07-10 01:00:49,671 - org.apache.velocity.runtime.exception.ReferenceException: reference : template = om/java/cbean/AbstractBsConditionQuery.vm [line 612,column 71] : $fromDate is not a valid reference. -2007-07-10 01:00:49,671 - org.apache.velocity.runtime.exception.ReferenceException: reference : template = om/java/cbean/AbstractBsConditionQuery.vm [line 612,column 99] : $toDate is not a valid reference. -2007-07-10 01:00:49,671 - org.apache.velocity.runtime.exception.ReferenceException: reference : template = om/java/cbean/AbstractBsConditionQuery.vm [line 612,column 71] : $fromDate is not a valid reference. -2007-07-10 01:00:49,671 - org.apache.velocity.runtime.exception.ReferenceException: reference : template = om/java/cbean/AbstractBsConditionQuery.vm [line 612,column 99] : $toDate is not a valid reference. -2007-07-10 01:00:49,671 - org.apache.velocity.runtime.exception.ReferenceException: reference : template = om/java/cbean/AbstractBsConditionQuery.vm [line 612,column 71] : $fromDate is not a valid reference. -2007-07-10 01:00:49,671 - org.apache.velocity.runtime.exception.ReferenceException: reference : template = om/java/cbean/AbstractBsConditionQuery.vm [line 612,column 99] : $toDate is not a valid reference. -2007-07-10 01:00:49,671 - ResourceManager : found om/java/cbean/BsConditionInlineQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:49,687 - ResourceManager : found om/java/cbean/BsConditionQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:49,703 - ResourceManager : found om/java/cbean/NestSelectSetupper.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:49,718 - ResourceManager : found om/java/bsbhv/BaseBhv.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:49,734 - ResourceManager : found om/java/bsdao/BaseDao.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:49,750 - ResourceManager : found om/java/bsentity/BaseEntity.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:49,765 - ResourceManager : found om/java/bsentity/dbmeta/DBMetaImpl.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:49,781 - ResourceManager : found om/java/cbean/BsConditionBean.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:49,796 - ResourceManager : found om/java/cbean/AbstractBsConditionQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:49,796 - org.apache.velocity.runtime.exception.ReferenceException: reference : template = om/java/cbean/AbstractBsConditionQuery.vm [line 612,column 71] : $fromDate is not a valid reference. -2007-07-10 01:00:49,796 - org.apache.velocity.runtime.exception.ReferenceException: reference : template = om/java/cbean/AbstractBsConditionQuery.vm [line 612,column 99] : $toDate is not a valid reference. -2007-07-10 01:00:49,812 - ResourceManager : found om/java/cbean/BsConditionInlineQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:49,828 - ResourceManager : found om/java/cbean/BsConditionQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:49,828 - ResourceManager : found om/java/cbean/NestSelectSetupper.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:49,859 - ResourceManager : found om/java/bsbhv/BaseBhv.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:49,859 - ResourceManager : found om/java/bsdao/BaseDao.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:49,875 - ResourceManager : found om/java/bsentity/BaseEntity.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:50,015 - ResourceManager : found om/java/bsentity/dbmeta/DBMetaImpl.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:50,015 - ResourceManager : found om/java/cbean/BsConditionBean.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:50,031 - ResourceManager : found om/java/cbean/AbstractBsConditionQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:50,046 - org.apache.velocity.runtime.exception.ReferenceException: reference : template = om/java/cbean/AbstractBsConditionQuery.vm [line 612,column 71] : $fromDate is not a valid reference. -2007-07-10 01:00:50,046 - org.apache.velocity.runtime.exception.ReferenceException: reference : template = om/java/cbean/AbstractBsConditionQuery.vm [line 612,column 99] : $toDate is not a valid reference. -2007-07-10 01:00:50,046 - org.apache.velocity.runtime.exception.ReferenceException: reference : template = om/java/cbean/AbstractBsConditionQuery.vm [line 612,column 71] : $fromDate is not a valid reference. -2007-07-10 01:00:50,046 - org.apache.velocity.runtime.exception.ReferenceException: reference : template = om/java/cbean/AbstractBsConditionQuery.vm [line 612,column 99] : $toDate is not a valid reference. -2007-07-10 01:00:50,046 - ResourceManager : found om/java/cbean/BsConditionInlineQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:50,062 - ResourceManager : found om/java/cbean/BsConditionQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:50,078 - ResourceManager : found om/java/cbean/NestSelectSetupper.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:50,093 - ResourceManager : found om/java/bsbhv/BaseBhv.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:50,109 - ResourceManager : found om/java/bsdao/BaseDao.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:50,109 - ResourceManager : found om/java/bsentity/BaseEntity.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:50,156 - ResourceManager : found om/java/bsentity/dbmeta/DBMetaImpl.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:50,187 - ResourceManager : found om/java/cbean/BsConditionBean.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:50,203 - ResourceManager : found om/java/cbean/AbstractBsConditionQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:50,218 - ResourceManager : found om/java/cbean/BsConditionInlineQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:50,234 - ResourceManager : found om/java/cbean/BsConditionQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:50,234 - ResourceManager : found om/java/cbean/NestSelectSetupper.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:50,265 - ResourceManager : found om/java/bsbhv/BaseBhv.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:50,265 - ResourceManager : found om/java/bsdao/BaseDao.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:50,281 - ResourceManager : found om/java/bsentity/BaseEntity.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:50,296 - ResourceManager : found om/java/bsentity/dbmeta/DBMetaImpl.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:50,312 - ResourceManager : found om/java/cbean/BsConditionBean.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:50,343 - ResourceManager : found om/java/cbean/AbstractBsConditionQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:50,343 - org.apache.velocity.runtime.exception.ReferenceException: reference : template = om/java/cbean/AbstractBsConditionQuery.vm [line 612,column 71] : $fromDate is not a valid reference. -2007-07-10 01:00:50,343 - org.apache.velocity.runtime.exception.ReferenceException: reference : template = om/java/cbean/AbstractBsConditionQuery.vm [line 612,column 99] : $toDate is not a valid reference. -2007-07-10 01:00:50,343 - org.apache.velocity.runtime.exception.ReferenceException: reference : template = om/java/cbean/AbstractBsConditionQuery.vm [line 612,column 71] : $fromDate is not a valid reference. -2007-07-10 01:00:50,343 - org.apache.velocity.runtime.exception.ReferenceException: reference : template = om/java/cbean/AbstractBsConditionQuery.vm [line 612,column 99] : $toDate is not a valid reference. -2007-07-10 01:00:50,359 - ResourceManager : found om/java/cbean/BsConditionInlineQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:50,375 - ResourceManager : found om/java/cbean/BsConditionQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:50,375 - ResourceManager : found om/java/cbean/NestSelectSetupper.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:50,406 - ResourceManager : found om/java/bsbhv/BaseBhv.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:50,406 - ResourceManager : found om/java/bsdao/BaseDao.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:50,421 - ResourceManager : found om/java/bsentity/BaseEntity.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:50,437 - ResourceManager : found om/java/bsentity/dbmeta/DBMetaImpl.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:50,453 - ResourceManager : found om/java/cbean/BsConditionBean.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:50,578 - ResourceManager : found om/java/cbean/AbstractBsConditionQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:50,593 - ResourceManager : found om/java/cbean/BsConditionInlineQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:50,609 - ResourceManager : found om/java/cbean/BsConditionQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:50,625 - ResourceManager : found om/java/cbean/NestSelectSetupper.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:50,640 - ResourceManager : found om/java/bsbhv/BaseBhv.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:50,656 - ResourceManager : found om/java/bsdao/BaseDao.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:50,656 - ResourceManager : found om/java/bsentity/BaseEntity.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:50,671 - ResourceManager : found om/java/bsentity/dbmeta/DBMetaImpl.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:50,687 - ResourceManager : found om/java/cbean/BsConditionBean.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:50,703 - ResourceManager : found om/java/cbean/AbstractBsConditionQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:50,718 - ResourceManager : found om/java/cbean/BsConditionInlineQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:50,734 - ResourceManager : found om/java/cbean/BsConditionQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:50,734 - ResourceManager : found om/java/cbean/NestSelectSetupper.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:50,765 - ResourceManager : found om/java/bsbhv/BaseBhv.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:50,765 - ResourceManager : found om/java/bsdao/BaseDao.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:50,781 - ResourceManager : found om/java/bsentity/BaseEntity.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:50,796 - ResourceManager : found om/java/bsentity/dbmeta/DBMetaImpl.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:50,812 - ResourceManager : found om/java/cbean/BsConditionBean.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:50,828 - ResourceManager : found om/java/cbean/AbstractBsConditionQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:50,828 - ResourceManager : found om/java/cbean/BsConditionInlineQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:50,843 - ResourceManager : found om/java/cbean/BsConditionQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:50,859 - ResourceManager : found om/java/cbean/NestSelectSetupper.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:50,875 - ResourceManager : found om/java/bsbhv/BaseBhv.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:50,875 - ResourceManager : found om/java/bsdao/BaseDao.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:50,890 - ResourceManager : found om/java/bsentity/BaseEntity.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:50,906 - ResourceManager : found om/java/bsentity/dbmeta/DBMetaImpl.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:50,921 - ResourceManager : found om/java/cbean/BsConditionBean.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:50,937 - ResourceManager : found om/java/cbean/AbstractBsConditionQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:50,953 - ResourceManager : found om/java/cbean/BsConditionInlineQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:51,078 - ResourceManager : found om/java/cbean/BsConditionQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:51,078 - ResourceManager : found om/java/cbean/NestSelectSetupper.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:51,109 - ResourceManager : found om/java/bsbhv/BaseBhv.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:51,125 - ResourceManager : found om/java/bsdao/BaseDao.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:51,125 - ResourceManager : found om/java/bsentity/BaseEntity.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:51,156 - ResourceManager : found om/java/bsentity/dbmeta/DBMetaImpl.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:51,171 - ResourceManager : found om/java/cbean/BsConditionBean.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:51,187 - ResourceManager : found om/java/cbean/AbstractBsConditionQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:51,187 - org.apache.velocity.runtime.exception.ReferenceException: reference : template = om/java/cbean/AbstractBsConditionQuery.vm [line 612,column 71] : $fromDate is not a valid reference. -2007-07-10 01:00:51,187 - org.apache.velocity.runtime.exception.ReferenceException: reference : template = om/java/cbean/AbstractBsConditionQuery.vm [line 612,column 99] : $toDate is not a valid reference. -2007-07-10 01:00:51,203 - ResourceManager : found om/java/cbean/BsConditionInlineQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:51,218 - ResourceManager : found om/java/cbean/BsConditionQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:51,218 - ResourceManager : found om/java/cbean/NestSelectSetupper.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:51,250 - ResourceManager : found om/java/bsbhv/BaseBhv.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:51,250 - ResourceManager : found om/java/bsdao/BaseDao.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:51,265 - ResourceManager : found om/java/bsentity/BaseEntity.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:51,281 - ResourceManager : found om/java/bsentity/dbmeta/DBMetaImpl.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:51,312 - ResourceManager : found om/java/cbean/BsConditionBean.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:51,328 - ResourceManager : found om/java/cbean/AbstractBsConditionQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:51,328 - org.apache.velocity.runtime.exception.ReferenceException: reference : template = om/java/cbean/AbstractBsConditionQuery.vm [line 612,column 71] : $fromDate is not a valid reference. -2007-07-10 01:00:51,328 - org.apache.velocity.runtime.exception.ReferenceException: reference : template = om/java/cbean/AbstractBsConditionQuery.vm [line 612,column 99] : $toDate is not a valid reference. -2007-07-10 01:00:51,328 - ResourceManager : found om/java/cbean/BsConditionInlineQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:51,359 - ResourceManager : found om/java/cbean/BsConditionQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:51,359 - ResourceManager : found om/java/cbean/NestSelectSetupper.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:51,375 - ResourceManager : found om/java/bsbhv/BaseBhv.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:51,390 - ResourceManager : found om/java/bsdao/BaseDao.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:51,406 - ResourceManager : found om/java/bsentity/BaseEntity.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:51,421 - ResourceManager : found om/java/bsentity/dbmeta/DBMetaImpl.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:51,437 - ResourceManager : found om/java/cbean/BsConditionBean.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:51,453 - ResourceManager : found om/java/cbean/AbstractBsConditionQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:51,453 - ResourceManager : found om/java/cbean/BsConditionInlineQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:51,468 - ResourceManager : found om/java/cbean/BsConditionQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:51,484 - ResourceManager : found om/java/cbean/NestSelectSetupper.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:51,500 - ResourceManager : found om/java/bsbhv/BaseBhv.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:51,515 - ResourceManager : found om/java/bsdao/BaseDao.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:51,531 - ResourceManager : found om/java/bsentity/BaseEntity.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:51,546 - ResourceManager : found om/java/bsentity/dbmeta/DBMetaImpl.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:51,687 - ResourceManager : found om/java/cbean/BsConditionBean.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:51,718 - ResourceManager : found om/java/cbean/AbstractBsConditionQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:51,718 - ResourceManager : found om/java/cbean/BsConditionInlineQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:51,734 - ResourceManager : found om/java/cbean/BsConditionQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:51,750 - ResourceManager : found om/java/cbean/NestSelectSetupper.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:51,781 - ResourceManager : found om/java/bsbhv/BaseBhv.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:51,781 - ResourceManager : found om/java/bsdao/BaseDao.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:51,796 - ResourceManager : found om/java/bsentity/BaseEntity.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:51,812 - ResourceManager : found om/java/bsentity/dbmeta/DBMetaImpl.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:51,828 - ResourceManager : found om/java/cbean/BsConditionBean.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:51,859 - ResourceManager : found om/java/cbean/AbstractBsConditionQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:51,859 - org.apache.velocity.runtime.exception.ReferenceException: reference : template = om/java/cbean/AbstractBsConditionQuery.vm [line 612,column 71] : $fromDate is not a valid reference. -2007-07-10 01:00:51,859 - org.apache.velocity.runtime.exception.ReferenceException: reference : template = om/java/cbean/AbstractBsConditionQuery.vm [line 612,column 99] : $toDate is not a valid reference. -2007-07-10 01:00:51,859 - org.apache.velocity.runtime.exception.ReferenceException: reference : template = om/java/cbean/AbstractBsConditionQuery.vm [line 612,column 71] : $fromDate is not a valid reference. -2007-07-10 01:00:51,859 - org.apache.velocity.runtime.exception.ReferenceException: reference : template = om/java/cbean/AbstractBsConditionQuery.vm [line 612,column 99] : $toDate is not a valid reference. -2007-07-10 01:00:51,859 - org.apache.velocity.runtime.exception.ReferenceException: reference : template = om/java/cbean/AbstractBsConditionQuery.vm [line 612,column 71] : $fromDate is not a valid reference. -2007-07-10 01:00:51,859 - org.apache.velocity.runtime.exception.ReferenceException: reference : template = om/java/cbean/AbstractBsConditionQuery.vm [line 612,column 99] : $toDate is not a valid reference. -2007-07-10 01:00:51,859 - ResourceManager : found om/java/cbean/BsConditionInlineQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:51,875 - ResourceManager : found om/java/cbean/BsConditionQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:51,875 - ResourceManager : found om/java/cbean/NestSelectSetupper.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:51,906 - ResourceManager : found om/java/bsbhv/BaseBhv.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:51,921 - ResourceManager : found om/java/bsdao/BaseDao.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:51,921 - ResourceManager : found om/java/bsentity/BaseEntity.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:51,953 - ResourceManager : found om/java/bsentity/dbmeta/DBMetaImpl.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:51,953 - ResourceManager : found om/java/cbean/BsConditionBean.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:51,968 - ResourceManager : found om/java/cbean/AbstractBsConditionQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:51,968 - org.apache.velocity.runtime.exception.ReferenceException: reference : template = om/java/cbean/AbstractBsConditionQuery.vm [line 612,column 71] : $fromDate is not a valid reference. -2007-07-10 01:00:51,968 - org.apache.velocity.runtime.exception.ReferenceException: reference : template = om/java/cbean/AbstractBsConditionQuery.vm [line 612,column 99] : $toDate is not a valid reference. -2007-07-10 01:00:51,984 - org.apache.velocity.runtime.exception.ReferenceException: reference : template = om/java/cbean/AbstractBsConditionQuery.vm [line 612,column 71] : $fromDate is not a valid reference. -2007-07-10 01:00:51,984 - org.apache.velocity.runtime.exception.ReferenceException: reference : template = om/java/cbean/AbstractBsConditionQuery.vm [line 612,column 99] : $toDate is not a valid reference. -2007-07-10 01:00:51,984 - ResourceManager : found om/java/cbean/BsConditionInlineQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:52,000 - ResourceManager : found om/java/cbean/BsConditionQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:52,000 - ResourceManager : found om/java/cbean/NestSelectSetupper.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:52,031 - ResourceManager : found om/java/bsbhv/BaseBhv.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:52,046 - ResourceManager : found om/java/bsdao/BaseDao.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:52,046 - ResourceManager : found om/java/bsentity/BaseEntity.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:52,062 - ResourceManager : found om/java/bsentity/dbmeta/DBMetaImpl.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:52,078 - ResourceManager : found om/java/cbean/BsConditionBean.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:52,093 - ResourceManager : found om/java/cbean/AbstractBsConditionQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:52,109 - ResourceManager : found om/java/cbean/BsConditionInlineQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:52,125 - ResourceManager : found om/java/cbean/BsConditionQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:52,140 - ResourceManager : found om/java/cbean/NestSelectSetupper.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:52,156 - ResourceManager : found om/java/bsbhv/BaseBhv.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:52,171 - ResourceManager : found om/java/bsdao/BaseDao.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:52,171 - ResourceManager : found om/java/bsentity/BaseEntity.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:52,312 - ResourceManager : found om/java/bsentity/dbmeta/DBMetaImpl.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:52,328 - ResourceManager : found om/java/cbean/BsConditionBean.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:52,343 - ResourceManager : found om/java/cbean/AbstractBsConditionQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:52,343 - org.apache.velocity.runtime.exception.ReferenceException: reference : template = om/java/cbean/AbstractBsConditionQuery.vm [line 612,column 71] : $fromDate is not a valid reference. -2007-07-10 01:00:52,343 - org.apache.velocity.runtime.exception.ReferenceException: reference : template = om/java/cbean/AbstractBsConditionQuery.vm [line 612,column 99] : $toDate is not a valid reference. -2007-07-10 01:00:52,343 - org.apache.velocity.runtime.exception.ReferenceException: reference : template = om/java/cbean/AbstractBsConditionQuery.vm [line 612,column 71] : $fromDate is not a valid reference. -2007-07-10 01:00:52,343 - org.apache.velocity.runtime.exception.ReferenceException: reference : template = om/java/cbean/AbstractBsConditionQuery.vm [line 612,column 99] : $toDate is not a valid reference. -2007-07-10 01:00:52,359 - ResourceManager : found om/java/cbean/BsConditionInlineQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:52,375 - ResourceManager : found om/java/cbean/BsConditionQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:52,375 - ResourceManager : found om/java/cbean/NestSelectSetupper.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:52,406 - ResourceManager : found om/java/bsbhv/BaseBhv.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:52,406 - ResourceManager : found om/java/bsdao/BaseDao.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:52,421 - ResourceManager : found om/java/bsentity/BaseEntity.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:52,437 - ResourceManager : found om/java/bsentity/dbmeta/DBMetaImpl.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:52,453 - ResourceManager : found om/java/cbean/BsConditionBean.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:52,468 - ResourceManager : found om/java/cbean/AbstractBsConditionQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:52,468 - org.apache.velocity.runtime.exception.ReferenceException: reference : template = om/java/cbean/AbstractBsConditionQuery.vm [line 612,column 71] : $fromDate is not a valid reference. -2007-07-10 01:00:52,468 - org.apache.velocity.runtime.exception.ReferenceException: reference : template = om/java/cbean/AbstractBsConditionQuery.vm [line 612,column 99] : $toDate is not a valid reference. -2007-07-10 01:00:52,468 - ResourceManager : found om/java/cbean/BsConditionInlineQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:52,484 - ResourceManager : found om/java/cbean/BsConditionQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:52,500 - ResourceManager : found om/java/cbean/NestSelectSetupper.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:52,515 - ResourceManager : found om/java/bsbhv/BaseBhv.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:52,531 - ResourceManager : found om/java/bsdao/BaseDao.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:52,531 - ResourceManager : found om/java/bsentity/BaseEntity.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:52,546 - ResourceManager : found om/java/bsentity/dbmeta/DBMetaImpl.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:52,562 - ResourceManager : found om/java/cbean/BsConditionBean.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:52,578 - ResourceManager : found om/java/cbean/AbstractBsConditionQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:52,578 - org.apache.velocity.runtime.exception.ReferenceException: reference : template = om/java/cbean/AbstractBsConditionQuery.vm [line 612,column 71] : $fromDate is not a valid reference. -2007-07-10 01:00:52,578 - org.apache.velocity.runtime.exception.ReferenceException: reference : template = om/java/cbean/AbstractBsConditionQuery.vm [line 612,column 99] : $toDate is not a valid reference. -2007-07-10 01:00:52,593 - org.apache.velocity.runtime.exception.ReferenceException: reference : template = om/java/cbean/AbstractBsConditionQuery.vm [line 612,column 71] : $fromDate is not a valid reference. -2007-07-10 01:00:52,593 - org.apache.velocity.runtime.exception.ReferenceException: reference : template = om/java/cbean/AbstractBsConditionQuery.vm [line 612,column 99] : $toDate is not a valid reference. -2007-07-10 01:00:52,593 - ResourceManager : found om/java/cbean/BsConditionInlineQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:52,609 - ResourceManager : found om/java/cbean/BsConditionQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:52,609 - ResourceManager : found om/java/cbean/NestSelectSetupper.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:52,640 - ResourceManager : found om/java/bsbhv/BaseBhv.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:52,640 - ResourceManager : found om/java/bsdao/BaseDao.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:52,656 - ResourceManager : found om/java/bsentity/BaseEntity.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:52,687 - ResourceManager : found om/java/bsentity/dbmeta/DBMetaImpl.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:52,703 - ResourceManager : found om/java/cbean/BsConditionBean.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:52,718 - ResourceManager : found om/java/cbean/AbstractBsConditionQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:52,734 - org.apache.velocity.runtime.exception.ReferenceException: reference : template = om/java/cbean/AbstractBsConditionQuery.vm [line 612,column 71] : $fromDate is not a valid reference. -2007-07-10 01:00:52,734 - org.apache.velocity.runtime.exception.ReferenceException: reference : template = om/java/cbean/AbstractBsConditionQuery.vm [line 612,column 99] : $toDate is not a valid reference. -2007-07-10 01:00:52,734 - org.apache.velocity.runtime.exception.ReferenceException: reference : template = om/java/cbean/AbstractBsConditionQuery.vm [line 612,column 71] : $fromDate is not a valid reference. -2007-07-10 01:00:52,734 - org.apache.velocity.runtime.exception.ReferenceException: reference : template = om/java/cbean/AbstractBsConditionQuery.vm [line 612,column 99] : $toDate is not a valid reference. -2007-07-10 01:00:52,734 - org.apache.velocity.runtime.exception.ReferenceException: reference : template = om/java/cbean/AbstractBsConditionQuery.vm [line 612,column 71] : $fromDate is not a valid reference. -2007-07-10 01:00:52,734 - org.apache.velocity.runtime.exception.ReferenceException: reference : template = om/java/cbean/AbstractBsConditionQuery.vm [line 612,column 99] : $toDate is not a valid reference. -2007-07-10 01:00:52,750 - ResourceManager : found om/java/cbean/BsConditionInlineQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:52,765 - ResourceManager : found om/java/cbean/BsConditionQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:52,781 - ResourceManager : found om/java/cbean/NestSelectSetupper.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:52,796 - ResourceManager : found om/java/bsbhv/BaseBhv.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:52,812 - ResourceManager : found om/java/bsdao/BaseDao.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:52,828 - ResourceManager : found om/java/bsentity/BaseEntity.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:52,843 - ResourceManager : found om/java/bsentity/dbmeta/DBMetaImpl.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:52,859 - ResourceManager : found om/java/cbean/BsConditionBean.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:52,859 - ResourceManager : found om/java/cbean/AbstractBsConditionQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:52,875 - ResourceManager : found om/java/cbean/BsConditionInlineQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:53,015 - ResourceManager : found om/java/cbean/BsConditionQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:53,015 - ResourceManager : found om/java/cbean/NestSelectSetupper.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:53,031 - ResourceManager : found om/java/bsbhv/BaseBhv.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:53,046 - ResourceManager : found om/java/bsdao/BaseDao.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:53,062 - ResourceManager : found om/java/bsentity/BaseEntity.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:53,078 - ResourceManager : found om/java/bsentity/dbmeta/DBMetaImpl.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:53,093 - ResourceManager : found om/java/cbean/BsConditionBean.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:53,109 - ResourceManager : found om/java/cbean/AbstractBsConditionQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:53,125 - ResourceManager : found om/java/cbean/BsConditionInlineQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:53,140 - ResourceManager : found om/java/cbean/BsConditionQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:53,140 - ResourceManager : found om/java/cbean/NestSelectSetupper.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:53,171 - ResourceManager : found om/java/bsbhv/BaseBhv.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:53,171 - ResourceManager : found om/java/bsdao/BaseDao.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:53,187 - ResourceManager : found om/java/bsentity/BaseEntity.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:53,203 - ResourceManager : found om/java/bsentity/dbmeta/DBMetaImpl.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:53,218 - ResourceManager : found om/java/cbean/BsConditionBean.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:53,234 - ResourceManager : found om/java/cbean/AbstractBsConditionQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:53,250 - ResourceManager : found om/java/cbean/BsConditionInlineQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:53,265 - ResourceManager : found om/java/cbean/BsConditionQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:53,265 - ResourceManager : found om/java/cbean/NestSelectSetupper.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:53,281 - ResourceManager : found om/java/bsbhv/BaseBhv.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:53,296 - ResourceManager : found om/java/bsdao/BaseDao.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:53,312 - ResourceManager : found om/java/bsentity/BaseEntity.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:53,328 - ResourceManager : found om/java/bsentity/dbmeta/DBMetaImpl.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:53,328 - ResourceManager : found om/java/cbean/BsConditionBean.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:53,343 - ResourceManager : found om/java/cbean/AbstractBsConditionQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:53,359 - ResourceManager : found om/java/cbean/BsConditionInlineQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:53,375 - ResourceManager : found om/java/cbean/BsConditionQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:53,375 - ResourceManager : found om/java/cbean/NestSelectSetupper.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:53,406 - ResourceManager : found om/java/bsbhv/BaseBhv.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:53,406 - ResourceManager : found om/java/bsdao/BaseDao.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:53,421 - ResourceManager : found om/java/bsentity/BaseEntity.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:53,437 - ResourceManager : found om/java/bsentity/dbmeta/DBMetaImpl.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:53,453 - ResourceManager : found om/java/cbean/BsConditionBean.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:53,468 - ResourceManager : found om/java/cbean/AbstractBsConditionQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:53,468 - org.apache.velocity.runtime.exception.ReferenceException: reference : template = om/java/cbean/AbstractBsConditionQuery.vm [line 612,column 71] : $fromDate is not a valid reference. -2007-07-10 01:00:53,468 - org.apache.velocity.runtime.exception.ReferenceException: reference : template = om/java/cbean/AbstractBsConditionQuery.vm [line 612,column 99] : $toDate is not a valid reference. -2007-07-10 01:00:53,484 - ResourceManager : found om/java/cbean/BsConditionInlineQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:53,500 - ResourceManager : found om/java/cbean/BsConditionQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:53,500 - ResourceManager : found om/java/cbean/NestSelectSetupper.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:53,515 - ResourceManager : found om/java/bsbhv/BaseBhv.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:53,531 - ResourceManager : found om/java/bsdao/BaseDao.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:53,546 - ResourceManager : found om/java/bsentity/BaseEntity.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:53,562 - ResourceManager : found om/java/bsentity/dbmeta/DBMetaImpl.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:53,578 - ResourceManager : found om/java/cbean/BsConditionBean.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:53,609 - ResourceManager : found om/java/cbean/AbstractBsConditionQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:53,609 - ResourceManager : found om/java/cbean/BsConditionInlineQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:53,640 - ResourceManager : found om/java/cbean/BsConditionQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:53,640 - ResourceManager : found om/java/cbean/NestSelectSetupper.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:53,671 - ResourceManager : found om/java/bsbhv/BaseBhv.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:53,671 - ResourceManager : found om/java/bsdao/BaseDao.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:53,687 - ResourceManager : found om/java/bsentity/BaseEntity.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:53,828 - ResourceManager : found om/java/bsentity/dbmeta/DBMetaImpl.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:53,843 - ResourceManager : found om/java/cbean/BsConditionBean.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:53,859 - ResourceManager : found om/java/cbean/AbstractBsConditionQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:53,875 - org.apache.velocity.runtime.exception.ReferenceException: reference : template = om/java/cbean/AbstractBsConditionQuery.vm [line 612,column 71] : $fromDate is not a valid reference. -2007-07-10 01:00:53,875 - org.apache.velocity.runtime.exception.ReferenceException: reference : template = om/java/cbean/AbstractBsConditionQuery.vm [line 612,column 99] : $toDate is not a valid reference. -2007-07-10 01:00:53,875 - org.apache.velocity.runtime.exception.ReferenceException: reference : template = om/java/cbean/AbstractBsConditionQuery.vm [line 612,column 71] : $fromDate is not a valid reference. -2007-07-10 01:00:53,875 - org.apache.velocity.runtime.exception.ReferenceException: reference : template = om/java/cbean/AbstractBsConditionQuery.vm [line 612,column 99] : $toDate is not a valid reference. -2007-07-10 01:00:53,875 - org.apache.velocity.runtime.exception.ReferenceException: reference : template = om/java/cbean/AbstractBsConditionQuery.vm [line 612,column 71] : $fromDate is not a valid reference. -2007-07-10 01:00:53,875 - org.apache.velocity.runtime.exception.ReferenceException: reference : template = om/java/cbean/AbstractBsConditionQuery.vm [line 612,column 99] : $toDate is not a valid reference. -2007-07-10 01:00:53,875 - ResourceManager : found om/java/cbean/BsConditionInlineQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:53,890 - ResourceManager : found om/java/cbean/BsConditionQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:53,906 - ResourceManager : found om/java/cbean/NestSelectSetupper.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:53,921 - ResourceManager : found om/java/bsbhv/BaseBhv.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:53,937 - ResourceManager : found om/java/bsdao/BaseDao.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:53,937 - ResourceManager : found om/java/bsentity/BaseEntity.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:53,953 - ResourceManager : found om/java/bsentity/dbmeta/DBMetaImpl.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:53,968 - ResourceManager : found om/java/cbean/BsConditionBean.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:53,984 - ResourceManager : found om/java/cbean/AbstractBsConditionQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:54,000 - ResourceManager : found om/java/cbean/BsConditionInlineQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:54,015 - ResourceManager : found om/java/cbean/BsConditionQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:54,015 - ResourceManager : found om/java/cbean/NestSelectSetupper.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:54,031 - ResourceManager : found om/java/bsbhv/BaseBhv.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:54,046 - ResourceManager : found om/java/bsdao/BaseDao.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:54,046 - ResourceManager : found om/java/bsentity/BaseEntity.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:54,062 - ResourceManager : found om/java/bsentity/dbmeta/DBMetaImpl.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:54,078 - ResourceManager : found om/java/cbean/BsConditionBean.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:54,093 - ResourceManager : found om/java/cbean/AbstractBsConditionQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:54,109 - ResourceManager : found om/java/cbean/BsConditionInlineQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:54,125 - ResourceManager : found om/java/cbean/BsConditionQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:54,125 - ResourceManager : found om/java/cbean/NestSelectSetupper.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:54,156 - ResourceManager : found om/java/bsbhv/BaseBhv.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:54,171 - ResourceManager : found om/java/bsdao/BaseDao.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:54,187 - ResourceManager : found om/java/bsentity/BaseEntity.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:54,203 - ResourceManager : found om/java/bsentity/dbmeta/DBMetaImpl.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:54,218 - ResourceManager : found om/java/cbean/BsConditionBean.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:54,234 - ResourceManager : found om/java/cbean/AbstractBsConditionQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:54,234 - ResourceManager : found om/java/cbean/BsConditionInlineQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:54,250 - ResourceManager : found om/java/cbean/BsConditionQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:54,265 - ResourceManager : found om/java/cbean/NestSelectSetupper.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:54,281 - ResourceManager : found om/java/bsbhv/BaseBhv.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:54,296 - ResourceManager : found om/java/bsdao/BaseDao.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:54,296 - ResourceManager : found om/java/bsentity/BaseEntity.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:54,312 - ResourceManager : found om/java/bsentity/dbmeta/DBMetaImpl.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:54,328 - ResourceManager : found om/java/cbean/BsConditionBean.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:54,343 - ResourceManager : found om/java/cbean/AbstractBsConditionQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:54,343 - org.apache.velocity.runtime.exception.ReferenceException: reference : template = om/java/cbean/AbstractBsConditionQuery.vm [line 612,column 71] : $fromDate is not a valid reference. -2007-07-10 01:00:54,343 - org.apache.velocity.runtime.exception.ReferenceException: reference : template = om/java/cbean/AbstractBsConditionQuery.vm [line 612,column 99] : $toDate is not a valid reference. -2007-07-10 01:00:54,359 - ResourceManager : found om/java/cbean/BsConditionInlineQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:54,359 - ResourceManager : found om/java/cbean/BsConditionQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:54,375 - ResourceManager : found om/java/cbean/NestSelectSetupper.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:54,390 - ResourceManager : found om/java/bsbhv/BaseBhv.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:54,406 - ResourceManager : found om/java/bsdao/BaseDao.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:54,406 - ResourceManager : found om/java/bsentity/BaseEntity.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:54,421 - ResourceManager : found om/java/bsentity/dbmeta/DBMetaImpl.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:54,437 - ResourceManager : found om/java/cbean/BsConditionBean.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:54,453 - ResourceManager : found om/java/cbean/AbstractBsConditionQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:54,453 - ResourceManager : found om/java/cbean/BsConditionInlineQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:54,468 - ResourceManager : found om/java/cbean/BsConditionQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:54,484 - ResourceManager : found om/java/cbean/NestSelectSetupper.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:54,500 - ResourceManager : found om/java/bsbhv/BaseBhv.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:54,515 - ResourceManager : found om/java/bsdao/BaseDao.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:54,531 - ResourceManager : found om/java/bsentity/BaseEntity.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:54,531 - ResourceManager : found om/java/bsentity/dbmeta/DBMetaImpl.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:54,687 - ResourceManager : found om/java/cbean/BsConditionBean.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:54,687 - ResourceManager : found om/java/cbean/AbstractBsConditionQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:54,703 - ResourceManager : found om/java/cbean/BsConditionInlineQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:54,718 - ResourceManager : found om/java/cbean/BsConditionQuery.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:54,718 - ResourceManager : found om/java/cbean/NestSelectSetupper.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:54,750 - ResourceManager : found om/java/bsbhv/BaseBhv.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:54,750 - ResourceManager : found om/java/bsdao/BaseDao.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:54,765 - ResourceManager : found om/java/bsentity/BaseEntity.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader -2007-07-10 01:00:54,781 - ResourceManager : found om/java/bsentity/dbmeta/DBMetaImpl.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader From svnnotify △ sourceforge.jp Wed Jul 11 06:35:05 2007 From: svnnotify △ sourceforge.jp (svnnotify △ sourceforge.jp) Date: Wed, 11 Jul 2007 06:35:05 +0900 Subject: [pal-cvs 2500] [232] changed db path Message-ID: <20070710213505.DCE662AC01C@users.sourceforge.jp> Revision: 232 http://svn.sourceforge.jp/cgi-bin/viewcvs.cgi?root=pal&view=rev&rev=232 Author: shinsuke Date: 2007-07-11 06:35:05 +0900 (Wed, 11 Jul 2007) Log Message: ----------- changed db path Modified Paths: -------------- pompei/trunk/dbflute/dfprop/databaseInfoMap.dfprop -------------- next part -------------- Modified: pompei/trunk/dbflute/dfprop/databaseInfoMap.dfprop =================================================================== --- pompei/trunk/dbflute/dfprop/databaseInfoMap.dfprop 2007-07-10 21:34:33 UTC (rev 231) +++ pompei/trunk/dbflute/dfprop/databaseInfoMap.dfprop 2007-07-10 21:35:05 UTC (rev 232) @@ -10,9 +10,9 @@ # @FirstProperty map:{ ; driver = org.apache.derby.jdbc.EmbeddedDriver - ; url = jdbc:derby:../db/pompei; + ; url = jdbc:derby:../src/main/webapp/WEB-INF/db/pompei; ; schema = APP ; user = ; password = } -# ----------------/ \ No newline at end of file +# ----------------/ From svnnotify △ sourceforge.jp Wed Jul 11 06:35:31 2007 From: svnnotify △ sourceforge.jp (svnnotify △ sourceforge.jp) Date: Wed, 11 Jul 2007 06:35:31 +0900 Subject: [pal-cvs 2501] [233] enabled dbflute script for unix Message-ID: <20070710213531.9BB082AC01C@users.sourceforge.jp> Revision: 233 http://svn.sourceforge.jp/cgi-bin/viewcvs.cgi?root=pal&view=rev&rev=233 Author: shinsuke Date: 2007-07-11 06:35:31 +0900 (Wed, 11 Jul 2007) Log Message: ----------- enabled dbflute script for unix Modified Paths: -------------- pompei/trunk/dbflute/_project.sh -------------- next part -------------- Modified: pompei/trunk/dbflute/_project.sh =================================================================== --- pompei/trunk/dbflute/_project.sh 2007-07-10 21:35:05 UTC (rev 232) +++ pompei/trunk/dbflute/_project.sh 2007-07-10 21:35:31 UTC (rev 233) @@ -1,5 +1,5 @@ #!/bin/sh -export MY_PROJECT_NAME=minimumProperties +export MY_PROJECT_NAME=pompei -#export DBFLUTE_HOME=../mydbflute/dbflute-x.x.x +export DBFLUTE_HOME=../mydbflute/dbflute-0.5.2 From svnnotify △ sourceforge.jp Wed Jul 11 11:32:49 2007 From: svnnotify △ sourceforge.jp (svnnotify △ sourceforge.jp) Date: Wed, 11 Jul 2007 11:32:49 +0900 Subject: [pal-cvs 2502] [234] clean up bundled jar files. Message-ID: <20070711023249.D41112AC037@users.sourceforge.jp> Revision: 234 http://svn.sourceforge.jp/cgi-bin/viewcvs.cgi?root=pal&view=rev&rev=234 Author: shinsuke Date: 2007-07-11 11:32:49 +0900 (Wed, 11 Jul 2007) Log Message: ----------- clean up bundled jar files. Modified Paths: -------------- pompei/trunk/pom.xml Added Paths: ----------- pompei/trunk/build.xml -------------- next part -------------- Added: pompei/trunk/build.xml =================================================================== --- pompei/trunk/build.xml 2007-07-10 21:35:31 UTC (rev 233) +++ pompei/trunk/build.xml 2007-07-11 02:32:49 UTC (rev 234) @@ -0,0 +1,138 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Property changes on: pompei/trunk/build.xml ___________________________________________________________________ Name: svn:eol-style + native Modified: pompei/trunk/pom.xml =================================================================== --- pompei/trunk/pom.xml 2007-07-10 21:35:31 UTC (rev 233) +++ pompei/trunk/pom.xml 2007-07-11 02:32:49 UTC (rev 234) @@ -46,6 +46,7 @@ http://pal.sourceforge.jp/ + pompei validate @@ -98,13 +99,13 @@ junit junit 3.8.2 - compile + test junit-addons junit-addons 1.4 - compile + test log4j @@ -115,11 +116,13 @@ org.apache.geronimo.specs geronimo-jsp_2.0_spec 1.0 + provided org.apache.geronimo.specs geronimo-servlet_2.4_spec 1.0 + provided org.apache.geronimo.specs @@ -137,6 +140,11 @@ 3.1 + poi + poi + 3.0-FINAL + + org.seasar.container s2-extension 2.4.13 @@ -170,6 +178,7 @@ org.seasar.teeda teeda-xmlunit 0.1.0 + test org.seasar.dao @@ -181,10 +190,17 @@ s2-dao-tiger 1.0.43 + + + org.apache.derby + derby + 10.1.1.0 + From svnnotify △ sourceforge.jp Wed Jul 11 12:16:15 2007 From: svnnotify △ sourceforge.jp (svnnotify △ sourceforge.jp) Date: Wed, 11 Jul 2007 12:16:15 +0900 Subject: [pal-cvs 2503] [235] added notice file. Message-ID: <20070711031615.5A61A2AC037@users.sourceforge.jp> Revision: 235 http://svn.sourceforge.jp/cgi-bin/viewcvs.cgi?root=pal&view=rev&rev=235 Author: shinsuke Date: 2007-07-11 12:16:15 +0900 (Wed, 11 Jul 2007) Log Message: ----------- added notice file. Added Paths: ----------- pal-admin/trunk/NOTICE.txt -------------- next part -------------- Added: pal-admin/trunk/NOTICE.txt =================================================================== --- pal-admin/trunk/NOTICE.txt 2007-07-11 02:32:49 UTC (rev 234) +++ pal-admin/trunk/NOTICE.txt 2007-07-11 03:16:15 UTC (rev 235) @@ -0,0 +1,13 @@ +Web Content Management Portlet +Copyright 2005-2007 Portal Application Laboratory Project + +This product includes software developed at +The Apache Software Foundation (http://www.apache.org/). + +This software contains codes and resources derived from: + + Silk icon set 1.3 + Mark James + http://www.famfamfam.com/lab/icons/silk/ + Creative Commons Attribution 2.5 License + Property changes on: pal-admin/trunk/NOTICE.txt ___________________________________________________________________ Name: svn:eol-style + native From svnnotify △ sourceforge.jp Wed Jul 11 13:10:22 2007 From: svnnotify △ sourceforge.jp (svnnotify △ sourceforge.jp) Date: Wed, 11 Jul 2007 13:10:22 +0900 Subject: [pal-cvs 2504] [236] removed log4j properties file. Message-ID: <20070711041022.6F5E02AC00E@users.sourceforge.jp> Revision: 236 http://svn.sourceforge.jp/cgi-bin/viewcvs.cgi?root=pal&view=rev&rev=236 Author: shinsuke Date: 2007-07-11 13:10:22 +0900 (Wed, 11 Jul 2007) Log Message: ----------- removed log4j properties file. Removed Paths: ------------- pompei/trunk/src/main/resources/log4j.properties -------------- next part -------------- Deleted: pompei/trunk/src/main/resources/log4j.properties =================================================================== --- pompei/trunk/src/main/resources/log4j.properties 2007-07-11 03:16:15 UTC (rev 235) +++ pompei/trunk/src/main/resources/log4j.properties 2007-07-11 04:10:22 UTC (rev 236) @@ -1,16 +0,0 @@ -log4j.category.org.seasar=DEBUG, C -log4j.additivity.org.seasar=false - -log4j.category.jp.sf.pal.pompei=DEBUG, C -log4j.additivity.jp.sf.pal.pompei=false - -log4j.appender.C=org.apache.log4j.ConsoleAppender -log4j.appender.C.Target=System.out -log4j.appender.C.ImmediateFlush=true -log4j.appender.C.layout=org.apache.log4j.PatternLayout -log4j.appender.C.layout.ConversionPattern=%-5p %d [%t] %m%n - -log4j.rootLogger=INFO, A1 -log4j.appender.A1=org.apache.log4j.ConsoleAppender -log4j.appender.A1.layout=org.apache.log4j.PatternLayout -log4j.appender.A1.layout.ConversionPattern=%d [%t] %-5p %c - %m%n From svnnotify △ sourceforge.jp Wed Jul 11 13:11:51 2007 From: svnnotify △ sourceforge.jp (svnnotify △ sourceforge.jp) Date: Wed, 11 Jul 2007 13:11:51 +0900 Subject: [pal-cvs 2505] [237] changed imageRoot Message-ID: <20070711041151.2BA842AC00E@users.sourceforge.jp> Revision: 237 http://svn.sourceforge.jp/cgi-bin/viewcvs.cgi?root=pal&view=rev&rev=237 Author: shinsuke Date: 2007-07-11 13:11:51 +0900 (Wed, 11 Jul 2007) Log Message: ----------- changed imageRoot Modified Paths: -------------- pal-admin/trunk/src/main/resources/teedaCustomize.dicon -------------- next part -------------- Modified: pal-admin/trunk/src/main/resources/teedaCustomize.dicon =================================================================== --- pal-admin/trunk/src/main/resources/teedaCustomize.dicon 2007-07-11 04:10:22 UTC (rev 236) +++ pal-admin/trunk/src/main/resources/teedaCustomize.dicon 2007-07-11 04:11:51 UTC (rev 237) @@ -6,6 +6,6 @@ - "/img/" + "/images/" From svnnotify △ sourceforge.jp Wed Jul 11 13:22:54 2007 From: svnnotify △ sourceforge.jp (svnnotify △ sourceforge.jp) Date: Wed, 11 Jul 2007 13:22:54 +0900 Subject: [pal-cvs 2506] [238] updated teeda Message-ID: <20070711042254.E49852AC03F@users.sourceforge.jp> Revision: 238 http://svn.sourceforge.jp/cgi-bin/viewcvs.cgi?root=pal&view=rev&rev=238 Author: shinsuke Date: 2007-07-11 13:22:54 +0900 (Wed, 11 Jul 2007) Log Message: ----------- updated teeda Modified Paths: -------------- pal-admin/trunk/pom.xml -------------- next part -------------- Modified: pal-admin/trunk/pom.xml =================================================================== --- pal-admin/trunk/pom.xml 2007-07-11 04:11:51 UTC (rev 237) +++ pal-admin/trunk/pom.xml 2007-07-11 04:22:54 UTC (rev 238) @@ -151,7 +151,7 @@ org.seasar.teeda teeda-extension - 1.0.7 + 1.0.8-RC1 jar From svnnotify △ sourceforge.jp Wed Jul 11 13:26:12 2007 From: svnnotify △ sourceforge.jp (svnnotify △ sourceforge.jp) Date: Wed, 11 Jul 2007 13:26:12 +0900 Subject: [pal-cvs 2507] [239] added site editor Message-ID: <20070711042612.61A9C2AC03F@users.sourceforge.jp> Revision: 239 http://svn.sourceforge.jp/cgi-bin/viewcvs.cgi?root=pal&view=rev&rev=239 Author: shinsuke Date: 2007-07-11 13:26:11 +0900 (Wed, 11 Jul 2007) Log Message: ----------- added site editor Modified Paths: -------------- pal-admin/trunk/src/main/java/jp/sf/pal/admin/PALAdminConstants.java pal-admin/trunk/src/main/java/jp/sf/pal/admin/util/PortalComponentUtil.java pal-admin/trunk/src/main/resources/appMessages.properties pal-admin/trunk/src/main/webapp/WEB-INF/portlet.xml Added Paths: ----------- pal-admin/trunk/src/main/java/jp/sf/pal/admin/dxo/SiteEditorDxo.java pal-admin/trunk/src/main/java/jp/sf/pal/admin/entity/NodeInfo.java pal-admin/trunk/src/main/java/jp/sf/pal/admin/filter/SiteEditorFilter.java pal-admin/trunk/src/main/java/jp/sf/pal/admin/logic/SiteEditorLogic.java pal-admin/trunk/src/main/java/jp/sf/pal/admin/service/SiteEditorService.java pal-admin/trunk/src/main/java/jp/sf/pal/admin/web/site/ pal-admin/trunk/src/main/java/jp/sf/pal/admin/web/site/AbstractSiteEditorPage.java pal-admin/trunk/src/main/java/jp/sf/pal/admin/web/site/PageInfoEditorPage.java pal-admin/trunk/src/main/resources/jp/sf/pal/admin/web/site/ pal-admin/trunk/src/main/resources/jp/sf/pal/admin/web/site/label.properties pal-admin/trunk/src/main/resources/jp/sf/pal/admin/web/site/label_ja.properties pal-admin/trunk/src/main/webapp/images/ pal-admin/trunk/src/main/webapp/images/folder.png pal-admin/trunk/src/main/webapp/images/layout.png pal-admin/trunk/src/main/webapp/images/page.png pal-admin/trunk/src/main/webapp/images/portlet.png pal-admin/trunk/src/main/webapp/view/site/ pal-admin/trunk/src/main/webapp/view/site/pageInfoEditor.html -------------- next part -------------- Modified: pal-admin/trunk/src/main/java/jp/sf/pal/admin/PALAdminConstants.java =================================================================== --- pal-admin/trunk/src/main/java/jp/sf/pal/admin/PALAdminConstants.java 2007-07-11 04:22:54 UTC (rev 238) +++ pal-admin/trunk/src/main/java/jp/sf/pal/admin/PALAdminConstants.java 2007-07-11 04:26:11 UTC (rev 239) @@ -24,35 +24,30 @@ public static final String CPS_SECURITY_PROVIDER_COMPONENT = "cps:SecurityProvider"; - public static final String SECURITY_PROVIDER_COMPONENT = PREFIX - + "SecurityProvider"; + public static final String SECURITY_PROVIDER_COMPONENT = PREFIX + "SecurityProvider"; - public static final String PORTAL_ADMINISTRATION_COMPONENT = PREFIX - + "PortalAdministration"; + public static final String PORTAL_ADMINISTRATION_COMPONENT = PREFIX + "PortalAdministration"; public static final String USER_MANAGER_COMPONENT = PREFIX + "UserManager"; public static final String ROLE_MANAGER_COMPONENT = PREFIX + "RoleManager"; - public static final String GROUP_MANAGER_COMPONENT = PREFIX - + "GroupManager"; + public static final String GROUP_MANAGER_COMPONENT = PREFIX + "GroupManager"; public static final String PROFILER_COMPONENT = PREFIX + "Profiler"; public static final String PAGE_MANAGER_COMPONENT = PREFIX + "PageManager"; - public static final String APPLICATION_SERVER_MANAGER_COMPONENT = PREFIX - + "ApplicationServerManager"; + public static final String APPLICATION_SERVER_MANAGER_COMPONENT = PREFIX + "ApplicationServerManager"; - public static final String PORTLET_REGISTRY_COMPONENT = PREFIX - + "PortletRegistry"; + public static final String PORTLET_REGISTRY_COMPONENT = PREFIX + "PortletRegistry"; - public static final String PORTLET_FACTORY_COMPONENT = PREFIX - + "PortletFactory"; + public static final String PORTLET_FACTORY_COMPONENT = PREFIX + "PortletFactory"; - public static final String DEPLOYMENT_MANAGER_COMPONENT = PREFIX - + "DeploymentManager"; + public static final String DEPLOYMENT_MANAGER_COMPONENT = PREFIX + "DeploymentManager"; + public static final String DECORATION_FACTORY_COMPONENT = PREFIX + "DecorationFactory"; + public static final String PREVIOUS_PAGE_NUMBER = "previousPageNumber"; public static final String NEXT_PAGE_NUMBER = "nextPageNumber"; @@ -68,8 +63,7 @@ public static final String USER_CREDENTIAL_EXTEND = PREFIX + "Extend"; - public static final String USER_CREDENTIAL_EXTEND_UNLIMITED = PREFIX - + "ExtendUnlimited"; + public static final String USER_CREDENTIAL_EXTEND_UNLIMITED = PREFIX + "ExtendUnlimited"; //TODO move to portlet.xml file public static final String LOCATOR_PAGE = "page"; @@ -111,28 +105,23 @@ public static final String RULE_VALUES = PREFIX + "RuleValues"; - public static final String EMAIL_TEMPLATE_LOCATION = PREFIX - + "EmailTemplateLocation"; + public static final String EMAIL_TEMPLATE_LOCATION = PREFIX + "EmailTemplateLocation"; - public static final String EMAIL_TEMPLATE_NAME = PREFIX - + "EmailTemplateName"; + public static final String EMAIL_TEMPLATE_NAME = PREFIX + "EmailTemplateName"; public static final String TEMPLATE_LOCATOR = PREFIX + "TemplateLocator"; public static final String FORCE_UNIQUE_EMAIL = PREFIX + "ForceUniqueEmail"; - public static final String FORCE_GENERATED_PASSWORD = PREFIX - + "ForceGeneratedPassword"; + public static final String FORCE_GENERATED_PASSWORD = PREFIX + "ForceGeneratedPassword"; - public static final String FORCE_USE_EMAIL_AS_USERNAME = PREFIX - + "ForceUseEmailAsUsername"; + public static final String FORCE_USE_EMAIL_AS_USERNAME = PREFIX + "ForceUseEmailAsUsername"; public static final String SEND_MAIL = PREFIX + "SendMail"; public static final String RETURN_PATH = PREFIX + "ReturnPath"; - public static final String USER_REGISTRATION_PARAMS = PREFIX - + "UserRegistrationParams"; + public static final String USER_REGISTRATION_PARAMS = PREFIX + "UserRegistrationParams"; public static final String DEFAULT_TEMPLATE_LOCATION = "/WEB-INF/template/userreg/"; Added: pal-admin/trunk/src/main/java/jp/sf/pal/admin/dxo/SiteEditorDxo.java =================================================================== --- pal-admin/trunk/src/main/java/jp/sf/pal/admin/dxo/SiteEditorDxo.java 2007-07-11 04:22:54 UTC (rev 238) +++ pal-admin/trunk/src/main/java/jp/sf/pal/admin/dxo/SiteEditorDxo.java 2007-07-11 04:26:11 UTC (rev 239) @@ -0,0 +1,10 @@ +package jp.sf.pal.admin.dxo; + +import java.util.Map; + +import jp.sf.pal.admin.web.site.PageInfoEditorPage; + +public interface SiteEditorDxo +{ + public void convert(Map list, PageInfoEditorPage page); +} Property changes on: pal-admin/trunk/src/main/java/jp/sf/pal/admin/dxo/SiteEditorDxo.java ___________________________________________________________________ Name: svn:eol-style + native Added: pal-admin/trunk/src/main/java/jp/sf/pal/admin/entity/NodeInfo.java =================================================================== --- pal-admin/trunk/src/main/java/jp/sf/pal/admin/entity/NodeInfo.java 2007-07-11 04:22:54 UTC (rev 238) +++ pal-admin/trunk/src/main/java/jp/sf/pal/admin/entity/NodeInfo.java 2007-07-11 04:26:11 UTC (rev 239) @@ -0,0 +1,162 @@ +package jp.sf.pal.admin.entity; + +import java.io.Serializable; + +public class NodeInfo implements Serializable +{ + /** + * + */ + private static final long serialVersionUID = 8509076712190045631L; + + public static final int FOLDER = 1; + + public static final int PAGE = 2; + + public static final int LAYOUT = 3; + + public static final int PORTLET = 4; + + private int type; + + private String name; + + private String path; + + private String returnPath; + + private boolean expanded; + + private int depth; + + private boolean selected; + + public NodeInfo(int type, String name, String path, String returnPath, int depth, boolean expanded, boolean selected) + { + this.type = type; + this.name = name; + this.path = path; + this.returnPath = returnPath; + this.expanded = expanded; + this.depth = depth; + this.selected = selected; + } + + /** + * @return the type + */ + public int getType() + { + return type; + } + + /** + * @param type the type to set + */ + public void setType(int type) + { + this.type = type; + } + + /** + * @return the name + */ + public String getName() + { + return name; + } + + /** + * @param name the name to set + */ + public void setName(String name) + { + this.name = name; + } + + /** + * @return the expanded + */ + public boolean isExpanded() + { + return expanded; + } + + /** + * @param expanded the expanded to set + */ + public void setExpanded(boolean expanded) + { + this.expanded = expanded; + } + + /** + * @return the depth + */ + public int getDepth() + { + return depth; + } + + /** + * @param depth the depth to set + */ + public void setDepth(int depth) + { + this.depth = depth; + } + + /** + * @return the selected + */ + public boolean isSelected() + { + return selected; + } + + /** + * @param selected the selected to set + */ + public void setSelected(boolean selected) + { + this.selected = selected; + } + + /** + * @return the path + */ + public String getPath() + { + return path; + } + + /** + * @param path the path to set + */ + public void setPath(String path) + { + this.path = path; + } + + /** + * @return the returnPath + */ + public String getReturnPath() + { + return returnPath; + } + + /** + * @param returnPath the returnPath to set + */ + public void setReturnPath(String returnPath) + { + this.returnPath = returnPath; + } + + public void incrementDepth() + { + depth++; + } + +} Property changes on: pal-admin/trunk/src/main/java/jp/sf/pal/admin/entity/NodeInfo.java ___________________________________________________________________ Name: svn:eol-style + native Added: pal-admin/trunk/src/main/java/jp/sf/pal/admin/filter/SiteEditorFilter.java =================================================================== --- pal-admin/trunk/src/main/java/jp/sf/pal/admin/filter/SiteEditorFilter.java 2007-07-11 04:22:54 UTC (rev 238) +++ pal-admin/trunk/src/main/java/jp/sf/pal/admin/filter/SiteEditorFilter.java 2007-07-11 04:26:11 UTC (rev 239) @@ -0,0 +1,85 @@ +package jp.sf.pal.admin.filter; + +import java.io.IOException; + +import javax.portlet.ActionRequest; +import javax.portlet.ActionResponse; +import javax.portlet.PortletConfig; +import javax.portlet.PortletContext; +import javax.portlet.PortletException; +import javax.portlet.RenderRequest; +import javax.portlet.RenderResponse; + +import jp.sf.pal.admin.PALAdminConstants; + +import org.apache.jetspeed.CommonPortletServices; +import org.apache.jetspeed.decoration.DecorationFactory; +import org.apache.jetspeed.page.PageManager; +import org.apache.jetspeed.profiler.Profiler; +import org.apache.portals.bridges.portletfilter.PortletFilter; +import org.apache.portals.bridges.portletfilter.PortletFilterChain; +import org.apache.portals.bridges.portletfilter.PortletFilterConfig; + +public class SiteEditorFilter implements PortletFilter +{ + private PageManager pageManager; + + private Profiler profiler; + + private DecorationFactory decorationFactory; + + public void destroy() + { + pageManager = null; + profiler = null; + } + + public void init(PortletFilterConfig filterConfig) throws PortletException + { + PortletConfig portletConfig = filterConfig.getPortletConfig(); + PortletContext portletContext = portletConfig.getPortletContext(); + + // pageManager + pageManager = (PageManager) portletContext.getAttribute(CommonPortletServices.CPS_PAGE_MANAGER_COMPONENT); + if (null == pageManager) + { + throw new PortletException("Failed to find the Page Manager on portlet initialization"); + } + + // profiler + profiler = (Profiler) portletContext.getAttribute(CommonPortletServices.CPS_PROFILER_COMPONENT); + if (null == profiler) + { + throw new PortletException("Failed to find the Profiler on portlet initialization"); + } + + // decorationFactory + decorationFactory = (DecorationFactory) portletContext.getAttribute(CommonPortletServices.CPS_DECORATION_FACTORY); + if (null == decorationFactory) + { + throw new PortletException("Failed to find the Profiler on portlet initialization"); + } + } + + public void processActionFilter(ActionRequest request, ActionResponse response, PortletFilterChain chain) + throws PortletException, IOException + { + request.setAttribute(PALAdminConstants.PAGE_MANAGER_COMPONENT, pageManager); + request.setAttribute(PALAdminConstants.PROFILER_COMPONENT, profiler); + request.setAttribute(PALAdminConstants.DECORATION_FACTORY_COMPONENT, decorationFactory); + + chain.processActionFilter(request, response); + } + + public void renderFilter(RenderRequest request, RenderResponse response, PortletFilterChain chain) throws PortletException, + IOException + { + request.setAttribute(PALAdminConstants.PAGE_MANAGER_COMPONENT, pageManager); + request.setAttribute(PALAdminConstants.PROFILER_COMPONENT, profiler); + request.setAttribute(PALAdminConstants.DECORATION_FACTORY_COMPONENT, decorationFactory); + + chain.renderFilter(request, response); + + } + +} Property changes on: pal-admin/trunk/src/main/java/jp/sf/pal/admin/filter/SiteEditorFilter.java ___________________________________________________________________ Name: svn:eol-style + native Added: pal-admin/trunk/src/main/java/jp/sf/pal/admin/logic/SiteEditorLogic.java =================================================================== --- pal-admin/trunk/src/main/java/jp/sf/pal/admin/logic/SiteEditorLogic.java 2007-07-11 04:22:54 UTC (rev 238) +++ pal-admin/trunk/src/main/java/jp/sf/pal/admin/logic/SiteEditorLogic.java 2007-07-11 04:26:11 UTC (rev 239) @@ -0,0 +1,430 @@ +package jp.sf.pal.admin.logic; + +import java.io.Serializable; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.Iterator; +import java.util.List; +import java.util.Map; + +import javax.faces.context.FacesContext; + +import jp.sf.pal.admin.entity.NodeInfo; +import jp.sf.pal.admin.util.PortalComponentUtil; +import jp.sf.pal.common.CommonException; + +import org.apache.jetspeed.PortalReservedParameters; +import org.apache.jetspeed.decoration.DecorationFactory; +import org.apache.jetspeed.om.folder.Folder; +import org.apache.jetspeed.om.folder.FolderNotFoundException; +import org.apache.jetspeed.om.folder.InvalidFolderException; +import org.apache.jetspeed.om.page.Page; +import org.apache.jetspeed.page.PageManager; +import org.apache.jetspeed.page.PageNotFoundException; +import org.apache.jetspeed.page.PageNotUpdatedException; +import org.apache.jetspeed.page.document.DocumentException; +import org.apache.jetspeed.page.document.NodeException; +import org.apache.jetspeed.profiler.Profiler; +import org.apache.jetspeed.request.RequestContext; +import org.apache.log4j.Logger; + +public class SiteEditorLogic implements Serializable +{ + /** + * + */ + private static final long serialVersionUID = 3488261005315934120L; + + /** + * Logger for this class + */ + private static final Logger logger = Logger.getLogger(SiteEditorLogic.class); + + private transient PageManager pageManager = null; + + private transient Profiler profiler = null; + + private transient DecorationFactory decorationFactory = null; + + private transient RequestContext requestContext = null; + + /** + * @return the pageManager + */ + public PageManager getPageManager() + { + if (pageManager == null) + { + pageManager = PortalComponentUtil.getPageManager(); + } + return pageManager; + } + + /** + * @param pageManager the pageManager to set + */ + public void setPageManager(PageManager pageManager) + { + this.pageManager = pageManager; + } + + /** + * @return the profiler + */ + public Profiler getProfiler() + { + if (profiler == null) + { + profiler = PortalComponentUtil.getProfiler(); + } + return profiler; + } + + /** + * @param profiler the profiler to set + */ + public void setProfiler(Profiler profiler) + { + this.profiler = profiler; + } + + /** + * @return the profiler + */ + public DecorationFactory getDecorationFactory() + { + if (decorationFactory == null) + { + decorationFactory = PortalComponentUtil.getDecorationFactory(); + } + return decorationFactory; + } + + /** + * @param profiler the profiler to set + */ + public void setDecorationFactory(DecorationFactory decorationFactory) + { + this.decorationFactory = decorationFactory; + } + + /** + * @return the profiler + */ + public RequestContext getRequestContext() + { + if (requestContext == null) + { + requestContext = (RequestContext) FacesContext.getCurrentInstance().getExternalContext().getRequestMap().get( + PortalReservedParameters.REQUEST_CONTEXT_ATTRIBUTE); + } + return requestContext; + } + + /** + * @param profiler the profiler to set + */ + public void setRequestContext(RequestContext requestContext) + { + this.requestContext = requestContext; + } + + public List getTreeNode(String path, String returnPath) throws CommonException + { + List treeList = new ArrayList(); + treeList.add(new NodeInfo(NodeInfo.FOLDER, "/", path, returnPath, 0, true, true)); + + try + { + Folder rootFolder = getPageManager().getFolder("/"); + List childTreeList = constructTreeNode(rootFolder, path, returnPath, 1); + if (childTreeList != null) + { + treeList.addAll(childTreeList); + } + return treeList; + } + catch (FolderNotFoundException e) + { + logger.error("Could not access a folder: " + path, e); + throw new CommonException("could.not.access.folder", "Could not access a folder: " + path, e); + } + catch (InvalidFolderException e) + { + logger.error("Could not access a folder: " + path, e); + throw new CommonException("could.not.access.folder", "Could not access a folder: " + path, e); + } + catch (NodeException e) + { + logger.error("Could not access a folder: " + path, e); + throw new CommonException("could.not.access.folder", "Could not access a folder: " + path, e); + } + + } + + protected List constructTreeNode(Folder parent, String path, String returnPath, int depth) throws CommonException + { + int parentPathLength = parent.getPath().length(); + if (parentPathLength >= path.length()) + { + return null; + } + String targetPathName = path.substring(parentPathLength); + int endIndex = targetPathName.indexOf("/"); + if (endIndex > 0) + { + targetPathName = targetPathName.substring(0, endIndex); + } + + if (targetPathName.endsWith(".psml")) + { + // page + List treeList = new ArrayList(); + try + { + // child folders + for (Iterator ite = parent.getFolders().iterator(); ite.hasNext();) + { + Folder child = ite.next(); + treeList.add(new NodeInfo(NodeInfo.FOLDER, child.getName(), child.getPath(), returnPath, depth + 1, false, + false)); + if (targetPathName.equals(child.getName())) + { + List childTreeList = constructTreeNode(child, path, returnPath, depth + 1); + if (childTreeList != null) + { + treeList.addAll(childTreeList); + } + } + } + } + catch (DocumentException e) + { + logger.warn("Could not get folders: " + path, e); + } + + try + { + // child pages + for (Iterator ite = parent.getPages().iterator(); ite.hasNext();) + { + Page child = ite.next(); + if (targetPathName.equals(child.getName())) + { + treeList.add(new NodeInfo(NodeInfo.PAGE, child.getName(), child.getPath(), returnPath, depth + 1, true, + true)); + //TODO layout and portlet + } + else + { + treeList.add(new NodeInfo(NodeInfo.PAGE, child.getName(), child.getPath(), returnPath, depth + 1, false, + false)); + } + } + } + catch (NodeException e) + { + logger.warn("Could not get pages: " + path, e); + } + + return treeList; + } + else + { + // folder + List treeList = new ArrayList(); + try + { + // child folders + for (Iterator ite = parent.getFolders().iterator(); ite.hasNext();) + { + Folder child = ite.next(); + if (targetPathName.equals(child.getName())) + { + List childTreeList = constructTreeNode(child, path, returnPath, depth + 1); + if (childTreeList != null) + { + treeList.add(new NodeInfo(NodeInfo.FOLDER, child.getName(), child.getPath(), returnPath, depth + 1, + true, false)); + treeList.addAll(childTreeList); + } + else + { + treeList.add(new NodeInfo(NodeInfo.FOLDER, child.getName(), child.getPath(), returnPath, depth + 1, + true, true)); + } + } + else + { + treeList.add(new NodeInfo(NodeInfo.FOLDER, child.getName(), child.getPath(), returnPath, depth + 1, false, + false)); + } + } + } + catch (DocumentException e) + { + logger.warn("Could not get folders: " + path, e); + } + + try + { + // child pages + for (Iterator ite = parent.getPages().iterator(); ite.hasNext();) + { + Page child = ite.next(); + treeList + .add(new NodeInfo(NodeInfo.PAGE, child.getName(), child.getPath(), returnPath, depth + 1, false, false)); + } + } + catch (NodeException e) + { + logger.warn("Could not get pages: " + path, e); + } + return treeList; + } + } + + public List> createPageDecorationsList() + { + List> list = new ArrayList>(); + for (Iterator itr = getDecorationFactory().getPageDecorations(getRequestContext()).iterator(); itr.hasNext();) + { + Map map = new HashMap(); + String value = itr.next(); + map.put("label", value); + map.put("value", value); + list.add(map); + } + return list; + } + + public List> createPortletDecorationsList() + { + List> list = new ArrayList>(); + for (Iterator itr = getDecorationFactory().getPortletDecorations(getRequestContext()).iterator(); itr.hasNext();) + { + Map map = new HashMap(); + String value = itr.next(); + map.put("label", value); + map.put("value", value); + list.add(map); + } + return list; + } + + public List> createDesktopPageDecorationsList() + { + List> list = new ArrayList>(); + for (Iterator itr = getDecorationFactory().getDesktopPageDecorations(getRequestContext()).iterator(); itr.hasNext();) + { + Map map = new HashMap(); + String value = itr.next(); + map.put("label", value); + map.put("value", value); + list.add(map); + } + return list; + } + + public Map getPageInfo(String path) throws CommonException + { + Map map = new HashMap(); + + Page contentPage = getPage(path); + if (contentPage != null) + { + map.put("pageTitle", contentPage.getTitle()); + map.put("pageShortTitle", contentPage.getShortTitle()); + map.put("pageDecorator", contentPage.getDefaultDecorator("layout")); + map.put("portletDecorator", contentPage.getDefaultDecorator("portlet")); + map.put("desktopTheme", contentPage.getSkin()); + map.put("pageHidden", contentPage.isHidden()); + } + return map; + } + + protected Page getPage(String path) throws CommonException + { + if (path == null) + { + // TODO exception? + return null; + } + + try + { + Folder folder = getPageManager().getFolder("/"); + String[] names = path.split("/"); + for (int i = 0; i < names.length - 1; i++) + { + if (!"".equals(names[i])) + { + folder = folder.getFolder(names[i]); + } + } + if (names[names.length - 1].endsWith(".psml")) + { + // page + return folder.getPage(names[names.length - 1]); + } + else + { + // folder + return null; + } + } + catch (PageNotFoundException e) + { + logger.error("Could not access a page: " + path, e); + throw new CommonException("could.not.access.page", "Could not access a page: " + path, e); + } + catch (FolderNotFoundException e) + { + logger.error("Could not access a page: " + path, e); + throw new CommonException("could.not.access.page", "Could not access a page: " + path, e); + } + catch (InvalidFolderException e) + { + logger.error("Could not access a page: " + path, e); + throw new CommonException("could.not.access.page", "Could not access a page: " + path, e); + } + catch (DocumentException e) + { + logger.error("Could not access a page: " + path, e); + throw new CommonException("could.not.access.page", "Could not access a page: " + path, e); + } + catch (NodeException e) + { + logger.error("Could not access a page: " + path, e); + throw new CommonException("could.not.access.page", "Could not access a page: " + path, e); + } + } + + public void updatePage(String path, String pageTitle, String pageShortTitle, String pageDecorator, String portletDecorator, + String desktopTheme, boolean pageHidden) throws CommonException + { + Page page = getPage(path); + if (page == null) + { + throw new CommonException("could.not.find.page", "Could not find a page: " + path); + } + page.setTitle(pageTitle); + page.setShortTitle(pageShortTitle); + page.setDefaultDecorator(pageDecorator, "layout"); + page.setDefaultDecorator(portletDecorator, "portlet"); + page.setSkin(desktopTheme); + page.setHidden(pageHidden); + try + { + getPageManager().updatePage(page); + } + catch (PageNotUpdatedException e) + { + throw new CommonException("could.not.update.page", "Could not update a page: " + path, e); + } + catch (NodeException e) + { + throw new CommonException("could.not.update.page", "Could not update a page: " + path, e); + } + } +} Property changes on: pal-admin/trunk/src/main/java/jp/sf/pal/admin/logic/SiteEditorLogic.java ___________________________________________________________________ Name: svn:eol-style + native Added: pal-admin/trunk/src/main/java/jp/sf/pal/admin/service/SiteEditorService.java =================================================================== --- pal-admin/trunk/src/main/java/jp/sf/pal/admin/service/SiteEditorService.java 2007-07-11 04:22:54 UTC (rev 238) +++ pal-admin/trunk/src/main/java/jp/sf/pal/admin/service/SiteEditorService.java 2007-07-11 04:26:11 UTC (rev 239) @@ -0,0 +1,92 @@ +package jp.sf.pal.admin.service; + +import java.io.Serializable; +import java.util.ArrayList; +import java.util.List; + +import jp.sf.pal.admin.dxo.SiteEditorDxo; +import jp.sf.pal.admin.entity.NodeInfo; +import jp.sf.pal.admin.logic.SiteEditorLogic; +import jp.sf.pal.admin.web.site.AbstractSiteEditorPage; +import jp.sf.pal.admin.web.site.PageInfoEditorPage; +import jp.sf.pal.common.CommonException; + +public class SiteEditorService implements Serializable +{ + /** + * + */ + private static final long serialVersionUID = 5510938200628686790L; + + private SiteEditorLogic siteEditorLogic; + + private SiteEditorDxo siteEditorDxo; + + /** + * @return the siteEditorLogic + */ + public SiteEditorLogic getSiteEditorLogic() + { + return siteEditorLogic; + } + + /** + * @param siteEditorLogic the siteEditorLogic to set + */ + public void setSiteEditorLogic(SiteEditorLogic siteEditorLogic) + { + this.siteEditorLogic = siteEditorLogic; + } + + /** + * @return the siteEditorDxo + */ + public SiteEditorDxo getSiteEditorDxo() + { + return siteEditorDxo; + } + + /** + * @param siteEditorDxo the siteEditorDxo to set + */ + public void setSiteEditorDxo(SiteEditorDxo siteEditorDxo) + { + this.siteEditorDxo = siteEditorDxo; + } + + public void loadPage(PageInfoEditorPage page) throws CommonException + { + loadTree(page); + + page.setPageDecoratorItems(getSiteEditorLogic().createPageDecorationsList()); + page.setPortletDecoratorItems(getSiteEditorLogic().createPortletDecorationsList()); + page.setDesktopThemeItems(getSiteEditorLogic().createDesktopPageDecorationsList()); + + getSiteEditorDxo().convert(getSiteEditorLogic().getPageInfo(page.getPath()), page); + } + + protected void loadTree(AbstractSiteEditorPage page) throws CommonException + { + String path = page.getPath(); + if (path != null) + { + String returnPath = page.getReturnPath(); + if (returnPath == null) + { + returnPath = "/"; + } + page.setNodeItems(getSiteEditorLogic().getTreeNode(path, returnPath)); + } + else + { + List empty = new ArrayList(); + page.setNodeItems(empty); + } + } + + public void updatePage(PageInfoEditorPage page) throws CommonException + { + getSiteEditorLogic().updatePage(page.getPath(), page.getPageTitle(), page.getPageShortTitle(), page.getPageDecorator(), + page.getPortletDecorator(), page.getDesktopTheme(), page.isPageHidden()); + } +} Property changes on: pal-admin/trunk/src/main/java/jp/sf/pal/admin/service/SiteEditorService.java ___________________________________________________________________ Name: svn:eol-style + native Modified: pal-admin/trunk/src/main/java/jp/sf/pal/admin/util/PortalComponentUtil.java =================================================================== --- pal-admin/trunk/src/main/java/jp/sf/pal/admin/util/PortalComponentUtil.java 2007-07-11 04:22:54 UTC (rev 238) +++ pal-admin/trunk/src/main/java/jp/sf/pal/admin/util/PortalComponentUtil.java 2007-07-11 04:26:11 UTC (rev 239) @@ -22,6 +22,7 @@ import org.apache.jetspeed.administration.PortalAdministration; import org.apache.jetspeed.components.portletregistry.PortletRegistry; +import org.apache.jetspeed.decoration.DecorationFactory; import org.apache.jetspeed.deployment.DeploymentManager; import org.apache.jetspeed.factory.PortletFactory; import org.apache.jetspeed.page.PageManager; @@ -44,73 +45,69 @@ public static UserManager getUserManager() { - return (UserManager) getFacesContext().getExternalContext() - .getRequestMap().get(PALAdminConstants.USER_MANAGER_COMPONENT); + return (UserManager) getFacesContext().getExternalContext().getRequestMap().get(PALAdminConstants.USER_MANAGER_COMPONENT); } public static RoleManager getRoleManager() { - return (RoleManager) getFacesContext().getExternalContext() - .getRequestMap().get(PALAdminConstants.ROLE_MANAGER_COMPONENT); + return (RoleManager) getFacesContext().getExternalContext().getRequestMap().get(PALAdminConstants.ROLE_MANAGER_COMPONENT); } public static GroupManager getGroupManager() { - return (GroupManager) getFacesContext().getExternalContext() - .getRequestMap().get(PALAdminConstants.GROUP_MANAGER_COMPONENT); + return (GroupManager) getFacesContext().getExternalContext().getRequestMap().get(PALAdminConstants.GROUP_MANAGER_COMPONENT); } public static Profiler getProfiler() { - return (Profiler) getFacesContext().getExternalContext() - .getRequestMap().get(PALAdminConstants.PROFILER_COMPONENT); + return (Profiler) getFacesContext().getExternalContext().getRequestMap().get(PALAdminConstants.PROFILER_COMPONENT); } public static PageManager getPageManager() { - return (PageManager) getFacesContext().getExternalContext() - .getRequestMap().get(PALAdminConstants.PAGE_MANAGER_COMPONENT); + return (PageManager) getFacesContext().getExternalContext().getRequestMap().get(PALAdminConstants.PAGE_MANAGER_COMPONENT); } public static SecurityProvider getSecurityProvider() { - return (SecurityProvider) getFacesContext().getExternalContext() - .getRequestMap().get( - PALAdminConstants.SECURITY_PROVIDER_COMPONENT); + return (SecurityProvider) getFacesContext().getExternalContext().getRequestMap().get( + PALAdminConstants.SECURITY_PROVIDER_COMPONENT); } public static ApplicationServerManager getApplicationServerManager() { - return (ApplicationServerManager) getFacesContext() - .getExternalContext().getRequestMap().get( - PALAdminConstants.APPLICATION_SERVER_MANAGER_COMPONENT); + return (ApplicationServerManager) getFacesContext().getExternalContext().getRequestMap().get( + PALAdminConstants.APPLICATION_SERVER_MANAGER_COMPONENT); } public static PortletRegistry getPortletRegistry() { - return (PortletRegistry) getFacesContext().getExternalContext() - .getRequestMap().get( - PALAdminConstants.PORTLET_REGISTRY_COMPONENT); + return (PortletRegistry) getFacesContext().getExternalContext().getRequestMap().get( + PALAdminConstants.PORTLET_REGISTRY_COMPONENT); } public static PortletFactory getPortletFactory() { - return (PortletFactory) getFacesContext().getExternalContext() - .getRequestMap().get( - PALAdminConstants.PORTLET_FACTORY_COMPONENT); + return (PortletFactory) getFacesContext().getExternalContext().getRequestMap().get( + PALAdminConstants.PORTLET_FACTORY_COMPONENT); } public static DeploymentManager getDeploymentManager() { - return (DeploymentManager) getFacesContext().getExternalContext() - .getRequestMap().get( - PALAdminConstants.DEPLOYMENT_MANAGER_COMPONENT); + return (DeploymentManager) getFacesContext().getExternalContext().getRequestMap().get( + PALAdminConstants.DEPLOYMENT_MANAGER_COMPONENT); } public static PortalAdministration getPortalAdministration() { - return (PortalAdministration) getFacesContext().getExternalContext() - .getRequestMap().get( - PALAdminConstants.PORTAL_ADMINISTRATION_COMPONENT); + return (PortalAdministration) getFacesContext().getExternalContext().getRequestMap().get( + PALAdminConstants.PORTAL_ADMINISTRATION_COMPONENT); } + + public static DecorationFactory getDecorationFactory() + { + return (DecorationFactory) getFacesContext().getExternalContext().getRequestMap().get( + PALAdminConstants.DECORATION_FACTORY_COMPONENT); + } + } Added: pal-admin/trunk/src/main/java/jp/sf/pal/admin/web/site/AbstractSiteEditorPage.java =================================================================== --- pal-admin/trunk/src/main/java/jp/sf/pal/admin/web/site/AbstractSiteEditorPage.java 2007-07-11 04:22:54 UTC (rev 238) +++ pal-admin/trunk/src/main/java/jp/sf/pal/admin/web/site/AbstractSiteEditorPage.java 2007-07-11 04:26:11 UTC (rev 239) @@ -0,0 +1,187 @@ +package jp.sf.pal.admin.web.site; + +import java.util.List; + +import javax.faces.context.FacesContext; + +import jp.sf.pal.admin.entity.NodeInfo; +import jp.sf.pal.admin.service.SiteEditorService; + +public abstract class AbstractSiteEditorPage +{ + private List nodeItems; + + private int nodeIndex; + + private String path; + + private String returnPath; + + private String name; + + private SiteEditorService siteEditorService; + + /** + * @return the name + */ + public String getName() + { + return name; + } + + /** + * @param name the name to set + */ + public void setName(String name) + { + this.name = name; + } + + /** + * @return the nodeItems + */ + public List getNodeItems() + { + return nodeItems; + } + + /** + * @param nodeItems the nodeItems to set + */ + public void setNodeItems(List nodeItems) + { + this.nodeItems = nodeItems; + } + + /** + * @return the nodeIndex + */ + public int getNodeIndex() + { + return nodeIndex; + } + + /** + * @param nodeIndex the nodeIndex to set + */ + public void setNodeIndex(int nodeIndex) + { + this.nodeIndex = nodeIndex; + } + + public AbstractSiteEditorPage() + { + super(); + } + + /** + * @return the path + */ + public String getPath() + { + return path; + } + + /** + * @param path the path to set + */ + public void setPath(String path) + { + this.path = path; + } + + /** + * @return the returnPath + */ + public String getReturnPath() + { + return returnPath; + } + + /** + * @param returnPath the returnPath to set + */ + public void setReturnPath(String returnPath) + { + this.returnPath = returnPath; + } + + /** + * @return the siteEditorSerivce + */ + public SiteEditorService getSiteEditorService() + { + return siteEditorService; + } + + /** + * @param siteEditorSerivce the siteEditorSerivce to set + */ + public void setSiteEditorService(SiteEditorService siteEditorService) + { + this.siteEditorService = siteEditorService; + } + + public String getJumpFolderInfoEditorStyle() + { + return getJumpEditorStyle(); + } + + public String getJumpPageInfoEditorStyle() + { + return getJumpEditorStyle(); + } + + protected String getJumpEditorStyle() + { + StringBuffer buf = new StringBuffer("text-decoration: none;margin-left:"); + NodeInfo entity = getNodeItems().get(getNodeIndex()); + buf.append(entity.getDepth() * 10); + buf.append("px;"); + return buf.toString(); + } + + public String getFolderIconSrc() + { + return getIconSrc(); + } + + public String getPageIconSrc() + { + return getIconSrc(); + } + + public String getIconSrc() + { + FacesContext facesContext = FacesContext.getCurrentInstance(); + StringBuffer buf = new StringBuffer(facesContext.getExternalContext().getRequestContextPath() + "/images/"); + + NodeInfo entity = getNodeItems().get(getNodeIndex()); + if (entity.getType() == NodeInfo.FOLDER) + { + buf.append("folder"); + } + else if (entity.getType() == NodeInfo.PAGE) + { + buf.append("page"); + } + else + { + buf.append("none"); + } + buf.append(".png"); + return buf.toString(); + } + + public boolean isFolder() + { + NodeInfo entity = getNodeItems().get(getNodeIndex()); + return entity.getType() == NodeInfo.FOLDER; + } + + public boolean isPage() + { + NodeInfo entity = getNodeItems().get(getNodeIndex()); + return entity.getType() == NodeInfo.PAGE; + } +} \ No newline at end of file Property changes on: pal-admin/trunk/src/main/java/jp/sf/pal/admin/web/site/AbstractSiteEditorPage.java ___________________________________________________________________ Name: svn:eol-style + native Added: pal-admin/trunk/src/main/java/jp/sf/pal/admin/web/site/PageInfoEditorPage.java =================================================================== --- pal-admin/trunk/src/main/java/jp/sf/pal/admin/web/site/PageInfoEditorPage.java 2007-07-11 04:22:54 UTC (rev 238) +++ pal-admin/trunk/src/main/java/jp/sf/pal/admin/web/site/PageInfoEditorPage.java 2007-07-11 04:26:11 UTC (rev 239) @@ -0,0 +1,242 @@ +package jp.sf.pal.admin.web.site; + +import java.io.Serializable; +import java.util.List; +import java.util.Map; + +import javax.faces.internal.FacesMessageUtil; + +import jp.sf.pal.common.CommonException; + +import org.seasar.framework.log.Logger; +import org.seasar.teeda.extension.annotation.takeover.TakeOver; +import org.seasar.teeda.extension.annotation.takeover.TakeOverType; + +public class PageInfoEditorPage extends AbstractSiteEditorPage implements Serializable +{ + + /** + * + */ + private static final long serialVersionUID = 6200363396293790793L; + + /** + * Logger for this class + */ + private static final Logger logger = Logger.getLogger(PageInfoEditorPage.class); + + private String pageTitle; + + private String pageShortTitle; + + private List> pageDecoratorItems; + + private String pageDecorator; + + private List> portletDecoratorItems; + + private String portletDecorator; + + private List> desktopThemeItems; + + private String desktopTheme; + + private boolean pageHidden; + + /** + * @return the pageTitle + */ + public String getPageTitle() + { + return pageTitle; + } + + /** + * @param pageTitle the pageTitle to set + */ + public void setPageTitle(String pageTitle) + { + this.pageTitle = pageTitle; + } + + /** + * @return the pageShortTitle + */ + public String getPageShortTitle() + { + return pageShortTitle; + } + + /** + * @param pageShortTitle the pageShortTitle to set + */ + public void setPageShortTitle(String pageShortTitle) + { + this.pageShortTitle = pageShortTitle; + } + + /** + * @return the pageDecoratorItems + */ + public List> getPageDecoratorItems() + { + return pageDecoratorItems; + } + + /** + * @param pageDecoratorItems the pageDecoratorItems to set + */ + public void setPageDecoratorItems(List> pageDecoratorItems) + { + this.pageDecoratorItems = pageDecoratorItems; + } + + /** + * @return the pageDecorator + */ + public String getPageDecorator() + { + return pageDecorator; + } + + /** + * @param pageDecorator the pageDecorator to set + */ + public void setPageDecorator(String pageDecorator) + { + this.pageDecorator = pageDecorator; + } + + /** + * @return the portletDecoratorItems + */ + public List> getPortletDecoratorItems() + { + return portletDecoratorItems; + } + + /** + * @param portletDecoratorItems the portletDecoratorItems to set + */ + public void setPortletDecoratorItems(List> portletDecoratorItems) + { + this.portletDecoratorItems = portletDecoratorItems; + } + + /** + * @return the portletDecorator + */ + public String getPortletDecorator() + { + return portletDecorator; + } + + /** + * @param portletDecorator the portletDecorator to set + */ + public void setPortletDecorator(String portletDecorator) + { + this.portletDecorator = portletDecorator; + } + + /** + * @return the desktopItems + */ + public List> getDesktopThemeItems() + { + return desktopThemeItems; + } + + /** + * @param desktopThemeItems the desktopItems to set + */ + public void setDesktopThemeItems(List> desktopThemeItems) + { + this.desktopThemeItems = desktopThemeItems; + } + + /** + * @return the desktopTheme + */ + public String getDesktopTheme() + { + return desktopTheme; + } + + /** + * @param desktopTheme the desktopTheme to set + */ + public void setDesktopTheme(String desktopTheme) + { + this.desktopTheme = desktopTheme; + } + + /** + * @return the pageHidden + */ + public boolean isPageHidden() + { + return pageHidden; + } + + /** + * @param pageHidden the pageHidden to set + */ + public void setPageHidden(boolean pageHidden) + { + this.pageHidden = pageHidden; + } + + public Class initialize() + { + return null; + } + + public Class prerender() + { + if (getPath() == null) + { + setPath("/default-page.psml"); + } + + if (getReturnPath() == null) + { + setReturnPath("/"); + } + + try + { + getSiteEditorService().loadPage(this); + } + catch (CommonException e) + { + FacesMessageUtil.addErrorMessage(e.getMessageId()); + logger.log("EPA0001", new Object[] { this.toString() }, e); + } + + return null; + } + + @TakeOver(type = TakeOverType.INCLUDE, properties = "path,returnPath") + public Class doUpdate() + { + try + { + getSiteEditorService().updatePage(this); + FacesMessageUtil.addInfoMessage("updated.page"); + return PageInfoEditorPage.class; + } + catch (CommonException e) + { + FacesMessageUtil.addErrorMessage(e.getMessageId()); + logger.log("EPA0002", new Object[] { this.toString() }, e); + } + catch (Exception e) + { + FacesMessageUtil.addErrorMessage("could.not.update.page"); + logger.log("EPA0002", new Object[] { this.toString() }, e); + } + return null; + } + +} Property changes on: pal-admin/trunk/src/main/java/jp/sf/pal/admin/web/site/PageInfoEditorPage.java ___________________________________________________________________ Name: svn:eol-style + native Modified: pal-admin/trunk/src/main/resources/appMessages.properties =================================================================== --- pal-admin/trunk/src/main/resources/appMessages.properties 2007-07-11 04:22:54 UTC (rev 238) +++ pal-admin/trunk/src/main/resources/appMessages.properties 2007-07-11 04:26:11 UTC (rev 239) @@ -93,3 +93,9 @@ could.not.match.passwords=Could not match password and verify passoword. could.not.update.password=Could not update a password. Please contact a site administrator. updated.user.info=Updated user information + +could.not.access.folder=Could not access the target folder. Please contact a site administrator. +could.not.access.page=Could not access the target page. Please contact a site administrator. +could.not.find.page=Could not find the target page. Please contact a site administrator. +could.not.update.page=Could not update the target page. Please try again. If you see this error message again, please contact a site administrator. +updated.page=Updated the target page. \ No newline at end of file Added: pal-admin/trunk/src/main/resources/jp/sf/pal/admin/web/site/label.properties =================================================================== --- pal-admin/trunk/src/main/resources/jp/sf/pal/admin/web/site/label.properties 2007-07-11 04:22:54 UTC (rev 238) +++ pal-admin/trunk/src/main/resources/jp/sf/pal/admin/web/site/label.properties 2007-07-11 04:26:11 UTC (rev 239) @@ -0,0 +1,10 @@ +infoTab=Information +securityTab=Security +metadataTab=Metadata + +pageInfoEditor.pageTitle=Title: +pageInfoEditor.pageShortTitle=Short Title: +pageInfoEditor.pageDecorator=Page Decorator: +pageInfoEditor.portletDecorator=Portlet Decorator: +pageInfoEditor.desktopTheme=Desktop Theme: +pageInfoEditor.pageHidden=Hide This Page?: Property changes on: pal-admin/trunk/src/main/resources/jp/sf/pal/admin/web/site/label.properties ___________________________________________________________________ Name: svn:eol-style + native Added: pal-admin/trunk/src/main/resources/jp/sf/pal/admin/web/site/label_ja.properties =================================================================== --- pal-admin/trunk/src/main/resources/jp/sf/pal/admin/web/site/label_ja.properties 2007-07-11 04:22:54 UTC (rev 238) +++ pal-admin/trunk/src/main/resources/jp/sf/pal/admin/web/site/label_ja.properties 2007-07-11 04:26:11 UTC (rev 239) @@ -0,0 +1,3 @@ +infoTab=\u60c5\u5831 +securityTab=\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3 +metadataTab=\u30e1\u30bf\u30c7\u30fc\u30bf \ No newline at end of file Property changes on: pal-admin/trunk/src/main/resources/jp/sf/pal/admin/web/site/label_ja.properties ___________________________________________________________________ Name: svn:eol-style + native Modified: pal-admin/trunk/src/main/webapp/WEB-INF/portlet.xml =================================================================== --- pal-admin/trunk/src/main/webapp/WEB-INF/portlet.xml 2007-07-11 04:22:54 UTC (rev 238) +++ pal-admin/trunk/src/main/webapp/WEB-INF/portlet.xml 2007-07-11 04:26:11 UTC (rev 239) @@ -226,7 +226,7 @@ view-page - /view/registration/publicPortalRegistration.html + /view/registration/publicPortalRegistrationRegister.html This option will generate a new password for each user registration @@ -362,4 +362,37 @@ Update + + Provides features for managing a site configuration. + サイトを瓷妄する怠墙を捏丁します。 + SiteEditorPortlet + Site Editor + サイトエディタ〖 + org.apache.portals.bridges.portletfilter.FilterPortlet + + portlet-class + org.seasar.teeda.core.portlet.FacesPortlet + + + portlet-filters + jp.sf.pal.admin.filter.SiteEditorFilter,jp.sf.pal.facesresponse.FacesResponseFilter,jp.sf.pal.pooptimizer.OptimizerFilter,org.seasar.portlet.filter.S2PortletFilter,org.seasar.portlet.filter.HotdeployPortletFilter + + + view-page + /view/site/pageInfoEditor.html + + 0 + + text/html + VIEW + + en + ja + jp.sf.pal.admin.web.site.SiteEditor + + Site Editor + Editor + Site + + Added: pal-admin/trunk/src/main/webapp/images/folder.png =================================================================== (Binary files differ) Property changes on: pal-admin/trunk/src/main/webapp/images/folder.png ___________________________________________________________________ Name: svn:mime-type + image/png Added: pal-admin/trunk/src/main/webapp/images/layout.png =================================================================== (Binary files differ) Property changes on: pal-admin/trunk/src/main/webapp/images/layout.png ___________________________________________________________________ Name: svn:mime-type + image/png Added: pal-admin/trunk/src/main/webapp/images/page.png =================================================================== (Binary files differ) Property changes on: pal-admin/trunk/src/main/webapp/images/page.png ___________________________________________________________________ Name: svn:mime-type + image/png Added: pal-admin/trunk/src/main/webapp/images/portlet.png =================================================================== (Binary files differ) Property changes on: pal-admin/trunk/src/main/webapp/images/portlet.png ___________________________________________________________________ Name: svn:mime-type + image/png Added: pal-admin/trunk/src/main/webapp/view/site/pageInfoEditor.html =================================================================== --- pal-admin/trunk/src/main/webapp/view/site/pageInfoEditor.html 2007-07-11 04:22:54 UTC (rev 238) +++ pal-admin/trunk/src/main/webapp/view/site/pageInfoEditor.html 2007-07-11 04:26:11 UTC (rev 239) @@ -0,0 +1,85 @@ + + + + + + + + +
+
+ +
+ + + +
+ +
+ + + +
+ + + Security + + + Metadata + +
+
+ +
+
+ +
+
+
+ +
+
+
+ +
+
+
+ +
+
+
+ +
+
+
+ +
+
+ +
+
+
+
+ + + + Property changes on: pal-admin/trunk/src/main/webapp/view/site/pageInfoEditor.html ___________________________________________________________________ Name: svn:eol-style + native From svnnotify △ sourceforge.jp Wed Jul 11 13:47:24 2007 From: svnnotify △ sourceforge.jp (svnnotify △ sourceforge.jp) Date: Wed, 11 Jul 2007 13:47:24 +0900 Subject: [pal-cvs 2508] [240] updated registration page Message-ID: <20070711044724.19E1F2AC035@users.sourceforge.jp> Revision: 240 http://svn.sourceforge.jp/cgi-bin/viewcvs.cgi?root=pal&view=rev&rev=240 Author: shinsuke Date: 2007-07-11 13:47:23 +0900 (Wed, 11 Jul 2007) Log Message: ----------- updated registration page Modified Paths: -------------- pal-admin/trunk/src/main/java/jp/sf/pal/admin/web/registration/PublicPortalRegistrationPage.java pal-admin/trunk/src/main/java/jp/sf/pal/admin/web/registration/PublicPortalRegistrationUpdatePage.java pal-admin/trunk/src/main/resources/jp/sf/pal/admin/web/registration/UserRegistration_ja.properties pal-admin/trunk/src/main/resources/jp/sf/pal/admin/web/registration/label.properties Added Paths: ----------- pal-admin/trunk/src/main/java/jp/sf/pal/admin/web/registration/PublicPortalRegistrationRegisterPage.java pal-admin/trunk/src/main/webapp/view/registration/publicPortalRegistrationRegister.html Removed Paths: ------------- pal-admin/trunk/src/main/webapp/view/registration/publicPortalRegistration.html -------------- next part -------------- Modified: pal-admin/trunk/src/main/java/jp/sf/pal/admin/web/registration/PublicPortalRegistrationPage.java =================================================================== --- pal-admin/trunk/src/main/java/jp/sf/pal/admin/web/registration/PublicPortalRegistrationPage.java 2007-07-11 04:26:11 UTC (rev 239) +++ pal-admin/trunk/src/main/java/jp/sf/pal/admin/web/registration/PublicPortalRegistrationPage.java 2007-07-11 04:47:23 UTC (rev 240) @@ -1,22 +1,7 @@ package jp.sf.pal.admin.web.registration; -import java.io.BufferedReader; -import java.io.FileInputStream; -import java.io.FileNotFoundException; -import java.io.IOException; -import java.io.InputStreamReader; import java.io.Serializable; -import java.io.UnsupportedEncodingException; -import javax.faces.internal.FacesMessageUtil; - -import jp.sf.pal.admin.PALAdminConstants; -import jp.sf.pal.admin.util.PALAdminUtil; -import jp.sf.pal.admin.util.UserRegistrationUtil; -import jp.sf.pal.common.CommonException; - -import org.seasar.framework.log.Logger; - public class PublicPortalRegistrationPage extends UserRegistrationPage implements Serializable { @@ -25,65 +10,6 @@ */ private static final long serialVersionUID = 8681176430915097393L; - /** - * Logger for this class - */ - private static final Logger logger = Logger.getLogger(PublicPortalRegistrationPage.class); - - public static final String userName_TRequiredValidator = null; - - public static final String userName_lengthValidator = "minimum=6, maximum=32"; - - public static final String userNameFamily_TRequiredValidator = null; - - public static final String userNameFamily_lengthValidator = " maximum=30"; - - public static final String userNameGiven_TRequiredValidator = null; - - public static final String userNameGiven_lengthValidator = "maximum=30"; - - public static final String userNameFamilyYomi_TRequiredValidator = null; - - public static final String userNameFamilyYomi_lengthValidator = " maximum=30"; - - public static final String userNameGivenYomi_TRequiredValidator = null; - - public static final String userNameGivenYomi_lengthValidator = "maximum=30"; - - public static final String userHomeInfoPostalPostalcode_TRequiredValidator = null; - - public static final String userHomeInfoPostalPostalcode_lengthValidator = "maximum=8"; - - public static final String userGender_TRequiredValidator = null; - - public static final String userBdateYear_TRequiredValidator = null; - - public static final String userBdateYear_TNumberLengthValidator = "integralMax=4"; - - public static final String userBdateMonth_TRequiredValidator = null; - - public static final String userBdateMonth_TNumberLengthValidator = "integralMax=2"; - - public static final String userBdateDate_TRequiredValidator = null; - - public static final String userBdateDate_TNumberLengthValidator = "integralMax=2"; - - public static final String userBusinessInfoOnlineEmail_TRequiredValidator = null; - - public static final String userBusinessInfoOnlineEmail_lengthValidator = "minimum=5, maximum=80"; - - public static final String userIndustry_TRequiredValidator = null; - - public static final String userJobtitle_TRequiredValidator = null; - - public static final String userSecretQuestion_TRequiredValidator = null; - - public static final String userSecretQuestion_lengthValidator = "maximum=100"; - - public static final String userSecretAnswer_TRequiredValidator = null; - - public static final String userSecretAnswer_lengthValidator = "maximum=100"; - private String userNameFamilyYomi; private String userNameGivenYomi; @@ -172,98 +98,6 @@ this.userSecretQuestion = userSecretQuestion; } - public Class doFinish() - { - if (getUserBusinessInfoOnlineEmail() != null) - { - setUserHomeInfoOnlineEmail(getUserBusinessInfoOnlineEmail()); - } - - try - { - getUserRegistrationService().register(this); - if (UserRegistrationUtil.getBoolean(PALAdminConstants.SEND_MAIL)) - { - FacesMessageUtil.addInfoMessage("success.check_your_email"); - return PublicPortalRegistrationCompletedPage.class; - } - else - { - FacesMessageUtil.addInfoMessage("success.login_above"); - } - } - catch (CommonException e) - { - FacesMessageUtil.addErrorMessage(e.getMessageId()); - logger.log("EPA0001", new Object[] { this.toString() }, e); - - } - - return null; - } - - public Class initialize() - { - String filename = getLabelHelper().getLabelValue("termOfServiceFile"); - if (filename == null) - { - filename = "/WEB-INF/template/term_of_service.txt"; - } - String encoding = getLabelHelper().getLabelValue("termOfServiceEncoding"); - if (encoding == null) - { - encoding = "UTF-8"; - } - StringBuffer buf = new StringBuffer(); - BufferedReader reader = null; - try - { - reader = new BufferedReader(new InputStreamReader(new FileInputStream(PALAdminUtil.getContextRealPath(filename)), - encoding)); - String line; - while ((line = reader.readLine()) != null) - { - buf.append(line).append("\n"); - } - } - catch (UnsupportedEncodingException e) - { - FacesMessageUtil.addErrorMessage("could.not.read.term.of.service"); - logger.log("EPA0004", new Object[] { this.toString() }, e); - } - catch (FileNotFoundException e) - { - FacesMessageUtil.addErrorMessage("could.not.read.term.of.service"); - logger.log("EPA0004", new Object[] { this.toString() }, e); - } - catch (IOException e) - { - FacesMessageUtil.addErrorMessage("could.not.read.term.of.service"); - logger.log("EPA0004", new Object[] { this.toString() }, e); - } - finally - { - if (reader != null) - { - try - { - reader.close(); - } - catch (IOException e) - { - } - } - } - setTermOfService(buf.toString()); - - return null; - } - - public Class prerender() - { - return null; - } - /** * @return the userNameFamilyYomi */ Added: pal-admin/trunk/src/main/java/jp/sf/pal/admin/web/registration/PublicPortalRegistrationRegisterPage.java =================================================================== --- pal-admin/trunk/src/main/java/jp/sf/pal/admin/web/registration/PublicPortalRegistrationRegisterPage.java 2007-07-11 04:26:11 UTC (rev 239) +++ pal-admin/trunk/src/main/java/jp/sf/pal/admin/web/registration/PublicPortalRegistrationRegisterPage.java 2007-07-11 04:47:23 UTC (rev 240) @@ -0,0 +1,177 @@ +package jp.sf.pal.admin.web.registration; + +import java.io.BufferedReader; +import java.io.FileInputStream; +import java.io.FileNotFoundException; +import java.io.IOException; +import java.io.InputStreamReader; +import java.io.UnsupportedEncodingException; + +import javax.faces.internal.FacesMessageUtil; + +import jp.sf.pal.admin.PALAdminConstants; +import jp.sf.pal.admin.util.PALAdminUtil; +import jp.sf.pal.admin.util.UserRegistrationUtil; +import jp.sf.pal.common.CommonException; + +import org.seasar.framework.log.Logger; + +public class PublicPortalRegistrationRegisterPage extends PublicPortalRegistrationPage +{ + /** + * + */ + private static final long serialVersionUID = 5818687558352917312L; + + /** + * Logger for this class + */ + private static final Logger logger = Logger.getLogger(PublicPortalRegistrationRegisterPage.class); + + public static final String userName_TRequiredValidator = null; + + public static final String userName_lengthValidator = "minimum=6, maximum=32"; + + public static final String userNameFamily_TRequiredValidator = null; + + public static final String userNameFamily_lengthValidator = " maximum=30"; + + public static final String userNameGiven_TRequiredValidator = null; + + public static final String userNameGiven_lengthValidator = "maximum=30"; + + public static final String userNameFamilyYomi_TRequiredValidator = null; + + public static final String userNameFamilyYomi_lengthValidator = " maximum=30"; + + public static final String userNameGivenYomi_TRequiredValidator = null; + + public static final String userNameGivenYomi_lengthValidator = "maximum=30"; + + public static final String userHomeInfoPostalPostalcode_TRequiredValidator = null; + + public static final String userHomeInfoPostalPostalcode_lengthValidator = "maximum=8"; + + public static final String userGender_TRequiredValidator = null; + + public static final String userBdateYear_TRequiredValidator = null; + + public static final String userBdateYear_TNumberLengthValidator = "integralMax=4"; + + public static final String userBdateMonth_TRequiredValidator = null; + + public static final String userBdateMonth_TNumberLengthValidator = "integralMax=2"; + + public static final String userBdateDate_TRequiredValidator = null; + + public static final String userBdateDate_TNumberLengthValidator = "integralMax=2"; + + public static final String userBusinessInfoOnlineEmail_TRequiredValidator = null; + + public static final String userBusinessInfoOnlineEmail_lengthValidator = "minimum=5, maximum=80"; + + public static final String userIndustry_TRequiredValidator = null; + + public static final String userJobtitle_TRequiredValidator = null; + + public static final String userSecretQuestion_TRequiredValidator = null; + + public static final String userSecretQuestion_lengthValidator = "maximum=100"; + + public static final String userSecretAnswer_TRequiredValidator = null; + + public static final String userSecretAnswer_lengthValidator = "maximum=100"; + + public Class doFinish() + { + if (getUserBusinessInfoOnlineEmail() != null) + { + setUserHomeInfoOnlineEmail(getUserBusinessInfoOnlineEmail()); + } + + try + { + getUserRegistrationService().register(this); + if (UserRegistrationUtil.getBoolean(PALAdminConstants.SEND_MAIL)) + { + FacesMessageUtil.addInfoMessage("success.check_your_email"); + return PublicPortalRegistrationCompletedPage.class; + } + else + { + FacesMessageUtil.addInfoMessage("success.login_above"); + } + } + catch (CommonException e) + { + FacesMessageUtil.addErrorMessage(e.getMessageId()); + logger.log("EPA0001", new Object[] { this.toString() }, e); + + } + + return null; + } + + public Class initialize() + { + String filename = getLabelHelper().getLabelValue("termOfServiceFile"); + if (filename == null) + { + filename = "/WEB-INF/template/term_of_service.txt"; + } + String encoding = getLabelHelper().getLabelValue("termOfServiceEncoding"); + if (encoding == null) + { + encoding = "UTF-8"; + } + StringBuffer buf = new StringBuffer(); + BufferedReader reader = null; + try + { + reader = new BufferedReader(new InputStreamReader(new FileInputStream(PALAdminUtil.getContextRealPath(filename)), + encoding)); + String line; + while ((line = reader.readLine()) != null) + { + buf.append(line).append("\n"); + } + } + catch (UnsupportedEncodingException e) + { + FacesMessageUtil.addErrorMessage("could.not.read.term.of.service"); + logger.log("EPA0004", new Object[] { this.toString() }, e); + } + catch (FileNotFoundException e) + { + FacesMessageUtil.addErrorMessage("could.not.read.term.of.service"); + logger.log("EPA0004", new Object[] { this.toString() }, e); + } + catch (IOException e) + { + FacesMessageUtil.addErrorMessage("could.not.read.term.of.service"); + logger.log("EPA0004", new Object[] { this.toString() }, e); + } + finally + { + if (reader != null) + { + try + { + reader.close(); + } + catch (IOException e) + { + } + } + } + setTermOfService(buf.toString()); + + return null; + } + + public Class prerender() + { + return null; + } + +} Property changes on: pal-admin/trunk/src/main/java/jp/sf/pal/admin/web/registration/PublicPortalRegistrationRegisterPage.java ___________________________________________________________________ Name: svn:eol-style + native Modified: pal-admin/trunk/src/main/java/jp/sf/pal/admin/web/registration/PublicPortalRegistrationUpdatePage.java =================================================================== --- pal-admin/trunk/src/main/java/jp/sf/pal/admin/web/registration/PublicPortalRegistrationUpdatePage.java 2007-07-11 04:26:11 UTC (rev 239) +++ pal-admin/trunk/src/main/java/jp/sf/pal/admin/web/registration/PublicPortalRegistrationUpdatePage.java 2007-07-11 04:47:23 UTC (rev 240) @@ -4,10 +4,10 @@ import javax.faces.internal.FacesMessageUtil; +import jp.sf.pal.common.CommonException; + import org.seasar.framework.log.Logger; -import jp.sf.pal.common.CommonException; - public class PublicPortalRegistrationUpdatePage extends PublicPortalRegistrationPage implements Serializable { @@ -19,7 +19,7 @@ /** * Logger for this class */ - private static final Logger logger = Logger.getLogger(PublicPortalRegistrationPage.class); + private static final Logger logger = Logger.getLogger(PublicPortalRegistrationUpdatePage.class); public static final String userName_TRequiredValidator = null; Modified: pal-admin/trunk/src/main/resources/jp/sf/pal/admin/web/registration/UserRegistration_ja.properties =================================================================== --- pal-admin/trunk/src/main/resources/jp/sf/pal/admin/web/registration/UserRegistration_ja.properties 2007-07-11 04:26:11 UTC (rev 239) +++ pal-admin/trunk/src/main/resources/jp/sf/pal/admin/web/registration/UserRegistration_ja.properties 2007-07-11 04:47:23 UTC (rev 240) @@ -1,5 +1,5 @@ # portlet info -javax.portlet.title=\u30e6\u30fc\u30b6\u30fc\u60c5\u5831\u66f4\u65b0 -javax.portlet.short-title=\u30e6\u30fc\u30b6\u30fc\u60c5\u5831\u66f4\u65b0 -javax.portlet.keywords=\u30d1\u30b9\u30ef\u30fc\u30c9,\u66f4\u65b0,\u30e6\u30fc\u30b6\u30fc\u60c5\u5831 +javax.portlet.title=\u30e6\u30fc\u30b6\u30fc\u767b\u9332 +javax.portlet.short-title=\u30e6\u30fc\u30b6\u30fc\u767b\u9332 +javax.portlet.keywords=\u30d1\u30b9\u30ef\u30fc\u30c9,\u767b\u9332,\u30e6\u30fc\u30b6\u30fc\u60c5\u5831 Modified: pal-admin/trunk/src/main/resources/jp/sf/pal/admin/web/registration/label.properties =================================================================== --- pal-admin/trunk/src/main/resources/jp/sf/pal/admin/web/registration/label.properties 2007-07-11 04:26:11 UTC (rev 239) +++ pal-admin/trunk/src/main/resources/jp/sf/pal/admin/web/registration/label.properties 2007-07-11 04:47:23 UTC (rev 240) @@ -83,80 +83,80 @@ SignUp=Sign Up # Public Portal Registration -publicPortalRegistration.requiredDescription=\u304c\u3064\u3044\u3066\u3044\u308b\u9805\u76ee\u306f\u304b\u306a\u3089\u305a\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044\u3002 -publicPortalRegistration.userIdTitle=\u30e6\u30fc\u30b6\u30fc ID \u306e\u5165\u529b -publicPortalRegistration.typeUserId=\u3054\u5e0c\u671b\u306e\u30e6\u30fc\u30b6\u30fc ID \u3092\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044\u3002 -publicPortalRegistration.userId=\u30e6\u30fc\u30b6\u30fc ID -publicPortalRegistration.userIdCondition= (6\u301c32\u5b57\u306e\u534a\u89d2\u82f1\u6570\u5b57) -publicPortalRegistration.userIdExample= (\u4f8b\uff1ahoge2000\u3001foo777\u306a\u3069) -publicPortalRegistration.userIdHint=\u30e6\u30fc\u30b6\u30fc ID \u306b\u95a2\u3059\u308b\u30d2\u30f3\u30c8 -publicPortalRegistration.userIdBeginWithAlphabet=\u6700\u521d\u306e\u6587\u5b57\u306f\u30a2\u30eb\u30d5\u30a1\u30d9\u30c3\u30c8 -publicPortalRegistration.underscoreAvailable=\u8a18\u53f7\u306f\u3001\u30a2\u30f3\u30c0\u30fc\u30d0\u30fc ( _ ) \u306e\u307f\u4f7f\u7528\u53ef\u80fd\u3067\u3059 -publicPortalRegistration.userInfoTitle=\u304a\u5ba2\u69d8\u60c5\u5831\u306e\u5165\u529b -publicPortalRegistration.typeUserInfo=\u30e6\u30fc\u30b6\u30fc ID \u3084\u30d1\u30b9\u30ef\u30fc\u30c9\u3092\u304a\u5fd8\u308c\u306e\u5834\u5408\u306b\u3001\u4ee5\u4e0b\u306e\u60c5\u5831\u3092\u5143\u306b\u672c\u4eba\u78ba\u8a8d\u3092\u884c\u3044\u307e\u3059\u3002\u6b63\u78ba\u306b\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044\u3002 -publicPortalRegistration.userHomeInfoPostalPostalcode=\u90f5\u4fbf\u756a\u53f7 -publicPortalRegistration.userHomeInfoPostalPostalcodeCondition= (\u534a\u89d2\u6570\u5b57\uff17\u6841) -publicPortalRegistration.userHomeInfoPostalPostalcodeExample= (\u4f8b\uff1a123-0001\u30011230001) -publicPortalRegistration.userGender=\u6027\u5225 -publicPortalRegistration.male=\u7537\u6027 -publicPortalRegistration.female=\u5973\u6027 -publicPortalRegistration.userBdate=\u751f\u5e74\u6708\u65e5 -publicPortalRegistration.userBdateYear=\u5e74 -publicPortalRegistration.userBdateMonth=\u6708 -publicPortalRegistration.userBdateDate=\u65e5 -publicPortalRegistration.userBusinessInfoOnlineEmail=\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9 -publicPortalRegistration.userBusinessInfoOnlineEmailCondition= (\u534a\u89d2) -publicPortalRegistration.userIndustry=\u696d\u7a2e -publicPortalRegistration.ComputerInternet=\u30b3\u30f3\u30d4\u30e5\u30fc\u30bf\u95a2\u4fc2 (\u7ba1\u7406/\u30a4\u30f3\u30bf\u30fc\u30cd\u30c3\u30c8) -publicPortalRegistration.ComputerHardware=\u30b3\u30f3\u30d4\u30e5\u30fc\u30bf\u95a2\u4fc2 (\u30cf\u30fc\u30c9\u30a6\u30a8\u30a2) -publicPortalRegistration.ComputerSoftware=\u30b3\u30f3\u30d4\u30e5\u30fc\u30bf\u95a2\u4fc2 (\u30bd\u30d5\u30c8\u30a6\u30a8\u30a2) -publicPortalRegistration.Research=\u6559\u80b2/\u7814\u7a76 -publicPortalRegistration.Engineering=\u30a8\u30f3\u30b8\u30cb\u30a2/\u5efa\u7bc9 -publicPortalRegistration.Finance=\u9280\u884c/\u91d1\u878d/\u4e0d\u52d5\u7523 -publicPortalRegistration.Manufacturing=\u88fd\u9020/\u6d41\u901a -publicPortalRegistration.Service=\u30b5\u30fc\u30d3\u30b9 -publicPortalRegistration.Healthcare=\u533b\u85ac/\u5065\u5eb7 -publicPortalRegistration.Publication=\u5a2f\u697d/\u30e1\u30c7\u30a3\u30a2/\u51fa\u7248 -publicPortalRegistration.Travel=\u65c5\u884c/\u63a5\u5ba2\u696d -publicPortalRegistration.Retail=\u5c0f\u58f2/\u5378\u58f2 -publicPortalRegistration.Nonprofit=\u975e\u55b6\u5229\u56e3\u4f53 -publicPortalRegistration.Government=\u653f\u5e9c/\u81ea\u6cbb\u4f53 -publicPortalRegistration.Law=\u6cd5\u5f8b -publicPortalRegistration.unemployed=\u7121\u8077 -publicPortalRegistration.other=\u305d\u306e\u4ed6 -publicPortalRegistration.userJobtitle=\u8077\u7a2e -publicPortalRegistration.Officer=\u5f79\u54e1/\u7ba1\u7406\u8077 -publicPortalRegistration.Specialist=\u5c02\u9580\u8077 (\u533b\u5e2b\u3001\u5f01\u8b77\u58eb\u7b49) -publicPortalRegistration.Teacher=\u6559\u54e1 -publicPortalRegistration.ComputerEngineer=\u30b3\u30f3\u30d4\u30e5\u30fc\u30bf\u95a2\u9023\u6280\u8853\u8005 -publicPortalRegistration.Engineer=\u305d\u306e\u4ed6\u6280\u8853\u8005 -publicPortalRegistration.Support=\u30b5\u30fc\u30d3\u30b9/\u30ab\u30b9\u30bf\u30de\u30fc\u30b5\u30dd\u30fc\u30c8 -publicPortalRegistration.Administrative=\u4e8b\u52d9\u8077 -publicPortalRegistration.Sales=\u55b6\u696d/\u30de\u30fc\u30b1\u30c6\u30a3\u30f3\u30b0 -publicPortalRegistration.Salesclerk=\u8ca9\u58f2\u54e1 -publicPortalRegistration.Student=\u5927\u5b66\u751f/\u5927\u5b66\u9662\u751f -publicPortalRegistration.Kid=\u5c0f/\u4e2d/\u9ad8\u6821\u751f -publicPortalRegistration.Homemaker=\u4e3b\u5a66 -publicPortalRegistration.SelfEmployed=\u81ea\u55b6\u696d -publicPortalRegistration.retirement=\u5b9a\u5e74\u9000\u8077\u8005 -publicPortalRegistration.userInfoHint=\u304a\u5ba2\u69d8\u60c5\u5831\u306b\u9593\u3059\u308b\u30d2\u30f3\u30c8 -publicPortalRegistration.liveInOversea=\u6d77\u5916\u5728\u4f4f\u306e\u65b9\u306f\u3001000-0000\u3068\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044 -publicPortalRegistration.bdataYearDescription=\u751f\u5e74\u6708\u65e5\u306e\u5e74\u306f\u897f\u66a6\u3067\u304a\u9858\u3044\u3057\u307e\u3059 -publicPortalRegistration.aboutEmail=\u767b\u9332\u3059\u308b\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9\u306f\u3001\u30b5\u30fc\u30d3\u30b9\u3092\u5229\u7528\u3057\u3066\u3044\u305f\u3060\u304f\u4e0a\u3067\u3001\u91cd\u8981\u306a\u304a\u77e5\u3089\u305b\u306a\u3069\u3092\u304a\u9001\u308a\u3059\u308b\u305f\u3081\u306e\u300c\u767b\u9332\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9\u300d \u306b\u306a\u308a\u307e\u3059\u3002\u9023\u7d61\u53ef\u80fd\u306a\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9\u3092\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044 -publicPortalRegistration.userSecretQATitle=\u79d8\u5bc6\u306e\u8cea\u554f\u3068\u7b54\u3048 -publicPortalRegistration.userSecretQADescription=\u30d1\u30b9\u30ef\u30fc\u30c9\u518d\u767a\u884c\u306b\u5fc5\u8981\u306a\u60c5\u5831\u3067\u3059\u3002\u3042\u306a\u305f\u3057\u304b\u77e5\u3089\u306a\u3044\u8cea\u554f\u3068\u7b54\u3048\u3092\u8a2d\u5b9a\u3057\u3066\u304f\u3060\u3055\u3044\u3002 -publicPortalRegistration.userSecretQuestion=\u79d8\u5bc6\u306e\u8cea\u554f -publicPortalRegistration.userSecretAnswer=\u79d8\u5bc6\u306e\u7b54\u3048 -publicPortalRegistration.userSecretQAHint=\u79d8\u5bc6\u306e\u8cea\u554f\u3068\u7b54\u3048\u306b\u95a2\u3059\u308b\u30d2\u30f3\u30c8 -publicPortalRegistration.aboutCharacters=\u79d8\u5bc6\u306e\u7b54\u3048\u306f\u3001\u3072\u3089\u304c\u306a\u3001\u30ab\u30bf\u30ab\u30ca\u3001\u5927\u6587\u5b57\u3001\u5c0f\u6587\u5b57\u3001\u534a\u89d2\u3001\u5168\u89d2\u3067\u533a\u5225\u3055\u308c\u307e\u3059 -publicPortalRegistration.SignUp=\u5229\u7528\u898f\u7d04\u306b\u540c\u610f\u3057\u3066\u767b\u9332 -publicPortalRegistration.termOfService=\u5229\u7528\u898f\u7d04 -publicPortalRegistration.name=\u6c0f\u540d -publicPortalRegistration.userNameFamily= (\u59d3) -publicPortalRegistration.userNameGiven= (\u540d) -publicPortalRegistration.nameYomi=\u6c0f\u540d(\u3075\u308a\u304c\u306a) -publicPortalRegistration.userNameFamilyYomi= (\u59d3) -publicPortalRegistration.userNameGivenYomi= (\u540d) +publicPortalRegistrationRegister.requiredDescription=\u304c\u3064\u3044\u3066\u3044\u308b\u9805\u76ee\u306f\u304b\u306a\u3089\u305a\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044\u3002 +publicPortalRegistrationRegister.userIdTitle=\u30e6\u30fc\u30b6\u30fc ID \u306e\u5165\u529b +publicPortalRegistrationRegister.typeUserId=\u3054\u5e0c\u671b\u306e\u30e6\u30fc\u30b6\u30fc ID \u3092\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044\u3002 +publicPortalRegistrationRegister.userId=\u30e6\u30fc\u30b6\u30fc ID +publicPortalRegistrationRegister.userIdCondition= (6\u301c32\u5b57\u306e\u534a\u89d2\u82f1\u6570\u5b57) +publicPortalRegistrationRegister.userIdExample= (\u4f8b\uff1ahoge2000\u3001foo777\u306a\u3069) +publicPortalRegistrationRegister.userIdHint=\u30e6\u30fc\u30b6\u30fc ID \u306b\u95a2\u3059\u308b\u30d2\u30f3\u30c8 +publicPortalRegistrationRegister.userIdBeginWithAlphabet=\u6700\u521d\u306e\u6587\u5b57\u306f\u30a2\u30eb\u30d5\u30a1\u30d9\u30c3\u30c8 +publicPortalRegistrationRegister.underscoreAvailable=\u8a18\u53f7\u306f\u3001\u30a2\u30f3\u30c0\u30fc\u30d0\u30fc ( _ ) \u306e\u307f\u4f7f\u7528\u53ef\u80fd\u3067\u3059 +publicPortalRegistrationRegister.userInfoTitle=\u304a\u5ba2\u69d8\u60c5\u5831\u306e\u5165\u529b +publicPortalRegistrationRegister.typeUserInfo=\u30e6\u30fc\u30b6\u30fc ID \u3084\u30d1\u30b9\u30ef\u30fc\u30c9\u3092\u304a\u5fd8\u308c\u306e\u5834\u5408\u306b\u3001\u4ee5\u4e0b\u306e\u60c5\u5831\u3092\u5143\u306b\u672c\u4eba\u78ba\u8a8d\u3092\u884c\u3044\u307e\u3059\u3002\u6b63\u78ba\u306b\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044\u3002 +publicPortalRegistrationRegister.userHomeInfoPostalPostalcode=\u90f5\u4fbf\u756a\u53f7 +publicPortalRegistrationRegister.userHomeInfoPostalPostalcodeCondition= (\u534a\u89d2\u6570\u5b57\uff17\u6841) +publicPortalRegistrationRegister.userHomeInfoPostalPostalcodeExample= (\u4f8b\uff1a123-0001\u30011230001) +publicPortalRegistrationRegister.userGender=\u6027\u5225 +publicPortalRegistrationRegister.male=\u7537\u6027 +publicPortalRegistrationRegister.female=\u5973\u6027 +publicPortalRegistrationRegister.userBdate=\u751f\u5e74\u6708\u65e5 +publicPortalRegistrationRegister.userBdateYear=\u5e74 +publicPortalRegistrationRegister.userBdateMonth=\u6708 +publicPortalRegistrationRegister.userBdateDate=\u65e5 +publicPortalRegistrationRegister.userBusinessInfoOnlineEmail=\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9 +publicPortalRegistrationRegister.userBusinessInfoOnlineEmailCondition= (\u534a\u89d2) +publicPortalRegistrationRegister.userIndustry=\u696d\u7a2e +publicPortalRegistrationRegister.ComputerInternet=\u30b3\u30f3\u30d4\u30e5\u30fc\u30bf\u95a2\u4fc2 (\u7ba1\u7406/\u30a4\u30f3\u30bf\u30fc\u30cd\u30c3\u30c8) +publicPortalRegistrationRegister.ComputerHardware=\u30b3\u30f3\u30d4\u30e5\u30fc\u30bf\u95a2\u4fc2 (\u30cf\u30fc\u30c9\u30a6\u30a8\u30a2) +publicPortalRegistrationRegister.ComputerSoftware=\u30b3\u30f3\u30d4\u30e5\u30fc\u30bf\u95a2\u4fc2 (\u30bd\u30d5\u30c8\u30a6\u30a8\u30a2) +publicPortalRegistrationRegister.Research=\u6559\u80b2/\u7814\u7a76 +publicPortalRegistrationRegister.Engineering=\u30a8\u30f3\u30b8\u30cb\u30a2/\u5efa\u7bc9 +publicPortalRegistrationRegister.Finance=\u9280\u884c/\u91d1\u878d/\u4e0d\u52d5\u7523 +publicPortalRegistrationRegister.Manufacturing=\u88fd\u9020/\u6d41\u901a +publicPortalRegistrationRegister.Service=\u30b5\u30fc\u30d3\u30b9 +publicPortalRegistrationRegister.Healthcare=\u533b\u85ac/\u5065\u5eb7 +publicPortalRegistrationRegister.Publication=\u5a2f\u697d/\u30e1\u30c7\u30a3\u30a2/\u51fa\u7248 +publicPortalRegistrationRegister.Travel=\u65c5\u884c/\u63a5\u5ba2\u696d +publicPortalRegistrationRegister.Retail=\u5c0f\u58f2/\u5378\u58f2 +publicPortalRegistrationRegister.Nonprofit=\u975e\u55b6\u5229\u56e3\u4f53 +publicPortalRegistrationRegister.Government=\u653f\u5e9c/\u81ea\u6cbb\u4f53 +publicPortalRegistrationRegister.Law=\u6cd5\u5f8b +publicPortalRegistrationRegister.unemployed=\u7121\u8077 +publicPortalRegistrationRegister.other=\u305d\u306e\u4ed6 +publicPortalRegistrationRegister.userJobtitle=\u8077\u7a2e +publicPortalRegistrationRegister.Officer=\u5f79\u54e1/\u7ba1\u7406\u8077 +publicPortalRegistrationRegister.Specialist=\u5c02\u9580\u8077 (\u533b\u5e2b\u3001\u5f01\u8b77\u58eb\u7b49) +publicPortalRegistrationRegister.Teacher=\u6559\u54e1 +publicPortalRegistrationRegister.ComputerEngineer=\u30b3\u30f3\u30d4\u30e5\u30fc\u30bf\u95a2\u9023\u6280\u8853\u8005 +publicPortalRegistrationRegister.Engineer=\u305d\u306e\u4ed6\u6280\u8853\u8005 +publicPortalRegistrationRegister.Support=\u30b5\u30fc\u30d3\u30b9/\u30ab\u30b9\u30bf\u30de\u30fc\u30b5\u30dd\u30fc\u30c8 +publicPortalRegistrationRegister.Administrative=\u4e8b\u52d9\u8077 +publicPortalRegistrationRegister.Sales=\u55b6\u696d/\u30de\u30fc\u30b1\u30c6\u30a3\u30f3\u30b0 +publicPortalRegistrationRegister.Salesclerk=\u8ca9\u58f2\u54e1 +publicPortalRegistrationRegister.Student=\u5927\u5b66\u751f/\u5927\u5b66\u9662\u751f +publicPortalRegistrationRegister.Kid=\u5c0f/\u4e2d/\u9ad8\u6821\u751f +publicPortalRegistrationRegister.Homemaker=\u4e3b\u5a66 +publicPortalRegistrationRegister.SelfEmployed=\u81ea\u55b6\u696d +publicPortalRegistrationRegister.retirement=\u5b9a\u5e74\u9000\u8077\u8005 +publicPortalRegistrationRegister.userInfoHint=\u304a\u5ba2\u69d8\u60c5\u5831\u306b\u9593\u3059\u308b\u30d2\u30f3\u30c8 +publicPortalRegistrationRegister.liveInOversea=\u6d77\u5916\u5728\u4f4f\u306e\u65b9\u306f\u3001000-0000\u3068\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044 +publicPortalRegistrationRegister.bdataYearDescription=\u751f\u5e74\u6708\u65e5\u306e\u5e74\u306f\u897f\u66a6\u3067\u304a\u9858\u3044\u3057\u307e\u3059 +publicPortalRegistrationRegister.aboutEmail=\u767b\u9332\u3059\u308b\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9\u306f\u3001\u30b5\u30fc\u30d3\u30b9\u3092\u5229\u7528\u3057\u3066\u3044\u305f\u3060\u304f\u4e0a\u3067\u3001\u91cd\u8981\u306a\u304a\u77e5\u3089\u305b\u306a\u3069\u3092\u304a\u9001\u308a\u3059\u308b\u305f\u3081\u306e\u300c\u767b\u9332\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9\u300d \u306b\u306a\u308a\u307e\u3059\u3002\u9023\u7d61\u53ef\u80fd\u306a\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9\u3092\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044 +publicPortalRegistrationRegister.userSecretQATitle=\u79d8\u5bc6\u306e\u8cea\u554f\u3068\u7b54\u3048 +publicPortalRegistrationRegister.userSecretQADescription=\u30d1\u30b9\u30ef\u30fc\u30c9\u518d\u767a\u884c\u306b\u5fc5\u8981\u306a\u60c5\u5831\u3067\u3059\u3002\u3042\u306a\u305f\u3057\u304b\u77e5\u3089\u306a\u3044\u8cea\u554f\u3068\u7b54\u3048\u3092\u8a2d\u5b9a\u3057\u3066\u304f\u3060\u3055\u3044\u3002 +publicPortalRegistrationRegister.userSecretQuestion=\u79d8\u5bc6\u306e\u8cea\u554f +publicPortalRegistrationRegister.userSecretAnswer=\u79d8\u5bc6\u306e\u7b54\u3048 +publicPortalRegistrationRegister.userSecretQAHint=\u79d8\u5bc6\u306e\u8cea\u554f\u3068\u7b54\u3048\u306b\u95a2\u3059\u308b\u30d2\u30f3\u30c8 +publicPortalRegistrationRegister.aboutCharacters=\u79d8\u5bc6\u306e\u7b54\u3048\u306f\u3001\u3072\u3089\u304c\u306a\u3001\u30ab\u30bf\u30ab\u30ca\u3001\u5927\u6587\u5b57\u3001\u5c0f\u6587\u5b57\u3001\u534a\u89d2\u3001\u5168\u89d2\u3067\u533a\u5225\u3055\u308c\u307e\u3059 +publicPortalRegistrationRegister.SignUp=\u5229\u7528\u898f\u7d04\u306b\u540c\u610f\u3057\u3066\u767b\u9332 +publicPortalRegistrationRegister.termOfService=\u5229\u7528\u898f\u7d04 +publicPortalRegistrationRegister.name=\u6c0f\u540d +publicPortalRegistrationRegister.userNameFamily= (\u59d3) +publicPortalRegistrationRegister.userNameGiven= (\u540d) +publicPortalRegistrationRegister.nameYomi=\u6c0f\u540d(\u3075\u308a\u304c\u306a) +publicPortalRegistrationRegister.userNameFamilyYomi= (\u59d3) +publicPortalRegistrationRegister.userNameGivenYomi= (\u540d) publicPortalRegistrationCompleted.registAgain=\u518d\u5ea6\u3001\u30e6\u30fc\u30b6\u30fc\u3092\u767b\u9332\u3059\u308b\u5834\u5408\u306f\u3001\u4ee5\u4e0b\u306e\u30ea\u30f3\u30af\u3092\u30af\u30ea\u30c3\u30af\u3057\u3066\u304f\u3060\u3055\u3044\u3002 publicPortalRegistrationCompleted.registLink=\u30e6\u30fc\u30b6\u30fc\u767b\u9332 Deleted: pal-admin/trunk/src/main/webapp/view/registration/publicPortalRegistration.html =================================================================== --- pal-admin/trunk/src/main/webapp/view/registration/publicPortalRegistration.html 2007-07-11 04:26:11 UTC (rev 239) +++ pal-admin/trunk/src/main/webapp/view/registration/publicPortalRegistration.html 2007-07-11 04:47:23 UTC (rev 240) @@ -1,312 +0,0 @@ - - - - - - - - -
-
- -
-
- * - -
-
- -
-
- -

- - - - - - - - - - -
*: - - - -
- -
- -

-
- -
-
    -
  • - -
  • -
  • - -
  • -
-
-
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
*: - - - - - -
*: - - - - - -
*: - - - -
- -
*: - - - - - - - -
*: - - - - - - - -
*: - - - -
*: - - - - -
- - -
- - -
- - -
- - -
- - -
- - -
- - -
- - -
- - -
- - -
- - -
- - -
- - -
- - -
- - -
- - -
-
-
*: - - - - -
- - -
- - -
- - -
- - -
- - -
- - -
- - -
- - -
- - -
- - -
- - -
- - -
- - -
- - -
- - -
-
-
-
-
-
- -
-
    -
  • - -
  • -
  • - -
  • -
  • - -
  • -
-
-
-
- -
-
- - - - - - - - - - - - -
*: - - -
*: - - -
-
-
-
- -
-
    -
  • - -
  • -
-
-
-
- -
-
- -
-
-
-
- -
- - - Copied: pal-admin/trunk/src/main/webapp/view/registration/publicPortalRegistrationRegister.html (from rev 189, pal-admin/trunk/src/main/webapp/view/registration/publicPortalRegistration.html) =================================================================== --- pal-admin/trunk/src/main/webapp/view/registration/publicPortalRegistration.html 2007-06-21 05:57:49 UTC (rev 189) +++ pal-admin/trunk/src/main/webapp/view/registration/publicPortalRegistrationRegister.html 2007-07-11 04:47:23 UTC (rev 240) @@ -0,0 +1,312 @@ + + + + + + + + +
+
+ +
+
+ * + +
+
+ +
+
+ + + + + + + + + + + + +
*: + + + +
+ +
+
+
+
+ +
+
    +
  • + +
  • +
  • + +
  • +
+
+
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
*: + + + + + +
*: + + + + + +
*: + + + +
+ +
*: + + + + + + + +
*: + + + + + + + +
*: + + + +
*: + + + + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+
+
*: + + + + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+
+
+
+
+
+ +
+
    +
  • + +
  • +
  • + +
  • +
  • + +
  • +
+
+
+
+ +
+
+ + + + + + + + + + + + +
*: + + +
*: + + +
+
+
+
+ +
+
    +
  • + +
  • +
+
+
+
+ +
+
+ +
+
+
+
+ +
+
+ + From svnnotify △ sourceforge.jp Wed Jul 11 13:59:24 2007 From: svnnotify △ sourceforge.jp (svnnotify △ sourceforge.jp) Date: Wed, 11 Jul 2007 13:59:24 +0900 Subject: [pal-cvs 2509] [241] replaced with tbody Message-ID: <20070711045924.9949F2AC035@users.sourceforge.jp> Revision: 241 http://svn.sourceforge.jp/cgi-bin/viewcvs.cgi?root=pal&view=rev&rev=241 Author: shinsuke Date: 2007-07-11 13:59:24 +0900 (Wed, 11 Jul 2007) Log Message: ----------- replaced with tbody Modified Paths: -------------- pal-admin/trunk/src/main/webapp/view/deployer/remotePortletList.html pal-admin/trunk/src/main/webapp/view/deployer/remoteRepositoryList.html pal-admin/trunk/src/main/webapp/view/group/groupList.html pal-admin/trunk/src/main/webapp/view/portletmanager/portletList.html pal-admin/trunk/src/main/webapp/view/role/roleList.html pal-admin/trunk/src/main/webapp/view/user/userList.html -------------- next part -------------- Modified: pal-admin/trunk/src/main/webapp/view/deployer/remotePortletList.html =================================================================== --- pal-admin/trunk/src/main/webapp/view/deployer/remotePortletList.html 2007-07-11 04:47:23 UTC (rev 240) +++ pal-admin/trunk/src/main/webapp/view/deployer/remotePortletList.html 2007-07-11 04:59:24 UTC (rev 241) @@ -71,8 +71,7 @@
- -
+ PUBLISHER NAME @@ -89,7 +88,6 @@
- Modified: pal-admin/trunk/src/main/webapp/view/deployer/remoteRepositoryList.html =================================================================== --- pal-admin/trunk/src/main/webapp/view/deployer/remoteRepositoryList.html 2007-07-11 04:47:23 UTC (rev 240) +++ pal-admin/trunk/src/main/webapp/view/deployer/remoteRepositoryList.html 2007-07-11 04:59:24 UTC (rev 241) @@ -64,8 +64,7 @@
- -
+ NAME @@ -89,7 +88,6 @@
- Modified: pal-admin/trunk/src/main/webapp/view/group/groupList.html =================================================================== --- pal-admin/trunk/src/main/webapp/view/group/groupList.html 2007-07-11 04:47:23 UTC (rev 240) +++ pal-admin/trunk/src/main/webapp/view/group/groupList.html 2007-07-11 04:59:24 UTC (rev 241) @@ -57,15 +57,13 @@
- -
+ group Delete -
Modified: pal-admin/trunk/src/main/webapp/view/portletmanager/portletList.html =================================================================== --- pal-admin/trunk/src/main/webapp/view/portletmanager/portletList.html 2007-07-11 04:47:23 UTC (rev 240) +++ pal-admin/trunk/src/main/webapp/view/portletmanager/portletList.html 2007-07-11 04:59:24 UTC (rev 241) @@ -58,8 +58,7 @@
- -
+ PORTLET VERSION @@ -102,7 +101,6 @@
- Modified: pal-admin/trunk/src/main/webapp/view/role/roleList.html =================================================================== --- pal-admin/trunk/src/main/webapp/view/role/roleList.html 2007-07-11 04:47:23 UTC (rev 240) +++ pal-admin/trunk/src/main/webapp/view/role/roleList.html 2007-07-11 04:59:24 UTC (rev 241) @@ -57,15 +57,13 @@
- -
+ role Delete -
Modified: pal-admin/trunk/src/main/webapp/view/user/userList.html =================================================================== --- pal-admin/trunk/src/main/webapp/view/user/userList.html 2007-07-11 04:47:23 UTC (rev 240) +++ pal-admin/trunk/src/main/webapp/view/user/userList.html 2007-07-11 04:59:24 UTC (rev 241) @@ -64,8 +64,7 @@
- -
+ user @@ -73,7 +72,6 @@ Delete -
From svnnotify △ sourceforge.jp Wed Jul 11 14:06:33 2007 From: svnnotify △ sourceforge.jp (svnnotify △ sourceforge.jp) Date: Wed, 11 Jul 2007 14:06:33 +0900 Subject: [pal-cvs 2510] [242] code alignment Message-ID: <20070711050633.BBB532AC00E@users.sourceforge.jp> Revision: 242 http://svn.sourceforge.jp/cgi-bin/viewcvs.cgi?root=pal&view=rev&rev=242 Author: shinsuke Date: 2007-07-11 14:06:33 +0900 (Wed, 11 Jul 2007) Log Message: ----------- code alignment Modified Paths: -------------- pal-admin/trunk/src/main/java/jp/sf/pal/admin/filter/UserManagementFilter.java -------------- next part -------------- Modified: pal-admin/trunk/src/main/java/jp/sf/pal/admin/filter/UserManagementFilter.java =================================================================== --- pal-admin/trunk/src/main/java/jp/sf/pal/admin/filter/UserManagementFilter.java 2007-07-11 04:59:24 UTC (rev 241) +++ pal-admin/trunk/src/main/java/jp/sf/pal/admin/filter/UserManagementFilter.java 2007-07-11 05:06:33 UTC (rev 242) @@ -80,57 +80,45 @@ if (!PALAdminConstants.DEBUG) { // securityProvider - securityProvider = (SecurityProvider) portletContext - .getAttribute(PALAdminConstants.CPS_SECURITY_PROVIDER_COMPONENT); + securityProvider = (SecurityProvider) portletContext.getAttribute(PALAdminConstants.CPS_SECURITY_PROVIDER_COMPONENT); if (securityProvider == null) { - throw new PortletException( - "Failed to find the Security Provider on portlet initialization"); + throw new PortletException("Failed to find the Security Provider on portlet initialization"); } // userManager - userManager = (UserManager) portletContext - .getAttribute(CommonPortletServices.CPS_USER_MANAGER_COMPONENT); + userManager = (UserManager) portletContext.getAttribute(CommonPortletServices.CPS_USER_MANAGER_COMPONENT); if (userManager == null) { - throw new PortletException( - "Failed to find the User Manager on portlet initialization"); + throw new PortletException("Failed to find the User Manager on portlet initialization"); } // groupManager - groupManager = (GroupManager) portletContext - .getAttribute(CommonPortletServices.CPS_GROUP_MANAGER_COMPONENT); + groupManager = (GroupManager) portletContext.getAttribute(CommonPortletServices.CPS_GROUP_MANAGER_COMPONENT); if (groupManager == null) { - throw new PortletException( - "Failed to find the Group Manager on portlet initialization"); + throw new PortletException("Failed to find the Group Manager on portlet initialization"); } // roleManager - roleManager = (RoleManager) portletContext - .getAttribute(CommonPortletServices.CPS_ROLE_MANAGER_COMPONENT); + roleManager = (RoleManager) portletContext.getAttribute(CommonPortletServices.CPS_ROLE_MANAGER_COMPONENT); if (roleManager == null) { - throw new PortletException( - "Failed to find the Role Manager on portlet initialization"); + throw new PortletException("Failed to find the Role Manager on portlet initialization"); } // profiler - profiler = (Profiler) portletContext - .getAttribute(CommonPortletServices.CPS_PROFILER_COMPONENT); + profiler = (Profiler) portletContext.getAttribute(CommonPortletServices.CPS_PROFILER_COMPONENT); if (null == profiler) { - throw new PortletException( - "Failed to find the Profiler on portlet initialization"); + throw new PortletException("Failed to find the Profiler on portlet initialization"); } // pageManager - pageManager = (PageManager) portletContext - .getAttribute(CommonPortletServices.CPS_PAGE_MANAGER_COMPONENT); + pageManager = (PageManager) portletContext.getAttribute(CommonPortletServices.CPS_PAGE_MANAGER_COMPONENT); if (null == pageManager) { - throw new PortletException( - "Failed to find the Page Manager on portlet initialization"); + throw new PortletException("Failed to find the Page Manager on portlet initialization"); } } @@ -143,21 +131,15 @@ * javax.portlet.ActionResponse, * org.apache.portals.bridges.portletfilter.PortletFilterChain) */ - public void processActionFilter(ActionRequest request, - ActionResponse response, PortletFilterChain chain) + public void processActionFilter(ActionRequest request, ActionResponse response, PortletFilterChain chain) throws PortletException, IOException { - request.setAttribute(PALAdminConstants.SECURITY_PROVIDER_COMPONENT, - securityProvider); - request.setAttribute(PALAdminConstants.USER_MANAGER_COMPONENT, - userManager); - request.setAttribute(PALAdminConstants.GROUP_MANAGER_COMPONENT, - groupManager); - request.setAttribute(PALAdminConstants.ROLE_MANAGER_COMPONENT, - roleManager); + request.setAttribute(PALAdminConstants.SECURITY_PROVIDER_COMPONENT, securityProvider); + request.setAttribute(PALAdminConstants.USER_MANAGER_COMPONENT, userManager); + request.setAttribute(PALAdminConstants.GROUP_MANAGER_COMPONENT, groupManager); + request.setAttribute(PALAdminConstants.ROLE_MANAGER_COMPONENT, roleManager); request.setAttribute(PALAdminConstants.PROFILER_COMPONENT, profiler); - request.setAttribute(PALAdminConstants.PAGE_MANAGER_COMPONENT, - pageManager); + request.setAttribute(PALAdminConstants.PAGE_MANAGER_COMPONENT, pageManager); chain.processActionFilter(request, response); } @@ -169,20 +151,15 @@ * javax.portlet.RenderResponse, * org.apache.portals.bridges.portletfilter.PortletFilterChain) */ - public void renderFilter(RenderRequest request, RenderResponse response, - PortletFilterChain chain) throws PortletException, IOException + public void renderFilter(RenderRequest request, RenderResponse response, PortletFilterChain chain) throws PortletException, + IOException { - request.setAttribute(PALAdminConstants.SECURITY_PROVIDER_COMPONENT, - securityProvider); - request.setAttribute(PALAdminConstants.USER_MANAGER_COMPONENT, - userManager); - request.setAttribute(PALAdminConstants.GROUP_MANAGER_COMPONENT, - groupManager); - request.setAttribute(PALAdminConstants.ROLE_MANAGER_COMPONENT, - roleManager); + request.setAttribute(PALAdminConstants.SECURITY_PROVIDER_COMPONENT, securityProvider); + request.setAttribute(PALAdminConstants.USER_MANAGER_COMPONENT, userManager); + request.setAttribute(PALAdminConstants.GROUP_MANAGER_COMPONENT, groupManager); + request.setAttribute(PALAdminConstants.ROLE_MANAGER_COMPONENT, roleManager); request.setAttribute(PALAdminConstants.PROFILER_COMPONENT, profiler); - request.setAttribute(PALAdminConstants.PAGE_MANAGER_COMPONENT, - pageManager); + request.setAttribute(PALAdminConstants.PAGE_MANAGER_COMPONENT, pageManager); chain.renderFilter(request, response); } From svnnotify △ sourceforge.jp Fri Jul 13 04:54:26 2007 From: svnnotify △ sourceforge.jp (svnnotify △ sourceforge.jp) Date: Fri, 13 Jul 2007 04:54:26 +0900 Subject: [pal-cvs 2511] [243] added html for product management Message-ID: <20070712195426.31A162AC01E@users.sourceforge.jp> Revision: 243 http://svn.sourceforge.jp/cgi-bin/viewcvs.cgi?root=pal&view=rev&rev=243 Author: takeharu Date: 2007-07-13 04:54:25 +0900 (Fri, 13 Jul 2007) Log Message: ----------- added html for product management Added Paths: ----------- pompei/trunk/src/main/webapp/view/admin/ pompei/trunk/src/main/webapp/view/admin/product/ pompei/trunk/src/main/webapp/view/admin/product/categoryEdit.html pompei/trunk/src/main/webapp/view/admin/product/categoryList.html pompei/trunk/src/main/webapp/view/admin/product/productConfirm.html pompei/trunk/src/main/webapp/view/admin/product/productEdit.html pompei/trunk/src/main/webapp/view/admin/product/productList.html -------------- next part -------------- Added: pompei/trunk/src/main/webapp/view/admin/product/categoryEdit.html =================================================================== --- pompei/trunk/src/main/webapp/view/admin/product/categoryEdit.html 2007-07-11 05:06:33 UTC (rev 242) +++ pompei/trunk/src/main/webapp/view/admin/product/categoryEdit.html 2007-07-12 19:54:25 UTC (rev 243) @@ -0,0 +1,22 @@ + + + + + +カテゴリ判峡/试礁茶烫 + + +

カテゴリの判峡

+トップ ′ 筏 ′ +
+ + + + + + + +
カテゴリ叹
イメ〖ジ
+ +
+ \ No newline at end of file Added: pompei/trunk/src/main/webapp/view/admin/product/categoryList.html =================================================================== --- pompei/trunk/src/main/webapp/view/admin/product/categoryList.html 2007-07-11 05:06:33 UTC (rev 242) +++ pompei/trunk/src/main/webapp/view/admin/product/categoryList.html 2007-07-12 19:54:25 UTC (rev 243) @@ -0,0 +1,39 @@ + + + + + +カテゴリ肋年茶烫 + + +

カテゴリ肋年

+トップ ′ 筏 ′ +
+ + + + + + + + + + + + + + + + + + + + +
 山绩界カテゴリ叹イメ〖ジ 
1スニ〖カ〖茶咙 + + +
+ + +
+ \ No newline at end of file Added: pompei/trunk/src/main/webapp/view/admin/product/productConfirm.html =================================================================== --- pompei/trunk/src/main/webapp/view/admin/product/productConfirm.html 2007-07-11 05:06:33 UTC (rev 242) +++ pompei/trunk/src/main/webapp/view/admin/product/productConfirm.html 2007-07-12 19:54:25 UTC (rev 243) @@ -0,0 +1,44 @@ + + + + + +睛墒判峡澄千 + + +

睛墒判峡澄千

+布淡の柒推で判峡します。よろしければ判峡ボタンを病して布さい。 +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
睛墒叹睛墒叹
イメ〖ジイメ〖ジ
房戎房戎
眶翁眶翁
擦呈擦呈
脚翁脚翁
ステ〖タスステ〖タス
メ〖カ〖IDメ〖カ〖ID
狼硷侍ID狼硷侍ID
+ + +
+ \ No newline at end of file Added: pompei/trunk/src/main/webapp/view/admin/product/productEdit.html =================================================================== --- pompei/trunk/src/main/webapp/view/admin/product/productEdit.html 2007-07-11 05:06:33 UTC (rev 242) +++ pompei/trunk/src/main/webapp/view/admin/product/productEdit.html 2007-07-12 19:54:25 UTC (rev 243) @@ -0,0 +1,55 @@ + + + + + +睛墒判峡ˇ试礁 + + +

睛墒判峡ˇ试礁

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
睛墒叹
イメ〖ジ
房戎
眶翁
擦呈
脚翁
ステ〖タス
メ〖カ〖 + +
狼硷侍ID
+ + + +
+ \ No newline at end of file Added: pompei/trunk/src/main/webapp/view/admin/product/productList.html =================================================================== --- pompei/trunk/src/main/webapp/view/admin/product/productList.html 2007-07-11 05:06:33 UTC (rev 242) +++ pompei/trunk/src/main/webapp/view/admin/product/productList.html 2007-07-12 19:54:25 UTC (rev 243) @@ -0,0 +1,57 @@ + + + + + +睛墒办枉 + + +

睛墒办枉

+カテゴリ¨筏 ′ +
+ⅷ1¨1の眷圭。
+スニ〖カ〖 匙筏 サンダル +
ⅷ1¨Nの眷圭
+ⅷ剩眶联买材墙 +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NO睛墒叹イメ〖ジ房戎擦呈ステ〖タスメ〖カ〖纳裁泣 
1XXX 01MAX茶咙MX-XXX30,000艰胺面アディダス2007/07/12 + + +
+ +
+ \ No newline at end of file From svnnotify △ sourceforge.jp Fri Jul 13 04:55:06 2007 From: svnnotify △ sourceforge.jp (svnnotify △ sourceforge.jp) Date: Fri, 13 Jul 2007 04:55:06 +0900 Subject: [pal-cvs 2512] [244] added html for order management Message-ID: <20070712195506.430BF2AC020@users.sourceforge.jp> Revision: 244 http://svn.sourceforge.jp/cgi-bin/viewcvs.cgi?root=pal&view=rev&rev=244 Author: takeharu Date: 2007-07-13 04:55:06 +0900 (Fri, 13 Jul 2007) Log Message: ----------- added html for order management Added Paths: ----------- pompei/trunk/src/main/webapp/view/admin/order/ pompei/trunk/src/main/webapp/view/admin/order/orderConfirm.html pompei/trunk/src/main/webapp/view/admin/order/orderEdit.html pompei/trunk/src/main/webapp/view/admin/order/orderList.html -------------- next part -------------- Added: pompei/trunk/src/main/webapp/view/admin/order/orderConfirm.html =================================================================== --- pompei/trunk/src/main/webapp/view/admin/order/orderConfirm.html 2007-07-12 19:54:25 UTC (rev 243) +++ pompei/trunk/src/main/webapp/view/admin/order/orderConfirm.html 2007-07-12 19:55:06 UTC (rev 244) @@ -0,0 +1,133 @@ + + + + + +庙矢攫鼠澄千茶烫 + + +

庙矢攫鼠澄千茶烫

+
+
+改客攫鼠 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
杠狄ID杠狄ID
杠狄叹杠狄叹
凸守戎规凸守戎规
旁苹绍俯旁苹绍俯
辉惰漠录辉惰漠录
柴家叹柴家叹
交疥1交疥1
交疥2交疥2
排厦戎规090-9999-9999
Eメ〖ルアドレスabc △ hoge.co.jp
+
+お葡け黎 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
お葡け黎叹杠狄叹
凸守戎规凸守戎规
旁苹绍俯旁苹绍俯
辉惰漠录辉惰漠录
柴家叹柴家叹
交疥1交疥1
交疥2交疥2
+
+柴家攫鼠 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
お葡け黎叹杠狄叹
凸守戎规凸守戎规
旁苹绍俯旁苹绍俯
辉惰漠录辉惰漠录
柴家叹柴家叹
交疥1交疥1
交疥2交疥2
+ +
+ \ No newline at end of file Added: pompei/trunk/src/main/webapp/view/admin/order/orderEdit.html =================================================================== --- pompei/trunk/src/main/webapp/view/admin/order/orderEdit.html 2007-07-12 19:54:25 UTC (rev 243) +++ pompei/trunk/src/main/webapp/view/admin/order/orderEdit.html 2007-07-12 19:55:06 UTC (rev 244) @@ -0,0 +1,133 @@ + + + + + +庙矢攫鼠试礁茶烫 + + +

庙矢攫鼠试礁茶烫

+
+
+改客攫鼠 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
杠狄ID杠狄ID
杠狄叹杠狄叹
凸守戎规凸守戎规
旁苹绍俯旁苹绍俯
辉惰漠录辉惰漠录
柴家叹柴家叹
交疥1交疥1
交疥2交疥2
排厦戎规090-9999-9999
Eメ〖ルアドレスabc △ hoge.co.jp
+
+お葡け黎 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
お葡け黎叹杠狄叹
凸守戎规凸守戎规
旁苹绍俯旁苹绍俯
辉惰漠录辉惰漠录
柴家叹柴家叹
交疥1交疥1
交疥2交疥2
+
+柴家攫鼠 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
お葡け黎叹杠狄叹
凸守戎规凸守戎规
旁苹绍俯旁苹绍俯
辉惰漠录辉惰漠录
柴家叹柴家叹
交疥1交疥1
交疥2交疥2
+ +
+ \ No newline at end of file Added: pompei/trunk/src/main/webapp/view/admin/order/orderList.html =================================================================== --- pompei/trunk/src/main/webapp/view/admin/order/orderList.html 2007-07-12 19:54:25 UTC (rev 243) +++ pompei/trunk/src/main/webapp/view/admin/order/orderList.html 2007-07-12 19:55:06 UTC (rev 244) @@ -0,0 +1,50 @@ + + + + + +庙矢办枉 + + +

庙矢办枉

+
+? +踏借妄 +借妄面 +芹流貉 +  +
+踏借妄¨1凤
+借妄面¨2凤
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
庙矢ID杠狄ID杠狄叹旁苹绍俯辉惰漠录觉轮 
000120336皇窍 嗡吕虾澎叠旁绍面辉踏借妄 + + +
+
+ + \ No newline at end of file From svnnotify △ sourceforge.jp Fri Jul 13 06:12:30 2007 From: svnnotify △ sourceforge.jp (svnnotify △ sourceforge.jp) Date: Fri, 13 Jul 2007 06:12:30 +0900 Subject: [pal-cvs 2513] [245] updated for teeda Message-ID: <20070712211230.B19952AC03B@users.sourceforge.jp> Revision: 245 http://svn.sourceforge.jp/cgi-bin/viewcvs.cgi?root=pal&view=rev&rev=245 Author: shinsuke Date: 2007-07-13 06:12:30 +0900 (Fri, 13 Jul 2007) Log Message: ----------- updated for teeda Modified Paths: -------------- pompei/trunk/src/main/webapp/view/admin/product/productList.html -------------- next part -------------- Modified: pompei/trunk/src/main/webapp/view/admin/product/productList.html =================================================================== --- pompei/trunk/src/main/webapp/view/admin/product/productList.html 2007-07-12 19:55:06 UTC (rev 244) +++ pompei/trunk/src/main/webapp/view/admin/product/productList.html 2007-07-12 21:12:30 UTC (rev 245) @@ -3,34 +3,39 @@ -睛墒办枉 +睛墒办枉 -

睛墒办枉

-カテゴリ¨筏 ′ +
+

睛墒办枉

+ +
-ⅷ1¨1の眷圭。
-スニ〖カ〖 匙筏 サンダル -
ⅷ1¨Nの眷圭
- -ⅷ剩眶联买材墙 +
- - - - - - - - - + + + + + + + + @@ -45,8 +50,8 @@ @@ -54,4 +59,4 @@
NO睛墒叹イメ〖ジ房戎擦呈ステ〖タスメ〖カ〖纳裁泣  
アディダス 2007/07/12 - - + +
- \ No newline at end of file + From svnnotify △ sourceforge.jp Fri Jul 13 06:16:35 2007 From: svnnotify △ sourceforge.jp (svnnotify △ sourceforge.jp) Date: Fri, 13 Jul 2007 06:16:35 +0900 Subject: [pal-cvs 2514] [246] updated for teeda again.. Message-ID: <20070712211635.EFBAE2AC012@users.sourceforge.jp> Revision: 246 http://svn.sourceforge.jp/cgi-bin/viewcvs.cgi?root=pal&view=rev&rev=246 Author: shinsuke Date: 2007-07-13 06:16:35 +0900 (Fri, 13 Jul 2007) Log Message: ----------- updated for teeda again.. Modified Paths: -------------- pompei/trunk/src/main/webapp/view/admin/product/productList.html -------------- next part -------------- Modified: pompei/trunk/src/main/webapp/view/admin/product/productList.html =================================================================== --- pompei/trunk/src/main/webapp/view/admin/product/productList.html 2007-07-12 21:12:30 UTC (rev 245) +++ pompei/trunk/src/main/webapp/view/admin/product/productList.html 2007-07-12 21:16:35 UTC (rev 246) @@ -7,7 +7,7 @@
-

睛墒办枉

+

睛墒办枉